@upstash/redis 1.35.8-canary-2 → 1.36.0-rc.2

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/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@upstash/redis","version":"v1.35.8-canary-2","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.2","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"}}
@@ -317,6 +317,206 @@ declare class ExpireCommand extends Command<"0" | "1", 0 | 1> {
317
317
  constructor(cmd: [key: string, seconds: number, option?: ExpireOption], opts?: CommandOptions<"0" | "1", 0 | 1>);
318
318
  }
319
319
 
320
+ declare const FIELD_TYPES: readonly ["TEXT", "U64", "I64", "F64", "BOOL", "DATE"];
321
+ type FieldType = (typeof FIELD_TYPES)[number];
322
+ type TextField = {
323
+ type: "TEXT";
324
+ noTokenize?: boolean;
325
+ noStem?: boolean;
326
+ };
327
+ type NumericField = {
328
+ type: "U64" | "I64" | "F64";
329
+ fast?: boolean;
330
+ };
331
+ type BoolField = {
332
+ type: "BOOL";
333
+ fast?: boolean;
334
+ };
335
+ type DateField = {
336
+ type: "DATE";
337
+ fast?: boolean;
338
+ };
339
+ type DetailedField = TextField | NumericField | BoolField | DateField;
340
+ type NestedIndexSchema = {
341
+ [key: string]: FieldType | DetailedField | NestedIndexSchema;
342
+ };
343
+ type FlatIndexSchema = {
344
+ [key: string]: FieldType | DetailedField;
345
+ };
346
+ type SchemaPaths<T, Prefix extends string = ""> = {
347
+ [K in keyof T]: K extends string ? T[K] extends FieldType | DetailedField ? Prefix extends "" ? K : `${Prefix}${K}` : T[K] extends object ? SchemaPaths<T[K], `${Prefix}${K}.`> : never : never;
348
+ }[keyof T];
349
+ type ExtractFieldType<T> = T extends FieldType ? T : T extends {
350
+ type: infer U;
351
+ } ? U extends FieldType ? U : never : never;
352
+ type GetFieldAtPath<TSchema, Path extends string> = Path extends `${infer First}.${infer Rest}` ? First extends keyof TSchema ? GetFieldAtPath<TSchema[First], Rest> : never : Path extends keyof TSchema ? TSchema[Path] : never;
353
+ type FieldValueType<T extends FieldType> = T extends "TEXT" ? string : T extends "U64" | "I64" | "F64" ? number : T extends "BOOL" ? boolean : T extends "DATE" ? string : never;
354
+ type GetFieldValueType<TSchema, Path extends string> = GetFieldAtPath<TSchema, Path> extends infer Field ? Field extends FieldType | DetailedField ? FieldValueType<ExtractFieldType<Field>> : never : never;
355
+ type InferSchemaData<TSchema> = {
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
+ };
358
+ type QueryOptions<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
359
+ filter: QueryFilter<TSchema>;
360
+ /** Maximum number of results to return */
361
+ limit?: number;
362
+ /** Number of results to skip */
363
+ offset?: number;
364
+ /** Sort by field (requires FAST option on field) */
365
+ sortBy?: {
366
+ field: SchemaPaths<TSchema>;
367
+ direction?: "ASC" | "DESC";
368
+ };
369
+ } & ({
370
+ noContent: true;
371
+ } | {
372
+ noContent?: false;
373
+ highlight?: {
374
+ fields: SchemaPaths<TSchema>[];
375
+ preTag?: string;
376
+ postTag?: string;
377
+ };
378
+ /** Return only specific fields */
379
+ returnFields?: (SchemaPaths<TSchema> | "$")[];
380
+ });
381
+ type FieldValuePair<TSchema, TField extends string> = TField extends "$" ? {
382
+ $: InferSchemaData<TSchema>;
383
+ } : TField extends SchemaPaths<TSchema> ? {
384
+ [K in TField]: GetFieldValueType<TSchema, TField>;
385
+ } : never;
386
+ type QueryResult<TSchema extends NestedIndexSchema | FlatIndexSchema, TOptions extends QueryOptions<TSchema> | undefined = undefined> = TOptions extends {
387
+ noContent: true;
388
+ } ? {
389
+ key: string;
390
+ score: string;
391
+ } : TOptions extends {
392
+ returnFields: infer TFields extends readonly string[];
393
+ } ? {
394
+ key: string;
395
+ score: string;
396
+ fields: Array<FieldValuePair<TSchema, TFields[number]>>;
397
+ } : {
398
+ key: string;
399
+ score: string;
400
+ fields: Array<FieldValuePair<TSchema, SchemaPaths<TSchema> | "$">>;
401
+ };
402
+ type StringOperationMap<T extends string> = {
403
+ $eq: T;
404
+ $ne: T;
405
+ $in: T[];
406
+ $fuzzy: T | {
407
+ value: T;
408
+ distance?: number;
409
+ transpositionCostOne?: boolean;
410
+ };
411
+ $phrase: T;
412
+ $regex: T;
413
+ };
414
+ type NumberOperationMap<T extends number> = {
415
+ $eq: T;
416
+ $ne: T;
417
+ $in: T[];
418
+ $gt: T;
419
+ $gte: T;
420
+ $lt: T;
421
+ $lte: T;
422
+ };
423
+ type BooleanOperationMap<T extends boolean> = {
424
+ $eq: T;
425
+ $ne: T;
426
+ $in: T[];
427
+ };
428
+ type DateOperationMap<T extends string | Date> = {
429
+ $eq: T;
430
+ $ne: T;
431
+ $in: T[];
432
+ };
433
+ type StringOperations = {
434
+ [K in keyof StringOperationMap<string>]: {
435
+ [P in K]: StringOperationMap<string>[K];
436
+ };
437
+ }[keyof StringOperationMap<string>];
438
+ type NumberOperations = {
439
+ [K in keyof NumberOperationMap<number>]: {
440
+ [P in K]: NumberOperationMap<number>[K];
441
+ };
442
+ }[keyof NumberOperationMap<number>];
443
+ type BooleanOperations = {
444
+ [K in keyof BooleanOperationMap<boolean>]: {
445
+ [P in K]: BooleanOperationMap<boolean>[K];
446
+ };
447
+ }[keyof BooleanOperationMap<boolean>];
448
+ type DateOperations = {
449
+ [K in keyof DateOperationMap<string | Date>]: {
450
+ [P in K]: DateOperationMap<string | Date>[K];
451
+ };
452
+ }[keyof DateOperationMap<string | Date>];
453
+ type OperationsForFieldType<T extends FieldType> = T extends "TEXT" ? StringOperations : T extends "U64" | "I64" | "F64" ? NumberOperations : T extends "BOOL" ? BooleanOperations : T extends "DATE" ? DateOperations : never;
454
+ type PathOperations<TSchema, TPath extends string> = GetFieldAtPath<TSchema, TPath> extends infer Field ? Field extends FieldType | DetailedField ? OperationsForFieldType<ExtractFieldType<Field>> : never : never;
455
+ type QueryLeaf<TSchema> = {
456
+ [Path in SchemaPaths<TSchema>]: {
457
+ [K in Path]: PathOperations<TSchema, Path>;
458
+ };
459
+ }[SchemaPaths<TSchema>];
460
+ type QueryFilter<TSchema extends NestedIndexSchema | FlatIndexSchema> = QueryLeaf<TSchema> | {
461
+ $must: QueryFilter<TSchema>;
462
+ } | {
463
+ $should: QueryFilter<TSchema>;
464
+ } | {
465
+ $not: QueryFilter<TSchema>;
466
+ } | {
467
+ $and: QueryFilter<TSchema>;
468
+ } | {
469
+ $or: QueryFilter<TSchema>;
470
+ } | {
471
+ $boost: {
472
+ query: QueryFilter<TSchema>;
473
+ value: number;
474
+ };
475
+ };
476
+ type QueryResponse<TSchema extends NestedIndexSchema | FlatIndexSchema, TOptions extends QueryOptions<TSchema> | undefined = undefined> = Array<QueryResult<TSchema, TOptions>>;
477
+ type IndexDescription = {
478
+ indexName: string;
479
+ dataType: "hash" | "string";
480
+ prefixes: string[];
481
+ language?: string;
482
+ fields: Array<{
483
+ name: string;
484
+ type: FieldType;
485
+ noTokenize?: boolean;
486
+ noStem?: boolean;
487
+ fast?: boolean;
488
+ }>;
489
+ };
490
+
491
+ type CreateSearchIndexProps<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
492
+ indexName: string;
493
+ prefix: string | string[];
494
+ language?: "english" | "turkish";
495
+ client: Requester;
496
+ } & ({
497
+ dataType: "string";
498
+ schema: TSchema extends NestedIndexSchema ? TSchema : never;
499
+ } | {
500
+ dataType: "hash";
501
+ schema: TSchema extends FlatIndexSchema ? TSchema : never;
502
+ });
503
+ type SearchIndexProps<TSchema extends NestedIndexSchema | FlatIndexSchema> = Pick<CreateSearchIndexProps<TSchema>, "indexName" | "client"> & {
504
+ schema?: CreateSearchIndexProps<TSchema>["schema"];
505
+ };
506
+ declare class SearchIndex<TSchema extends NestedIndexSchema | FlatIndexSchema, TProps extends SearchIndexProps<TSchema>> {
507
+ indexName: TProps["indexName"];
508
+ schema?: TSchema;
509
+ client: Requester;
510
+ constructor({ indexName, schema, client }: TProps);
511
+ waitIndexing(): Promise<string>;
512
+ describe(): Promise<IndexDescription>;
513
+ query<TOptions extends QueryOptions<TSchema>>(options: TOptions): Promise<QueryResponse<TSchema, TOptions>>;
514
+ count(filter: QueryFilter<TSchema>): Promise<number>;
515
+ drop(): Promise<string>;
516
+ }
517
+ declare function createSearchIndex<TSchema extends NestedIndexSchema | FlatIndexSchema>(props: CreateSearchIndexProps<TSchema>): Promise<SearchIndex<TSchema, SearchIndexProps<TSchema>>>;
518
+ declare function getSearchIndex<TSchema extends NestedIndexSchema | FlatIndexSchema>(props: SearchIndexProps<TSchema>): SearchIndex<TSchema, SearchIndexProps<TSchema>>;
519
+
320
520
  /**
321
521
  * @see https://redis.io/commands/append
322
522
  */
