@distilled.cloud/typesense 1.0.0-rc.17 → 1.0.0-rc.19

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.
@@ -11,6 +11,19 @@ const __s: any[] = [];
11
11
 
12
12
  export type { TypesenseOpError, TypesenseOpContext };
13
13
 
14
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
15
+ const TELEMETRY = {
16
+ system: "typesense-api",
17
+ responseHeaders: [
18
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
19
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
20
+ ],
21
+ prefix: "Typesense",
22
+ service: "Typesense",
23
+ labels: "typesense",
24
+ propagate: "w3c",
25
+ } as const;
26
+
14
27
  export class BadRequest
15
28
  extends /*@__PURE__*/ T.applyErrorMatchers(
16
29
  /*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
@@ -46,11 +59,11 @@ export interface CompactDbRequest {}
46
59
  export type CreateAnalyticsEventRequestDataDocIdsList = Array<string>;
47
60
  /** Event payload */
48
61
  export interface CreateAnalyticsEventRequestData {
49
- user_id?: string;
50
- doc_id?: string;
51
- doc_ids?: CreateAnalyticsEventRequestDataDocIdsList;
52
- q?: string;
53
- analytics_tag?: string;
62
+ user_id?: string | undefined;
63
+ doc_id?: string | undefined;
64
+ doc_ids?: CreateAnalyticsEventRequestDataDocIdsList | undefined;
65
+ q?: string | undefined;
66
+ analytics_tag?: string | undefined;
54
67
  }
55
68
  export interface CreateAnalyticsEventRequest {
56
69
  /** Name of the analytics rule this event corresponds to */
@@ -66,21 +79,21 @@ export interface AnalyticsEventCreateResponse {
66
79
  export type AnalyticsRuleType = "popular_queries" | "nohits_queries" | "counter" | "log";
67
80
  export type AnalyticsRuleCreateParamsMetaFieldsList = Array<string>;
68
81
  export interface AnalyticsRuleCreateParams {
69
- destination_collection?: string;
70
- limit?: number;
71
- capture_search_requests?: boolean;
72
- meta_fields?: AnalyticsRuleCreateParamsMetaFieldsList;
73
- expand_query?: boolean;
74
- counter_field?: string;
75
- weight?: number;
82
+ destination_collection?: string | undefined;
83
+ limit?: number | undefined;
84
+ capture_search_requests?: boolean | undefined;
85
+ meta_fields?: AnalyticsRuleCreateParamsMetaFieldsList | undefined;
86
+ expand_query?: boolean | undefined;
87
+ counter_field?: string | undefined;
88
+ weight?: number | undefined;
76
89
  }
77
90
  export interface AnalyticsRuleCreate {
78
91
  name: string;
79
92
  type: AnalyticsRuleType | (string & {});
80
93
  collection: string;
81
94
  event_type: string;
82
- rule_tag?: string;
83
- params?: AnalyticsRuleCreateParams;
95
+ rule_tag?: string | undefined;
96
+ params?: AnalyticsRuleCreateParams | undefined;
84
97
  }
85
98
  export type CreateAnalyticsRuleRequestBodyCase1List = Array<AnalyticsRuleCreate>;
86
99
  export type CreateAnalyticsRuleRequestBody =
@@ -91,24 +104,24 @@ export interface CreateAnalyticsRuleRequest {
91
104
  }
92
105
  export type AnalyticsRuleParamsMetaFieldsList = Array<string>;
93
106
  export interface AnalyticsRuleParams {
94
- destination_collection?: string;
95
- limit?: number;
96
- capture_search_requests?: boolean;
97
- meta_fields?: AnalyticsRuleParamsMetaFieldsList;
98
- expand_query?: boolean;
99
- counter_field?: string;
100
- weight?: number;
107
+ destination_collection?: string | undefined;
108
+ limit?: number | undefined;
109
+ capture_search_requests?: boolean | undefined;
110
+ meta_fields?: AnalyticsRuleParamsMetaFieldsList | undefined;
111
+ expand_query?: boolean | undefined;
112
+ counter_field?: string | undefined;
113
+ weight?: number | undefined;
101
114
  }
102
115
  export interface AnalyticsRule {
103
116
  name: string;
104
117
  type: AnalyticsRuleType;
105
118
  collection: string;
106
119
  event_type: string;
107
- rule_tag?: string;
108
- params?: AnalyticsRuleParams;
120
+ rule_tag?: string | undefined;
121
+ params?: AnalyticsRuleParams | undefined;
109
122
  }
110
123
  export interface CreateAnalyticsRuleResponseBodyCase1ItemCase1 {
111
- error?: string;
124
+ error?: string | undefined;
112
125
  }
113
126
  export type CreateAnalyticsRuleResponseBodyCase1Item =
114
127
  | AnalyticsRule
@@ -126,15 +139,15 @@ export type FieldSymbolsToIndexList = Array<string>;
126
139
  export type FieldEmbedFromList = Array<string>;
127
140
  export interface FieldEmbedModelConfig {
128
141
  model_name: string;
129
- api_key?: string | import("effect/Redacted").Redacted<string>;
130
- url?: string;
131
- access_token?: string | import("effect/Redacted").Redacted<string>;
132
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
133
- client_id?: string;
134
- client_secret?: string | import("effect/Redacted").Redacted<string>;
135
- project_id?: string;
136
- indexing_prefix?: string;
137
- query_prefix?: string;
142
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
143
+ url?: string | undefined;
144
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
145
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
146
+ client_id?: string | undefined;
147
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
148
+ project_id?: string | undefined;
149
+ indexing_prefix?: string | undefined;
150
+ query_prefix?: string | undefined;
138
151
  }
139
152
  export interface FieldEmbed {
140
153
  from: FieldEmbedFromList;
@@ -143,33 +156,33 @@ export interface FieldEmbed {
143
156
  export interface Field {
144
157
  name: string;
145
158
  type: string;
146
- optional?: boolean;
147
- facet?: boolean;
148
- index?: boolean;
149
- locale?: string;
150
- sort?: boolean;
151
- infix?: boolean;
159
+ optional?: boolean | undefined;
160
+ facet?: boolean | undefined;
161
+ index?: boolean | undefined;
162
+ locale?: string | undefined;
163
+ sort?: boolean | undefined;
164
+ infix?: boolean | undefined;
152
165
  /** Name of a field in another collection that should be linked to this collection so that it can be joined during query. */
153
- reference?: string;
166
+ reference?: string | undefined;
154
167
  /** Allow documents to be indexed successfully even when the referenced document doesn't exist yet. */
155
- async_reference?: boolean;
156
- num_dim?: number;
157
- drop?: boolean;
168
+ async_reference?: boolean | undefined;
169
+ num_dim?: number | undefined;
170
+ drop?: boolean | undefined;
158
171
  /** When set to false, the field value will not be stored on disk. Default: true. */
159
- store?: boolean;
172
+ store?: boolean | undefined;
160
173
  /** The distance metric to be used for vector search. Default: `cosine`. You can also use `ip` for inner product. */
161
- vec_dist?: string;
174
+ vec_dist?: string | undefined;
162
175
  /** Enables an index optimized for range filtering on numerical fields (e.g. rating:>3.5). Default: false. */
163
- range_index?: boolean;
176
+ range_index?: boolean | undefined;
164
177
  /** Values are stemmed before indexing in-memory. Default: false. */
165
- stem?: boolean;
178
+ stem?: boolean | undefined;
166
179
  /** Name of the stemming dictionary to use for this field */
167
- stem_dictionary?: string;
180
+ stem_dictionary?: string | undefined;
168
181
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
169
- token_separators?: FieldTokenSeparatorsList;
182
+ token_separators?: FieldTokenSeparatorsList | undefined;
170
183
  /** List of symbols or special characters to be indexed. */
171
- symbols_to_index?: FieldSymbolsToIndexList;
172
- embed?: FieldEmbed;
184
+ symbols_to_index?: FieldSymbolsToIndexList | undefined;
185
+ embed?: FieldEmbed | undefined;
173
186
  }
174
187
  /** A list of fields for querying, filtering and faceting */
175
188
  export type CreateCollectionRequestFieldsList = Array<Field>;
@@ -181,7 +194,7 @@ export type CreateCollectionRequestSynonymSetsList = Array<string>;
181
194
  export type CreateCollectionRequestSymbolsToIndexList = Array<string>;
182
195
  /** Configuration for the voice query model */
183
196
  export interface VoiceQueryModelCollectionConfig {
184
- model_name?: string;
197
+ model_name?: string | undefined;
185
198
  }
186
199
  export interface CreateCollectionRequest {
187
200
  /** Name of the collection */
@@ -189,18 +202,18 @@ export interface CreateCollectionRequest {
189
202
  /** A list of fields for querying, filtering and faceting */
190
203
  fields: CreateCollectionRequestFieldsList;
191
204
  /** The name of an int32 / float field that determines the order in which the search results are ranked when a sort_by clause is not provided during searching. This field must indicate some kind of popularity. */
192
- default_sorting_field?: string;
205
+ default_sorting_field?: string | undefined;
193
206
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
194
- token_separators?: CreateCollectionRequestTokenSeparatorsList;
207
+ token_separators?: CreateCollectionRequestTokenSeparatorsList | undefined;
195
208
  /** List of synonym set names to associate with this collection */
196
- synonym_sets?: CreateCollectionRequestSynonymSetsList;
209
+ synonym_sets?: CreateCollectionRequestSynonymSetsList | undefined;
197
210
  /** Enables experimental support at a collection level for nested object or object array fields. This field is only available if the Typesense server is version `0.24.0.rcn34` or later. */
198
- enable_nested_fields?: boolean;
211
+ enable_nested_fields?: boolean | undefined;
199
212
  /** List of symbols or special characters to be indexed. */
200
- symbols_to_index?: CreateCollectionRequestSymbolsToIndexList;
201
- voice_query_model?: VoiceQueryModelCollectionConfig;
213
+ symbols_to_index?: CreateCollectionRequestSymbolsToIndexList | undefined;
214
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
202
215
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
203
- metadata?: unknown;
216
+ metadata?: unknown | undefined;
204
217
  }
205
218
  /** A list of fields for querying, filtering and faceting */
206
219
  export type CreateCollectionResponseFieldsList = Array<Field>;
@@ -216,18 +229,18 @@ export interface CreateCollectionResponse {
216
229
  /** A list of fields for querying, filtering and faceting */
217
230
  fields: CreateCollectionResponseFieldsList;
218
231
  /** The name of an int32 / float field that determines the order in which the search results are ranked when a sort_by clause is not provided during searching. This field must indicate some kind of popularity. */
219
- default_sorting_field?: string;
232
+ default_sorting_field?: string | undefined;
220
233
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
221
- token_separators?: CreateCollectionResponseTokenSeparatorsList;
234
+ token_separators?: CreateCollectionResponseTokenSeparatorsList | undefined;
222
235
  /** List of synonym set names to associate with this collection */
223
- synonym_sets?: CreateCollectionResponseSynonymSetsList;
236
+ synonym_sets?: CreateCollectionResponseSynonymSetsList | undefined;
224
237
  /** Enables experimental support at a collection level for nested object or object array fields. This field is only available if the Typesense server is version `0.24.0.rcn34` or later. */
225
- enable_nested_fields?: boolean;
238
+ enable_nested_fields?: boolean | undefined;
226
239
  /** List of symbols or special characters to be indexed. */
227
- symbols_to_index?: CreateCollectionResponseSymbolsToIndexList;
228
- voice_query_model?: VoiceQueryModelCollectionConfig;
240
+ symbols_to_index?: CreateCollectionResponseSymbolsToIndexList | undefined;
241
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
229
242
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
230
- metadata?: unknown;
243
+ metadata?: unknown | undefined;
231
244
  /** Number of documents in the collection */
232
245
  num_documents: number;
233
246
  /** Timestamp of when the collection was created (Unix epoch in seconds) */
@@ -235,23 +248,23 @@ export interface CreateCollectionResponse {
235
248
  }
236
249
  export interface CreateConversationModelRequest {
237
250
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
238
- id?: string;
251
+ id?: string | undefined;
239
252
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
240
253
  model_name: string;
241
254
  /** The LLM service's API Key */
242
- api_key?: string | import("effect/Redacted").Redacted<string>;
255
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
243
256
  /** Typesense collection that stores the historical conversations */
244
257
  history_collection: string;
245
258
  /** LLM service's account ID (only applicable for Cloudflare) */
246
- account_id?: string;
259
+ account_id?: string | undefined;
247
260
  /** The system prompt that contains special instructions to the LLM */
248
- system_prompt?: string;
261
+ system_prompt?: string | undefined;
249
262
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
250
- ttl?: number;
263
+ ttl?: number | undefined;
251
264
  /** The maximum number of bytes to send to the LLM in every API call. Consult the LLM's documentation on the number of bytes supported in the context window. */
252
265
  max_bytes: number;
253
266
  /** URL of vLLM service */
254
- vllm_url?: string;
267
+ vllm_url?: string | undefined;
255
268
  }
256
269
  export interface CreateConversationModelResponse {
257
270
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
@@ -259,127 +272,127 @@ export interface CreateConversationModelResponse {
259
272
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
260
273
  model_name: string;
261
274
  /** The LLM service's API Key */
262
- api_key?: string | import("effect/Redacted").Redacted<string>;
275
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
263
276
  /** Typesense collection that stores the historical conversations */
264
277
  history_collection: string;
265
278
  /** LLM service's account ID (only applicable for Cloudflare) */
266
- account_id?: string;
279
+ account_id?: string | undefined;
267
280
  /** The system prompt that contains special instructions to the LLM */
268
- system_prompt?: string;
281
+ system_prompt?: string | undefined;
269
282
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
270
- ttl?: number;
283
+ ttl?: number | undefined;
271
284
  /** The maximum number of bytes to send to the LLM in every API call. Consult the LLM's documentation on the number of bytes supported in the context window. */
272
285
  max_bytes: number;
273
286
  /** URL of vLLM service */
274
- vllm_url?: string;
287
+ vllm_url?: string | undefined;
275
288
  }
276
289
  export type CreateKeyRequestActionsList = Array<string>;
277
290
  export type CreateKeyRequestCollectionsList = Array<string>;
278
291
  export interface CreateKeyRequest {
279
- value?: string;
292
+ value?: string | undefined;
280
293
  description: string;
281
294
  actions: CreateKeyRequestActionsList;
282
295
  collections: CreateKeyRequestCollectionsList;
283
- expires_at?: number;
296
+ expires_at?: number | undefined;
284
297
  }
285
298
  export type CreateKeyResponseActionsList = Array<string>;
286
299
  export type CreateKeyResponseCollectionsList = Array<string>;
287
300
  export interface CreateKeyResponse {
288
- value?: string;
301
+ value?: string | undefined;
289
302
  description: string;
290
303
  actions: CreateKeyResponseActionsList;
291
304
  collections: CreateKeyResponseCollectionsList;
292
- expires_at?: number;
293
- id?: number;
294
- value_prefix?: string;
305
+ expires_at?: number | undefined;
306
+ id?: number | undefined;
307
+ value_prefix?: string | undefined;
295
308
  }
296
309
  /** Stop sequences for the NL model (Google-specific) */
297
310
  export type CreateNLSearchModelRequestStopSequencesList = Array<string>;
298
311
  export interface CreateNLSearchModelRequest {
299
312
  /** Name of the NL model to use */
300
- model_name?: string;
313
+ model_name?: string | undefined;
301
314
  /** API key for the NL model service */
302
- api_key?: string | import("effect/Redacted").Redacted<string>;
315
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
303
316
  /** Custom API URL for the NL model service */
304
- api_url?: string;
317
+ api_url?: string | undefined;
305
318
  /** Maximum number of bytes to process */
306
- max_bytes?: number;
319
+ max_bytes?: number | undefined;
307
320
  /** Temperature parameter for the NL model */
308
- temperature?: number;
321
+ temperature?: number | undefined;
309
322
  /** System prompt for the NL model */
310
- system_prompt?: string;
323
+ system_prompt?: string | undefined;
311
324
  /** Top-p parameter for the NL model (Google-specific) */
312
- top_p?: number;
325
+ top_p?: number | undefined;
313
326
  /** Top-k parameter for the NL model (Google-specific) */
314
- top_k?: number;
327
+ top_k?: number | undefined;
315
328
  /** Stop sequences for the NL model (Google-specific) */
316
- stop_sequences?: CreateNLSearchModelRequestStopSequencesList;
329
+ stop_sequences?: CreateNLSearchModelRequestStopSequencesList | undefined;
317
330
  /** API version for the NL model service */
318
- api_version?: string;
331
+ api_version?: string | undefined;
319
332
  /** Project ID for GCP Vertex AI */
320
- project_id?: string;
333
+ project_id?: string | undefined;
321
334
  /** Access token for GCP Vertex AI */
322
- access_token?: string | import("effect/Redacted").Redacted<string>;
335
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
323
336
  /** Refresh token for GCP Vertex AI */
324
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
337
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
325
338
  /** Client ID for GCP Vertex AI */
326
- client_id?: string;
339
+ client_id?: string | undefined;
327
340
  /** Client secret for GCP Vertex AI */
328
- client_secret?: string | import("effect/Redacted").Redacted<string>;
341
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
329
342
  /** Region for GCP Vertex AI */
330
- region?: string;
343
+ region?: string | undefined;
331
344
  /** Maximum output tokens for GCP Vertex AI */
332
- max_output_tokens?: number;
345
+ max_output_tokens?: number | undefined;
333
346
  /** Account ID for Cloudflare-specific models */
334
- account_id?: string;
347
+ account_id?: string | undefined;
335
348
  /** Optional ID for the NL search model */
336
- id?: string;
349
+ id?: string | undefined;
337
350
  }
338
351
  /** Stop sequences for the NL model (Google-specific) */
339
352
  export type CreateNLSearchModelResponseStopSequencesList = Array<string>;
340
353
  export interface CreateNLSearchModelResponse {
341
354
  /** Name of the NL model to use */
342
- model_name?: string;
355
+ model_name?: string | undefined;
343
356
  /** API key for the NL model service */
344
- api_key?: string | import("effect/Redacted").Redacted<string>;
357
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
345
358
  /** Custom API URL for the NL model service */
346
- api_url?: string;
359
+ api_url?: string | undefined;
347
360
  /** Maximum number of bytes to process */
348
- max_bytes?: number;
361
+ max_bytes?: number | undefined;
349
362
  /** Temperature parameter for the NL model */
350
- temperature?: number;
363
+ temperature?: number | undefined;
351
364
  /** System prompt for the NL model */
352
- system_prompt?: string;
365
+ system_prompt?: string | undefined;
353
366
  /** Top-p parameter for the NL model (Google-specific) */
354
- top_p?: number;
367
+ top_p?: number | undefined;
355
368
  /** Top-k parameter for the NL model (Google-specific) */
356
- top_k?: number;
369
+ top_k?: number | undefined;
357
370
  /** Stop sequences for the NL model (Google-specific) */
358
- stop_sequences?: CreateNLSearchModelResponseStopSequencesList;
371
+ stop_sequences?: CreateNLSearchModelResponseStopSequencesList | undefined;
359
372
  /** API version for the NL model service */
360
- api_version?: string;
373
+ api_version?: string | undefined;
361
374
  /** Project ID for GCP Vertex AI */
362
- project_id?: string;
375
+ project_id?: string | undefined;
363
376
  /** Access token for GCP Vertex AI */
364
- access_token?: string | import("effect/Redacted").Redacted<string>;
377
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
365
378
  /** Refresh token for GCP Vertex AI */
366
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
379
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
367
380
  /** Client ID for GCP Vertex AI */
368
- client_id?: string;
381
+ client_id?: string | undefined;
369
382
  /** Client secret for GCP Vertex AI */
370
- client_secret?: string | import("effect/Redacted").Redacted<string>;
383
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
371
384
  /** Region for GCP Vertex AI */
372
- region?: string;
385
+ region?: string | undefined;
373
386
  /** Maximum output tokens for GCP Vertex AI */
374
- max_output_tokens?: number;
387
+ max_output_tokens?: number | undefined;
375
388
  /** Account ID for Cloudflare-specific models */
376
- account_id?: string;
389
+ account_id?: string | undefined;
377
390
  /** Optional ID for the NL search model */
378
391
  id: string;
379
392
  }
380
393
  export interface DebugRequest {}
381
394
  export interface DebugResponse {
382
- version?: string;
395
+ version?: string | undefined;
383
396
  }
384
397
  export interface DeleteAliasRequest {
385
398
  /** The name of the alias to delete */
@@ -397,21 +410,21 @@ export interface DeleteAnalyticsRuleRequest {
397
410
  }
398
411
  export type DeleteAnalyticsRuleResponseParamsMetaFieldsList = Array<string>;
399
412
  export interface DeleteAnalyticsRuleResponseParams {
400
- destination_collection?: string;
401
- limit?: number;
402
- capture_search_requests?: boolean;
403
- meta_fields?: DeleteAnalyticsRuleResponseParamsMetaFieldsList;
404
- expand_query?: boolean;
405
- counter_field?: string;
406
- weight?: number;
413
+ destination_collection?: string | undefined;
414
+ limit?: number | undefined;
415
+ capture_search_requests?: boolean | undefined;
416
+ meta_fields?: DeleteAnalyticsRuleResponseParamsMetaFieldsList | undefined;
417
+ expand_query?: boolean | undefined;
418
+ counter_field?: string | undefined;
419
+ weight?: number | undefined;
407
420
  }
408
421
  export interface DeleteAnalyticsRuleResponse {
409
422
  name: string;
410
423
  type: AnalyticsRuleType;
411
424
  collection: string;
412
425
  event_type: string;
413
- rule_tag?: string;
414
- params?: DeleteAnalyticsRuleResponseParams;
426
+ rule_tag?: string | undefined;
427
+ params?: DeleteAnalyticsRuleResponseParams | undefined;
415
428
  }
416
429
  export interface DeleteCollectionRequest {
417
430
  /** The name of the collection to delete */
@@ -431,18 +444,18 @@ export interface DeleteCollectionResponse {
431
444
  /** A list of fields for querying, filtering and faceting */
432
445
  fields: DeleteCollectionResponseFieldsList;
433
446
  /** The name of an int32 / float field that determines the order in which the search results are ranked when a sort_by clause is not provided during searching. This field must indicate some kind of popularity. */
434
- default_sorting_field?: string;
447
+ default_sorting_field?: string | undefined;
435
448
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
436
- token_separators?: DeleteCollectionResponseTokenSeparatorsList;
449
+ token_separators?: DeleteCollectionResponseTokenSeparatorsList | undefined;
437
450
  /** List of synonym set names to associate with this collection */
438
- synonym_sets?: DeleteCollectionResponseSynonymSetsList;
451
+ synonym_sets?: DeleteCollectionResponseSynonymSetsList | undefined;
439
452
  /** Enables experimental support at a collection level for nested object or object array fields. This field is only available if the Typesense server is version `0.24.0.rcn34` or later. */
440
- enable_nested_fields?: boolean;
453
+ enable_nested_fields?: boolean | undefined;
441
454
  /** List of symbols or special characters to be indexed. */
442
- symbols_to_index?: DeleteCollectionResponseSymbolsToIndexList;
443
- voice_query_model?: VoiceQueryModelCollectionConfig;
455
+ symbols_to_index?: DeleteCollectionResponseSymbolsToIndexList | undefined;
456
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
444
457
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
445
- metadata?: unknown;
458
+ metadata?: unknown | undefined;
446
459
  /** Number of documents in the collection */
447
460
  num_documents: number;
448
461
  /** Timestamp of when the collection was created (Unix epoch in seconds) */
@@ -458,19 +471,19 @@ export interface DeleteConversationModelResponse {
458
471
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
459
472
  model_name: string;
460
473
  /** The LLM service's API Key */
461
- api_key?: string | import("effect/Redacted").Redacted<string>;
474
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
462
475
  /** Typesense collection that stores the historical conversations */
463
476
  history_collection: string;
464
477
  /** LLM service's account ID (only applicable for Cloudflare) */
465
- account_id?: string;
478
+ account_id?: string | undefined;
466
479
  /** The system prompt that contains special instructions to the LLM */
467
- system_prompt?: string;
480
+ system_prompt?: string | undefined;
468
481
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
469
- ttl?: number;
482
+ ttl?: number | undefined;
470
483
  /** The maximum number of bytes to send to the LLM in every API call. Consult the LLM's documentation on the number of bytes supported in the context window. */
471
484
  max_bytes: number;
472
485
  /** URL of vLLM service */
473
- vllm_url?: string;
486
+ vllm_url?: string | undefined;
474
487
  }
475
488
  export interface DeleteCurationSetRequest {
476
489
  /** The name of the curation set to delete */
@@ -500,15 +513,15 @@ export type DeleteDocumentResponse = unknown;
500
513
  export interface DeleteDocumentsRequestDeleteDocumentsParameters {
501
514
  filter_by: string;
502
515
  /** Batch size parameter controls the number of documents that should be deleted at a time. A larger value will speed up deletions, but will impact performance of other operations running on the server. */
503
- batch_size?: number;
504
- ignore_not_found?: boolean;
516
+ batch_size?: number | undefined;
517
+ ignore_not_found?: boolean | undefined;
505
518
  /** When true, removes all documents from the collection while preserving the collection and its schema. */
506
- truncate?: boolean;
519
+ truncate?: boolean | undefined;
507
520
  }
508
521
  export interface DeleteDocumentsRequest {
509
522
  /** The name of the collection to delete documents from */
510
523
  collectionName: string;
511
- deleteDocumentsParameters?: DeleteDocumentsRequestDeleteDocumentsParameters;
524
+ deleteDocumentsParameters?: DeleteDocumentsRequestDeleteDocumentsParameters | undefined;
512
525
  }
513
526
  export interface DeleteDocumentsResponse {
514
527
  num_deleted: number;
@@ -563,16 +576,16 @@ export interface SynonymItemDeleteSchema {
563
576
  }
564
577
  export interface ExportDocumentsRequestExportDocumentsParameters {
565
578
  /** Filter conditions for refining your search results. Separate multiple conditions with &&. */
566
- filter_by?: string;
579
+ filter_by?: string | undefined;
567
580
  /** List of fields from the document to include in the search result */
568
- include_fields?: string;
581
+ include_fields?: string | undefined;
569
582
  /** List of fields from the document to exclude in the search result */
570
- exclude_fields?: string;
583
+ exclude_fields?: string | undefined;
571
584
  }
572
585
  export interface ExportDocumentsRequest {
573
586
  /** The name of the collection */
574
587
  collectionName: string;
575
- exportDocumentsParameters?: ExportDocumentsRequestExportDocumentsParameters;
588
+ exportDocumentsParameters?: ExportDocumentsRequestExportDocumentsParameters | undefined;
576
589
  }
577
590
  export interface ExportDocumentsResponse {}
578
591
  export interface FlushAnalyticsRequest {}
@@ -592,19 +605,19 @@ export interface ConversationModelSchema {
592
605
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
593
606
  model_name: string;
594
607
  /** The LLM service's API Key */
595
- api_key?: string | import("effect/Redacted").Redacted<string>;
608
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
596
609
  /** Typesense collection that stores the historical conversations */
597
610
  history_collection: string;
598
611
  /** LLM service's account ID (only applicable for Cloudflare) */
599
- account_id?: string;
612
+ account_id?: string | undefined;
600
613
  /** The system prompt that contains special instructions to the LLM */
601
- system_prompt?: string;
614
+ system_prompt?: string | undefined;
602
615
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
603
- ttl?: number;
616
+ ttl?: number | undefined;
604
617
  /** The maximum number of bytes to send to the LLM in every API call. Consult the LLM's documentation on the number of bytes supported in the context window. */
605
618
  max_bytes: number;
606
619
  /** URL of vLLM service */
607
- vllm_url?: string;
620
+ vllm_url?: string | undefined;
608
621
  }
609
622
  export type GetAllConversationModelsResponseBodyList = Array<ConversationModelSchema>;
610
623
  export type GetAllConversationModelsResponse = GetAllConversationModelsResponseBodyList;
@@ -613,41 +626,41 @@ export interface GetAllNLSearchModelsRequest {}
613
626
  export type NLSearchModelSchemaStopSequencesList = Array<string>;
614
627
  export interface NLSearchModelSchema {
615
628
  /** Name of the NL model to use */
616
- model_name?: string;
629
+ model_name?: string | undefined;
617
630
  /** API key for the NL model service */
618
- api_key?: string | import("effect/Redacted").Redacted<string>;
631
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
619
632
  /** Custom API URL for the NL model service */
620
- api_url?: string;
633
+ api_url?: string | undefined;
621
634
  /** Maximum number of bytes to process */
622
- max_bytes?: number;
635
+ max_bytes?: number | undefined;
623
636
  /** Temperature parameter for the NL model */
624
- temperature?: number;
637
+ temperature?: number | undefined;
625
638
  /** System prompt for the NL model */
626
- system_prompt?: string;
639
+ system_prompt?: string | undefined;
627
640
  /** Top-p parameter for the NL model (Google-specific) */
628
- top_p?: number;
641
+ top_p?: number | undefined;
629
642
  /** Top-k parameter for the NL model (Google-specific) */
630
- top_k?: number;
643
+ top_k?: number | undefined;
631
644
  /** Stop sequences for the NL model (Google-specific) */
632
- stop_sequences?: NLSearchModelSchemaStopSequencesList;
645
+ stop_sequences?: NLSearchModelSchemaStopSequencesList | undefined;
633
646
  /** API version for the NL model service */
634
- api_version?: string;
647
+ api_version?: string | undefined;
635
648
  /** Project ID for GCP Vertex AI */
636
- project_id?: string;
649
+ project_id?: string | undefined;
637
650
  /** Access token for GCP Vertex AI */
638
- access_token?: string | import("effect/Redacted").Redacted<string>;
651
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
639
652
  /** Refresh token for GCP Vertex AI */
640
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
653
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
641
654
  /** Client ID for GCP Vertex AI */
642
- client_id?: string;
655
+ client_id?: string | undefined;
643
656
  /** Client secret for GCP Vertex AI */
644
- client_secret?: string | import("effect/Redacted").Redacted<string>;
657
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
645
658
  /** Region for GCP Vertex AI */
646
- region?: string;
659
+ region?: string | undefined;
647
660
  /** Maximum output tokens for GCP Vertex AI */
648
- max_output_tokens?: number;
661
+ max_output_tokens?: number | undefined;
649
662
  /** Account ID for Cloudflare-specific models */
650
- account_id?: string;
663
+ account_id?: string | undefined;
651
664
  /** Optional ID for the NL search model */
652
665
  id: string;
653
666
  }
@@ -658,326 +671,326 @@ export interface GetAllPresetsRequest {}
658
671
  export type DropTokensMode = "right_to_left" | "left_to_right" | "both_sides:3";
659
672
  export interface SearchParameters {
660
673
  /** The query text to search for in the collection. Use * as the search string to return all documents. This is typically useful when used in conjunction with filter_by. */
661
- q?: string;
674
+ q?: string | undefined;
662
675
  /** A list of `string` fields that should be queried against. Multiple fields are separated with a comma. */
663
- query_by?: string;
676
+ query_by?: string | undefined;
664
677
  /** Controls whether Typesense should validate if the fields exist in the schema. When set to false, Typesense will not throw an error if a field is missing. This is useful for programmatic grouping where not all fields may exist. */
665
- validate_field_names?: boolean;
678
+ validate_field_names?: boolean | undefined;
666
679
  /** Whether to use natural language processing to parse the query. */
667
- nl_query?: boolean;
680
+ nl_query?: boolean | undefined;
668
681
  /** The ID of the natural language model to use. */
669
- nl_model_id?: string;
682
+ nl_model_id?: string | undefined;
670
683
  /** The relative weight to give each `query_by` field when ranking results. This can be used to boost fields in priority, when looking for matches. Multiple fields are separated with a comma. */
671
- query_by_weights?: string;
684
+ query_by_weights?: string | undefined;
672
685
  /** In a multi-field matching context, this parameter determines how the representative text match score of a record is calculated. Possible values are max_score (default) or max_weight. */
673
- text_match_type?: string;
686
+ text_match_type?: string | undefined;
674
687
  /** Boolean field to indicate that the last word in the query should be treated as a prefix, and not as a whole word. This is used for building autocomplete and instant search interfaces. Defaults to true. */
675
- prefix?: string;
688
+ prefix?: string | undefined;
676
689
  /** If infix index is enabled for this field, infix searching can be done on a per-field basis by sending a comma separated string parameter called infix to the search query. This parameter can have 3 values; `off` infix search is disabled, which is default `always` infix search is performed along with regular search `fallback` infix search is performed if regular search does not produce results */
677
- infix?: string;
690
+ infix?: string | undefined;
678
691
  /** There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match. */
679
- max_extra_prefix?: number;
692
+ max_extra_prefix?: number | undefined;
680
693
  /** There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match. */
681
- max_extra_suffix?: number;
694
+ max_extra_suffix?: number | undefined;
682
695
  /** Filter conditions for refining your open api validator search results. Separate multiple conditions with &&. */
683
- filter_by?: string;
696
+ filter_by?: string | undefined;
684
697
  /** Applies the filtering operation incrementally / lazily. Set this to true when you are potentially filtering on large values but the tokens in the query are expected to match very few documents. Default: false */
685
- enable_lazy_filter?: boolean;
698
+ enable_lazy_filter?: boolean | undefined;
686
699
  /** Controls the number of similar words that Typesense considers during fuzzy search on filter_by values. Useful for controlling prefix matches like company_name:Acm*. */
687
- max_filter_by_candidates?: number;
700
+ max_filter_by_candidates?: number | undefined;
688
701
  /** A list of numerical fields and their corresponding sort orders that will be used for ordering your results. Up to 3 sort fields can be specified. The text similarity score is exposed as a special `_text_match` field that you can use in the list of sorting fields. If no `sort_by` parameter is specified, results are sorted by `_text_match:desc,default_sorting_field:desc` */
689
- sort_by?: string;
702
+ sort_by?: string | undefined;
690
703
  /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
691
- facet_by?: string;
704
+ facet_by?: string | undefined;
692
705
  /** Maximum number of facet values to be returned. */
693
- max_facet_values?: number;
706
+ max_facet_values?: number | undefined;
694
707
  /** Facet values that are returned can now be filtered via this parameter. The matching facet text is also highlighted. For example, when faceting by `category`, you can set `facet_query=category:shoe` to return only facet values that contain the prefix "shoe". */
695
- facet_query?: string;
708
+ facet_query?: string | undefined;
696
709
  /** Controls the fuzziness of the facet query filter. Default: 2. */
697
- facet_query_num_typos?: number;
710
+ facet_query_num_typos?: number | undefined;
698
711
  /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
699
- num_typos?: string;
712
+ num_typos?: string | undefined;
700
713
  /** Results from this specific page number would be fetched. */
701
- page?: number;
714
+ page?: number | undefined;
702
715
  /** Number of results to fetch per page. Default: 10 */
703
- per_page?: number;
716
+ per_page?: number | undefined;
704
717
  /** Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10. */
705
- limit?: number;
718
+ limit?: number | undefined;
706
719
  /** Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter. */
707
- offset?: number;
720
+ offset?: number | undefined;
708
721
  /** You can aggregate search results into groups or buckets by specify one or more `group_by` fields. Separate multiple fields with a comma. To group on a particular field, it must be a faceted field. */
709
- group_by?: string;
722
+ group_by?: string | undefined;
710
723
  /** Maximum number of hits to be returned for every group. If the `group_limit` is set as `K` then only the top K hits in each group are returned in the response. Default: 3 */
711
- group_limit?: number;
724
+ group_limit?: number | undefined;
712
725
  /** Setting this parameter to true will place all documents that have a null value in the group_by field, into a single group. Setting this parameter to false, will cause each document with a null value in the group_by field to not be grouped with other documents. Default: true */
713
- group_missing_values?: boolean;
726
+ group_missing_values?: boolean | undefined;
714
727
  /** Overrides the behavior of group_by queries where found value is an approximation. When group_max_candidates is passed, found will be accurate up until its value. */
715
- group_max_candidates?: number;
728
+ group_max_candidates?: number | undefined;
716
729
  /** List of fields from the document to include in the search result */
717
- include_fields?: string;
730
+ include_fields?: string | undefined;
718
731
  /** List of fields from the document to exclude in the search result */
719
- exclude_fields?: string;
732
+ exclude_fields?: string | undefined;
720
733
  /** List of fields which should be highlighted fully without snippeting */
721
- highlight_full_fields?: string;
734
+ highlight_full_fields?: string | undefined;
722
735
  /** The number of tokens that should surround the highlighted text on each side. Default: 4 */
723
- highlight_affix_num_tokens?: number;
736
+ highlight_affix_num_tokens?: number | undefined;
724
737
  /** The start tag used for the highlighted snippets. Default: `<mark>` */
725
- highlight_start_tag?: string;
738
+ highlight_start_tag?: string | undefined;
726
739
  /** The end tag used for the highlighted snippets. Default: `</mark>` */
727
- highlight_end_tag?: string;
740
+ highlight_end_tag?: string | undefined;
728
741
  /** Flag for enabling/disabling the deprecated, old highlight structure in the response. Default: true */
729
- enable_highlight_v1?: boolean;
742
+ enable_highlight_v1?: boolean | undefined;
730
743
  /** Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script). */
731
- enable_analytics?: boolean;
744
+ enable_analytics?: boolean | undefined;
732
745
  /** Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 */
733
- snippet_threshold?: number;
746
+ snippet_threshold?: number | undefined;
734
747
  /** List of synonym set names to associate with this search query */
735
- synonym_sets?: string;
748
+ synonym_sets?: string | undefined;
736
749
  /** If the number of results found for a specific query is less than this number, Typesense will attempt to drop the tokens in the query until enough results are found. Tokens that have the least individual hits are dropped first. Set to 0 to disable. Default: 10 */
737
- drop_tokens_threshold?: number;
738
- drop_tokens_mode?: DropTokensMode | (string & {});
750
+ drop_tokens_threshold?: number | undefined;
751
+ drop_tokens_mode?: DropTokensMode | (string & {}) | undefined;
739
752
  /** If the number of results found for a specific query is less than this number, Typesense will attempt to look for tokens with more typos until enough results are found. Default: 100 */
740
- typo_tokens_threshold?: number;
753
+ typo_tokens_threshold?: number | undefined;
741
754
  /** Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. */
742
- enable_typos_for_alpha_numerical_tokens?: boolean;
755
+ enable_typos_for_alpha_numerical_tokens?: boolean | undefined;
743
756
  /** Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false */
744
- filter_curated_hits?: boolean;
757
+ filter_curated_hits?: boolean | undefined;
745
758
  /** If you have some synonyms defined but want to disable all of them for a particular search query, set enable_synonyms to false. Default: true */
746
- enable_synonyms?: boolean;
759
+ enable_synonyms?: boolean | undefined;
747
760
  /** Allow synonym resolution on word prefixes in the query. Default: false */
748
- synonym_prefix?: boolean;
761
+ synonym_prefix?: boolean | undefined;
749
762
  /** When set to true, search results that matched via synonyms will be demoted in ranking, appearing below results that have a direct match. Default: false */
750
- demote_synonym_match?: boolean;
763
+ demote_synonym_match?: boolean | undefined;
751
764
  /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
752
- synonym_num_typos?: number;
765
+ synonym_num_typos?: number | undefined;
753
766
  /** A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`. You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`. */
754
- pinned_hits?: string;
767
+ pinned_hits?: string | undefined;
755
768
  /** A list of records to unconditionally hide from search results. A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456, you'd specify `123,456`. You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`. */
756
- hidden_hits?: string;
769
+ hidden_hits?: string | undefined;
757
770
  /** Comma separated list of tags to trigger the curations rules that match the tags. */
758
- curation_tags?: string;
771
+ curation_tags?: string | undefined;
759
772
  /** A list of custom fields that must be highlighted even if you don't query for them */
760
- highlight_fields?: string;
773
+ highlight_fields?: string | undefined;
761
774
  /** When true, computes both text match and vector distance scores for all matches in hybrid search. Documents found only through keyword search will get a vector distance score, and documents found only through vector search will get a text match score. */
762
- rerank_hybrid_matches?: boolean;
775
+ rerank_hybrid_matches?: boolean | undefined;
763
776
  /** Treat space as typo: search for q=basket ball if q=basketball is not found or vice-versa. Splitting/joining of tokens will only be attempted if the original query produces no results. To always trigger this behavior, set value to `always``. To disable, set value to `off`. Default is `fallback`. */
764
- split_join_tokens?: string;
777
+ split_join_tokens?: string | undefined;
765
778
  /** You can index content from any logographic language into Typesense if you are able to segment / split the text into space-separated words yourself before indexing and querying. Set this parameter to true to do the same */
766
- pre_segmented_query?: boolean;
779
+ pre_segmented_query?: boolean | undefined;
767
780
  /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
768
- preset?: string;
781
+ preset?: string | undefined;
769
782
  /** If you have some curation sets defined but want to disable all of them during query time, you can do that by setting this parameter to false */
770
- enable_curations?: boolean;
783
+ enable_curations?: boolean | undefined;
771
784
  /** Set this parameter to true to ensure that an exact match is ranked above the others */
772
- prioritize_exact_match?: boolean;
785
+ prioritize_exact_match?: boolean | undefined;
773
786
  /** Control the number of words that Typesense considers for typo and prefix searching. */
774
- max_candidates?: number;
787
+ max_candidates?: number | undefined;
775
788
  /** Make Typesense prioritize documents where the query words appear earlier in the text. */
776
- prioritize_token_position?: boolean;
789
+ prioritize_token_position?: boolean | undefined;
777
790
  /** Make Typesense prioritize documents where the query words appear in more number of fields. */
778
- prioritize_num_matching_fields?: boolean;
791
+ prioritize_num_matching_fields?: boolean | undefined;
779
792
  /** Make Typesense disable typos for numerical tokens. */
780
- enable_typos_for_numerical_tokens?: boolean;
793
+ enable_typos_for_numerical_tokens?: boolean | undefined;
781
794
  /** Setting this to true will make Typesense consider all prefixes and typo corrections of the words in the query without stopping early when enough results are found (drop_tokens_threshold and typo_tokens_threshold configurations are ignored). */
782
- exhaustive_search?: boolean;
795
+ exhaustive_search?: boolean | undefined;
783
796
  /** Typesense will attempt to return results early if the cutoff time has elapsed. This is not a strict guarantee and facet computation is not bound by this parameter. */
784
- search_cutoff_ms?: number;
797
+ search_cutoff_ms?: number | undefined;
785
798
  /** Maximum number of hits that can be fetched from the collection. page * per_page should be less than this number for the search request to return results. */
786
- limit_hits?: number;
799
+ limit_hits?: number | undefined;
787
800
  /** Enable server side caching of search query results. By default, caching is disabled. */
788
- use_cache?: boolean;
801
+ use_cache?: boolean | undefined;
789
802
  /** The duration (in seconds) that determines how long the search query is cached. This value can be set on a per-query basis. Default: 60. */
790
- cache_ttl?: number;
803
+ cache_ttl?: number | undefined;
791
804
  /** Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
792
- min_len_1typo?: number;
805
+ min_len_1typo?: number | undefined;
793
806
  /** Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
794
- min_len_2typo?: number;
807
+ min_len_2typo?: number | undefined;
795
808
  /** Vector query expression for fetching documents "closest" to a given query/document vector. */
796
- vector_query?: string;
809
+ vector_query?: string | undefined;
797
810
  /** Timeout (in milliseconds) for fetching remote embeddings. */
798
- remote_embedding_timeout_ms?: number;
811
+ remote_embedding_timeout_ms?: number | undefined;
799
812
  /** Number of times to retry fetching remote embeddings. */
800
- remote_embedding_num_tries?: number;
813
+ remote_embedding_num_tries?: number | undefined;
801
814
  /** Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default). */
802
- facet_strategy?: string;
815
+ facet_strategy?: string | undefined;
803
816
  /** Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query. */
804
- stopwords?: string;
817
+ stopwords?: string | undefined;
805
818
  /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
806
- facet_return_parent?: string;
819
+ facet_return_parent?: string | undefined;
807
820
  /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
808
- facet_sample_percent?: number;
821
+ facet_sample_percent?: number | undefined;
809
822
  /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
810
- facet_sample_threshold?: number;
823
+ facet_sample_threshold?: number | undefined;
811
824
  /** Controls how steeply facet_sample_percent falls as the collection grows. facet_sample_threshold should be non-zero for facet_sample_slope to be effective. Default: 0. */
812
- facet_sample_slope?: number;
825
+ facet_sample_slope?: number | undefined;
813
826
  /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
814
- voice_query?: string;
827
+ voice_query?: string | undefined;
815
828
  /** Enable conversational search. */
816
- conversation?: boolean;
829
+ conversation?: boolean | undefined;
817
830
  /** The Id of Conversation Model to be used. */
818
- conversation_model_id?: string;
831
+ conversation_model_id?: string | undefined;
819
832
  /** The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM. */
820
- conversation_id?: string;
833
+ conversation_id?: string | undefined;
821
834
  }
822
835
  export interface MultiSearchCollectionParameters {
823
836
  /** The query text to search for in the collection. Use * as the search string to return all documents. This is typically useful when used in conjunction with filter_by. */
824
- q?: string;
837
+ q?: string | undefined;
825
838
  /** A list of `string` fields that should be queried against. Multiple fields are separated with a comma. */
826
- query_by?: string;
839
+ query_by?: string | undefined;
827
840
  /** The relative weight to give each `query_by` field when ranking results. This can be used to boost fields in priority, when looking for matches. Multiple fields are separated with a comma. */
828
- query_by_weights?: string;
841
+ query_by_weights?: string | undefined;
829
842
  /** In a multi-field matching context, this parameter determines how the representative text match score of a record is calculated. Possible values are max_score (default) or max_weight. */
830
- text_match_type?: string;
843
+ text_match_type?: string | undefined;
831
844
  /** Boolean field to indicate that the last word in the query should be treated as a prefix, and not as a whole word. This is used for building autocomplete and instant search interfaces. Defaults to true. */
832
- prefix?: string;
845
+ prefix?: string | undefined;
833
846
  /** If infix index is enabled for this field, infix searching can be done on a per-field basis by sending a comma separated string parameter called infix to the search query. This parameter can have 3 values; `off` infix search is disabled, which is default `always` infix search is performed along with regular search `fallback` infix search is performed if regular search does not produce results */
834
- infix?: string;
847
+ infix?: string | undefined;
835
848
  /** There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match. */
836
- max_extra_prefix?: number;
849
+ max_extra_prefix?: number | undefined;
837
850
  /** There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match. */
838
- max_extra_suffix?: number;
851
+ max_extra_suffix?: number | undefined;
839
852
  /** Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&. */
840
- filter_by?: string;
853
+ filter_by?: string | undefined;
841
854
  /** Applies the filtering operation incrementally / lazily. Set this to true when you are potentially filtering on large values but the tokens in the query are expected to match very few documents. Default: false */
842
- enable_lazy_filter?: boolean;
855
+ enable_lazy_filter?: boolean | undefined;
843
856
  /** Controls the number of similar words that Typesense considers during fuzzy search on filter_by values. Useful for controlling prefix matches like company_name:Acm*. */
844
- max_filter_by_candidates?: number;
857
+ max_filter_by_candidates?: number | undefined;
845
858
  /** A list of numerical fields and their corresponding sort orders that will be used for ordering your results. Up to 3 sort fields can be specified. The text similarity score is exposed as a special `_text_match` field that you can use in the list of sorting fields. If no `sort_by` parameter is specified, results are sorted by `_text_match:desc,default_sorting_field:desc` */
846
- sort_by?: string;
859
+ sort_by?: string | undefined;
847
860
  /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
848
- facet_by?: string;
861
+ facet_by?: string | undefined;
849
862
  /** Maximum number of facet values to be returned. */
850
- max_facet_values?: number;
863
+ max_facet_values?: number | undefined;
851
864
  /** Facet values that are returned can now be filtered via this parameter. The matching facet text is also highlighted. For example, when faceting by `category`, you can set `facet_query=category:shoe` to return only facet values that contain the prefix "shoe". */
852
- facet_query?: string;
865
+ facet_query?: string | undefined;
853
866
  /** Controls the fuzziness of the facet query filter. Default: 2. */
854
- facet_query_num_typos?: number;
867
+ facet_query_num_typos?: number | undefined;
855
868
  /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
856
- num_typos?: string;
869
+ num_typos?: string | undefined;
857
870
  /** Results from this specific page number would be fetched. */
858
- page?: number;
871
+ page?: number | undefined;
859
872
  /** Number of results to fetch per page. Default: 10 */
860
- per_page?: number;
873
+ per_page?: number | undefined;
861
874
  /** Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10. */
862
- limit?: number;
875
+ limit?: number | undefined;
863
876
  /** Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter. */
864
- offset?: number;
877
+ offset?: number | undefined;
865
878
  /** You can aggregate search results into groups or buckets by specify one or more `group_by` fields. Separate multiple fields with a comma. To group on a particular field, it must be a faceted field. */
866
- group_by?: string;
879
+ group_by?: string | undefined;
867
880
  /** Maximum number of hits to be returned for every group. If the `group_limit` is set as `K` then only the top K hits in each group are returned in the response. Default: 3 */
868
- group_limit?: number;
881
+ group_limit?: number | undefined;
869
882
  /** Setting this parameter to true will place all documents that have a null value in the group_by field, into a single group. Setting this parameter to false, will cause each document with a null value in the group_by field to not be grouped with other documents. Default: true */
870
- group_missing_values?: boolean;
883
+ group_missing_values?: boolean | undefined;
871
884
  /** Overrides the behavior of group_by queries where found value is an approximation. When group_max_candidates is passed, found will be accurate up until its value. */
872
- group_max_candidates?: number;
885
+ group_max_candidates?: number | undefined;
873
886
  /** List of fields from the document to include in the search result */
874
- include_fields?: string;
887
+ include_fields?: string | undefined;
875
888
  /** List of fields from the document to exclude in the search result */
876
- exclude_fields?: string;
889
+ exclude_fields?: string | undefined;
877
890
  /** List of fields which should be highlighted fully without snippeting */
878
- highlight_full_fields?: string;
891
+ highlight_full_fields?: string | undefined;
879
892
  /** The number of tokens that should surround the highlighted text on each side. Default: 4 */
880
- highlight_affix_num_tokens?: number;
893
+ highlight_affix_num_tokens?: number | undefined;
881
894
  /** The start tag used for the highlighted snippets. Default: `<mark>` */
882
- highlight_start_tag?: string;
895
+ highlight_start_tag?: string | undefined;
883
896
  /** The end tag used for the highlighted snippets. Default: `</mark>` */
884
- highlight_end_tag?: string;
897
+ highlight_end_tag?: string | undefined;
885
898
  /** Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 */
886
- snippet_threshold?: number;
899
+ snippet_threshold?: number | undefined;
887
900
  /** If the number of results found for a specific query is less than this number, Typesense will attempt to drop the tokens in the query until enough results are found. Tokens that have the least individual hits are dropped first. Set to 0 to disable. Default: 10 */
888
- drop_tokens_threshold?: number;
889
- drop_tokens_mode?: DropTokensMode | (string & {});
901
+ drop_tokens_threshold?: number | undefined;
902
+ drop_tokens_mode?: DropTokensMode | (string & {}) | undefined;
890
903
  /** If the number of results found for a specific query is less than this number, Typesense will attempt to look for tokens with more typos until enough results are found. Default: 100 */
891
- typo_tokens_threshold?: number;
904
+ typo_tokens_threshold?: number | undefined;
892
905
  /** Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. */
893
- enable_typos_for_alpha_numerical_tokens?: boolean;
906
+ enable_typos_for_alpha_numerical_tokens?: boolean | undefined;
894
907
  /** Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false */
895
- filter_curated_hits?: boolean;
908
+ filter_curated_hits?: boolean | undefined;
896
909
  /** If you have some synonyms defined but want to disable all of them for a particular search query, set enable_synonyms to false. Default: true */
897
- enable_synonyms?: boolean;
910
+ enable_synonyms?: boolean | undefined;
898
911
  /** Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script). */
899
- enable_analytics?: boolean;
912
+ enable_analytics?: boolean | undefined;
900
913
  /** Allow synonym resolution on word prefixes in the query. Default: false */
901
- synonym_prefix?: boolean;
914
+ synonym_prefix?: boolean | undefined;
902
915
  /** When set to true, search results that matched via synonyms will be demoted in ranking, appearing below results that have a direct match. Default: false */
903
- demote_synonym_match?: boolean;
916
+ demote_synonym_match?: boolean | undefined;
904
917
  /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
905
- synonym_num_typos?: number;
918
+ synonym_num_typos?: number | undefined;
906
919
  /** A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`. You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`. */
907
- pinned_hits?: string;
920
+ pinned_hits?: string | undefined;
908
921
  /** A list of records to unconditionally hide from search results. A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456, you'd specify `123,456`. You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`. */
909
- hidden_hits?: string;
922
+ hidden_hits?: string | undefined;
910
923
  /** Comma separated list of tags to trigger the curations rules that match the tags. */
911
- curation_tags?: string;
924
+ curation_tags?: string | undefined;
912
925
  /** A list of custom fields that must be highlighted even if you don't query for them */
913
- highlight_fields?: string;
926
+ highlight_fields?: string | undefined;
914
927
  /** When true, computes both text match and vector distance scores for all matches in hybrid search. Documents found only through keyword search will get a vector distance score, and documents found only through vector search will get a text match score. */
915
- rerank_hybrid_matches?: boolean;
928
+ rerank_hybrid_matches?: boolean | undefined;
916
929
  /** You can index content from any logographic language into Typesense if you are able to segment / split the text into space-separated words yourself before indexing and querying. Set this parameter to true to do the same */
917
- pre_segmented_query?: boolean;
930
+ pre_segmented_query?: boolean | undefined;
918
931
  /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
919
- preset?: string;
932
+ preset?: string | undefined;
920
933
  /** If you have some curation sets defined but want to disable all of them during query time, you can do that by setting this parameter to false */
921
- enable_curations?: boolean;
934
+ enable_curations?: boolean | undefined;
922
935
  /** Set this parameter to true to ensure that an exact match is ranked above the others */
923
- prioritize_exact_match?: boolean;
936
+ prioritize_exact_match?: boolean | undefined;
924
937
  /** Make Typesense prioritize documents where the query words appear earlier in the text. */
925
- prioritize_token_position?: boolean;
938
+ prioritize_token_position?: boolean | undefined;
926
939
  /** Make Typesense prioritize documents where the query words appear in more number of fields. */
927
- prioritize_num_matching_fields?: boolean;
940
+ prioritize_num_matching_fields?: boolean | undefined;
928
941
  /** Make Typesense disable typos for numerical tokens. */
929
- enable_typos_for_numerical_tokens?: boolean;
942
+ enable_typos_for_numerical_tokens?: boolean | undefined;
930
943
  /** Setting this to true will make Typesense consider all prefixes and typo corrections of the words in the query without stopping early when enough results are found (drop_tokens_threshold and typo_tokens_threshold configurations are ignored). */
931
- exhaustive_search?: boolean;
944
+ exhaustive_search?: boolean | undefined;
932
945
  /** Typesense will attempt to return results early if the cutoff time has elapsed. This is not a strict guarantee and facet computation is not bound by this parameter. */
933
- search_cutoff_ms?: number;
946
+ search_cutoff_ms?: number | undefined;
934
947
  /** Maximum number of hits that can be fetched from the collection. page * per_page should be less than this number for the search request to return results. */
935
- limit_hits?: number;
948
+ limit_hits?: number | undefined;
936
949
  /** Enable server side caching of search query results. By default, caching is disabled. */
937
- use_cache?: boolean;
950
+ use_cache?: boolean | undefined;
938
951
  /** The duration (in seconds) that determines how long the search query is cached. This value can be set on a per-query basis. Default: 60. */
939
- cache_ttl?: number;
952
+ cache_ttl?: number | undefined;
940
953
  /** Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
941
- min_len_1typo?: number;
954
+ min_len_1typo?: number | undefined;
942
955
  /** Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
943
- min_len_2typo?: number;
956
+ min_len_2typo?: number | undefined;
944
957
  /** Vector query expression for fetching documents "closest" to a given query/document vector. */
945
- vector_query?: string;
958
+ vector_query?: string | undefined;
946
959
  /** Timeout (in milliseconds) for fetching remote embeddings. */
947
- remote_embedding_timeout_ms?: number;
960
+ remote_embedding_timeout_ms?: number | undefined;
948
961
  /** Number of times to retry fetching remote embeddings. */
949
- remote_embedding_num_tries?: number;
962
+ remote_embedding_num_tries?: number | undefined;
950
963
  /** Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default). */
951
- facet_strategy?: string;
964
+ facet_strategy?: string | undefined;
952
965
  /** Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query. */
953
- stopwords?: string;
966
+ stopwords?: string | undefined;
954
967
  /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
955
- facet_return_parent?: string;
968
+ facet_return_parent?: string | undefined;
956
969
  /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
957
- facet_sample_percent?: number;
970
+ facet_sample_percent?: number | undefined;
958
971
  /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
959
- facet_sample_threshold?: number;
972
+ facet_sample_threshold?: number | undefined;
960
973
  /** Controls how steeply facet_sample_percent falls as the collection grows. facet_sample_threshold should be non-zero for facet_sample_slope to be effective. Default: 0. */
961
- facet_sample_slope?: number;
974
+ facet_sample_slope?: number | undefined;
962
975
  /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
963
- voice_query?: string;
976
+ voice_query?: string | undefined;
964
977
  /** Enable conversational search. */
965
- conversation?: boolean;
978
+ conversation?: boolean | undefined;
966
979
  /** The Id of Conversation Model to be used. */
967
- conversation_model_id?: string;
980
+ conversation_model_id?: string | undefined;
968
981
  /** The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM. */
969
- conversation_id?: string;
982
+ conversation_id?: string | undefined;
970
983
  /** Controls whether Typesense should validate if the fields exist in the schema. When set to false, Typesense will not throw an error if a field is missing. This is useful for programmatic grouping where not all fields may exist. */
971
- validate_field_names?: boolean;
984
+ validate_field_names?: boolean | undefined;
972
985
  /** The collection to search in. */
973
- collection?: string;
986
+ collection?: string | undefined;
974
987
  /** A separate search API key for each search within a multi_search request */
975
- x_typesense_api_key?: string;
988
+ x_typesense_api_key?: string | undefined;
976
989
  }
977
990
  export type MultiSearchSearchesParameterSearchesList = Array<MultiSearchCollectionParameters>;
978
991
  export interface MultiSearchSearchesParameter {
979
992
  /** When true, merges the search results from each search query into a single ordered set of hits. */
980
- union?: boolean;
993
+ union?: boolean | undefined;
981
994
  searches: MultiSearchSearchesParameterSearchesList;
982
995
  }
983
996
  export type PresetSchemaValue = SearchParameters | MultiSearchSearchesParameter;
@@ -998,14 +1011,14 @@ export interface GetAnalyticsEventsRequest {
998
1011
  }
999
1012
  export type AnalyticsEventsResponseEventsItemDocIdsList = Array<string>;
1000
1013
  export interface AnalyticsEventsResponseEventsItem {
1001
- name?: string;
1002
- event_type?: string;
1003
- collection?: string;
1004
- timestamp?: number;
1005
- user_id?: string;
1006
- doc_id?: string;
1007
- doc_ids?: AnalyticsEventsResponseEventsItemDocIdsList;
1008
- query?: string;
1014
+ name?: string | undefined;
1015
+ event_type?: string | undefined;
1016
+ collection?: string | undefined;
1017
+ timestamp?: number | undefined;
1018
+ user_id?: string | undefined;
1019
+ doc_id?: string | undefined;
1020
+ doc_ids?: AnalyticsEventsResponseEventsItemDocIdsList | undefined;
1021
+ query?: string | undefined;
1009
1022
  }
1010
1023
  export type AnalyticsEventsResponseEventsList = Array<AnalyticsEventsResponseEventsItem>;
1011
1024
  export interface AnalyticsEventsResponse {
@@ -1017,53 +1030,53 @@ export interface GetAnalyticsRuleRequest {
1017
1030
  }
1018
1031
  export type GetAnalyticsRuleResponseParamsMetaFieldsList = Array<string>;
1019
1032
  export interface GetAnalyticsRuleResponseParams {
1020
- destination_collection?: string;
1021
- limit?: number;
1022
- capture_search_requests?: boolean;
1023
- meta_fields?: GetAnalyticsRuleResponseParamsMetaFieldsList;
1024
- expand_query?: boolean;
1025
- counter_field?: string;
1026
- weight?: number;
1033
+ destination_collection?: string | undefined;
1034
+ limit?: number | undefined;
1035
+ capture_search_requests?: boolean | undefined;
1036
+ meta_fields?: GetAnalyticsRuleResponseParamsMetaFieldsList | undefined;
1037
+ expand_query?: boolean | undefined;
1038
+ counter_field?: string | undefined;
1039
+ weight?: number | undefined;
1027
1040
  }
1028
1041
  export interface GetAnalyticsRuleResponse {
1029
1042
  name: string;
1030
1043
  type: AnalyticsRuleType;
1031
1044
  collection: string;
1032
1045
  event_type: string;
1033
- rule_tag?: string;
1034
- params?: GetAnalyticsRuleResponseParams;
1046
+ rule_tag?: string | undefined;
1047
+ params?: GetAnalyticsRuleResponseParams | undefined;
1035
1048
  }
1036
1049
  export interface GetAnalyticsRulesRequest {
1037
1050
  /** Filter rules by rule_tag */
1038
- rule_tag?: string;
1051
+ rule_tag?: string | undefined;
1039
1052
  }
1040
1053
  export type GetAnalyticsRulesResponseBodyList = Array<AnalyticsRule>;
1041
1054
  export type GetAnalyticsRulesResponse = GetAnalyticsRulesResponseBodyList;
1042
1055
  export interface GetAnalyticsStatusRequest {}
1043
1056
  export interface AnalyticsStatus {
1044
- popular_prefix_queries?: number;
1045
- nohits_prefix_queries?: number;
1046
- log_prefix_queries?: number;
1047
- query_log_events?: number;
1048
- query_counter_events?: number;
1049
- doc_log_events?: number;
1050
- doc_counter_events?: number;
1057
+ popular_prefix_queries?: number | undefined;
1058
+ nohits_prefix_queries?: number | undefined;
1059
+ log_prefix_queries?: number | undefined;
1060
+ query_log_events?: number | undefined;
1061
+ query_counter_events?: number | undefined;
1062
+ doc_log_events?: number | undefined;
1063
+ doc_counter_events?: number | undefined;
1051
1064
  }
1052
1065
  export interface GetAPIStatsRequest {}
1053
1066
  export interface APIStatsResponse {
1054
- delete_latency_ms?: number;
1055
- delete_requests_per_second?: number;
1056
- import_latency_ms?: number;
1057
- import_requests_per_second?: number;
1058
- latency_ms?: unknown;
1059
- overloaded_requests_per_second?: number;
1060
- pending_write_batches?: number;
1061
- requests_per_second?: unknown;
1062
- search_latency_ms?: number;
1063
- search_requests_per_second?: number;
1064
- total_requests_per_second?: number;
1065
- write_latency_ms?: number;
1066
- write_requests_per_second?: number;
1067
+ delete_latency_ms?: number | undefined;
1068
+ delete_requests_per_second?: number | undefined;
1069
+ import_latency_ms?: number | undefined;
1070
+ import_requests_per_second?: number | undefined;
1071
+ latency_ms?: unknown | undefined;
1072
+ overloaded_requests_per_second?: number | undefined;
1073
+ pending_write_batches?: number | undefined;
1074
+ requests_per_second?: unknown | undefined;
1075
+ search_latency_ms?: number | undefined;
1076
+ search_requests_per_second?: number | undefined;
1077
+ total_requests_per_second?: number | undefined;
1078
+ write_latency_ms?: number | undefined;
1079
+ write_requests_per_second?: number | undefined;
1067
1080
  }
1068
1081
  export interface GetCollectionRequest {
1069
1082
  /** The name of the collection to retrieve */
@@ -1083,18 +1096,18 @@ export interface GetCollectionResponse {
1083
1096
  /** A list of fields for querying, filtering and faceting */
1084
1097
  fields: GetCollectionResponseFieldsList;
1085
1098
  /** The name of an int32 / float field that determines the order in which the search results are ranked when a sort_by clause is not provided during searching. This field must indicate some kind of popularity. */
1086
- default_sorting_field?: string;
1099
+ default_sorting_field?: string | undefined;
1087
1100
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
1088
- token_separators?: GetCollectionResponseTokenSeparatorsList;
1101
+ token_separators?: GetCollectionResponseTokenSeparatorsList | undefined;
1089
1102
  /** List of synonym set names to associate with this collection */
1090
- synonym_sets?: GetCollectionResponseSynonymSetsList;
1103
+ synonym_sets?: GetCollectionResponseSynonymSetsList | undefined;
1091
1104
  /** Enables experimental support at a collection level for nested object or object array fields. This field is only available if the Typesense server is version `0.24.0.rcn34` or later. */
1092
- enable_nested_fields?: boolean;
1105
+ enable_nested_fields?: boolean | undefined;
1093
1106
  /** List of symbols or special characters to be indexed. */
1094
- symbols_to_index?: GetCollectionResponseSymbolsToIndexList;
1095
- voice_query_model?: VoiceQueryModelCollectionConfig;
1107
+ symbols_to_index?: GetCollectionResponseSymbolsToIndexList | undefined;
1108
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
1096
1109
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
1097
- metadata?: unknown;
1110
+ metadata?: unknown | undefined;
1098
1111
  /** Number of documents in the collection */
1099
1112
  num_documents: number;
1100
1113
  /** Timestamp of when the collection was created (Unix epoch in seconds) */
@@ -1102,14 +1115,14 @@ export interface GetCollectionResponse {
1102
1115
  }
1103
1116
  export interface GetCollectionsRequestGetCollectionsParameters {
1104
1117
  /** Comma-separated list of fields from the collection to exclude from the response */
1105
- exclude_fields?: string;
1118
+ exclude_fields?: string | undefined;
1106
1119
  /** Number of collections to fetch. Default: returns all collections. */
1107
- limit?: number;
1120
+ limit?: number | undefined;
1108
1121
  /** Identifies the starting point to return collections when paginating. */
1109
- offset?: number;
1122
+ offset?: number | undefined;
1110
1123
  }
1111
1124
  export interface GetCollectionsRequest {
1112
- getCollectionsParameters?: GetCollectionsRequestGetCollectionsParameters;
1125
+ getCollectionsParameters?: GetCollectionsRequestGetCollectionsParameters | undefined;
1113
1126
  }
1114
1127
  /** A list of fields for querying, filtering and faceting */
1115
1128
  export type CollectionResponseFieldsList = Array<Field>;
@@ -1125,18 +1138,18 @@ export interface CollectionResponse {
1125
1138
  /** A list of fields for querying, filtering and faceting */
1126
1139
  fields: CollectionResponseFieldsList;
1127
1140
  /** The name of an int32 / float field that determines the order in which the search results are ranked when a sort_by clause is not provided during searching. This field must indicate some kind of popularity. */
1128
- default_sorting_field?: string;
1141
+ default_sorting_field?: string | undefined;
1129
1142
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
1130
- token_separators?: CollectionResponseTokenSeparatorsList;
1143
+ token_separators?: CollectionResponseTokenSeparatorsList | undefined;
1131
1144
  /** List of synonym set names to associate with this collection */
1132
- synonym_sets?: CollectionResponseSynonymSetsList;
1145
+ synonym_sets?: CollectionResponseSynonymSetsList | undefined;
1133
1146
  /** Enables experimental support at a collection level for nested object or object array fields. This field is only available if the Typesense server is version `0.24.0.rcn34` or later. */
1134
- enable_nested_fields?: boolean;
1147
+ enable_nested_fields?: boolean | undefined;
1135
1148
  /** List of symbols or special characters to be indexed. */
1136
- symbols_to_index?: CollectionResponseSymbolsToIndexList;
1137
- voice_query_model?: VoiceQueryModelCollectionConfig;
1149
+ symbols_to_index?: CollectionResponseSymbolsToIndexList | undefined;
1150
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
1138
1151
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
1139
- metadata?: unknown;
1152
+ metadata?: unknown | undefined;
1140
1153
  /** Number of documents in the collection */
1141
1154
  num_documents: number;
1142
1155
  /** Timestamp of when the collection was created (Unix epoch in seconds) */
@@ -1154,19 +1167,19 @@ export interface GetConversationModelResponse {
1154
1167
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
1155
1168
  model_name: string;
1156
1169
  /** The LLM service's API Key */
1157
- api_key?: string | import("effect/Redacted").Redacted<string>;
1170
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
1158
1171
  /** Typesense collection that stores the historical conversations */
1159
1172
  history_collection: string;
1160
1173
  /** LLM service's account ID (only applicable for Cloudflare) */
1161
- account_id?: string;
1174
+ account_id?: string | undefined;
1162
1175
  /** The system prompt that contains special instructions to the LLM */
1163
- system_prompt?: string;
1176
+ system_prompt?: string | undefined;
1164
1177
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
1165
- ttl?: number;
1178
+ ttl?: number | undefined;
1166
1179
  /** The maximum number of bytes to send to the LLM in every API call. Consult the LLM's documentation on the number of bytes supported in the context window. */
1167
1180
  max_bytes: number;
1168
1181
  /** URL of vLLM service */
1169
- vllm_url?: string;
1182
+ vllm_url?: string | undefined;
1170
1183
  }
1171
1184
  export interface GetCurationSetRequest {
1172
1185
  /** The name of the curation set to retrieve */
@@ -1178,13 +1191,13 @@ export type CurationRuleTagsList = Array<string>;
1178
1191
  export type CurationRuleMatch = "exact" | "contains";
1179
1192
  export interface CurationRule {
1180
1193
  /** List of tag values to associate with this curation rule. */
1181
- tags?: CurationRuleTagsList;
1194
+ tags?: CurationRuleTagsList | undefined;
1182
1195
  /** Indicates what search queries should be curated */
1183
- query?: string;
1196
+ query?: string | undefined;
1184
1197
  /** Indicates whether the match on the query term should be `exact` or `contains`. If we want to match all queries that contained the word `apple`, we will use the `contains` match instead. */
1185
- match?: CurationRuleMatch | (string & {});
1198
+ match?: CurationRuleMatch | (string & {}) | undefined;
1186
1199
  /** Indicates that the curation should apply when the filter_by parameter in a search query exactly matches the string specified here (including backticks, spaces, brackets, etc). */
1187
- filter_by?: string;
1200
+ filter_by?: string | undefined;
1188
1201
  }
1189
1202
  export interface CurationInclude {
1190
1203
  /** document id that should be included */
@@ -1203,29 +1216,29 @@ export type CurationItemCreateSchemaExcludesList = Array<CurationExclude>;
1203
1216
  export interface CurationItemCreateSchema {
1204
1217
  rule: CurationRule;
1205
1218
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1206
- includes?: CurationItemCreateSchemaIncludesList;
1219
+ includes?: CurationItemCreateSchemaIncludesList | undefined;
1207
1220
  /** List of document `id`s that should be excluded from the search results. */
1208
- excludes?: CurationItemCreateSchemaExcludesList;
1221
+ excludes?: CurationItemCreateSchemaExcludesList | undefined;
1209
1222
  /** A filter by clause that is applied to any search query that matches the curation rule. */
1210
- filter_by?: string;
1223
+ filter_by?: string | undefined;
1211
1224
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
1212
- remove_matched_tokens?: boolean;
1225
+ remove_matched_tokens?: boolean | undefined;
1213
1226
  /** Return a custom JSON object in the Search API response, when this rule is triggered. This can can be used to display a pre-defined message (eg: a promotion banner) on the front-end when a particular rule is triggered. */
1214
- metadata?: unknown;
1227
+ metadata?: unknown | undefined;
1215
1228
  /** A sort by clause that is applied to any search query that matches the curation rule. */
1216
- sort_by?: string;
1229
+ sort_by?: string | undefined;
1217
1230
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
1218
- replace_query?: string;
1231
+ replace_query?: string | undefined;
1219
1232
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
1220
- filter_curated_hits?: boolean;
1233
+ filter_curated_hits?: boolean | undefined;
1221
1234
  /** A Unix timestamp that indicates the date/time from which the curation will be active. You can use this to create rules that start applying from a future point in time. */
1222
- effective_from_ts?: number;
1235
+ effective_from_ts?: number | undefined;
1223
1236
  /** A Unix timestamp that indicates the date/time until which the curation will be active. You can use this to create rules that stop applying after a period of time. */
1224
- effective_to_ts?: number;
1237
+ effective_to_ts?: number | undefined;
1225
1238
  /** When set to true, curation processing will stop at the first matching rule. When set to false curation processing will continue and multiple curation actions will be triggered in sequence. Curations are processed in the lexical sort order of their id field. */
1226
- stop_processing?: boolean;
1239
+ stop_processing?: boolean | undefined;
1227
1240
  /** ID of the curation item */
1228
- id?: string;
1241
+ id?: string | undefined;
1229
1242
  }
1230
1243
  /** Array of curation items */
1231
1244
  export type GetCurationSetResponseItemsList = Array<CurationItemCreateSchema>;
@@ -1233,7 +1246,7 @@ export interface GetCurationSetResponse {
1233
1246
  /** Array of curation items */
1234
1247
  items: GetCurationSetResponseItemsList;
1235
1248
  /** Optional description for the curation set */
1236
- description?: string;
1249
+ description?: string | undefined;
1237
1250
  name: string;
1238
1251
  }
1239
1252
  export interface GetCurationSetItemRequest {
@@ -1249,27 +1262,27 @@ export type GetCurationSetItemResponseExcludesList = Array<CurationExclude>;
1249
1262
  export interface GetCurationSetItemResponse {
1250
1263
  rule: CurationRule;
1251
1264
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1252
- includes?: GetCurationSetItemResponseIncludesList;
1265
+ includes?: GetCurationSetItemResponseIncludesList | undefined;
1253
1266
  /** List of document `id`s that should be excluded from the search results. */
1254
- excludes?: GetCurationSetItemResponseExcludesList;
1267
+ excludes?: GetCurationSetItemResponseExcludesList | undefined;
1255
1268
  /** A filter by clause that is applied to any search query that matches the curation rule. */
1256
- filter_by?: string;
1269
+ filter_by?: string | undefined;
1257
1270
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
1258
- remove_matched_tokens?: boolean;
1271
+ remove_matched_tokens?: boolean | undefined;
1259
1272
  /** Return a custom JSON object in the Search API response, when this rule is triggered. This can can be used to display a pre-defined message (eg: a promotion banner) on the front-end when a particular rule is triggered. */
1260
- metadata?: unknown;
1273
+ metadata?: unknown | undefined;
1261
1274
  /** A sort by clause that is applied to any search query that matches the curation rule. */
1262
- sort_by?: string;
1275
+ sort_by?: string | undefined;
1263
1276
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
1264
- replace_query?: string;
1277
+ replace_query?: string | undefined;
1265
1278
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
1266
- filter_curated_hits?: boolean;
1279
+ filter_curated_hits?: boolean | undefined;
1267
1280
  /** A Unix timestamp that indicates the date/time from which the curation will be active. You can use this to create rules that start applying from a future point in time. */
1268
- effective_from_ts?: number;
1281
+ effective_from_ts?: number | undefined;
1269
1282
  /** A Unix timestamp that indicates the date/time until which the curation will be active. You can use this to create rules that stop applying after a period of time. */
1270
- effective_to_ts?: number;
1283
+ effective_to_ts?: number | undefined;
1271
1284
  /** When set to true, curation processing will stop at the first matching rule. When set to false curation processing will continue and multiple curation actions will be triggered in sequence. Curations are processed in the lexical sort order of their id field. */
1272
- stop_processing?: boolean;
1285
+ stop_processing?: boolean | undefined;
1273
1286
  /** ID of the curation item */
1274
1287
  id: string;
1275
1288
  }
@@ -1284,27 +1297,27 @@ export type CurationItemSchemaExcludesList = Array<CurationExclude>;
1284
1297
  export interface CurationItemSchema {
1285
1298
  rule: CurationRule;
1286
1299
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1287
- includes?: CurationItemSchemaIncludesList;
1300
+ includes?: CurationItemSchemaIncludesList | undefined;
1288
1301
  /** List of document `id`s that should be excluded from the search results. */
1289
- excludes?: CurationItemSchemaExcludesList;
1302
+ excludes?: CurationItemSchemaExcludesList | undefined;
1290
1303
  /** A filter by clause that is applied to any search query that matches the curation rule. */
1291
- filter_by?: string;
1304
+ filter_by?: string | undefined;
1292
1305
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
1293
- remove_matched_tokens?: boolean;
1306
+ remove_matched_tokens?: boolean | undefined;
1294
1307
  /** Return a custom JSON object in the Search API response, when this rule is triggered. This can can be used to display a pre-defined message (eg: a promotion banner) on the front-end when a particular rule is triggered. */
1295
- metadata?: unknown;
1308
+ metadata?: unknown | undefined;
1296
1309
  /** A sort by clause that is applied to any search query that matches the curation rule. */
1297
- sort_by?: string;
1310
+ sort_by?: string | undefined;
1298
1311
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
1299
- replace_query?: string;
1312
+ replace_query?: string | undefined;
1300
1313
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
1301
- filter_curated_hits?: boolean;
1314
+ filter_curated_hits?: boolean | undefined;
1302
1315
  /** A Unix timestamp that indicates the date/time from which the curation will be active. You can use this to create rules that start applying from a future point in time. */
1303
- effective_from_ts?: number;
1316
+ effective_from_ts?: number | undefined;
1304
1317
  /** A Unix timestamp that indicates the date/time until which the curation will be active. You can use this to create rules that stop applying after a period of time. */
1305
- effective_to_ts?: number;
1318
+ effective_to_ts?: number | undefined;
1306
1319
  /** When set to true, curation processing will stop at the first matching rule. When set to false curation processing will continue and multiple curation actions will be triggered in sequence. Curations are processed in the lexical sort order of their id field. */
1307
- stop_processing?: boolean;
1320
+ stop_processing?: boolean | undefined;
1308
1321
  /** ID of the curation item */
1309
1322
  id: string;
1310
1323
  }
@@ -1317,7 +1330,7 @@ export interface CurationSetSchema {
1317
1330
  /** Array of curation items */
1318
1331
  items: CurationSetSchemaItemsList;
1319
1332
  /** Optional description for the curation set */
1320
- description?: string;
1333
+ description?: string | undefined;
1321
1334
  name: string;
1322
1335
  }
1323
1336
  export type GetCurationSetsResponseBodyList = Array<CurationSetSchema>;
@@ -1336,25 +1349,25 @@ export interface GetKeyRequest {
1336
1349
  export type GetKeyResponseActionsList = Array<string>;
1337
1350
  export type GetKeyResponseCollectionsList = Array<string>;
1338
1351
  export interface GetKeyResponse {
1339
- value?: string;
1352
+ value?: string | undefined;
1340
1353
  description: string;
1341
1354
  actions: GetKeyResponseActionsList;
1342
1355
  collections: GetKeyResponseCollectionsList;
1343
- expires_at?: number;
1344
- id?: number;
1345
- value_prefix?: string;
1356
+ expires_at?: number | undefined;
1357
+ id?: number | undefined;
1358
+ value_prefix?: string | undefined;
1346
1359
  }
1347
1360
  export interface GetKeysRequest {}
1348
1361
  export type ApiKeyActionsList = Array<string>;
1349
1362
  export type ApiKeyCollectionsList = Array<string>;
1350
1363
  export interface ApiKey {
1351
- value?: string;
1364
+ value?: string | undefined;
1352
1365
  description: string;
1353
1366
  actions: ApiKeyActionsList;
1354
1367
  collections: ApiKeyCollectionsList;
1355
- expires_at?: number;
1356
- id?: number;
1357
- value_prefix?: string;
1368
+ expires_at?: number | undefined;
1369
+ id?: number | undefined;
1370
+ value_prefix?: string | undefined;
1358
1371
  }
1359
1372
  export type ApiKeysResponseKeysList = Array<ApiKey>;
1360
1373
  export interface ApiKeysResponse {
@@ -1370,41 +1383,41 @@ export interface GetNLSearchModelRequest {
1370
1383
  export type GetNLSearchModelResponseStopSequencesList = Array<string>;
1371
1384
  export interface GetNLSearchModelResponse {
1372
1385
  /** Name of the NL model to use */
1373
- model_name?: string;
1386
+ model_name?: string | undefined;
1374
1387
  /** API key for the NL model service */
1375
- api_key?: string | import("effect/Redacted").Redacted<string>;
1388
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
1376
1389
  /** Custom API URL for the NL model service */
1377
- api_url?: string;
1390
+ api_url?: string | undefined;
1378
1391
  /** Maximum number of bytes to process */
1379
- max_bytes?: number;
1392
+ max_bytes?: number | undefined;
1380
1393
  /** Temperature parameter for the NL model */
1381
- temperature?: number;
1394
+ temperature?: number | undefined;
1382
1395
  /** System prompt for the NL model */
1383
- system_prompt?: string;
1396
+ system_prompt?: string | undefined;
1384
1397
  /** Top-p parameter for the NL model (Google-specific) */
1385
- top_p?: number;
1398
+ top_p?: number | undefined;
1386
1399
  /** Top-k parameter for the NL model (Google-specific) */
1387
- top_k?: number;
1400
+ top_k?: number | undefined;
1388
1401
  /** Stop sequences for the NL model (Google-specific) */
1389
- stop_sequences?: GetNLSearchModelResponseStopSequencesList;
1402
+ stop_sequences?: GetNLSearchModelResponseStopSequencesList | undefined;
1390
1403
  /** API version for the NL model service */
1391
- api_version?: string;
1404
+ api_version?: string | undefined;
1392
1405
  /** Project ID for GCP Vertex AI */
1393
- project_id?: string;
1406
+ project_id?: string | undefined;
1394
1407
  /** Access token for GCP Vertex AI */
1395
- access_token?: string | import("effect/Redacted").Redacted<string>;
1408
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
1396
1409
  /** Refresh token for GCP Vertex AI */
1397
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
1410
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
1398
1411
  /** Client ID for GCP Vertex AI */
1399
- client_id?: string;
1412
+ client_id?: string | undefined;
1400
1413
  /** Client secret for GCP Vertex AI */
1401
- client_secret?: string | import("effect/Redacted").Redacted<string>;
1414
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
1402
1415
  /** Region for GCP Vertex AI */
1403
- region?: string;
1416
+ region?: string | undefined;
1404
1417
  /** Maximum output tokens for GCP Vertex AI */
1405
- max_output_tokens?: number;
1418
+ max_output_tokens?: number | undefined;
1406
1419
  /** Account ID for Cloudflare-specific models */
1407
- account_id?: string;
1420
+ account_id?: string | undefined;
1408
1421
  /** Optional ID for the NL search model */
1409
1422
  id: string;
1410
1423
  }
@@ -1420,11 +1433,11 @@ export interface GetPresetResponse {
1420
1433
  export interface GetSchemaChangesRequest {}
1421
1434
  export interface SchemaChangeStatus {
1422
1435
  /** Name of the collection being modified */
1423
- collection?: string;
1436
+ collection?: string | undefined;
1424
1437
  /** Number of documents that have been validated */
1425
- validated_docs?: number;
1438
+ validated_docs?: number | undefined;
1426
1439
  /** Number of documents that have been altered */
1427
- altered_docs?: number;
1440
+ altered_docs?: number | undefined;
1428
1441
  }
1429
1442
  export type GetSchemaChangesResponseBodyList = Array<SchemaChangeStatus>;
1430
1443
  export type GetSchemaChangesResponse = GetSchemaChangesResponseBodyList;
@@ -1454,7 +1467,7 @@ export type StopwordsSetSchemaStopwordsList = Array<string>;
1454
1467
  export interface StopwordsSetSchema {
1455
1468
  id: string;
1456
1469
  stopwords: StopwordsSetSchemaStopwordsList;
1457
- locale?: string;
1470
+ locale?: string | undefined;
1458
1471
  }
1459
1472
  export interface StopwordsSetRetrieveSchema {
1460
1473
  stopwords: StopwordsSetSchema;
@@ -1478,11 +1491,11 @@ export interface SynonymItemSchema {
1478
1491
  /** Array of words that should be considered as synonyms */
1479
1492
  synonyms: SynonymItemSchemaSynonymsList;
1480
1493
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
1481
- root?: string;
1494
+ root?: string | undefined;
1482
1495
  /** Locale for the synonym, leave blank to use the standard tokenizer */
1483
- locale?: string;
1496
+ locale?: string | undefined;
1484
1497
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
1485
- symbols_to_index?: SynonymItemSchemaSymbolsToIndexList;
1498
+ symbols_to_index?: SynonymItemSchemaSymbolsToIndexList | undefined;
1486
1499
  }
1487
1500
  /** Array of synonym items */
1488
1501
  export type GetSynonymSetResponseItemsList = Array<SynonymItemSchema>;
@@ -1508,11 +1521,11 @@ export interface GetSynonymSetItemResponse {
1508
1521
  /** Array of words that should be considered as synonyms */
1509
1522
  synonyms: GetSynonymSetItemResponseSynonymsList;
1510
1523
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
1511
- root?: string;
1524
+ root?: string | undefined;
1512
1525
  /** Locale for the synonym, leave blank to use the standard tokenizer */
1513
- locale?: string;
1526
+ locale?: string | undefined;
1514
1527
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
1515
- symbols_to_index?: GetSynonymSetItemResponseSymbolsToIndexList;
1528
+ symbols_to_index?: GetSynonymSetItemResponseSymbolsToIndexList | undefined;
1516
1529
  }
1517
1530
  export interface GetSynonymSetItemsRequest {
1518
1531
  /** The name of the synonym set to retrieve items for */
@@ -1538,18 +1551,18 @@ export interface HealthStatus {
1538
1551
  export type IndexAction = "create" | "update" | "upsert" | "emplace";
1539
1552
  export type DirtyValues = "coerce_or_reject" | "coerce_or_drop" | "drop" | "reject";
1540
1553
  export interface ImportDocumentsRequestImportDocumentsParameters {
1541
- batch_size?: number;
1554
+ batch_size?: number | undefined;
1542
1555
  /** Returning the id of the imported documents. If you want the import response to return the ingested document's id in the response, you can use the return_id parameter. */
1543
- return_id?: boolean;
1544
- remote_embedding_batch_size?: number;
1545
- return_doc?: boolean;
1546
- action?: IndexAction | (string & {});
1547
- dirty_values?: DirtyValues | (string & {});
1556
+ return_id?: boolean | undefined;
1557
+ remote_embedding_batch_size?: number | undefined;
1558
+ return_doc?: boolean | undefined;
1559
+ action?: IndexAction | (string & {}) | undefined;
1560
+ dirty_values?: DirtyValues | (string & {}) | undefined;
1548
1561
  }
1549
1562
  export interface ImportDocumentsRequest {
1550
1563
  /** The name of the collection */
1551
1564
  collectionName: string;
1552
- importDocumentsParameters?: ImportDocumentsRequestImportDocumentsParameters;
1565
+ importDocumentsParameters?: ImportDocumentsRequestImportDocumentsParameters | undefined;
1553
1566
  }
1554
1567
  export interface ImportDocumentsResponse {}
1555
1568
  export interface ImportStemmingDictionaryRequest {
@@ -1562,15 +1575,15 @@ export interface IndexDocumentRequest {
1562
1575
  /** The name of the collection to add the document to */
1563
1576
  collectionName: string;
1564
1577
  /** Additional action to perform */
1565
- action?: IndexAction | (string & {});
1578
+ action?: IndexAction | (string & {}) | undefined;
1566
1579
  /** Dealing with Dirty Data */
1567
- dirty_values?: DirtyValues | (string & {});
1580
+ dirty_values?: DirtyValues | (string & {}) | undefined;
1568
1581
  }
1569
1582
  export type IndexDocumentResponse = unknown;
1570
1583
  export interface ListStemmingDictionariesRequest {}
1571
1584
  export type ListStemmingDictionariesResponseDictionariesList = Array<string>;
1572
1585
  export interface ListStemmingDictionariesResponse {
1573
- dictionaries?: ListStemmingDictionariesResponseDictionariesList;
1586
+ dictionaries?: ListStemmingDictionariesResponseDictionariesList | undefined;
1574
1587
  }
1575
1588
  export interface SearchCollectionRequest {
1576
1589
  /** The name of the collection to search for the document under */
@@ -1578,24 +1591,24 @@ export interface SearchCollectionRequest {
1578
1591
  searchParameters: SearchParameters;
1579
1592
  }
1580
1593
  export interface FacetCountsCountsItem {
1581
- count?: number;
1582
- highlighted?: string;
1583
- value?: string;
1584
- parent?: unknown;
1594
+ count?: number | undefined;
1595
+ highlighted?: string | undefined;
1596
+ value?: string | undefined;
1597
+ parent?: unknown | undefined;
1585
1598
  }
1586
1599
  export type FacetCountsCountsList = Array<FacetCountsCountsItem>;
1587
1600
  export interface FacetCountsStats {
1588
- max?: number;
1589
- min?: number;
1590
- sum?: number;
1591
- total_values?: number;
1592
- avg?: number;
1601
+ max?: number | undefined;
1602
+ min?: number | undefined;
1603
+ sum?: number | undefined;
1604
+ total_values?: number | undefined;
1605
+ avg?: number | undefined;
1593
1606
  }
1594
1607
  export interface FacetCounts {
1595
- counts?: FacetCountsCountsList;
1596
- field_name?: string;
1597
- sampled?: boolean;
1598
- stats?: FacetCountsStats;
1608
+ counts?: FacetCountsCountsList | undefined;
1609
+ field_name?: string | undefined;
1610
+ sampled?: boolean | undefined;
1611
+ stats?: FacetCountsStats | undefined;
1599
1612
  }
1600
1613
  export type SearchResultFacetCountsList = Array<FacetCounts>;
1601
1614
  export type SearchGroupedHitGroupKeyList = Array<unknown>;
@@ -1607,18 +1620,18 @@ export type SearchHighlightValuesList = Array<string>;
1607
1620
  export type SearchHighlightIndicesList = Array<number>;
1608
1621
  export type SearchHighlightMatchedTokensList = Array<unknown>;
1609
1622
  export interface SearchHighlight {
1610
- field?: string;
1623
+ field?: string | undefined;
1611
1624
  /** Present only for (non-array) string fields */
1612
- snippet?: string;
1625
+ snippet?: string | undefined;
1613
1626
  /** Present only for (array) string[] fields */
1614
- snippets?: SearchHighlightSnippetsList;
1627
+ snippets?: SearchHighlightSnippetsList | undefined;
1615
1628
  /** Full field value with highlighting, present only for (non-array) string fields */
1616
- value?: string;
1629
+ value?: string | undefined;
1617
1630
  /** Full field value with highlighting, present only for (array) string[] fields */
1618
- values?: SearchHighlightValuesList;
1631
+ values?: SearchHighlightValuesList | undefined;
1619
1632
  /** The indices property will be present only for string[] fields and will contain the corresponding indices of the snippets in the search field */
1620
- indices?: SearchHighlightIndicesList;
1621
- matched_tokens?: SearchHighlightMatchedTokensList;
1633
+ indices?: SearchHighlightIndicesList | undefined;
1634
+ matched_tokens?: SearchHighlightMatchedTokensList | undefined;
1622
1635
  }
1623
1636
  /** (Deprecated) Contains highlighted portions of the search fields */
1624
1637
  export type SearchResultHitHighlightsList = Array<SearchHighlight>;
@@ -1627,43 +1640,43 @@ export type SearchResultHitHighlightMap = { [key: string]: unknown | undefined }
1627
1640
  /** Can be any key-value pair */
1628
1641
  export type SearchResultHitDocumentMap = { [key: string]: unknown | undefined };
1629
1642
  export interface SearchResultHitTextMatchInfo {
1630
- best_field_score?: string;
1631
- best_field_weight?: number;
1632
- fields_matched?: number;
1633
- num_tokens_dropped?: number;
1634
- score?: string;
1635
- tokens_matched?: number;
1636
- typo_prefix_score?: number;
1643
+ best_field_score?: string | undefined;
1644
+ best_field_weight?: number | undefined;
1645
+ fields_matched?: number | undefined;
1646
+ num_tokens_dropped?: number | undefined;
1647
+ score?: string | undefined;
1648
+ tokens_matched?: number | undefined;
1649
+ typo_prefix_score?: number | undefined;
1637
1650
  }
1638
1651
  /** Can be any key-value pair */
1639
1652
  export type SearchResultHitGeoDistanceMetersMap = { [key: string]: number | undefined };
1640
1653
  /** Information about hybrid search scoring */
1641
1654
  export interface SearchResultHitHybridSearchInfo {
1642
1655
  /** Combined score from rank fusion of text and vector search */
1643
- rank_fusion_score?: number;
1656
+ rank_fusion_score?: number | undefined;
1644
1657
  }
1645
1658
  export interface SearchResultHit {
1646
1659
  /** (Deprecated) Contains highlighted portions of the search fields */
1647
- highlights?: SearchResultHitHighlightsList;
1660
+ highlights?: SearchResultHitHighlightsList | undefined;
1648
1661
  /** Highlighted version of the matching document */
1649
- highlight?: SearchResultHitHighlightMap;
1662
+ highlight?: SearchResultHitHighlightMap | undefined;
1650
1663
  /** Can be any key-value pair */
1651
- document?: SearchResultHitDocumentMap;
1652
- text_match?: number;
1653
- text_match_info?: SearchResultHitTextMatchInfo;
1664
+ document?: SearchResultHitDocumentMap | undefined;
1665
+ text_match?: number | undefined;
1666
+ text_match_info?: SearchResultHitTextMatchInfo | undefined;
1654
1667
  /** Can be any key-value pair */
1655
- geo_distance_meters?: SearchResultHitGeoDistanceMetersMap;
1668
+ geo_distance_meters?: SearchResultHitGeoDistanceMetersMap | undefined;
1656
1669
  /** Distance between the query vector and matching document's vector value */
1657
- vector_distance?: number;
1670
+ vector_distance?: number | undefined;
1658
1671
  /** Information about hybrid search scoring */
1659
- hybrid_search_info?: SearchResultHitHybridSearchInfo;
1672
+ hybrid_search_info?: SearchResultHitHybridSearchInfo | undefined;
1660
1673
  /** Returned only for union query response. Indicates the index of the query which this document matched to. */
1661
- search_index?: number;
1674
+ search_index?: number | undefined;
1662
1675
  }
1663
1676
  /** The documents that matched the search query */
1664
1677
  export type SearchGroupedHitHitsList = Array<SearchResultHit>;
1665
1678
  export interface SearchGroupedHit {
1666
- found?: number;
1679
+ found?: number | undefined;
1667
1680
  group_key: SearchGroupedHitGroupKeyList;
1668
1681
  /** The documents that matched the search query */
1669
1682
  hits: SearchGroupedHitHitsList;
@@ -1672,14 +1685,14 @@ export type SearchResultGroupedHitsList = Array<SearchGroupedHit>;
1672
1685
  /** The documents that matched the search query */
1673
1686
  export type SearchResultHitsList = Array<SearchResultHit>;
1674
1687
  export interface SearchRequestParamsVoiceQuery {
1675
- transcribed_query?: string;
1688
+ transcribed_query?: string | undefined;
1676
1689
  }
1677
1690
  export interface SearchRequestParams {
1678
1691
  collection_name: string;
1679
- first_q?: string;
1692
+ first_q?: string | undefined;
1680
1693
  q: string;
1681
1694
  per_page: number;
1682
- voice_query?: SearchRequestParamsVoiceQuery;
1695
+ voice_query?: SearchRequestParamsVoiceQuery | undefined;
1683
1696
  }
1684
1697
  export type SearchResultConversationConversationHistoryList = Array<unknown>;
1685
1698
  export interface SearchResultConversation {
@@ -1693,185 +1706,185 @@ export type SearchResultUnionRequestParamsList = Array<SearchRequestParams>;
1693
1706
  /** Custom JSON object that can be returned in the search response */
1694
1707
  export type SearchResultMetadataMap = { [key: string]: unknown | undefined };
1695
1708
  export interface SearchResult {
1696
- facet_counts?: SearchResultFacetCountsList;
1709
+ facet_counts?: SearchResultFacetCountsList | undefined;
1697
1710
  /** The number of documents found */
1698
- found?: number;
1699
- found_docs?: number;
1711
+ found?: number | undefined;
1712
+ found_docs?: number | undefined;
1700
1713
  /** The number of milliseconds the search took */
1701
- search_time_ms?: number;
1714
+ search_time_ms?: number | undefined;
1702
1715
  /** The total number of documents in the collection */
1703
- out_of?: number;
1716
+ out_of?: number | undefined;
1704
1717
  /** Whether the search was cut off */
1705
- search_cutoff?: boolean;
1718
+ search_cutoff?: boolean | undefined;
1706
1719
  /** The search result page number */
1707
- page?: number;
1708
- grouped_hits?: SearchResultGroupedHitsList;
1720
+ page?: number | undefined;
1721
+ grouped_hits?: SearchResultGroupedHitsList | undefined;
1709
1722
  /** The documents that matched the search query */
1710
- hits?: SearchResultHitsList;
1711
- request_params?: SearchRequestParams;
1712
- conversation?: SearchResultConversation;
1723
+ hits?: SearchResultHitsList | undefined;
1724
+ request_params?: SearchRequestParams | undefined;
1725
+ conversation?: SearchResultConversation | undefined;
1713
1726
  /** Returned only for union query response. */
1714
- union_request_params?: SearchResultUnionRequestParamsList;
1727
+ union_request_params?: SearchResultUnionRequestParamsList | undefined;
1715
1728
  /** Custom JSON object that can be returned in the search response */
1716
- metadata?: SearchResultMetadataMap;
1729
+ metadata?: SearchResultMetadataMap | undefined;
1717
1730
  }
1718
1731
  /** Parameters for the multi search API. */
1719
1732
  export interface MultiSearchParameters {
1720
1733
  /** The query text to search for in the collection. Use * as the search string to return all documents. This is typically useful when used in conjunction with filter_by. */
1721
- q?: string;
1734
+ q?: string | undefined;
1722
1735
  /** A list of `string` fields that should be queried against. Multiple fields are separated with a comma. */
1723
- query_by?: string;
1736
+ query_by?: string | undefined;
1724
1737
  /** The relative weight to give each `query_by` field when ranking results. This can be used to boost fields in priority, when looking for matches. Multiple fields are separated with a comma. */
1725
- query_by_weights?: string;
1738
+ query_by_weights?: string | undefined;
1726
1739
  /** In a multi-field matching context, this parameter determines how the representative text match score of a record is calculated. Possible values are max_score (default) or max_weight. */
1727
- text_match_type?: string;
1740
+ text_match_type?: string | undefined;
1728
1741
  /** Boolean field to indicate that the last word in the query should be treated as a prefix, and not as a whole word. This is used for building autocomplete and instant search interfaces. Defaults to true. */
1729
- prefix?: string;
1742
+ prefix?: string | undefined;
1730
1743
  /** If infix index is enabled for this field, infix searching can be done on a per-field basis by sending a comma separated string parameter called infix to the search query. This parameter can have 3 values; `off` infix search is disabled, which is default `always` infix search is performed along with regular search `fallback` infix search is performed if regular search does not produce results */
1731
- infix?: string;
1744
+ infix?: string | undefined;
1732
1745
  /** There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match. */
1733
- max_extra_prefix?: number;
1746
+ max_extra_prefix?: number | undefined;
1734
1747
  /** There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match. */
1735
- max_extra_suffix?: number;
1748
+ max_extra_suffix?: number | undefined;
1736
1749
  /** Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&. */
1737
- filter_by?: string;
1750
+ filter_by?: string | undefined;
1738
1751
  /** Applies the filtering operation incrementally / lazily. Set this to true when you are potentially filtering on large values but the tokens in the query are expected to match very few documents. Default: false */
1739
- enable_lazy_filter?: boolean;
1752
+ enable_lazy_filter?: boolean | undefined;
1740
1753
  /** Controls the number of similar words that Typesense considers during fuzzy search on filter_by values. Useful for controlling prefix matches like company_name:Acm*. */
1741
- max_filter_by_candidates?: number;
1754
+ max_filter_by_candidates?: number | undefined;
1742
1755
  /** A list of numerical fields and their corresponding sort orders that will be used for ordering your results. Up to 3 sort fields can be specified. The text similarity score is exposed as a special `_text_match` field that you can use in the list of sorting fields. If no `sort_by` parameter is specified, results are sorted by `_text_match:desc,default_sorting_field:desc` */
1743
- sort_by?: string;
1756
+ sort_by?: string | undefined;
1744
1757
  /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
1745
- facet_by?: string;
1758
+ facet_by?: string | undefined;
1746
1759
  /** Maximum number of facet values to be returned. */
1747
- max_facet_values?: number;
1760
+ max_facet_values?: number | undefined;
1748
1761
  /** Facet values that are returned can now be filtered via this parameter. The matching facet text is also highlighted. For example, when faceting by `category`, you can set `facet_query=category:shoe` to return only facet values that contain the prefix "shoe". */
1749
- facet_query?: string;
1762
+ facet_query?: string | undefined;
1750
1763
  /** Controls the fuzziness of the facet query filter. Default: 2. */
1751
- facet_query_num_typos?: number;
1764
+ facet_query_num_typos?: number | undefined;
1752
1765
  /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
1753
- num_typos?: string;
1766
+ num_typos?: string | undefined;
1754
1767
  /** Results from this specific page number would be fetched. */
1755
- page?: number;
1768
+ page?: number | undefined;
1756
1769
  /** Number of results to fetch per page. Default: 10 */
1757
- per_page?: number;
1770
+ per_page?: number | undefined;
1758
1771
  /** Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10. */
1759
- limit?: number;
1772
+ limit?: number | undefined;
1760
1773
  /** Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter. */
1761
- offset?: number;
1774
+ offset?: number | undefined;
1762
1775
  /** You can aggregate search results into groups or buckets by specify one or more `group_by` fields. Separate multiple fields with a comma. To group on a particular field, it must be a faceted field. */
1763
- group_by?: string;
1776
+ group_by?: string | undefined;
1764
1777
  /** Maximum number of hits to be returned for every group. If the `group_limit` is set as `K` then only the top K hits in each group are returned in the response. Default: 3 */
1765
- group_limit?: number;
1778
+ group_limit?: number | undefined;
1766
1779
  /** Setting this parameter to true will place all documents that have a null value in the group_by field, into a single group. Setting this parameter to false, will cause each document with a null value in the group_by field to not be grouped with other documents. Default: true */
1767
- group_missing_values?: boolean;
1780
+ group_missing_values?: boolean | undefined;
1768
1781
  /** Overrides the behavior of group_by queries where found value is an approximation. When group_max_candidates is passed, found will be accurate up until its value. */
1769
- group_max_candidates?: number;
1782
+ group_max_candidates?: number | undefined;
1770
1783
  /** List of fields from the document to include in the search result */
1771
- include_fields?: string;
1784
+ include_fields?: string | undefined;
1772
1785
  /** List of fields from the document to exclude in the search result */
1773
- exclude_fields?: string;
1786
+ exclude_fields?: string | undefined;
1774
1787
  /** List of fields which should be highlighted fully without snippeting */
1775
- highlight_full_fields?: string;
1788
+ highlight_full_fields?: string | undefined;
1776
1789
  /** The number of tokens that should surround the highlighted text on each side. Default: 4 */
1777
- highlight_affix_num_tokens?: number;
1790
+ highlight_affix_num_tokens?: number | undefined;
1778
1791
  /** The start tag used for the highlighted snippets. Default: `<mark>` */
1779
- highlight_start_tag?: string;
1792
+ highlight_start_tag?: string | undefined;
1780
1793
  /** The end tag used for the highlighted snippets. Default: `</mark>` */
1781
- highlight_end_tag?: string;
1794
+ highlight_end_tag?: string | undefined;
1782
1795
  /** Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 */
1783
- snippet_threshold?: number;
1796
+ snippet_threshold?: number | undefined;
1784
1797
  /** If the number of results found for a specific query is less than this number, Typesense will attempt to drop the tokens in the query until enough results are found. Tokens that have the least individual hits are dropped first. Set to 0 to disable. Default: 10 */
1785
- drop_tokens_threshold?: number;
1786
- drop_tokens_mode?: DropTokensMode | (string & {});
1798
+ drop_tokens_threshold?: number | undefined;
1799
+ drop_tokens_mode?: DropTokensMode | (string & {}) | undefined;
1787
1800
  /** If the number of results found for a specific query is less than this number, Typesense will attempt to look for tokens with more typos until enough results are found. Default: 100 */
1788
- typo_tokens_threshold?: number;
1801
+ typo_tokens_threshold?: number | undefined;
1789
1802
  /** Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. */
1790
- enable_typos_for_alpha_numerical_tokens?: boolean;
1803
+ enable_typos_for_alpha_numerical_tokens?: boolean | undefined;
1791
1804
  /** Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false */
1792
- filter_curated_hits?: boolean;
1805
+ filter_curated_hits?: boolean | undefined;
1793
1806
  /** If you have some synonyms defined but want to disable all of them for a particular search query, set enable_synonyms to false. Default: true */
1794
- enable_synonyms?: boolean;
1807
+ enable_synonyms?: boolean | undefined;
1795
1808
  /** Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script). */
1796
- enable_analytics?: boolean;
1809
+ enable_analytics?: boolean | undefined;
1797
1810
  /** Allow synonym resolution on word prefixes in the query. Default: false */
1798
- synonym_prefix?: boolean;
1811
+ synonym_prefix?: boolean | undefined;
1799
1812
  /** When set to true, search results that matched via synonyms will be demoted in ranking, appearing below results that have a direct match. Default: false */
1800
- demote_synonym_match?: boolean;
1813
+ demote_synonym_match?: boolean | undefined;
1801
1814
  /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
1802
- synonym_num_typos?: number;
1815
+ synonym_num_typos?: number | undefined;
1803
1816
  /** A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`. You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`. */
1804
- pinned_hits?: string;
1817
+ pinned_hits?: string | undefined;
1805
1818
  /** A list of records to unconditionally hide from search results. A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456, you'd specify `123,456`. You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`. */
1806
- hidden_hits?: string;
1819
+ hidden_hits?: string | undefined;
1807
1820
  /** Comma separated list of tags to trigger the curations rules that match the tags. */
1808
- curation_tags?: string;
1821
+ curation_tags?: string | undefined;
1809
1822
  /** A list of custom fields that must be highlighted even if you don't query for them */
1810
- highlight_fields?: string;
1823
+ highlight_fields?: string | undefined;
1811
1824
  /** When true, computes both text match and vector distance scores for all matches in hybrid search. Documents found only through keyword search will get a vector distance score, and documents found only through vector search will get a text match score. */
1812
- rerank_hybrid_matches?: boolean;
1825
+ rerank_hybrid_matches?: boolean | undefined;
1813
1826
  /** You can index content from any logographic language into Typesense if you are able to segment / split the text into space-separated words yourself before indexing and querying. Set this parameter to true to do the same */
1814
- pre_segmented_query?: boolean;
1827
+ pre_segmented_query?: boolean | undefined;
1815
1828
  /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
1816
- preset?: string;
1829
+ preset?: string | undefined;
1817
1830
  /** If you have some curation sets defined but want to disable all of them during query time, you can do that by setting this parameter to false */
1818
- enable_curations?: boolean;
1831
+ enable_curations?: boolean | undefined;
1819
1832
  /** Set this parameter to true to ensure that an exact match is ranked above the others */
1820
- prioritize_exact_match?: boolean;
1833
+ prioritize_exact_match?: boolean | undefined;
1821
1834
  /** Make Typesense prioritize documents where the query words appear earlier in the text. */
1822
- prioritize_token_position?: boolean;
1835
+ prioritize_token_position?: boolean | undefined;
1823
1836
  /** Make Typesense prioritize documents where the query words appear in more number of fields. */
1824
- prioritize_num_matching_fields?: boolean;
1837
+ prioritize_num_matching_fields?: boolean | undefined;
1825
1838
  /** Make Typesense disable typos for numerical tokens. */
1826
- enable_typos_for_numerical_tokens?: boolean;
1839
+ enable_typos_for_numerical_tokens?: boolean | undefined;
1827
1840
  /** Setting this to true will make Typesense consider all prefixes and typo corrections of the words in the query without stopping early when enough results are found (drop_tokens_threshold and typo_tokens_threshold configurations are ignored). */
1828
- exhaustive_search?: boolean;
1841
+ exhaustive_search?: boolean | undefined;
1829
1842
  /** Typesense will attempt to return results early if the cutoff time has elapsed. This is not a strict guarantee and facet computation is not bound by this parameter. */
1830
- search_cutoff_ms?: number;
1843
+ search_cutoff_ms?: number | undefined;
1831
1844
  /** Maximum number of hits that can be fetched from the collection. page * per_page should be less than this number for the search request to return results. */
1832
- limit_hits?: number;
1845
+ limit_hits?: number | undefined;
1833
1846
  /** Enable server side caching of search query results. By default, caching is disabled. */
1834
- use_cache?: boolean;
1847
+ use_cache?: boolean | undefined;
1835
1848
  /** The duration (in seconds) that determines how long the search query is cached. This value can be set on a per-query basis. Default: 60. */
1836
- cache_ttl?: number;
1849
+ cache_ttl?: number | undefined;
1837
1850
  /** Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
1838
- min_len_1typo?: number;
1851
+ min_len_1typo?: number | undefined;
1839
1852
  /** Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
1840
- min_len_2typo?: number;
1853
+ min_len_2typo?: number | undefined;
1841
1854
  /** Vector query expression for fetching documents "closest" to a given query/document vector. */
1842
- vector_query?: string;
1855
+ vector_query?: string | undefined;
1843
1856
  /** Timeout (in milliseconds) for fetching remote embeddings. */
1844
- remote_embedding_timeout_ms?: number;
1857
+ remote_embedding_timeout_ms?: number | undefined;
1845
1858
  /** Number of times to retry fetching remote embeddings. */
1846
- remote_embedding_num_tries?: number;
1859
+ remote_embedding_num_tries?: number | undefined;
1847
1860
  /** Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default). */
1848
- facet_strategy?: string;
1861
+ facet_strategy?: string | undefined;
1849
1862
  /** Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query. */
1850
- stopwords?: string;
1863
+ stopwords?: string | undefined;
1851
1864
  /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
1852
- facet_return_parent?: string;
1865
+ facet_return_parent?: string | undefined;
1853
1866
  /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
1854
- facet_sample_percent?: number;
1867
+ facet_sample_percent?: number | undefined;
1855
1868
  /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
1856
- facet_sample_threshold?: number;
1869
+ facet_sample_threshold?: number | undefined;
1857
1870
  /** Controls how steeply facet_sample_percent falls as the collection grows. facet_sample_threshold should be non-zero for facet_sample_slope to be effective. Default: 0. */
1858
- facet_sample_slope?: number;
1871
+ facet_sample_slope?: number | undefined;
1859
1872
  /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
1860
- voice_query?: string;
1873
+ voice_query?: string | undefined;
1861
1874
  /** Enable conversational search. */
1862
- conversation?: boolean;
1875
+ conversation?: boolean | undefined;
1863
1876
  /** The Id of Conversation Model to be used. */
1864
- conversation_model_id?: string;
1877
+ conversation_model_id?: string | undefined;
1865
1878
  /** The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM. */
1866
- conversation_id?: string;
1879
+ conversation_id?: string | undefined;
1867
1880
  /** Controls whether Typesense should validate if the fields exist in the schema. When set to false, Typesense will not throw an error if a field is missing. This is useful for programmatic grouping where not all fields may exist. */
1868
- validate_field_names?: boolean;
1881
+ validate_field_names?: boolean | undefined;
1869
1882
  }
1870
1883
  export type SearchMultiRequestSearchesList = Array<MultiSearchCollectionParameters>;
1871
1884
  export interface SearchMultiRequest {
1872
1885
  multiSearchParameters: MultiSearchParameters;
1873
1886
  /** When true, merges the search results from each search query into a single ordered set of hits. */
1874
- union?: boolean;
1887
+ union?: boolean | undefined;
1875
1888
  searches: SearchMultiRequestSearchesList;
1876
1889
  }
1877
1890
  export type MultiSearchResultItemFacetCountsList = Array<FacetCounts>;
@@ -1883,36 +1896,36 @@ export type MultiSearchResultItemUnionRequestParamsList = Array<SearchRequestPar
1883
1896
  /** Custom JSON object that can be returned in the search response */
1884
1897
  export type MultiSearchResultItemMetadataMap = { [key: string]: unknown | undefined };
1885
1898
  export interface MultiSearchResultItem {
1886
- facet_counts?: MultiSearchResultItemFacetCountsList;
1899
+ facet_counts?: MultiSearchResultItemFacetCountsList | undefined;
1887
1900
  /** The number of documents found */
1888
- found?: number;
1889
- found_docs?: number;
1901
+ found?: number | undefined;
1902
+ found_docs?: number | undefined;
1890
1903
  /** The number of milliseconds the search took */
1891
- search_time_ms?: number;
1904
+ search_time_ms?: number | undefined;
1892
1905
  /** The total number of documents in the collection */
1893
- out_of?: number;
1906
+ out_of?: number | undefined;
1894
1907
  /** Whether the search was cut off */
1895
- search_cutoff?: boolean;
1908
+ search_cutoff?: boolean | undefined;
1896
1909
  /** The search result page number */
1897
- page?: number;
1898
- grouped_hits?: MultiSearchResultItemGroupedHitsList;
1910
+ page?: number | undefined;
1911
+ grouped_hits?: MultiSearchResultItemGroupedHitsList | undefined;
1899
1912
  /** The documents that matched the search query */
1900
- hits?: MultiSearchResultItemHitsList;
1901
- request_params?: SearchRequestParams;
1902
- conversation?: SearchResultConversation;
1913
+ hits?: MultiSearchResultItemHitsList | undefined;
1914
+ request_params?: SearchRequestParams | undefined;
1915
+ conversation?: SearchResultConversation | undefined;
1903
1916
  /** Returned only for union query response. */
1904
- union_request_params?: MultiSearchResultItemUnionRequestParamsList;
1917
+ union_request_params?: MultiSearchResultItemUnionRequestParamsList | undefined;
1905
1918
  /** Custom JSON object that can be returned in the search response */
1906
- metadata?: MultiSearchResultItemMetadataMap;
1919
+ metadata?: MultiSearchResultItemMetadataMap | undefined;
1907
1920
  /** HTTP error code */
1908
- code?: number;
1921
+ code?: number | undefined;
1909
1922
  /** Error description */
1910
- error?: string;
1923
+ error?: string | undefined;
1911
1924
  }
1912
1925
  export type MultiSearchResultResultsList = Array<MultiSearchResultItem>;
1913
1926
  export interface MultiSearchResult {
1914
1927
  results: MultiSearchResultResultsList;
1915
- conversation?: SearchResultConversation;
1928
+ conversation?: SearchResultConversation | undefined;
1916
1929
  }
1917
1930
  export interface TakeSnapshotRequest {
1918
1931
  /** The directory on the server where the snapshot should be saved. */
@@ -1929,11 +1942,11 @@ export interface UpdateCollectionRequest {
1929
1942
  /** The name of the collection to update */
1930
1943
  collectionName: string;
1931
1944
  /** A list of fields for querying, filtering and faceting */
1932
- fields?: UpdateCollectionRequestFieldsList;
1945
+ fields?: UpdateCollectionRequestFieldsList | undefined;
1933
1946
  /** List of synonym set names to associate with this collection */
1934
- synonym_sets?: UpdateCollectionRequestSynonymSetsList;
1947
+ synonym_sets?: UpdateCollectionRequestSynonymSetsList | undefined;
1935
1948
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
1936
- metadata?: unknown;
1949
+ metadata?: unknown | undefined;
1937
1950
  }
1938
1951
  /** A list of fields for querying, filtering and faceting */
1939
1952
  export type CollectionUpdateSchemaFieldsList = Array<Field>;
@@ -1941,33 +1954,33 @@ export type CollectionUpdateSchemaFieldsList = Array<Field>;
1941
1954
  export type CollectionUpdateSchemaSynonymSetsList = Array<string>;
1942
1955
  export interface CollectionUpdateSchema {
1943
1956
  /** A list of fields for querying, filtering and faceting */
1944
- fields?: CollectionUpdateSchemaFieldsList;
1957
+ fields?: CollectionUpdateSchemaFieldsList | undefined;
1945
1958
  /** List of synonym set names to associate with this collection */
1946
- synonym_sets?: CollectionUpdateSchemaSynonymSetsList;
1959
+ synonym_sets?: CollectionUpdateSchemaSynonymSetsList | undefined;
1947
1960
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
1948
- metadata?: unknown;
1961
+ metadata?: unknown | undefined;
1949
1962
  }
1950
1963
  export interface UpdateConversationModelRequest {
1951
1964
  /** The id of the conversation model to update */
1952
1965
  modelId: string;
1953
1966
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
1954
- id?: string;
1967
+ id?: string | undefined;
1955
1968
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
1956
- model_name?: string;
1969
+ model_name?: string | undefined;
1957
1970
  /** The LLM service's API Key */
1958
- api_key?: string | import("effect/Redacted").Redacted<string>;
1971
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
1959
1972
  /** Typesense collection that stores the historical conversations */
1960
- history_collection?: string;
1973
+ history_collection?: string | undefined;
1961
1974
  /** LLM service's account ID (only applicable for Cloudflare) */
1962
- account_id?: string;
1975
+ account_id?: string | undefined;
1963
1976
  /** The system prompt that contains special instructions to the LLM */
1964
- system_prompt?: string;
1977
+ system_prompt?: string | undefined;
1965
1978
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
1966
- ttl?: number;
1979
+ ttl?: number | undefined;
1967
1980
  /** The maximum number of bytes to send to the LLM in every API call. Consult the LLM's documentation on the number of bytes supported in the context window. */
1968
- max_bytes?: number;
1981
+ max_bytes?: number | undefined;
1969
1982
  /** URL of vLLM service */
1970
- vllm_url?: string;
1983
+ vllm_url?: string | undefined;
1971
1984
  }
1972
1985
  export interface UpdateConversationModelResponse {
1973
1986
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
@@ -1975,19 +1988,19 @@ export interface UpdateConversationModelResponse {
1975
1988
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
1976
1989
  model_name: string;
1977
1990
  /** The LLM service's API Key */
1978
- api_key?: string | import("effect/Redacted").Redacted<string>;
1991
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
1979
1992
  /** Typesense collection that stores the historical conversations */
1980
1993
  history_collection: string;
1981
1994
  /** LLM service's account ID (only applicable for Cloudflare) */
1982
- account_id?: string;
1995
+ account_id?: string | undefined;
1983
1996
  /** The system prompt that contains special instructions to the LLM */
1984
- system_prompt?: string;
1997
+ system_prompt?: string | undefined;
1985
1998
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
1986
- ttl?: number;
1999
+ ttl?: number | undefined;
1987
2000
  /** The maximum number of bytes to send to the LLM in every API call. Consult the LLM's documentation on the number of bytes supported in the context window. */
1988
2001
  max_bytes: number;
1989
2002
  /** URL of vLLM service */
1990
- vllm_url?: string;
2003
+ vllm_url?: string | undefined;
1991
2004
  }
1992
2005
  export interface UpdateDocumentRequest {
1993
2006
  /** The name of the collection to search for the document under */
@@ -1995,16 +2008,16 @@ export interface UpdateDocumentRequest {
1995
2008
  /** The Document ID */
1996
2009
  documentId: string;
1997
2010
  /** Dealing with Dirty Data */
1998
- dirty_values?: DirtyValues | (string & {});
2011
+ dirty_values?: DirtyValues | (string & {}) | undefined;
1999
2012
  }
2000
2013
  export type UpdateDocumentResponse = unknown;
2001
2014
  export interface UpdateDocumentsRequestUpdateDocumentsParameters {
2002
- filter_by?: string;
2015
+ filter_by?: string | undefined;
2003
2016
  }
2004
2017
  export interface UpdateDocumentsRequest {
2005
2018
  /** The name of the collection to update documents in */
2006
2019
  collectionName: string;
2007
- updateDocumentsParameters?: UpdateDocumentsRequestUpdateDocumentsParameters;
2020
+ updateDocumentsParameters?: UpdateDocumentsRequestUpdateDocumentsParameters | undefined;
2008
2021
  }
2009
2022
  export interface UpdateDocumentsResponse {
2010
2023
  /** The number of documents that have been updated */
@@ -2016,83 +2029,83 @@ export interface UpdateNLSearchModelRequest {
2016
2029
  /** The ID of the NL search model to update */
2017
2030
  modelId: string;
2018
2031
  /** Name of the NL model to use */
2019
- model_name?: string;
2032
+ model_name?: string | undefined;
2020
2033
  /** API key for the NL model service */
2021
- api_key?: string | import("effect/Redacted").Redacted<string>;
2034
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
2022
2035
  /** Custom API URL for the NL model service */
2023
- api_url?: string;
2036
+ api_url?: string | undefined;
2024
2037
  /** Maximum number of bytes to process */
2025
- max_bytes?: number;
2038
+ max_bytes?: number | undefined;
2026
2039
  /** Temperature parameter for the NL model */
2027
- temperature?: number;
2040
+ temperature?: number | undefined;
2028
2041
  /** System prompt for the NL model */
2029
- system_prompt?: string;
2042
+ system_prompt?: string | undefined;
2030
2043
  /** Top-p parameter for the NL model (Google-specific) */
2031
- top_p?: number;
2044
+ top_p?: number | undefined;
2032
2045
  /** Top-k parameter for the NL model (Google-specific) */
2033
- top_k?: number;
2046
+ top_k?: number | undefined;
2034
2047
  /** Stop sequences for the NL model (Google-specific) */
2035
- stop_sequences?: UpdateNLSearchModelRequestStopSequencesList;
2048
+ stop_sequences?: UpdateNLSearchModelRequestStopSequencesList | undefined;
2036
2049
  /** API version for the NL model service */
2037
- api_version?: string;
2050
+ api_version?: string | undefined;
2038
2051
  /** Project ID for GCP Vertex AI */
2039
- project_id?: string;
2052
+ project_id?: string | undefined;
2040
2053
  /** Access token for GCP Vertex AI */
2041
- access_token?: string | import("effect/Redacted").Redacted<string>;
2054
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2042
2055
  /** Refresh token for GCP Vertex AI */
2043
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
2056
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2044
2057
  /** Client ID for GCP Vertex AI */
2045
- client_id?: string;
2058
+ client_id?: string | undefined;
2046
2059
  /** Client secret for GCP Vertex AI */
2047
- client_secret?: string | import("effect/Redacted").Redacted<string>;
2060
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
2048
2061
  /** Region for GCP Vertex AI */
2049
- region?: string;
2062
+ region?: string | undefined;
2050
2063
  /** Maximum output tokens for GCP Vertex AI */
2051
- max_output_tokens?: number;
2064
+ max_output_tokens?: number | undefined;
2052
2065
  /** Account ID for Cloudflare-specific models */
2053
- account_id?: string;
2066
+ account_id?: string | undefined;
2054
2067
  /** Optional ID for the NL search model */
2055
- id?: string;
2068
+ id?: string | undefined;
2056
2069
  }
2057
2070
  /** Stop sequences for the NL model (Google-specific) */
2058
2071
  export type UpdateNLSearchModelResponseStopSequencesList = Array<string>;
2059
2072
  export interface UpdateNLSearchModelResponse {
2060
2073
  /** Name of the NL model to use */
2061
- model_name?: string;
2074
+ model_name?: string | undefined;
2062
2075
  /** API key for the NL model service */
2063
- api_key?: string | import("effect/Redacted").Redacted<string>;
2076
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
2064
2077
  /** Custom API URL for the NL model service */
2065
- api_url?: string;
2078
+ api_url?: string | undefined;
2066
2079
  /** Maximum number of bytes to process */
2067
- max_bytes?: number;
2080
+ max_bytes?: number | undefined;
2068
2081
  /** Temperature parameter for the NL model */
2069
- temperature?: number;
2082
+ temperature?: number | undefined;
2070
2083
  /** System prompt for the NL model */
2071
- system_prompt?: string;
2084
+ system_prompt?: string | undefined;
2072
2085
  /** Top-p parameter for the NL model (Google-specific) */
2073
- top_p?: number;
2086
+ top_p?: number | undefined;
2074
2087
  /** Top-k parameter for the NL model (Google-specific) */
2075
- top_k?: number;
2088
+ top_k?: number | undefined;
2076
2089
  /** Stop sequences for the NL model (Google-specific) */
2077
- stop_sequences?: UpdateNLSearchModelResponseStopSequencesList;
2090
+ stop_sequences?: UpdateNLSearchModelResponseStopSequencesList | undefined;
2078
2091
  /** API version for the NL model service */
2079
- api_version?: string;
2092
+ api_version?: string | undefined;
2080
2093
  /** Project ID for GCP Vertex AI */
2081
- project_id?: string;
2094
+ project_id?: string | undefined;
2082
2095
  /** Access token for GCP Vertex AI */
2083
- access_token?: string | import("effect/Redacted").Redacted<string>;
2096
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2084
2097
  /** Refresh token for GCP Vertex AI */
2085
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
2098
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2086
2099
  /** Client ID for GCP Vertex AI */
2087
- client_id?: string;
2100
+ client_id?: string | undefined;
2088
2101
  /** Client secret for GCP Vertex AI */
2089
- client_secret?: string | import("effect/Redacted").Redacted<string>;
2102
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
2090
2103
  /** Region for GCP Vertex AI */
2091
- region?: string;
2104
+ region?: string | undefined;
2092
2105
  /** Maximum output tokens for GCP Vertex AI */
2093
- max_output_tokens?: number;
2106
+ max_output_tokens?: number | undefined;
2094
2107
  /** Account ID for Cloudflare-specific models */
2095
- account_id?: string;
2108
+ account_id?: string | undefined;
2096
2109
  /** Optional ID for the NL search model */
2097
2110
  id: string;
2098
2111
  }
@@ -2104,38 +2117,38 @@ export interface UpsertAliasRequest {
2104
2117
  }
2105
2118
  export type UpsertAnalyticsRuleRequestParamsMetaFieldsList = Array<string>;
2106
2119
  export interface UpsertAnalyticsRuleRequestParams {
2107
- destination_collection?: string;
2108
- limit?: number;
2109
- capture_search_requests?: boolean;
2110
- meta_fields?: UpsertAnalyticsRuleRequestParamsMetaFieldsList;
2111
- expand_query?: boolean;
2112
- counter_field?: string;
2113
- weight?: number;
2120
+ destination_collection?: string | undefined;
2121
+ limit?: number | undefined;
2122
+ capture_search_requests?: boolean | undefined;
2123
+ meta_fields?: UpsertAnalyticsRuleRequestParamsMetaFieldsList | undefined;
2124
+ expand_query?: boolean | undefined;
2125
+ counter_field?: string | undefined;
2126
+ weight?: number | undefined;
2114
2127
  }
2115
2128
  export interface UpsertAnalyticsRuleRequest {
2116
2129
  /** The name of the analytics rule to upsert */
2117
2130
  ruleName: string;
2118
- name?: string;
2119
- rule_tag?: string;
2120
- params?: UpsertAnalyticsRuleRequestParams;
2131
+ name?: string | undefined;
2132
+ rule_tag?: string | undefined;
2133
+ params?: UpsertAnalyticsRuleRequestParams | undefined;
2121
2134
  }
2122
2135
  export type UpsertAnalyticsRuleResponseParamsMetaFieldsList = Array<string>;
2123
2136
  export interface UpsertAnalyticsRuleResponseParams {
2124
- destination_collection?: string;
2125
- limit?: number;
2126
- capture_search_requests?: boolean;
2127
- meta_fields?: UpsertAnalyticsRuleResponseParamsMetaFieldsList;
2128
- expand_query?: boolean;
2129
- counter_field?: string;
2130
- weight?: number;
2137
+ destination_collection?: string | undefined;
2138
+ limit?: number | undefined;
2139
+ capture_search_requests?: boolean | undefined;
2140
+ meta_fields?: UpsertAnalyticsRuleResponseParamsMetaFieldsList | undefined;
2141
+ expand_query?: boolean | undefined;
2142
+ counter_field?: string | undefined;
2143
+ weight?: number | undefined;
2131
2144
  }
2132
2145
  export interface UpsertAnalyticsRuleResponse {
2133
2146
  name: string;
2134
2147
  type: AnalyticsRuleType;
2135
2148
  collection: string;
2136
2149
  event_type: string;
2137
- rule_tag?: string;
2138
- params?: UpsertAnalyticsRuleResponseParams;
2150
+ rule_tag?: string | undefined;
2151
+ params?: UpsertAnalyticsRuleResponseParams | undefined;
2139
2152
  }
2140
2153
  /** Array of curation items */
2141
2154
  export type UpsertCurationSetRequestItemsList = Array<CurationItemCreateSchema>;
@@ -2145,7 +2158,7 @@ export interface UpsertCurationSetRequest {
2145
2158
  /** Array of curation items */
2146
2159
  items: UpsertCurationSetRequestItemsList;
2147
2160
  /** Optional description for the curation set */
2148
- description?: string;
2161
+ description?: string | undefined;
2149
2162
  }
2150
2163
  /** Array of curation items */
2151
2164
  export type UpsertCurationSetResponseItemsList = Array<CurationItemCreateSchema>;
@@ -2153,7 +2166,7 @@ export interface UpsertCurationSetResponse {
2153
2166
  /** Array of curation items */
2154
2167
  items: UpsertCurationSetResponseItemsList;
2155
2168
  /** Optional description for the curation set */
2156
- description?: string;
2169
+ description?: string | undefined;
2157
2170
  name: string;
2158
2171
  }
2159
2172
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
@@ -2167,29 +2180,29 @@ export interface UpsertCurationSetItemRequest {
2167
2180
  itemId: string;
2168
2181
  rule: CurationRule;
2169
2182
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
2170
- includes?: UpsertCurationSetItemRequestIncludesList;
2183
+ includes?: UpsertCurationSetItemRequestIncludesList | undefined;
2171
2184
  /** List of document `id`s that should be excluded from the search results. */
2172
- excludes?: UpsertCurationSetItemRequestExcludesList;
2185
+ excludes?: UpsertCurationSetItemRequestExcludesList | undefined;
2173
2186
  /** A filter by clause that is applied to any search query that matches the curation rule. */
2174
- filter_by?: string;
2187
+ filter_by?: string | undefined;
2175
2188
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
2176
- remove_matched_tokens?: boolean;
2189
+ remove_matched_tokens?: boolean | undefined;
2177
2190
  /** Return a custom JSON object in the Search API response, when this rule is triggered. This can can be used to display a pre-defined message (eg: a promotion banner) on the front-end when a particular rule is triggered. */
2178
- metadata?: unknown;
2191
+ metadata?: unknown | undefined;
2179
2192
  /** A sort by clause that is applied to any search query that matches the curation rule. */
2180
- sort_by?: string;
2193
+ sort_by?: string | undefined;
2181
2194
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
2182
- replace_query?: string;
2195
+ replace_query?: string | undefined;
2183
2196
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
2184
- filter_curated_hits?: boolean;
2197
+ filter_curated_hits?: boolean | undefined;
2185
2198
  /** A Unix timestamp that indicates the date/time from which the curation will be active. You can use this to create rules that start applying from a future point in time. */
2186
- effective_from_ts?: number;
2199
+ effective_from_ts?: number | undefined;
2187
2200
  /** A Unix timestamp that indicates the date/time until which the curation will be active. You can use this to create rules that stop applying after a period of time. */
2188
- effective_to_ts?: number;
2201
+ effective_to_ts?: number | undefined;
2189
2202
  /** When set to true, curation processing will stop at the first matching rule. When set to false curation processing will continue and multiple curation actions will be triggered in sequence. Curations are processed in the lexical sort order of their id field. */
2190
- stop_processing?: boolean;
2203
+ stop_processing?: boolean | undefined;
2191
2204
  /** ID of the curation item */
2192
- id?: string;
2205
+ id?: string | undefined;
2193
2206
  }
2194
2207
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
2195
2208
  export type UpsertCurationSetItemResponseIncludesList = Array<CurationInclude>;
@@ -2198,27 +2211,27 @@ export type UpsertCurationSetItemResponseExcludesList = Array<CurationExclude>;
2198
2211
  export interface UpsertCurationSetItemResponse {
2199
2212
  rule: CurationRule;
2200
2213
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
2201
- includes?: UpsertCurationSetItemResponseIncludesList;
2214
+ includes?: UpsertCurationSetItemResponseIncludesList | undefined;
2202
2215
  /** List of document `id`s that should be excluded from the search results. */
2203
- excludes?: UpsertCurationSetItemResponseExcludesList;
2216
+ excludes?: UpsertCurationSetItemResponseExcludesList | undefined;
2204
2217
  /** A filter by clause that is applied to any search query that matches the curation rule. */
2205
- filter_by?: string;
2218
+ filter_by?: string | undefined;
2206
2219
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
2207
- remove_matched_tokens?: boolean;
2220
+ remove_matched_tokens?: boolean | undefined;
2208
2221
  /** Return a custom JSON object in the Search API response, when this rule is triggered. This can can be used to display a pre-defined message (eg: a promotion banner) on the front-end when a particular rule is triggered. */
2209
- metadata?: unknown;
2222
+ metadata?: unknown | undefined;
2210
2223
  /** A sort by clause that is applied to any search query that matches the curation rule. */
2211
- sort_by?: string;
2224
+ sort_by?: string | undefined;
2212
2225
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
2213
- replace_query?: string;
2226
+ replace_query?: string | undefined;
2214
2227
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
2215
- filter_curated_hits?: boolean;
2228
+ filter_curated_hits?: boolean | undefined;
2216
2229
  /** A Unix timestamp that indicates the date/time from which the curation will be active. You can use this to create rules that start applying from a future point in time. */
2217
- effective_from_ts?: number;
2230
+ effective_from_ts?: number | undefined;
2218
2231
  /** A Unix timestamp that indicates the date/time until which the curation will be active. You can use this to create rules that stop applying after a period of time. */
2219
- effective_to_ts?: number;
2232
+ effective_to_ts?: number | undefined;
2220
2233
  /** When set to true, curation processing will stop at the first matching rule. When set to false curation processing will continue and multiple curation actions will be triggered in sequence. Curations are processed in the lexical sort order of their id field. */
2221
- stop_processing?: boolean;
2234
+ stop_processing?: boolean | undefined;
2222
2235
  /** ID of the curation item */
2223
2236
  id: string;
2224
2237
  }
@@ -2238,7 +2251,7 @@ export interface UpsertStopwordsSetRequest {
2238
2251
  /** The ID of the stopwords set to upsert. */
2239
2252
  setId: string;
2240
2253
  stopwords: UpsertStopwordsSetRequestStopwordsList;
2241
- locale?: string;
2254
+ locale?: string | undefined;
2242
2255
  }
2243
2256
  /** Array of synonym items */
2244
2257
  export type UpsertSynonymSetRequestItemsList = Array<SynonymItemSchema>;
@@ -2268,11 +2281,11 @@ export interface UpsertSynonymSetItemRequest {
2268
2281
  /** Array of words that should be considered as synonyms */
2269
2282
  synonyms: UpsertSynonymSetItemRequestSynonymsList;
2270
2283
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
2271
- root?: string;
2284
+ root?: string | undefined;
2272
2285
  /** Locale for the synonym, leave blank to use the standard tokenizer */
2273
- locale?: string;
2286
+ locale?: string | undefined;
2274
2287
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
2275
- symbols_to_index?: UpsertSynonymSetItemRequestSymbolsToIndexList;
2288
+ symbols_to_index?: UpsertSynonymSetItemRequestSymbolsToIndexList | undefined;
2276
2289
  }
2277
2290
  /** Array of words that should be considered as synonyms */
2278
2291
  export type UpsertSynonymSetItemResponseSynonymsList = Array<string>;
@@ -2284,11 +2297,11 @@ export interface UpsertSynonymSetItemResponse {
2284
2297
  /** Array of words that should be considered as synonyms */
2285
2298
  synonyms: UpsertSynonymSetItemResponseSynonymsList;
2286
2299
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
2287
- root?: string;
2300
+ root?: string | undefined;
2288
2301
  /** Locale for the synonym, leave blank to use the standard tokenizer */
2289
- locale?: string;
2302
+ locale?: string | undefined;
2290
2303
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
2291
- symbols_to_index?: UpsertSynonymSetItemResponseSymbolsToIndexList;
2304
+ symbols_to_index?: UpsertSynonymSetItemResponseSymbolsToIndexList | undefined;
2292
2305
  }
2293
2306
  export interface VoteRequest {}
2294
2307
  export type ClearCacheError = TypesenseOpError;
@@ -2304,6 +2317,8 @@ export const clearCache: API.OperationMethod<
2304
2317
  errors: [],
2305
2318
  protocol: TypesenseProtocol,
2306
2319
  retry: Retry.Retry,
2320
+ telemetry: TELEMETRY,
2321
+ span: "ClearCache",
2307
2322
  }));
2308
2323
 
2309
2324
  export type CompactDbError = TypesenseOpError;
@@ -2319,6 +2334,8 @@ export const compactDb: API.OperationMethod<
2319
2334
  errors: [],
2320
2335
  protocol: TypesenseProtocol,
2321
2336
  retry: Retry.Retry,
2337
+ telemetry: TELEMETRY,
2338
+ span: "CompactDb",
2322
2339
  }));
2323
2340
 
2324
2341
  export type CreateAnalyticsEventError = BadRequest | TypesenseOpError;
@@ -2334,6 +2351,8 @@ export const createAnalyticsEvent: API.OperationMethod<
2334
2351
  errors: [BadRequest],
2335
2352
  protocol: TypesenseProtocol,
2336
2353
  retry: Retry.Retry,
2354
+ telemetry: TELEMETRY,
2355
+ span: "CreateAnalyticsEvent",
2337
2356
  }));
2338
2357
 
2339
2358
  export type CreateAnalyticsRuleError = BadRequest | TypesenseOpError;
@@ -2349,6 +2368,8 @@ export const createAnalyticsRule: API.OperationMethod<
2349
2368
  errors: [BadRequest],
2350
2369
  protocol: TypesenseProtocol,
2351
2370
  retry: Retry.Retry,
2371
+ telemetry: TELEMETRY,
2372
+ span: "CreateAnalyticsRule",
2352
2373
  }));
2353
2374
 
2354
2375
  export type CreateCollectionError = BadRequest | Conflict | TypesenseOpError;
@@ -2364,6 +2385,8 @@ export const createCollection: API.OperationMethod<
2364
2385
  errors: [BadRequest, Conflict],
2365
2386
  protocol: TypesenseProtocol,
2366
2387
  retry: Retry.Retry,
2388
+ telemetry: TELEMETRY,
2389
+ span: "CreateCollection",
2367
2390
  }));
2368
2391
 
2369
2392
  export type CreateConversationModelError = BadRequest | TypesenseOpError;
@@ -2379,6 +2402,8 @@ export const createConversationModel: API.OperationMethod<
2379
2402
  errors: [BadRequest],
2380
2403
  protocol: TypesenseProtocol,
2381
2404
  retry: Retry.Retry,
2405
+ telemetry: TELEMETRY,
2406
+ span: "CreateConversationModel",
2382
2407
  }));
2383
2408
 
2384
2409
  export type CreateKeyError = BadRequest | Conflict | TypesenseOpError;
@@ -2394,6 +2419,8 @@ export const createKey: API.OperationMethod<
2394
2419
  errors: [BadRequest, Conflict],
2395
2420
  protocol: TypesenseProtocol,
2396
2421
  retry: Retry.Retry,
2422
+ telemetry: TELEMETRY,
2423
+ span: "CreateKey",
2397
2424
  }));
2398
2425
 
2399
2426
  export type CreateNLSearchModelError = BadRequest | TypesenseOpError;
@@ -2409,6 +2436,8 @@ export const createNLSearchModel: API.OperationMethod<
2409
2436
  errors: [BadRequest],
2410
2437
  protocol: TypesenseProtocol,
2411
2438
  retry: Retry.Retry,
2439
+ telemetry: TELEMETRY,
2440
+ span: "CreateNLSearchModel",
2412
2441
  }));
2413
2442
 
2414
2443
  export type DebugError = TypesenseOpError;
@@ -2424,6 +2453,8 @@ export const debug: API.OperationMethod<
2424
2453
  errors: [],
2425
2454
  protocol: TypesenseProtocol,
2426
2455
  retry: Retry.Retry,
2456
+ telemetry: TELEMETRY,
2457
+ span: "Debug",
2427
2458
  }));
2428
2459
 
2429
2460
  export type DeleteAliasError = NotFound | TypesenseOpError;
@@ -2439,6 +2470,8 @@ export const deleteAlias: API.OperationMethod<
2439
2470
  errors: [NotFound],
2440
2471
  protocol: TypesenseProtocol,
2441
2472
  retry: Retry.Retry,
2473
+ telemetry: TELEMETRY,
2474
+ span: "DeleteAlias",
2442
2475
  }));
2443
2476
 
2444
2477
  export type DeleteAnalyticsRuleError = NotFound | TypesenseOpError;
@@ -2454,6 +2487,8 @@ export const deleteAnalyticsRule: API.OperationMethod<
2454
2487
  errors: [NotFound],
2455
2488
  protocol: TypesenseProtocol,
2456
2489
  retry: Retry.Retry,
2490
+ telemetry: TELEMETRY,
2491
+ span: "DeleteAnalyticsRule",
2457
2492
  }));
2458
2493
 
2459
2494
  export type DeleteCollectionError = NotFound | TypesenseOpError;
@@ -2469,6 +2504,8 @@ export const deleteCollection: API.OperationMethod<
2469
2504
  errors: [NotFound],
2470
2505
  protocol: TypesenseProtocol,
2471
2506
  retry: Retry.Retry,
2507
+ telemetry: TELEMETRY,
2508
+ span: "DeleteCollection",
2472
2509
  }));
2473
2510
 
2474
2511
  export type DeleteConversationModelError = NotFound | TypesenseOpError;
@@ -2484,6 +2521,8 @@ export const deleteConversationModel: API.OperationMethod<
2484
2521
  errors: [NotFound],
2485
2522
  protocol: TypesenseProtocol,
2486
2523
  retry: Retry.Retry,
2524
+ telemetry: TELEMETRY,
2525
+ span: "DeleteConversationModel",
2487
2526
  }));
2488
2527
 
2489
2528
  export type DeleteCurationSetError = NotFound | TypesenseOpError;
@@ -2499,6 +2538,8 @@ export const deleteCurationSet: API.OperationMethod<
2499
2538
  errors: [NotFound],
2500
2539
  protocol: TypesenseProtocol,
2501
2540
  retry: Retry.Retry,
2541
+ telemetry: TELEMETRY,
2542
+ span: "DeleteCurationSet",
2502
2543
  }));
2503
2544
 
2504
2545
  export type DeleteCurationSetItemError = NotFound | TypesenseOpError;
@@ -2514,6 +2555,8 @@ export const deleteCurationSetItem: API.OperationMethod<
2514
2555
  errors: [NotFound],
2515
2556
  protocol: TypesenseProtocol,
2516
2557
  retry: Retry.Retry,
