@upstash/redis 1.2.0 → 1.3.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.
@@ -1,4 +1,4 @@
1
- import { HttpClient } from './http';
1
+ import { Requester } from './http';
2
2
 
3
3
  /**
4
4
  * Command offers default (de)serialization and the exec method to all commands.
@@ -20,7 +20,7 @@ declare class Command<TData, TResult> {
20
20
  /**
21
21
  * Execute the command using a client.
22
22
  */
23
- exec(client: HttpClient): Promise<TData>;
23
+ exec(client: Requester): Promise<TData>;
24
24
  }
25
25
 
26
26
  declare type NonEmptyArray<T> = [T, ...T[]];
@@ -37,6 +37,20 @@ declare class ScanCommand extends Command<[number, string[]], [number, string[]]
37
37
  constructor(cursor: number, opts?: ScanCommandOptions);
38
38
  }
39
39
 
40
+ declare type ScriptFlushCommandOptions = {
41
+ sync: true;
42
+ async?: never;
43
+ } | {
44
+ sync?: never;
45
+ async: true;
46
+ };
47
+ /**
48
+ * @see https://redis.io/commands/script-flush
49
+ */
50
+ declare class ScriptFlushCommand extends Command<"OK", "OK"> {
51
+ constructor(opts?: ScriptFlushCommandOptions);
52
+ }
53
+
40
54
  declare type SetCommandOptions = ({
41
55
  ex: number;
42
56
  px?: never;
@@ -170,4 +184,4 @@ declare class ZUnionStoreCommand extends Command<number, number> {
170
184
  constructor(destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions);
171
185
  }
172
186
 
173
- export { CommandArgs as C, NonEmptyArray as N, ScanCommandOptions as S, Type as T, UnlinkCommand as U, ZAddCommandOptions as Z, SetCommandOptions as a, ScoreMember as b, ZAddCommandOptionsWithIncr as c, ZInterStoreCommandOptions as d, ZRangeCommandOptions as e, ZUnionStoreCommandOptions as f, Command as g, ScanCommand as h, SetCommand as i, TypeCommand as j, ZAddCommand as k, ZInterStoreCommand as l, ZRangeCommand as m, ZUnionStoreCommand as n };
187
+ export { CommandArgs as C, NonEmptyArray as N, ScanCommandOptions as S, Type as T, UnlinkCommand as U, ZAddCommandOptions as Z, ScriptFlushCommandOptions as a, SetCommandOptions as b, ScoreMember as c, ZAddCommandOptionsWithIncr as d, ZInterStoreCommandOptions as e, ZRangeCommandOptions as f, ZUnionStoreCommandOptions as g, Command as h, ScanCommand as i, ScriptFlushCommand as j, SetCommand as k, TypeCommand as l, ZAddCommand as m, ZInterStoreCommand as n, ZRangeCommand as o, ZUnionStoreCommand as p };