@@ -3154,6 +3354,8 @@ declare class Redis {
3154
3354
  createScript<TResult = unknown, TReadonly extends boolean = false>(script: string, opts?: {
3155
3355
  readonly?: TReadonly;
3156
3356
  }): TReadonly extends true ? ScriptRO<TResult> : Script<TResult>;
3357
+ createSearchIndex: <TSchema extends NestedIndexSchema | FlatIndexSchema>(props: Omit<CreateSearchIndexProps<TSchema>, "client">) => Promise<SearchIndex<TSchema, SearchIndexProps<TSchema>>>;
3358
+ getSearchIndex: <TSchema extends NestedIndexSchema | FlatIndexSchema>(props: Omit<SearchIndexProps<TSchema>, "client">) => SearchIndex<TSchema, SearchIndexProps<TSchema>>;
3157
3359
  /**
3158
3360
  * Create a new pipeline that allows you to send requests in bulk.
3159
3361
  *
@@ -4059,4 +4261,4 @@ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] |
4059
4261
  constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
4060
4262
  }
4061
4263
 
4062
- export { HPersistCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, type HttpClientConfig as H, GetCommand as I, GetBitCommand as J, GetDelCommand as K, GetExCommand as L, GetRangeCommand as M, GetSetCommand as N, HDelCommand as O, Pipeline as P, HExistsCommand as Q, type RedisOptions as R, HExpireCommand as S, HExpireAtCommand as T, type UpstashRequest as U, HExpireTimeCommand as V, HTtlCommand as W, HPExpireCommand as X, HPExpireAtCommand as Y, HPExpireTimeCommand as Z, HPTtlCommand as _, type RequesterConfig as a, RenameNXCommand as a$, HGetCommand as a0, HGetAllCommand as a1, HIncrByCommand as a2, HIncrByFloatCommand as a3, HKeysCommand as a4, HLenCommand as a5, HMGetCommand as a6, HMSetCommand as a7, HRandFieldCommand as a8, HScanCommand as a9, JsonStrLenCommand as aA, JsonToggleCommand as aB, JsonTypeCommand as aC, KeysCommand as aD, LIndexCommand as aE, LInsertCommand as aF, LLenCommand as aG, LMoveCommand as aH, LPopCommand as aI, LPushCommand as aJ, LPushXCommand as aK, LRangeCommand as aL, LRemCommand as aM, LSetCommand as aN, LTrimCommand as aO, MGetCommand as aP, MSetCommand as aQ, MSetNXCommand as aR, PersistCommand as aS, PExpireCommand as aT, PExpireAtCommand as aU, PingCommand as aV, PSetEXCommand as aW, PTtlCommand as aX, PublishCommand as aY, RandomKeyCommand as aZ, RenameCommand as a_, HSetCommand as aa, HSetNXCommand as ab, HStrLenCommand as ac, HValsCommand as ad, IncrCommand as ae, IncrByCommand as af, IncrByFloatCommand as ag, JsonArrAppendCommand as ah, JsonArrIndexCommand as ai, JsonArrInsertCommand as aj, JsonArrLenCommand as ak, JsonArrPopCommand as al, JsonArrTrimCommand as am, JsonClearCommand as an, JsonDelCommand as ao, JsonForgetCommand as ap, JsonGetCommand as aq, JsonMergeCommand as ar, JsonMGetCommand as as, JsonNumIncrByCommand as at, JsonNumMultByCommand as au, JsonObjKeysCommand as av, JsonObjLenCommand as aw, JsonRespCommand as ax, JsonSetCommand as ay, JsonStrAppendCommand as az, Redis as b, type ZUnionCommandOptions as b$, RPopCommand as b0, RPushCommand as b1, RPushXCommand as b2, SAddCommand as b3, ScanCommand as b4, type ScanCommandOptions as b5, SCardCommand as b6, ScriptExistsCommand as b7, ScriptFlushCommand as b8, ScriptLoadCommand as b9, UnlinkCommand as bA, XAddCommand as bB, XRangeCommand as bC, type ScoreMember as bD, type ZAddCommandOptions as bE, ZAddCommand as bF, ZCardCommand as bG, ZCountCommand as bH, ZDiffStoreCommand as bI, ZIncrByCommand as bJ, ZInterStoreCommand as bK, type ZInterStoreCommandOptions as bL, ZLexCountCommand as bM, ZMScoreCommand as bN, ZPopMaxCommand as bO, ZPopMinCommand as bP, ZRangeCommand as bQ, type ZRangeCommandOptions as bR, ZRankCommand as bS, ZRemCommand as bT, ZRemRangeByLexCommand as bU, ZRemRangeByRankCommand as bV, ZRemRangeByScoreCommand as bW, ZRevRankCommand as bX, ZScanCommand as bY, ZScoreCommand as bZ, ZUnionCommand as b_, SDiffCommand as ba, SDiffStoreCommand as bb, SetCommand as bc, type SetCommandOptions as bd, SetBitCommand as be, SetExCommand as bf, SetNxCommand as bg, SetRangeCommand as bh, SInterCommand as bi, SInterStoreCommand as bj, SIsMemberCommand as bk, SMembersCommand as bl, SMIsMemberCommand as bm, SMoveCommand as bn, SPopCommand as bo, SRandMemberCommand as bp, SRemCommand as bq, SScanCommand as br, StrLenCommand as bs, SUnionCommand as bt, SUnionStoreCommand as bu, TimeCommand as bv, TouchCommand as bw, TtlCommand as bx, type Type as by, TypeCommand as bz, type Requester as c, ZUnionStoreCommand as c0, type ZUnionStoreCommandOptions as c1, type UpstashResponse as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalROCommand as k, EvalCommand as l, EvalshaROCommand as m, EvalshaCommand as n, ExistsCommand as o, ExpireCommand as p, type ExpireOption as q, ExpireAtCommand as r, FlushDBCommand as s, type GeoAddCommandOptions as t, type GeoMember as u, GeoDistCommand as v, GeoHashCommand as w, GeoPosCommand as x, GeoSearchCommand as y, GeoSearchStoreCommand as z };
4264
+ export { HPTtlCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, type HttpClientConfig as H, GetCommand as I, GetBitCommand as J, GetDelCommand as K, GetExCommand as L, GetRangeCommand as M, type NestedIndexSchema as N, GetSetCommand as O, Pipeline as P, HDelCommand as Q, type RedisOptions as R, HExistsCommand as S, HExpireCommand as T, type UpstashRequest as U, HExpireAtCommand as V, HExpireTimeCommand as W, HTtlCommand as X, HPExpireCommand as Y, HPExpireAtCommand as Z, HPExpireTimeCommand as _, type RequesterConfig as a, RenameCommand as a$, HPersistCommand as a0, HGetCommand as a1, HGetAllCommand as a2, HIncrByCommand as a3, HIncrByFloatCommand as a4, HKeysCommand as a5, HLenCommand as a6, HMGetCommand as a7, HMSetCommand as a8, HRandFieldCommand as a9, JsonStrAppendCommand as aA, JsonStrLenCommand as aB, JsonToggleCommand as aC, JsonTypeCommand as aD, KeysCommand as aE, LIndexCommand as aF, LInsertCommand as aG, LLenCommand as aH, LMoveCommand as aI, LPopCommand as aJ, LPushCommand as aK, LPushXCommand as aL, LRangeCommand as aM, LRemCommand as aN, LSetCommand as aO, LTrimCommand as aP, MGetCommand as aQ, MSetCommand as aR, MSetNXCommand as aS, PersistCommand as aT, PExpireCommand as aU, PExpireAtCommand as aV, PingCommand as aW, PSetEXCommand as aX, PTtlCommand as aY, PublishCommand as aZ, RandomKeyCommand as a_, HScanCommand as aa, HSetCommand as ab, HSetNXCommand as ac, HStrLenCommand as ad, HValsCommand as ae, IncrCommand as af, IncrByCommand as ag, IncrByFloatCommand as ah, JsonArrAppendCommand as ai, JsonArrIndexCommand as aj, JsonArrInsertCommand as ak, JsonArrLenCommand as al, JsonArrPopCommand as am, JsonArrTrimCommand as an, JsonClearCommand as ao, JsonDelCommand as ap, JsonForgetCommand as aq, JsonGetCommand as ar, JsonMergeCommand as as, JsonMGetCommand as at, JsonNumIncrByCommand as au, JsonNumMultByCommand as av, JsonObjKeysCommand as aw, JsonObjLenCommand as ax, JsonRespCommand as ay, JsonSetCommand as az, Redis as b, ZUnionCommand as b$, RenameNXCommand as b0, RPopCommand as b1, RPushCommand as b2, RPushXCommand as b3, SAddCommand as b4, ScanCommand as b5, type ScanCommandOptions as b6, SCardCommand as b7, ScriptExistsCommand as b8, ScriptFlushCommand as b9, TypeCommand as bA, UnlinkCommand as bB, XAddCommand as bC, XRangeCommand as bD, type ScoreMember as bE, type ZAddCommandOptions as bF, ZAddCommand as bG, ZCardCommand as bH, ZCountCommand as bI, ZDiffStoreCommand as bJ, ZIncrByCommand as bK, ZInterStoreCommand as bL, type ZInterStoreCommandOptions as bM, ZLexCountCommand as bN, ZMScoreCommand as bO, ZPopMaxCommand as bP, ZPopMinCommand as bQ, ZRangeCommand as bR, type ZRangeCommandOptions as bS, ZRankCommand as bT, ZRemCommand as bU, ZRemRangeByLexCommand as bV, ZRemRangeByRankCommand as bW, ZRemRangeByScoreCommand as bX, ZRevRankCommand as bY, ZScanCommand as bZ, ZScoreCommand as b_, ScriptLoadCommand as ba, SDiffCommand as bb, SDiffStoreCommand as bc, SetCommand as bd, type SetCommandOptions as be, SetBitCommand as bf, SetExCommand as bg, SetNxCommand as bh, SetRangeCommand as bi, SInterCommand as bj, SInterStoreCommand as bk, SIsMemberCommand as bl, SMembersCommand as bm, SMIsMemberCommand as bn, SMoveCommand as bo, SPopCommand as bp, SRandMemberCommand as bq, SRemCommand as br, SScanCommand as bs, StrLenCommand as bt, SUnionCommand as bu, SUnionStoreCommand as bv, TimeCommand as bw, TouchCommand as bx, TtlCommand as by, type Type as bz, type Requester as c, type ZUnionCommandOptions as c0, ZUnionStoreCommand as c1, type ZUnionStoreCommandOptions as c2, createSearchIndex as c3, getSearchIndex as c4, type SearchIndexProps as c5, type CreateSearchIndexProps as c6, type FlatIndexSchema as c7, type UpstashResponse as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalROCommand as k, EvalCommand as l, EvalshaROCommand as m, EvalshaCommand as n, ExistsCommand as o, ExpireCommand as p, type ExpireOption as q, ExpireAtCommand as r, FlushDBCommand as s, type GeoAddCommandOptions as t, type GeoMember as u, GeoDistCommand as v, GeoHashCommand as w, GeoPosCommand as x, GeoSearchCommand as y, GeoSearchStoreCommand as z };
@@ -317,6 +317,206 @@ declare class ExpireCommand extends Command<"0" | "1", 0 | 1> {
317
317
  constructor(cmd: [key: string, seconds: number, option?: ExpireOption], opts?: CommandOptions<"0" | "1", 0 | 1>);
318
318
  }
319
319
 
320
+ declare const FIELD_TYPES: readonly ["TEXT", "U64", "I64", "F64", "BOOL", "DATE"];
321
+ type FieldType = (typeof FIELD_TYPES)[number];
322
+ type TextField = {
323
+ type: "TEXT";
324
+ noTokenize?: boolean;
325
+ noStem?: boolean;
326
+ };
327
+ type NumericField = {
328
+ type: "U64" | "I64" | "F64";
329
+ fast?: boolean;
330
+ };
331
+ type BoolField = {
332
+ type: "BOOL";
333
+ fast?: boolean;
334
+ };
335
+ type DateField = {
336
+ type: "DATE";
337
+ fast?: boolean;
338
+ };
339
+ type DetailedField = TextField | NumericField | BoolField | DateField;
340
+ type NestedIndexSchema = {
341
+ [key: string]: FieldType | DetailedField | NestedIndexSchema;
342
+ };
343
+ type FlatIndexSchema = {
344
+ [key: string]: FieldType | DetailedField;
345
+ };
346
+ type SchemaPaths<T, Prefix extends string = ""> = {
347
+ [K in keyof T]: K extends string ? T[K] extends FieldType | DetailedField ? Prefix extends "" ? K : `${Prefix}${K}` : T[K] extends object ? SchemaPaths<T[K], `${Prefix}${K}.`> : never : never;
348
+ }[keyof T];
349
+ type ExtractFieldType<T> = T extends FieldType ? T : T extends {
350
+ type: infer U;
351
+ } ? U extends FieldType ? U : never : never;
352
+ type GetFieldAtPath<TSchema, Path extends string> = Path extends `${infer First}.${infer Rest}` ? First extends keyof TSchema ? GetFieldAtPath<TSchema[First], Rest> : never : Path extends keyof TSchema ? TSchema[Path] : never;
353
+ type FieldValueType<T extends FieldType> = T extends "TEXT" ? string : T extends "U64" | "I64" | "F64" ? number : T extends "BOOL" ? boolean : T extends "DATE" ? string : never;
354
+ type GetFieldValueType<TSchema, Path extends string> = GetFieldAtPath<TSchema, Path> extends infer Field ? Field extends FieldType | DetailedField ? FieldValueType<ExtractFieldType<Field>> : never : never;
355
+ type InferSchemaData<TSchema> = {
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
+ };
358
+ type QueryOptions<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
359
+ filter: QueryFilter<TSchema>;
360
+ /** Maximum number of results to return */
361
+ limit?: number;
362
+ /** Number of results to skip */
363
+ offset?: number;
364
+ /** Sort by field (requires FAST option on field) */
365
+ sortBy?: {
366
+ field: SchemaPaths<TSchema>;
367
+ direction?: "ASC" | "DESC";
368
+ };
369
+ } & ({
370
+ noContent: true;
371
+ } | {
372
+ noContent?: false;
373
+ highlight?: {
374
+ fields: SchemaPaths<TSchema>[];
375
+ preTag?: string;
376
+ postTag?: string;
377
+ };
378
+ /** Return only specific fields */
379
+ returnFields?: (SchemaPaths<TSchema> | "$")[];
380
+ });
381
+ type FieldValuePair<TSchema, TField extends string> = TField extends "$" ? {
382
+ $: InferSchemaData<TSchema>;
383
+ } : TField extends SchemaPaths<TSchema> ? {
384
+ [K in TField]: GetFieldValueType<TSchema, TField>;
385
+ } : never;
386
+ type QueryResult<TSchema extends NestedIndexSchema | FlatIndexSchema, TOptions extends QueryOptions<TSchema> | undefined = undefined> = TOptions extends {
387
+ noContent: true;
388
+ } ? {
389
+ key: string;
390
+ score: string;
391
+ } : TOptions extends {
392
+ returnFields: infer TFields extends readonly string[];
393
+ } ? {
394
+ key: string;
395
+ score: string;
396
+ fields: Array<FieldValuePair<TSchema, TFields[number]>>;
397
+ } : {
398
+ key: string;
399
+ score: string;
400
+ fields: Array<FieldValuePair<TSchema, SchemaPaths<TSchema> | "$">>;
401
+ };
402
+ type StringOperationMap<T extends string> = {
403
+ $eq: T;
404
+ $ne: T;
405
+ $in: T[];
406
+ $fuzzy: T | {
407
+ value: T;
408
+ distance?: number;
409
+ transpositionCostOne?: boolean;
410
+ };
411
+ $phrase: T;
412
+ $regex: T;
413
+ };
414
+ type NumberOperationMap<T extends number> = {
415
+ $eq: T;
416
+ $ne: T;
417
+ $in: T[];
418
+ $gt: T;
419
+ $gte: T;
420
+ $lt: T;
421
+ $lte: T;
422
+ };
423
+ type BooleanOperationMap<T extends boolean> = {
424
+ $eq: T;
425
+ $ne: T;
426
+ $in: T[];
427
+ };
428
+ type DateOperationMap<T extends string | Date> = {
429
+ $eq: T;
430
+ $ne: T;
431
+ $in: T[];
432
+ };
433
+ type StringOperations = {
434
+ [K in keyof StringOperationMap<string>]: {
435
+ [P in K]: StringOperationMap<string>[K];
436
+ };
437
+ }[keyof StringOperationMap<string>];
438
+ type NumberOperations = {
439
+ [K in keyof NumberOperationMap<number>]: {
440
+ [P in K]: NumberOperationMap<number>[K];
441
+ };
442
+ }[keyof NumberOperationMap<number>];
443
+ type BooleanOperations = {
444
+ [K in keyof BooleanOperationMap<boolean>]: {
445
+ [P in K]: BooleanOperationMap<boolean>[K];
446
+ };
447
+ }[keyof BooleanOperationMap<boolean>];
448
+ type DateOperations = {
449
+ [K in keyof DateOperationMap<string | Date>]: {
450
+ [P in K]: DateOperationMap<string | Date>[K];
451
+ };
452
+ }[keyof DateOperationMap<string | Date>];
453
+ type OperationsForFieldType<T extends FieldType> = T extends "TEXT" ? StringOperations : T extends "U64" | "I64" | "F64" ? NumberOperations : T extends "BOOL" ? BooleanOperations : T extends "DATE" ? DateOperations : never;
454
+ type PathOperations<TSchema, TPath extends string> = GetFieldAtPath<TSchema, TPath> extends infer Field ? Field extends FieldType | DetailedField ? OperationsForFieldType<ExtractFieldType<Field>> : never : never;
455
+ type QueryLeaf<TSchema> = {
456
+ [Path in SchemaPaths<TSchema>]: {
457
+ [K in Path]: PathOperations<TSchema, Path>;
458
+ };
459
+ }[SchemaPaths<TSchema>];
460
+ type QueryFilter<TSchema extends NestedIndexSchema | FlatIndexSchema> = QueryLeaf<TSchema> | {
461
+ $must: QueryFilter<TSchema>;
462
+ } | {
463
+ $should: QueryFilter<TSchema>;
464
+ } | {
465
+ $not: QueryFilter<TSchema>;
466
+ } | {
467
+ $and: QueryFilter<TSchema>;
468
+ } | {
469
+ $or: QueryFilter<TSchema>;
470
+ } | {
471
+ $boost: {
472
+ query: QueryFilter<TSchema>;
473
+ value: number;
474
+ };
475
+ };
476
+ type QueryResponse<TSchema extends NestedIndexSchema | FlatIndexSchema, TOptions extends QueryOptions<TSchema> | undefined = undefined> = Array<QueryResult<TSchema, TOptions>>;
477
+ type IndexDescription = {
478
+ indexName: string;
479
+ dataType: "hash" | "string";
480
+ prefixes: string[];
481
+ language?: string;
482
+ fields: Array<{
483
+ name: string;
484
+ type: FieldType;
485
+ noTokenize?: boolean;
486
+ noStem?: boolean;
487
+ fast?: boolean;
488
+ }>;
489
+ };
490
+
491
+ type CreateSearchIndexProps<TSchema extends NestedIndexSchema | FlatIndexSchema> = {
492
+ indexName: string;
493
+ prefix: string | string[];
494
+ language?: "english" | "turkish";
495
+ client: Requester;
496
+ } & ({
497
+ dataType: "string";
498
+ schema: TSchema extends NestedIndexSchema ? TSchema : never;
499
+ } | {
500
+ dataType: "hash";
501
+ schema: TSchema extends FlatIndexSchema ? TSchema : never;
502
+ });
503
+ type SearchIndexProps<TSchema extends NestedIndexSchema | FlatIndexSchema> = Pick<CreateSearchIndexProps<TSchema>, "indexName" | "client"> & {
504
+ schema?: CreateSearchIndexProps<TSchema>["schema"];
505
+ };
506
+ declare class SearchIndex<TSchema extends NestedIndexSchema | FlatIndexSchema, TProps extends SearchIndexProps<TSchema>> {
507
+ indexName: TProps["indexName"];
508
+ schema?: TSchema;
509
+ client: Requester;
510
+ constructor({ indexName, schema, client }: TProps);
511
+ waitIndexing(): Promise<string>;
512
+ describe(): Promise<IndexDescription>;
513
+ query<TOptions extends QueryOptions<TSchema>>(options: TOptions): Promise<QueryResponse<TSchema, TOptions>>;
514
+ count(filter: QueryFilter<TSchema>): Promise<number>;
515
+ drop(): Promise<string>;
516
+ }
517
+ declare function createSearchIndex<TSchema extends NestedIndexSchema | FlatIndexSchema>(props: CreateSearchIndexProps<TSchema>): Promise<SearchIndex<TSchema, SearchIndexProps<TSchema>>>;
518
+ declare function getSearchIndex<TSchema extends NestedIndexSchema | FlatIndexSchema>(props: SearchIndexProps<TSchema>): SearchIndex<TSchema, SearchIndexProps<TSchema>>;
519
+
320
520
  /**
321
521
  * @see https://redis.io/commands/append
322
522
  */
