@distilled.cloud/typesense 1.0.0-rc.2 → 1.0.0-rc.20

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.
Files changed (46) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +34 -0
  3. package/lib/.lazy.json +1 -0
  4. package/lib/_bundle/lazy.js +4 -0
  5. package/lib/_bundle/sdk.js +2 -0
  6. package/lib/_bundle/sdk.js.map +1 -0
  7. package/lib/credentials.d.ts +14 -5
  8. package/lib/credentials.d.ts.map +1 -1
  9. package/lib/credentials.js +1 -42
  10. package/lib/errors.d.ts +13 -16
  11. package/lib/errors.d.ts.map +1 -1
  12. package/lib/errors.js +1 -24
  13. package/lib/index.d.ts +5 -5
  14. package/lib/index.d.ts.map +1 -1
  15. package/lib/index.js +1 -9
  16. package/lib/index.lazy.js +6 -0
  17. package/lib/{index.js.map → index.lazy.js.map} +1 -1
  18. package/lib/protocol.d.ts +6 -5
  19. package/lib/protocol.d.ts.map +1 -1
  20. package/lib/protocol.js +1 -31
  21. package/lib/retry.d.ts +2 -2
  22. package/lib/retry.d.ts.map +1 -1
  23. package/lib/retry.js +1 -33
  24. package/lib/services/index.js +0 -2
  25. package/lib/services/typesense.d.ts +1312 -1579
  26. package/lib/services/typesense.d.ts.map +1 -1
  27. package/lib/services/typesense.js +111 -2916
  28. package/lib/services/typesense.js.map +1 -1
  29. package/lib/services.lazy/index.js +3 -0
  30. package/lib/services.lazy/typesense.js +4 -0
  31. package/lib/traits.d.ts +1 -1
  32. package/lib/traits.js +1 -11
  33. package/package.json +40 -17
  34. package/src/credentials.ts +19 -21
  35. package/src/errors.ts +11 -16
  36. package/src/index.ts +5 -9
  37. package/src/protocol.ts +23 -24
  38. package/src/retry.ts +6 -10
  39. package/src/services/typesense.ts +4238 -5037
  40. package/src/traits.ts +1 -1
  41. package/lib/credentials.js.map +0 -1
  42. package/lib/errors.js.map +0 -1
  43. package/lib/protocol.js.map +0 -1
  44. package/lib/retry.js.map +0 -1
  45. package/lib/services/index.js.map +0 -1
  46. package/lib/traits.js.map +0 -1
@@ -1,46 +1,53 @@
1
- import * as S from "@distilled.cloud/core/schema";
2
1
  import * as API from "@distilled.cloud/core/api";
2
+ import * as S from "@distilled.cloud/core/schema-lite";
3
3
  import { type TypesenseOpError, type TypesenseOpContext } from "../protocol.ts";
4
4
  export type { TypesenseOpError, TypesenseOpContext };
5
- declare const BadRequest_base: S.Class<BadRequest, S.TaggedStruct<"BadRequest", {
5
+ declare const BadRequest_base: S.TaggedErrorClass<"BadRequest", {
6
6
  readonly code: any;
7
7
  readonly message: any;
8
- }>, import("effect/Cause").YieldableError>;
8
+ }> & (new (...args: any[]) => {
9
+ "@distilled.cloud/error/categories": {
10
+ BadRequestError: true;
11
+ };
12
+ });
9
13
  export declare class BadRequest extends /*@__PURE__*/ BadRequest_base {
10
14
  }
11
- declare const Conflict_base: S.Class<Conflict, S.TaggedStruct<"Conflict", {
15
+ declare const Conflict_base: S.TaggedErrorClass<"Conflict", {
12
16
  readonly code: any;
13
17
  readonly message: any;
14
- }>, import("effect/Cause").YieldableError>;
18
+ }> & (new (...args: any[]) => {
19
+ "@distilled.cloud/error/categories": {
20
+ ConflictError: true;
21
+ };
22
+ });
15
23
  export declare class Conflict extends /*@__PURE__*/ Conflict_base {
16
24
  }
17
- declare const NotFound_base: S.Class<NotFound, S.TaggedStruct<"NotFound", {
25
+ declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
18
26
  readonly code: any;
19
27
  readonly message: any;
20
- }>, import("effect/Cause").YieldableError>;
28
+ }> & (new (...args: any[]) => {
29
+ "@distilled.cloud/error/categories": {
30
+ BadRequestError: true;
31
+ };
32
+ });
21
33
  export declare class NotFound extends /*@__PURE__*/ NotFound_base {
22
34
  }
23
35
  export interface ClearCacheRequest {
24
36
  }
25
- export declare const ClearCacheRequest: S.Schema<ClearCacheRequest>;
26
37
  export interface SuccessStatus {
27
38
  success: boolean;
28
39
  }
29
- export declare const SuccessStatus: S.Schema<SuccessStatus>;
30
40
  export interface CompactDbRequest {
31
41
  }
32
- export declare const CompactDbRequest: S.Schema<CompactDbRequest>;
33
42
  export type CreateAnalyticsEventRequestDataDocIdsList = Array<string>;
34
- export declare const CreateAnalyticsEventRequestDataDocIdsList: S.Schema<CreateAnalyticsEventRequestDataDocIdsList>;
35
43
  /** Event payload */
36
44
  export interface CreateAnalyticsEventRequestData {
37
- user_id?: string;
38
- doc_id?: string;
39
- doc_ids?: CreateAnalyticsEventRequestDataDocIdsList;
40
- q?: string;
41
- 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;
42
50
  }
43
- export declare const CreateAnalyticsEventRequestData: S.Schema<CreateAnalyticsEventRequestData>;
44
51
  export interface CreateAnalyticsEventRequest {
45
52
  /** Name of the analytics rule this event corresponds to */
46
53
  name: string;
@@ -49,2381 +56,2128 @@ export interface CreateAnalyticsEventRequest {
49
56
  /** Event payload */
50
57
  data: CreateAnalyticsEventRequestData;
51
58
  }
52
- export declare const CreateAnalyticsEventRequest: S.Schema<CreateAnalyticsEventRequest>;
53
59
  export interface AnalyticsEventCreateResponse {
54
60
  ok: boolean;
55
61
  }
56
- export declare const AnalyticsEventCreateResponse: S.Schema<AnalyticsEventCreateResponse>;
57
62
  export type AnalyticsRuleType = "popular_queries" | "nohits_queries" | "counter" | "log";
58
- export declare const AnalyticsRuleType: any;
59
63
  export type AnalyticsRuleCreateParamsMetaFieldsList = Array<string>;
60
- export declare const AnalyticsRuleCreateParamsMetaFieldsList: S.Schema<AnalyticsRuleCreateParamsMetaFieldsList>;
61
64
  export interface AnalyticsRuleCreateParams {
62
- destination_collection?: string;
63
- limit?: number;
64
- capture_search_requests?: boolean;
65
- meta_fields?: AnalyticsRuleCreateParamsMetaFieldsList;
66
- expand_query?: boolean;
67
- counter_field?: string;
68
- weight?: number;
69
- }
70
- export declare const AnalyticsRuleCreateParams: S.Schema<AnalyticsRuleCreateParams>;
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
+ }
71
73
  export interface AnalyticsRuleCreate {
72
74
  name: string;
73
75
  type: AnalyticsRuleType | (string & {});
74
76
  collection: string;
75
77
  event_type: string;
76
- rule_tag?: string;
77
- params?: AnalyticsRuleCreateParams;
78
+ rule_tag?: string | undefined;
79
+ params?: AnalyticsRuleCreateParams | undefined;
78
80
  }
79
- export declare const AnalyticsRuleCreate: S.Schema<AnalyticsRuleCreate>;
80
81
  export type CreateAnalyticsRuleRequestBodyCase1List = Array<AnalyticsRuleCreate>;
81
- export declare const CreateAnalyticsRuleRequestBodyCase1List: S.Schema<CreateAnalyticsRuleRequestBodyCase1List>;
82
82
  export type CreateAnalyticsRuleRequestBody = AnalyticsRuleCreate | CreateAnalyticsRuleRequestBodyCase1List;
83
- export declare const CreateAnalyticsRuleRequestBody: any;
84
83
  export interface CreateAnalyticsRuleRequest {
85
84
  body: CreateAnalyticsRuleRequestBody;
86
85
  }
87
- export declare const CreateAnalyticsRuleRequest: S.Schema<CreateAnalyticsRuleRequest>;
88
86
  export type AnalyticsRuleParamsMetaFieldsList = Array<string>;
89
- export declare const AnalyticsRuleParamsMetaFieldsList: S.Schema<AnalyticsRuleParamsMetaFieldsList>;
90
87
  export interface AnalyticsRuleParams {
91
- destination_collection?: string;
92
- limit?: number;
93
- capture_search_requests?: boolean;
94
- meta_fields?: AnalyticsRuleParamsMetaFieldsList;
95
- expand_query?: boolean;
96
- counter_field?: string;
97
- weight?: number;
98
- }
99
- export declare const AnalyticsRuleParams: S.Schema<AnalyticsRuleParams>;
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
+ }
100
96
  export interface AnalyticsRule {
101
97
  name: string;
102
98
  type: AnalyticsRuleType;
103
99
  collection: string;
104
100
  event_type: string;
105
- rule_tag?: string;
106
- params?: AnalyticsRuleParams;
101
+ rule_tag?: string | undefined;
102
+ params?: AnalyticsRuleParams | undefined;
107
103
  }
108
- export declare const AnalyticsRule: S.Schema<AnalyticsRule>;
109
104
  export interface CreateAnalyticsRuleResponseBodyCase1ItemCase1 {
110
- error?: string;
105
+ error?: string | undefined;
111
106
  }
112
- export declare const CreateAnalyticsRuleResponseBodyCase1ItemCase1: S.Schema<CreateAnalyticsRuleResponseBodyCase1ItemCase1>;
113
107
  export type CreateAnalyticsRuleResponseBodyCase1Item = AnalyticsRule | CreateAnalyticsRuleResponseBodyCase1ItemCase1;
114
- export declare const CreateAnalyticsRuleResponseBodyCase1Item: any;
115
108
  export type CreateAnalyticsRuleResponseBodyCase1List = Array<CreateAnalyticsRuleResponseBodyCase1Item>;
116
- export declare const CreateAnalyticsRuleResponseBodyCase1List: S.Schema<CreateAnalyticsRuleResponseBodyCase1List>;
117
109
  export type CreateAnalyticsRuleResponseBody = AnalyticsRule | CreateAnalyticsRuleResponseBodyCase1List;
118
- export declare const CreateAnalyticsRuleResponseBody: any;
119
110
  export type CreateAnalyticsRuleResponse = CreateAnalyticsRuleResponseBody;
120
- export declare const CreateAnalyticsRuleResponse: S.Schema<CreateAnalyticsRuleResponse>;
121
111
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
122
112
  export type FieldTokenSeparatorsList = Array<string>;
123
- export declare const FieldTokenSeparatorsList: S.Schema<FieldTokenSeparatorsList>;
124
113
  /** List of symbols or special characters to be indexed. */
125
114
  export type FieldSymbolsToIndexList = Array<string>;
126
- export declare const FieldSymbolsToIndexList: S.Schema<FieldSymbolsToIndexList>;
127
115
  export type FieldEmbedFromList = Array<string>;
128
- export declare const FieldEmbedFromList: S.Schema<FieldEmbedFromList>;
129
116
  export interface FieldEmbedModelConfig {
130
117
  model_name: string;
131
- api_key?: string | import("effect/Redacted").Redacted<string>;
132
- url?: string;
133
- access_token?: string | import("effect/Redacted").Redacted<string>;
134
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
135
- client_id?: string;
136
- client_secret?: string | import("effect/Redacted").Redacted<string>;
137
- project_id?: string;
138
- indexing_prefix?: string;
139
- query_prefix?: string;
140
- }
141
- export declare const FieldEmbedModelConfig: S.Schema<FieldEmbedModelConfig>;
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
+ }
142
128
  export interface FieldEmbed {
143
129
  from: FieldEmbedFromList;
144
130
  model_config: FieldEmbedModelConfig;
145
131
  }
146
- export declare const FieldEmbed: S.Schema<FieldEmbed>;
147
132
  export interface Field {
148
133
  name: string;
149
134
  type: string;
150
- optional?: boolean;
151
- facet?: boolean;
152
- index?: boolean;
153
- locale?: string;
154
- sort?: boolean;
155
- 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;
156
141
  /** Name of a field in another collection that should be linked to this collection so that it can be joined during query. */
157
- reference?: string;
142
+ reference?: string | undefined;
158
143
  /** Allow documents to be indexed successfully even when the referenced document doesn't exist yet. */
159
- async_reference?: boolean;
160
- num_dim?: number;
161
- drop?: boolean;
144
+ async_reference?: boolean | undefined;
145
+ num_dim?: number | undefined;
146
+ drop?: boolean | undefined;
162
147
  /** When set to false, the field value will not be stored on disk. Default: true. */
163
- store?: boolean;
148
+ store?: boolean | undefined;
164
149
  /** The distance metric to be used for vector search. Default: `cosine`. You can also use `ip` for inner product. */
165
- vec_dist?: string;
150
+ vec_dist?: string | undefined;
166
151
  /** Enables an index optimized for range filtering on numerical fields (e.g. rating:>3.5). Default: false. */
167
- range_index?: boolean;
152
+ range_index?: boolean | undefined;
168
153
  /** Values are stemmed before indexing in-memory. Default: false. */
169
- stem?: boolean;
154
+ stem?: boolean | undefined;
170
155
  /** Name of the stemming dictionary to use for this field */
171
- stem_dictionary?: string;
156
+ stem_dictionary?: string | undefined;
172
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. */
173
- token_separators?: FieldTokenSeparatorsList;
158
+ token_separators?: FieldTokenSeparatorsList | undefined;
174
159
  /** List of symbols or special characters to be indexed. */
175
- symbols_to_index?: FieldSymbolsToIndexList;
176
- embed?: FieldEmbed;
160
+ symbols_to_index?: FieldSymbolsToIndexList | undefined;
161
+ embed?: FieldEmbed | undefined;
177
162
  }
178
- export declare const Field: S.Schema<Field>;
179
163
  /** A list of fields for querying, filtering and faceting */
180
164
  export type CreateCollectionRequestFieldsList = Array<Field>;
181
- export declare const CreateCollectionRequestFieldsList: S.Schema<CreateCollectionRequestFieldsList>;
182
165
  /** 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
166
  export type CreateCollectionRequestTokenSeparatorsList = Array<string>;
184
- export declare const CreateCollectionRequestTokenSeparatorsList: S.Schema<CreateCollectionRequestTokenSeparatorsList>;
185
167
  /** List of synonym set names to associate with this collection */
186
168
  export type CreateCollectionRequestSynonymSetsList = Array<string>;
187
- export declare const CreateCollectionRequestSynonymSetsList: S.Schema<CreateCollectionRequestSynonymSetsList>;
188
169
  /** List of symbols or special characters to be indexed. */
189
170
  export type CreateCollectionRequestSymbolsToIndexList = Array<string>;
190
- export declare const CreateCollectionRequestSymbolsToIndexList: S.Schema<CreateCollectionRequestSymbolsToIndexList>;
191
171
  /** Configuration for the voice query model */
192
172
  export interface VoiceQueryModelCollectionConfig {
193
- model_name?: string;
173
+ model_name?: string | undefined;
194
174
  }
195
- export declare const VoiceQueryModelCollectionConfig: S.Schema<VoiceQueryModelCollectionConfig>;
196
175
  export interface CreateCollectionRequest {
197
176
  /** Name of the collection */
198
177
  name: string;
199
178
  /** A list of fields for querying, filtering and faceting */
200
179
  fields: CreateCollectionRequestFieldsList;
201
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. */
202
- default_sorting_field?: string;
181
+ default_sorting_field?: string | undefined;
203
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. */
204
- token_separators?: CreateCollectionRequestTokenSeparatorsList;
183
+ token_separators?: CreateCollectionRequestTokenSeparatorsList | undefined;
205
184
  /** List of synonym set names to associate with this collection */
206
- synonym_sets?: CreateCollectionRequestSynonymSetsList;
185
+ synonym_sets?: CreateCollectionRequestSynonymSetsList | undefined;
207
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. */
208
- enable_nested_fields?: boolean;
187
+ enable_nested_fields?: boolean | undefined;
209
188
  /** List of symbols or special characters to be indexed. */
210
- symbols_to_index?: CreateCollectionRequestSymbolsToIndexList;
211
- voice_query_model?: VoiceQueryModelCollectionConfig;
189
+ symbols_to_index?: CreateCollectionRequestSymbolsToIndexList | undefined;
190
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
212
191
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
213
- metadata?: unknown;
192
+ metadata?: unknown | undefined;
214
193
  }
215
- export declare const CreateCollectionRequest: S.Schema<CreateCollectionRequest>;
216
194
  /** A list of fields for querying, filtering and faceting */
217
195
  export type CreateCollectionResponseFieldsList = Array<Field>;
218
- export declare const CreateCollectionResponseFieldsList: S.Schema<CreateCollectionResponseFieldsList>;
219
196
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
220
197
  export type CreateCollectionResponseTokenSeparatorsList = Array<string>;
221
- export declare const CreateCollectionResponseTokenSeparatorsList: S.Schema<CreateCollectionResponseTokenSeparatorsList>;
222
198
  /** List of synonym set names to associate with this collection */
223
199
  export type CreateCollectionResponseSynonymSetsList = Array<string>;
224
- export declare const CreateCollectionResponseSynonymSetsList: S.Schema<CreateCollectionResponseSynonymSetsList>;
225
200
  /** List of symbols or special characters to be indexed. */
226
201
  export type CreateCollectionResponseSymbolsToIndexList = Array<string>;
227
- export declare const CreateCollectionResponseSymbolsToIndexList: S.Schema<CreateCollectionResponseSymbolsToIndexList>;
228
202
  export interface CreateCollectionResponse {
229
203
  /** Name of the collection */
230
204
  name: string;
231
205
  /** A list of fields for querying, filtering and faceting */
232
206
  fields: CreateCollectionResponseFieldsList;
233
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. */
234
- default_sorting_field?: string;
208
+ default_sorting_field?: string | undefined;
235
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. */
236
- token_separators?: CreateCollectionResponseTokenSeparatorsList;
210
+ token_separators?: CreateCollectionResponseTokenSeparatorsList | undefined;
237
211
  /** List of synonym set names to associate with this collection */
238
- synonym_sets?: CreateCollectionResponseSynonymSetsList;
212
+ synonym_sets?: CreateCollectionResponseSynonymSetsList | undefined;
239
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. */
240
- enable_nested_fields?: boolean;
214
+ enable_nested_fields?: boolean | undefined;
241
215
  /** List of symbols or special characters to be indexed. */
242
- symbols_to_index?: CreateCollectionResponseSymbolsToIndexList;
243
- voice_query_model?: VoiceQueryModelCollectionConfig;
216
+ symbols_to_index?: CreateCollectionResponseSymbolsToIndexList | undefined;
217
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
244
218
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
245
- metadata?: unknown;
219
+ metadata?: unknown | undefined;
246
220
  /** Number of documents in the collection */
247
221
  num_documents: number;
248
222
  /** Timestamp of when the collection was created (Unix epoch in seconds) */
249
223
  created_at: number;
250
224
  }
251
- export declare const CreateCollectionResponse: S.Schema<CreateCollectionResponse>;
252
225
  export interface CreateConversationModelRequest {
253
226
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
254
- id?: string;
227
+ id?: string | undefined;
255
228
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
256
229
  model_name: string;
257
230
  /** The LLM service's API Key */
258
- api_key?: string | import("effect/Redacted").Redacted<string>;
231
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
259
232
  /** Typesense collection that stores the historical conversations */
260
233
  history_collection: string;
261
234
  /** LLM service's account ID (only applicable for Cloudflare) */
262
- account_id?: string;
235
+ account_id?: string | undefined;
263
236
  /** The system prompt that contains special instructions to the LLM */
264
- system_prompt?: string;
237
+ system_prompt?: string | undefined;
265
238
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
266
- ttl?: number;
239
+ ttl?: number | undefined;
267
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. */
268
241
  max_bytes: number;
269
242
  /** URL of vLLM service */
270
- vllm_url?: string;
243
+ vllm_url?: string | undefined;
271
244
  }
272
- export declare const CreateConversationModelRequest: S.Schema<CreateConversationModelRequest>;
273
245
  export interface CreateConversationModelResponse {
274
246
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
275
247
  id: string;
276
248
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
277
249
  model_name: string;
278
250
  /** The LLM service's API Key */
279
- api_key?: string | import("effect/Redacted").Redacted<string>;
251
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
280
252
  /** Typesense collection that stores the historical conversations */
281
253
  history_collection: string;
282
254
  /** LLM service's account ID (only applicable for Cloudflare) */
283
- account_id?: string;
255
+ account_id?: string | undefined;
284
256
  /** The system prompt that contains special instructions to the LLM */
285
- system_prompt?: string;
257
+ system_prompt?: string | undefined;
286
258
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
287
- ttl?: number;
259
+ ttl?: number | undefined;
288
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. */
289
261
  max_bytes: number;
290
262
  /** URL of vLLM service */
291
- vllm_url?: string;
263
+ vllm_url?: string | undefined;
292
264
  }
293
- export declare const CreateConversationModelResponse: S.Schema<CreateConversationModelResponse>;
294
265
  export type CreateKeyRequestActionsList = Array<string>;
295
- export declare const CreateKeyRequestActionsList: S.Schema<CreateKeyRequestActionsList>;
296
266
  export type CreateKeyRequestCollectionsList = Array<string>;
297
- export declare const CreateKeyRequestCollectionsList: S.Schema<CreateKeyRequestCollectionsList>;
298
267
  export interface CreateKeyRequest {
299
- value?: string;
268
+ value?: string | undefined;
300
269
  description: string;
301
270
  actions: CreateKeyRequestActionsList;
302
271
  collections: CreateKeyRequestCollectionsList;
303
- expires_at?: number;
272
+ expires_at?: number | undefined;
304
273
  }
305
- export declare const CreateKeyRequest: S.Schema<CreateKeyRequest>;
306
274
  export type CreateKeyResponseActionsList = Array<string>;
307
- export declare const CreateKeyResponseActionsList: S.Schema<CreateKeyResponseActionsList>;
308
275
  export type CreateKeyResponseCollectionsList = Array<string>;
309
- export declare const CreateKeyResponseCollectionsList: S.Schema<CreateKeyResponseCollectionsList>;
310
276
  export interface CreateKeyResponse {
311
- value?: string;
277
+ value?: string | undefined;
312
278
  description: string;
313
279
  actions: CreateKeyResponseActionsList;
314
280
  collections: CreateKeyResponseCollectionsList;
315
- expires_at?: number;
316
- id?: number;
317
- value_prefix?: string;
281
+ expires_at?: number | undefined;
282
+ id?: number | undefined;
283
+ value_prefix?: string | undefined;
318
284
  }
319
- export declare const CreateKeyResponse: S.Schema<CreateKeyResponse>;
320
285
  /** Stop sequences for the NL model (Google-specific) */
321
286
  export type CreateNLSearchModelRequestStopSequencesList = Array<string>;
322
- export declare const CreateNLSearchModelRequestStopSequencesList: S.Schema<CreateNLSearchModelRequestStopSequencesList>;
323
287
  export interface CreateNLSearchModelRequest {
324
288
  /** Name of the NL model to use */
325
- model_name?: string;
289
+ model_name?: string | undefined;
326
290
  /** API key for the NL model service */
327
- api_key?: string | import("effect/Redacted").Redacted<string>;
291
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
328
292
  /** Custom API URL for the NL model service */
329
- api_url?: string;
293
+ api_url?: string | undefined;
330
294
  /** Maximum number of bytes to process */
331
- max_bytes?: number;
295
+ max_bytes?: number | undefined;
332
296
  /** Temperature parameter for the NL model */
333
- temperature?: number;
297
+ temperature?: number | undefined;
334
298
  /** System prompt for the NL model */
335
- system_prompt?: string;
299
+ system_prompt?: string | undefined;
336
300
  /** Top-p parameter for the NL model (Google-specific) */
337
- top_p?: number;
301
+ top_p?: number | undefined;
338
302
  /** Top-k parameter for the NL model (Google-specific) */
339
- top_k?: number;
303
+ top_k?: number | undefined;
340
304
  /** Stop sequences for the NL model (Google-specific) */
341
- stop_sequences?: CreateNLSearchModelRequestStopSequencesList;
305
+ stop_sequences?: CreateNLSearchModelRequestStopSequencesList | undefined;
342
306
  /** API version for the NL model service */
343
- api_version?: string;
307
+ api_version?: string | undefined;
344
308
  /** Project ID for GCP Vertex AI */
345
- project_id?: string;
309
+ project_id?: string | undefined;
346
310
  /** Access token for GCP Vertex AI */
347
- access_token?: string | import("effect/Redacted").Redacted<string>;
311
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
348
312
  /** Refresh token for GCP Vertex AI */
349
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
313
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
350
314
  /** Client ID for GCP Vertex AI */
351
- client_id?: string;
315
+ client_id?: string | undefined;
352
316
  /** Client secret for GCP Vertex AI */
353
- client_secret?: string | import("effect/Redacted").Redacted<string>;
317
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
354
318
  /** Region for GCP Vertex AI */
355
- region?: string;
319
+ region?: string | undefined;
356
320
  /** Maximum output tokens for GCP Vertex AI */
357
- max_output_tokens?: number;
321
+ max_output_tokens?: number | undefined;
358
322
  /** Account ID for Cloudflare-specific models */
359
- account_id?: string;
323
+ account_id?: string | undefined;
360
324
  /** Optional ID for the NL search model */
361
- id?: string;
325
+ id?: string | undefined;
362
326
  }
363
- export declare const CreateNLSearchModelRequest: S.Schema<CreateNLSearchModelRequest>;
364
327
  /** Stop sequences for the NL model (Google-specific) */
365
328
  export type CreateNLSearchModelResponseStopSequencesList = Array<string>;
