🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@redis/json

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@redis/json - npm Package Compare versions

Comparing version

to
5.5.6

10

dist/lib/commands/ARRAPPEND.d.ts

@@ -6,2 +6,12 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* 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 parser - The Redis command parser
* @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
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, json: RedisJSON, ...jsons: Array<RedisJSON>) => void;

@@ -8,0 +18,0 @@ readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;

@@ -6,2 +6,12 @@ "use strict";

IS_READ_ONLY: false,
/**
* 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 parser - The Redis command parser
* @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
*/
parseCommand(parser, key, path, json, ...jsons) {

@@ -8,0 +18,0 @@ parser.push('JSON.ARRAPPEND');

@@ -12,2 +12,14 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: true;
/**
* 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 parser - The Redis command parser
* @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
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, json: RedisJSON, options?: JsonArrIndexOptions) => void;

@@ -14,0 +26,0 @@ readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;

@@ -6,2 +6,14 @@ "use strict";

IS_READ_ONLY: true,
/**
* 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 parser - The Redis command parser
* @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
*/
parseCommand(parser, key, path, json, options) {

@@ -8,0 +20,0 @@ parser.push('JSON.ARRINDEX');

@@ -6,2 +6,13 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* 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 parser - The Redis command parser
* @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
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, index: number, json: RedisJSON, ...jsons: Array<RedisJSON>) => void;

@@ -8,0 +19,0 @@ readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;

@@ -6,2 +6,13 @@ "use strict";

IS_READ_ONLY: false,
/**
* 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 parser - The Redis command parser
* @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
*/
parseCommand(parser, key, path, index, json, ...jsons) {

@@ -8,0 +19,0 @@ parser.push('JSON.ARRINSERT');

@@ -8,2 +8,11 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: true;
/**
* 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 parser - The Redis command parser
* @param key - The key containing the array
* @param options - Optional parameters
* @param options.path - Path to the array in the JSON document
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonArrLenOptions) => void;

@@ -10,0 +19,0 @@ readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;

@@ -5,2 +5,11 @@ "use strict";

IS_READ_ONLY: true,
/**
* 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 parser - The Redis command parser
* @param key - The key containing the array
* @param options - Optional parameters
* @param options.path - Path to the array in the JSON document
*/
parseCommand(parser, key, options) {

@@ -7,0 +16,0 @@ parser.push('JSON.ARRLEN');

@@ -9,2 +9,12 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* 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 parser - The Redis command parser
* @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)
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: RedisArrPopOptions) => void;

@@ -11,0 +21,0 @@ readonly transformReply: (this: void, reply: NullReply | BlobStringReply | ArrayReply<NullReply | BlobStringReply>) => string | number | boolean | NullReply | Date | {

@@ -7,2 +7,12 @@ "use strict";

IS_READ_ONLY: false,
/**
* 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 parser - The Redis command parser
* @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)
*/
parseCommand(parser, key, options) {

@@ -9,0 +19,0 @@ parser.push('JSON.ARRPOP');

@@ -5,2 +5,12 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* 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 parser - The Redis command parser
* @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)
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, start: number, stop: number) => void;

@@ -7,0 +17,0 @@ readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;

@@ -5,2 +5,12 @@ "use strict";

IS_READ_ONLY: false,
/**
* 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 parser - The Redis command parser
* @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)
*/
parseCommand(parser, key, path, start, stop) {

@@ -7,0 +17,0 @@ parser.push('JSON.ARRTRIM');

@@ -8,2 +8,11 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the container to clear
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonClearOptions) => void;

@@ -10,0 +19,0 @@ readonly transformReply: () => NumberReply;

@@ -5,2 +5,11 @@ "use strict";

IS_READ_ONLY: false,
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the container to clear
*/
parseCommand(parser, key, options) {

@@ -7,0 +16,0 @@ parser.push('JSON.CLEAR');

@@ -8,2 +8,11 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to examine
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonDebugMemoryOptions) => void;

@@ -10,0 +19,0 @@ readonly transformReply: () => NumberReply;

@@ -5,2 +5,11 @@ "use strict";

IS_READ_ONLY: false,
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to examine
*/
parseCommand(parser, key, options) {

@@ -7,0 +16,0 @@ parser.push('JSON.DEBUG', 'MEMORY');

@@ -8,2 +8,11 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to delete
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonDelOptions) => void;

@@ -10,0 +19,0 @@ readonly transformReply: () => NumberReply;

@@ -5,2 +5,11 @@ "use strict";

IS_READ_ONLY: false,
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to delete
*/
parseCommand(parser, key, options) {

@@ -7,0 +16,0 @@ parser.push('JSON.DEL');

@@ -8,2 +8,11 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to delete
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonForgetOptions) => void;

@@ -10,0 +19,0 @@ readonly transformReply: () => NumberReply;

@@ -5,2 +5,11 @@ "use strict";

IS_READ_ONLY: false,
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the value to delete
*/
parseCommand(parser, key, options) {

@@ -7,0 +16,0 @@ parser.push('JSON.FORGET');

@@ -10,2 +10,11 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* Gets values from a JSON document.
* Returns the value at the specified path, or null if the key or path does not exist.
*
* @param parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path(s) to the value(s) to retrieve
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonGetOptions) => void;

@@ -12,0 +21,0 @@ readonly transformReply: typeof transformRedisJsonNullReply;

@@ -6,2 +6,11 @@ "use strict";

IS_READ_ONLY: false,
/**
* Gets values from a JSON document.
* Returns the value at the specified path, or null if the key or path does not exist.
*
* @param parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path(s) to the value(s) to retrieve
*/
parseCommand(parser, key, options) {

@@ -8,0 +17,0 @@ parser.push('JSON.GET');

@@ -6,2 +6,11 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* Merges a given JSON value into a JSON document.
* Returns OK on success, or null if the key does not exist.
*
* @param parser - The Redis command parser
* @param key - The key containing the JSON document
* @param path - Path to merge into
* @param value - JSON value to merge
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, value: RedisJSON) => void;

@@ -8,0 +17,0 @@ readonly transformReply: () => SimpleStringReply<'OK'>;

@@ -6,2 +6,11 @@ "use strict";

IS_READ_ONLY: false,
/**
* Merges a given JSON value into a JSON document.
* Returns OK on success, or null if the key does not exist.
*
* @param parser - The Redis command parser
* @param key - The key containing the JSON document
* @param path - Path to merge into
* @param value - JSON value to merge
*/
parseCommand(parser, key, path, value) {

@@ -8,0 +17,0 @@ parser.push('JSON.MERGE');

@@ -5,2 +5,10 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: true;
/**
* 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 parser - The Redis command parser
* @param keys - Array of keys containing JSON documents
* @param path - Path to retrieve from each document
*/
readonly parseCommand: (this: void, parser: CommandParser, keys: Array<RedisArgument>, path: RedisArgument) => void;

@@ -7,0 +15,0 @@ readonly transformReply: (this: void, reply: UnwrapReply<ArrayReply<NullReply | BlobStringReply>>) => (NullReply | import("./helpers").RedisJSON)[];

@@ -6,2 +6,10 @@ "use strict";

IS_READ_ONLY: true,
/**
* 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 parser - The Redis command parser
* @param keys - Array of keys containing JSON documents
* @param path - Path to retrieve from each document
*/
parseCommand(parser, keys, path) {

@@ -8,0 +16,0 @@ parser.push('JSON.MGET');

@@ -11,2 +11,12 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* Sets multiple JSON values in multiple documents.
* Returns OK on success.
*
* @param parser - The Redis command parser
* @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
*/
readonly parseCommand: (this: void, parser: CommandParser, items: Array<JsonMSetItem>) => void;

@@ -13,0 +23,0 @@ readonly transformReply: () => SimpleStringReply<'OK'>;

@@ -6,2 +6,12 @@ "use strict";

IS_READ_ONLY: false,
/**
* Sets multiple JSON values in multiple documents.
* Returns OK on success.
*
* @param parser - The Redis command parser
* @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
*/
parseCommand(parser, items) {

@@ -8,0 +18,0 @@ parser.push('JSON.MSET');

@@ -5,2 +5,11 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param path - Path to the numeric value
* @param by - Amount to increment by
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, by: number) => void;

@@ -7,0 +16,0 @@ readonly transformReply: {

@@ -5,2 +5,11 @@ "use strict";

IS_READ_ONLY: false,
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param path - Path to the numeric value
* @param by - Amount to increment by
*/
parseCommand(parser, key, path, by) {

@@ -7,0 +16,0 @@ parser.push('JSON.NUMINCRBY');

@@ -5,2 +5,11 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param path - Path to the numeric value
* @param by - Amount to multiply by
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, by: number) => void;

@@ -7,0 +16,0 @@ readonly transformReply: {

@@ -9,2 +9,11 @@ "use strict";

IS_READ_ONLY: false,
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param path - Path to the numeric value
* @param by - Amount to multiply by
*/
parseCommand(parser, key, path, by) {

@@ -11,0 +20,0 @@ parser.push('JSON.NUMMULTBY');

@@ -8,2 +8,11 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the object to examine
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonObjKeysOptions) => void;

@@ -10,0 +19,0 @@ readonly transformReply: () => ArrayReply<BlobStringReply> | ArrayReply<ArrayReply<BlobStringReply> | NullReply>;

@@ -5,2 +5,11 @@ "use strict";

IS_READ_ONLY: false,
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the object to examine
*/
parseCommand(parser, key, options) {

@@ -7,0 +16,0 @@ parser.push('JSON.OBJKEYS');

@@ -8,2 +8,11 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: true;
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the object to examine
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonObjLenOptions) => void;

@@ -10,0 +19,0 @@ readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;

@@ -5,2 +5,11 @@ "use strict";

IS_READ_ONLY: true,
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the object to examine
*/
parseCommand(parser, key, options) {

@@ -7,0 +16,0 @@ parser.push('JSON.OBJLEN');

@@ -6,2 +6,10 @@ import { CommandParser } from "@redis/client/dist/lib/client/parser";

readonly IS_READ_ONLY: true;
/**
* Returns the JSON value at the specified path in RESP (Redis Serialization Protocol) format.
* Returns the value in RESP form, useful for language-independent processing.
*
* @param parser - The Redis command parser
* @param key - The key containing the JSON document
* @param path - Optional path to the value in the document
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path?: string) => void;

@@ -8,0 +16,0 @@ readonly transformReply: () => RESPReply;

@@ -5,2 +5,10 @@ "use strict";

IS_READ_ONLY: true,
/**
* Returns the JSON value at the specified path in RESP (Redis Serialization Protocol) format.
* Returns the value in RESP form, useful for language-independent processing.
*
* @param parser - The Redis command parser
* @param key - The key containing the JSON document
* @param path - Optional path to the value in the document
*/
parseCommand(parser, key, path) {

@@ -7,0 +15,0 @@ parser.push('JSON.RESP');

@@ -17,2 +17,15 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* 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 parser - The Redis command parser
* @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
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, json: RedisJSON, options?: JsonSetOptions) => void;

@@ -19,0 +32,0 @@ readonly transformReply: () => SimpleStringReply<'OK'> | NullReply;

@@ -6,2 +6,15 @@ "use strict";

IS_READ_ONLY: false,
/**
* 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 parser - The Redis command parser
* @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
*/
parseCommand(parser, key, path, json, options) {

@@ -8,0 +21,0 @@ parser.push('JSON.SET');

@@ -8,2 +8,12 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* 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 parser - The Redis command parser
* @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
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, append: string, options?: JsonStrAppendOptions) => void;

@@ -10,0 +20,0 @@ readonly transformReply: () => NumberReply | ArrayReply<NullReply | NumberReply>;

@@ -6,2 +6,12 @@ "use strict";

IS_READ_ONLY: false,
/**
* 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 parser - The Redis command parser
* @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
*/
parseCommand(parser, key, append, options) {

@@ -8,0 +18,0 @@ parser.push('JSON.STRAPPEND');

@@ -8,2 +8,11 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: true;
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the string value
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonStrLenOptions) => void;

@@ -10,0 +19,0 @@ readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;

@@ -5,2 +5,11 @@ "use strict";

IS_READ_ONLY: true,
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to the string value
*/
parseCommand(parser, key, options) {

@@ -7,0 +16,0 @@ parser.push('JSON.STRLEN');

@@ -5,2 +5,10 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: false;
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param path - Path to the boolean value
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument) => void;

@@ -7,0 +15,0 @@ readonly transformReply: () => NumberReply | NullReply | ArrayReply<NumberReply | NullReply>;

@@ -5,2 +5,10 @@ "use strict";

IS_READ_ONLY: false,
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param path - Path to the boolean value
*/
parseCommand(parser, key, path) {

@@ -7,0 +15,0 @@ parser.push('JSON.TOGGLE');

@@ -8,2 +8,11 @@ import { CommandParser } from '@redis/client/dist/lib/client/parser';

readonly IS_READ_ONLY: true;
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to examine
*/
readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonTypeOptions) => void;

@@ -10,0 +19,0 @@ readonly transformReply: {

@@ -5,2 +5,11 @@ "use strict";

IS_READ_ONLY: true,
/**
* 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 parser - The Redis command parser
* @param key - The key containing the JSON document
* @param options - Optional parameters
* @param options.path - Path to examine
*/
parseCommand(parser, key, options) {

@@ -7,0 +16,0 @@ parser.push('JSON.TYPE');

4

package.json
{
"name": "@redis/json",
"version": "5.5.5",
"version": "5.5.6",
"license": "MIT",

@@ -16,3 +16,3 @@ "main": "./dist/lib/index.js",

"peerDependencies": {
"@redis/client": "^5.5.5"
"@redis/client": "^5.5.6"
},

@@ -19,0 +19,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet