@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
package/README.md
CHANGED
|
@@ -14,16 +14,16 @@ The release of Valkey GLIDE was tested on the following platforms:
|
|
|
14
14
|
|
|
15
15
|
Linux:
|
|
16
16
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
17
|
+
- Ubuntu 22.04.1 (x86_64 and aarch64)
|
|
18
|
+
- Amazon Linux 2023 (AL2023) (x86_64)
|
|
19
19
|
|
|
20
20
|
macOS:
|
|
21
21
|
|
|
22
|
-
-
|
|
22
|
+
- macOS 14.7 (Apple silicon/aarch_64)
|
|
23
23
|
|
|
24
24
|
Alpine:
|
|
25
25
|
|
|
26
|
-
-
|
|
26
|
+
- node:alpine (default on aarch64 and x86_64)
|
|
27
27
|
|
|
28
28
|
## NodeJS supported version
|
|
29
29
|
|
package/build-ts/index.js
CHANGED
|
@@ -62,7 +62,7 @@ function loadNativeBinding() {
|
|
|
62
62
|
}
|
|
63
63
|
function initialize() {
|
|
64
64
|
const nativeBinding = loadNativeBinding();
|
|
65
|
-
const { AggregationType, BaseScanOptions, ScanOptions, ZScanOptions, HScanOptions, BitEncoding, BitFieldGet, BitFieldIncrBy, BitFieldOffset, BitFieldOverflow, BitFieldSet, BitFieldSubCommands, BitOffset, BitOffsetMultiplier, BitOffsetOptions, BitOverflowControl, BitmapIndexType, BitwiseOperation, ConditionalChange, Decoder, DecoderOption, GeoAddOptions, CoordOrigin, MemberOrigin, SearchOrigin, GeoBoxShape, GeoCircleShape, GeoSearchShape, GeoSearchResultOptions, GeoSearchStoreResultOptions, SortOrder, GeoUnit, GeospatialData, GlideClient, GlideClusterClient, GlideClientConfiguration, GlideJson, JsonBatch, GlideFt, Field, TextField, TagField, NumericField, VectorField, VectorFieldAttributesFlat, VectorFieldAttributesHnsw, FtCreateOptions, FtSearchOptions, FtInfoReturnType, FtAggregateOptions, FtAggregateLimit, FtAggregateFilter, FtAggregateGroupBy, FtAggregateReducer, FtAggregateSortBy, FtAggregateSortProperty, FtAggregateApply, FtAggregateReturnType, FtSearchReturnType, GlideRecord, GlideString, JsonGetOptions, JsonArrPopOptions, SortedSetDataType, StreamEntryDataType, HashDataType, FunctionListOptions, FunctionListResponse, FunctionStatsSingleResponse, FunctionStatsFullResponse, FunctionRestorePolicy, SlotIdTypes, SlotKeyTypes, TimeUnit, RouteByAddress, RouteOption, Routes, RestoreOptions, SingleNodeRoute, PeriodicChecksManualInterval, PeriodicChecks, Logger, Limit, LolwutOptions, LPosOptions, ListDirection, ExpireOptions, FlushMode, InfoOptions, InsertPosition, SetOptions, ZAddOptions, InfBoundary, KeyWeight, Boundary, ProtocolVersion, RangeByIndex, RangeByScore, RangeByLex, ReadFrom, ServerCredentials, SortOptions, StreamGroupOptions, StreamTrimOptions, StreamAddOptions, StreamReadGroupOptions, StreamReadOptions, StreamClaimOptions, StreamPendingOptions, ClosingError, ConfigurationError, ExecAbortError, ValkeyError, GlideReturnType, StreamEntries, ReturnTypeXinfoStream, RequestError, TimeoutError, ConnectionError, ClusterTransaction, Transaction, PubSubMsg, ScoreFilter, SignedEncoding, UnsignedEncoding, UpdateByScore, createLeakedArray, createLeakedAttribute, createLeakedBigint, createLeakedDouble, createLeakedMap, createLeakedString, Script, ObjectType, ClusterScanCursor, AdvancedGlideClientConfiguration, AdvancedGlideClusterClientConfiguration, BaseClientConfiguration, GlideClusterClientConfiguration, LevelOptions, ReturnTypeRecord, ReturnTypeMap, ClusterResponse, ReturnTypeAttribute, ReturnTypeJson, UniversalReturnTypeJson, } = nativeBinding;
|
|
65
|
+
const { AggregationType, BaseScanOptions, ScanOptions, ZScanOptions, HScanOptions, BitEncoding, BitFieldGet, BitFieldIncrBy, BitFieldOffset, BitFieldOverflow, BitFieldSet, BitFieldSubCommands, BitOffset, BitOffsetMultiplier, BitOffsetOptions, BitOverflowControl, BitmapIndexType, BitwiseOperation, ConditionalChange, Decoder, DecoderOption, GeoAddOptions, CoordOrigin, MemberOrigin, SearchOrigin, GeoBoxShape, GeoCircleShape, GeoSearchShape, GeoSearchResultOptions, GeoSearchStoreResultOptions, SortOrder, GeoUnit, GeospatialData, GlideClient, GlideClusterClient, GlideClientConfiguration, GlideJson, JsonBatch, GlideFt, Field, TextField, TagField, NumericField, VectorField, VectorFieldAttributesFlat, VectorFieldAttributesHnsw, FtCreateOptions, FtSearchOptions, FtInfoReturnType, FtAggregateOptions, FtAggregateLimit, FtAggregateFilter, FtAggregateGroupBy, FtAggregateReducer, FtAggregateSortBy, FtAggregateSortProperty, FtAggregateApply, FtAggregateReturnType, FtSearchReturnType, GlideRecord, GlideString, JsonGetOptions, JsonArrPopOptions, SortedSetDataType, StreamEntryDataType, HashDataType, FunctionListOptions, FunctionListResponse, FunctionStatsSingleResponse, FunctionStatsFullResponse, FunctionRestorePolicy, SlotIdTypes, SlotKeyTypes, TimeUnit, RouteByAddress, RouteOption, Routes, RestoreOptions, SingleNodeRoute, PeriodicChecksManualInterval, PeriodicChecks, Logger, Limit, LolwutOptions, LPosOptions, ListDirection, ExpireOptions, FlushMode, InfoOptions, InsertPosition, SetOptions, ZAddOptions, InfBoundary, KeyWeight, Boundary, ProtocolVersion, RangeByIndex, RangeByScore, RangeByLex, ReadFrom, ServerCredentials, SortOptions, StreamGroupOptions, StreamTrimOptions, StreamAddOptions, StreamReadGroupOptions, StreamReadOptions, StreamClaimOptions, StreamPendingOptions, ClosingError, ConfigurationError, ExecAbortError, ValkeyError, GlideReturnType, StreamEntries, ReturnTypeXinfoStream, RequestError, TimeoutError, ConnectionError, ClusterTransaction, Transaction, PubSubMsg, ScoreFilter, SignedEncoding, UnsignedEncoding, UpdateByScore, createLeakedArray, createLeakedAttribute, createLeakedBigint, createLeakedDouble, createLeakedMap, createLeakedString, Script, ObjectType, ClusterScanCursor, AdvancedGlideClientConfiguration, AdvancedGlideClusterClientConfiguration, BaseClientConfiguration, GlideClusterClientConfiguration, LevelOptions, ReturnTypeRecord, ReturnTypeMap, ClusterResponse, ReturnTypeAttribute, ReturnTypeJson, UniversalReturnTypeJson, Score, ElementAndScore, } = nativeBinding;
|
|
66
66
|
module.exports = {
|
|
67
67
|
AggregationType,
|
|
68
68
|
BaseScanOptions,
|
|
@@ -210,6 +210,8 @@ function initialize() {
|
|
|
210
210
|
ReturnTypeAttribute,
|
|
211
211
|
ReturnTypeJson,
|
|
212
212
|
UniversalReturnTypeJson,
|
|
213
|
+
Score,
|
|
214
|
+
ElementAndScore,
|
|
213
215
|
};
|
|
214
216
|
globalObject = Object.assign(global, nativeBinding);
|
|
215
217
|
}
|
|
@@ -88,6 +88,20 @@ export type HashDataType = {
|
|
|
88
88
|
* The keys of the record are stream entry IDs, which are mapped to key-value pairs of the data.
|
|
89
89
|
*/
|
|
90
90
|
export type StreamEntryDataType = Record<string, [GlideString, GlideString][]>;
|
|
91
|
+
/**
|
|
92
|
+
* Union type that can store either a number or positive/negative infinity.
|
|
93
|
+
*/
|
|
94
|
+
export type Score = number | "+inf" | "-inf";
|
|
95
|
+
/**
|
|
96
|
+
* Data type which represents sorted sets data for input parameter of ZADD command,
|
|
97
|
+
* including element and its respective score.
|
|
98
|
+
*/
|
|
99
|
+
export type ElementAndScore = {
|
|
100
|
+
/** The sorted set element name. */
|
|
101
|
+
element: GlideString;
|
|
102
|
+
/** The element score. */
|
|
103
|
+
score: Score;
|
|
104
|
+
};
|
|
91
105
|
/**
|
|
92
106
|
* @internal
|
|
93
107
|
* This function converts an input from GlideRecord or Record types to GlideRecord.
|
|
@@ -2470,7 +2484,7 @@ export declare class BaseClient {
|
|
|
2470
2484
|
* console.log(result); // Output: 2 - Updates the scores of two existing members in the sorted set "existing_sorted_set."
|
|
2471
2485
|
* ```
|
|
2472
2486
|
*/
|
|
2473
|
-
zadd(key: GlideString, membersAndScores:
|
|
2487
|
+
zadd(key: GlideString, membersAndScores: ElementAndScore[] | Record<string, Score>, options?: ZAddOptions): Promise<number>;
|
|
2474
2488
|
/**
|
|
2475
2489
|
* Increments the score of member in the sorted set stored at `key` by `increment`.
|
|
2476
2490
|
* 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,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
|
|
3
3
|
*/
|
|
4
|
-
import { GlideRecord, GlideString, HashDataType, ObjectType, SortedSetDataType } from "./BaseClient";
|
|
4
|
+
import { GlideRecord, GlideString, HashDataType, Score, ObjectType, SortedSetDataType, ElementAndScore } from "./BaseClient";
|
|
5
5
|
import { command_request } from "./ProtobufMessage";
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
@@ -700,7 +700,7 @@ export declare function convertElementsAndScores(membersAndScores: SortedSetData
|
|
|
700
700
|
/**
|
|
701
701
|
* @internal
|
|
702
702
|
*/
|
|
703
|
-
export declare function createZAdd(key: GlideString, membersAndScores:
|
|
703
|
+
export declare function createZAdd(key: GlideString, membersAndScores: ElementAndScore[] | Record<string, Score>, options?: ZAddOptions, incr?: boolean): command_request.Command;
|
|
704
704
|
/**
|
|
705
705
|
* `KeyWeight` - pair of variables represents a weighted key for the `ZINTERSTORE` and `ZUNIONSTORE` sorted sets commands.
|
|
706
706
|
*/
|