2558
+ telemetry: TELEMETRY,
2559
+ span: "DeleteCurationSetItem",
2517
2560
  }));
2518
2561
 
2519
2562
  export type DeleteDocumentError = NotFound | TypesenseOpError;
@@ -2529,6 +2572,8 @@ export const deleteDocument: API.OperationMethod<
2529
2572
  errors: [NotFound],
2530
2573
  protocol: TypesenseProtocol,
2531
2574
  retry: Retry.Retry,
2575
+ telemetry: TELEMETRY,
2576
+ span: "DeleteDocument",
2532
2577
  }));
2533
2578
 
2534
2579
  export type DeleteDocumentsError = NotFound | TypesenseOpError;
@@ -2544,6 +2589,8 @@ export const deleteDocuments: API.OperationMethod<
2544
2589
  errors: [NotFound],
2545
2590
  protocol: TypesenseProtocol,
2546
2591
  retry: Retry.Retry,
2592
+ telemetry: TELEMETRY,
2593
+ span: "DeleteDocuments",
2547
2594
  }));
2548
2595
 
2549
2596
  export type DeleteKeyError = BadRequest | NotFound | TypesenseOpError;
@@ -2559,6 +2606,8 @@ export const deleteKey: API.OperationMethod<
2559
2606
  errors: [BadRequest, NotFound],
