exa-js 2.25.0 → 2.26.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/README.md +124 -8
- package/dist/index.d.mts +839 -352
- package/dist/index.d.ts +839 -352
- package/dist/index.js +1430 -529
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1428 -529
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,19 +1,104 @@
|
|
|
1
1
|
import { ZodSchema, z } from 'zod';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Transport-level options for a single request.
|
|
5
|
+
*
|
|
6
|
+
* These are never serialized into JSON request bodies. They only control the
|
|
7
|
+
* underlying `fetch` call (cancellation and timeouts).
|
|
8
|
+
*/
|
|
9
|
+
type TransportRequestOptions = {
|
|
10
|
+
/**
|
|
11
|
+
* AbortSignal used to cancel the in-flight HTTP request, for stale UI
|
|
12
|
+
* requests or navigation changes. Aborting it rejects the call with
|
|
13
|
+
* `ExaAbortError` whatever the reason, `AbortSignal.timeout()` included.
|
|
14
|
+
* Use `timeout` to get `ExaTimeoutError`.
|
|
15
|
+
*/
|
|
16
|
+
signal?: AbortSignal | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Request timeout in milliseconds. When it expires, the call rejects with
|
|
19
|
+
* `ExaTimeoutError`. It is a deadline for the whole response, body
|
|
20
|
+
* included, counted from when the request is sent. A streaming method
|
|
21
|
+
* applies it to the wait for a successful response to start, never to a
|
|
22
|
+
* stream that is flowing. An error response is read whole within it.
|
|
23
|
+
* Left unset (`undefined`, or `null` from JavaScript), the client's default
|
|
24
|
+
* timeout applies.
|
|
25
|
+
*
|
|
26
|
+
* If both `timeout` and `signal` are provided, the request aborts when either
|
|
27
|
+
* fires first.
|
|
28
|
+
*/
|
|
29
|
+
timeout?: number | undefined;
|
|
30
|
+
};
|
|
31
|
+
/** Query parameter values the SDK can serialize into a URL. */
|
|
32
|
+
type QueryParams$5 = Record<string, string | number | boolean | string[] | undefined>;
|
|
33
|
+
/**
|
|
34
|
+
* Per-call options every API method accepts as its trailing argument.
|
|
35
|
+
*
|
|
36
|
+
* `signal` and `timeout` control the `fetch` call. `body`, `headers` and
|
|
37
|
+
* `query` add to the request the method builds, for fields the SDK does not
|
|
38
|
+
* type yet. On a name the method also sets, the value given here wins.
|
|
39
|
+
*/
|
|
40
|
+
type RequestOptions = TransportRequestOptions & {
|
|
41
|
+
/**
|
|
42
|
+
* Extra fields merged over the JSON request body, except `stream`, because
|
|
43
|
+
* the method called decides whether the response streams. Sent with `POST`,
|
|
44
|
+
* `PUT` and `PATCH` requests. Other requests take `query` instead.
|
|
45
|
+
*/
|
|
46
|
+
body?: Record<string, unknown> | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Extra headers. A header the SDK also sets is replaced, whatever its case.
|
|
49
|
+
* `null` removes it and `undefined` leaves it as it is. The Agent run
|
|
50
|
+
* streams send `Accept: text/event-stream` and keep it, ignoring an extra
|
|
51
|
+
* `Accept`. Every other method, the other streaming methods included, sends
|
|
52
|
+
* an extra `Accept` as given.
|
|
53
|
+
*/
|
|
54
|
+
headers?: Record<string, string | null | undefined> | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Extra query parameters merged over the request's query string, except
|
|
57
|
+
* `stream`. A parameter set to `undefined` is skipped. A `cursor` given to
|
|
58
|
+
* a helper that pages through a listing selects its first page only.
|
|
59
|
+
*/
|
|
60
|
+
query?: QueryParams$5 | undefined;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Base for the API sub-clients (websets, research, agent, monitors).
|
|
64
|
+
*
|
|
65
|
+
* A public method receives the caller's request options as its trailing
|
|
66
|
+
* argument and runs on `this.withRequestOptions(requestOptions)`: a view of
|
|
67
|
+
* the client whose requests carry those options. Whatever the method calls on
|
|
68
|
+
* that view, a request or another method such as a page fetch or a poll,
|
|
69
|
+
* inherits them without changing any argument list.
|
|
70
|
+
*/
|
|
71
|
+
declare abstract class RequestScopedClient {
|
|
72
|
+
/** Request options of this view; undefined on the client itself. */
|
|
73
|
+
protected requestOptions?: RequestOptions;
|
|
74
|
+
/**
|
|
75
|
+
* Returns a view of this client that sends `requestOptions` with every
|
|
76
|
+
* request, on top of any the client already carries. Returns the client
|
|
77
|
+
* itself when there is nothing to add.
|
|
78
|
+
*/
|
|
79
|
+
protected withRequestOptions(requestOptions?: RequestOptions | null): this;
|
|
80
|
+
/**
|
|
81
|
+
* Returns the view a listing fetches its pages with after the first: this
|
|
82
|
+
* one without a `cursor` in the extra `query`. A listing advances the
|
|
83
|
+
* cursor itself; an extra `cursor` selects where it starts and, sent again,
|
|
84
|
+
* would replace every later cursor and fetch that page forever.
|
|
85
|
+
*/
|
|
86
|
+
protected forNextPage(): this;
|
|
87
|
+
}
|
|
88
|
+
|
|
3
89
|
/**
|
|
4
90
|
* Types for the Exa Agent API.
|
|
5
91
|
*/
|
|
6
92
|
|
|
7
93
|
/**
|
|
8
|
-
* @deprecated
|
|
9
|
-
* Retained for legacy `exa.beta.agent` compatibility.
|
|
94
|
+
* @deprecated `exa.agent` does not need a beta header.
|
|
10
95
|
*/
|
|
11
96
|
declare const AGENT_BETA_HEADER = "agent-2026-05-07";
|
|
12
97
|
declare const AGENT_MAX_EFFORT_BETA = "agent-max-effort-2026-07-27";
|
|
13
98
|
interface AgentBetaOptions {
|
|
14
99
|
/**
|
|
15
|
-
* @deprecated
|
|
16
|
-
*
|
|
100
|
+
* @deprecated `exa.agent` does not need a beta header. Values supplied to
|
|
101
|
+
* `exa.beta.agent` are sent as the `Exa-Beta` header.
|
|
17
102
|
*/
|
|
18
103
|
betas?: string[];
|
|
19
104
|
}
|
|
@@ -24,9 +109,8 @@ type AgentEffort = "minimal" | "low" | "medium" | "high" | "xhigh" | "auto" | "u
|
|
|
24
109
|
/** Per-run spend ceiling for the metered `auto` and `ultra` efforts. */
|
|
25
110
|
interface AgentBudget {
|
|
26
111
|
/**
|
|
27
|
-
* Maximum spend for the run in US dollars.
|
|
28
|
-
*
|
|
29
|
-
* allowed range and applies defaults when omitted.
|
|
112
|
+
* Maximum spend for the run in US dollars, from 1 to 100. Only for `auto`
|
|
113
|
+
* and `ultra` effort. Defaults to 5 for `auto` and 20 for `ultra`.
|
|
30
114
|
*/
|
|
31
115
|
maxCostDollars?: number;
|
|
32
116
|
/**
|
|
@@ -35,9 +119,8 @@ interface AgentBudget {
|
|
|
35
119
|
maxDurationSeconds?: number;
|
|
36
120
|
}
|
|
37
121
|
/**
|
|
38
|
-
* Identifier of an Exa Connect data provider
|
|
39
|
-
*
|
|
40
|
-
* `"particle_news"`, or `"jinko"`.
|
|
122
|
+
* Identifier of an Exa Connect data provider. See the Exa Connect docs for the
|
|
123
|
+
* full list.
|
|
41
124
|
*/
|
|
42
125
|
type AgentDataSourceProvider = string;
|
|
43
126
|
/** Exa Connect data source to enable for an Agent run. */
|
|
@@ -159,6 +242,16 @@ interface CreateAgentRunParams {
|
|
|
159
242
|
metadata?: Record<string, unknown>;
|
|
160
243
|
/** Exa Connect data providers to enable for the run. Each entry enables all of that provider's tools. */
|
|
161
244
|
dataSources?: AgentDataSource[];
|
|
245
|
+
/**
|
|
246
|
+
* An opaque ID you assign to the end user this run is made for, such as a
|
|
247
|
+
* UUID, used to attribute usage to that end user. Must not contain personal
|
|
248
|
+
* information such as an email address, phone number, username or name.
|
|
249
|
+
* Hash such values before sending them. 1 to 64 characters: letters, digits,
|
|
250
|
+
* `_` and `-`. Retained even when your team has Zero Data Retention
|
|
251
|
+
* enabled. Does not affect results. A follow-up run (`previousRunId`) that
|
|
252
|
+
* omits it inherits the identifier of the run it continues.
|
|
253
|
+
*/
|
|
254
|
+
userIdentifier?: string;
|
|
162
255
|
}
|
|
163
256
|
type CreateAgentRunParamsTyped<T> = Omit<CreateAgentRunParams, "outputSchema"> & {
|
|
164
257
|
outputSchema?: T;
|
|
@@ -173,10 +266,14 @@ type AgentCreateOptions<T = Record<string, unknown>> = CreateAgentRunParamsTyped
|
|
|
173
266
|
|
|
174
267
|
type QueryParams$4 = Record<string, string | number | boolean | string[] | undefined>;
|
|
175
268
|
type RequestBody$3 = Record<string, unknown>;
|
|
176
|
-
declare class AgentBaseClient {
|
|
269
|
+
declare class AgentBaseClient extends RequestScopedClient {
|
|
177
270
|
protected client: Exa;
|
|
178
271
|
constructor(client: Exa);
|
|
179
272
|
protected request<T = unknown>(endpoint: string, method?: string, data?: RequestBody$3, params?: QueryParams$4, headers?: Record<string, string>): Promise<T>;
|
|
273
|
+
/**
|
|
274
|
+
* Opens a streamed response. `timeout` covers the wait for the stream to
|
|
275
|
+
* start; the caller's `signal` can cancel it at any point.
|
|
276
|
+
*/
|
|
180
277
|
protected rawRequest(endpoint: string, method?: string, data?: RequestBody$3, params?: QueryParams$4, headers?: Record<string, string>): Promise<Response>;
|
|
181
278
|
protected buildPaginationParams(pagination?: ListAgentRunsParams | ListAgentRunEventsParams): QueryParams$4;
|
|
182
279
|
}
|
|
@@ -184,9 +281,8 @@ declare class AgentBaseClient {
|
|
|
184
281
|
/**
|
|
185
282
|
* Types for the Exa Agent Monitors API (`/agent/monitors`).
|
|
186
283
|
*
|
|
187
|
-
* An Agent Monitor keeps a table of entities × fields fresh
|
|
188
|
-
*
|
|
189
|
-
* from news on every refresh, on the monitor's cadence.
|
|
284
|
+
* An Agent Monitor keeps a table of entities × fields fresh on the monitor's
|
|
285
|
+
* cadence.
|
|
190
286
|
*/
|
|
191
287
|
/** Beta identifier required for the Agent Monitors API. */
|
|
192
288
|
declare const AGENT_MONITORS_BETA_HEADER = "agent-monitors-2026-08-04";
|
|
@@ -198,17 +294,13 @@ type AgentMonitorStatus = "creating" | "pending_first_refresh" | "active";
|
|
|
198
294
|
type AgentMonitorFieldMode = "static" | "dynamic";
|
|
199
295
|
/** The type of a field's cell values. */
|
|
200
296
|
type AgentMonitorFieldValueType = "string" | "number" | "boolean" | "date" | "url" | "email" | "phone";
|
|
201
|
-
/**
|
|
202
|
-
* A field the monitor keeps fresh for every entity. Fields are dynamic
|
|
203
|
-
* (tracked from news on every refresh) unless declared `mode: "static"`
|
|
204
|
-
* (answered once over the live web).
|
|
205
|
-
*/
|
|
297
|
+
/** A field the monitor keeps fresh for every entity. */
|
|
206
298
|
interface AgentMonitorField {
|
|
207
299
|
id: string;
|
|
208
300
|
name: string;
|
|
209
301
|
description: string;
|
|
210
|
-
/** @deprecated
|
|
211
|
-
mode
|
|
302
|
+
/** @deprecated Not returned by the API. */
|
|
303
|
+
mode?: AgentMonitorFieldMode;
|
|
212
304
|
/** The type of the field's cell values. */
|
|
213
305
|
type: AgentMonitorFieldValueType;
|
|
214
306
|
}
|
|
@@ -279,9 +371,9 @@ interface AgentMonitorEntityView {
|
|
|
279
371
|
contents: Record<string, AgentMonitorContent>;
|
|
280
372
|
}
|
|
281
373
|
/**
|
|
282
|
-
* Entity
|
|
283
|
-
*
|
|
284
|
-
*
|
|
374
|
+
* Entity and field references on a change item. Join on `id`. The other
|
|
375
|
+
* attributes show current values for display and are absent once the entity
|
|
376
|
+
* or field is removed.
|
|
285
377
|
*/
|
|
286
378
|
interface AgentMonitorChangeEntity {
|
|
287
379
|
id: string;
|
|
@@ -303,27 +395,25 @@ interface AgentMonitorChange {
|
|
|
303
395
|
/** ISO-8601 commit time of the change event. */
|
|
304
396
|
createdAt: string;
|
|
305
397
|
}
|
|
306
|
-
/** An entity to track.
|
|
398
|
+
/** An entity to track. Each name and domain pair must be unique. */
|
|
307
399
|
interface CreateAgentMonitorEntityParams {
|
|
308
400
|
name: string;
|
|
309
|
-
/**
|
|
401
|
+
/** The entity's website domain, used to identify the entity. */
|
|
310
402
|
domain: string;
|
|
311
403
|
/** Extra disambiguation context for entity resolution of ambiguous names. */
|
|
312
404
|
description?: string;
|
|
313
405
|
}
|
|
314
|
-
/** A field to keep fresh.
|
|
406
|
+
/** A field to keep fresh. */
|
|
315
407
|
interface CreateAgentMonitorFieldParams {
|
|
316
408
|
name: string;
|
|
317
409
|
description: string;
|
|
318
410
|
/**
|
|
319
|
-
* The type of the field's
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
* `"static"`/`"dynamic"` are accepted as deprecated aliases of `mode`;
|
|
323
|
-
* declaring both spellings is a 400.
|
|
411
|
+
* The type of the field's values. Defaults to `"string"`. Values are
|
|
412
|
+
* converted to this type where possible. An unsupported type fails the
|
|
413
|
+
* request, including the deprecated values `"static"` and `"dynamic"`.
|
|
324
414
|
*/
|
|
325
415
|
type?: AgentMonitorFieldValueType | AgentMonitorFieldMode;
|
|
326
|
-
/** @deprecated The
|
|
416
|
+
/** @deprecated Omit this field. The API rejects requests that set it. */
|
|
327
417
|
mode?: AgentMonitorFieldMode;
|
|
328
418
|
}
|
|
329
419
|
interface CreateAgentMonitorParams {
|
|
@@ -374,7 +464,10 @@ interface ListAgentMonitorEntitiesResponse {
|
|
|
374
464
|
data: AgentMonitorEntityView[];
|
|
375
465
|
hasMore: boolean;
|
|
376
466
|
nextCursor: string | null;
|
|
377
|
-
/**
|
|
467
|
+
/**
|
|
468
|
+
* Latest change version of the monitor, for showing whether a reader is up
|
|
469
|
+
* to date. Not a cursor. Page with `nextCursor`.
|
|
470
|
+
*/
|
|
378
471
|
version: number;
|
|
379
472
|
}
|
|
380
473
|
interface ListAgentMonitorChangesResponse {
|
|
@@ -383,7 +476,10 @@ interface ListAgentMonitorChangesResponse {
|
|
|
383
476
|
hasMore: boolean;
|
|
384
477
|
/** Opaque; resume the feed from the last served change. Null when data is empty. */
|
|
385
478
|
nextCursor: string | null;
|
|
386
|
-
/**
|
|
479
|
+
/**
|
|
480
|
+
* Latest change version of the monitor, for showing whether a reader is up
|
|
481
|
+
* to date. Not a cursor. Page with `nextCursor`.
|
|
482
|
+
*/
|
|
387
483
|
version: number;
|
|
388
484
|
}
|
|
389
485
|
interface DeletedAgentMonitor {
|
|
@@ -392,9 +488,9 @@ interface DeletedAgentMonitor {
|
|
|
392
488
|
deleted: true;
|
|
393
489
|
}
|
|
394
490
|
/**
|
|
395
|
-
* Params for a
|
|
396
|
-
*
|
|
397
|
-
*
|
|
491
|
+
* Params for a backtest that fills fields for entities over a past window.
|
|
492
|
+
* Fields answered from news use only news published between `startTime` and
|
|
493
|
+
* `endTime`. Other fields return present values. No monitor is created.
|
|
398
494
|
*/
|
|
399
495
|
interface CreateAgentMonitorBacktestParams {
|
|
400
496
|
entities: CreateAgentMonitorEntityParams[];
|
|
@@ -404,7 +500,7 @@ interface CreateAgentMonitorBacktestParams {
|
|
|
404
500
|
/** End of the news window as an ISO-8601 UTC timestamp. */
|
|
405
501
|
endTime: string;
|
|
406
502
|
}
|
|
407
|
-
/** One backtest cell
|
|
503
|
+
/** One backtest cell, with a value and its grounding citations. */
|
|
408
504
|
interface AgentMonitorBacktestContent {
|
|
409
505
|
value: unknown;
|
|
410
506
|
citations: AgentMonitorCitation[];
|
|
@@ -412,7 +508,7 @@ interface AgentMonitorBacktestContent {
|
|
|
412
508
|
/** One entity's backtest result, with populated cells keyed by field name. */
|
|
413
509
|
interface AgentMonitorBacktestEntity {
|
|
414
510
|
name: string;
|
|
415
|
-
/** Populated cells by field name
|
|
511
|
+
/** Populated cells by field name. Fields with no update are absent. */
|
|
416
512
|
contents: Record<string, AgentMonitorBacktestContent>;
|
|
417
513
|
}
|
|
418
514
|
/** The computed body of a finished backtest, embedded in the job once it completes. */
|
|
@@ -427,7 +523,7 @@ interface AgentMonitorBacktestResult {
|
|
|
427
523
|
}
|
|
428
524
|
type AgentMonitorBacktestStatus = "running" | "completed" | "failed";
|
|
429
525
|
/**
|
|
430
|
-
* A backtest job
|
|
526
|
+
* A backtest job. `create` returns it as `running`, and `get` polls it to
|
|
431
527
|
* `completed` (result fields present) or `failed`. Jobs expire and read as
|
|
432
528
|
* 404 after `expiresAt`.
|
|
433
529
|
*/
|
|
@@ -458,7 +554,7 @@ interface AgentMonitorBacktestWaitOptions {
|
|
|
458
554
|
|
|
459
555
|
type QueryParams$3 = Record<string, string | number | boolean | string[] | undefined>;
|
|
460
556
|
type RequestBody$2 = Record<string, any>;
|
|
461
|
-
declare class AgentMonitorsBaseClient {
|
|
557
|
+
declare class AgentMonitorsBaseClient extends RequestScopedClient {
|
|
462
558
|
protected client: Exa;
|
|
463
559
|
constructor(client: Exa);
|
|
464
560
|
protected request<T = unknown>(endpoint: string, betas: string[], method?: string, data?: RequestBody$2, params?: QueryParams$3, headers?: Record<string, string>): Promise<T>;
|
|
@@ -489,58 +585,58 @@ declare class AgentMonitorEntitiesClient extends AgentMonitorsBaseClient {
|
|
|
489
585
|
* and backfilled shortly after the request completes, then update on the
|
|
490
586
|
* monitor's regular refresh cadence.
|
|
491
587
|
*/
|
|
492
|
-
add(monitorId: string, params: AddAgentMonitorEntitiesParams & AgentMonitorsBetaOptions): Promise<AgentMonitor>;
|
|
588
|
+
add(monitorId: string, params: AddAgentMonitorEntitiesParams & AgentMonitorsBetaOptions, requestOptions?: RequestOptions): Promise<AgentMonitor>;
|
|
493
589
|
/**
|
|
494
590
|
* Page an Agent Monitor's current entities and contents, optionally
|
|
495
591
|
* filtered by update time.
|
|
496
592
|
*/
|
|
497
|
-
list(monitorId: string, options: ListAgentMonitorEntitiesParams & AgentMonitorsBetaOptions): Promise<ListAgentMonitorEntitiesResponse>;
|
|
593
|
+
list(monitorId: string, options: ListAgentMonitorEntitiesParams & AgentMonitorsBetaOptions, requestOptions?: RequestOptions): Promise<ListAgentMonitorEntitiesResponse>;
|
|
498
594
|
/**
|
|
499
595
|
* Iterate through all of a monitor's entities, handling pagination
|
|
500
596
|
* automatically.
|
|
501
597
|
*/
|
|
502
|
-
listAll(monitorId: string, options: ListAgentMonitorEntitiesParams & AgentMonitorsBetaOptions): AsyncGenerator<AgentMonitorEntityView>;
|
|
598
|
+
listAll(monitorId: string, options: ListAgentMonitorEntitiesParams & AgentMonitorsBetaOptions, requestOptions?: RequestOptions): AsyncGenerator<AgentMonitorEntityView>;
|
|
503
599
|
/**
|
|
504
600
|
* Collect all of a monitor's entities into an array.
|
|
505
601
|
*/
|
|
506
|
-
getAll(monitorId: string, options: ListAgentMonitorEntitiesParams & AgentMonitorsBetaOptions): Promise<AgentMonitorEntityView[]>;
|
|
602
|
+
getAll(monitorId: string, options: ListAgentMonitorEntitiesParams & AgentMonitorsBetaOptions, requestOptions?: RequestOptions): Promise<AgentMonitorEntityView[]>;
|
|
507
603
|
}
|
|
508
604
|
declare class AgentMonitorChangesClient extends AgentMonitorsBaseClient {
|
|
509
605
|
/**
|
|
510
606
|
* Page an Agent Monitor's content change feed since a cursor or timestamp.
|
|
511
607
|
*/
|
|
512
|
-
list(monitorId: string, options: ListAgentMonitorChangesParams & AgentMonitorsBetaOptions): Promise<ListAgentMonitorChangesResponse>;
|
|
608
|
+
list(monitorId: string, options: ListAgentMonitorChangesParams & AgentMonitorsBetaOptions, requestOptions?: RequestOptions): Promise<ListAgentMonitorChangesResponse>;
|
|
513
609
|
/**
|
|
514
610
|
* Iterate through a monitor's change feed, handling pagination
|
|
515
611
|
* automatically.
|
|
516
612
|
*/
|
|
517
|
-
listAll(monitorId: string, options: ListAgentMonitorChangesParams & AgentMonitorsBetaOptions): AsyncGenerator<AgentMonitorChange>;
|
|
613
|
+
listAll(monitorId: string, options: ListAgentMonitorChangesParams & AgentMonitorsBetaOptions, requestOptions?: RequestOptions): AsyncGenerator<AgentMonitorChange>;
|
|
518
614
|
/**
|
|
519
615
|
* Collect a monitor's change feed into an array.
|
|
520
616
|
*/
|
|
521
|
-
getAll(monitorId: string, options: ListAgentMonitorChangesParams & AgentMonitorsBetaOptions): Promise<AgentMonitorChange[]>;
|
|
617
|
+
getAll(monitorId: string, options: ListAgentMonitorChangesParams & AgentMonitorsBetaOptions, requestOptions?: RequestOptions): Promise<AgentMonitorChange[]>;
|
|
522
618
|
}
|
|
523
619
|
declare class AgentMonitorBacktestsClient extends AgentMonitorsBaseClient {
|
|
524
620
|
/**
|
|
525
621
|
* Start an async backtest of entities × fields over an explicit past news
|
|
526
|
-
* window. Returns a `running` job
|
|
527
|
-
* for the result.
|
|
622
|
+
* window. Returns a `running` job. Poll it with `get`, or use
|
|
623
|
+
* `createAndWait`, for the result.
|
|
528
624
|
*/
|
|
529
|
-
create(params: CreateAgentMonitorBacktestParams & AgentMonitorsBetaOptions): Promise<AgentMonitorBacktest>;
|
|
625
|
+
create(params: CreateAgentMonitorBacktestParams & AgentMonitorsBetaOptions, requestOptions?: RequestOptions): Promise<AgentMonitorBacktest>;
|
|
530
626
|
/**
|
|
531
627
|
* Poll a backtest job for its status and, once completed, its result.
|
|
532
628
|
* Jobs expire and read as 404 after `expiresAt`.
|
|
533
629
|
*/
|
|
534
|
-
get(backtestId: string, options: AgentMonitorsBetaOptions): Promise<AgentMonitorBacktest>;
|
|
630
|
+
get(backtestId: string, options: AgentMonitorsBetaOptions, requestOptions?: RequestOptions): Promise<AgentMonitorBacktest>;
|
|
535
631
|
/**
|
|
536
632
|
* Poll a backtest job until it reaches a terminal status.
|
|
537
633
|
*/
|
|
538
|
-
pollUntilFinished(backtestId: string, options: AgentMonitorBacktestWaitOptions & AgentMonitorsBetaOptions): Promise<AgentMonitorTerminalBacktest>;
|
|
634
|
+
pollUntilFinished(backtestId: string, options: AgentMonitorBacktestWaitOptions & AgentMonitorsBetaOptions, requestOptions?: RequestOptions): Promise<AgentMonitorTerminalBacktest>;
|
|
539
635
|
/**
|
|
540
636
|
* Start a backtest and wait for its result. Throws
|
|
541
637
|
* AgentMonitorBacktestFailedError if the backtest fails.
|
|
542
638
|
*/
|
|
543
|
-
createAndWait(params: CreateAgentMonitorBacktestParams & AgentMonitorsBetaOptions, options?: AgentMonitorBacktestWaitOptions): Promise<AgentMonitorCompletedBacktest>;
|
|
639
|
+
createAndWait(params: CreateAgentMonitorBacktestParams & AgentMonitorsBetaOptions, options?: AgentMonitorBacktestWaitOptions, requestOptions?: RequestOptions): Promise<AgentMonitorCompletedBacktest>;
|
|
544
640
|
}
|
|
545
641
|
declare class AgentMonitorsClient extends AgentMonitorsBaseClient {
|
|
546
642
|
/**
|
|
@@ -561,27 +657,27 @@ declare class AgentMonitorsClient extends AgentMonitorsBaseClient {
|
|
|
561
657
|
* Creation is async: the monitor is returned with status `creating` and
|
|
562
658
|
* becomes `active` once its first refresh completes.
|
|
563
659
|
*/
|
|
564
|
-
create(params: CreateAgentMonitorParams & AgentMonitorsBetaOptions, options?: CreateAgentMonitorOptions): Promise<AgentMonitor>;
|
|
660
|
+
create(params: CreateAgentMonitorParams & AgentMonitorsBetaOptions, options?: CreateAgentMonitorOptions, requestOptions?: RequestOptions): Promise<AgentMonitor>;
|
|
565
661
|
/**
|
|
566
662
|
* Get an Agent Monitor by ID, including refresh progress.
|
|
567
663
|
*/
|
|
568
|
-
get(monitorId: string, options: AgentMonitorsBetaOptions): Promise<AgentMonitor>;
|
|
664
|
+
get(monitorId: string, options: AgentMonitorsBetaOptions, requestOptions?: RequestOptions): Promise<AgentMonitor>;
|
|
569
665
|
/**
|
|
570
666
|
* List the team's Agent Monitors.
|
|
571
667
|
*/
|
|
572
|
-
list(options: ListAgentMonitorsParams & AgentMonitorsBetaOptions): Promise<ListAgentMonitorsResponse>;
|
|
668
|
+
list(options: ListAgentMonitorsParams & AgentMonitorsBetaOptions, requestOptions?: RequestOptions): Promise<ListAgentMonitorsResponse>;
|
|
573
669
|
/**
|
|
574
670
|
* Iterate through all Agent Monitors, handling pagination automatically.
|
|
575
671
|
*/
|
|
576
|
-
listAll(options: ListAgentMonitorsParams & AgentMonitorsBetaOptions): AsyncGenerator<AgentMonitor>;
|
|
672
|
+
listAll(options: ListAgentMonitorsParams & AgentMonitorsBetaOptions, requestOptions?: RequestOptions): AsyncGenerator<AgentMonitor>;
|
|
577
673
|
/**
|
|
578
674
|
* Collect all Agent Monitors into an array.
|
|
579
675
|
*/
|
|
580
|
-
getAll(options: ListAgentMonitorsParams & AgentMonitorsBetaOptions): Promise<AgentMonitor[]>;
|
|
676
|
+
getAll(options: ListAgentMonitorsParams & AgentMonitorsBetaOptions, requestOptions?: RequestOptions): Promise<AgentMonitor[]>;
|
|
581
677
|
/**
|
|
582
678
|
* Delete an Agent Monitor and stop its refreshes.
|
|
583
679
|
*/
|
|
584
|
-
delete(monitorId: string, options: AgentMonitorsBetaOptions): Promise<DeletedAgentMonitor>;
|
|
680
|
+
delete(monitorId: string, options: AgentMonitorsBetaOptions, requestOptions?: RequestOptions): Promise<DeletedAgentMonitor>;
|
|
585
681
|
}
|
|
586
682
|
|
|
587
683
|
/**
|
|
@@ -623,7 +719,7 @@ declare class AgentRunEventsClient extends AgentBaseClient {
|
|
|
623
719
|
/**
|
|
624
720
|
* List stored events for an Agent run.
|
|
625
721
|
*/
|
|
626
|
-
list(runId: string, options?: ListAgentRunEventsParams): Promise<ListAgentRunEventsResponse>;
|
|
722
|
+
list(runId: string, options?: ListAgentRunEventsParams, requestOptions?: RequestOptions): Promise<ListAgentRunEventsResponse>;
|
|
627
723
|
}
|
|
628
724
|
declare class AgentRunsClient extends AgentBaseClient {
|
|
629
725
|
/**
|
|
@@ -636,49 +732,49 @@ declare class AgentRunsClient extends AgentBaseClient {
|
|
|
636
732
|
*/
|
|
637
733
|
create<T>(params: AgentCreateOptions<T> & {
|
|
638
734
|
stream: true;
|
|
639
|
-
}): Promise<AsyncGenerator<AgentEvent>>;
|
|
735
|
+
}, requestOptions?: RequestOptions): Promise<AsyncGenerator<AgentEvent>>;
|
|
640
736
|
create<T>(params: AgentCreateOptions<T> & {
|
|
641
737
|
stream?: false;
|
|
642
|
-
}): Promise<AgentRunTyped<T>>;
|
|
643
|
-
create(params: CreateAgentRunParams): Promise<AgentRun>;
|
|
738
|
+
}, requestOptions?: RequestOptions): Promise<AgentRunTyped<T>>;
|
|
739
|
+
create(params: CreateAgentRunParams, requestOptions?: RequestOptions): Promise<AgentRun>;
|
|
644
740
|
/**
|
|
645
741
|
* Get an Agent run by ID.
|
|
646
742
|
*/
|
|
647
|
-
get(runId: string): Promise<AgentRun>;
|
|
743
|
+
get(runId: string, requestOptions?: RequestOptions): Promise<AgentRun>;
|
|
648
744
|
/**
|
|
649
745
|
* List Agent runs.
|
|
650
746
|
*/
|
|
651
|
-
list(options?: ListAgentRunsParams): Promise<ListAgentRunsResponse>;
|
|
747
|
+
list(options?: ListAgentRunsParams, requestOptions?: RequestOptions): Promise<ListAgentRunsResponse>;
|
|
652
748
|
/**
|
|
653
749
|
* Iterate through all Agent runs, handling pagination automatically.
|
|
654
750
|
*/
|
|
655
|
-
listAll(options?: ListAgentRunsParams): AsyncGenerator<AgentRun>;
|
|
751
|
+
listAll(options?: ListAgentRunsParams, requestOptions?: RequestOptions): AsyncGenerator<AgentRun>;
|
|
656
752
|
/**
|
|
657
753
|
* Collect all Agent runs into an array.
|
|
658
754
|
*/
|
|
659
|
-
getAll(options?: ListAgentRunsParams): Promise<AgentRun[]>;
|
|
755
|
+
getAll(options?: ListAgentRunsParams, requestOptions?: RequestOptions): Promise<AgentRun[]>;
|
|
660
756
|
/**
|
|
661
757
|
* Cancel a queued or running Agent run.
|
|
662
758
|
*/
|
|
663
|
-
cancel(runId: string): Promise<AgentRun>;
|
|
759
|
+
cancel(runId: string, requestOptions?: RequestOptions): Promise<AgentRun>;
|
|
664
760
|
/**
|
|
665
761
|
* Stop a running Agent run, completing it early with the results
|
|
666
762
|
* gathered so far. Only supported for `ultra` effort runs.
|
|
667
763
|
*/
|
|
668
|
-
stop(runId: string): Promise<AgentRun>;
|
|
764
|
+
stop(runId: string, requestOptions?: RequestOptions): Promise<AgentRun>;
|
|
669
765
|
/**
|
|
670
766
|
* Delete a stored Agent run.
|
|
671
767
|
*/
|
|
672
|
-
delete(runId: string): Promise<DeletedAgentRun>;
|
|
768
|
+
delete(runId: string, requestOptions?: RequestOptions): Promise<DeletedAgentRun>;
|
|
673
769
|
/**
|
|
674
770
|
* Poll an Agent run until it reaches a terminal status.
|
|
675
771
|
*/
|
|
676
|
-
pollUntilFinished(runId: string, options?: AgentWaitOptions): Promise<AgentTerminalRun>;
|
|
772
|
+
pollUntilFinished(runId: string, options?: AgentWaitOptions, requestOptions?: RequestOptions): Promise<AgentTerminalRun>;
|
|
677
773
|
/**
|
|
678
774
|
* Create an Agent run and wait until it reaches a terminal status.
|
|
679
775
|
*/
|
|
680
|
-
createAndWait<T>(params: Omit<AgentCreateOptions<T>, "stream">, options?: AgentWaitOptions): Promise<AgentCompletedRunTyped<T>>;
|
|
681
|
-
createAndWait(params: CreateAgentRunParams, options?: AgentWaitOptions): Promise<AgentCompletedRun>;
|
|
776
|
+
createAndWait<T>(params: Omit<AgentCreateOptions<T>, "stream">, options?: AgentWaitOptions, requestOptions?: RequestOptions): Promise<AgentCompletedRunTyped<T>>;
|
|
777
|
+
createAndWait(params: CreateAgentRunParams, options?: AgentWaitOptions, requestOptions?: RequestOptions): Promise<AgentCompletedRun>;
|
|
682
778
|
}
|
|
683
779
|
declare class AgentClient {
|
|
684
780
|
/**
|
|
@@ -697,7 +793,7 @@ declare class AgentBetaRunEventsClient extends AgentRunEventsClient {
|
|
|
697
793
|
*
|
|
698
794
|
* @deprecated Use exa.agent.runs.events instead.
|
|
699
795
|
*/
|
|
700
|
-
list(runId: string, options?: WithBetaOptions<ListAgentRunEventsParams
|
|
796
|
+
list(runId: string, options?: WithBetaOptions<ListAgentRunEventsParams>, requestOptions?: RequestOptions): Promise<ListAgentRunEventsResponse>;
|
|
701
797
|
}
|
|
702
798
|
declare class AgentBetaRunsClient extends AgentRunsClient {
|
|
703
799
|
/**
|
|
@@ -707,25 +803,25 @@ declare class AgentBetaRunsClient extends AgentRunsClient {
|
|
|
707
803
|
constructor(client: Exa);
|
|
708
804
|
create<T>(params: WithBetaOptions<AgentCreateOptions<T>> & {
|
|
709
805
|
stream: true;
|
|
710
|
-
}): Promise<AsyncGenerator<AgentEvent>>;
|
|
806
|
+
}, requestOptions?: RequestOptions): Promise<AsyncGenerator<AgentEvent>>;
|
|
711
807
|
create<T>(params: WithBetaOptions<AgentCreateOptions<T>> & {
|
|
712
808
|
stream?: false;
|
|
713
|
-
}): Promise<AgentRunTyped<T>>;
|
|
714
|
-
create(params: CreateAgentRunParams & AgentBetaOptions): Promise<AgentRun>;
|
|
715
|
-
get(runId: string, options?: AgentBetaOptions): Promise<AgentRun>;
|
|
716
|
-
list(options?: WithBetaOptions<ListAgentRunsParams
|
|
717
|
-
listAll(options?: WithBetaOptions<ListAgentRunsParams
|
|
718
|
-
getAll(options?: WithBetaOptions<ListAgentRunsParams
|
|
719
|
-
cancel(runId: string, options?: AgentBetaOptions): Promise<AgentRun>;
|
|
809
|
+
}, requestOptions?: RequestOptions): Promise<AgentRunTyped<T>>;
|
|
810
|
+
create(params: CreateAgentRunParams & AgentBetaOptions, requestOptions?: RequestOptions): Promise<AgentRun>;
|
|
811
|
+
get(runId: string, options?: AgentBetaOptions & RequestOptions): Promise<AgentRun>;
|
|
812
|
+
list(options?: WithBetaOptions<ListAgentRunsParams>, requestOptions?: RequestOptions): Promise<ListAgentRunsResponse>;
|
|
813
|
+
listAll(options?: WithBetaOptions<ListAgentRunsParams>, requestOptions?: RequestOptions): AsyncGenerator<AgentRun>;
|
|
814
|
+
getAll(options?: WithBetaOptions<ListAgentRunsParams>, requestOptions?: RequestOptions): Promise<AgentRun[]>;
|
|
815
|
+
cancel(runId: string, options?: AgentBetaOptions & RequestOptions): Promise<AgentRun>;
|
|
720
816
|
/**
|
|
721
817
|
* Stop a running Agent run, completing it early with the results
|
|
722
818
|
* gathered so far. Only supported for `ultra` effort runs.
|
|
723
819
|
*/
|
|
724
|
-
stop(runId: string, options?: AgentBetaOptions): Promise<AgentRun>;
|
|
725
|
-
delete(runId: string, options?: AgentBetaOptions): Promise<DeletedAgentRun>;
|
|
726
|
-
pollUntilFinished(runId: string, options?: WithBetaOptions<AgentWaitOptions
|
|
727
|
-
createAndWait<T>(params: WithBetaOptions<Omit<AgentCreateOptions<T>, "stream">>, options?: AgentWaitOptions): Promise<AgentCompletedRunTyped<T>>;
|
|
728
|
-
createAndWait(params: CreateAgentRunParams & AgentBetaOptions, options?: AgentWaitOptions): Promise<AgentCompletedRun>;
|
|
820
|
+
stop(runId: string, options?: AgentBetaOptions & RequestOptions): Promise<AgentRun>;
|
|
821
|
+
delete(runId: string, options?: AgentBetaOptions & RequestOptions): Promise<DeletedAgentRun>;
|
|
822
|
+
pollUntilFinished(runId: string, options?: WithBetaOptions<AgentWaitOptions>, requestOptions?: RequestOptions): Promise<AgentTerminalRun>;
|
|
823
|
+
createAndWait<T>(params: WithBetaOptions<Omit<AgentCreateOptions<T>, "stream">>, options?: AgentWaitOptions, requestOptions?: RequestOptions): Promise<AgentCompletedRunTyped<T>>;
|
|
824
|
+
createAndWait(params: CreateAgentRunParams & AgentBetaOptions, options?: AgentWaitOptions, requestOptions?: RequestOptions): Promise<AgentCompletedRun>;
|
|
729
825
|
}
|
|
730
826
|
/** Beta Agent API clients. */
|
|
731
827
|
declare class AgentBetaClient extends AgentClient {
|
|
@@ -740,10 +836,7 @@ declare class AgentBetaClient extends AgentClient {
|
|
|
740
836
|
constructor(clientOrAgent: Exa | AgentClient);
|
|
741
837
|
}
|
|
742
838
|
declare class BetaClient {
|
|
743
|
-
/**
|
|
744
|
-
* Beta Agent namespace. Stable Agent runs remain available here for
|
|
745
|
-
* backwards compatibility; beta-only Agent products live here exclusively.
|
|
746
|
-
*/
|
|
839
|
+
/** Beta Agent APIs. For Agent runs, use `exa.agent.runs`. */
|
|
747
840
|
agent: AgentBetaClient;
|
|
748
841
|
constructor(clientOrAgent: Exa | AgentClient);
|
|
749
842
|
}
|
|
@@ -864,7 +957,7 @@ interface TriggerSearchMonitorResponse {
|
|
|
864
957
|
*/
|
|
865
958
|
|
|
866
959
|
type QueryParams$2 = Record<string, string | number | boolean | string[] | undefined>;
|
|
867
|
-
declare class SearchMonitorsBaseClient {
|
|
960
|
+
declare class SearchMonitorsBaseClient extends RequestScopedClient {
|
|
868
961
|
protected client: Exa;
|
|
869
962
|
constructor(client: Exa);
|
|
870
963
|
protected request<T = unknown>(endpoint: string, method?: string, data?: Record<string, any>, params?: QueryParams$2): Promise<T>;
|
|
@@ -883,30 +976,34 @@ declare class SearchMonitorRunsClient extends SearchMonitorsBaseClient {
|
|
|
883
976
|
* List all runs for a Search Monitor
|
|
884
977
|
* @param monitorId The ID of the Search Monitor
|
|
885
978
|
* @param options Pagination options
|
|
979
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
886
980
|
* @returns The list of Search Monitor runs
|
|
887
981
|
*/
|
|
888
|
-
list(monitorId: string, options?: ListSearchMonitorRunsParams): Promise<ListSearchMonitorRunsResponse>;
|
|
982
|
+
list(monitorId: string, options?: ListSearchMonitorRunsParams, requestOptions?: RequestOptions): Promise<ListSearchMonitorRunsResponse>;
|
|
889
983
|
/**
|
|
890
984
|
* Get a specific Search Monitor run
|
|
891
985
|
* @param monitorId The ID of the Search Monitor
|
|
892
986
|
* @param runId The ID of the run
|
|
987
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
893
988
|
* @returns The Search Monitor run
|
|
894
989
|
*/
|
|
895
|
-
get(monitorId: string, runId: string): Promise<SearchMonitorRun>;
|
|
990
|
+
get(monitorId: string, runId: string, requestOptions?: RequestOptions): Promise<SearchMonitorRun>;
|
|
896
991
|
/**
|
|
897
992
|
* Iterate through all runs for a Search Monitor, handling pagination automatically
|
|
898
993
|
* @param monitorId The ID of the Search Monitor
|
|
899
994
|
* @param options Pagination options
|
|
995
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
900
996
|
* @returns Async generator of Search Monitor runs
|
|
901
997
|
*/
|
|
902
|
-
listAll(monitorId: string, options?: ListSearchMonitorRunsParams): AsyncGenerator<SearchMonitorRun>;
|
|
998
|
+
listAll(monitorId: string, options?: ListSearchMonitorRunsParams, requestOptions?: RequestOptions): AsyncGenerator<SearchMonitorRun>;
|
|
903
999
|
/**
|
|
904
1000
|
* Collect all runs for a Search Monitor into an array
|
|
905
1001
|
* @param monitorId The ID of the Search Monitor
|
|
906
1002
|
* @param options Pagination options
|
|
1003
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
907
1004
|
* @returns Promise resolving to an array of all Search Monitor runs
|
|
908
1005
|
*/
|
|
909
|
-
getAll(monitorId: string, options?: ListSearchMonitorRunsParams): Promise<SearchMonitorRun[]>;
|
|
1006
|
+
getAll(monitorId: string, options?: ListSearchMonitorRunsParams, requestOptions?: RequestOptions): Promise<SearchMonitorRun[]>;
|
|
910
1007
|
}
|
|
911
1008
|
/**
|
|
912
1009
|
* Client for managing Search Monitors
|
|
@@ -920,52 +1017,60 @@ declare class SearchMonitorsClient extends SearchMonitorsBaseClient {
|
|
|
920
1017
|
/**
|
|
921
1018
|
* Create a Search Monitor
|
|
922
1019
|
* @param params The monitor creation parameters
|
|
1020
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
923
1021
|
* @returns The created Search Monitor with webhookSecret
|
|
924
1022
|
*/
|
|
925
|
-
create(params: CreateSearchMonitorParams): Promise<CreateSearchMonitorResponse>;
|
|
1023
|
+
create(params: CreateSearchMonitorParams, requestOptions?: RequestOptions): Promise<CreateSearchMonitorResponse>;
|
|
926
1024
|
/**
|
|
927
1025
|
* Get a Search Monitor by ID
|
|
928
1026
|
* @param id The ID of the Search Monitor
|
|
1027
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
929
1028
|
* @returns The Search Monitor
|
|
930
1029
|
*/
|
|
931
|
-
get(id: string): Promise<SearchMonitor>;
|
|
1030
|
+
get(id: string, requestOptions?: RequestOptions): Promise<SearchMonitor>;
|
|
932
1031
|
/**
|
|
933
1032
|
* List Search Monitors
|
|
934
1033
|
* @param options Pagination and filtering options
|
|
1034
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
935
1035
|
* @returns The list of Search Monitors
|
|
936
1036
|
*/
|
|
937
|
-
list(options?: ListSearchMonitorsParams): Promise<ListSearchMonitorsResponse>;
|
|
1037
|
+
list(options?: ListSearchMonitorsParams, requestOptions?: RequestOptions): Promise<ListSearchMonitorsResponse>;
|
|
938
1038
|
/**
|
|
939
1039
|
* Update a Search Monitor
|
|
940
1040
|
* @param id The ID of the Search Monitor
|
|
941
1041
|
* @param params The update parameters
|
|
1042
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
942
1043
|
* @returns The updated Search Monitor
|
|
943
1044
|
*/
|
|
944
|
-
update(id: string, params: UpdateSearchMonitorParams): Promise<SearchMonitor>;
|
|
1045
|
+
update(id: string, params: UpdateSearchMonitorParams, requestOptions?: RequestOptions): Promise<SearchMonitor>;
|
|
945
1046
|
/**
|
|
946
1047
|
* Delete a Search Monitor
|
|
947
1048
|
* @param id The ID of the Search Monitor
|
|
1049
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
948
1050
|
* @returns The deleted Search Monitor
|
|
949
1051
|
*/
|
|
950
|
-
delete(id: string): Promise<SearchMonitor>;
|
|
1052
|
+
delete(id: string, requestOptions?: RequestOptions): Promise<SearchMonitor>;
|
|
951
1053
|
/**
|
|
952
1054
|
* Trigger a Search Monitor run immediately
|
|
953
1055
|
* @param id The ID of the Search Monitor
|
|
1056
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
954
1057
|
* @returns Whether the monitor was triggered
|
|
955
1058
|
*/
|
|
956
|
-
trigger(id: string): Promise<TriggerSearchMonitorResponse>;
|
|
1059
|
+
trigger(id: string, requestOptions?: RequestOptions): Promise<TriggerSearchMonitorResponse>;
|
|
957
1060
|
/**
|
|
958
1061
|
* Iterate through all Search Monitors, handling pagination automatically
|
|
959
1062
|
* @param options Pagination and filtering options
|
|
1063
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
960
1064
|
* @returns Async generator of Search Monitors
|
|
961
1065
|
*/
|
|
962
|
-
listAll(options?: ListSearchMonitorsParams): AsyncGenerator<SearchMonitor>;
|
|
1066
|
+
listAll(options?: ListSearchMonitorsParams, requestOptions?: RequestOptions): AsyncGenerator<SearchMonitor>;
|
|
963
1067
|
/**
|
|
964
1068
|
* Collect all Search Monitors into an array
|
|
965
1069
|
* @param options Pagination and filtering options
|
|
1070
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
966
1071
|
* @returns Promise resolving to an array of all Search Monitors
|
|
967
1072
|
*/
|
|
968
|
-
getAll(options?: ListSearchMonitorsParams): Promise<SearchMonitor[]>;
|
|
1073
|
+
getAll(options?: ListSearchMonitorsParams, requestOptions?: RequestOptions): Promise<SearchMonitor[]>;
|
|
969
1074
|
}
|
|
970
1075
|
|
|
971
1076
|
interface components$1 {
|
|
@@ -1427,51 +1532,174 @@ type ResearchTaskOutputEvent = Extract<ResearchEvent, {
|
|
|
1427
1532
|
eventType: "task-output";
|
|
1428
1533
|
}>;
|
|
1429
1534
|
|
|
1535
|
+
/**
|
|
1536
|
+
* HTTP status codes
|
|
1537
|
+
*/
|
|
1538
|
+
declare enum HttpStatusCode {
|
|
1539
|
+
BadRequest = 400,
|
|
1540
|
+
NotFound = 404,
|
|
1541
|
+
Unauthorized = 401,
|
|
1542
|
+
Forbidden = 403,
|
|
1543
|
+
TooManyRequests = 429,
|
|
1544
|
+
RequestTimeout = 408,
|
|
1545
|
+
InternalServerError = 500,
|
|
1546
|
+
ServiceUnavailable = 503
|
|
1547
|
+
}
|
|
1548
|
+
/**
|
|
1549
|
+
* Structured fields from the API's error envelope
|
|
1550
|
+
* (e.g. `{ "error": { "type", "code", "message", "detail" }, "requestId" }`).
|
|
1551
|
+
*/
|
|
1552
|
+
interface ExaErrorEnvelope {
|
|
1553
|
+
/**
|
|
1554
|
+
* Error category, e.g. "NOT_FOUND", "INVALID_REQUEST", "CONFLICT"
|
|
1555
|
+
*/
|
|
1556
|
+
type?: string;
|
|
1557
|
+
/**
|
|
1558
|
+
* Specific error code, e.g. "MONITOR_NOT_FOUND"
|
|
1559
|
+
*/
|
|
1560
|
+
code?: string;
|
|
1561
|
+
/**
|
|
1562
|
+
* Additional context, e.g. which validation rule failed
|
|
1563
|
+
*/
|
|
1564
|
+
detail?: unknown;
|
|
1565
|
+
/**
|
|
1566
|
+
* Server-side request id for support/debugging
|
|
1567
|
+
*/
|
|
1568
|
+
requestId?: string;
|
|
1569
|
+
}
|
|
1570
|
+
/**
|
|
1571
|
+
* Base error class for all Exa API errors
|
|
1572
|
+
*/
|
|
1573
|
+
declare class ExaError extends Error {
|
|
1574
|
+
/**
|
|
1575
|
+
* HTTP status code
|
|
1576
|
+
*/
|
|
1577
|
+
statusCode: number;
|
|
1578
|
+
/**
|
|
1579
|
+
* ISO timestamp from API
|
|
1580
|
+
*/
|
|
1581
|
+
timestamp?: string;
|
|
1582
|
+
/**
|
|
1583
|
+
* Path that caused the error (may be undefined for client-side errors)
|
|
1584
|
+
*/
|
|
1585
|
+
path?: string;
|
|
1586
|
+
/**
|
|
1587
|
+
* Error category from the API's error envelope, e.g. "NOT_FOUND"
|
|
1588
|
+
*/
|
|
1589
|
+
type?: string;
|
|
1590
|
+
/**
|
|
1591
|
+
* Specific error code from the API's error envelope, e.g. "MONITOR_NOT_FOUND"
|
|
1592
|
+
*/
|
|
1593
|
+
code?: string;
|
|
1594
|
+
/**
|
|
1595
|
+
* Additional context from the API's error envelope
|
|
1596
|
+
*/
|
|
1597
|
+
detail?: unknown;
|
|
1598
|
+
/**
|
|
1599
|
+
* Server-side request id for support/debugging
|
|
1600
|
+
*/
|
|
1601
|
+
requestId?: string;
|
|
1602
|
+
/**
|
|
1603
|
+
* Create a new ExaError
|
|
1604
|
+
* @param message Error message
|
|
1605
|
+
* @param statusCode HTTP status code
|
|
1606
|
+
* @param timestamp ISO timestamp from API
|
|
1607
|
+
* @param path Path that caused the error
|
|
1608
|
+
* @param envelope Structured fields from the API's error envelope
|
|
1609
|
+
*/
|
|
1610
|
+
constructor(message: string, statusCode: number, timestamp?: string, path?: string, envelope?: ExaErrorEnvelope);
|
|
1611
|
+
}
|
|
1612
|
+
/**
|
|
1613
|
+
* Thrown when a request is cancelled through the caller's `AbortSignal`.
|
|
1614
|
+
* `name` is `"AbortError"`. Not an `ExaError`, so it has no `statusCode`.
|
|
1615
|
+
*/
|
|
1616
|
+
declare class ExaAbortError extends Error {
|
|
1617
|
+
/**
|
|
1618
|
+
* The error `fetch` rejected with, or the signal's abort reason
|
|
1619
|
+
*/
|
|
1620
|
+
cause?: unknown;
|
|
1621
|
+
/**
|
|
1622
|
+
* Create a new ExaAbortError
|
|
1623
|
+
* @param cause The underlying fetch rejection or abort reason
|
|
1624
|
+
*/
|
|
1625
|
+
constructor(cause?: unknown);
|
|
1626
|
+
}
|
|
1627
|
+
/**
|
|
1628
|
+
* Thrown when a request exceeds its `timeout`. `name` is `"TimeoutError"`
|
|
1629
|
+
* and `statusCode` is 408.
|
|
1630
|
+
*/
|
|
1631
|
+
declare class ExaTimeoutError extends ExaError {
|
|
1632
|
+
/**
|
|
1633
|
+
* The timeout that elapsed, in milliseconds
|
|
1634
|
+
*/
|
|
1635
|
+
timeout: number;
|
|
1636
|
+
/**
|
|
1637
|
+
* The error `fetch` rejected with
|
|
1638
|
+
*/
|
|
1639
|
+
cause?: unknown;
|
|
1640
|
+
/**
|
|
1641
|
+
* Create a new ExaTimeoutError
|
|
1642
|
+
* @param timeout The timeout that elapsed, in milliseconds
|
|
1643
|
+
* @param path Path of the request that timed out
|
|
1644
|
+
* @param cause The underlying fetch rejection
|
|
1645
|
+
*/
|
|
1646
|
+
constructor(timeout: number, path?: string, cause?: unknown);
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1430
1649
|
type QueryParams$1 = Record<string, string | number | boolean | string[] | undefined>;
|
|
1431
1650
|
interface RequestBody$1 {
|
|
1432
1651
|
[key: string]: unknown;
|
|
1433
1652
|
}
|
|
1434
|
-
declare class ResearchBaseClient {
|
|
1653
|
+
declare class ResearchBaseClient extends RequestScopedClient {
|
|
1435
1654
|
protected client: Exa;
|
|
1436
1655
|
constructor(client: Exa);
|
|
1437
|
-
|
|
1438
|
-
protected
|
|
1656
|
+
/** Rejects with `researchRetiredError()`: the Research API has been retired. */
|
|
1657
|
+
protected request<T = unknown>(_endpoint: string, _method?: string, _data?: RequestBody$1, _params?: QueryParams$1): Promise<T>;
|
|
1658
|
+
/** Rejects with `researchRetiredError()`: the Research API has been retired. */
|
|
1659
|
+
protected rawRequest(_endpoint: string, _method?: string, _data?: RequestBody$1, _params?: QueryParams$1): Promise<Response>;
|
|
1439
1660
|
protected buildPaginationParams(pagination?: ListResearchRequest): QueryParams$1;
|
|
1440
1661
|
}
|
|
1441
1662
|
|
|
1663
|
+
/**
|
|
1664
|
+
* Client for the Research API, which has been retired.
|
|
1665
|
+
*
|
|
1666
|
+
* Every method rejects with an `ExaError` (`statusCode` 410) without sending a
|
|
1667
|
+
* request. Use the Agent API (`exa.agent.runs.create`) for asynchronous,
|
|
1668
|
+
* multi-step research.
|
|
1669
|
+
*/
|
|
1442
1670
|
declare class ResearchClient extends ResearchBaseClient {
|
|
1443
1671
|
constructor(client: Exa);
|
|
1444
|
-
create<T>(params: ResearchCreateParamsTyped<ZodSchema<T
|
|
1672
|
+
create<T>(params: ResearchCreateParamsTyped<ZodSchema<T>>, requestOptions?: RequestOptions): Promise<ResearchCreateResponse>;
|
|
1445
1673
|
create(params: {
|
|
1446
1674
|
instructions: string;
|
|
1447
1675
|
model?: ResearchCreateRequest["model"];
|
|
1448
1676
|
outputSchema?: Record<string, unknown>;
|
|
1449
|
-
}): Promise<ResearchCreateResponse>;
|
|
1450
|
-
get(researchId: string): Promise<Research>;
|
|
1677
|
+
}, requestOptions?: RequestOptions): Promise<ResearchCreateResponse>;
|
|
1678
|
+
get(researchId: string, options?: undefined, requestOptions?: RequestOptions): Promise<Research>;
|
|
1451
1679
|
get(researchId: string, options: {
|
|
1452
1680
|
stream?: false;
|
|
1453
1681
|
events?: boolean;
|
|
1454
|
-
}): Promise<Research>;
|
|
1682
|
+
}, requestOptions?: RequestOptions): Promise<Research>;
|
|
1455
1683
|
get<T>(researchId: string, options: {
|
|
1456
1684
|
stream?: false;
|
|
1457
1685
|
events?: boolean;
|
|
1458
1686
|
outputSchema: ZodSchema<T>;
|
|
1459
|
-
}): Promise<ResearchTyped<T>>;
|
|
1687
|
+
}, requestOptions?: RequestOptions): Promise<ResearchTyped<T>>;
|
|
1460
1688
|
get(researchId: string, options: {
|
|
1461
1689
|
stream: true;
|
|
1462
1690
|
events?: boolean;
|
|
1463
|
-
}): Promise<AsyncGenerator<ResearchStreamEvent, any, any>>;
|
|
1691
|
+
}, requestOptions?: RequestOptions): Promise<AsyncGenerator<ResearchStreamEvent, any, any>>;
|
|
1464
1692
|
get<T>(researchId: string, options: {
|
|
1465
1693
|
stream: true;
|
|
1466
1694
|
events?: boolean;
|
|
1467
1695
|
outputSchema?: ZodSchema<T>;
|
|
1468
|
-
}): Promise<AsyncGenerator<ResearchStreamEvent, any, any>>;
|
|
1469
|
-
list(options?: ListResearchRequest): Promise<ListResearchResponse>;
|
|
1696
|
+
}, requestOptions?: RequestOptions): Promise<AsyncGenerator<ResearchStreamEvent, any, any>>;
|
|
1697
|
+
list(options?: ListResearchRequest, requestOptions?: RequestOptions): Promise<ListResearchResponse>;
|
|
1470
1698
|
pollUntilFinished(researchId: string, options?: {
|
|
1471
1699
|
pollInterval?: number;
|
|
1472
1700
|
timeoutMs?: number;
|
|
1473
1701
|
events?: boolean;
|
|
1474
|
-
}): Promise<Research & {
|
|
1702
|
+
}, requestOptions?: RequestOptions): Promise<Research & {
|
|
1475
1703
|
status: "completed" | "failed" | "canceled";
|
|
1476
1704
|
}>;
|
|
1477
1705
|
pollUntilFinished<T>(researchId: string, options?: {
|
|
@@ -1479,7 +1707,7 @@ declare class ResearchClient extends ResearchBaseClient {
|
|
|
1479
1707
|
timeoutMs?: number;
|
|
1480
1708
|
events?: boolean;
|
|
1481
1709
|
outputSchema: ZodSchema<T>;
|
|
1482
|
-
}): Promise<ResearchTyped<T> & {
|
|
1710
|
+
}, requestOptions?: RequestOptions): Promise<ResearchTyped<T> & {
|
|
1483
1711
|
status: "completed" | "failed" | "canceled";
|
|
1484
1712
|
}>;
|
|
1485
1713
|
}
|
|
@@ -1514,7 +1742,7 @@ interface PaginationParams {
|
|
|
1514
1742
|
/**
|
|
1515
1743
|
* Base client class for all Websets-related API clients
|
|
1516
1744
|
*/
|
|
1517
|
-
declare class WebsetsBaseClient {
|
|
1745
|
+
declare class WebsetsBaseClient extends RequestScopedClient {
|
|
1518
1746
|
protected client: Exa;
|
|
1519
1747
|
/**
|
|
1520
1748
|
* Initialize a new Websets base client
|
|
@@ -3380,38 +3608,43 @@ declare class WebsetEnrichmentsClient extends WebsetsBaseClient {
|
|
|
3380
3608
|
* Create an Enrichment for a Webset
|
|
3381
3609
|
* @param websetId The ID of the Webset
|
|
3382
3610
|
* @param params The enrichment parameters
|
|
3611
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3383
3612
|
* @returns The created Webset Enrichment
|
|
3384
3613
|
*/
|
|
3385
|
-
create(websetId: string, params: CreateEnrichmentParameters): Promise<WebsetEnrichment>;
|
|
3614
|
+
create(websetId: string, params: CreateEnrichmentParameters, requestOptions?: RequestOptions): Promise<WebsetEnrichment>;
|
|
3386
3615
|
/**
|
|
3387
3616
|
* Get an Enrichment by ID
|
|
3388
3617
|
* @param websetId The ID of the Webset
|
|
3389
3618
|
* @param id The ID of the Enrichment
|
|
3619
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3390
3620
|
* @returns The Webset Enrichment
|
|
3391
3621
|
*/
|
|
3392
|
-
get(websetId: string, id: string): Promise<WebsetEnrichment>;
|
|
3622
|
+
get(websetId: string, id: string, requestOptions?: RequestOptions): Promise<WebsetEnrichment>;
|
|
3393
3623
|
/**
|
|
3394
3624
|
* Delete an Enrichment
|
|
3395
3625
|
* @param websetId The ID of the Webset
|
|
3396
3626
|
* @param id The ID of the Enrichment
|
|
3627
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3397
3628
|
* @returns The deleted Webset Enrichment
|
|
3398
3629
|
*/
|
|
3399
|
-
delete(websetId: string, id: string): Promise<WebsetEnrichment>;
|
|
3630
|
+
delete(websetId: string, id: string, requestOptions?: RequestOptions): Promise<WebsetEnrichment>;
|
|
3400
3631
|
/**
|
|
3401
3632
|
* Update an Enrichment
|
|
3402
3633
|
* @param websetId The ID of the Webset
|
|
3403
3634
|
* @param id The ID of the Enrichment
|
|
3404
3635
|
* @param params The enrichment update parameters
|
|
3636
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3405
3637
|
* @returns Promise that resolves when the update is complete
|
|
3406
3638
|
*/
|
|
3407
|
-
update(websetId: string, id: string, params: UpdateEnrichmentParameters): Promise<void>;
|
|
3639
|
+
update(websetId: string, id: string, params: UpdateEnrichmentParameters, requestOptions?: RequestOptions): Promise<void>;
|
|
3408
3640
|
/**
|
|
3409
3641
|
* Cancel a running Enrichment
|
|
3410
3642
|
* @param websetId The ID of the Webset
|
|
3411
3643
|
* @param id The ID of the Enrichment
|
|
3644
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3412
3645
|
* @returns The canceled Webset Enrichment
|
|
3413
3646
|
*/
|
|
3414
|
-
cancel(websetId: string, id: string): Promise<WebsetEnrichment>;
|
|
3647
|
+
cancel(websetId: string, id: string, requestOptions?: RequestOptions): Promise<WebsetEnrichment>;
|
|
3415
3648
|
}
|
|
3416
3649
|
|
|
3417
3650
|
/**
|
|
@@ -3443,27 +3676,31 @@ declare class EventsClient extends WebsetsBaseClient {
|
|
|
3443
3676
|
/**
|
|
3444
3677
|
* List all Events
|
|
3445
3678
|
* @param options Optional filtering and pagination options
|
|
3679
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3446
3680
|
* @returns The list of Events
|
|
3447
3681
|
*/
|
|
3448
|
-
list(options?: ListEventsOptions): Promise<ListEventsResponse>;
|
|
3682
|
+
list(options?: ListEventsOptions, requestOptions?: RequestOptions): Promise<ListEventsResponse>;
|
|
3449
3683
|
/**
|
|
3450
3684
|
* Get an Event by ID
|
|
3451
3685
|
* @param id The ID of the Event
|
|
3686
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3452
3687
|
* @returns The Event
|
|
3453
3688
|
*/
|
|
3454
|
-
get(id: string): Promise<Event>;
|
|
3689
|
+
get(id: string, requestOptions?: RequestOptions): Promise<Event>;
|
|
3455
3690
|
/**
|
|
3456
3691
|
* Iterate through all Events, handling pagination automatically
|
|
3457
3692
|
* @param options Filtering and pagination options
|
|
3693
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3458
3694
|
* @returns Async generator of Events
|
|
3459
3695
|
*/
|
|
3460
|
-
listAll(options?: ListEventsOptions): AsyncGenerator<Event>;
|
|
3696
|
+
listAll(options?: ListEventsOptions, requestOptions?: RequestOptions): AsyncGenerator<Event>;
|
|
3461
3697
|
/**
|
|
3462
3698
|
* Collect all Events into an array
|
|
3463
3699
|
* @param options Filtering and pagination options
|
|
3700
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3464
3701
|
* @returns Promise resolving to an array of all Events
|
|
3465
3702
|
*/
|
|
3466
|
-
getAll(options?: ListEventsOptions): Promise<Event[]>;
|
|
3703
|
+
getAll(options?: ListEventsOptions, requestOptions?: RequestOptions): Promise<Event[]>;
|
|
3467
3704
|
}
|
|
3468
3705
|
|
|
3469
3706
|
/**
|
|
@@ -3505,9 +3742,10 @@ interface CreateImportWithCsvParameters {
|
|
|
3505
3742
|
csv?: CreateImportParameters["csv"];
|
|
3506
3743
|
}
|
|
3507
3744
|
/**
|
|
3508
|
-
* CSV data
|
|
3745
|
+
* CSV data to import, as text or as UTF-8 bytes in a `Uint8Array`, such as a
|
|
3746
|
+
* Node.js `Buffer`.
|
|
3509
3747
|
*/
|
|
3510
|
-
type CsvDataInput = string |
|
|
3748
|
+
type CsvDataInput = string | Uint8Array;
|
|
3511
3749
|
/**
|
|
3512
3750
|
* Client for managing Imports
|
|
3513
3751
|
*/
|
|
@@ -3515,61 +3753,72 @@ declare class ImportsClient extends WebsetsBaseClient {
|
|
|
3515
3753
|
/**
|
|
3516
3754
|
* Create a new Import (basic version - returns upload URL)
|
|
3517
3755
|
* @param params The import creation parameters
|
|
3756
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3518
3757
|
* @returns The created Import response with upload URL
|
|
3519
3758
|
*/
|
|
3520
|
-
create(params: CreateImportParameters): Promise<CreateImportResponse>;
|
|
3759
|
+
create(params: CreateImportParameters, csv?: undefined, requestOptions?: RequestOptions): Promise<CreateImportResponse>;
|
|
3521
3760
|
/**
|
|
3522
3761
|
* Create a new Import with CSV data (handles upload)
|
|
3523
3762
|
* @param params The import creation parameters (without size/count - calculated automatically)
|
|
3524
|
-
* @param csv CSV data as string or Buffer
|
|
3525
|
-
* @
|
|
3763
|
+
* @param csv CSV data as a string, or as UTF-8 bytes in a Uint8Array such as a Buffer
|
|
3764
|
+
* @param requestOptions Per-call request options. `signal` and `timeout` also apply to the upload. `body`, `headers` and `query` apply to the create request only
|
|
3765
|
+
* @returns The create response, once the CSV is uploaded. The import is not
|
|
3766
|
+
* fetched again, so its status is the one it was created with. Call `get`
|
|
3767
|
+
* or `waitUntilCompleted` for its current state.
|
|
3526
3768
|
*/
|
|
3527
|
-
create(params: CreateImportWithCsvParameters, csv: CsvDataInput): Promise<Import>;
|
|
3769
|
+
create(params: CreateImportWithCsvParameters, csv: CsvDataInput, requestOptions?: RequestOptions): Promise<Import>;
|
|
3528
3770
|
/**
|
|
3529
3771
|
* Get an Import by ID
|
|
3530
3772
|
* @param id The ID of the Import
|
|
3773
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3531
3774
|
* @returns The Import
|
|
3532
3775
|
*/
|
|
3533
|
-
get(id: string): Promise<Import>;
|
|
3776
|
+
get(id: string, requestOptions?: RequestOptions): Promise<Import>;
|
|
3534
3777
|
/**
|
|
3535
3778
|
* List all Imports
|
|
3536
3779
|
* @param options Pagination options
|
|
3780
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3537
3781
|
* @returns The list of Imports
|
|
3538
3782
|
*/
|
|
3539
|
-
list(options?: PaginationParams): Promise<ListImportsResponse>;
|
|
3783
|
+
list(options?: PaginationParams, requestOptions?: RequestOptions): Promise<ListImportsResponse>;
|
|
3540
3784
|
/**
|
|
3541
3785
|
* Update an Import
|
|
3542
3786
|
* @param id The ID of the Import
|
|
3543
3787
|
* @param params The import update parameters
|
|
3788
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3544
3789
|
* @returns The updated Import
|
|
3545
3790
|
*/
|
|
3546
|
-
update(id: string, params: UpdateImport): Promise<Import>;
|
|
3791
|
+
update(id: string, params: UpdateImport, requestOptions?: RequestOptions): Promise<Import>;
|
|
3547
3792
|
/**
|
|
3548
3793
|
* Delete an Import
|
|
3549
3794
|
* @param id The ID of the Import
|
|
3795
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3550
3796
|
* @returns The deleted Import
|
|
3551
3797
|
*/
|
|
3552
|
-
delete(id: string): Promise<Import>;
|
|
3798
|
+
delete(id: string, requestOptions?: RequestOptions): Promise<Import>;
|
|
3553
3799
|
/**
|
|
3554
3800
|
* Wait until an Import is completed or failed
|
|
3555
3801
|
* @param id The ID of the Import
|
|
3556
3802
|
* @param options Configuration options for timeout and polling
|
|
3803
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3557
3804
|
* @returns The Import once it reaches a final state (completed or failed)
|
|
3558
3805
|
* @throws Error if the Import does not complete within the timeout or fails
|
|
3559
3806
|
*/
|
|
3560
|
-
waitUntilCompleted(id: string, options?: WaitUntilCompletedOptions): Promise<Import>;
|
|
3807
|
+
waitUntilCompleted(id: string, options?: WaitUntilCompletedOptions, requestOptions?: RequestOptions): Promise<Import>;
|
|
3561
3808
|
/**
|
|
3562
3809
|
* Iterate through all Imports, handling pagination automatically
|
|
3563
3810
|
* @param options Pagination options
|
|
3811
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3564
3812
|
* @returns Async generator of Imports
|
|
3565
3813
|
*/
|
|
3566
|
-
listAll(options?: PaginationParams): AsyncGenerator<Import>;
|
|
3814
|
+
listAll(options?: PaginationParams, requestOptions?: RequestOptions): AsyncGenerator<Import>;
|
|
3567
3815
|
/**
|
|
3568
3816
|
* Collect all Imports into an array
|
|
3569
3817
|
* @param options Pagination options
|
|
3818
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3570
3819
|
* @returns Promise resolving to an array of all Imports
|
|
3571
3820
|
*/
|
|
3572
|
-
getAll(options?: PaginationParams): Promise<Import[]>;
|
|
3821
|
+
getAll(options?: PaginationParams, requestOptions?: RequestOptions): Promise<Import[]>;
|
|
3573
3822
|
}
|
|
3574
3823
|
|
|
3575
3824
|
/**
|
|
@@ -3593,37 +3842,42 @@ declare class WebsetItemsClient extends WebsetsBaseClient {
|
|
|
3593
3842
|
* List all Items for a Webset
|
|
3594
3843
|
* @param websetId The ID of the Webset
|
|
3595
3844
|
* @param params - Optional pagination and filtering parameters
|
|
3845
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3596
3846
|
* @returns A promise that resolves with the list of Items
|
|
3597
3847
|
*/
|
|
3598
|
-
list(websetId: string, params?: ListWebsetItemsOptions): Promise<ListWebsetItemResponse>;
|
|
3848
|
+
list(websetId: string, params?: ListWebsetItemsOptions, requestOptions?: RequestOptions): Promise<ListWebsetItemResponse>;
|
|
3599
3849
|
/**
|
|
3600
3850
|
* Iterate through all Items in a Webset, handling pagination automatically
|
|
3601
3851
|
* @param websetId The ID of the Webset
|
|
3602
3852
|
* @param options Pagination options
|
|
3853
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3603
3854
|
* @returns Async generator of Webset Items
|
|
3604
3855
|
*/
|
|
3605
|
-
listAll(websetId: string, options?: ListWebsetItemsOptions): AsyncGenerator<WebsetItem>;
|
|
3856
|
+
listAll(websetId: string, options?: ListWebsetItemsOptions, requestOptions?: RequestOptions): AsyncGenerator<WebsetItem>;
|
|
3606
3857
|
/**
|
|
3607
3858
|
* Collect all items from a Webset into an array
|
|
3608
3859
|
* @param websetId The ID of the Webset
|
|
3609
3860
|
* @param options Pagination options
|
|
3861
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3610
3862
|
* @returns Promise resolving to an array of all Webset Items
|
|
3611
3863
|
*/
|
|
3612
|
-
getAll(websetId: string, options?: ListWebsetItemsOptions): Promise<WebsetItem[]>;
|
|
3864
|
+
getAll(websetId: string, options?: ListWebsetItemsOptions, requestOptions?: RequestOptions): Promise<WebsetItem[]>;
|
|
3613
3865
|
/**
|
|
3614
3866
|
* Get an Item by ID
|
|
3615
3867
|
* @param websetId The ID of the Webset
|
|
3616
3868
|
* @param id The ID of the Item
|
|
3869
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3617
3870
|
* @returns The Webset Item
|
|
3618
3871
|
*/
|
|
3619
|
-
get(websetId: string, id: string): Promise<WebsetItem>;
|
|
3872
|
+
get(websetId: string, id: string, requestOptions?: RequestOptions): Promise<WebsetItem>;
|
|
3620
3873
|
/**
|
|
3621
3874
|
* Delete an Item
|
|
3622
3875
|
* @param websetId The ID of the Webset
|
|
3623
3876
|
* @param id The ID of the Item
|
|
3877
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3624
3878
|
* @returns The deleted Webset Item
|
|
3625
3879
|
*/
|
|
3626
|
-
delete(websetId: string, id: string): Promise<WebsetItem>;
|
|
3880
|
+
delete(websetId: string, id: string, requestOptions?: RequestOptions): Promise<WebsetItem>;
|
|
3627
3881
|
}
|
|
3628
3882
|
|
|
3629
3883
|
/**
|
|
@@ -3647,16 +3901,18 @@ declare class WebsetMonitorRunsClient extends WebsetsBaseClient {
|
|
|
3647
3901
|
* List all runs for a Monitor
|
|
3648
3902
|
* @param monitorId The ID of the Monitor
|
|
3649
3903
|
* @param options Pagination options
|
|
3904
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3650
3905
|
* @returns The list of Monitor runs
|
|
3651
3906
|
*/
|
|
3652
|
-
list(monitorId: string, options?: PaginationParams): Promise<ListMonitorRunsResponse>;
|
|
3907
|
+
list(monitorId: string, options?: PaginationParams, requestOptions?: RequestOptions): Promise<ListMonitorRunsResponse>;
|
|
3653
3908
|
/**
|
|
3654
3909
|
* Get a specific Monitor run
|
|
3655
3910
|
* @param monitorId The ID of the Monitor
|
|
3656
3911
|
* @param runId The ID of the Monitor run
|
|
3912
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3657
3913
|
* @returns The Monitor run
|
|
3658
3914
|
*/
|
|
3659
|
-
get(monitorId: string, runId: string): Promise<MonitorRun>;
|
|
3915
|
+
get(monitorId: string, runId: string, requestOptions?: RequestOptions): Promise<MonitorRun>;
|
|
3660
3916
|
}
|
|
3661
3917
|
/**
|
|
3662
3918
|
* Client for managing Webset Monitors
|
|
@@ -3670,46 +3926,53 @@ declare class WebsetMonitorsClient extends WebsetsBaseClient {
|
|
|
3670
3926
|
/**
|
|
3671
3927
|
* Create a Monitor
|
|
3672
3928
|
* @param params The monitor parameters
|
|
3929
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3673
3930
|
* @returns The created Monitor
|
|
3674
3931
|
*/
|
|
3675
|
-
create(params: CreateMonitorParameters): Promise<Monitor>;
|
|
3932
|
+
create(params: CreateMonitorParameters, requestOptions?: RequestOptions): Promise<Monitor>;
|
|
3676
3933
|
/**
|
|
3677
3934
|
* Get a Monitor by ID
|
|
3678
3935
|
* @param id The ID of the Monitor
|
|
3936
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3679
3937
|
* @returns The Monitor
|
|
3680
3938
|
*/
|
|
3681
|
-
get(id: string): Promise<Monitor>;
|
|
3939
|
+
get(id: string, requestOptions?: RequestOptions): Promise<Monitor>;
|
|
3682
3940
|
/**
|
|
3683
3941
|
* List all Monitors
|
|
3684
3942
|
* @param options Pagination and filtering options
|
|
3943
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3685
3944
|
* @returns The list of Monitors
|
|
3686
3945
|
*/
|
|
3687
|
-
list(options?: ListMonitorsOptions): Promise<ListMonitorsResponse>;
|
|
3946
|
+
list(options?: ListMonitorsOptions, requestOptions?: RequestOptions): Promise<ListMonitorsResponse>;
|
|
3688
3947
|
/**
|
|
3689
3948
|
* Update a Monitor
|
|
3690
3949
|
* @param id The ID of the Monitor
|
|
3691
3950
|
* @param params The monitor update parameters (status, metadata)
|
|
3951
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3692
3952
|
* @returns The updated Monitor
|
|
3693
3953
|
*/
|
|
3694
|
-
update(id: string, params: UpdateMonitor): Promise<Monitor>;
|
|
3954
|
+
update(id: string, params: UpdateMonitor, requestOptions?: RequestOptions): Promise<Monitor>;
|
|
3695
3955
|
/**
|
|
3696
3956
|
* Delete a Monitor
|
|
3697
3957
|
* @param id The ID of the Monitor
|
|
3958
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3698
3959
|
* @returns The deleted Monitor
|
|
3699
3960
|
*/
|
|
3700
|
-
delete(id: string): Promise<Monitor>;
|
|
3961
|
+
delete(id: string, requestOptions?: RequestOptions): Promise<Monitor>;
|
|
3701
3962
|
/**
|
|
3702
3963
|
* Iterate through all Monitors, handling pagination automatically
|
|
3703
3964
|
* @param options Pagination and filtering options
|
|
3965
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3704
3966
|
* @returns Async generator of Monitors
|
|
3705
3967
|
*/
|
|
3706
|
-
listAll(options?: ListMonitorsOptions): AsyncGenerator<Monitor>;
|
|
3968
|
+
listAll(options?: ListMonitorsOptions, requestOptions?: RequestOptions): AsyncGenerator<Monitor>;
|
|
3707
3969
|
/**
|
|
3708
3970
|
* Collect all Monitors into an array
|
|
3709
3971
|
* @param options Pagination and filtering options
|
|
3972
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3710
3973
|
* @returns Promise resolving to an array of all Monitors
|
|
3711
3974
|
*/
|
|
3712
|
-
getAll(options?: ListMonitorsOptions): Promise<Monitor[]>;
|
|
3975
|
+
getAll(options?: ListMonitorsOptions, requestOptions?: RequestOptions): Promise<Monitor[]>;
|
|
3713
3976
|
}
|
|
3714
3977
|
|
|
3715
3978
|
/**
|
|
@@ -3741,67 +4004,77 @@ declare class WebsetWebhooksClient extends WebsetsBaseClient {
|
|
|
3741
4004
|
/**
|
|
3742
4005
|
* Create a Webhook
|
|
3743
4006
|
* @param params The webhook parameters
|
|
4007
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3744
4008
|
* @returns The created Webhook
|
|
3745
4009
|
*/
|
|
3746
|
-
create(params: CreateWebhookParameters): Promise<Webhook>;
|
|
4010
|
+
create(params: CreateWebhookParameters, requestOptions?: RequestOptions): Promise<Webhook>;
|
|
3747
4011
|
/**
|
|
3748
4012
|
* Get a Webhook by ID
|
|
3749
4013
|
* @param id The ID of the Webhook
|
|
4014
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3750
4015
|
* @returns The Webhook
|
|
3751
4016
|
*/
|
|
3752
|
-
get(id: string): Promise<Webhook>;
|
|
4017
|
+
get(id: string, requestOptions?: RequestOptions): Promise<Webhook>;
|
|
3753
4018
|
/**
|
|
3754
4019
|
* List all Webhooks
|
|
3755
4020
|
* @param options Pagination options
|
|
4021
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3756
4022
|
* @returns The list of Webhooks
|
|
3757
4023
|
*/
|
|
3758
|
-
list(options?: ListWebhooksOptions): Promise<ListWebhooksResponse>;
|
|
4024
|
+
list(options?: ListWebhooksOptions, requestOptions?: RequestOptions): Promise<ListWebhooksResponse>;
|
|
3759
4025
|
/**
|
|
3760
4026
|
* Iterate through all Webhooks, handling pagination automatically
|
|
3761
4027
|
* @param options Pagination options
|
|
4028
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3762
4029
|
* @returns Async generator of Webhooks
|
|
3763
4030
|
*/
|
|
3764
|
-
listAll(options?: ListWebhooksOptions): AsyncGenerator<Webhook>;
|
|
4031
|
+
listAll(options?: ListWebhooksOptions, requestOptions?: RequestOptions): AsyncGenerator<Webhook>;
|
|
3765
4032
|
/**
|
|
3766
4033
|
* Collect all Webhooks into an array
|
|
3767
4034
|
* @param options Pagination options
|
|
4035
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3768
4036
|
* @returns Promise resolving to an array of all Webhooks
|
|
3769
4037
|
*/
|
|
3770
|
-
getAll(options?: ListWebhooksOptions): Promise<Webhook[]>;
|
|
4038
|
+
getAll(options?: ListWebhooksOptions, requestOptions?: RequestOptions): Promise<Webhook[]>;
|
|
3771
4039
|
/**
|
|
3772
4040
|
* Update a Webhook
|
|
3773
4041
|
* @param id The ID of the Webhook
|
|
3774
4042
|
* @param params The webhook update parameters (events, metadata, url)
|
|
4043
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3775
4044
|
* @returns The updated Webhook
|
|
3776
4045
|
*/
|
|
3777
|
-
update(id: string, params: UpdateWebhookParameters): Promise<Webhook>;
|
|
4046
|
+
update(id: string, params: UpdateWebhookParameters, requestOptions?: RequestOptions): Promise<Webhook>;
|
|
3778
4047
|
/**
|
|
3779
4048
|
* Delete a Webhook
|
|
3780
4049
|
* @param id The ID of the Webhook
|
|
4050
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3781
4051
|
* @returns The deleted Webhook
|
|
3782
4052
|
*/
|
|
3783
|
-
delete(id: string): Promise<Webhook>;
|
|
4053
|
+
delete(id: string, requestOptions?: RequestOptions): Promise<Webhook>;
|
|
3784
4054
|
/**
|
|
3785
4055
|
* List all attempts for a Webhook
|
|
3786
4056
|
* @param id The ID of the Webhook
|
|
3787
4057
|
* @param options Pagination and filtering options
|
|
4058
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3788
4059
|
* @returns The list of Webhook attempts
|
|
3789
4060
|
*/
|
|
3790
|
-
listAttempts(id: string, options?: ListWebhookAttemptsOptions): Promise<ListWebhookAttemptsResponse>;
|
|
4061
|
+
listAttempts(id: string, options?: ListWebhookAttemptsOptions, requestOptions?: RequestOptions): Promise<ListWebhookAttemptsResponse>;
|
|
3791
4062
|
/**
|
|
3792
4063
|
* Iterate through all attempts for a Webhook, handling pagination automatically
|
|
3793
4064
|
* @param id The ID of the Webhook
|
|
3794
4065
|
* @param options Pagination and filtering options
|
|
4066
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3795
4067
|
* @returns Async generator of Webhook attempts
|
|
3796
4068
|
*/
|
|
3797
|
-
listAllAttempts(id: string, options?: ListWebhookAttemptsOptions): AsyncGenerator<WebhookAttempt>;
|
|
4069
|
+
listAllAttempts(id: string, options?: ListWebhookAttemptsOptions, requestOptions?: RequestOptions): AsyncGenerator<WebhookAttempt>;
|
|
3798
4070
|
/**
|
|
3799
4071
|
* Collect all attempts for a Webhook into an array
|
|
3800
4072
|
* @param id The ID of the Webhook
|
|
3801
4073
|
* @param options Pagination and filtering options
|
|
4074
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3802
4075
|
* @returns Promise resolving to an array of all Webhook attempts
|
|
3803
4076
|
*/
|
|
3804
|
-
getAllAttempts(id: string, options?: ListWebhookAttemptsOptions): Promise<WebhookAttempt[]>;
|
|
4077
|
+
getAllAttempts(id: string, options?: ListWebhookAttemptsOptions, requestOptions?: RequestOptions): Promise<WebhookAttempt[]>;
|
|
3805
4078
|
}
|
|
3806
4079
|
|
|
3807
4080
|
/**
|
|
@@ -3824,25 +4097,28 @@ declare class WebsetSearchesClient extends WebsetsBaseClient {
|
|
|
3824
4097
|
* Create a new Search for the Webset
|
|
3825
4098
|
* @param websetId The ID of the Webset
|
|
3826
4099
|
* @param params The search parameters
|
|
4100
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3827
4101
|
* @returns The created Webset Search
|
|
3828
4102
|
*/
|
|
3829
4103
|
create(websetId: string, params: CreateWebsetSearchParameters, options?: {
|
|
3830
4104
|
headers?: WebsetHeadersLike;
|
|
3831
|
-
}): Promise<WebsetSearch>;
|
|
4105
|
+
}, requestOptions?: RequestOptions): Promise<WebsetSearch>;
|
|
3832
4106
|
/**
|
|
3833
4107
|
* Get a Search by ID
|
|
3834
4108
|
* @param websetId The ID of the Webset
|
|
3835
4109
|
* @param id The ID of the Search
|
|
4110
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3836
4111
|
* @returns The Webset Search
|
|
3837
4112
|
*/
|
|
3838
|
-
get(websetId: string, id: string): Promise<WebsetSearch>;
|
|
4113
|
+
get(websetId: string, id: string, requestOptions?: RequestOptions): Promise<WebsetSearch>;
|
|
3839
4114
|
/**
|
|
3840
4115
|
* Cancel a running Search
|
|
3841
4116
|
* @param websetId The ID of the Webset
|
|
3842
4117
|
* @param id The ID of the Search
|
|
4118
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3843
4119
|
* @returns The canceled Webset Search
|
|
3844
4120
|
*/
|
|
3845
|
-
cancel(websetId: string, id: string): Promise<WebsetSearch>;
|
|
4121
|
+
cancel(websetId: string, id: string, requestOptions?: RequestOptions): Promise<WebsetSearch>;
|
|
3846
4122
|
}
|
|
3847
4123
|
|
|
3848
4124
|
/**
|
|
@@ -3894,68 +4170,78 @@ declare class WebsetsClient extends WebsetsBaseClient {
|
|
|
3894
4170
|
/**
|
|
3895
4171
|
* Create a new Webset
|
|
3896
4172
|
* @param params The Webset creation parameters
|
|
4173
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3897
4174
|
* @returns The created Webset
|
|
3898
4175
|
*/
|
|
3899
4176
|
create(params: CreateWebsetParameters, options?: {
|
|
3900
4177
|
headers?: WebsetHeadersLike;
|
|
3901
|
-
}): Promise<Webset>;
|
|
4178
|
+
}, requestOptions?: RequestOptions): Promise<Webset>;
|
|
3902
4179
|
/**
|
|
3903
4180
|
* Preview a webset
|
|
3904
4181
|
* @param params The preview parameters
|
|
3905
4182
|
* @param options Optional parameters. Search = true allows you to retrieve a preview set of items that could be returned by the webset.
|
|
3906
|
-
* @
|
|
4183
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
4184
|
+
* @returns How the query will be interpreted.
|
|
3907
4185
|
*/
|
|
3908
4186
|
preview(params: PreviewWebsetParameters, options?: {
|
|
3909
4187
|
search?: boolean;
|
|
3910
|
-
}): Promise<PreviewWebsetResponse>;
|
|
4188
|
+
}, requestOptions?: RequestOptions): Promise<PreviewWebsetResponse>;
|
|
3911
4189
|
/**
|
|
3912
4190
|
* Get a Webset by ID
|
|
3913
4191
|
* @param id The ID of the Webset
|
|
3914
4192
|
* @param expand Optional array of relations to expand
|
|
4193
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3915
4194
|
* @returns The Webset
|
|
3916
4195
|
*/
|
|
3917
|
-
get(id: string, expand?: Array<"items"
|
|
4196
|
+
get(id: string, expand?: Array<"items">, requestOptions?: RequestOptions): Promise<GetWebsetResponse>;
|
|
3918
4197
|
/**
|
|
3919
4198
|
* List all Websets
|
|
3920
4199
|
* @param options Pagination options (filtering by status is not supported by API)
|
|
4200
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3921
4201
|
* @returns The list of Websets
|
|
3922
4202
|
*/
|
|
3923
|
-
list(options?: ListWebsetsOptions): Promise<ListWebsetsResponse>;
|
|
4203
|
+
list(options?: ListWebsetsOptions, requestOptions?: RequestOptions): Promise<ListWebsetsResponse>;
|
|
3924
4204
|
/**
|
|
3925
4205
|
* Iterate through all Websets, handling pagination automatically
|
|
3926
4206
|
* @param options Pagination options
|
|
4207
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3927
4208
|
* @returns Async generator of Websets
|
|
3928
4209
|
*/
|
|
3929
|
-
listAll(options?: ListWebsetsOptions): AsyncGenerator<Webset>;
|
|
4210
|
+
listAll(options?: ListWebsetsOptions, requestOptions?: RequestOptions): AsyncGenerator<Webset>;
|
|
3930
4211
|
/**
|
|
3931
4212
|
* Collect all Websets into an array
|
|
3932
4213
|
* @param options Pagination options
|
|
4214
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3933
4215
|
* @returns Promise resolving to an array of all Websets
|
|
3934
4216
|
*/
|
|
3935
|
-
getAll(options?: ListWebsetsOptions): Promise<Webset[]>;
|
|
4217
|
+
getAll(options?: ListWebsetsOptions, requestOptions?: RequestOptions): Promise<Webset[]>;
|
|
3936
4218
|
/**
|
|
3937
4219
|
* Update a Webset
|
|
3938
4220
|
* @param id The ID of the Webset
|
|
3939
4221
|
* @param params The Webset update parameters
|
|
4222
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3940
4223
|
* @returns The updated Webset
|
|
3941
4224
|
*/
|
|
3942
|
-
update(id: string, params: UpdateWebsetRequest): Promise<Webset>;
|
|
4225
|
+
update(id: string, params: UpdateWebsetRequest, requestOptions?: RequestOptions): Promise<Webset>;
|
|
3943
4226
|
/**
|
|
3944
4227
|
* Delete a Webset
|
|
3945
4228
|
* @param id The ID of the Webset
|
|
4229
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3946
4230
|
* @returns The deleted Webset
|
|
3947
4231
|
*/
|
|
3948
|
-
delete(id: string): Promise<Webset>;
|
|
4232
|
+
delete(id: string, requestOptions?: RequestOptions): Promise<Webset>;
|
|
3949
4233
|
/**
|
|
3950
4234
|
* Cancel a running Webset
|
|
3951
4235
|
* @param id The ID or external ID of the Webset
|
|
4236
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3952
4237
|
* @returns The canceled Webset (as returned by the API)
|
|
3953
4238
|
*/
|
|
3954
|
-
cancel(id: string): Promise<Webset>;
|
|
4239
|
+
cancel(id: string, requestOptions?: RequestOptions): Promise<Webset>;
|
|
3955
4240
|
/**
|
|
3956
4241
|
* Wait until a Webset is idle
|
|
3957
4242
|
* @param id The ID of the Webset
|
|
3958
4243
|
* @param options Configuration options for timeout and polling
|
|
4244
|
+
* @param requestOptions Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`)
|
|
3959
4245
|
* @returns The Webset once it becomes idle
|
|
3960
4246
|
* @throws Error if the Webset does not become idle within the timeout
|
|
3961
4247
|
*/
|
|
@@ -3963,7 +4249,8 @@ declare class WebsetsClient extends WebsetsBaseClient {
|
|
|
3963
4249
|
timeout?: number;
|
|
3964
4250
|
pollInterval?: number;
|
|
3965
4251
|
onPoll?: (status: WebsetStatus) => void;
|
|
3966
|
-
} | number
|
|
4252
|
+
} | number, // Legacy: timeout only
|
|
4253
|
+
requestOptions?: RequestOptions): Promise<Webset>;
|
|
3967
4254
|
}
|
|
3968
4255
|
|
|
3969
4256
|
type ToolJsonSchema = {
|
|
@@ -4183,84 +4470,6 @@ declare class OpenAITools {
|
|
|
4183
4470
|
private handleResponsesToolCalls;
|
|
4184
4471
|
}
|
|
4185
4472
|
|
|
4186
|
-
/**
|
|
4187
|
-
* HTTP status codes
|
|
4188
|
-
*/
|
|
4189
|
-
declare enum HttpStatusCode {
|
|
4190
|
-
BadRequest = 400,
|
|
4191
|
-
NotFound = 404,
|
|
4192
|
-
Unauthorized = 401,
|
|
4193
|
-
Forbidden = 403,
|
|
4194
|
-
TooManyRequests = 429,
|
|
4195
|
-
RequestTimeout = 408,
|
|
4196
|
-
InternalServerError = 500,
|
|
4197
|
-
ServiceUnavailable = 503
|
|
4198
|
-
}
|
|
4199
|
-
/**
|
|
4200
|
-
* Structured fields from the API's error envelope
|
|
4201
|
-
* (e.g. `{ "error": { "type", "code", "message", "detail" }, "requestId" }`).
|
|
4202
|
-
*/
|
|
4203
|
-
interface ExaErrorEnvelope {
|
|
4204
|
-
/**
|
|
4205
|
-
* Error category, e.g. "NOT_FOUND", "INVALID_REQUEST", "CONFLICT"
|
|
4206
|
-
*/
|
|
4207
|
-
type?: string;
|
|
4208
|
-
/**
|
|
4209
|
-
* Specific error code, e.g. "MONITOR_NOT_FOUND"
|
|
4210
|
-
*/
|
|
4211
|
-
code?: string;
|
|
4212
|
-
/**
|
|
4213
|
-
* Additional context, e.g. which validation rule failed
|
|
4214
|
-
*/
|
|
4215
|
-
detail?: unknown;
|
|
4216
|
-
/**
|
|
4217
|
-
* Server-side request id for support/debugging
|
|
4218
|
-
*/
|
|
4219
|
-
requestId?: string;
|
|
4220
|
-
}
|
|
4221
|
-
/**
|
|
4222
|
-
* Base error class for all Exa API errors
|
|
4223
|
-
*/
|
|
4224
|
-
declare class ExaError extends Error {
|
|
4225
|
-
/**
|
|
4226
|
-
* HTTP status code
|
|
4227
|
-
*/
|
|
4228
|
-
statusCode: number;
|
|
4229
|
-
/**
|
|
4230
|
-
* ISO timestamp from API
|
|
4231
|
-
*/
|
|
4232
|
-
timestamp?: string;
|
|
4233
|
-
/**
|
|
4234
|
-
* Path that caused the error (may be undefined for client-side errors)
|
|
4235
|
-
*/
|
|
4236
|
-
path?: string;
|
|
4237
|
-
/**
|
|
4238
|
-
* Error category from the API's error envelope, e.g. "NOT_FOUND"
|
|
4239
|
-
*/
|
|
4240
|
-
type?: string;
|
|
4241
|
-
/**
|
|
4242
|
-
* Specific error code from the API's error envelope, e.g. "MONITOR_NOT_FOUND"
|
|
4243
|
-
*/
|
|
4244
|
-
code?: string;
|
|
4245
|
-
/**
|
|
4246
|
-
* Additional context from the API's error envelope
|
|
4247
|
-
*/
|
|
4248
|
-
detail?: unknown;
|
|
4249
|
-
/**
|
|
4250
|
-
* Server-side request id for support/debugging
|
|
4251
|
-
*/
|
|
4252
|
-
requestId?: string;
|
|
4253
|
-
/**
|
|
4254
|
-
* Create a new ExaError
|
|
4255
|
-
* @param message Error message
|
|
4256
|
-
* @param statusCode HTTP status code
|
|
4257
|
-
* @param timestamp ISO timestamp from API
|
|
4258
|
-
* @param path Path that caused the error
|
|
4259
|
-
* @param envelope Structured fields from the API's error envelope
|
|
4260
|
-
*/
|
|
4261
|
-
constructor(message: string, statusCode: number, timestamp?: string, path?: string, envelope?: ExaErrorEnvelope);
|
|
4262
|
-
}
|
|
4263
|
-
|
|
4264
4473
|
/** Exa-Beta token required for Dynamic Highlights (research preview). */
|
|
4265
4474
|
declare const DYNAMIC_HIGHLIGHTS_BETA = "dynamic-highlights-2026-08-28";
|
|
4266
4475
|
/**
|
|
@@ -4269,12 +4478,12 @@ declare const DYNAMIC_HIGHLIGHTS_BETA = "dynamic-highlights-2026-08-28";
|
|
|
4269
4478
|
* @property {TextContentsOptions | boolean} [text] - Options for retrieving text contents.
|
|
4270
4479
|
* @property {HighlightsContentsOptions | boolean} [highlights] - Recommended: `true`. Exa dynamically chooses the number of characters based on each document's relevance to your query.
|
|
4271
4480
|
* @property {SummaryContentsOptions | boolean} [summary] - Options for retrieving summary.
|
|
4272
|
-
* @property {ContextOptions | boolean} [context] -
|
|
4481
|
+
* @property {ContextOptions | boolean} [context] - Deprecated. Use `text` or `highlights`.
|
|
4273
4482
|
* @property {number} [maxAgeHours] - Maximum age of cached content in hours. If content is older, it will be fetched fresh. Special values: 0 = always fetch fresh content, -1 = never fetch fresh (use cached content only). Example: 168 = fetch fresh for pages older than 7 days.
|
|
4274
4483
|
* @property {string} [snapshotAsOf] - ISO 8601 datetime. Return the newest stored version at or before this instant instead of live content.
|
|
4275
4484
|
* @property {boolean} [filterEmptyResults] - If true, filters out results with no contents. Default is true.
|
|
4276
|
-
* @property {number} [subpages] - The number of subpages to return for each result, where each subpage is derived from an internal link for the result.
|
|
4277
|
-
* @property {string | string[]} [subpageTarget] - Text used to match/rank subpages in the returned subpage list. You could use "about" to get *about* page for websites. Note that this is a fuzzy matcher.
|
|
4485
|
+
* @property {number} [subpages] - The number of subpages to return for each result, where each subpage is derived from an internal link for the result. Deprecated on `search()`; use `getContents()` to crawl subpages.
|
|
4486
|
+
* @property {string | string[]} [subpageTarget] - Text used to match/rank subpages in the returned subpage list. You could use "about" to get *about* page for websites. Note that this is a fuzzy matcher. Deprecated on `search()`; use `getContents()` to crawl subpages.
|
|
4278
4487
|
* @property {ExtrasOptions} [extras] - Miscelleneous data derived from results
|
|
4279
4488
|
*/
|
|
4280
4489
|
type ContentsOptions = {
|
|
@@ -4291,8 +4500,7 @@ type ContentsOptions = {
|
|
|
4291
4500
|
summary?: SummaryContentsOptions | true;
|
|
4292
4501
|
livecrawl?: LivecrawlOptions;
|
|
4293
4502
|
/**
|
|
4294
|
-
*
|
|
4295
|
-
* @deprecated Use `text` or `highlights` instead. This legacy `context` field will be removed in a future version.
|
|
4503
|
+
* @deprecated Use `text` or `highlights` instead.
|
|
4296
4504
|
*/
|
|
4297
4505
|
context?: ContextOptions | true;
|
|
4298
4506
|
livecrawlTimeout?: number;
|
|
@@ -4303,9 +4511,104 @@ type ContentsOptions = {
|
|
|
4303
4511
|
subpageTarget?: string | string[];
|
|
4304
4512
|
extras?: ExtrasOptions;
|
|
4305
4513
|
};
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4514
|
+
/**
|
|
4515
|
+
* Contents options for search requests: `ContentsOptions`, with subpage
|
|
4516
|
+
* crawling deprecated. To crawl subpages, pass the result URLs to
|
|
4517
|
+
* `getContents()` with `subpages`.
|
|
4518
|
+
*/
|
|
4519
|
+
type SearchContentsOptions = Omit<ContentsOptions, "subpages" | "subpageTarget"> & {
|
|
4520
|
+
/**
|
|
4521
|
+
* DEPRECATED: Subpage crawling on search is deprecated. Use `getContents()` with `subpages` instead.
|
|
4522
|
+
* @deprecated Use `getContents()` with `subpages` instead.
|
|
4523
|
+
*/
|
|
4524
|
+
subpages?: number;
|
|
4525
|
+
/**
|
|
4526
|
+
* DEPRECATED: Subpage crawling on search is deprecated. Use `getContents()` with `subpageTarget` instead.
|
|
4527
|
+
* @deprecated Use `getContents()` with `subpageTarget` instead.
|
|
4528
|
+
*/
|
|
4529
|
+
subpageTarget?: string | string[];
|
|
4530
|
+
};
|
|
4531
|
+
|
|
4532
|
+
/**
|
|
4533
|
+
* The end user's location, as a two-letter ISO 3166-1 country code (e.g.
|
|
4534
|
+
* `"US"`) or an object with `country`, a `latitude` and `longitude` pair, or
|
|
4535
|
+
* both. `latitude` (-90 to 90) and `longitude` (-180 to 180) are in decimal
|
|
4536
|
+
* degrees.
|
|
4537
|
+
*
|
|
4538
|
+
* The country localizes results. Coordinates are used only for queries that
|
|
4539
|
+
* name no place but depend on where the user is, such as "coffee near me".
|
|
4540
|
+
* They do not set a country, so send `country` with them to localize results.
|
|
4541
|
+
* Send only the precision your use case needs.
|
|
4542
|
+
*/
|
|
4543
|
+
type UserLocation = string | {
|
|
4544
|
+
country: string;
|
|
4545
|
+
latitude?: never;
|
|
4546
|
+
longitude?: never;
|
|
4547
|
+
} | {
|
|
4548
|
+
country?: string;
|
|
4549
|
+
latitude: number;
|
|
4550
|
+
longitude: number;
|
|
4551
|
+
};
|
|
4552
|
+
/**
|
|
4553
|
+
* Options that attribute a request to one end user of your application.
|
|
4554
|
+
* @typedef {Object} UserIdentifierOptions
|
|
4555
|
+
* @property {string} [userIdentifier] - An opaque ID you assign to the end user the request is made for. See {@link UserIdentifierOptions}.
|
|
4556
|
+
*/
|
|
4557
|
+
type UserIdentifierOptions = {
|
|
4558
|
+
/**
|
|
4559
|
+
* An opaque ID you assign to the end user this request is made for, such
|
|
4560
|
+
* as a UUID, used to attribute usage to that end user. Must not contain
|
|
4561
|
+
* personal information such as an email address, phone number, username or
|
|
4562
|
+
* name. Hash such values before sending them. 1 to 64 characters: letters,
|
|
4563
|
+
* digits, `_` and `-`. Retained even when your team has Zero Data
|
|
4564
|
+
* Retention enabled. Does not affect results.
|
|
4565
|
+
*/
|
|
4566
|
+
userIdentifier?: string;
|
|
4567
|
+
};
|
|
4568
|
+
/**
|
|
4569
|
+
* The request a warning is about, passed to a `warnings` handler with each
|
|
4570
|
+
* warning.
|
|
4571
|
+
*/
|
|
4572
|
+
type ApiWarningContext = {
|
|
4573
|
+
/** API path the request was sent to, such as `/search`. */
|
|
4574
|
+
endpoint: string;
|
|
4575
|
+
/** HTTP method of the request, in upper case, such as `POST`. */
|
|
4576
|
+
method: string;
|
|
4577
|
+
/** The request's id, when the response carried one. */
|
|
4578
|
+
requestId?: string;
|
|
4579
|
+
};
|
|
4580
|
+
/**
|
|
4581
|
+
* What an `Exa` client does with the warnings the API returns about a request,
|
|
4582
|
+
* such as a field it ignores.
|
|
4583
|
+
* - `"log"` (default): print each warning with `console.warn`, once per process
|
|
4584
|
+
* for each endpoint, code and path, as
|
|
4585
|
+
* `[exa] POST /search IGNORED_FIELD at /startCrawlDate: ...`.
|
|
4586
|
+
* - `"silent"`: print nothing.
|
|
4587
|
+
* - A function: called with every warning of every response, and the request
|
|
4588
|
+
* it is about, instead of printing. For example, to route warnings to your
|
|
4589
|
+
* own logger.
|
|
4590
|
+
*
|
|
4591
|
+
* The client reports the warnings of every endpoint that returns them. Today
|
|
4592
|
+
* that is `/search`, including `streamSearch`. A response keeps its own
|
|
4593
|
+
* `warnings` in every mode.
|
|
4594
|
+
*/
|
|
4595
|
+
type WarningsOption = "log" | "silent" | ((warning: ApiWarning, context: ApiWarningContext) => void);
|
|
4596
|
+
/**
|
|
4597
|
+
* Client-wide settings, given as the third argument of the `Exa` constructor.
|
|
4598
|
+
*/
|
|
4599
|
+
type ExaClientOptions = {
|
|
4600
|
+
/**
|
|
4601
|
+
* Default timeout in milliseconds for every request this client makes. A
|
|
4602
|
+
* per-call `timeout` overrides it. Unset by default, in which case the SDK
|
|
4603
|
+
* imposes no timeout of its own.
|
|
4604
|
+
*/
|
|
4605
|
+
timeout?: number | undefined;
|
|
4606
|
+
/**
|
|
4607
|
+
* What the client does with the warnings the API returns about a request.
|
|
4608
|
+
* Defaults to `"log"`: each warning is printed once per process for each
|
|
4609
|
+
* endpoint, code and path. See {@link WarningsOption}.
|
|
4610
|
+
*/
|
|
4611
|
+
warnings?: WarningsOption | undefined;
|
|
4309
4612
|
};
|
|
4310
4613
|
/**
|
|
4311
4614
|
* Options for performing a search query
|
|
@@ -4322,11 +4625,13 @@ type RequestOptions = {
|
|
|
4322
4625
|
* @property {string[]} [includeText] - List of strings that must be present in webpage text of results. Currently only supports 1 string of up to 5 words.
|
|
4323
4626
|
* @property {string[]} [excludeText] - List of strings that must not be present in webpage text of results. Currently only supports 1 string of up to 5 words.
|
|
4324
4627
|
* @property {string[]} [flags] - Experimental flags
|
|
4325
|
-
* @property {
|
|
4628
|
+
* @property {UserLocation} [userLocation] - The end user's location, as a two-letter ISO 3166-1 country code or an object. See {@link UserLocation}.
|
|
4326
4629
|
* @property {boolean} [stream] - Whether to stream back OpenAI-style chat completion chunks. Use `streamSearch()` instead of `search({ stream: true })`.
|
|
4630
|
+
* @property {AbortSignal} [signal] - AbortSignal to cancel the underlying HTTP request.
|
|
4631
|
+
* @property {number} [timeout] - Request timeout in milliseconds.
|
|
4327
4632
|
*/
|
|
4328
|
-
type BaseSearchOptions = {
|
|
4329
|
-
contents?:
|
|
4633
|
+
type BaseSearchOptions = TransportRequestOptions & {
|
|
4634
|
+
contents?: SearchContentsOptions;
|
|
4330
4635
|
numResults?: number;
|
|
4331
4636
|
includeDomains?: string[];
|
|
4332
4637
|
excludeDomains?: string[];
|
|
@@ -4340,7 +4645,7 @@ type BaseSearchOptions = {
|
|
|
4340
4645
|
includeText?: string[];
|
|
4341
4646
|
excludeText?: string[];
|
|
4342
4647
|
flags?: string[];
|
|
4343
|
-
userLocation?:
|
|
4648
|
+
userLocation?: UserLocation;
|
|
4344
4649
|
stream?: boolean;
|
|
4345
4650
|
};
|
|
4346
4651
|
/**
|
|
@@ -4355,10 +4660,23 @@ type BaseRegularSearchOptions = BaseSearchOptions & {
|
|
|
4355
4660
|
* characters.
|
|
4356
4661
|
*/
|
|
4357
4662
|
objective?: string;
|
|
4663
|
+
/**
|
|
4664
|
+
* An opaque ID you assign to the end user this request is made for, such
|
|
4665
|
+
* as a UUID, used to attribute usage to that end user. Must not contain
|
|
4666
|
+
* personal information such as an email address, phone number, username or
|
|
4667
|
+
* name. Hash such values before sending them. 1 to 64 characters: letters,
|
|
4668
|
+
* digits, `_` and `-`. Retained even when your team has Zero Data
|
|
4669
|
+
* Retention enabled. Does not affect results.
|
|
4670
|
+
*/
|
|
4671
|
+
userIdentifier?: string;
|
|
4358
4672
|
/**
|
|
4359
4673
|
* If true, the search results are moderated for safety.
|
|
4360
4674
|
*/
|
|
4361
4675
|
moderation?: boolean;
|
|
4676
|
+
/**
|
|
4677
|
+
* @deprecated No longer supported and ignored by the API. Remove it from
|
|
4678
|
+
* the request.
|
|
4679
|
+
*/
|
|
4362
4680
|
useAutoprompt?: boolean;
|
|
4363
4681
|
/**
|
|
4364
4682
|
* Additional instructions that guide both the search process and the final returned synthesis.
|
|
@@ -4374,6 +4692,12 @@ type BaseRegularSearchOptions = BaseSearchOptions & {
|
|
|
4374
4692
|
*/
|
|
4375
4693
|
outputSchema?: DeepOutputSchema;
|
|
4376
4694
|
};
|
|
4695
|
+
/**
|
|
4696
|
+
* Deep search types. We recommend `"deep"`. `"deep-reasoning"` is a legacy
|
|
4697
|
+
* search type that is still accepted. Instead of `"deep-reasoning"`, use
|
|
4698
|
+
* `"deep"`, or Exa Agent for long-running research, list building and
|
|
4699
|
+
* multi-hop enrichment. Start an Exa Agent run with `exa.agent.runs.create`.
|
|
4700
|
+
*/
|
|
4377
4701
|
type DeepSearchType = "deep-lite" | "deep" | "deep-reasoning";
|
|
4378
4702
|
/**
|
|
4379
4703
|
* Deep search output schema mode for plain text responses.
|
|
@@ -4410,10 +4734,9 @@ type DeepOutputSchema = DeepTextOutputSchema | DeepObjectOutputSchema;
|
|
|
4410
4734
|
/**
|
|
4411
4735
|
* Contents options for deep search.
|
|
4412
4736
|
*/
|
|
4413
|
-
type DeepContentsOptions = Omit<
|
|
4737
|
+
type DeepContentsOptions = Omit<SearchContentsOptions, "context"> & {
|
|
4414
4738
|
/**
|
|
4415
|
-
*
|
|
4416
|
-
* @deprecated Use `text` or `highlights` instead. This legacy `context` field will be removed in a future version.
|
|
4739
|
+
* @deprecated Use `text` or `highlights` instead.
|
|
4417
4740
|
*/
|
|
4418
4741
|
context?: ContextOptions | true;
|
|
4419
4742
|
};
|
|
@@ -4421,6 +4744,12 @@ type DeepContentsOptions = Omit<ContentsOptions, "context"> & {
|
|
|
4421
4744
|
* Search options for deep search types, which additionally support additional queries.
|
|
4422
4745
|
*/
|
|
4423
4746
|
type DeepSearchOptions = Omit<BaseRegularSearchOptions, "contents"> & {
|
|
4747
|
+
/**
|
|
4748
|
+
* The deep search type. We recommend `"deep"`. `"deep-reasoning"` is a
|
|
4749
|
+
* legacy search type that is still accepted. Instead of `"deep-reasoning"`,
|
|
4750
|
+
* use `"deep"`, or Exa Agent for long-running research, list building and
|
|
4751
|
+
* multi-hop enrichment. Start an Exa Agent run with `exa.agent.runs.create`.
|
|
4752
|
+
*/
|
|
4424
4753
|
type: DeepSearchType;
|
|
4425
4754
|
/**
|
|
4426
4755
|
* Alternative query formulations for deep search variants to skip automatic LLM-based query expansion.
|
|
@@ -4434,16 +4763,41 @@ type DeepSearchOptions = Omit<BaseRegularSearchOptions, "contents"> & {
|
|
|
4434
4763
|
contents?: DeepContentsOptions;
|
|
4435
4764
|
};
|
|
4436
4765
|
/**
|
|
4437
|
-
*
|
|
4766
|
+
* Non-deep search types.
|
|
4767
|
+
*/
|
|
4768
|
+
type NonDeepSearchType = "keyword" | "neural" | "auto" | "hybrid" | "fast" | "instant" | "lite";
|
|
4769
|
+
/**
|
|
4770
|
+
* Search options for non-deep search types (keyword, neural, auto, hybrid,
|
|
4771
|
+
* fast, instant, lite) and for any other search type string.
|
|
4438
4772
|
*/
|
|
4439
4773
|
type NonDeepSearchOptions = BaseRegularSearchOptions & {
|
|
4440
|
-
|
|
4774
|
+
/**
|
|
4775
|
+
* The search type. We recommend `"lite"`, `"auto"` (the default) and, for
|
|
4776
|
+
* deep search, `"deep"`. `"lite"` (beta) is a low-cost search that supports
|
|
4777
|
+
* a reduced set of parameters.
|
|
4778
|
+
*
|
|
4779
|
+
* `"fast"` and `"instant"` are legacy search types. They are still accepted;
|
|
4780
|
+
* for new code, use `"lite"` instead of `"instant"`, and `"lite"` instead of
|
|
4781
|
+
* `"fast"`, or `"auto"` when the request needs parameters `"lite"` rejects.
|
|
4782
|
+
*
|
|
4783
|
+
* Any other string is passed through to the API as given.
|
|
4784
|
+
*/
|
|
4785
|
+
type?: NonDeepSearchType | (string & {});
|
|
4441
4786
|
};
|
|
4442
4787
|
/**
|
|
4443
4788
|
* Search options for performing a search query.
|
|
4444
4789
|
* Uses a discriminated union to ensure additionalQueries is only allowed when type is a deep search variant.
|
|
4445
4790
|
*/
|
|
4446
4791
|
type RegularSearchOptions = DeepSearchOptions | NonDeepSearchOptions;
|
|
4792
|
+
/**
|
|
4793
|
+
* Search options accepted by `streamSearch`: every search type except `lite`, which does not support streaming.
|
|
4794
|
+
*
|
|
4795
|
+
* `Type` is inferred from the `type` a caller passes, which lets any search
|
|
4796
|
+
* type string through except `"lite"`.
|
|
4797
|
+
*/
|
|
4798
|
+
type StreamSearchOptions<Type extends string = never> = DeepSearchOptions | (Omit<NonDeepSearchOptions, "type"> & {
|
|
4799
|
+
type?: Exclude<NonDeepSearchType, "lite"> | (Type extends "lite" ? never : Type);
|
|
4800
|
+
});
|
|
4447
4801
|
/**
|
|
4448
4802
|
* Options for opting into Exa-Beta features.
|
|
4449
4803
|
* @typedef {Object} BetaOptions
|
|
@@ -4453,10 +4807,8 @@ type BetaOptions = {
|
|
|
4453
4807
|
betas?: string[];
|
|
4454
4808
|
};
|
|
4455
4809
|
/**
|
|
4456
|
-
*
|
|
4457
|
-
* @deprecated Use `search()`
|
|
4458
|
-
*
|
|
4459
|
-
* Options for finding similar links.
|
|
4810
|
+
* Options for `findSimilar()`.
|
|
4811
|
+
* @deprecated Use `search()` instead. There is no direct replacement for URL-based similarity.
|
|
4460
4812
|
* @typedef {Object} FindSimilarOptions
|
|
4461
4813
|
* @property {boolean} [excludeSourceDomain] - If true, excludes links from the base domain of the input.
|
|
4462
4814
|
*/
|
|
@@ -4522,13 +4874,11 @@ type HighlightsContentsOptions = {
|
|
|
4522
4874
|
maxCharacters?: number;
|
|
4523
4875
|
dynamic?: boolean;
|
|
4524
4876
|
/**
|
|
4525
|
-
*
|
|
4526
|
-
* @deprecated Use `maxCharacters` instead. This legacy sizing field will be removed in a future version.
|
|
4877
|
+
* @deprecated Use `maxCharacters` instead.
|
|
4527
4878
|
*/
|
|
4528
4879
|
numSentences?: number;
|
|
4529
4880
|
/**
|
|
4530
|
-
*
|
|
4531
|
-
* @deprecated Use `maxCharacters` instead. This legacy sizing field will be removed in a future version.
|
|
4881
|
+
* @deprecated Use `maxCharacters` instead.
|
|
4532
4882
|
*/
|
|
4533
4883
|
highlightsPerUrl?: number;
|
|
4534
4884
|
};
|
|
@@ -4543,13 +4893,11 @@ type SummaryContentsOptions = {
|
|
|
4543
4893
|
schema?: Record<string, unknown> | ZodSchema;
|
|
4544
4894
|
};
|
|
4545
4895
|
/**
|
|
4546
|
-
* DEPRECATED: Use `Record<string, unknown>` instead. Will be removed in a future version.
|
|
4547
4896
|
* @deprecated Use `Record<string, unknown>` instead.
|
|
4548
4897
|
*/
|
|
4549
4898
|
type JSONSchema = Record<string, unknown>;
|
|
4550
4899
|
/**
|
|
4551
|
-
*
|
|
4552
|
-
* @deprecated Use `text` or `highlights` instead. The `context` option will be removed in a future version.
|
|
4900
|
+
* @deprecated Use `text` or `highlights` instead.
|
|
4553
4901
|
*
|
|
4554
4902
|
* Options for retrieving the context from a list of search results. The context is a string
|
|
4555
4903
|
* representation of all the search results.
|
|
@@ -4702,11 +5050,46 @@ type EntityPersonPropertiesWorkHistoryEntry = {
|
|
|
4702
5050
|
dates?: EntityDateRange | null;
|
|
4703
5051
|
company?: EntityPersonPropertiesCompanyRef | null;
|
|
4704
5052
|
};
|
|
5053
|
+
/** Reference to an institution in education history. */
|
|
5054
|
+
type EntityPersonPropertiesInstitutionRef = {
|
|
5055
|
+
id?: string | null;
|
|
5056
|
+
name?: string | null;
|
|
5057
|
+
};
|
|
5058
|
+
/** A single education history entry for a person. */
|
|
5059
|
+
type EntityPersonPropertiesEducationHistoryEntry = {
|
|
5060
|
+
degree?: string | null;
|
|
5061
|
+
dates?: EntityDateRange | null;
|
|
5062
|
+
institution?: EntityPersonPropertiesInstitutionRef | null;
|
|
5063
|
+
};
|
|
5064
|
+
/** A notable publication by a person. */
|
|
5065
|
+
type EntityPersonPropertiesNotableWork = {
|
|
5066
|
+
title?: string | null;
|
|
5067
|
+
year?: number | null;
|
|
5068
|
+
venue?: string | null;
|
|
5069
|
+
citationCount?: number | null;
|
|
5070
|
+
doi?: string | null;
|
|
5071
|
+
id?: string | null;
|
|
5072
|
+
type?: string | null;
|
|
5073
|
+
};
|
|
5074
|
+
/** Research information for a person. */
|
|
5075
|
+
type EntityPersonPropertiesResearch = {
|
|
5076
|
+
worksCount?: number | null;
|
|
5077
|
+
citationCount?: number | null;
|
|
5078
|
+
hIndex?: number | null;
|
|
5079
|
+
firstPublicationYear?: number | null;
|
|
5080
|
+
latestPublicationYear?: number | null;
|
|
5081
|
+
areas?: string[];
|
|
5082
|
+
notableWorks?: EntityPersonPropertiesNotableWork[];
|
|
5083
|
+
};
|
|
4705
5084
|
/** Structured properties for a person entity. */
|
|
4706
5085
|
type EntityPersonProperties = {
|
|
4707
5086
|
name?: string | null;
|
|
5087
|
+
firstName?: string | null;
|
|
5088
|
+
lastName?: string | null;
|
|
4708
5089
|
location?: string | null;
|
|
4709
5090
|
workHistory?: EntityPersonPropertiesWorkHistoryEntry[];
|
|
5091
|
+
educationHistory?: EntityPersonPropertiesEducationHistoryEntry[];
|
|
5092
|
+
research?: EntityPersonPropertiesResearch | null;
|
|
4710
5093
|
};
|
|
4711
5094
|
/** Structured entity data for a company. */
|
|
4712
5095
|
type CompanyEntity = {
|
|
@@ -4764,23 +5147,67 @@ type DeepSearchOutput = {
|
|
|
4764
5147
|
content: string | Record<string, unknown>;
|
|
4765
5148
|
grounding: DeepSearchOutputGrounding[];
|
|
4766
5149
|
};
|
|
5150
|
+
/**
|
|
5151
|
+
* Known `ApiWarning` codes. The set is open, so handle codes you do not know.
|
|
5152
|
+
* - `IGNORED_FIELD`: the field at `path` is accepted and has no effect on the request.
|
|
5153
|
+
*/
|
|
5154
|
+
type ApiWarningCode = "IGNORED_FIELD" | (string & {});
|
|
5155
|
+
/**
|
|
5156
|
+
* A warning the API returns about a request, such as a field it ignores. A
|
|
5157
|
+
* warning never changes the status code or the result. It is for whoever owns
|
|
5158
|
+
* the code that builds the request: fix the request, and do not pass the
|
|
5159
|
+
* warning to a model.
|
|
5160
|
+
*/
|
|
5161
|
+
type ApiWarning = {
|
|
5162
|
+
/** Machine-readable code in UPPER_SNAKE case, such as `IGNORED_FIELD`. */
|
|
5163
|
+
code: ApiWarningCode;
|
|
5164
|
+
/** JSON Pointer to the request field the warning is about, such as `/startCrawlDate`. */
|
|
5165
|
+
path: string;
|
|
5166
|
+
/** What to change in the request, in plain words. */
|
|
5167
|
+
message: string;
|
|
5168
|
+
};
|
|
5169
|
+
/** Known `SearchWarning` codes: the {@link ApiWarningCode}s. */
|
|
5170
|
+
type SearchWarningCode = ApiWarningCode;
|
|
5171
|
+
/** A warning about a search request: an {@link ApiWarning}. */
|
|
5172
|
+
type SearchWarning = ApiWarning;
|
|
5173
|
+
/**
|
|
5174
|
+
* Known `SearchNotice` codes. The set is open, so handle codes you do not know.
|
|
5175
|
+
* - `RESTRICTIONS_RELAXED`: no results matched a restriction in the query, such as `site:` or an exact phrase, so the results come from a search with it removed.
|
|
5176
|
+
*/
|
|
5177
|
+
type SearchNoticeCode = "RESTRICTIONS_RELAXED" | (string & {});
|
|
5178
|
+
/**
|
|
5179
|
+
* A note about how the results of a search were produced, such as a query
|
|
5180
|
+
* restriction relaxed to return results. A notice is written to be shown to a
|
|
5181
|
+
* model. Pass its `message` to the model that reads the results.
|
|
5182
|
+
*/
|
|
5183
|
+
type SearchNotice = {
|
|
5184
|
+
/** Machine-readable code in UPPER_SNAKE case, such as `RESTRICTIONS_RELAXED`. */
|
|
5185
|
+
code: SearchNoticeCode;
|
|
5186
|
+
/** JSON Pointer to the request field the notice is about, such as `/query`. */
|
|
5187
|
+
path: string;
|
|
5188
|
+
/** Complete on its own and written to be shown to a model. */
|
|
5189
|
+
message: string;
|
|
5190
|
+
/** Optional extra context. No schema is promised for its keys, and it never carries information that `message` lacks. */
|
|
5191
|
+
details?: Record<string, unknown>;
|
|
5192
|
+
};
|
|
4767
5193
|
/**
|
|
4768
5194
|
* Represents a search response object.
|
|
4769
5195
|
* @typedef {Object} SearchResponse
|
|
4770
5196
|
* @property {Result[]} results - The list of search results.
|
|
4771
|
-
* @property {string} [context] -
|
|
5197
|
+
* @property {string} [context] - Deprecated. Use `text` or `highlights` on individual results.
|
|
4772
5198
|
* @property {DeepSearchOutput} [output] - Search synthesized output object returned when `outputSchema` is provided.
|
|
4773
5199
|
* @property {string} [autoDate] - The autoprompt date, if applicable.
|
|
4774
5200
|
* @property {string} requestId - The request ID for the search.
|
|
4775
5201
|
* @property {CostDollars} [costDollars] - The cost breakdown for this request.
|
|
4776
5202
|
* @property {string} [resolvedSearchType] - The resolved search type ('neural' or 'keyword') when using 'auto' search.
|
|
4777
5203
|
* @property {number} [searchTime] - Time taken for the search in milliseconds.
|
|
5204
|
+
* @property {SearchWarning[]} [warnings] - Notes about the search request, such as a field the API ignores. Absent when there are none.
|
|
5205
|
+
* @property {SearchNotice[]} [notices] - Notes about how the results were produced, written to be shown to a model. Absent when there are none.
|
|
4778
5206
|
*/
|
|
4779
5207
|
type SearchResponse<T extends ContentsOptions> = {
|
|
4780
5208
|
results: SearchResult<T>[];
|
|
4781
5209
|
/**
|
|
4782
|
-
*
|
|
4783
|
-
* @deprecated Use `text` or `highlights` on individual results instead. This legacy `context` field will be removed in a future version.
|
|
5210
|
+
* @deprecated Use `text` or `highlights` on individual results instead.
|
|
4784
5211
|
*/
|
|
4785
5212
|
context?: string;
|
|
4786
5213
|
output?: DeepSearchOutput;
|
|
@@ -4790,6 +5217,17 @@ type SearchResponse<T extends ContentsOptions> = {
|
|
|
4790
5217
|
costDollars?: CostDollars;
|
|
4791
5218
|
resolvedSearchType?: string;
|
|
4792
5219
|
searchTime?: number;
|
|
5220
|
+
/**
|
|
5221
|
+
* Notes about the search request, such as a field the API ignores. Returned
|
|
5222
|
+
* by `search` only, and absent when there are none.
|
|
5223
|
+
*/
|
|
5224
|
+
warnings?: SearchWarning[];
|
|
5225
|
+
/**
|
|
5226
|
+
* Notes about how the results were produced, such as a query restriction
|
|
5227
|
+
* relaxed to return results. Written to be shown to a model. Returned by
|
|
5228
|
+
* `search` only, and absent when there are none.
|
|
5229
|
+
*/
|
|
5230
|
+
notices?: SearchNotice[];
|
|
4793
5231
|
};
|
|
4794
5232
|
/** Error details for a failed content retrieval. */
|
|
4795
5233
|
type ContentStatusError = {
|
|
@@ -4811,14 +5249,18 @@ type Status = {
|
|
|
4811
5249
|
* @property {"exa"} [model] - The model to use for generating the answer. Default "exa".
|
|
4812
5250
|
* @property {string} [systemPrompt] - A system prompt to guide the LLM's behavior when generating the answer.
|
|
4813
5251
|
* @property {Object} [outputSchema] - A JSON Schema specification for the structure you expect the output to take
|
|
5252
|
+
* @property {UserLocation} [userLocation] - The end user's location, as a two-letter ISO 3166-1 country code or an object. See {@link UserLocation}.
|
|
5253
|
+
* @property {string} [userIdentifier] - An opaque ID you assign to the end user the request is made for. See {@link UserIdentifierOptions}.
|
|
5254
|
+
* @property {AbortSignal} [signal] - AbortSignal to cancel the underlying HTTP request.
|
|
5255
|
+
* @property {number} [timeout] - Request timeout in milliseconds.
|
|
4814
5256
|
*/
|
|
4815
|
-
type AnswerOptions = {
|
|
5257
|
+
type AnswerOptions = UserIdentifierOptions & TransportRequestOptions & {
|
|
4816
5258
|
stream?: boolean;
|
|
4817
5259
|
text?: boolean;
|
|
4818
5260
|
model?: "exa";
|
|
4819
5261
|
systemPrompt?: string;
|
|
4820
5262
|
outputSchema?: Record<string, unknown>;
|
|
4821
|
-
userLocation?:
|
|
5263
|
+
userLocation?: UserLocation;
|
|
4822
5264
|
};
|
|
4823
5265
|
/**
|
|
4824
5266
|
* Represents an answer response object from the /answer endpoint.
|
|
@@ -4851,7 +5293,18 @@ type AnswerStreamChunk = {
|
|
|
4851
5293
|
text?: string;
|
|
4852
5294
|
}>;
|
|
4853
5295
|
};
|
|
4854
|
-
|
|
5296
|
+
/**
|
|
5297
|
+
* One chunk of a `streamSearch` response, with partial text (`content`), new
|
|
5298
|
+
* citations, or the request's `warnings`.
|
|
5299
|
+
*/
|
|
5300
|
+
type SearchStreamChunk = AnswerStreamChunk & {
|
|
5301
|
+
/**
|
|
5302
|
+
* Notes about the search request, such as a field the API ignores. When the
|
|
5303
|
+
* API returns any, they arrive on one chunk of their own, after the streamed
|
|
5304
|
+
* text.
|
|
5305
|
+
*/
|
|
5306
|
+
warnings?: SearchWarning[];
|
|
5307
|
+
};
|
|
4855
5308
|
/**
|
|
4856
5309
|
* Represents a streaming answer response chunk from the /answer endpoint.
|
|
4857
5310
|
* @typedef {Object} AnswerStreamResponse
|
|
@@ -4886,6 +5339,7 @@ type SummaryContentsOptionsTyped<T> = Omit<SummaryContentsOptions, "schema"> & {
|
|
|
4886
5339
|
declare class Exa {
|
|
4887
5340
|
private baseURL;
|
|
4888
5341
|
private headers;
|
|
5342
|
+
/** Client-wide transport defaults; a per-call option overrides each field. */
|
|
4889
5343
|
/**
|
|
4890
5344
|
* Websets API client
|
|
4891
5345
|
*/
|
|
@@ -4913,43 +5367,74 @@ declare class Exa {
|
|
|
4913
5367
|
/** Anthropic Messages API tools. */
|
|
4914
5368
|
anthropic: AnthropicTools;
|
|
4915
5369
|
private readonly toolRegistry;
|
|
5370
|
+
/** Receives each warning the API returns; undefined when `warnings` is `"silent"`. */
|
|
5371
|
+
private readonly warningHandler;
|
|
5372
|
+
/**
|
|
5373
|
+
* Hands each warning in a response body or stream payload to the `warnings`
|
|
5374
|
+
* option's handler. `request` calls it for every JSON response and
|
|
5375
|
+
* `streamChatCompletions` for every stream payload, so every endpoint
|
|
5376
|
+
* reports through here.
|
|
5377
|
+
*/
|
|
5378
|
+
private reportWarnings;
|
|
4916
5379
|
/**
|
|
4917
5380
|
* Helper method to separate out the contents-specific options from the rest.
|
|
4918
5381
|
*/
|
|
4919
5382
|
private extractContentsOptions;
|
|
4920
|
-
private mergeSearchRequestBody;
|
|
4921
5383
|
private buildSearchRequestBody;
|
|
4922
5384
|
/**
|
|
4923
5385
|
* Constructs the Exa API client.
|
|
4924
5386
|
* @param {string} apiKey - The API key for authentication.
|
|
4925
5387
|
* @param {string} [baseURL] - The base URL of the Exa API.
|
|
5388
|
+
* @param {ExaClientOptions} [options] - Client-wide settings (`timeout`, `warnings`).
|
|
5389
|
+
* @throws {RangeError} When `options.timeout` is not an integer from 1 to 2147483647.
|
|
5390
|
+
* @throws {TypeError} When `options.warnings` is not `"log"`, `"silent"` or a function.
|
|
4926
5391
|
*/
|
|
4927
|
-
constructor(apiKey?: string, baseURL?: string);
|
|
5392
|
+
constructor(apiKey?: string, baseURL?: string, options?: ExaClientOptions);
|
|
4928
5393
|
/**
|
|
4929
5394
|
* Makes a request to the Exa API.
|
|
4930
5395
|
* @param {string} endpoint - The API endpoint to call.
|
|
4931
5396
|
* @param {string} method - The HTTP method to use.
|
|
4932
5397
|
* @param {any} [body] - The request body for POST requests.
|
|
4933
5398
|
* @param {Record<string, any>} [params] - The query parameters.
|
|
5399
|
+
* @param {Record<string, string>} [headers] - Additional request headers.
|
|
5400
|
+
* @param {RequestOptions} [requestOptions] - Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`).
|
|
4934
5401
|
* @returns {Promise<any>} The response from the API.
|
|
4935
5402
|
* @throws {ExaError} When any API request fails with structured error information
|
|
5403
|
+
* @throws {ExaTimeoutError} When the request exceeds its `timeout`
|
|
5404
|
+
* @throws {ExaAbortError} When the caller's `signal` aborts the request
|
|
4936
5405
|
*/
|
|
4937
|
-
request<T = unknown>(endpoint: string, method: string, body?: any, params?: Record<string, any>, headers?: Record<string, string
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
*
|
|
4941
|
-
*
|
|
4942
|
-
*
|
|
4943
|
-
*
|
|
4944
|
-
*
|
|
4945
|
-
*
|
|
4946
|
-
*
|
|
4947
|
-
*
|
|
4948
|
-
*
|
|
4949
|
-
|
|
5406
|
+
request<T = unknown>(endpoint: string, method: string, body?: any, params?: Record<string, any>, headers?: Record<string, string>, requestOptions?: RequestOptions): Promise<T>;
|
|
5407
|
+
/**
|
|
5408
|
+
* Makes a request to the Exa API and returns the raw `Response`.
|
|
5409
|
+
*
|
|
5410
|
+
* `timeout` keeps running until the response body is consumed or cancelled,
|
|
5411
|
+
* and a body read it or the `signal` interrupts rejects with the platform's
|
|
5412
|
+
* own error. The SDK's streaming methods instead stop the timeout once the
|
|
5413
|
+
* response headers arrive. `body`, `headers` and `query` in
|
|
5414
|
+
* `requestOptions` are added to the request as they are in `request`.
|
|
5415
|
+
*
|
|
5416
|
+
* @throws {ExaTimeoutError} When no response arrives within `timeout`
|
|
5417
|
+
* @throws {ExaAbortError} When the caller's `signal` aborts before a response arrives
|
|
5418
|
+
*/
|
|
5419
|
+
rawRequest(endpoint: string, method?: string, body?: Record<string, unknown>, queryParams?: Record<string, string | number | boolean | string[] | undefined>, headers?: Record<string, string>, requestOptions?: RequestOptions): Promise<Response>;
|
|
5420
|
+
private requestWithOptions;
|
|
5421
|
+
private streamRequestWithOptions;
|
|
5422
|
+
/**
|
|
5423
|
+
* For optimal token efficiency, use
|
|
5424
|
+
* `contents: { highlights: true }` and read each result's `highlights` array.
|
|
5425
|
+
* Exa dynamically chooses excerpt length based on each document's relevance
|
|
5426
|
+
* to your query. Set `maxCharacters` only for an explicit application limit.
|
|
5427
|
+
*
|
|
5428
|
+
* Supply `objective` to improve search quality and token efficiency.
|
|
5429
|
+
* Describe the larger task you're working on and the goal for this search turn.
|
|
5430
|
+
* Say which documents should rank first, which should be excluded, and what
|
|
5431
|
+
* specific facts or figures to pull from them.
|
|
5432
|
+
*
|
|
5433
|
+
* Request `text` when you need the full page; use `contents: false` for
|
|
5434
|
+
* titles and URLs only. Omitting contents still returns text by default.
|
|
4950
5435
|
*
|
|
4951
5436
|
* @param {string} query - The query string.
|
|
4952
|
-
* @param {RequestOptions} [requestOptions] - Per-call body
|
|
5437
|
+
* @param {RequestOptions} [requestOptions] - Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`).
|
|
4953
5438
|
* @returns {Promise<SearchResponse<{ text: { maxCharacters: 10_000 } }>>} A list of relevant search results with text contents.
|
|
4954
5439
|
*/
|
|
4955
5440
|
search(query: string, options?: undefined, requestOptions?: RequestOptions): Promise<SearchResponse<{
|
|
@@ -4962,7 +5447,7 @@ declare class Exa {
|
|
|
4962
5447
|
*
|
|
4963
5448
|
* @param {string} query - The query string.
|
|
4964
5449
|
* @param {RegularSearchOptions & { contents: false }} options - Search options with contents explicitly disabled
|
|
4965
|
-
* @param {RequestOptions} [requestOptions] - Per-call body
|
|
5450
|
+
* @param {RequestOptions} [requestOptions] - Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`).
|
|
4966
5451
|
* @returns {Promise<SearchResponse<{}>>} A list of relevant search results without contents.
|
|
4967
5452
|
*/
|
|
4968
5453
|
search(query: string, options: RegularSearchOptions & BetaOptions & {
|
|
@@ -4970,19 +5455,15 @@ declare class Exa {
|
|
|
4970
5455
|
}, requestOptions?: RequestOptions): Promise<SearchResponse<{}>>;
|
|
4971
5456
|
/**
|
|
4972
5457
|
* Performs a search with specific contents.
|
|
4973
|
-
* Prefer `{ contents: { highlights: true } }` for query-relevant passages
|
|
4974
|
-
* for AI answers, RAG, and search previews. Read `result.highlights`.
|
|
4975
|
-
* `highlights: true` is the recommended default: Exa dynamically chooses
|
|
4976
|
-
* the number of characters based on each document's relevance to your query.
|
|
4977
|
-
* No manual character budget is needed. Set `maxCharacters` only when
|
|
4978
|
-
* your application requires a specific numeric character limit; otherwise
|
|
4979
|
-
* keep `highlights: true`.
|
|
4980
|
-
* Use the boolean `true`; do not set the deprecated `numSentences` or
|
|
4981
|
-
* `highlightsPerUrl` options. Request `text` when you need the full page.
|
|
4982
5458
|
*
|
|
4983
5459
|
* @example
|
|
4984
5460
|
* const response = await exa.search("recent advances in battery recycling", {
|
|
4985
5461
|
* contents: { highlights: true },
|
|
5462
|
+
* objective:
|
|
5463
|
+
* "I'm preparing a technical report on battery recycling methods. " +
|
|
5464
|
+
* "For this search turn, gather evidence to compare their economics. " +
|
|
5465
|
+
* "Rank peer-reviewed studies first, exclude marketing pages, and pull " +
|
|
5466
|
+
* "material recovery rates and processing costs.",
|
|
4986
5467
|
* });
|
|
4987
5468
|
* for (const result of response.results) {
|
|
4988
5469
|
* console.log(result.url, result.highlights);
|
|
@@ -4990,21 +5471,18 @@ declare class Exa {
|
|
|
4990
5471
|
*
|
|
4991
5472
|
* @param {string} query - The query string.
|
|
4992
5473
|
* @param {RegularSearchOptions & { contents: T }} options - Search options with specific contents
|
|
4993
|
-
* @param {RequestOptions} [requestOptions] - Per-call body
|
|
5474
|
+
* @param {RequestOptions} [requestOptions] - Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`).
|
|
4994
5475
|
* @returns {Promise<SearchResponse<T>>} A list of relevant search results with requested contents.
|
|
4995
5476
|
*/
|
|
4996
5477
|
search<T extends ContentsOptions>(query: string, options: RegularSearchOptions & BetaOptions & {
|
|
4997
5478
|
contents: T;
|
|
4998
5479
|
}, requestOptions?: RequestOptions): Promise<SearchResponse<T>>;
|
|
4999
5480
|
/**
|
|
5000
|
-
* Performs a search with an Exa prompt-engineered query.
|
|
5001
5481
|
* When no contents option is specified, returns text contents by default.
|
|
5002
|
-
* For query-relevant passages, explicitly pass
|
|
5003
|
-
* `{ contents: { highlights: true } }` and read `result.highlights`.
|
|
5004
5482
|
*
|
|
5005
5483
|
* @param {string} query - The query string.
|
|
5006
5484
|
* @param {Omit<DeepSearchOptions, 'contents'> | Omit<NonDeepSearchOptions, 'contents'>} options - Search options without contents
|
|
5007
|
-
* @param {RequestOptions} [requestOptions] - Per-call body
|
|
5485
|
+
* @param {RequestOptions} [requestOptions] - Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`).
|
|
5008
5486
|
* @returns {Promise<SearchResponse<{ text: true }>>} A list of relevant search results with text contents.
|
|
5009
5487
|
*/
|
|
5010
5488
|
search(query: string, options: (Omit<DeepSearchOptions, "contents"> | Omit<NonDeepSearchOptions, "contents">) & BetaOptions, requestOptions?: RequestOptions): Promise<SearchResponse<{
|
|
@@ -5014,15 +5492,18 @@ declare class Exa {
|
|
|
5014
5492
|
* Stream a search response as an async generator of OpenAI-style chat completion chunks.
|
|
5015
5493
|
*
|
|
5016
5494
|
* Each iteration yields a chunk with partial text (`content`) or new citations.
|
|
5495
|
+
* When the API returns `warnings` about the request, one chunk after the text
|
|
5496
|
+
* carries them.
|
|
5017
5497
|
* Use this if you'd like to read synthesized search output incrementally.
|
|
5018
|
-
*
|
|
5498
|
+
* The `lite` search type does not support streaming.
|
|
5499
|
+
* @param {RequestOptions} [requestOptions] - Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`).
|
|
5019
5500
|
*/
|
|
5020
|
-
streamSearch(query: string, options?:
|
|
5501
|
+
streamSearch<Type extends string = never>(query: string, options?: StreamSearchOptions<Type> & {
|
|
5021
5502
|
contents?: ContentsOptions | false | null | undefined;
|
|
5022
5503
|
}, requestOptions?: RequestOptions): AsyncGenerator<SearchStreamChunk>;
|
|
5023
5504
|
/**
|
|
5024
|
-
*
|
|
5025
|
-
*
|
|
5505
|
+
* @deprecated Use `search()`, which returns text contents by default. Pass
|
|
5506
|
+
* content options inside `contents`.
|
|
5026
5507
|
*
|
|
5027
5508
|
* Migration examples:
|
|
5028
5509
|
* - `searchAndContents(query)` → `search(query)`
|
|
@@ -5033,68 +5514,67 @@ declare class Exa {
|
|
|
5033
5514
|
*
|
|
5034
5515
|
* @param {string} query - The query string.
|
|
5035
5516
|
* @param {RegularSearchOptions & T} [options] - Additional search + contents options
|
|
5036
|
-
* @param {RequestOptions} [requestOptions] - Per-call body
|
|
5517
|
+
* @param {RequestOptions} [requestOptions] - Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`).
|
|
5037
5518
|
* @returns {Promise<SearchResponse<T>>} A list of relevant search results with requested contents.
|
|
5038
5519
|
*/
|
|
5039
5520
|
searchAndContents<T extends ContentsOptions>(query: string, options?: RegularSearchOptions & T, requestOptions?: RequestOptions): Promise<SearchResponse<T>>;
|
|
5040
5521
|
/**
|
|
5041
|
-
*
|
|
5042
|
-
* @deprecated Use `search()` for new discovery flows. This legacy URL-similarity method will be removed in a future version.
|
|
5522
|
+
* @deprecated Use `search()` instead. There is no direct replacement for URL-based similarity.
|
|
5043
5523
|
*
|
|
5044
5524
|
* Finds similar links to the provided URL.
|
|
5045
5525
|
* By default, returns text contents. Use contents: false to opt-out.
|
|
5046
5526
|
*
|
|
5047
5527
|
* @param {string} url - The URL for which to find similar links.
|
|
5528
|
+
* @param {RequestOptions} [requestOptions] - Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`).
|
|
5048
5529
|
* @returns {Promise<SearchResponse<{ text: { maxCharacters: 10_000 } }>>} A list of similar search results with text contents.
|
|
5049
5530
|
*/
|
|
5050
|
-
findSimilar(url: string): Promise<SearchResponse<{
|
|
5531
|
+
findSimilar(url: string, options?: undefined, requestOptions?: RequestOptions): Promise<SearchResponse<{
|
|
5051
5532
|
text: {
|
|
5052
5533
|
maxCharacters: 10_000;
|
|
5053
5534
|
};
|
|
5054
5535
|
}>>;
|
|
5055
5536
|
/**
|
|
5056
|
-
*
|
|
5057
|
-
* @deprecated Use `search()` for new discovery flows. This legacy URL-similarity method will be removed in a future version.
|
|
5537
|
+
* @deprecated Use `search()` instead. There is no direct replacement for URL-based similarity.
|
|
5058
5538
|
*
|
|
5059
5539
|
* Finds similar links to the provided URL without contents.
|
|
5060
5540
|
*
|
|
5061
5541
|
* @param {string} url - The URL for which to find similar links.
|
|
5062
5542
|
* @param {FindSimilarOptions & { contents: false }} options - Options with contents explicitly disabled
|
|
5543
|
+
* @param {RequestOptions} [requestOptions] - Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`).
|
|
5063
5544
|
* @returns {Promise<SearchResponse<{}>>} A list of similar search results without contents.
|
|
5064
5545
|
*/
|
|
5065
5546
|
findSimilar(url: string, options: FindSimilarOptions & {
|
|
5066
5547
|
contents: false | null | undefined;
|
|
5067
|
-
}): Promise<SearchResponse<{}>>;
|
|
5548
|
+
}, requestOptions?: RequestOptions): Promise<SearchResponse<{}>>;
|
|
5068
5549
|
/**
|
|
5069
|
-
*
|
|
5070
|
-
* @deprecated Use `search()` with `contents` for new discovery flows. This legacy URL-similarity method will be removed in a future version.
|
|
5550
|
+
* @deprecated Use `search()` instead. There is no direct replacement for URL-based similarity.
|
|
5071
5551
|
*
|
|
5072
5552
|
* Finds similar links to the provided URL with specific contents.
|
|
5073
5553
|
*
|
|
5074
5554
|
* @param {string} url - The URL for which to find similar links.
|
|
5075
5555
|
* @param {FindSimilarOptions & { contents: T }} options - Options with specific contents
|
|
5556
|
+
* @param {RequestOptions} [requestOptions] - Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`).
|
|
5076
5557
|
* @returns {Promise<SearchResponse<T>>} A list of similar search results with requested contents.
|
|
5077
5558
|
*/
|
|
5078
5559
|
findSimilar<T extends ContentsOptions>(url: string, options: FindSimilarOptions & {
|
|
5079
5560
|
contents: T;
|
|
5080
|
-
}): Promise<SearchResponse<T>>;
|
|
5561
|
+
}, requestOptions?: RequestOptions): Promise<SearchResponse<T>>;
|
|
5081
5562
|
/**
|
|
5082
|
-
*
|
|
5083
|
-
* @deprecated Use `search()` for new discovery flows. This legacy URL-similarity method will be removed in a future version.
|
|
5563
|
+
* @deprecated Use `search()` instead. There is no direct replacement for URL-based similarity.
|
|
5084
5564
|
*
|
|
5085
5565
|
* Finds similar links to the provided URL.
|
|
5086
5566
|
* When no contents option is specified, returns text contents by default.
|
|
5087
5567
|
*
|
|
5088
5568
|
* @param {string} url - The URL for which to find similar links.
|
|
5089
5569
|
* @param {Omit<FindSimilarOptions, 'contents'>} options - Options without contents
|
|
5570
|
+
* @param {RequestOptions} [requestOptions] - Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`).
|
|
5090
5571
|
* @returns {Promise<SearchResponse<{ text: true }>>} A list of similar search results with text contents.
|
|
5091
5572
|
*/
|
|
5092
|
-
findSimilar(url: string, options: Omit<FindSimilarOptions, "contents"
|
|
5573
|
+
findSimilar(url: string, options: Omit<FindSimilarOptions, "contents">, requestOptions?: RequestOptions): Promise<SearchResponse<{
|
|
5093
5574
|
text: true;
|
|
5094
5575
|
}>>;
|
|
5095
5576
|
/**
|
|
5096
|
-
*
|
|
5097
|
-
* @deprecated Use `search()` for new discovery flows instead. There is no direct replacement for URL-based similarity.
|
|
5577
|
+
* @deprecated Use `search()` instead. There is no direct replacement for URL-based similarity.
|
|
5098
5578
|
*
|
|
5099
5579
|
* Migration examples:
|
|
5100
5580
|
* - `findSimilarAndContents(url)` → `search(query)`
|
|
@@ -5106,22 +5586,24 @@ declare class Exa {
|
|
|
5106
5586
|
* @param {FindSimilarOptions & T} [options] - Additional options for finding similar links + contents.
|
|
5107
5587
|
* @returns {Promise<SearchResponse<T>>} A list of similar search results, including requested contents.
|
|
5108
5588
|
*/
|
|
5109
|
-
findSimilarAndContents<T extends ContentsOptions>(url: string, options?: FindSimilarOptions & T): Promise<SearchResponse<T>>;
|
|
5589
|
+
findSimilarAndContents<T extends ContentsOptions>(url: string, options?: FindSimilarOptions & T, requestOptions?: RequestOptions): Promise<SearchResponse<T>>;
|
|
5110
5590
|
/**
|
|
5111
5591
|
* Retrieves contents of documents based on URLs.
|
|
5112
5592
|
* @param {string | string[] | SearchResult[]} urls - A URL or array of URLs, or an array of SearchResult objects.
|
|
5113
|
-
* @param {ContentsOptions} [options] - Additional options for retrieving document contents.
|
|
5593
|
+
* @param {ContentsOptions & BetaOptions & UserIdentifierOptions & TransportRequestOptions} [options] - Additional options for retrieving document contents.
|
|
5594
|
+
* @param {RequestOptions} [requestOptions] - Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`).
|
|
5114
5595
|
* @returns {Promise<SearchResponse<T>>} A list of document contents for the requested URLs.
|
|
5115
5596
|
*/
|
|
5116
|
-
getContents<T extends ContentsOptions>(urls: string | string[] | SearchResult<T>[], options?: T & BetaOptions): Promise<SearchResponse<T>>;
|
|
5597
|
+
getContents<T extends ContentsOptions>(urls: string | string[] | SearchResult<T>[], options?: T & BetaOptions & UserIdentifierOptions & TransportRequestOptions, requestOptions?: RequestOptions): Promise<SearchResponse<T>>;
|
|
5117
5598
|
/**
|
|
5118
5599
|
* Generate an answer with Zod schema for strongly typed output
|
|
5119
5600
|
*/
|
|
5120
|
-
answer<T>(query: string, options: AnswerOptionsTyped<ZodSchema<T
|
|
5601
|
+
answer<T>(query: string, options: AnswerOptionsTyped<ZodSchema<T>>, requestOptions?: RequestOptions): Promise<AnswerResponseTyped<T>>;
|
|
5121
5602
|
/**
|
|
5122
5603
|
* Generate an answer to a query.
|
|
5123
5604
|
* @param {string} query - The question or query to answer.
|
|
5124
5605
|
* @param {AnswerOptions} [options] - Additional options for answer generation.
|
|
5606
|
+
* @param {RequestOptions} [requestOptions] - Per-call request options (`signal`, `timeout`, `body`, `headers`, `query`).
|
|
5125
5607
|
* @returns {Promise<AnswerResponse>} The generated answer and source references.
|
|
5126
5608
|
*
|
|
5127
5609
|
* Example with systemPrompt:
|
|
@@ -5140,7 +5622,7 @@ declare class Exa {
|
|
|
5140
5622
|
* }
|
|
5141
5623
|
* ```
|
|
5142
5624
|
*/
|
|
5143
|
-
answer(query: string, options?: AnswerOptions): Promise<AnswerResponse>;
|
|
5625
|
+
answer(query: string, options?: AnswerOptions, requestOptions?: RequestOptions): Promise<AnswerResponse>;
|
|
5144
5626
|
/**
|
|
5145
5627
|
* Stream an answer with Zod schema for structured output (non-streaming content)
|
|
5146
5628
|
* Note: Structured output works only with non-streaming content, not with streaming chunks
|
|
@@ -5150,8 +5632,8 @@ declare class Exa {
|
|
|
5150
5632
|
model?: "exa" | "exa-pro";
|
|
5151
5633
|
systemPrompt?: string;
|
|
5152
5634
|
outputSchema: ZodSchema<T>;
|
|
5153
|
-
userLocation?:
|
|
5154
|
-
}): AsyncGenerator<AnswerStreamChunk>;
|
|
5635
|
+
userLocation?: UserLocation;
|
|
5636
|
+
} & UserIdentifierOptions & TransportRequestOptions, requestOptions?: RequestOptions): AsyncGenerator<AnswerStreamChunk>;
|
|
5155
5637
|
/**
|
|
5156
5638
|
* Stream an answer as an async generator
|
|
5157
5639
|
*
|
|
@@ -5176,11 +5658,16 @@ declare class Exa {
|
|
|
5176
5658
|
model?: "exa" | "exa-pro";
|
|
5177
5659
|
systemPrompt?: string;
|
|
5178
5660
|
outputSchema?: Record<string, unknown>;
|
|
5179
|
-
userLocation?:
|
|
5180
|
-
}): AsyncGenerator<AnswerStreamChunk>;
|
|
5661
|
+
userLocation?: UserLocation;
|
|
5662
|
+
} & UserIdentifierOptions & TransportRequestOptions, requestOptions?: RequestOptions): AsyncGenerator<AnswerStreamChunk>;
|
|
5181
5663
|
private streamChatCompletions;
|
|
5664
|
+
/**
|
|
5665
|
+
* Parses one stream payload into a chunk. `warnings` is set only when the
|
|
5666
|
+
* payload carries a non-empty `warnings` array, which `/search` sends on its
|
|
5667
|
+
* `results` event.
|
|
5668
|
+
*/
|
|
5182
5669
|
private processChunk;
|
|
5183
5670
|
private parseSSEStream;
|
|
5184
5671
|
}
|
|
5185
5672
|
|
|
5186
|
-
export { AGENT_BETA_HEADER, AGENT_MAX_EFFORT_BETA, AGENT_MONITORS_BETA_HEADER, type AddAgentMonitorEntitiesParams, AgentBetaClient, type AgentBetaOptions, type AgentBudget, AgentClient, type AgentConfidence, type AgentCostDollars, type AgentCreateOptions, type AgentDataSource, type AgentDataSourceProvider, type AgentEffort, type AgentError, type AgentEvent, type AgentGroundingCitation, type AgentGroundingEntry, type AgentInput, type AgentMonitor, type AgentMonitorBacktest, type AgentMonitorBacktestContent, type AgentMonitorBacktestEntity, AgentMonitorBacktestFailedError, type AgentMonitorBacktestResult, type AgentMonitorBacktestStatus, type AgentMonitorBacktestWaitOptions, AgentMonitorBacktestsClient, type AgentMonitorChange, type AgentMonitorChangeEntity, type AgentMonitorChangeField, AgentMonitorChangesClient, type AgentMonitorCitation, type AgentMonitorContent, type AgentMonitorCreation, AgentMonitorEntitiesClient, type AgentMonitorEntity, type AgentMonitorEntityView, type AgentMonitorField, type AgentMonitorFieldMode, type AgentMonitorFieldValueType, type AgentMonitorRefresh, type AgentMonitorStatus, type AgentMonitorUsage, type AgentMonitorsBetaOptions, AgentMonitorsClient, type AgentOutput, type AgentRun, AgentRunCancelledError, AgentRunEventsClient, AgentRunFailedError, type AgentRunStatus, type AgentRunTyped, AgentRunsClient, type AgentStopReason, type AgentUsage, type AgentWaitOptions, type AnswerOptions, type AnswerOptionsTyped, type AnswerResponse, type AnswerResponseTyped, type AnswerStreamChunk, type AnswerStreamResponse, type AnthropicToolResult, AnthropicTools, type ArticleEntity, type BaseSearchOptions, BetaClient, type BetaOptions, type CompanyEntity, type ContentStatusError, type ContentsOptions, type ContentsResultComponent, type ContextOptions, type CostDollars, type CostDollarsContents, type CostDollarsSeearch, type CreateAgentMonitorBacktestParams, type CreateAgentMonitorEntityParams, type CreateAgentMonitorFieldParams, type CreateAgentMonitorOptions, type CreateAgentMonitorParams, type CreateAgentRunParams, type CreateAgentRunParamsTyped, type CreateCriterionParameters, type CreateEnrichmentParameters, CreateEnrichmentParametersFormat, type CreateImportParameters, CreateImportParametersFormat, type CreateImportResponse, type CreateImportWithCsvParameters, type CreateMonitorParameters, type CreateSearchMonitorParams, type CreateSearchMonitorResponse, type CreateWebhookParameters, type CreateWebsetParameters, type CreateWebsetSearchParameters, type CsvDataInput, type CustomEntity, DEFAULT_GET_CONTENTS_TOOL_DESCRIPTION, DEFAULT_WEB_SEARCH_TOOL_DESCRIPTION, DYNAMIC_HIGHLIGHTS_BETA, type DeepObjectOutputSchema, type DeepOutputSchema, type DeepSearchOutput, type DeepSearchOutputGrounding, type DeepSearchOutputGroundingCitation, type DeepSearchOutputGroundingConfidence, type DeepSearchType, type DeepTextOutputSchema, type Default, type DeletedAgentMonitor, type DeletedAgentRun, type EnrichmentResult, type Entity, type EntityCompanyProperties, type EntityCompanyPropertiesFinancials, type EntityCompanyPropertiesFundingRound, type EntityCompanyPropertiesHeadquarters, type EntityCompanyPropertiesWebTraffic, type EntityCompanyPropertiesWorkforce, type EntityDateRange, type EntityPersonProperties, type EntityPersonPropertiesCompanyRef, type EntityPersonPropertiesWorkHistoryEntry, type Event, EventType, EventsClient, Exa, ExaError, type ExaErrorEnvelope, type ExaToolSpec, type ExtrasOptions, type ExtrasResponse, type FindSimilarOptions, type GetContentsTool, type GetContentsToolConfig, type GetWebsetResponse, type GroundingCitation, type GroundingEntry, type HighlightsContentsOptions, type HighlightsResponse, HttpStatusCode, type Import, ImportFailedReason, ImportFormat, ImportObject, ImportStatus, ImportsClient, type JSONSchema, type ListAgentMonitorChangesParams, type ListAgentMonitorChangesResponse, type ListAgentMonitorEntitiesParams, type ListAgentMonitorEntitiesResponse, type ListAgentMonitorsParams, type ListAgentMonitorsResponse, type ListAgentRunEventsParams, type ListAgentRunEventsResponse, type ListAgentRunsParams, type ListAgentRunsResponse, type ListEventsResponse, type ListImportsResponse, type ListMonitorRunsResponse, type ListMonitorsOptions, type ListMonitorsResponse, type ListResearchRequest, type ListResearchResponse, type ListSearchMonitorRunsParams, type ListSearchMonitorRunsResponse, type ListSearchMonitorsParams, type ListSearchMonitorsResponse, type ListWebhookAttemptsResponse, type ListWebhooksResponse, type ListWebsetItemResponse, type ListWebsetItemsOptions, type ListWebsetsResponse, type LivecrawlOptions, type Monitor, type MonitorBehavior, type MonitorCadence, MonitorObject, type MonitorRun, MonitorRunObject, MonitorRunStatus, MonitorRunType, MonitorStatus, OpenAIResponsesTools, type OpenAIToolMessage, OpenAITools, type PersonEntity, type PreviewWebsetParameters, type PreviewWebsetResponse, type RegularSearchOptions, type RequestOptions, type Research, type ResearchCreateParamsTyped, type ResearchCreateRequest, type ResearchCreateResponse, type ResearchDefinitionEvent, type ResearchEvent, type ResearchOperation, type ResearchOutputEvent, type ResearchPaperEntity, type ResearchPlanDefinitionEvent, type ResearchPlanOperationEvent, type ResearchPlanOutputEvent, type ResearchStatus, type ResearchStreamEvent, type ResearchStreamEventTyped, type ResearchTaskDefinitionEvent, type ResearchTaskOperationEvent, type ResearchTaskOutputEvent, type ResearchTyped, type ResponsesFunctionCallOutput, SEARCH_OBJECTIVE_TOOL_DESCRIPTION, type SearchMonitor, type SearchMonitorRun, type SearchMonitorRunFailReason, type SearchMonitorRunOutput, type SearchMonitorRunStatus, SearchMonitorRunsClient, type SearchMonitorSearch, type SearchMonitorStatus, type SearchMonitorTrigger, type SearchMonitorWebhook, type SearchMonitorWebhookEvent, SearchMonitorsClient, type SearchResponse, type SearchResult, type SearchStreamChunk, type SectionTag, type Status, type SubpagesResponse, type SummaryContentsOptions, type SummaryContentsOptionsTyped, type SummaryResponse, type TextContentsOptions, type TextResponse, type ToolDefinition, type ToolJsonSchema, type ToolNamespace, ToolRegistry, type TriggerSearchMonitorResponse, type UpdateEnrichmentParameters, type UpdateImport, type UpdateMonitor, UpdateMonitorStatus, type UpdateSearchMonitorParams, type UpdateWebhookParameters, type UpdateWebsetRequest, type VerbosityOptions, type WaitUntilCompletedOptions, type WebSearchTool, type WebSearchToolConfig, type Webhook, type WebhookAttempt, WebhookStatus, type Webset, type WebsetEnrichment, WebsetEnrichmentFormat, WebsetEnrichmentStatus, WebsetEnrichmentsClient, WebsetExcludeSource, type WebsetHeadersLike, WebsetImportSource, type WebsetItem, type WebsetItemArticleProperties, type WebsetItemCompanyProperties, type WebsetItemCustomProperties, type WebsetItemEvaluation, WebsetItemEvaluationSatisfied, type WebsetItemPersonProperties, type WebsetItemResearchPaperProperties, WebsetItemSource, WebsetItemsClient, WebsetMonitorsClient, type WebsetSearch, WebsetSearchBehavior, WebsetSearchCanceledReason, WebsetSearchScopeSource, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, createGetContentsTool, createWebSearchTool, Exa as default };
|
|
5673
|
+
export { AGENT_BETA_HEADER, AGENT_MAX_EFFORT_BETA, AGENT_MONITORS_BETA_HEADER, type AddAgentMonitorEntitiesParams, AgentBetaClient, type AgentBetaOptions, type AgentBudget, AgentClient, type AgentConfidence, type AgentCostDollars, type AgentCreateOptions, type AgentDataSource, type AgentDataSourceProvider, type AgentEffort, type AgentError, type AgentEvent, type AgentGroundingCitation, type AgentGroundingEntry, type AgentInput, type AgentMonitor, type AgentMonitorBacktest, type AgentMonitorBacktestContent, type AgentMonitorBacktestEntity, AgentMonitorBacktestFailedError, type AgentMonitorBacktestResult, type AgentMonitorBacktestStatus, type AgentMonitorBacktestWaitOptions, AgentMonitorBacktestsClient, type AgentMonitorChange, type AgentMonitorChangeEntity, type AgentMonitorChangeField, AgentMonitorChangesClient, type AgentMonitorCitation, type AgentMonitorContent, type AgentMonitorCreation, AgentMonitorEntitiesClient, type AgentMonitorEntity, type AgentMonitorEntityView, type AgentMonitorField, type AgentMonitorFieldMode, type AgentMonitorFieldValueType, type AgentMonitorRefresh, type AgentMonitorStatus, type AgentMonitorUsage, type AgentMonitorsBetaOptions, AgentMonitorsClient, type AgentOutput, type AgentRun, AgentRunCancelledError, AgentRunEventsClient, AgentRunFailedError, type AgentRunStatus, type AgentRunTyped, AgentRunsClient, type AgentStopReason, type AgentUsage, type AgentWaitOptions, type AnswerOptions, type AnswerOptionsTyped, type AnswerResponse, type AnswerResponseTyped, type AnswerStreamChunk, type AnswerStreamResponse, type AnthropicToolResult, AnthropicTools, type ApiWarning, type ApiWarningCode, type ApiWarningContext, type ArticleEntity, type BaseSearchOptions, BetaClient, type BetaOptions, type CompanyEntity, type ContentStatusError, type ContentsOptions, type ContentsResultComponent, type ContextOptions, type CostDollars, type CostDollarsContents, type CostDollarsSeearch, type CreateAgentMonitorBacktestParams, type CreateAgentMonitorEntityParams, type CreateAgentMonitorFieldParams, type CreateAgentMonitorOptions, type CreateAgentMonitorParams, type CreateAgentRunParams, type CreateAgentRunParamsTyped, type CreateCriterionParameters, type CreateEnrichmentParameters, CreateEnrichmentParametersFormat, type CreateImportParameters, CreateImportParametersFormat, type CreateImportResponse, type CreateImportWithCsvParameters, type CreateMonitorParameters, type CreateSearchMonitorParams, type CreateSearchMonitorResponse, type CreateWebhookParameters, type CreateWebsetParameters, type CreateWebsetSearchParameters, type CsvDataInput, type CustomEntity, DEFAULT_GET_CONTENTS_TOOL_DESCRIPTION, DEFAULT_WEB_SEARCH_TOOL_DESCRIPTION, DYNAMIC_HIGHLIGHTS_BETA, type DeepObjectOutputSchema, type DeepOutputSchema, type DeepSearchOutput, type DeepSearchOutputGrounding, type DeepSearchOutputGroundingCitation, type DeepSearchOutputGroundingConfidence, type DeepSearchType, type DeepTextOutputSchema, type Default, type DeletedAgentMonitor, type DeletedAgentRun, type EnrichmentResult, type Entity, type EntityCompanyProperties, type EntityCompanyPropertiesFinancials, type EntityCompanyPropertiesFundingRound, type EntityCompanyPropertiesHeadquarters, type EntityCompanyPropertiesWebTraffic, type EntityCompanyPropertiesWorkforce, type EntityDateRange, type EntityPersonProperties, type EntityPersonPropertiesCompanyRef, type EntityPersonPropertiesEducationHistoryEntry, type EntityPersonPropertiesInstitutionRef, type EntityPersonPropertiesNotableWork, type EntityPersonPropertiesResearch, type EntityPersonPropertiesWorkHistoryEntry, type Event, EventType, EventsClient, Exa, ExaAbortError, type ExaClientOptions, ExaError, type ExaErrorEnvelope, ExaTimeoutError, type ExaToolSpec, type ExtrasOptions, type ExtrasResponse, type FindSimilarOptions, type GetContentsTool, type GetContentsToolConfig, type GetWebsetResponse, type GroundingCitation, type GroundingEntry, type HighlightsContentsOptions, type HighlightsResponse, HttpStatusCode, type Import, ImportFailedReason, ImportFormat, ImportObject, ImportStatus, ImportsClient, type JSONSchema, type ListAgentMonitorChangesParams, type ListAgentMonitorChangesResponse, type ListAgentMonitorEntitiesParams, type ListAgentMonitorEntitiesResponse, type ListAgentMonitorsParams, type ListAgentMonitorsResponse, type ListAgentRunEventsParams, type ListAgentRunEventsResponse, type ListAgentRunsParams, type ListAgentRunsResponse, type ListEventsResponse, type ListImportsResponse, type ListMonitorRunsResponse, type ListMonitorsOptions, type ListMonitorsResponse, type ListResearchRequest, type ListResearchResponse, type ListSearchMonitorRunsParams, type ListSearchMonitorRunsResponse, type ListSearchMonitorsParams, type ListSearchMonitorsResponse, type ListWebhookAttemptsResponse, type ListWebhooksResponse, type ListWebsetItemResponse, type ListWebsetItemsOptions, type ListWebsetsResponse, type LivecrawlOptions, type Monitor, type MonitorBehavior, type MonitorCadence, MonitorObject, type MonitorRun, MonitorRunObject, MonitorRunStatus, MonitorRunType, MonitorStatus, OpenAIResponsesTools, type OpenAIToolMessage, OpenAITools, type PersonEntity, type PreviewWebsetParameters, type PreviewWebsetResponse, type RegularSearchOptions, type RequestOptions, type Research, type ResearchCreateParamsTyped, type ResearchCreateRequest, type ResearchCreateResponse, type ResearchDefinitionEvent, type ResearchEvent, type ResearchOperation, type ResearchOutputEvent, type ResearchPaperEntity, type ResearchPlanDefinitionEvent, type ResearchPlanOperationEvent, type ResearchPlanOutputEvent, type ResearchStatus, type ResearchStreamEvent, type ResearchStreamEventTyped, type ResearchTaskDefinitionEvent, type ResearchTaskOperationEvent, type ResearchTaskOutputEvent, type ResearchTyped, type ResponsesFunctionCallOutput, SEARCH_OBJECTIVE_TOOL_DESCRIPTION, type SearchMonitor, type SearchMonitorRun, type SearchMonitorRunFailReason, type SearchMonitorRunOutput, type SearchMonitorRunStatus, SearchMonitorRunsClient, type SearchMonitorSearch, type SearchMonitorStatus, type SearchMonitorTrigger, type SearchMonitorWebhook, type SearchMonitorWebhookEvent, SearchMonitorsClient, type SearchNotice, type SearchNoticeCode, type SearchResponse, type SearchResult, type SearchStreamChunk, type SearchWarning, type SearchWarningCode, type SectionTag, type Status, type SubpagesResponse, type SummaryContentsOptions, type SummaryContentsOptionsTyped, type SummaryResponse, type TextContentsOptions, type TextResponse, type ToolDefinition, type ToolJsonSchema, type ToolNamespace, ToolRegistry, type TransportRequestOptions, type TriggerSearchMonitorResponse, type UpdateEnrichmentParameters, type UpdateImport, type UpdateMonitor, UpdateMonitorStatus, type UpdateSearchMonitorParams, type UpdateWebhookParameters, type UpdateWebsetRequest, type UserIdentifierOptions, type UserLocation, type VerbosityOptions, type WaitUntilCompletedOptions, type WarningsOption, type WebSearchTool, type WebSearchToolConfig, type Webhook, type WebhookAttempt, WebhookStatus, type Webset, type WebsetEnrichment, WebsetEnrichmentFormat, WebsetEnrichmentStatus, WebsetEnrichmentsClient, WebsetExcludeSource, type WebsetHeadersLike, WebsetImportSource, type WebsetItem, type WebsetItemArticleProperties, type WebsetItemCompanyProperties, type WebsetItemCustomProperties, type WebsetItemEvaluation, WebsetItemEvaluationSatisfied, type WebsetItemPersonProperties, type WebsetItemResearchPaperProperties, WebsetItemSource, WebsetItemsClient, WebsetMonitorsClient, type WebsetSearch, WebsetSearchBehavior, WebsetSearchCanceledReason, WebsetSearchScopeSource, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, createGetContentsTool, createWebSearchTool, Exa as default };
|