@upstash/redis 1.36.1 → 1.37.0-rc.1

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/nodejs.d.mts CHANGED
@@ -1,5 +1,146 @@
1
- import { H as HttpClientConfig, R as RedisOptions, a as RequesterConfig, b as Redis$1, c as Requester } from './zmscore-0SAuWM0q.mjs';
2
- export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, l as EvalCommand, k as EvalROCommand, n as EvalshaCommand, m as EvalshaROCommand, o as ExistsCommand, r as ExpireAtCommand, p as ExpireCommand, q as ExpireOption, F as FlushAllCommand, s as FlushDBCommand, G as GeoAddCommand, t as GeoAddCommandOptions, v as GeoDistCommand, w as GeoHashCommand, u as GeoMember, x as GeoPosCommand, y as GeoSearchCommand, z as GeoSearchStoreCommand, J as GetBitCommand, I as GetCommand, K as GetDelCommand, L as GetExCommand, M as GetRangeCommand, N as GetSetCommand, O as HDelCommand, Q as HExistsCommand, T as HExpireAtCommand, S as HExpireCommand, V as HExpireTimeCommand, a1 as HGetAllCommand, a0 as HGetCommand, a2 as HIncrByCommand, a3 as HIncrByFloatCommand, a4 as HKeysCommand, a5 as HLenCommand, a6 as HMGetCommand, a7 as HMSetCommand, Y as HPExpireAtCommand, X as HPExpireCommand, Z as HPExpireTimeCommand, _ as HPTtlCommand, $ as HPersistCommand, a8 as HRandFieldCommand, a9 as HScanCommand, aa as HSetCommand, ab as HSetNXCommand, ac as HStrLenCommand, W as HTtlCommand, ad as HValsCommand, af as IncrByCommand, ag as IncrByFloatCommand, ae as IncrCommand, ah as JsonArrAppendCommand, ai as JsonArrIndexCommand, aj as JsonArrInsertCommand, ak as JsonArrLenCommand, al as JsonArrPopCommand, am as JsonArrTrimCommand, an as JsonClearCommand, ao as JsonDelCommand, ap as JsonForgetCommand, aq as JsonGetCommand, as as JsonMGetCommand, ar as JsonMergeCommand, at as JsonNumIncrByCommand, au as JsonNumMultByCommand, av as JsonObjKeysCommand, aw as JsonObjLenCommand, ax as JsonRespCommand, ay as JsonSetCommand, az as JsonStrAppendCommand, aA as JsonStrLenCommand, aB as JsonToggleCommand, aC as JsonTypeCommand, aD as KeysCommand, aE as LIndexCommand, aF as LInsertCommand, aG as LLenCommand, aH as LMoveCommand, aI as LPopCommand, aJ as LPushCommand, aK as LPushXCommand, aL as LRangeCommand, aM as LRemCommand, aN as LSetCommand, aO as LTrimCommand, aP as MGetCommand, aQ as MSetCommand, aR as MSetNXCommand, aU as PExpireAtCommand, aT as PExpireCommand, aW as PSetEXCommand, aX as PTtlCommand, aS as PersistCommand, aV as PingCommand, P as Pipeline, aY as PublishCommand, b0 as RPopCommand, b1 as RPushCommand, b2 as RPushXCommand, aZ as RandomKeyCommand, a_ as RenameCommand, a$ as RenameNXCommand, b3 as SAddCommand, b6 as SCardCommand, ba as SDiffCommand, bb as SDiffStoreCommand, bi as SInterCommand, bj as SInterStoreCommand, bk as SIsMemberCommand, bm as SMIsMemberCommand, bl as SMembersCommand, bn as SMoveCommand, bo as SPopCommand, bp as SRandMemberCommand, bq as SRemCommand, br as SScanCommand, bt as SUnionCommand, bu as SUnionStoreCommand, b4 as ScanCommand, b5 as ScanCommandOptions, bD as ScoreMember, b7 as ScriptExistsCommand, b8 as ScriptFlushCommand, b9 as ScriptLoadCommand, be as SetBitCommand, bc as SetCommand, bd as SetCommandOptions, bf as SetExCommand, bg as SetNxCommand, bh as SetRangeCommand, bs as StrLenCommand, bv as TimeCommand, bw as TouchCommand, bx as TtlCommand, by as Type, bz as TypeCommand, bA as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bB as XAddCommand, bC as XRangeCommand, bF as ZAddCommand, bE as ZAddCommandOptions, bG as ZCardCommand, bH as ZCountCommand, bI as ZDiffStoreCommand, bJ as ZIncrByCommand, bK as ZInterStoreCommand, bL as ZInterStoreCommandOptions, bM as ZLexCountCommand, bN as ZMScoreCommand, bO as ZPopMaxCommand, bP as ZPopMinCommand, bQ as ZRangeCommand, bR as ZRangeCommandOptions, bS as ZRankCommand, bT as ZRemCommand, bU as ZRemRangeByLexCommand, bV as ZRemRangeByRankCommand, bW as ZRemRangeByScoreCommand, bX as ZRevRankCommand, bY as ZScanCommand, bZ as ZScoreCommand, b_ as ZUnionCommand, b$ as ZUnionCommandOptions, c0 as ZUnionStoreCommand, c1 as ZUnionStoreCommandOptions, e as errors } from './zmscore-0SAuWM0q.mjs';
1
+ import { N as NumericField, a as NestedIndexSchema, H as HttpClientConfig, R as RedisOptions, b as RequesterConfig, c as Redis$1, d as Requester } from './zmscore-BpOSd5F5.mjs';
2
+ export { A as AppendCommand, B as BitCountCommand, g as BitOpCommand, h as BitPosCommand, C as CopyCommand, c5 as CreateIndexParameters, D as DBSizeCommand, j as DecrByCommand, i as DecrCommand, k as DelCommand, E as EchoCommand, m as EvalCommand, l as EvalROCommand, o as EvalshaCommand, n as EvalshaROCommand, p as ExistsCommand, s as ExpireAtCommand, q as ExpireCommand, r as ExpireOption, c7 as FlatIndexSchema, F as FlushAllCommand, t as FlushDBCommand, G as GeoAddCommand, u as GeoAddCommandOptions, w as GeoDistCommand, x as GeoHashCommand, v as GeoMember, y as GeoPosCommand, z as GeoSearchCommand, I as GeoSearchStoreCommand, K as GetBitCommand, J as GetCommand, L as GetDelCommand, M as GetExCommand, O as GetRangeCommand, Q as GetSetCommand, S as HDelCommand, T as HExistsCommand, W as HExpireAtCommand, V as HExpireCommand, X as HExpireTimeCommand, a3 as HGetAllCommand, a2 as HGetCommand, a4 as HIncrByCommand, a5 as HIncrByFloatCommand, a6 as HKeysCommand, a7 as HLenCommand, a8 as HMGetCommand, a9 as HMSetCommand, _ as HPExpireAtCommand, Z as HPExpireCommand, $ as HPExpireTimeCommand, a0 as HPTtlCommand, a1 as HPersistCommand, aa as HRandFieldCommand, ab as HScanCommand, ac as HSetCommand, ad as HSetNXCommand, ae as HStrLenCommand, Y as HTtlCommand, af as HValsCommand, ah as IncrByCommand, ai as IncrByFloatCommand, ag as IncrCommand, c6 as InferFilterFromSchema, aj as JsonArrAppendCommand, ak as JsonArrIndexCommand, al as JsonArrInsertCommand, am as JsonArrLenCommand, an as JsonArrPopCommand, ao as JsonArrTrimCommand, ap as JsonClearCommand, aq as JsonDelCommand, ar as JsonForgetCommand, as as JsonGetCommand, au as JsonMGetCommand, at as JsonMergeCommand, av as JsonNumIncrByCommand, aw as JsonNumMultByCommand, ax as JsonObjKeysCommand, ay as JsonObjLenCommand, az as JsonRespCommand, aA as JsonSetCommand, aB as JsonStrAppendCommand, aC as JsonStrLenCommand, aD as JsonToggleCommand, aE as JsonTypeCommand, aF as KeysCommand, aG as LIndexCommand, aH as LInsertCommand, aI as LLenCommand, aJ as LMoveCommand, aK as LPopCommand, aL as LPushCommand, aM as LPushXCommand, aN as LRangeCommand, aO as LRemCommand, aP as LSetCommand, aQ as LTrimCommand, aR as MGetCommand, aS as MSetCommand, aT as MSetNXCommand, aW as PExpireAtCommand, aV as PExpireCommand, aY as PSetEXCommand, aZ as PTtlCommand, aU as PersistCommand, aX as PingCommand, P as Pipeline, a_ as PublishCommand, b2 as RPopCommand, b3 as RPushCommand, b4 as RPushXCommand, a$ as RandomKeyCommand, b0 as RenameCommand, b1 as RenameNXCommand, b5 as SAddCommand, b8 as SCardCommand, bc as SDiffCommand, bd as SDiffStoreCommand, bk as SInterCommand, bl as SInterStoreCommand, bm as SIsMemberCommand, bo as SMIsMemberCommand, bn as SMembersCommand, bp as SMoveCommand, bq as SPopCommand, br as SRandMemberCommand, bs as SRemCommand, bt as SScanCommand, bv as SUnionCommand, bw as SUnionStoreCommand, b6 as ScanCommand, b7 as ScanCommandOptions, bF as ScoreMember, b9 as ScriptExistsCommand, ba as ScriptFlushCommand, bb as ScriptLoadCommand, c4 as SearchIndexParameters, bg as SetBitCommand, be as SetCommand, bf as SetCommandOptions, bh as SetExCommand, bi as SetNxCommand, bj as SetRangeCommand, bu as StrLenCommand, bx as TimeCommand, by as TouchCommand, bz as TtlCommand, bA as Type, bB as TypeCommand, bC as UnlinkCommand, U as UpstashRequest, f as UpstashResponse, bD as XAddCommand, bE as XRangeCommand, bH as ZAddCommand, bG as ZAddCommandOptions, bI as ZCardCommand, bJ as ZCountCommand, bK as ZDiffStoreCommand, bL as ZIncrByCommand, bM as ZInterStoreCommand, bN as ZInterStoreCommandOptions, bO as ZLexCountCommand, bP as ZMScoreCommand, bQ as ZPopMaxCommand, bR as ZPopMinCommand, bS as ZRangeCommand, bT as ZRangeCommandOptions, bU as ZRankCommand, bV as ZRemCommand, bW as ZRemRangeByLexCommand, bX as ZRemRangeByRankCommand, bY as ZRemRangeByScoreCommand, bZ as ZRevRankCommand, b_ as ZScanCommand, b$ as ZScoreCommand, c0 as ZUnionCommand, c1 as ZUnionCommandOptions, c2 as ZUnionStoreCommand, c3 as ZUnionStoreCommandOptions, e as errors } from './zmscore-BpOSd5F5.mjs';
3
+
4
+ type TextFieldBuild<TNoTokenize extends Record<"noTokenize", boolean>, TNoStem extends Record<"noStem", boolean>, TFrom extends Record<"from", string | null>> = TNoTokenize["noTokenize"] extends true ? {
5
+ type: "TEXT";
6
+ noTokenize: true;
7
+ } & (TNoStem["noStem"] extends true ? {
8
+ noStem: true;
9
+ } : {}) & (TFrom["from"] extends string ? {
10
+ from: TFrom["from"];
11
+ } : {}) : TNoStem["noStem"] extends true ? {
12
+ type: "TEXT";
13
+ noStem: true;
14
+ } & (TFrom["from"] extends string ? {
15
+ from: TFrom["from"];
16
+ } : {}) : TFrom["from"] extends string ? {
17
+ type: "TEXT";
18
+ from: TFrom["from"];
19
+ } : "TEXT";
20
+ declare const BUILD: unique symbol;
21
+ declare class TextFieldBuilder<TNoTokenize extends Record<"noTokenize", boolean> = {
22
+ noTokenize: false;
23
+ }, TNoStem extends Record<"noStem", boolean> = {
24
+ noStem: false;
25
+ }, TFrom extends Record<"from", string | null> = {
26
+ from: null;
27
+ }> {
28
+ private _noTokenize;
29
+ private _noStem;
30
+ private _from;
31
+ constructor(noTokenize?: TNoTokenize, noStem?: TNoStem, from?: TFrom);
32
+ noTokenize(): TextFieldBuilder<{
33
+ noTokenize: true;
34
+ }, TNoStem, TFrom>;
35
+ noStem(): TextFieldBuilder<TNoTokenize, {
36
+ noStem: true;
37
+ }, TFrom>;
38
+ from(field: string): TextFieldBuilder<TNoTokenize, TNoStem, {
39
+ from: string;
40
+ }>;
41
+ [BUILD](): TextFieldBuild<TNoTokenize, TNoStem, TFrom>;
42
+ }
43
+ declare class NumericFieldBuilder<T extends NumericField["type"], TFrom extends Record<"from", string | null> = {
44
+ from: null;
45
+ }> {
46
+ private type;
47
+ private _from;
48
+ constructor(type: T, from?: TFrom);
49
+ from(field: string): NumericFieldBuilder<T, {
50
+ from: string;
51
+ }>;
52
+ [BUILD](): TFrom["from"] extends string ? {
53
+ type: T;
54
+ fast: true;
55
+ from: TFrom["from"];
56
+ } : {
57
+ type: T;
58
+ fast: true;
59
+ };
60
+ }
61
+ declare class BoolFieldBuilder<Fast extends Record<"fast", boolean> = {
62
+ fast: false;
63
+ }, TFrom extends Record<"from", string | null> = {
64
+ from: null;
65
+ }> {
66
+ private _fast;
67
+ private _from;
68
+ constructor(fast?: Fast, from?: TFrom);
69
+ fast(): BoolFieldBuilder<{
70
+ fast: true;
71
+ }, TFrom>;
72
+ from(field: string): BoolFieldBuilder<Fast, {
73
+ from: string;
74
+ }>;
75
+ [BUILD](): Fast extends {
76
+ fast: true;
77
+ } ? TFrom["from"] extends string ? {
78
+ type: "BOOL";
79
+ fast: true;
80
+ from: TFrom["from"];
81
+ } : {
82
+ type: "BOOL";
83
+ fast: true;
84
+ } : TFrom["from"] extends string ? {
85
+ type: "BOOL";
86
+ from: TFrom["from"];
87
+ } : "BOOL";
88
+ }
89
+ declare class DateFieldBuilder<Fast extends Record<"fast", boolean> = {
90
+ fast: false;
91
+ }, TFrom extends Record<"from", string | null> = {
92
+ from: null;
93
+ }> {
94
+ private _fast;
95
+ private _from;
96
+ constructor(fast?: Fast, from?: TFrom);
97
+ fast(): DateFieldBuilder<{
98
+ fast: true;
99
+ }, TFrom>;
100
+ from(field: string): DateFieldBuilder<Fast, {
101
+ from: string;
102
+ }>;
103
+ [BUILD](): Fast extends {
104
+ fast: true;
105
+ } ? TFrom["from"] extends string ? {
106
+ type: "DATE";
107
+ fast: true;
108
+ from: TFrom["from"];
109
+ } : {
110
+ type: "DATE";
111
+ fast: true;
112
+ } : TFrom["from"] extends string ? {
113
+ type: "DATE";
114
+ from: TFrom["from"];
115
+ } : "DATE";
116
+ }
117
+ type FieldBuilder = TextFieldBuilder<{
118
+ noTokenize: boolean;
119
+ }, {
120
+ noStem: boolean;
121
+ }, {
122
+ from: string | null;
123
+ }> | NumericFieldBuilder<NumericField["type"], {
124
+ from: string | null;
125
+ }> | BoolFieldBuilder<{
126
+ fast: boolean;
127
+ }, {
128
+ from: string | null;
129
+ }> | DateFieldBuilder<{
130
+ fast: boolean;
131
+ }, {
132
+ from: string | null;
133
+ }>;
134
+ declare const s: {
135
+ string(): TextFieldBuilder;
136
+ number<T extends NumericField["type"] = "F64">(type?: T): NumericFieldBuilder<T>;
137
+ boolean(): BoolFieldBuilder;
138
+ date(): DateFieldBuilder;
139
+ object<T extends ObjectFieldRecord<T>>(fields: T): { [K in keyof T]: T[K] extends FieldBuilder ? ReturnType<T[K][typeof BUILD]> : T[K]; };
140
+ };
141
+ type ObjectFieldRecord<T> = {
142
+ [K in keyof T]: K extends string ? K extends `${infer _}.${infer _}` ? never : T[K] extends FieldBuilder | NestedIndexSchema ? T[K] : never : never;
143
+ };
3
144
 
