@upstash/redis 1.36.0-rc.3 → 1.36.0-rc.5

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/fastly.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Redis,
4
4
  VERSION,
5
5
  error_exports
6
- } from "./chunk-2HN5OIX5.mjs";
6
+ } from "./chunk-2NDFGHFZ.mjs";
7
7
 
8
8
  // platforms/fastly.ts
9
9
  var Redis2 = class extends Redis {
package/nodejs.d.mts CHANGED
@@ -1,5 +1,5 @@
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-DQw_6S0p.mjs';
2
- export { A as AppendCommand, B as BitCountCommand, g as BitOpCommand, h as BitPosCommand, C as CopyCommand, 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, c8 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, 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, c6 as SearchIndexProps, 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, c4 as createIndex, c7 as createIndexProps, e as errors, c5 as index } from './zmscore-DQw_6S0p.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-DtGaZZXE.mjs';
2
+ export { A as AppendCommand, B as BitCountCommand, g as BitOpCommand, h as BitPosCommand, C as CopyCommand, 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, c8 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, 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, c6 as SearchIndexProps, 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, c4 as createIndex, c7 as createIndexProps, e as errors, c5 as index } from './zmscore-DtGaZZXE.mjs';
3
3
 
4
4
  declare const BUILD: unique symbol;
5
5
  declare class TextFieldBuilder<NoTokenize extends Record<"noTokenize", boolean> = {
package/nodejs.d.ts CHANGED
@@ -1,5 +1,5 @@
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-DQw_6S0p.js';
2
- export { A as AppendCommand, B as BitCountCommand, g as BitOpCommand, h as BitPosCommand, C as CopyCommand, 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, c8 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, 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, c6 as SearchIndexProps, 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, c4 as createIndex, c7 as createIndexProps, e as errors, c5 as index } from './zmscore-DQw_6S0p.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-DtGaZZXE.js';
2
+ export { A as AppendCommand, B as BitCountCommand, g as BitOpCommand, h as BitPosCommand, C as CopyCommand, 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, c8 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, 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, c6 as SearchIndexProps, 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, c4 as createIndex, c7 as createIndexProps, e as errors, c5 as index } from './zmscore-DtGaZZXE.js';
3
3
 
4
4
  declare const BUILD: unique symbol;
5
5
  declare class TextFieldBuilder<NoTokenize extends Record<"noTokenize", boolean> = {
package/nodejs.js CHANGED
@@ -2529,98 +2529,92 @@ function flattenSchema(schema, pathPrefix = []) {
2529
2529
  }
2530
2530
  return fields;
2531
2531
  }
2532
- function deserializeQueryResponse(rawResponse, options) {
2533
- const hasEmptySelect = options?.select && Object.keys(options.select).length === 0;
2532
+ function deserializeQueryResponse(rawResponse) {
2534
2533
  return rawResponse.map((itemRaw) => {
2535
2534
  const raw = itemRaw;
2536
2535
  const key = raw[0];
2537
2536
  const score = raw[1];
2538
2537
  const rawFields = raw[2];
2539
- if (hasEmptySelect) {
2538
+ if (rawFields === void 0) {
2540
2539
  return { key, score };
2541
2540
  }
2542
2541
  if (!Array.isArray(rawFields) || rawFields.length === 0) {
2543
2542
  return { key, score, data: {} };
2544
2543
  }
2545
- const mergedFields = {};
2544
+ let data = {};
2546
2545
  for (const fieldRaw of rawFields) {
2547
- const fieldObj = kvArrayToObject(fieldRaw);
2548
- Object.assign(mergedFields, fieldObj);
2546
+ const key2 = fieldRaw[0];
2547
+ const value = fieldRaw[1];
2548
+ const pathParts = key2.split(".");
2549
+ if (pathParts.length == 1) {
2550
+ data[key2] = value;
2551
+ } else {
2552
+ let currentObj = data;
2553
+ for (let i = 0; i < pathParts.length - 1; i++) {
2554
+ const pathPart = pathParts[i];
2555
+ if (!(pathPart in currentObj)) {
2556
+ currentObj[pathPart] = {};
2557
+ }
2558
+ currentObj = currentObj[pathPart];
2559
+ }
2560
+ currentObj[pathParts[pathParts.length - 1]] = value;
2561
+ }
2549
2562
  }
2550
- if ("$" in mergedFields) {
2551
- const data2 = mergedFields["$"];
2552
- return { key, score, data: data2 };
2563
+ if ("$" in data) {
2564
+ data = data["$"];
2553
2565
  }
2554
- const data = dotNotationToNested(mergedFields);
2555
2566
  return { key, score, data };
2556
2567
  });
2557
2568
  }
2558
- function parseFieldInfo(fieldRaw) {
2559
- const fieldType = fieldRaw[1];
2560
- const options = fieldRaw.slice(2);
2561
- const fieldInfo = { type: fieldType };
2562
- for (const option of options) {
2563
- switch (option.toUpperCase()) {
2564
- case "NOTOKENIZE":
2565
- fieldInfo.noTokenize = true;
2569
+ function deserializeDescribeResponse(rawResponse) {
2570
+ const description = {};
2571
+ for (let i = 0; i < rawResponse.length; i += 2) {
2572
+ const descriptor = rawResponse[i];
2573
+ switch (descriptor) {
2574
+ case "name":
2575
+ description["name"] = rawResponse[i + 1];
2566
2576
  break;
2567
- case "NOSTEM":
2568
- fieldInfo.noStem = true;
2577
+ case "type":
2578
+ description["dataType"] = rawResponse[i + 1].toLowerCase();
2569
2579
  break;
2570
- case "FAST":
2571
- fieldInfo.fast = true;
2580
+ case "prefixes":
2581
+ description["prefixes"] = rawResponse[i + 1];
2582
+ break;
2583
+ case "language":
2584
+ description["language"] = rawResponse[i + 1];
2585
+ break;
2586
+ case "schema":
2587
+ const schema = {};
2588
+ for (const fieldDescription of rawResponse[i + 1]) {
2589
+ const fieldName = fieldDescription[0];
2590
+ const fieldInfo = { type: fieldDescription[1] };
2591
+ if (fieldDescription.length > 2) {
2592
+ for (let j = 2; j < fieldDescription.length; j++) {
2593
+ const fieldOption = fieldDescription[j];
2594
+ switch (fieldOption) {
2595
+ case "NOSTEM":
2596
+ fieldInfo.noStem = true;
2597
+ break;
2598
+ case "NOTOKENIZE":
2599
+ fieldInfo.noTokenize = true;
2600
+ break;
2601
+ case "FAST":
2602
+ fieldInfo.fast = true;
2603
+ break;
2604
+ }
2605
+ }
2606
+ }
2607
+ schema[fieldName] = fieldInfo;
2608
+ }
2609
+ description["schema"] = schema;
2572
2610
  break;
2573
2611
  }
2574
2612
  }
2575
- return fieldInfo;
2576
- }
2577
- function deserializeDescribeResponse(rawResponse) {
2578
- const raw = kvArrayToObject(rawResponse);
2579
- const schema = {};
2580
- if (Array.isArray(raw.schema)) {
2581
- for (const fieldRaw of raw.schema) {
2582
- if (Array.isArray(fieldRaw) && fieldRaw.length >= 2) {
2583
- const fieldName = fieldRaw[0];
2584
- schema[fieldName] = parseFieldInfo(fieldRaw);
2585
- }
2586
- }
2587
- }
2588
- return {
2589
- name: raw.name,
2590
- dataType: raw.type.toLowerCase(),
2591
- prefixes: raw.prefixes,
2592
- ...raw.language && { language: raw.language },
2593
- schema
2594
- };
2613
+ return description;
2595
2614
  }
2596
2615
  function parseCountResponse(rawResponse) {
2597
2616
  return typeof rawResponse === "number" ? rawResponse : parseInt(rawResponse, 10);
2598
2617
  }
2599
- function kvArrayToObject(v) {
2600
- if (typeof v === "object" && v !== null && !Array.isArray(v)) return v;
2601
- if (!Array.isArray(v)) return {};
2602
- const obj = {};
2603
- for (let i = 0; i < v.length; i += 2) {
2604
- if (typeof v[i] === "string") obj[v[i]] = v[i + 1];
2605
- }
2606
- return obj;
2607
- }
2608
- function dotNotationToNested(obj) {
2609
- const result = {};
2610
- for (const [key, value] of Object.entries(obj)) {
2611
- const parts = key.split(".");
2612
- let current = result;
2613
- for (let i = 0; i < parts.length - 1; i++) {
2614
- const part = parts[i];
2615
- if (!(part in current)) {
2616
- current[part] = {};
2617
- }
2618
- current = current[part];
2619
- }
2620
- current[parts[parts.length - 1]] = value;
2621
- }
2622
- return result;
2623
- }
2624
2618
 
2625
2619
  // pkg/commands/search/command-builder.ts
2626
2620
  function buildQueryCommand(redisCommand, name, options) {
@@ -2701,7 +2695,7 @@ var SearchIndex = class {
2701
2695
  this.client = client;
2702
2696
  }
2703
2697
  async waitIndexing() {
2704
- const command = ["SEARCH.COMMIT", this.name];
2698
+ const command = ["SEARCH.WAITINDEXING", this.name];
2705
2699
  const result = await new ExecCommand(command).exec(
2706
2700
  this.client
2707
2701
  );
@@ -2719,7 +2713,7 @@ var SearchIndex = class {
2719
2713
  const rawResult = await new ExecCommand(command).exec(
2720
2714
  this.client
2721
2715
  );
2722
- return deserializeQueryResponse(rawResult, options);
2716
+ return deserializeQueryResponse(rawResult);
2723
2717
  }
2724
2718
  async count({ filter }) {
2725
2719
  const command = buildQueryCommand("SEARCH.COUNT", this.name, { filter });
@@ -4893,7 +4887,7 @@ var Redis = class {
4893
4887
  };
4894
4888
 
4895
4889
  // version.ts
4896
- var VERSION = "v1.36.0-rc.3";
4890
+ var VERSION = "v1.36.0-rc.5";
4897
4891
 
4898
4892
  // platforms/nodejs.ts
4899
4893
  if (typeof atob === "undefined") {
package/nodejs.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  error_exports,
7
7
  index,
8
8
  s
9
- } from "./chunk-2HN5OIX5.mjs";
9
+ } from "./chunk-2NDFGHFZ.mjs";
10
10
 
11
11
  // platforms/nodejs.ts
12
12
  if (typeof atob === "undefined") {
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@upstash/redis","version":"v1.36.0-rc.3","main":"./nodejs.js","module":"./nodejs.mjs","types":"./nodejs.d.ts","exports":{".":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./node":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.js":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.mjs":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./fastly":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.js":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.mjs":{"import":"./fastly.mjs","require":"./fastly.js"}},"description":"An HTTP/REST based Redis client built on top of Upstash REST API.","repository":{"type":"git","url":"git+https://github.com/upstash/upstash-redis.git"},"keywords":["redis","database","serverless","edge","upstash"],"files":["./*"],"scripts":{"build":"tsup && cp package.json README.md LICENSE dist/","test":"bun test pkg","fmt":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","lint":"eslint \"**/*.{js,ts,tsx}\" --quiet --fix","format":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","format:check":"prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"","lint:fix":"eslint . -c .ts,.tsx,.js,.jsx --fix","commit":"cz","lint:format":"bun run lint:fix && bun run format","check-exports":"bun run build && cd dist && attw -P"},"author":"Andreas Thomas <dev@chronark.com>","license":"MIT","bugs":{"url":"https://github.com/upstash/upstash-redis/issues"},"homepage":"https://github.com/upstash/upstash-redis#readme","devDependencies":{"@biomejs/biome":"latest","@commitlint/cli":"^19.3.0","@commitlint/config-conventional":"^19.2.2","@typescript-eslint/eslint-plugin":"8.4.0","@typescript-eslint/parser":"8.4.0","bun-types":"1.0.33","eslint":"9.10.0","eslint-plugin-unicorn":"55.0.0","husky":"^9.1.1","prettier":"^3.3.3","tsup":"^8.2.3","typescript":"latest"},"dependencies":{"uncrypto":"^0.1.3"}}
1
+ {"name":"@upstash/redis","version":"v1.36.0-rc.5","main":"./nodejs.js","module":"./nodejs.mjs","types":"./nodejs.d.ts","exports":{".":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./node":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.js":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.mjs":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./fastly":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.js":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.mjs":{"import":"./fastly.mjs","require":"./fastly.js"}},"description":"An HTTP/REST based Redis client built on top of Upstash REST API.","repository":{"type":"git","url":"git+https://github.com/upstash/upstash-redis.git"},"keywords":["redis","database","serverless","edge","upstash"],"files":["./*"],"scripts":{"build":"tsup && cp package.json README.md LICENSE dist/","test":"bun test pkg","fmt":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","lint":"eslint \"**/*.{js,ts,tsx}\" --quiet --fix","format":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","format:check":"prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"","lint:fix":"eslint . -c .ts,.tsx,.js,.jsx --fix","commit":"cz","lint:format":"bun run lint:fix && bun run format","check-exports":"bun run build && cd dist && attw -P"},"author":"Andreas Thomas <dev@chronark.com>","license":"MIT","bugs":{"url":"https://github.com/upstash/upstash-redis/issues"},"homepage":"https://github.com/upstash/upstash-redis#readme","devDependencies":{"@biomejs/biome":"latest","@commitlint/cli":"^19.3.0","@commitlint/config-conventional":"^19.2.2","@typescript-eslint/eslint-plugin":"8.4.0","@typescript-eslint/parser":"8.4.0","bun-types":"1.0.33","eslint":"9.10.0","eslint-plugin-unicorn":"55.0.0","husky":"^9.1.1","prettier":"^3.3.3","tsup":"^8.2.3","typescript":"latest"},"dependencies":{"uncrypto":"^0.1.3"}}
@@ -356,7 +356,7 @@ type InferSchemaData<TSchema> = {
356
356
  [K in keyof TSchema]: TSchema[K] extends FieldType ? FieldValueType<TSchema[K]> : TSchema[K] extends DetailedField ? FieldValueType<ExtractFieldType<TSchema[K]>> : TSchema[K] extends NestedIndexSchema ? InferSchemaData<TSchema[K]> : never;
357
357
  };
358
358
  type QueryOptions<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
359
- filter: QueryFilter<TSchema>;
359
+ filter: RootQueryFilter<TSchema>;
360
360
  /** Maximum number of results to return */
361
361
  limit?: number;
362
362
  /** Number of results to skip */
@@ -421,7 +421,17 @@ type StringOperationMap<T extends string> = {
421
421
  distance?: number;
422
422
  transpositionCostOne?: boolean;
423
423
  };
424
- $phrase: T;
424
+ $phrase: T | {
425
+ value: T;
426
+ } | {
427
+ value: T;
428
+ slop: number;
429
+ prefix?: never;
430
+ } | {
431
+ value: T;
432
+ prefix: boolean;
433
+ slop?: never;
434
+ };
425
435
  $regex: T;
426
436
  };
427
437
  type NumberOperationMap<T extends number> = {
@@ -442,49 +452,151 @@ type DateOperationMap<T extends string | Date> = {
442
452
  $eq: T;
443
453
  $ne: T;
444
454
  $in: T[];
455
+ $gt: T;
456
+ $gte: T;
457
+ $lte: T;
458
+ $lt: T;
445
459
  };
446
460
  type StringOperations = {
447
461
  [K in keyof StringOperationMap<string>]: {
448
462
  [P in K]: StringOperationMap<string>[K];
463
+ } & {
464
+ $boost?: number;
449
465
  };
450
466
  }[keyof StringOperationMap<string>];
451
467
  type NumberOperations = {
452
468
  [K in keyof NumberOperationMap<number>]: {
453
469
  [P in K]: NumberOperationMap<number>[K];
470
+ } & {
471
+ $boost?: number;
454
472
  };
455
473
  }[keyof NumberOperationMap<number>];
456
474
  type BooleanOperations = {
457
475
  [K in keyof BooleanOperationMap<boolean>]: {
458
476
  [P in K]: BooleanOperationMap<boolean>[K];
477
+ } & {
478
+ $boost?: number;
459
479
  };
460
480
  }[keyof BooleanOperationMap<boolean>];
461
481
  type DateOperations = {
462
482
  [K in keyof DateOperationMap<string | Date>]: {
463
483
  [P in K]: DateOperationMap<string | Date>[K];
484
+ } & {
485
+ $boost?: number;
464
486
  };
465
487
  }[keyof DateOperationMap<string | Date>];
466
488
  type OperationsForFieldType<T extends FieldType> = T extends "TEXT" ? StringOperations : T extends "U64" | "I64" | "F64" ? NumberOperations : T extends "BOOL" ? BooleanOperations : T extends "DATE" ? DateOperations : never;
467
- type PathOperations<TSchema, TPath extends string> = GetFieldAtPath<TSchema, TPath> extends infer Field ? Field extends FieldType | DetailedField ? OperationsForFieldType<ExtractFieldType<Field>> : never : never;
489
+ type PathOperations<TSchema, TPath extends string> = GetFieldAtPath<TSchema, TPath> extends infer Field ? Field extends FieldType | DetailedField ? OperationsForFieldType<ExtractFieldType<Field>> | FieldValueType<ExtractFieldType<Field>> : never : never;
468
490
  type QueryLeaf<TSchema> = {
469
- [Path in SchemaPaths<TSchema>]: {
470
- [K in Path]: PathOperations<TSchema, Path>;
471
- };
472
- }[SchemaPaths<TSchema>];
473
- type QueryFilter<TSchema extends NestedIndexSchema | FlatIndexSchema> = QueryLeaf<TSchema> | {
491
+ [K in SchemaPaths<TSchema>]?: PathOperations<TSchema, K>;
492
+ } & {
493
+ $and?: never;
494
+ $or?: never;
495
+ $must?: never;
496
+ $should?: never;
497
+ $mustNot?: never;
498
+ $boost?: never;
499
+ };
500
+ type BoolBase<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
501
+ [P in SchemaPaths<TSchema>]?: PathOperations<TSchema, P>;
502
+ };
503
+ type AndNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
504
+ $and: QueryFilter<TSchema>;
505
+ $boost?: number;
506
+ $or?: never;
507
+ $must?: never;
508
+ $should?: never;
509
+ $mustNot?: never;
510
+ };
511
+ type OrNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
512
+ $or: QueryFilter<TSchema>;
513
+ $boost?: number;
514
+ $and?: never;
515
+ $must?: never;
516
+ $should?: never;
517
+ $mustNot?: never;
518
+ };
519
+ type MustNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
474
520
  $must: QueryFilter<TSchema>;
475
- } | {
521
+ $boost?: number;
522
+ $and?: never;
523
+ $or?: never;
524
+ $should?: never;
525
+ $mustNot?: never;
526
+ };
527
+ type ShouldNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
476
528
  $should: QueryFilter<TSchema>;
477
- } | {
478
- $not: QueryFilter<TSchema>;
479
- } | {
529
+ $boost?: number;
530
+ $and?: never;
531
+ $or?: never;
532
+ $must?: never;
533
+ $mustNot?: never;
534
+ };
535
+ type MustShouldNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
536
+ $must: QueryFilter<TSchema>;
537
+ $should: QueryFilter<TSchema>;
538
+ $and?: never;
539
+ $or?: never;
540
+ };
541
+ type NotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
542
+ $mustNot: QueryFilter<TSchema>;
543
+ $boost?: number;
544
+ $and?: never;
545
+ $or?: never;
546
+ $must?: never;
547
+ $should?: never;
548
+ };
549
+ type AndNotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
480
550
  $and: QueryFilter<TSchema>;
481
- } | {
551
+ $mustNot: QueryFilter<TSchema>;
552
+ $boost?: number;
553
+ $or?: never;
554
+ $must?: never;
555
+ $should?: never;
556
+ };
557
+ type OrNotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
482
558
  $or: QueryFilter<TSchema>;
483
- } | {
484
- $boost: {
485
- query: QueryFilter<TSchema>;
486
- value: number;
487
- };
559
+ $mustNot: QueryFilter<TSchema>;
560
+ $boost?: number;
561
+ $and?: never;
562
+ $must?: never;
563
+ $should?: never;
564
+ };
565
+ type ShouldNotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
566
+ $should: QueryFilter<TSchema>;
567
+ $mustNot: QueryFilter<TSchema>;
568
+ $boost?: number;
569
+ $and?: never;
570
+ $or?: never;
571
+ $must?: never;
572
+ };
573
+ type MustNotNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
574
+ $must: QueryFilter<TSchema>;
575
+ $mustNot: QueryFilter<TSchema>;
576
+ $boost?: number;
577
+ $and?: never;
578
+ $or?: never;
579
+ $should?: never;
580
+ };
581
+ type BoolNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = BoolBase<TSchema> & {
582
+ $must: QueryFilter<TSchema>;
583
+ $should: QueryFilter<TSchema>;
584
+ $mustNot: QueryFilter<TSchema>;
585
+ $boost?: number;
586
+ $and?: never;
587
+ $or?: never;
588
+ };
589
+ type QueryFilter<TSchema extends NestedIndexSchema | FlatIndexSchema> = QueryLeaf<TSchema> | AndNode<TSchema> | OrNode<TSchema> | MustNode<TSchema> | ShouldNode<TSchema> | MustShouldNode<TSchema> | NotNode<TSchema> | AndNotNode<TSchema> | OrNotNode<TSchema> | ShouldNotNode<TSchema> | MustNotNode<TSchema> | BoolNode<TSchema>;
590
+ type RootQueryFilter<TSchema extends NestedIndexSchema | FlatIndexSchema> = QueryLeaf<TSchema> | AndNode<TSchema> | RootOrNode<TSchema> | MustNode<TSchema> | ShouldNode<TSchema> | MustShouldNode<TSchema> | AndNotNode<TSchema> | ShouldNotNode<TSchema> | MustNotNode<TSchema> | BoolNode<TSchema>;
591
+ type RootOrNode<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
592
+ [P in SchemaPaths<TSchema>]?: never;
593
+ } & {
594
+ $or: QueryFilter<TSchema>;
595
+ $boost?: number;
596
+ $and?: never;
597
+ $must?: never;
598
+ $should?: never;
599
+ $mustNot?: never;
488
600
  };
