feat: Passwordless cross-device authentication

- Arkitektur: docs/auth/passwordless-architecture.md
- Backend: iom/quixzoom-auth-service/ (FastAPI + Redis)
- Webb: quixzoom-market-pages/se/login/ (QR-kod + polling)
- App: iom/quixzoom-app/src/features/auth/ (push + deep links)

Flöde: QR-kod → app-godkännande → webb-inloggad
This commit is contained in:
Bernt
2026-07-07 07:11:50 +00:00
parent 4aa984ad74
commit 6989a98d75
61843 changed files with 5491611 additions and 872231 deletions
+76
View File
@@ -0,0 +1,76 @@
# @redis/json
This package provides support for the [RedisJSON](https://redis.io/docs/latest/develop/data-types/json/) module, which adds JSON as a native data type to Redis.
Should be used with [`redis`/`@redis/client`](https://github.com/redis/node-redis).
:warning: To use these extra commands, your Redis server must have the RedisJSON module installed.
## Usage
For a complete example, see [`managing-json.js`](https://github.com/redis/node-redis/blob/master/examples/managing-json.js) in the [examples folder](https://github.com/redis/node-redis/tree/master/examples).
### Storing JSON Documents in Redis
The [`JSON.SET`](https://redis.io/commands/json.set/) command stores a JSON value at a given JSON Path in a Redis key.
Here, we'll store a JSON document in the root of the Redis key "`mydoc`":
```javascript
await client.json.set('noderedis:jsondata', '$', {
name: 'Roberta McDonald',
pets: [{
name: 'Rex',
species: 'dog',
age: 3,
isMammal: true
}, {
name: 'Goldie',
species: 'fish',
age: 2,
isMammal: false
}]
});
```
For more information about RedisJSON's path syntax, [check out the documentation](https://redis.io/docs/latest/develop/data-types/json/path).
### Retrieving JSON Documents from Redis
With RedisJSON, we can retrieve all or part(s) of a JSON document using the [`JSON.GET`](https://redis.io/commands/json.get/) command and one or more JSON Paths. Let's get the name and age of one of the pets:
```javascript
const results = await client.json.get('noderedis:jsondata', {
path: [
'.pets[1].name',
'.pets[1].age'
]
});
```
`results` will contain the following:
```javascript
{ '.pets[1].name': 'Goldie', '.pets[1].age': 2 }
```
### Performing Atomic Updates on JSON Documents Stored in Redis
RedisJSON includes commands that can atomically update values in a JSON document, in place in Redis without having to first retrieve the entire document.
Using the [`JSON.NUMINCRBY`](https://redis.io/commands/json.numincrby/) command, we can update the age of one of the pets like this:
```javascript
await client.json.numIncrBy('noderedis:jsondata', '.pets[1].age', 1);
```
And we can add a new object to the pets array with the [`JSON.ARRAPPEND`](https://redis.io/commands/json.arrappend/) command:
```javascript
await client.json.arrAppend('noderedis:jsondata', '.pets', {
name: 'Robin',
species: 'bird',
age: 1,
isMammal: false
});
```
@@ -0,0 +1,10 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisJSON } from '@redis/client/dist/lib/commands/generic-transformers';
import { RedisArgument, NumberReply, ArrayReply, NullReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, json: RedisJSON, ...jsons: Array<RedisJSON>) => void;
readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;
};
export default _default;
//# sourceMappingURL=ARRAPPEND.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"ARRAPPEND.d.ts","sourceRoot":"","sources":["../../../lib/commands/ARRAPPEND.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,SAAS,EAA8B,MAAM,sDAAsD,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAW,MAAM,mCAAmC,CAAC;;;gDAKnG,aAAa,OAChB,aAAa,QACZ,aAAa,QACb,SAAS,YACL,MAAM,SAAS,CAAC;mCAUkB,WAAW,GAAG,WAAW,WAAW,GAAG,SAAS,CAAC;;AAjBjG,wBAkB6B"}
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, path, json, ...jsons) {
parser.push('JSON.ARRAPPEND');
parser.pushKey(key);
parser.push(path, (0, generic_transformers_1.transformRedisJsonArgument)(json));
for (let i = 0; i < jsons.length; i++) {
parser.push((0, generic_transformers_1.transformRedisJsonArgument)(jsons[i]));
}
},
transformReply: undefined
};
//# sourceMappingURL=ARRAPPEND.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ARRAPPEND.js","sourceRoot":"","sources":["../../../lib/commands/ARRAPPEND.ts"],"names":[],"mappings":";;AACA,+FAA6G;AAG7G,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CACV,MAAqB,EACrB,GAAkB,EAClB,IAAmB,EACnB,IAAe,EACf,GAAG,KAAuB;QAE1B,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAA,iDAA0B,EAAC,IAAI,CAAC,CAAC,CAAC;QAEpD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,MAAM,CAAC,IAAI,CAAC,IAAA,iDAA0B,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAA+E;CACrE,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisJSON, transformRedisJsonArgument } from '@redis/client/dist/lib/commands/generic-transformers';\nimport { RedisArgument, NumberReply, ArrayReply, NullReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(\n parser: CommandParser,\n key: RedisArgument,\n path: RedisArgument,\n json: RedisJSON,\n ...jsons: Array<RedisJSON>\n ) {\n parser.push('JSON.ARRAPPEND');\n parser.pushKey(key);\n parser.push(path, transformRedisJsonArgument(json));\n\n for (let i = 0; i < jsons.length; i++) {\n parser.push(transformRedisJsonArgument(jsons[i]));\n }\n },\n transformReply: undefined as unknown as () => NumberReply | ArrayReply<NumberReply | NullReply>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,16 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply, ArrayReply, NullReply } from '@redis/client/dist/lib/RESP/types';
import { RedisJSON } from '@redis/client/dist/lib/commands/generic-transformers';
export interface JsonArrIndexOptions {
range?: {
start: number;
stop?: number;
};
}
declare const _default: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, json: RedisJSON, options?: JsonArrIndexOptions) => void;
readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;
};
export default _default;
//# sourceMappingURL=ARRINDEX.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"ARRINDEX.d.ts","sourceRoot":"","sources":["../../../lib/commands/ARRINDEX.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAW,MAAM,mCAAmC,CAAC;AAC/G,OAAO,EAAE,SAAS,EAA8B,MAAM,sDAAsD,CAAC;AAE7G,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH;;;gDAKW,aAAa,OAChB,aAAa,QACZ,aAAa,QACb,SAAS,YACL,mBAAmB;mCAce,WAAW,GAAG,WAAW,WAAW,GAAG,SAAS,CAAC;;AArBjG,wBAsB6B"}
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: true,
parseCommand(parser, key, path, json, options) {
parser.push('JSON.ARRINDEX');
parser.pushKey(key);
parser.push(path, (0, generic_transformers_1.transformRedisJsonArgument)(json));
if (options?.range) {
parser.push(options.range.start.toString());
if (options.range.stop !== undefined) {
parser.push(options.range.stop.toString());
}
}
},
transformReply: undefined
};
//# sourceMappingURL=ARRINDEX.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ARRINDEX.js","sourceRoot":"","sources":["../../../lib/commands/ARRINDEX.ts"],"names":[],"mappings":";;AAEA,+FAA6G;AAS7G,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB,YAAY,CACV,MAAqB,EACrB,GAAkB,EAClB,IAAmB,EACnB,IAAe,EACf,OAA6B;QAE7B,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC7B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAA,iDAA0B,EAAC,IAAI,CAAC,CAAC,CAAC;QAEpD,IAAI,OAAO,EAAE,KAAK,EAAE,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YAE5C,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;gBACrC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAA+E;CACrE,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, NumberReply, ArrayReply, NullReply, Command } from '@redis/client/dist/lib/RESP/types';\nimport { RedisJSON, transformRedisJsonArgument } from '@redis/client/dist/lib/commands/generic-transformers';\n\nexport interface JsonArrIndexOptions {\n range?: {\n start: number;\n stop?: number;\n };\n}\n\nexport default {\n IS_READ_ONLY: true,\n parseCommand(\n parser: CommandParser,\n key: RedisArgument,\n path: RedisArgument,\n json: RedisJSON,\n options?: JsonArrIndexOptions\n ) {\n parser.push('JSON.ARRINDEX');\n parser.pushKey(key);\n parser.push(path, transformRedisJsonArgument(json));\n\n if (options?.range) {\n parser.push(options.range.start.toString());\n\n if (options.range.stop !== undefined) {\n parser.push(options.range.stop.toString());\n }\n }\n },\n transformReply: undefined as unknown as () => NumberReply | ArrayReply<NumberReply | NullReply>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,10 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply, ArrayReply, NullReply } from '@redis/client/dist/lib/RESP/types';
import { RedisJSON } from '@redis/client/dist/lib/commands/generic-transformers';
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, index: number, json: RedisJSON, ...jsons: Array<RedisJSON>) => void;
readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;
};
export default _default;
//# sourceMappingURL=ARRINSERT.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"ARRINSERT.d.ts","sourceRoot":"","sources":["../../../lib/commands/ARRINSERT.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAW,MAAM,mCAAmC,CAAC;AAC/G,OAAO,EAAE,SAAS,EAA8B,MAAM,sDAAsD,CAAC;;;gDAKjG,aAAa,OAChB,aAAa,QACZ,aAAa,SACZ,MAAM,QACP,SAAS,YACL,MAAM,SAAS,CAAC;mCAUkB,WAAW,GAAG,WAAW,WAAW,GAAG,SAAS,CAAC;;AAlBjG,wBAmB6B"}
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, path, index, json, ...jsons) {
parser.push('JSON.ARRINSERT');
parser.pushKey(key);
parser.push(path, index.toString(), (0, generic_transformers_1.transformRedisJsonArgument)(json));
for (let i = 0; i < jsons.length; i++) {
parser.push((0, generic_transformers_1.transformRedisJsonArgument)(jsons[i]));
}
},
transformReply: undefined
};
//# sourceMappingURL=ARRINSERT.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ARRINSERT.js","sourceRoot":"","sources":["../../../lib/commands/ARRINSERT.ts"],"names":[],"mappings":";;AAEA,+FAA6G;AAE7G,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CACV,MAAqB,EACrB,GAAkB,EAClB,IAAmB,EACnB,KAAa,EACb,IAAe,EACf,GAAG,KAAuB;QAE1B,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAA,iDAA0B,EAAC,IAAI,CAAC,CAAC,CAAC;QAEtE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,MAAM,CAAC,IAAI,CAAC,IAAA,iDAA0B,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAA+E;CACrE,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, NumberReply, ArrayReply, NullReply, Command } from '@redis/client/dist/lib/RESP/types';\nimport { RedisJSON, transformRedisJsonArgument } from '@redis/client/dist/lib/commands/generic-transformers';\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(\n parser: CommandParser,\n key: RedisArgument,\n path: RedisArgument,\n index: number,\n json: RedisJSON,\n ...jsons: Array<RedisJSON>\n ) {\n parser.push('JSON.ARRINSERT');\n parser.pushKey(key);\n parser.push(path, index.toString(), transformRedisJsonArgument(json));\n\n for (let i = 0; i < jsons.length; i++) {\n parser.push(transformRedisJsonArgument(jsons[i]));\n }\n },\n transformReply: undefined as unknown as () => NumberReply | ArrayReply<NumberReply | NullReply>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,12 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, ArrayReply, NumberReply, NullReply } from '@redis/client/dist/lib/RESP/types';
export interface JsonArrLenOptions {
path?: RedisArgument;
}
declare const _default: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonArrLenOptions) => void;
readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;
};
export default _default;
//# sourceMappingURL=ARRLEN.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"ARRLEN.d.ts","sourceRoot":"","sources":["../../../lib/commands/ARRLEN.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAW,MAAM,mCAAmC,CAAC;AAE/G,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,iBAAiB;mCAOrC,WAAW,GAAG,WAAW,WAAW,GAAG,SAAS,CAAC;;AATjG,wBAU6B"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: true,
parseCommand(parser, key, options) {
parser.push('JSON.ARRLEN');
parser.pushKey(key);
if (options?.path !== undefined) {
parser.push(options.path);
}
},
transformReply: undefined
};
//# sourceMappingURL=ARRLEN.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ARRLEN.js","sourceRoot":"","sources":["../../../lib/commands/ARRLEN.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAA2B;QACjF,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAA+E;CACrE,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, ArrayReply, NumberReply, NullReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport interface JsonArrLenOptions {\n path?: RedisArgument;\n}\n\nexport default {\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, key: RedisArgument, options?: JsonArrLenOptions) {\n parser.push('JSON.ARRLEN');\n parser.pushKey(key);\n if (options?.path !== undefined) {\n parser.push(options.path);\n }\n },\n transformReply: undefined as unknown as () => NumberReply | ArrayReply<NumberReply | NullReply>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,16 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, ArrayReply, NullReply, BlobStringReply } from '@redis/client/dist/lib/RESP/types';
export interface RedisArrPopOptions {
path: RedisArgument;
index?: number;
}
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: RedisArrPopOptions) => void;
readonly transformReply: (this: void, reply: NullReply | BlobStringReply | ArrayReply<NullReply | BlobStringReply>) => string | number | boolean | Date | {
[key: string]: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON;
[key: number]: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON;
} | NullReply | (import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON | NullReply)[] | null;
};
export default _default;
//# sourceMappingURL=ARRPOP.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"ARRPOP.d.ts","sourceRoot":"","sources":["../../../lib/commands/ARRPOP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAwB,MAAM,mCAAmC,CAAC;AAGhI,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,kBAAkB;iDAY9D,SAAS,GAAG,eAAe,GAAG,WAAW,SAAS,GAAG,eAAe,CAAC;;;;;AAd7F,wBAmB6B"}
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, options) {
parser.push('JSON.ARRPOP');
parser.pushKey(key);
if (options) {
parser.push(options.path);
if (options.index !== undefined) {
parser.push(options.index.toString());
}
}
},
transformReply(reply) {
return (0, generic_transformers_1.isArrayReply)(reply) ?
reply.map(item => (0, generic_transformers_1.transformRedisJsonNullReply)(item)) :
(0, generic_transformers_1.transformRedisJsonNullReply)(reply);
}
};
//# sourceMappingURL=ARRPOP.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ARRPOP.js","sourceRoot":"","sources":["../../../lib/commands/ARRPOP.ts"],"names":[],"mappings":";;AAEA,+FAAiH;AAOjH,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAA4B;QAClF,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAE1B,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YACxC,CAAC;QACH,CAAC;IACH,CAAC;IACD,cAAc,CAAC,KAA4E;QACzF,OAAO,IAAA,mCAAY,EAAC,KAAK,CAAC,CAAC,CAAC;YACzB,KAA8C,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAA,kDAA2B,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChG,IAAA,kDAA2B,EAAC,KAAK,CAAC,CAAC;IACvC,CAAC;CACyB,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, ArrayReply, NullReply, BlobStringReply, Command, UnwrapReply } from '@redis/client/dist/lib/RESP/types';\nimport { isArrayReply, transformRedisJsonNullReply } from '@redis/client/dist/lib/commands/generic-transformers';\n\nexport interface RedisArrPopOptions {\n path: RedisArgument;\n index?: number;\n}\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(parser: CommandParser, key: RedisArgument, options?: RedisArrPopOptions) {\n parser.push('JSON.ARRPOP');\n parser.pushKey(key);\n\n if (options) {\n parser.push(options.path);\n\n if (options.index !== undefined) {\n parser.push(options.index.toString());\n }\n }\n },\n transformReply(reply: NullReply | BlobStringReply | ArrayReply<NullReply | BlobStringReply>) {\n return isArrayReply(reply) ?\n (reply as unknown as UnwrapReply<typeof reply>).map(item => transformRedisJsonNullReply(item)) :\n transformRedisJsonNullReply(reply);\n }\n} as const satisfies Command;\n\n"]}
@@ -0,0 +1,9 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, ArrayReply, NumberReply, NullReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, start: number, stop: number) => void;
readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;
};
export default _default;
//# sourceMappingURL=ARRTRIM.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"ARRTRIM.d.ts","sourceRoot":"","sources":["../../../lib/commands/ARRTRIM.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAW,MAAM,mCAAmC,CAAC;;;gDAIxF,aAAa,OAAO,aAAa,QAAQ,aAAa,SAAS,MAAM,QAAQ,MAAM;mCAK1D,WAAW,GAAG,WAAW,WAAW,GAAG,SAAS,CAAC;;AAPjG,wBAQ6B"}
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, path, start, stop) {
parser.push('JSON.ARRTRIM');
parser.pushKey(key);
parser.push(path, start.toString(), stop.toString());
},
transformReply: undefined
};
//# sourceMappingURL=ARRTRIM.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ARRTRIM.js","sourceRoot":"","sources":["../../../lib/commands/ARRTRIM.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,IAAmB,EAAE,KAAa,EAAE,IAAY;QACtG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC5B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvD,CAAC;IACD,cAAc,EAAE,SAA+E;CACrE,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, ArrayReply, NumberReply, NullReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(parser: CommandParser, key: RedisArgument, path: RedisArgument, start: number, stop: number) {\n parser.push('JSON.ARRTRIM');\n parser.pushKey(key);\n parser.push(path, start.toString(), stop.toString());\n },\n transformReply: undefined as unknown as () => NumberReply | ArrayReply<NumberReply | NullReply>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,12 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
export interface JsonClearOptions {
path?: RedisArgument;
}
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonClearOptions) => void;
readonly transformReply: () => NumberReply;
};
export default _default;
//# sourceMappingURL=CLEAR.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"CLEAR.d.ts","sourceRoot":"","sources":["../../../lib/commands/CLEAR.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;AAExF,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,gBAAgB;mCAQpC,WAAW;;AAV3D,wBAW6B"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, options) {
parser.push('JSON.CLEAR');
parser.pushKey(key);
if (options?.path !== undefined) {
parser.push(options.path);
}
},
transformReply: undefined
};
//# sourceMappingURL=CLEAR.js.map
@@ -0,0 +1 @@
{"version":3,"file":"CLEAR.js","sourceRoot":"","sources":["../../../lib/commands/CLEAR.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAA0B;QAChF,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAyC;CAC/B,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport interface JsonClearOptions {\n path?: RedisArgument;\n}\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(parser: CommandParser, key: RedisArgument, options?: JsonClearOptions) {\n parser.push('JSON.CLEAR');\n parser.pushKey(key);\n\n if (options?.path !== undefined) {\n parser.push(options.path);\n }\n },\n transformReply: undefined as unknown as () => NumberReply\n} as const satisfies Command;\n"]}
@@ -0,0 +1,12 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
export interface JsonDebugMemoryOptions {
path?: RedisArgument;
}
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonDebugMemoryOptions) => void;
readonly transformReply: () => NumberReply;
};
export default _default;
//# sourceMappingURL=DEBUG_MEMORY.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"DEBUG_MEMORY.d.ts","sourceRoot":"","sources":["../../../lib/commands/DEBUG_MEMORY.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;AAExF,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,sBAAsB;mCAQ1C,WAAW;;AAV3D,wBAW6B"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, options) {
parser.push('JSON.DEBUG', 'MEMORY');
parser.pushKey(key);
if (options?.path !== undefined) {
parser.push(options.path);
}
},
transformReply: undefined
};
//# sourceMappingURL=DEBUG_MEMORY.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DEBUG_MEMORY.js","sourceRoot":"","sources":["../../../lib/commands/DEBUG_MEMORY.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAAgC;QACtF,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QACpC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAyC;CAC/B,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport interface JsonDebugMemoryOptions {\n path?: RedisArgument;\n}\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(parser: CommandParser, key: RedisArgument, options?: JsonDebugMemoryOptions) {\n parser.push('JSON.DEBUG', 'MEMORY');\n parser.pushKey(key);\n\n if (options?.path !== undefined) {\n parser.push(options.path);\n }\n },\n transformReply: undefined as unknown as () => NumberReply\n} as const satisfies Command;\n"]}
@@ -0,0 +1,12 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
export interface JsonDelOptions {
path?: RedisArgument;
}
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonDelOptions) => void;
readonly transformReply: () => NumberReply;
};
export default _default;
//# sourceMappingURL=DEL.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"DEL.d.ts","sourceRoot":"","sources":["../../../lib/commands/DEL.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;AAExF,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,aAAa,CAAA;CACrB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,cAAc;mCAQlC,WAAW;;AAV3D,wBAW6B"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, options) {
parser.push('JSON.DEL');
parser.pushKey(key);
if (options?.path !== undefined) {
parser.push(options.path);
}
},
transformReply: undefined
};
//# sourceMappingURL=DEL.js.map
@@ -0,0 +1 @@
{"version":3,"file":"DEL.js","sourceRoot":"","sources":["../../../lib/commands/DEL.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAAwB;QAC9E,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAyC;CAC/B,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport interface JsonDelOptions {\n path?: RedisArgument\n}\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(parser: CommandParser, key: RedisArgument, options?: JsonDelOptions) {\n parser.push('JSON.DEL');\n parser.pushKey(key);\n\n if (options?.path !== undefined) {\n parser.push(options.path);\n }\n },\n transformReply: undefined as unknown as () => NumberReply\n} as const satisfies Command;\n"]}
@@ -0,0 +1,12 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
export interface JsonForgetOptions {
path?: RedisArgument;
}
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonForgetOptions) => void;
readonly transformReply: () => NumberReply;
};
export default _default;
//# sourceMappingURL=FORGET.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"FORGET.d.ts","sourceRoot":"","sources":["../../../lib/commands/FORGET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;AAExF,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,iBAAiB;mCAQrC,WAAW;;AAV3D,wBAW6B"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, options) {
parser.push('JSON.FORGET');
parser.pushKey(key);
if (options?.path !== undefined) {
parser.push(options.path);
}
},
transformReply: undefined
};
//# sourceMappingURL=FORGET.js.map
@@ -0,0 +1 @@
{"version":3,"file":"FORGET.js","sourceRoot":"","sources":["../../../lib/commands/FORGET.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAA2B;QACjF,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAyC;CAC/B,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, NumberReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport interface JsonForgetOptions {\n path?: RedisArgument;\n}\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(parser: CommandParser, key: RedisArgument, options?: JsonForgetOptions) {\n parser.push('JSON.FORGET');\n parser.pushKey(key);\n\n if (options?.path !== undefined) {\n parser.push(options.path);\n }\n },\n transformReply: undefined as unknown as () => NumberReply\n} as const satisfies Command;\n"]}
@@ -0,0 +1,13 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
import { RedisVariadicArgument, transformRedisJsonNullReply } from '@redis/client/dist/lib/commands/generic-transformers';
export interface JsonGetOptions {
path?: RedisVariadicArgument;
}
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonGetOptions) => void;
readonly transformReply: typeof transformRedisJsonNullReply;
};
export default _default;
//# sourceMappingURL=GET.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../lib/commands/GET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,sDAAsD,CAAC;AAE1H,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,qBAAqB,CAAC;CAC9B;;;gDAKW,aAAa,OAChB,aAAa,YACR,cAAc;;;AAL5B,wBAc6B"}
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, options) {
parser.push('JSON.GET');
parser.pushKey(key);
if (options?.path !== undefined) {
parser.pushVariadic(options.path);
}
},
transformReply: generic_transformers_1.transformRedisJsonNullReply
};
//# sourceMappingURL=GET.js.map
@@ -0,0 +1 @@
{"version":3,"file":"GET.js","sourceRoot":"","sources":["../../../lib/commands/GET.ts"],"names":[],"mappings":";;AAEA,+FAA0H;AAM1H,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CACV,MAAqB,EACrB,GAAkB,EAClB,OAAwB;QAExB,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IACD,cAAc,EAAE,kDAA2B;CACjB,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, Command } from '@redis/client/dist/lib/RESP/types';\nimport { RedisVariadicArgument, transformRedisJsonNullReply } from '@redis/client/dist/lib/commands/generic-transformers';\n\nexport interface JsonGetOptions {\n path?: RedisVariadicArgument;\n}\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(\n parser: CommandParser,\n key: RedisArgument,\n options?: JsonGetOptions\n ) {\n parser.push('JSON.GET');\n parser.pushKey(key);\n if (options?.path !== undefined) {\n parser.pushVariadic(options.path);\n }\n },\n transformReply: transformRedisJsonNullReply\n} as const satisfies Command;"]}
@@ -0,0 +1,10 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { SimpleStringReply, RedisArgument } from '@redis/client/dist/lib/RESP/types';
import { RedisJSON } from '@redis/client/dist/lib/commands/generic-transformers';
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, value: RedisJSON) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=MERGE.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"MERGE.d.ts","sourceRoot":"","sources":["../../../lib/commands/MERGE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAW,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC9F,OAAO,EAAE,SAAS,EAA8B,MAAM,sDAAsD,CAAC;;;gDAItF,aAAa,OAAO,aAAa,QAAQ,aAAa,SAAS,SAAS;mCAK/C,kBAAkB,IAAI,CAAC;;AAPvE,wBAQ6B"}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, path, value) {
parser.push('JSON.MERGE');
parser.pushKey(key);
parser.push(path, (0, generic_transformers_1.transformRedisJsonArgument)(value));
},
transformReply: undefined
};
//# sourceMappingURL=MERGE.js.map
@@ -0,0 +1 @@
{"version":3,"file":"MERGE.js","sourceRoot":"","sources":["../../../lib/commands/MERGE.ts"],"names":[],"mappings":";;AAEA,+FAA6G;AAE7G,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,IAAmB,EAAE,KAAgB;QAC3F,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAA,iDAA0B,EAAC,KAAK,CAAC,CAAC,CAAC;IACvD,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { SimpleStringReply, Command, RedisArgument } from '@redis/client/dist/lib/RESP/types';\nimport { RedisJSON, transformRedisJsonArgument } from '@redis/client/dist/lib/commands/generic-transformers';\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(parser: CommandParser, key: RedisArgument, path: RedisArgument, value: RedisJSON) {\n parser.push('JSON.MERGE');\n parser.pushKey(key);\n parser.push(path, transformRedisJsonArgument(value));\n },\n transformReply: undefined as unknown as () => SimpleStringReply<'OK'>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,9 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, UnwrapReply, ArrayReply, NullReply, BlobStringReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, keys: Array<RedisArgument>, path: RedisArgument) => void;
readonly transformReply: (this: void, reply: UnwrapReply<ArrayReply<NullReply | BlobStringReply>>) => (import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON | NullReply)[];
};
export default _default;
//# sourceMappingURL=MGET.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"MGET.d.ts","sourceRoot":"","sources":["../../../lib/commands/MGET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAW,MAAM,mCAAmC,CAAC;;;gDAKzG,aAAa,QAAQ,MAAM,aAAa,CAAC,QAAQ,aAAa;iDAK7D,YAAY,WAAW,SAAS,GAAG,eAAe,CAAC,CAAC;;AAP5E,wBAU6B"}
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: true,
parseCommand(parser, keys, path) {
parser.push('JSON.MGET');
parser.pushKeys(keys);
parser.push(path);
},
transformReply(reply) {
return reply.map(json => (0, generic_transformers_1.transformRedisJsonNullReply)(json));
}
};
//# sourceMappingURL=MGET.js.map
@@ -0,0 +1 @@
{"version":3,"file":"MGET.js","sourceRoot":"","sources":["../../../lib/commands/MGET.ts"],"names":[],"mappings":";;AAEA,+FAAmG;AAEnG,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,IAA0B,EAAE,IAAmB;QACjF,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACtB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,cAAc,CAAC,KAA2D;QACxE,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAA,kDAA2B,EAAC,IAAI,CAAC,CAAC,CAAA;IAC7D,CAAC;CACyB,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, UnwrapReply, ArrayReply, NullReply, BlobStringReply, Command } from '@redis/client/dist/lib/RESP/types';\nimport { transformRedisJsonNullReply } from '@redis/client/dist/lib/commands/generic-transformers';\n\nexport default {\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, keys: Array<RedisArgument>, path: RedisArgument) {\n parser.push('JSON.MGET');\n parser.pushKeys(keys);\n parser.push(path);\n },\n transformReply(reply: UnwrapReply<ArrayReply<NullReply | BlobStringReply>>) {\n return reply.map(json => transformRedisJsonNullReply(json))\n }\n} as const satisfies Command;\n"]}
@@ -0,0 +1,15 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, SimpleStringReply } from '@redis/client/dist/lib/RESP/types';
import { RedisJSON } from '@redis/client/dist/lib/commands/generic-transformers';
export interface JsonMSetItem {
key: RedisArgument;
path: RedisArgument;
value: RedisJSON;
}
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, items: Array<JsonMSetItem>) => void;
readonly transformReply: () => SimpleStringReply<'OK'>;
};
export default _default;
//# sourceMappingURL=MSET.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"MSET.d.ts","sourceRoot":"","sources":["../../../lib/commands/MSET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,mCAAmC,CAAC;AAC9F,OAAO,EAAE,SAAS,EAA8B,MAAM,sDAAsD,CAAC;AAE7G,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,aAAa,CAAC;IACnB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;CAClB;;;gDAIsB,aAAa,SAAS,MAAM,YAAY,CAAC;mCAQhB,kBAAkB,IAAI,CAAC;;AAVvE,wBAW6B"}
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, items) {
parser.push('JSON.MSET');
for (let i = 0; i < items.length; i++) {
parser.pushKey(items[i].key);
parser.push(items[i].path, (0, generic_transformers_1.transformRedisJsonArgument)(items[i].value));
}
},
transformReply: undefined
};
//# sourceMappingURL=MSET.js.map
@@ -0,0 +1 @@
{"version":3,"file":"MSET.js","sourceRoot":"","sources":["../../../lib/commands/MSET.ts"],"names":[],"mappings":";;AAEA,+FAA6G;AAQ7G,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,KAA0B;QAC5D,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,IAAA,iDAA0B,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAqD;CAC3C,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, SimpleStringReply, Command } from '@redis/client/dist/lib/RESP/types';\nimport { RedisJSON, transformRedisJsonArgument } from '@redis/client/dist/lib/commands/generic-transformers';\n\nexport interface JsonMSetItem {\n key: RedisArgument;\n path: RedisArgument;\n value: RedisJSON;\n}\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(parser: CommandParser, items: Array<JsonMSetItem>) {\n parser.push('JSON.MSET');\n\n for (let i = 0; i < items.length; i++) {\n parser.pushKey(items[i].key);\n parser.push(items[i].path, transformRedisJsonArgument(items[i].value));\n }\n },\n transformReply: undefined as unknown as () => SimpleStringReply<'OK'>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,12 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, ArrayReply, NumberReply, DoubleReply, NullReply, BlobStringReply, UnwrapReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, by: number) => void;
readonly transformReply: {
readonly 2: (reply: UnwrapReply<BlobStringReply>) => number | (number | null)[];
readonly 3: () => ArrayReply<NumberReply | DoubleReply | NullReply>;
};
};
export default _default;
//# sourceMappingURL=NUMINCRBY.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"NUMINCRBY.d.ts","sourceRoot":"","sources":["../../../lib/commands/NUMINCRBY.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;;;gDAInI,aAAa,OAAO,aAAa,QAAQ,aAAa,MAAM,MAAM;;4BAM1E,YAAY,eAAe,CAAC;0BAGN,WAAW,WAAW,GAAG,WAAW,GAAG,SAAS,CAAC;;;AAXtF,wBAa6B"}
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, path, by) {
parser.push('JSON.NUMINCRBY');
parser.pushKey(key);
parser.push(path, by.toString());
},
transformReply: {
2: (reply) => {
return JSON.parse(reply.toString());
},
3: undefined
}
};
//# sourceMappingURL=NUMINCRBY.js.map
@@ -0,0 +1 @@
{"version":3,"file":"NUMINCRBY.js","sourceRoot":"","sources":["../../../lib/commands/NUMINCRBY.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,IAAmB,EAAE,EAAU;QACrF,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;IACnC,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,CAAC,KAAmC,EAAE,EAAE;YACzC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAkC,CAAC;QACvE,CAAC;QACD,CAAC,EAAE,SAA+E;KACnF;CACyB,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, ArrayReply, NumberReply, DoubleReply, NullReply, BlobStringReply, UnwrapReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(parser: CommandParser, key: RedisArgument, path: RedisArgument, by: number) {\n parser.push('JSON.NUMINCRBY');\n parser.pushKey(key);\n parser.push(path, by.toString());\n },\n transformReply: {\n 2: (reply: UnwrapReply<BlobStringReply>) => {\n return JSON.parse(reply.toString()) as number | Array<null | number>;\n },\n 3: undefined as unknown as () => ArrayReply<NumberReply | DoubleReply | NullReply>\n }\n} as const satisfies Command;\n"]}
@@ -0,0 +1,12 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, by: number) => void;
readonly transformReply: {
readonly 2: (reply: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>) => number | (number | null)[];
readonly 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").DoubleReply<number>>;
};
};
export default _default;
//# sourceMappingURL=NUMMULTBY.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"NUMMULTBY.d.ts","sourceRoot":"","sources":["../../../lib/commands/NUMMULTBY.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,MAAM,mCAAmC,CAAC;;;gDAKpD,aAAa,OAAO,aAAa,QAAQ,aAAa,MAAM,MAAM;;;;;;AAFzF,wBAQ6B"}
@@ -0,0 +1,16 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const NUMINCRBY_1 = __importDefault(require("./NUMINCRBY"));
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, path, by) {
parser.push('JSON.NUMMULTBY');
parser.pushKey(key);
parser.push(path, by.toString());
},
transformReply: NUMINCRBY_1.default.transformReply
};
//# sourceMappingURL=NUMMULTBY.js.map
@@ -0,0 +1 @@
{"version":3,"file":"NUMMULTBY.js","sourceRoot":"","sources":["../../../lib/commands/NUMMULTBY.ts"],"names":[],"mappings":";;;;;AAEA,4DAAoC;AAEpC,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,IAAmB,EAAE,EAAU;QACrF,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;IACnC,CAAC;IACD,cAAc,EAAE,mBAAS,CAAC,cAAc;CACd,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, Command } from '@redis/client/dist/lib/RESP/types';\nimport NUMINCRBY from './NUMINCRBY';\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(parser: CommandParser, key: RedisArgument, path: RedisArgument, by: number) {\n parser.push('JSON.NUMMULTBY');\n parser.pushKey(key);\n parser.push(path, by.toString());\n },\n transformReply: NUMINCRBY.transformReply\n} as const satisfies Command;\n"]}
@@ -0,0 +1,12 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, ArrayReply, BlobStringReply, NullReply } from '@redis/client/dist/lib/RESP/types';
export interface JsonObjKeysOptions {
path?: RedisArgument;
}
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonObjKeysOptions) => void;
readonly transformReply: () => ArrayReply<BlobStringReply> | ArrayReply<ArrayReply<BlobStringReply> | NullReply>;
};
export default _default;
//# sourceMappingURL=OBJKEYS.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"OBJKEYS.d.ts","sourceRoot":"","sources":["../../../lib/commands/OBJKEYS.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAW,MAAM,mCAAmC,CAAC;AAEnH,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,kBAAkB;mCAOtC,WAAW,eAAe,CAAC,GAAG,WAAW,WAAW,eAAe,CAAC,GAAG,SAAS,CAAC;;AATjI,wBAU6B"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, options) {
parser.push('JSON.OBJKEYS');
parser.pushKey(key);
if (options?.path !== undefined) {
parser.push(options.path);
}
},
transformReply: undefined
};
//# sourceMappingURL=OBJKEYS.js.map
@@ -0,0 +1 @@
{"version":3,"file":"OBJKEYS.js","sourceRoot":"","sources":["../../../lib/commands/OBJKEYS.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAA4B;QAClF,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC5B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAA+G;CACrG,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, ArrayReply, BlobStringReply, NullReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport interface JsonObjKeysOptions {\n path?: RedisArgument;\n}\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(parser: CommandParser, key: RedisArgument, options?: JsonObjKeysOptions) {\n parser.push('JSON.OBJKEYS');\n parser.pushKey(key);\n if (options?.path !== undefined) {\n parser.push(options.path);\n }\n },\n transformReply: undefined as unknown as () => ArrayReply<BlobStringReply> | ArrayReply<ArrayReply<BlobStringReply> | NullReply>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,12 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NumberReply, ArrayReply, NullReply } from '@redis/client/dist/lib/RESP/types';
export interface JsonObjLenOptions {
path?: RedisArgument;
}
declare const _default: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonObjLenOptions) => void;
readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;
};
export default _default;
//# sourceMappingURL=OBJLEN.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"OBJLEN.d.ts","sourceRoot":"","sources":["../../../lib/commands/OBJLEN.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAW,MAAM,mCAAmC,CAAC;AAE/G,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,iBAAiB;mCAOrC,WAAW,GAAG,WAAW,WAAW,GAAG,SAAS,CAAC;;AATjG,wBAU6B"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: true,
parseCommand(parser, key, options) {
parser.push('JSON.OBJLEN');
parser.pushKey(key);
if (options?.path !== undefined) {
parser.push(options.path);
}
},
transformReply: undefined
};
//# sourceMappingURL=OBJLEN.js.map
@@ -0,0 +1 @@
{"version":3,"file":"OBJLEN.js","sourceRoot":"","sources":["../../../lib/commands/OBJLEN.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAA2B;QACjF,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAA+E;CACrE,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, NumberReply, ArrayReply, NullReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport interface JsonObjLenOptions {\n path?: RedisArgument;\n}\n\nexport default {\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, key: RedisArgument, options?: JsonObjLenOptions) {\n parser.push('JSON.OBJLEN');\n parser.pushKey(key);\n if (options?.path !== undefined) {\n parser.push(options.path);\n }\n },\n transformReply: undefined as unknown as () => NumberReply | ArrayReply<NumberReply | NullReply>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,10 @@
import { CommandParser } from "@redis/client/dist/lib/client/parser";
import { RedisArgument } from "@redis/client/dist/lib/RESP/types";
type RESPReply = Array<string | number | RESPReply>;
declare const _default: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path?: string) => void;
readonly transformReply: () => RESPReply;
};
export default _default;
//# sourceMappingURL=RESP.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"RESP.d.ts","sourceRoot":"","sources":["../../../lib/commands/RESP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAW,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAE3E,KAAK,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;;;gDAI7B,aAAa,OAAO,aAAa,SAAS,MAAM;;;AAFvE,wBAU+B"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: true,
parseCommand(parser, key, path) {
parser.push('JSON.RESP');
parser.pushKey(key);
if (path !== undefined) {
parser.push(path);
}
},
transformReply: undefined
};
//# sourceMappingURL=RESP.js.map
@@ -0,0 +1 @@
{"version":3,"file":"RESP.js","sourceRoot":"","sources":["../../../lib/commands/RESP.ts"],"names":[],"mappings":";;AAKA,kBAAe;IACX,YAAY,EAAE,IAAI;IACpB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,IAAa;QACjE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAuC;CAC7B,CAAC","sourcesContent":["import { CommandParser } from \"@redis/client/dist/lib/client/parser\";\nimport { Command, RedisArgument } from \"@redis/client/dist/lib/RESP/types\";\n\ntype RESPReply = Array<string | number | RESPReply>;\n\nexport default {\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, key: RedisArgument, path?: string) {\n parser.push('JSON.RESP');\n parser.pushKey(key);\n if (path !== undefined) {\n parser.push(path);\n }\n },\n transformReply: undefined as unknown as () => RESPReply\n } as const satisfies Command;"]}
@@ -0,0 +1,26 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, SimpleStringReply, NullReply } from '@redis/client/dist/lib/RESP/types';
import { RedisJSON } from '@redis/client/dist/lib/commands/generic-transformers';
export interface JsonSetOptions {
condition?: 'NX' | 'XX';
/**
* @deprecated Use `{ condition: 'NX' }` instead.
*/
NX?: boolean;
/**
* @deprecated Use `{ condition: 'XX' }` instead.
*/
XX?: boolean;
/**
* If set, forces Redis to use the specified floating-point type for storing all FP homogeneous arrays.
* available since 8.8
*/
fpha?: 'BF16' | 'FP16' | 'FP32' | 'FP64';
}
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, json: RedisJSON, options?: JsonSetOptions) => void;
readonly transformReply: () => SimpleStringReply<'OK'> | NullReply;
};
export default _default;
//# sourceMappingURL=SET.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"SET.d.ts","sourceRoot":"","sources":["../../../lib/commands/SET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAW,MAAM,mCAAmC,CAAC;AACzG,OAAO,EAAE,SAAS,EAA8B,MAAM,sDAAsD,CAAC;AAE7G,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IACb;;OAEG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAC1C;;;gDAKW,aAAa,OAChB,aAAa,QACZ,aAAa,QACb,SAAS,YACL,cAAc;mCAiBoB,kBAAkB,IAAI,CAAC,GAAG,SAAS;;AAxBnF,wBAyB6B"}
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, path, json, options) {
parser.push('JSON.SET');
parser.pushKey(key);
parser.push(path, (0, generic_transformers_1.transformRedisJsonArgument)(json));
if (options?.condition) {
parser.push(options?.condition);
}
else if (options?.NX) {
parser.push('NX');
}
else if (options?.XX) {
parser.push('XX');
}
if (options?.fpha !== undefined) {
parser.push('FPHA', options.fpha);
}
},
transformReply: undefined
};
//# sourceMappingURL=SET.js.map
@@ -0,0 +1 @@
{"version":3,"file":"SET.js","sourceRoot":"","sources":["../../../lib/commands/SET.ts"],"names":[],"mappings":";;AAEA,+FAA6G;AAmB7G,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CACV,MAAqB,EACrB,GAAkB,EAClB,IAAmB,EACnB,IAAe,EACf,OAAwB;QAExB,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAA,iDAA0B,EAAC,IAAI,CAAC,CAAC,CAAC;QAEpD,IAAI,OAAO,EAAE,SAAS,EAAE,CAAC;YACvB,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAClC,CAAC;aAAM,IAAI,OAAO,EAAE,EAAE,EAAE,CAAC;YACvB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;aAAM,IAAI,OAAO,EAAE,EAAE,EAAE,CAAC;YACvB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;QACD,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAiE;CACvD,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, SimpleStringReply, NullReply, Command } from '@redis/client/dist/lib/RESP/types';\nimport { RedisJSON, transformRedisJsonArgument } from '@redis/client/dist/lib/commands/generic-transformers';\n\nexport interface JsonSetOptions {\n condition?: 'NX' | 'XX';\n /**\n * @deprecated Use `{ condition: 'NX' }` instead.\n */\n NX?: boolean;\n /**\n * @deprecated Use `{ condition: 'XX' }` instead.\n */\n XX?: boolean;\n /**\n * If set, forces Redis to use the specified floating-point type for storing all FP homogeneous arrays.\n * available since 8.8\n */\n fpha?: 'BF16' | 'FP16' | 'FP32' | 'FP64';\n}\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(\n parser: CommandParser,\n key: RedisArgument,\n path: RedisArgument,\n json: RedisJSON,\n options?: JsonSetOptions\n ) {\n parser.push('JSON.SET');\n parser.pushKey(key);\n parser.push(path, transformRedisJsonArgument(json));\n\n if (options?.condition) {\n parser.push(options?.condition);\n } else if (options?.NX) {\n parser.push('NX');\n } else if (options?.XX) {\n parser.push('XX');\n }\n if (options?.fpha !== undefined) {\n parser.push('FPHA', options.fpha);\n }\n },\n transformReply: undefined as unknown as () => SimpleStringReply<'OK'> | NullReply\n} as const satisfies Command;\n"]}
@@ -0,0 +1,12 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, NullReply, NumberReply, ArrayReply } from '@redis/client/dist/lib/RESP/types';
export interface JsonStrAppendOptions {
path?: RedisArgument;
}
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, append: string, options?: JsonStrAppendOptions) => void;
readonly transformReply: () => NumberReply | ArrayReply<NullReply | NumberReply>;
};
export default _default;
//# sourceMappingURL=STRAPPEND.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"STRAPPEND.d.ts","sourceRoot":"","sources":["../../../lib/commands/STRAPPEND.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAG/G,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;;;gDAIsB,aAAa,OAAO,aAAa,UAAU,MAAM,YAAY,oBAAoB;mCAUxD,WAAW,GAAG,WAAW,SAAS,GAAG,WAAW,CAAC;;AAZjG,wBAa6B"}
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, append, options) {
parser.push('JSON.STRAPPEND');
parser.pushKey(key);
if (options?.path !== undefined) {
parser.push(options.path);
}
parser.push((0, generic_transformers_1.transformRedisJsonArgument)(append));
},
transformReply: undefined
};
//# sourceMappingURL=STRAPPEND.js.map
@@ -0,0 +1 @@
{"version":3,"file":"STRAPPEND.js","sourceRoot":"","sources":["../../../lib/commands/STRAPPEND.ts"],"names":[],"mappings":";;AAEA,+FAAkG;AAMlG,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,MAAc,EAAE,OAA8B;QACpG,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,IAAA,iDAA0B,EAAC,MAAM,CAAC,CAAC,CAAC;IAClD,CAAC;IACD,cAAc,EAAE,SAA+E;CACrE,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, Command, NullReply, NumberReply, ArrayReply } from '@redis/client/dist/lib/RESP/types';\nimport { transformRedisJsonArgument } from '@redis/client/dist/lib/commands/generic-transformers';\n\nexport interface JsonStrAppendOptions {\n path?: RedisArgument;\n}\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(parser: CommandParser, key: RedisArgument, append: string, options?: JsonStrAppendOptions) {\n parser.push('JSON.STRAPPEND');\n parser.pushKey(key);\n\n if (options?.path !== undefined) {\n parser.push(options.path);\n }\n\n parser.push(transformRedisJsonArgument(append));\n },\n transformReply: undefined as unknown as () => NumberReply | ArrayReply<NullReply | NumberReply>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,12 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, ArrayReply, NumberReply, NullReply } from '@redis/client/dist/lib/RESP/types';
export interface JsonStrLenOptions {
path?: RedisArgument;
}
declare const _default: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonStrLenOptions) => void;
readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;
};
export default _default;
//# sourceMappingURL=STRLEN.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"STRLEN.d.ts","sourceRoot":"","sources":["../../../lib/commands/STRLEN.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAW,MAAM,mCAAmC,CAAC;AAE/G,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,iBAAiB;mCAQrC,WAAW,GAAG,WAAW,WAAW,GAAG,SAAS,CAAC;;AAVjG,wBAW6B"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: true,
parseCommand(parser, key, options) {
parser.push('JSON.STRLEN');
parser.pushKey(key);
if (options?.path) {
parser.push(options.path);
}
},
transformReply: undefined
};
//# sourceMappingURL=STRLEN.js.map
@@ -0,0 +1 @@
{"version":3,"file":"STRLEN.js","sourceRoot":"","sources":["../../../lib/commands/STRLEN.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAA2B;QACjF,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,IAAI,EAAE,CAAC;YAClB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAA+E;CACrE,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, ArrayReply, NumberReply, NullReply, Command } from '@redis/client/dist/lib/RESP/types';\n\nexport interface JsonStrLenOptions {\n path?: RedisArgument;\n}\n\nexport default {\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, key: RedisArgument, options?: JsonStrLenOptions) {\n parser.push('JSON.STRLEN');\n parser.pushKey(key);\n\n if (options?.path) {\n parser.push(options.path);\n }\n },\n transformReply: undefined as unknown as () => NumberReply | ArrayReply<NumberReply | NullReply>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,9 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { RedisArgument, ArrayReply, NumberReply, NullReply } from '@redis/client/dist/lib/RESP/types';
declare const _default: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument) => void;
readonly transformReply: () => NumberReply | NullReply | ArrayReply<NumberReply | NullReply>;
};
export default _default;
//# sourceMappingURL=TOGGLE.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"TOGGLE.d.ts","sourceRoot":"","sources":["../../../lib/commands/TOGGLE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAY,MAAM,mCAAmC,CAAC;;;gDAIzF,aAAa,OAAO,aAAa,QAAQ,aAAa;mCAK7B,WAAW,GAAG,SAAS,GAAG,WAAW,WAAW,GAAG,SAAS,CAAC;;AAP7G,wBAQ6B"}
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: false,
parseCommand(parser, key, path) {
parser.push('JSON.TOGGLE');
parser.pushKey(key);
parser.push(path);
},
transformReply: undefined
};
//# sourceMappingURL=TOGGLE.js.map
@@ -0,0 +1 @@
{"version":3,"file":"TOGGLE.js","sourceRoot":"","sources":["../../../lib/commands/TOGGLE.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,IAAmB;QACzE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,cAAc,EAAE,SAA2F;CACjF,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { RedisArgument, ArrayReply, NumberReply, NullReply, Command, } from '@redis/client/dist/lib/RESP/types';\n\nexport default {\n IS_READ_ONLY: false,\n parseCommand(parser: CommandParser, key: RedisArgument, path: RedisArgument) {\n parser.push('JSON.TOGGLE');\n parser.pushKey(key);\n parser.push(path);\n },\n transformReply: undefined as unknown as () => NumberReply | NullReply | ArrayReply<NumberReply | NullReply>\n} as const satisfies Command;\n"]}
@@ -0,0 +1,15 @@
import { CommandParser } from '@redis/client/dist/lib/client/parser';
import { NullReply, BlobStringReply, ArrayReply, RedisArgument, UnwrapReply } from '@redis/client/dist/lib/RESP/types';
export interface JsonTypeOptions {
path?: RedisArgument;
}
declare const _default: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonTypeOptions) => void;
readonly transformReply: {
readonly 2: () => NullReply | BlobStringReply | ArrayReply<BlobStringReply | NullReply>;
readonly 3: (reply: UnwrapReply<ArrayReply<NullReply | BlobStringReply | ArrayReply<BlobStringReply | NullReply>>>) => NullReply | BlobStringReply<string> | ArrayReply<NullReply | BlobStringReply<string>>;
};
};
export default _default;
//# sourceMappingURL=TYPE.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"TYPE.d.ts","sourceRoot":"","sources":["../../../lib/commands/TYPE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAW,aAAa,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhI,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,eAAe;;0BAS9C,SAAS,GAAG,eAAe,GAAG,WAAW,eAAe,GAAG,SAAS,CAAC;4BAE3F,YAAY,WAAW,SAAS,GAAG,eAAe,GAAG,WAAW,eAAe,GAAG,SAAS,CAAC,CAAC,CAAC;;;AAb7G,wBAiB6B"}
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
IS_READ_ONLY: true,
parseCommand(parser, key, options) {
parser.push('JSON.TYPE');
parser.pushKey(key);
if (options?.path) {
parser.push(options.path);
}
},
transformReply: {
2: undefined,
// TODO: RESP3 wraps the response in another array, but only returns 1
3: (reply) => {
return reply[0];
}
},
};
//# sourceMappingURL=TYPE.js.map
@@ -0,0 +1 @@
{"version":3,"file":"TYPE.js","sourceRoot":"","sources":["../../../lib/commands/TYPE.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAAyB;QAC/E,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,IAAI,EAAE,CAAC;YAClB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,cAAc,EAAE;QACd,CAAC,EAAE,SAAmG;QACtG,uEAAuE;QACvE,CAAC,EAAE,CAAC,KAAqG,EAAE,EAAE;YAC3G,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;KACF;CACyB,CAAC","sourcesContent":["import { CommandParser } from '@redis/client/dist/lib/client/parser';\nimport { NullReply, BlobStringReply, ArrayReply, Command, RedisArgument, UnwrapReply } from '@redis/client/dist/lib/RESP/types';\n\nexport interface JsonTypeOptions {\n path?: RedisArgument;\n}\n\nexport default {\n IS_READ_ONLY: true,\n parseCommand(parser: CommandParser, key: RedisArgument, options?: JsonTypeOptions) {\n parser.push('JSON.TYPE');\n parser.pushKey(key);\n\n if (options?.path) {\n parser.push(options.path);\n }\n },\n transformReply: {\n 2: undefined as unknown as () => NullReply | BlobStringReply | ArrayReply<BlobStringReply | NullReply>,\n // TODO: RESP3 wraps the response in another array, but only returns 1 \n 3: (reply: UnwrapReply<ArrayReply<NullReply | BlobStringReply | ArrayReply<BlobStringReply | NullReply>>>) => {\n return reply[0];\n }\n },\n} as const satisfies Command;\n"]}
@@ -0,0 +1,652 @@
export type { RedisJSON } from '@redis/client/dist/lib/commands/generic-transformers';
export { transformRedisJsonArgument, transformRedisJsonReply, transformRedisJsonNullReply } from '@redis/client/dist/lib/commands/generic-transformers';
declare const _default: {
/**
* Appends one or more values to the end of an array in a JSON document.
* Returns the new array length after append, or null if the path does not exist.
*
* @param key - The key to append to
* @param path - Path to the array in the JSON document
* @param json - The first value to append
* @param jsons - Additional values to append
*/
ARRAPPEND: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, json: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON, ...jsons: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON[]) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Appends one or more values to the end of an array in a JSON document.
* Returns the new array length after append, or null if the path does not exist.
*
* @param key - The key to append to
* @param path - Path to the array in the JSON document
* @param json - The first value to append
* @param jsons - Additional values to append
*/
arrAppend: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, json: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON, ...jsons: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON[]) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Returns the index of the first occurrence of a value in a JSON array.
* If the specified value is not found, it returns -1, or null if the path does not exist.
*
* @param key - The key containing the array
* @param path - Path to the array in the JSON document
* @param json - The value to search for
* @param options - Optional range parameters for the search
* @param options.range.start - Starting index for the search
* @param options.range.stop - Optional ending index for the search
*/
ARRINDEX: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, json: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON, options?: import("./ARRINDEX").JsonArrIndexOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Returns the index of the first occurrence of a value in a JSON array.
* If the specified value is not found, it returns -1, or null if the path does not exist.
*
* @param key - The key containing the array
* @param path - Path to the array in the JSON document
* @param json - The value to search for
* @param options - Optional range parameters for the search
* @param options.range.start - Starting index for the search
* @param options.range.stop - Optional ending index for the search
*/
arrIndex: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, json: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON, options?: import("./ARRINDEX").JsonArrIndexOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Inserts one or more values into an array at the specified index.
* Returns the new array length after insert, or null if the path does not exist.
*
* @param key - The key containing the array
* @param path - Path to the array in the JSON document
* @param index - The position where to insert the values
* @param json - The first value to insert
* @param jsons - Additional values to insert
*/
ARRINSERT: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, index: number, json: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON, ...jsons: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON[]) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Inserts one or more values into an array at the specified index.
* Returns the new array length after insert, or null if the path does not exist.
*
* @param key - The key containing the array
* @param path - Path to the array in the JSON document
* @param index - The position where to insert the values
* @param json - The first value to insert
* @param jsons - Additional values to insert
*/
arrInsert: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, index: number, json: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON, ...jsons: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON[]) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Returns the length of an array in a JSON document.
* Returns null if the path does not exist or the value is not an array.
*
* @param key - The key containing the array
* @param options - Optional parameters
* @param options.path - Path to the array in the JSON document
*/
ARRLEN: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./ARRLEN").JsonArrLenOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Returns the length of an array in a JSON document.
* Returns null if the path does not exist or the value is not an array.
*
* @param key - The key containing the array
* @param options - Optional parameters
* @param options.path - Path to the array in the JSON document
*/
arrLen: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./ARRLEN").JsonArrLenOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Removes and returns an element from an array in a JSON document.
* Returns null if the path does not exist or the value is not an array.
*
* @param key - The key containing the array
* @param options - Optional parameters
* @param options.path - Path to the array in the JSON document
* @param options.index - Optional index to pop from. Default is -1 (last element)
*/
ARRPOP: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./ARRPOP").RedisArrPopOptions | undefined) => void;
readonly transformReply: (this: void, reply: import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>) => string | number | boolean | Date | {
[key: string]: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON;
[key: number]: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON;
} | import("@redis/client/dist/lib/RESP/types").NullReply | (import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON | import("@redis/client/dist/lib/RESP/types").NullReply)[] | null;
};
/**
* Removes and returns an element from an array in a JSON document.
* Returns null if the path does not exist or the value is not an array.
*
* @param key - The key containing the array
* @param options - Optional parameters
* @param options.path - Path to the array in the JSON document
* @param options.index - Optional index to pop from. Default is -1 (last element)
*/
arrPop: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./ARRPOP").RedisArrPopOptions | undefined) => void;
readonly transformReply: (this: void, reply: import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>) => string | number | boolean | Date | {
[key: string]: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON;
[key: number]: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON;
} | import("@redis/client/dist/lib/RESP/types").NullReply | (import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON | import("@redis/client/dist/lib/RESP/types").NullReply)[] | null;
};
/**
* Trims an array in a JSON document to include only elements within the specified range.
* Returns the new array length after trimming, or null if the path does not exist.
*
* @param key - The key containing the array
* @param path - Path to the array in the JSON document
* @param start - Starting index (inclusive)
* @param stop - Ending index (inclusive)
*/
ARRTRIM: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, start: number, stop: number) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Trims an array in a JSON document to include only elements within the specified range.
* Returns the new array length after trimming, or null if the path does not exist.
*
* @param key - The key containing the array
* @param path - Path to the array in the JSON document
* @param start - Starting index (inclusive)
* @param stop - Ending index (inclusive)
*/
arrTrim: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, start: number, stop: number) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Clears container values (arrays/objects) in a JSON document.
* Returns the number of values cleared (0 or 1), or null if the path does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the container to clear
*/
CLEAR: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./CLEAR").JsonClearOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Clears container values (arrays/objects) in a JSON document.
* Returns the number of values cleared (0 or 1), or null if the path does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the container to clear
*/
clear: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./CLEAR").JsonClearOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Reports memory usage details for a JSON document value.
* Returns size in bytes of the value, or null if the key or path does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to examine
*/
DEBUG_MEMORY: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./DEBUG_MEMORY").JsonDebugMemoryOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Reports memory usage details for a JSON document value.
* Returns size in bytes of the value, or null if the key or path does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to examine
*/
debugMemory: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./DEBUG_MEMORY").JsonDebugMemoryOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Deletes a value from a JSON document.
* Returns the number of paths deleted (0 or 1), or null if the key does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to delete
*/
DEL: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./DEL").JsonDelOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Deletes a value from a JSON document.
* Returns the number of paths deleted (0 or 1), or null if the key does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to delete
*/
del: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./DEL").JsonDelOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Alias for JSON.DEL - Deletes a value from a JSON document.
* Returns the number of paths deleted (0 or 1), or null if the key does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to delete
*/
FORGET: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./FORGET").JsonForgetOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Alias for JSON.DEL - Deletes a value from a JSON document.
* Returns the number of paths deleted (0 or 1), or null if the key does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to delete
*/
forget: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./FORGET").JsonForgetOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
};
/**
* Gets values from a JSON document.
* Returns the value at the specified path, or null if the key or path does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path(s) to the value(s) to retrieve
*/
GET: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./GET").JsonGetOptions | undefined) => void;
readonly transformReply: typeof import("@redis/client/dist/lib/commands/generic-transformers").transformRedisJsonNullReply;
};
/**
* Gets values from a JSON document.
* Returns the value at the specified path, or null if the key or path does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path(s) to the value(s) to retrieve
*/
get: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./GET").JsonGetOptions | undefined) => void;
readonly transformReply: typeof import("@redis/client/dist/lib/commands/generic-transformers").transformRedisJsonNullReply;
};
/**
* Merges a given JSON value into a JSON document.
* Returns OK on success, or null if the key does not exist.
*
* @param key - The key containing the JSON document
* @param path - Path to merge into
* @param value - JSON value to merge
*/
MERGE: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, value: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Merges a given JSON value into a JSON document.
* Returns OK on success, or null if the key does not exist.
*
* @param key - The key containing the JSON document
* @param path - Path to merge into
* @param value - JSON value to merge
*/
merge: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, value: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Gets values at a specific path from multiple JSON documents.
* Returns an array of values at the path from each key, null for missing keys/paths.
*
* @param keys - Array of keys containing JSON documents
* @param path - Path to retrieve from each document
*/
MGET: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, keys: import("@redis/client/dist/lib/RESP/types").RedisArgument[], path: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: (this: void, reply: (import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>)[]) => (import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON | import("@redis/client/dist/lib/RESP/types").NullReply)[];
};
/**
* Gets values at a specific path from multiple JSON documents.
* Returns an array of values at the path from each key, null for missing keys/paths.
*
* @param keys - Array of keys containing JSON documents
* @param path - Path to retrieve from each document
*/
mGet: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, keys: import("@redis/client/dist/lib/RESP/types").RedisArgument[], path: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: (this: void, reply: (import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>)[]) => (import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON | import("@redis/client/dist/lib/RESP/types").NullReply)[];
};
/**
* Sets multiple JSON values in multiple documents.
* Returns OK on success.
*
* @param items - Array of objects containing key, path, and value to set
* @param items[].key - The key containing the JSON document
* @param items[].path - Path in the document to set
* @param items[].value - JSON value to set at the path
*/
MSET: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, items: import("./MSET").JsonMSetItem[]) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Sets multiple JSON values in multiple documents.
* Returns OK on success.
*
* @param items - Array of objects containing key, path, and value to set
* @param items[].key - The key containing the JSON document
* @param items[].path - Path in the document to set
* @param items[].value - JSON value to set at the path
*/
mSet: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, items: import("./MSET").JsonMSetItem[]) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Increments a numeric value stored in a JSON document by a given number.
* Returns the value after increment, or null if the key/path doesn't exist or value is not numeric.
*
* @param key - The key containing the JSON document
* @param path - Path to the numeric value
* @param by - Amount to increment by
*/
NUMINCRBY: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, by: number) => void;
readonly transformReply: {
readonly 2: (reply: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>) => number | (number | null)[];
readonly 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").DoubleReply<number>>;
};
};
/**
* Increments a numeric value stored in a JSON document by a given number.
* Returns the value after increment, or null if the key/path doesn't exist or value is not numeric.
*
* @param key - The key containing the JSON document
* @param path - Path to the numeric value
* @param by - Amount to increment by
*/
numIncrBy: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, by: number) => void;
readonly transformReply: {
readonly 2: (reply: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>) => number | (number | null)[];
readonly 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").DoubleReply<number>>;
};
};
/**
* Multiplies a numeric value stored in a JSON document by a given number.
* Returns the value after multiplication, or null if the key/path doesn't exist or value is not numeric.
*
* @param key - The key containing the JSON document
* @param path - Path to the numeric value
* @param by - Amount to multiply by
*/
NUMMULTBY: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, by: number) => void;
readonly transformReply: {
readonly 2: (reply: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>) => number | (number | null)[];
readonly 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").DoubleReply<number>>;
};
};
/**
* Multiplies a numeric value stored in a JSON document by a given number.
* Returns the value after multiplication, or null if the key/path doesn't exist or value is not numeric.
*
* @param key - The key containing the JSON document
* @param path - Path to the numeric value
* @param by - Amount to multiply by
*/
numMultBy: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, by: number) => void;
readonly transformReply: {
readonly 2: (reply: import("@redis/client/dist/lib/RESP/types").UnwrapReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>) => number | (number | null)[];
readonly 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").DoubleReply<number>>;
};
};
/**
* Returns the keys in the object stored in a JSON document.
* Returns array of keys, array of arrays for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the object to examine
*/
OBJKEYS: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./OBJKEYS").JsonObjKeysOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>>;
};
/**
* Returns the keys in the object stored in a JSON document.
* Returns array of keys, array of arrays for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the object to examine
*/
objKeys: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./OBJKEYS").JsonObjKeysOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>>;
};
/**
* Returns the number of keys in the object stored in a JSON document.
* Returns length of object, array of lengths for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the object to examine
*/
OBJLEN: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./OBJLEN").JsonObjLenOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Returns the number of keys in the object stored in a JSON document.
* Returns length of object, array of lengths for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the object to examine
*/
objLen: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./OBJLEN").JsonObjLenOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Sets a JSON value at a specific path in a JSON document.
* Returns OK on success, or null if condition (NX/XX) is not met.
*
* @param key - The key containing the JSON document
* @param path - Path in the document to set
* @param json - JSON value to set at the path
* @param options - Optional parameters
* @param options.condition - Set condition: NX (only if doesn't exist) or XX (only if exists)
* @deprecated options.NX - Use options.condition instead
* @deprecated options.XX - Use options.condition instead
*/
SET: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, json: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON, options?: import("./SET").JsonSetOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Sets a JSON value at a specific path in a JSON document.
* Returns OK on success, or null if condition (NX/XX) is not met.
*
* @param key - The key containing the JSON document
* @param path - Path in the document to set
* @param json - JSON value to set at the path
* @param options - Optional parameters
* @param options.condition - Set condition: NX (only if doesn't exist) or XX (only if exists)
* @deprecated options.NX - Use options.condition instead
* @deprecated options.XX - Use options.condition instead
*/
set: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, json: import("@redis/client/dist/lib/commands/generic-transformers").RedisJSON, options?: import("./SET").JsonSetOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
};
/**
* Appends a string to a string value stored in a JSON document.
* Returns new string length after append, or null if the path doesn't exist or value is not a string.
*
* @param key - The key containing the JSON document
* @param append - String to append
* @param options - Optional parameters
* @param options.path - Path to the string value
*/
STRAPPEND: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, append: string, options?: import("./STRAPPEND").JsonStrAppendOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Appends a string to a string value stored in a JSON document.
* Returns new string length after append, or null if the path doesn't exist or value is not a string.
*
* @param key - The key containing the JSON document
* @param append - String to append
* @param options - Optional parameters
* @param options.path - Path to the string value
*/
strAppend: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, append: string, options?: import("./STRAPPEND").JsonStrAppendOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Returns the length of a string value stored in a JSON document.
* Returns string length, array of lengths for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the string value
*/
STRLEN: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./STRLEN").JsonStrLenOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Returns the length of a string value stored in a JSON document.
* Returns string length, array of lengths for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the string value
*/
strLen: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./STRLEN").JsonStrLenOptions | undefined) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Toggles a boolean value stored in a JSON document.
* Returns 1 if value was toggled to true, 0 if toggled to false, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param path - Path to the boolean value
*/
TOGGLE: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Toggles a boolean value stored in a JSON document.
* Returns 1 if value was toggled to true, 0 if toggled to false, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param path - Path to the boolean value
*/
toggle: {
readonly IS_READ_ONLY: false;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument) => void;
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").NullReply>;
};
/**
* Returns the type of JSON value at a specific path in a JSON document.
* Returns the type as a string, array of types for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to examine
*/
TYPE: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./TYPE").JsonTypeOptions | undefined) => void;
readonly transformReply: {
readonly 2: () => import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
readonly 3: (reply: (import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>)[]) => import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
};
};
/**
* Returns the type of JSON value at a specific path in a JSON document.
* Returns the type as a string, array of types for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to examine
*/
type: {
readonly IS_READ_ONLY: true;
readonly parseCommand: (this: void, parser: import("@redis/client/dist/lib/client/parser").CommandParser, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./TYPE").JsonTypeOptions | undefined) => void;
readonly transformReply: {
readonly 2: () => import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
readonly 3: (reply: (import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>)[]) => import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NullReply | import("@redis/client/dist/lib/RESP/types").BlobStringReply<string>>;
};
};
};
export default _default;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/commands/index.ts"],"names":[],"mappings":"AA0BA,YAAY,EAAE,SAAS,EAAE,MAAM,sDAAsD,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,sDAAsD,CAAC;;IAGtJ;;;;;;;;OAQG;;;;;;IAEH;;;;;;;;OAQG;;;;;;IAEH;;;;;;;;;;OAUG;;;;;;IAEH;;;;;;;;;;OAUG;;;;;;IAEH;;;;;;;;;OASG;;;;;;IAEH;;;;;;;;;OASG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;;OAQG;;;;;;;;;IAEH;;;;;;;;OAQG;;;;;;;;;IAEH;;;;;;;;OAQG;;;;;;IAEH;;;;;;;;OAQG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;OAMG;;;;;;IAEH;;;;;;OAMG;;;;;;IAEH;;;;;;;;OAQG;;;;;;IAEH;;;;;;;;OAQG;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAIH;;;;;;;;;;;OAWG;;;;;;IAEH;;;;;;;;;;;OAWG;;;;;;IAEH;;;;;;;;OAQG;;;;;;IAEH;;;;;;;;OAQG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;;OAOG;;;;;;IAEH;;;;;;OAMG;;;;;;IAEH;;;;;;OAMG;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;;AAvbL,wBAybE"}
@@ -0,0 +1,477 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformRedisJsonNullReply = exports.transformRedisJsonReply = exports.transformRedisJsonArgument = void 0;
const ARRAPPEND_1 = __importDefault(require("./ARRAPPEND"));
const ARRINDEX_1 = __importDefault(require("./ARRINDEX"));
const ARRINSERT_1 = __importDefault(require("./ARRINSERT"));
const ARRLEN_1 = __importDefault(require("./ARRLEN"));
const ARRPOP_1 = __importDefault(require("./ARRPOP"));
const ARRTRIM_1 = __importDefault(require("./ARRTRIM"));
const CLEAR_1 = __importDefault(require("./CLEAR"));
const DEBUG_MEMORY_1 = __importDefault(require("./DEBUG_MEMORY"));
const DEL_1 = __importDefault(require("./DEL"));
const FORGET_1 = __importDefault(require("./FORGET"));
const GET_1 = __importDefault(require("./GET"));
const MERGE_1 = __importDefault(require("./MERGE"));
const MGET_1 = __importDefault(require("./MGET"));
const MSET_1 = __importDefault(require("./MSET"));
const NUMINCRBY_1 = __importDefault(require("./NUMINCRBY"));
const NUMMULTBY_1 = __importDefault(require("./NUMMULTBY"));
const OBJKEYS_1 = __importDefault(require("./OBJKEYS"));
const OBJLEN_1 = __importDefault(require("./OBJLEN"));
// import RESP from './RESP';
const SET_1 = __importDefault(require("./SET"));
const STRAPPEND_1 = __importDefault(require("./STRAPPEND"));
const STRLEN_1 = __importDefault(require("./STRLEN"));
const TOGGLE_1 = __importDefault(require("./TOGGLE"));
const TYPE_1 = __importDefault(require("./TYPE"));
var generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
Object.defineProperty(exports, "transformRedisJsonArgument", { enumerable: true, get: function () { return generic_transformers_1.transformRedisJsonArgument; } });
Object.defineProperty(exports, "transformRedisJsonReply", { enumerable: true, get: function () { return generic_transformers_1.transformRedisJsonReply; } });
Object.defineProperty(exports, "transformRedisJsonNullReply", { enumerable: true, get: function () { return generic_transformers_1.transformRedisJsonNullReply; } });
exports.default = {
/**
* Appends one or more values to the end of an array in a JSON document.
* Returns the new array length after append, or null if the path does not exist.
*
* @param key - The key to append to
* @param path - Path to the array in the JSON document
* @param json - The first value to append
* @param jsons - Additional values to append
*/
ARRAPPEND: ARRAPPEND_1.default,
/**
* Appends one or more values to the end of an array in a JSON document.
* Returns the new array length after append, or null if the path does not exist.
*
* @param key - The key to append to
* @param path - Path to the array in the JSON document
* @param json - The first value to append
* @param jsons - Additional values to append
*/
arrAppend: ARRAPPEND_1.default,
/**
* Returns the index of the first occurrence of a value in a JSON array.
* If the specified value is not found, it returns -1, or null if the path does not exist.
*
* @param key - The key containing the array
* @param path - Path to the array in the JSON document
* @param json - The value to search for
* @param options - Optional range parameters for the search
* @param options.range.start - Starting index for the search
* @param options.range.stop - Optional ending index for the search
*/
ARRINDEX: ARRINDEX_1.default,
/**
* Returns the index of the first occurrence of a value in a JSON array.
* If the specified value is not found, it returns -1, or null if the path does not exist.
*
* @param key - The key containing the array
* @param path - Path to the array in the JSON document
* @param json - The value to search for
* @param options - Optional range parameters for the search
* @param options.range.start - Starting index for the search
* @param options.range.stop - Optional ending index for the search
*/
arrIndex: ARRINDEX_1.default,
/**
* Inserts one or more values into an array at the specified index.
* Returns the new array length after insert, or null if the path does not exist.
*
* @param key - The key containing the array
* @param path - Path to the array in the JSON document
* @param index - The position where to insert the values
* @param json - The first value to insert
* @param jsons - Additional values to insert
*/
ARRINSERT: ARRINSERT_1.default,
/**
* Inserts one or more values into an array at the specified index.
* Returns the new array length after insert, or null if the path does not exist.
*
* @param key - The key containing the array
* @param path - Path to the array in the JSON document
* @param index - The position where to insert the values
* @param json - The first value to insert
* @param jsons - Additional values to insert
*/
arrInsert: ARRINSERT_1.default,
/**
* Returns the length of an array in a JSON document.
* Returns null if the path does not exist or the value is not an array.
*
* @param key - The key containing the array
* @param options - Optional parameters
* @param options.path - Path to the array in the JSON document
*/
ARRLEN: ARRLEN_1.default,
/**
* Returns the length of an array in a JSON document.
* Returns null if the path does not exist or the value is not an array.
*
* @param key - The key containing the array
* @param options - Optional parameters
* @param options.path - Path to the array in the JSON document
*/
arrLen: ARRLEN_1.default,
/**
* Removes and returns an element from an array in a JSON document.
* Returns null if the path does not exist or the value is not an array.
*
* @param key - The key containing the array
* @param options - Optional parameters
* @param options.path - Path to the array in the JSON document
* @param options.index - Optional index to pop from. Default is -1 (last element)
*/
ARRPOP: ARRPOP_1.default,
/**
* Removes and returns an element from an array in a JSON document.
* Returns null if the path does not exist or the value is not an array.
*
* @param key - The key containing the array
* @param options - Optional parameters
* @param options.path - Path to the array in the JSON document
* @param options.index - Optional index to pop from. Default is -1 (last element)
*/
arrPop: ARRPOP_1.default,
/**
* Trims an array in a JSON document to include only elements within the specified range.
* Returns the new array length after trimming, or null if the path does not exist.
*
* @param key - The key containing the array
* @param path - Path to the array in the JSON document
* @param start - Starting index (inclusive)
* @param stop - Ending index (inclusive)
*/
ARRTRIM: ARRTRIM_1.default,
/**
* Trims an array in a JSON document to include only elements within the specified range.
* Returns the new array length after trimming, or null if the path does not exist.
*
* @param key - The key containing the array
* @param path - Path to the array in the JSON document
* @param start - Starting index (inclusive)
* @param stop - Ending index (inclusive)
*/
arrTrim: ARRTRIM_1.default,
/**
* Clears container values (arrays/objects) in a JSON document.
* Returns the number of values cleared (0 or 1), or null if the path does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the container to clear
*/
CLEAR: CLEAR_1.default,
/**
* Clears container values (arrays/objects) in a JSON document.
* Returns the number of values cleared (0 or 1), or null if the path does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the container to clear
*/
clear: CLEAR_1.default,
/**
* Reports memory usage details for a JSON document value.
* Returns size in bytes of the value, or null if the key or path does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to examine
*/
DEBUG_MEMORY: DEBUG_MEMORY_1.default,
/**
* Reports memory usage details for a JSON document value.
* Returns size in bytes of the value, or null if the key or path does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to examine
*/
debugMemory: DEBUG_MEMORY_1.default,
/**
* Deletes a value from a JSON document.
* Returns the number of paths deleted (0 or 1), or null if the key does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to delete
*/
DEL: DEL_1.default,
/**
* Deletes a value from a JSON document.
* Returns the number of paths deleted (0 or 1), or null if the key does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to delete
*/
del: DEL_1.default,
/**
* Alias for JSON.DEL - Deletes a value from a JSON document.
* Returns the number of paths deleted (0 or 1), or null if the key does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to delete
*/
FORGET: FORGET_1.default,
/**
* Alias for JSON.DEL - Deletes a value from a JSON document.
* Returns the number of paths deleted (0 or 1), or null if the key does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to delete
*/
forget: FORGET_1.default,
/**
* Gets values from a JSON document.
* Returns the value at the specified path, or null if the key or path does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path(s) to the value(s) to retrieve
*/
GET: GET_1.default,
/**
* Gets values from a JSON document.
* Returns the value at the specified path, or null if the key or path does not exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path(s) to the value(s) to retrieve
*/
get: GET_1.default,
/**
* Merges a given JSON value into a JSON document.
* Returns OK on success, or null if the key does not exist.
*
* @param key - The key containing the JSON document
* @param path - Path to merge into
* @param value - JSON value to merge
*/
MERGE: MERGE_1.default,
/**
* Merges a given JSON value into a JSON document.
* Returns OK on success, or null if the key does not exist.
*
* @param key - The key containing the JSON document
* @param path - Path to merge into
* @param value - JSON value to merge
*/
merge: MERGE_1.default,
/**
* Gets values at a specific path from multiple JSON documents.
* Returns an array of values at the path from each key, null for missing keys/paths.
*
* @param keys - Array of keys containing JSON documents
* @param path - Path to retrieve from each document
*/
MGET: MGET_1.default,
/**
* Gets values at a specific path from multiple JSON documents.
* Returns an array of values at the path from each key, null for missing keys/paths.
*
* @param keys - Array of keys containing JSON documents
* @param path - Path to retrieve from each document
*/
mGet: MGET_1.default,
/**
* Sets multiple JSON values in multiple documents.
* Returns OK on success.
*
* @param items - Array of objects containing key, path, and value to set
* @param items[].key - The key containing the JSON document
* @param items[].path - Path in the document to set
* @param items[].value - JSON value to set at the path
*/
MSET: MSET_1.default,
/**
* Sets multiple JSON values in multiple documents.
* Returns OK on success.
*
* @param items - Array of objects containing key, path, and value to set
* @param items[].key - The key containing the JSON document
* @param items[].path - Path in the document to set
* @param items[].value - JSON value to set at the path
*/
mSet: MSET_1.default,
/**
* Increments a numeric value stored in a JSON document by a given number.
* Returns the value after increment, or null if the key/path doesn't exist or value is not numeric.
*
* @param key - The key containing the JSON document
* @param path - Path to the numeric value
* @param by - Amount to increment by
*/
NUMINCRBY: NUMINCRBY_1.default,
/**
* Increments a numeric value stored in a JSON document by a given number.
* Returns the value after increment, or null if the key/path doesn't exist or value is not numeric.
*
* @param key - The key containing the JSON document
* @param path - Path to the numeric value
* @param by - Amount to increment by
*/
numIncrBy: NUMINCRBY_1.default,
/**
* Multiplies a numeric value stored in a JSON document by a given number.
* Returns the value after multiplication, or null if the key/path doesn't exist or value is not numeric.
*
* @param key - The key containing the JSON document
* @param path - Path to the numeric value
* @param by - Amount to multiply by
*/
NUMMULTBY: NUMMULTBY_1.default,
/**
* Multiplies a numeric value stored in a JSON document by a given number.
* Returns the value after multiplication, or null if the key/path doesn't exist or value is not numeric.
*
* @param key - The key containing the JSON document
* @param path - Path to the numeric value
* @param by - Amount to multiply by
*/
numMultBy: NUMMULTBY_1.default,
/**
* Returns the keys in the object stored in a JSON document.
* Returns array of keys, array of arrays for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the object to examine
*/
OBJKEYS: OBJKEYS_1.default,
/**
* Returns the keys in the object stored in a JSON document.
* Returns array of keys, array of arrays for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the object to examine
*/
objKeys: OBJKEYS_1.default,
/**
* Returns the number of keys in the object stored in a JSON document.
* Returns length of object, array of lengths for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the object to examine
*/
OBJLEN: OBJLEN_1.default,
/**
* Returns the number of keys in the object stored in a JSON document.
* Returns length of object, array of lengths for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the object to examine
*/
objLen: OBJLEN_1.default,
// RESP,
// resp: RESP,
/**
* Sets a JSON value at a specific path in a JSON document.
* Returns OK on success, or null if condition (NX/XX) is not met.
*
* @param key - The key containing the JSON document
* @param path - Path in the document to set
* @param json - JSON value to set at the path
* @param options - Optional parameters
* @param options.condition - Set condition: NX (only if doesn't exist) or XX (only if exists)
* @deprecated options.NX - Use options.condition instead
* @deprecated options.XX - Use options.condition instead
*/
SET: SET_1.default,
/**
* Sets a JSON value at a specific path in a JSON document.
* Returns OK on success, or null if condition (NX/XX) is not met.
*
* @param key - The key containing the JSON document
* @param path - Path in the document to set
* @param json - JSON value to set at the path
* @param options - Optional parameters
* @param options.condition - Set condition: NX (only if doesn't exist) or XX (only if exists)
* @deprecated options.NX - Use options.condition instead
* @deprecated options.XX - Use options.condition instead
*/
set: SET_1.default,
/**
* Appends a string to a string value stored in a JSON document.
* Returns new string length after append, or null if the path doesn't exist or value is not a string.
*
* @param key - The key containing the JSON document
* @param append - String to append
* @param options - Optional parameters
* @param options.path - Path to the string value
*/
STRAPPEND: STRAPPEND_1.default,
/**
* Appends a string to a string value stored in a JSON document.
* Returns new string length after append, or null if the path doesn't exist or value is not a string.
*
* @param key - The key containing the JSON document
* @param append - String to append
* @param options - Optional parameters
* @param options.path - Path to the string value
*/
strAppend: STRAPPEND_1.default,
/**
* Returns the length of a string value stored in a JSON document.
* Returns string length, array of lengths for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the string value
*/
STRLEN: STRLEN_1.default,
/**
* Returns the length of a string value stored in a JSON document.
* Returns string length, array of lengths for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the string value
*/
strLen: STRLEN_1.default,
/**
* Toggles a boolean value stored in a JSON document.
* Returns 1 if value was toggled to true, 0 if toggled to false, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param path - Path to the boolean value
*/
TOGGLE: TOGGLE_1.default,
/**
* Toggles a boolean value stored in a JSON document.
* Returns 1 if value was toggled to true, 0 if toggled to false, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param path - Path to the boolean value
*/
toggle: TOGGLE_1.default,
/**
* Returns the type of JSON value at a specific path in a JSON document.
* Returns the type as a string, array of types for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to examine
*/
TYPE: TYPE_1.default,
/**
* Returns the type of JSON value at a specific path in a JSON document.
* Returns the type as a string, array of types for multiple paths, or null if path doesn't exist.
*
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to examine
*/
type: TYPE_1.default
};
//# sourceMappingURL=index.js.map
File diff suppressed because one or more lines are too long
+3
View File
@@ -0,0 +1,3 @@
export { default } from './commands';
export type { RedisJSON } from './commands';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
+9
View File
@@ -0,0 +1,9 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = void 0;
var commands_1 = require("./commands");
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(commands_1).default; } });
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAqC;AAA5B,oHAAA,OAAO,OAAA","sourcesContent":["export { default } from './commands';\nexport type { RedisJSON } from './commands';\n"]}
+36
View File
@@ -0,0 +1,36 @@
{
"name": "@redis/json",
"version": "6.1.0",
"license": "MIT",
"main": "./dist/lib/index.js",
"types": "./dist/lib/index.d.ts",
"files": [
"dist/",
"!dist/tsconfig.tsbuildinfo"
],
"scripts": {
"test": "nyc -r text-summary -r lcov mocha -r tsx --reporter mocha-multi-reporters --reporter-options configFile=mocha-multi-reporter-config.json --exit './lib/**/*.spec.ts'",
"release": "release-it"
},
"peerDependencies": {
"@redis/client": "^6.1.0"
},
"devDependencies": {
"@redis/test-utils": "*"
},
"engines": {
"node": ">= 20.0.0"
},
"repository": {
"type": "git",
"url": "git://github.com/redis/node-redis.git"
},
"bugs": {
"url": "https://github.com/redis/node-redis/issues"
},
"homepage": "https://github.com/redis/node-redis/tree/master/packages/json",
"keywords": [
"redis",
"RedisJSON"
]
}