4
145
  /**
5
146
  * Connection credentials for upstash redis.
@@ -78,4 +219,4 @@ declare class Redis extends Redis$1 {
78
219
  static fromEnv(config?: Omit<RedisConfigNodejs, "url" | "token">): Redis;
79
220
  }
80
221
 
81
- export { Redis, type RedisConfigNodejs, Requester };
222
+ export { NestedIndexSchema, Redis, type RedisConfigNodejs, Requester, s };
package/nodejs.d.ts CHANGED
@@ -1,5 +1,146 @@
1
- import { H as HttpClientConfig, R as RedisOptions, a as RequesterConfig, b as Redis$1, c as Requester } from './zmscore-0SAuWM0q.js';
2
- export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, l as EvalCommand, k as EvalROCommand, n as EvalshaCommand, m as EvalshaROCommand, o as ExistsCommand, r as ExpireAtCommand, p as ExpireCommand, q as ExpireOption, F as FlushAllCommand, s as FlushDBCommand, G as GeoAddCommand, t as GeoAddCommandOptions, v as GeoDistCommand, w as GeoHashCommand, u as GeoMember, x as GeoPosCommand, y as GeoSearchCommand, z as GeoSearchStoreCommand, J as GetBitCommand, I as GetCommand, K as GetDelCommand, L as GetExCommand, M as GetRangeCommand, N as GetSetCommand, O as HDelCommand, Q as HExistsCommand, T as HExpireAtCommand, S as HExpireCommand, V as HExpireTimeCommand, a1 as HGetAllCommand, a0 as HGetCommand, a2 as HIncrByCommand, a3 as HIncrByFloatCommand, a4 as HKeysCommand, a5 as HLenCommand, a6 as HMGetCommand, a7 as HMSetCommand, Y as HPExpireAtCommand, X as HPExpireCommand, Z as HPExpireTimeCommand, _ as HPTtlCommand, $ as HPersistCommand, a8 as HRandFieldCommand, a9 as HScanCommand, aa as HSetCommand, ab as HSetNXCommand, ac as HStrLenCommand, W as HTtlCommand, ad as HValsCommand, af as IncrByCommand, ag as IncrByFloatCommand, ae as IncrCommand, ah as JsonArrAppendCommand, ai as JsonArrIndexCommand, aj as JsonArrInsertCommand, ak as JsonArrLenCommand, al as JsonArrPopCommand, am as JsonArrTrimCommand, an as JsonClearCommand, ao as JsonDelCommand, ap as JsonForgetCommand, aq as JsonGetCommand, as as JsonMGetCommand, ar as JsonMergeCommand, at as JsonNumIncrByCommand, au as JsonNumMultByCommand, av as JsonObjKeysCommand, aw as JsonObjLenCommand, ax as JsonRespCommand, ay as JsonSetCommand, az as JsonStrAppendCommand, aA as JsonStrLenCommand, aB as JsonToggleCommand, aC as JsonTypeCommand, aD as KeysCommand, aE as LIndexCommand, aF as LInsertCommand, aG as LLenCommand, aH as LMoveCommand, aI as LPopCommand, aJ as LPushCommand, aK as LPushXCommand, aL as LRangeCommand, aM as LRemCommand, aN as LSetCommand, aO as LTrimCommand, aP as MGetCommand, aQ as MSetCommand, aR as MSetNXCommand, aU as PExpireAtCommand, aT as PExpireCommand, aW as PSetEXCommand, aX as PTtlCommand, aS as PersistCommand, aV as PingCommand, P as Pipeline, aY as PublishCommand, b0 as RPopCommand, b1 as RPushCommand, b2 as RPushXCommand, aZ as RandomKeyCommand, a_ as RenameCommand, a$ as RenameNXCommand, b3 as SAddCommand, b6 as SCardCommand, ba as SDiffCommand, bb as SDiffStoreCommand, bi as SInterCommand, bj as SInterStoreCommand, bk as SIsMemberCommand, bm as SMIsMemberCommand, bl as SMembersCommand, bn as SMoveCommand, bo as SPopCommand, bp as SRandMemberCommand, bq as SRemCommand, br as SScanCommand, bt as SUnionCommand, bu as SUnionStoreCommand, b4 as ScanCommand, b5 as ScanCommandOptions, bD as ScoreMember, b7 as ScriptExistsCommand, b8 as ScriptFlushCommand, b9 as ScriptLoadCommand, be as SetBitCommand, bc as SetCommand, bd as SetCommandOptions, bf as SetExCommand, bg as SetNxCommand, bh as SetRangeCommand, bs as StrLenCommand, bv as TimeCommand, bw as TouchCommand, bx as TtlCommand, by as Type, bz as TypeCommand, bA as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bB as XAddCommand, bC as XRangeCommand, bF as ZAddCommand, bE as ZAddCommandOptions, bG as ZCardCommand, bH as ZCountCommand, bI as ZDiffStoreCommand, bJ as ZIncrByCommand, bK as ZInterStoreCommand, bL as ZInterStoreCommandOptions, bM as ZLexCountCommand, bN as ZMScoreCommand, bO as ZPopMaxCommand, bP as ZPopMinCommand, bQ as ZRangeCommand, bR as ZRangeCommandOptions, bS as ZRankCommand, bT as ZRemCommand, bU as ZRemRangeByLexCommand, bV as ZRemRangeByRankCommand, bW as ZRemRangeByScoreCommand, bX as ZRevRankCommand, bY as ZScanCommand, bZ as ZScoreCommand, b_ as ZUnionCommand, b$ as ZUnionCommandOptions, c0 as ZUnionStoreCommand, c1 as ZUnionStoreCommandOptions, e as errors } from './zmscore-0SAuWM0q.js';
1
+ import { N as NumericField, a as NestedIndexSchema, H as HttpClientConfig, R as RedisOptions, b as RequesterConfig, c as Redis$1, d as Requester } from './zmscore-BpOSd5F5.js';
2
+ export { A as AppendCommand, B as BitCountCommand, g as BitOpCommand, h as BitPosCommand, C as CopyCommand, c5 as CreateIndexParameters, D as DBSizeCommand, j as DecrByCommand, i as DecrCommand, k as DelCommand, E as EchoCommand, m as EvalCommand, l as EvalROCommand, o as EvalshaCommand, n as EvalshaROCommand, p as ExistsCommand, s as ExpireAtCommand, q as ExpireCommand, r as ExpireOption, c7 as FlatIndexSchema, F as FlushAllCommand, t as FlushDBCommand, G as GeoAddCommand, u as GeoAddCommandOptions, w as GeoDistCommand, x as GeoHashCommand, v as GeoMember, y as GeoPosCommand, z as GeoSearchCommand, I as GeoSearchStoreCommand, K as GetBitCommand, J as GetCommand, L as GetDelCommand, M as GetExCommand, O as GetRangeCommand, Q as GetSetCommand, S as HDelCommand, T as HExistsCommand, W as HExpireAtCommand, V as HExpireCommand, X as HExpireTimeCommand, a3 as HGetAllCommand, a2 as HGetCommand, a4 as HIncrByCommand, a5 as HIncrByFloatCommand, a6 as HKeysCommand, a7 as HLenCommand, a8 as HMGetCommand, a9 as HMSetCommand, _ as HPExpireAtCommand, Z as HPExpireCommand, $ as HPExpireTimeCommand, a0 as HPTtlCommand, a1 as HPersistCommand, aa as HRandFieldCommand, ab as HScanCommand, ac as HSetCommand, ad as HSetNXCommand, ae as HStrLenCommand, Y as HTtlCommand, af as HValsCommand, ah as IncrByCommand, ai as IncrByFloatCommand, ag as IncrCommand, c6 as InferFilterFromSchema, aj as JsonArrAppendCommand, ak as JsonArrIndexCommand, al as JsonArrInsertCommand, am as JsonArrLenCommand, an as JsonArrPopCommand, ao as JsonArrTrimCommand, ap as JsonClearCommand, aq as JsonDelCommand, ar as JsonForgetCommand, as as JsonGetCommand, au as JsonMGetCommand, at as JsonMergeCommand, av as JsonNumIncrByCommand, aw as JsonNumMultByCommand, ax as JsonObjKeysCommand, ay as JsonObjLenCommand, az as JsonRespCommand, aA as JsonSetCommand, aB as JsonStrAppendCommand, aC as JsonStrLenCommand, aD as JsonToggleCommand, aE as JsonTypeCommand, aF as KeysCommand, aG as LIndexCommand, aH as LInsertCommand, aI as LLenCommand, aJ as LMoveCommand, aK as LPopCommand, aL as LPushCommand, aM as LPushXCommand, aN as LRangeCommand, aO as LRemCommand, aP as LSetCommand, aQ as LTrimCommand, aR as MGetCommand, aS as MSetCommand, aT as MSetNXCommand, aW as PExpireAtCommand, aV as PExpireCommand, aY as PSetEXCommand, aZ as PTtlCommand, aU as PersistCommand, aX as PingCommand, P as Pipeline, a_ as PublishCommand, b2 as RPopCommand, b3 as RPushCommand, b4 as RPushXCommand, a$ as RandomKeyCommand, b0 as RenameCommand, b1 as RenameNXCommand, b5 as SAddCommand, b8 as SCardCommand, bc as SDiffCommand, bd as SDiffStoreCommand, bk as SInterCommand, bl as SInterStoreCommand, bm as SIsMemberCommand, bo as SMIsMemberCommand, bn as SMembersCommand, bp as SMoveCommand, bq as SPopCommand, br as SRandMemberCommand, bs as SRemCommand, bt as SScanCommand, bv as SUnionCommand, bw as SUnionStoreCommand, b6 as ScanCommand, b7 as ScanCommandOptions, bF as ScoreMember, b9 as ScriptExistsCommand, ba as ScriptFlushCommand, bb as ScriptLoadCommand, c4 as SearchIndexParameters, bg as SetBitCommand, be as SetCommand, bf as SetCommandOptions, bh as SetExCommand, bi as SetNxCommand, bj as SetRangeCommand, bu as StrLenCommand, bx as TimeCommand, by as TouchCommand, bz as TtlCommand, bA as Type, bB as TypeCommand, bC as UnlinkCommand, U as UpstashRequest, f as UpstashResponse, bD as XAddCommand, bE as XRangeCommand, bH as ZAddCommand, bG as ZAddCommandOptions, bI as ZCardCommand, bJ as ZCountCommand, bK as ZDiffStoreCommand, bL as ZIncrByCommand, bM as ZInterStoreCommand, bN as ZInterStoreCommandOptions, bO as ZLexCountCommand, bP as ZMScoreCommand, bQ as ZPopMaxCommand, bR as ZPopMinCommand, bS as ZRangeCommand, bT as ZRangeCommandOptions, bU as ZRankCommand, bV as ZRemCommand, bW as ZRemRangeByLexCommand, bX as ZRemRangeByRankCommand, bY as ZRemRangeByScoreCommand, bZ as ZRevRankCommand, b_ as ZScanCommand, b$ as ZScoreCommand, c0 as ZUnionCommand, c1 as ZUnionCommandOptions, c2 as ZUnionStoreCommand, c3 as ZUnionStoreCommandOptions, e as errors } from './zmscore-BpOSd5F5.js';
3
+
4
+ type TextFieldBuild<TNoTokenize extends Record<"noTokenize", boolean>, TNoStem extends Record<"noStem", boolean>, TFrom extends Record<"from", string | null>> = TNoTokenize["noTokenize"] extends true ? {
5
+ type: "TEXT";
6
+ noTokenize: true;
7
+ } & (TNoStem["noStem"] extends true ? {
8
+ noStem: true;
9
+ } : {}) & (TFrom["from"] extends string ? {
10
+ from: TFrom["from"];
11
+ } : {}) : TNoStem["noStem"] extends true ? {
12
+ type: "TEXT";
13
+ noStem: true;
14
+ } & (TFrom["from"] extends string ? {
15
+ from: TFrom["from"];
16
+ } : {}) : TFrom["from"] extends string ? {
17
+ type: "TEXT";
18
+ from: TFrom["from"];
19
+ } : "TEXT";
20
+ declare const BUILD: unique symbol;
21
+ declare class TextFieldBuilder<TNoTokenize extends Record<"noTokenize", boolean> = {
22
+ noTokenize: false;
23
+ }, TNoStem extends Record<"noStem", boolean> = {
24
+ noStem: false;
25
+ }, TFrom extends Record<"from", string | null> = {
26
+ from: null;
27
+ }> {
28
+ private _noTokenize;
29
+ private _noStem;
30
+ private _from;
31
+ constructor(noTokenize?: TNoTokenize, noStem?: TNoStem, from?: TFrom);
32
+ noTokenize(): TextFieldBuilder<{
33
+ noTokenize: true;
34
+ }, TNoStem, TFrom>;
35
+ noStem(): TextFieldBuilder<TNoTokenize, {
36
+ noStem: true;
37
+ }, TFrom>;
38
+ from(field: string): TextFieldBuilder<TNoTokenize, TNoStem, {
39
+ from: string;
40
+ }>;
41
+ [BUILD](): TextFieldBuild<TNoTokenize, TNoStem, TFrom>;
42
+ }
43
+ declare class NumericFieldBuilder<T extends NumericField["type"], TFrom extends Record<"from", string | null> = {
44
+ from: null;
45
+ }> {
46
+ private type;
47
+ private _from;
48
+ constructor(type: T, from?: TFrom);
49
+ from(field: string): NumericFieldBuilder<T, {
50
+ from: string;
51
+ }>;
52
+ [BUILD](): TFrom["from"] extends string ? {
53
+ type: T;
54
+ fast: true;
55
+ from: TFrom["from"];
56
+ } : {
57
+ type: T;
58
+ fast: true;
59
+ };
60
+ }
61
+ declare class BoolFieldBuilder<Fast extends Record<"fast", boolean> = {
62
+ fast: false;
63
+ }, TFrom extends Record<"from", string | null> = {
64
+ from: null;
65
+ }> {
66
+ private _fast;
67
+ private _from;
68
+ constructor(fast?: Fast, from?: TFrom);
69
+ fast(): BoolFieldBuilder<{
70
+ fast: true;
71
+ }, TFrom>;
72
+ from(field: string): BoolFieldBuilder<Fast, {
73
+ from: string;
74
+ }>;
75
+ [BUILD](): Fast extends {
76
+ fast: true;
77
+ } ? TFrom["from"] extends string ? {
78
+ type: "BOOL";
79
+ fast: true;
80
+ from: TFrom["from"];
81
+ } : {
82
+ type: "BOOL";
83
+ fast: true;
84
+ } : TFrom["from"] extends string ? {
85
+ type: "BOOL";
86
+ from: TFrom["from"];
87
+ } : "BOOL";
88
+ }
89
+ declare class DateFieldBuilder<Fast extends Record<"fast", boolean> = {
90
+ fast: false;
91
+ }, TFrom extends Record<"from", string | null> = {
92
+ from: null;
93
+ }> {
94
+ private _fast;
95
+ private _from;
96
+ constructor(fast?: Fast, from?: TFrom);
97
+ fast(): DateFieldBuilder<{
98
+ fast: true;
99
+ }, TFrom>;
100
+ from(field: string): DateFieldBuilder<Fast, {
101
+ from: string;
102
+ }>;
103
+ [BUILD](): Fast extends {
104
+ fast: true;
105
+ } ? TFrom["from"] extends string ? {
106
+ type: "DATE";
107
+ fast: true;
108
+ from: TFrom["from"];
109
+ } : {
110
+ type: "DATE";
111
+ fast: true;
112
+ } : TFrom["from"] extends string ? {
113
+ type: "DATE";
114
+ from: TFrom["from"];
115
+ } : "DATE";
116
+ }
117
+ type FieldBuilder = TextFieldBuilder<{
118
+ noTokenize: boolean;
119
+ }, {
120
+ noStem: boolean;
121
+ }, {
122
+ from: string | null;
123
+ }> | NumericFieldBuilder<NumericField["type"], {
124
+ from: string | null;
125
+ }> | BoolFieldBuilder<{
126
+ fast: boolean;
127
+ }, {
128
+ from: string | null;
129
+ }> | DateFieldBuilder<{
130
+ fast: boolean;
131
+ }, {
132
+ from: string | null;
133
+ }>;
134
+ declare const s: {
135
+ string(): TextFieldBuilder;
136
+ number<T extends NumericField["type"] = "F64">(type?: T): NumericFieldBuilder<T>;
137
+ boolean(): BoolFieldBuilder;
138
+ date(): DateFieldBuilder;
139
+ object<T extends ObjectFieldRecord<T>>(fields: T): { [K in keyof T]: T[K] extends FieldBuilder ? ReturnType<T[K][typeof BUILD]> : T[K]; };
140
+ };
141
+ type ObjectFieldRecord<T> = {
142
+ [K in keyof T]: K extends string ? K extends `${infer _}.${infer _}` ? never : T[K] extends FieldBuilder | NestedIndexSchema ? T[K] : never : never;
143
+ };
3
144
 
4
145
  /**
5
146
  * Connection credentials for upstash redis.
@@ -78,4 +219,4 @@ declare class Redis extends Redis$1 {
78
219
  static fromEnv(config?: Omit<RedisConfigNodejs, "url" | "token">): Redis;
79
220
  }
80
221
 
81
- export { Redis, type RedisConfigNodejs, Requester };
222
+ export { NestedIndexSchema, Redis, type RedisConfigNodejs, Requester, s };