489
601
  type DescribeFieldInfo = {
490
602
  type: FieldType;
@@ -494,7 +606,7 @@ type DescribeFieldInfo = {
494
606
  };
495
607
  type IndexDescription<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
496
608
  name: string;
497
- dataType: "hash" | "string";
609
+ dataType: "hash" | "string" | "json";
498
610
  prefixes: string[];
499
611
  language?: Language;
500
612
  schema: Record<SchemaPaths<TSchema>, DescribeFieldInfo>;
@@ -509,12 +621,17 @@ type createIndexProps<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
509
621
  } & ({
510
622
  dataType: "string";
511
623
  schema: TSchema extends NestedIndexSchema ? TSchema : never;
624
+ } | {
625
+ dataType: "json";
626
+ schema: TSchema extends NestedIndexSchema ? TSchema : never;
512
627
  } | {
513
628
  dataType: "hash";
514
629
  schema: TSchema extends FlatIndexSchema ? TSchema : never;
515
630
  });
516
- type SearchIndexProps<TSchema extends NestedIndexSchema | FlatIndexSchema> = Pick<createIndexProps<TSchema>, "name" | "client"> & {
517
- schema?: createIndexProps<TSchema>["schema"];
631
+ type SearchIndexProps<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
632
+ name: string;
633
+ client: Requester;
634
+ schema?: TSchema;
518
635
  };