2560
2607
  protocol: TypesenseProtocol,
2561
2608
  retry: Retry.Retry,
2609
+ telemetry: TELEMETRY,
2610
+ span: "DeleteKey",
2562
2611
  }));
2563
2612
 
2564
2613
  export type DeleteNLSearchModelError = NotFound | TypesenseOpError;
@@ -2574,6 +2623,8 @@ export const deleteNLSearchModel: API.OperationMethod<
2574
2623
  errors: [NotFound],
2575
2624
  protocol: TypesenseProtocol,
2576
2625
  retry: Retry.Retry,
2626
+ telemetry: TELEMETRY,
2627
+ span: "DeleteNLSearchModel",
2577
2628
  }));
2578
2629
 
2579
2630
  export type DeletePresetError = NotFound | TypesenseOpError;
@@ -2589,6 +2640,8 @@ export const deletePreset: API.OperationMethod<
2589
2640
  errors: [NotFound],
2590
2641
  protocol: TypesenseProtocol,
2591
2642
  retry: Retry.Retry,
2643
+ telemetry: TELEMETRY,
2644
+ span: "DeletePreset",
2592
2645
  }));
2593
2646
 
2594
2647
  export type DeleteStopwordsSetError = NotFound | TypesenseOpError;
@@ -2604,6 +2657,8 @@ export const deleteStopwordsSet: API.OperationMethod<
2604
2657
  errors: [NotFound],
