@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/{chunk-LLI2WIYN.mjs → chunk-PDHDP2I5.mjs} +297 -207
- package/cloudflare.d.mts +2 -2
- package/cloudflare.d.ts +2 -2
- package/cloudflare.js +308 -222
- package/cloudflare.mjs +10 -14
- package/fastly.d.mts +2 -2
- package/fastly.d.ts +2 -2
- package/fastly.js +299 -209
- package/fastly.mjs +1 -1
- package/nodejs.d.mts +144 -3
- package/nodejs.d.ts +144 -3
- package/nodejs.js +464 -221
- package/nodejs.mjs +160 -8
- package/package.json +1 -1
- package/{zmscore-0SAuWM0q.d.mts → zmscore-BpOSd5F5.d.mts} +347 -126
- package/{zmscore-0SAuWM0q.d.ts → zmscore-BpOSd5F5.d.ts} +347 -126
package/nodejs.d.mts
CHANGED
|
@@ -1,5 +1,146 @@
|
|
|
1
|
-
import { H as HttpClientConfig, R as RedisOptions,
|
|
2
|
-
export { A as AppendCommand, B as BitCountCommand,
|
|
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,
|
|
2
|
-
export { A as AppendCommand, B as BitCountCommand,
|
|
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 };
|