import { cJ as NumericField, cK as NestedIndexSchema, R as Redis$1, H as HttpClientConfig, a as RedisOptions, b as RequesterConfig, bv as Requester } from './error-DOszGRxg.mjs'; export { A as AppendCommand, c as ArCountCommand, d as ArDelCommand, e as ArDelRangeCommand, f as ArGetCommand, g as ArGetRangeCommand, h as ArGrepCommand, i as ArGrepOptions, j as ArGrepPredicate, k as ArGrepResult, l as ArInfoCommand, m as ArInfoOptions, n as ArInfoResult, o as ArInsertCommand, p as ArLastItemsCommand, q as ArLastItemsOptions, r as ArLenCommand, s as ArMGetCommand, t as ArMSetCommand, u as ArMSetValues, v as ArNextCommand, w as ArOpCommand, x as ArOpOperation, y as ArRingCommand, z as ArScanCommand, B as ArScanOptions, C as ArSeekCommand, D as ArSetCommand, E as BitCountCommand, F as BitOpCommand, G as BitPosCommand, I as ClientSetInfoAttribute, J as ClientSetInfoCommand, K as CopyCommand, cL as CreateIndexParameters, cM as CreateVectorIndexParameters, L as DBSizeCommand, M as DecrByCommand, N as DecrCommand, O as DelCommand, P as EchoCommand, Q as EvalCommand, S as EvalROCommand, T as EvalshaCommand, U as EvalshaROCommand, V as ExistsCommand, W as ExpireAtCommand, X as ExpireCommand, Y as ExpireOption, cN as FlatIndexSchema, Z as FlushAllCommand, _ as FlushDBCommand, $ as GeoAddCommand, a0 as GeoAddCommandOptions, a1 as GeoDistCommand, a2 as GeoHashCommand, a3 as GeoMember, a4 as GeoPosCommand, a5 as GeoSearchCommand, a6 as GeoSearchStoreCommand, a7 as GetBitCommand, a8 as GetCommand, a9 as GetDelCommand, aa as GetExCommand, ab as GetRangeCommand, ac as GetSetCommand, ad as HDelCommand, ae as HExistsCommand, af as HExpireAtCommand, ag as HExpireCommand, ah as HExpireTimeCommand, ai as HGetAllCommand, aj as HGetCommand, ak as HGetDelCommand, al as HGetExCommand, am as HIncrByCommand, an as HIncrByFloatCommand, ao as HKeysCommand, ap as HLenCommand, aq as HMGetCommand, ar as HMSetCommand, as as HPExpireAtCommand, at as HPExpireCommand, au as HPExpireTimeCommand, av as HPTtlCommand, aw as HPersistCommand, ax as HRandFieldCommand, ay as HScanCommand, az as HSetCommand, aA as HSetExCommand, aB as HSetNXCommand, aC as HStrLenCommand, aD as HTtlCommand, aE as HValsCommand, aF as IncrByCommand, aG as IncrByFloatCommand, aH as IncrCommand, cO as InferFilterFromSchema, aI as JsonArrAppendCommand, aJ as JsonArrIndexCommand, aK as JsonArrInsertCommand, aL as JsonArrLenCommand, aM as JsonArrPopCommand, aN as JsonArrTrimCommand, aO as JsonClearCommand, aP as JsonDelCommand, aQ as JsonForgetCommand, aR as JsonGetCommand, aS as JsonMGetCommand, aT as JsonMergeCommand, aU as JsonNumIncrByCommand, aV as JsonNumMultByCommand, aW as JsonObjKeysCommand, aX as JsonObjLenCommand, aY as JsonRespCommand, aZ as JsonSetCommand, a_ as JsonStrAppendCommand, a$ as JsonStrLenCommand, b0 as JsonToggleCommand, b1 as JsonTypeCommand, b2 as KeysCommand, b3 as LIndexCommand, b4 as LInsertCommand, b5 as LLenCommand, b6 as LMoveCommand, b7 as LPopCommand, b8 as LPushCommand, b9 as LPushXCommand, ba as LRangeCommand, bb as LRemCommand, bc as LSetCommand, bd as LTrimCommand, be as MGetCommand, bf as MSetCommand, bg as MSetNXCommand, bh as PExpireAtCommand, bi as PExpireCommand, bj as PSetEXCommand, bk as PTtlCommand, bl as PersistCommand, bm as PingCommand, bn as Pipeline, bo as PublishCommand, cP as QueryResult, bp as RPopCommand, bq as RPushCommand, br as RPushXCommand, bs as RandomKeyCommand, bt as RenameCommand, bu as RenameNXCommand, bw as SAddCommand, bx as SCardCommand, by as SDiffCommand, bz as SDiffStoreCommand, bA as SInterCardCommand, bB as SInterCommand, bC as SInterStoreCommand, bD as SIsMemberCommand, bE as SMIsMemberCommand, bF as SMembersCommand, bG as SMoveCommand, bH as SPopCommand, bI as SRandMemberCommand, bJ as SRemCommand, bK as SScanCommand, bL as SUnionCommand, bM as SUnionStoreCommand, bN as ScanCommand, bO as ScanCommandOptions, bP as ScoreMember, bQ as ScriptExistsCommand, bR as ScriptFlushCommand, bS as ScriptLoadCommand, cQ as SearchIndex, cR as SearchIndexParameters, bT as SetBitCommand, bU as SetCommand, bV as SetCommandOptions, bW as SetExCommand, bX as SetNxCommand, bY as SetRangeCommand, bZ as StrLenCommand, b_ as TimeCommand, b$ as TouchCommand, c0 as TtlCommand, c1 as Type, c2 as TypeCommand, c3 as UnlinkCommand, c4 as UpstashRequest, c5 as UpstashResponse, c6 as VectorAddCommand, c7 as VectorCountCommand, c8 as VectorCreateCommand, cS as VectorCreateOptions, c9 as VectorDelCommand, ca as VectorDropCommand, cb as VectorGetCommand, cT as VectorIndex, cU as VectorIndexInfo, cV as VectorIndexParameters, cc as VectorInfoCommand, cW as VectorInput, cX as VectorMetric, cd as VectorQueryCommand, cY as VectorQueryOptions, cZ as VectorQueryProfile, c_ as VectorQueryResult, ce as XAckDelCommand, cf as XAddCommand, cg as XDelExCommand, ch as XRangeCommand, ci as ZAddCommand, cj as ZAddCommandOptions, ck as ZCardCommand, cl as ZCountCommand, cm as ZDiffStoreCommand, cn as ZIncrByCommand, co as ZInterStoreCommand, cp as ZInterStoreCommandOptions, cq as ZLexCountCommand, cr as ZMScoreCommand, cs as ZPopMaxCommand, ct as ZPopMinCommand, cu as ZRangeCommand, cv as ZRangeCommandOptions, cw as ZRankCommand, cx as ZRemCommand, cy as ZRemRangeByLexCommand, cz as ZRemRangeByRankCommand, cA as ZRemRangeByScoreCommand, cB as ZRevRankCommand, cC as ZScanCommand, cD as ZScoreCommand, cE as ZUnionCommand, cF as ZUnionCommandOptions, cG as ZUnionStoreCommand, cH as ZUnionStoreCommandOptions, cI as errors } from './error-DOszGRxg.mjs'; type TextFieldBuild, TNoStem extends Record<"noStem", boolean>, TFrom extends Record<"from", string | null>> = TNoTokenize["noTokenize"] extends true ? { type: "TEXT"; noTokenize: true; } & (TNoStem["noStem"] extends true ? { noStem: true; } : {}) & (TFrom["from"] extends string ? { from: TFrom["from"]; } : {}) : TNoStem["noStem"] extends true ? { type: "TEXT"; noStem: true; } & (TFrom["from"] extends string ? { from: TFrom["from"]; } : {}) : TFrom["from"] extends string ? { type: "TEXT"; from: TFrom["from"]; } : { type: "TEXT"; }; declare const BUILD: unique symbol; declare class TextFieldBuilder = { noTokenize: false; }, TNoStem extends Record<"noStem", boolean> = { noStem: false; }, TFrom extends Record<"from", string | null> = { from: null; }> { private _noTokenize; private _noStem; private _from; constructor(noTokenize?: TNoTokenize, noStem?: TNoStem, from?: TFrom); noTokenize(): TextFieldBuilder<{ noTokenize: true; }, TNoStem, TFrom>; noStem(): TextFieldBuilder; from(field: string): TextFieldBuilder; [BUILD](): TextFieldBuild; } declare class NumericFieldBuilder = { from: null; }> { private type; private _from; constructor(type: T, from?: TFrom); from(field: string): NumericFieldBuilder; [BUILD](): TFrom["from"] extends string ? { type: T; fast: true; from: TFrom["from"]; } : { type: T; fast: true; }; } declare class BoolFieldBuilder = { fast: false; }, TFrom extends Record<"from", string | null> = { from: null; }> { private _fast; private _from; constructor(fast?: Fast, from?: TFrom); fast(): BoolFieldBuilder<{ fast: true; }, TFrom>; from(field: string): BoolFieldBuilder; [BUILD](): Fast extends { fast: true; } ? TFrom["from"] extends string ? { type: "BOOL"; fast: true; from: TFrom["from"]; } : { type: "BOOL"; fast: true; } : TFrom["from"] extends string ? { type: "BOOL"; from: TFrom["from"]; } : { type: "BOOL"; }; } declare class DateFieldBuilder = { fast: false; }, TFrom extends Record<"from", string | null> = { from: null; }> { private _fast; private _from; constructor(fast?: Fast, from?: TFrom); fast(): DateFieldBuilder<{ fast: true; }, TFrom>; from(field: string): DateFieldBuilder; [BUILD](): Fast extends { fast: true; } ? TFrom["from"] extends string ? { type: "DATE"; fast: true; from: TFrom["from"]; } : { type: "DATE"; fast: true; } : TFrom["from"] extends string ? { type: "DATE"; from: TFrom["from"]; } : { type: "DATE"; }; } declare class KeywordFieldBuilder { [BUILD](): { type: "KEYWORD"; }; } declare class FacetFieldBuilder { [BUILD](): { type: "FACET"; }; } type FieldBuilder = TextFieldBuilder<{ noTokenize: boolean; }, { noStem: boolean; }, { from: string | null; }> | NumericFieldBuilder | BoolFieldBuilder<{ fast: boolean; }, { from: string | null; }> | DateFieldBuilder<{ fast: boolean; }, { from: string | null; }> | KeywordFieldBuilder | FacetFieldBuilder; declare const s: { string(): TextFieldBuilder; number(type?: T): NumericFieldBuilder; boolean(): BoolFieldBuilder; date(): DateFieldBuilder; keyword(): KeywordFieldBuilder; facet(): FacetFieldBuilder; object>(fields: T): { [K in keyof T]: T[K] extends FieldBuilder ? ReturnType : T[K]; }; }; type ObjectFieldRecord = { [K in keyof T]: K extends string ? K extends `${infer _}.${infer _}` ? never : T[K] extends FieldBuilder | NestedIndexSchema ? T[K] : never : never; }; /** * Connection credentials for upstash redis. * Get them from https://console.upstash.com/redis/ */ type RedisConfigNodejs = { /** * UPSTASH_REDIS_REST_URL */ url: string | undefined; /** * UPSTASH_REDIS_REST_TOKEN */ token: string | undefined; /** * An agent allows you to reuse connections to reduce latency for multiple sequential requests. * * This is a node specific implementation and is not supported in various runtimes like Vercel * edge functions. * * @example * ```ts * import https from "https" * * const options: RedisConfigNodejs = { * agent: new https.Agent({ keepAlive: true }) * } * ``` */ /** * The signal will allow aborting requests on the fly. * For more check: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal */ signal?: HttpClientConfig["signal"]; latencyLogging?: boolean; agent?: unknown; keepAlive?: boolean; /** * When this flag is enabled, any subsequent commands issued by this client are guaranteed to observe the effects of all earlier writes submitted by the same client. */ readYourWrites?: boolean; } & RedisOptions & RequesterConfig; /** * Serverless redis client for upstash. */ declare class Redis extends Redis$1 { /** * Create a new redis client by providing the url and token * * @example * ```typescript * const redis = new Redis({ * url: "", * token: "", * }); * ``` */ constructor(config: RedisConfigNodejs); /** * Create a new redis client by providing a custom `Requester` implementation */ constructor(requester: Requester); /** * Create a new Upstash Redis instance from environment variables. * * Use this to automatically load connection secrets from your environment * variables. For instance when using the Vercel integration. * * This tries to load connection details from your environment using `process.env`: * - URL: `UPSTASH_REDIS_REST_URL` or fallback to `KV_REST_API_URL` * - Token: `UPSTASH_REDIS_REST_TOKEN` or fallback to `KV_REST_API_TOKEN` * * The fallback variables provide compatibility with Vercel KV and other platforms * that may use different naming conventions. */ static fromEnv(config?: Omit): Redis; } export { NestedIndexSchema, Redis, type RedisConfigNodejs, Requester, s };