@upstash/redis 1.0.3 → 1.1.0-alpha.0
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/{chunk-HGM7M7CJ.mjs → chunk-3O2RMOYK.mjs} +6 -0
- package/{chunk-2EIGUPGW.mjs → chunk-45MG55KM.mjs} +3 -3
- package/{chunk-WPH7MAB2.mjs → chunk-5GTJT4CY.mjs} +1 -1
- package/cloudflare.d.ts +2 -2
- package/cloudflare.js +8 -2
- package/cloudflare.mjs +2 -2
- package/commands.d.ts +2 -2
- package/commands.js +6 -0
- package/commands.mjs +1 -1
- package/fastly.d.ts +2 -2
- package/fastly.js +8 -2
- package/fastly.mjs +2 -2
- package/index.d.ts +2 -2
- package/index.js +8 -2
- package/index.mjs +3 -3
- package/nodejs.d.ts +2 -2
- package/nodejs.js +8 -2
- package/nodejs.mjs +3 -3
- package/package.json +1 -1
- package/{redis-8b6ea223.d.ts → redis-a5141bfc.d.ts} +31 -3
- package/{zunionstore-e1cc0e90.d.ts → zunionstore-342168a6.d.ts} +17 -2
|
@@ -861,6 +861,12 @@ var ZPopMinCommand = class extends Command {
|
|
|
861
861
|
var ZRangeCommand = class extends Command {
|
|
862
862
|
constructor(key, min, max, opts) {
|
|
863
863
|
const command = ["zrange", key, min, max];
|
|
864
|
+
if (opts == null ? void 0 : opts.byScore) {
|
|
865
|
+
command.push("byscore");
|
|
866
|
+
}
|
|
867
|
+
if (opts == null ? void 0 : opts.byLex) {
|
|
868
|
+
command.push("bylex");
|
|
869
|
+
}
|
|
864
870
|
if (opts == null ? void 0 : opts.withScores) {
|
|
865
871
|
command.push("withscores");
|
|
866
872
|
}
|
|
@@ -106,7 +106,7 @@ import {
|
|
|
106
106
|
ZScanCommand,
|
|
107
107
|
ZScoreCommand,
|
|
108
108
|
ZUnionStoreCommand
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-3O2RMOYK.mjs";
|
|
110
110
|
import {
|
|
111
111
|
UpstashError
|
|
112
112
|
} from "./chunk-7YUZYRJS.mjs";
|
|
@@ -231,7 +231,7 @@ var Pipeline = class {
|
|
|
231
231
|
this.zlexcount = (...args) => this.chain(new ZLexCountCommand(...args));
|
|
232
232
|
this.zpopmax = (...args) => this.chain(new ZPopMaxCommand(...args));
|
|
233
233
|
this.zpopmin = (...args) => this.chain(new ZPopMinCommand(...args));
|
|
234
|
-
this.zrange = (...args) => this.chain(new ZRangeCommand(
|
|
234
|
+
this.zrange = (...args) => this.chain(new ZRangeCommand(args[0], args[1], args[2], args[3]));
|
|
235
235
|
this.zrank = (key, member) => this.chain(new ZRankCommand(key, member));
|
|
236
236
|
this.zrem = (key, ...members) => this.chain(new ZRemCommand(key, ...members));
|
|
237
237
|
this.zremrangebylex = (...args) => this.chain(new ZRemRangeByLexCommand(...args));
|
|
@@ -356,7 +356,7 @@ var Redis = class {
|
|
|
356
356
|
this.zlexcount = (...args) => new ZLexCountCommand(...args).exec(this.client);
|
|
357
357
|
this.zpopmax = (...args) => new ZPopMaxCommand(...args).exec(this.client);
|
|
358
358
|
this.zpopmin = (...args) => new ZPopMinCommand(...args).exec(this.client);
|
|
359
|
-
this.zrange = (...args) => new ZRangeCommand(
|
|
359
|
+
this.zrange = (...args) => new ZRangeCommand(args[0], args[1], args[2], args[3]).exec(this.client);
|
|
360
360
|
this.zrank = (key, member) => new ZRankCommand(key, member).exec(this.client);
|
|
361
361
|
this.zrem = (key, ...members) => new ZRemCommand(key, ...members).exec(this.client);
|
|
362
362
|
this.zremrangebylex = (...args) => new ZRemRangeByLexCommand(...args).exec(this.client);
|
package/cloudflare.d.ts
CHANGED
package/cloudflare.js
CHANGED
|
@@ -908,6 +908,12 @@ var ZPopMinCommand = class extends Command {
|
|
|
908
908
|
var ZRangeCommand = class extends Command {
|
|
909
909
|
constructor(key, min, max, opts) {
|
|
910
910
|
const command = ["zrange", key, min, max];
|
|
911
|
+
if (opts == null ? void 0 : opts.byScore) {
|
|
912
|
+
command.push("byscore");
|
|
913
|
+
}
|
|
914
|
+
if (opts == null ? void 0 : opts.byLex) {
|
|
915
|
+
command.push("bylex");
|
|
916
|
+
}
|
|
911
917
|
if (opts == null ? void 0 : opts.withScores) {
|
|
912
918
|
command.push("withscores");
|
|
913
919
|
}
|
|
@@ -1121,7 +1127,7 @@ var Pipeline = class {
|
|
|
1121
1127
|
this.zlexcount = (...args) => this.chain(new ZLexCountCommand(...args));
|
|
1122
1128
|
this.zpopmax = (...args) => this.chain(new ZPopMaxCommand(...args));
|
|
1123
1129
|
this.zpopmin = (...args) => this.chain(new ZPopMinCommand(...args));
|
|
1124
|
-
this.zrange = (...args) => this.chain(new ZRangeCommand(
|
|
1130
|
+
this.zrange = (...args) => this.chain(new ZRangeCommand(args[0], args[1], args[2], args[3]));
|
|
1125
1131
|
this.zrank = (key, member) => this.chain(new ZRankCommand(key, member));
|
|
1126
1132
|
this.zrem = (key, ...members) => this.chain(new ZRemCommand(key, ...members));
|
|
1127
1133
|
this.zremrangebylex = (...args) => this.chain(new ZRemRangeByLexCommand(...args));
|
|
@@ -1246,7 +1252,7 @@ var Redis = class {
|
|
|
1246
1252
|
this.zlexcount = (...args) => new ZLexCountCommand(...args).exec(this.client);
|
|
1247
1253
|
this.zpopmax = (...args) => new ZPopMaxCommand(...args).exec(this.client);
|
|
1248
1254
|
this.zpopmin = (...args) => new ZPopMinCommand(...args).exec(this.client);
|
|
1249
|
-
this.zrange = (...args) => new ZRangeCommand(
|
|
1255
|
+
this.zrange = (...args) => new ZRangeCommand(args[0], args[1], args[2], args[3]).exec(this.client);
|
|
1250
1256
|
this.zrank = (key, member) => new ZRankCommand(key, member).exec(this.client);
|
|
1251
1257
|
this.zrem = (key, ...members) => new ZRemCommand(key, ...members).exec(this.client);
|
|
1252
1258
|
this.zremrangebylex = (...args) => new ZRemRangeByLexCommand(...args).exec(this.client);
|
package/cloudflare.mjs
CHANGED
package/commands.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as Command, N as NonEmptyArray, S as ScanCommandOptions } from './zunionstore-
|
|
2
|
-
export { g as Command, h as ScanCommand, S as ScanCommandOptions, b as ScoreMember, i as SetCommand, a as SetCommandOptions, T as Type, j as TypeCommand, U as UnlinkCommand, k as ZAddCommand, Z as ZAddCommandOptions, c as ZAddCommandOptionsWithIncr, l as ZInterStoreCommand, d as ZInterStoreCommandOptions, m as ZRangeCommand, e as ZRangeCommandOptions, n as ZUnionStoreCommand, f as ZUnionStoreCommandOptions } from './zunionstore-
|
|
1
|
+
import { g as Command, N as NonEmptyArray, S as ScanCommandOptions } from './zunionstore-342168a6';
|
|
2
|
+
export { g as Command, h as ScanCommand, S as ScanCommandOptions, b as ScoreMember, i as SetCommand, a as SetCommandOptions, T as Type, j as TypeCommand, U as UnlinkCommand, k as ZAddCommand, Z as ZAddCommandOptions, c as ZAddCommandOptionsWithIncr, l as ZInterStoreCommand, d as ZInterStoreCommandOptions, m as ZRangeCommand, e as ZRangeCommandOptions, n as ZUnionStoreCommand, f as ZUnionStoreCommandOptions } from './zunionstore-342168a6';
|
|
3
3
|
import './http';
|
|
4
4
|
|
|
5
5
|
/**
|
package/commands.js
CHANGED
|
@@ -1001,6 +1001,12 @@ var ZPopMinCommand = class extends Command {
|
|
|
1001
1001
|
var ZRangeCommand = class extends Command {
|
|
1002
1002
|
constructor(key, min, max, opts) {
|
|
1003
1003
|
const command = ["zrange", key, min, max];
|
|
1004
|
+
if (opts == null ? void 0 : opts.byScore) {
|
|
1005
|
+
command.push("byscore");
|
|
1006
|
+
}
|
|
1007
|
+
if (opts == null ? void 0 : opts.byLex) {
|
|
1008
|
+
command.push("bylex");
|
|
1009
|
+
}
|
|
1004
1010
|
if (opts == null ? void 0 : opts.withScores) {
|
|
1005
1011
|
command.push("withscores");
|
|
1006
1012
|
}
|
package/commands.mjs
CHANGED
package/fastly.d.ts
CHANGED
package/fastly.js
CHANGED
|
@@ -908,6 +908,12 @@ var ZPopMinCommand = class extends Command {
|
|
|
908
908
|
var ZRangeCommand = class extends Command {
|
|
909
909
|
constructor(key, min, max, opts) {
|
|
910
910
|
const command = ["zrange", key, min, max];
|
|
911
|
+
if (opts == null ? void 0 : opts.byScore) {
|
|
912
|
+
command.push("byscore");
|
|
913
|
+
}
|
|
914
|
+
if (opts == null ? void 0 : opts.byLex) {
|
|
915
|
+
command.push("bylex");
|
|
916
|
+
}
|
|
911
917
|
if (opts == null ? void 0 : opts.withScores) {
|
|
912
918
|
command.push("withscores");
|
|
913
919
|
}
|
|
@@ -1121,7 +1127,7 @@ var Pipeline = class {
|
|
|
1121
1127
|
this.zlexcount = (...args) => this.chain(new ZLexCountCommand(...args));
|
|
1122
1128
|
this.zpopmax = (...args) => this.chain(new ZPopMaxCommand(...args));
|
|
1123
1129
|
this.zpopmin = (...args) => this.chain(new ZPopMinCommand(...args));
|
|
1124
|
-
this.zrange = (...args) => this.chain(new ZRangeCommand(
|
|
1130
|
+
this.zrange = (...args) => this.chain(new ZRangeCommand(args[0], args[1], args[2], args[3]));
|
|
1125
1131
|
this.zrank = (key, member) => this.chain(new ZRankCommand(key, member));
|
|
1126
1132
|
this.zrem = (key, ...members) => this.chain(new ZRemCommand(key, ...members));
|
|
1127
1133
|
this.zremrangebylex = (...args) => this.chain(new ZRemRangeByLexCommand(...args));
|
|
@@ -1246,7 +1252,7 @@ var Redis = class {
|
|
|
1246
1252
|
this.zlexcount = (...args) => new ZLexCountCommand(...args).exec(this.client);
|
|
1247
1253
|
this.zpopmax = (...args) => new ZPopMaxCommand(...args).exec(this.client);
|
|
1248
1254
|
this.zpopmin = (...args) => new ZPopMinCommand(...args).exec(this.client);
|
|
1249
|
-
this.zrange = (...args) => new ZRangeCommand(
|
|
1255
|
+
this.zrange = (...args) => new ZRangeCommand(args[0], args[1], args[2], args[3]).exec(this.client);
|
|
1250
1256
|
this.zrank = (key, member) => new ZRankCommand(key, member).exec(this.client);
|
|
1251
1257
|
this.zrem = (key, ...members) => new ZRemCommand(key, ...members).exec(this.client);
|
|
1252
1258
|
this.zremrangebylex = (...args) => new ZRemRangeByLexCommand(...args).exec(this.client);
|
package/fastly.mjs
CHANGED
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -909,6 +909,12 @@ var ZPopMinCommand = class extends Command {
|
|
|
909
909
|
var ZRangeCommand = class extends Command {
|
|
910
910
|
constructor(key, min, max, opts) {
|
|
911
911
|
const command = ["zrange", key, min, max];
|
|
912
|
+
if (opts == null ? void 0 : opts.byScore) {
|
|
913
|
+
command.push("byscore");
|
|
914
|
+
}
|
|
915
|
+
if (opts == null ? void 0 : opts.byLex) {
|
|
916
|
+
command.push("bylex");
|
|
917
|
+
}
|
|
912
918
|
if (opts == null ? void 0 : opts.withScores) {
|
|
913
919
|
command.push("withscores");
|
|
914
920
|
}
|
|
@@ -1122,7 +1128,7 @@ var Pipeline = class {
|
|
|
1122
1128
|
this.zlexcount = (...args) => this.chain(new ZLexCountCommand(...args));
|
|
1123
1129
|
this.zpopmax = (...args) => this.chain(new ZPopMaxCommand(...args));
|
|
1124
1130
|
this.zpopmin = (...args) => this.chain(new ZPopMinCommand(...args));
|
|
1125
|
-
this.zrange = (...args) => this.chain(new ZRangeCommand(
|
|
1131
|
+
this.zrange = (...args) => this.chain(new ZRangeCommand(args[0], args[1], args[2], args[3]));
|
|
1126
1132
|
this.zrank = (key, member) => this.chain(new ZRankCommand(key, member));
|
|
1127
1133
|
this.zrem = (key, ...members) => this.chain(new ZRemCommand(key, ...members));
|
|
1128
1134
|
this.zremrangebylex = (...args) => this.chain(new ZRemRangeByLexCommand(...args));
|
|
@@ -1247,7 +1253,7 @@ var Redis = class {
|
|
|
1247
1253
|
this.zlexcount = (...args) => new ZLexCountCommand(...args).exec(this.client);
|
|
1248
1254
|
this.zpopmax = (...args) => new ZPopMaxCommand(...args).exec(this.client);
|
|
1249
1255
|
this.zpopmin = (...args) => new ZPopMinCommand(...args).exec(this.client);
|
|
1250
|
-
this.zrange = (...args) => new ZRangeCommand(
|
|
1256
|
+
this.zrange = (...args) => new ZRangeCommand(args[0], args[1], args[2], args[3]).exec(this.client);
|
|
1251
1257
|
this.zrank = (key, member) => new ZRankCommand(key, member).exec(this.client);
|
|
1252
1258
|
this.zrem = (key, ...members) => new ZRemCommand(key, ...members).exec(this.client);
|
|
1253
1259
|
this.zremrangebylex = (...args) => new ZRemRangeByLexCommand(...args).exec(this.client);
|
package/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Redis
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-5GTJT4CY.mjs";
|
|
4
|
+
import "./chunk-45MG55KM.mjs";
|
|
5
|
+
import "./chunk-3O2RMOYK.mjs";
|
|
6
6
|
import "./chunk-HIDCSH5S.mjs";
|
|
7
7
|
import {
|
|
8
8
|
UpstashError
|
package/nodejs.d.ts
CHANGED
package/nodejs.js
CHANGED
|
@@ -908,6 +908,12 @@ var ZPopMinCommand = class extends Command {
|
|
|
908
908
|
var ZRangeCommand = class extends Command {
|
|
909
909
|
constructor(key, min, max, opts) {
|
|
910
910
|
const command = ["zrange", key, min, max];
|
|
911
|
+
if (opts == null ? void 0 : opts.byScore) {
|
|
912
|
+
command.push("byscore");
|
|
913
|
+
}
|
|
914
|
+
if (opts == null ? void 0 : opts.byLex) {
|
|
915
|
+
command.push("bylex");
|
|
916
|
+
}
|
|
911
917
|
if (opts == null ? void 0 : opts.withScores) {
|
|
912
918
|
command.push("withscores");
|
|
913
919
|
}
|
|
@@ -1121,7 +1127,7 @@ var Pipeline = class {
|
|
|
1121
1127
|
this.zlexcount = (...args) => this.chain(new ZLexCountCommand(...args));
|
|
1122
1128
|
this.zpopmax = (...args) => this.chain(new ZPopMaxCommand(...args));
|
|
1123
1129
|
this.zpopmin = (...args) => this.chain(new ZPopMinCommand(...args));
|
|
1124
|
-
this.zrange = (...args) => this.chain(new ZRangeCommand(
|
|
1130
|
+
this.zrange = (...args) => this.chain(new ZRangeCommand(args[0], args[1], args[2], args[3]));
|
|
1125
1131
|
this.zrank = (key, member) => this.chain(new ZRankCommand(key, member));
|
|
1126
1132
|
this.zrem = (key, ...members) => this.chain(new ZRemCommand(key, ...members));
|
|
1127
1133
|
this.zremrangebylex = (...args) => this.chain(new ZRemRangeByLexCommand(...args));
|
|
@@ -1246,7 +1252,7 @@ var Redis = class {
|
|
|
1246
1252
|
this.zlexcount = (...args) => new ZLexCountCommand(...args).exec(this.client);
|
|
1247
1253
|
this.zpopmax = (...args) => new ZPopMaxCommand(...args).exec(this.client);
|
|
1248
1254
|
this.zpopmin = (...args) => new ZPopMinCommand(...args).exec(this.client);
|
|
1249
|
-
this.zrange = (...args) => new ZRangeCommand(
|
|
1255
|
+
this.zrange = (...args) => new ZRangeCommand(args[0], args[1], args[2], args[3]).exec(this.client);
|
|
1250
1256
|
this.zrank = (key, member) => new ZRankCommand(key, member).exec(this.client);
|
|
1251
1257
|
this.zrem = (key, ...members) => new ZRemCommand(key, ...members).exec(this.client);
|
|
1252
1258
|
this.zremrangebylex = (...args) => new ZRemRangeByLexCommand(...args).exec(this.client);
|
package/nodejs.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Redis
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-5GTJT4CY.mjs";
|
|
4
|
+
import "./chunk-45MG55KM.mjs";
|
|
5
|
+
import "./chunk-3O2RMOYK.mjs";
|
|
6
6
|
import "./chunk-HIDCSH5S.mjs";
|
|
7
7
|
import "./chunk-7YUZYRJS.mjs";
|
|
8
8
|
export {
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "@upstash/redis", "version": "v1.0.
|
|
1
|
+
{ "name": "@upstash/redis", "version": "v1.1.0-alpha.0", "engines": { "node": ">=10" }, "description": "An HTTP/REST based Redis client built on top of Upstash REST API.", "main": "./index.js", "module": "./index.mjs", "types": "./index.d.ts", "scripts": { "test": "jest -i", "fmt": "pnpm lint && pnpm prettier --write .", "lint": "eslint --ext .ts --fix --ignore-path .gitignore .", "build": "tsup && cp package.json ./dist/ && pnpm size-limit" }, "repository": { "type": "git", "url": "git+https://github.com/upstash/upstash-redis.git" }, "keywords": [ "redis", "database", "serverless", "edge", "upstash" ], "author": "Andreas Thomas <andreas.thomas@chronark.com>", "license": "MIT", "bugs": { "url": "https://github.com/upstash/upstash-redis/issues" }, "homepage": "https://github.com/upstash/upstash-redis#readme", "directories": { "examples": "examples" }, "devDependencies": { "@jest/globals": "^27.4.6", "@size-limit/preset-small-lib": "^7.0.8", "@trivago/prettier-plugin-sort-imports": "^3.2.0", "@types/jest": "^27.4.0", "@types/node": "^17.0.8", "@typescript-eslint/eslint-plugin": "^5.9.1", "@typescript-eslint/parser": "^5.9.1", "dotenv": "^12.0.3", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", "jest": "^27.4.7", "prettier": "^2.5.1", "size-limit": "^7.0.8", "ts-jest": "^27.1.3", "tsup": "^5.11.11", "typescript": "^4.5.5" }, "dependencies": { "isomorphic-fetch": "^3.0.0" }, "browser": { "isomorphic-fetch": false }, "size-limit": [ { "path": "dist/index.js", "limit": "5 KB" }, { "path": "dist/index.mjs", "limit": "5 KB" }, { "path": "dist/cloudflare.js", "limit": "5 KB" }, { "path": "dist/cloudflare.mjs", "limit": "5 KB" }, { "path": "dist/nodejs.js", "limit": "5 KB" }, { "path": "dist/nodejs.mjs", "limit": "5 KB" }, { "path": "dist/fastly.js", "limit": "5 KB" }, { "path": "dist/fastly.mjs", "limit": "5 KB" } ] }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from './http';
|
|
2
|
-
import { S as ScanCommandOptions, a as SetCommandOptions, C as CommandArgs, U as UnlinkCommand, b as ScoreMember, Z as ZAddCommandOptions, c as ZAddCommandOptionsWithIncr, d as ZInterStoreCommandOptions, e as ZRangeCommandOptions, f as ZUnionStoreCommandOptions, T as Type } from './zunionstore-
|
|
2
|
+
import { S as ScanCommandOptions, a as SetCommandOptions, C as CommandArgs, U as UnlinkCommand, b as ScoreMember, Z as ZAddCommandOptions, c as ZAddCommandOptionsWithIncr, d as ZInterStoreCommandOptions, e as ZRangeCommandOptions, f as ZUnionStoreCommandOptions, T as Type } from './zunionstore-342168a6';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Upstash REST API supports command pipelining to send multiple commands in
|
|
@@ -466,7 +466,21 @@ declare class Pipeline {
|
|
|
466
466
|
/**
|
|
467
467
|
* @see https://redis.io/commands/zrange
|
|
468
468
|
*/
|
|
469
|
-
zrange: <TData extends unknown[]>(key: string, min: number
|
|
469
|
+
zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
|
|
470
|
+
key: string,
|
|
471
|
+
min: `(${string}` | `[${string}` | "-" | "+",
|
|
472
|
+
max: `(${string}` | `[${string}` | "-" | "+",
|
|
473
|
+
opts: {
|
|
474
|
+
byLex: true;
|
|
475
|
+
} & ZRangeCommandOptions
|
|
476
|
+
] | [
|
|
477
|
+
key: string,
|
|
478
|
+
min: number | `(${number}` | "-inf" | "+inf",
|
|
479
|
+
max: number | `(${number}` | "-inf" | "+inf",
|
|
480
|
+
opts: {
|
|
481
|
+
byScore: true;
|
|
482
|
+
} & ZRangeCommandOptions
|
|
483
|
+
]) => this;
|
|
470
484
|
/**
|
|
471
485
|
* @see https://redis.io/commands/zrank
|
|
472
486
|
*/
|
|
@@ -934,7 +948,21 @@ declare class Redis {
|
|
|
934
948
|
/**
|
|
935
949
|
* @see https://redis.io/commands/zrange
|
|
936
950
|
*/
|
|
937
|
-
zrange: <TData extends unknown[]>(key: string, min: number
|
|
951
|
+
zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
|
|
952
|
+
key: string,
|
|
953
|
+
min: `(${string}` | `[${string}` | "-" | "+",
|
|
954
|
+
max: `(${string}` | `[${string}` | "-" | "+",
|
|
955
|
+
opts: {
|
|
956
|
+
byLex: true;
|
|
957
|
+
} & ZRangeCommandOptions
|
|
958
|
+
] | [
|
|
959
|
+
key: string,
|
|
960
|
+
min: number | `(${number}` | "-inf" | "+inf",
|
|
961
|
+
max: number | `(${number}` | "-inf" | "+inf",
|
|
962
|
+
opts: {
|
|
963
|
+
byScore: true;
|
|
964
|
+
} & ZRangeCommandOptions
|
|
965
|
+
]) => Promise<TData>;
|
|
938
966
|
/**
|
|
939
967
|
* @see https://redis.io/commands/zrank
|
|
940
968
|
*/
|
|
@@ -127,12 +127,27 @@ declare class ZInterStoreCommand extends Command<number, number> {
|
|
|
127
127
|
|
|
128
128
|
declare type ZRangeCommandOptions = {
|
|
129
129
|
withScores?: boolean;
|
|
130
|
-
}
|
|
130
|
+
} & ({
|
|
131
|
+
byScore: true;
|
|
132
|
+
byLex?: never;
|
|
133
|
+
} | {
|
|
134
|
+
byScore?: never;
|
|
135
|
+
byLex: true;
|
|
136
|
+
} | {
|
|
137
|
+
byScore?: never;
|
|
138
|
+
byLex?: never;
|
|
139
|
+
});
|
|
131
140
|
/**
|
|
132
141
|
* @see https://redis.io/commands/zrange
|
|
133
142
|
*/
|
|
134
143
|
declare class ZRangeCommand<TData extends unknown[]> extends Command<TData, string[]> {
|
|
135
|
-
constructor(key: string, min: number
|
|
144
|
+
constructor(key: string, min: number, max: number, opts?: ZRangeCommandOptions);
|
|
145
|
+
constructor(key: string, min: `(${string}` | `[${string}` | "-" | "+", max: `(${string}` | `[${string}` | "-" | "+", opts: {
|
|
146
|
+
byLex: true;
|
|
147
|
+
} & ZRangeCommandOptions);
|
|
148
|
+
constructor(key: string, min: number | `(${number}` | "-inf" | "+inf", max: number | `(${number}` | "-inf" | "+inf", opts: {
|
|
149
|
+
byScore: true;
|
|
150
|
+
} & ZRangeCommandOptions);
|
|
136
151
|
}
|
|
137
152
|
|
|
138
153
|
declare type ZUnionStoreCommandOptions = {
|