2605
2658
  protocol: TypesenseProtocol,
2606
2659
  retry: Retry.Retry,
2660
+ telemetry: TELEMETRY,
2661
+ span: "DeleteStopwordsSet",
2607
2662
  }));
2608
2663
 
2609
2664
  export type DeleteSynonymSetError = NotFound | TypesenseOpError;
@@ -2619,6 +2674,8 @@ export const deleteSynonymSet: API.OperationMethod<
2619
2674
  errors: [NotFound],
2620
2675
  protocol: TypesenseProtocol,
2621
2676
  retry: Retry.Retry,
2677
+ telemetry: TELEMETRY,
2678
+ span: "DeleteSynonymSet",
2622
2679
  }));
2623
2680
 
2624
2681
  export type DeleteSynonymSetItemError = NotFound | TypesenseOpError;
@@ -2634,6 +2691,8 @@ export const deleteSynonymSetItem: API.OperationMethod<
2634
2691
  errors: [NotFound],
2635
2692
  protocol: TypesenseProtocol,
2636
2693
  retry: Retry.Retry,
2694
+ telemetry: TELEMETRY,
2695
+ span: "DeleteSynonymSetItem",
2637
2696
  }));
2638
2697
 
2639
2698
  export type ExportDocumentsError = NotFound | TypesenseOpError;
