@distilled.cloud/typesense 1.0.0-rc.18 → 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.
@@ -59,11 +59,11 @@ export interface CompactDbRequest {}
59
59
  export type CreateAnalyticsEventRequestDataDocIdsList = Array<string>;
60
60
  /** Event payload */
61
61
  export interface CreateAnalyticsEventRequestData {
62
- user_id?: string;
63
- doc_id?: string;
64
- doc_ids?: CreateAnalyticsEventRequestDataDocIdsList;
65
- q?: string;
66
- 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;
67
67
  }
68
68
  export interface CreateAnalyticsEventRequest {
69
69
  /** Name of the analytics rule this event corresponds to */
@@ -79,21 +79,21 @@ export interface AnalyticsEventCreateResponse {
79
79
  export type AnalyticsRuleType = "popular_queries" | "nohits_queries" | "counter" | "log";
80
80
  export type AnalyticsRuleCreateParamsMetaFieldsList = Array<string>;
81
81
  export interface AnalyticsRuleCreateParams {
82
- destination_collection?: string;
83
- limit?: number;
84
- capture_search_requests?: boolean;
85
- meta_fields?: AnalyticsRuleCreateParamsMetaFieldsList;
86
- expand_query?: boolean;
87
- counter_field?: string;
88
- 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;
89
89
  }
90
90
  export interface AnalyticsRuleCreate {
91
91
  name: string;
92
92
  type: AnalyticsRuleType | (string & {});
93
93
  collection: string;
94
94
  event_type: string;
95
- rule_tag?: string;
96
- params?: AnalyticsRuleCreateParams;
95
+ rule_tag?: string | undefined;
96
+ params?: AnalyticsRuleCreateParams | undefined;
97
97
  }
98
98
  export type CreateAnalyticsRuleRequestBodyCase1List = Array<AnalyticsRuleCreate>;
99
99
  export type CreateAnalyticsRuleRequestBody =
@@ -104,24 +104,24 @@ export interface CreateAnalyticsRuleRequest {
104
104
  }
105
105
  export type AnalyticsRuleParamsMetaFieldsList = Array<string>;
106
106
  export interface AnalyticsRuleParams {
107
- destination_collection?: string;
108
- limit?: number;
109
- capture_search_requests?: boolean;
110
- meta_fields?: AnalyticsRuleParamsMetaFieldsList;
111
- expand_query?: boolean;
112
- counter_field?: string;
113
- 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;
114
114
  }
115
115
  export interface AnalyticsRule {
116
116
  name: string;
117
117
  type: AnalyticsRuleType;
118
118
  collection: string;
119
119
  event_type: string;
120
- rule_tag?: string;
121
- params?: AnalyticsRuleParams;
120
+ rule_tag?: string | undefined;
121
+ params?: AnalyticsRuleParams | undefined;
122
122
  }
123
123
  export interface CreateAnalyticsRuleResponseBodyCase1ItemCase1 {
124
- error?: string;
124
+ error?: string | undefined;
125
125
  }
126
126
  export type CreateAnalyticsRuleResponseBodyCase1Item =
127
127
  | AnalyticsRule
@@ -139,15 +139,15 @@ export type FieldSymbolsToIndexList = Array<string>;
139
139
  export type FieldEmbedFromList = Array<string>;
140
140
  export interface FieldEmbedModelConfig {
141
141
  model_name: string;
142
- api_key?: string | import("effect/Redacted").Redacted<string>;
143
- url?: string;
144
- access_token?: string | import("effect/Redacted").Redacted<string>;
145
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
146
- client_id?: string;
147
- client_secret?: string | import("effect/Redacted").Redacted<string>;
148
- project_id?: string;
149
- indexing_prefix?: string;
150
- 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;
151
151
  }
152
152
  export interface FieldEmbed {
153
153
  from: FieldEmbedFromList;
@@ -156,33 +156,33 @@ export interface FieldEmbed {
156
156
  export interface Field {
157
157
  name: string;
158
158
  type: string;
159
- optional?: boolean;
160
- facet?: boolean;
161
- index?: boolean;
162
- locale?: string;
163
- sort?: boolean;
164
- 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;
165
165
  /** Name of a field in another collection that should be linked to this collection so that it can be joined during query. */
166
- reference?: string;
166
+ reference?: string | undefined;
167
167
  /** Allow documents to be indexed successfully even when the referenced document doesn't exist yet. */
168
- async_reference?: boolean;
169
- num_dim?: number;
170
- drop?: boolean;
168
+ async_reference?: boolean | undefined;
169
+ num_dim?: number | undefined;
170
+ drop?: boolean | undefined;
171
171
  /** When set to false, the field value will not be stored on disk. Default: true. */
172
- store?: boolean;
172
+ store?: boolean | undefined;
173
173
  /** The distance metric to be used for vector search. Default: `cosine`. You can also use `ip` for inner product. */
174
- vec_dist?: string;
174
+ vec_dist?: string | undefined;
175
175
  /** Enables an index optimized for range filtering on numerical fields (e.g. rating:>3.5). Default: false. */
176
- range_index?: boolean;
176
+ range_index?: boolean | undefined;
177
177
  /** Values are stemmed before indexing in-memory. Default: false. */
178
- stem?: boolean;
178
+ stem?: boolean | undefined;
179
179
  /** Name of the stemming dictionary to use for this field */
180
- stem_dictionary?: string;
180
+ stem_dictionary?: string | undefined;
181
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. */
182
- token_separators?: FieldTokenSeparatorsList;
182
+ token_separators?: FieldTokenSeparatorsList | undefined;
183
183
  /** List of symbols or special characters to be indexed. */
184
- symbols_to_index?: FieldSymbolsToIndexList;
185
- embed?: FieldEmbed;
184
+ symbols_to_index?: FieldSymbolsToIndexList | undefined;
185
+ embed?: FieldEmbed | undefined;
186
186
  }
187
187
  /** A list of fields for querying, filtering and faceting */
188
188
  export type CreateCollectionRequestFieldsList = Array<Field>;
@@ -194,7 +194,7 @@ export type CreateCollectionRequestSynonymSetsList = Array<string>;
194
194
  export type CreateCollectionRequestSymbolsToIndexList = Array<string>;
195
195
  /** Configuration for the voice query model */
196
196
  export interface VoiceQueryModelCollectionConfig {
197
- model_name?: string;
197
+ model_name?: string | undefined;
198
198
  }
199
199
  export interface CreateCollectionRequest {
200
200
  /** Name of the collection */
@@ -202,18 +202,18 @@ export interface CreateCollectionRequest {
202
202
  /** A list of fields for querying, filtering and faceting */
203
203
  fields: CreateCollectionRequestFieldsList;
204
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. */
205
- default_sorting_field?: string;
205
+ default_sorting_field?: string | undefined;
206
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. */
207
- token_separators?: CreateCollectionRequestTokenSeparatorsList;
207
+ token_separators?: CreateCollectionRequestTokenSeparatorsList | undefined;
208
208
  /** List of synonym set names to associate with this collection */
209
- synonym_sets?: CreateCollectionRequestSynonymSetsList;
209
+ synonym_sets?: CreateCollectionRequestSynonymSetsList | undefined;
210
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. */
211
- enable_nested_fields?: boolean;
211
+ enable_nested_fields?: boolean | undefined;
212
212
  /** List of symbols or special characters to be indexed. */
213
- symbols_to_index?: CreateCollectionRequestSymbolsToIndexList;
214
- voice_query_model?: VoiceQueryModelCollectionConfig;
213
+ symbols_to_index?: CreateCollectionRequestSymbolsToIndexList | undefined;
214
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
215
215
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
216
- metadata?: unknown;
216
+ metadata?: unknown | undefined;
217
217
  }
218
218
  /** A list of fields for querying, filtering and faceting */
219
219
  export type CreateCollectionResponseFieldsList = Array<Field>;
@@ -229,18 +229,18 @@ export interface CreateCollectionResponse {
229
229
  /** A list of fields for querying, filtering and faceting */
230
230
  fields: CreateCollectionResponseFieldsList;
231
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. */
232
- default_sorting_field?: string;
232
+ default_sorting_field?: string | undefined;
233
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. */
234
- token_separators?: CreateCollectionResponseTokenSeparatorsList;
234
+ token_separators?: CreateCollectionResponseTokenSeparatorsList | undefined;
235
235
  /** List of synonym set names to associate with this collection */
236
- synonym_sets?: CreateCollectionResponseSynonymSetsList;
236
+ synonym_sets?: CreateCollectionResponseSynonymSetsList | undefined;
237
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. */
238
- enable_nested_fields?: boolean;
238
+ enable_nested_fields?: boolean | undefined;
239
239
  /** List of symbols or special characters to be indexed. */
240
- symbols_to_index?: CreateCollectionResponseSymbolsToIndexList;
241
- voice_query_model?: VoiceQueryModelCollectionConfig;
240
+ symbols_to_index?: CreateCollectionResponseSymbolsToIndexList | undefined;
241
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
242
242
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
243
- metadata?: unknown;
243
+ metadata?: unknown | undefined;
244
244
  /** Number of documents in the collection */
245
245
  num_documents: number;
246
246
  /** Timestamp of when the collection was created (Unix epoch in seconds) */
@@ -248,23 +248,23 @@ export interface CreateCollectionResponse {
248
248
  }
249
249
  export interface CreateConversationModelRequest {
250
250
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
251
- id?: string;
251
+ id?: string | undefined;
252
252
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
253
253
  model_name: string;
254
254
  /** The LLM service's API Key */
255
- api_key?: string | import("effect/Redacted").Redacted<string>;
255
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
256
256
  /** Typesense collection that stores the historical conversations */
257
257
  history_collection: string;
258
258
  /** LLM service's account ID (only applicable for Cloudflare) */
259
- account_id?: string;
259
+ account_id?: string | undefined;
260
260
  /** The system prompt that contains special instructions to the LLM */
261
- system_prompt?: string;
261
+ system_prompt?: string | undefined;
262
262
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
263
- ttl?: number;
263
+ ttl?: number | undefined;
264
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. */
265
265
  max_bytes: number;
266
266
  /** URL of vLLM service */
267
- vllm_url?: string;
267
+ vllm_url?: string | undefined;
268
268
  }
269
269
  export interface CreateConversationModelResponse {
270
270
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
@@ -272,127 +272,127 @@ export interface CreateConversationModelResponse {
272
272
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
273
273
  model_name: string;
274
274
  /** The LLM service's API Key */
275
- api_key?: string | import("effect/Redacted").Redacted<string>;
275
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
276
276
  /** Typesense collection that stores the historical conversations */
277
277
  history_collection: string;
278
278
  /** LLM service's account ID (only applicable for Cloudflare) */
279
- account_id?: string;
279
+ account_id?: string | undefined;
280
280
  /** The system prompt that contains special instructions to the LLM */
281
- system_prompt?: string;
281
+ system_prompt?: string | undefined;
282
282
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
283
- ttl?: number;
283
+ ttl?: number | undefined;
284
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. */
285
285
  max_bytes: number;
286
286
  /** URL of vLLM service */
287
- vllm_url?: string;
287
+ vllm_url?: string | undefined;
288
288
  }
289
289
  export type CreateKeyRequestActionsList = Array<string>;
290
290
  export type CreateKeyRequestCollectionsList = Array<string>;
291
291
  export interface CreateKeyRequest {
292
- value?: string;
292
+ value?: string | undefined;
293
293
  description: string;
294
294
  actions: CreateKeyRequestActionsList;
295
295
  collections: CreateKeyRequestCollectionsList;
296
- expires_at?: number;
296
+ expires_at?: number | undefined;
297
297
  }
298
298
  export type CreateKeyResponseActionsList = Array<string>;
299
299
  export type CreateKeyResponseCollectionsList = Array<string>;
300
300
  export interface CreateKeyResponse {
301
- value?: string;
301
+ value?: string | undefined;
302
302
  description: string;
303
303
  actions: CreateKeyResponseActionsList;
304
304
  collections: CreateKeyResponseCollectionsList;
305
- expires_at?: number;
306
- id?: number;
307
- value_prefix?: string;
305
+ expires_at?: number | undefined;
306
+ id?: number | undefined;
307
+ value_prefix?: string | undefined;
308
308
  }
309
309
  /** Stop sequences for the NL model (Google-specific) */
310
310
  export type CreateNLSearchModelRequestStopSequencesList = Array<string>;
311
311
  export interface CreateNLSearchModelRequest {
312
312
  /** Name of the NL model to use */
313
- model_name?: string;
313
+ model_name?: string | undefined;
314
314
  /** API key for the NL model service */
315
- api_key?: string | import("effect/Redacted").Redacted<string>;
315
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
316
316
  /** Custom API URL for the NL model service */
317
- api_url?: string;
317
+ api_url?: string | undefined;
318
318
  /** Maximum number of bytes to process */
319
- max_bytes?: number;
319
+ max_bytes?: number | undefined;
320
320
  /** Temperature parameter for the NL model */
321
- temperature?: number;
321
+ temperature?: number | undefined;
322
322
  /** System prompt for the NL model */
323
- system_prompt?: string;
323
+ system_prompt?: string | undefined;
324
324
  /** Top-p parameter for the NL model (Google-specific) */
325
- top_p?: number;
325
+ top_p?: number | undefined;
326
326
  /** Top-k parameter for the NL model (Google-specific) */
327
- top_k?: number;
327
+ top_k?: number | undefined;
328
328
  /** Stop sequences for the NL model (Google-specific) */
329
- stop_sequences?: CreateNLSearchModelRequestStopSequencesList;
329
+ stop_sequences?: CreateNLSearchModelRequestStopSequencesList | undefined;
330
330
  /** API version for the NL model service */
331
- api_version?: string;
331
+ api_version?: string | undefined;
332
332
  /** Project ID for GCP Vertex AI */
333
- project_id?: string;
333
+ project_id?: string | undefined;
334
334
  /** Access token for GCP Vertex AI */
335
- access_token?: string | import("effect/Redacted").Redacted<string>;
335
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
336
336
  /** Refresh token for GCP Vertex AI */
337
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
337
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
338
338
  /** Client ID for GCP Vertex AI */
339
- client_id?: string;
339
+ client_id?: string | undefined;
340
340
  /** Client secret for GCP Vertex AI */
341
- client_secret?: string | import("effect/Redacted").Redacted<string>;
341
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
342
342
  /** Region for GCP Vertex AI */
343
- region?: string;
343
+ region?: string | undefined;
344
344
  /** Maximum output tokens for GCP Vertex AI */
345
- max_output_tokens?: number;
345
+ max_output_tokens?: number | undefined;
346
346
  /** Account ID for Cloudflare-specific models */
347
- account_id?: string;
347
+ account_id?: string | undefined;
348
348
  /** Optional ID for the NL search model */
349
- id?: string;
349
+ id?: string | undefined;
350
350
  }
351
351
  /** Stop sequences for the NL model (Google-specific) */
352
352
  export type CreateNLSearchModelResponseStopSequencesList = Array<string>;
353
353
  export interface CreateNLSearchModelResponse {
354
354
  /** Name of the NL model to use */
355
- model_name?: string;
355
+ model_name?: string | undefined;
356
356
  /** API key for the NL model service */
357
- api_key?: string | import("effect/Redacted").Redacted<string>;
357
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
358
358
  /** Custom API URL for the NL model service */
359
- api_url?: string;
359
+ api_url?: string | undefined;
360
360
  /** Maximum number of bytes to process */
361
- max_bytes?: number;
361
+ max_bytes?: number | undefined;
362
362
  /** Temperature parameter for the NL model */
363
- temperature?: number;
363
+ temperature?: number | undefined;
364
364
  /** System prompt for the NL model */
365
- system_prompt?: string;
365
+ system_prompt?: string | undefined;
366
366
  /** Top-p parameter for the NL model (Google-specific) */
367
- top_p?: number;
367
+ top_p?: number | undefined;
368
368
  /** Top-k parameter for the NL model (Google-specific) */
369
- top_k?: number;
369
+ top_k?: number | undefined;
370
370
  /** Stop sequences for the NL model (Google-specific) */
371
- stop_sequences?: CreateNLSearchModelResponseStopSequencesList;
371
+ stop_sequences?: CreateNLSearchModelResponseStopSequencesList | undefined;
372
372
  /** API version for the NL model service */
373
- api_version?: string;
373
+ api_version?: string | undefined;
374
374
  /** Project ID for GCP Vertex AI */
375
- project_id?: string;
375
+ project_id?: string | undefined;
376
376
  /** Access token for GCP Vertex AI */
377
- access_token?: string | import("effect/Redacted").Redacted<string>;
377
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
378
378
  /** Refresh token for GCP Vertex AI */
379
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
379
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
380
380
  /** Client ID for GCP Vertex AI */
381
- client_id?: string;
381
+ client_id?: string | undefined;
382
382
  /** Client secret for GCP Vertex AI */
383
- client_secret?: string | import("effect/Redacted").Redacted<string>;
383
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
384
384
  /** Region for GCP Vertex AI */
385
- region?: string;
385
+ region?: string | undefined;
386
386
  /** Maximum output tokens for GCP Vertex AI */
387
- max_output_tokens?: number;
387
+ max_output_tokens?: number | undefined;
388
388
  /** Account ID for Cloudflare-specific models */
389
- account_id?: string;
389
+ account_id?: string | undefined;
390
390
  /** Optional ID for the NL search model */
391
391
  id: string;
392
392
  }
393
393
  export interface DebugRequest {}
394
394
  export interface DebugResponse {
395
- version?: string;
395
+ version?: string | undefined;
396
396
  }
397
397
  export interface DeleteAliasRequest {
398
398
  /** The name of the alias to delete */
@@ -410,21 +410,21 @@ export interface DeleteAnalyticsRuleRequest {
410
410
  }
411
411
  export type DeleteAnalyticsRuleResponseParamsMetaFieldsList = Array<string>;
412
412
  export interface DeleteAnalyticsRuleResponseParams {
413
- destination_collection?: string;
414
- limit?: number;
415
- capture_search_requests?: boolean;
416
- meta_fields?: DeleteAnalyticsRuleResponseParamsMetaFieldsList;
417
- expand_query?: boolean;
418
- counter_field?: string;
419
- 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;
420
420
  }
421
421
  export interface DeleteAnalyticsRuleResponse {
422
422
  name: string;
423
423
  type: AnalyticsRuleType;
424
424
  collection: string;
425
425
  event_type: string;
426
- rule_tag?: string;
427
- params?: DeleteAnalyticsRuleResponseParams;
426
+ rule_tag?: string | undefined;
427
+ params?: DeleteAnalyticsRuleResponseParams | undefined;
428
428
  }
429
429
  export interface DeleteCollectionRequest {
430
430
  /** The name of the collection to delete */
@@ -444,18 +444,18 @@ export interface DeleteCollectionResponse {
444
444
  /** A list of fields for querying, filtering and faceting */
445
445
  fields: DeleteCollectionResponseFieldsList;
446
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. */
447
- default_sorting_field?: string;
447
+ default_sorting_field?: string | undefined;
448
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. */
449
- token_separators?: DeleteCollectionResponseTokenSeparatorsList;
449
+ token_separators?: DeleteCollectionResponseTokenSeparatorsList | undefined;
450
450
  /** List of synonym set names to associate with this collection */
451
- synonym_sets?: DeleteCollectionResponseSynonymSetsList;
451
+ synonym_sets?: DeleteCollectionResponseSynonymSetsList | undefined;
452
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. */
453
- enable_nested_fields?: boolean;
453
+ enable_nested_fields?: boolean | undefined;
454
454
  /** List of symbols or special characters to be indexed. */
455
- symbols_to_index?: DeleteCollectionResponseSymbolsToIndexList;
456
- voice_query_model?: VoiceQueryModelCollectionConfig;
455
+ symbols_to_index?: DeleteCollectionResponseSymbolsToIndexList | undefined;
456
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
457
457
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
458
- metadata?: unknown;
458
+ metadata?: unknown | undefined;
459
459
  /** Number of documents in the collection */
460
460
  num_documents: number;
461
461
  /** Timestamp of when the collection was created (Unix epoch in seconds) */
@@ -471,19 +471,19 @@ export interface DeleteConversationModelResponse {
471
471
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
472
472
  model_name: string;
473
473
  /** The LLM service's API Key */
474
- api_key?: string | import("effect/Redacted").Redacted<string>;
474
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
475
475
  /** Typesense collection that stores the historical conversations */
476
476
  history_collection: string;
477
477
  /** LLM service's account ID (only applicable for Cloudflare) */
478
- account_id?: string;
478
+ account_id?: string | undefined;
479
479
  /** The system prompt that contains special instructions to the LLM */
480
- system_prompt?: string;
480
+ system_prompt?: string | undefined;
481
481
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
482
- ttl?: number;
482
+ ttl?: number | undefined;
483
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. */
484
484
  max_bytes: number;
485
485
  /** URL of vLLM service */
486
- vllm_url?: string;
486
+ vllm_url?: string | undefined;
487
487
  }
488
488
  export interface DeleteCurationSetRequest {
489
489
  /** The name of the curation set to delete */
@@ -513,15 +513,15 @@ export type DeleteDocumentResponse = unknown;
513
513
  export interface DeleteDocumentsRequestDeleteDocumentsParameters {
514
514
  filter_by: string;
515
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. */
516
- batch_size?: number;
517
- ignore_not_found?: boolean;
516
+ batch_size?: number | undefined;
517
+ ignore_not_found?: boolean | undefined;
518
518
  /** When true, removes all documents from the collection while preserving the collection and its schema. */
519
- truncate?: boolean;
519
+ truncate?: boolean | undefined;
520
520
  }
521
521
  export interface DeleteDocumentsRequest {
522
522
  /** The name of the collection to delete documents from */
523
523
  collectionName: string;
524
- deleteDocumentsParameters?: DeleteDocumentsRequestDeleteDocumentsParameters;
524
+ deleteDocumentsParameters?: DeleteDocumentsRequestDeleteDocumentsParameters | undefined;
525
525
  }
526
526
  export interface DeleteDocumentsResponse {
527
527
  num_deleted: number;
@@ -576,16 +576,16 @@ export interface SynonymItemDeleteSchema {
576
576
  }
577
577
  export interface ExportDocumentsRequestExportDocumentsParameters {
578
578
  /** Filter conditions for refining your search results. Separate multiple conditions with &&. */
579
- filter_by?: string;
579
+ filter_by?: string | undefined;
580
580
  /** List of fields from the document to include in the search result */
581
- include_fields?: string;
581
+ include_fields?: string | undefined;
582
582
  /** List of fields from the document to exclude in the search result */
583
- exclude_fields?: string;
583
+ exclude_fields?: string | undefined;
584
584
  }
585
585
  export interface ExportDocumentsRequest {
586
586
  /** The name of the collection */
587
587
  collectionName: string;
588
- exportDocumentsParameters?: ExportDocumentsRequestExportDocumentsParameters;
588
+ exportDocumentsParameters?: ExportDocumentsRequestExportDocumentsParameters | undefined;
589
589
  }
590
590
  export interface ExportDocumentsResponse {}
591
591
  export interface FlushAnalyticsRequest {}
@@ -605,19 +605,19 @@ export interface ConversationModelSchema {
605
605
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
606
606
  model_name: string;
607
607
  /** The LLM service's API Key */
608
- api_key?: string | import("effect/Redacted").Redacted<string>;
608
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
609
609
  /** Typesense collection that stores the historical conversations */
610
610
  history_collection: string;
611
611
  /** LLM service's account ID (only applicable for Cloudflare) */
612
- account_id?: string;
612
+ account_id?: string | undefined;
613
613
  /** The system prompt that contains special instructions to the LLM */
614
- system_prompt?: string;
614
+ system_prompt?: string | undefined;
615
615
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
616
- ttl?: number;
616
+ ttl?: number | undefined;
617
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. */
618
618
  max_bytes: number;
619
619
  /** URL of vLLM service */
620
- vllm_url?: string;
620
+ vllm_url?: string | undefined;
621
621
  }
622
622
  export type GetAllConversationModelsResponseBodyList = Array<ConversationModelSchema>;
623
623
  export type GetAllConversationModelsResponse = GetAllConversationModelsResponseBodyList;
@@ -626,41 +626,41 @@ export interface GetAllNLSearchModelsRequest {}
626
626
  export type NLSearchModelSchemaStopSequencesList = Array<string>;
627
627
  export interface NLSearchModelSchema {
628
628
  /** Name of the NL model to use */
629
- model_name?: string;
629
+ model_name?: string | undefined;
630
630
  /** API key for the NL model service */
631
- api_key?: string | import("effect/Redacted").Redacted<string>;
631
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
632
632
  /** Custom API URL for the NL model service */
633
- api_url?: string;
633
+ api_url?: string | undefined;
634
634
  /** Maximum number of bytes to process */
635
- max_bytes?: number;
635
+ max_bytes?: number | undefined;
636
636
  /** Temperature parameter for the NL model */
637
- temperature?: number;
637
+ temperature?: number | undefined;
638
638
  /** System prompt for the NL model */
639
- system_prompt?: string;
639
+ system_prompt?: string | undefined;
640
640
  /** Top-p parameter for the NL model (Google-specific) */
641
- top_p?: number;
641
+ top_p?: number | undefined;
642
642
  /** Top-k parameter for the NL model (Google-specific) */
643
- top_k?: number;
643
+ top_k?: number | undefined;
644
644
  /** Stop sequences for the NL model (Google-specific) */
645
- stop_sequences?: NLSearchModelSchemaStopSequencesList;
645
+ stop_sequences?: NLSearchModelSchemaStopSequencesList | undefined;
646
646
  /** API version for the NL model service */
647
- api_version?: string;
647
+ api_version?: string | undefined;
648
648
  /** Project ID for GCP Vertex AI */
649
- project_id?: string;
649
+ project_id?: string | undefined;
650
650
  /** Access token for GCP Vertex AI */
651
- access_token?: string | import("effect/Redacted").Redacted<string>;
651
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
652
652
  /** Refresh token for GCP Vertex AI */
653
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
653
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
654
654
  /** Client ID for GCP Vertex AI */
655
- client_id?: string;
655
+ client_id?: string | undefined;
656
656
  /** Client secret for GCP Vertex AI */
657
- client_secret?: string | import("effect/Redacted").Redacted<string>;
657
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
658
658
  /** Region for GCP Vertex AI */
659
- region?: string;
659
+ region?: string | undefined;
660
660
  /** Maximum output tokens for GCP Vertex AI */
661
- max_output_tokens?: number;
661
+ max_output_tokens?: number | undefined;
662
662
  /** Account ID for Cloudflare-specific models */
663
- account_id?: string;
663
+ account_id?: string | undefined;
664
664
  /** Optional ID for the NL search model */
665
665
  id: string;
666
666
  }
@@ -671,326 +671,326 @@ export interface GetAllPresetsRequest {}
671
671
  export type DropTokensMode = "right_to_left" | "left_to_right" | "both_sides:3";
672
672
  export interface SearchParameters {
673
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. */
674
- q?: string;
674
+ q?: string | undefined;
675
675
  /** A list of `string` fields that should be queried against. Multiple fields are separated with a comma. */
676
- query_by?: string;
676
+ query_by?: string | undefined;
677
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. */
678
- validate_field_names?: boolean;
678
+ validate_field_names?: boolean | undefined;
679
679
  /** Whether to use natural language processing to parse the query. */
680
- nl_query?: boolean;
680
+ nl_query?: boolean | undefined;
681
681
  /** The ID of the natural language model to use. */
682
- nl_model_id?: string;
682
+ nl_model_id?: string | undefined;
683
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. */
684
- query_by_weights?: string;
684
+ query_by_weights?: string | undefined;
685
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. */
686
- text_match_type?: string;
686
+ text_match_type?: string | undefined;
687
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. */
688
- prefix?: string;
688
+ prefix?: string | undefined;
689
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 */
690
- infix?: string;
690
+ infix?: string | undefined;
691
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. */
692
- max_extra_prefix?: number;
692
+ max_extra_prefix?: number | undefined;
693
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. */
694
- max_extra_suffix?: number;
694
+ max_extra_suffix?: number | undefined;
695
695
  /** Filter conditions for refining your open api validator search results. Separate multiple conditions with &&. */
696
- filter_by?: string;
696
+ filter_by?: string | undefined;
697
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 */
698
- enable_lazy_filter?: boolean;
698
+ enable_lazy_filter?: boolean | undefined;
699
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*. */
700
- max_filter_by_candidates?: number;
700
+ max_filter_by_candidates?: number | undefined;
701
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` */
702
- sort_by?: string;
702
+ sort_by?: string | undefined;
703
703
  /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
704
- facet_by?: string;
704
+ facet_by?: string | undefined;
705
705
  /** Maximum number of facet values to be returned. */
706
- max_facet_values?: number;
706
+ max_facet_values?: number | undefined;
707
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". */
708
- facet_query?: string;
708
+ facet_query?: string | undefined;
709
709
  /** Controls the fuzziness of the facet query filter. Default: 2. */
710
- facet_query_num_typos?: number;
710
+ facet_query_num_typos?: number | undefined;
711
711
  /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
712
- num_typos?: string;
712
+ num_typos?: string | undefined;
713
713
  /** Results from this specific page number would be fetched. */
714
- page?: number;
714
+ page?: number | undefined;
715
715
  /** Number of results to fetch per page. Default: 10 */
716
- per_page?: number;
716
+ per_page?: number | undefined;
717
717
  /** Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10. */
718
- limit?: number;
718
+ limit?: number | undefined;
719
719
  /** Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter. */
720
- offset?: number;
720
+ offset?: number | undefined;
721
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. */
722
- group_by?: string;
722
+ group_by?: string | undefined;
723
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 */
724
- group_limit?: number;
724
+ group_limit?: number | undefined;
725
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 */
726
- group_missing_values?: boolean;
726
+ group_missing_values?: boolean | undefined;
727
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. */
728
- group_max_candidates?: number;
728
+ group_max_candidates?: number | undefined;
729
729
  /** List of fields from the document to include in the search result */
730
- include_fields?: string;
730
+ include_fields?: string | undefined;
731
731
  /** List of fields from the document to exclude in the search result */
732
- exclude_fields?: string;
732
+ exclude_fields?: string | undefined;
733
733
  /** List of fields which should be highlighted fully without snippeting */
734
- highlight_full_fields?: string;
734
+ highlight_full_fields?: string | undefined;
735
735
  /** The number of tokens that should surround the highlighted text on each side. Default: 4 */
736
- highlight_affix_num_tokens?: number;
736
+ highlight_affix_num_tokens?: number | undefined;
737
737
  /** The start tag used for the highlighted snippets. Default: `<mark>` */
738
- highlight_start_tag?: string;
738
+ highlight_start_tag?: string | undefined;
739
739
  /** The end tag used for the highlighted snippets. Default: `</mark>` */
740
- highlight_end_tag?: string;
740
+ highlight_end_tag?: string | undefined;
741
741
  /** Flag for enabling/disabling the deprecated, old highlight structure in the response. Default: true */
742
- enable_highlight_v1?: boolean;
742
+ enable_highlight_v1?: boolean | undefined;
743
743
  /** Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script). */
744
- enable_analytics?: boolean;
744
+ enable_analytics?: boolean | undefined;
745
745
  /** Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 */
746
- snippet_threshold?: number;
746
+ snippet_threshold?: number | undefined;
747
747
  /** List of synonym set names to associate with this search query */
748
- synonym_sets?: string;
748
+ synonym_sets?: string | undefined;
749
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 */
750
- drop_tokens_threshold?: number;
751
- drop_tokens_mode?: DropTokensMode | (string & {});
750
+ drop_tokens_threshold?: number | undefined;
751
+ drop_tokens_mode?: DropTokensMode | (string & {}) | undefined;
752
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 */
753
- typo_tokens_threshold?: number;
753
+ typo_tokens_threshold?: number | undefined;
754
754
  /** Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. */
755
- enable_typos_for_alpha_numerical_tokens?: boolean;
755
+ enable_typos_for_alpha_numerical_tokens?: boolean | undefined;
756
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 */
757
- filter_curated_hits?: boolean;
757
+ filter_curated_hits?: boolean | undefined;
758
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 */
759
- enable_synonyms?: boolean;
759
+ enable_synonyms?: boolean | undefined;
760
760
  /** Allow synonym resolution on word prefixes in the query. Default: false */
761
- synonym_prefix?: boolean;
761
+ synonym_prefix?: boolean | undefined;
762
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 */
763
- demote_synonym_match?: boolean;
763
+ demote_synonym_match?: boolean | undefined;
764
764
  /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
765
- synonym_num_typos?: number;
765
+ synonym_num_typos?: number | undefined;
766
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`. */
767
- pinned_hits?: string;
767
+ pinned_hits?: string | undefined;
768
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`. */
769
- hidden_hits?: string;
769
+ hidden_hits?: string | undefined;
770
770
  /** Comma separated list of tags to trigger the curations rules that match the tags. */
771
- curation_tags?: string;
771
+ curation_tags?: string | undefined;
772
772
  /** A list of custom fields that must be highlighted even if you don't query for them */
773
- highlight_fields?: string;
773
+ highlight_fields?: string | undefined;
774
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. */
775
- rerank_hybrid_matches?: boolean;
775
+ rerank_hybrid_matches?: boolean | undefined;
776
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`. */
777
- split_join_tokens?: string;
777
+ split_join_tokens?: string | undefined;
778
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 */
779
- pre_segmented_query?: boolean;
779
+ pre_segmented_query?: boolean | undefined;
780
780
  /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
781
- preset?: string;
781
+ preset?: string | undefined;
782
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 */
783
- enable_curations?: boolean;
783
+ enable_curations?: boolean | undefined;
784
784
  /** Set this parameter to true to ensure that an exact match is ranked above the others */
785
- prioritize_exact_match?: boolean;
785
+ prioritize_exact_match?: boolean | undefined;
786
786
  /** Control the number of words that Typesense considers for typo and prefix searching. */
787
- max_candidates?: number;
787
+ max_candidates?: number | undefined;
788
788
  /** Make Typesense prioritize documents where the query words appear earlier in the text. */
789
- prioritize_token_position?: boolean;
789
+ prioritize_token_position?: boolean | undefined;
790
790
  /** Make Typesense prioritize documents where the query words appear in more number of fields. */
791
- prioritize_num_matching_fields?: boolean;
791
+ prioritize_num_matching_fields?: boolean | undefined;
792
792
  /** Make Typesense disable typos for numerical tokens. */
793
- enable_typos_for_numerical_tokens?: boolean;
793
+ enable_typos_for_numerical_tokens?: boolean | undefined;
794
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). */
795
- exhaustive_search?: boolean;
795
+ exhaustive_search?: boolean | undefined;
796
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. */
797
- search_cutoff_ms?: number;
797
+ search_cutoff_ms?: number | undefined;
798
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. */
799
- limit_hits?: number;
799
+ limit_hits?: number | undefined;
800
800
  /** Enable server side caching of search query results. By default, caching is disabled. */
801
- use_cache?: boolean;
801
+ use_cache?: boolean | undefined;
802
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. */
803
- cache_ttl?: number;
803
+ cache_ttl?: number | undefined;
804
804
  /** Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
805
- min_len_1typo?: number;
805
+ min_len_1typo?: number | undefined;
806
806
  /** Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
807
- min_len_2typo?: number;
807
+ min_len_2typo?: number | undefined;
808
808
  /** Vector query expression for fetching documents "closest" to a given query/document vector. */
809
- vector_query?: string;
809
+ vector_query?: string | undefined;
810
810
  /** Timeout (in milliseconds) for fetching remote embeddings. */
811
- remote_embedding_timeout_ms?: number;
811
+ remote_embedding_timeout_ms?: number | undefined;
812
812
  /** Number of times to retry fetching remote embeddings. */
813
- remote_embedding_num_tries?: number;
813
+ remote_embedding_num_tries?: number | undefined;
814
814
  /** Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default). */
815
- facet_strategy?: string;
815
+ facet_strategy?: string | undefined;
816
816
  /** Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query. */
817
- stopwords?: string;
817
+ stopwords?: string | undefined;
818
818
  /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
819
- facet_return_parent?: string;
819
+ facet_return_parent?: string | undefined;
820
820
  /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
821
- facet_sample_percent?: number;
821
+ facet_sample_percent?: number | undefined;
822
822
  /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
823
- facet_sample_threshold?: number;
823
+ facet_sample_threshold?: number | undefined;
824
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. */
825
- facet_sample_slope?: number;
825
+ facet_sample_slope?: number | undefined;
826
826
  /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
827
- voice_query?: string;
827
+ voice_query?: string | undefined;
828
828
  /** Enable conversational search. */
829
- conversation?: boolean;
829
+ conversation?: boolean | undefined;
830
830
  /** The Id of Conversation Model to be used. */
831
- conversation_model_id?: string;
831
+ conversation_model_id?: string | undefined;
832
832
  /** The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM. */
833
- conversation_id?: string;
833
+ conversation_id?: string | undefined;
834
834
  }
835
835
  export interface MultiSearchCollectionParameters {
836
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. */
837
- q?: string;
837
+ q?: string | undefined;
838
838
  /** A list of `string` fields that should be queried against. Multiple fields are separated with a comma. */
839
- query_by?: string;
839
+ query_by?: string | undefined;
840
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. */
841
- query_by_weights?: string;
841
+ query_by_weights?: string | undefined;
842
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. */
843
- text_match_type?: string;
843
+ text_match_type?: string | undefined;
844
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. */
845
- prefix?: string;
845
+ prefix?: string | undefined;
846
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 */
847
- infix?: string;
847
+ infix?: string | undefined;
848
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. */
849
- max_extra_prefix?: number;
849
+ max_extra_prefix?: number | undefined;
850
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. */
851
- max_extra_suffix?: number;
851
+ max_extra_suffix?: number | undefined;
852
852
  /** Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&. */
853
- filter_by?: string;
853
+ filter_by?: string | undefined;
854
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 */
855
- enable_lazy_filter?: boolean;
855
+ enable_lazy_filter?: boolean | undefined;
856
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*. */
857
- max_filter_by_candidates?: number;
857
+ max_filter_by_candidates?: number | undefined;
858
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` */
859
- sort_by?: string;
859
+ sort_by?: string | undefined;
860
860
  /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
861
- facet_by?: string;
861
+ facet_by?: string | undefined;
862
862
  /** Maximum number of facet values to be returned. */
863
- max_facet_values?: number;
863
+ max_facet_values?: number | undefined;
864
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". */
865
- facet_query?: string;
865
+ facet_query?: string | undefined;
866
866
  /** Controls the fuzziness of the facet query filter. Default: 2. */
867
- facet_query_num_typos?: number;
867
+ facet_query_num_typos?: number | undefined;
868
868
  /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
869
- num_typos?: string;
869
+ num_typos?: string | undefined;
870
870
  /** Results from this specific page number would be fetched. */
871
- page?: number;
871
+ page?: number | undefined;
872
872
  /** Number of results to fetch per page. Default: 10 */
873
- per_page?: number;
873
+ per_page?: number | undefined;
874
874
  /** Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10. */
875
- limit?: number;
875
+ limit?: number | undefined;
876
876
  /** Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter. */
877
- offset?: number;
877
+ offset?: number | undefined;
878
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. */
879
- group_by?: string;
879
+ group_by?: string | undefined;
880
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 */
881
- group_limit?: number;
881
+ group_limit?: number | undefined;
882
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 */
883
- group_missing_values?: boolean;
883
+ group_missing_values?: boolean | undefined;
884
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. */
885
- group_max_candidates?: number;
885
+ group_max_candidates?: number | undefined;
886
886
  /** List of fields from the document to include in the search result */
887
- include_fields?: string;
887
+ include_fields?: string | undefined;
888
888
  /** List of fields from the document to exclude in the search result */
889
- exclude_fields?: string;
889
+ exclude_fields?: string | undefined;
890
890
  /** List of fields which should be highlighted fully without snippeting */
891
- highlight_full_fields?: string;
891
+ highlight_full_fields?: string | undefined;
892
892
  /** The number of tokens that should surround the highlighted text on each side. Default: 4 */
893
- highlight_affix_num_tokens?: number;
893
+ highlight_affix_num_tokens?: number | undefined;
894
894
  /** The start tag used for the highlighted snippets. Default: `<mark>` */
895
- highlight_start_tag?: string;
895
+ highlight_start_tag?: string | undefined;
896
896
  /** The end tag used for the highlighted snippets. Default: `</mark>` */
897
- highlight_end_tag?: string;
897
+ highlight_end_tag?: string | undefined;
898
898
  /** Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 */
899
- snippet_threshold?: number;
899
+ snippet_threshold?: number | undefined;
900
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 */
901
- drop_tokens_threshold?: number;
902
- drop_tokens_mode?: DropTokensMode | (string & {});
901
+ drop_tokens_threshold?: number | undefined;
902
+ drop_tokens_mode?: DropTokensMode | (string & {}) | undefined;
903
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 */
904
- typo_tokens_threshold?: number;
904
+ typo_tokens_threshold?: number | undefined;
905
905
  /** Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. */
906
- enable_typos_for_alpha_numerical_tokens?: boolean;
906
+ enable_typos_for_alpha_numerical_tokens?: boolean | undefined;
907
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 */
908
- filter_curated_hits?: boolean;
908
+ filter_curated_hits?: boolean | undefined;
909
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 */
910
- enable_synonyms?: boolean;
910
+ enable_synonyms?: boolean | undefined;
911
911
  /** Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script). */
912
- enable_analytics?: boolean;
912
+ enable_analytics?: boolean | undefined;
913
913
  /** Allow synonym resolution on word prefixes in the query. Default: false */
914
- synonym_prefix?: boolean;
914
+ synonym_prefix?: boolean | undefined;
915
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 */
916
- demote_synonym_match?: boolean;
916
+ demote_synonym_match?: boolean | undefined;
917
917
  /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
918
- synonym_num_typos?: number;
918
+ synonym_num_typos?: number | undefined;
919
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`. */
920
- pinned_hits?: string;
920
+ pinned_hits?: string | undefined;
921
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`. */
922
- hidden_hits?: string;
922
+ hidden_hits?: string | undefined;
923
923
  /** Comma separated list of tags to trigger the curations rules that match the tags. */
924
- curation_tags?: string;
924
+ curation_tags?: string | undefined;
925
925
  /** A list of custom fields that must be highlighted even if you don't query for them */
926
- highlight_fields?: string;
926
+ highlight_fields?: string | undefined;
927
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. */
928
- rerank_hybrid_matches?: boolean;
928
+ rerank_hybrid_matches?: boolean | undefined;
929
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 */
930
- pre_segmented_query?: boolean;
930
+ pre_segmented_query?: boolean | undefined;
931
931
  /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
932
- preset?: string;
932
+ preset?: string | undefined;
933
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 */
934
- enable_curations?: boolean;
934
+ enable_curations?: boolean | undefined;
935
935
  /** Set this parameter to true to ensure that an exact match is ranked above the others */
936
- prioritize_exact_match?: boolean;
936
+ prioritize_exact_match?: boolean | undefined;
937
937
  /** Make Typesense prioritize documents where the query words appear earlier in the text. */
938
- prioritize_token_position?: boolean;
938
+ prioritize_token_position?: boolean | undefined;
939
939
  /** Make Typesense prioritize documents where the query words appear in more number of fields. */
940
- prioritize_num_matching_fields?: boolean;
940
+ prioritize_num_matching_fields?: boolean | undefined;
941
941
  /** Make Typesense disable typos for numerical tokens. */
942
- enable_typos_for_numerical_tokens?: boolean;
942
+ enable_typos_for_numerical_tokens?: boolean | undefined;
943
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). */
944
- exhaustive_search?: boolean;
944
+ exhaustive_search?: boolean | undefined;
945
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. */
946
- search_cutoff_ms?: number;
946
+ search_cutoff_ms?: number | undefined;
947
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. */
948
- limit_hits?: number;
948
+ limit_hits?: number | undefined;
949
949
  /** Enable server side caching of search query results. By default, caching is disabled. */
950
- use_cache?: boolean;
950
+ use_cache?: boolean | undefined;
951
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. */
952
- cache_ttl?: number;
952
+ cache_ttl?: number | undefined;
953
953
  /** Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
954
- min_len_1typo?: number;
954
+ min_len_1typo?: number | undefined;
955
955
  /** Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
956
- min_len_2typo?: number;
956
+ min_len_2typo?: number | undefined;
957
957
  /** Vector query expression for fetching documents "closest" to a given query/document vector. */
958
- vector_query?: string;
958
+ vector_query?: string | undefined;
959
959
  /** Timeout (in milliseconds) for fetching remote embeddings. */
960
- remote_embedding_timeout_ms?: number;
960
+ remote_embedding_timeout_ms?: number | undefined;
961
961
  /** Number of times to retry fetching remote embeddings. */
962
- remote_embedding_num_tries?: number;
962
+ remote_embedding_num_tries?: number | undefined;
963
963
  /** Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default). */
964
- facet_strategy?: string;
964
+ facet_strategy?: string | undefined;
965
965
  /** Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query. */
966
- stopwords?: string;
966
+ stopwords?: string | undefined;
967
967
  /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
968
- facet_return_parent?: string;
968
+ facet_return_parent?: string | undefined;
969
969
  /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
970
- facet_sample_percent?: number;
970
+ facet_sample_percent?: number | undefined;
971
971
  /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
972
- facet_sample_threshold?: number;
972
+ facet_sample_threshold?: number | undefined;
973
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. */
974
- facet_sample_slope?: number;
974
+ facet_sample_slope?: number | undefined;
975
975
  /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
976
- voice_query?: string;
976
+ voice_query?: string | undefined;
977
977
  /** Enable conversational search. */
978
- conversation?: boolean;
978
+ conversation?: boolean | undefined;
979
979
  /** The Id of Conversation Model to be used. */
980
- conversation_model_id?: string;
980
+ conversation_model_id?: string | undefined;
981
981
  /** The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM. */
982
- conversation_id?: string;
982
+ conversation_id?: string | undefined;
983
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. */
984
- validate_field_names?: boolean;
984
+ validate_field_names?: boolean | undefined;
985
985
  /** The collection to search in. */
986
- collection?: string;
986
+ collection?: string | undefined;
987
987
  /** A separate search API key for each search within a multi_search request */
988
- x_typesense_api_key?: string;
988
+ x_typesense_api_key?: string | undefined;
989
989
  }
990
990
  export type MultiSearchSearchesParameterSearchesList = Array<MultiSearchCollectionParameters>;
991
991
  export interface MultiSearchSearchesParameter {
992
992
  /** When true, merges the search results from each search query into a single ordered set of hits. */
993
- union?: boolean;
993
+ union?: boolean | undefined;
994
994
  searches: MultiSearchSearchesParameterSearchesList;
995
995
  }
996
996
  export type PresetSchemaValue = SearchParameters | MultiSearchSearchesParameter;
@@ -1011,14 +1011,14 @@ export interface GetAnalyticsEventsRequest {
1011
1011
  }
1012
1012
  export type AnalyticsEventsResponseEventsItemDocIdsList = Array<string>;
1013
1013
  export interface AnalyticsEventsResponseEventsItem {
1014
- name?: string;
1015
- event_type?: string;
1016
- collection?: string;
1017
- timestamp?: number;
1018
- user_id?: string;
1019
- doc_id?: string;
1020
- doc_ids?: AnalyticsEventsResponseEventsItemDocIdsList;
1021
- 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;
1022
1022
  }
1023
1023
  export type AnalyticsEventsResponseEventsList = Array<AnalyticsEventsResponseEventsItem>;
1024
1024
  export interface AnalyticsEventsResponse {
@@ -1030,53 +1030,53 @@ export interface GetAnalyticsRuleRequest {
1030
1030
  }
1031
1031
  export type GetAnalyticsRuleResponseParamsMetaFieldsList = Array<string>;
1032
1032
  export interface GetAnalyticsRuleResponseParams {
1033
- destination_collection?: string;
1034
- limit?: number;
1035
- capture_search_requests?: boolean;
1036
- meta_fields?: GetAnalyticsRuleResponseParamsMetaFieldsList;
1037
- expand_query?: boolean;
1038
- counter_field?: string;
1039
- 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;
1040
1040
  }
1041
1041
  export interface GetAnalyticsRuleResponse {
1042
1042
  name: string;
1043
1043
  type: AnalyticsRuleType;
1044
1044
  collection: string;
1045
1045
  event_type: string;
1046
- rule_tag?: string;
1047
- params?: GetAnalyticsRuleResponseParams;
1046
+ rule_tag?: string | undefined;
1047
+ params?: GetAnalyticsRuleResponseParams | undefined;
1048
1048
  }
1049
1049
  export interface GetAnalyticsRulesRequest {
1050
1050
  /** Filter rules by rule_tag */
1051
- rule_tag?: string;
1051
+ rule_tag?: string | undefined;
1052
1052
  }
1053
1053
  export type GetAnalyticsRulesResponseBodyList = Array<AnalyticsRule>;
1054
1054
  export type GetAnalyticsRulesResponse = GetAnalyticsRulesResponseBodyList;
1055
1055
  export interface GetAnalyticsStatusRequest {}
1056
1056
  export interface AnalyticsStatus {
1057
- popular_prefix_queries?: number;
1058
- nohits_prefix_queries?: number;
1059
- log_prefix_queries?: number;
1060
- query_log_events?: number;
1061
- query_counter_events?: number;
1062
- doc_log_events?: number;
1063
- 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;
1064
1064
  }
1065
1065
  export interface GetAPIStatsRequest {}
1066
1066
  export interface APIStatsResponse {
1067
- delete_latency_ms?: number;
1068
- delete_requests_per_second?: number;
1069
- import_latency_ms?: number;
1070
- import_requests_per_second?: number;
1071
- latency_ms?: unknown;
1072
- overloaded_requests_per_second?: number;
1073
- pending_write_batches?: number;
1074
- requests_per_second?: unknown;
1075
- search_latency_ms?: number;
1076
- search_requests_per_second?: number;
1077
- total_requests_per_second?: number;
1078
- write_latency_ms?: number;
1079
- 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;
1080
1080
  }
1081
1081
  export interface GetCollectionRequest {
1082
1082
  /** The name of the collection to retrieve */
@@ -1096,18 +1096,18 @@ export interface GetCollectionResponse {
1096
1096
  /** A list of fields for querying, filtering and faceting */
1097
1097
  fields: GetCollectionResponseFieldsList;
1098
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. */
1099
- default_sorting_field?: string;
1099
+ default_sorting_field?: string | undefined;
1100
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. */
1101
- token_separators?: GetCollectionResponseTokenSeparatorsList;
1101
+ token_separators?: GetCollectionResponseTokenSeparatorsList | undefined;
1102
1102
  /** List of synonym set names to associate with this collection */
1103
- synonym_sets?: GetCollectionResponseSynonymSetsList;
1103
+ synonym_sets?: GetCollectionResponseSynonymSetsList | undefined;
1104
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. */
1105
- enable_nested_fields?: boolean;
1105
+ enable_nested_fields?: boolean | undefined;
1106
1106
  /** List of symbols or special characters to be indexed. */
1107
- symbols_to_index?: GetCollectionResponseSymbolsToIndexList;
1108
- voice_query_model?: VoiceQueryModelCollectionConfig;
1107
+ symbols_to_index?: GetCollectionResponseSymbolsToIndexList | undefined;
1108
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
1109
1109
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
1110
- metadata?: unknown;
1110
+ metadata?: unknown | undefined;
1111
1111
  /** Number of documents in the collection */
1112
1112
  num_documents: number;
1113
1113
  /** Timestamp of when the collection was created (Unix epoch in seconds) */
@@ -1115,14 +1115,14 @@ export interface GetCollectionResponse {
1115
1115
  }
1116
1116
  export interface GetCollectionsRequestGetCollectionsParameters {
1117
1117
  /** Comma-separated list of fields from the collection to exclude from the response */
1118
- exclude_fields?: string;
1118
+ exclude_fields?: string | undefined;
1119
1119
  /** Number of collections to fetch. Default: returns all collections. */
1120
- limit?: number;
1120
+ limit?: number | undefined;
1121
1121
  /** Identifies the starting point to return collections when paginating. */
1122
- offset?: number;
1122
+ offset?: number | undefined;
1123
1123
  }
1124
1124
  export interface GetCollectionsRequest {
1125
- getCollectionsParameters?: GetCollectionsRequestGetCollectionsParameters;
1125
+ getCollectionsParameters?: GetCollectionsRequestGetCollectionsParameters | undefined;
1126
1126
  }
1127
1127
  /** A list of fields for querying, filtering and faceting */
1128
1128
  export type CollectionResponseFieldsList = Array<Field>;
@@ -1138,18 +1138,18 @@ export interface CollectionResponse {
1138
1138
  /** A list of fields for querying, filtering and faceting */
1139
1139
  fields: CollectionResponseFieldsList;
1140
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. */
1141
- default_sorting_field?: string;
1141
+ default_sorting_field?: string | undefined;
1142
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. */
1143
- token_separators?: CollectionResponseTokenSeparatorsList;
1143
+ token_separators?: CollectionResponseTokenSeparatorsList | undefined;
1144
1144
  /** List of synonym set names to associate with this collection */
1145
- synonym_sets?: CollectionResponseSynonymSetsList;
1145
+ synonym_sets?: CollectionResponseSynonymSetsList | undefined;
1146
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. */
1147
- enable_nested_fields?: boolean;
1147
+ enable_nested_fields?: boolean | undefined;
1148
1148
  /** List of symbols or special characters to be indexed. */
1149
- symbols_to_index?: CollectionResponseSymbolsToIndexList;
1150
- voice_query_model?: VoiceQueryModelCollectionConfig;
1149
+ symbols_to_index?: CollectionResponseSymbolsToIndexList | undefined;
1150
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
1151
1151
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
1152
- metadata?: unknown;
1152
+ metadata?: unknown | undefined;
1153
1153
  /** Number of documents in the collection */
1154
1154
  num_documents: number;
1155
1155
  /** Timestamp of when the collection was created (Unix epoch in seconds) */
@@ -1167,19 +1167,19 @@ export interface GetConversationModelResponse {
1167
1167
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
1168
1168
  model_name: string;
1169
1169
  /** The LLM service's API Key */
1170
- api_key?: string | import("effect/Redacted").Redacted<string>;
1170
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
1171
1171
  /** Typesense collection that stores the historical conversations */
1172
1172
  history_collection: string;
1173
1173
  /** LLM service's account ID (only applicable for Cloudflare) */
1174
- account_id?: string;
1174
+ account_id?: string | undefined;
1175
1175
  /** The system prompt that contains special instructions to the LLM */
1176
- system_prompt?: string;
1176
+ system_prompt?: string | undefined;
1177
1177
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
1178
- ttl?: number;
1178
+ ttl?: number | undefined;
1179
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. */
1180
1180
  max_bytes: number;
1181
1181
  /** URL of vLLM service */
1182
- vllm_url?: string;
1182
+ vllm_url?: string | undefined;
1183
1183
  }
1184
1184
  export interface GetCurationSetRequest {
1185
1185
  /** The name of the curation set to retrieve */
@@ -1191,13 +1191,13 @@ export type CurationRuleTagsList = Array<string>;
1191
1191
  export type CurationRuleMatch = "exact" | "contains";
1192
1192
  export interface CurationRule {
1193
1193
  /** List of tag values to associate with this curation rule. */
1194
- tags?: CurationRuleTagsList;
1194
+ tags?: CurationRuleTagsList | undefined;
1195
1195
  /** Indicates what search queries should be curated */
1196
- query?: string;
1196
+ query?: string | undefined;
1197
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. */
1198
- match?: CurationRuleMatch | (string & {});
1198
+ match?: CurationRuleMatch | (string & {}) | undefined;
1199
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). */
1200
- filter_by?: string;
1200
+ filter_by?: string | undefined;
1201
1201
  }
1202
1202
  export interface CurationInclude {
1203
1203
  /** document id that should be included */
@@ -1216,29 +1216,29 @@ export type CurationItemCreateSchemaExcludesList = Array<CurationExclude>;
1216
1216
  export interface CurationItemCreateSchema {
1217
1217
  rule: CurationRule;
1218
1218
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1219
- includes?: CurationItemCreateSchemaIncludesList;
1219
+ includes?: CurationItemCreateSchemaIncludesList | undefined;
1220
1220
  /** List of document `id`s that should be excluded from the search results. */
1221
- excludes?: CurationItemCreateSchemaExcludesList;
1221
+ excludes?: CurationItemCreateSchemaExcludesList | undefined;
1222
1222
  /** A filter by clause that is applied to any search query that matches the curation rule. */
1223
- filter_by?: string;
1223
+ filter_by?: string | undefined;
1224
1224
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
1225
- remove_matched_tokens?: boolean;
1225
+ remove_matched_tokens?: boolean | undefined;
1226
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. */
1227
- metadata?: unknown;
1227
+ metadata?: unknown | undefined;
1228
1228
  /** A sort by clause that is applied to any search query that matches the curation rule. */
1229
- sort_by?: string;
1229
+ sort_by?: string | undefined;
1230
1230
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
1231
- replace_query?: string;
1231
+ replace_query?: string | undefined;
1232
1232
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
1233
- filter_curated_hits?: boolean;
1233
+ filter_curated_hits?: boolean | undefined;
1234
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. */
1235
- effective_from_ts?: number;
1235
+ effective_from_ts?: number | undefined;
1236
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. */
1237
- effective_to_ts?: number;
1237
+ effective_to_ts?: number | undefined;
1238
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. */
1239
- stop_processing?: boolean;
1239
+ stop_processing?: boolean | undefined;
1240
1240
  /** ID of the curation item */
1241
- id?: string;
1241
+ id?: string | undefined;
1242
1242
  }
1243
1243
  /** Array of curation items */
1244
1244
  export type GetCurationSetResponseItemsList = Array<CurationItemCreateSchema>;
@@ -1246,7 +1246,7 @@ export interface GetCurationSetResponse {
1246
1246
  /** Array of curation items */
1247
1247
  items: GetCurationSetResponseItemsList;
1248
1248
  /** Optional description for the curation set */
1249
- description?: string;
1249
+ description?: string | undefined;
1250
1250
  name: string;
1251
1251
  }
1252
1252
  export interface GetCurationSetItemRequest {
@@ -1262,27 +1262,27 @@ export type GetCurationSetItemResponseExcludesList = Array<CurationExclude>;
1262
1262
  export interface GetCurationSetItemResponse {
1263
1263
  rule: CurationRule;
1264
1264
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1265
- includes?: GetCurationSetItemResponseIncludesList;
1265
+ includes?: GetCurationSetItemResponseIncludesList | undefined;
1266
1266
  /** List of document `id`s that should be excluded from the search results. */
1267
- excludes?: GetCurationSetItemResponseExcludesList;
1267
+ excludes?: GetCurationSetItemResponseExcludesList | undefined;
1268
1268
  /** A filter by clause that is applied to any search query that matches the curation rule. */
1269
- filter_by?: string;
1269
+ filter_by?: string | undefined;
1270
1270
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
1271
- remove_matched_tokens?: boolean;
1271
+ remove_matched_tokens?: boolean | undefined;
1272
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. */
1273
- metadata?: unknown;
1273
+ metadata?: unknown | undefined;
1274
1274
  /** A sort by clause that is applied to any search query that matches the curation rule. */
1275
- sort_by?: string;
1275
+ sort_by?: string | undefined;
1276
1276
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
1277
- replace_query?: string;
1277
+ replace_query?: string | undefined;
1278
1278
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
1279
- filter_curated_hits?: boolean;
1279
+ filter_curated_hits?: boolean | undefined;
1280
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. */
1281
- effective_from_ts?: number;
1281
+ effective_from_ts?: number | undefined;
1282
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. */
1283
- effective_to_ts?: number;
1283
+ effective_to_ts?: number | undefined;
1284
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. */
1285
- stop_processing?: boolean;
1285
+ stop_processing?: boolean | undefined;
1286
1286
  /** ID of the curation item */
1287
1287
  id: string;
1288
1288
  }
@@ -1297,27 +1297,27 @@ export type CurationItemSchemaExcludesList = Array<CurationExclude>;
1297
1297
  export interface CurationItemSchema {
1298
1298
  rule: CurationRule;
1299
1299
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1300
- includes?: CurationItemSchemaIncludesList;
1300
+ includes?: CurationItemSchemaIncludesList | undefined;
1301
1301
  /** List of document `id`s that should be excluded from the search results. */
1302
- excludes?: CurationItemSchemaExcludesList;
1302
+ excludes?: CurationItemSchemaExcludesList | undefined;
1303
1303
  /** A filter by clause that is applied to any search query that matches the curation rule. */
1304
- filter_by?: string;
1304
+ filter_by?: string | undefined;
1305
1305
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
1306
- remove_matched_tokens?: boolean;
1306
+ remove_matched_tokens?: boolean | undefined;
1307
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. */
1308
- metadata?: unknown;
1308
+ metadata?: unknown | undefined;
1309
1309
  /** A sort by clause that is applied to any search query that matches the curation rule. */
1310
- sort_by?: string;
1310
+ sort_by?: string | undefined;
1311
1311
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
1312
- replace_query?: string;
1312
+ replace_query?: string | undefined;
1313
1313
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
1314
- filter_curated_hits?: boolean;
1314
+ filter_curated_hits?: boolean | undefined;
1315
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. */
1316
- effective_from_ts?: number;
1316
+ effective_from_ts?: number | undefined;
1317
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. */
1318
- effective_to_ts?: number;
1318
+ effective_to_ts?: number | undefined;
1319
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. */
1320
- stop_processing?: boolean;
1320
+ stop_processing?: boolean | undefined;
1321
1321
  /** ID of the curation item */
1322
1322
  id: string;
1323
1323
  }
@@ -1330,7 +1330,7 @@ export interface CurationSetSchema {
1330
1330
  /** Array of curation items */
1331
1331
  items: CurationSetSchemaItemsList;
1332
1332
  /** Optional description for the curation set */
1333
- description?: string;
1333
+ description?: string | undefined;
1334
1334
  name: string;
1335
1335
  }
1336
1336
  export type GetCurationSetsResponseBodyList = Array<CurationSetSchema>;
@@ -1349,25 +1349,25 @@ export interface GetKeyRequest {
1349
1349
  export type GetKeyResponseActionsList = Array<string>;
1350
1350
  export type GetKeyResponseCollectionsList = Array<string>;
1351
1351
  export interface GetKeyResponse {
1352
- value?: string;
1352
+ value?: string | undefined;
1353
1353
  description: string;
1354
1354
  actions: GetKeyResponseActionsList;
1355
1355
  collections: GetKeyResponseCollectionsList;
1356
- expires_at?: number;
1357
- id?: number;
1358
- value_prefix?: string;
1356
+ expires_at?: number | undefined;
1357
+ id?: number | undefined;
1358
+ value_prefix?: string | undefined;
1359
1359
  }
1360
1360
  export interface GetKeysRequest {}
1361
1361
  export type ApiKeyActionsList = Array<string>;
1362
1362
  export type ApiKeyCollectionsList = Array<string>;
1363
1363
  export interface ApiKey {
1364
- value?: string;
1364
+ value?: string | undefined;
1365
1365
  description: string;
1366
1366
  actions: ApiKeyActionsList;
1367
1367
  collections: ApiKeyCollectionsList;
1368
- expires_at?: number;
1369
- id?: number;
1370
- value_prefix?: string;
1368
+ expires_at?: number | undefined;
1369
+ id?: number | undefined;
1370
+ value_prefix?: string | undefined;
1371
1371
  }
1372
1372
  export type ApiKeysResponseKeysList = Array<ApiKey>;
1373
1373
  export interface ApiKeysResponse {
@@ -1383,41 +1383,41 @@ export interface GetNLSearchModelRequest {
1383
1383
  export type GetNLSearchModelResponseStopSequencesList = Array<string>;
1384
1384
  export interface GetNLSearchModelResponse {
1385
1385
  /** Name of the NL model to use */
1386
- model_name?: string;
1386
+ model_name?: string | undefined;
1387
1387
  /** API key for the NL model service */
1388
- api_key?: string | import("effect/Redacted").Redacted<string>;
1388
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
1389
1389
  /** Custom API URL for the NL model service */
1390
- api_url?: string;
1390
+ api_url?: string | undefined;
1391
1391
  /** Maximum number of bytes to process */
1392
- max_bytes?: number;
1392
+ max_bytes?: number | undefined;
1393
1393
  /** Temperature parameter for the NL model */
1394
- temperature?: number;
1394
+ temperature?: number | undefined;
1395
1395
  /** System prompt for the NL model */
1396
- system_prompt?: string;
1396
+ system_prompt?: string | undefined;
1397
1397
  /** Top-p parameter for the NL model (Google-specific) */
1398
- top_p?: number;
1398
+ top_p?: number | undefined;
1399
1399
  /** Top-k parameter for the NL model (Google-specific) */
1400
- top_k?: number;
1400
+ top_k?: number | undefined;
1401
1401
  /** Stop sequences for the NL model (Google-specific) */
1402
- stop_sequences?: GetNLSearchModelResponseStopSequencesList;
1402
+ stop_sequences?: GetNLSearchModelResponseStopSequencesList | undefined;
1403
1403
  /** API version for the NL model service */
1404
- api_version?: string;
1404
+ api_version?: string | undefined;
1405
1405
  /** Project ID for GCP Vertex AI */
1406
- project_id?: string;
1406
+ project_id?: string | undefined;
1407
1407
  /** Access token for GCP Vertex AI */
1408
- access_token?: string | import("effect/Redacted").Redacted<string>;
1408
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
1409
1409
  /** Refresh token for GCP Vertex AI */
1410
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
1410
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
1411
1411
  /** Client ID for GCP Vertex AI */
1412
- client_id?: string;
1412
+ client_id?: string | undefined;
1413
1413
  /** Client secret for GCP Vertex AI */
1414
- client_secret?: string | import("effect/Redacted").Redacted<string>;
1414
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
1415
1415
  /** Region for GCP Vertex AI */
1416
- region?: string;
1416
+ region?: string | undefined;
1417
1417
  /** Maximum output tokens for GCP Vertex AI */
1418
- max_output_tokens?: number;
1418
+ max_output_tokens?: number | undefined;
1419
1419
  /** Account ID for Cloudflare-specific models */
1420
- account_id?: string;
1420
+ account_id?: string | undefined;
1421
1421
  /** Optional ID for the NL search model */
1422
1422
  id: string;
1423
1423
  }
@@ -1433,11 +1433,11 @@ export interface GetPresetResponse {
1433
1433
  export interface GetSchemaChangesRequest {}
1434
1434
  export interface SchemaChangeStatus {
1435
1435
  /** Name of the collection being modified */
1436
- collection?: string;
1436
+ collection?: string | undefined;
1437
1437
  /** Number of documents that have been validated */
1438
- validated_docs?: number;
1438
+ validated_docs?: number | undefined;
1439
1439
  /** Number of documents that have been altered */
1440
- altered_docs?: number;
1440
+ altered_docs?: number | undefined;
1441
1441
  }
1442
1442
  export type GetSchemaChangesResponseBodyList = Array<SchemaChangeStatus>;
1443
1443
  export type GetSchemaChangesResponse = GetSchemaChangesResponseBodyList;
@@ -1467,7 +1467,7 @@ export type StopwordsSetSchemaStopwordsList = Array<string>;
1467
1467
  export interface StopwordsSetSchema {
1468
1468
  id: string;
1469
1469
  stopwords: StopwordsSetSchemaStopwordsList;
1470
- locale?: string;
1470
+ locale?: string | undefined;
1471
1471
  }
1472
1472
  export interface StopwordsSetRetrieveSchema {
1473
1473
  stopwords: StopwordsSetSchema;
@@ -1491,11 +1491,11 @@ export interface SynonymItemSchema {
1491
1491
  /** Array of words that should be considered as synonyms */
1492
1492
  synonyms: SynonymItemSchemaSynonymsList;
1493
1493
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
1494
- root?: string;
1494
+ root?: string | undefined;
1495
1495
  /** Locale for the synonym, leave blank to use the standard tokenizer */
1496
- locale?: string;
1496
+ locale?: string | undefined;
1497
1497
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
1498
- symbols_to_index?: SynonymItemSchemaSymbolsToIndexList;
1498
+ symbols_to_index?: SynonymItemSchemaSymbolsToIndexList | undefined;
1499
1499
  }
1500
1500
  /** Array of synonym items */
1501
1501
  export type GetSynonymSetResponseItemsList = Array<SynonymItemSchema>;
@@ -1521,11 +1521,11 @@ export interface GetSynonymSetItemResponse {
1521
1521
  /** Array of words that should be considered as synonyms */
1522
1522
  synonyms: GetSynonymSetItemResponseSynonymsList;
1523
1523
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
1524
- root?: string;
1524
+ root?: string | undefined;
1525
1525
  /** Locale for the synonym, leave blank to use the standard tokenizer */
1526
- locale?: string;
1526
+ locale?: string | undefined;
1527
1527
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
1528
- symbols_to_index?: GetSynonymSetItemResponseSymbolsToIndexList;
1528
+ symbols_to_index?: GetSynonymSetItemResponseSymbolsToIndexList | undefined;
1529
1529
  }
1530
1530
  export interface GetSynonymSetItemsRequest {
1531
1531
  /** The name of the synonym set to retrieve items for */
@@ -1551,18 +1551,18 @@ export interface HealthStatus {
1551
1551
  export type IndexAction = "create" | "update" | "upsert" | "emplace";
1552
1552
  export type DirtyValues = "coerce_or_reject" | "coerce_or_drop" | "drop" | "reject";
1553
1553
  export interface ImportDocumentsRequestImportDocumentsParameters {
1554
- batch_size?: number;
1554
+ batch_size?: number | undefined;
1555
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. */
1556
- return_id?: boolean;
1557
- remote_embedding_batch_size?: number;
1558
- return_doc?: boolean;
1559
- action?: IndexAction | (string & {});
1560
- 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;
1561
1561
  }
1562
1562
  export interface ImportDocumentsRequest {
1563
1563
  /** The name of the collection */
1564
1564
  collectionName: string;
1565
- importDocumentsParameters?: ImportDocumentsRequestImportDocumentsParameters;
1565
+ importDocumentsParameters?: ImportDocumentsRequestImportDocumentsParameters | undefined;
1566
1566
  }
1567
1567
  export interface ImportDocumentsResponse {}
1568
1568
  export interface ImportStemmingDictionaryRequest {
@@ -1575,15 +1575,15 @@ export interface IndexDocumentRequest {
1575
1575
  /** The name of the collection to add the document to */
1576
1576
  collectionName: string;
1577
1577
  /** Additional action to perform */
1578
- action?: IndexAction | (string & {});
1578
+ action?: IndexAction | (string & {}) | undefined;
1579
1579
  /** Dealing with Dirty Data */
1580
- dirty_values?: DirtyValues | (string & {});
1580
+ dirty_values?: DirtyValues | (string & {}) | undefined;
1581
1581
  }
1582
1582
  export type IndexDocumentResponse = unknown;
1583
1583
  export interface ListStemmingDictionariesRequest {}
1584
1584
  export type ListStemmingDictionariesResponseDictionariesList = Array<string>;
1585
1585
  export interface ListStemmingDictionariesResponse {
1586
- dictionaries?: ListStemmingDictionariesResponseDictionariesList;
1586
+ dictionaries?: ListStemmingDictionariesResponseDictionariesList | undefined;
1587
1587
  }
1588
1588
  export interface SearchCollectionRequest {
1589
1589
  /** The name of the collection to search for the document under */
@@ -1591,24 +1591,24 @@ export interface SearchCollectionRequest {
1591
1591
  searchParameters: SearchParameters;
1592
1592
  }
1593
1593
  export interface FacetCountsCountsItem {
1594
- count?: number;
1595
- highlighted?: string;
1596
- value?: string;
1597
- parent?: unknown;
1594
+ count?: number | undefined;
1595
+ highlighted?: string | undefined;
1596
+ value?: string | undefined;
1597
+ parent?: unknown | undefined;
1598
1598
  }
1599
1599
  export type FacetCountsCountsList = Array<FacetCountsCountsItem>;
1600
1600
  export interface FacetCountsStats {
1601
- max?: number;
1602
- min?: number;
1603
- sum?: number;
1604
- total_values?: number;
1605
- avg?: number;
1601
+ max?: number | undefined;
1602
+ min?: number | undefined;
1603
+ sum?: number | undefined;
1604
+ total_values?: number | undefined;
1605
+ avg?: number | undefined;
1606
1606
  }
1607
1607
  export interface FacetCounts {
1608
- counts?: FacetCountsCountsList;
1609
- field_name?: string;
1610
- sampled?: boolean;
1611
- stats?: FacetCountsStats;
1608
+ counts?: FacetCountsCountsList | undefined;
1609
+ field_name?: string | undefined;
1610
+ sampled?: boolean | undefined;
1611
+ stats?: FacetCountsStats | undefined;
1612
1612
  }
1613
1613
  export type SearchResultFacetCountsList = Array<FacetCounts>;
1614
1614
  export type SearchGroupedHitGroupKeyList = Array<unknown>;
@@ -1620,18 +1620,18 @@ export type SearchHighlightValuesList = Array<string>;
1620
1620
  export type SearchHighlightIndicesList = Array<number>;
1621
1621
  export type SearchHighlightMatchedTokensList = Array<unknown>;
1622
1622
  export interface SearchHighlight {
1623
- field?: string;
1623
+ field?: string | undefined;
1624
1624
  /** Present only for (non-array) string fields */
1625
- snippet?: string;
1625
+ snippet?: string | undefined;
1626
1626
  /** Present only for (array) string[] fields */
1627
- snippets?: SearchHighlightSnippetsList;
1627
+ snippets?: SearchHighlightSnippetsList | undefined;
1628
1628
  /** Full field value with highlighting, present only for (non-array) string fields */
1629
- value?: string;
1629
+ value?: string | undefined;
1630
1630
  /** Full field value with highlighting, present only for (array) string[] fields */
1631
- values?: SearchHighlightValuesList;
1631
+ values?: SearchHighlightValuesList | undefined;
1632
1632
  /** The indices property will be present only for string[] fields and will contain the corresponding indices of the snippets in the search field */
1633
- indices?: SearchHighlightIndicesList;
1634
- matched_tokens?: SearchHighlightMatchedTokensList;
1633
+ indices?: SearchHighlightIndicesList | undefined;
1634
+ matched_tokens?: SearchHighlightMatchedTokensList | undefined;
1635
1635
  }
1636
1636
  /** (Deprecated) Contains highlighted portions of the search fields */
1637
1637
  export type SearchResultHitHighlightsList = Array<SearchHighlight>;
@@ -1640,43 +1640,43 @@ export type SearchResultHitHighlightMap = { [key: string]: unknown | undefined }
1640
1640
  /** Can be any key-value pair */
1641
1641
  export type SearchResultHitDocumentMap = { [key: string]: unknown | undefined };
1642
1642
  export interface SearchResultHitTextMatchInfo {
1643
- best_field_score?: string;
1644
- best_field_weight?: number;
1645
- fields_matched?: number;
1646
- num_tokens_dropped?: number;
1647
- score?: string;
1648
- tokens_matched?: number;
1649
- 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;
1650
1650
  }
1651
1651
  /** Can be any key-value pair */
1652
1652
  export type SearchResultHitGeoDistanceMetersMap = { [key: string]: number | undefined };
1653
1653
  /** Information about hybrid search scoring */
1654
1654
  export interface SearchResultHitHybridSearchInfo {
1655
1655
  /** Combined score from rank fusion of text and vector search */
1656
- rank_fusion_score?: number;
1656
+ rank_fusion_score?: number | undefined;
1657
1657
  }
1658
1658
  export interface SearchResultHit {
1659
1659
  /** (Deprecated) Contains highlighted portions of the search fields */
1660
- highlights?: SearchResultHitHighlightsList;
1660
+ highlights?: SearchResultHitHighlightsList | undefined;
1661
1661
  /** Highlighted version of the matching document */
1662
- highlight?: SearchResultHitHighlightMap;
1662
+ highlight?: SearchResultHitHighlightMap | undefined;
1663
1663
  /** Can be any key-value pair */
1664
- document?: SearchResultHitDocumentMap;
1665
- text_match?: number;
1666
- text_match_info?: SearchResultHitTextMatchInfo;
1664
+ document?: SearchResultHitDocumentMap | undefined;
1665
+ text_match?: number | undefined;
1666
+ text_match_info?: SearchResultHitTextMatchInfo | undefined;
1667
1667
  /** Can be any key-value pair */
1668
- geo_distance_meters?: SearchResultHitGeoDistanceMetersMap;
1668
+ geo_distance_meters?: SearchResultHitGeoDistanceMetersMap | undefined;
1669
1669
  /** Distance between the query vector and matching document's vector value */
1670
- vector_distance?: number;
1670
+ vector_distance?: number | undefined;
1671
1671
  /** Information about hybrid search scoring */
1672
- hybrid_search_info?: SearchResultHitHybridSearchInfo;
1672
+ hybrid_search_info?: SearchResultHitHybridSearchInfo | undefined;
1673
1673
  /** Returned only for union query response. Indicates the index of the query which this document matched to. */
1674
- search_index?: number;
1674
+ search_index?: number | undefined;
1675
1675
  }
1676
1676
  /** The documents that matched the search query */
1677
1677
  export type SearchGroupedHitHitsList = Array<SearchResultHit>;
1678
1678
  export interface SearchGroupedHit {
1679
- found?: number;
1679
+ found?: number | undefined;
1680
1680
  group_key: SearchGroupedHitGroupKeyList;
1681
1681
  /** The documents that matched the search query */
1682
1682
  hits: SearchGroupedHitHitsList;
@@ -1685,14 +1685,14 @@ export type SearchResultGroupedHitsList = Array<SearchGroupedHit>;
1685
1685
  /** The documents that matched the search query */
1686
1686
  export type SearchResultHitsList = Array<SearchResultHit>;
1687
1687
  export interface SearchRequestParamsVoiceQuery {
1688
- transcribed_query?: string;
1688
+ transcribed_query?: string | undefined;
1689
1689
  }
1690
1690
  export interface SearchRequestParams {
1691
1691
  collection_name: string;
1692
- first_q?: string;
1692
+ first_q?: string | undefined;
1693
1693
  q: string;
1694
1694
  per_page: number;
1695
- voice_query?: SearchRequestParamsVoiceQuery;
1695
+ voice_query?: SearchRequestParamsVoiceQuery | undefined;
1696
1696
  }
1697
1697
  export type SearchResultConversationConversationHistoryList = Array<unknown>;
1698
1698
  export interface SearchResultConversation {
@@ -1706,185 +1706,185 @@ export type SearchResultUnionRequestParamsList = Array<SearchRequestParams>;
1706
1706
  /** Custom JSON object that can be returned in the search response */
1707
1707
  export type SearchResultMetadataMap = { [key: string]: unknown | undefined };
1708
1708
  export interface SearchResult {
1709
- facet_counts?: SearchResultFacetCountsList;
1709
+ facet_counts?: SearchResultFacetCountsList | undefined;
1710
1710
  /** The number of documents found */
1711
- found?: number;
1712
- found_docs?: number;
1711
+ found?: number | undefined;
1712
+ found_docs?: number | undefined;
1713
1713
  /** The number of milliseconds the search took */
1714
- search_time_ms?: number;
1714
+ search_time_ms?: number | undefined;
1715
1715
  /** The total number of documents in the collection */
1716
- out_of?: number;
1716
+ out_of?: number | undefined;
1717
1717
  /** Whether the search was cut off */
1718
- search_cutoff?: boolean;
1718
+ search_cutoff?: boolean | undefined;
1719
1719
  /** The search result page number */
1720
- page?: number;
1721
- grouped_hits?: SearchResultGroupedHitsList;
1720
+ page?: number | undefined;
1721
+ grouped_hits?: SearchResultGroupedHitsList | undefined;
1722
1722
  /** The documents that matched the search query */
1723
- hits?: SearchResultHitsList;
1724
- request_params?: SearchRequestParams;
1725
- conversation?: SearchResultConversation;
1723
+ hits?: SearchResultHitsList | undefined;
1724
+ request_params?: SearchRequestParams | undefined;
1725
+ conversation?: SearchResultConversation | undefined;
1726
1726
  /** Returned only for union query response. */
1727
- union_request_params?: SearchResultUnionRequestParamsList;
1727
+ union_request_params?: SearchResultUnionRequestParamsList | undefined;
1728
1728
  /** Custom JSON object that can be returned in the search response */
1729
- metadata?: SearchResultMetadataMap;
1729
+ metadata?: SearchResultMetadataMap | undefined;
1730
1730
  }
1731
1731
  /** Parameters for the multi search API. */
1732
1732
  export interface MultiSearchParameters {
1733
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. */
1734
- q?: string;
1734
+ q?: string | undefined;
1735
1735
  /** A list of `string` fields that should be queried against. Multiple fields are separated with a comma. */
1736
- query_by?: string;
1736
+ query_by?: string | undefined;
1737
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. */
1738
- query_by_weights?: string;
1738
+ query_by_weights?: string | undefined;
1739
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. */
1740
- text_match_type?: string;
1740
+ text_match_type?: string | undefined;
1741
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. */
1742
- prefix?: string;
1742
+ prefix?: string | undefined;
1743
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 */
1744
- infix?: string;
1744
+ infix?: string | undefined;
1745
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. */
1746
- max_extra_prefix?: number;
1746
+ max_extra_prefix?: number | undefined;
1747
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. */
1748
- max_extra_suffix?: number;
1748
+ max_extra_suffix?: number | undefined;
1749
1749
  /** Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&. */
1750
- filter_by?: string;
1750
+ filter_by?: string | undefined;
1751
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 */
1752
- enable_lazy_filter?: boolean;
1752
+ enable_lazy_filter?: boolean | undefined;
1753
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*. */
1754
- max_filter_by_candidates?: number;
1754
+ max_filter_by_candidates?: number | undefined;
1755
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` */
1756
- sort_by?: string;
1756
+ sort_by?: string | undefined;
1757
1757
  /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
1758
- facet_by?: string;
1758
+ facet_by?: string | undefined;
1759
1759
  /** Maximum number of facet values to be returned. */
1760
- max_facet_values?: number;
1760
+ max_facet_values?: number | undefined;
1761
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". */
1762
- facet_query?: string;
1762
+ facet_query?: string | undefined;
1763
1763
  /** Controls the fuzziness of the facet query filter. Default: 2. */
1764
- facet_query_num_typos?: number;
1764
+ facet_query_num_typos?: number | undefined;
1765
1765
  /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
1766
- num_typos?: string;
1766
+ num_typos?: string | undefined;
1767
1767
  /** Results from this specific page number would be fetched. */
1768
- page?: number;
1768
+ page?: number | undefined;
1769
1769
  /** Number of results to fetch per page. Default: 10 */
1770
- per_page?: number;
1770
+ per_page?: number | undefined;
1771
1771
  /** Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10. */
1772
- limit?: number;
1772
+ limit?: number | undefined;
1773
1773
  /** Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter. */
1774
- offset?: number;
1774
+ offset?: number | undefined;
1775
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. */
1776
- group_by?: string;
1776
+ group_by?: string | undefined;
1777
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 */
1778
- group_limit?: number;
1778
+ group_limit?: number | undefined;
1779
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 */
1780
- group_missing_values?: boolean;
1780
+ group_missing_values?: boolean | undefined;
1781
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. */
1782
- group_max_candidates?: number;
1782
+ group_max_candidates?: number | undefined;
1783
1783
  /** List of fields from the document to include in the search result */
1784
- include_fields?: string;
1784
+ include_fields?: string | undefined;
1785
1785
  /** List of fields from the document to exclude in the search result */
1786
- exclude_fields?: string;
1786
+ exclude_fields?: string | undefined;
1787
1787
  /** List of fields which should be highlighted fully without snippeting */
1788
- highlight_full_fields?: string;
1788
+ highlight_full_fields?: string | undefined;
1789
1789
  /** The number of tokens that should surround the highlighted text on each side. Default: 4 */
1790
- highlight_affix_num_tokens?: number;
1790
+ highlight_affix_num_tokens?: number | undefined;
1791
1791
  /** The start tag used for the highlighted snippets. Default: `<mark>` */
1792
- highlight_start_tag?: string;
1792
+ highlight_start_tag?: string | undefined;
1793
1793
  /** The end tag used for the highlighted snippets. Default: `</mark>` */
1794
- highlight_end_tag?: string;
1794
+ highlight_end_tag?: string | undefined;
1795
1795
  /** Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 */
1796
- snippet_threshold?: number;
1796
+ snippet_threshold?: number | undefined;
1797
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 */
1798
- drop_tokens_threshold?: number;
1799
- drop_tokens_mode?: DropTokensMode | (string & {});
1798
+ drop_tokens_threshold?: number | undefined;
1799
+ drop_tokens_mode?: DropTokensMode | (string & {}) | undefined;
1800
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 */
1801
- typo_tokens_threshold?: number;
1801
+ typo_tokens_threshold?: number | undefined;
1802
1802
  /** Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. */
1803
- enable_typos_for_alpha_numerical_tokens?: boolean;
1803
+ enable_typos_for_alpha_numerical_tokens?: boolean | undefined;
1804
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 */
1805
- filter_curated_hits?: boolean;
1805
+ filter_curated_hits?: boolean | undefined;
1806
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 */
1807
- enable_synonyms?: boolean;
1807
+ enable_synonyms?: boolean | undefined;
1808
1808
  /** Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script). */
1809
- enable_analytics?: boolean;
1809
+ enable_analytics?: boolean | undefined;
1810
1810
  /** Allow synonym resolution on word prefixes in the query. Default: false */
1811
- synonym_prefix?: boolean;
1811
+ synonym_prefix?: boolean | undefined;
1812
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 */
1813
- demote_synonym_match?: boolean;
1813
+ demote_synonym_match?: boolean | undefined;
1814
1814
  /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
1815
- synonym_num_typos?: number;
1815
+ synonym_num_typos?: number | undefined;
1816
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`. */
1817
- pinned_hits?: string;
1817
+ pinned_hits?: string | undefined;
1818
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`. */
1819
- hidden_hits?: string;
1819
+ hidden_hits?: string | undefined;
1820
1820
  /** Comma separated list of tags to trigger the curations rules that match the tags. */
1821
- curation_tags?: string;
1821
+ curation_tags?: string | undefined;
1822
1822
  /** A list of custom fields that must be highlighted even if you don't query for them */
1823
- highlight_fields?: string;
1823
+ highlight_fields?: string | undefined;
1824
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. */
1825
- rerank_hybrid_matches?: boolean;
1825
+ rerank_hybrid_matches?: boolean | undefined;
1826
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 */
1827
- pre_segmented_query?: boolean;
1827
+ pre_segmented_query?: boolean | undefined;
1828
1828
  /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
1829
- preset?: string;
1829
+ preset?: string | undefined;
1830
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 */
1831
- enable_curations?: boolean;
1831
+ enable_curations?: boolean | undefined;
1832
1832
  /** Set this parameter to true to ensure that an exact match is ranked above the others */
1833
- prioritize_exact_match?: boolean;
1833
+ prioritize_exact_match?: boolean | undefined;
1834
1834
  /** Make Typesense prioritize documents where the query words appear earlier in the text. */
1835
- prioritize_token_position?: boolean;
1835
+ prioritize_token_position?: boolean | undefined;
1836
1836
  /** Make Typesense prioritize documents where the query words appear in more number of fields. */
1837
- prioritize_num_matching_fields?: boolean;
1837
+ prioritize_num_matching_fields?: boolean | undefined;
1838
1838
  /** Make Typesense disable typos for numerical tokens. */
1839
- enable_typos_for_numerical_tokens?: boolean;
1839
+ enable_typos_for_numerical_tokens?: boolean | undefined;
1840
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). */
1841
- exhaustive_search?: boolean;
1841
+ exhaustive_search?: boolean | undefined;
1842
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. */
1843
- search_cutoff_ms?: number;
1843
+ search_cutoff_ms?: number | undefined;
1844
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. */
1845
- limit_hits?: number;
1845
+ limit_hits?: number | undefined;
1846
1846
  /** Enable server side caching of search query results. By default, caching is disabled. */
1847
- use_cache?: boolean;
1847
+ use_cache?: boolean | undefined;
1848
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. */
1849
- cache_ttl?: number;
1849
+ cache_ttl?: number | undefined;
1850
1850
  /** Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
1851
- min_len_1typo?: number;
1851
+ min_len_1typo?: number | undefined;
1852
1852
  /** Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
1853
- min_len_2typo?: number;
1853
+ min_len_2typo?: number | undefined;
1854
1854
  /** Vector query expression for fetching documents "closest" to a given query/document vector. */
1855
- vector_query?: string;
1855
+ vector_query?: string | undefined;
1856
1856
  /** Timeout (in milliseconds) for fetching remote embeddings. */
1857
- remote_embedding_timeout_ms?: number;
1857
+ remote_embedding_timeout_ms?: number | undefined;
1858
1858
  /** Number of times to retry fetching remote embeddings. */
1859
- remote_embedding_num_tries?: number;
1859
+ remote_embedding_num_tries?: number | undefined;
1860
1860
  /** Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default). */
1861
- facet_strategy?: string;
1861
+ facet_strategy?: string | undefined;
1862
1862
  /** Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query. */
1863
- stopwords?: string;
1863
+ stopwords?: string | undefined;
1864
1864
  /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
1865
- facet_return_parent?: string;
1865
+ facet_return_parent?: string | undefined;
1866
1866
  /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
1867
- facet_sample_percent?: number;
1867
+ facet_sample_percent?: number | undefined;
1868
1868
  /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
1869
- facet_sample_threshold?: number;
1869
+ facet_sample_threshold?: number | undefined;
1870
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. */
1871
- facet_sample_slope?: number;
1871
+ facet_sample_slope?: number | undefined;
1872
1872
  /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
1873
- voice_query?: string;
1873
+ voice_query?: string | undefined;
1874
1874
  /** Enable conversational search. */
1875
- conversation?: boolean;
1875
+ conversation?: boolean | undefined;
1876
1876
  /** The Id of Conversation Model to be used. */
1877
- conversation_model_id?: string;
1877
+ conversation_model_id?: string | undefined;
1878
1878
  /** The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM. */
1879
- conversation_id?: string;
1879
+ conversation_id?: string | undefined;
1880
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. */
1881
- validate_field_names?: boolean;
1881
+ validate_field_names?: boolean | undefined;
1882
1882
  }
1883
1883
  export type SearchMultiRequestSearchesList = Array<MultiSearchCollectionParameters>;
1884
1884
  export interface SearchMultiRequest {
1885
1885
  multiSearchParameters: MultiSearchParameters;
1886
1886
  /** When true, merges the search results from each search query into a single ordered set of hits. */
1887
- union?: boolean;
1887
+ union?: boolean | undefined;
1888
1888
  searches: SearchMultiRequestSearchesList;
1889
1889
  }
1890
1890
  export type MultiSearchResultItemFacetCountsList = Array<FacetCounts>;
@@ -1896,36 +1896,36 @@ export type MultiSearchResultItemUnionRequestParamsList = Array<SearchRequestPar
1896
1896
  /** Custom JSON object that can be returned in the search response */
1897
1897
  export type MultiSearchResultItemMetadataMap = { [key: string]: unknown | undefined };
1898
1898
  export interface MultiSearchResultItem {
1899
- facet_counts?: MultiSearchResultItemFacetCountsList;
1899
+ facet_counts?: MultiSearchResultItemFacetCountsList | undefined;
1900
1900
  /** The number of documents found */
1901
- found?: number;
1902
- found_docs?: number;
1901
+ found?: number | undefined;
1902
+ found_docs?: number | undefined;
1903
1903
  /** The number of milliseconds the search took */
1904
- search_time_ms?: number;
1904
+ search_time_ms?: number | undefined;
1905
1905
  /** The total number of documents in the collection */
1906
- out_of?: number;
1906
+ out_of?: number | undefined;
1907
1907
  /** Whether the search was cut off */
1908
- search_cutoff?: boolean;
1908
+ search_cutoff?: boolean | undefined;
1909
1909
  /** The search result page number */
1910
- page?: number;
1911
- grouped_hits?: MultiSearchResultItemGroupedHitsList;
1910
+ page?: number | undefined;
1911
+ grouped_hits?: MultiSearchResultItemGroupedHitsList | undefined;
1912
1912
  /** The documents that matched the search query */
1913
- hits?: MultiSearchResultItemHitsList;
1914
- request_params?: SearchRequestParams;
1915
- conversation?: SearchResultConversation;
1913
+ hits?: MultiSearchResultItemHitsList | undefined;
1914
+ request_params?: SearchRequestParams | undefined;
1915
+ conversation?: SearchResultConversation | undefined;
1916
1916
  /** Returned only for union query response. */
1917
- union_request_params?: MultiSearchResultItemUnionRequestParamsList;
1917
+ union_request_params?: MultiSearchResultItemUnionRequestParamsList | undefined;
1918
1918
  /** Custom JSON object that can be returned in the search response */
1919
- metadata?: MultiSearchResultItemMetadataMap;
1919
+ metadata?: MultiSearchResultItemMetadataMap | undefined;
1920
1920
  /** HTTP error code */
1921
- code?: number;
1921
+ code?: number | undefined;
1922
1922
  /** Error description */
1923
- error?: string;
1923
+ error?: string | undefined;
1924
1924
  }
1925
1925
  export type MultiSearchResultResultsList = Array<MultiSearchResultItem>;
1926
1926
  export interface MultiSearchResult {
1927
1927
  results: MultiSearchResultResultsList;
1928
- conversation?: SearchResultConversation;
1928
+ conversation?: SearchResultConversation | undefined;
1929
1929
  }
1930
1930
  export interface TakeSnapshotRequest {
1931
1931
  /** The directory on the server where the snapshot should be saved. */
@@ -1942,11 +1942,11 @@ export interface UpdateCollectionRequest {
1942
1942
  /** The name of the collection to update */
1943
1943
  collectionName: string;
1944
1944
  /** A list of fields for querying, filtering and faceting */
1945
- fields?: UpdateCollectionRequestFieldsList;
1945
+ fields?: UpdateCollectionRequestFieldsList | undefined;
1946
1946
  /** List of synonym set names to associate with this collection */
1947
- synonym_sets?: UpdateCollectionRequestSynonymSetsList;
1947
+ synonym_sets?: UpdateCollectionRequestSynonymSetsList | undefined;
1948
1948
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
1949
- metadata?: unknown;
1949
+ metadata?: unknown | undefined;
1950
1950
  }
1951
1951
  /** A list of fields for querying, filtering and faceting */
1952
1952
  export type CollectionUpdateSchemaFieldsList = Array<Field>;
@@ -1954,33 +1954,33 @@ export type CollectionUpdateSchemaFieldsList = Array<Field>;
1954
1954
  export type CollectionUpdateSchemaSynonymSetsList = Array<string>;
1955
1955
  export interface CollectionUpdateSchema {
1956
1956
  /** A list of fields for querying, filtering and faceting */
1957
- fields?: CollectionUpdateSchemaFieldsList;
1957
+ fields?: CollectionUpdateSchemaFieldsList | undefined;
1958
1958
  /** List of synonym set names to associate with this collection */
1959
- synonym_sets?: CollectionUpdateSchemaSynonymSetsList;
1959
+ synonym_sets?: CollectionUpdateSchemaSynonymSetsList | undefined;
1960
1960
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
1961
- metadata?: unknown;
1961
+ metadata?: unknown | undefined;
1962
1962
  }
1963
1963
  export interface UpdateConversationModelRequest {
1964
1964
  /** The id of the conversation model to update */
1965
1965
  modelId: string;
1966
1966
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
1967
- id?: string;
1967
+ id?: string | undefined;
1968
1968
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
1969
- model_name?: string;
1969
+ model_name?: string | undefined;
1970
1970
  /** The LLM service's API Key */
1971
- api_key?: string | import("effect/Redacted").Redacted<string>;
1971
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
1972
1972
  /** Typesense collection that stores the historical conversations */
1973
- history_collection?: string;
1973
+ history_collection?: string | undefined;
1974
1974
  /** LLM service's account ID (only applicable for Cloudflare) */
1975
- account_id?: string;
1975
+ account_id?: string | undefined;
1976
1976
  /** The system prompt that contains special instructions to the LLM */
1977
- system_prompt?: string;
1977
+ system_prompt?: string | undefined;
1978
1978
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
1979
- ttl?: number;
1979
+ ttl?: number | undefined;
1980
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. */
1981
- max_bytes?: number;
1981
+ max_bytes?: number | undefined;
1982
1982
  /** URL of vLLM service */
1983
- vllm_url?: string;
1983
+ vllm_url?: string | undefined;
1984
1984
  }
1985
1985
  export interface UpdateConversationModelResponse {
1986
1986
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
@@ -1988,19 +1988,19 @@ export interface UpdateConversationModelResponse {
1988
1988
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
1989
1989
  model_name: string;
1990
1990
  /** The LLM service's API Key */
1991
- api_key?: string | import("effect/Redacted").Redacted<string>;
1991
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
1992
1992
  /** Typesense collection that stores the historical conversations */
1993
1993
  history_collection: string;
1994
1994
  /** LLM service's account ID (only applicable for Cloudflare) */
1995
- account_id?: string;
1995
+ account_id?: string | undefined;
1996
1996
  /** The system prompt that contains special instructions to the LLM */
1997
- system_prompt?: string;
1997
+ system_prompt?: string | undefined;
1998
1998
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
1999
- ttl?: number;
1999
+ ttl?: number | undefined;
2000
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. */
2001
2001
  max_bytes: number;
2002
2002
  /** URL of vLLM service */
2003
- vllm_url?: string;
2003
+ vllm_url?: string | undefined;
2004
2004
  }
2005
2005
  export interface UpdateDocumentRequest {
2006
2006
  /** The name of the collection to search for the document under */
@@ -2008,16 +2008,16 @@ export interface UpdateDocumentRequest {
2008
2008
  /** The Document ID */
2009
2009
  documentId: string;
2010
2010
  /** Dealing with Dirty Data */
2011
- dirty_values?: DirtyValues | (string & {});
2011
+ dirty_values?: DirtyValues | (string & {}) | undefined;
2012
2012
  }
2013
2013
  export type UpdateDocumentResponse = unknown;
2014
2014
  export interface UpdateDocumentsRequestUpdateDocumentsParameters {
2015
- filter_by?: string;
2015
+ filter_by?: string | undefined;
2016
2016
  }
2017
2017
  export interface UpdateDocumentsRequest {
2018
2018
  /** The name of the collection to update documents in */
2019
2019
  collectionName: string;
2020
- updateDocumentsParameters?: UpdateDocumentsRequestUpdateDocumentsParameters;
2020
+ updateDocumentsParameters?: UpdateDocumentsRequestUpdateDocumentsParameters | undefined;
2021
2021
  }
2022
2022
  export interface UpdateDocumentsResponse {
2023
2023
  /** The number of documents that have been updated */
@@ -2029,83 +2029,83 @@ export interface UpdateNLSearchModelRequest {
2029
2029
  /** The ID of the NL search model to update */
2030
2030
  modelId: string;
2031
2031
  /** Name of the NL model to use */
2032
- model_name?: string;
2032
+ model_name?: string | undefined;
2033
2033
  /** API key for the NL model service */
2034
- api_key?: string | import("effect/Redacted").Redacted<string>;
2034
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
2035
2035
  /** Custom API URL for the NL model service */
2036
- api_url?: string;
2036
+ api_url?: string | undefined;
2037
2037
  /** Maximum number of bytes to process */
2038
- max_bytes?: number;
2038
+ max_bytes?: number | undefined;
2039
2039
  /** Temperature parameter for the NL model */
2040
- temperature?: number;
2040
+ temperature?: number | undefined;
2041
2041
  /** System prompt for the NL model */
2042
- system_prompt?: string;
2042
+ system_prompt?: string | undefined;
2043
2043
  /** Top-p parameter for the NL model (Google-specific) */
2044
- top_p?: number;
2044
+ top_p?: number | undefined;
2045
2045
  /** Top-k parameter for the NL model (Google-specific) */
2046
- top_k?: number;
2046
+ top_k?: number | undefined;
2047
2047
  /** Stop sequences for the NL model (Google-specific) */
2048
- stop_sequences?: UpdateNLSearchModelRequestStopSequencesList;
2048
+ stop_sequences?: UpdateNLSearchModelRequestStopSequencesList | undefined;
2049
2049
  /** API version for the NL model service */
2050
- api_version?: string;
2050
+ api_version?: string | undefined;
2051
2051
  /** Project ID for GCP Vertex AI */
2052
- project_id?: string;
2052
+ project_id?: string | undefined;
2053
2053
  /** Access token for GCP Vertex AI */
2054
- access_token?: string | import("effect/Redacted").Redacted<string>;
2054
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2055
2055
  /** Refresh token for GCP Vertex AI */
2056
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
2056
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2057
2057
  /** Client ID for GCP Vertex AI */
2058
- client_id?: string;
2058
+ client_id?: string | undefined;
2059
2059
  /** Client secret for GCP Vertex AI */
2060
- client_secret?: string | import("effect/Redacted").Redacted<string>;
2060
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
2061
2061
  /** Region for GCP Vertex AI */
2062
- region?: string;
2062
+ region?: string | undefined;
2063
2063
  /** Maximum output tokens for GCP Vertex AI */
2064
- max_output_tokens?: number;
2064
+ max_output_tokens?: number | undefined;
2065
2065
  /** Account ID for Cloudflare-specific models */
2066
- account_id?: string;
2066
+ account_id?: string | undefined;
2067
2067
  /** Optional ID for the NL search model */
2068
- id?: string;
2068
+ id?: string | undefined;
2069
2069
  }
2070
2070
  /** Stop sequences for the NL model (Google-specific) */
2071
2071
  export type UpdateNLSearchModelResponseStopSequencesList = Array<string>;
2072
2072
  export interface UpdateNLSearchModelResponse {
2073
2073
  /** Name of the NL model to use */
2074
- model_name?: string;
2074
+ model_name?: string | undefined;
2075
2075
  /** API key for the NL model service */
2076
- api_key?: string | import("effect/Redacted").Redacted<string>;
2076
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
2077
2077
  /** Custom API URL for the NL model service */
2078
- api_url?: string;
2078
+ api_url?: string | undefined;
2079
2079
  /** Maximum number of bytes to process */
2080
- max_bytes?: number;
2080
+ max_bytes?: number | undefined;
2081
2081
  /** Temperature parameter for the NL model */
2082
- temperature?: number;
2082
+ temperature?: number | undefined;
2083
2083
  /** System prompt for the NL model */
2084
- system_prompt?: string;
2084
+ system_prompt?: string | undefined;
2085
2085
  /** Top-p parameter for the NL model (Google-specific) */
2086
- top_p?: number;
2086
+ top_p?: number | undefined;
2087
2087
  /** Top-k parameter for the NL model (Google-specific) */
2088
- top_k?: number;
2088
+ top_k?: number | undefined;
2089
2089
  /** Stop sequences for the NL model (Google-specific) */
2090
- stop_sequences?: UpdateNLSearchModelResponseStopSequencesList;
2090
+ stop_sequences?: UpdateNLSearchModelResponseStopSequencesList | undefined;
2091
2091
  /** API version for the NL model service */
2092
- api_version?: string;
2092
+ api_version?: string | undefined;
2093
2093
  /** Project ID for GCP Vertex AI */
2094
- project_id?: string;
2094
+ project_id?: string | undefined;
2095
2095
  /** Access token for GCP Vertex AI */
2096
- access_token?: string | import("effect/Redacted").Redacted<string>;
2096
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2097
2097
  /** Refresh token for GCP Vertex AI */
2098
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
2098
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2099
2099
  /** Client ID for GCP Vertex AI */
2100
- client_id?: string;
2100
+ client_id?: string | undefined;
2101
2101
  /** Client secret for GCP Vertex AI */
2102
- client_secret?: string | import("effect/Redacted").Redacted<string>;
2102
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
2103
2103
  /** Region for GCP Vertex AI */
2104
- region?: string;
2104
+ region?: string | undefined;
2105
2105
  /** Maximum output tokens for GCP Vertex AI */
2106
- max_output_tokens?: number;
2106
+ max_output_tokens?: number | undefined;
2107
2107
  /** Account ID for Cloudflare-specific models */
2108
- account_id?: string;
2108
+ account_id?: string | undefined;
2109
2109
  /** Optional ID for the NL search model */
2110
2110
  id: string;
2111
2111
  }
@@ -2117,38 +2117,38 @@ export interface UpsertAliasRequest {
2117
2117
  }
2118
2118
  export type UpsertAnalyticsRuleRequestParamsMetaFieldsList = Array<string>;
2119
2119
  export interface UpsertAnalyticsRuleRequestParams {
2120
- destination_collection?: string;
2121
- limit?: number;
2122
- capture_search_requests?: boolean;
2123
- meta_fields?: UpsertAnalyticsRuleRequestParamsMetaFieldsList;
2124
- expand_query?: boolean;
2125
- counter_field?: string;
2126
- 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;
2127
2127
  }
2128
2128
  export interface UpsertAnalyticsRuleRequest {
2129
2129
  /** The name of the analytics rule to upsert */
2130
2130
  ruleName: string;
2131
- name?: string;
2132
- rule_tag?: string;
2133
- params?: UpsertAnalyticsRuleRequestParams;
2131
+ name?: string | undefined;
2132
+ rule_tag?: string | undefined;
2133
+ params?: UpsertAnalyticsRuleRequestParams | undefined;
2134
2134
  }
2135
2135
  export type UpsertAnalyticsRuleResponseParamsMetaFieldsList = Array<string>;
2136
2136
  export interface UpsertAnalyticsRuleResponseParams {
2137
- destination_collection?: string;
2138
- limit?: number;
2139
- capture_search_requests?: boolean;
2140
- meta_fields?: UpsertAnalyticsRuleResponseParamsMetaFieldsList;
2141
- expand_query?: boolean;
2142
- counter_field?: string;
2143
- 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;
2144
2144
  }
2145
2145
  export interface UpsertAnalyticsRuleResponse {
2146
2146
  name: string;
2147
2147
  type: AnalyticsRuleType;
2148
2148
  collection: string;
2149
2149
  event_type: string;
2150
- rule_tag?: string;
2151
- params?: UpsertAnalyticsRuleResponseParams;
2150
+ rule_tag?: string | undefined;
2151
+ params?: UpsertAnalyticsRuleResponseParams | undefined;
2152
2152
  }
2153
2153
  /** Array of curation items */
2154
2154
  export type UpsertCurationSetRequestItemsList = Array<CurationItemCreateSchema>;
@@ -2158,7 +2158,7 @@ export interface UpsertCurationSetRequest {
2158
2158
  /** Array of curation items */
2159
2159
  items: UpsertCurationSetRequestItemsList;
2160
2160
  /** Optional description for the curation set */
2161
- description?: string;
2161
+ description?: string | undefined;
2162
2162
  }
2163
2163
  /** Array of curation items */
2164
2164
  export type UpsertCurationSetResponseItemsList = Array<CurationItemCreateSchema>;
@@ -2166,7 +2166,7 @@ export interface UpsertCurationSetResponse {
2166
2166
  /** Array of curation items */
2167
2167
  items: UpsertCurationSetResponseItemsList;
2168
2168
  /** Optional description for the curation set */
2169
- description?: string;
2169
+ description?: string | undefined;
2170
2170
  name: string;
2171
2171
  }
2172
2172
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
@@ -2180,29 +2180,29 @@ export interface UpsertCurationSetItemRequest {
2180
2180
  itemId: string;
2181
2181
  rule: CurationRule;
2182
2182
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
2183
- includes?: UpsertCurationSetItemRequestIncludesList;
2183
+ includes?: UpsertCurationSetItemRequestIncludesList | undefined;
2184
2184
  /** List of document `id`s that should be excluded from the search results. */
2185
- excludes?: UpsertCurationSetItemRequestExcludesList;
2185
+ excludes?: UpsertCurationSetItemRequestExcludesList | undefined;
2186
2186
  /** A filter by clause that is applied to any search query that matches the curation rule. */
2187
- filter_by?: string;
2187
+ filter_by?: string | undefined;
2188
2188
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
2189
- remove_matched_tokens?: boolean;
2189
+ remove_matched_tokens?: boolean | undefined;
2190
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. */
2191
- metadata?: unknown;
2191
+ metadata?: unknown | undefined;
2192
2192
  /** A sort by clause that is applied to any search query that matches the curation rule. */
2193
- sort_by?: string;
2193
+ sort_by?: string | undefined;
2194
2194
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
2195
- replace_query?: string;
2195
+ replace_query?: string | undefined;
2196
2196
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
2197
- filter_curated_hits?: boolean;
2197
+ filter_curated_hits?: boolean | undefined;
2198
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. */
2199
- effective_from_ts?: number;
2199
+ effective_from_ts?: number | undefined;
2200
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. */
2201
- effective_to_ts?: number;
2201
+ effective_to_ts?: number | undefined;
2202
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. */
2203
- stop_processing?: boolean;
2203
+ stop_processing?: boolean | undefined;
2204
2204
  /** ID of the curation item */
2205
- id?: string;
2205
+ id?: string | undefined;
2206
2206
  }
2207
2207
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
2208
2208
  export type UpsertCurationSetItemResponseIncludesList = Array<CurationInclude>;
@@ -2211,27 +2211,27 @@ export type UpsertCurationSetItemResponseExcludesList = Array<CurationExclude>;
2211
2211
  export interface UpsertCurationSetItemResponse {
2212
2212
  rule: CurationRule;
2213
2213
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
2214
- includes?: UpsertCurationSetItemResponseIncludesList;
2214
+ includes?: UpsertCurationSetItemResponseIncludesList | undefined;
2215
2215
  /** List of document `id`s that should be excluded from the search results. */
2216
- excludes?: UpsertCurationSetItemResponseExcludesList;
2216
+ excludes?: UpsertCurationSetItemResponseExcludesList | undefined;
2217
2217
  /** A filter by clause that is applied to any search query that matches the curation rule. */
2218
- filter_by?: string;
2218
+ filter_by?: string | undefined;
2219
2219
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
2220
- remove_matched_tokens?: boolean;
2220
+ remove_matched_tokens?: boolean | undefined;
2221
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. */
2222
- metadata?: unknown;
2222
+ metadata?: unknown | undefined;
2223
2223
  /** A sort by clause that is applied to any search query that matches the curation rule. */
2224
- sort_by?: string;
2224
+ sort_by?: string | undefined;
2225
2225
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
2226
- replace_query?: string;
2226
+ replace_query?: string | undefined;
2227
2227
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
2228
- filter_curated_hits?: boolean;
2228
+ filter_curated_hits?: boolean | undefined;
2229
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. */
2230
- effective_from_ts?: number;
2230
+ effective_from_ts?: number | undefined;
2231
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. */
2232
- effective_to_ts?: number;
2232
+ effective_to_ts?: number | undefined;
2233
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. */
2234
- stop_processing?: boolean;
2234
+ stop_processing?: boolean | undefined;
2235
2235
  /** ID of the curation item */
2236
2236
  id: string;
2237
2237
  }
@@ -2251,7 +2251,7 @@ export interface UpsertStopwordsSetRequest {
2251
2251
  /** The ID of the stopwords set to upsert. */
2252
2252
  setId: string;
2253
2253
  stopwords: UpsertStopwordsSetRequestStopwordsList;
2254
- locale?: string;
2254
+ locale?: string | undefined;
2255
2255
  }
2256
2256
  /** Array of synonym items */
2257
2257
  export type UpsertSynonymSetRequestItemsList = Array<SynonymItemSchema>;
@@ -2281,11 +2281,11 @@ export interface UpsertSynonymSetItemRequest {
2281
2281
  /** Array of words that should be considered as synonyms */
2282
2282
  synonyms: UpsertSynonymSetItemRequestSynonymsList;
2283
2283
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
2284
- root?: string;
2284
+ root?: string | undefined;
2285
2285
  /** Locale for the synonym, leave blank to use the standard tokenizer */
2286
- locale?: string;
2286
+ locale?: string | undefined;
2287
2287
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
2288
- symbols_to_index?: UpsertSynonymSetItemRequestSymbolsToIndexList;
2288
+ symbols_to_index?: UpsertSynonymSetItemRequestSymbolsToIndexList | undefined;
2289
2289
  }
2290
2290
  /** Array of words that should be considered as synonyms */
2291
2291
  export type UpsertSynonymSetItemResponseSynonymsList = Array<string>;
@@ -2297,11 +2297,11 @@ export interface UpsertSynonymSetItemResponse {
2297
2297
  /** Array of words that should be considered as synonyms */
2298
2298
  synonyms: UpsertSynonymSetItemResponseSynonymsList;
2299
2299
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
2300
- root?: string;
2300
+ root?: string | undefined;
2301
2301
  /** Locale for the synonym, leave blank to use the standard tokenizer */
2302
- locale?: string;
2302
+ locale?: string | undefined;
2303
2303
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
2304
- symbols_to_index?: UpsertSynonymSetItemResponseSymbolsToIndexList;
2304
+ symbols_to_index?: UpsertSynonymSetItemResponseSymbolsToIndexList | undefined;
2305
2305
  }
2306
2306
  export interface VoteRequest {}
2307
2307
  export type ClearCacheError = TypesenseOpError;