@searchstack/public-api 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +15 -0
- package/README.md +200 -0
- package/dist/AccountService.d.ts +12 -0
- package/dist/AccountService.d.ts.map +1 -0
- package/dist/AccountService.js +19 -0
- package/dist/AccountService.js.map +1 -0
- package/dist/AnalyticsService.d.ts +12 -0
- package/dist/AnalyticsService.d.ts.map +1 -0
- package/dist/AnalyticsService.js +32 -0
- package/dist/AnalyticsService.js.map +1 -0
- package/dist/Client.d.ts +59 -0
- package/dist/Client.d.ts.map +1 -0
- package/dist/Client.js +78 -0
- package/dist/Client.js.map +1 -0
- package/dist/ContributorService.d.ts +12 -0
- package/dist/ContributorService.d.ts.map +1 -0
- package/dist/ContributorService.js +20 -0
- package/dist/ContributorService.js.map +1 -0
- package/dist/CoordinatesService.d.ts +12 -0
- package/dist/CoordinatesService.d.ts.map +1 -0
- package/dist/CoordinatesService.js +21 -0
- package/dist/CoordinatesService.js.map +1 -0
- package/dist/DiscoveryService.d.ts +13 -0
- package/dist/DiscoveryService.d.ts.map +1 -0
- package/dist/DiscoveryService.js +25 -0
- package/dist/DiscoveryService.js.map +1 -0
- package/dist/EvalService.d.ts +24 -0
- package/dist/EvalService.d.ts.map +1 -0
- package/dist/EvalService.js +55 -0
- package/dist/EvalService.js.map +1 -0
- package/dist/FacetService.d.ts +14 -0
- package/dist/FacetService.d.ts.map +1 -0
- package/dist/FacetService.js +26 -0
- package/dist/FacetService.js.map +1 -0
- package/dist/Fetch.d.ts +23 -0
- package/dist/Fetch.d.ts.map +1 -0
- package/dist/Fetch.js +74 -0
- package/dist/Fetch.js.map +1 -0
- package/dist/GroupService.d.ts +44 -0
- package/dist/GroupService.d.ts.map +1 -0
- package/dist/GroupService.js +100 -0
- package/dist/GroupService.js.map +1 -0
- package/dist/JudgeService.d.ts +22 -0
- package/dist/JudgeService.d.ts.map +1 -0
- package/dist/JudgeService.js +47 -0
- package/dist/JudgeService.js.map +1 -0
- package/dist/ListService.d.ts +18 -0
- package/dist/ListService.d.ts.map +1 -0
- package/dist/ListService.js +35 -0
- package/dist/ListService.js.map +1 -0
- package/dist/MediaStoreService.d.ts +10 -0
- package/dist/MediaStoreService.d.ts.map +1 -0
- package/dist/MediaStoreService.js +15 -0
- package/dist/MediaStoreService.js.map +1 -0
- package/dist/ResourceService.d.ts +14 -0
- package/dist/ResourceService.d.ts.map +1 -0
- package/dist/ResourceService.js +26 -0
- package/dist/ResourceService.js.map +1 -0
- package/dist/SearchResultService.d.ts +33 -0
- package/dist/SearchResultService.d.ts.map +1 -0
- package/dist/SearchResultService.js +67 -0
- package/dist/SearchResultService.js.map +1 -0
- package/dist/SearchService.d.ts +31 -0
- package/dist/SearchService.d.ts.map +1 -0
- package/dist/SearchService.js +75 -0
- package/dist/SearchService.js.map +1 -0
- package/dist/SearchableFieldService.d.ts +14 -0
- package/dist/SearchableFieldService.d.ts.map +1 -0
- package/dist/SearchableFieldService.js +26 -0
- package/dist/SearchableFieldService.js.map +1 -0
- package/dist/SuggestService.d.ts +12 -0
- package/dist/SuggestService.d.ts.map +1 -0
- package/dist/SuggestService.js +23 -0
- package/dist/SuggestService.js.map +1 -0
- package/dist/Types.d.ts +753 -0
- package/dist/Types.d.ts.map +1 -0
- package/dist/Types.js +38 -0
- package/dist/Types.js.map +1 -0
- package/dist/handleResponse.d.ts +4 -0
- package/dist/handleResponse.d.ts.map +1 -0
- package/dist/handleResponse.js +22 -0
- package/dist/handleResponse.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/package.json +52 -0
package/dist/Types.d.ts
ADDED
|
@@ -0,0 +1,753 @@
|
|
|
1
|
+
/** RFC 7807 problem details returned by the API for any non-success status. */
|
|
2
|
+
export type Problem = {
|
|
3
|
+
type: string;
|
|
4
|
+
title: string;
|
|
5
|
+
status: number;
|
|
6
|
+
instance: string;
|
|
7
|
+
detail: string;
|
|
8
|
+
};
|
|
9
|
+
export type GeoPoint = {
|
|
10
|
+
lat: number;
|
|
11
|
+
lon: number;
|
|
12
|
+
};
|
|
13
|
+
/** A named value used when writing facet / searchable / resource fields. */
|
|
14
|
+
export type NameAndValue = {
|
|
15
|
+
name: string;
|
|
16
|
+
value: unknown;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Discriminated result of an API call. Every service method resolves to a
|
|
20
|
+
* `Response` rather than throwing, so callers branch on `isSuccess` (network and
|
|
21
|
+
* JSON errors are surfaced as a `Problem` with status 500).
|
|
22
|
+
*/
|
|
23
|
+
export declare abstract class Response<S, F> {
|
|
24
|
+
readonly isSuccess: boolean;
|
|
25
|
+
constructor(isSuccess: boolean);
|
|
26
|
+
abstract toSuccess(): S;
|
|
27
|
+
abstract toProblem(): F;
|
|
28
|
+
}
|
|
29
|
+
/** Successful result carrying the deserialized payload. */
|
|
30
|
+
export declare class SuccessResponse<S> extends Response<S, Problem> {
|
|
31
|
+
readonly data: S;
|
|
32
|
+
constructor(data: S);
|
|
33
|
+
toSuccess(): S;
|
|
34
|
+
toProblem(): Problem;
|
|
35
|
+
}
|
|
36
|
+
/** Failed result carrying the parsed problem details. */
|
|
37
|
+
export declare class ProblemResponse<S> extends Response<S, Problem> {
|
|
38
|
+
readonly problem: Problem;
|
|
39
|
+
constructor(problem: Problem);
|
|
40
|
+
toSuccess(): S;
|
|
41
|
+
toProblem(): Problem;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A single search result. The per-modality score fields are prefixed with `@`
|
|
45
|
+
* exactly as the API emits them, and `fields` carries the result's custom data.
|
|
46
|
+
*/
|
|
47
|
+
export type SearchHit = {
|
|
48
|
+
'@text_score'?: number | null;
|
|
49
|
+
'@image_score'?: number | null;
|
|
50
|
+
'@document_score'?: number | null;
|
|
51
|
+
'@video_score'?: number | null;
|
|
52
|
+
'@audio_score'?: number | null;
|
|
53
|
+
name: string;
|
|
54
|
+
list_name?: string | null;
|
|
55
|
+
version?: number | null;
|
|
56
|
+
distance?: number | null;
|
|
57
|
+
location?: GeoPoint | null;
|
|
58
|
+
fields: Record<string, unknown>;
|
|
59
|
+
};
|
|
60
|
+
export type SearchResponse = {
|
|
61
|
+
results: SearchHit[];
|
|
62
|
+
count: number;
|
|
63
|
+
total_count: number;
|
|
64
|
+
query_id?: string | null;
|
|
65
|
+
};
|
|
66
|
+
export type ExtractedDocument = {
|
|
67
|
+
uri: string;
|
|
68
|
+
page_count?: number | null;
|
|
69
|
+
text?: string | null;
|
|
70
|
+
error?: string | null;
|
|
71
|
+
};
|
|
72
|
+
export type ExtractDocumentTextResponse = {
|
|
73
|
+
search_result_name: string;
|
|
74
|
+
max_pages: number;
|
|
75
|
+
documents: ExtractedDocument[];
|
|
76
|
+
};
|
|
77
|
+
/** A typeahead suggestion is an opaque record of the suggested fields. */
|
|
78
|
+
export type Suggestion = Record<string, unknown>;
|
|
79
|
+
export type ListRefResponse = {
|
|
80
|
+
list_name: string;
|
|
81
|
+
account_name: string;
|
|
82
|
+
created: number;
|
|
83
|
+
};
|
|
84
|
+
export type ModelResponse = {
|
|
85
|
+
model_name: string;
|
|
86
|
+
model_value: string;
|
|
87
|
+
model_provider: string;
|
|
88
|
+
supports_documents: boolean;
|
|
89
|
+
max_text_characters: number;
|
|
90
|
+
max_images: number;
|
|
91
|
+
max_image_payload_bytes: number;
|
|
92
|
+
max_document_pages: number;
|
|
93
|
+
max_videos: number;
|
|
94
|
+
max_video_payload_bytes: number;
|
|
95
|
+
max_audios: number;
|
|
96
|
+
max_audio_payload_bytes: number;
|
|
97
|
+
created_utc: number;
|
|
98
|
+
};
|
|
99
|
+
export type RerankerDetailsResponse = {
|
|
100
|
+
account_name: string;
|
|
101
|
+
name: string;
|
|
102
|
+
provider: string;
|
|
103
|
+
provider_display_name: string;
|
|
104
|
+
model: string;
|
|
105
|
+
created_utc: number;
|
|
106
|
+
};
|
|
107
|
+
export type ApiKeyResponse = {
|
|
108
|
+
account_name: string;
|
|
109
|
+
api_key_name: string;
|
|
110
|
+
created: number;
|
|
111
|
+
permissions: string[];
|
|
112
|
+
expires_utc?: number | null;
|
|
113
|
+
};
|
|
114
|
+
export type SubscriptionResponse = {
|
|
115
|
+
subscription_name: string;
|
|
116
|
+
subscription_display_name: string;
|
|
117
|
+
status: string;
|
|
118
|
+
expires_utc: number;
|
|
119
|
+
created_utc: number;
|
|
120
|
+
is_active: boolean;
|
|
121
|
+
max_lists: number;
|
|
122
|
+
max_results?: number | null;
|
|
123
|
+
max_lists_per_group: number;
|
|
124
|
+
cost_per_month: number;
|
|
125
|
+
region: string;
|
|
126
|
+
search_service_name: string;
|
|
127
|
+
provider: string;
|
|
128
|
+
provider_name: string;
|
|
129
|
+
type: string;
|
|
130
|
+
search_result_byte_size: number;
|
|
131
|
+
search_result_count: number;
|
|
132
|
+
max_size_gb?: number | null;
|
|
133
|
+
};
|
|
134
|
+
export type MediaStoreResponse = {
|
|
135
|
+
account_name: string;
|
|
136
|
+
store_name: string;
|
|
137
|
+
provider: string;
|
|
138
|
+
provider_display_name: string;
|
|
139
|
+
created_utc: number;
|
|
140
|
+
is_default: boolean;
|
|
141
|
+
};
|
|
142
|
+
export type CacheServiceDetailsResponse = {
|
|
143
|
+
account_name: string;
|
|
144
|
+
name: string;
|
|
145
|
+
provider: string;
|
|
146
|
+
provider_display_name: string;
|
|
147
|
+
region?: string | null;
|
|
148
|
+
created_utc: number;
|
|
149
|
+
};
|
|
150
|
+
export type WebhookSubscriptionResponse = {
|
|
151
|
+
id: string;
|
|
152
|
+
account_name: string;
|
|
153
|
+
url: string;
|
|
154
|
+
events: string[];
|
|
155
|
+
is_active: boolean;
|
|
156
|
+
is_suspended: boolean;
|
|
157
|
+
created_on: number;
|
|
158
|
+
};
|
|
159
|
+
export type SearchServiceResponse = {
|
|
160
|
+
search_service_name: string;
|
|
161
|
+
region: string;
|
|
162
|
+
provider: string;
|
|
163
|
+
created: number;
|
|
164
|
+
search_service_is_shared: boolean;
|
|
165
|
+
};
|
|
166
|
+
export type AccountResponse = {
|
|
167
|
+
account_name: string;
|
|
168
|
+
owner: string;
|
|
169
|
+
image_path: string;
|
|
170
|
+
created: number;
|
|
171
|
+
lists: ListRefResponse[];
|
|
172
|
+
models: ModelResponse[];
|
|
173
|
+
rerankers: RerankerDetailsResponse[];
|
|
174
|
+
country: string;
|
|
175
|
+
api_keys: ApiKeyResponse[];
|
|
176
|
+
subscriptions: SubscriptionResponse[];
|
|
177
|
+
groups: GroupResponse[];
|
|
178
|
+
github_connected: boolean;
|
|
179
|
+
media_stores: MediaStoreResponse[];
|
|
180
|
+
cache_services: CacheServiceDetailsResponse[];
|
|
181
|
+
webhook_subscriptions: WebhookSubscriptionResponse[];
|
|
182
|
+
search_services: SearchServiceResponse[];
|
|
183
|
+
};
|
|
184
|
+
export type AccountNameResponse = {
|
|
185
|
+
account_name: string;
|
|
186
|
+
};
|
|
187
|
+
export type FacetResponse = {
|
|
188
|
+
facet_name: string;
|
|
189
|
+
field_type: string;
|
|
190
|
+
};
|
|
191
|
+
export type ResourceResponse = {
|
|
192
|
+
resource_name: string;
|
|
193
|
+
vectorize: boolean;
|
|
194
|
+
};
|
|
195
|
+
export type SearchableFieldResponse = {
|
|
196
|
+
searchable_field_name: string;
|
|
197
|
+
vectorize: boolean;
|
|
198
|
+
};
|
|
199
|
+
export type ContributorResponse = {
|
|
200
|
+
contributor_name: string;
|
|
201
|
+
};
|
|
202
|
+
export type SuggestionTargetResponse = {
|
|
203
|
+
target_list_name: string;
|
|
204
|
+
minimum_result_count: number;
|
|
205
|
+
is_active: boolean;
|
|
206
|
+
minimum_characters: number;
|
|
207
|
+
minimum_occurrences: number;
|
|
208
|
+
lookback_days: number;
|
|
209
|
+
require_click: boolean;
|
|
210
|
+
};
|
|
211
|
+
export type ListResponse = {
|
|
212
|
+
account_name: string;
|
|
213
|
+
list_name: string;
|
|
214
|
+
created: number;
|
|
215
|
+
default_search_size: number;
|
|
216
|
+
default_suggest_size: number;
|
|
217
|
+
search_result_count: number;
|
|
218
|
+
search_result_byte_size: number;
|
|
219
|
+
use_miles: boolean;
|
|
220
|
+
typo_tolerance: boolean;
|
|
221
|
+
default_ttl_seconds?: number | null;
|
|
222
|
+
purge_inactive_after_days?: number | null;
|
|
223
|
+
version: number;
|
|
224
|
+
subscription_name: string;
|
|
225
|
+
show_coordinates: boolean;
|
|
226
|
+
suggestion_target?: SuggestionTargetResponse | null;
|
|
227
|
+
model_name: string;
|
|
228
|
+
media_store?: string | null;
|
|
229
|
+
cache_service?: string | null;
|
|
230
|
+
reranker_name?: string | null;
|
|
231
|
+
facets: FacetResponse[];
|
|
232
|
+
contributors: ContributorResponse[];
|
|
233
|
+
searchable_fields: SearchableFieldResponse[];
|
|
234
|
+
resources: ResourceResponse[];
|
|
235
|
+
ip_addresses: string[];
|
|
236
|
+
};
|
|
237
|
+
export type ListIdentityResponse = {
|
|
238
|
+
list_name: string;
|
|
239
|
+
version: number;
|
|
240
|
+
created: number;
|
|
241
|
+
account_name: string;
|
|
242
|
+
};
|
|
243
|
+
/** A restore that rolls a List forward to the content of a past version. */
|
|
244
|
+
export type ListRestoreResponse = {
|
|
245
|
+
list: ListResponse;
|
|
246
|
+
restored_from_version: number;
|
|
247
|
+
new_version: number;
|
|
248
|
+
};
|
|
249
|
+
export type GroupResponse = {
|
|
250
|
+
account_name: string;
|
|
251
|
+
group_name: string;
|
|
252
|
+
subscription_name: string;
|
|
253
|
+
model_name: string;
|
|
254
|
+
reranker_name?: string | null;
|
|
255
|
+
default_search_size: number;
|
|
256
|
+
default_suggest_size: number;
|
|
257
|
+
created: number;
|
|
258
|
+
/** Current membership version. Search/suggest against a specific version. */
|
|
259
|
+
current_version: number;
|
|
260
|
+
/** True when a member list has a newer version than the one pinned here. */
|
|
261
|
+
update_available: boolean;
|
|
262
|
+
lists: ListIdentityResponse[];
|
|
263
|
+
ip_addresses: string[];
|
|
264
|
+
use_miles?: boolean | null;
|
|
265
|
+
};
|
|
266
|
+
/** A restore that rolls a Group's membership forward to a past version. */
|
|
267
|
+
export type GroupRestoreResponse = {
|
|
268
|
+
group: GroupResponse;
|
|
269
|
+
restored_from_version: number;
|
|
270
|
+
/** Member lists that could not be restored (e.g. since deleted). */
|
|
271
|
+
skipped_lists: ListIdentityResponse[];
|
|
272
|
+
};
|
|
273
|
+
export type GroupVersionsResponse = {
|
|
274
|
+
current_version: number;
|
|
275
|
+
versions: number[];
|
|
276
|
+
};
|
|
277
|
+
export type GroupVersionMembersResponse = {
|
|
278
|
+
group_version: number;
|
|
279
|
+
lists: ListIdentityResponse[];
|
|
280
|
+
};
|
|
281
|
+
export type DeleteMediaResponse = {
|
|
282
|
+
deleted: boolean;
|
|
283
|
+
};
|
|
284
|
+
export type AnalyticsTermCountResponse = {
|
|
285
|
+
term: string;
|
|
286
|
+
count: number;
|
|
287
|
+
};
|
|
288
|
+
export type AnalyticsDailyPointResponse = {
|
|
289
|
+
/** UTC date, `yyyy-MM-dd`. */
|
|
290
|
+
date: string;
|
|
291
|
+
searches: number;
|
|
292
|
+
zero_result_searches: number;
|
|
293
|
+
clicks: number;
|
|
294
|
+
};
|
|
295
|
+
export type AnalyticsReportResponse = {
|
|
296
|
+
account: string;
|
|
297
|
+
scope: string;
|
|
298
|
+
target: string;
|
|
299
|
+
/** UTC date, `yyyy-MM-dd`. */
|
|
300
|
+
from: string;
|
|
301
|
+
/** UTC date, `yyyy-MM-dd`. */
|
|
302
|
+
to: string;
|
|
303
|
+
total_searches: number;
|
|
304
|
+
zero_result_searches: number;
|
|
305
|
+
total_clicks: number;
|
|
306
|
+
click_through_rate: number;
|
|
307
|
+
top_searches: AnalyticsTermCountResponse[];
|
|
308
|
+
top_zero_result_searches: AnalyticsTermCountResponse[];
|
|
309
|
+
daily: AnalyticsDailyPointResponse[];
|
|
310
|
+
reranked_searches: number;
|
|
311
|
+
reranker_top_changed_rate: number;
|
|
312
|
+
reranker_mean_displacement: number;
|
|
313
|
+
reranker_click_lift: number;
|
|
314
|
+
reranker_lift_sample_size: number;
|
|
315
|
+
};
|
|
316
|
+
export type CreateSearchResultRequest = {
|
|
317
|
+
account_name: string;
|
|
318
|
+
list_name: string;
|
|
319
|
+
search_result_name: string;
|
|
320
|
+
active?: boolean;
|
|
321
|
+
/** Relative time-to-live in seconds; resolved to an absolute expiry. Ignored when expires_at is set. */
|
|
322
|
+
ttl_seconds?: number | null;
|
|
323
|
+
/** Absolute expiry (epoch ticks). Takes precedence over ttl_seconds and the list default. */
|
|
324
|
+
expires_at?: string | null;
|
|
325
|
+
latitude?: number | null;
|
|
326
|
+
longitude?: number | null;
|
|
327
|
+
facets?: NameAndValue[];
|
|
328
|
+
searchable_fields?: NameAndValue[];
|
|
329
|
+
resources?: NameAndValue[];
|
|
330
|
+
};
|
|
331
|
+
export type UpdateSearchResultRequest = {
|
|
332
|
+
search_result_name?: string | null;
|
|
333
|
+
active?: boolean | null;
|
|
334
|
+
/** Relative TTL in seconds, anchored to the record's creation time. Negative clears the expiry; null/omitted leaves it unchanged. */
|
|
335
|
+
ttl_seconds?: number | null;
|
|
336
|
+
/** Absolute expiry. Takes precedence over ttl_seconds. */
|
|
337
|
+
expires_at?: string | null;
|
|
338
|
+
latitude?: number | null;
|
|
339
|
+
longitude?: number | null;
|
|
340
|
+
facets?: NameAndValue[];
|
|
341
|
+
searchable_fields?: NameAndValue[];
|
|
342
|
+
resources?: NameAndValue[];
|
|
343
|
+
};
|
|
344
|
+
export type UpdateSearchResultVectorRequest = {
|
|
345
|
+
text_vector?: number[];
|
|
346
|
+
image_vector?: number[];
|
|
347
|
+
document_vector?: number[];
|
|
348
|
+
};
|
|
349
|
+
/** Free-text / vector search options. All fields are optional. */
|
|
350
|
+
export type SearchOptions = {
|
|
351
|
+
query?: string;
|
|
352
|
+
size?: number;
|
|
353
|
+
skip?: number;
|
|
354
|
+
filter?: string;
|
|
355
|
+
radius?: string;
|
|
356
|
+
cache?: boolean;
|
|
357
|
+
vector_search?: boolean;
|
|
358
|
+
reranker?: boolean;
|
|
359
|
+
ranking?: string;
|
|
360
|
+
minimum_text_score?: number;
|
|
361
|
+
minimum_image_score?: number;
|
|
362
|
+
minimum_document_score?: number;
|
|
363
|
+
minimum_video_score?: number;
|
|
364
|
+
minimum_audio_score?: number;
|
|
365
|
+
order_by?: string;
|
|
366
|
+
typo_tolerance?: boolean;
|
|
367
|
+
};
|
|
368
|
+
/** Options for finding results related to a seed result. */
|
|
369
|
+
export type RelatedOptions = {
|
|
370
|
+
filter?: string;
|
|
371
|
+
size?: number;
|
|
372
|
+
skip?: number;
|
|
373
|
+
radius?: string;
|
|
374
|
+
minimum_text_score?: number;
|
|
375
|
+
minimum_image_score?: number;
|
|
376
|
+
minimum_document_score?: number;
|
|
377
|
+
minimum_video_score?: number;
|
|
378
|
+
minimum_audio_score?: number;
|
|
379
|
+
cache?: boolean;
|
|
380
|
+
ranking?: string;
|
|
381
|
+
};
|
|
382
|
+
export type SearchByImageRequest = {
|
|
383
|
+
image_path: string;
|
|
384
|
+
filter?: string;
|
|
385
|
+
radius?: string;
|
|
386
|
+
size?: number;
|
|
387
|
+
skip?: number;
|
|
388
|
+
minimum_text_score?: number;
|
|
389
|
+
minimum_image_score?: number;
|
|
390
|
+
minimum_document_score?: number;
|
|
391
|
+
minimum_video_score?: number;
|
|
392
|
+
minimum_audio_score?: number;
|
|
393
|
+
cache?: boolean;
|
|
394
|
+
ranking?: string;
|
|
395
|
+
};
|
|
396
|
+
export type SearchByImageBase64Request = {
|
|
397
|
+
image_base64: string;
|
|
398
|
+
filter?: string;
|
|
399
|
+
radius?: string;
|
|
400
|
+
size?: number;
|
|
401
|
+
skip?: number;
|
|
402
|
+
minimum_text_score?: number;
|
|
403
|
+
minimum_image_score?: number;
|
|
404
|
+
minimum_document_score?: number;
|
|
405
|
+
minimum_video_score?: number;
|
|
406
|
+
minimum_audio_score?: number;
|
|
407
|
+
cache?: boolean;
|
|
408
|
+
ranking?: string;
|
|
409
|
+
};
|
|
410
|
+
export type RecordClickRequest = {
|
|
411
|
+
query_id: string;
|
|
412
|
+
result_id: string;
|
|
413
|
+
/** Required when recording a click against a group; the list the result came from. */
|
|
414
|
+
list_name?: string | null;
|
|
415
|
+
};
|
|
416
|
+
export type CreateListRequest = {
|
|
417
|
+
account_name: string;
|
|
418
|
+
list_name: string;
|
|
419
|
+
subscription_name: string;
|
|
420
|
+
model_name?: string | null;
|
|
421
|
+
cache_service?: string | null;
|
|
422
|
+
reranker_name?: string | null;
|
|
423
|
+
default_ttl_seconds?: number | null;
|
|
424
|
+
};
|
|
425
|
+
export type UpdateListRequest = {
|
|
426
|
+
default_suggest_size?: number | null;
|
|
427
|
+
default_search_size?: number | null;
|
|
428
|
+
use_miles?: boolean | null;
|
|
429
|
+
typo_tolerance?: boolean | null;
|
|
430
|
+
default_ttl_seconds?: number | null;
|
|
431
|
+
};
|
|
432
|
+
export type CreateFacetRequest = {
|
|
433
|
+
account_name: string;
|
|
434
|
+
list_name: string;
|
|
435
|
+
facet_name: string;
|
|
436
|
+
field_type?: string | null;
|
|
437
|
+
};
|
|
438
|
+
export type RenameFacetRequest = {
|
|
439
|
+
new_facet_name: string;
|
|
440
|
+
};
|
|
441
|
+
export type CreateResourceRequest = {
|
|
442
|
+
account_name: string;
|
|
443
|
+
list_name: string;
|
|
444
|
+
resource_name: string;
|
|
445
|
+
vectorize?: boolean;
|
|
446
|
+
};
|
|
447
|
+
export type RenameResourceRequest = {
|
|
448
|
+
resource_name: string;
|
|
449
|
+
new_resource_name: string;
|
|
450
|
+
vectorize?: boolean;
|
|
451
|
+
};
|
|
452
|
+
export type CreateSearchableFieldRequest = {
|
|
453
|
+
account_name: string;
|
|
454
|
+
list_name: string;
|
|
455
|
+
searchable_field_name: string;
|
|
456
|
+
/** When false, the field is excluded from the semantic text embedding (stays keyword-searchable). Defaults to true. */
|
|
457
|
+
vectorize?: boolean;
|
|
458
|
+
};
|
|
459
|
+
export type RenameSearchableFieldRequest = {
|
|
460
|
+
new_searchable_field_name: string;
|
|
461
|
+
/** When false, the field is excluded from the semantic text embedding (stays keyword-searchable). Defaults to true. */
|
|
462
|
+
vectorize?: boolean;
|
|
463
|
+
};
|
|
464
|
+
export type AddContributorRequest = {
|
|
465
|
+
account_name: string;
|
|
466
|
+
list_name: string;
|
|
467
|
+
contributor_name: string;
|
|
468
|
+
};
|
|
469
|
+
export type CreateGroupRequest = {
|
|
470
|
+
account_name: string;
|
|
471
|
+
subscription_name: string;
|
|
472
|
+
group_name: string;
|
|
473
|
+
model_name?: string | null;
|
|
474
|
+
reranker_name?: string | null;
|
|
475
|
+
};
|
|
476
|
+
export type CloneGroupRequest = {
|
|
477
|
+
new_group_name: string;
|
|
478
|
+
/** Re-pin members to their latest version. Defaults to true. */
|
|
479
|
+
pin_latest?: boolean;
|
|
480
|
+
};
|
|
481
|
+
export type EditGroupRequest = {
|
|
482
|
+
default_search_size?: number | null;
|
|
483
|
+
default_suggest_size?: number | null;
|
|
484
|
+
use_miles?: boolean | null;
|
|
485
|
+
};
|
|
486
|
+
export type AddListToGroupRequest = {
|
|
487
|
+
list_name: string;
|
|
488
|
+
version: number;
|
|
489
|
+
/** Adapt the added list's model to match the group's first list. Defaults to false. */
|
|
490
|
+
adapt_to_first_list?: boolean;
|
|
491
|
+
};
|
|
492
|
+
export type EditGroupModelRequest = {
|
|
493
|
+
model_name: string;
|
|
494
|
+
};
|
|
495
|
+
export type AddGroupRerankerRequest = {
|
|
496
|
+
reranker: string;
|
|
497
|
+
};
|
|
498
|
+
export type AddIpAddressRequest = {
|
|
499
|
+
ip_address: string;
|
|
500
|
+
};
|
|
501
|
+
export type TransferGroupRequest = {
|
|
502
|
+
new_subscription_name: string;
|
|
503
|
+
};
|
|
504
|
+
/** Filter selecting the search results to delete. Omit to match all. */
|
|
505
|
+
export type DeleteByFilterRequest = {
|
|
506
|
+
filter?: string | null;
|
|
507
|
+
};
|
|
508
|
+
/** Acknowledgement that a (soft-)delete-by-filter job has been accepted. */
|
|
509
|
+
export type DeleteByFilterResponse = {
|
|
510
|
+
accepted: boolean;
|
|
511
|
+
};
|
|
512
|
+
export type SuggestOptions = {
|
|
513
|
+
size?: number;
|
|
514
|
+
skip?: number;
|
|
515
|
+
filter?: string;
|
|
516
|
+
radius?: string;
|
|
517
|
+
cache?: boolean;
|
|
518
|
+
};
|
|
519
|
+
/** A single query in an eval set, as returned by the API. */
|
|
520
|
+
export type EvalQueryResponse = {
|
|
521
|
+
text: string;
|
|
522
|
+
size: number;
|
|
523
|
+
filter?: string | null;
|
|
524
|
+
text_fields: string[];
|
|
525
|
+
image_fields: string[];
|
|
526
|
+
};
|
|
527
|
+
export type EvalSetResponse = {
|
|
528
|
+
account_name: string;
|
|
529
|
+
name: string;
|
|
530
|
+
list_name?: string | null;
|
|
531
|
+
list_version?: number | null;
|
|
532
|
+
group_name?: string | null;
|
|
533
|
+
group_version?: number | null;
|
|
534
|
+
target_created_utc: number;
|
|
535
|
+
judge_name?: string | null;
|
|
536
|
+
judge_created_utc?: number | null;
|
|
537
|
+
context_text: string;
|
|
538
|
+
context_image_uris: string[];
|
|
539
|
+
/** Events that trigger an automatic run, e.g. "ingest", "schedule". */
|
|
540
|
+
auto_run_on: string[];
|
|
541
|
+
queries: EvalQueryResponse[];
|
|
542
|
+
created_utc: number;
|
|
543
|
+
};
|
|
544
|
+
export type EvalQueryResultResponse = {
|
|
545
|
+
query_index: number;
|
|
546
|
+
query_text: string;
|
|
547
|
+
ordered_candidate_ids: string[];
|
|
548
|
+
judge_run_id?: string | null;
|
|
549
|
+
hit_count: number;
|
|
550
|
+
passed_count: number;
|
|
551
|
+
errored_count: number;
|
|
552
|
+
};
|
|
553
|
+
export type EvalRunStatusResponse = {
|
|
554
|
+
run_id: string;
|
|
555
|
+
account_name: string;
|
|
556
|
+
eval_set_name: string;
|
|
557
|
+
/** e.g. "pending", "running", "completed", "failed". */
|
|
558
|
+
status: string;
|
|
559
|
+
trigger_source: string;
|
|
560
|
+
total_queries: number;
|
|
561
|
+
processed_queries: number;
|
|
562
|
+
zero_result_queries: number;
|
|
563
|
+
total_candidates: number;
|
|
564
|
+
passed_count: number;
|
|
565
|
+
errored_count: number;
|
|
566
|
+
pass_rate?: number | null;
|
|
567
|
+
zero_result_rate?: number | null;
|
|
568
|
+
model_name?: string | null;
|
|
569
|
+
reranker_name?: string | null;
|
|
570
|
+
judge_name?: string | null;
|
|
571
|
+
membership_drifted: boolean;
|
|
572
|
+
created_utc: number;
|
|
573
|
+
completed_utc?: number | null;
|
|
574
|
+
/** Per-query detail; present once the run has produced results. */
|
|
575
|
+
results?: EvalQueryResultResponse[] | null;
|
|
576
|
+
};
|
|
577
|
+
export type EvalRunHistoryResponse = {
|
|
578
|
+
runs: EvalRunStatusResponse[];
|
|
579
|
+
continuation_token?: string | null;
|
|
580
|
+
};
|
|
581
|
+
export type RunEvalResponse = {
|
|
582
|
+
run_id: string;
|
|
583
|
+
estimated_judge_calls: number;
|
|
584
|
+
};
|
|
585
|
+
/** A query supplied when creating an eval set. */
|
|
586
|
+
export type EvalQueryDto = {
|
|
587
|
+
text: string;
|
|
588
|
+
size?: number | null;
|
|
589
|
+
filter?: string | null;
|
|
590
|
+
text_fields?: string[];
|
|
591
|
+
image_fields?: string[];
|
|
592
|
+
};
|
|
593
|
+
export type CreateEvalSetRequest = {
|
|
594
|
+
name: string;
|
|
595
|
+
list_name?: string | null;
|
|
596
|
+
list_version?: number | null;
|
|
597
|
+
group_name?: string | null;
|
|
598
|
+
group_version?: number | null;
|
|
599
|
+
judge_name?: string | null;
|
|
600
|
+
context_text?: string | null;
|
|
601
|
+
context_image_uris?: string[];
|
|
602
|
+
auto_run_on?: string[];
|
|
603
|
+
queries: EvalQueryDto[];
|
|
604
|
+
};
|
|
605
|
+
export type BootstrapEvalSetRequest = {
|
|
606
|
+
name: string;
|
|
607
|
+
/** Judge run ids whose judged candidates seed the new eval set. */
|
|
608
|
+
source_run_ids: string[];
|
|
609
|
+
context_text?: string | null;
|
|
610
|
+
context_image_uris?: string[];
|
|
611
|
+
};
|
|
612
|
+
/** Health of a background-checked BYO service. */
|
|
613
|
+
export type ServiceHealthResponse = {
|
|
614
|
+
/** One of: `unknown`, `healthy`, `degraded`, `failing`. */
|
|
615
|
+
status: string;
|
|
616
|
+
last_checked_utc?: number | null;
|
|
617
|
+
last_success_utc?: number | null;
|
|
618
|
+
message?: string | null;
|
|
619
|
+
};
|
|
620
|
+
export type JudgeDetailsResponse = {
|
|
621
|
+
account_name: string;
|
|
622
|
+
name: string;
|
|
623
|
+
provider: string;
|
|
624
|
+
provider_display_name: string;
|
|
625
|
+
model: string;
|
|
626
|
+
instructions: string;
|
|
627
|
+
/** JSON Schema (as a string) the judge's structured output must satisfy. */
|
|
628
|
+
output_schema: string;
|
|
629
|
+
/** Boolean field in the judge output that decides pass/fail. */
|
|
630
|
+
pass_field?: string | null;
|
|
631
|
+
created_utc: number;
|
|
632
|
+
health?: ServiceHealthResponse | null;
|
|
633
|
+
};
|
|
634
|
+
export type CreateJudgeRequest = {
|
|
635
|
+
provider: string;
|
|
636
|
+
model: string;
|
|
637
|
+
api_key: string;
|
|
638
|
+
instructions: string;
|
|
639
|
+
output_schema: string;
|
|
640
|
+
pass_field?: string | null;
|
|
641
|
+
/** Custom endpoint for the provider, when self-hosted / proxied. */
|
|
642
|
+
endpoint?: string | null;
|
|
643
|
+
};
|
|
644
|
+
export type JudgeContextDto = {
|
|
645
|
+
text: string;
|
|
646
|
+
image_uris?: string[];
|
|
647
|
+
};
|
|
648
|
+
export type JudgeCandidateDto = {
|
|
649
|
+
id: string;
|
|
650
|
+
text: string;
|
|
651
|
+
image_uris?: string[];
|
|
652
|
+
};
|
|
653
|
+
/** Instead of supplying candidates, have the judge run over live search hits. */
|
|
654
|
+
export type JudgeSearchDto = {
|
|
655
|
+
list_name?: string | null;
|
|
656
|
+
version?: number | null;
|
|
657
|
+
group_name?: string | null;
|
|
658
|
+
group_version?: number | null;
|
|
659
|
+
query?: string | null;
|
|
660
|
+
size?: number | null;
|
|
661
|
+
filter?: string | null;
|
|
662
|
+
text_fields?: string[];
|
|
663
|
+
image_fields?: string[];
|
|
664
|
+
};
|
|
665
|
+
export type RunJudgeRequest = {
|
|
666
|
+
context: JudgeContextDto;
|
|
667
|
+
/** Explicit candidates to judge. Mutually exclusive with `search`. */
|
|
668
|
+
candidates?: JudgeCandidateDto[] | null;
|
|
669
|
+
/** Judge live search results instead of explicit candidates. */
|
|
670
|
+
search?: JudgeSearchDto | null;
|
|
671
|
+
batch: boolean;
|
|
672
|
+
};
|
|
673
|
+
export type RunJudgeResponse = {
|
|
674
|
+
run_id: string;
|
|
675
|
+
};
|
|
676
|
+
export type TryJudgeRequest = {
|
|
677
|
+
context: JudgeContextDto;
|
|
678
|
+
candidate: JudgeCandidateDto;
|
|
679
|
+
};
|
|
680
|
+
/** The synchronous result of trying a judge against a single candidate. */
|
|
681
|
+
export type TryJudgeResponse = {
|
|
682
|
+
/** The judge's raw structured (JSON) output. */
|
|
683
|
+
json: string;
|
|
684
|
+
passed: boolean;
|
|
685
|
+
error?: string | null;
|
|
686
|
+
};
|
|
687
|
+
export type JudgeResultResponse = {
|
|
688
|
+
candidate_id: string;
|
|
689
|
+
json: string;
|
|
690
|
+
passed: boolean;
|
|
691
|
+
error?: string | null;
|
|
692
|
+
};
|
|
693
|
+
export type JudgeRunStatusResponse = {
|
|
694
|
+
run_id: string;
|
|
695
|
+
status: string;
|
|
696
|
+
total_candidates: number;
|
|
697
|
+
processed_count: number;
|
|
698
|
+
passed_count: number;
|
|
699
|
+
errored_count: number;
|
|
700
|
+
created_utc: number;
|
|
701
|
+
completed_utc?: number | null;
|
|
702
|
+
results: JudgeResultResponse[];
|
|
703
|
+
};
|
|
704
|
+
export type ApiAuthInfo = {
|
|
705
|
+
type: string;
|
|
706
|
+
description: string;
|
|
707
|
+
};
|
|
708
|
+
export type ApiErrorCode = {
|
|
709
|
+
code: string;
|
|
710
|
+
status: number;
|
|
711
|
+
description: string;
|
|
712
|
+
};
|
|
713
|
+
export type ApiMcpInfo = {
|
|
714
|
+
supported: boolean;
|
|
715
|
+
description: string;
|
|
716
|
+
example_config_url: string;
|
|
717
|
+
};
|
|
718
|
+
export type ApiInfo = {
|
|
719
|
+
name: string;
|
|
720
|
+
description: string;
|
|
721
|
+
version: string;
|
|
722
|
+
openapi_url: string;
|
|
723
|
+
documentation_url: string;
|
|
724
|
+
examples_url: string;
|
|
725
|
+
authentication: ApiAuthInfo;
|
|
726
|
+
error_codes: ApiErrorCode[];
|
|
727
|
+
mcp: ApiMcpInfo;
|
|
728
|
+
};
|
|
729
|
+
export type ApiExample = {
|
|
730
|
+
id: string;
|
|
731
|
+
title: string;
|
|
732
|
+
description: string;
|
|
733
|
+
method: string;
|
|
734
|
+
path: string;
|
|
735
|
+
request_body?: unknown;
|
|
736
|
+
response_status: number;
|
|
737
|
+
response_example: unknown;
|
|
738
|
+
};
|
|
739
|
+
export type ApiExamples = {
|
|
740
|
+
examples: ApiExample[];
|
|
741
|
+
};
|
|
742
|
+
export type ApiCatalogLink = {
|
|
743
|
+
anchor: string;
|
|
744
|
+
rel: string;
|
|
745
|
+
href: string;
|
|
746
|
+
type: string;
|
|
747
|
+
title: string;
|
|
748
|
+
};
|
|
749
|
+
/** IETF api-catalog document (RFC 9727) linking to the API's resources. */
|
|
750
|
+
export type ApiCatalog = {
|
|
751
|
+
linkset: ApiCatalogLink[];
|
|
752
|
+
};
|
|
753
|
+
//# sourceMappingURL=Types.d.ts.map
|