@@ -2649,6 +2708,8 @@ export const exportDocuments: API.OperationMethod<
2649
2708
  errors: [NotFound],
2650
2709
  protocol: TypesenseProtocol,
2651
2710
  retry: Retry.Retry,
2711
+ telemetry: TELEMETRY,
2712
+ span: "ExportDocuments",
2652
2713
  }));
2653
2714
 
2654
2715
  export type FlushAnalyticsError = TypesenseOpError;
@@ -2664,6 +2725,8 @@ export const flushAnalytics: API.OperationMethod<
2664
2725
  errors: [],
2665
2726
  protocol: TypesenseProtocol,
2666
2727
  retry: Retry.Retry,
2728
+ telemetry: TELEMETRY,
2729
+ span: "FlushAnalytics",
2667
2730
  }));
2668
2731
 
2669
2732
  export type GetAliasError = NotFound | TypesenseOpError;
@@ -2679,6 +2742,8 @@ export const getAlias: API.OperationMethod<
2679
2742
  errors: [NotFound],
2680
2743
  protocol: TypesenseProtocol,
2681
2744
  retry: Retry.Retry,
2745
+ telemetry: TELEMETRY,
2746
+ span: "GetAlias",
2682
2747
  }));
2683
2748
 
2684
2749
  export type GetAliasesError = TypesenseOpError;