@@ -3154,6 +3354,8 @@ declare class Redis {
3154
3354
  createScript<TResult = unknown, TReadonly extends boolean = false>(script: string, opts?: {
3155
3355
  readonly?: TReadonly;
3156
3356
  }): TReadonly extends true ? ScriptRO<TResult> : Script<TResult>;
3357
+ createSearchIndex: <TSchema extends NestedIndexSchema | FlatIndexSchema>(props: Omit<CreateSearchIndexProps<TSchema>, "client">) => Promise<SearchIndex<TSchema, SearchIndexProps<TSchema>>>;
3358
+ getSearchIndex: <TSchema extends NestedIndexSchema | FlatIndexSchema>(props: Omit<SearchIndexProps<TSchema>, "client">) => SearchIndex<TSchema, SearchIndexProps<TSchema>>;
3157
3359
  /**
3158
3360
  * Create a new pipeline that allows you to send requests in bulk.
3159
3361
  *
@@ -4059,4 +4261,4 @@ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] |
4059
4261
  constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
4060
4262
  }
4061
4263
 
4062
- export { HPersistCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, type HttpClientConfig as H, GetCommand as I, GetBitCommand as J, GetDelCommand as K, GetExCommand as L, GetRangeCommand as M, GetSetCommand as N, HDelCommand as O, Pipeline as P, HExistsCommand as Q, type RedisOptions as R, HExpireCommand as S, HExpireAtCommand as T, type UpstashRequest as U, HExpireTimeCommand as V, HTtlCommand as W, HPExpireCommand as X, HPExpireAtCommand as Y, HPExpireTimeCommand as Z, HPTtlCommand as _, type RequesterConfig as a, RenameNXCommand as a$, HGetCommand as a0, HGetAllCommand as a1, HIncrByCommand as a2, HIncrByFloatCommand as a3, HKeysCommand as a4, HLenCommand as a5, HMGetCommand as a6, HMSetCommand as a7, HRandFieldCommand as a8, HScanCommand as a9, JsonStrLenCommand as aA, JsonToggleCommand as aB, JsonTypeCommand as aC, KeysCommand as aD, LIndexCommand as aE, LInsertCommand as aF, LLenCommand as aG, LMoveCommand as aH, LPopCommand as aI, LPushCommand as aJ, LPushXCommand as aK, LRangeCommand as aL, LRemCommand as aM, LSetCommand as aN, LTrimCommand as aO, MGetCommand as aP, MSetCommand as aQ, MSetNXCommand as aR, PersistCommand as aS, PExpireCommand as aT, PExpireAtCommand as aU, PingCommand as aV, PSetEXCommand as aW, PTtlCommand as aX, PublishCommand as aY, RandomKeyCommand as aZ, RenameCommand as a_, HSetCommand as aa, HSetNXCommand as ab, HStrLenCommand as ac, HValsCommand as ad, IncrCommand as ae, IncrByCommand as af, IncrByFloatCommand as ag, JsonArrAppendCommand as ah, JsonArrIndexCommand as ai, JsonArrInsertCommand as aj, JsonArrLenCommand as ak, JsonArrPopCommand as al, JsonArrTrimCommand as am, JsonClearCommand as an, JsonDelCommand as ao, JsonForgetCommand as ap, JsonGetCommand as aq, JsonMergeCommand as ar, JsonMGetCommand as as, JsonNumIncrByCommand as at, JsonNumMultByCommand as au, JsonObjKeysCommand as av, JsonObjLenCommand as aw, JsonRespCommand as ax, JsonSetCommand as ay, JsonStrAppendCommand as az, Redis as b, type ZUnionCommandOptions as b$, RPopCommand as b0, RPushCommand as b1, RPushXCommand as b2, SAddCommand as b3, ScanCommand as b4, type ScanCommandOptions as b5, SCardCommand as b6, ScriptExistsCommand as b7, ScriptFlushCommand as b8, ScriptLoadCommand as b9, UnlinkCommand as bA, XAddCommand as bB, XRangeCommand as bC, type ScoreMember as bD, type ZAddCommandOptions as bE, ZAddCommand as bF, ZCardCommand as bG, ZCountCommand as bH, ZDiffStoreCommand as bI, ZIncrByCommand as bJ, ZInterStoreCommand as bK, type ZInterStoreCommandOptions as bL, ZLexCountCommand as bM, ZMScoreCommand as bN, ZPopMaxCommand as bO, ZPopMinCommand as bP, ZRangeCommand as bQ, type ZRangeCommandOptions as bR, ZRankCommand as bS, ZRemCommand as bT, ZRemRangeByLexCommand as bU, ZRemRangeByRankCommand as bV, ZRemRangeByScoreCommand as bW, ZRevRankCommand as bX, ZScanCommand as bY, ZScoreCommand as bZ, ZUnionCommand as b_, SDiffCommand as ba, SDiffStoreCommand as bb, SetCommand as bc, type SetCommandOptions as bd, SetBitCommand as be, SetExCommand as bf, SetNxCommand as bg, SetRangeCommand as bh, SInterCommand as bi, SInterStoreCommand as bj, SIsMemberCommand as bk, SMembersCommand as bl, SMIsMemberCommand as bm, SMoveCommand as bn, SPopCommand as bo, SRandMemberCommand as bp, SRemCommand as bq, SScanCommand as br, StrLenCommand as bs, SUnionCommand as bt, SUnionStoreCommand as bu, TimeCommand as bv, TouchCommand as bw, TtlCommand as bx, type Type as by, TypeCommand as bz, type Requester as c, ZUnionStoreCommand as c0, type ZUnionStoreCommandOptions as c1, type UpstashResponse as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalROCommand as k, EvalCommand as l, EvalshaROCommand as m, EvalshaCommand as n, ExistsCommand as o, ExpireCommand as p, type ExpireOption as q, ExpireAtCommand as r, FlushDBCommand as s, type GeoAddCommandOptions as t, type GeoMember as u, GeoDistCommand as v, GeoHashCommand as w, GeoPosCommand as x, GeoSearchCommand as y, GeoSearchStoreCommand as z };
4264
+ export { HPTtlCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, type HttpClientConfig as H, GetCommand as I, GetBitCommand as J, GetDelCommand as K, GetExCommand as L, GetRangeCommand as M, type NestedIndexSchema as N, GetSetCommand as O, Pipeline as P, HDelCommand as Q, type RedisOptions as R, HExistsCommand as S, HExpireCommand as T, type UpstashRequest as U, HExpireAtCommand as V, HExpireTimeCommand as W, HTtlCommand as X, HPExpireCommand as Y, HPExpireAtCommand as Z, HPExpireTimeCommand as _, type RequesterConfig as a, RenameCommand as a$, HPersistCommand as a0, HGetCommand as a1, HGetAllCommand as a2, HIncrByCommand as a3, HIncrByFloatCommand as a4, HKeysCommand as a5, HLenCommand as a6, HMGetCommand as a7, HMSetCommand as a8, HRandFieldCommand as a9, JsonStrAppendCommand as aA, JsonStrLenCommand as aB, JsonToggleCommand as aC, JsonTypeCommand as aD, KeysCommand as aE, LIndexCommand as aF, LInsertCommand as aG, LLenCommand as aH, LMoveCommand as aI, LPopCommand as aJ, LPushCommand as aK, LPushXCommand as aL, LRangeCommand as aM, LRemCommand as aN, LSetCommand as aO, LTrimCommand as aP, MGetCommand as aQ, MSetCommand as aR, MSetNXCommand as aS, PersistCommand as aT, PExpireCommand as aU, PExpireAtCommand as aV, PingCommand as aW, PSetEXCommand as aX, PTtlCommand as aY, PublishCommand as aZ, RandomKeyCommand as a_, HScanCommand as aa, HSetCommand as ab, HSetNXCommand as ac, HStrLenCommand as ad, HValsCommand as ae, IncrCommand as af, IncrByCommand as ag, IncrByFloatCommand as ah, JsonArrAppendCommand as ai, JsonArrIndexCommand as aj, JsonArrInsertCommand as ak, JsonArrLenCommand as al, JsonArrPopCommand as am, JsonArrTrimCommand as an, JsonClearCommand as ao, JsonDelCommand as ap, JsonForgetCommand as aq, JsonGetCommand as ar, JsonMergeCommand as as, JsonMGetCommand as at, JsonNumIncrByCommand as au, JsonNumMultByCommand as av, JsonObjKeysCommand as aw, JsonObjLenCommand as ax, JsonRespCommand as ay, JsonSetCommand as az, Redis as b, ZUnionCommand as b$, RenameNXCommand as b0, RPopCommand as b1, RPushCommand as b2, RPushXCommand as b3, SAddCommand as b4, ScanCommand as b5, type ScanCommandOptions as b6, SCardCommand as b7, ScriptExistsCommand as b8, ScriptFlushCommand as b9, TypeCommand as bA, UnlinkCommand as bB, XAddCommand as bC, XRangeCommand as bD, type ScoreMember as bE, type ZAddCommandOptions as bF, ZAddCommand as bG, ZCardCommand as bH, ZCountCommand as bI, ZDiffStoreCommand as bJ, ZIncrByCommand as bK, ZInterStoreCommand as bL, type ZInterStoreCommandOptions as bM, ZLexCountCommand as bN, ZMScoreCommand as bO, ZPopMaxCommand as bP, ZPopMinCommand as bQ, ZRangeCommand as bR, type ZRangeCommandOptions as bS, ZRankCommand as bT, ZRemCommand as bU, ZRemRangeByLexCommand as bV, ZRemRangeByRankCommand as bW, ZRemRangeByScoreCommand as bX, ZRevRankCommand as bY, ZScanCommand as bZ, ZScoreCommand as b_, ScriptLoadCommand as ba, SDiffCommand as bb, SDiffStoreCommand as bc, SetCommand as bd, type SetCommandOptions as be, SetBitCommand as bf, SetExCommand as bg, SetNxCommand as bh, SetRangeCommand as bi, SInterCommand as bj, SInterStoreCommand as bk, SIsMemberCommand as bl, SMembersCommand as bm, SMIsMemberCommand as bn, SMoveCommand as bo, SPopCommand as bp, SRandMemberCommand as bq, SRemCommand as br, SScanCommand as bs, StrLenCommand as bt, SUnionCommand as bu, SUnionStoreCommand as bv, TimeCommand as bw, TouchCommand as bx, TtlCommand as by, type Type as bz, type Requester as c, type ZUnionCommandOptions as c0, ZUnionStoreCommand as c1, type ZUnionStoreCommandOptions as c2, createSearchIndex as c3, getSearchIndex as c4, type SearchIndexProps as c5, type CreateSearchIndexProps as c6, type FlatIndexSchema as c7, type UpstashResponse as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalROCommand as k, EvalCommand as l, EvalshaROCommand as m, EvalshaCommand as n, ExistsCommand as o, ExpireCommand as p, type ExpireOption as q, ExpireAtCommand as r, FlushDBCommand as s, type GeoAddCommandOptions as t, type GeoMember as u, GeoDistCommand as v, GeoHashCommand as w, GeoPosCommand as x, GeoSearchCommand as y, GeoSearchStoreCommand as z };