@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.
@@ -42,11 +42,11 @@ export interface CompactDbRequest {
42
42
  export type CreateAnalyticsEventRequestDataDocIdsList = Array<string>;
43
43
  /** Event payload */
44
44
  export interface CreateAnalyticsEventRequestData {
45
- user_id?: string;
46
- doc_id?: string;
47
- doc_ids?: CreateAnalyticsEventRequestDataDocIdsList;
48
- q?: string;
49
- analytics_tag?: string;
45
+ user_id?: string | undefined;
46
+ doc_id?: string | undefined;
47
+ doc_ids?: CreateAnalyticsEventRequestDataDocIdsList | undefined;
48
+ q?: string | undefined;
49
+ analytics_tag?: string | undefined;
50
50
  }
51
51
  export interface CreateAnalyticsEventRequest {
52
52
  /** Name of the analytics rule this event corresponds to */
@@ -62,21 +62,21 @@ export interface AnalyticsEventCreateResponse {
62
62
  export type AnalyticsRuleType = "popular_queries" | "nohits_queries" | "counter" | "log";
63
63
  export type AnalyticsRuleCreateParamsMetaFieldsList = Array<string>;
64
64
  export interface AnalyticsRuleCreateParams {
65
- destination_collection?: string;
66
- limit?: number;
67
- capture_search_requests?: boolean;
68
- meta_fields?: AnalyticsRuleCreateParamsMetaFieldsList;
69
- expand_query?: boolean;
70
- counter_field?: string;
71
- weight?: number;
65
+ destination_collection?: string | undefined;
66
+ limit?: number | undefined;
67
+ capture_search_requests?: boolean | undefined;
68
+ meta_fields?: AnalyticsRuleCreateParamsMetaFieldsList | undefined;
69
+ expand_query?: boolean | undefined;
70
+ counter_field?: string | undefined;
71
+ weight?: number | undefined;
72
72
  }
73
73
  export interface AnalyticsRuleCreate {
74
74
  name: string;
75
75
  type: AnalyticsRuleType | (string & {});
76
76
  collection: string;
77
77
  event_type: string;
78
- rule_tag?: string;
79
- params?: AnalyticsRuleCreateParams;
78
+ rule_tag?: string | undefined;
79
+ params?: AnalyticsRuleCreateParams | undefined;
80
80
  }
81
81
  export type CreateAnalyticsRuleRequestBodyCase1List = Array<AnalyticsRuleCreate>;
82
82
  export type CreateAnalyticsRuleRequestBody = AnalyticsRuleCreate | CreateAnalyticsRuleRequestBodyCase1List;
@@ -85,24 +85,24 @@ export interface CreateAnalyticsRuleRequest {
85
85
  }
86
86
  export type AnalyticsRuleParamsMetaFieldsList = Array<string>;
87
87
  export interface AnalyticsRuleParams {
88
- destination_collection?: string;
89
- limit?: number;
90
- capture_search_requests?: boolean;
91
- meta_fields?: AnalyticsRuleParamsMetaFieldsList;
92
- expand_query?: boolean;
93
- counter_field?: string;
94
- weight?: number;
88
+ destination_collection?: string | undefined;
89
+ limit?: number | undefined;
90
+ capture_search_requests?: boolean | undefined;
91
+ meta_fields?: AnalyticsRuleParamsMetaFieldsList | undefined;
92
+ expand_query?: boolean | undefined;
93
+ counter_field?: string | undefined;
94
+ weight?: number | undefined;
95
95
  }
96
96
  export interface AnalyticsRule {
97
97
  name: string;
98
98
  type: AnalyticsRuleType;
99
99
  collection: string;
100
100
  event_type: string;
101
- rule_tag?: string;
102
- params?: AnalyticsRuleParams;
101
+ rule_tag?: string | undefined;
102
+ params?: AnalyticsRuleParams | undefined;
103
103
  }
104
104
  export interface CreateAnalyticsRuleResponseBodyCase1ItemCase1 {
105
- error?: string;
105
+ error?: string | undefined;
106
106
  }
107
107
  export type CreateAnalyticsRuleResponseBodyCase1Item = AnalyticsRule | CreateAnalyticsRuleResponseBodyCase1ItemCase1;
108
108
  export type CreateAnalyticsRuleResponseBodyCase1List = Array<CreateAnalyticsRuleResponseBodyCase1Item>;
@@ -115,15 +115,15 @@ export type FieldSymbolsToIndexList = Array<string>;
115
115
  export type FieldEmbedFromList = Array<string>;
116
116
  export interface FieldEmbedModelConfig {
117
117
  model_name: string;
118
- api_key?: string | import("effect/Redacted").Redacted<string>;
119
- url?: string;
120
- access_token?: string | import("effect/Redacted").Redacted<string>;
121
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
122
- client_id?: string;
123
- client_secret?: string | import("effect/Redacted").Redacted<string>;
124
- project_id?: string;
125
- indexing_prefix?: string;
126
- query_prefix?: string;
118
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
119
+ url?: string | undefined;
120
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
121
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
122
+ client_id?: string | undefined;
123
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
124
+ project_id?: string | undefined;
125
+ indexing_prefix?: string | undefined;
126
+ query_prefix?: string | undefined;
127
127
  }
128
128
  export interface FieldEmbed {
129
129
  from: FieldEmbedFromList;
@@ -132,33 +132,33 @@ export interface FieldEmbed {
132
132
  export interface Field {
133
133
  name: string;
134
134
  type: string;
135
- optional?: boolean;
136
- facet?: boolean;
137
- index?: boolean;
138
- locale?: string;
139
- sort?: boolean;
140
- infix?: boolean;
135
+ optional?: boolean | undefined;
136
+ facet?: boolean | undefined;
137
+ index?: boolean | undefined;
138
+ locale?: string | undefined;
139
+ sort?: boolean | undefined;
140
+ infix?: boolean | undefined;
141
141
  /** Name of a field in another collection that should be linked to this collection so that it can be joined during query. */
142
- reference?: string;
142
+ reference?: string | undefined;
143
143
  /** Allow documents to be indexed successfully even when the referenced document doesn't exist yet. */
144
- async_reference?: boolean;
145
- num_dim?: number;
146
- drop?: boolean;
144
+ async_reference?: boolean | undefined;
145
+ num_dim?: number | undefined;
146
+ drop?: boolean | undefined;
147
147
  /** When set to false, the field value will not be stored on disk. Default: true. */
148
- store?: boolean;
148
+ store?: boolean | undefined;
149
149
  /** The distance metric to be used for vector search. Default: `cosine`. You can also use `ip` for inner product. */
150
- vec_dist?: string;
150
+ vec_dist?: string | undefined;
151
151
  /** Enables an index optimized for range filtering on numerical fields (e.g. rating:>3.5). Default: false. */
152
- range_index?: boolean;
152
+ range_index?: boolean | undefined;
153
153
  /** Values are stemmed before indexing in-memory. Default: false. */
154
- stem?: boolean;
154
+ stem?: boolean | undefined;
155
155
  /** Name of the stemming dictionary to use for this field */
156
- stem_dictionary?: string;
156
+ stem_dictionary?: string | undefined;
157
157
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
158
- token_separators?: FieldTokenSeparatorsList;
158
+ token_separators?: FieldTokenSeparatorsList | undefined;
159
159
  /** List of symbols or special characters to be indexed. */
160
- symbols_to_index?: FieldSymbolsToIndexList;
161
- embed?: FieldEmbed;
160
+ symbols_to_index?: FieldSymbolsToIndexList | undefined;
161
+ embed?: FieldEmbed | undefined;
162
162
  }
163
163
  /** A list of fields for querying, filtering and faceting */
164
164
  export type CreateCollectionRequestFieldsList = Array<Field>;
@@ -170,7 +170,7 @@ export type CreateCollectionRequestSynonymSetsList = Array<string>;
170
170
  export type CreateCollectionRequestSymbolsToIndexList = Array<string>;
171
171
  /** Configuration for the voice query model */
172
172
  export interface VoiceQueryModelCollectionConfig {
173
- model_name?: string;
173
+ model_name?: string | undefined;
174
174
  }
175
175
  export interface CreateCollectionRequest {
176
176
  /** Name of the collection */
@@ -178,18 +178,18 @@ export interface CreateCollectionRequest {
178
178
  /** A list of fields for querying, filtering and faceting */
179
179
  fields: CreateCollectionRequestFieldsList;
180
180
  /** 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. */
181
- default_sorting_field?: string;
181
+ default_sorting_field?: string | undefined;
182
182
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
183
- token_separators?: CreateCollectionRequestTokenSeparatorsList;
183
+ token_separators?: CreateCollectionRequestTokenSeparatorsList | undefined;
184
184
  /** List of synonym set names to associate with this collection */
185
- synonym_sets?: CreateCollectionRequestSynonymSetsList;
185
+ synonym_sets?: CreateCollectionRequestSynonymSetsList | undefined;
186
186
  /** 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. */
187
- enable_nested_fields?: boolean;
187
+ enable_nested_fields?: boolean | undefined;
188
188
  /** List of symbols or special characters to be indexed. */
189
- symbols_to_index?: CreateCollectionRequestSymbolsToIndexList;
190
- voice_query_model?: VoiceQueryModelCollectionConfig;
189
+ symbols_to_index?: CreateCollectionRequestSymbolsToIndexList | undefined;
190
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
191
191
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
192
- metadata?: unknown;
192
+ metadata?: unknown | undefined;
193
193
  }
194
194
  /** A list of fields for querying, filtering and faceting */
195
195
  export type CreateCollectionResponseFieldsList = Array<Field>;
@@ -205,18 +205,18 @@ export interface CreateCollectionResponse {
205
205
  /** A list of fields for querying, filtering and faceting */
206
206
  fields: CreateCollectionResponseFieldsList;
207
207
  /** 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. */
208
- default_sorting_field?: string;
208
+ default_sorting_field?: string | undefined;
209
209
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
210
- token_separators?: CreateCollectionResponseTokenSeparatorsList;
210
+ token_separators?: CreateCollectionResponseTokenSeparatorsList | undefined;
211
211
  /** List of synonym set names to associate with this collection */
212
- synonym_sets?: CreateCollectionResponseSynonymSetsList;
212
+ synonym_sets?: CreateCollectionResponseSynonymSetsList | undefined;
213
213
  /** 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. */
214
- enable_nested_fields?: boolean;
214
+ enable_nested_fields?: boolean | undefined;
215
215
  /** List of symbols or special characters to be indexed. */
216
- symbols_to_index?: CreateCollectionResponseSymbolsToIndexList;
217
- voice_query_model?: VoiceQueryModelCollectionConfig;
216
+ symbols_to_index?: CreateCollectionResponseSymbolsToIndexList | undefined;
217
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
218
218
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
219
- metadata?: unknown;
219
+ metadata?: unknown | undefined;
220
220
  /** Number of documents in the collection */
221
221
  num_documents: number;
222
222
  /** Timestamp of when the collection was created (Unix epoch in seconds) */
@@ -224,23 +224,23 @@ export interface CreateCollectionResponse {
224
224
  }
225
225
  export interface CreateConversationModelRequest {
226
226
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
227
- id?: string;
227
+ id?: string | undefined;
228
228
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
229
229
  model_name: string;
230
230
  /** The LLM service's API Key */
231
- api_key?: string | import("effect/Redacted").Redacted<string>;
231
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
232
232
  /** Typesense collection that stores the historical conversations */
233
233
  history_collection: string;
234
234
  /** LLM service's account ID (only applicable for Cloudflare) */
235
- account_id?: string;
235
+ account_id?: string | undefined;
236
236
  /** The system prompt that contains special instructions to the LLM */
237
- system_prompt?: string;
237
+ system_prompt?: string | undefined;
238
238
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
239
- ttl?: number;
239
+ ttl?: number | undefined;
240
240
  /** 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. */
241
241
  max_bytes: number;
242
242
  /** URL of vLLM service */
243
- vllm_url?: string;
243
+ vllm_url?: string | undefined;
244
244
  }
245
245
  export interface CreateConversationModelResponse {
246
246
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
@@ -248,128 +248,128 @@ export interface CreateConversationModelResponse {
248
248
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
249
249
  model_name: string;
250
250
  /** The LLM service's API Key */
251
- api_key?: string | import("effect/Redacted").Redacted<string>;
251
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
252
252
  /** Typesense collection that stores the historical conversations */
253
253
  history_collection: string;
254
254
  /** LLM service's account ID (only applicable for Cloudflare) */
255
- account_id?: string;
255
+ account_id?: string | undefined;
256
256
  /** The system prompt that contains special instructions to the LLM */
257
- system_prompt?: string;
257
+ system_prompt?: string | undefined;
258
258
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
259
- ttl?: number;
259
+ ttl?: number | undefined;
260
260
  /** 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. */
261
261
  max_bytes: number;
262
262
  /** URL of vLLM service */
263
- vllm_url?: string;
263
+ vllm_url?: string | undefined;
264
264
  }
265
265
  export type CreateKeyRequestActionsList = Array<string>;
266
266
  export type CreateKeyRequestCollectionsList = Array<string>;
267
267
  export interface CreateKeyRequest {
268
- value?: string;
268
+ value?: string | undefined;
269
269
  description: string;
270
270
  actions: CreateKeyRequestActionsList;
271
271
  collections: CreateKeyRequestCollectionsList;
272
- expires_at?: number;
272
+ expires_at?: number | undefined;
273
273
  }
274
274
  export type CreateKeyResponseActionsList = Array<string>;
275
275
  export type CreateKeyResponseCollectionsList = Array<string>;
276
276
  export interface CreateKeyResponse {
277
- value?: string;
277
+ value?: string | undefined;
278
278
  description: string;
279
279
  actions: CreateKeyResponseActionsList;
280
280
  collections: CreateKeyResponseCollectionsList;
281
- expires_at?: number;
282
- id?: number;
283
- value_prefix?: string;
281
+ expires_at?: number | undefined;
282
+ id?: number | undefined;
283
+ value_prefix?: string | undefined;
284
284
  }
285
285
  /** Stop sequences for the NL model (Google-specific) */
286
286
  export type CreateNLSearchModelRequestStopSequencesList = Array<string>;
287
287
  export interface CreateNLSearchModelRequest {
288
288
  /** Name of the NL model to use */
289
- model_name?: string;
289
+ model_name?: string | undefined;
290
290
  /** API key for the NL model service */
291
- api_key?: string | import("effect/Redacted").Redacted<string>;
291
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
292
292
  /** Custom API URL for the NL model service */
293
- api_url?: string;
293
+ api_url?: string | undefined;
294
294
  /** Maximum number of bytes to process */
295
- max_bytes?: number;
295
+ max_bytes?: number | undefined;
296
296
  /** Temperature parameter for the NL model */
297
- temperature?: number;
297
+ temperature?: number | undefined;
298
298
  /** System prompt for the NL model */
299
- system_prompt?: string;
299
+ system_prompt?: string | undefined;
300
300
  /** Top-p parameter for the NL model (Google-specific) */
301
- top_p?: number;
301
+ top_p?: number | undefined;
302
302
  /** Top-k parameter for the NL model (Google-specific) */
303
- top_k?: number;
303
+ top_k?: number | undefined;
304
304
  /** Stop sequences for the NL model (Google-specific) */
305
- stop_sequences?: CreateNLSearchModelRequestStopSequencesList;
305
+ stop_sequences?: CreateNLSearchModelRequestStopSequencesList | undefined;
306
306
  /** API version for the NL model service */
307
- api_version?: string;
307
+ api_version?: string | undefined;
308
308
  /** Project ID for GCP Vertex AI */
309
- project_id?: string;
309
+ project_id?: string | undefined;
310
310
  /** Access token for GCP Vertex AI */
311
- access_token?: string | import("effect/Redacted").Redacted<string>;
311
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
312
312
  /** Refresh token for GCP Vertex AI */
313
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
313
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
314
314
  /** Client ID for GCP Vertex AI */
315
- client_id?: string;
315
+ client_id?: string | undefined;
316
316
  /** Client secret for GCP Vertex AI */
317
- client_secret?: string | import("effect/Redacted").Redacted<string>;
317
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
318
318
  /** Region for GCP Vertex AI */
319
- region?: string;
319
+ region?: string | undefined;
320
320
  /** Maximum output tokens for GCP Vertex AI */
321
- max_output_tokens?: number;
321
+ max_output_tokens?: number | undefined;
322
322
  /** Account ID for Cloudflare-specific models */
323
- account_id?: string;
323
+ account_id?: string | undefined;
324
324
  /** Optional ID for the NL search model */
325
- id?: string;
325
+ id?: string | undefined;
326
326
  }
327
327
  /** Stop sequences for the NL model (Google-specific) */
328
328
  export type CreateNLSearchModelResponseStopSequencesList = Array<string>;
329
329
  export interface CreateNLSearchModelResponse {
330
330
  /** Name of the NL model to use */
331
- model_name?: string;
331
+ model_name?: string | undefined;
332
332
  /** API key for the NL model service */
333
- api_key?: string | import("effect/Redacted").Redacted<string>;
333
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
334
334
  /** Custom API URL for the NL model service */
335
- api_url?: string;
335
+ api_url?: string | undefined;
336
336
  /** Maximum number of bytes to process */
337
- max_bytes?: number;
337
+ max_bytes?: number | undefined;
338
338
  /** Temperature parameter for the NL model */
339
- temperature?: number;
339
+ temperature?: number | undefined;
340
340
  /** System prompt for the NL model */
341
- system_prompt?: string;
341
+ system_prompt?: string | undefined;
342
342
  /** Top-p parameter for the NL model (Google-specific) */
343
- top_p?: number;
343
+ top_p?: number | undefined;
344
344
  /** Top-k parameter for the NL model (Google-specific) */
345
- top_k?: number;
345
+ top_k?: number | undefined;
346
346
  /** Stop sequences for the NL model (Google-specific) */
347
- stop_sequences?: CreateNLSearchModelResponseStopSequencesList;
347
+ stop_sequences?: CreateNLSearchModelResponseStopSequencesList | undefined;
348
348
  /** API version for the NL model service */
349
- api_version?: string;
349
+ api_version?: string | undefined;
350
350
  /** Project ID for GCP Vertex AI */
351
- project_id?: string;
351
+ project_id?: string | undefined;
352
352
  /** Access token for GCP Vertex AI */
353
- access_token?: string | import("effect/Redacted").Redacted<string>;
353
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
354
354
  /** Refresh token for GCP Vertex AI */
355
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
355
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
356
356
  /** Client ID for GCP Vertex AI */
357
- client_id?: string;
357
+ client_id?: string | undefined;
358
358
  /** Client secret for GCP Vertex AI */
359
- client_secret?: string | import("effect/Redacted").Redacted<string>;
359
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
360
360
  /** Region for GCP Vertex AI */
361
- region?: string;
361
+ region?: string | undefined;
362
362
  /** Maximum output tokens for GCP Vertex AI */
363
- max_output_tokens?: number;
363
+ max_output_tokens?: number | undefined;
364
364
  /** Account ID for Cloudflare-specific models */
365
- account_id?: string;
365
+ account_id?: string | undefined;
366
366
  /** Optional ID for the NL search model */
367
367
  id: string;
368
368
  }
369
369
  export interface DebugRequest {
370
370
  }
371
371
  export interface DebugResponse {
372
- version?: string;
372
+ version?: string | undefined;
373
373
  }
374
374
  export interface DeleteAliasRequest {
375
375
  /** The name of the alias to delete */
@@ -387,21 +387,21 @@ export interface DeleteAnalyticsRuleRequest {
387
387
  }
388
388
  export type DeleteAnalyticsRuleResponseParamsMetaFieldsList = Array<string>;
389
389
  export interface DeleteAnalyticsRuleResponseParams {
390
- destination_collection?: string;
391
- limit?: number;
392
- capture_search_requests?: boolean;
393
- meta_fields?: DeleteAnalyticsRuleResponseParamsMetaFieldsList;
394
- expand_query?: boolean;
395
- counter_field?: string;
396
- weight?: number;
390
+ destination_collection?: string | undefined;
391
+ limit?: number | undefined;
392
+ capture_search_requests?: boolean | undefined;
393
+ meta_fields?: DeleteAnalyticsRuleResponseParamsMetaFieldsList | undefined;
394
+ expand_query?: boolean | undefined;
395
+ counter_field?: string | undefined;
396
+ weight?: number | undefined;
397
397
  }
398
398
  export interface DeleteAnalyticsRuleResponse {
399
399
  name: string;
400
400
  type: AnalyticsRuleType;
401
401
  collection: string;
402
402
  event_type: string;
403
- rule_tag?: string;
404
- params?: DeleteAnalyticsRuleResponseParams;
403
+ rule_tag?: string | undefined;
404
+ params?: DeleteAnalyticsRuleResponseParams | undefined;
405
405
  }
406
406
  export interface DeleteCollectionRequest {
407
407
  /** The name of the collection to delete */
@@ -421,18 +421,18 @@ export interface DeleteCollectionResponse {
421
421
  /** A list of fields for querying, filtering and faceting */
422
422
  fields: DeleteCollectionResponseFieldsList;
423
423
  /** 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. */
424
- default_sorting_field?: string;
424
+ default_sorting_field?: string | undefined;
425
425
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
426
- token_separators?: DeleteCollectionResponseTokenSeparatorsList;
426
+ token_separators?: DeleteCollectionResponseTokenSeparatorsList | undefined;
427
427
  /** List of synonym set names to associate with this collection */
428
- synonym_sets?: DeleteCollectionResponseSynonymSetsList;
428
+ synonym_sets?: DeleteCollectionResponseSynonymSetsList | undefined;
429
429
  /** 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. */
430
- enable_nested_fields?: boolean;
430
+ enable_nested_fields?: boolean | undefined;
431
431
  /** List of symbols or special characters to be indexed. */
432
- symbols_to_index?: DeleteCollectionResponseSymbolsToIndexList;
433
- voice_query_model?: VoiceQueryModelCollectionConfig;
432
+ symbols_to_index?: DeleteCollectionResponseSymbolsToIndexList | undefined;
433
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
434
434
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
435
- metadata?: unknown;
435
+ metadata?: unknown | undefined;
436
436
  /** Number of documents in the collection */
437
437
  num_documents: number;
438
438
  /** Timestamp of when the collection was created (Unix epoch in seconds) */
@@ -448,19 +448,19 @@ export interface DeleteConversationModelResponse {
448
448
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
449
449
  model_name: string;
450
450
  /** The LLM service's API Key */
451
- api_key?: string | import("effect/Redacted").Redacted<string>;
451
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
452
452
  /** Typesense collection that stores the historical conversations */
453
453
  history_collection: string;
454
454
  /** LLM service's account ID (only applicable for Cloudflare) */
455
- account_id?: string;
455
+ account_id?: string | undefined;
456
456
  /** The system prompt that contains special instructions to the LLM */
457
- system_prompt?: string;
457
+ system_prompt?: string | undefined;
458
458
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
459
- ttl?: number;
459
+ ttl?: number | undefined;
460
460
  /** 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. */
461
461
  max_bytes: number;
462
462
  /** URL of vLLM service */
463
- vllm_url?: string;
463
+ vllm_url?: string | undefined;
464
464
  }
465
465
  export interface DeleteCurationSetRequest {
466
466
  /** The name of the curation set to delete */
@@ -490,15 +490,15 @@ export type DeleteDocumentResponse = unknown;
490
490
  export interface DeleteDocumentsRequestDeleteDocumentsParameters {
491
491
  filter_by: string;
492
492
  /** 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. */
493
- batch_size?: number;
494
- ignore_not_found?: boolean;
493
+ batch_size?: number | undefined;
494
+ ignore_not_found?: boolean | undefined;
495
495
  /** When true, removes all documents from the collection while preserving the collection and its schema. */
496
- truncate?: boolean;
496
+ truncate?: boolean | undefined;
497
497
  }
498
498
  export interface DeleteDocumentsRequest {
499
499
  /** The name of the collection to delete documents from */
500
500
  collectionName: string;
501
- deleteDocumentsParameters?: DeleteDocumentsRequestDeleteDocumentsParameters;
501
+ deleteDocumentsParameters?: DeleteDocumentsRequestDeleteDocumentsParameters | undefined;
502
502
  }
503
503
  export interface DeleteDocumentsResponse {
504
504
  num_deleted: number;
@@ -553,16 +553,16 @@ export interface SynonymItemDeleteSchema {
553
553
  }
554
554
  export interface ExportDocumentsRequestExportDocumentsParameters {
555
555
  /** Filter conditions for refining your search results. Separate multiple conditions with &&. */
556
- filter_by?: string;
556
+ filter_by?: string | undefined;
557
557
  /** List of fields from the document to include in the search result */
558
- include_fields?: string;
558
+ include_fields?: string | undefined;
559
559
  /** List of fields from the document to exclude in the search result */
560
- exclude_fields?: string;
560
+ exclude_fields?: string | undefined;
561
561
  }
562
562
  export interface ExportDocumentsRequest {
563
563
  /** The name of the collection */
564
564
  collectionName: string;
565
- exportDocumentsParameters?: ExportDocumentsRequestExportDocumentsParameters;
565
+ exportDocumentsParameters?: ExportDocumentsRequestExportDocumentsParameters | undefined;
566
566
  }
567
567
  export interface ExportDocumentsResponse {
568
568
  }
@@ -586,19 +586,19 @@ export interface ConversationModelSchema {
586
586
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
587
587
  model_name: string;
588
588
  /** The LLM service's API Key */
589
- api_key?: string | import("effect/Redacted").Redacted<string>;
589
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
590
590
  /** Typesense collection that stores the historical conversations */
591
591
  history_collection: string;
592
592
  /** LLM service's account ID (only applicable for Cloudflare) */
593
- account_id?: string;
593
+ account_id?: string | undefined;
594
594
  /** The system prompt that contains special instructions to the LLM */
595
- system_prompt?: string;
595
+ system_prompt?: string | undefined;
596
596
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
597
- ttl?: number;
597
+ ttl?: number | undefined;
598
598
  /** 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. */
599
599
  max_bytes: number;
600
600
  /** URL of vLLM service */
601
- vllm_url?: string;
601
+ vllm_url?: string | undefined;
602
602
  }
603
603
  export type GetAllConversationModelsResponseBodyList = Array<ConversationModelSchema>;
604
604
  export type GetAllConversationModelsResponse = GetAllConversationModelsResponseBodyList;
@@ -608,41 +608,41 @@ export interface GetAllNLSearchModelsRequest {
608
608
  export type NLSearchModelSchemaStopSequencesList = Array<string>;
609
609
  export interface NLSearchModelSchema {
610
610
  /** Name of the NL model to use */
611
- model_name?: string;
611
+ model_name?: string | undefined;
612
612
  /** API key for the NL model service */
613
- api_key?: string | import("effect/Redacted").Redacted<string>;
613
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
614
614
  /** Custom API URL for the NL model service */
615
- api_url?: string;
615
+ api_url?: string | undefined;
616
616
  /** Maximum number of bytes to process */
617
- max_bytes?: number;
617
+ max_bytes?: number | undefined;
618
618
  /** Temperature parameter for the NL model */
619
- temperature?: number;
619
+ temperature?: number | undefined;
620
620
  /** System prompt for the NL model */
621
- system_prompt?: string;
621
+ system_prompt?: string | undefined;
622
622
  /** Top-p parameter for the NL model (Google-specific) */
623
- top_p?: number;
623
+ top_p?: number | undefined;
624
624
  /** Top-k parameter for the NL model (Google-specific) */
625
- top_k?: number;
625
+ top_k?: number | undefined;
626
626
  /** Stop sequences for the NL model (Google-specific) */
627
- stop_sequences?: NLSearchModelSchemaStopSequencesList;
627
+ stop_sequences?: NLSearchModelSchemaStopSequencesList | undefined;
628
628
  /** API version for the NL model service */
629
- api_version?: string;
629
+ api_version?: string | undefined;
630
630
  /** Project ID for GCP Vertex AI */
631
- project_id?: string;
631
+ project_id?: string | undefined;
632
632
  /** Access token for GCP Vertex AI */
633
- access_token?: string | import("effect/Redacted").Redacted<string>;
633
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
634
634
  /** Refresh token for GCP Vertex AI */
635
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
635
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
636
636
  /** Client ID for GCP Vertex AI */
637
- client_id?: string;
637
+ client_id?: string | undefined;
638
638
  /** Client secret for GCP Vertex AI */
639
- client_secret?: string | import("effect/Redacted").Redacted<string>;
639
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
640
640
  /** Region for GCP Vertex AI */
641
- region?: string;
641
+ region?: string | undefined;
642
642
  /** Maximum output tokens for GCP Vertex AI */
643
- max_output_tokens?: number;
643
+ max_output_tokens?: number | undefined;
644
644
  /** Account ID for Cloudflare-specific models */
645
- account_id?: string;
645
+ account_id?: string | undefined;
646
646
  /** Optional ID for the NL search model */
647
647
  id: string;
648
648
  }
@@ -654,326 +654,326 @@ export interface GetAllPresetsRequest {
654
654
  export type DropTokensMode = "right_to_left" | "left_to_right" | "both_sides:3";
655
655
  export interface SearchParameters {
656
656
  /** 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. */
657
- q?: string;
657
+ q?: string | undefined;
658
658
  /** A list of `string` fields that should be queried against. Multiple fields are separated with a comma. */
659
- query_by?: string;
659
+ query_by?: string | undefined;
660
660
  /** 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. */
661
- validate_field_names?: boolean;
661
+ validate_field_names?: boolean | undefined;
662
662
  /** Whether to use natural language processing to parse the query. */
663
- nl_query?: boolean;
663
+ nl_query?: boolean | undefined;
664
664
  /** The ID of the natural language model to use. */
665
- nl_model_id?: string;
665
+ nl_model_id?: string | undefined;
666
666
  /** 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. */
667
- query_by_weights?: string;
667
+ query_by_weights?: string | undefined;
668
668
  /** 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. */
669
- text_match_type?: string;
669
+ text_match_type?: string | undefined;
670
670
  /** 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. */
671
- prefix?: string;
671
+ prefix?: string | undefined;
672
672
  /** 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 */
673
- infix?: string;
673
+ infix?: string | undefined;
674
674
  /** 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. */
675
- max_extra_prefix?: number;
675
+ max_extra_prefix?: number | undefined;
676
676
  /** 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. */
677
- max_extra_suffix?: number;
677
+ max_extra_suffix?: number | undefined;
678
678
  /** Filter conditions for refining your open api validator search results. Separate multiple conditions with &&. */
679
- filter_by?: string;
679
+ filter_by?: string | undefined;
680
680
  /** 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 */
681
- enable_lazy_filter?: boolean;
681
+ enable_lazy_filter?: boolean | undefined;
682
682
  /** 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*. */
683
- max_filter_by_candidates?: number;
683
+ max_filter_by_candidates?: number | undefined;
684
684
  /** 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` */
685
- sort_by?: string;
685
+ sort_by?: string | undefined;
686
686
  /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
687
- facet_by?: string;
687
+ facet_by?: string | undefined;
688
688
  /** Maximum number of facet values to be returned. */
689
- max_facet_values?: number;
689
+ max_facet_values?: number | undefined;
690
690
  /** 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". */
691
- facet_query?: string;
691
+ facet_query?: string | undefined;
692
692
  /** Controls the fuzziness of the facet query filter. Default: 2. */
693
- facet_query_num_typos?: number;
693
+ facet_query_num_typos?: number | undefined;
694
694
  /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
695
- num_typos?: string;
695
+ num_typos?: string | undefined;
696
696
  /** Results from this specific page number would be fetched. */
697
- page?: number;
697
+ page?: number | undefined;
698
698
  /** Number of results to fetch per page. Default: 10 */
699
- per_page?: number;
699
+ per_page?: number | undefined;
700
700
  /** Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10. */
701
- limit?: number;
701
+ limit?: number | undefined;
702
702
  /** Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter. */
703
- offset?: number;
703
+ offset?: number | undefined;
704
704
  /** 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. */
705
- group_by?: string;
705
+ group_by?: string | undefined;
706
706
  /** 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 */
707
- group_limit?: number;
707
+ group_limit?: number | undefined;
708
708
  /** 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 */
709
- group_missing_values?: boolean;
709
+ group_missing_values?: boolean | undefined;
710
710
  /** 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. */
711
- group_max_candidates?: number;
711
+ group_max_candidates?: number | undefined;
712
712
  /** List of fields from the document to include in the search result */
713
- include_fields?: string;
713
+ include_fields?: string | undefined;
714
714
  /** List of fields from the document to exclude in the search result */
715
- exclude_fields?: string;
715
+ exclude_fields?: string | undefined;
716
716
  /** List of fields which should be highlighted fully without snippeting */
717
- highlight_full_fields?: string;
717
+ highlight_full_fields?: string | undefined;
718
718
  /** The number of tokens that should surround the highlighted text on each side. Default: 4 */
719
- highlight_affix_num_tokens?: number;
719
+ highlight_affix_num_tokens?: number | undefined;
720
720
  /** The start tag used for the highlighted snippets. Default: `<mark>` */
721
- highlight_start_tag?: string;
721
+ highlight_start_tag?: string | undefined;
722
722
  /** The end tag used for the highlighted snippets. Default: `</mark>` */
723
- highlight_end_tag?: string;
723
+ highlight_end_tag?: string | undefined;
724
724
  /** Flag for enabling/disabling the deprecated, old highlight structure in the response. Default: true */
725
- enable_highlight_v1?: boolean;
725
+ enable_highlight_v1?: boolean | undefined;
726
726
  /** Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script). */
727
- enable_analytics?: boolean;
727
+ enable_analytics?: boolean | undefined;
728
728
  /** Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 */
729
- snippet_threshold?: number;
729
+ snippet_threshold?: number | undefined;
730
730
  /** List of synonym set names to associate with this search query */
731
- synonym_sets?: string;
731
+ synonym_sets?: string | undefined;
732
732
  /** 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 */
733
- drop_tokens_threshold?: number;
734
- drop_tokens_mode?: DropTokensMode | (string & {});
733
+ drop_tokens_threshold?: number | undefined;
734
+ drop_tokens_mode?: DropTokensMode | (string & {}) | undefined;
735
735
  /** 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 */
736
- typo_tokens_threshold?: number;
736
+ typo_tokens_threshold?: number | undefined;
737
737
  /** Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. */
738
- enable_typos_for_alpha_numerical_tokens?: boolean;
738
+ enable_typos_for_alpha_numerical_tokens?: boolean | undefined;
739
739
  /** Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false */
740
- filter_curated_hits?: boolean;
740
+ filter_curated_hits?: boolean | undefined;
741
741
  /** 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 */
742
- enable_synonyms?: boolean;
742
+ enable_synonyms?: boolean | undefined;
743
743
  /** Allow synonym resolution on word prefixes in the query. Default: false */
744
- synonym_prefix?: boolean;
744
+ synonym_prefix?: boolean | undefined;
745
745
  /** 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 */
746
- demote_synonym_match?: boolean;
746
+ demote_synonym_match?: boolean | undefined;
747
747
  /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
748
- synonym_num_typos?: number;
748
+ synonym_num_typos?: number | undefined;
749
749
  /** 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`. */
750
- pinned_hits?: string;
750
+ pinned_hits?: string | undefined;
751
751
  /** 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`. */
752
- hidden_hits?: string;
752
+ hidden_hits?: string | undefined;
753
753
  /** Comma separated list of tags to trigger the curations rules that match the tags. */
754
- curation_tags?: string;
754
+ curation_tags?: string | undefined;
755
755
  /** A list of custom fields that must be highlighted even if you don't query for them */
756
- highlight_fields?: string;
756
+ highlight_fields?: string | undefined;
757
757
  /** 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. */
758
- rerank_hybrid_matches?: boolean;
758
+ rerank_hybrid_matches?: boolean | undefined;
759
759
  /** 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`. */
760
- split_join_tokens?: string;
760
+ split_join_tokens?: string | undefined;
761
761
  /** 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 */
762
- pre_segmented_query?: boolean;
762
+ pre_segmented_query?: boolean | undefined;
763
763
  /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
764
- preset?: string;
764
+ preset?: string | undefined;
765
765
  /** 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 */
766
- enable_curations?: boolean;
766
+ enable_curations?: boolean | undefined;
767
767
  /** Set this parameter to true to ensure that an exact match is ranked above the others */
768
- prioritize_exact_match?: boolean;
768
+ prioritize_exact_match?: boolean | undefined;
769
769
  /** Control the number of words that Typesense considers for typo and prefix searching. */
770
- max_candidates?: number;
770
+ max_candidates?: number | undefined;
771
771
  /** Make Typesense prioritize documents where the query words appear earlier in the text. */
772
- prioritize_token_position?: boolean;
772
+ prioritize_token_position?: boolean | undefined;
773
773
  /** Make Typesense prioritize documents where the query words appear in more number of fields. */
774
- prioritize_num_matching_fields?: boolean;
774
+ prioritize_num_matching_fields?: boolean | undefined;
775
775
  /** Make Typesense disable typos for numerical tokens. */
776
- enable_typos_for_numerical_tokens?: boolean;
776
+ enable_typos_for_numerical_tokens?: boolean | undefined;
777
777
  /** 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). */
778
- exhaustive_search?: boolean;
778
+ exhaustive_search?: boolean | undefined;
779
779
  /** 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. */
780
- search_cutoff_ms?: number;
780
+ search_cutoff_ms?: number | undefined;
781
781
  /** 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. */
782
- limit_hits?: number;
782
+ limit_hits?: number | undefined;
783
783
  /** Enable server side caching of search query results. By default, caching is disabled. */
784
- use_cache?: boolean;
784
+ use_cache?: boolean | undefined;
785
785
  /** 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. */
786
- cache_ttl?: number;
786
+ cache_ttl?: number | undefined;
787
787
  /** Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
788
- min_len_1typo?: number;
788
+ min_len_1typo?: number | undefined;
789
789
  /** Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
790
- min_len_2typo?: number;
790
+ min_len_2typo?: number | undefined;
791
791
  /** Vector query expression for fetching documents "closest" to a given query/document vector. */
792
- vector_query?: string;
792
+ vector_query?: string | undefined;
793
793
  /** Timeout (in milliseconds) for fetching remote embeddings. */
794
- remote_embedding_timeout_ms?: number;
794
+ remote_embedding_timeout_ms?: number | undefined;
795
795
  /** Number of times to retry fetching remote embeddings. */
796
- remote_embedding_num_tries?: number;
796
+ remote_embedding_num_tries?: number | undefined;
797
797
  /** Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default). */
798
- facet_strategy?: string;
798
+ facet_strategy?: string | undefined;
799
799
  /** Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query. */
800
- stopwords?: string;
800
+ stopwords?: string | undefined;
801
801
  /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
802
- facet_return_parent?: string;
802
+ facet_return_parent?: string | undefined;
803
803
  /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
804
- facet_sample_percent?: number;
804
+ facet_sample_percent?: number | undefined;
805
805
  /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
806
- facet_sample_threshold?: number;
806
+ facet_sample_threshold?: number | undefined;
807
807
  /** 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. */
808
- facet_sample_slope?: number;
808
+ facet_sample_slope?: number | undefined;
809
809
  /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
810
- voice_query?: string;
810
+ voice_query?: string | undefined;
811
811
  /** Enable conversational search. */
812
- conversation?: boolean;
812
+ conversation?: boolean | undefined;
813
813
  /** The Id of Conversation Model to be used. */
814
- conversation_model_id?: string;
814
+ conversation_model_id?: string | undefined;
815
815
  /** The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM. */
816
- conversation_id?: string;
816
+ conversation_id?: string | undefined;
817
817
  }
818
818
  export interface MultiSearchCollectionParameters {
819
819
  /** 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. */
820
- q?: string;
820
+ q?: string | undefined;
821
821
  /** A list of `string` fields that should be queried against. Multiple fields are separated with a comma. */
822
- query_by?: string;
822
+ query_by?: string | undefined;
823
823
  /** 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. */
824
- query_by_weights?: string;
824
+ query_by_weights?: string | undefined;
825
825
  /** 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. */
826
- text_match_type?: string;
826
+ text_match_type?: string | undefined;
827
827
  /** 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. */
828
- prefix?: string;
828
+ prefix?: string | undefined;
829
829
  /** 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 */
830
- infix?: string;
830
+ infix?: string | undefined;
831
831
  /** 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. */
832
- max_extra_prefix?: number;
832
+ max_extra_prefix?: number | undefined;
833
833
  /** 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. */
834
- max_extra_suffix?: number;
834
+ max_extra_suffix?: number | undefined;
835
835
  /** Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&. */
836
- filter_by?: string;
836
+ filter_by?: string | undefined;
837
837
  /** 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 */
838
- enable_lazy_filter?: boolean;
838
+ enable_lazy_filter?: boolean | undefined;
839
839
  /** 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*. */
840
- max_filter_by_candidates?: number;
840
+ max_filter_by_candidates?: number | undefined;
841
841
  /** 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` */
842
- sort_by?: string;
842
+ sort_by?: string | undefined;
843
843
  /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
844
- facet_by?: string;
844
+ facet_by?: string | undefined;
845
845
  /** Maximum number of facet values to be returned. */
846
- max_facet_values?: number;
846
+ max_facet_values?: number | undefined;
847
847
  /** 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". */
848
- facet_query?: string;
848
+ facet_query?: string | undefined;
849
849
  /** Controls the fuzziness of the facet query filter. Default: 2. */
850
- facet_query_num_typos?: number;
850
+ facet_query_num_typos?: number | undefined;
851
851
  /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
852
- num_typos?: string;
852
+ num_typos?: string | undefined;
853
853
  /** Results from this specific page number would be fetched. */
854
- page?: number;
854
+ page?: number | undefined;
855
855
  /** Number of results to fetch per page. Default: 10 */
856
- per_page?: number;
856
+ per_page?: number | undefined;
857
857
  /** Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10. */
858
- limit?: number;
858
+ limit?: number | undefined;
859
859
  /** Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter. */
860
- offset?: number;
860
+ offset?: number | undefined;
861
861
  /** 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. */
862
- group_by?: string;
862
+ group_by?: string | undefined;
863
863
  /** 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 */
864
- group_limit?: number;
864
+ group_limit?: number | undefined;
865
865
  /** 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 */
866
- group_missing_values?: boolean;
866
+ group_missing_values?: boolean | undefined;
867
867
  /** 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. */
868
- group_max_candidates?: number;
868
+ group_max_candidates?: number | undefined;
869
869
  /** List of fields from the document to include in the search result */
870
- include_fields?: string;
870
+ include_fields?: string | undefined;
871
871
  /** List of fields from the document to exclude in the search result */
872
- exclude_fields?: string;
872
+ exclude_fields?: string | undefined;
873
873
  /** List of fields which should be highlighted fully without snippeting */
874
- highlight_full_fields?: string;
874
+ highlight_full_fields?: string | undefined;
875
875
  /** The number of tokens that should surround the highlighted text on each side. Default: 4 */
876
- highlight_affix_num_tokens?: number;
876
+ highlight_affix_num_tokens?: number | undefined;
877
877
  /** The start tag used for the highlighted snippets. Default: `<mark>` */
878
- highlight_start_tag?: string;
878
+ highlight_start_tag?: string | undefined;
879
879
  /** The end tag used for the highlighted snippets. Default: `</mark>` */
880
- highlight_end_tag?: string;
880
+ highlight_end_tag?: string | undefined;
881
881
  /** Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 */
882
- snippet_threshold?: number;
882
+ snippet_threshold?: number | undefined;
883
883
  /** 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 */
884
- drop_tokens_threshold?: number;
885
- drop_tokens_mode?: DropTokensMode | (string & {});
884
+ drop_tokens_threshold?: number | undefined;
885
+ drop_tokens_mode?: DropTokensMode | (string & {}) | undefined;
886
886
  /** 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 */
887
- typo_tokens_threshold?: number;
887
+ typo_tokens_threshold?: number | undefined;
888
888
  /** Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. */
889
- enable_typos_for_alpha_numerical_tokens?: boolean;
889
+ enable_typos_for_alpha_numerical_tokens?: boolean | undefined;
890
890
  /** Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false */
891
- filter_curated_hits?: boolean;
891
+ filter_curated_hits?: boolean | undefined;
892
892
  /** 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 */
893
- enable_synonyms?: boolean;
893
+ enable_synonyms?: boolean | undefined;
894
894
  /** Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script). */
895
- enable_analytics?: boolean;
895
+ enable_analytics?: boolean | undefined;
896
896
  /** Allow synonym resolution on word prefixes in the query. Default: false */
897
- synonym_prefix?: boolean;
897
+ synonym_prefix?: boolean | undefined;
898
898
  /** 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 */
899
- demote_synonym_match?: boolean;
899
+ demote_synonym_match?: boolean | undefined;
900
900
  /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
901
- synonym_num_typos?: number;
901
+ synonym_num_typos?: number | undefined;
902
902
  /** 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`. */
903
- pinned_hits?: string;
903
+ pinned_hits?: string | undefined;
904
904
  /** 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`. */
905
- hidden_hits?: string;
905
+ hidden_hits?: string | undefined;
906
906
  /** Comma separated list of tags to trigger the curations rules that match the tags. */
907
- curation_tags?: string;
907
+ curation_tags?: string | undefined;
908
908
  /** A list of custom fields that must be highlighted even if you don't query for them */
909
- highlight_fields?: string;
909
+ highlight_fields?: string | undefined;
910
910
  /** 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. */
911
- rerank_hybrid_matches?: boolean;
911
+ rerank_hybrid_matches?: boolean | undefined;
912
912
  /** 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 */
913
- pre_segmented_query?: boolean;
913
+ pre_segmented_query?: boolean | undefined;
914
914
  /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
915
- preset?: string;
915
+ preset?: string | undefined;
916
916
  /** 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 */
917
- enable_curations?: boolean;
917
+ enable_curations?: boolean | undefined;
918
918
  /** Set this parameter to true to ensure that an exact match is ranked above the others */
919
- prioritize_exact_match?: boolean;
919
+ prioritize_exact_match?: boolean | undefined;
920
920
  /** Make Typesense prioritize documents where the query words appear earlier in the text. */
921
- prioritize_token_position?: boolean;
921
+ prioritize_token_position?: boolean | undefined;
922
922
  /** Make Typesense prioritize documents where the query words appear in more number of fields. */
923
- prioritize_num_matching_fields?: boolean;
923
+ prioritize_num_matching_fields?: boolean | undefined;
924
924
  /** Make Typesense disable typos for numerical tokens. */
925
- enable_typos_for_numerical_tokens?: boolean;
925
+ enable_typos_for_numerical_tokens?: boolean | undefined;
926
926
  /** 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). */
927
- exhaustive_search?: boolean;
927
+ exhaustive_search?: boolean | undefined;
928
928
  /** 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. */
929
- search_cutoff_ms?: number;
929
+ search_cutoff_ms?: number | undefined;
930
930
  /** 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. */
931
- limit_hits?: number;
931
+ limit_hits?: number | undefined;
932
932
  /** Enable server side caching of search query results. By default, caching is disabled. */
933
- use_cache?: boolean;
933
+ use_cache?: boolean | undefined;
934
934
  /** 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. */
935
- cache_ttl?: number;
935
+ cache_ttl?: number | undefined;
936
936
  /** Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
937
- min_len_1typo?: number;
937
+ min_len_1typo?: number | undefined;
938
938
  /** Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
939
- min_len_2typo?: number;
939
+ min_len_2typo?: number | undefined;
940
940
  /** Vector query expression for fetching documents "closest" to a given query/document vector. */
941
- vector_query?: string;
941
+ vector_query?: string | undefined;
942
942
  /** Timeout (in milliseconds) for fetching remote embeddings. */
943
- remote_embedding_timeout_ms?: number;
943
+ remote_embedding_timeout_ms?: number | undefined;
944
944
  /** Number of times to retry fetching remote embeddings. */
945
- remote_embedding_num_tries?: number;
945
+ remote_embedding_num_tries?: number | undefined;
946
946
  /** Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default). */
947
- facet_strategy?: string;
947
+ facet_strategy?: string | undefined;
948
948
  /** Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query. */
949
- stopwords?: string;
949
+ stopwords?: string | undefined;
950
950
  /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
951
- facet_return_parent?: string;
951
+ facet_return_parent?: string | undefined;
952
952
  /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
953
- facet_sample_percent?: number;
953
+ facet_sample_percent?: number | undefined;
954
954
  /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
955
- facet_sample_threshold?: number;
955
+ facet_sample_threshold?: number | undefined;
956
956
  /** 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. */
957
- facet_sample_slope?: number;
957
+ facet_sample_slope?: number | undefined;
958
958
  /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
959
- voice_query?: string;
959
+ voice_query?: string | undefined;
960
960
  /** Enable conversational search. */
961
- conversation?: boolean;
961
+ conversation?: boolean | undefined;
962
962
  /** The Id of Conversation Model to be used. */
963
- conversation_model_id?: string;
963
+ conversation_model_id?: string | undefined;
964
964
  /** The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM. */
965
- conversation_id?: string;
965
+ conversation_id?: string | undefined;
966
966
  /** 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. */
967
- validate_field_names?: boolean;
967
+ validate_field_names?: boolean | undefined;
968
968
  /** The collection to search in. */
969
- collection?: string;
969
+ collection?: string | undefined;
970
970
  /** A separate search API key for each search within a multi_search request */
971
- x_typesense_api_key?: string;
971
+ x_typesense_api_key?: string | undefined;
972
972
  }
973
973
  export type MultiSearchSearchesParameterSearchesList = Array<MultiSearchCollectionParameters>;
974
974
  export interface MultiSearchSearchesParameter {
975
975
  /** When true, merges the search results from each search query into a single ordered set of hits. */
976
- union?: boolean;
976
+ union?: boolean | undefined;
977
977
  searches: MultiSearchSearchesParameterSearchesList;
978
978
  }
979
979
  export type PresetSchemaValue = SearchParameters | MultiSearchSearchesParameter;
@@ -994,14 +994,14 @@ export interface GetAnalyticsEventsRequest {
994
994
  }
995
995
  export type AnalyticsEventsResponseEventsItemDocIdsList = Array<string>;
996
996
  export interface AnalyticsEventsResponseEventsItem {
997
- name?: string;
998
- event_type?: string;
999
- collection?: string;
1000
- timestamp?: number;
1001
- user_id?: string;
1002
- doc_id?: string;
1003
- doc_ids?: AnalyticsEventsResponseEventsItemDocIdsList;
1004
- query?: string;
997
+ name?: string | undefined;
998
+ event_type?: string | undefined;
999
+ collection?: string | undefined;
1000
+ timestamp?: number | undefined;
1001
+ user_id?: string | undefined;
1002
+ doc_id?: string | undefined;
1003
+ doc_ids?: AnalyticsEventsResponseEventsItemDocIdsList | undefined;
1004
+ query?: string | undefined;
1005
1005
  }
1006
1006
  export type AnalyticsEventsResponseEventsList = Array<AnalyticsEventsResponseEventsItem>;
1007
1007
  export interface AnalyticsEventsResponse {
@@ -1013,55 +1013,55 @@ export interface GetAnalyticsRuleRequest {
1013
1013
  }
1014
1014
  export type GetAnalyticsRuleResponseParamsMetaFieldsList = Array<string>;
1015
1015
  export interface GetAnalyticsRuleResponseParams {
1016
- destination_collection?: string;
1017
- limit?: number;
1018
- capture_search_requests?: boolean;
1019
- meta_fields?: GetAnalyticsRuleResponseParamsMetaFieldsList;
1020
- expand_query?: boolean;
1021
- counter_field?: string;
1022
- weight?: number;
1016
+ destination_collection?: string | undefined;
1017
+ limit?: number | undefined;
1018
+ capture_search_requests?: boolean | undefined;
1019
+ meta_fields?: GetAnalyticsRuleResponseParamsMetaFieldsList | undefined;
1020
+ expand_query?: boolean | undefined;
1021
+ counter_field?: string | undefined;
1022
+ weight?: number | undefined;
1023
1023
  }
1024
1024
  export interface GetAnalyticsRuleResponse {
1025
1025
  name: string;
1026
1026
  type: AnalyticsRuleType;
1027
1027
  collection: string;
1028
1028
  event_type: string;
1029
- rule_tag?: string;
1030
- params?: GetAnalyticsRuleResponseParams;
1029
+ rule_tag?: string | undefined;
1030
+ params?: GetAnalyticsRuleResponseParams | undefined;
1031
1031
  }
1032
1032
  export interface GetAnalyticsRulesRequest {
1033
1033
  /** Filter rules by rule_tag */
1034
- rule_tag?: string;
1034
+ rule_tag?: string | undefined;
1035
1035
  }
1036
1036
  export type GetAnalyticsRulesResponseBodyList = Array<AnalyticsRule>;
1037
1037
  export type GetAnalyticsRulesResponse = GetAnalyticsRulesResponseBodyList;
1038
1038
  export interface GetAnalyticsStatusRequest {
1039
1039
  }
1040
1040
  export interface AnalyticsStatus {
1041
- popular_prefix_queries?: number;
1042
- nohits_prefix_queries?: number;
1043
- log_prefix_queries?: number;
1044
- query_log_events?: number;
1045
- query_counter_events?: number;
1046
- doc_log_events?: number;
1047
- doc_counter_events?: number;
1041
+ popular_prefix_queries?: number | undefined;
1042
+ nohits_prefix_queries?: number | undefined;
1043
+ log_prefix_queries?: number | undefined;
1044
+ query_log_events?: number | undefined;
1045
+ query_counter_events?: number | undefined;
1046
+ doc_log_events?: number | undefined;
1047
+ doc_counter_events?: number | undefined;
1048
1048
  }
1049
1049
  export interface GetAPIStatsRequest {
1050
1050
  }
1051
1051
  export interface APIStatsResponse {
1052
- delete_latency_ms?: number;
1053
- delete_requests_per_second?: number;
1054
- import_latency_ms?: number;
1055
- import_requests_per_second?: number;
1056
- latency_ms?: unknown;
1057
- overloaded_requests_per_second?: number;
1058
- pending_write_batches?: number;
1059
- requests_per_second?: unknown;
1060
- search_latency_ms?: number;
1061
- search_requests_per_second?: number;
1062
- total_requests_per_second?: number;
1063
- write_latency_ms?: number;
1064
- write_requests_per_second?: number;
1052
+ delete_latency_ms?: number | undefined;
1053
+ delete_requests_per_second?: number | undefined;
1054
+ import_latency_ms?: number | undefined;
1055
+ import_requests_per_second?: number | undefined;
1056
+ latency_ms?: unknown | undefined;
1057
+ overloaded_requests_per_second?: number | undefined;
1058
+ pending_write_batches?: number | undefined;
1059
+ requests_per_second?: unknown | undefined;
1060
+ search_latency_ms?: number | undefined;
1061
+ search_requests_per_second?: number | undefined;
1062
+ total_requests_per_second?: number | undefined;
1063
+ write_latency_ms?: number | undefined;
1064
+ write_requests_per_second?: number | undefined;
1065
1065
  }
1066
1066
  export interface GetCollectionRequest {
1067
1067
  /** The name of the collection to retrieve */
@@ -1081,18 +1081,18 @@ export interface GetCollectionResponse {
1081
1081
  /** A list of fields for querying, filtering and faceting */
1082
1082
  fields: GetCollectionResponseFieldsList;
1083
1083
  /** 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. */
1084
- default_sorting_field?: string;
1084
+ default_sorting_field?: string | undefined;
1085
1085
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
1086
- token_separators?: GetCollectionResponseTokenSeparatorsList;
1086
+ token_separators?: GetCollectionResponseTokenSeparatorsList | undefined;
1087
1087
  /** List of synonym set names to associate with this collection */
1088
- synonym_sets?: GetCollectionResponseSynonymSetsList;
1088
+ synonym_sets?: GetCollectionResponseSynonymSetsList | undefined;
1089
1089
  /** 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. */
1090
- enable_nested_fields?: boolean;
1090
+ enable_nested_fields?: boolean | undefined;
1091
1091
  /** List of symbols or special characters to be indexed. */
1092
- symbols_to_index?: GetCollectionResponseSymbolsToIndexList;
1093
- voice_query_model?: VoiceQueryModelCollectionConfig;
1092
+ symbols_to_index?: GetCollectionResponseSymbolsToIndexList | undefined;
1093
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
1094
1094
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
1095
- metadata?: unknown;
1095
+ metadata?: unknown | undefined;
1096
1096
  /** Number of documents in the collection */
1097
1097
  num_documents: number;
1098
1098
  /** Timestamp of when the collection was created (Unix epoch in seconds) */
@@ -1100,14 +1100,14 @@ export interface GetCollectionResponse {
1100
1100
  }
1101
1101
  export interface GetCollectionsRequestGetCollectionsParameters {
1102
1102
  /** Comma-separated list of fields from the collection to exclude from the response */
1103
- exclude_fields?: string;
1103
+ exclude_fields?: string | undefined;
1104
1104
  /** Number of collections to fetch. Default: returns all collections. */
1105
- limit?: number;
1105
+ limit?: number | undefined;
1106
1106
  /** Identifies the starting point to return collections when paginating. */
1107
- offset?: number;
1107
+ offset?: number | undefined;
1108
1108
  }
1109
1109
  export interface GetCollectionsRequest {
1110
- getCollectionsParameters?: GetCollectionsRequestGetCollectionsParameters;
1110
+ getCollectionsParameters?: GetCollectionsRequestGetCollectionsParameters | undefined;
1111
1111
  }
1112
1112
  /** A list of fields for querying, filtering and faceting */
1113
1113
  export type CollectionResponseFieldsList = Array<Field>;
@@ -1123,18 +1123,18 @@ export interface CollectionResponse {
1123
1123
  /** A list of fields for querying, filtering and faceting */
1124
1124
  fields: CollectionResponseFieldsList;
1125
1125
  /** 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. */
1126
- default_sorting_field?: string;
1126
+ default_sorting_field?: string | undefined;
1127
1127
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
1128
- token_separators?: CollectionResponseTokenSeparatorsList;
1128
+ token_separators?: CollectionResponseTokenSeparatorsList | undefined;
1129
1129
  /** List of synonym set names to associate with this collection */
1130
- synonym_sets?: CollectionResponseSynonymSetsList;
1130
+ synonym_sets?: CollectionResponseSynonymSetsList | undefined;
1131
1131
  /** 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. */
1132
- enable_nested_fields?: boolean;
1132
+ enable_nested_fields?: boolean | undefined;
1133
1133
  /** List of symbols or special characters to be indexed. */
1134
- symbols_to_index?: CollectionResponseSymbolsToIndexList;
1135
- voice_query_model?: VoiceQueryModelCollectionConfig;
1134
+ symbols_to_index?: CollectionResponseSymbolsToIndexList | undefined;
1135
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
1136
1136
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
1137
- metadata?: unknown;
1137
+ metadata?: unknown | undefined;
1138
1138
  /** Number of documents in the collection */
1139
1139
  num_documents: number;
1140
1140
  /** Timestamp of when the collection was created (Unix epoch in seconds) */
@@ -1152,19 +1152,19 @@ export interface GetConversationModelResponse {
1152
1152
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
1153
1153
  model_name: string;
1154
1154
  /** The LLM service's API Key */
1155
- api_key?: string | import("effect/Redacted").Redacted<string>;
1155
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
1156
1156
  /** Typesense collection that stores the historical conversations */
1157
1157
  history_collection: string;
1158
1158
  /** LLM service's account ID (only applicable for Cloudflare) */
1159
- account_id?: string;
1159
+ account_id?: string | undefined;
1160
1160
  /** The system prompt that contains special instructions to the LLM */
1161
- system_prompt?: string;
1161
+ system_prompt?: string | undefined;
1162
1162
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
1163
- ttl?: number;
1163
+ ttl?: number | undefined;
1164
1164
  /** 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. */
1165
1165
  max_bytes: number;
1166
1166
  /** URL of vLLM service */
1167
- vllm_url?: string;
1167
+ vllm_url?: string | undefined;
1168
1168
  }
1169
1169
  export interface GetCurationSetRequest {
1170
1170
  /** The name of the curation set to retrieve */
@@ -1176,13 +1176,13 @@ export type CurationRuleTagsList = Array<string>;
1176
1176
  export type CurationRuleMatch = "exact" | "contains";
1177
1177
  export interface CurationRule {
1178
1178
  /** List of tag values to associate with this curation rule. */
1179
- tags?: CurationRuleTagsList;
1179
+ tags?: CurationRuleTagsList | undefined;
1180
1180
  /** Indicates what search queries should be curated */
1181
- query?: string;
1181
+ query?: string | undefined;
1182
1182
  /** 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. */
1183
- match?: CurationRuleMatch | (string & {});
1183
+ match?: CurationRuleMatch | (string & {}) | undefined;
1184
1184
  /** 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). */
1185
- filter_by?: string;
1185
+ filter_by?: string | undefined;
1186
1186
  }
1187
1187
  export interface CurationInclude {
1188
1188
  /** document id that should be included */
@@ -1201,29 +1201,29 @@ export type CurationItemCreateSchemaExcludesList = Array<CurationExclude>;
1201
1201
  export interface CurationItemCreateSchema {
1202
1202
  rule: CurationRule;
1203
1203
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1204
- includes?: CurationItemCreateSchemaIncludesList;
1204
+ includes?: CurationItemCreateSchemaIncludesList | undefined;
1205
1205
  /** List of document `id`s that should be excluded from the search results. */
1206
- excludes?: CurationItemCreateSchemaExcludesList;
1206
+ excludes?: CurationItemCreateSchemaExcludesList | undefined;
1207
1207
  /** A filter by clause that is applied to any search query that matches the curation rule. */
1208
- filter_by?: string;
1208
+ filter_by?: string | undefined;
1209
1209
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
1210
- remove_matched_tokens?: boolean;
1210
+ remove_matched_tokens?: boolean | undefined;
1211
1211
  /** 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. */
1212
- metadata?: unknown;
1212
+ metadata?: unknown | undefined;
1213
1213
  /** A sort by clause that is applied to any search query that matches the curation rule. */
1214
- sort_by?: string;
1214
+ sort_by?: string | undefined;
1215
1215
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
1216
- replace_query?: string;
1216
+ replace_query?: string | undefined;
1217
1217
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
1218
- filter_curated_hits?: boolean;
1218
+ filter_curated_hits?: boolean | undefined;
1219
1219
  /** 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. */
1220
- effective_from_ts?: number;
1220
+ effective_from_ts?: number | undefined;
1221
1221
  /** 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. */
1222
- effective_to_ts?: number;
1222
+ effective_to_ts?: number | undefined;
1223
1223
  /** 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. */
1224
- stop_processing?: boolean;
1224
+ stop_processing?: boolean | undefined;
1225
1225
  /** ID of the curation item */
1226
- id?: string;
1226
+ id?: string | undefined;
1227
1227
  }
1228
1228
  /** Array of curation items */
1229
1229
  export type GetCurationSetResponseItemsList = Array<CurationItemCreateSchema>;
@@ -1231,7 +1231,7 @@ export interface GetCurationSetResponse {
1231
1231
  /** Array of curation items */
1232
1232
  items: GetCurationSetResponseItemsList;
1233
1233
  /** Optional description for the curation set */
1234
- description?: string;
1234
+ description?: string | undefined;
1235
1235
  name: string;
1236
1236
  }
1237
1237
  export interface GetCurationSetItemRequest {
@@ -1247,27 +1247,27 @@ export type GetCurationSetItemResponseExcludesList = Array<CurationExclude>;
1247
1247
  export interface GetCurationSetItemResponse {
1248
1248
  rule: CurationRule;
1249
1249
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1250
- includes?: GetCurationSetItemResponseIncludesList;
1250
+ includes?: GetCurationSetItemResponseIncludesList | undefined;
1251
1251
  /** List of document `id`s that should be excluded from the search results. */
1252
- excludes?: GetCurationSetItemResponseExcludesList;
1252
+ excludes?: GetCurationSetItemResponseExcludesList | undefined;
1253
1253
  /** A filter by clause that is applied to any search query that matches the curation rule. */
1254
- filter_by?: string;
1254
+ filter_by?: string | undefined;
1255
1255
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
1256
- remove_matched_tokens?: boolean;
1256
+ remove_matched_tokens?: boolean | undefined;
1257
1257
  /** 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. */
1258
- metadata?: unknown;
1258
+ metadata?: unknown | undefined;
1259
1259
  /** A sort by clause that is applied to any search query that matches the curation rule. */
1260
- sort_by?: string;
1260
+ sort_by?: string | undefined;
1261
1261
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
1262
- replace_query?: string;
1262
+ replace_query?: string | undefined;
1263
1263
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
1264
- filter_curated_hits?: boolean;
1264
+ filter_curated_hits?: boolean | undefined;
1265
1265
  /** 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. */
1266
- effective_from_ts?: number;
1266
+ effective_from_ts?: number | undefined;
1267
1267
  /** 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. */
1268
- effective_to_ts?: number;
1268
+ effective_to_ts?: number | undefined;
1269
1269
  /** 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. */
1270
- stop_processing?: boolean;
1270
+ stop_processing?: boolean | undefined;
1271
1271
  /** ID of the curation item */
1272
1272
  id: string;
1273
1273
  }
@@ -1282,27 +1282,27 @@ export type CurationItemSchemaExcludesList = Array<CurationExclude>;
1282
1282
  export interface CurationItemSchema {
1283
1283
  rule: CurationRule;
1284
1284
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1285
- includes?: CurationItemSchemaIncludesList;
1285
+ includes?: CurationItemSchemaIncludesList | undefined;
1286
1286
  /** List of document `id`s that should be excluded from the search results. */
1287
- excludes?: CurationItemSchemaExcludesList;
1287
+ excludes?: CurationItemSchemaExcludesList | undefined;
1288
1288
  /** A filter by clause that is applied to any search query that matches the curation rule. */
1289
- filter_by?: string;
1289
+ filter_by?: string | undefined;
1290
1290
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
1291
- remove_matched_tokens?: boolean;
1291
+ remove_matched_tokens?: boolean | undefined;
1292
1292
  /** 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. */
1293
- metadata?: unknown;
1293
+ metadata?: unknown | undefined;
1294
1294
  /** A sort by clause that is applied to any search query that matches the curation rule. */
1295
- sort_by?: string;
1295
+ sort_by?: string | undefined;
1296
1296
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
1297
- replace_query?: string;
1297
+ replace_query?: string | undefined;
1298
1298
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
1299
- filter_curated_hits?: boolean;
1299
+ filter_curated_hits?: boolean | undefined;
1300
1300
  /** 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. */
1301
- effective_from_ts?: number;
1301
+ effective_from_ts?: number | undefined;
1302
1302
  /** 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. */
1303
- effective_to_ts?: number;
1303
+ effective_to_ts?: number | undefined;
1304
1304
  /** 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. */
1305
- stop_processing?: boolean;
1305
+ stop_processing?: boolean | undefined;
1306
1306
  /** ID of the curation item */
1307
1307
  id: string;
1308
1308
  }
@@ -1316,7 +1316,7 @@ export interface CurationSetSchema {
1316
1316
  /** Array of curation items */
1317
1317
  items: CurationSetSchemaItemsList;
1318
1318
  /** Optional description for the curation set */
1319
- description?: string;
1319
+ description?: string | undefined;
1320
1320
  name: string;
1321
1321
  }
1322
1322
  export type GetCurationSetsResponseBodyList = Array<CurationSetSchema>;
@@ -1335,26 +1335,26 @@ export interface GetKeyRequest {
1335
1335
  export type GetKeyResponseActionsList = Array<string>;
1336
1336
  export type GetKeyResponseCollectionsList = Array<string>;
1337
1337
  export interface GetKeyResponse {
1338
- value?: string;
1338
+ value?: string | undefined;
1339
1339
  description: string;
1340
1340
  actions: GetKeyResponseActionsList;
1341
1341
  collections: GetKeyResponseCollectionsList;
1342
- expires_at?: number;
1343
- id?: number;
1344
- value_prefix?: string;
1342
+ expires_at?: number | undefined;
1343
+ id?: number | undefined;
1344
+ value_prefix?: string | undefined;
1345
1345
  }
1346
1346
  export interface GetKeysRequest {
1347
1347
  }
1348
1348
  export type ApiKeyActionsList = Array<string>;
1349
1349
  export type ApiKeyCollectionsList = Array<string>;
1350
1350
  export interface ApiKey {
1351
- value?: string;
1351
+ value?: string | undefined;
1352
1352
  description: string;
1353
1353
  actions: ApiKeyActionsList;
1354
1354
  collections: ApiKeyCollectionsList;
1355
- expires_at?: number;
1356
- id?: number;
1357
- value_prefix?: string;
1355
+ expires_at?: number | undefined;
1356
+ id?: number | undefined;
1357
+ value_prefix?: string | undefined;
1358
1358
  }
1359
1359
  export type ApiKeysResponseKeysList = Array<ApiKey>;
1360
1360
  export interface ApiKeysResponse {
@@ -1371,41 +1371,41 @@ export interface GetNLSearchModelRequest {
1371
1371
  export type GetNLSearchModelResponseStopSequencesList = Array<string>;
1372
1372
  export interface GetNLSearchModelResponse {
1373
1373
  /** Name of the NL model to use */
1374
- model_name?: string;
1374
+ model_name?: string | undefined;
1375
1375
  /** API key for the NL model service */
1376
- api_key?: string | import("effect/Redacted").Redacted<string>;
1376
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
1377
1377
  /** Custom API URL for the NL model service */
1378
- api_url?: string;
1378
+ api_url?: string | undefined;
1379
1379
  /** Maximum number of bytes to process */
1380
- max_bytes?: number;
1380
+ max_bytes?: number | undefined;
1381
1381
  /** Temperature parameter for the NL model */
1382
- temperature?: number;
1382
+ temperature?: number | undefined;
1383
1383
  /** System prompt for the NL model */
1384
- system_prompt?: string;
1384
+ system_prompt?: string | undefined;
1385
1385
  /** Top-p parameter for the NL model (Google-specific) */
1386
- top_p?: number;
1386
+ top_p?: number | undefined;
1387
1387
  /** Top-k parameter for the NL model (Google-specific) */
1388
- top_k?: number;
1388
+ top_k?: number | undefined;
1389
1389
  /** Stop sequences for the NL model (Google-specific) */
1390
- stop_sequences?: GetNLSearchModelResponseStopSequencesList;
1390
+ stop_sequences?: GetNLSearchModelResponseStopSequencesList | undefined;
1391
1391
  /** API version for the NL model service */
1392
- api_version?: string;
1392
+ api_version?: string | undefined;
1393
1393
  /** Project ID for GCP Vertex AI */
1394
- project_id?: string;
1394
+ project_id?: string | undefined;
1395
1395
  /** Access token for GCP Vertex AI */
1396
- access_token?: string | import("effect/Redacted").Redacted<string>;
1396
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
1397
1397
  /** Refresh token for GCP Vertex AI */
1398
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
1398
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
1399
1399
  /** Client ID for GCP Vertex AI */
1400
- client_id?: string;
1400
+ client_id?: string | undefined;
1401
1401
  /** Client secret for GCP Vertex AI */
1402
- client_secret?: string | import("effect/Redacted").Redacted<string>;
1402
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
1403
1403
  /** Region for GCP Vertex AI */
1404
- region?: string;
1404
+ region?: string | undefined;
1405
1405
  /** Maximum output tokens for GCP Vertex AI */
1406
- max_output_tokens?: number;
1406
+ max_output_tokens?: number | undefined;
1407
1407
  /** Account ID for Cloudflare-specific models */
1408
- account_id?: string;
1408
+ account_id?: string | undefined;
1409
1409
  /** Optional ID for the NL search model */
1410
1410
  id: string;
1411
1411
  }
@@ -1422,11 +1422,11 @@ export interface GetSchemaChangesRequest {
1422
1422
  }
1423
1423
  export interface SchemaChangeStatus {
1424
1424
  /** Name of the collection being modified */
1425
- collection?: string;
1425
+ collection?: string | undefined;
1426
1426
  /** Number of documents that have been validated */
1427
- validated_docs?: number;
1427
+ validated_docs?: number | undefined;
1428
1428
  /** Number of documents that have been altered */
1429
- altered_docs?: number;
1429
+ altered_docs?: number | undefined;
1430
1430
  }
1431
1431
  export type GetSchemaChangesResponseBodyList = Array<SchemaChangeStatus>;
1432
1432
  export type GetSchemaChangesResponse = GetSchemaChangesResponseBodyList;
@@ -1456,7 +1456,7 @@ export type StopwordsSetSchemaStopwordsList = Array<string>;
1456
1456
  export interface StopwordsSetSchema {
1457
1457
  id: string;
1458
1458
  stopwords: StopwordsSetSchemaStopwordsList;
1459
- locale?: string;
1459
+ locale?: string | undefined;
1460
1460
  }
1461
1461
  export interface StopwordsSetRetrieveSchema {
1462
1462
  stopwords: StopwordsSetSchema;
@@ -1481,11 +1481,11 @@ export interface SynonymItemSchema {
1481
1481
  /** Array of words that should be considered as synonyms */
1482
1482
  synonyms: SynonymItemSchemaSynonymsList;
1483
1483
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
1484
- root?: string;
1484
+ root?: string | undefined;
1485
1485
  /** Locale for the synonym, leave blank to use the standard tokenizer */
1486
- locale?: string;
1486
+ locale?: string | undefined;
1487
1487
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
1488
- symbols_to_index?: SynonymItemSchemaSymbolsToIndexList;
1488
+ symbols_to_index?: SynonymItemSchemaSymbolsToIndexList | undefined;
1489
1489
  }
1490
1490
  /** Array of synonym items */
1491
1491
  export type GetSynonymSetResponseItemsList = Array<SynonymItemSchema>;
@@ -1511,11 +1511,11 @@ export interface GetSynonymSetItemResponse {
1511
1511
  /** Array of words that should be considered as synonyms */
1512
1512
  synonyms: GetSynonymSetItemResponseSynonymsList;
1513
1513
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
1514
- root?: string;
1514
+ root?: string | undefined;
1515
1515
  /** Locale for the synonym, leave blank to use the standard tokenizer */
1516
- locale?: string;
1516
+ locale?: string | undefined;
1517
1517
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
1518
- symbols_to_index?: GetSynonymSetItemResponseSymbolsToIndexList;
1518
+ symbols_to_index?: GetSynonymSetItemResponseSymbolsToIndexList | undefined;
1519
1519
  }
1520
1520
  export interface GetSynonymSetItemsRequest {
1521
1521
  /** The name of the synonym set to retrieve items for */
@@ -1543,18 +1543,18 @@ export interface HealthStatus {
1543
1543
  export type IndexAction = "create" | "update" | "upsert" | "emplace";
1544
1544
  export type DirtyValues = "coerce_or_reject" | "coerce_or_drop" | "drop" | "reject";
1545
1545
  export interface ImportDocumentsRequestImportDocumentsParameters {
1546
- batch_size?: number;
1546
+ batch_size?: number | undefined;
1547
1547
  /** 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. */
1548
- return_id?: boolean;
1549
- remote_embedding_batch_size?: number;
1550
- return_doc?: boolean;
1551
- action?: IndexAction | (string & {});
1552
- dirty_values?: DirtyValues | (string & {});
1548
+ return_id?: boolean | undefined;
1549
+ remote_embedding_batch_size?: number | undefined;
1550
+ return_doc?: boolean | undefined;
1551
+ action?: IndexAction | (string & {}) | undefined;
1552
+ dirty_values?: DirtyValues | (string & {}) | undefined;
1553
1553
  }
1554
1554
  export interface ImportDocumentsRequest {
1555
1555
  /** The name of the collection */
1556
1556
  collectionName: string;
1557
- importDocumentsParameters?: ImportDocumentsRequestImportDocumentsParameters;
1557
+ importDocumentsParameters?: ImportDocumentsRequestImportDocumentsParameters | undefined;
1558
1558
  }
1559
1559
  export interface ImportDocumentsResponse {
1560
1560
  }
@@ -1569,16 +1569,16 @@ export interface IndexDocumentRequest {
1569
1569
  /** The name of the collection to add the document to */
1570
1570
  collectionName: string;
1571
1571
  /** Additional action to perform */
1572
- action?: IndexAction | (string & {});
1572
+ action?: IndexAction | (string & {}) | undefined;
1573
1573
  /** Dealing with Dirty Data */
1574
- dirty_values?: DirtyValues | (string & {});
1574
+ dirty_values?: DirtyValues | (string & {}) | undefined;
1575
1575
  }
1576
1576
  export type IndexDocumentResponse = unknown;
1577
1577
  export interface ListStemmingDictionariesRequest {
1578
1578
  }
1579
1579
  export type ListStemmingDictionariesResponseDictionariesList = Array<string>;
1580
1580
  export interface ListStemmingDictionariesResponse {
1581
- dictionaries?: ListStemmingDictionariesResponseDictionariesList;
1581
+ dictionaries?: ListStemmingDictionariesResponseDictionariesList | undefined;
1582
1582
  }
1583
1583
  export interface SearchCollectionRequest {
1584
1584
  /** The name of the collection to search for the document under */
@@ -1586,24 +1586,24 @@ export interface SearchCollectionRequest {
1586
1586
  searchParameters: SearchParameters;
1587
1587
  }
1588
1588
  export interface FacetCountsCountsItem {
1589
- count?: number;
1590
- highlighted?: string;
1591
- value?: string;
1592
- parent?: unknown;
1589
+ count?: number | undefined;
1590
+ highlighted?: string | undefined;
1591
+ value?: string | undefined;
1592
+ parent?: unknown | undefined;
1593
1593
  }
1594
1594
  export type FacetCountsCountsList = Array<FacetCountsCountsItem>;
1595
1595
  export interface FacetCountsStats {
1596
- max?: number;
1597
- min?: number;
1598
- sum?: number;
1599
- total_values?: number;
1600
- avg?: number;
1596
+ max?: number | undefined;
1597
+ min?: number | undefined;
1598
+ sum?: number | undefined;
1599
+ total_values?: number | undefined;
1600
+ avg?: number | undefined;
1601
1601
  }
1602
1602
  export interface FacetCounts {
1603
- counts?: FacetCountsCountsList;
1604
- field_name?: string;
1605
- sampled?: boolean;
1606
- stats?: FacetCountsStats;
1603
+ counts?: FacetCountsCountsList | undefined;
1604
+ field_name?: string | undefined;
1605
+ sampled?: boolean | undefined;
1606
+ stats?: FacetCountsStats | undefined;
1607
1607
  }
1608
1608
  export type SearchResultFacetCountsList = Array<FacetCounts>;
1609
1609
  export type SearchGroupedHitGroupKeyList = Array<unknown>;
@@ -1615,18 +1615,18 @@ export type SearchHighlightValuesList = Array<string>;
1615
1615
  export type SearchHighlightIndicesList = Array<number>;
1616
1616
  export type SearchHighlightMatchedTokensList = Array<unknown>;
1617
1617
  export interface SearchHighlight {
1618
- field?: string;
1618
+ field?: string | undefined;
1619
1619
  /** Present only for (non-array) string fields */
1620
- snippet?: string;
1620
+ snippet?: string | undefined;
1621
1621
  /** Present only for (array) string[] fields */
1622
- snippets?: SearchHighlightSnippetsList;
1622
+ snippets?: SearchHighlightSnippetsList | undefined;
1623
1623
  /** Full field value with highlighting, present only for (non-array) string fields */
1624
- value?: string;
1624
+ value?: string | undefined;
1625
1625
  /** Full field value with highlighting, present only for (array) string[] fields */
1626
- values?: SearchHighlightValuesList;
1626
+ values?: SearchHighlightValuesList | undefined;
1627
1627
  /** The indices property will be present only for string[] fields and will contain the corresponding indices of the snippets in the search field */
1628
- indices?: SearchHighlightIndicesList;
1629
- matched_tokens?: SearchHighlightMatchedTokensList;
1628
+ indices?: SearchHighlightIndicesList | undefined;
1629
+ matched_tokens?: SearchHighlightMatchedTokensList | undefined;
1630
1630
  }
1631
1631
  /** (Deprecated) Contains highlighted portions of the search fields */
1632
1632
  export type SearchResultHitHighlightsList = Array<SearchHighlight>;
@@ -1639,13 +1639,13 @@ export type SearchResultHitDocumentMap = {
1639
1639
  [key: string]: unknown | undefined;
1640
1640
  };
1641
1641
  export interface SearchResultHitTextMatchInfo {
1642
- best_field_score?: string;
1643
- best_field_weight?: number;
1644
- fields_matched?: number;
1645
- num_tokens_dropped?: number;
1646
- score?: string;
1647
- tokens_matched?: number;
1648
- typo_prefix_score?: number;
1642
+ best_field_score?: string | undefined;
1643
+ best_field_weight?: number | undefined;
1644
+ fields_matched?: number | undefined;
1645
+ num_tokens_dropped?: number | undefined;
1646
+ score?: string | undefined;
1647
+ tokens_matched?: number | undefined;
1648
+ typo_prefix_score?: number | undefined;
1649
1649
  }
1650
1650
  /** Can be any key-value pair */
1651
1651
  export type SearchResultHitGeoDistanceMetersMap = {
@@ -1654,30 +1654,30 @@ export type SearchResultHitGeoDistanceMetersMap = {
1654
1654
  /** Information about hybrid search scoring */
1655
1655
  export interface SearchResultHitHybridSearchInfo {
1656
1656
  /** Combined score from rank fusion of text and vector search */
1657
- rank_fusion_score?: number;
1657
+ rank_fusion_score?: number | undefined;
1658
1658
  }
1659
1659
  export interface SearchResultHit {
1660
1660
  /** (Deprecated) Contains highlighted portions of the search fields */
1661
- highlights?: SearchResultHitHighlightsList;
1661
+ highlights?: SearchResultHitHighlightsList | undefined;
1662
1662
  /** Highlighted version of the matching document */
1663
- highlight?: SearchResultHitHighlightMap;
1663
+ highlight?: SearchResultHitHighlightMap | undefined;
1664
1664
  /** Can be any key-value pair */
1665
- document?: SearchResultHitDocumentMap;
1666
- text_match?: number;
1667
- text_match_info?: SearchResultHitTextMatchInfo;
1665
+ document?: SearchResultHitDocumentMap | undefined;
1666
+ text_match?: number | undefined;
1667
+ text_match_info?: SearchResultHitTextMatchInfo | undefined;
1668
1668
  /** Can be any key-value pair */
1669
- geo_distance_meters?: SearchResultHitGeoDistanceMetersMap;
1669
+ geo_distance_meters?: SearchResultHitGeoDistanceMetersMap | undefined;
1670
1670
  /** Distance between the query vector and matching document's vector value */
1671
- vector_distance?: number;
1671
+ vector_distance?: number | undefined;
1672
1672
  /** Information about hybrid search scoring */
1673
- hybrid_search_info?: SearchResultHitHybridSearchInfo;
1673
+ hybrid_search_info?: SearchResultHitHybridSearchInfo | undefined;
1674
1674
  /** Returned only for union query response. Indicates the index of the query which this document matched to. */
1675
- search_index?: number;
1675
+ search_index?: number | undefined;
1676
1676
  }
1677
1677
  /** The documents that matched the search query */
1678
1678
  export type SearchGroupedHitHitsList = Array<SearchResultHit>;
1679
1679
  export interface SearchGroupedHit {
1680
- found?: number;
1680
+ found?: number | undefined;
1681
1681
  group_key: SearchGroupedHitGroupKeyList;
1682
1682
  /** The documents that matched the search query */
1683
1683
  hits: SearchGroupedHitHitsList;
@@ -1686,14 +1686,14 @@ export type SearchResultGroupedHitsList = Array<SearchGroupedHit>;
1686
1686
  /** The documents that matched the search query */
1687
1687
  export type SearchResultHitsList = Array<SearchResultHit>;
1688
1688
  export interface SearchRequestParamsVoiceQuery {
1689
- transcribed_query?: string;
1689
+ transcribed_query?: string | undefined;
1690
1690
  }
1691
1691
  export interface SearchRequestParams {
1692
1692
  collection_name: string;
1693
- first_q?: string;
1693
+ first_q?: string | undefined;
1694
1694
  q: string;
1695
1695
  per_page: number;
1696
- voice_query?: SearchRequestParamsVoiceQuery;
1696
+ voice_query?: SearchRequestParamsVoiceQuery | undefined;
1697
1697
  }
1698
1698
  export type SearchResultConversationConversationHistoryList = Array<unknown>;
1699
1699
  export interface SearchResultConversation {
@@ -1709,185 +1709,185 @@ export type SearchResultMetadataMap = {
1709
1709
  [key: string]: unknown | undefined;
1710
1710
  };
1711
1711
  export interface SearchResult {
1712
- facet_counts?: SearchResultFacetCountsList;
1712
+ facet_counts?: SearchResultFacetCountsList | undefined;
1713
1713
  /** The number of documents found */
1714
- found?: number;
1715
- found_docs?: number;
1714
+ found?: number | undefined;
1715
+ found_docs?: number | undefined;
1716
1716
  /** The number of milliseconds the search took */
1717
- search_time_ms?: number;
1717
+ search_time_ms?: number | undefined;
1718
1718
  /** The total number of documents in the collection */
1719
- out_of?: number;
1719
+ out_of?: number | undefined;
1720
1720
  /** Whether the search was cut off */
1721
- search_cutoff?: boolean;
1721
+ search_cutoff?: boolean | undefined;
1722
1722
  /** The search result page number */
1723
- page?: number;
1724
- grouped_hits?: SearchResultGroupedHitsList;
1723
+ page?: number | undefined;
1724
+ grouped_hits?: SearchResultGroupedHitsList | undefined;
1725
1725
  /** The documents that matched the search query */
1726
- hits?: SearchResultHitsList;
1727
- request_params?: SearchRequestParams;
1728
- conversation?: SearchResultConversation;
1726
+ hits?: SearchResultHitsList | undefined;
1727
+ request_params?: SearchRequestParams | undefined;
1728
+ conversation?: SearchResultConversation | undefined;
1729
1729
  /** Returned only for union query response. */
1730
- union_request_params?: SearchResultUnionRequestParamsList;
1730
+ union_request_params?: SearchResultUnionRequestParamsList | undefined;
1731
1731
  /** Custom JSON object that can be returned in the search response */
1732
- metadata?: SearchResultMetadataMap;
1732
+ metadata?: SearchResultMetadataMap | undefined;
1733
1733
  }
1734
1734
  /** Parameters for the multi search API. */
1735
1735
  export interface MultiSearchParameters {
1736
1736
  /** 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. */
1737
- q?: string;
1737
+ q?: string | undefined;
1738
1738
  /** A list of `string` fields that should be queried against. Multiple fields are separated with a comma. */
1739
- query_by?: string;
1739
+ query_by?: string | undefined;
1740
1740
  /** 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. */
1741
- query_by_weights?: string;
1741
+ query_by_weights?: string | undefined;
1742
1742
  /** 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. */
1743
- text_match_type?: string;
1743
+ text_match_type?: string | undefined;
1744
1744
  /** 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. */
1745
- prefix?: string;
1745
+ prefix?: string | undefined;
1746
1746
  /** 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 */
1747
- infix?: string;
1747
+ infix?: string | undefined;
1748
1748
  /** 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. */
1749
- max_extra_prefix?: number;
1749
+ max_extra_prefix?: number | undefined;
1750
1750
  /** 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. */
1751
- max_extra_suffix?: number;
1751
+ max_extra_suffix?: number | undefined;
1752
1752
  /** Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&. */
1753
- filter_by?: string;
1753
+ filter_by?: string | undefined;
1754
1754
  /** 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 */
1755
- enable_lazy_filter?: boolean;
1755
+ enable_lazy_filter?: boolean | undefined;
1756
1756
  /** 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*. */
1757
- max_filter_by_candidates?: number;
1757
+ max_filter_by_candidates?: number | undefined;
1758
1758
  /** 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` */
1759
- sort_by?: string;
1759
+ sort_by?: string | undefined;
1760
1760
  /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
1761
- facet_by?: string;
1761
+ facet_by?: string | undefined;
1762
1762
  /** Maximum number of facet values to be returned. */
1763
- max_facet_values?: number;
1763
+ max_facet_values?: number | undefined;
1764
1764
  /** 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". */
1765
- facet_query?: string;
1765
+ facet_query?: string | undefined;
1766
1766
  /** Controls the fuzziness of the facet query filter. Default: 2. */
1767
- facet_query_num_typos?: number;
1767
+ facet_query_num_typos?: number | undefined;
1768
1768
  /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
1769
- num_typos?: string;
1769
+ num_typos?: string | undefined;
1770
1770
  /** Results from this specific page number would be fetched. */
1771
- page?: number;
1771
+ page?: number | undefined;
1772
1772
  /** Number of results to fetch per page. Default: 10 */
1773
- per_page?: number;
1773
+ per_page?: number | undefined;
1774
1774
  /** Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10. */
1775
- limit?: number;
1775
+ limit?: number | undefined;
1776
1776
  /** Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter. */
1777
- offset?: number;
1777
+ offset?: number | undefined;
1778
1778
  /** 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. */
1779
- group_by?: string;
1779
+ group_by?: string | undefined;
1780
1780
  /** 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 */
1781
- group_limit?: number;
1781
+ group_limit?: number | undefined;
1782
1782
  /** 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 */
1783
- group_missing_values?: boolean;
1783
+ group_missing_values?: boolean | undefined;
1784
1784
  /** 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. */
1785
- group_max_candidates?: number;
1785
+ group_max_candidates?: number | undefined;
1786
1786
  /** List of fields from the document to include in the search result */
1787
- include_fields?: string;
1787
+ include_fields?: string | undefined;
1788
1788
  /** List of fields from the document to exclude in the search result */
1789
- exclude_fields?: string;
1789
+ exclude_fields?: string | undefined;
1790
1790
  /** List of fields which should be highlighted fully without snippeting */
1791
- highlight_full_fields?: string;
1791
+ highlight_full_fields?: string | undefined;
1792
1792
  /** The number of tokens that should surround the highlighted text on each side. Default: 4 */
1793
- highlight_affix_num_tokens?: number;
1793
+ highlight_affix_num_tokens?: number | undefined;
1794
1794
  /** The start tag used for the highlighted snippets. Default: `<mark>` */
1795
- highlight_start_tag?: string;
1795
+ highlight_start_tag?: string | undefined;
1796
1796
  /** The end tag used for the highlighted snippets. Default: `</mark>` */
1797
- highlight_end_tag?: string;
1797
+ highlight_end_tag?: string | undefined;
1798
1798
  /** Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 */
1799
- snippet_threshold?: number;
1799
+ snippet_threshold?: number | undefined;
1800
1800
  /** 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 */
1801
- drop_tokens_threshold?: number;
1802
- drop_tokens_mode?: DropTokensMode | (string & {});
1801
+ drop_tokens_threshold?: number | undefined;
1802
+ drop_tokens_mode?: DropTokensMode | (string & {}) | undefined;
1803
1803
  /** 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 */
1804
- typo_tokens_threshold?: number;
1804
+ typo_tokens_threshold?: number | undefined;
1805
1805
  /** Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. */
1806
- enable_typos_for_alpha_numerical_tokens?: boolean;
1806
+ enable_typos_for_alpha_numerical_tokens?: boolean | undefined;
1807
1807
  /** Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false */
1808
- filter_curated_hits?: boolean;
1808
+ filter_curated_hits?: boolean | undefined;
1809
1809
  /** 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 */
1810
- enable_synonyms?: boolean;
1810
+ enable_synonyms?: boolean | undefined;
1811
1811
  /** Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script). */
1812
- enable_analytics?: boolean;
1812
+ enable_analytics?: boolean | undefined;
1813
1813
  /** Allow synonym resolution on word prefixes in the query. Default: false */
1814
- synonym_prefix?: boolean;
1814
+ synonym_prefix?: boolean | undefined;
1815
1815
  /** 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 */
1816
- demote_synonym_match?: boolean;
1816
+ demote_synonym_match?: boolean | undefined;
1817
1817
  /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
1818
- synonym_num_typos?: number;
1818
+ synonym_num_typos?: number | undefined;
1819
1819
  /** 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`. */
1820
- pinned_hits?: string;
1820
+ pinned_hits?: string | undefined;
1821
1821
  /** 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`. */
1822
- hidden_hits?: string;
1822
+ hidden_hits?: string | undefined;
1823
1823
  /** Comma separated list of tags to trigger the curations rules that match the tags. */
1824
- curation_tags?: string;
1824
+ curation_tags?: string | undefined;
1825
1825
  /** A list of custom fields that must be highlighted even if you don't query for them */
1826
- highlight_fields?: string;
1826
+ highlight_fields?: string | undefined;
1827
1827
  /** 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. */
1828
- rerank_hybrid_matches?: boolean;
1828
+ rerank_hybrid_matches?: boolean | undefined;
1829
1829
  /** 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 */
1830
- pre_segmented_query?: boolean;
1830
+ pre_segmented_query?: boolean | undefined;
1831
1831
  /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
1832
- preset?: string;
1832
+ preset?: string | undefined;
1833
1833
  /** 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 */
1834
- enable_curations?: boolean;
1834
+ enable_curations?: boolean | undefined;
1835
1835
  /** Set this parameter to true to ensure that an exact match is ranked above the others */
1836
- prioritize_exact_match?: boolean;
1836
+ prioritize_exact_match?: boolean | undefined;
1837
1837
  /** Make Typesense prioritize documents where the query words appear earlier in the text. */
1838
- prioritize_token_position?: boolean;
1838
+ prioritize_token_position?: boolean | undefined;
1839
1839
  /** Make Typesense prioritize documents where the query words appear in more number of fields. */
1840
- prioritize_num_matching_fields?: boolean;
1840
+ prioritize_num_matching_fields?: boolean | undefined;
1841
1841
  /** Make Typesense disable typos for numerical tokens. */
1842
- enable_typos_for_numerical_tokens?: boolean;
1842
+ enable_typos_for_numerical_tokens?: boolean | undefined;
1843
1843
  /** 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). */
1844
- exhaustive_search?: boolean;
1844
+ exhaustive_search?: boolean | undefined;
1845
1845
  /** 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. */
1846
- search_cutoff_ms?: number;
1846
+ search_cutoff_ms?: number | undefined;
1847
1847
  /** 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. */
1848
- limit_hits?: number;
1848
+ limit_hits?: number | undefined;
1849
1849
  /** Enable server side caching of search query results. By default, caching is disabled. */
1850
- use_cache?: boolean;
1850
+ use_cache?: boolean | undefined;
1851
1851
  /** 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. */
1852
- cache_ttl?: number;
1852
+ cache_ttl?: number | undefined;
1853
1853
  /** Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
1854
- min_len_1typo?: number;
1854
+ min_len_1typo?: number | undefined;
1855
1855
  /** Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
1856
- min_len_2typo?: number;
1856
+ min_len_2typo?: number | undefined;
1857
1857
  /** Vector query expression for fetching documents "closest" to a given query/document vector. */
1858
- vector_query?: string;
1858
+ vector_query?: string | undefined;
1859
1859
  /** Timeout (in milliseconds) for fetching remote embeddings. */
1860
- remote_embedding_timeout_ms?: number;
1860
+ remote_embedding_timeout_ms?: number | undefined;
1861
1861
  /** Number of times to retry fetching remote embeddings. */
1862
- remote_embedding_num_tries?: number;
1862
+ remote_embedding_num_tries?: number | undefined;
1863
1863
  /** Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default). */
1864
- facet_strategy?: string;
1864
+ facet_strategy?: string | undefined;
1865
1865
  /** Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query. */
1866
- stopwords?: string;
1866
+ stopwords?: string | undefined;
1867
1867
  /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
1868
- facet_return_parent?: string;
1868
+ facet_return_parent?: string | undefined;
1869
1869
  /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
1870
- facet_sample_percent?: number;
1870
+ facet_sample_percent?: number | undefined;
1871
1871
  /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
1872
- facet_sample_threshold?: number;
1872
+ facet_sample_threshold?: number | undefined;
1873
1873
  /** 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. */
1874
- facet_sample_slope?: number;
1874
+ facet_sample_slope?: number | undefined;
1875
1875
  /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
1876
- voice_query?: string;
1876
+ voice_query?: string | undefined;
1877
1877
  /** Enable conversational search. */
1878
- conversation?: boolean;
1878
+ conversation?: boolean | undefined;
1879
1879
  /** The Id of Conversation Model to be used. */
1880
- conversation_model_id?: string;
1880
+ conversation_model_id?: string | undefined;
1881
1881
  /** The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM. */
1882
- conversation_id?: string;
1882
+ conversation_id?: string | undefined;
1883
1883
  /** 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. */
1884
- validate_field_names?: boolean;
1884
+ validate_field_names?: boolean | undefined;
1885
1885
  }
1886
1886
  export type SearchMultiRequestSearchesList = Array<MultiSearchCollectionParameters>;
1887
1887
  export interface SearchMultiRequest {
1888
1888
  multiSearchParameters: MultiSearchParameters;
1889
1889
  /** When true, merges the search results from each search query into a single ordered set of hits. */
1890
- union?: boolean;
1890
+ union?: boolean | undefined;
1891
1891
  searches: SearchMultiRequestSearchesList;
1892
1892
  }
1893
1893
  export type MultiSearchResultItemFacetCountsList = Array<FacetCounts>;
@@ -1901,36 +1901,36 @@ export type MultiSearchResultItemMetadataMap = {
1901
1901
  [key: string]: unknown | undefined;
1902
1902
  };
1903
1903
  export interface MultiSearchResultItem {
1904
- facet_counts?: MultiSearchResultItemFacetCountsList;
1904
+ facet_counts?: MultiSearchResultItemFacetCountsList | undefined;
1905
1905
  /** The number of documents found */
1906
- found?: number;
1907
- found_docs?: number;
1906
+ found?: number | undefined;
1907
+ found_docs?: number | undefined;
1908
1908
  /** The number of milliseconds the search took */
1909
- search_time_ms?: number;
1909
+ search_time_ms?: number | undefined;
1910
1910
  /** The total number of documents in the collection */
1911
- out_of?: number;
1911
+ out_of?: number | undefined;
1912
1912
  /** Whether the search was cut off */
1913
- search_cutoff?: boolean;
1913
+ search_cutoff?: boolean | undefined;
1914
1914
  /** The search result page number */
1915
- page?: number;
1916
- grouped_hits?: MultiSearchResultItemGroupedHitsList;
1915
+ page?: number | undefined;
1916
+ grouped_hits?: MultiSearchResultItemGroupedHitsList | undefined;
1917
1917
  /** The documents that matched the search query */
1918
- hits?: MultiSearchResultItemHitsList;
1919
- request_params?: SearchRequestParams;
1920
- conversation?: SearchResultConversation;
1918
+ hits?: MultiSearchResultItemHitsList | undefined;
1919
+ request_params?: SearchRequestParams | undefined;
1920
+ conversation?: SearchResultConversation | undefined;
1921
1921
  /** Returned only for union query response. */
1922
- union_request_params?: MultiSearchResultItemUnionRequestParamsList;
1922
+ union_request_params?: MultiSearchResultItemUnionRequestParamsList | undefined;
1923
1923
  /** Custom JSON object that can be returned in the search response */
1924
- metadata?: MultiSearchResultItemMetadataMap;
1924
+ metadata?: MultiSearchResultItemMetadataMap | undefined;
1925
1925
  /** HTTP error code */
1926
- code?: number;
1926
+ code?: number | undefined;
1927
1927
  /** Error description */
1928
- error?: string;
1928
+ error?: string | undefined;
1929
1929
  }
1930
1930
  export type MultiSearchResultResultsList = Array<MultiSearchResultItem>;
1931
1931
  export interface MultiSearchResult {
1932
1932
  results: MultiSearchResultResultsList;
1933
- conversation?: SearchResultConversation;
1933
+ conversation?: SearchResultConversation | undefined;
1934
1934
  }
1935
1935
  export interface TakeSnapshotRequest {
1936
1936
  /** The directory on the server where the snapshot should be saved. */
@@ -1947,11 +1947,11 @@ export interface UpdateCollectionRequest {
1947
1947
  /** The name of the collection to update */
1948
1948
  collectionName: string;
1949
1949
  /** A list of fields for querying, filtering and faceting */
1950
- fields?: UpdateCollectionRequestFieldsList;
1950
+ fields?: UpdateCollectionRequestFieldsList | undefined;
1951
1951
  /** List of synonym set names to associate with this collection */
1952
- synonym_sets?: UpdateCollectionRequestSynonymSetsList;
1952
+ synonym_sets?: UpdateCollectionRequestSynonymSetsList | undefined;
1953
1953
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
1954
- metadata?: unknown;
1954
+ metadata?: unknown | undefined;
1955
1955
  }
1956
1956
  /** A list of fields for querying, filtering and faceting */
1957
1957
  export type CollectionUpdateSchemaFieldsList = Array<Field>;
@@ -1959,33 +1959,33 @@ export type CollectionUpdateSchemaFieldsList = Array<Field>;
1959
1959
  export type CollectionUpdateSchemaSynonymSetsList = Array<string>;
1960
1960
  export interface CollectionUpdateSchema {
1961
1961
  /** A list of fields for querying, filtering and faceting */
1962
- fields?: CollectionUpdateSchemaFieldsList;
1962
+ fields?: CollectionUpdateSchemaFieldsList | undefined;
1963
1963
  /** List of synonym set names to associate with this collection */
1964
- synonym_sets?: CollectionUpdateSchemaSynonymSetsList;
1964
+ synonym_sets?: CollectionUpdateSchemaSynonymSetsList | undefined;
1965
1965
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
1966
- metadata?: unknown;
1966
+ metadata?: unknown | undefined;
1967
1967
  }
1968
1968
  export interface UpdateConversationModelRequest {
1969
1969
  /** The id of the conversation model to update */
1970
1970
  modelId: string;
1971
1971
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
1972
- id?: string;
1972
+ id?: string | undefined;
1973
1973
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
1974
- model_name?: string;
1974
+ model_name?: string | undefined;
1975
1975
  /** The LLM service's API Key */
1976
- api_key?: string | import("effect/Redacted").Redacted<string>;
1976
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
1977
1977
  /** Typesense collection that stores the historical conversations */
1978
- history_collection?: string;
1978
+ history_collection?: string | undefined;
1979
1979
  /** LLM service's account ID (only applicable for Cloudflare) */
1980
- account_id?: string;
1980
+ account_id?: string | undefined;
1981
1981
  /** The system prompt that contains special instructions to the LLM */
1982
- system_prompt?: string;
1982
+ system_prompt?: string | undefined;
1983
1983
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
1984
- ttl?: number;
1984
+ ttl?: number | undefined;
1985
1985
  /** 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. */
1986
- max_bytes?: number;
1986
+ max_bytes?: number | undefined;
1987
1987
  /** URL of vLLM service */
1988
- vllm_url?: string;
1988
+ vllm_url?: string | undefined;
1989
1989
  }
1990
1990
  export interface UpdateConversationModelResponse {
1991
1991
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
@@ -1993,19 +1993,19 @@ export interface UpdateConversationModelResponse {
1993
1993
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
1994
1994
  model_name: string;
1995
1995
  /** The LLM service's API Key */
1996
- api_key?: string | import("effect/Redacted").Redacted<string>;
1996
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
1997
1997
  /** Typesense collection that stores the historical conversations */
1998
1998
  history_collection: string;
1999
1999
  /** LLM service's account ID (only applicable for Cloudflare) */
2000
- account_id?: string;
2000
+ account_id?: string | undefined;
2001
2001
  /** The system prompt that contains special instructions to the LLM */
2002
- system_prompt?: string;
2002
+ system_prompt?: string | undefined;
2003
2003
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
2004
- ttl?: number;
2004
+ ttl?: number | undefined;
2005
2005
  /** 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. */
2006
2006
  max_bytes: number;
2007
2007
  /** URL of vLLM service */
2008
- vllm_url?: string;
2008
+ vllm_url?: string | undefined;
2009
2009
  }
2010
2010
  export interface UpdateDocumentRequest {
2011
2011
  /** The name of the collection to search for the document under */
@@ -2013,16 +2013,16 @@ export interface UpdateDocumentRequest {
2013
2013
  /** The Document ID */
2014
2014
  documentId: string;
2015
2015
  /** Dealing with Dirty Data */
2016
- dirty_values?: DirtyValues | (string & {});
2016
+ dirty_values?: DirtyValues | (string & {}) | undefined;
2017
2017
  }
2018
2018
  export type UpdateDocumentResponse = unknown;
2019
2019
  export interface UpdateDocumentsRequestUpdateDocumentsParameters {
2020
- filter_by?: string;
2020
+ filter_by?: string | undefined;
2021
2021
  }
2022
2022
  export interface UpdateDocumentsRequest {
2023
2023
  /** The name of the collection to update documents in */
2024
2024
  collectionName: string;
2025
- updateDocumentsParameters?: UpdateDocumentsRequestUpdateDocumentsParameters;
2025
+ updateDocumentsParameters?: UpdateDocumentsRequestUpdateDocumentsParameters | undefined;
2026
2026
  }
2027
2027
  export interface UpdateDocumentsResponse {
2028
2028
  /** The number of documents that have been updated */
@@ -2034,83 +2034,83 @@ export interface UpdateNLSearchModelRequest {
2034
2034
  /** The ID of the NL search model to update */
2035
2035
  modelId: string;
2036
2036
  /** Name of the NL model to use */
2037
- model_name?: string;
2037
+ model_name?: string | undefined;
2038
2038
  /** API key for the NL model service */
2039
- api_key?: string | import("effect/Redacted").Redacted<string>;
2039
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
2040
2040
  /** Custom API URL for the NL model service */
2041
- api_url?: string;
2041
+ api_url?: string | undefined;
2042
2042
  /** Maximum number of bytes to process */
2043
- max_bytes?: number;
2043
+ max_bytes?: number | undefined;
2044
2044
  /** Temperature parameter for the NL model */
2045
- temperature?: number;
2045
+ temperature?: number | undefined;
2046
2046
  /** System prompt for the NL model */
2047
- system_prompt?: string;
2047
+ system_prompt?: string | undefined;
2048
2048
  /** Top-p parameter for the NL model (Google-specific) */
2049
- top_p?: number;
2049
+ top_p?: number | undefined;
2050
2050
  /** Top-k parameter for the NL model (Google-specific) */
2051
- top_k?: number;
2051
+ top_k?: number | undefined;
2052
2052
  /** Stop sequences for the NL model (Google-specific) */
2053
- stop_sequences?: UpdateNLSearchModelRequestStopSequencesList;
2053
+ stop_sequences?: UpdateNLSearchModelRequestStopSequencesList | undefined;
2054
2054
  /** API version for the NL model service */
2055
- api_version?: string;
2055
+ api_version?: string | undefined;
2056
2056
  /** Project ID for GCP Vertex AI */
2057
- project_id?: string;
2057
+ project_id?: string | undefined;
2058
2058
  /** Access token for GCP Vertex AI */
2059
- access_token?: string | import("effect/Redacted").Redacted<string>;
2059
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2060
2060
  /** Refresh token for GCP Vertex AI */
2061
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
2061
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2062
2062
  /** Client ID for GCP Vertex AI */
2063
- client_id?: string;
2063
+ client_id?: string | undefined;
2064
2064
  /** Client secret for GCP Vertex AI */
2065
- client_secret?: string | import("effect/Redacted").Redacted<string>;
2065
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
2066
2066
  /** Region for GCP Vertex AI */
2067
- region?: string;
2067
+ region?: string | undefined;
2068
2068
  /** Maximum output tokens for GCP Vertex AI */
2069
- max_output_tokens?: number;
2069
+ max_output_tokens?: number | undefined;
2070
2070
  /** Account ID for Cloudflare-specific models */
2071
- account_id?: string;
2071
+ account_id?: string | undefined;
2072
2072
  /** Optional ID for the NL search model */
2073
- id?: string;
2073
+ id?: string | undefined;
2074
2074
  }
2075
2075
  /** Stop sequences for the NL model (Google-specific) */
2076
2076
  export type UpdateNLSearchModelResponseStopSequencesList = Array<string>;
2077
2077
  export interface UpdateNLSearchModelResponse {
2078
2078
  /** Name of the NL model to use */
2079
- model_name?: string;
2079
+ model_name?: string | undefined;
2080
2080
  /** API key for the NL model service */
2081
- api_key?: string | import("effect/Redacted").Redacted<string>;
2081
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
2082
2082
  /** Custom API URL for the NL model service */
2083
- api_url?: string;
2083
+ api_url?: string | undefined;
2084
2084
  /** Maximum number of bytes to process */
2085
- max_bytes?: number;
2085
+ max_bytes?: number | undefined;
2086
2086
  /** Temperature parameter for the NL model */
2087
- temperature?: number;
2087
+ temperature?: number | undefined;
2088
2088
  /** System prompt for the NL model */
2089
- system_prompt?: string;
2089
+ system_prompt?: string | undefined;
2090
2090
  /** Top-p parameter for the NL model (Google-specific) */
2091
- top_p?: number;
2091
+ top_p?: number | undefined;
2092
2092
  /** Top-k parameter for the NL model (Google-specific) */
2093
- top_k?: number;
2093
+ top_k?: number | undefined;
2094
2094
  /** Stop sequences for the NL model (Google-specific) */
2095
- stop_sequences?: UpdateNLSearchModelResponseStopSequencesList;
2095
+ stop_sequences?: UpdateNLSearchModelResponseStopSequencesList | undefined;
2096
2096
  /** API version for the NL model service */
2097
- api_version?: string;
2097
+ api_version?: string | undefined;
2098
2098
  /** Project ID for GCP Vertex AI */
2099
- project_id?: string;
2099
+ project_id?: string | undefined;
2100
2100
  /** Access token for GCP Vertex AI */
2101
- access_token?: string | import("effect/Redacted").Redacted<string>;
2101
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2102
2102
  /** Refresh token for GCP Vertex AI */
2103
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
2103
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2104
2104
  /** Client ID for GCP Vertex AI */
2105
- client_id?: string;
2105
+ client_id?: string | undefined;
2106
2106
  /** Client secret for GCP Vertex AI */
2107
- client_secret?: string | import("effect/Redacted").Redacted<string>;
2107
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
2108
2108
  /** Region for GCP Vertex AI */
2109
- region?: string;
2109
+ region?: string | undefined;
2110
2110
  /** Maximum output tokens for GCP Vertex AI */
2111
- max_output_tokens?: number;
2111
+ max_output_tokens?: number | undefined;
2112
2112
  /** Account ID for Cloudflare-specific models */
2113
- account_id?: string;
2113
+ account_id?: string | undefined;
2114
2114
  /** Optional ID for the NL search model */
2115
2115
  id: string;
2116
2116
  }
@@ -2122,38 +2122,38 @@ export interface UpsertAliasRequest {
2122
2122
  }
2123
2123
  export type UpsertAnalyticsRuleRequestParamsMetaFieldsList = Array<string>;
2124
2124
  export interface UpsertAnalyticsRuleRequestParams {
2125
- destination_collection?: string;
2126
- limit?: number;
2127
- capture_search_requests?: boolean;
2128
- meta_fields?: UpsertAnalyticsRuleRequestParamsMetaFieldsList;
2129
- expand_query?: boolean;
2130
- counter_field?: string;
2131
- weight?: number;
2125
+ destination_collection?: string | undefined;
2126
+ limit?: number | undefined;
2127
+ capture_search_requests?: boolean | undefined;
2128
+ meta_fields?: UpsertAnalyticsRuleRequestParamsMetaFieldsList | undefined;
2129
+ expand_query?: boolean | undefined;
2130
+ counter_field?: string | undefined;
2131
+ weight?: number | undefined;
2132
2132
  }
2133
2133
  export interface UpsertAnalyticsRuleRequest {
2134
2134
  /** The name of the analytics rule to upsert */
2135
2135
  ruleName: string;
2136
- name?: string;
2137
- rule_tag?: string;
2138
- params?: UpsertAnalyticsRuleRequestParams;
2136
+ name?: string | undefined;
2137
+ rule_tag?: string | undefined;
2138
+ params?: UpsertAnalyticsRuleRequestParams | undefined;
2139
2139
  }
2140
2140
  export type UpsertAnalyticsRuleResponseParamsMetaFieldsList = Array<string>;
2141
2141
  export interface UpsertAnalyticsRuleResponseParams {
2142
- destination_collection?: string;
2143
- limit?: number;
2144
- capture_search_requests?: boolean;
2145
- meta_fields?: UpsertAnalyticsRuleResponseParamsMetaFieldsList;
2146
- expand_query?: boolean;
2147
- counter_field?: string;
2148
- weight?: number;
2142
+ destination_collection?: string | undefined;
2143
+ limit?: number | undefined;
2144
+ capture_search_requests?: boolean | undefined;
2145
+ meta_fields?: UpsertAnalyticsRuleResponseParamsMetaFieldsList | undefined;
2146
+ expand_query?: boolean | undefined;
2147
+ counter_field?: string | undefined;
2148
+ weight?: number | undefined;
2149
2149
  }
2150
2150
  export interface UpsertAnalyticsRuleResponse {
2151
2151
  name: string;
2152
2152
  type: AnalyticsRuleType;
2153
2153
  collection: string;
2154
2154
  event_type: string;
2155
- rule_tag?: string;
2156
- params?: UpsertAnalyticsRuleResponseParams;
2155
+ rule_tag?: string | undefined;
2156
+ params?: UpsertAnalyticsRuleResponseParams | undefined;
2157
2157
  }
2158
2158
  /** Array of curation items */
2159
2159
  export type UpsertCurationSetRequestItemsList = Array<CurationItemCreateSchema>;
@@ -2163,7 +2163,7 @@ export interface UpsertCurationSetRequest {
2163
2163
  /** Array of curation items */
2164
2164
  items: UpsertCurationSetRequestItemsList;
2165
2165
  /** Optional description for the curation set */
2166
- description?: string;
2166
+ description?: string | undefined;
2167
2167
  }
2168
2168
  /** Array of curation items */
2169
2169
  export type UpsertCurationSetResponseItemsList = Array<CurationItemCreateSchema>;
@@ -2171,7 +2171,7 @@ export interface UpsertCurationSetResponse {
2171
2171
  /** Array of curation items */
2172
2172
  items: UpsertCurationSetResponseItemsList;
2173
2173
  /** Optional description for the curation set */
2174
- description?: string;
2174
+ description?: string | undefined;
2175
2175
  name: string;
2176
2176
  }
2177
2177
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
@@ -2185,29 +2185,29 @@ export interface UpsertCurationSetItemRequest {
2185
2185
  itemId: string;
2186
2186
  rule: CurationRule;
2187
2187
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
2188
- includes?: UpsertCurationSetItemRequestIncludesList;
2188
+ includes?: UpsertCurationSetItemRequestIncludesList | undefined;
2189
2189
  /** List of document `id`s that should be excluded from the search results. */
2190
- excludes?: UpsertCurationSetItemRequestExcludesList;
2190
+ excludes?: UpsertCurationSetItemRequestExcludesList | undefined;
2191
2191
  /** A filter by clause that is applied to any search query that matches the curation rule. */
2192
- filter_by?: string;
2192
+ filter_by?: string | undefined;
2193
2193
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
2194
- remove_matched_tokens?: boolean;
2194
+ remove_matched_tokens?: boolean | undefined;
2195
2195
  /** 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. */
2196
- metadata?: unknown;
2196
+ metadata?: unknown | undefined;
2197
2197
  /** A sort by clause that is applied to any search query that matches the curation rule. */
2198
- sort_by?: string;
2198
+ sort_by?: string | undefined;
2199
2199
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
2200
- replace_query?: string;
2200
+ replace_query?: string | undefined;
2201
2201
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
2202
- filter_curated_hits?: boolean;
2202
+ filter_curated_hits?: boolean | undefined;
2203
2203
  /** 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. */
2204
- effective_from_ts?: number;
2204
+ effective_from_ts?: number | undefined;
2205
2205
  /** 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. */
2206
- effective_to_ts?: number;
2206
+ effective_to_ts?: number | undefined;
2207
2207
  /** 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. */
2208
- stop_processing?: boolean;
2208
+ stop_processing?: boolean | undefined;
2209
2209
  /** ID of the curation item */
2210
- id?: string;
2210
+ id?: string | undefined;
2211
2211
  }
2212
2212
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
2213
2213
  export type UpsertCurationSetItemResponseIncludesList = Array<CurationInclude>;
@@ -2216,27 +2216,27 @@ export type UpsertCurationSetItemResponseExcludesList = Array<CurationExclude>;
2216
2216
  export interface UpsertCurationSetItemResponse {
2217
2217
  rule: CurationRule;
2218
2218
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
2219
- includes?: UpsertCurationSetItemResponseIncludesList;
2219
+ includes?: UpsertCurationSetItemResponseIncludesList | undefined;
2220
2220
  /** List of document `id`s that should be excluded from the search results. */
2221
- excludes?: UpsertCurationSetItemResponseExcludesList;
2221
+ excludes?: UpsertCurationSetItemResponseExcludesList | undefined;
2222
2222
  /** A filter by clause that is applied to any search query that matches the curation rule. */
2223
- filter_by?: string;
2223
+ filter_by?: string | undefined;
2224
2224
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
2225
- remove_matched_tokens?: boolean;
2225
+ remove_matched_tokens?: boolean | undefined;
2226
2226
  /** 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. */
2227
- metadata?: unknown;
2227
+ metadata?: unknown | undefined;
2228
2228
  /** A sort by clause that is applied to any search query that matches the curation rule. */
2229
- sort_by?: string;
2229
+ sort_by?: string | undefined;
2230
2230
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
2231
- replace_query?: string;
2231
+ replace_query?: string | undefined;
2232
2232
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
2233
- filter_curated_hits?: boolean;
2233
+ filter_curated_hits?: boolean | undefined;
2234
2234
  /** 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. */
2235
- effective_from_ts?: number;
2235
+ effective_from_ts?: number | undefined;
2236
2236
  /** 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. */
2237
- effective_to_ts?: number;
2237
+ effective_to_ts?: number | undefined;
2238
2238
  /** 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. */
2239
- stop_processing?: boolean;
2239
+ stop_processing?: boolean | undefined;
2240
2240
  /** ID of the curation item */
2241
2241
  id: string;
2242
2242
  }
@@ -2256,7 +2256,7 @@ export interface UpsertStopwordsSetRequest {
2256
2256
  /** The ID of the stopwords set to upsert. */
2257
2257
  setId: string;
2258
2258
  stopwords: UpsertStopwordsSetRequestStopwordsList;
2259
- locale?: string;
2259
+ locale?: string | undefined;
2260
2260
  }
2261
2261
  /** Array of synonym items */
2262
2262
  export type UpsertSynonymSetRequestItemsList = Array<SynonymItemSchema>;
@@ -2286,11 +2286,11 @@ export interface UpsertSynonymSetItemRequest {
2286
2286
  /** Array of words that should be considered as synonyms */
2287
2287
  synonyms: UpsertSynonymSetItemRequestSynonymsList;
2288
2288
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
2289
- root?: string;
2289
+ root?: string | undefined;
2290
2290
  /** Locale for the synonym, leave blank to use the standard tokenizer */
2291
- locale?: string;
2291
+ locale?: string | undefined;
2292
2292
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
2293
- symbols_to_index?: UpsertSynonymSetItemRequestSymbolsToIndexList;
2293
+ symbols_to_index?: UpsertSynonymSetItemRequestSymbolsToIndexList | undefined;
2294
2294
  }
2295
2295
  /** Array of words that should be considered as synonyms */
2296
2296
  export type UpsertSynonymSetItemResponseSynonymsList = Array<string>;
@@ -2302,11 +2302,11 @@ export interface UpsertSynonymSetItemResponse {
2302
2302
  /** Array of words that should be considered as synonyms */
2303
2303
  synonyms: UpsertSynonymSetItemResponseSynonymsList;
2304
2304
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
2305
- root?: string;
2305
+ root?: string | undefined;
2306
2306
  /** Locale for the synonym, leave blank to use the standard tokenizer */
2307
- locale?: string;
2307
+ locale?: string | undefined;
2308
2308
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
2309
- symbols_to_index?: UpsertSynonymSetItemResponseSymbolsToIndexList;
2309
+ symbols_to_index?: UpsertSynonymSetItemResponseSymbolsToIndexList | undefined;
2310
2310
  }
2311
2311
  export interface VoteRequest {
2312
2312
  }