519
636
  declare class SearchIndex<TSchema extends NestedIndexSchema | FlatIndexSchema> {
520
637
  readonly name: SearchIndexProps<TSchema>["name"];
@@ -523,16 +640,17 @@ declare class SearchIndex<TSchema extends NestedIndexSchema | FlatIndexSchema> {
523
640
  constructor({ name, schema, client }: SearchIndexProps<TSchema>);
524
641
  waitIndexing(): Promise<string>;
525
642
  describe(): Promise<IndexDescription<TSchema>>;
526
- query<TOptions extends QueryOptions<TSchema>>(options: TOptions): Promise<QueryResult<TSchema, TOptions>[]>;
643
+ query(options: QueryOptions<TSchema>): Promise<QueryResult<TSchema, QueryOptions<TSchema>>[]>;
527
644
  count({ filter }: {
528
- filter: QueryFilter<TSchema>;
645
+ filter: RootQueryFilter<TSchema>;
529
646
  }): Promise<{
530
647
  count: number;
531
648
  }>;
532
649
  drop(): Promise<string>;
533
650
  }
534
- declare function createIndex<TSchema extends NestedIndexSchema | FlatIndexSchema>(props: createIndexProps<TSchema>): Promise<SearchIndex<TSchema>>;
535
- declare function index<TSchema extends NestedIndexSchema | FlatIndexSchema>(client: Requester, name: SearchIndexProps<TSchema>["name"], schema?: SearchIndexProps<TSchema>["schema"]): SearchIndex<TSchema>;
651
+ declare function createIndex<TSchema extends NestedIndexSchema | FlatIndexSchema>(props: createIndexProps<TSchema>): Promise<SearchIndex<(TSchema extends NestedIndexSchema ? TSchema : never) | (TSchema extends NestedIndexSchema ? TSchema : never) | (TSchema extends FlatIndexSchema ? TSchema : never)>>;
652
+ declare function index<TSchema extends NestedIndexSchema | FlatIndexSchema>(client: Requester, name: string, schema: TSchema): SearchIndex<TSchema>;
653
+ declare function index(client: Requester, name: string): SearchIndex<any>;
536
654
 
537
655
  /**
538
656
  * @see https://redis.io/commands/append
@@ -3372,7 +3490,7 @@ declare class Redis {
3372
3490
  readonly?: TReadonly;
3373
3491
  }): TReadonly extends true ? ScriptRO<TResult> : Script<TResult>;
3374
3492
  get search(): {
3375
- createIndex: <TSchema extends NestedIndexSchema | FlatIndexSchema>(props: Omit<createIndexProps<TSchema>, "client">) => Promise<SearchIndex<TSchema>>;
3493
+ createIndex: <TSchema extends NestedIndexSchema | FlatIndexSchema>(props: Omit<createIndexProps<TSchema>, "client">) => Promise<SearchIndex<(TSchema extends NestedIndexSchema ? TSchema : never) | (TSchema extends NestedIndexSchema ? TSchema : never) | (TSchema extends FlatIndexSchema ? TSchema : never)>>;
3376
3494
  index: <TSchema extends NestedIndexSchema | FlatIndexSchema>(name: string, schema?: TSchema extends NestedIndexSchema ? TSchema : never) => SearchIndex<TSchema>;
3377
3495
  };
3378
3496
  /**