@upstash/redis 0.0.0-ci.f6da5d747c9564bc95fccdbfe16a9aa10cd30367-20251125191507 → 0.0.0-ci.f725f60c40a2b7f0e25dd9bf83a931c24624cdf6-20260123181037
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-WTYE7OV3.mjs → chunk-SGAAV5RA.mjs} +206 -27
- package/cloudflare.d.mts +2 -2
- package/cloudflare.d.ts +2 -2
- package/cloudflare.js +221 -38
- package/cloudflare.mjs +14 -10
- package/fastly.d.mts +2 -2
- package/fastly.d.ts +2 -2
- package/fastly.js +208 -29
- package/fastly.mjs +1 -1
- package/nodejs.d.mts +2 -2
- package/nodejs.d.ts +2 -2
- package/nodejs.js +214 -33
- package/nodejs.mjs +7 -5
- package/package.json +1 -1
- package/{zmscore-xbfRql7X.d.mts → zmscore-0SAuWM0q.d.mts} +135 -3
- package/{zmscore-xbfRql7X.d.ts → zmscore-0SAuWM0q.d.ts} +135 -3
|
@@ -317,6 +317,40 @@ declare class ExpireCommand extends Command<"0" | "1", 0 | 1> {
|
|
|
317
317
|
constructor(cmd: [key: string, seconds: number, option?: ExpireOption], opts?: CommandOptions<"0" | "1", 0 | 1>);
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
type FunctionListArgs = {
|
|
321
|
+
/**
|
|
322
|
+
* Pattern for matching library names. Supports glob patterns.
|
|
323
|
+
*
|
|
324
|
+
* Example: "my_library_*"
|
|
325
|
+
*/
|
|
326
|
+
libraryName?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Includes the library source code in the response.
|
|
329
|
+
*
|
|
330
|
+
* @default false
|
|
331
|
+
*/
|
|
332
|
+
withCode?: boolean;
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
type FunctionLoadArgs = {
|
|
336
|
+
/**
|
|
337
|
+
* The Lua code to load.
|
|
338
|
+
*
|
|
339
|
+
* Example:
|
|
340
|
+
* ```lua
|
|
341
|
+
* #!lua name=mylib
|
|
342
|
+
* redis.register_function('myfunc', function() return 'ok' end)
|
|
343
|
+
* ```
|
|
344
|
+
*/
|
|
345
|
+
code: string;
|
|
346
|
+
/**
|
|
347
|
+
* If true, the library will replace the existing library with the same name.
|
|
348
|
+
*
|
|
349
|
+
* @default false
|
|
350
|
+
*/
|
|
351
|
+
replace?: boolean;
|
|
352
|
+
};
|
|
353
|
+
|
|
320
354
|
/**
|
|
321
355
|
* @see https://redis.io/commands/append
|
|
322
356
|
*/
|
|
@@ -1793,7 +1827,11 @@ declare class ZRemRangeByRankCommand extends Command<number, number> {
|
|
|
1793
1827
|
* @see https://redis.io/commands/zremrangebyscore
|
|
1794
1828
|
*/
|
|
1795
1829
|
declare class ZRemRangeByScoreCommand extends Command<number, number> {
|
|
1796
|
-
constructor(cmd: [
|
|
1830
|
+
constructor(cmd: [
|
|
1831
|
+
key: string,
|
|
1832
|
+
min: number | `(${number}` | "-inf" | "+inf",
|
|
1833
|
+
max: number | `(${number}` | "-inf" | "+inf"
|
|
1834
|
+
], opts?: CommandOptions<number, number>);
|
|
1797
1835
|
}
|
|
1798
1836
|
|
|
1799
1837
|
/**
|
|
@@ -2760,7 +2798,7 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2760
2798
|
/**
|
|
2761
2799
|
* @see https://redis.io/commands/zremrangebyscore
|
|
2762
2800
|
*/
|
|
2763
|
-
zremrangebyscore: (key: string, min: number, max: number) => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2801
|
+
zremrangebyscore: (key: string, min: number | `(${number}` | "-inf" | "+inf", max: number | `(${number}` | "-inf" | "+inf") => Pipeline<[...TCommands, Command<any, number>]>;
|
|
2764
2802
|
/**
|
|
2765
2803
|
* @see https://redis.io/commands/zrevrank
|
|
2766
2804
|
*/
|
|
@@ -2884,6 +2922,52 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
|
|
|
2884
2922
|
*/
|
|
2885
2923
|
type: (key: string, path?: string | undefined) => Pipeline<[...TCommands, Command<any, string[]>]>;
|
|
2886
2924
|
};
|
|
2925
|
+
get functions(): {
|
|
2926
|
+
/**
|
|
2927
|
+
* @see https://redis.io/docs/latest/commands/function-load/
|
|
2928
|
+
*/
|
|
2929
|
+
load: (args: FunctionLoadArgs) => Pipeline<[...TCommands, Command<any, string>]>;
|
|
2930
|
+
/**
|
|
2931
|
+
* @see https://redis.io/docs/latest/commands/function-list/
|
|
2932
|
+
*/
|
|
2933
|
+
list: (args?: FunctionListArgs | undefined) => Pipeline<[...TCommands, Command<any, {
|
|
2934
|
+
libraryName: string;
|
|
2935
|
+
engine: string;
|
|
2936
|
+
functions: {
|
|
2937
|
+
name: string;
|
|
2938
|
+
description?: string;
|
|
2939
|
+
flags: string[];
|
|
2940
|
+
}[];
|
|
2941
|
+
libraryCode?: string;
|
|
2942
|
+
}[]>]>;
|
|
2943
|
+
/**
|
|
2944
|
+
* @see https://redis.io/docs/latest/commands/function-delete/
|
|
2945
|
+
*/
|
|
2946
|
+
delete: (libraryName: string) => Pipeline<[...TCommands, Command<any, "OK">]>;
|
|
2947
|
+
/**
|
|
2948
|
+
* @see https://redis.io/docs/latest/commands/function-flush/
|
|
2949
|
+
*/
|
|
2950
|
+
flush: () => Pipeline<[...TCommands, Command<any, "OK">]>;
|
|
2951
|
+
/**
|
|
2952
|
+
* @see https://redis.io/docs/latest/commands/function-stats/
|
|
2953
|
+
*/
|
|
2954
|
+
stats: () => Pipeline<[...TCommands, Command<any, {
|
|
2955
|
+
engines: {
|
|
2956
|
+
[k: string]: {
|
|
2957
|
+
librariesCount: unknown;
|
|
2958
|
+
functionsCount: unknown;
|
|
2959
|
+
};
|
|
2960
|
+
};
|
|
2961
|
+
}>]>;
|
|
2962
|
+
/**
|
|
2963
|
+
* @see https://redis.io/docs/latest/commands/fcall/
|
|
2964
|
+
*/
|
|
2965
|
+
call: <TData = unknown>(functionName: string, keys?: string[] | undefined, args?: string[] | undefined) => Pipeline<[...TCommands, Command<any, TData>]>;
|
|
2966
|
+
/**
|
|
2967
|
+
* @see https://redis.io/docs/latest/commands/fcall_ro/
|
|
2968
|
+
*/
|
|
2969
|
+
callRo: <TData = unknown>(functionName: string, keys?: string[] | undefined, args?: string[] | undefined) => Pipeline<[...TCommands, Command<any, TData>]>;
|
|
2970
|
+
};
|
|
2887
2971
|
}
|
|
2888
2972
|
|
|
2889
2973
|
/**
|
|
@@ -3111,6 +3195,54 @@ declare class Redis {
|
|
|
3111
3195
|
*/
|
|
3112
3196
|
type: (key: string, path?: string | undefined) => Promise<string[]>;
|
|
3113
3197
|
};
|
|
3198
|
+
get functions(): {
|
|
3199
|
+
/**
|
|
3200
|
+
* @see https://redis.io/docs/latest/commands/function-load/
|
|
3201
|
+
*/
|
|
3202
|
+
load: (args: FunctionLoadArgs) => Promise<string>;
|
|
3203
|
+
/**
|
|
3204
|
+
* @see https://redis.io/docs/latest/commands/function-list/
|
|
3205
|
+
*/
|
|
3206
|
+
list: (args?: FunctionListArgs | undefined) => Promise<{
|
|
3207
|
+
libraryName: string;
|
|
3208
|
+
engine: string;
|
|
3209
|
+
functions: {
|
|
3210
|
+
name: string;
|
|
3211
|
+
description?: string;
|
|
3212
|
+
flags: string[];
|
|
3213
|
+
}[];
|
|
3214
|
+
libraryCode?: string;
|
|
3215
|
+
}[]>;
|
|
3216
|
+
/**
|
|
3217
|
+
* @see https://redis.io/docs/latest/commands/function-delete/
|
|
3218
|
+
*/
|
|
3219
|
+
delete: (libraryName: string) => Promise<"OK">;
|
|
3220
|
+
/**
|
|
3221
|
+
* @see https://redis.io/docs/latest/commands/function-flush/
|
|
3222
|
+
*/
|
|
3223
|
+
flush: () => Promise<"OK">;
|
|
3224
|
+
/**
|
|
3225
|
+
* @see https://redis.io/docs/latest/commands/function-stats/
|
|
3226
|
+
*
|
|
3227
|
+
* Note: `running_script` field is not supported and therefore not included in the type.
|
|
3228
|
+
*/
|
|
3229
|
+
stats: () => Promise<{
|
|
3230
|
+
engines: {
|
|
3231
|
+
[k: string]: {
|
|
3232
|
+
librariesCount: unknown;
|
|
3233
|
+
functionsCount: unknown;
|
|
3234
|
+
};
|
|
3235
|
+
};
|
|
3236
|
+
}>;
|
|
3237
|
+
/**
|
|
3238
|
+
* @see https://redis.io/docs/latest/commands/fcall/
|
|
3239
|
+
*/
|
|
3240
|
+
call: <TData = unknown>(functionName: string, keys?: string[] | undefined, args?: string[] | undefined) => Promise<TData>;
|
|
3241
|
+
/**
|
|
3242
|
+
* @see https://redis.io/docs/latest/commands/fcall_ro/
|
|
3243
|
+
*/
|
|
3244
|
+
callRo: <TData = unknown>(functionName: string, keys?: string[] | undefined, args?: string[] | undefined) => Promise<TData>;
|
|
3245
|
+
};
|
|
3114
3246
|
/**
|
|
3115
3247
|
* Wrap a new middleware around the HTTP client.
|
|
3116
3248
|
*/
|
|
@@ -3994,7 +4126,7 @@ declare class Redis {
|
|
|
3994
4126
|
/**
|
|
3995
4127
|
* @see https://redis.io/commands/zremrangebyscore
|
|
3996
4128
|
*/
|
|
3997
|
-
zremrangebyscore: (key: string, min: number, max: number) => Promise<number>;
|
|
4129
|
+
zremrangebyscore: (key: string, min: number | `(${number}` | "-inf" | "+inf", max: number | `(${number}` | "-inf" | "+inf") => Promise<number>;
|
|
3998
4130
|
/**
|
|
3999
4131
|
* @see https://redis.io/commands/zrevrank
|
|
4000
4132
|
*/
|