@@ -2694,6 +2759,8 @@ export const getAliases: API.OperationMethod<
2694
2759
  errors: [],
2695
2760
  protocol: TypesenseProtocol,
2696
2761
  retry: Retry.Retry,
2762
+ telemetry: TELEMETRY,
2763
+ span: "GetAliases",
2697
2764
  }));
2698
2765
 
2699
2766
  export type GetAllConversationModelsError = TypesenseOpError;
@@ -2709,6 +2776,8 @@ export const getAllConversationModels: API.OperationMethod<
2709
2776
  errors: [],
2710
2777
  protocol: TypesenseProtocol,
2711
2778
  retry: Retry.Retry,
2779
+ telemetry: TELEMETRY,
2780
+ span: "GetAllConversationModels",
2712
2781
  }));
2713
2782
 
2714
2783
  export type GetAllNLSearchModelsError = TypesenseOpError;
@@ -2724,6 +2793,8 @@ export const getAllNLSearchModels: API.OperationMethod<
2724
2793
  errors: [],
2725
2794
  protocol: TypesenseProtocol,
2726
2795
  retry: Retry.Retry,
2796
+ telemetry: TELEMETRY,
2797
+ span: "GetAllNLSearchModels",
2727
2798
  }));
2728
2799
 
2729
2800
  export type GetAllPresetsError = TypesenseOpError;
@@ -2739,6 +2810,8 @@ export const getAllPresets: API.OperationMethod<
2739
2810
  errors: [],
2740
2811
  protocol: TypesenseProtocol,
2741
2812
  retry: Retry.Retry,
2813
+ telemetry: TELEMETRY,
2814
+ span: "GetAllPresets",
2742
2815
  }));
2743
2816
 
2744
2817
  export type GetAnalyticsEventsError = BadRequest | TypesenseOpError;
@@ -2754,6 +2827,8 @@ export const getAnalyticsEvents: API.OperationMethod<
2754
2827
  errors: [BadRequest],
2755
2828
  protocol: TypesenseProtocol,
2756
2829
  retry: Retry.Retry,
2830
+ telemetry: TELEMETRY,
2831
+ span: "GetAnalyticsEvents",
2757
2832
  }));
2758
2833
 