366
- export declare const CreateNLSearchModelResponseStopSequencesList: S.Schema<CreateNLSearchModelResponseStopSequencesList>;
367
329
  export interface CreateNLSearchModelResponse {
368
330
  /** Name of the NL model to use */
369
- model_name?: string;
331
+ model_name?: string | undefined;
370
332
  /** API key for the NL model service */
371
- api_key?: string | import("effect/Redacted").Redacted<string>;
333
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
372
334
  /** Custom API URL for the NL model service */
373
- api_url?: string;
335
+ api_url?: string | undefined;
374
336
  /** Maximum number of bytes to process */
375
- max_bytes?: number;
337
+ max_bytes?: number | undefined;
376
338
  /** Temperature parameter for the NL model */
377
- temperature?: number;
339
+ temperature?: number | undefined;
378
340
  /** System prompt for the NL model */
379
- system_prompt?: string;
341
+ system_prompt?: string | undefined;
380
342
  /** Top-p parameter for the NL model (Google-specific) */
381
- top_p?: number;
343
+ top_p?: number | undefined;
382
344
  /** Top-k parameter for the NL model (Google-specific) */
383
- top_k?: number;
345
+ top_k?: number | undefined;
384
346
  /** Stop sequences for the NL model (Google-specific) */
385
- stop_sequences?: CreateNLSearchModelResponseStopSequencesList;
347
+ stop_sequences?: CreateNLSearchModelResponseStopSequencesList | undefined;
386
348
  /** API version for the NL model service */
387
- api_version?: string;
349
+ api_version?: string | undefined;
388
350
  /** Project ID for GCP Vertex AI */
389
- project_id?: string;
351
+ project_id?: string | undefined;
390
352
  /** Access token for GCP Vertex AI */
391
- access_token?: string | import("effect/Redacted").Redacted<string>;
353
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
392
354
  /** Refresh token for GCP Vertex AI */
393
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
355
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
394
356
  /** Client ID for GCP Vertex AI */
395
- client_id?: string;
357
+ client_id?: string | undefined;
396
358
  /** Client secret for GCP Vertex AI */
397
- client_secret?: string | import("effect/Redacted").Redacted<string>;
359
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
398
360
  /** Region for GCP Vertex AI */
399
- region?: string;
361
+ region?: string | undefined;
400
362
  /** Maximum output tokens for GCP Vertex AI */
401
- max_output_tokens?: number;
363
+ max_output_tokens?: number | undefined;
402
364
  /** Account ID for Cloudflare-specific models */
403
- account_id?: string;
365
+ account_id?: string | undefined;
404
366
  /** Optional ID for the NL search model */
405
367
  id: string;
406
368
  }
407
- export declare const CreateNLSearchModelResponse: S.Schema<CreateNLSearchModelResponse>;
408
369
  export interface DebugRequest {
409
370
  }
410
- export declare const DebugRequest: S.Schema<DebugRequest>;
411
371
  export interface DebugResponse {
412
- version?: string;
372
+ version?: string | undefined;
413
373
  }
414
- export declare const DebugResponse: S.Schema<DebugResponse>;
415
374
  export interface DeleteAliasRequest {
416
375
  /** The name of the alias to delete */
417
376
  aliasName: string;
418
377
  }
419
- export declare const DeleteAliasRequest: S.Schema<DeleteAliasRequest>;
420
378
  export interface CollectionAlias {
421
379
  /** Name of the collection alias */
422
380
  name: string;
423
381
  /** Name of the collection the alias mapped to */
424
382
  collection_name: string;
425
383
  }
426
- export declare const CollectionAlias: S.Schema<CollectionAlias>;
427
384
  export interface DeleteAnalyticsRuleRequest {
428
385
  /** The name of the analytics rule to delete */
429
386
  ruleName: string;
430
387
  }
431
- export declare const DeleteAnalyticsRuleRequest: S.Schema<DeleteAnalyticsRuleRequest>;
432
388
  export type DeleteAnalyticsRuleResponseParamsMetaFieldsList = Array<string>;
433
- export declare const DeleteAnalyticsRuleResponseParamsMetaFieldsList: S.Schema<DeleteAnalyticsRuleResponseParamsMetaFieldsList>;
434
389
  export interface DeleteAnalyticsRuleResponseParams {
435
- destination_collection?: string;
436
- limit?: number;
437
- capture_search_requests?: boolean;
438
- meta_fields?: DeleteAnalyticsRuleResponseParamsMetaFieldsList;
439
- expand_query?: boolean;
440
- counter_field?: string;
441
- weight?: number;
442
- }
443
- export declare const DeleteAnalyticsRuleResponseParams: S.Schema<DeleteAnalyticsRuleResponseParams>;
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
+ }
444
398
  export interface DeleteAnalyticsRuleResponse {
445
399
  name: string;
446
400
  type: AnalyticsRuleType;
447
401
  collection: string;
448
402
  event_type: string;
449
- rule_tag?: string;
450
- params?: DeleteAnalyticsRuleResponseParams;
403
+ rule_tag?: string | undefined;
404
+ params?: DeleteAnalyticsRuleResponseParams | undefined;
451
405
  }
452
- export declare const DeleteAnalyticsRuleResponse: S.Schema<DeleteAnalyticsRuleResponse>;
453
406
  export interface DeleteCollectionRequest {
454
407
  /** The name of the collection to delete */
455
408
  collectionName: string;
456
409
  }
457
- export declare const DeleteCollectionRequest: S.Schema<DeleteCollectionRequest>;
458
410
  /** A list of fields for querying, filtering and faceting */
459
411
  export type DeleteCollectionResponseFieldsList = Array<Field>;
460
- export declare const DeleteCollectionResponseFieldsList: S.Schema<DeleteCollectionResponseFieldsList>;
461
412
  /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
462
413
  export type DeleteCollectionResponseTokenSeparatorsList = Array<string>;
463
- export declare const DeleteCollectionResponseTokenSeparatorsList: S.Schema<DeleteCollectionResponseTokenSeparatorsList>;
464
414
  /** List of synonym set names to associate with this collection */
465
415
  export type DeleteCollectionResponseSynonymSetsList = Array<string>;
466
- export declare const DeleteCollectionResponseSynonymSetsList: S.Schema<DeleteCollectionResponseSynonymSetsList>;
467
416
  /** List of symbols or special characters to be indexed. */
468
417
  export type DeleteCollectionResponseSymbolsToIndexList = Array<string>;
469
- export declare const DeleteCollectionResponseSymbolsToIndexList: S.Schema<DeleteCollectionResponseSymbolsToIndexList>;
470
418
  export interface DeleteCollectionResponse {
471
419
  /** Name of the collection */
472
420
  name: string;
473
421
  /** A list of fields for querying, filtering and faceting */
474
422
  fields: DeleteCollectionResponseFieldsList;
475
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. */
476
- default_sorting_field?: string;
424
+ default_sorting_field?: string | undefined;
477
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. */
478
- token_separators?: DeleteCollectionResponseTokenSeparatorsList;
426
+ token_separators?: DeleteCollectionResponseTokenSeparatorsList | undefined;
479
427
  /** List of synonym set names to associate with this collection */
480
- synonym_sets?: DeleteCollectionResponseSynonymSetsList;
428
+ synonym_sets?: DeleteCollectionResponseSynonymSetsList | undefined;
481
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. */
482
- enable_nested_fields?: boolean;
430
+ enable_nested_fields?: boolean | undefined;
483
431
  /** List of symbols or special characters to be indexed. */
484
- symbols_to_index?: DeleteCollectionResponseSymbolsToIndexList;
485
- voice_query_model?: VoiceQueryModelCollectionConfig;
432
+ symbols_to_index?: DeleteCollectionResponseSymbolsToIndexList | undefined;
433
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
486
434
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
487
- metadata?: unknown;
435
+ metadata?: unknown | undefined;
488
436
  /** Number of documents in the collection */
489
437
  num_documents: number;
490
438
  /** Timestamp of when the collection was created (Unix epoch in seconds) */
491
439
  created_at: number;
492
440
  }
493
- export declare const DeleteCollectionResponse: S.Schema<DeleteCollectionResponse>;
494
441
  export interface DeleteConversationModelRequest {
495
442
  /** The id of the conversation model to delete */
496
443
  modelId: string;
497
444
  }
498
- export declare const DeleteConversationModelRequest: S.Schema<DeleteConversationModelRequest>;
499
445
  export interface DeleteConversationModelResponse {
500
446
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
501
447
  id: string;
502
448
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
503
449
  model_name: string;
504
450
  /** The LLM service's API Key */
505
- api_key?: string | import("effect/Redacted").Redacted<string>;
451
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
506
452
  /** Typesense collection that stores the historical conversations */
507
453
  history_collection: string;
508
454
  /** LLM service's account ID (only applicable for Cloudflare) */
509
- account_id?: string;
455
+ account_id?: string | undefined;
510
456
  /** The system prompt that contains special instructions to the LLM */
511
- system_prompt?: string;
457
+ system_prompt?: string | undefined;
512
458
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
513
- ttl?: number;
459
+ ttl?: number | undefined;
514
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. */
515
461
  max_bytes: number;
516
462
  /** URL of vLLM service */
517
- vllm_url?: string;
463
+ vllm_url?: string | undefined;
518
464
  }
519
- export declare const DeleteConversationModelResponse: S.Schema<DeleteConversationModelResponse>;
520
465
  export interface DeleteCurationSetRequest {
521
466
  /** The name of the curation set to delete */
522
467
  curationSetName: string;
523
468
  }
524
- export declare const DeleteCurationSetRequest: S.Schema<DeleteCurationSetRequest>;
525
469
  export interface CurationSetDeleteSchema {
526
470
  /** Name of the deleted curation set */
527
471
  name: string;
528
472
  }
529
- export declare const CurationSetDeleteSchema: S.Schema<CurationSetDeleteSchema>;
530
473
  export interface DeleteCurationSetItemRequest {
531
474
  /** The name of the curation set */
532
475
  curationSetName: string;
533
476
  /** The id of the curation item to delete */
534
477
  itemId: string;
535
478
  }
536
- export declare const DeleteCurationSetItemRequest: S.Schema<DeleteCurationSetItemRequest>;
537
479
  export interface CurationItemDeleteSchema {
538
480
  /** ID of the deleted curation item */
539
481
  id: string;
540
482
  }
541
- export declare const CurationItemDeleteSchema: S.Schema<CurationItemDeleteSchema>;
542
483
  export interface DeleteDocumentRequest {
543
484
  /** The name of the collection to search for the document under */
544
485
  collectionName: string;
545
486
  /** The Document ID */
546
487
  documentId: string;
547
488
  }
548
- export declare const DeleteDocumentRequest: S.Schema<DeleteDocumentRequest>;
549
489
  export type DeleteDocumentResponse = unknown;
550
- export declare const DeleteDocumentResponse: S.Schema<DeleteDocumentResponse>;
551
490
  export interface DeleteDocumentsRequestDeleteDocumentsParameters {
552
491
  filter_by: string;
553
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. */
554
- batch_size?: number;
555
- ignore_not_found?: boolean;
493
+ batch_size?: number | undefined;
494
+ ignore_not_found?: boolean | undefined;
556
495
  /** When true, removes all documents from the collection while preserving the collection and its schema. */
557
- truncate?: boolean;
496
+ truncate?: boolean | undefined;
558
497
  }
559
- export declare const DeleteDocumentsRequestDeleteDocumentsParameters: S.Schema<DeleteDocumentsRequestDeleteDocumentsParameters>;
560
498
  export interface DeleteDocumentsRequest {
561
499
  /** The name of the collection to delete documents from */
562
500
  collectionName: string;
563
- deleteDocumentsParameters?: DeleteDocumentsRequestDeleteDocumentsParameters;
501
+ deleteDocumentsParameters?: DeleteDocumentsRequestDeleteDocumentsParameters | undefined;
564
502
  }
565
- export declare const DeleteDocumentsRequest: S.Schema<DeleteDocumentsRequest>;
566
503
  export interface DeleteDocumentsResponse {
567
504
  num_deleted: number;
568
505
  }
569
- export declare const DeleteDocumentsResponse: S.Schema<DeleteDocumentsResponse>;
570
506
  export interface DeleteKeyRequest {
571
507
  /** The ID of the key to delete */
572
508
  keyId: number;
573
509
  }
574
- export declare const DeleteKeyRequest: S.Schema<DeleteKeyRequest>;
575
510
  export interface ApiKeyDeleteResponse {
576
511
  /** The id of the API key that was deleted */
577
512
  id: number;
578
513
  }
579
- export declare const ApiKeyDeleteResponse: S.Schema<ApiKeyDeleteResponse>;
580
514
  export interface DeleteNLSearchModelRequest {
581
515
  /** The ID of the NL search model to delete */
582
516
  modelId: string;
583
517
  }
584
- export declare const DeleteNLSearchModelRequest: S.Schema<DeleteNLSearchModelRequest>;
585
518
  export interface NLSearchModelDeleteSchema {
586
519
  /** ID of the deleted NL search model */
587
520
  id: string;
588
521
  }
589
- export declare const NLSearchModelDeleteSchema: S.Schema<NLSearchModelDeleteSchema>;
590
522
  export interface DeletePresetRequest {
591
523
  /** The ID of the preset to delete. */
592
524
  presetId: string;
593
525
  }
594
- export declare const DeletePresetRequest: S.Schema<DeletePresetRequest>;
595
526
  export interface PresetDeleteSchema {
596
527
  name: string;
597
528
  }
598
- export declare const PresetDeleteSchema: S.Schema<PresetDeleteSchema>;
599
529
  export interface DeleteStopwordsSetRequest {
600
530
  /** The ID of the stopwords set to delete. */
601
531
  setId: string;
602
532
  }
603
- export declare const DeleteStopwordsSetRequest: S.Schema<DeleteStopwordsSetRequest>;
604
533
  export interface DeleteStopwordsSetResponse {
605
534
  id: string;
606
535
  }
607
- export declare const DeleteStopwordsSetResponse: S.Schema<DeleteStopwordsSetResponse>;
608
536
  export interface DeleteSynonymSetRequest {
609
537
  /** The name of the synonym set to delete */
610
538
  synonymSetName: string;
611
539
  }
612
- export declare const DeleteSynonymSetRequest: S.Schema<DeleteSynonymSetRequest>;
613
540
  export interface SynonymSetDeleteSchema {
614
541
  /** Name of the deleted synonym set */
615
542
  name: string;
616
543
  }
617
- export declare const SynonymSetDeleteSchema: S.Schema<SynonymSetDeleteSchema>;
618
544
  export interface DeleteSynonymSetItemRequest {
619
545
  /** The name of the synonym set */
620
546
  synonymSetName: string;
621
547
  /** The id of the synonym item to delete */
622
548
  itemId: string;
623
549
  }
624
- export declare const DeleteSynonymSetItemRequest: S.Schema<DeleteSynonymSetItemRequest>;
625
550
  export interface SynonymItemDeleteSchema {
626
551
  /** ID of the deleted synonym item */
627
552
  id: string;
628
553
  }
629
- export declare const SynonymItemDeleteSchema: S.Schema<SynonymItemDeleteSchema>;
630
554
  export interface ExportDocumentsRequestExportDocumentsParameters {
631
555
  /** Filter conditions for refining your search results. Separate multiple conditions with &&. */
632
- filter_by?: string;
556
+ filter_by?: string | undefined;
633
557
  /** List of fields from the document to include in the search result */
634
- include_fields?: string;
558
+ include_fields?: string | undefined;
635
559
  /** List of fields from the document to exclude in the search result */
636
- exclude_fields?: string;
560
+ exclude_fields?: string | undefined;
637
561
  }
638
- export declare const ExportDocumentsRequestExportDocumentsParameters: S.Schema<ExportDocumentsRequestExportDocumentsParameters>;
639
562
  export interface ExportDocumentsRequest {
640
563
  /** The name of the collection */
641
564
  collectionName: string;
642
- exportDocumentsParameters?: ExportDocumentsRequestExportDocumentsParameters;
565
+ exportDocumentsParameters?: ExportDocumentsRequestExportDocumentsParameters | undefined;
643
566
  }
644
- export declare const ExportDocumentsRequest: S.Schema<ExportDocumentsRequest>;
645
567
  export interface ExportDocumentsResponse {
646
568
  }
647
- export declare const ExportDocumentsResponse: S.Schema<ExportDocumentsResponse>;
648
569
  export interface FlushAnalyticsRequest {
649
570
  }
650
- export declare const FlushAnalyticsRequest: S.Schema<FlushAnalyticsRequest>;
651
571
  export interface GetAliasRequest {
652
572
  /** The name of the alias to retrieve */
653
573
  aliasName: string;
654
574
  }
655
- export declare const GetAliasRequest: S.Schema<GetAliasRequest>;
656
575
  export interface GetAliasesRequest {
657
576
  }
658
- export declare const GetAliasesRequest: S.Schema<GetAliasesRequest>;
659
577
  export type CollectionAliasesResponseAliasesList = Array<CollectionAlias>;
660
- export declare const CollectionAliasesResponseAliasesList: S.Schema<CollectionAliasesResponseAliasesList>;
661
578
  export interface CollectionAliasesResponse {
662
579
  aliases: CollectionAliasesResponseAliasesList;
663
580
  }
