@valkey/valkey-glide 1.3.1-rc1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/build-ts/index.js +3 -1
- package/build-ts/src/BaseClient.d.ts +15 -1
- package/build-ts/src/Commands.d.ts +2 -2
- package/build-ts/src/ProtobufMessage.d.ts +2889 -2
- package/build-ts/src/Transaction.d.ts +2 -3
- package/build-ts/src/server-modules/GlideFtOptions.d.ts +1 -1
- package/build-ts/src/server-modules/GlideJson.d.ts +5 -5
- package/package.json +6 -6
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
|
|
3
3
|
*/
|
|
4
4
|
import { // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
5
|
-
GlideRecord, GlideString, HashDataType,
|
|
6
|
-
SortedSetDataType } from "./BaseClient";
|
|
5
|
+
GlideRecord, GlideString, HashDataType, Score, ElementAndScore } from "./BaseClient";
|
|
7
6
|
import { AggregationType, BaseScanOptions, BitFieldGet, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
8
7
|
BitFieldSubCommands, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
9
8
|
BitOffsetOptions, BitwiseOperation, Boundary, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
@@ -1130,7 +1129,7 @@ export declare class BaseTransaction<T extends BaseTransaction<T>> {
|
|
|
1130
1129
|
* Command Response - The number of elements added to the sorted set.
|
|
1131
1130
|
* If {@link ZAddOptions.changed} is set to `true`, returns the number of elements updated in the sorted set.
|
|
1132
1131
|
*/
|
|
1133
|
-
zadd(key: GlideString, membersAndScores:
|
|
1132
|
+
zadd(key: GlideString, membersAndScores: ElementAndScore[] | Record<string, Score>, options?: ZAddOptions): T;
|
|
1134
1133
|
/**
|
|
1135
1134
|
* Increments the score of member in the sorted set stored at `key` by `increment`.
|
|
1136
1135
|
* If `member` does not exist in the sorted set, it is added with `increment` as its score (as if its previous score was 0.0).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
|
|
3
3
|
*/
|
|
4
|
-
import { SortOrder } from "src/Commands";
|
|
5
4
|
import { GlideRecord, GlideString } from "../BaseClient";
|
|
5
|
+
import { SortOrder } from "../Commands";
|
|
6
6
|
interface BaseField {
|
|
7
7
|
/** The name of the field. */
|
|
8
8
|
name: GlideString;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
|
|
3
3
|
*/
|
|
4
|
-
import { ClusterTransaction, Transaction } from "src/Transaction";
|
|
5
4
|
import { BaseClient, DecoderOption, GlideString } from "../BaseClient";
|
|
6
5
|
import { ConditionalChange } from "../Commands";
|
|
6
|
+
import { ClusterTransaction, Transaction } from "../Transaction";
|
|
7
7
|
export type ReturnTypeJson<T> = T | (T | null)[];
|
|
8
8
|
export type UniversalReturnTypeJson<T> = T | T[];
|
|
9
9
|
/**
|
|
@@ -85,15 +85,15 @@ export declare class GlideJson {
|
|
|
85
85
|
*
|
|
86
86
|
* @example
|
|
87
87
|
* ```typescript
|
|
88
|
-
* const jsonStr = await GlideJson.get('doc', {path: '$'});
|
|
88
|
+
* const jsonStr = await GlideJson.get(client, 'doc', {path: '$'});
|
|
89
89
|
* console.log(JSON.parse(jsonStr as string));
|
|
90
90
|
* // Output: [{"a": 1.0, "b" :2}] - JSON object retrieved from the key `doc`.
|
|
91
91
|
*
|
|
92
|
-
* const jsonData = await GlideJson.get(
|
|
92
|
+
* const jsonData = await GlideJson.get(client, 'doc', {path: '$'});
|
|
93
93
|
* console.log(jsonData);
|
|
94
94
|
* // Output: '[{"a":1.0,"b":2}]' - Returns the value at path '$' in the JSON document stored at `doc`.
|
|
95
95
|
*
|
|
96
|
-
* const formattedJson = await GlideJson.get(
|
|
96
|
+
* const formattedJson = await GlideJson.get(client, 'doc', {
|
|
97
97
|
* ['$.a', '$.b']
|
|
98
98
|
* indent: " ",
|
|
99
99
|
* newline: "\n",
|
|
@@ -102,7 +102,7 @@ export declare class GlideJson {
|
|
|
102
102
|
* console.log(formattedJson);
|
|
103
103
|
* // Output: "{\n \"$.a\": [\n 1.0\n ],\n \"$.b\": [\n 2\n ]\n}" - Returns values at paths '$.a' and '$.b' with custom format.
|
|
104
104
|
*
|
|
105
|
-
* const nonExistingPath = await GlideJson.get(
|
|
105
|
+
* const nonExistingPath = await GlideJson.get(client, 'doc', {path: '$.non_existing_path'});
|
|
106
106
|
* console.log(nonExistingPath);
|
|
107
107
|
* // Output: "[]" - Empty array since the path does not exist in the JSON document.
|
|
108
108
|
* ```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valkey/valkey-glide",
|
|
3
3
|
"types": "build-ts/index.d.ts",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.2",
|
|
5
5
|
"description": "General Language Independent Driver for the Enterprise (GLIDE) for Valkey",
|
|
6
6
|
"main": "build-ts/index.js",
|
|
7
7
|
"module": "build-ts/index.js",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"typescript": "^4.9.4"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@valkey/valkey-glide-darwin-arm64": "1.3.
|
|
44
|
-
"@valkey/valkey-glide-linux-arm64": "1.3.
|
|
45
|
-
"@valkey/valkey-glide-linux-x64": "1.3.
|
|
46
|
-
"@valkey/valkey-glide-linux-musl-arm64": "1.3.
|
|
47
|
-
"@valkey/valkey-glide-linux-musl-x64": "1.3.
|
|
43
|
+
"@valkey/valkey-glide-darwin-arm64": "1.3.2",
|
|
44
|
+
"@valkey/valkey-glide-linux-arm64": "1.3.2",
|
|
45
|
+
"@valkey/valkey-glide-linux-x64": "1.3.2",
|
|
46
|
+
"@valkey/valkey-glide-linux-musl-arm64": "1.3.2",
|
|
47
|
+
"@valkey/valkey-glide-linux-musl-x64": "1.3.2"
|
|
48
48
|
},
|
|
49
49
|
"eslintConfig": {
|
|
50
50
|
"extends": [
|