2759
2834
  export type GetAnalyticsRuleError = NotFound | TypesenseOpError;
@@ -2769,6 +2844,8 @@ export const getAnalyticsRule: API.OperationMethod<
2769
2844
  errors: [NotFound],
2770
2845
  protocol: TypesenseProtocol,
2771
2846
  retry: Retry.Retry,
2847
+ telemetry: TELEMETRY,
2848
+ span: "GetAnalyticsRule",
2772
2849
  }));
2773
2850
 
2774
2851
  export type GetAnalyticsRulesError = TypesenseOpError;
@@ -2784,6 +2861,8 @@ export const getAnalyticsRules: API.OperationMethod<
2784
2861
  errors: [],
2785
2862
  protocol: TypesenseProtocol,
2786
2863
  retry: Retry.Retry,
2864
+ telemetry: TELEMETRY,
2865
+ span: "GetAnalyticsRules",
2787
2866
  }));
2788
2867
 
2789
2868
  export type GetAnalyticsStatusError = TypesenseOpError;
@@ -2799,6 +2878,8 @@ export const getAnalyticsStatus: API.OperationMethod<
2799
2878
  errors: [],
2800
2879
  protocol: TypesenseProtocol,
2801
2880
  retry: Retry.Retry,
2881
+ telemetry: TELEMETRY,
2882
+ span: "GetAnalyticsStatus",
2802
2883
  }));
2803
2884
 
2804
2885
  export type GetAPIStatsError = TypesenseOpError;
@@ -2814,6 +2895,8 @@ export const getAPIStats: API.OperationMethod<
2814
2895
  errors: [],
2815
2896
  protocol: TypesenseProtocol,
2816
2897
  retry: Retry.Retry,
2898
+ telemetry: TELEMETRY,
2899
+ span: "GetAPIStats",
2817
2900
  }));
2818
2901
 
2819
2902
  export type GetCollectionError = NotFound | TypesenseOpError;
@@ -2829,6 +2912,8 @@ export const getCollection: API.OperationMethod<
2829
2912
  errors: [NotFound],
2830
2913
  protocol: TypesenseProtocol,
2831
2914
  retry: Retry.Retry,
2915
+ telemetry: TELEMETRY,
2916
+ span: "GetCollection",
2832
2917
  }));
2833
2918
 
2834
2919
  export type GetCollectionsError = TypesenseOpError;
@@ -2844,6 +2929,8 @@ export const getCollections: API.OperationMethod<
2844
2929
  errors: [],
2845
2930
  protocol: TypesenseProtocol,
2846
2931
  retry: Retry.Retry,
2932
+ telemetry: TELEMETRY,
2933
+ span: "GetCollections",
2847
2934
  }));
2848
2935
 
2849
2936
  export type GetConversationModelError = NotFound | TypesenseOpError;
@@ -2859,6 +2946,8 @@ export const getConversationModel: API.OperationMethod<
2859
2946
  errors: [NotFound],
2860
2947
  protocol: TypesenseProtocol,
2861
2948
  retry: Retry.Retry,
2949
+ telemetry: TELEMETRY,
2950
+ span: "GetConversationModel",
2862
2951
  }));
2863
2952
 
2864
2953
  export type GetCurationSetError = NotFound | TypesenseOpError;
@@ -2874,6 +2963,8 @@ export const getCurationSet: API.OperationMethod<
2874
2963
  errors: [NotFound],
2875
2964
  protocol: TypesenseProtocol,
2876
2965
  retry: Retry.Retry,
2966
+ telemetry: TELEMETRY,
2967
+ span: "GetCurationSet",
2877
2968
  }));
2878
2969
 
2879
2970
  export type GetCurationSetItemError = NotFound | TypesenseOpError;
@@ -2889,6 +2980,8 @@ export const getCurationSetItem: API.OperationMethod<
2889
2980
  errors: [NotFound],
2890
2981
  protocol: TypesenseProtocol,
2891
2982
  retry: Retry.Retry,
2983
+ telemetry: TELEMETRY,
2984
+ span: "GetCurationSetItem",
2892
2985
  }));
2893
2986
 
2894
2987
  export type GetCurationSetItemsError = NotFound | TypesenseOpError;
@@ -2904,6 +2997,8 @@ export const getCurationSetItems: API.OperationMethod<
2904
2997
  errors: [NotFound],
2905
2998
  protocol: TypesenseProtocol,
2906
2999
  retry: Retry.Retry,
3000
+ telemetry: TELEMETRY,
3001
+ span: "GetCurationSetItems",
2907
3002
  }));
2908
3003
 
2909
3004
  export type GetCurationSetsError = TypesenseOpError;
@@ -2919,6 +3014,8 @@ export const getCurationSets: API.OperationMethod<
2919
3014
  errors: [],
2920
3015
  protocol: TypesenseProtocol,
2921
3016
  retry: Retry.Retry,
3017
+ telemetry: TELEMETRY,
3018
+ span: "GetCurationSets",
2922
3019
  }));
2923
3020
 
2924
3021
  export type GetDocumentError = NotFound | TypesenseOpError;
@@ -2934,6 +3031,8 @@ export const getDocument: API.OperationMethod<
2934
3031
  errors: [NotFound],
2935
3032
  protocol: TypesenseProtocol,
2936
3033
  retry: Retry.Retry,
3034
+ telemetry: TELEMETRY,
3035
+ span: "GetDocument",
2937
3036
  }));
2938
3037
 
2939
3038
  export type GetKeyError = NotFound | TypesenseOpError;
@@ -2949,6 +3048,8 @@ export const getKey: API.OperationMethod<
2949
3048
  errors: [NotFound],
2950
3049
  protocol: TypesenseProtocol,
2951
3050
  retry: Retry.Retry,
3051
+ telemetry: TELEMETRY,
3052
+ span: "GetKey",
2952
3053
  }));
2953
3054
 
2954
3055
  export type GetKeysError = TypesenseOpError;
@@ -2964,6 +3065,8 @@ export const getKeys: API.OperationMethod<
2964
3065
  errors: [],
2965
3066
  protocol: TypesenseProtocol,
2966
3067
  retry: Retry.Retry,
3068
+ telemetry: TELEMETRY,
3069
+ span: "GetKeys",
2967
3070
  }));
2968
3071
 
2969
3072
  export type GetMetricsError = TypesenseOpError;
@@ -2979,6 +3082,8 @@ export const getMetrics: API.OperationMethod<
2979
3082
  errors: [],
2980
3083
  protocol: TypesenseProtocol,
2981
3084
  retry: Retry.Retry,
3085
+ telemetry: TELEMETRY,
3086
+ span: "GetMetrics",
2982
3087
  }));
2983
3088
 
2984
3089
  export type GetNLSearchModelError = NotFound | TypesenseOpError;
@@ -2994,6 +3099,8 @@ export const getNLSearchModel: API.OperationMethod<
2994
3099
  errors: [NotFound],
2995
3100
  protocol: TypesenseProtocol,
2996
3101
  retry: Retry.Retry,
3102
+ telemetry: TELEMETRY,
3103
+ span: "GetNLSearchModel",
2997
3104
  }));
2998
3105
 
2999
3106
  export type GetPresetError = NotFound | TypesenseOpError;
@@ -3009,6 +3116,8 @@ export const getPreset: API.OperationMethod<
3009
3116
  errors: [NotFound],
3010
3117
  protocol: TypesenseProtocol,
3011
3118
  retry: Retry.Retry,
3119
+ telemetry: TELEMETRY,
3120
+ span: "GetPreset",
3012
3121
  }));
3013
3122
 
3014
3123
  export type GetSchemaChangesError = TypesenseOpError;
@@ -3024,6 +3133,8 @@ export const getSchemaChanges: API.OperationMethod<
3024
3133
  errors: [],
3025
3134
  protocol: TypesenseProtocol,
3026
3135
  retry: Retry.Retry,
3136
+ telemetry: TELEMETRY,
3137
+ span: "GetSchemaChanges",
3027
3138
  }));
3028
3139
 
3029
3140
  export type GetStemmingDictionaryError = NotFound | TypesenseOpError;
@@ -3039,6 +3150,8 @@ export const getStemmingDictionary: API.OperationMethod<
3039
3150
  errors: [NotFound],
3040
3151
  protocol: TypesenseProtocol,
3041
3152
  retry: Retry.Retry,
3153
+ telemetry: TELEMETRY,
3154
+ span: "GetStemmingDictionary",
3042
3155
  }));
3043
3156
 
3044
3157
  export type GetStopwordsSetError = NotFound | TypesenseOpError;
@@ -3054,6 +3167,8 @@ export const getStopwordsSet: API.OperationMethod<
3054
3167
  errors: [NotFound],
3055
3168
  protocol: TypesenseProtocol,
3056
3169
  retry: Retry.Retry,
3170
+ telemetry: TELEMETRY,
3171
+ span: "GetStopwordsSet",
3057
3172
  }));
3058
3173
 
3059
3174
  export type GetStopwordsSetsError = TypesenseOpError;
@@ -3069,6 +3184,8 @@ export const getStopwordsSets: API.OperationMethod<
3069
3184
  errors: [],
3070
3185
  protocol: TypesenseProtocol,
3071
3186
  retry: Retry.Retry,
3187
+ telemetry: TELEMETRY,
3188
+ span: "GetStopwordsSets",
3072
3189
  }));
3073
3190
 
3074
3191
  export type GetSynonymSetError = NotFound | TypesenseOpError;
@@ -3084,6 +3201,8 @@ export const getSynonymSet: API.OperationMethod<
3084
3201
  errors: [NotFound],
3085
3202
  protocol: TypesenseProtocol,
3086
3203
  retry: Retry.Retry,
3204
+ telemetry: TELEMETRY,
3205
+ span: "GetSynonymSet",
3087
3206
  }));
3088
3207
 
3089
3208
  export type GetSynonymSetItemError = NotFound | TypesenseOpError;
@@ -3099,6 +3218,8 @@ export const getSynonymSetItem: API.OperationMethod<
3099
3218
  errors: [NotFound],
3100
3219
  protocol: TypesenseProtocol,
3101
3220
  retry: Retry.Retry,
3221
+ telemetry: TELEMETRY,
3222
+ span: "GetSynonymSetItem",
3102
3223
  }));
3103
3224
 
3104
3225
  export type GetSynonymSetItemsError = NotFound | TypesenseOpError;
@@ -3114,6 +3235,8 @@ export const getSynonymSetItems: API.OperationMethod<
3114
3235
  errors: [NotFound],
3115
3236
  protocol: TypesenseProtocol,
3116
3237
  retry: Retry.Retry,
3238
+ telemetry: TELEMETRY,
3239
+ span: "GetSynonymSetItems",
3117
3240
  }));
3118
3241
 
3119
3242
  export type GetSynonymSetsError = TypesenseOpError;
@@ -3129,6 +3252,8 @@ export const getSynonymSets: API.OperationMethod<
3129
3252
  errors: [],
3130
3253
  protocol: TypesenseProtocol,
3131
3254
  retry: Retry.Retry,
3255
+ telemetry: TELEMETRY,
3256
+ span: "GetSynonymSets",
3132
3257
  }));
3133
3258
 
3134
3259
  export type HealthError = TypesenseOpError;
@@ -3144,6 +3269,8 @@ export const health: API.OperationMethod<
3144
3269
  errors: [],
3145
3270
  protocol: TypesenseProtocol,
3146
3271
  retry: Retry.Retry,
3272
+ telemetry: TELEMETRY,
3273
+ span: "Health",
3147
3274
  }));
3148
3275
 
3149
3276
  export type ImportDocumentsError = BadRequest | NotFound | TypesenseOpError;
@@ -3159,6 +3286,8 @@ export const importDocuments: API.OperationMethod<
3159
3286
  errors: [BadRequest, NotFound],
3160
3287
  protocol: TypesenseProtocol,
3161
3288
  retry: Retry.Retry,
3289
+ telemetry: TELEMETRY,
3290
+ span: "ImportDocuments",
3162
3291
  }));
3163
3292
 
3164
3293
  export type ImportStemmingDictionaryError = BadRequest | TypesenseOpError;
@@ -3174,6 +3303,8 @@ export const importStemmingDictionary: API.OperationMethod<
3174
3303
  errors: [BadRequest],
3175
3304
  protocol: TypesenseProtocol,
3176
3305
  retry: Retry.Retry,
3306
+ telemetry: TELEMETRY,
3307
+ span: "ImportStemmingDictionary",
3177
3308
  }));
3178
3309
 
3179
3310
  export type IndexDocumentError = NotFound | TypesenseOpError;
@@ -3189,6 +3320,8 @@ export const indexDocument: API.OperationMethod<
3189
3320
  errors: [NotFound],
3190
3321
  protocol: TypesenseProtocol,
3191
3322
  retry: Retry.Retry,
3323
+ telemetry: TELEMETRY,
3324
+ span: "IndexDocument",
3192
3325
  }));
3193
3326
 
3194
3327
  export type ListStemmingDictionariesError = TypesenseOpError;
@@ -3204,6 +3337,8 @@ export const listStemmingDictionaries: API.OperationMethod<
3204
3337
  errors: [],
3205
3338
  protocol: TypesenseProtocol,
3206
3339
  retry: Retry.Retry,
3340
+ telemetry: TELEMETRY,
3341
+ span: "ListStemmingDictionaries",
3207
3342
  }));
3208
3343
 
3209
3344
  export type SearchCollectionError = BadRequest | NotFound | TypesenseOpError;
@@ -3219,6 +3354,8 @@ export const searchCollection: API.OperationMethod<
3219
3354
  errors: [BadRequest, NotFound],
3220
3355
  protocol: TypesenseProtocol,
3221
3356
  retry: Retry.Retry,
3357
+ telemetry: TELEMETRY,
3358
+ span: "SearchCollection",
3222
3359
  }));
3223
3360
 
3224
3361
  export type SearchMultiError = BadRequest | TypesenseOpError;
@@ -3234,6 +3371,8 @@ export const searchMulti: API.OperationMethod<
3234
3371
  errors: [BadRequest],
3235
3372
  protocol: TypesenseProtocol,
3236
3373
  retry: Retry.Retry,
3374
+ telemetry: TELEMETRY,
3375
+ span: "SearchMulti",
3237
3376
  }));
3238
3377
 
3239
3378
  export type TakeSnapshotError = TypesenseOpError;
@@ -3249,6 +3388,8 @@ export const takeSnapshot: API.OperationMethod<
3249
3388
  errors: [],
3250
3389
  protocol: TypesenseProtocol,
3251
3390
  retry: Retry.Retry,
3391
+ telemetry: TELEMETRY,
3392
+ span: "TakeSnapshot",
3252
3393
  }));
3253
3394
 
3254
3395
  export type ToggleSlowRequestLogError = TypesenseOpError;
@@ -3264,6 +3405,8 @@ export const toggleSlowRequestLog: API.OperationMethod<
3264
3405
  errors: [],
3265
3406
  protocol: TypesenseProtocol,
3266
3407
  retry: Retry.Retry,
3408
+ telemetry: TELEMETRY,
3409
+ span: "ToggleSlowRequestLog",
3267
3410
  }));
3268
3411
 
3269
3412
  export type UpdateCollectionError = BadRequest | NotFound | TypesenseOpError;
@@ -3279,6 +3422,8 @@ export const updateCollection: API.OperationMethod<
3279
3422
  errors: [BadRequest, NotFound],
3280
3423
  protocol: TypesenseProtocol,
3281
3424
  retry: Retry.Retry,
3425
+ telemetry: TELEMETRY,
3426
+ span: "UpdateCollection",
3282
3427
  }));
3283
3428
 
3284
3429
  export type UpdateConversationModelError = BadRequest | NotFound | TypesenseOpError;
@@ -3294,6 +3439,8 @@ export const updateConversationModel: API.OperationMethod<
3294
3439
  errors: [BadRequest, NotFound],
3295
3440
  protocol: TypesenseProtocol,
3296
3441
  retry: Retry.Retry,
3442
+ telemetry: TELEMETRY,
3443
+ span: "UpdateConversationModel",
3297
3444
  }));
3298
3445
 
3299
3446
  export type UpdateDocumentError = NotFound | TypesenseOpError;
@@ -3309,6 +3456,8 @@ export const updateDocument: API.OperationMethod<
3309
3456
  errors: [NotFound],
3310
3457
  protocol: TypesenseProtocol,
3311
3458
  retry: Retry.Retry,
3459
+ telemetry: TELEMETRY,
3460
+ span: "UpdateDocument",
3312
3461
  }));
3313
3462
 
3314
3463
  export type UpdateDocumentsError = BadRequest | NotFound | TypesenseOpError;
@@ -3324,6 +3473,8 @@ export const updateDocuments: API.OperationMethod<
3324
3473
  errors: [BadRequest, NotFound],
3325
3474
  protocol: TypesenseProtocol,
3326
3475
  retry: Retry.Retry,
3476
+ telemetry: TELEMETRY,
3477
+ span: "UpdateDocuments",
3327
3478
  }));
3328
3479
 
3329
3480
  export type UpdateNLSearchModelError = BadRequest | NotFound | TypesenseOpError;
@@ -3339,6 +3490,8 @@ export const updateNLSearchModel: API.OperationMethod<
3339
3490
  errors: [BadRequest, NotFound],
3340
3491
  protocol: TypesenseProtocol,
3341
3492
  retry: Retry.Retry,
3493
+ telemetry: TELEMETRY,
3494
+ span: "UpdateNLSearchModel",
3342
3495
  }));
3343
3496
 
3344
3497
  export type UpsertAliasError = BadRequest | NotFound | TypesenseOpError;
@@ -3354,6 +3507,8 @@ export const upsertAlias: API.OperationMethod<
3354
3507
  errors: [BadRequest, NotFound],
3355
3508
  protocol: TypesenseProtocol,
3356
3509
  retry: Retry.Retry,
3510
+ telemetry: TELEMETRY,
3511
+ span: "UpsertAlias",
3357
3512
  }));
3358
3513
 
3359
3514
  export type UpsertAnalyticsRuleError = BadRequest | TypesenseOpError;
@@ -3369,6 +3524,8 @@ export const upsertAnalyticsRule: API.OperationMethod<
3369
3524
  errors: [BadRequest],
3370
3525
  protocol: TypesenseProtocol,
3371
3526
  retry: Retry.Retry,
3527
+ telemetry: TELEMETRY,
3528
+ span: "UpsertAnalyticsRule",
3372
3529
  }));
3373
3530
 
3374
3531
  export type UpsertCurationSetError = BadRequest | TypesenseOpError;
@@ -3384,6 +3541,8 @@ export const upsertCurationSet: API.OperationMethod<
3384
3541
  errors: [BadRequest],
3385
3542
  protocol: TypesenseProtocol,
3386
3543
  retry: Retry.Retry,
3544
+ telemetry: TELEMETRY,
3545
+ span: "UpsertCurationSet",
3387
3546
  }));
3388
3547
 
3389
3548
  export type UpsertCurationSetItemError = BadRequest | TypesenseOpError;
@@ -3399,6 +3558,8 @@ export const upsertCurationSetItem: API.OperationMethod<
3399
3558
  errors: [BadRequest],
3400
3559
  protocol: TypesenseProtocol,
3401
3560
  retry: Retry.Retry,
3561
+ telemetry: TELEMETRY,
3562
+ span: "UpsertCurationSetItem",
3402
3563
  }));
3403
3564
 
3404
3565
  export type UpsertPresetError = BadRequest | TypesenseOpError;
@@ -3414,6 +3575,8 @@ export const upsertPreset: API.OperationMethod<
3414
3575
  errors: [BadRequest],
3415
3576
  protocol: TypesenseProtocol,
3416
3577
  retry: Retry.Retry,
3578
+ telemetry: TELEMETRY,
3579
+ span: "UpsertPreset",
3417
3580
  }));
3418
3581
 
3419
3582
  export type UpsertStopwordsSetError = BadRequest | TypesenseOpError;
@@ -3429,6 +3592,8 @@ export const upsertStopwordsSet: API.OperationMethod<
3429
3592
  errors: [BadRequest],
3430
3593
  protocol: TypesenseProtocol,
3431
3594
  retry: Retry.Retry,
3595
+ telemetry: TELEMETRY,
3596
+ span: "UpsertStopwordsSet",
3432
3597
  }));
3433
3598
 
3434
3599
  export type UpsertSynonymSetError = BadRequest | TypesenseOpError;
@@ -3444,6 +3609,8 @@ export const upsertSynonymSet: API.OperationMethod<
3444
3609
  errors: [BadRequest],
3445
3610
  protocol: TypesenseProtocol,
3446
3611
  retry: Retry.Retry,
3612
+ telemetry: TELEMETRY,
3613
+ span: "UpsertSynonymSet",
3447
3614
  }));
3448
3615
 
3449
3616
  export type UpsertSynonymSetItemError = BadRequest | TypesenseOpError;
@@ -3459,6 +3626,8 @@ export const upsertSynonymSetItem: API.OperationMethod<
3459
3626
  errors: [BadRequest],
3460
3627
  protocol: TypesenseProtocol,
3461
3628
  retry: Retry.Retry,
3629
+ telemetry: TELEMETRY,
3630
+ span: "UpsertSynonymSetItem",
3462
3631
  }));
3463
3632
 
3464
3633
  export type VoteError = TypesenseOpError;
@@ -3470,6 +3639,8 @@ export const vote: API.OperationMethod<VoteRequest, SuccessStatus, VoteError, Ty
3470
3639
  errors: [],
3471
3640
  protocol: TypesenseProtocol,
3472
3641
  retry: Retry.Retry,
3642
+ telemetry: TELEMETRY,
3643
+ span: "Vote",
3473
3644
  }));
3474
3645
 
3475
3646
  // Schema builders: each runs one schema initializer, on that schema's first use.