664
- export declare const CollectionAliasesResponse: S.Schema<CollectionAliasesResponse>;
665
- export interface GetAnalyticsEventsRequest {
666
- user_id: string;
667
- /** Analytics rule name */
668
- name: string;
669
- /** Number of events to return (max 1000) */
670
- n: number;
671
- }
672
- export declare const GetAnalyticsEventsRequest: S.Schema<GetAnalyticsEventsRequest>;
673
- export type AnalyticsEventsResponseEventsItemDocIdsList = Array<string>;
674
- export declare const AnalyticsEventsResponseEventsItemDocIdsList: S.Schema<AnalyticsEventsResponseEventsItemDocIdsList>;
675
- export interface AnalyticsEventsResponseEventsItem {
676
- name?: string;
677
- event_type?: string;
678
- collection?: string;
679
- timestamp?: number;
680
- user_id?: string;
681
- doc_id?: string;
682
- doc_ids?: AnalyticsEventsResponseEventsItemDocIdsList;
683
- query?: string;
684
- }
685
- export declare const AnalyticsEventsResponseEventsItem: S.Schema<AnalyticsEventsResponseEventsItem>;
686
- export type AnalyticsEventsResponseEventsList = Array<AnalyticsEventsResponseEventsItem>;
687
- export declare const AnalyticsEventsResponseEventsList: S.Schema<AnalyticsEventsResponseEventsList>;
688
- export interface AnalyticsEventsResponse {
689
- events: AnalyticsEventsResponseEventsList;
690
- }
691
- export declare const AnalyticsEventsResponse: S.Schema<AnalyticsEventsResponse>;
692
- export interface GetAnalyticsStatusRequest {
693
- }
694
- export declare const GetAnalyticsStatusRequest: S.Schema<GetAnalyticsStatusRequest>;
695
- export interface AnalyticsStatus {
696
- popular_prefix_queries?: number;
697
- nohits_prefix_queries?: number;
698
- log_prefix_queries?: number;
699
- query_log_events?: number;
700
- query_counter_events?: number;
701
- doc_log_events?: number;
702
- doc_counter_events?: number;
703
- }
704
- export declare const AnalyticsStatus: S.Schema<AnalyticsStatus>;
705
- export interface GetCollectionRequest {
706
- /** The name of the collection to retrieve */
707
- collectionName: string;
708
- }
709
- export declare const GetCollectionRequest: S.Schema<GetCollectionRequest>;
710
- /** A list of fields for querying, filtering and faceting */
711
- export type GetCollectionResponseFieldsList = Array<Field>;
712
- export declare const GetCollectionResponseFieldsList: S.Schema<GetCollectionResponseFieldsList>;
713
- /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
714
- export type GetCollectionResponseTokenSeparatorsList = Array<string>;
715
- export declare const GetCollectionResponseTokenSeparatorsList: S.Schema<GetCollectionResponseTokenSeparatorsList>;
716
- /** List of synonym set names to associate with this collection */
717
- export type GetCollectionResponseSynonymSetsList = Array<string>;
718
- export declare const GetCollectionResponseSynonymSetsList: S.Schema<GetCollectionResponseSynonymSetsList>;
719
- /** List of symbols or special characters to be indexed. */
720
- export type GetCollectionResponseSymbolsToIndexList = Array<string>;
721
- export declare const GetCollectionResponseSymbolsToIndexList: S.Schema<GetCollectionResponseSymbolsToIndexList>;
722
- export interface GetCollectionResponse {
723
- /** Name of the collection */
724
- name: string;
725
- /** A list of fields for querying, filtering and faceting */
726
- fields: GetCollectionResponseFieldsList;
727
- /** 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. */
728
- default_sorting_field?: string;
729
- /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
730
- token_separators?: GetCollectionResponseTokenSeparatorsList;
731
- /** List of synonym set names to associate with this collection */
732
- synonym_sets?: GetCollectionResponseSynonymSetsList;
733
- /** 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. */
734
- enable_nested_fields?: boolean;
735
- /** List of symbols or special characters to be indexed. */
736
- symbols_to_index?: GetCollectionResponseSymbolsToIndexList;
737
- voice_query_model?: VoiceQueryModelCollectionConfig;
738
- /** Optional details about the collection, e.g., when it was created, who created it etc. */
739
- metadata?: unknown;
740
- /** Number of documents in the collection */
741
- num_documents: number;
742
- /** Timestamp of when the collection was created (Unix epoch in seconds) */
743
- created_at: number;
744
- }
745
- export declare const GetCollectionResponse: S.Schema<GetCollectionResponse>;
746
- export interface GetCollectionsRequestGetCollectionsParameters {
747
- /** Comma-separated list of fields from the collection to exclude from the response */
748
- exclude_fields?: string;
749
- /** Number of collections to fetch. Default: returns all collections. */
750
- limit?: number;
751
- /** Identifies the starting point to return collections when paginating. */
752
- offset?: number;
753
- }
754
- export declare const GetCollectionsRequestGetCollectionsParameters: S.Schema<GetCollectionsRequestGetCollectionsParameters>;
755
- export interface GetCollectionsRequest {
756
- getCollectionsParameters?: GetCollectionsRequestGetCollectionsParameters;
757
- }
758
- export declare const GetCollectionsRequest: S.Schema<GetCollectionsRequest>;
759
- /** A list of fields for querying, filtering and faceting */
760
- export type CollectionResponseFieldsList = Array<Field>;
761
- export declare const CollectionResponseFieldsList: S.Schema<CollectionResponseFieldsList>;
762
- /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
763
- export type CollectionResponseTokenSeparatorsList = Array<string>;
764
- export declare const CollectionResponseTokenSeparatorsList: S.Schema<CollectionResponseTokenSeparatorsList>;
765
- /** List of synonym set names to associate with this collection */
766
- export type CollectionResponseSynonymSetsList = Array<string>;
767
- export declare const CollectionResponseSynonymSetsList: S.Schema<CollectionResponseSynonymSetsList>;
768
- /** List of symbols or special characters to be indexed. */
769
- export type CollectionResponseSymbolsToIndexList = Array<string>;
770
- export declare const CollectionResponseSymbolsToIndexList: S.Schema<CollectionResponseSymbolsToIndexList>;
771
- export interface CollectionResponse {
772
- /** Name of the collection */
773
- name: string;
774
- /** A list of fields for querying, filtering and faceting */
775
- fields: CollectionResponseFieldsList;
776
- /** 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. */
777
- default_sorting_field?: string;
778
- /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
779
- token_separators?: CollectionResponseTokenSeparatorsList;
780
- /** List of synonym set names to associate with this collection */
781
- synonym_sets?: CollectionResponseSynonymSetsList;
782
- /** 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. */
783
- enable_nested_fields?: boolean;
784
- /** List of symbols or special characters to be indexed. */
785
- symbols_to_index?: CollectionResponseSymbolsToIndexList;
786
- voice_query_model?: VoiceQueryModelCollectionConfig;
787
- /** Optional details about the collection, e.g., when it was created, who created it etc. */
788
- metadata?: unknown;
789
- /** Number of documents in the collection */
790
- num_documents: number;
791
- /** Timestamp of when the collection was created (Unix epoch in seconds) */
792
- created_at: number;
793
- }
794
- export declare const CollectionResponse: S.Schema<CollectionResponse>;
795
- export type GetCollectionsResponseBodyList = Array<CollectionResponse>;
796
- export declare const GetCollectionsResponseBodyList: S.Schema<GetCollectionsResponseBodyList>;
797
- export type GetCollectionsResponse = GetCollectionsResponseBodyList;
798
- export declare const GetCollectionsResponse: S.Schema<GetCollectionsResponse>;
799
- export interface GetDocumentRequest {
800
- /** The name of the collection to search for the document under */
801
- collectionName: string;
802
- /** The Document ID */
803
- documentId: string;
804
- }
805
- export declare const GetDocumentRequest: S.Schema<GetDocumentRequest>;
806
- export type GetDocumentResponse = unknown;
807
- export declare const GetDocumentResponse: S.Schema<GetDocumentResponse>;
808
- export interface GetKeyRequest {
809
- /** The ID of the key to retrieve */
810
- keyId: number;
811
- }
812
- export declare const GetKeyRequest: S.Schema<GetKeyRequest>;
813
- export type GetKeyResponseActionsList = Array<string>;
814
- export declare const GetKeyResponseActionsList: S.Schema<GetKeyResponseActionsList>;
815
- export type GetKeyResponseCollectionsList = Array<string>;
816
- export declare const GetKeyResponseCollectionsList: S.Schema<GetKeyResponseCollectionsList>;
817
- export interface GetKeyResponse {
818
- value?: string;
819
- description: string;
820
- actions: GetKeyResponseActionsList;
821
- collections: GetKeyResponseCollectionsList;
822
- expires_at?: number;
823
- id?: number;
824
- value_prefix?: string;
825
- }
826
- export declare const GetKeyResponse: S.Schema<GetKeyResponse>;
827
- export interface GetKeysRequest {
828
- }
829
- export declare const GetKeysRequest: S.Schema<GetKeysRequest>;
830
- export type ApiKeyActionsList = Array<string>;
831
- export declare const ApiKeyActionsList: S.Schema<ApiKeyActionsList>;
832
- export type ApiKeyCollectionsList = Array<string>;
833
- export declare const ApiKeyCollectionsList: S.Schema<ApiKeyCollectionsList>;
834
- export interface ApiKey {
835
- value?: string;
836
- description: string;
837
- actions: ApiKeyActionsList;
838
- collections: ApiKeyCollectionsList;
839
- expires_at?: number;
840
- id?: number;
841
- value_prefix?: string;
842
- }
843
- export declare const ApiKey: S.Schema<ApiKey>;
844
- export type ApiKeysResponseKeysList = Array<ApiKey>;
845
- export declare const ApiKeysResponseKeysList: S.Schema<ApiKeysResponseKeysList>;
846
- export interface ApiKeysResponse {
847
- keys: ApiKeysResponseKeysList;
848
- }
849
- export declare const ApiKeysResponse: S.Schema<ApiKeysResponse>;
850
- export interface GetSchemaChangesRequest {
851
- }
852
- export declare const GetSchemaChangesRequest: S.Schema<GetSchemaChangesRequest>;
853
- export interface SchemaChangeStatus {
854
- /** Name of the collection being modified */
855
- collection?: string;
856
- /** Number of documents that have been validated */
857
- validated_docs?: number;
858
- /** Number of documents that have been altered */
859
- altered_docs?: number;
860
- }
861
- export declare const SchemaChangeStatus: S.Schema<SchemaChangeStatus>;
862
- export type GetSchemaChangesResponseBodyList = Array<SchemaChangeStatus>;
863
- export declare const GetSchemaChangesResponseBodyList: S.Schema<GetSchemaChangesResponseBodyList>;
864
- export type GetSchemaChangesResponse = GetSchemaChangesResponseBodyList;
865
- export declare const GetSchemaChangesResponse: S.Schema<GetSchemaChangesResponse>;
866
- export interface GetStemmingDictionaryRequest {
867
- /** The ID of the dictionary to retrieve */
868
- dictionaryId: string;
869
- }
870
- export declare const GetStemmingDictionaryRequest: S.Schema<GetStemmingDictionaryRequest>;
871
- export interface StemmingDictionaryWordsItem {
872
- /** The word form to be stemmed */
873
- word: string;
874
- /** The root form of the word */
875
- root: string;
581
+ export interface GetAllConversationModelsRequest {
876
582
  }
877
- export declare const StemmingDictionaryWordsItem: S.Schema<StemmingDictionaryWordsItem>;
878
- /** List of word mappings in the dictionary */
879
- export type StemmingDictionaryWordsList = Array<StemmingDictionaryWordsItem>;
880
- export declare const StemmingDictionaryWordsList: S.Schema<StemmingDictionaryWordsList>;
881
- export interface StemmingDictionary {
882
- /** Unique identifier for the dictionary */
583
+ export interface ConversationModelSchema {
584
+ /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
883
585
  id: string;
884
- /** List of word mappings in the dictionary */
885
- words: StemmingDictionaryWordsList;
886
- }
887
- export declare const StemmingDictionary: S.Schema<StemmingDictionary>;
888
- export interface HealthRequest {
889
- }
890
- export declare const HealthRequest: S.Schema<HealthRequest>;
891
- export interface HealthStatus {
892
- ok: boolean;
893
- }
894
- export declare const HealthStatus: S.Schema<HealthStatus>;
895
- export type IndexAction = "create" | "update" | "upsert" | "emplace";
896
- export declare const IndexAction: any;
897
- export type DirtyValues = "coerce_or_reject" | "coerce_or_drop" | "drop" | "reject";
898
- export declare const DirtyValues: any;
899
- export interface ImportDocumentsRequestImportDocumentsParameters {
900
- batch_size?: number;
901
- /** 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. */
902
- return_id?: boolean;
903
- remote_embedding_batch_size?: number;
904
- return_doc?: boolean;
905
- action?: IndexAction | (string & {});
906
- dirty_values?: DirtyValues | (string & {});
907
- }
908
- export declare const ImportDocumentsRequestImportDocumentsParameters: S.Schema<ImportDocumentsRequestImportDocumentsParameters>;
909
- export interface ImportDocumentsRequest {
910
- /** The name of the collection */
911
- collectionName: string;
912
- importDocumentsParameters?: ImportDocumentsRequestImportDocumentsParameters;
586
+ /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
587
+ model_name: string;
588
+ /** The LLM service's API Key */
589
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
590
+ /** Typesense collection that stores the historical conversations */
591
+ history_collection: string;
592
+ /** LLM service's account ID (only applicable for Cloudflare) */
593
+ account_id?: string | undefined;
594
+ /** The system prompt that contains special instructions to the LLM */
595
+ system_prompt?: string | undefined;
596
+ /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
597
+ ttl?: number | undefined;
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
+ max_bytes: number;
600
+ /** URL of vLLM service */
601
+ vllm_url?: string | undefined;
913
602
  }
914
- export declare const ImportDocumentsRequest: S.Schema<ImportDocumentsRequest>;
915
- export interface ImportDocumentsResponse {
603
+ export type GetAllConversationModelsResponseBodyList = Array<ConversationModelSchema>;
604
+ export type GetAllConversationModelsResponse = GetAllConversationModelsResponseBodyList;
605
+ export interface GetAllNLSearchModelsRequest {
916
606
  }
917
- export declare const ImportDocumentsResponse: S.Schema<ImportDocumentsResponse>;
918
- export interface ImportStemmingDictionaryRequest {
919
- /** The ID to assign to the dictionary */
607
+ /** Stop sequences for the NL model (Google-specific) */
608
+ export type NLSearchModelSchemaStopSequencesList = Array<string>;
609
+ export interface NLSearchModelSchema {
610
+ /** Name of the NL model to use */
611
+ model_name?: string | undefined;
612
+ /** API key for the NL model service */
613
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
614
+ /** Custom API URL for the NL model service */
615
+ api_url?: string | undefined;
616
+ /** Maximum number of bytes to process */
617
+ max_bytes?: number | undefined;
618
+ /** Temperature parameter for the NL model */
619
+ temperature?: number | undefined;
620
+ /** System prompt for the NL model */
621
+ system_prompt?: string | undefined;
622
+ /** Top-p parameter for the NL model (Google-specific) */
623
+ top_p?: number | undefined;
624
+ /** Top-k parameter for the NL model (Google-specific) */
625
+ top_k?: number | undefined;
626
+ /** Stop sequences for the NL model (Google-specific) */
627
+ stop_sequences?: NLSearchModelSchemaStopSequencesList | undefined;
628
+ /** API version for the NL model service */
629
+ api_version?: string | undefined;
630
+ /** Project ID for GCP Vertex AI */
631
+ project_id?: string | undefined;
632
+ /** Access token for GCP Vertex AI */
633
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
634
+ /** Refresh token for GCP Vertex AI */
635
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
636
+ /** Client ID for GCP Vertex AI */
637
+ client_id?: string | undefined;
638
+ /** Client secret for GCP Vertex AI */
639
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
640
+ /** Region for GCP Vertex AI */
641
+ region?: string | undefined;
642
+ /** Maximum output tokens for GCP Vertex AI */
643
+ max_output_tokens?: number | undefined;
644
+ /** Account ID for Cloudflare-specific models */
645
+ account_id?: string | undefined;
646
+ /** Optional ID for the NL search model */
920
647
  id: string;
921
- body: string;
922
- }
923
- export declare const ImportStemmingDictionaryRequest: S.Schema<ImportStemmingDictionaryRequest>;
924
- export interface ImportStemmingDictionaryResponse {
925
- }
926
- export declare const ImportStemmingDictionaryResponse: S.Schema<ImportStemmingDictionaryResponse>;
927
- export interface IndexDocumentRequest {
928
- /** The name of the collection to add the document to */
929
- collectionName: string;
930
- /** Additional action to perform */
931
- action?: IndexAction | (string & {});
932
- /** Dealing with Dirty Data */
933
- dirty_values?: DirtyValues | (string & {});
934
- }
935
- export declare const IndexDocumentRequest: S.Schema<IndexDocumentRequest>;
936
- export type IndexDocumentResponse = unknown;
937
- export declare const IndexDocumentResponse: S.Schema<IndexDocumentResponse>;
938
- export interface ListStemmingDictionariesRequest {
939
648
  }
940
- export declare const ListStemmingDictionariesRequest: S.Schema<ListStemmingDictionariesRequest>;
941
- export type ListStemmingDictionariesResponseDictionariesList = Array<string>;
942
- export declare const ListStemmingDictionariesResponseDictionariesList: S.Schema<ListStemmingDictionariesResponseDictionariesList>;
943
- export interface ListStemmingDictionariesResponse {
944
- dictionaries?: ListStemmingDictionariesResponseDictionariesList;
649
+ export type GetAllNLSearchModelsResponseBodyList = Array<NLSearchModelSchema>;
650
+ export type GetAllNLSearchModelsResponse = GetAllNLSearchModelsResponseBodyList;
651
+ export interface GetAllPresetsRequest {
945
652
  }
946
- export declare const ListStemmingDictionariesResponse: S.Schema<ListStemmingDictionariesResponse>;
947
653
  /** Dictates the direction in which the words in the query must be dropped when the original words in the query do not appear in any document. Values: right_to_left (default), left_to_right, both_sides:3 A note on both_sides:3 - for queries up to 3 tokens (words) in length, this mode will drop tokens from both sides and exhaustively rank all matching results. If query length is greater than 3 words, Typesense will just fallback to default behavior of right_to_left */
948
654
  export type DropTokensMode = "right_to_left" | "left_to_right" | "both_sides:3";
949
- export declare const DropTokensMode: any;
950
- /** Parameters for the multi search API. */
951
- export interface MultiSearchParameters {
655
+ export interface SearchParameters {
952
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. */
953
- q?: string;
657
+ q?: string | undefined;
954
658
  /** A list of `string` fields that should be queried against. Multiple fields are separated with a comma. */
955
- query_by?: string;
659
+ query_by?: string | undefined;
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 | undefined;
662
+ /** Whether to use natural language processing to parse the query. */
663
+ nl_query?: boolean | undefined;
664
+ /** The ID of the natural language model to use. */
665
+ nl_model_id?: string | undefined;
956
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. */
957
- query_by_weights?: string;
667
+ query_by_weights?: string | undefined;
958
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. */
959
- text_match_type?: string;
669
+ text_match_type?: string | undefined;
960
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. */
961
- prefix?: string;
671
+ prefix?: string | undefined;
962
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 */
963
- infix?: string;
673
+ infix?: string | undefined;
964
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. */
965
- max_extra_prefix?: number;
675
+ max_extra_prefix?: number | undefined;
966
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. */
967
- max_extra_suffix?: number;
968
- /** Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&. */
969
- filter_by?: string;
677
+ max_extra_suffix?: number | undefined;
678
+ /** Filter conditions for refining your open api validator search results. Separate multiple conditions with &&. */
679
+ filter_by?: string | undefined;
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 | undefined;
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 | undefined;
970
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` */
971
- sort_by?: string;
685
+ sort_by?: string | undefined;
972
686
  /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
973
- facet_by?: string;
687
+ facet_by?: string | undefined;
974
688
  /** Maximum number of facet values to be returned. */
975
- max_facet_values?: number;
689
+ max_facet_values?: number | undefined;
976
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". */
977
- facet_query?: string;
691
+ facet_query?: string | undefined;
692
+ /** Controls the fuzziness of the facet query filter. Default: 2. */
693
+ facet_query_num_typos?: number | undefined;
978
694
  /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
979
- num_typos?: string;
695
+ num_typos?: string | undefined;
980
696
  /** Results from this specific page number would be fetched. */
981
- page?: number;
697
+ page?: number | undefined;
982
698
  /** Number of results to fetch per page. Default: 10 */
983
- per_page?: number;
699
+ per_page?: number | undefined;
984
700
  /** Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10. */
985
- limit?: number;
701
+ limit?: number | undefined;
986
702
  /** Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter. */
987
- offset?: number;
703
+ offset?: number | undefined;
988
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. */
989
- group_by?: string;
705
+ group_by?: string | undefined;
990
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 */
991
- group_limit?: number;
707
+ group_limit?: number | undefined;
992
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 */
993
- group_missing_values?: boolean;
709
+ group_missing_values?: boolean | undefined;
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 | undefined;
994
712
  /** List of fields from the document to include in the search result */
995
- include_fields?: string;
713
+ include_fields?: string | undefined;
996
714
  /** List of fields from the document to exclude in the search result */
997
- exclude_fields?: string;
715
+ exclude_fields?: string | undefined;
998
716
  /** List of fields which should be highlighted fully without snippeting */
999
- highlight_full_fields?: string;
717
+ highlight_full_fields?: string | undefined;
1000
718
  /** The number of tokens that should surround the highlighted text on each side. Default: 4 */
1001
- highlight_affix_num_tokens?: number;
719
+ highlight_affix_num_tokens?: number | undefined;
1002
720
  /** The start tag used for the highlighted snippets. Default: `<mark>` */
1003
- highlight_start_tag?: string;
721
+ highlight_start_tag?: string | undefined;
1004
722
  /** The end tag used for the highlighted snippets. Default: `</mark>` */
1005
- highlight_end_tag?: string;
723
+ highlight_end_tag?: string | undefined;
724
+ /** Flag for enabling/disabling the deprecated, old highlight structure in the response. Default: true */
725
+ enable_highlight_v1?: boolean | undefined;
726
+ /** Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script). */
727
+ enable_analytics?: boolean | undefined;
1006
728
  /** Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 */
1007
- snippet_threshold?: number;
729
+ snippet_threshold?: number | undefined;
730
+ /** List of synonym set names to associate with this search query */
731
+ synonym_sets?: string | undefined;
1008
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 */
1009
- drop_tokens_threshold?: number;
1010
- drop_tokens_mode?: DropTokensMode | (string & {});
733
+ drop_tokens_threshold?: number | undefined;
734
+ drop_tokens_mode?: DropTokensMode | (string & {}) | undefined;
1011
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 */
1012
- typo_tokens_threshold?: number;
736
+ typo_tokens_threshold?: number | undefined;
1013
737
  /** Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. */
1014
- enable_typos_for_alpha_numerical_tokens?: boolean;
738
+ enable_typos_for_alpha_numerical_tokens?: boolean | undefined;
1015
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 */
1016
- filter_curated_hits?: boolean;
740
+ filter_curated_hits?: boolean | undefined;
1017
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 */
1018
- enable_synonyms?: boolean;
1019
- /** Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script). */
1020
- enable_analytics?: boolean;
742
+ enable_synonyms?: boolean | undefined;
1021
743
  /** Allow synonym resolution on word prefixes in the query. Default: false */
1022
- synonym_prefix?: boolean;
744
+ synonym_prefix?: boolean | undefined;
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 | undefined;
1023
747
  /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
1024
- synonym_num_typos?: number;
748
+ synonym_num_typos?: number | undefined;
1025
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`. */
1026
- pinned_hits?: string;
750
+ pinned_hits?: string | undefined;
1027
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`. */
1028
- hidden_hits?: string;
752
+ hidden_hits?: string | undefined;
1029
753
  /** Comma separated list of tags to trigger the curations rules that match the tags. */
1030
- curation_tags?: string;
754
+ curation_tags?: string | undefined;
1031
755
  /** A list of custom fields that must be highlighted even if you don't query for them */
1032
- highlight_fields?: string;
756
+ highlight_fields?: string | undefined;
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 | undefined;
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 | undefined;
1033
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 */
1034
- pre_segmented_query?: boolean;
762
+ pre_segmented_query?: boolean | undefined;
1035
763
  /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
1036
- preset?: string;
764
+ preset?: string | undefined;
1037
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 */
1038
- enable_curations?: boolean;
766
+ enable_curations?: boolean | undefined;
1039
767
  /** Set this parameter to true to ensure that an exact match is ranked above the others */
1040
- prioritize_exact_match?: boolean;
768
+ prioritize_exact_match?: boolean | undefined;
769
+ /** Control the number of words that Typesense considers for typo and prefix searching. */
770
+ max_candidates?: number | undefined;
1041
771
  /** Make Typesense prioritize documents where the query words appear earlier in the text. */
1042
- prioritize_token_position?: boolean;
772
+ prioritize_token_position?: boolean | undefined;
1043
773
  /** Make Typesense prioritize documents where the query words appear in more number of fields. */
1044
- prioritize_num_matching_fields?: boolean;
774
+ prioritize_num_matching_fields?: boolean | undefined;
1045
775
  /** Make Typesense disable typos for numerical tokens. */
1046
- enable_typos_for_numerical_tokens?: boolean;
776
+ enable_typos_for_numerical_tokens?: boolean | undefined;
1047
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). */
1048
- exhaustive_search?: boolean;
778
+ exhaustive_search?: boolean | undefined;
1049
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. */
1050
- search_cutoff_ms?: number;
780
+ search_cutoff_ms?: number | undefined;
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 | undefined;
1051
783
  /** Enable server side caching of search query results. By default, caching is disabled. */
1052
- use_cache?: boolean;
784
+ use_cache?: boolean | undefined;
1053
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. */
1054
- cache_ttl?: number;
786
+ cache_ttl?: number | undefined;
1055
787
  /** Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
1056
- min_len_1typo?: number;
788
+ min_len_1typo?: number | undefined;
1057
789
  /** Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
1058
- min_len_2typo?: number;
790
+ min_len_2typo?: number | undefined;
1059
791
  /** Vector query expression for fetching documents "closest" to a given query/document vector. */
1060
- vector_query?: string;
792
+ vector_query?: string | undefined;
1061
793
  /** Timeout (in milliseconds) for fetching remote embeddings. */
1062
- remote_embedding_timeout_ms?: number;
794
+ remote_embedding_timeout_ms?: number | undefined;
1063
795
  /** Number of times to retry fetching remote embeddings. */
1064
- remote_embedding_num_tries?: number;
796
+ remote_embedding_num_tries?: number | undefined;
1065
797
  /** Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default). */
1066
- facet_strategy?: string;
798
+ facet_strategy?: string | undefined;
1067
799
  /** Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query. */
1068
- stopwords?: string;
800
+ stopwords?: string | undefined;
1069
801
  /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
1070
- facet_return_parent?: string;
802
+ facet_return_parent?: string | undefined;
803
+ /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
804
+ facet_sample_percent?: number | undefined;
805
+ /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
806
+ facet_sample_threshold?: number | undefined;
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 | undefined;
1071
809
  /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
1072
- voice_query?: string;
810
+ voice_query?: string | undefined;
1073
811
  /** Enable conversational search. */
1074
- conversation?: boolean;
812
+ conversation?: boolean | undefined;
1075
813
  /** The Id of Conversation Model to be used. */
1076
- conversation_model_id?: string;
814
+ conversation_model_id?: string | undefined;
1077
815
  /** The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM. */
1078
- conversation_id?: string;
1079
- /** 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. */
1080
- validate_field_names?: boolean;
816
+ conversation_id?: string | undefined;
1081
817
  }
1082
- export declare const MultiSearchParameters: S.Schema<MultiSearchParameters>;
1083
818
  export interface MultiSearchCollectionParameters {
1084
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. */
1085
- q?: string;
820
+ q?: string | undefined;
1086
821
  /** A list of `string` fields that should be queried against. Multiple fields are separated with a comma. */
1087
- query_by?: string;
822
+ query_by?: string | undefined;
1088
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. */
1089
- query_by_weights?: string;
824
+ query_by_weights?: string | undefined;
1090
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. */
1091
- text_match_type?: string;
826
+ text_match_type?: string | undefined;
1092
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. */
1093
- prefix?: string;
828
+ prefix?: string | undefined;
1094
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 */
1095
- infix?: string;
830
+ infix?: string | undefined;
1096
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. */
1097
- max_extra_prefix?: number;
832
+ max_extra_prefix?: number | undefined;
1098
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. */
1099
- max_extra_suffix?: number;
834
+ max_extra_suffix?: number | undefined;
1100
835
  /** Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&. */
1101
- filter_by?: string;
836
+ filter_by?: string | undefined;
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 | undefined;
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 | undefined;
1102
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` */
1103
- sort_by?: string;
842
+ sort_by?: string | undefined;
1104
843
  /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
1105
- facet_by?: string;
844
+ facet_by?: string | undefined;
1106
845
  /** Maximum number of facet values to be returned. */
1107
- max_facet_values?: number;
846
+ max_facet_values?: number | undefined;
1108
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". */
1109
- facet_query?: string;
848
+ facet_query?: string | undefined;
849
+ /** Controls the fuzziness of the facet query filter. Default: 2. */
850
+ facet_query_num_typos?: number | undefined;
1110
851
  /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
1111
- num_typos?: string;
852
+ num_typos?: string | undefined;
1112
853
  /** Results from this specific page number would be fetched. */
1113
- page?: number;
854
+ page?: number | undefined;
1114
855
  /** Number of results to fetch per page. Default: 10 */
1115
- per_page?: number;
856
+ per_page?: number | undefined;
1116
857
  /** Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10. */
1117
- limit?: number;
858
+ limit?: number | undefined;
1118
859
  /** Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter. */
1119
- offset?: number;
860
+ offset?: number | undefined;
1120
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. */
1121
- group_by?: string;
862
+ group_by?: string | undefined;
1122
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 */
1123
- group_limit?: number;
864
+ group_limit?: number | undefined;
1124
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 */
1125
- group_missing_values?: boolean;
866
+ group_missing_values?: boolean | undefined;
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 | undefined;
1126
869
  /** List of fields from the document to include in the search result */
1127
- include_fields?: string;
870
+ include_fields?: string | undefined;
1128
871
  /** List of fields from the document to exclude in the search result */
1129
- exclude_fields?: string;
872
+ exclude_fields?: string | undefined;
1130
873
  /** List of fields which should be highlighted fully without snippeting */
1131
- highlight_full_fields?: string;
874
+ highlight_full_fields?: string | undefined;
1132
875
  /** The number of tokens that should surround the highlighted text on each side. Default: 4 */
1133
- highlight_affix_num_tokens?: number;
876
+ highlight_affix_num_tokens?: number | undefined;
1134
877
  /** The start tag used for the highlighted snippets. Default: `<mark>` */
1135
- highlight_start_tag?: string;
878
+ highlight_start_tag?: string | undefined;
1136
879
  /** The end tag used for the highlighted snippets. Default: `</mark>` */
1137
- highlight_end_tag?: string;
880
+ highlight_end_tag?: string | undefined;
1138
881
  /** Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 */
1139
- snippet_threshold?: number;
882
+ snippet_threshold?: number | undefined;
1140
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 */
1141
- drop_tokens_threshold?: number;
1142
- drop_tokens_mode?: DropTokensMode | (string & {});
884
+ drop_tokens_threshold?: number | undefined;
885
+ drop_tokens_mode?: DropTokensMode | (string & {}) | undefined;
1143
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 */
1144
- typo_tokens_threshold?: number;
887
+ typo_tokens_threshold?: number | undefined;
1145
888
  /** Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. */
1146
- enable_typos_for_alpha_numerical_tokens?: boolean;
889
+ enable_typos_for_alpha_numerical_tokens?: boolean | undefined;
1147
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 */
1148
- filter_curated_hits?: boolean;
891
+ filter_curated_hits?: boolean | undefined;
1149
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 */
1150
- enable_synonyms?: boolean;
893
+ enable_synonyms?: boolean | undefined;
1151
894
  /** Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script). */
1152
- enable_analytics?: boolean;
895
+ enable_analytics?: boolean | undefined;
1153
896
  /** Allow synonym resolution on word prefixes in the query. Default: false */
1154
- synonym_prefix?: boolean;
897
+ synonym_prefix?: boolean | undefined;
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 | undefined;
1155
900
  /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
1156
- synonym_num_typos?: number;
901
+ synonym_num_typos?: number | undefined;
1157
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`. */
1158
- pinned_hits?: string;
903
+ pinned_hits?: string | undefined;
1159
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`. */
1160
- hidden_hits?: string;
905
+ hidden_hits?: string | undefined;
1161
906
  /** Comma separated list of tags to trigger the curations rules that match the tags. */
1162
- curation_tags?: string;
907
+ curation_tags?: string | undefined;
1163
908
  /** A list of custom fields that must be highlighted even if you don't query for them */
1164
- highlight_fields?: string;
909
+ highlight_fields?: string | undefined;
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 | undefined;
1165
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 */
1166
- pre_segmented_query?: boolean;
913
+ pre_segmented_query?: boolean | undefined;
1167
914
  /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
1168
- preset?: string;
915
+ preset?: string | undefined;
1169
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 */
1170
- enable_curations?: boolean;
917
+ enable_curations?: boolean | undefined;
1171
918
  /** Set this parameter to true to ensure that an exact match is ranked above the others */
1172
- prioritize_exact_match?: boolean;
919
+ prioritize_exact_match?: boolean | undefined;
1173
920
  /** Make Typesense prioritize documents where the query words appear earlier in the text. */
1174
- prioritize_token_position?: boolean;
921
+ prioritize_token_position?: boolean | undefined;
1175
922
  /** Make Typesense prioritize documents where the query words appear in more number of fields. */
1176
- prioritize_num_matching_fields?: boolean;
923
+ prioritize_num_matching_fields?: boolean | undefined;
1177
924
  /** Make Typesense disable typos for numerical tokens. */
1178
- enable_typos_for_numerical_tokens?: boolean;
925
+ enable_typos_for_numerical_tokens?: boolean | undefined;
1179
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). */
1180
- exhaustive_search?: boolean;
927
+ exhaustive_search?: boolean | undefined;
1181
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. */
1182
- search_cutoff_ms?: number;
929
+ search_cutoff_ms?: number | undefined;
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 | undefined;
1183
932
  /** Enable server side caching of search query results. By default, caching is disabled. */
1184
- use_cache?: boolean;
933
+ use_cache?: boolean | undefined;
1185
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. */
1186
- cache_ttl?: number;
935
+ cache_ttl?: number | undefined;
1187
936
  /** Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
1188
- min_len_1typo?: number;
937
+ min_len_1typo?: number | undefined;
1189
938
  /** Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
1190
- min_len_2typo?: number;
939
+ min_len_2typo?: number | undefined;
1191
940
  /** Vector query expression for fetching documents "closest" to a given query/document vector. */
1192
- vector_query?: string;
941
+ vector_query?: string | undefined;
1193
942
  /** Timeout (in milliseconds) for fetching remote embeddings. */
1194
- remote_embedding_timeout_ms?: number;
943
+ remote_embedding_timeout_ms?: number | undefined;
1195
944
  /** Number of times to retry fetching remote embeddings. */
1196
- remote_embedding_num_tries?: number;
945
+ remote_embedding_num_tries?: number | undefined;
1197
946
  /** Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default). */
1198
- facet_strategy?: string;
947
+ facet_strategy?: string | undefined;
1199
948
  /** Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query. */
1200
- stopwords?: string;
949
+ stopwords?: string | undefined;
1201
950
  /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
1202
- facet_return_parent?: string;
951
+ facet_return_parent?: string | undefined;
952
+ /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
953
+ facet_sample_percent?: number | undefined;
954
+ /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
955
+ facet_sample_threshold?: number | undefined;
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 | undefined;
1203
958
  /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
1204
- voice_query?: string;
959
+ voice_query?: string | undefined;
1205
960
  /** Enable conversational search. */
1206
- conversation?: boolean;
961
+ conversation?: boolean | undefined;
1207
962
  /** The Id of Conversation Model to be used. */
1208
- conversation_model_id?: string;
963
+ conversation_model_id?: string | undefined;
1209
964
  /** The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM. */
1210
- conversation_id?: string;
965
+ conversation_id?: string | undefined;
1211
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. */
1212
- validate_field_names?: boolean;
967
+ validate_field_names?: boolean | undefined;
1213
968
  /** The collection to search in. */
1214
- collection?: string;
969
+ collection?: string | undefined;
1215
970
  /** A separate search API key for each search within a multi_search request */
1216
- x_typesense_api_key?: string;
1217
- /** 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. */
1218
- rerank_hybrid_matches?: boolean;
971
+ x_typesense_api_key?: string | undefined;
1219
972
  }
1220
- export declare const MultiSearchCollectionParameters: S.Schema<MultiSearchCollectionParameters>;
1221
- export type MultiSearchRequestSearchesList = Array<MultiSearchCollectionParameters>;
1222
- export declare const MultiSearchRequestSearchesList: S.Schema<MultiSearchRequestSearchesList>;
1223
- export interface MultiSearchRequest {
1224
- multiSearchParameters: MultiSearchParameters;
973
+ export type MultiSearchSearchesParameterSearchesList = Array<MultiSearchCollectionParameters>;
974
+ export interface MultiSearchSearchesParameter {
1225
975
  /** When true, merges the search results from each search query into a single ordered set of hits. */
1226
- union?: boolean;
1227
- searches: MultiSearchRequestSearchesList;
976
+ union?: boolean | undefined;
977
+ searches: MultiSearchSearchesParameterSearchesList;
1228
978
  }
1229
- export declare const MultiSearchRequest: S.Schema<MultiSearchRequest>;
1230
- export interface FacetCountsCountsItem {
1231
- count?: number;
1232
- highlighted?: string;
1233
- value?: string;
1234
- parent?: unknown;
979
+ export type PresetSchemaValue = SearchParameters | MultiSearchSearchesParameter;
980
+ export interface PresetSchema {
981
+ value: PresetSchemaValue;
982
+ name: string;
1235
983
  }
1236
- export declare const FacetCountsCountsItem: S.Schema<FacetCountsCountsItem>;
1237
- export type FacetCountsCountsList = Array<FacetCountsCountsItem>;
1238
- export declare const FacetCountsCountsList: S.Schema<FacetCountsCountsList>;
1239
- export interface FacetCountsStats {
1240
- max?: number;
1241
- min?: number;
1242
- sum?: number;
1243
- total_values?: number;
1244
- avg?: number;
984
+ export type PresetsRetrieveSchemaPresetsList = Array<PresetSchema>;
985
+ export interface PresetsRetrieveSchema {
986
+ presets: PresetsRetrieveSchemaPresetsList;
1245
987
  }
1246
- export declare const FacetCountsStats: S.Schema<FacetCountsStats>;
1247
- export interface FacetCounts {
1248
- counts?: FacetCountsCountsList;
1249
- field_name?: string;
1250
- sampled?: boolean;
1251
- stats?: FacetCountsStats;
988
+ export interface GetAnalyticsEventsRequest {
989
+ user_id: string;
990
+ /** Analytics rule name */
991
+ name: string;
992
+ /** Number of events to return (max 1000) */
993
+ n: number;
1252
994
  }
1253
- export declare const FacetCounts: S.Schema<FacetCounts>;
1254
- export type MultiSearchResultItemFacetCountsList = Array<FacetCounts>;
1255
- export declare const MultiSearchResultItemFacetCountsList: S.Schema<MultiSearchResultItemFacetCountsList>;
1256
- export type SearchGroupedHitGroupKeyList = Array<unknown>;
1257
- export declare const SearchGroupedHitGroupKeyList: S.Schema<SearchGroupedHitGroupKeyList>;
1258
- /** Present only for (array) string[] fields */
1259
- export type SearchHighlightSnippetsList = Array<string>;
1260
- export declare const SearchHighlightSnippetsList: S.Schema<SearchHighlightSnippetsList>;
1261
- /** Full field value with highlighting, present only for (array) string[] fields */
1262
- export type SearchHighlightValuesList = Array<string>;
1263
- export declare const SearchHighlightValuesList: S.Schema<SearchHighlightValuesList>;
1264
- /** The indices property will be present only for string[] fields and will contain the corresponding indices of the snippets in the search field */
1265
- export type SearchHighlightIndicesList = Array<number>;
1266
- export declare const SearchHighlightIndicesList: S.Schema<SearchHighlightIndicesList>;
1267
- export type SearchHighlightMatchedTokensList = Array<unknown>;
1268
- export declare const SearchHighlightMatchedTokensList: S.Schema<SearchHighlightMatchedTokensList>;
1269
- export interface SearchHighlight {
1270
- field?: string;
1271
- /** Present only for (non-array) string fields */
1272
- snippet?: string;
1273
- /** Present only for (array) string[] fields */
1274
- snippets?: SearchHighlightSnippetsList;
1275
- /** Full field value with highlighting, present only for (non-array) string fields */
1276
- value?: string;
1277
- /** Full field value with highlighting, present only for (array) string[] fields */
1278
- values?: SearchHighlightValuesList;
1279
- /** The indices property will be present only for string[] fields and will contain the corresponding indices of the snippets in the search field */
1280
- indices?: SearchHighlightIndicesList;
1281
- matched_tokens?: SearchHighlightMatchedTokensList;
1282
- }
1283
- export declare const SearchHighlight: S.Schema<SearchHighlight>;
1284
- /** (Deprecated) Contains highlighted portions of the search fields */
1285
- export type SearchResultHitHighlightsList = Array<SearchHighlight>;
1286
- export declare const SearchResultHitHighlightsList: S.Schema<SearchResultHitHighlightsList>;
1287
- /** Highlighted version of the matching document */
1288
- export type SearchResultHitHighlightMap = {
1289
- [key: string]: unknown | undefined;
1290
- };
1291
- export declare const SearchResultHitHighlightMap: S.Schema<SearchResultHitHighlightMap>;
1292
- /** Can be any key-value pair */
1293
- export type SearchResultHitDocumentMap = {
1294
- [key: string]: unknown | undefined;
1295
- };
1296
- export declare const SearchResultHitDocumentMap: S.Schema<SearchResultHitDocumentMap>;
1297
- export interface SearchResultHitTextMatchInfo {
1298
- best_field_score?: string;
1299
- best_field_weight?: number;
1300
- fields_matched?: number;
1301
- num_tokens_dropped?: number;
1302
- score?: string;
1303
- tokens_matched?: number;
1304
- typo_prefix_score?: number;
1305
- }
1306
- export declare const SearchResultHitTextMatchInfo: S.Schema<SearchResultHitTextMatchInfo>;
1307
- /** Can be any key-value pair */
1308
- export type SearchResultHitGeoDistanceMetersMap = {
1309
- [key: string]: number | undefined;
1310
- };
1311
- export declare const SearchResultHitGeoDistanceMetersMap: S.Schema<SearchResultHitGeoDistanceMetersMap>;
1312
- /** Information about hybrid search scoring */
1313
- export interface SearchResultHitHybridSearchInfo {
1314
- /** Combined score from rank fusion of text and vector search */
1315
- rank_fusion_score?: number;
1316
- }
1317
- export declare const SearchResultHitHybridSearchInfo: S.Schema<SearchResultHitHybridSearchInfo>;
1318
- export interface SearchResultHit {
1319
- /** (Deprecated) Contains highlighted portions of the search fields */
1320
- highlights?: SearchResultHitHighlightsList;
1321
- /** Highlighted version of the matching document */
1322
- highlight?: SearchResultHitHighlightMap;
1323
- /** Can be any key-value pair */
1324
- document?: SearchResultHitDocumentMap;
1325
- text_match?: number;
1326
- text_match_info?: SearchResultHitTextMatchInfo;
1327
- /** Can be any key-value pair */
1328
- geo_distance_meters?: SearchResultHitGeoDistanceMetersMap;
1329
- /** Distance between the query vector and matching document's vector value */
1330
- vector_distance?: number;
1331
- /** Information about hybrid search scoring */
1332
- hybrid_search_info?: SearchResultHitHybridSearchInfo;
1333
- /** Returned only for union query response. Indicates the index of the query which this document matched to. */
1334
- search_index?: number;
1335
- }
1336
- export declare const SearchResultHit: S.Schema<SearchResultHit>;
1337
- /** The documents that matched the search query */
1338
- export type SearchGroupedHitHitsList = Array<SearchResultHit>;
1339
- export declare const SearchGroupedHitHitsList: S.Schema<SearchGroupedHitHitsList>;
1340
- export interface SearchGroupedHit {
1341
- found?: number;
1342
- group_key: SearchGroupedHitGroupKeyList;
1343
- /** The documents that matched the search query */
1344
- hits: SearchGroupedHitHitsList;
1345
- }
1346
- export declare const SearchGroupedHit: S.Schema<SearchGroupedHit>;
1347
- export type MultiSearchResultItemGroupedHitsList = Array<SearchGroupedHit>;
1348
- export declare const MultiSearchResultItemGroupedHitsList: S.Schema<MultiSearchResultItemGroupedHitsList>;
1349
- /** The documents that matched the search query */
1350
- export type MultiSearchResultItemHitsList = Array<SearchResultHit>;
1351
- export declare const MultiSearchResultItemHitsList: S.Schema<MultiSearchResultItemHitsList>;
1352
- export interface SearchRequestParamsVoiceQuery {
1353
- transcribed_query?: string;
1354
- }
1355
- export declare const SearchRequestParamsVoiceQuery: S.Schema<SearchRequestParamsVoiceQuery>;
1356
- export interface SearchRequestParams {
1357
- collection_name: string;
1358
- first_q?: string;
1359
- q: string;
1360
- per_page: number;
1361
- voice_query?: SearchRequestParamsVoiceQuery;
1362
- }
1363
- export declare const SearchRequestParams: S.Schema<SearchRequestParams>;
1364
- export type SearchResultConversationConversationHistoryList = Array<unknown>;
1365
- export declare const SearchResultConversationConversationHistoryList: S.Schema<SearchResultConversationConversationHistoryList>;
1366
- export interface SearchResultConversation {
1367
- answer: string;
1368
- conversation_history: SearchResultConversationConversationHistoryList;
1369
- conversation_id: string;
1370
- query: string;
995
+ export type AnalyticsEventsResponseEventsItemDocIdsList = Array<string>;
996
+ export interface AnalyticsEventsResponseEventsItem {
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;
1371
1005
  }
1372
- export declare const SearchResultConversation: S.Schema<SearchResultConversation>;
1373
- /** Returned only for union query response. */
1374
- export type MultiSearchResultItemUnionRequestParamsList = Array<SearchRequestParams>;
1375
- export declare const MultiSearchResultItemUnionRequestParamsList: S.Schema<MultiSearchResultItemUnionRequestParamsList>;
1376
- /** Custom JSON object that can be returned in the search response */
1377
- export type MultiSearchResultItemMetadataMap = {
1378
- [key: string]: unknown | undefined;
1379
- };
1380
- export declare const MultiSearchResultItemMetadataMap: S.Schema<MultiSearchResultItemMetadataMap>;
1381
- export interface MultiSearchResultItem {
1382
- facet_counts?: MultiSearchResultItemFacetCountsList;
1383
- /** The number of documents found */
1384
- found?: number;
1385
- found_docs?: number;
1386
- /** The number of milliseconds the search took */
1387
- search_time_ms?: number;
1388
- /** The total number of documents in the collection */
1389
- out_of?: number;
1390
- /** Whether the search was cut off */
1391
- search_cutoff?: boolean;
1392
- /** The search result page number */
1393
- page?: number;
1394
- grouped_hits?: MultiSearchResultItemGroupedHitsList;
1395
- /** The documents that matched the search query */
1396
- hits?: MultiSearchResultItemHitsList;
1397
- request_params?: SearchRequestParams;
1398
- conversation?: SearchResultConversation;
1399
- /** Returned only for union query response. */
1400
- union_request_params?: MultiSearchResultItemUnionRequestParamsList;
1401
- /** Custom JSON object that can be returned in the search response */
1402
- metadata?: MultiSearchResultItemMetadataMap;
1403
- /** HTTP error code */
1404
- code?: number;
1405
- /** Error description */
1406
- error?: string;
1006
+ export type AnalyticsEventsResponseEventsList = Array<AnalyticsEventsResponseEventsItem>;
1007
+ export interface AnalyticsEventsResponse {
1008
+ events: AnalyticsEventsResponseEventsList;
1407
1009
  }
1408
- export declare const MultiSearchResultItem: S.Schema<MultiSearchResultItem>;
1409
- export type MultiSearchResultResultsList = Array<MultiSearchResultItem>;
1410
- export declare const MultiSearchResultResultsList: S.Schema<MultiSearchResultResultsList>;
1411
- export interface MultiSearchResult {
1412
- results: MultiSearchResultResultsList;
1413
- conversation?: SearchResultConversation;
1010
+ export interface GetAnalyticsRuleRequest {
1011
+ /** The name of the analytics rule to retrieve */
1012
+ ruleName: string;
1414
1013
  }
1415
- export declare const MultiSearchResult: S.Schema<MultiSearchResult>;
1416
- export interface RetrieveAllConversationModelsRequest {
1014
+ export type GetAnalyticsRuleResponseParamsMetaFieldsList = Array<string>;
1015
+ export interface GetAnalyticsRuleResponseParams {
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
+ }
1024
+ export interface GetAnalyticsRuleResponse {
1025
+ name: string;
1026
+ type: AnalyticsRuleType;
1027
+ collection: string;
1028
+ event_type: string;
1029
+ rule_tag?: string | undefined;
1030
+ params?: GetAnalyticsRuleResponseParams | undefined;
1417
1031
  }
1418
- export declare const RetrieveAllConversationModelsRequest: S.Schema<RetrieveAllConversationModelsRequest>;
1419
- export interface ConversationModelSchema {
1420
- /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
1421
- id: string;
1422
- /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
1423
- model_name: string;
1424
- /** The LLM service's API Key */
1425
- api_key?: string | import("effect/Redacted").Redacted<string>;
1426
- /** Typesense collection that stores the historical conversations */
1427
- history_collection: string;
1428
- /** LLM service's account ID (only applicable for Cloudflare) */
1429
- account_id?: string;
1430
- /** The system prompt that contains special instructions to the LLM */
1431
- system_prompt?: string;
1432
- /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
1433
- ttl?: number;
1434
- /** 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. */
1435
- max_bytes: number;
1436
- /** URL of vLLM service */
1437
- vllm_url?: string;
1032
+ export interface GetAnalyticsRulesRequest {
1033
+ /** Filter rules by rule_tag */
1034
+ rule_tag?: string | undefined;
1438
1035
  }
1439
- export declare const ConversationModelSchema: S.Schema<ConversationModelSchema>;
1440
- export type RetrieveAllConversationModelsResponseBodyList = Array<ConversationModelSchema>;
1441
- export declare const RetrieveAllConversationModelsResponseBodyList: S.Schema<RetrieveAllConversationModelsResponseBodyList>;
1442
- export type RetrieveAllConversationModelsResponse = RetrieveAllConversationModelsResponseBodyList;
1443
- export declare const RetrieveAllConversationModelsResponse: S.Schema<RetrieveAllConversationModelsResponse>;
1444
- export interface RetrieveAllNLSearchModelsRequest {
1036
+ export type GetAnalyticsRulesResponseBodyList = Array<AnalyticsRule>;
1037
+ export type GetAnalyticsRulesResponse = GetAnalyticsRulesResponseBodyList;
1038
+ export interface GetAnalyticsStatusRequest {
1445
1039
  }
1446
- export declare const RetrieveAllNLSearchModelsRequest: S.Schema<RetrieveAllNLSearchModelsRequest>;
1447
- /** Stop sequences for the NL model (Google-specific) */
1448
- export type NLSearchModelSchemaStopSequencesList = Array<string>;
1449
- export declare const NLSearchModelSchemaStopSequencesList: S.Schema<NLSearchModelSchemaStopSequencesList>;
1450
- export interface NLSearchModelSchema {
1451
- /** Name of the NL model to use */
1452
- model_name?: string;
1453
- /** API key for the NL model service */
1454
- api_key?: string | import("effect/Redacted").Redacted<string>;
1455
- /** Custom API URL for the NL model service */
1456
- api_url?: string;
1457
- /** Maximum number of bytes to process */
1458
- max_bytes?: number;
1459
- /** Temperature parameter for the NL model */
1460
- temperature?: number;
1461
- /** System prompt for the NL model */
1462
- system_prompt?: string;
1463
- /** Top-p parameter for the NL model (Google-specific) */
1464
- top_p?: number;
1465
- /** Top-k parameter for the NL model (Google-specific) */
1466
- top_k?: number;
1467
- /** Stop sequences for the NL model (Google-specific) */
1468
- stop_sequences?: NLSearchModelSchemaStopSequencesList;
1469
- /** API version for the NL model service */
1470
- api_version?: string;
1471
- /** Project ID for GCP Vertex AI */
1472
- project_id?: string;
1473
- /** Access token for GCP Vertex AI */
1474
- access_token?: string | import("effect/Redacted").Redacted<string>;
1475
- /** Refresh token for GCP Vertex AI */
1476
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
1477
- /** Client ID for GCP Vertex AI */
1478
- client_id?: string;
1479
- /** Client secret for GCP Vertex AI */
1480
- client_secret?: string | import("effect/Redacted").Redacted<string>;
1481
- /** Region for GCP Vertex AI */
1482
- region?: string;
1483
- /** Maximum output tokens for GCP Vertex AI */
1484
- max_output_tokens?: number;
1485
- /** Account ID for Cloudflare-specific models */
1486
- account_id?: string;
1487
- /** Optional ID for the NL search model */
1488
- id: string;
1040
+ export interface AnalyticsStatus {
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;
1489
1048
  }
1490
- export declare const NLSearchModelSchema: S.Schema<NLSearchModelSchema>;
1491
- export type RetrieveAllNLSearchModelsResponseBodyList = Array<NLSearchModelSchema>;
1492
- export declare const RetrieveAllNLSearchModelsResponseBodyList: S.Schema<RetrieveAllNLSearchModelsResponseBodyList>;
1493
- export type RetrieveAllNLSearchModelsResponse = RetrieveAllNLSearchModelsResponseBodyList;
1494
- export declare const RetrieveAllNLSearchModelsResponse: S.Schema<RetrieveAllNLSearchModelsResponse>;
1495
- export interface RetrieveAllPresetsRequest {
1049
+ export interface GetAPIStatsRequest {
1496
1050
  }
1497
- export declare const RetrieveAllPresetsRequest: S.Schema<RetrieveAllPresetsRequest>;
1498
- export interface SearchParameters {
1499
- /** 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. */
1500
- q?: string;
1501
- /** A list of `string` fields that should be queried against. Multiple fields are separated with a comma. */
1502
- query_by?: string;
1503
- /** 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. */
1504
- validate_field_names?: boolean;
1505
- /** Whether to use natural language processing to parse the query. */
1506
- nl_query?: boolean;
1507
- /** The ID of the natural language model to use. */
1508
- nl_model_id?: string;
1509
- /** 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. */
1510
- query_by_weights?: string;
1511
- /** 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. */
1512
- text_match_type?: string;
1513
- /** 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. */
1514
- prefix?: string;
1515
- /** 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 */
1516
- infix?: string;
1517
- /** 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. */
1518
- max_extra_prefix?: number;
1519
- /** 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. */
1520
- max_extra_suffix?: number;
1521
- /** Filter conditions for refining your open api validator search results. Separate multiple conditions with &&. */
1522
- filter_by?: string;
1523
- /** 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*. */
1524
- max_filter_by_candidates?: number;
1525
- /** 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` */
1526
- sort_by?: string;
1527
- /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
1528
- facet_by?: string;
1529
- /** Maximum number of facet values to be returned. */
1530
- max_facet_values?: number;
1531
- /** 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". */
1532
- facet_query?: string;
1533
- /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
1534
- num_typos?: string;
1535
- /** Results from this specific page number would be fetched. */
1536
- page?: number;
1537
- /** Number of results to fetch per page. Default: 10 */
1538
- per_page?: number;
1539
- /** Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10. */
1540
- limit?: number;
1541
- /** Identifies the starting point to return hits from a result set. Can be used as an alternative to the page parameter. */
1542
- offset?: number;
1543
- /** 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. */
1544
- group_by?: string;
1545
- /** 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 */
1546
- group_limit?: number;
1547
- /** 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 */
1548
- group_missing_values?: boolean;
1549
- /** List of fields from the document to include in the search result */
1550
- include_fields?: string;
1551
- /** List of fields from the document to exclude in the search result */
1552
- exclude_fields?: string;
1553
- /** List of fields which should be highlighted fully without snippeting */
1554
- highlight_full_fields?: string;
1555
- /** The number of tokens that should surround the highlighted text on each side. Default: 4 */
1556
- highlight_affix_num_tokens?: number;
1557
- /** The start tag used for the highlighted snippets. Default: `<mark>` */
1558
- highlight_start_tag?: string;
1559
- /** The end tag used for the highlighted snippets. Default: `</mark>` */
1560
- highlight_end_tag?: string;
1561
- /** Flag for enabling/disabling the deprecated, old highlight structure in the response. Default: true */
1562
- enable_highlight_v1?: boolean;
1563
- /** Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script). */
1564
- enable_analytics?: boolean;
1565
- /** Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 */
1566
- snippet_threshold?: number;
1567
- /** List of synonym set names to associate with this search query */
1568
- synonym_sets?: string;
1569
- /** 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 */
1570
- drop_tokens_threshold?: number;
1571
- drop_tokens_mode?: DropTokensMode | (string & {});
1572
- /** 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 */
1573
- typo_tokens_threshold?: number;
1574
- /** Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. */
1575
- enable_typos_for_alpha_numerical_tokens?: boolean;
1576
- /** Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false */
1577
- filter_curated_hits?: boolean;
1578
- /** 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 */
1579
- enable_synonyms?: boolean;
1580
- /** Allow synonym resolution on word prefixes in the query. Default: false */
1581
- synonym_prefix?: boolean;
1582
- /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
1583
- synonym_num_typos?: number;
1584
- /** 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`. */
1585
- pinned_hits?: string;
1586
- /** 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`. */
1587
- hidden_hits?: string;
1588
- /** Comma separated list of tags to trigger the curations rules that match the tags. */
1589
- curation_tags?: string;
1590
- /** A list of custom fields that must be highlighted even if you don't query for them */
1591
- highlight_fields?: string;
1592
- /** 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`. */
1593
- split_join_tokens?: string;
1594
- /** 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 */
1595
- pre_segmented_query?: boolean;
1596
- /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
1597
- preset?: string;
1598
- /** 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 */
1599
- enable_curations?: boolean;
1600
- /** Set this parameter to true to ensure that an exact match is ranked above the others */
1601
- prioritize_exact_match?: boolean;
1602
- /** Control the number of words that Typesense considers for typo and prefix searching. */
1603
- max_candidates?: number;
1604
- /** Make Typesense prioritize documents where the query words appear earlier in the text. */
1605
- prioritize_token_position?: boolean;
1606
- /** Make Typesense prioritize documents where the query words appear in more number of fields. */
1607
- prioritize_num_matching_fields?: boolean;
1608
- /** Make Typesense disable typos for numerical tokens. */
1609
- enable_typos_for_numerical_tokens?: boolean;
1610
- /** 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). */
1611
- exhaustive_search?: boolean;
1612
- /** 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. */
1613
- search_cutoff_ms?: number;
1614
- /** Enable server side caching of search query results. By default, caching is disabled. */
1615
- use_cache?: boolean;
1616
- /** 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. */
1617
- cache_ttl?: number;
1618
- /** Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
1619
- min_len_1typo?: number;
1620
- /** Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. */
1621
- min_len_2typo?: number;
1622
- /** Vector query expression for fetching documents "closest" to a given query/document vector. */
1623
- vector_query?: string;
1624
- /** Timeout (in milliseconds) for fetching remote embeddings. */
1625
- remote_embedding_timeout_ms?: number;
1626
- /** Number of times to retry fetching remote embeddings. */
1627
- remote_embedding_num_tries?: number;
1628
- /** Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default). */
1629
- facet_strategy?: string;
1630
- /** Name of the stopwords set to apply for this search, the keywords present in the set will be removed from the search query. */
1631
- stopwords?: string;
1632
- /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
1633
- facet_return_parent?: string;
1634
- /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
1635
- voice_query?: string;
1636
- /** Enable conversational search. */
1637
- conversation?: boolean;
1638
- /** The Id of Conversation Model to be used. */
1639
- conversation_model_id?: string;
1640
- /** The Id of a previous conversation to continue, this tells Typesense to include prior context when communicating with the LLM. */
1641
- conversation_id?: string;
1051
+ export interface APIStatsResponse {
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;
1642
1065
  }
1643
- export declare const SearchParameters: S.Schema<SearchParameters>;
1644
- export type MultiSearchSearchesParameterSearchesList = Array<MultiSearchCollectionParameters>;
1645
- export declare const MultiSearchSearchesParameterSearchesList: S.Schema<MultiSearchSearchesParameterSearchesList>;
1646
- export interface MultiSearchSearchesParameter {
1647
- /** When true, merges the search results from each search query into a single ordered set of hits. */
1648
- union?: boolean;
1649
- searches: MultiSearchSearchesParameterSearchesList;
1066
+ export interface GetCollectionRequest {
1067
+ /** The name of the collection to retrieve */
1068
+ collectionName: string;
1650
1069
  }
1651
- export declare const MultiSearchSearchesParameter: S.Schema<MultiSearchSearchesParameter>;
1652
- export type PresetSchemaValue = SearchParameters | MultiSearchSearchesParameter;
1653
- export declare const PresetSchemaValue: any;
1654
- export interface PresetSchema {
1655
- value: PresetSchemaValue;
1070
+ /** A list of fields for querying, filtering and faceting */
1071
+ export type GetCollectionResponseFieldsList = Array<Field>;
1072
+ /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
1073
+ export type GetCollectionResponseTokenSeparatorsList = Array<string>;
1074
+ /** List of synonym set names to associate with this collection */
1075
+ export type GetCollectionResponseSynonymSetsList = Array<string>;
1076
+ /** List of symbols or special characters to be indexed. */
1077
+ export type GetCollectionResponseSymbolsToIndexList = Array<string>;
1078
+ export interface GetCollectionResponse {
1079
+ /** Name of the collection */
1656
1080
  name: string;
1081
+ /** A list of fields for querying, filtering and faceting */
1082
+ fields: GetCollectionResponseFieldsList;
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 | undefined;
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 | undefined;
1087
+ /** List of synonym set names to associate with this collection */
1088
+ synonym_sets?: GetCollectionResponseSynonymSetsList | undefined;
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 | undefined;
1091
+ /** List of symbols or special characters to be indexed. */
1092
+ symbols_to_index?: GetCollectionResponseSymbolsToIndexList | undefined;
1093
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
1094
+ /** Optional details about the collection, e.g., when it was created, who created it etc. */
1095
+ metadata?: unknown | undefined;
1096
+ /** Number of documents in the collection */
1097
+ num_documents: number;
1098
+ /** Timestamp of when the collection was created (Unix epoch in seconds) */
1099
+ created_at: number;
1657
1100
  }
1658
- export declare const PresetSchema: S.Schema<PresetSchema>;
1659
- export type PresetsRetrieveSchemaPresetsList = Array<PresetSchema>;
1660
- export declare const PresetsRetrieveSchemaPresetsList: S.Schema<PresetsRetrieveSchemaPresetsList>;
1661
- export interface PresetsRetrieveSchema {
1662
- presets: PresetsRetrieveSchemaPresetsList;
1101
+ export interface GetCollectionsRequestGetCollectionsParameters {
1102
+ /** Comma-separated list of fields from the collection to exclude from the response */
1103
+ exclude_fields?: string | undefined;
1104
+ /** Number of collections to fetch. Default: returns all collections. */
1105
+ limit?: number | undefined;
1106
+ /** Identifies the starting point to return collections when paginating. */
1107
+ offset?: number | undefined;
1663
1108
  }
1664
- export declare const PresetsRetrieveSchema: S.Schema<PresetsRetrieveSchema>;
1665
- export interface RetrieveAnalyticsRuleRequest {
1666
- /** The name of the analytics rule to retrieve */
1667
- ruleName: string;
1109
+ export interface GetCollectionsRequest {
1110
+ getCollectionsParameters?: GetCollectionsRequestGetCollectionsParameters | undefined;
1668
1111
  }
1669
- export declare const RetrieveAnalyticsRuleRequest: S.Schema<RetrieveAnalyticsRuleRequest>;
1670
- export type RetrieveAnalyticsRuleResponseParamsMetaFieldsList = Array<string>;
1671
- export declare const RetrieveAnalyticsRuleResponseParamsMetaFieldsList: S.Schema<RetrieveAnalyticsRuleResponseParamsMetaFieldsList>;
1672
- export interface RetrieveAnalyticsRuleResponseParams {
1673
- destination_collection?: string;
1674
- limit?: number;
1675
- capture_search_requests?: boolean;
1676
- meta_fields?: RetrieveAnalyticsRuleResponseParamsMetaFieldsList;
1677
- expand_query?: boolean;
1678
- counter_field?: string;
1679
- weight?: number;
1680
- }
1681
- export declare const RetrieveAnalyticsRuleResponseParams: S.Schema<RetrieveAnalyticsRuleResponseParams>;
1682
- export interface RetrieveAnalyticsRuleResponse {
1112
+ /** A list of fields for querying, filtering and faceting */
1113
+ export type CollectionResponseFieldsList = Array<Field>;
1114
+ /** List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. */
1115
+ export type CollectionResponseTokenSeparatorsList = Array<string>;
1116
+ /** List of synonym set names to associate with this collection */
1117
+ export type CollectionResponseSynonymSetsList = Array<string>;
1118
+ /** List of symbols or special characters to be indexed. */
1119
+ export type CollectionResponseSymbolsToIndexList = Array<string>;
1120
+ export interface CollectionResponse {
1121
+ /** Name of the collection */
1683
1122
  name: string;
1684
- type: AnalyticsRuleType;
1685
- collection: string;
1686
- event_type: string;
1687
- rule_tag?: string;
1688
- params?: RetrieveAnalyticsRuleResponseParams;
1689
- }
1690
- export declare const RetrieveAnalyticsRuleResponse: S.Schema<RetrieveAnalyticsRuleResponse>;
1691
- export interface RetrieveAnalyticsRulesRequest {
1692
- /** Filter rules by rule_tag */
1693
- rule_tag?: string;
1694
- }
1695
- export declare const RetrieveAnalyticsRulesRequest: S.Schema<RetrieveAnalyticsRulesRequest>;
1696
- export type RetrieveAnalyticsRulesResponseBodyList = Array<AnalyticsRule>;
1697
- export declare const RetrieveAnalyticsRulesResponseBodyList: S.Schema<RetrieveAnalyticsRulesResponseBodyList>;
1698
- export type RetrieveAnalyticsRulesResponse = RetrieveAnalyticsRulesResponseBodyList;
1699
- export declare const RetrieveAnalyticsRulesResponse: S.Schema<RetrieveAnalyticsRulesResponse>;
1700
- export interface RetrieveAPIStatsRequest {
1123
+ /** A list of fields for querying, filtering and faceting */
1124
+ fields: CollectionResponseFieldsList;
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 | undefined;
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 | undefined;
1129
+ /** List of synonym set names to associate with this collection */
1130
+ synonym_sets?: CollectionResponseSynonymSetsList | undefined;
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 | undefined;
1133
+ /** List of symbols or special characters to be indexed. */
1134
+ symbols_to_index?: CollectionResponseSymbolsToIndexList | undefined;
1135
+ voice_query_model?: VoiceQueryModelCollectionConfig | undefined;
1136
+ /** Optional details about the collection, e.g., when it was created, who created it etc. */
1137
+ metadata?: unknown | undefined;
1138
+ /** Number of documents in the collection */
1139
+ num_documents: number;
1140
+ /** Timestamp of when the collection was created (Unix epoch in seconds) */
1141
+ created_at: number;
1701
1142
  }
1702
- export declare const RetrieveAPIStatsRequest: S.Schema<RetrieveAPIStatsRequest>;
1703
- export interface APIStatsResponse {
1704
- delete_latency_ms?: number;
1705
- delete_requests_per_second?: number;
1706
- import_latency_ms?: number;
1707
- import_requests_per_second?: number;
1708
- latency_ms?: unknown;
1709
- overloaded_requests_per_second?: number;
1710
- pending_write_batches?: number;
1711
- requests_per_second?: unknown;
1712
- search_latency_ms?: number;
1713
- search_requests_per_second?: number;
1714
- total_requests_per_second?: number;
1715
- write_latency_ms?: number;
1716
- write_requests_per_second?: number;
1717
- }
1718
- export declare const APIStatsResponse: S.Schema<APIStatsResponse>;
1719
- export interface RetrieveConversationModelRequest {
1143
+ export type GetCollectionsResponseBodyList = Array<CollectionResponse>;
1144
+ export type GetCollectionsResponse = GetCollectionsResponseBodyList;
1145
+ export interface GetConversationModelRequest {
1720
1146
  /** The id of the conversation model to retrieve */
1721
1147
  modelId: string;
1722
1148
  }
1723
- export declare const RetrieveConversationModelRequest: S.Schema<RetrieveConversationModelRequest>;
1724
- export interface RetrieveConversationModelResponse {
1149
+ export interface GetConversationModelResponse {
1725
1150
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
1726
1151
  id: string;
1727
1152
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
1728
1153
  model_name: string;
1729
1154
  /** The LLM service's API Key */
1730
- api_key?: string | import("effect/Redacted").Redacted<string>;
1155
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
1731
1156
  /** Typesense collection that stores the historical conversations */
1732
1157
  history_collection: string;
1733
1158
  /** LLM service's account ID (only applicable for Cloudflare) */
1734
- account_id?: string;
1159
+ account_id?: string | undefined;
1735
1160
  /** The system prompt that contains special instructions to the LLM */
1736
- system_prompt?: string;
1161
+ system_prompt?: string | undefined;
1737
1162
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
1738
- ttl?: number;
1163
+ ttl?: number | undefined;
1739
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. */
1740
1165
  max_bytes: number;
1741
1166
  /** URL of vLLM service */
1742
- vllm_url?: string;
1167
+ vllm_url?: string | undefined;
1743
1168
  }
1744
- export declare const RetrieveConversationModelResponse: S.Schema<RetrieveConversationModelResponse>;
1745
- export interface RetrieveCurationSetRequest {
1169
+ export interface GetCurationSetRequest {
1746
1170
  /** The name of the curation set to retrieve */
1747
1171
  curationSetName: string;
1748
1172
  }
1749
- export declare const RetrieveCurationSetRequest: S.Schema<RetrieveCurationSetRequest>;
1750
1173
  /** List of tag values to associate with this curation rule. */
1751
1174
  export type CurationRuleTagsList = Array<string>;
1752
- export declare const CurationRuleTagsList: S.Schema<CurationRuleTagsList>;
1753
1175
  /** 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. */
1754
1176
  export type CurationRuleMatch = "exact" | "contains";
1755
- export declare const CurationRuleMatch: any;
1756
1177
  export interface CurationRule {
1757
1178
  /** List of tag values to associate with this curation rule. */
1758
- tags?: CurationRuleTagsList;
1179
+ tags?: CurationRuleTagsList | undefined;
1759
1180
  /** Indicates what search queries should be curated */
1760
- query?: string;
1181
+ query?: string | undefined;
1761
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. */
1762
- match?: CurationRuleMatch | (string & {});
1183
+ match?: CurationRuleMatch | (string & {}) | undefined;
1763
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). */
1764
- filter_by?: string;
1185
+ filter_by?: string | undefined;
1765
1186
  }
1766
- export declare const CurationRule: S.Schema<CurationRule>;
1767
1187
  export interface CurationInclude {
1768
1188
  /** document id that should be included */
1769
1189
  id: string;
1770
1190
  /** position number where document should be included in the search results */
1771
1191
  position: number;
1772
1192
  }
1773
- export declare const CurationInclude: S.Schema<CurationInclude>;
1774
1193
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1775
1194
  export type CurationItemCreateSchemaIncludesList = Array<CurationInclude>;
1776
- export declare const CurationItemCreateSchemaIncludesList: S.Schema<CurationItemCreateSchemaIncludesList>;
1777
1195
  export interface CurationExclude {
1778
1196
  /** document id that should be excluded from the search results. */
1779
1197
  id: string;
1780
1198
  }
1781
- export declare const CurationExclude: S.Schema<CurationExclude>;
1782
1199
  /** List of document `id`s that should be excluded from the search results. */
1783
1200
  export type CurationItemCreateSchemaExcludesList = Array<CurationExclude>;
1784
- export declare const CurationItemCreateSchemaExcludesList: S.Schema<CurationItemCreateSchemaExcludesList>;
1785
1201
  export interface CurationItemCreateSchema {
1786
1202
  rule: CurationRule;
1787
1203
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1788
- includes?: CurationItemCreateSchemaIncludesList;
1204
+ includes?: CurationItemCreateSchemaIncludesList | undefined;
1789
1205
  /** List of document `id`s that should be excluded from the search results. */
1790
- excludes?: CurationItemCreateSchemaExcludesList;
1206
+ excludes?: CurationItemCreateSchemaExcludesList | undefined;
1791
1207
  /** A filter by clause that is applied to any search query that matches the curation rule. */
1792
- filter_by?: string;
1208
+ filter_by?: string | undefined;
1793
1209
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
1794
- remove_matched_tokens?: boolean;
1210
+ remove_matched_tokens?: boolean | undefined;
1795
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. */
1796
- metadata?: unknown;
1212
+ metadata?: unknown | undefined;
1797
1213
  /** A sort by clause that is applied to any search query that matches the curation rule. */
1798
- sort_by?: string;
1214
+ sort_by?: string | undefined;
1799
1215
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
1800
- replace_query?: string;
1216
+ replace_query?: string | undefined;
1801
1217
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
1802
- filter_curated_hits?: boolean;
1218
+ filter_curated_hits?: boolean | undefined;
1803
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. */
1804
- effective_from_ts?: number;
1220
+ effective_from_ts?: number | undefined;
1805
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. */
1806
- effective_to_ts?: number;
1222
+ effective_to_ts?: number | undefined;
1807
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. */
1808
- stop_processing?: boolean;
1224
+ stop_processing?: boolean | undefined;
1809
1225
  /** ID of the curation item */
1810
- id?: string;
1226
+ id?: string | undefined;
1811
1227
  }
1812
- export declare const CurationItemCreateSchema: S.Schema<CurationItemCreateSchema>;
1813
1228
  /** Array of curation items */
1814
- export type RetrieveCurationSetResponseItemsList = Array<CurationItemCreateSchema>;
1815
- export declare const RetrieveCurationSetResponseItemsList: S.Schema<RetrieveCurationSetResponseItemsList>;
1816
- export interface RetrieveCurationSetResponse {
1229
+ export type GetCurationSetResponseItemsList = Array<CurationItemCreateSchema>;
1230
+ export interface GetCurationSetResponse {
1817
1231
  /** Array of curation items */
1818
- items: RetrieveCurationSetResponseItemsList;
1232
+ items: GetCurationSetResponseItemsList;
1819
1233
  /** Optional description for the curation set */
1820
- description?: string;
1234
+ description?: string | undefined;
1821
1235
  name: string;
1822
1236
  }
1823
- export declare const RetrieveCurationSetResponse: S.Schema<RetrieveCurationSetResponse>;
1824
- export interface RetrieveCurationSetItemRequest {
1237
+ export interface GetCurationSetItemRequest {
1825
1238
  /** The name of the curation set */
1826
1239
  curationSetName: string;
1827
1240
  /** The id of the curation item to retrieve */
1828
1241
  itemId: string;
1829
1242
  }
1830
- export declare const RetrieveCurationSetItemRequest: S.Schema<RetrieveCurationSetItemRequest>;
1831
1243
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1832
- export type RetrieveCurationSetItemResponseIncludesList = Array<CurationInclude>;
1833
- export declare const RetrieveCurationSetItemResponseIncludesList: S.Schema<RetrieveCurationSetItemResponseIncludesList>;
1244
+ export type GetCurationSetItemResponseIncludesList = Array<CurationInclude>;
1834
1245
  /** List of document `id`s that should be excluded from the search results. */
1835
- export type RetrieveCurationSetItemResponseExcludesList = Array<CurationExclude>;
1836
- export declare const RetrieveCurationSetItemResponseExcludesList: S.Schema<RetrieveCurationSetItemResponseExcludesList>;
1837
- export interface RetrieveCurationSetItemResponse {
1246
+ export type GetCurationSetItemResponseExcludesList = Array<CurationExclude>;
1247
+ export interface GetCurationSetItemResponse {
1838
1248
  rule: CurationRule;
1839
1249
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1840
- includes?: RetrieveCurationSetItemResponseIncludesList;
1250
+ includes?: GetCurationSetItemResponseIncludesList | undefined;
1841
1251
  /** List of document `id`s that should be excluded from the search results. */
1842
- excludes?: RetrieveCurationSetItemResponseExcludesList;
1252
+ excludes?: GetCurationSetItemResponseExcludesList | undefined;
1843
1253
  /** A filter by clause that is applied to any search query that matches the curation rule. */
1844
- filter_by?: string;
1254
+ filter_by?: string | undefined;
1845
1255
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
1846
- remove_matched_tokens?: boolean;
1256
+ remove_matched_tokens?: boolean | undefined;
1847
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. */
1848
- metadata?: unknown;
1258
+ metadata?: unknown | undefined;
1849
1259
  /** A sort by clause that is applied to any search query that matches the curation rule. */
1850
- sort_by?: string;
1260
+ sort_by?: string | undefined;
1851
1261
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
1852
- replace_query?: string;
1262
+ replace_query?: string | undefined;
1853
1263
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
1854
- filter_curated_hits?: boolean;
1264
+ filter_curated_hits?: boolean | undefined;
1855
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. */
1856
- effective_from_ts?: number;
1266
+ effective_from_ts?: number | undefined;
1857
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. */
1858
- effective_to_ts?: number;
1268
+ effective_to_ts?: number | undefined;
1859
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. */
1860
- stop_processing?: boolean;
1270
+ stop_processing?: boolean | undefined;
1861
1271
  /** ID of the curation item */
1862
1272
  id: string;
1863
1273
  }
1864
- export declare const RetrieveCurationSetItemResponse: S.Schema<RetrieveCurationSetItemResponse>;
1865
- export interface RetrieveCurationSetItemsRequest {
1274
+ export interface GetCurationSetItemsRequest {
1866
1275
  /** The name of the curation set to retrieve items for */
1867
1276
  curationSetName: string;
1868
1277
  }
1869
- export declare const RetrieveCurationSetItemsRequest: S.Schema<RetrieveCurationSetItemsRequest>;
1870
1278
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1871
1279
  export type CurationItemSchemaIncludesList = Array<CurationInclude>;
1872
- export declare const CurationItemSchemaIncludesList: S.Schema<CurationItemSchemaIncludesList>;
1873
1280
  /** List of document `id`s that should be excluded from the search results. */
1874
1281
  export type CurationItemSchemaExcludesList = Array<CurationExclude>;
1875
- export declare const CurationItemSchemaExcludesList: S.Schema<CurationItemSchemaExcludesList>;
1876
1282
  export interface CurationItemSchema {
1877
1283
  rule: CurationRule;
1878
1284
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
1879
- includes?: CurationItemSchemaIncludesList;
1285
+ includes?: CurationItemSchemaIncludesList | undefined;
1880
1286
  /** List of document `id`s that should be excluded from the search results. */
1881
- excludes?: CurationItemSchemaExcludesList;
1287
+ excludes?: CurationItemSchemaExcludesList | undefined;
1882
1288
  /** A filter by clause that is applied to any search query that matches the curation rule. */
1883
- filter_by?: string;
1289
+ filter_by?: string | undefined;
1884
1290
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
1885
- remove_matched_tokens?: boolean;
1291
+ remove_matched_tokens?: boolean | undefined;
1886
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. */
1887
- metadata?: unknown;
1293
+ metadata?: unknown | undefined;
1888
1294
  /** A sort by clause that is applied to any search query that matches the curation rule. */
1889
- sort_by?: string;
1295
+ sort_by?: string | undefined;
1890
1296
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
1891
- replace_query?: string;
1297
+ replace_query?: string | undefined;
1892
1298
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
1893
- filter_curated_hits?: boolean;
1299
+ filter_curated_hits?: boolean | undefined;
1894
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. */
1895
- effective_from_ts?: number;
1301
+ effective_from_ts?: number | undefined;
1896
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. */
1897
- effective_to_ts?: number;
1303
+ effective_to_ts?: number | undefined;
1898
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. */
1899
- stop_processing?: boolean;
1305
+ stop_processing?: boolean | undefined;
1900
1306
  /** ID of the curation item */
1901
1307
  id: string;
1902
1308
  }
1903
- export declare const CurationItemSchema: S.Schema<CurationItemSchema>;
1904
- export type RetrieveCurationSetItemsResponseBodyList = Array<CurationItemSchema>;
1905
- export declare const RetrieveCurationSetItemsResponseBodyList: S.Schema<RetrieveCurationSetItemsResponseBodyList>;
1906
- export type RetrieveCurationSetItemsResponse = RetrieveCurationSetItemsResponseBodyList;
1907
- export declare const RetrieveCurationSetItemsResponse: S.Schema<RetrieveCurationSetItemsResponse>;
1908
- export interface RetrieveCurationSetsRequest {
1309
+ export type GetCurationSetItemsResponseBodyList = Array<CurationItemSchema>;
1310
+ export type GetCurationSetItemsResponse = GetCurationSetItemsResponseBodyList;
1311
+ export interface GetCurationSetsRequest {
1909
1312
  }
1910
- export declare const RetrieveCurationSetsRequest: S.Schema<RetrieveCurationSetsRequest>;
1911
1313
  /** Array of curation items */
1912
1314
  export type CurationSetSchemaItemsList = Array<CurationItemCreateSchema>;
1913
- export declare const CurationSetSchemaItemsList: S.Schema<CurationSetSchemaItemsList>;
1914
1315
  export interface CurationSetSchema {
1915
1316
  /** Array of curation items */
1916
1317
  items: CurationSetSchemaItemsList;
1917
1318
  /** Optional description for the curation set */
1918
- description?: string;
1319
+ description?: string | undefined;
1919
1320
  name: string;
1920
1321
  }
1921
- export declare const CurationSetSchema: S.Schema<CurationSetSchema>;
1922
- export type RetrieveCurationSetsResponseBodyList = Array<CurationSetSchema>;
1923
- export declare const RetrieveCurationSetsResponseBodyList: S.Schema<RetrieveCurationSetsResponseBodyList>;
1924
- export type RetrieveCurationSetsResponse = RetrieveCurationSetsResponseBodyList;
1925
- export declare const RetrieveCurationSetsResponse: S.Schema<RetrieveCurationSetsResponse>;
1926
- export interface RetrieveMetricsRequest {
1927
- }
1928
- export declare const RetrieveMetricsRequest: S.Schema<RetrieveMetricsRequest>;
1929
- export type RetrieveMetricsResponse = unknown;
1930
- export declare const RetrieveMetricsResponse: S.Schema<RetrieveMetricsResponse>;
1931
- export interface RetrieveNLSearchModelRequest {
1322
+ export type GetCurationSetsResponseBodyList = Array<CurationSetSchema>;
1323
+ export type GetCurationSetsResponse = GetCurationSetsResponseBodyList;
1324
+ export interface GetDocumentRequest {
1325
+ /** The name of the collection to search for the document under */
1326
+ collectionName: string;
1327
+ /** The Document ID */
1328
+ documentId: string;
1329
+ }
1330
+ export type GetDocumentResponse = unknown;
1331
+ export interface GetKeyRequest {
1332
+ /** The ID of the key to retrieve */
1333
+ keyId: number;
1334
+ }
1335
+ export type GetKeyResponseActionsList = Array<string>;
1336
+ export type GetKeyResponseCollectionsList = Array<string>;
1337
+ export interface GetKeyResponse {
1338
+ value?: string | undefined;
1339
+ description: string;
1340
+ actions: GetKeyResponseActionsList;
1341
+ collections: GetKeyResponseCollectionsList;
1342
+ expires_at?: number | undefined;
1343
+ id?: number | undefined;
1344
+ value_prefix?: string | undefined;
1345
+ }
1346
+ export interface GetKeysRequest {
1347
+ }
1348
+ export type ApiKeyActionsList = Array<string>;
1349
+ export type ApiKeyCollectionsList = Array<string>;
1350
+ export interface ApiKey {
1351
+ value?: string | undefined;
1352
+ description: string;
1353
+ actions: ApiKeyActionsList;
1354
+ collections: ApiKeyCollectionsList;
1355
+ expires_at?: number | undefined;
1356
+ id?: number | undefined;
1357
+ value_prefix?: string | undefined;
1358
+ }
1359
+ export type ApiKeysResponseKeysList = Array<ApiKey>;
1360
+ export interface ApiKeysResponse {
1361
+ keys: ApiKeysResponseKeysList;
1362
+ }
1363
+ export interface GetMetricsRequest {
1364
+ }
1365
+ export type GetMetricsResponse = unknown;
1366
+ export interface GetNLSearchModelRequest {
1932
1367
  /** The ID of the NL search model to retrieve */
1933
1368
  modelId: string;
1934
1369
  }
1935
- export declare const RetrieveNLSearchModelRequest: S.Schema<RetrieveNLSearchModelRequest>;
1936
1370
  /** Stop sequences for the NL model (Google-specific) */
1937
- export type RetrieveNLSearchModelResponseStopSequencesList = Array<string>;
1938
- export declare const RetrieveNLSearchModelResponseStopSequencesList: S.Schema<RetrieveNLSearchModelResponseStopSequencesList>;
1939
- export interface RetrieveNLSearchModelResponse {
1371
+ export type GetNLSearchModelResponseStopSequencesList = Array<string>;
1372
+ export interface GetNLSearchModelResponse {
1940
1373
  /** Name of the NL model to use */
1941
- model_name?: string;
1374
+ model_name?: string | undefined;
1942
1375
  /** API key for the NL model service */
1943
- api_key?: string | import("effect/Redacted").Redacted<string>;
1376
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
1944
1377
  /** Custom API URL for the NL model service */
1945
- api_url?: string;
1378
+ api_url?: string | undefined;
1946
1379
  /** Maximum number of bytes to process */
1947
- max_bytes?: number;
1380
+ max_bytes?: number | undefined;
1948
1381
  /** Temperature parameter for the NL model */
1949
- temperature?: number;
1382
+ temperature?: number | undefined;
1950
1383
  /** System prompt for the NL model */
1951
- system_prompt?: string;
1384
+ system_prompt?: string | undefined;
1952
1385
  /** Top-p parameter for the NL model (Google-specific) */
1953
- top_p?: number;
1386
+ top_p?: number | undefined;
1954
1387
  /** Top-k parameter for the NL model (Google-specific) */
1955
- top_k?: number;
1388
+ top_k?: number | undefined;
1956
1389
  /** Stop sequences for the NL model (Google-specific) */
1957
- stop_sequences?: RetrieveNLSearchModelResponseStopSequencesList;
1390
+ stop_sequences?: GetNLSearchModelResponseStopSequencesList | undefined;
1958
1391
  /** API version for the NL model service */
1959
- api_version?: string;
1392
+ api_version?: string | undefined;
1960
1393
  /** Project ID for GCP Vertex AI */
1961
- project_id?: string;
1394
+ project_id?: string | undefined;
1962
1395
  /** Access token for GCP Vertex AI */
1963
- access_token?: string | import("effect/Redacted").Redacted<string>;
1396
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
1964
1397
  /** Refresh token for GCP Vertex AI */
1965
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
1398
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
1966
1399
  /** Client ID for GCP Vertex AI */
1967
- client_id?: string;
1400
+ client_id?: string | undefined;
1968
1401
  /** Client secret for GCP Vertex AI */
1969
- client_secret?: string | import("effect/Redacted").Redacted<string>;
1402
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
1970
1403
  /** Region for GCP Vertex AI */
1971
- region?: string;
1404
+ region?: string | undefined;
1972
1405
  /** Maximum output tokens for GCP Vertex AI */
1973
- max_output_tokens?: number;
1406
+ max_output_tokens?: number | undefined;
1974
1407
  /** Account ID for Cloudflare-specific models */
1975
- account_id?: string;
1408
+ account_id?: string | undefined;
1976
1409
  /** Optional ID for the NL search model */
1977
1410
  id: string;
1978
1411
  }
1979
- export declare const RetrieveNLSearchModelResponse: S.Schema<RetrieveNLSearchModelResponse>;
1980
- export interface RetrievePresetRequest {
1981
- /** The ID of the preset to retrieve. */
1982
- presetId: string;
1983
- }
1984
- export declare const RetrievePresetRequest: S.Schema<RetrievePresetRequest>;
1985
- export type RetrievePresetResponseValue = SearchParameters | MultiSearchSearchesParameter;
1986
- export declare const RetrievePresetResponseValue: any;
1987
- export interface RetrievePresetResponse {
1988
- value: RetrievePresetResponseValue;
1989
- name: string;
1990
- }
1991
- export declare const RetrievePresetResponse: S.Schema<RetrievePresetResponse>;
1992
- export interface RetrieveStopwordsSetRequest {
1412
+ export interface GetPresetRequest {
1413
+ /** The ID of the preset to retrieve. */
1414
+ presetId: string;
1415
+ }
1416
+ export type GetPresetResponseValue = SearchParameters | MultiSearchSearchesParameter;
1417
+ export interface GetPresetResponse {
1418
+ value: GetPresetResponseValue;
1419
+ name: string;
1420
+ }
1421
+ export interface GetSchemaChangesRequest {
1422
+ }
1423
+ export interface SchemaChangeStatus {
1424
+ /** Name of the collection being modified */
1425
+ collection?: string | undefined;
1426
+ /** Number of documents that have been validated */
1427
+ validated_docs?: number | undefined;
1428
+ /** Number of documents that have been altered */
1429
+ altered_docs?: number | undefined;
1430
+ }
1431
+ export type GetSchemaChangesResponseBodyList = Array<SchemaChangeStatus>;
1432
+ export type GetSchemaChangesResponse = GetSchemaChangesResponseBodyList;
1433
+ export interface GetStemmingDictionaryRequest {
1434
+ /** The ID of the dictionary to retrieve */
1435
+ dictionaryId: string;
1436
+ }
1437
+ export interface StemmingDictionaryWordsItem {
1438
+ /** The word form to be stemmed */
1439
+ word: string;
1440
+ /** The root form of the word */
1441
+ root: string;
1442
+ }
1443
+ /** List of word mappings in the dictionary */
1444
+ export type StemmingDictionaryWordsList = Array<StemmingDictionaryWordsItem>;
1445
+ export interface StemmingDictionary {
1446
+ /** Unique identifier for the dictionary */
1447
+ id: string;
1448
+ /** List of word mappings in the dictionary */
1449
+ words: StemmingDictionaryWordsList;
1450
+ }
1451
+ export interface GetStopwordsSetRequest {
1993
1452
  /** The ID of the stopwords set to retrieve. */
1994
1453
  setId: string;
1995
1454
  }
1996
- export declare const RetrieveStopwordsSetRequest: S.Schema<RetrieveStopwordsSetRequest>;
1997
1455
  export type StopwordsSetSchemaStopwordsList = Array<string>;
1998
- export declare const StopwordsSetSchemaStopwordsList: S.Schema<StopwordsSetSchemaStopwordsList>;
1999
1456
  export interface StopwordsSetSchema {
2000
1457
  id: string;
2001
1458
  stopwords: StopwordsSetSchemaStopwordsList;
2002
- locale?: string;
1459
+ locale?: string | undefined;
2003
1460
  }
2004
- export declare const StopwordsSetSchema: S.Schema<StopwordsSetSchema>;
2005
1461
  export interface StopwordsSetRetrieveSchema {
2006
1462
  stopwords: StopwordsSetSchema;
2007
1463
  }
2008
- export declare const StopwordsSetRetrieveSchema: S.Schema<StopwordsSetRetrieveSchema>;
2009
- export interface RetrieveStopwordsSetsRequest {
1464
+ export interface GetStopwordsSetsRequest {
2010
1465
  }
2011
- export declare const RetrieveStopwordsSetsRequest: S.Schema<RetrieveStopwordsSetsRequest>;
2012
1466
  export type StopwordsSetsRetrieveAllSchemaStopwordsList = Array<StopwordsSetSchema>;
2013
- export declare const StopwordsSetsRetrieveAllSchemaStopwordsList: S.Schema<StopwordsSetsRetrieveAllSchemaStopwordsList>;
2014
1467
  export interface StopwordsSetsRetrieveAllSchema {
2015
1468
  stopwords: StopwordsSetsRetrieveAllSchemaStopwordsList;
2016
1469
  }
2017
- export declare const StopwordsSetsRetrieveAllSchema: S.Schema<StopwordsSetsRetrieveAllSchema>;
2018
- export interface RetrieveSynonymSetRequest {
1470
+ export interface GetSynonymSetRequest {
2019
1471
  /** The name of the synonym set to retrieve */
2020
1472
  synonymSetName: string;
2021
1473
  }
2022
- export declare const RetrieveSynonymSetRequest: S.Schema<RetrieveSynonymSetRequest>;
2023
1474
  /** Array of words that should be considered as synonyms */
2024
1475
  export type SynonymItemSchemaSynonymsList = Array<string>;
2025
- export declare const SynonymItemSchemaSynonymsList: S.Schema<SynonymItemSchemaSynonymsList>;
2026
1476
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
2027
1477
  export type SynonymItemSchemaSymbolsToIndexList = Array<string>;
2028
- export declare const SynonymItemSchemaSymbolsToIndexList: S.Schema<SynonymItemSchemaSymbolsToIndexList>;
2029
1478
  export interface SynonymItemSchema {
2030
1479
  /** Unique identifier for the synonym item */
2031
1480
  id: string;
2032
1481
  /** Array of words that should be considered as synonyms */
2033
1482
  synonyms: SynonymItemSchemaSynonymsList;
2034
1483
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
2035
- root?: string;
1484
+ root?: string | undefined;
2036
1485
  /** Locale for the synonym, leave blank to use the standard tokenizer */
2037
- locale?: string;
1486
+ locale?: string | undefined;
2038
1487
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
2039
- symbols_to_index?: SynonymItemSchemaSymbolsToIndexList;
1488
+ symbols_to_index?: SynonymItemSchemaSymbolsToIndexList | undefined;
2040
1489
  }
2041
- export declare const SynonymItemSchema: S.Schema<SynonymItemSchema>;
2042
1490
  /** Array of synonym items */
2043
- export type RetrieveSynonymSetResponseItemsList = Array<SynonymItemSchema>;
2044
- export declare const RetrieveSynonymSetResponseItemsList: S.Schema<RetrieveSynonymSetResponseItemsList>;
2045
- export interface RetrieveSynonymSetResponse {
1491
+ export type GetSynonymSetResponseItemsList = Array<SynonymItemSchema>;
1492
+ export interface GetSynonymSetResponse {
2046
1493
  /** Array of synonym items */
2047
- items: RetrieveSynonymSetResponseItemsList;
1494
+ items: GetSynonymSetResponseItemsList;
2048
1495
  /** Name of the synonym set */
2049
1496
  name: string;
2050
1497
  }
2051
- export declare const RetrieveSynonymSetResponse: S.Schema<RetrieveSynonymSetResponse>;
2052
- export interface RetrieveSynonymSetItemRequest {
1498
+ export interface GetSynonymSetItemRequest {
2053
1499
  /** The name of the synonym set */
2054
1500
  synonymSetName: string;
2055
1501
  /** The id of the synonym item to retrieve */
2056
1502
  itemId: string;
2057
1503
  }
2058
- export declare const RetrieveSynonymSetItemRequest: S.Schema<RetrieveSynonymSetItemRequest>;
2059
1504
  /** Array of words that should be considered as synonyms */
2060
- export type RetrieveSynonymSetItemResponseSynonymsList = Array<string>;
2061
- export declare const RetrieveSynonymSetItemResponseSynonymsList: S.Schema<RetrieveSynonymSetItemResponseSynonymsList>;
1505
+ export type GetSynonymSetItemResponseSynonymsList = Array<string>;
2062
1506
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
2063
- export type RetrieveSynonymSetItemResponseSymbolsToIndexList = Array<string>;
2064
- export declare const RetrieveSynonymSetItemResponseSymbolsToIndexList: S.Schema<RetrieveSynonymSetItemResponseSymbolsToIndexList>;
2065
- export interface RetrieveSynonymSetItemResponse {
1507
+ export type GetSynonymSetItemResponseSymbolsToIndexList = Array<string>;
1508
+ export interface GetSynonymSetItemResponse {
2066
1509
  /** Unique identifier for the synonym item */
2067
1510
  id: string;
2068
1511
  /** Array of words that should be considered as synonyms */
2069
- synonyms: RetrieveSynonymSetItemResponseSynonymsList;
1512
+ synonyms: GetSynonymSetItemResponseSynonymsList;
2070
1513
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
2071
- root?: string;
1514
+ root?: string | undefined;
2072
1515
  /** Locale for the synonym, leave blank to use the standard tokenizer */
2073
- locale?: string;
1516
+ locale?: string | undefined;
2074
1517
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
2075
- symbols_to_index?: RetrieveSynonymSetItemResponseSymbolsToIndexList;
1518
+ symbols_to_index?: GetSynonymSetItemResponseSymbolsToIndexList | undefined;
2076
1519
  }
2077
- export declare const RetrieveSynonymSetItemResponse: S.Schema<RetrieveSynonymSetItemResponse>;
2078
- export interface RetrieveSynonymSetItemsRequest {
1520
+ export interface GetSynonymSetItemsRequest {
2079
1521
  /** The name of the synonym set to retrieve items for */
2080
1522
  synonymSetName: string;
2081
1523
  }
2082
- export declare const RetrieveSynonymSetItemsRequest: S.Schema<RetrieveSynonymSetItemsRequest>;
2083
- export type RetrieveSynonymSetItemsResponseBodyList = Array<SynonymItemSchema>;
2084
- export declare const RetrieveSynonymSetItemsResponseBodyList: S.Schema<RetrieveSynonymSetItemsResponseBodyList>;
2085
- export type RetrieveSynonymSetItemsResponse = RetrieveSynonymSetItemsResponseBodyList;
2086
- export declare const RetrieveSynonymSetItemsResponse: S.Schema<RetrieveSynonymSetItemsResponse>;
2087
- export interface RetrieveSynonymSetsRequest {
1524
+ export type GetSynonymSetItemsResponseBodyList = Array<SynonymItemSchema>;
1525
+ export type GetSynonymSetItemsResponse = GetSynonymSetItemsResponseBodyList;
1526
+ export interface GetSynonymSetsRequest {
2088
1527
  }
2089
- export declare const RetrieveSynonymSetsRequest: S.Schema<RetrieveSynonymSetsRequest>;
2090
1528
  /** Array of synonym items */
2091
1529
  export type SynonymSetSchemaItemsList = Array<SynonymItemSchema>;
2092
- export declare const SynonymSetSchemaItemsList: S.Schema<SynonymSetSchemaItemsList>;
2093
1530
  export interface SynonymSetSchema {
2094
1531
  /** Array of synonym items */
2095
1532
  items: SynonymSetSchemaItemsList;
2096
1533
  /** Name of the synonym set */
2097
1534
  name: string;
2098
1535
  }
2099
- export declare const SynonymSetSchema: S.Schema<SynonymSetSchema>;
2100
- export type RetrieveSynonymSetsResponseBodyList = Array<SynonymSetSchema>;
2101
- export declare const RetrieveSynonymSetsResponseBodyList: S.Schema<RetrieveSynonymSetsResponseBodyList>;
2102
- export type RetrieveSynonymSetsResponse = RetrieveSynonymSetsResponseBodyList;
2103
- export declare const RetrieveSynonymSetsResponse: S.Schema<RetrieveSynonymSetsResponse>;
1536
+ export type GetSynonymSetsResponseBodyList = Array<SynonymSetSchema>;
1537
+ export type GetSynonymSetsResponse = GetSynonymSetsResponseBodyList;
1538
+ export interface HealthRequest {
1539
+ }
1540
+ export interface HealthStatus {
1541
+ ok: boolean;
1542
+ }
1543
+ export type IndexAction = "create" | "update" | "upsert" | "emplace";
1544
+ export type DirtyValues = "coerce_or_reject" | "coerce_or_drop" | "drop" | "reject";
1545
+ export interface ImportDocumentsRequestImportDocumentsParameters {
1546
+ batch_size?: number | undefined;
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 | 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
+ }
1554
+ export interface ImportDocumentsRequest {
1555
+ /** The name of the collection */
1556
+ collectionName: string;
1557
+ importDocumentsParameters?: ImportDocumentsRequestImportDocumentsParameters | undefined;
1558
+ }
1559
+ export interface ImportDocumentsResponse {
1560
+ }
1561
+ export interface ImportStemmingDictionaryRequest {
1562
+ /** The ID to assign to the dictionary */
1563
+ id: string;
1564
+ body: string;
1565
+ }
1566
+ export interface ImportStemmingDictionaryResponse {
1567
+ }
1568
+ export interface IndexDocumentRequest {
1569
+ /** The name of the collection to add the document to */
1570
+ collectionName: string;
1571
+ /** Additional action to perform */
1572
+ action?: IndexAction | (string & {}) | undefined;
1573
+ /** Dealing with Dirty Data */
1574
+ dirty_values?: DirtyValues | (string & {}) | undefined;
1575
+ }
1576
+ export type IndexDocumentResponse = unknown;
1577
+ export interface ListStemmingDictionariesRequest {
1578
+ }
1579
+ export type ListStemmingDictionariesResponseDictionariesList = Array<string>;
1580
+ export interface ListStemmingDictionariesResponse {
1581
+ dictionaries?: ListStemmingDictionariesResponseDictionariesList | undefined;
1582
+ }
2104
1583
  export interface SearchCollectionRequest {
2105
1584
  /** The name of the collection to search for the document under */
2106
1585
  collectionName: string;
2107
1586
  searchParameters: SearchParameters;
2108
1587
  }
2109
- export declare const SearchCollectionRequest: S.Schema<SearchCollectionRequest>;
1588
+ export interface FacetCountsCountsItem {
1589
+ count?: number | undefined;
1590
+ highlighted?: string | undefined;
1591
+ value?: string | undefined;
1592
+ parent?: unknown | undefined;
1593
+ }
1594
+ export type FacetCountsCountsList = Array<FacetCountsCountsItem>;
1595
+ export interface FacetCountsStats {
1596
+ max?: number | undefined;
1597
+ min?: number | undefined;
1598
+ sum?: number | undefined;
1599
+ total_values?: number | undefined;
1600
+ avg?: number | undefined;
1601
+ }
1602
+ export interface FacetCounts {
1603
+ counts?: FacetCountsCountsList | undefined;
1604
+ field_name?: string | undefined;
1605
+ sampled?: boolean | undefined;
1606
+ stats?: FacetCountsStats | undefined;
1607
+ }
2110
1608
  export type SearchResultFacetCountsList = Array<FacetCounts>;
2111
- export declare const SearchResultFacetCountsList: S.Schema<SearchResultFacetCountsList>;
1609
+ export type SearchGroupedHitGroupKeyList = Array<unknown>;
1610
+ /** Present only for (array) string[] fields */
1611
+ export type SearchHighlightSnippetsList = Array<string>;
1612
+ /** Full field value with highlighting, present only for (array) string[] fields */
1613
+ export type SearchHighlightValuesList = Array<string>;
1614
+ /** The indices property will be present only for string[] fields and will contain the corresponding indices of the snippets in the search field */
1615
+ export type SearchHighlightIndicesList = Array<number>;
1616
+ export type SearchHighlightMatchedTokensList = Array<unknown>;
1617
+ export interface SearchHighlight {
1618
+ field?: string | undefined;
1619
+ /** Present only for (non-array) string fields */
1620
+ snippet?: string | undefined;
1621
+ /** Present only for (array) string[] fields */
1622
+ snippets?: SearchHighlightSnippetsList | undefined;
1623
+ /** Full field value with highlighting, present only for (non-array) string fields */
1624
+ value?: string | undefined;
1625
+ /** Full field value with highlighting, present only for (array) string[] fields */
1626
+ values?: SearchHighlightValuesList | undefined;
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 | undefined;
1629
+ matched_tokens?: SearchHighlightMatchedTokensList | undefined;
1630
+ }
1631
+ /** (Deprecated) Contains highlighted portions of the search fields */
1632
+ export type SearchResultHitHighlightsList = Array<SearchHighlight>;
1633
+ /** Highlighted version of the matching document */
1634
+ export type SearchResultHitHighlightMap = {
1635
+ [key: string]: unknown | undefined;
1636
+ };
1637
+ /** Can be any key-value pair */
1638
+ export type SearchResultHitDocumentMap = {
1639
+ [key: string]: unknown | undefined;
1640
+ };
1641
+ export interface SearchResultHitTextMatchInfo {
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
+ }
1650
+ /** Can be any key-value pair */
1651
+ export type SearchResultHitGeoDistanceMetersMap = {
1652
+ [key: string]: number | undefined;
1653
+ };
1654
+ /** Information about hybrid search scoring */
1655
+ export interface SearchResultHitHybridSearchInfo {
1656
+ /** Combined score from rank fusion of text and vector search */
1657
+ rank_fusion_score?: number | undefined;
1658
+ }
1659
+ export interface SearchResultHit {
1660
+ /** (Deprecated) Contains highlighted portions of the search fields */
1661
+ highlights?: SearchResultHitHighlightsList | undefined;
1662
+ /** Highlighted version of the matching document */
1663
+ highlight?: SearchResultHitHighlightMap | undefined;
1664
+ /** Can be any key-value pair */
1665
+ document?: SearchResultHitDocumentMap | undefined;
1666
+ text_match?: number | undefined;
1667
+ text_match_info?: SearchResultHitTextMatchInfo | undefined;
1668
+ /** Can be any key-value pair */
1669
+ geo_distance_meters?: SearchResultHitGeoDistanceMetersMap | undefined;
1670
+ /** Distance between the query vector and matching document's vector value */
1671
+ vector_distance?: number | undefined;
1672
+ /** Information about hybrid search scoring */
1673
+ hybrid_search_info?: SearchResultHitHybridSearchInfo | undefined;
1674
+ /** Returned only for union query response. Indicates the index of the query which this document matched to. */
1675
+ search_index?: number | undefined;
1676
+ }
1677
+ /** The documents that matched the search query */
1678
+ export type SearchGroupedHitHitsList = Array<SearchResultHit>;
1679
+ export interface SearchGroupedHit {
1680
+ found?: number | undefined;
1681
+ group_key: SearchGroupedHitGroupKeyList;
1682
+ /** The documents that matched the search query */
1683
+ hits: SearchGroupedHitHitsList;
1684
+ }
2112
1685
  export type SearchResultGroupedHitsList = Array<SearchGroupedHit>;
2113
- export declare const SearchResultGroupedHitsList: S.Schema<SearchResultGroupedHitsList>;
2114
1686
  /** The documents that matched the search query */
2115
1687
  export type SearchResultHitsList = Array<SearchResultHit>;
2116
- export declare const SearchResultHitsList: S.Schema<SearchResultHitsList>;
1688
+ export interface SearchRequestParamsVoiceQuery {
1689
+ transcribed_query?: string | undefined;
1690
+ }
1691
+ export interface SearchRequestParams {
1692
+ collection_name: string;
1693
+ first_q?: string | undefined;
1694
+ q: string;
1695
+ per_page: number;
1696
+ voice_query?: SearchRequestParamsVoiceQuery | undefined;
1697
+ }
1698
+ export type SearchResultConversationConversationHistoryList = Array<unknown>;
1699
+ export interface SearchResultConversation {
1700
+ answer: string;
1701
+ conversation_history: SearchResultConversationConversationHistoryList;
1702
+ conversation_id: string;
1703
+ query: string;
1704
+ }
2117
1705
  /** Returned only for union query response. */
2118
1706
  export type SearchResultUnionRequestParamsList = Array<SearchRequestParams>;
2119
- export declare const SearchResultUnionRequestParamsList: S.Schema<SearchResultUnionRequestParamsList>;
2120
1707
  /** Custom JSON object that can be returned in the search response */
2121
1708
  export type SearchResultMetadataMap = {
2122
1709
  [key: string]: unknown | undefined;
2123
1710
  };
2124
- export declare const SearchResultMetadataMap: S.Schema<SearchResultMetadataMap>;
2125
1711
  export interface SearchResult {
2126
- facet_counts?: SearchResultFacetCountsList;
1712
+ facet_counts?: SearchResultFacetCountsList | undefined;
1713
+ /** The number of documents found */
1714
+ found?: number | undefined;
1715
+ found_docs?: number | undefined;
1716
+ /** The number of milliseconds the search took */
1717
+ search_time_ms?: number | undefined;
1718
+ /** The total number of documents in the collection */
1719
+ out_of?: number | undefined;
1720
+ /** Whether the search was cut off */
1721
+ search_cutoff?: boolean | undefined;
1722
+ /** The search result page number */
1723
+ page?: number | undefined;
1724
+ grouped_hits?: SearchResultGroupedHitsList | undefined;
1725
+ /** The documents that matched the search query */
1726
+ hits?: SearchResultHitsList | undefined;
1727
+ request_params?: SearchRequestParams | undefined;
1728
+ conversation?: SearchResultConversation | undefined;
1729
+ /** Returned only for union query response. */
1730
+ union_request_params?: SearchResultUnionRequestParamsList | undefined;
1731
+ /** Custom JSON object that can be returned in the search response */
1732
+ metadata?: SearchResultMetadataMap | undefined;
1733
+ }
1734
+ /** Parameters for the multi search API. */
1735
+ export interface MultiSearchParameters {
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 | undefined;
1738
+ /** A list of `string` fields that should be queried against. Multiple fields are separated with a comma. */
1739
+ query_by?: string | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
1752
+ /** Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&. */
1753
+ filter_by?: string | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
1760
+ /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
1761
+ facet_by?: string | undefined;
1762
+ /** Maximum number of facet values to be returned. */
1763
+ max_facet_values?: number | undefined;
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 | undefined;
1766
+ /** Controls the fuzziness of the facet query filter. Default: 2. */
1767
+ facet_query_num_typos?: number | undefined;
1768
+ /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
1769
+ num_typos?: string | undefined;
1770
+ /** Results from this specific page number would be fetched. */
1771
+ page?: number | undefined;
1772
+ /** Number of results to fetch per page. Default: 10 */
1773
+ per_page?: number | undefined;
1774
+ /** Number of hits to fetch. Can be used as an alternative to the per_page parameter. Default: 10. */
1775
+ limit?: number | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
1786
+ /** List of fields from the document to include in the search result */
1787
+ include_fields?: string | undefined;
1788
+ /** List of fields from the document to exclude in the search result */
1789
+ exclude_fields?: string | undefined;
1790
+ /** List of fields which should be highlighted fully without snippeting */
1791
+ highlight_full_fields?: string | undefined;
1792
+ /** The number of tokens that should surround the highlighted text on each side. Default: 4 */
1793
+ highlight_affix_num_tokens?: number | undefined;
1794
+ /** The start tag used for the highlighted snippets. Default: `<mark>` */
1795
+ highlight_start_tag?: string | undefined;
1796
+ /** The end tag used for the highlighted snippets. Default: `</mark>` */
1797
+ highlight_end_tag?: string | undefined;
1798
+ /** Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 */
1799
+ snippet_threshold?: number | undefined;
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 | undefined;
1802
+ drop_tokens_mode?: DropTokensMode | (string & {}) | undefined;
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 | undefined;
1805
+ /** Set this parameter to false to disable typos on alphanumerical query tokens. Default: true. */
1806
+ enable_typos_for_alpha_numerical_tokens?: boolean | undefined;
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 | undefined;
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 | undefined;
1811
+ /** Flag for enabling/disabling analytics aggregation for specific search queries (for e.g. those originating from a test script). */
1812
+ enable_analytics?: boolean | undefined;
1813
+ /** Allow synonym resolution on word prefixes in the query. Default: false */
1814
+ synonym_prefix?: boolean | undefined;
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 | undefined;
1817
+ /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
1818
+ synonym_num_typos?: number | undefined;
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 | undefined;
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 | undefined;
1823
+ /** Comma separated list of tags to trigger the curations rules that match the tags. */
1824
+ curation_tags?: string | undefined;
1825
+ /** A list of custom fields that must be highlighted even if you don't query for them */
1826
+ highlight_fields?: string | undefined;
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 | undefined;
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 | undefined;
1831
+ /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
1832
+ preset?: string | undefined;
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 | undefined;
1835
+ /** Set this parameter to true to ensure that an exact match is ranked above the others */
1836
+ prioritize_exact_match?: boolean | undefined;
1837
+ /** Make Typesense prioritize documents where the query words appear earlier in the text. */
1838
+ prioritize_token_position?: boolean | undefined;
1839
+ /** Make Typesense prioritize documents where the query words appear in more number of fields. */
1840
+ prioritize_num_matching_fields?: boolean | undefined;
1841
+ /** Make Typesense disable typos for numerical tokens. */
1842
+ enable_typos_for_numerical_tokens?: boolean | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
1849
+ /** Enable server side caching of search query results. By default, caching is disabled. */
1850
+ use_cache?: boolean | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
1857
+ /** Vector query expression for fetching documents "closest" to a given query/document vector. */
1858
+ vector_query?: string | undefined;
1859
+ /** Timeout (in milliseconds) for fetching remote embeddings. */
1860
+ remote_embedding_timeout_ms?: number | undefined;
1861
+ /** Number of times to retry fetching remote embeddings. */
1862
+ remote_embedding_num_tries?: number | undefined;
1863
+ /** Choose the underlying faceting strategy used. Comma separated string of allows values: exhaustive, top_values or automatic (default). */
1864
+ facet_strategy?: string | undefined;
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 | undefined;
1867
+ /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
1868
+ facet_return_parent?: string | undefined;
1869
+ /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
1870
+ facet_sample_percent?: number | undefined;
1871
+ /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
1872
+ facet_sample_threshold?: number | undefined;
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 | undefined;
1875
+ /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
1876
+ voice_query?: string | undefined;
1877
+ /** Enable conversational search. */
1878
+ conversation?: boolean | undefined;
1879
+ /** The Id of Conversation Model to be used. */
1880
+ conversation_model_id?: string | undefined;
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 | undefined;
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 | undefined;
1885
+ }
1886
+ export type SearchMultiRequestSearchesList = Array<MultiSearchCollectionParameters>;
1887
+ export interface SearchMultiRequest {
1888
+ multiSearchParameters: MultiSearchParameters;
1889
+ /** When true, merges the search results from each search query into a single ordered set of hits. */
1890
+ union?: boolean | undefined;
1891
+ searches: SearchMultiRequestSearchesList;
1892
+ }
1893
+ export type MultiSearchResultItemFacetCountsList = Array<FacetCounts>;
1894
+ export type MultiSearchResultItemGroupedHitsList = Array<SearchGroupedHit>;
1895
+ /** The documents that matched the search query */
1896
+ export type MultiSearchResultItemHitsList = Array<SearchResultHit>;
1897
+ /** Returned only for union query response. */
1898
+ export type MultiSearchResultItemUnionRequestParamsList = Array<SearchRequestParams>;
1899
+ /** Custom JSON object that can be returned in the search response */
1900
+ export type MultiSearchResultItemMetadataMap = {
1901
+ [key: string]: unknown | undefined;
1902
+ };
1903
+ export interface MultiSearchResultItem {
1904
+ facet_counts?: MultiSearchResultItemFacetCountsList | undefined;
2127
1905
  /** The number of documents found */
2128
- found?: number;
2129
- found_docs?: number;
1906
+ found?: number | undefined;
1907
+ found_docs?: number | undefined;
2130
1908
  /** The number of milliseconds the search took */
2131
- search_time_ms?: number;
1909
+ search_time_ms?: number | undefined;
2132
1910
  /** The total number of documents in the collection */
2133
- out_of?: number;
1911
+ out_of?: number | undefined;
2134
1912
  /** Whether the search was cut off */
2135
- search_cutoff?: boolean;
1913
+ search_cutoff?: boolean | undefined;
2136
1914
  /** The search result page number */
2137
- page?: number;
2138
- grouped_hits?: SearchResultGroupedHitsList;
1915
+ page?: number | undefined;
1916
+ grouped_hits?: MultiSearchResultItemGroupedHitsList | undefined;
2139
1917
  /** The documents that matched the search query */
2140
- hits?: SearchResultHitsList;
2141
- request_params?: SearchRequestParams;
2142
- conversation?: SearchResultConversation;
1918
+ hits?: MultiSearchResultItemHitsList | undefined;
1919
+ request_params?: SearchRequestParams | undefined;
1920
+ conversation?: SearchResultConversation | undefined;
2143
1921
  /** Returned only for union query response. */
2144
- union_request_params?: SearchResultUnionRequestParamsList;
1922
+ union_request_params?: MultiSearchResultItemUnionRequestParamsList | undefined;
2145
1923
  /** Custom JSON object that can be returned in the search response */
2146
- metadata?: SearchResultMetadataMap;
1924
+ metadata?: MultiSearchResultItemMetadataMap | undefined;
1925
+ /** HTTP error code */
1926
+ code?: number | undefined;
1927
+ /** Error description */
1928
+ error?: string | undefined;
1929
+ }
1930
+ export type MultiSearchResultResultsList = Array<MultiSearchResultItem>;
1931
+ export interface MultiSearchResult {
1932
+ results: MultiSearchResultResultsList;
1933
+ conversation?: SearchResultConversation | undefined;
2147
1934
  }
2148
- export declare const SearchResult: S.Schema<SearchResult>;
2149
1935
  export interface TakeSnapshotRequest {
2150
1936
  /** The directory on the server where the snapshot should be saved. */
2151
1937
  snapshot_path: string;
2152
1938
  }
2153
- export declare const TakeSnapshotRequest: S.Schema<TakeSnapshotRequest>;
2154
1939
  export interface ToggleSlowRequestLogRequest {
2155
1940
  log_slow_requests_time_ms: number;
2156
1941
  }
2157
- export declare const ToggleSlowRequestLogRequest: S.Schema<ToggleSlowRequestLogRequest>;
2158
1942
  /** A list of fields for querying, filtering and faceting */
2159
1943
  export type UpdateCollectionRequestFieldsList = Array<Field>;
2160
- export declare const UpdateCollectionRequestFieldsList: S.Schema<UpdateCollectionRequestFieldsList>;
2161
1944
  /** List of synonym set names to associate with this collection */
2162
1945
  export type UpdateCollectionRequestSynonymSetsList = Array<string>;
2163
- export declare const UpdateCollectionRequestSynonymSetsList: S.Schema<UpdateCollectionRequestSynonymSetsList>;
2164
1946
  export interface UpdateCollectionRequest {
2165
1947
  /** The name of the collection to update */
2166
1948
  collectionName: string;
2167
1949
  /** A list of fields for querying, filtering and faceting */
2168
- fields?: UpdateCollectionRequestFieldsList;
1950
+ fields?: UpdateCollectionRequestFieldsList | undefined;
2169
1951
  /** List of synonym set names to associate with this collection */
2170
- synonym_sets?: UpdateCollectionRequestSynonymSetsList;
1952
+ synonym_sets?: UpdateCollectionRequestSynonymSetsList | undefined;
2171
1953
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
2172
- metadata?: unknown;
1954
+ metadata?: unknown | undefined;
2173
1955
  }
2174
- export declare const UpdateCollectionRequest: S.Schema<UpdateCollectionRequest>;
2175
1956
  /** A list of fields for querying, filtering and faceting */
2176
1957
  export type CollectionUpdateSchemaFieldsList = Array<Field>;
2177
- export declare const CollectionUpdateSchemaFieldsList: S.Schema<CollectionUpdateSchemaFieldsList>;
2178
1958
  /** List of synonym set names to associate with this collection */
2179
1959
  export type CollectionUpdateSchemaSynonymSetsList = Array<string>;
2180
- export declare const CollectionUpdateSchemaSynonymSetsList: S.Schema<CollectionUpdateSchemaSynonymSetsList>;
2181
1960
  export interface CollectionUpdateSchema {
2182
1961
  /** A list of fields for querying, filtering and faceting */
2183
- fields?: CollectionUpdateSchemaFieldsList;
1962
+ fields?: CollectionUpdateSchemaFieldsList | undefined;
2184
1963
  /** List of synonym set names to associate with this collection */
2185
- synonym_sets?: CollectionUpdateSchemaSynonymSetsList;
1964
+ synonym_sets?: CollectionUpdateSchemaSynonymSetsList | undefined;
2186
1965
  /** Optional details about the collection, e.g., when it was created, who created it etc. */
2187
- metadata?: unknown;
1966
+ metadata?: unknown | undefined;
2188
1967
  }
2189
- export declare const CollectionUpdateSchema: S.Schema<CollectionUpdateSchema>;
2190
1968
  export interface UpdateConversationModelRequest {
2191
1969
  /** The id of the conversation model to update */
2192
1970
  modelId: string;
2193
1971
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
2194
- id?: string;
1972
+ id?: string | undefined;
2195
1973
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
2196
- model_name?: string;
1974
+ model_name?: string | undefined;
2197
1975
  /** The LLM service's API Key */
2198
- api_key?: string | import("effect/Redacted").Redacted<string>;
1976
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
2199
1977
  /** Typesense collection that stores the historical conversations */
2200
- history_collection?: string;
1978
+ history_collection?: string | undefined;
2201
1979
  /** LLM service's account ID (only applicable for Cloudflare) */
2202
- account_id?: string;
1980
+ account_id?: string | undefined;
2203
1981
  /** The system prompt that contains special instructions to the LLM */
2204
- system_prompt?: string;
1982
+ system_prompt?: string | undefined;
2205
1983
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
2206
- ttl?: number;
1984
+ ttl?: number | undefined;
2207
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. */
2208
- max_bytes?: number;
1986
+ max_bytes?: number | undefined;
2209
1987
  /** URL of vLLM service */
2210
- vllm_url?: string;
1988
+ vllm_url?: string | undefined;
2211
1989
  }
2212
- export declare const UpdateConversationModelRequest: S.Schema<UpdateConversationModelRequest>;
2213
1990
  export interface UpdateConversationModelResponse {
2214
1991
  /** An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id. */
2215
1992
  id: string;
2216
1993
  /** Name of the LLM model offered by OpenAI, Cloudflare or vLLM */
2217
1994
  model_name: string;
2218
1995
  /** The LLM service's API Key */
2219
- api_key?: string | import("effect/Redacted").Redacted<string>;
1996
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
2220
1997
  /** Typesense collection that stores the historical conversations */
2221
1998
  history_collection: string;
2222
1999
  /** LLM service's account ID (only applicable for Cloudflare) */
2223
- account_id?: string;
2000
+ account_id?: string | undefined;
2224
2001
  /** The system prompt that contains special instructions to the LLM */
2225
- system_prompt?: string;
2002
+ system_prompt?: string | undefined;
2226
2003
  /** Time interval in seconds after which the messages would be deleted. Default: 86400 (24 hours) */
2227
- ttl?: number;
2004
+ ttl?: number | undefined;
2228
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. */
2229
2006
  max_bytes: number;
2230
2007
  /** URL of vLLM service */
2231
- vllm_url?: string;
2008
+ vllm_url?: string | undefined;
2232
2009
  }
2233
- export declare const UpdateConversationModelResponse: S.Schema<UpdateConversationModelResponse>;
2234
2010
  export interface UpdateDocumentRequest {
2235
2011
  /** The name of the collection to search for the document under */
2236
2012
  collectionName: string;
2237
2013
  /** The Document ID */
2238
2014
  documentId: string;
2239
2015
  /** Dealing with Dirty Data */
2240
- dirty_values?: DirtyValues | (string & {});
2016
+ dirty_values?: DirtyValues | (string & {}) | undefined;
2241
2017
  }
2242
- export declare const UpdateDocumentRequest: S.Schema<UpdateDocumentRequest>;
2243
2018
  export type UpdateDocumentResponse = unknown;
2244
- export declare const UpdateDocumentResponse: S.Schema<UpdateDocumentResponse>;
2245
2019
  export interface UpdateDocumentsRequestUpdateDocumentsParameters {
2246
- filter_by?: string;
2020
+ filter_by?: string | undefined;
2247
2021
  }
2248
- export declare const UpdateDocumentsRequestUpdateDocumentsParameters: S.Schema<UpdateDocumentsRequestUpdateDocumentsParameters>;
2249
2022
  export interface UpdateDocumentsRequest {
2250
2023
  /** The name of the collection to update documents in */
2251
2024
  collectionName: string;
2252
- updateDocumentsParameters?: UpdateDocumentsRequestUpdateDocumentsParameters;
2025
+ updateDocumentsParameters?: UpdateDocumentsRequestUpdateDocumentsParameters | undefined;
2253
2026
  }
2254
- export declare const UpdateDocumentsRequest: S.Schema<UpdateDocumentsRequest>;
2255
2027
  export interface UpdateDocumentsResponse {
2256
2028
  /** The number of documents that have been updated */
2257
2029
  num_updated: number;
2258
2030
  }
2259
- export declare const UpdateDocumentsResponse: S.Schema<UpdateDocumentsResponse>;
2260
2031
  /** Stop sequences for the NL model (Google-specific) */
2261
2032
  export type UpdateNLSearchModelRequestStopSequencesList = Array<string>;
2262
- export declare const UpdateNLSearchModelRequestStopSequencesList: S.Schema<UpdateNLSearchModelRequestStopSequencesList>;
2263
2033
  export interface UpdateNLSearchModelRequest {
2264
2034
  /** The ID of the NL search model to update */
2265
2035
  modelId: string;
2266
2036
  /** Name of the NL model to use */
2267
- model_name?: string;
2037
+ model_name?: string | undefined;
2268
2038
  /** API key for the NL model service */
2269
- api_key?: string | import("effect/Redacted").Redacted<string>;
2039
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
2270
2040
  /** Custom API URL for the NL model service */
2271
- api_url?: string;
2041
+ api_url?: string | undefined;
2272
2042
  /** Maximum number of bytes to process */
2273
- max_bytes?: number;
2043
+ max_bytes?: number | undefined;
2274
2044
  /** Temperature parameter for the NL model */
2275
- temperature?: number;
2045
+ temperature?: number | undefined;
2276
2046
  /** System prompt for the NL model */
2277
- system_prompt?: string;
2047
+ system_prompt?: string | undefined;
2278
2048
  /** Top-p parameter for the NL model (Google-specific) */
2279
- top_p?: number;
2049
+ top_p?: number | undefined;
2280
2050
  /** Top-k parameter for the NL model (Google-specific) */
2281
- top_k?: number;
2051
+ top_k?: number | undefined;
2282
2052
  /** Stop sequences for the NL model (Google-specific) */
2283
- stop_sequences?: UpdateNLSearchModelRequestStopSequencesList;
2053
+ stop_sequences?: UpdateNLSearchModelRequestStopSequencesList | undefined;
2284
2054
  /** API version for the NL model service */
2285
- api_version?: string;
2055
+ api_version?: string | undefined;
2286
2056
  /** Project ID for GCP Vertex AI */
2287
- project_id?: string;
2057
+ project_id?: string | undefined;
2288
2058
  /** Access token for GCP Vertex AI */
2289
- access_token?: string | import("effect/Redacted").Redacted<string>;
2059
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2290
2060
  /** Refresh token for GCP Vertex AI */
2291
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
2061
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2292
2062
  /** Client ID for GCP Vertex AI */
2293
- client_id?: string;
2063
+ client_id?: string | undefined;
2294
2064
  /** Client secret for GCP Vertex AI */
2295
- client_secret?: string | import("effect/Redacted").Redacted<string>;
2065
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
2296
2066
  /** Region for GCP Vertex AI */
2297
- region?: string;
2067
+ region?: string | undefined;
2298
2068
  /** Maximum output tokens for GCP Vertex AI */
2299
- max_output_tokens?: number;
2069
+ max_output_tokens?: number | undefined;
2300
2070
  /** Account ID for Cloudflare-specific models */
2301
- account_id?: string;
2071
+ account_id?: string | undefined;
2302
2072
  /** Optional ID for the NL search model */
2303
- id?: string;
2073
+ id?: string | undefined;
2304
2074
  }
2305
- export declare const UpdateNLSearchModelRequest: S.Schema<UpdateNLSearchModelRequest>;
2306
2075
  /** Stop sequences for the NL model (Google-specific) */
2307
2076
  export type UpdateNLSearchModelResponseStopSequencesList = Array<string>;
2308
- export declare const UpdateNLSearchModelResponseStopSequencesList: S.Schema<UpdateNLSearchModelResponseStopSequencesList>;
2309
2077
  export interface UpdateNLSearchModelResponse {
2310
2078
  /** Name of the NL model to use */
2311
- model_name?: string;
2079
+ model_name?: string | undefined;
2312
2080
  /** API key for the NL model service */
2313
- api_key?: string | import("effect/Redacted").Redacted<string>;
2081
+ api_key?: string | import("effect/Redacted").Redacted<string> | undefined;
2314
2082
  /** Custom API URL for the NL model service */
2315
- api_url?: string;
2083
+ api_url?: string | undefined;
2316
2084
  /** Maximum number of bytes to process */
2317
- max_bytes?: number;
2085
+ max_bytes?: number | undefined;
2318
2086
  /** Temperature parameter for the NL model */
2319
- temperature?: number;
2087
+ temperature?: number | undefined;
2320
2088
  /** System prompt for the NL model */
2321
- system_prompt?: string;
2089
+ system_prompt?: string | undefined;
2322
2090
  /** Top-p parameter for the NL model (Google-specific) */
2323
- top_p?: number;
2091
+ top_p?: number | undefined;
2324
2092
  /** Top-k parameter for the NL model (Google-specific) */
2325
- top_k?: number;
2093
+ top_k?: number | undefined;
2326
2094
  /** Stop sequences for the NL model (Google-specific) */
2327
- stop_sequences?: UpdateNLSearchModelResponseStopSequencesList;
2095
+ stop_sequences?: UpdateNLSearchModelResponseStopSequencesList | undefined;
2328
2096
  /** API version for the NL model service */
2329
- api_version?: string;
2097
+ api_version?: string | undefined;
2330
2098
  /** Project ID for GCP Vertex AI */
2331
- project_id?: string;
2099
+ project_id?: string | undefined;
2332
2100
  /** Access token for GCP Vertex AI */
2333
- access_token?: string | import("effect/Redacted").Redacted<string>;
2101
+ access_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2334
2102
  /** Refresh token for GCP Vertex AI */
2335
- refresh_token?: string | import("effect/Redacted").Redacted<string>;
2103
+ refresh_token?: string | import("effect/Redacted").Redacted<string> | undefined;
2336
2104
  /** Client ID for GCP Vertex AI */
2337
- client_id?: string;
2105
+ client_id?: string | undefined;
2338
2106
  /** Client secret for GCP Vertex AI */
2339
- client_secret?: string | import("effect/Redacted").Redacted<string>;
2107
+ client_secret?: string | import("effect/Redacted").Redacted<string> | undefined;
2340
2108
  /** Region for GCP Vertex AI */
2341
- region?: string;
2109
+ region?: string | undefined;
2342
2110
  /** Maximum output tokens for GCP Vertex AI */
2343
- max_output_tokens?: number;
2111
+ max_output_tokens?: number | undefined;
2344
2112
  /** Account ID for Cloudflare-specific models */
2345
- account_id?: string;
2113
+ account_id?: string | undefined;
2346
2114
  /** Optional ID for the NL search model */
2347
2115
  id: string;
2348
2116
  }
2349
- export declare const UpdateNLSearchModelResponse: S.Schema<UpdateNLSearchModelResponse>;
2350
2117
  export interface UpsertAliasRequest {
2351
2118
  /** The name of the alias to create/update */
2352
2119
  aliasName: string;
2353
2120
  /** Name of the collection you wish to map the alias to */
2354
2121
  collection_name: string;
2355
2122
  }
2356
- export declare const UpsertAliasRequest: S.Schema<UpsertAliasRequest>;
2357
2123
  export type UpsertAnalyticsRuleRequestParamsMetaFieldsList = Array<string>;
2358
- export declare const UpsertAnalyticsRuleRequestParamsMetaFieldsList: S.Schema<UpsertAnalyticsRuleRequestParamsMetaFieldsList>;
2359
2124
  export interface UpsertAnalyticsRuleRequestParams {
2360
- destination_collection?: string;
2361
- limit?: number;
2362
- capture_search_requests?: boolean;
2363
- meta_fields?: UpsertAnalyticsRuleRequestParamsMetaFieldsList;
2364
- expand_query?: boolean;
2365
- counter_field?: string;
2366
- weight?: number;
2367
- }
2368
- export declare const UpsertAnalyticsRuleRequestParams: S.Schema<UpsertAnalyticsRuleRequestParams>;
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
+ }
2369
2133
  export interface UpsertAnalyticsRuleRequest {
2370
2134
  /** The name of the analytics rule to upsert */
2371
2135
  ruleName: string;
2372
- name?: string;
2373
- rule_tag?: string;
2374
- params?: UpsertAnalyticsRuleRequestParams;
2136
+ name?: string | undefined;
2137
+ rule_tag?: string | undefined;
2138
+ params?: UpsertAnalyticsRuleRequestParams | undefined;
2375
2139
  }
2376
- export declare const UpsertAnalyticsRuleRequest: S.Schema<UpsertAnalyticsRuleRequest>;
2377
2140
  export type UpsertAnalyticsRuleResponseParamsMetaFieldsList = Array<string>;
2378
- export declare const UpsertAnalyticsRuleResponseParamsMetaFieldsList: S.Schema<UpsertAnalyticsRuleResponseParamsMetaFieldsList>;
2379
2141
  export interface UpsertAnalyticsRuleResponseParams {
2380
- destination_collection?: string;
2381
- limit?: number;
2382
- capture_search_requests?: boolean;
2383
- meta_fields?: UpsertAnalyticsRuleResponseParamsMetaFieldsList;
2384
- expand_query?: boolean;
2385
- counter_field?: string;
2386
- weight?: number;
2387
- }
2388
- export declare const UpsertAnalyticsRuleResponseParams: S.Schema<UpsertAnalyticsRuleResponseParams>;
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
+ }
2389
2150
  export interface UpsertAnalyticsRuleResponse {
2390
2151
  name: string;
2391
2152
  type: AnalyticsRuleType;
2392
2153
  collection: string;
2393
2154
  event_type: string;
2394
- rule_tag?: string;
2395
- params?: UpsertAnalyticsRuleResponseParams;
2155
+ rule_tag?: string | undefined;
2156
+ params?: UpsertAnalyticsRuleResponseParams | undefined;
2396
2157
  }
2397
- export declare const UpsertAnalyticsRuleResponse: S.Schema<UpsertAnalyticsRuleResponse>;
2398
2158
  /** Array of curation items */
2399
2159
  export type UpsertCurationSetRequestItemsList = Array<CurationItemCreateSchema>;
2400
- export declare const UpsertCurationSetRequestItemsList: S.Schema<UpsertCurationSetRequestItemsList>;
2401
2160
  export interface UpsertCurationSetRequest {
2402
2161
  /** The name of the curation set to create/update */
2403
2162
  curationSetName: string;
2404
2163
  /** Array of curation items */
2405
2164
  items: UpsertCurationSetRequestItemsList;
2406
2165
  /** Optional description for the curation set */
2407
- description?: string;
2166
+ description?: string | undefined;
2408
2167
  }
2409
- export declare const UpsertCurationSetRequest: S.Schema<UpsertCurationSetRequest>;
2410
2168
  /** Array of curation items */
2411
2169
  export type UpsertCurationSetResponseItemsList = Array<CurationItemCreateSchema>;
2412
- export declare const UpsertCurationSetResponseItemsList: S.Schema<UpsertCurationSetResponseItemsList>;
2413
2170
  export interface UpsertCurationSetResponse {
2414
2171
  /** Array of curation items */
2415
2172
  items: UpsertCurationSetResponseItemsList;
2416
2173
  /** Optional description for the curation set */
2417
- description?: string;
2174
+ description?: string | undefined;
2418
2175
  name: string;
2419
2176
  }
2420
- export declare const UpsertCurationSetResponse: S.Schema<UpsertCurationSetResponse>;
2421
2177
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
2422
2178
  export type UpsertCurationSetItemRequestIncludesList = Array<CurationInclude>;
2423
- export declare const UpsertCurationSetItemRequestIncludesList: S.Schema<UpsertCurationSetItemRequestIncludesList>;
2424
2179
  /** List of document `id`s that should be excluded from the search results. */
2425
2180
  export type UpsertCurationSetItemRequestExcludesList = Array<CurationExclude>;
2426
- export declare const UpsertCurationSetItemRequestExcludesList: S.Schema<UpsertCurationSetItemRequestExcludesList>;
2427
2181
  export interface UpsertCurationSetItemRequest {
2428
2182
  /** The name of the curation set */
2429
2183
  curationSetName: string;
@@ -2431,115 +2185,99 @@ export interface UpsertCurationSetItemRequest {
2431
2185
  itemId: string;
2432
2186
  rule: CurationRule;
2433
2187
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
2434
- includes?: UpsertCurationSetItemRequestIncludesList;
2188
+ includes?: UpsertCurationSetItemRequestIncludesList | undefined;
2435
2189
  /** List of document `id`s that should be excluded from the search results. */
2436
- excludes?: UpsertCurationSetItemRequestExcludesList;
2190
+ excludes?: UpsertCurationSetItemRequestExcludesList | undefined;
2437
2191
  /** A filter by clause that is applied to any search query that matches the curation rule. */
2438
- filter_by?: string;
2192
+ filter_by?: string | undefined;
2439
2193
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
2440
- remove_matched_tokens?: boolean;
2194
+ remove_matched_tokens?: boolean | undefined;
2441
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. */
2442
- metadata?: unknown;
2196
+ metadata?: unknown | undefined;
2443
2197
  /** A sort by clause that is applied to any search query that matches the curation rule. */
2444
- sort_by?: string;
2198
+ sort_by?: string | undefined;
2445
2199
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
2446
- replace_query?: string;
2200
+ replace_query?: string | undefined;
2447
2201
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
2448
- filter_curated_hits?: boolean;
2202
+ filter_curated_hits?: boolean | undefined;
2449
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. */
2450
- effective_from_ts?: number;
2204
+ effective_from_ts?: number | undefined;
2451
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. */
2452
- effective_to_ts?: number;
2206
+ effective_to_ts?: number | undefined;
2453
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. */
2454
- stop_processing?: boolean;
2208
+ stop_processing?: boolean | undefined;
2455
2209
  /** ID of the curation item */
2456
- id?: string;
2210
+ id?: string | undefined;
2457
2211
  }
2458
- export declare const UpsertCurationSetItemRequest: S.Schema<UpsertCurationSetItemRequest>;
2459
2212
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
2460
2213
  export type UpsertCurationSetItemResponseIncludesList = Array<CurationInclude>;
2461
- export declare const UpsertCurationSetItemResponseIncludesList: S.Schema<UpsertCurationSetItemResponseIncludesList>;
2462
2214
  /** List of document `id`s that should be excluded from the search results. */
2463
2215
  export type UpsertCurationSetItemResponseExcludesList = Array<CurationExclude>;
2464
- export declare const UpsertCurationSetItemResponseExcludesList: S.Schema<UpsertCurationSetItemResponseExcludesList>;
2465
2216
  export interface UpsertCurationSetItemResponse {
2466
2217
  rule: CurationRule;
2467
2218
  /** List of document `id`s that should be included in the search results with their corresponding `position`s. */
2468
- includes?: UpsertCurationSetItemResponseIncludesList;
2219
+ includes?: UpsertCurationSetItemResponseIncludesList | undefined;
2469
2220
  /** List of document `id`s that should be excluded from the search results. */
2470
- excludes?: UpsertCurationSetItemResponseExcludesList;
2221
+ excludes?: UpsertCurationSetItemResponseExcludesList | undefined;
2471
2222
  /** A filter by clause that is applied to any search query that matches the curation rule. */
2472
- filter_by?: string;
2223
+ filter_by?: string | undefined;
2473
2224
  /** Indicates whether search query tokens that exist in the curation's rule should be removed from the search query. */
2474
- remove_matched_tokens?: boolean;
2225
+ remove_matched_tokens?: boolean | undefined;
2475
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. */
2476
- metadata?: unknown;
2227
+ metadata?: unknown | undefined;
2477
2228
  /** A sort by clause that is applied to any search query that matches the curation rule. */
2478
- sort_by?: string;
2229
+ sort_by?: string | undefined;
2479
2230
  /** Replaces the current search query with this value, when the search query matches the curation rule. */
2480
- replace_query?: string;
2231
+ replace_query?: string | undefined;
2481
2232
  /** When set to true, the filter conditions of the query is applied to the curated records as well. Default: false. */
2482
- filter_curated_hits?: boolean;
2233
+ filter_curated_hits?: boolean | undefined;
2483
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. */
2484
- effective_from_ts?: number;
2235
+ effective_from_ts?: number | undefined;
2485
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. */
2486
- effective_to_ts?: number;
2237
+ effective_to_ts?: number | undefined;
2487
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. */
2488
- stop_processing?: boolean;
2239
+ stop_processing?: boolean | undefined;
2489
2240
  /** ID of the curation item */
2490
2241
  id: string;
2491
2242
  }
2492
- export declare const UpsertCurationSetItemResponse: S.Schema<UpsertCurationSetItemResponse>;
2493
2243
  export type UpsertPresetRequestValue = SearchParameters | MultiSearchSearchesParameter;
2494
- export declare const UpsertPresetRequestValue: any;
2495
2244
  export interface UpsertPresetRequest {
2496
2245
  /** The name of the preset set to upsert. */
2497
2246
  presetId: string;
2498
2247
  value: UpsertPresetRequestValue;
2499
2248
  }
2500
- export declare const UpsertPresetRequest: S.Schema<UpsertPresetRequest>;
2501
2249
  export type UpsertPresetResponseValue = SearchParameters | MultiSearchSearchesParameter;
2502
- export declare const UpsertPresetResponseValue: any;
2503
2250
  export interface UpsertPresetResponse {
2504
2251
  value: UpsertPresetResponseValue;
2505
2252
  name: string;
2506
2253
  }
2507
- export declare const UpsertPresetResponse: S.Schema<UpsertPresetResponse>;
2508
2254
  export type UpsertStopwordsSetRequestStopwordsList = Array<string>;
2509
- export declare const UpsertStopwordsSetRequestStopwordsList: S.Schema<UpsertStopwordsSetRequestStopwordsList>;
2510
2255
  export interface UpsertStopwordsSetRequest {
2511
2256
  /** The ID of the stopwords set to upsert. */
2512
2257
  setId: string;
2513
2258
  stopwords: UpsertStopwordsSetRequestStopwordsList;
2514
- locale?: string;
2259
+ locale?: string | undefined;
2515
2260
  }
2516
- export declare const UpsertStopwordsSetRequest: S.Schema<UpsertStopwordsSetRequest>;
2517
2261
  /** Array of synonym items */
2518
2262
  export type UpsertSynonymSetRequestItemsList = Array<SynonymItemSchema>;
2519
- export declare const UpsertSynonymSetRequestItemsList: S.Schema<UpsertSynonymSetRequestItemsList>;
2520
2263
  export interface UpsertSynonymSetRequest {
2521
2264
  /** The name of the synonym set to create/update */
2522
2265
  synonymSetName: string;
2523
2266
  /** Array of synonym items */
2524
2267
  items: UpsertSynonymSetRequestItemsList;
2525
2268
  }
2526
- export declare const UpsertSynonymSetRequest: S.Schema<UpsertSynonymSetRequest>;
2527
2269
  /** Array of synonym items */
2528
2270
  export type UpsertSynonymSetResponseItemsList = Array<SynonymItemSchema>;
2529
- export declare const UpsertSynonymSetResponseItemsList: S.Schema<UpsertSynonymSetResponseItemsList>;
2530
2271
  export interface UpsertSynonymSetResponse {
2531
2272
  /** Array of synonym items */
2532
2273
  items: UpsertSynonymSetResponseItemsList;
2533
2274
  /** Name of the synonym set */
2534
2275
  name: string;
2535
2276
  }
2536
- export declare const UpsertSynonymSetResponse: S.Schema<UpsertSynonymSetResponse>;
2537
2277
  /** Array of words that should be considered as synonyms */
2538
2278
  export type UpsertSynonymSetItemRequestSynonymsList = Array<string>;
2539
- export declare const UpsertSynonymSetItemRequestSynonymsList: S.Schema<UpsertSynonymSetItemRequestSynonymsList>;
2540
2279
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
2541
2280
  export type UpsertSynonymSetItemRequestSymbolsToIndexList = Array<string>;
2542
- export declare const UpsertSynonymSetItemRequestSymbolsToIndexList: S.Schema<UpsertSynonymSetItemRequestSymbolsToIndexList>;
2543
2281
  export interface UpsertSynonymSetItemRequest {
2544
2282
  /** The name of the synonym set */
2545
2283
  synonymSetName: string;
@@ -2548,35 +2286,30 @@ export interface UpsertSynonymSetItemRequest {
2548
2286
  /** Array of words that should be considered as synonyms */
2549
2287
  synonyms: UpsertSynonymSetItemRequestSynonymsList;
2550
2288
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
2551
- root?: string;
2289
+ root?: string | undefined;
2552
2290
  /** Locale for the synonym, leave blank to use the standard tokenizer */
2553
- locale?: string;
2291
+ locale?: string | undefined;
2554
2292
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
2555
- symbols_to_index?: UpsertSynonymSetItemRequestSymbolsToIndexList;
2293
+ symbols_to_index?: UpsertSynonymSetItemRequestSymbolsToIndexList | undefined;
2556
2294
  }
2557
- export declare const UpsertSynonymSetItemRequest: S.Schema<UpsertSynonymSetItemRequest>;
2558
2295
  /** Array of words that should be considered as synonyms */
2559
2296
  export type UpsertSynonymSetItemResponseSynonymsList = Array<string>;
2560
- export declare const UpsertSynonymSetItemResponseSynonymsList: S.Schema<UpsertSynonymSetItemResponseSynonymsList>;
2561
2297
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
2562
2298
  export type UpsertSynonymSetItemResponseSymbolsToIndexList = Array<string>;
2563
- export declare const UpsertSynonymSetItemResponseSymbolsToIndexList: S.Schema<UpsertSynonymSetItemResponseSymbolsToIndexList>;
2564
2299
  export interface UpsertSynonymSetItemResponse {
2565
2300
  /** Unique identifier for the synonym item */
2566
2301
  id: string;
2567
2302
  /** Array of words that should be considered as synonyms */
2568
2303
  synonyms: UpsertSynonymSetItemResponseSynonymsList;
2569
2304
  /** For 1-way synonyms, indicates the root word that words in the synonyms parameter map to */
2570
- root?: string;
2305
+ root?: string | undefined;
2571
2306
  /** Locale for the synonym, leave blank to use the standard tokenizer */
2572
- locale?: string;
2307
+ locale?: string | undefined;
2573
2308
  /** By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is */
2574
- symbols_to_index?: UpsertSynonymSetItemResponseSymbolsToIndexList;
2309
+ symbols_to_index?: UpsertSynonymSetItemResponseSymbolsToIndexList | undefined;
2575
2310
  }
2576
- export declare const UpsertSynonymSetItemResponse: S.Schema<UpsertSynonymSetItemResponse>;
2577
2311
  export interface VoteRequest {
2578
2312
  }
2579
- export declare const VoteRequest: S.Schema<VoteRequest>;
2580
2313
  export type ClearCacheError = TypesenseOpError;
2581
2314
  /** Clear the cached responses of search requests in the LRU cache. Clear the cached responses of search requests that are sent with `use_cache` parameter in the LRU cache. */
2582
2315
  export declare const clearCache: API.OperationMethod<ClearCacheRequest, SuccessStatus, ClearCacheError, TypesenseOpContext>;
@@ -2658,18 +2391,51 @@ export declare const getAlias: API.OperationMethod<GetAliasRequest, CollectionAl
2658
2391
  export type GetAliasesError = TypesenseOpError;
2659
2392
  /** List all aliases List all aliases and the corresponding collections that they map to. */
2660
2393
  export declare const getAliases: API.OperationMethod<GetAliasesRequest, CollectionAliasesResponse, GetAliasesError, TypesenseOpContext>;
2394
+ export type GetAllConversationModelsError = TypesenseOpError;
2395
+ /** List all conversation models Retrieve all conversation models */
2396
+ export declare const getAllConversationModels: API.OperationMethod<GetAllConversationModelsRequest, GetAllConversationModelsResponse, GetAllConversationModelsError, TypesenseOpContext>;
2397
+ export type GetAllNLSearchModelsError = TypesenseOpError;
2398
+ /** List all NL search models Retrieve all NL search models. */
2399
+ export declare const getAllNLSearchModels: API.OperationMethod<GetAllNLSearchModelsRequest, GetAllNLSearchModelsResponse, GetAllNLSearchModelsError, TypesenseOpContext>;
2400
+ export type GetAllPresetsError = TypesenseOpError;
2401
+ /** Retrieves all presets. Retrieve the details of all presets */
2402
+ export declare const getAllPresets: API.OperationMethod<GetAllPresetsRequest, PresetsRetrieveSchema, GetAllPresetsError, TypesenseOpContext>;
2661
2403
  export type GetAnalyticsEventsError = BadRequest | TypesenseOpError;
2662
2404
  /** Retrieve analytics events Retrieve the most recent events for a user and rule. */
2663
2405
  export declare const getAnalyticsEvents: API.OperationMethod<GetAnalyticsEventsRequest, AnalyticsEventsResponse, GetAnalyticsEventsError, TypesenseOpContext>;
2406
+ export type GetAnalyticsRuleError = NotFound | TypesenseOpError;
2407
+ /** Retrieves an analytics rule Retrieve the details of an analytics rule, given it's name */
2408
+ export declare const getAnalyticsRule: API.OperationMethod<GetAnalyticsRuleRequest, GetAnalyticsRuleResponse, GetAnalyticsRuleError, TypesenseOpContext>;
2409
+ export type GetAnalyticsRulesError = TypesenseOpError;
2410
+ /** Retrieve analytics rules Retrieve all analytics rules. Use the optional rule_tag filter to narrow down results. */
2411
+ export declare const getAnalyticsRules: API.OperationMethod<GetAnalyticsRulesRequest, GetAnalyticsRulesResponse, GetAnalyticsRulesError, TypesenseOpContext>;
2664
2412
  export type GetAnalyticsStatusError = TypesenseOpError;
2665
2413
  /** Get analytics subsystem status Returns sizes of internal analytics buffers and queues. */
2666
2414
  export declare const getAnalyticsStatus: API.OperationMethod<GetAnalyticsStatusRequest, AnalyticsStatus, GetAnalyticsStatusError, TypesenseOpContext>;
2415
+ export type GetAPIStatsError = TypesenseOpError;
2416
+ /** Get stats about API endpoints. Retrieve the stats about API endpoints. */
2417
+ export declare const getAPIStats: API.OperationMethod<GetAPIStatsRequest, APIStatsResponse, GetAPIStatsError, TypesenseOpContext>;
2667
2418
  export type GetCollectionError = NotFound | TypesenseOpError;
2668
2419
  /** Retrieve a single collection Retrieve the details of a collection, given its name. */
2669
2420
  export declare const getCollection: API.OperationMethod<GetCollectionRequest, GetCollectionResponse, GetCollectionError, TypesenseOpContext>;
2670
2421
  export type GetCollectionsError = TypesenseOpError;
2671
2422
  /** List all collections Returns a summary of all your collections. The collections are returned sorted by creation date, with the most recent collections appearing first. */
2672
2423
  export declare const getCollections: API.OperationMethod<GetCollectionsRequest, GetCollectionsResponse, GetCollectionsError, TypesenseOpContext>;
2424
+ export type GetConversationModelError = NotFound | TypesenseOpError;
2425
+ /** Retrieve a conversation model Retrieve a conversation model */
2426
+ export declare const getConversationModel: API.OperationMethod<GetConversationModelRequest, GetConversationModelResponse, GetConversationModelError, TypesenseOpContext>;
2427
+ export type GetCurationSetError = NotFound | TypesenseOpError;
2428
+ /** Retrieve a curation set Retrieve a specific curation set by its name */
2429
+ export declare const getCurationSet: API.OperationMethod<GetCurationSetRequest, GetCurationSetResponse, GetCurationSetError, TypesenseOpContext>;
2430
+ export type GetCurationSetItemError = NotFound | TypesenseOpError;
2431
+ /** Retrieve a curation set item Retrieve a specific curation item by its id */
2432
+ export declare const getCurationSetItem: API.OperationMethod<GetCurationSetItemRequest, GetCurationSetItemResponse, GetCurationSetItemError, TypesenseOpContext>;
2433
+ export type GetCurationSetItemsError = NotFound | TypesenseOpError;
2434
+ /** List items in a curation set Retrieve all curation items in a set */
2435
+ export declare const getCurationSetItems: API.OperationMethod<GetCurationSetItemsRequest, GetCurationSetItemsResponse, GetCurationSetItemsError, TypesenseOpContext>;
2436
+ export type GetCurationSetsError = TypesenseOpError;
2437
+ /** List all curation sets Retrieve all curation sets */
2438
+ export declare const getCurationSets: API.OperationMethod<GetCurationSetsRequest, GetCurationSetsResponse, GetCurationSetsError, TypesenseOpContext>;
2673
2439
  export type GetDocumentError = NotFound | TypesenseOpError;
2674
2440
  /** Retrieve a document Fetch an individual document from a collection by using its ID. */
2675
2441
  export declare const getDocument: API.OperationMethod<GetDocumentRequest, GetDocumentResponse, GetDocumentError, TypesenseOpContext>;
@@ -2679,12 +2445,39 @@ export declare const getKey: API.OperationMethod<GetKeyRequest, GetKeyResponse,
2679
2445
  export type GetKeysError = TypesenseOpError;
2680
2446
  /** Retrieve (metadata about) all keys. */
2681
2447
  export declare const getKeys: API.OperationMethod<GetKeysRequest, ApiKeysResponse, GetKeysError, TypesenseOpContext>;
2448
+ export type GetMetricsError = TypesenseOpError;
2449
+ /** Get current RAM, CPU, Disk & Network usage metrics. Retrieve the metrics. */
2450
+ export declare const getMetrics: API.OperationMethod<GetMetricsRequest, GetMetricsResponse, GetMetricsError, TypesenseOpContext>;
2451
+ export type GetNLSearchModelError = NotFound | TypesenseOpError;
2452
+ /** Retrieve a NL search model Retrieve a specific NL search model by its ID. */
2453
+ export declare const getNLSearchModel: API.OperationMethod<GetNLSearchModelRequest, GetNLSearchModelResponse, GetNLSearchModelError, TypesenseOpContext>;
2454
+ export type GetPresetError = NotFound | TypesenseOpError;
2455
+ /** Retrieves a preset. Retrieve the details of a preset, given it's name. */
2456
+ export declare const getPreset: API.OperationMethod<GetPresetRequest, GetPresetResponse, GetPresetError, TypesenseOpContext>;
2682
2457
  export type GetSchemaChangesError = TypesenseOpError;
2683
2458
  /** Get the status of in-progress schema change operations Returns the status of any ongoing schema change operations. If no schema changes are in progress, returns an empty response. */
2684
2459
  export declare const getSchemaChanges: API.OperationMethod<GetSchemaChangesRequest, GetSchemaChangesResponse, GetSchemaChangesError, TypesenseOpContext>;
2685
2460
  export type GetStemmingDictionaryError = NotFound | TypesenseOpError;
2686
2461
  /** Retrieve a stemming dictionary Fetch details of a specific stemming dictionary. */
2687
2462
  export declare const getStemmingDictionary: API.OperationMethod<GetStemmingDictionaryRequest, StemmingDictionary, GetStemmingDictionaryError, TypesenseOpContext>;
2463
+ export type GetStopwordsSetError = NotFound | TypesenseOpError;
2464
+ /** Retrieves a stopwords set. Retrieve the details of a stopwords set, given it's name. */
2465
+ export declare const getStopwordsSet: API.OperationMethod<GetStopwordsSetRequest, StopwordsSetRetrieveSchema, GetStopwordsSetError, TypesenseOpContext>;
2466
+ export type GetStopwordsSetsError = TypesenseOpError;
2467
+ /** Retrieves all stopwords sets. Retrieve the details of all stopwords sets */
2468
+ export declare const getStopwordsSets: API.OperationMethod<GetStopwordsSetsRequest, StopwordsSetsRetrieveAllSchema, GetStopwordsSetsError, TypesenseOpContext>;
2469
+ export type GetSynonymSetError = NotFound | TypesenseOpError;
2470
+ /** Retrieve a synonym set Retrieve a specific synonym set by its name */
2471
+ export declare const getSynonymSet: API.OperationMethod<GetSynonymSetRequest, GetSynonymSetResponse, GetSynonymSetError, TypesenseOpContext>;
2472
+ export type GetSynonymSetItemError = NotFound | TypesenseOpError;
2473
+ /** Retrieve a synonym set item Retrieve a specific synonym item by its id */
2474
+ export declare const getSynonymSetItem: API.OperationMethod<GetSynonymSetItemRequest, GetSynonymSetItemResponse, GetSynonymSetItemError, TypesenseOpContext>;
2475
+ export type GetSynonymSetItemsError = NotFound | TypesenseOpError;
2476
+ /** List items in a synonym set Retrieve all synonym items in a set */
2477
+ export declare const getSynonymSetItems: API.OperationMethod<GetSynonymSetItemsRequest, GetSynonymSetItemsResponse, GetSynonymSetItemsError, TypesenseOpContext>;
2478
+ export type GetSynonymSetsError = TypesenseOpError;
2479
+ /** List all synonym sets Retrieve all synonym sets */
2480
+ export declare const getSynonymSets: API.OperationMethod<GetSynonymSetsRequest, GetSynonymSetsResponse, GetSynonymSetsError, TypesenseOpContext>;
2688
2481
  export type HealthError = TypesenseOpError;
2689
2482
  /** Checks if Typesense server is ready to accept requests. Checks if Typesense server is ready to accept requests. */
2690
2483
  export declare const health: API.OperationMethod<HealthRequest, HealthStatus, HealthError, TypesenseOpContext>;
@@ -2700,72 +2493,12 @@ export declare const indexDocument: API.OperationMethod<IndexDocumentRequest, In
2700
2493
  export type ListStemmingDictionariesError = TypesenseOpError;
2701
2494
  /** List all stemming dictionaries Retrieve a list of all available stemming dictionaries. */
2702
2495
  export declare const listStemmingDictionaries: API.OperationMethod<ListStemmingDictionariesRequest, ListStemmingDictionariesResponse, ListStemmingDictionariesError, TypesenseOpContext>;
2703
- export type MultiSearchError = BadRequest | TypesenseOpError;
2704
- /** send multiple search requests in a single HTTP request This is especially useful to avoid round-trip network latencies incurred otherwise if each of these requests are sent in separate HTTP requests. You can also use this feature to do a federated search across multiple collections in a single HTTP request. */
2705
- export declare const multiSearch: API.OperationMethod<MultiSearchRequest, MultiSearchResult, MultiSearchError, TypesenseOpContext>;
2706
- export type RetrieveAllConversationModelsError = TypesenseOpError;
2707
- /** List all conversation models Retrieve all conversation models */
2708
- export declare const retrieveAllConversationModels: API.OperationMethod<RetrieveAllConversationModelsRequest, RetrieveAllConversationModelsResponse, RetrieveAllConversationModelsError, TypesenseOpContext>;
2709
- export type RetrieveAllNLSearchModelsError = TypesenseOpError;
2710
- /** List all NL search models Retrieve all NL search models. */
2711
- export declare const retrieveAllNLSearchModels: API.OperationMethod<RetrieveAllNLSearchModelsRequest, RetrieveAllNLSearchModelsResponse, RetrieveAllNLSearchModelsError, TypesenseOpContext>;
2712
- export type RetrieveAllPresetsError = TypesenseOpError;
2713
- /** Retrieves all presets. Retrieve the details of all presets */
2714
- export declare const retrieveAllPresets: API.OperationMethod<RetrieveAllPresetsRequest, PresetsRetrieveSchema, RetrieveAllPresetsError, TypesenseOpContext>;
2715
- export type RetrieveAnalyticsRuleError = NotFound | TypesenseOpError;
2716
- /** Retrieves an analytics rule Retrieve the details of an analytics rule, given it's name */
2717
- export declare const retrieveAnalyticsRule: API.OperationMethod<RetrieveAnalyticsRuleRequest, RetrieveAnalyticsRuleResponse, RetrieveAnalyticsRuleError, TypesenseOpContext>;
2718
- export type RetrieveAnalyticsRulesError = TypesenseOpError;
2719
- /** Retrieve analytics rules Retrieve all analytics rules. Use the optional rule_tag filter to narrow down results. */
2720
- export declare const retrieveAnalyticsRules: API.OperationMethod<RetrieveAnalyticsRulesRequest, RetrieveAnalyticsRulesResponse, RetrieveAnalyticsRulesError, TypesenseOpContext>;
2721
- export type RetrieveAPIStatsError = TypesenseOpError;
2722
- /** Get stats about API endpoints. Retrieve the stats about API endpoints. */
2723
- export declare const retrieveAPIStats: API.OperationMethod<RetrieveAPIStatsRequest, APIStatsResponse, RetrieveAPIStatsError, TypesenseOpContext>;
2724
- export type RetrieveConversationModelError = NotFound | TypesenseOpError;
2725
- /** Retrieve a conversation model Retrieve a conversation model */
2726
- export declare const retrieveConversationModel: API.OperationMethod<RetrieveConversationModelRequest, RetrieveConversationModelResponse, RetrieveConversationModelError, TypesenseOpContext>;
2727
- export type RetrieveCurationSetError = NotFound | TypesenseOpError;
2728
- /** Retrieve a curation set Retrieve a specific curation set by its name */
2729
- export declare const retrieveCurationSet: API.OperationMethod<RetrieveCurationSetRequest, RetrieveCurationSetResponse, RetrieveCurationSetError, TypesenseOpContext>;
2730
- export type RetrieveCurationSetItemError = NotFound | TypesenseOpError;
2731
- /** Retrieve a curation set item Retrieve a specific curation item by its id */
2732
- export declare const retrieveCurationSetItem: API.OperationMethod<RetrieveCurationSetItemRequest, RetrieveCurationSetItemResponse, RetrieveCurationSetItemError, TypesenseOpContext>;
2733
- export type RetrieveCurationSetItemsError = NotFound | TypesenseOpError;
2734
- /** List items in a curation set Retrieve all curation items in a set */
2735
- export declare const retrieveCurationSetItems: API.OperationMethod<RetrieveCurationSetItemsRequest, RetrieveCurationSetItemsResponse, RetrieveCurationSetItemsError, TypesenseOpContext>;
2736
- export type RetrieveCurationSetsError = TypesenseOpError;
2737
- /** List all curation sets Retrieve all curation sets */
2738
- export declare const retrieveCurationSets: API.OperationMethod<RetrieveCurationSetsRequest, RetrieveCurationSetsResponse, RetrieveCurationSetsError, TypesenseOpContext>;
2739
- export type RetrieveMetricsError = TypesenseOpError;
2740
- /** Get current RAM, CPU, Disk & Network usage metrics. Retrieve the metrics. */
2741
- export declare const retrieveMetrics: API.OperationMethod<RetrieveMetricsRequest, RetrieveMetricsResponse, RetrieveMetricsError, TypesenseOpContext>;
2742
- export type RetrieveNLSearchModelError = NotFound | TypesenseOpError;
2743
- /** Retrieve a NL search model Retrieve a specific NL search model by its ID. */
2744
- export declare const retrieveNLSearchModel: API.OperationMethod<RetrieveNLSearchModelRequest, RetrieveNLSearchModelResponse, RetrieveNLSearchModelError, TypesenseOpContext>;
2745
- export type RetrievePresetError = NotFound | TypesenseOpError;
2746
- /** Retrieves a preset. Retrieve the details of a preset, given it's name. */
2747
- export declare const retrievePreset: API.OperationMethod<RetrievePresetRequest, RetrievePresetResponse, RetrievePresetError, TypesenseOpContext>;
2748
- export type RetrieveStopwordsSetError = NotFound | TypesenseOpError;
2749
- /** Retrieves a stopwords set. Retrieve the details of a stopwords set, given it's name. */
2750
- export declare const retrieveStopwordsSet: API.OperationMethod<RetrieveStopwordsSetRequest, StopwordsSetRetrieveSchema, RetrieveStopwordsSetError, TypesenseOpContext>;
2751
- export type RetrieveStopwordsSetsError = TypesenseOpError;
2752
- /** Retrieves all stopwords sets. Retrieve the details of all stopwords sets */
2753
- export declare const retrieveStopwordsSets: API.OperationMethod<RetrieveStopwordsSetsRequest, StopwordsSetsRetrieveAllSchema, RetrieveStopwordsSetsError, TypesenseOpContext>;
2754
- export type RetrieveSynonymSetError = NotFound | TypesenseOpError;
2755
- /** Retrieve a synonym set Retrieve a specific synonym set by its name */
2756
- export declare const retrieveSynonymSet: API.OperationMethod<RetrieveSynonymSetRequest, RetrieveSynonymSetResponse, RetrieveSynonymSetError, TypesenseOpContext>;
2757
- export type RetrieveSynonymSetItemError = NotFound | TypesenseOpError;
2758
- /** Retrieve a synonym set item Retrieve a specific synonym item by its id */
2759
- export declare const retrieveSynonymSetItem: API.OperationMethod<RetrieveSynonymSetItemRequest, RetrieveSynonymSetItemResponse, RetrieveSynonymSetItemError, TypesenseOpContext>;
2760
- export type RetrieveSynonymSetItemsError = NotFound | TypesenseOpError;
2761
- /** List items in a synonym set Retrieve all synonym items in a set */
2762
- export declare const retrieveSynonymSetItems: API.OperationMethod<RetrieveSynonymSetItemsRequest, RetrieveSynonymSetItemsResponse, RetrieveSynonymSetItemsError, TypesenseOpContext>;
2763
- export type RetrieveSynonymSetsError = TypesenseOpError;
2764
- /** List all synonym sets Retrieve all synonym sets */
2765
- export declare const retrieveSynonymSets: API.OperationMethod<RetrieveSynonymSetsRequest, RetrieveSynonymSetsResponse, RetrieveSynonymSetsError, TypesenseOpContext>;
2766
2496
  export type SearchCollectionError = BadRequest | NotFound | TypesenseOpError;
2767
2497
  /** Search for documents in a collection Search for documents in a collection that match the search criteria. */
2768
2498
  export declare const searchCollection: API.OperationMethod<SearchCollectionRequest, SearchResult, SearchCollectionError, TypesenseOpContext>;
2499
+ export type SearchMultiError = BadRequest | TypesenseOpError;
2500
+ /** send multiple search requests in a single HTTP request This is especially useful to avoid round-trip network latencies incurred otherwise if each of these requests are sent in separate HTTP requests. You can also use this feature to do a federated search across multiple collections in a single HTTP request. */
2501
+ export declare const searchMulti: API.OperationMethod<SearchMultiRequest, MultiSearchResult, SearchMultiError, TypesenseOpContext>;
2769
2502
  export type TakeSnapshotError = TypesenseOpError;
2770
2503
  /** Creates a point-in-time snapshot of a Typesense node's state and data in the specified directory. Creates a point-in-time snapshot of a Typesense node's state and data in the specified directory. You can then backup the snapshot directory that gets created and later restore it as a data directory, as needed. */
2771
2504
  export declare const takeSnapshot: API.OperationMethod<TakeSnapshotRequest, SuccessStatus, TakeSnapshotError, TypesenseOpContext>;