exa-js 1.8.26 → 1.9.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/dist/index.d.mts +1624 -419
- package/dist/index.d.ts +1624 -419
- package/dist/index.js +86 -82
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +86 -81
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -46,7 +46,7 @@ declare class WebsetsBaseClient {
|
|
|
46
46
|
* @returns The response JSON
|
|
47
47
|
* @throws ExaError with API error details if the request fails
|
|
48
48
|
*/
|
|
49
|
-
protected request<T = unknown>(endpoint: string, method?: string, data?: RequestBody$1, params?: QueryParams$1): Promise<T>;
|
|
49
|
+
protected request<T = unknown>(endpoint: string, method?: string, data?: RequestBody$1, params?: QueryParams$1, headers?: Record<string, string>): Promise<T>;
|
|
50
50
|
/**
|
|
51
51
|
* Helper to build pagination parameters
|
|
52
52
|
* @param pagination The pagination parameters
|
|
@@ -2023,37 +2023,6 @@ declare class WebsetMonitorsClient extends WebsetsBaseClient {
|
|
|
2023
2023
|
delete(id: string): Promise<Monitor>;
|
|
2024
2024
|
}
|
|
2025
2025
|
|
|
2026
|
-
/**
|
|
2027
|
-
* Client for managing Webset Searches
|
|
2028
|
-
*/
|
|
2029
|
-
|
|
2030
|
-
/**
|
|
2031
|
-
* Client for managing Webset Searches
|
|
2032
|
-
*/
|
|
2033
|
-
declare class WebsetSearchesClient extends WebsetsBaseClient {
|
|
2034
|
-
/**
|
|
2035
|
-
* Create a new Search for the Webset
|
|
2036
|
-
* @param websetId The ID of the Webset
|
|
2037
|
-
* @param params The search parameters
|
|
2038
|
-
* @returns The created Webset Search
|
|
2039
|
-
*/
|
|
2040
|
-
create(websetId: string, params: CreateWebsetSearchParameters): Promise<WebsetSearch>;
|
|
2041
|
-
/**
|
|
2042
|
-
* Get a Search by ID
|
|
2043
|
-
* @param websetId The ID of the Webset
|
|
2044
|
-
* @param id The ID of the Search
|
|
2045
|
-
* @returns The Webset Search
|
|
2046
|
-
*/
|
|
2047
|
-
get(websetId: string, id: string): Promise<WebsetSearch>;
|
|
2048
|
-
/**
|
|
2049
|
-
* Cancel a running Search
|
|
2050
|
-
* @param websetId The ID of the Webset
|
|
2051
|
-
* @param id The ID of the Search
|
|
2052
|
-
* @returns The canceled Webset Search
|
|
2053
|
-
*/
|
|
2054
|
-
cancel(websetId: string, id: string): Promise<WebsetSearch>;
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2057
2026
|
/**
|
|
2058
2027
|
* Client for managing Webset Webhooks
|
|
2059
2028
|
*/
|
|
@@ -2146,6 +2115,47 @@ declare class WebsetWebhooksClient extends WebsetsBaseClient {
|
|
|
2146
2115
|
getAllAttempts(id: string, options?: ListWebhookAttemptsOptions): Promise<WebhookAttempt[]>;
|
|
2147
2116
|
}
|
|
2148
2117
|
|
|
2118
|
+
/**
|
|
2119
|
+
* Websets API client
|
|
2120
|
+
*/
|
|
2121
|
+
|
|
2122
|
+
type WebsetHeadersLike = {
|
|
2123
|
+
"x-exa-websets-priority"?: "low" | "medium" | "high";
|
|
2124
|
+
} & Record<string, string>;
|
|
2125
|
+
|
|
2126
|
+
/**
|
|
2127
|
+
* Client for managing Webset Searches
|
|
2128
|
+
*/
|
|
2129
|
+
|
|
2130
|
+
/**
|
|
2131
|
+
* Client for managing Webset Searches
|
|
2132
|
+
*/
|
|
2133
|
+
declare class WebsetSearchesClient extends WebsetsBaseClient {
|
|
2134
|
+
/**
|
|
2135
|
+
* Create a new Search for the Webset
|
|
2136
|
+
* @param websetId The ID of the Webset
|
|
2137
|
+
* @param params The search parameters
|
|
2138
|
+
* @returns The created Webset Search
|
|
2139
|
+
*/
|
|
2140
|
+
create(websetId: string, params: CreateWebsetSearchParameters, options?: {
|
|
2141
|
+
headers?: WebsetHeadersLike;
|
|
2142
|
+
}): Promise<WebsetSearch>;
|
|
2143
|
+
/**
|
|
2144
|
+
* Get a Search by ID
|
|
2145
|
+
* @param websetId The ID of the Webset
|
|
2146
|
+
* @param id The ID of the Search
|
|
2147
|
+
* @returns The Webset Search
|
|
2148
|
+
*/
|
|
2149
|
+
get(websetId: string, id: string): Promise<WebsetSearch>;
|
|
2150
|
+
/**
|
|
2151
|
+
* Cancel a running Search
|
|
2152
|
+
* @param websetId The ID of the Webset
|
|
2153
|
+
* @param id The ID of the Search
|
|
2154
|
+
* @returns The canceled Webset Search
|
|
2155
|
+
*/
|
|
2156
|
+
cancel(websetId: string, id: string): Promise<WebsetSearch>;
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2149
2159
|
/**
|
|
2150
2160
|
* Main client for Websets API
|
|
2151
2161
|
*/
|
|
@@ -2197,7 +2207,9 @@ declare class WebsetsClient extends WebsetsBaseClient {
|
|
|
2197
2207
|
* @param params The Webset creation parameters
|
|
2198
2208
|
* @returns The created Webset
|
|
2199
2209
|
*/
|
|
2200
|
-
create(params: CreateWebsetParameters
|
|
2210
|
+
create(params: CreateWebsetParameters, options?: {
|
|
2211
|
+
headers?: WebsetHeadersLike;
|
|
2212
|
+
}): Promise<Webset>;
|
|
2201
2213
|
/**
|
|
2202
2214
|
* Preview a webset
|
|
2203
2215
|
* @param params The preview parameters
|
|
@@ -2262,439 +2274,1544 @@ declare class WebsetsClient extends WebsetsBaseClient {
|
|
|
2262
2274
|
} | number): Promise<Webset>;
|
|
2263
2275
|
}
|
|
2264
2276
|
|
|
2265
|
-
type QueryParams = Record<string, string | number | boolean | string[] | undefined>;
|
|
2266
|
-
interface RequestBody {
|
|
2267
|
-
[key: string]: unknown;
|
|
2268
|
-
}
|
|
2269
|
-
/**
|
|
2270
|
-
* Base client class for all Research-related API clients
|
|
2271
|
-
*/
|
|
2272
|
-
declare class ResearchBaseClient {
|
|
2273
|
-
protected client: Exa;
|
|
2274
|
-
/**
|
|
2275
|
-
* Initialize a new Research base client
|
|
2276
|
-
* @param client The Exa client instance
|
|
2277
|
-
*/
|
|
2278
|
-
constructor(client: Exa);
|
|
2279
|
-
/**
|
|
2280
|
-
* Make a request to the Research API (prefixes all paths with `/research`).
|
|
2281
|
-
* @param endpoint The endpoint path, beginning with a slash (e.g. "/tasks").
|
|
2282
|
-
* @param method The HTTP method. Defaults to "POST".
|
|
2283
|
-
* @param data Optional request body
|
|
2284
|
-
* @param params Optional query parameters
|
|
2285
|
-
* @returns The parsed JSON response
|
|
2286
|
-
*/
|
|
2287
|
-
protected request<T = unknown>(endpoint: string, method?: string, data?: RequestBody, params?: QueryParams): Promise<T>;
|
|
2288
|
-
/**
|
|
2289
|
-
* Make a request to the Research API (prefixes all paths with `/research`).
|
|
2290
|
-
* @param endpoint The endpoint path, beginning with a slash (e.g. "/tasks").
|
|
2291
|
-
* @param method The HTTP method. Defaults to "POST".
|
|
2292
|
-
* @param data Optional request body
|
|
2293
|
-
* @param params Optional query parameters
|
|
2294
|
-
* @returns The parsed JSON response
|
|
2295
|
-
*/
|
|
2296
|
-
protected rawRequest(endpoint: string, method?: string, data?: RequestBody, params?: QueryParams): Promise<Response>;
|
|
2297
|
-
/**
|
|
2298
|
-
* Helper to build pagination parameters.
|
|
2299
|
-
* @param pagination The pagination parameters
|
|
2300
|
-
* @returns QueryParams object with pagination parameters
|
|
2301
|
-
*/
|
|
2302
|
-
protected buildPaginationParams(pagination?: SchemaListResearchTasksRequestDto): QueryParams;
|
|
2303
|
-
}
|
|
2304
|
-
|
|
2305
|
-
/**
|
|
2306
|
-
* Client for interacting with the Research Tasks API.
|
|
2307
|
-
*/
|
|
2308
|
-
declare class ResearchClient extends ResearchBaseClient {
|
|
2309
|
-
constructor(client: Exa);
|
|
2310
|
-
/**
|
|
2311
|
-
* Create a new research task with Zod schema for strongly typed output
|
|
2312
|
-
*/
|
|
2313
|
-
createTask<T>(params: ResearchCreateTaskParamsTyped<ZodSchema<T>>): Promise<SchemaResearchCreateTaskResponseDto>;
|
|
2314
|
-
/**
|
|
2315
|
-
* Create a new research task.
|
|
2316
|
-
*
|
|
2317
|
-
* @param params Object containing:
|
|
2318
|
-
* - model: The research model to use (e.g., ResearchModel.ExaResearch).
|
|
2319
|
-
* - instructions: High-level guidance for the research agent.
|
|
2320
|
-
* - output: An object with a `schema` property (JSONSchema) that defines the expected output structure.
|
|
2321
|
-
*
|
|
2322
|
-
* @returns An object containing the unique ID of the created research task.
|
|
2323
|
-
*/
|
|
2324
|
-
createTask(params: {
|
|
2325
|
-
instructions: string;
|
|
2326
|
-
model?: "exa-research" | "exa-research-pro";
|
|
2327
|
-
output?: {
|
|
2328
|
-
inferSchema?: boolean;
|
|
2329
|
-
schema?: JSONSchema;
|
|
2330
|
-
};
|
|
2331
|
-
}): Promise<SchemaResearchCreateTaskResponseDto>;
|
|
2332
|
-
/**
|
|
2333
|
-
* Retrieve a research task by ID.
|
|
2334
|
-
*
|
|
2335
|
-
* Overloads:
|
|
2336
|
-
* - getTask(id)
|
|
2337
|
-
* - getTask(id, {stream: false})
|
|
2338
|
-
* => Promise<ResearchTask>
|
|
2339
|
-
* - getTask(id, {stream: true})
|
|
2340
|
-
* => AsyncGenerator<ResearchTaskEvent>
|
|
2341
|
-
*/
|
|
2342
|
-
getTask(id: string): Promise<SchemaResearchTaskDto>;
|
|
2343
|
-
getTask(id: string, options: {
|
|
2344
|
-
stream?: false;
|
|
2345
|
-
}): Promise<SchemaResearchTaskDto>;
|
|
2346
|
-
getTask(id: string, options: {
|
|
2347
|
-
stream: true;
|
|
2348
|
-
}): Promise<AsyncGenerator<ResearchTaskEvent, any, any>>;
|
|
2349
|
-
/**
|
|
2350
|
-
* @deprecated This method is deprecated and may be removed in a future release.
|
|
2351
|
-
* @see getTask(id, {stream: true})
|
|
2352
|
-
* Poll a research task until completion or failure.
|
|
2353
|
-
* Polls every 1 second with a maximum timeout of 10 minutes.
|
|
2354
|
-
* Resilient to up to 10 consecutive polling failures.
|
|
2355
|
-
*/
|
|
2356
|
-
pollTask(id: string): Promise<SchemaResearchTaskDto>;
|
|
2357
|
-
/**
|
|
2358
|
-
* List research tasks
|
|
2359
|
-
* @param options Pagination options
|
|
2360
|
-
* @returns The paginated list of research tasks
|
|
2361
|
-
*/
|
|
2362
|
-
listTasks(options?: SchemaListResearchTasksRequestDto): Promise<SchemaListResearchTasksResponseDto>;
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
2277
|
interface components {
|
|
2366
2278
|
schemas: {
|
|
2367
|
-
|
|
2368
|
-
/** @description The
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2279
|
+
ListResearchResponseDto: {
|
|
2280
|
+
/** @description The list of research requests */
|
|
2281
|
+
data: ({
|
|
2282
|
+
/** @description Milliseconds since epoch time */
|
|
2283
|
+
createdAt: number;
|
|
2284
|
+
/** @description The instructions given to this research request */
|
|
2285
|
+
instructions: string;
|
|
2286
|
+
/**
|
|
2287
|
+
* @description The model used for the research request
|
|
2288
|
+
* @default exa-research
|
|
2289
|
+
* @enum {string}
|
|
2290
|
+
*/
|
|
2291
|
+
model: "exa-research" | "exa-research-pro";
|
|
2292
|
+
/** @description The unique identifier for the research request */
|
|
2293
|
+
researchId: string;
|
|
2294
|
+
/** @enum {string} */
|
|
2295
|
+
status: "pending";
|
|
2296
|
+
} | {
|
|
2297
|
+
/** @description Milliseconds since epoch time */
|
|
2298
|
+
createdAt: number;
|
|
2299
|
+
events?: (({
|
|
2300
|
+
/** @description Milliseconds since epoch time */
|
|
2301
|
+
createdAt: number;
|
|
2302
|
+
/** @enum {string} */
|
|
2303
|
+
eventType: "research-definition";
|
|
2304
|
+
instructions: string;
|
|
2305
|
+
outputSchema?: {
|
|
2306
|
+
[key: string]: unknown;
|
|
2307
|
+
};
|
|
2308
|
+
researchId: string;
|
|
2309
|
+
} | {
|
|
2310
|
+
/** @description Milliseconds since epoch time */
|
|
2311
|
+
createdAt: number;
|
|
2312
|
+
/** @enum {string} */
|
|
2313
|
+
eventType: "research-output";
|
|
2314
|
+
output: {
|
|
2315
|
+
content: string;
|
|
2316
|
+
costDollars: {
|
|
2317
|
+
numPages: number;
|
|
2318
|
+
numSearches: number;
|
|
2319
|
+
reasoningTokens: number;
|
|
2320
|
+
total: number;
|
|
2321
|
+
};
|
|
2322
|
+
/** @enum {string} */
|
|
2323
|
+
outputType: "completed";
|
|
2324
|
+
parsed?: {
|
|
2325
|
+
[key: string]: unknown;
|
|
2326
|
+
};
|
|
2327
|
+
} | {
|
|
2328
|
+
error: string;
|
|
2329
|
+
/** @enum {string} */
|
|
2330
|
+
outputType: "failed";
|
|
2331
|
+
};
|
|
2332
|
+
researchId: string;
|
|
2333
|
+
}) | ({
|
|
2334
|
+
/** @description Milliseconds since epoch time */
|
|
2335
|
+
createdAt: number;
|
|
2336
|
+
/** @enum {string} */
|
|
2337
|
+
eventType: "plan-definition";
|
|
2338
|
+
planId: string;
|
|
2339
|
+
researchId: string;
|
|
2340
|
+
} | {
|
|
2341
|
+
/** @description Milliseconds since epoch time */
|
|
2342
|
+
createdAt: number;
|
|
2343
|
+
data: {
|
|
2344
|
+
content: string;
|
|
2345
|
+
/** @enum {string} */
|
|
2346
|
+
type: "think";
|
|
2347
|
+
} | {
|
|
2348
|
+
goal?: string;
|
|
2349
|
+
pageTokens: number;
|
|
2350
|
+
query: string;
|
|
2351
|
+
results: {
|
|
2352
|
+
url: string;
|
|
2353
|
+
}[];
|
|
2354
|
+
/** @enum {string} */
|
|
2355
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
2356
|
+
/** @enum {string} */
|
|
2357
|
+
type: "search";
|
|
2358
|
+
} | {
|
|
2359
|
+
goal?: string;
|
|
2360
|
+
pageTokens: number;
|
|
2361
|
+
result: {
|
|
2362
|
+
url: string;
|
|
2363
|
+
};
|
|
2364
|
+
/** @enum {string} */
|
|
2365
|
+
type: "crawl";
|
|
2366
|
+
};
|
|
2367
|
+
/** @enum {string} */
|
|
2368
|
+
eventType: "plan-operation";
|
|
2369
|
+
operationId: string;
|
|
2370
|
+
planId: string;
|
|
2371
|
+
researchId: string;
|
|
2372
|
+
} | {
|
|
2373
|
+
/** @description Milliseconds since epoch time */
|
|
2374
|
+
createdAt: number;
|
|
2375
|
+
/** @enum {string} */
|
|
2376
|
+
eventType: "plan-output";
|
|
2377
|
+
output: {
|
|
2378
|
+
/** @enum {string} */
|
|
2379
|
+
outputType: "tasks";
|
|
2380
|
+
reasoning: string;
|
|
2381
|
+
tasksInstructions: string[];
|
|
2382
|
+
} | {
|
|
2383
|
+
/** @enum {string} */
|
|
2384
|
+
outputType: "stop";
|
|
2385
|
+
reasoning: string;
|
|
2386
|
+
};
|
|
2387
|
+
planId: string;
|
|
2388
|
+
researchId: string;
|
|
2389
|
+
}) | ({
|
|
2390
|
+
/** @description Milliseconds since epoch time */
|
|
2391
|
+
createdAt: number;
|
|
2392
|
+
/** @enum {string} */
|
|
2393
|
+
eventType: "task-definition";
|
|
2394
|
+
instructions: string;
|
|
2395
|
+
planId: string;
|
|
2396
|
+
researchId: string;
|
|
2397
|
+
taskId: string;
|
|
2398
|
+
} | {
|
|
2399
|
+
/** @description Milliseconds since epoch time */
|
|
2400
|
+
createdAt: number;
|
|
2401
|
+
data: {
|
|
2402
|
+
content: string;
|
|
2403
|
+
/** @enum {string} */
|
|
2404
|
+
type: "think";
|
|
2405
|
+
} | {
|
|
2406
|
+
goal?: string;
|
|
2407
|
+
pageTokens: number;
|
|
2408
|
+
query: string;
|
|
2409
|
+
results: {
|
|
2410
|
+
url: string;
|
|
2411
|
+
}[];
|
|
2412
|
+
/** @enum {string} */
|
|
2413
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
2414
|
+
/** @enum {string} */
|
|
2415
|
+
type: "search";
|
|
2416
|
+
} | {
|
|
2417
|
+
goal?: string;
|
|
2418
|
+
pageTokens: number;
|
|
2419
|
+
result: {
|
|
2420
|
+
url: string;
|
|
2421
|
+
};
|
|
2422
|
+
/** @enum {string} */
|
|
2423
|
+
type: "crawl";
|
|
2424
|
+
};
|
|
2425
|
+
/** @enum {string} */
|
|
2426
|
+
eventType: "task-operation";
|
|
2427
|
+
operationId: string;
|
|
2428
|
+
planId: string;
|
|
2429
|
+
researchId: string;
|
|
2430
|
+
taskId: string;
|
|
2431
|
+
} | {
|
|
2432
|
+
/** @description Milliseconds since epoch time */
|
|
2433
|
+
createdAt: number;
|
|
2434
|
+
/** @enum {string} */
|
|
2435
|
+
eventType: "task-output";
|
|
2436
|
+
output: {
|
|
2437
|
+
content: string;
|
|
2438
|
+
/** @enum {string} */
|
|
2439
|
+
outputType: "completed";
|
|
2440
|
+
};
|
|
2441
|
+
planId: string;
|
|
2442
|
+
researchId: string;
|
|
2443
|
+
taskId: string;
|
|
2444
|
+
}))[];
|
|
2445
|
+
/** @description The instructions given to this research request */
|
|
2446
|
+
instructions: string;
|
|
2447
|
+
/**
|
|
2448
|
+
* @description The model used for the research request
|
|
2449
|
+
* @default exa-research
|
|
2450
|
+
* @enum {string}
|
|
2451
|
+
*/
|
|
2452
|
+
model: "exa-research" | "exa-research-pro";
|
|
2453
|
+
/** @description The unique identifier for the research request */
|
|
2454
|
+
researchId: string;
|
|
2455
|
+
/** @enum {string} */
|
|
2456
|
+
status: "running";
|
|
2457
|
+
} | {
|
|
2458
|
+
costDollars: {
|
|
2459
|
+
numPages: number;
|
|
2460
|
+
numSearches: number;
|
|
2461
|
+
reasoningTokens: number;
|
|
2462
|
+
total: number;
|
|
2463
|
+
};
|
|
2464
|
+
/** @description Milliseconds since epoch time */
|
|
2465
|
+
createdAt: number;
|
|
2466
|
+
events?: (({
|
|
2467
|
+
/** @description Milliseconds since epoch time */
|
|
2468
|
+
createdAt: number;
|
|
2469
|
+
/** @enum {string} */
|
|
2470
|
+
eventType: "research-definition";
|
|
2471
|
+
instructions: string;
|
|
2472
|
+
outputSchema?: {
|
|
2473
|
+
[key: string]: unknown;
|
|
2474
|
+
};
|
|
2475
|
+
researchId: string;
|
|
2476
|
+
} | {
|
|
2477
|
+
/** @description Milliseconds since epoch time */
|
|
2478
|
+
createdAt: number;
|
|
2479
|
+
/** @enum {string} */
|
|
2480
|
+
eventType: "research-output";
|
|
2481
|
+
output: {
|
|
2482
|
+
content: string;
|
|
2483
|
+
costDollars: {
|
|
2484
|
+
numPages: number;
|
|
2485
|
+
numSearches: number;
|
|
2486
|
+
reasoningTokens: number;
|
|
2487
|
+
total: number;
|
|
2488
|
+
};
|
|
2489
|
+
/** @enum {string} */
|
|
2490
|
+
outputType: "completed";
|
|
2491
|
+
parsed?: {
|
|
2492
|
+
[key: string]: unknown;
|
|
2493
|
+
};
|
|
2494
|
+
} | {
|
|
2495
|
+
error: string;
|
|
2496
|
+
/** @enum {string} */
|
|
2497
|
+
outputType: "failed";
|
|
2498
|
+
};
|
|
2499
|
+
researchId: string;
|
|
2500
|
+
}) | ({
|
|
2501
|
+
/** @description Milliseconds since epoch time */
|
|
2502
|
+
createdAt: number;
|
|
2503
|
+
/** @enum {string} */
|
|
2504
|
+
eventType: "plan-definition";
|
|
2505
|
+
planId: string;
|
|
2506
|
+
researchId: string;
|
|
2507
|
+
} | {
|
|
2508
|
+
/** @description Milliseconds since epoch time */
|
|
2509
|
+
createdAt: number;
|
|
2510
|
+
data: {
|
|
2511
|
+
content: string;
|
|
2512
|
+
/** @enum {string} */
|
|
2513
|
+
type: "think";
|
|
2514
|
+
} | {
|
|
2515
|
+
goal?: string;
|
|
2516
|
+
pageTokens: number;
|
|
2517
|
+
query: string;
|
|
2518
|
+
results: {
|
|
2519
|
+
url: string;
|
|
2520
|
+
}[];
|
|
2521
|
+
/** @enum {string} */
|
|
2522
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
2523
|
+
/** @enum {string} */
|
|
2524
|
+
type: "search";
|
|
2525
|
+
} | {
|
|
2526
|
+
goal?: string;
|
|
2527
|
+
pageTokens: number;
|
|
2528
|
+
result: {
|
|
2529
|
+
url: string;
|
|
2530
|
+
};
|
|
2531
|
+
/** @enum {string} */
|
|
2532
|
+
type: "crawl";
|
|
2533
|
+
};
|
|
2534
|
+
/** @enum {string} */
|
|
2535
|
+
eventType: "plan-operation";
|
|
2536
|
+
operationId: string;
|
|
2537
|
+
planId: string;
|
|
2538
|
+
researchId: string;
|
|
2539
|
+
} | {
|
|
2540
|
+
/** @description Milliseconds since epoch time */
|
|
2541
|
+
createdAt: number;
|
|
2542
|
+
/** @enum {string} */
|
|
2543
|
+
eventType: "plan-output";
|
|
2544
|
+
output: {
|
|
2545
|
+
/** @enum {string} */
|
|
2546
|
+
outputType: "tasks";
|
|
2547
|
+
reasoning: string;
|
|
2548
|
+
tasksInstructions: string[];
|
|
2549
|
+
} | {
|
|
2550
|
+
/** @enum {string} */
|
|
2551
|
+
outputType: "stop";
|
|
2552
|
+
reasoning: string;
|
|
2553
|
+
};
|
|
2554
|
+
planId: string;
|
|
2555
|
+
researchId: string;
|
|
2556
|
+
}) | ({
|
|
2557
|
+
/** @description Milliseconds since epoch time */
|
|
2558
|
+
createdAt: number;
|
|
2559
|
+
/** @enum {string} */
|
|
2560
|
+
eventType: "task-definition";
|
|
2561
|
+
instructions: string;
|
|
2562
|
+
planId: string;
|
|
2563
|
+
researchId: string;
|
|
2564
|
+
taskId: string;
|
|
2565
|
+
} | {
|
|
2566
|
+
/** @description Milliseconds since epoch time */
|
|
2567
|
+
createdAt: number;
|
|
2568
|
+
data: {
|
|
2569
|
+
content: string;
|
|
2570
|
+
/** @enum {string} */
|
|
2571
|
+
type: "think";
|
|
2572
|
+
} | {
|
|
2573
|
+
goal?: string;
|
|
2574
|
+
pageTokens: number;
|
|
2575
|
+
query: string;
|
|
2576
|
+
results: {
|
|
2577
|
+
url: string;
|
|
2578
|
+
}[];
|
|
2579
|
+
/** @enum {string} */
|
|
2580
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
2581
|
+
/** @enum {string} */
|
|
2582
|
+
type: "search";
|
|
2583
|
+
} | {
|
|
2584
|
+
goal?: string;
|
|
2585
|
+
pageTokens: number;
|
|
2586
|
+
result: {
|
|
2587
|
+
url: string;
|
|
2588
|
+
};
|
|
2589
|
+
/** @enum {string} */
|
|
2590
|
+
type: "crawl";
|
|
2591
|
+
};
|
|
2592
|
+
/** @enum {string} */
|
|
2593
|
+
eventType: "task-operation";
|
|
2594
|
+
operationId: string;
|
|
2595
|
+
planId: string;
|
|
2596
|
+
researchId: string;
|
|
2597
|
+
taskId: string;
|
|
2598
|
+
} | {
|
|
2599
|
+
/** @description Milliseconds since epoch time */
|
|
2600
|
+
createdAt: number;
|
|
2601
|
+
/** @enum {string} */
|
|
2602
|
+
eventType: "task-output";
|
|
2603
|
+
output: {
|
|
2604
|
+
content: string;
|
|
2605
|
+
/** @enum {string} */
|
|
2606
|
+
outputType: "completed";
|
|
2607
|
+
};
|
|
2608
|
+
planId: string;
|
|
2609
|
+
researchId: string;
|
|
2610
|
+
taskId: string;
|
|
2611
|
+
}))[];
|
|
2612
|
+
/** @description The instructions given to this research request */
|
|
2613
|
+
instructions: string;
|
|
2614
|
+
/**
|
|
2615
|
+
* @description The model used for the research request
|
|
2616
|
+
* @default exa-research
|
|
2617
|
+
* @enum {string}
|
|
2618
|
+
*/
|
|
2619
|
+
model: "exa-research" | "exa-research-pro";
|
|
2620
|
+
output: {
|
|
2621
|
+
content: string;
|
|
2622
|
+
parsed?: {
|
|
2623
|
+
[key: string]: unknown;
|
|
2624
|
+
};
|
|
2625
|
+
};
|
|
2626
|
+
/** @description The unique identifier for the research request */
|
|
2627
|
+
researchId: string;
|
|
2628
|
+
/** @enum {string} */
|
|
2629
|
+
status: "completed";
|
|
2630
|
+
} | {
|
|
2631
|
+
/** @description Milliseconds since epoch time */
|
|
2632
|
+
createdAt: number;
|
|
2633
|
+
events?: (({
|
|
2634
|
+
/** @description Milliseconds since epoch time */
|
|
2635
|
+
createdAt: number;
|
|
2636
|
+
/** @enum {string} */
|
|
2637
|
+
eventType: "research-definition";
|
|
2638
|
+
instructions: string;
|
|
2639
|
+
outputSchema?: {
|
|
2640
|
+
[key: string]: unknown;
|
|
2641
|
+
};
|
|
2642
|
+
researchId: string;
|
|
2643
|
+
} | {
|
|
2644
|
+
/** @description Milliseconds since epoch time */
|
|
2645
|
+
createdAt: number;
|
|
2646
|
+
/** @enum {string} */
|
|
2647
|
+
eventType: "research-output";
|
|
2648
|
+
output: {
|
|
2649
|
+
content: string;
|
|
2650
|
+
costDollars: {
|
|
2651
|
+
numPages: number;
|
|
2652
|
+
numSearches: number;
|
|
2653
|
+
reasoningTokens: number;
|
|
2654
|
+
total: number;
|
|
2655
|
+
};
|
|
2656
|
+
/** @enum {string} */
|
|
2657
|
+
outputType: "completed";
|
|
2658
|
+
parsed?: {
|
|
2659
|
+
[key: string]: unknown;
|
|
2660
|
+
};
|
|
2661
|
+
} | {
|
|
2662
|
+
error: string;
|
|
2663
|
+
/** @enum {string} */
|
|
2664
|
+
outputType: "failed";
|
|
2665
|
+
};
|
|
2666
|
+
researchId: string;
|
|
2667
|
+
}) | ({
|
|
2668
|
+
/** @description Milliseconds since epoch time */
|
|
2669
|
+
createdAt: number;
|
|
2670
|
+
/** @enum {string} */
|
|
2671
|
+
eventType: "plan-definition";
|
|
2672
|
+
planId: string;
|
|
2673
|
+
researchId: string;
|
|
2674
|
+
} | {
|
|
2675
|
+
/** @description Milliseconds since epoch time */
|
|
2676
|
+
createdAt: number;
|
|
2677
|
+
data: {
|
|
2678
|
+
content: string;
|
|
2679
|
+
/** @enum {string} */
|
|
2680
|
+
type: "think";
|
|
2681
|
+
} | {
|
|
2682
|
+
goal?: string;
|
|
2683
|
+
pageTokens: number;
|
|
2684
|
+
query: string;
|
|
2685
|
+
results: {
|
|
2686
|
+
url: string;
|
|
2687
|
+
}[];
|
|
2688
|
+
/** @enum {string} */
|
|
2689
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
2690
|
+
/** @enum {string} */
|
|
2691
|
+
type: "search";
|
|
2692
|
+
} | {
|
|
2693
|
+
goal?: string;
|
|
2694
|
+
pageTokens: number;
|
|
2695
|
+
result: {
|
|
2696
|
+
url: string;
|
|
2697
|
+
};
|
|
2698
|
+
/** @enum {string} */
|
|
2699
|
+
type: "crawl";
|
|
2700
|
+
};
|
|
2701
|
+
/** @enum {string} */
|
|
2702
|
+
eventType: "plan-operation";
|
|
2703
|
+
operationId: string;
|
|
2704
|
+
planId: string;
|
|
2705
|
+
researchId: string;
|
|
2706
|
+
} | {
|
|
2707
|
+
/** @description Milliseconds since epoch time */
|
|
2708
|
+
createdAt: number;
|
|
2709
|
+
/** @enum {string} */
|
|
2710
|
+
eventType: "plan-output";
|
|
2711
|
+
output: {
|
|
2712
|
+
/** @enum {string} */
|
|
2713
|
+
outputType: "tasks";
|
|
2714
|
+
reasoning: string;
|
|
2715
|
+
tasksInstructions: string[];
|
|
2716
|
+
} | {
|
|
2717
|
+
/** @enum {string} */
|
|
2718
|
+
outputType: "stop";
|
|
2719
|
+
reasoning: string;
|
|
2720
|
+
};
|
|
2721
|
+
planId: string;
|
|
2722
|
+
researchId: string;
|
|
2723
|
+
}) | ({
|
|
2724
|
+
/** @description Milliseconds since epoch time */
|
|
2725
|
+
createdAt: number;
|
|
2726
|
+
/** @enum {string} */
|
|
2727
|
+
eventType: "task-definition";
|
|
2728
|
+
instructions: string;
|
|
2729
|
+
planId: string;
|
|
2730
|
+
researchId: string;
|
|
2731
|
+
taskId: string;
|
|
2732
|
+
} | {
|
|
2733
|
+
/** @description Milliseconds since epoch time */
|
|
2734
|
+
createdAt: number;
|
|
2735
|
+
data: {
|
|
2736
|
+
content: string;
|
|
2737
|
+
/** @enum {string} */
|
|
2738
|
+
type: "think";
|
|
2739
|
+
} | {
|
|
2740
|
+
goal?: string;
|
|
2741
|
+
pageTokens: number;
|
|
2742
|
+
query: string;
|
|
2743
|
+
results: {
|
|
2744
|
+
url: string;
|
|
2745
|
+
}[];
|
|
2746
|
+
/** @enum {string} */
|
|
2747
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
2748
|
+
/** @enum {string} */
|
|
2749
|
+
type: "search";
|
|
2750
|
+
} | {
|
|
2751
|
+
goal?: string;
|
|
2752
|
+
pageTokens: number;
|
|
2753
|
+
result: {
|
|
2754
|
+
url: string;
|
|
2755
|
+
};
|
|
2756
|
+
/** @enum {string} */
|
|
2757
|
+
type: "crawl";
|
|
2758
|
+
};
|
|
2759
|
+
/** @enum {string} */
|
|
2760
|
+
eventType: "task-operation";
|
|
2761
|
+
operationId: string;
|
|
2762
|
+
planId: string;
|
|
2763
|
+
researchId: string;
|
|
2764
|
+
taskId: string;
|
|
2765
|
+
} | {
|
|
2766
|
+
/** @description Milliseconds since epoch time */
|
|
2767
|
+
createdAt: number;
|
|
2768
|
+
/** @enum {string} */
|
|
2769
|
+
eventType: "task-output";
|
|
2770
|
+
output: {
|
|
2771
|
+
content: string;
|
|
2772
|
+
/** @enum {string} */
|
|
2773
|
+
outputType: "completed";
|
|
2774
|
+
};
|
|
2775
|
+
planId: string;
|
|
2776
|
+
researchId: string;
|
|
2777
|
+
taskId: string;
|
|
2778
|
+
}))[];
|
|
2779
|
+
/** @description The instructions given to this research request */
|
|
2780
|
+
instructions: string;
|
|
2781
|
+
/**
|
|
2782
|
+
* @description The model used for the research request
|
|
2783
|
+
* @default exa-research
|
|
2784
|
+
* @enum {string}
|
|
2785
|
+
*/
|
|
2786
|
+
model: "exa-research" | "exa-research-pro";
|
|
2787
|
+
/** @description The unique identifier for the research request */
|
|
2788
|
+
researchId: string;
|
|
2789
|
+
/** @enum {string} */
|
|
2790
|
+
status: "canceled";
|
|
2791
|
+
} | {
|
|
2792
|
+
/** @description Milliseconds since epoch time */
|
|
2793
|
+
createdAt: number;
|
|
2794
|
+
/** @description A message indicating why the request failed */
|
|
2795
|
+
error: string;
|
|
2796
|
+
events?: (({
|
|
2797
|
+
/** @description Milliseconds since epoch time */
|
|
2798
|
+
createdAt: number;
|
|
2799
|
+
/** @enum {string} */
|
|
2800
|
+
eventType: "research-definition";
|
|
2801
|
+
instructions: string;
|
|
2802
|
+
outputSchema?: {
|
|
2803
|
+
[key: string]: unknown;
|
|
2804
|
+
};
|
|
2805
|
+
researchId: string;
|
|
2806
|
+
} | {
|
|
2807
|
+
/** @description Milliseconds since epoch time */
|
|
2808
|
+
createdAt: number;
|
|
2809
|
+
/** @enum {string} */
|
|
2810
|
+
eventType: "research-output";
|
|
2811
|
+
output: {
|
|
2812
|
+
content: string;
|
|
2813
|
+
costDollars: {
|
|
2814
|
+
numPages: number;
|
|
2815
|
+
numSearches: number;
|
|
2816
|
+
reasoningTokens: number;
|
|
2817
|
+
total: number;
|
|
2818
|
+
};
|
|
2819
|
+
/** @enum {string} */
|
|
2820
|
+
outputType: "completed";
|
|
2821
|
+
parsed?: {
|
|
2822
|
+
[key: string]: unknown;
|
|
2823
|
+
};
|
|
2824
|
+
} | {
|
|
2825
|
+
error: string;
|
|
2826
|
+
/** @enum {string} */
|
|
2827
|
+
outputType: "failed";
|
|
2828
|
+
};
|
|
2829
|
+
researchId: string;
|
|
2830
|
+
}) | ({
|
|
2831
|
+
/** @description Milliseconds since epoch time */
|
|
2832
|
+
createdAt: number;
|
|
2833
|
+
/** @enum {string} */
|
|
2834
|
+
eventType: "plan-definition";
|
|
2835
|
+
planId: string;
|
|
2836
|
+
researchId: string;
|
|
2837
|
+
} | {
|
|
2838
|
+
/** @description Milliseconds since epoch time */
|
|
2839
|
+
createdAt: number;
|
|
2840
|
+
data: {
|
|
2841
|
+
content: string;
|
|
2842
|
+
/** @enum {string} */
|
|
2843
|
+
type: "think";
|
|
2844
|
+
} | {
|
|
2845
|
+
goal?: string;
|
|
2846
|
+
pageTokens: number;
|
|
2847
|
+
query: string;
|
|
2848
|
+
results: {
|
|
2849
|
+
url: string;
|
|
2850
|
+
}[];
|
|
2851
|
+
/** @enum {string} */
|
|
2852
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
2853
|
+
/** @enum {string} */
|
|
2854
|
+
type: "search";
|
|
2855
|
+
} | {
|
|
2856
|
+
goal?: string;
|
|
2857
|
+
pageTokens: number;
|
|
2858
|
+
result: {
|
|
2859
|
+
url: string;
|
|
2860
|
+
};
|
|
2861
|
+
/** @enum {string} */
|
|
2862
|
+
type: "crawl";
|
|
2863
|
+
};
|
|
2864
|
+
/** @enum {string} */
|
|
2865
|
+
eventType: "plan-operation";
|
|
2866
|
+
operationId: string;
|
|
2867
|
+
planId: string;
|
|
2868
|
+
researchId: string;
|
|
2869
|
+
} | {
|
|
2870
|
+
/** @description Milliseconds since epoch time */
|
|
2871
|
+
createdAt: number;
|
|
2872
|
+
/** @enum {string} */
|
|
2873
|
+
eventType: "plan-output";
|
|
2874
|
+
output: {
|
|
2875
|
+
/** @enum {string} */
|
|
2876
|
+
outputType: "tasks";
|
|
2877
|
+
reasoning: string;
|
|
2878
|
+
tasksInstructions: string[];
|
|
2879
|
+
} | {
|
|
2880
|
+
/** @enum {string} */
|
|
2881
|
+
outputType: "stop";
|
|
2882
|
+
reasoning: string;
|
|
2883
|
+
};
|
|
2884
|
+
planId: string;
|
|
2885
|
+
researchId: string;
|
|
2886
|
+
}) | ({
|
|
2887
|
+
/** @description Milliseconds since epoch time */
|
|
2888
|
+
createdAt: number;
|
|
2889
|
+
/** @enum {string} */
|
|
2890
|
+
eventType: "task-definition";
|
|
2891
|
+
instructions: string;
|
|
2892
|
+
planId: string;
|
|
2893
|
+
researchId: string;
|
|
2894
|
+
taskId: string;
|
|
2895
|
+
} | {
|
|
2896
|
+
/** @description Milliseconds since epoch time */
|
|
2897
|
+
createdAt: number;
|
|
2898
|
+
data: {
|
|
2899
|
+
content: string;
|
|
2900
|
+
/** @enum {string} */
|
|
2901
|
+
type: "think";
|
|
2902
|
+
} | {
|
|
2903
|
+
goal?: string;
|
|
2904
|
+
pageTokens: number;
|
|
2905
|
+
query: string;
|
|
2906
|
+
results: {
|
|
2907
|
+
url: string;
|
|
2908
|
+
}[];
|
|
2909
|
+
/** @enum {string} */
|
|
2910
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
2911
|
+
/** @enum {string} */
|
|
2912
|
+
type: "search";
|
|
2913
|
+
} | {
|
|
2914
|
+
goal?: string;
|
|
2915
|
+
pageTokens: number;
|
|
2916
|
+
result: {
|
|
2917
|
+
url: string;
|
|
2918
|
+
};
|
|
2919
|
+
/** @enum {string} */
|
|
2920
|
+
type: "crawl";
|
|
2921
|
+
};
|
|
2922
|
+
/** @enum {string} */
|
|
2923
|
+
eventType: "task-operation";
|
|
2924
|
+
operationId: string;
|
|
2925
|
+
planId: string;
|
|
2926
|
+
researchId: string;
|
|
2927
|
+
taskId: string;
|
|
2928
|
+
} | {
|
|
2929
|
+
/** @description Milliseconds since epoch time */
|
|
2930
|
+
createdAt: number;
|
|
2931
|
+
/** @enum {string} */
|
|
2932
|
+
eventType: "task-output";
|
|
2933
|
+
output: {
|
|
2934
|
+
content: string;
|
|
2935
|
+
/** @enum {string} */
|
|
2936
|
+
outputType: "completed";
|
|
2937
|
+
};
|
|
2938
|
+
planId: string;
|
|
2939
|
+
researchId: string;
|
|
2940
|
+
taskId: string;
|
|
2941
|
+
}))[];
|
|
2942
|
+
/** @description The instructions given to this research request */
|
|
2943
|
+
instructions: string;
|
|
2944
|
+
/**
|
|
2945
|
+
* @description The model used for the research request
|
|
2946
|
+
* @default exa-research
|
|
2947
|
+
* @enum {string}
|
|
2948
|
+
*/
|
|
2949
|
+
model: "exa-research" | "exa-research-pro";
|
|
2950
|
+
/** @description The unique identifier for the research request */
|
|
2951
|
+
researchId: string;
|
|
2952
|
+
/** @enum {string} */
|
|
2953
|
+
status: "failed";
|
|
2954
|
+
})[];
|
|
2379
2955
|
/** @description Whether there are more results to paginate through */
|
|
2380
2956
|
hasMore: boolean;
|
|
2381
2957
|
/** @description The cursor to paginate through the next set of results */
|
|
2382
2958
|
nextCursor: string | null;
|
|
2383
2959
|
};
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
instructions
|
|
2387
|
-
/**
|
|
2960
|
+
ResearchCreateRequestDtoClass: {
|
|
2961
|
+
/** @description Instructions for what research should be conducted */
|
|
2962
|
+
instructions: string;
|
|
2963
|
+
/**
|
|
2964
|
+
* @default exa-research
|
|
2965
|
+
* @enum {string}
|
|
2966
|
+
*/
|
|
2967
|
+
model: "exa-research" | "exa-research-pro";
|
|
2968
|
+
outputSchema?: {
|
|
2969
|
+
[key: string]: unknown;
|
|
2970
|
+
};
|
|
2971
|
+
};
|
|
2972
|
+
ResearchDtoClass: {
|
|
2973
|
+
/** @description Milliseconds since epoch time */
|
|
2974
|
+
createdAt: number;
|
|
2975
|
+
/** @description The instructions given to this research request */
|
|
2976
|
+
instructions: string;
|
|
2977
|
+
/**
|
|
2978
|
+
* @description The model used for the research request
|
|
2979
|
+
* @default exa-research
|
|
2980
|
+
* @enum {string}
|
|
2981
|
+
*/
|
|
2982
|
+
model: "exa-research" | "exa-research-pro";
|
|
2983
|
+
/** @description The unique identifier for the research request */
|
|
2984
|
+
researchId: string;
|
|
2985
|
+
/** @enum {string} */
|
|
2986
|
+
status: "pending";
|
|
2987
|
+
} | {
|
|
2988
|
+
/** @description Milliseconds since epoch time */
|
|
2989
|
+
createdAt: number;
|
|
2990
|
+
events?: (({
|
|
2991
|
+
/** @description Milliseconds since epoch time */
|
|
2992
|
+
createdAt: number;
|
|
2993
|
+
/** @enum {string} */
|
|
2994
|
+
eventType: "research-definition";
|
|
2995
|
+
instructions: string;
|
|
2996
|
+
outputSchema?: {
|
|
2997
|
+
[key: string]: unknown;
|
|
2998
|
+
};
|
|
2999
|
+
researchId: string;
|
|
3000
|
+
} | {
|
|
3001
|
+
/** @description Milliseconds since epoch time */
|
|
3002
|
+
createdAt: number;
|
|
3003
|
+
/** @enum {string} */
|
|
3004
|
+
eventType: "research-output";
|
|
3005
|
+
output: {
|
|
3006
|
+
content: string;
|
|
3007
|
+
costDollars: {
|
|
3008
|
+
numPages: number;
|
|
3009
|
+
numSearches: number;
|
|
3010
|
+
reasoningTokens: number;
|
|
3011
|
+
total: number;
|
|
3012
|
+
};
|
|
3013
|
+
/** @enum {string} */
|
|
3014
|
+
outputType: "completed";
|
|
3015
|
+
parsed?: {
|
|
3016
|
+
[key: string]: unknown;
|
|
3017
|
+
};
|
|
3018
|
+
} | {
|
|
3019
|
+
error: string;
|
|
3020
|
+
/** @enum {string} */
|
|
3021
|
+
outputType: "failed";
|
|
3022
|
+
};
|
|
3023
|
+
researchId: string;
|
|
3024
|
+
}) | ({
|
|
3025
|
+
/** @description Milliseconds since epoch time */
|
|
3026
|
+
createdAt: number;
|
|
3027
|
+
/** @enum {string} */
|
|
3028
|
+
eventType: "plan-definition";
|
|
3029
|
+
planId: string;
|
|
3030
|
+
researchId: string;
|
|
3031
|
+
} | {
|
|
3032
|
+
/** @description Milliseconds since epoch time */
|
|
3033
|
+
createdAt: number;
|
|
3034
|
+
data: {
|
|
3035
|
+
content: string;
|
|
3036
|
+
/** @enum {string} */
|
|
3037
|
+
type: "think";
|
|
3038
|
+
} | {
|
|
3039
|
+
goal?: string;
|
|
3040
|
+
pageTokens: number;
|
|
3041
|
+
query: string;
|
|
3042
|
+
results: {
|
|
3043
|
+
url: string;
|
|
3044
|
+
}[];
|
|
3045
|
+
/** @enum {string} */
|
|
3046
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
3047
|
+
/** @enum {string} */
|
|
3048
|
+
type: "search";
|
|
3049
|
+
} | {
|
|
3050
|
+
goal?: string;
|
|
3051
|
+
pageTokens: number;
|
|
3052
|
+
result: {
|
|
3053
|
+
url: string;
|
|
3054
|
+
};
|
|
3055
|
+
/** @enum {string} */
|
|
3056
|
+
type: "crawl";
|
|
3057
|
+
};
|
|
3058
|
+
/** @enum {string} */
|
|
3059
|
+
eventType: "plan-operation";
|
|
3060
|
+
operationId: string;
|
|
3061
|
+
planId: string;
|
|
3062
|
+
researchId: string;
|
|
3063
|
+
} | {
|
|
3064
|
+
/** @description Milliseconds since epoch time */
|
|
3065
|
+
createdAt: number;
|
|
3066
|
+
/** @enum {string} */
|
|
3067
|
+
eventType: "plan-output";
|
|
3068
|
+
output: {
|
|
3069
|
+
/** @enum {string} */
|
|
3070
|
+
outputType: "tasks";
|
|
3071
|
+
reasoning: string;
|
|
3072
|
+
tasksInstructions: string[];
|
|
3073
|
+
} | {
|
|
3074
|
+
/** @enum {string} */
|
|
3075
|
+
outputType: "stop";
|
|
3076
|
+
reasoning: string;
|
|
3077
|
+
};
|
|
3078
|
+
planId: string;
|
|
3079
|
+
researchId: string;
|
|
3080
|
+
}) | ({
|
|
3081
|
+
/** @description Milliseconds since epoch time */
|
|
3082
|
+
createdAt: number;
|
|
3083
|
+
/** @enum {string} */
|
|
3084
|
+
eventType: "task-definition";
|
|
3085
|
+
instructions: string;
|
|
3086
|
+
planId: string;
|
|
3087
|
+
researchId: string;
|
|
3088
|
+
taskId: string;
|
|
3089
|
+
} | {
|
|
3090
|
+
/** @description Milliseconds since epoch time */
|
|
3091
|
+
createdAt: number;
|
|
3092
|
+
data: {
|
|
3093
|
+
content: string;
|
|
3094
|
+
/** @enum {string} */
|
|
3095
|
+
type: "think";
|
|
3096
|
+
} | {
|
|
3097
|
+
goal?: string;
|
|
3098
|
+
pageTokens: number;
|
|
3099
|
+
query: string;
|
|
3100
|
+
results: {
|
|
3101
|
+
url: string;
|
|
3102
|
+
}[];
|
|
3103
|
+
/** @enum {string} */
|
|
3104
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
3105
|
+
/** @enum {string} */
|
|
3106
|
+
type: "search";
|
|
3107
|
+
} | {
|
|
3108
|
+
goal?: string;
|
|
3109
|
+
pageTokens: number;
|
|
3110
|
+
result: {
|
|
3111
|
+
url: string;
|
|
3112
|
+
};
|
|
3113
|
+
/** @enum {string} */
|
|
3114
|
+
type: "crawl";
|
|
3115
|
+
};
|
|
3116
|
+
/** @enum {string} */
|
|
3117
|
+
eventType: "task-operation";
|
|
3118
|
+
operationId: string;
|
|
3119
|
+
planId: string;
|
|
3120
|
+
researchId: string;
|
|
3121
|
+
taskId: string;
|
|
3122
|
+
} | {
|
|
3123
|
+
/** @description Milliseconds since epoch time */
|
|
3124
|
+
createdAt: number;
|
|
3125
|
+
/** @enum {string} */
|
|
3126
|
+
eventType: "task-output";
|
|
3127
|
+
output: {
|
|
3128
|
+
content: string;
|
|
3129
|
+
/** @enum {string} */
|
|
3130
|
+
outputType: "completed";
|
|
3131
|
+
};
|
|
3132
|
+
planId: string;
|
|
3133
|
+
researchId: string;
|
|
3134
|
+
taskId: string;
|
|
3135
|
+
}))[];
|
|
3136
|
+
/** @description The instructions given to this research request */
|
|
3137
|
+
instructions: string;
|
|
3138
|
+
/**
|
|
3139
|
+
* @description The model used for the research request
|
|
3140
|
+
* @default exa-research
|
|
3141
|
+
* @enum {string}
|
|
3142
|
+
*/
|
|
3143
|
+
model: "exa-research" | "exa-research-pro";
|
|
3144
|
+
/** @description The unique identifier for the research request */
|
|
3145
|
+
researchId: string;
|
|
3146
|
+
/** @enum {string} */
|
|
3147
|
+
status: "running";
|
|
3148
|
+
} | {
|
|
3149
|
+
costDollars: {
|
|
3150
|
+
numPages: number;
|
|
3151
|
+
numSearches: number;
|
|
3152
|
+
reasoningTokens: number;
|
|
3153
|
+
total: number;
|
|
3154
|
+
};
|
|
3155
|
+
/** @description Milliseconds since epoch time */
|
|
3156
|
+
createdAt: number;
|
|
3157
|
+
events?: (({
|
|
3158
|
+
/** @description Milliseconds since epoch time */
|
|
3159
|
+
createdAt: number;
|
|
3160
|
+
/** @enum {string} */
|
|
3161
|
+
eventType: "research-definition";
|
|
3162
|
+
instructions: string;
|
|
3163
|
+
outputSchema?: {
|
|
3164
|
+
[key: string]: unknown;
|
|
3165
|
+
};
|
|
3166
|
+
researchId: string;
|
|
3167
|
+
} | {
|
|
3168
|
+
/** @description Milliseconds since epoch time */
|
|
3169
|
+
createdAt: number;
|
|
3170
|
+
/** @enum {string} */
|
|
3171
|
+
eventType: "research-output";
|
|
3172
|
+
output: {
|
|
3173
|
+
content: string;
|
|
3174
|
+
costDollars: {
|
|
3175
|
+
numPages: number;
|
|
3176
|
+
numSearches: number;
|
|
3177
|
+
reasoningTokens: number;
|
|
3178
|
+
total: number;
|
|
3179
|
+
};
|
|
3180
|
+
/** @enum {string} */
|
|
3181
|
+
outputType: "completed";
|
|
3182
|
+
parsed?: {
|
|
3183
|
+
[key: string]: unknown;
|
|
3184
|
+
};
|
|
3185
|
+
} | {
|
|
3186
|
+
error: string;
|
|
3187
|
+
/** @enum {string} */
|
|
3188
|
+
outputType: "failed";
|
|
3189
|
+
};
|
|
3190
|
+
researchId: string;
|
|
3191
|
+
}) | ({
|
|
3192
|
+
/** @description Milliseconds since epoch time */
|
|
3193
|
+
createdAt: number;
|
|
3194
|
+
/** @enum {string} */
|
|
3195
|
+
eventType: "plan-definition";
|
|
3196
|
+
planId: string;
|
|
3197
|
+
researchId: string;
|
|
3198
|
+
} | {
|
|
3199
|
+
/** @description Milliseconds since epoch time */
|
|
3200
|
+
createdAt: number;
|
|
3201
|
+
data: {
|
|
3202
|
+
content: string;
|
|
3203
|
+
/** @enum {string} */
|
|
3204
|
+
type: "think";
|
|
3205
|
+
} | {
|
|
3206
|
+
goal?: string;
|
|
3207
|
+
pageTokens: number;
|
|
3208
|
+
query: string;
|
|
3209
|
+
results: {
|
|
3210
|
+
url: string;
|
|
3211
|
+
}[];
|
|
3212
|
+
/** @enum {string} */
|
|
3213
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
3214
|
+
/** @enum {string} */
|
|
3215
|
+
type: "search";
|
|
3216
|
+
} | {
|
|
3217
|
+
goal?: string;
|
|
3218
|
+
pageTokens: number;
|
|
3219
|
+
result: {
|
|
3220
|
+
url: string;
|
|
3221
|
+
};
|
|
3222
|
+
/** @enum {string} */
|
|
3223
|
+
type: "crawl";
|
|
3224
|
+
};
|
|
3225
|
+
/** @enum {string} */
|
|
3226
|
+
eventType: "plan-operation";
|
|
3227
|
+
operationId: string;
|
|
3228
|
+
planId: string;
|
|
3229
|
+
researchId: string;
|
|
3230
|
+
} | {
|
|
3231
|
+
/** @description Milliseconds since epoch time */
|
|
3232
|
+
createdAt: number;
|
|
3233
|
+
/** @enum {string} */
|
|
3234
|
+
eventType: "plan-output";
|
|
3235
|
+
output: {
|
|
3236
|
+
/** @enum {string} */
|
|
3237
|
+
outputType: "tasks";
|
|
3238
|
+
reasoning: string;
|
|
3239
|
+
tasksInstructions: string[];
|
|
3240
|
+
} | {
|
|
3241
|
+
/** @enum {string} */
|
|
3242
|
+
outputType: "stop";
|
|
3243
|
+
reasoning: string;
|
|
3244
|
+
};
|
|
3245
|
+
planId: string;
|
|
3246
|
+
researchId: string;
|
|
3247
|
+
}) | ({
|
|
3248
|
+
/** @description Milliseconds since epoch time */
|
|
3249
|
+
createdAt: number;
|
|
3250
|
+
/** @enum {string} */
|
|
3251
|
+
eventType: "task-definition";
|
|
3252
|
+
instructions: string;
|
|
3253
|
+
planId: string;
|
|
3254
|
+
researchId: string;
|
|
3255
|
+
taskId: string;
|
|
3256
|
+
} | {
|
|
3257
|
+
/** @description Milliseconds since epoch time */
|
|
3258
|
+
createdAt: number;
|
|
3259
|
+
data: {
|
|
3260
|
+
content: string;
|
|
3261
|
+
/** @enum {string} */
|
|
3262
|
+
type: "think";
|
|
3263
|
+
} | {
|
|
3264
|
+
goal?: string;
|
|
3265
|
+
pageTokens: number;
|
|
3266
|
+
query: string;
|
|
3267
|
+
results: {
|
|
3268
|
+
url: string;
|
|
3269
|
+
}[];
|
|
3270
|
+
/** @enum {string} */
|
|
3271
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
3272
|
+
/** @enum {string} */
|
|
3273
|
+
type: "search";
|
|
3274
|
+
} | {
|
|
3275
|
+
goal?: string;
|
|
3276
|
+
pageTokens: number;
|
|
3277
|
+
result: {
|
|
3278
|
+
url: string;
|
|
3279
|
+
};
|
|
3280
|
+
/** @enum {string} */
|
|
3281
|
+
type: "crawl";
|
|
3282
|
+
};
|
|
3283
|
+
/** @enum {string} */
|
|
3284
|
+
eventType: "task-operation";
|
|
3285
|
+
operationId: string;
|
|
3286
|
+
planId: string;
|
|
3287
|
+
researchId: string;
|
|
3288
|
+
taskId: string;
|
|
3289
|
+
} | {
|
|
3290
|
+
/** @description Milliseconds since epoch time */
|
|
3291
|
+
createdAt: number;
|
|
3292
|
+
/** @enum {string} */
|
|
3293
|
+
eventType: "task-output";
|
|
3294
|
+
output: {
|
|
3295
|
+
content: string;
|
|
3296
|
+
/** @enum {string} */
|
|
3297
|
+
outputType: "completed";
|
|
3298
|
+
};
|
|
3299
|
+
planId: string;
|
|
3300
|
+
researchId: string;
|
|
3301
|
+
taskId: string;
|
|
3302
|
+
}))[];
|
|
3303
|
+
/** @description The instructions given to this research request */
|
|
3304
|
+
instructions: string;
|
|
3305
|
+
/**
|
|
3306
|
+
* @description The model used for the research request
|
|
3307
|
+
* @default exa-research
|
|
3308
|
+
* @enum {string}
|
|
3309
|
+
*/
|
|
3310
|
+
model: "exa-research" | "exa-research-pro";
|
|
3311
|
+
output: {
|
|
3312
|
+
content: string;
|
|
3313
|
+
parsed?: {
|
|
3314
|
+
[key: string]: unknown;
|
|
3315
|
+
};
|
|
3316
|
+
};
|
|
3317
|
+
/** @description The unique identifier for the research request */
|
|
3318
|
+
researchId: string;
|
|
3319
|
+
/** @enum {string} */
|
|
3320
|
+
status: "completed";
|
|
3321
|
+
} | {
|
|
3322
|
+
/** @description Milliseconds since epoch time */
|
|
3323
|
+
createdAt: number;
|
|
3324
|
+
events?: (({
|
|
3325
|
+
/** @description Milliseconds since epoch time */
|
|
3326
|
+
createdAt: number;
|
|
3327
|
+
/** @enum {string} */
|
|
3328
|
+
eventType: "research-definition";
|
|
3329
|
+
instructions: string;
|
|
3330
|
+
outputSchema?: {
|
|
3331
|
+
[key: string]: unknown;
|
|
3332
|
+
};
|
|
3333
|
+
researchId: string;
|
|
3334
|
+
} | {
|
|
3335
|
+
/** @description Milliseconds since epoch time */
|
|
3336
|
+
createdAt: number;
|
|
3337
|
+
/** @enum {string} */
|
|
3338
|
+
eventType: "research-output";
|
|
3339
|
+
output: {
|
|
3340
|
+
content: string;
|
|
3341
|
+
costDollars: {
|
|
3342
|
+
numPages: number;
|
|
3343
|
+
numSearches: number;
|
|
3344
|
+
reasoningTokens: number;
|
|
3345
|
+
total: number;
|
|
3346
|
+
};
|
|
3347
|
+
/** @enum {string} */
|
|
3348
|
+
outputType: "completed";
|
|
3349
|
+
parsed?: {
|
|
3350
|
+
[key: string]: unknown;
|
|
3351
|
+
};
|
|
3352
|
+
} | {
|
|
3353
|
+
error: string;
|
|
3354
|
+
/** @enum {string} */
|
|
3355
|
+
outputType: "failed";
|
|
3356
|
+
};
|
|
3357
|
+
researchId: string;
|
|
3358
|
+
}) | ({
|
|
3359
|
+
/** @description Milliseconds since epoch time */
|
|
3360
|
+
createdAt: number;
|
|
3361
|
+
/** @enum {string} */
|
|
3362
|
+
eventType: "plan-definition";
|
|
3363
|
+
planId: string;
|
|
3364
|
+
researchId: string;
|
|
3365
|
+
} | {
|
|
3366
|
+
/** @description Milliseconds since epoch time */
|
|
3367
|
+
createdAt: number;
|
|
3368
|
+
data: {
|
|
3369
|
+
content: string;
|
|
3370
|
+
/** @enum {string} */
|
|
3371
|
+
type: "think";
|
|
3372
|
+
} | {
|
|
3373
|
+
goal?: string;
|
|
3374
|
+
pageTokens: number;
|
|
3375
|
+
query: string;
|
|
3376
|
+
results: {
|
|
3377
|
+
url: string;
|
|
3378
|
+
}[];
|
|
3379
|
+
/** @enum {string} */
|
|
3380
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
3381
|
+
/** @enum {string} */
|
|
3382
|
+
type: "search";
|
|
3383
|
+
} | {
|
|
3384
|
+
goal?: string;
|
|
3385
|
+
pageTokens: number;
|
|
3386
|
+
result: {
|
|
3387
|
+
url: string;
|
|
3388
|
+
};
|
|
3389
|
+
/** @enum {string} */
|
|
3390
|
+
type: "crawl";
|
|
3391
|
+
};
|
|
3392
|
+
/** @enum {string} */
|
|
3393
|
+
eventType: "plan-operation";
|
|
3394
|
+
operationId: string;
|
|
3395
|
+
planId: string;
|
|
3396
|
+
researchId: string;
|
|
3397
|
+
} | {
|
|
3398
|
+
/** @description Milliseconds since epoch time */
|
|
3399
|
+
createdAt: number;
|
|
3400
|
+
/** @enum {string} */
|
|
3401
|
+
eventType: "plan-output";
|
|
3402
|
+
output: {
|
|
3403
|
+
/** @enum {string} */
|
|
3404
|
+
outputType: "tasks";
|
|
3405
|
+
reasoning: string;
|
|
3406
|
+
tasksInstructions: string[];
|
|
3407
|
+
} | {
|
|
3408
|
+
/** @enum {string} */
|
|
3409
|
+
outputType: "stop";
|
|
3410
|
+
reasoning: string;
|
|
3411
|
+
};
|
|
3412
|
+
planId: string;
|
|
3413
|
+
researchId: string;
|
|
3414
|
+
}) | ({
|
|
3415
|
+
/** @description Milliseconds since epoch time */
|
|
3416
|
+
createdAt: number;
|
|
3417
|
+
/** @enum {string} */
|
|
3418
|
+
eventType: "task-definition";
|
|
3419
|
+
instructions: string;
|
|
3420
|
+
planId: string;
|
|
3421
|
+
researchId: string;
|
|
3422
|
+
taskId: string;
|
|
3423
|
+
} | {
|
|
3424
|
+
/** @description Milliseconds since epoch time */
|
|
3425
|
+
createdAt: number;
|
|
3426
|
+
data: {
|
|
3427
|
+
content: string;
|
|
3428
|
+
/** @enum {string} */
|
|
3429
|
+
type: "think";
|
|
3430
|
+
} | {
|
|
3431
|
+
goal?: string;
|
|
3432
|
+
pageTokens: number;
|
|
3433
|
+
query: string;
|
|
3434
|
+
results: {
|
|
3435
|
+
url: string;
|
|
3436
|
+
}[];
|
|
3437
|
+
/** @enum {string} */
|
|
3438
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
3439
|
+
/** @enum {string} */
|
|
3440
|
+
type: "search";
|
|
3441
|
+
} | {
|
|
3442
|
+
goal?: string;
|
|
3443
|
+
pageTokens: number;
|
|
3444
|
+
result: {
|
|
3445
|
+
url: string;
|
|
3446
|
+
};
|
|
3447
|
+
/** @enum {string} */
|
|
3448
|
+
type: "crawl";
|
|
3449
|
+
};
|
|
3450
|
+
/** @enum {string} */
|
|
3451
|
+
eventType: "task-operation";
|
|
3452
|
+
operationId: string;
|
|
3453
|
+
planId: string;
|
|
3454
|
+
researchId: string;
|
|
3455
|
+
taskId: string;
|
|
3456
|
+
} | {
|
|
3457
|
+
/** @description Milliseconds since epoch time */
|
|
3458
|
+
createdAt: number;
|
|
3459
|
+
/** @enum {string} */
|
|
3460
|
+
eventType: "task-output";
|
|
3461
|
+
output: {
|
|
3462
|
+
content: string;
|
|
3463
|
+
/** @enum {string} */
|
|
3464
|
+
outputType: "completed";
|
|
3465
|
+
};
|
|
3466
|
+
planId: string;
|
|
3467
|
+
researchId: string;
|
|
3468
|
+
taskId: string;
|
|
3469
|
+
}))[];
|
|
3470
|
+
/** @description The instructions given to this research request */
|
|
3471
|
+
instructions: string;
|
|
3472
|
+
/**
|
|
3473
|
+
* @description The model used for the research request
|
|
3474
|
+
* @default exa-research
|
|
3475
|
+
* @enum {string}
|
|
3476
|
+
*/
|
|
2388
3477
|
model: "exa-research" | "exa-research-pro";
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
3478
|
+
/** @description The unique identifier for the research request */
|
|
3479
|
+
researchId: string;
|
|
3480
|
+
/** @enum {string} */
|
|
3481
|
+
status: "canceled";
|
|
3482
|
+
} | {
|
|
3483
|
+
/** @description Milliseconds since epoch time */
|
|
3484
|
+
createdAt: number;
|
|
3485
|
+
/** @description A message indicating why the request failed */
|
|
3486
|
+
error: string;
|
|
3487
|
+
events?: (({
|
|
3488
|
+
/** @description Milliseconds since epoch time */
|
|
3489
|
+
createdAt: number;
|
|
3490
|
+
/** @enum {string} */
|
|
3491
|
+
eventType: "research-definition";
|
|
3492
|
+
instructions: string;
|
|
3493
|
+
outputSchema?: {
|
|
3494
|
+
[key: string]: unknown;
|
|
3495
|
+
};
|
|
3496
|
+
researchId: string;
|
|
3497
|
+
} | {
|
|
3498
|
+
/** @description Milliseconds since epoch time */
|
|
3499
|
+
createdAt: number;
|
|
3500
|
+
/** @enum {string} */
|
|
3501
|
+
eventType: "research-output";
|
|
3502
|
+
output: {
|
|
3503
|
+
content: string;
|
|
3504
|
+
costDollars: {
|
|
3505
|
+
numPages: number;
|
|
3506
|
+
numSearches: number;
|
|
3507
|
+
reasoningTokens: number;
|
|
3508
|
+
total: number;
|
|
3509
|
+
};
|
|
2392
3510
|
/** @enum {string} */
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
description?: string;
|
|
2396
|
-
name?: string;
|
|
2397
|
-
schema: {
|
|
3511
|
+
outputType: "completed";
|
|
3512
|
+
parsed?: {
|
|
2398
3513
|
[key: string]: unknown;
|
|
2399
3514
|
};
|
|
2400
|
-
|
|
3515
|
+
} | {
|
|
3516
|
+
error: string;
|
|
2401
3517
|
/** @enum {string} */
|
|
2402
|
-
|
|
3518
|
+
outputType: "failed";
|
|
2403
3519
|
};
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
3520
|
+
researchId: string;
|
|
3521
|
+
}) | ({
|
|
3522
|
+
/** @description Milliseconds since epoch time */
|
|
3523
|
+
createdAt: number;
|
|
3524
|
+
/** @enum {string} */
|
|
3525
|
+
eventType: "plan-definition";
|
|
3526
|
+
planId: string;
|
|
3527
|
+
researchId: string;
|
|
3528
|
+
} | {
|
|
3529
|
+
/** @description Milliseconds since epoch time */
|
|
3530
|
+
createdAt: number;
|
|
3531
|
+
data: {
|
|
3532
|
+
content: string;
|
|
3533
|
+
/** @enum {string} */
|
|
3534
|
+
type: "think";
|
|
3535
|
+
} | {
|
|
3536
|
+
goal?: string;
|
|
3537
|
+
pageTokens: number;
|
|
3538
|
+
query: string;
|
|
3539
|
+
results: {
|
|
3540
|
+
url: string;
|
|
3541
|
+
}[];
|
|
3542
|
+
/** @enum {string} */
|
|
3543
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
3544
|
+
/** @enum {string} */
|
|
3545
|
+
type: "search";
|
|
3546
|
+
} | {
|
|
3547
|
+
goal?: string;
|
|
3548
|
+
pageTokens: number;
|
|
3549
|
+
result: {
|
|
3550
|
+
url: string;
|
|
3551
|
+
};
|
|
3552
|
+
/** @enum {string} */
|
|
3553
|
+
type: "crawl";
|
|
3554
|
+
};
|
|
3555
|
+
/** @enum {string} */
|
|
3556
|
+
eventType: "plan-operation";
|
|
3557
|
+
operationId: string;
|
|
3558
|
+
planId: string;
|
|
3559
|
+
researchId: string;
|
|
3560
|
+
} | {
|
|
3561
|
+
/** @description Milliseconds since epoch time */
|
|
3562
|
+
createdAt: number;
|
|
3563
|
+
/** @enum {string} */
|
|
3564
|
+
eventType: "plan-output";
|
|
3565
|
+
output: {
|
|
3566
|
+
/** @enum {string} */
|
|
3567
|
+
outputType: "tasks";
|
|
3568
|
+
reasoning: string;
|
|
3569
|
+
tasksInstructions: string[];
|
|
3570
|
+
} | {
|
|
3571
|
+
/** @enum {string} */
|
|
3572
|
+
outputType: "stop";
|
|
3573
|
+
reasoning: string;
|
|
3574
|
+
};
|
|
3575
|
+
planId: string;
|
|
3576
|
+
researchId: string;
|
|
3577
|
+
}) | ({
|
|
3578
|
+
/** @description Milliseconds since epoch time */
|
|
3579
|
+
createdAt: number;
|
|
3580
|
+
/** @enum {string} */
|
|
3581
|
+
eventType: "task-definition";
|
|
2408
3582
|
instructions: string;
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
3583
|
+
planId: string;
|
|
3584
|
+
researchId: string;
|
|
3585
|
+
taskId: string;
|
|
3586
|
+
} | {
|
|
3587
|
+
/** @description Milliseconds since epoch time */
|
|
3588
|
+
createdAt: number;
|
|
3589
|
+
data: {
|
|
3590
|
+
content: string;
|
|
3591
|
+
/** @enum {string} */
|
|
3592
|
+
type: "think";
|
|
3593
|
+
} | {
|
|
3594
|
+
goal?: string;
|
|
3595
|
+
pageTokens: number;
|
|
3596
|
+
query: string;
|
|
3597
|
+
results: {
|
|
3598
|
+
url: string;
|
|
3599
|
+
}[];
|
|
3600
|
+
/** @enum {string} */
|
|
3601
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
3602
|
+
/** @enum {string} */
|
|
3603
|
+
type: "search";
|
|
3604
|
+
} | {
|
|
3605
|
+
goal?: string;
|
|
3606
|
+
pageTokens: number;
|
|
3607
|
+
result: {
|
|
3608
|
+
url: string;
|
|
3609
|
+
};
|
|
3610
|
+
/** @enum {string} */
|
|
3611
|
+
type: "crawl";
|
|
3612
|
+
};
|
|
3613
|
+
/** @enum {string} */
|
|
3614
|
+
eventType: "task-operation";
|
|
3615
|
+
operationId: string;
|
|
3616
|
+
planId: string;
|
|
3617
|
+
researchId: string;
|
|
3618
|
+
taskId: string;
|
|
3619
|
+
} | {
|
|
3620
|
+
/** @description Milliseconds since epoch time */
|
|
3621
|
+
createdAt: number;
|
|
3622
|
+
/** @enum {string} */
|
|
3623
|
+
eventType: "task-output";
|
|
3624
|
+
output: {
|
|
3625
|
+
content: string;
|
|
3626
|
+
/** @enum {string} */
|
|
3627
|
+
outputType: "completed";
|
|
3628
|
+
};
|
|
3629
|
+
planId: string;
|
|
3630
|
+
researchId: string;
|
|
3631
|
+
taskId: string;
|
|
3632
|
+
}))[];
|
|
3633
|
+
/** @description The instructions given to this research request */
|
|
3634
|
+
instructions: string;
|
|
2412
3635
|
/**
|
|
3636
|
+
* @description The model used for the research request
|
|
2413
3637
|
* @default exa-research
|
|
2414
3638
|
* @enum {string}
|
|
2415
3639
|
*/
|
|
2416
3640
|
model: "exa-research" | "exa-research-pro";
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
*/
|
|
2422
|
-
inferSchema: boolean;
|
|
2423
|
-
/** @description A JsonSchema specification of the desired output. See https://json-schema.org/draft-07. */
|
|
2424
|
-
schema?: unknown;
|
|
2425
|
-
};
|
|
2426
|
-
};
|
|
2427
|
-
ResearchCreateTaskResponseDto: {
|
|
2428
|
-
/** @description The unique identifier for the research task */
|
|
2429
|
-
id: string;
|
|
2430
|
-
outputSchema: {
|
|
2431
|
-
[key: string]: unknown;
|
|
2432
|
-
};
|
|
3641
|
+
/** @description The unique identifier for the research request */
|
|
3642
|
+
researchId: string;
|
|
3643
|
+
/** @enum {string} */
|
|
3644
|
+
status: "failed";
|
|
2433
3645
|
};
|
|
2434
|
-
|
|
2435
|
-
/** @description
|
|
2436
|
-
citations?: {
|
|
2437
|
-
[key: string]: {
|
|
2438
|
-
id: string;
|
|
2439
|
-
snippet: string;
|
|
2440
|
-
title?: string;
|
|
2441
|
-
url: string;
|
|
2442
|
-
}[];
|
|
2443
|
-
};
|
|
2444
|
-
costDollars?: {
|
|
2445
|
-
research: {
|
|
2446
|
-
pages: number;
|
|
2447
|
-
reasoningTokens: number;
|
|
2448
|
-
searches: number;
|
|
2449
|
-
};
|
|
2450
|
-
total: number;
|
|
2451
|
-
};
|
|
2452
|
-
/** @description The creation time of the research task in milliseconds since the Unix epoch */
|
|
3646
|
+
ResearchEventDtoClass: ({
|
|
3647
|
+
/** @description Milliseconds since epoch time */
|
|
2453
3648
|
createdAt: number;
|
|
2454
|
-
/** @
|
|
2455
|
-
|
|
3649
|
+
/** @enum {string} */
|
|
3650
|
+
eventType: "research-definition";
|
|
3651
|
+
instructions: string;
|
|
3652
|
+
outputSchema?: {
|
|
2456
3653
|
[key: string]: unknown;
|
|
2457
3654
|
};
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
/** @description
|
|
2461
|
-
|
|
3655
|
+
researchId: string;
|
|
3656
|
+
} | {
|
|
3657
|
+
/** @description Milliseconds since epoch time */
|
|
3658
|
+
createdAt: number;
|
|
2462
3659
|
/** @enum {string} */
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
3660
|
+
eventType: "research-output";
|
|
3661
|
+
output: {
|
|
3662
|
+
content: string;
|
|
3663
|
+
costDollars: {
|
|
3664
|
+
numPages: number;
|
|
3665
|
+
numSearches: number;
|
|
3666
|
+
reasoningTokens: number;
|
|
3667
|
+
total: number;
|
|
3668
|
+
};
|
|
2468
3669
|
/** @enum {string} */
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
/** @description A completed subfield */
|
|
2472
|
-
data: {
|
|
3670
|
+
outputType: "completed";
|
|
3671
|
+
parsed?: {
|
|
2473
3672
|
[key: string]: unknown;
|
|
2474
3673
|
};
|
|
2475
|
-
|
|
3674
|
+
} | {
|
|
3675
|
+
error: string;
|
|
3676
|
+
/** @enum {string} */
|
|
3677
|
+
outputType: "failed";
|
|
3678
|
+
};
|
|
3679
|
+
researchId: string;
|
|
3680
|
+
}) | ({
|
|
3681
|
+
/** @description Milliseconds since epoch time */
|
|
3682
|
+
createdAt: number;
|
|
3683
|
+
/** @enum {string} */
|
|
3684
|
+
eventType: "plan-definition";
|
|
3685
|
+
planId: string;
|
|
3686
|
+
researchId: string;
|
|
3687
|
+
} | {
|
|
3688
|
+
/** @description Milliseconds since epoch time */
|
|
3689
|
+
createdAt: number;
|
|
3690
|
+
data: {
|
|
3691
|
+
content: string;
|
|
2476
3692
|
/** @enum {string} */
|
|
2477
|
-
type: "
|
|
3693
|
+
type: "think";
|
|
2478
3694
|
} | {
|
|
2479
|
-
/** @description What the agent hopes to find with this search query */
|
|
2480
3695
|
goal?: string;
|
|
2481
|
-
|
|
3696
|
+
pageTokens: number;
|
|
2482
3697
|
query: string;
|
|
2483
|
-
results
|
|
2484
|
-
id: string;
|
|
2485
|
-
snippet: string;
|
|
2486
|
-
title?: string;
|
|
3698
|
+
results: {
|
|
2487
3699
|
url: string;
|
|
2488
|
-
/** @enum {number} */
|
|
2489
|
-
version: 1;
|
|
2490
3700
|
}[];
|
|
2491
|
-
|
|
3701
|
+
/** @enum {string} */
|
|
3702
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
2492
3703
|
/** @enum {string} */
|
|
2493
3704
|
type: "search";
|
|
2494
3705
|
} | {
|
|
2495
|
-
/** @description What the agent hopes to find with this crawl */
|
|
2496
3706
|
goal?: string;
|
|
2497
|
-
|
|
3707
|
+
pageTokens: number;
|
|
3708
|
+
result: {
|
|
3709
|
+
url: string;
|
|
3710
|
+
};
|
|
2498
3711
|
/** @enum {string} */
|
|
2499
3712
|
type: "crawl";
|
|
2500
|
-
url: string;
|
|
2501
|
-
} | {
|
|
2502
|
-
stepId: string;
|
|
2503
|
-
/** @description Intermediate chain-of-thought style reasoning output */
|
|
2504
|
-
thought: string;
|
|
2505
|
-
/** @enum {string} */
|
|
2506
|
-
type: "think";
|
|
2507
|
-
})[];
|
|
2508
|
-
/** @description The JSON schema specification for the expected output format */
|
|
2509
|
-
schema?: {
|
|
2510
|
-
[key: string]: unknown;
|
|
2511
3713
|
};
|
|
2512
|
-
/**
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
text: string;
|
|
3714
|
+
/** @enum {string} */
|
|
3715
|
+
eventType: "plan-operation";
|
|
3716
|
+
operationId: string;
|
|
3717
|
+
planId: string;
|
|
3718
|
+
researchId: string;
|
|
3719
|
+
} | {
|
|
3720
|
+
/** @description Milliseconds since epoch time */
|
|
3721
|
+
createdAt: number;
|
|
3722
|
+
/** @enum {string} */
|
|
3723
|
+
eventType: "plan-output";
|
|
3724
|
+
output: {
|
|
2524
3725
|
/** @enum {string} */
|
|
2525
|
-
|
|
3726
|
+
outputType: "tasks";
|
|
3727
|
+
reasoning: string;
|
|
3728
|
+
tasksInstructions: string[];
|
|
2526
3729
|
} | {
|
|
2527
|
-
/** @description A completed subfield */
|
|
2528
|
-
data: {
|
|
2529
|
-
[key: string]: unknown;
|
|
2530
|
-
};
|
|
2531
|
-
stepId: string;
|
|
2532
3730
|
/** @enum {string} */
|
|
2533
|
-
|
|
3731
|
+
outputType: "stop";
|
|
3732
|
+
reasoning: string;
|
|
3733
|
+
};
|
|
3734
|
+
planId: string;
|
|
3735
|
+
researchId: string;
|
|
3736
|
+
}) | ({
|
|
3737
|
+
/** @description Milliseconds since epoch time */
|
|
3738
|
+
createdAt: number;
|
|
3739
|
+
/** @enum {string} */
|
|
3740
|
+
eventType: "task-definition";
|
|
3741
|
+
instructions: string;
|
|
3742
|
+
planId: string;
|
|
3743
|
+
researchId: string;
|
|
3744
|
+
taskId: string;
|
|
3745
|
+
} | {
|
|
3746
|
+
/** @description Milliseconds since epoch time */
|
|
3747
|
+
createdAt: number;
|
|
3748
|
+
data: {
|
|
3749
|
+
content: string;
|
|
3750
|
+
/** @enum {string} */
|
|
3751
|
+
type: "think";
|
|
2534
3752
|
} | {
|
|
2535
|
-
/** @description What the agent hopes to find with this search query */
|
|
2536
3753
|
goal?: string;
|
|
2537
|
-
|
|
3754
|
+
pageTokens: number;
|
|
2538
3755
|
query: string;
|
|
2539
|
-
results
|
|
2540
|
-
id: string;
|
|
2541
|
-
snippet: string;
|
|
2542
|
-
title?: string;
|
|
3756
|
+
results: {
|
|
2543
3757
|
url: string;
|
|
2544
|
-
/** @enum {number} */
|
|
2545
|
-
version: 1;
|
|
2546
3758
|
}[];
|
|
2547
|
-
|
|
3759
|
+
/** @enum {string} */
|
|
3760
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
2548
3761
|
/** @enum {string} */
|
|
2549
3762
|
type: "search";
|
|
2550
3763
|
} | {
|
|
2551
|
-
/** @description What the agent hopes to find with this crawl */
|
|
2552
3764
|
goal?: string;
|
|
2553
|
-
|
|
3765
|
+
pageTokens: number;
|
|
3766
|
+
result: {
|
|
3767
|
+
url: string;
|
|
3768
|
+
};
|
|
2554
3769
|
/** @enum {string} */
|
|
2555
3770
|
type: "crawl";
|
|
2556
|
-
url: string;
|
|
2557
|
-
} | {
|
|
2558
|
-
stepId: string;
|
|
2559
|
-
/** @description Intermediate chain-of-thought style reasoning output */
|
|
2560
|
-
thought: string;
|
|
2561
|
-
/** @enum {string} */
|
|
2562
|
-
type: "think";
|
|
2563
3771
|
};
|
|
2564
3772
|
/** @enum {string} */
|
|
2565
|
-
|
|
3773
|
+
eventType: "task-operation";
|
|
3774
|
+
operationId: string;
|
|
3775
|
+
planId: string;
|
|
3776
|
+
researchId: string;
|
|
3777
|
+
taskId: string;
|
|
2566
3778
|
} | {
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
citations?: {
|
|
2570
|
-
[key: string]: {
|
|
2571
|
-
id: string;
|
|
2572
|
-
snippet: string;
|
|
2573
|
-
title?: string;
|
|
2574
|
-
url: string;
|
|
2575
|
-
}[];
|
|
2576
|
-
};
|
|
2577
|
-
costDollars?: {
|
|
2578
|
-
research: {
|
|
2579
|
-
pages: number;
|
|
2580
|
-
reasoningTokens: number;
|
|
2581
|
-
searches: number;
|
|
2582
|
-
};
|
|
2583
|
-
total: number;
|
|
2584
|
-
};
|
|
2585
|
-
/** @description The creation time of the research task in milliseconds since the Unix epoch */
|
|
2586
|
-
createdAt: number;
|
|
2587
|
-
/** @description The research results data conforming to the specified schema */
|
|
2588
|
-
data?: {
|
|
2589
|
-
[key: string]: unknown;
|
|
2590
|
-
};
|
|
2591
|
-
/** @description The unique identifier for the research task */
|
|
2592
|
-
id: string;
|
|
2593
|
-
/** @description The instructions or query for the research task */
|
|
2594
|
-
instructions: string;
|
|
2595
|
-
/** @enum {string} */
|
|
2596
|
-
model?: "exa-research" | "exa-research-pro";
|
|
2597
|
-
operations: ({
|
|
2598
|
-
stepId: string;
|
|
2599
|
-
/** @description Agent generated plan or reasoning for upcoming actions. */
|
|
2600
|
-
text: string;
|
|
2601
|
-
/** @enum {string} */
|
|
2602
|
-
type: "step-plan";
|
|
2603
|
-
} | {
|
|
2604
|
-
/** @description A completed subfield */
|
|
2605
|
-
data: {
|
|
2606
|
-
[key: string]: unknown;
|
|
2607
|
-
};
|
|
2608
|
-
stepId: string;
|
|
2609
|
-
/** @enum {string} */
|
|
2610
|
-
type: "step-data";
|
|
2611
|
-
} | {
|
|
2612
|
-
/** @description What the agent hopes to find with this search query */
|
|
2613
|
-
goal?: string;
|
|
2614
|
-
/** @description Search query used */
|
|
2615
|
-
query: string;
|
|
2616
|
-
results?: {
|
|
2617
|
-
id: string;
|
|
2618
|
-
snippet: string;
|
|
2619
|
-
title?: string;
|
|
2620
|
-
url: string;
|
|
2621
|
-
/** @enum {number} */
|
|
2622
|
-
version: 1;
|
|
2623
|
-
}[];
|
|
2624
|
-
stepId: string;
|
|
2625
|
-
/** @enum {string} */
|
|
2626
|
-
type: "search";
|
|
2627
|
-
} | {
|
|
2628
|
-
/** @description What the agent hopes to find with this crawl */
|
|
2629
|
-
goal?: string;
|
|
2630
|
-
stepId: string;
|
|
2631
|
-
/** @enum {string} */
|
|
2632
|
-
type: "crawl";
|
|
2633
|
-
url: string;
|
|
2634
|
-
} | {
|
|
2635
|
-
stepId: string;
|
|
2636
|
-
/** @description Intermediate chain-of-thought style reasoning output */
|
|
2637
|
-
thought: string;
|
|
2638
|
-
/** @enum {string} */
|
|
2639
|
-
type: "think";
|
|
2640
|
-
})[];
|
|
2641
|
-
/** @description The JSON schema specification for the expected output format */
|
|
2642
|
-
schema?: {
|
|
2643
|
-
[key: string]: unknown;
|
|
2644
|
-
};
|
|
2645
|
-
/**
|
|
2646
|
-
* @description The current status of the research task
|
|
2647
|
-
* @enum {string}
|
|
2648
|
-
*/
|
|
2649
|
-
status: "running" | "completed" | "failed";
|
|
2650
|
-
timeMs?: number;
|
|
2651
|
-
};
|
|
2652
|
-
/** @enum {string} */
|
|
2653
|
-
type: "completed";
|
|
2654
|
-
};
|
|
2655
|
-
ResearchTaskOperationDto: {
|
|
2656
|
-
stepId: string;
|
|
2657
|
-
/** @description Agent generated plan or reasoning for upcoming actions. */
|
|
2658
|
-
text: string;
|
|
3779
|
+
/** @description Milliseconds since epoch time */
|
|
3780
|
+
createdAt: number;
|
|
2659
3781
|
/** @enum {string} */
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
3782
|
+
eventType: "task-output";
|
|
3783
|
+
output: {
|
|
3784
|
+
content: string;
|
|
3785
|
+
/** @enum {string} */
|
|
3786
|
+
outputType: "completed";
|
|
2665
3787
|
};
|
|
2666
|
-
|
|
3788
|
+
planId: string;
|
|
3789
|
+
researchId: string;
|
|
3790
|
+
taskId: string;
|
|
3791
|
+
});
|
|
3792
|
+
ResearchOperationDtoClass: {
|
|
3793
|
+
content: string;
|
|
2667
3794
|
/** @enum {string} */
|
|
2668
|
-
type: "
|
|
3795
|
+
type: "think";
|
|
2669
3796
|
} | {
|
|
2670
|
-
/** @description What the agent hopes to find with this search query */
|
|
2671
3797
|
goal?: string;
|
|
2672
|
-
|
|
3798
|
+
pageTokens: number;
|
|
2673
3799
|
query: string;
|
|
2674
|
-
results
|
|
2675
|
-
id: string;
|
|
2676
|
-
snippet: string;
|
|
2677
|
-
title?: string;
|
|
3800
|
+
results: {
|
|
2678
3801
|
url: string;
|
|
2679
|
-
/** @enum {number} */
|
|
2680
|
-
version: 1;
|
|
2681
3802
|
}[];
|
|
2682
|
-
|
|
3803
|
+
/** @enum {string} */
|
|
3804
|
+
searchType: "neural" | "keyword" | "auto" | "fast";
|
|
2683
3805
|
/** @enum {string} */
|
|
2684
3806
|
type: "search";
|
|
2685
3807
|
} | {
|
|
2686
|
-
/** @description What the agent hopes to find with this crawl */
|
|
2687
3808
|
goal?: string;
|
|
2688
|
-
|
|
3809
|
+
pageTokens: number;
|
|
3810
|
+
result: {
|
|
3811
|
+
url: string;
|
|
3812
|
+
};
|
|
2689
3813
|
/** @enum {string} */
|
|
2690
3814
|
type: "crawl";
|
|
2691
|
-
url: string;
|
|
2692
|
-
} | {
|
|
2693
|
-
stepId: string;
|
|
2694
|
-
/** @description Intermediate chain-of-thought style reasoning output */
|
|
2695
|
-
thought: string;
|
|
2696
|
-
/** @enum {string} */
|
|
2697
|
-
type: "think";
|
|
2698
3815
|
};
|
|
2699
3816
|
};
|
|
2700
3817
|
responses: never;
|
|
@@ -2703,14 +3820,117 @@ interface components {
|
|
|
2703
3820
|
headers: never;
|
|
2704
3821
|
pathItems: never;
|
|
2705
3822
|
}
|
|
2706
|
-
type SchemaListResearchTasksRequestDto = components["schemas"]["ListResearchTasksRequestDto"];
|
|
2707
|
-
type SchemaListResearchTasksResponseDto = components["schemas"]["ListResearchTasksResponseDto"];
|
|
2708
|
-
type SchemaResearchCreateTaskRequestDto = components["schemas"]["ResearchCreateTaskRequestDto"];
|
|
2709
|
-
type SchemaResearchCreateTaskResponseDto = components["schemas"]["ResearchCreateTaskResponseDto"];
|
|
2710
|
-
type SchemaResearchTaskDto = components["schemas"]["ResearchTaskDto"];
|
|
2711
3823
|
|
|
2712
|
-
type
|
|
2713
|
-
type
|
|
3824
|
+
type Research = components["schemas"]["ResearchDtoClass"];
|
|
3825
|
+
type ResearchStatus = Research["status"];
|
|
3826
|
+
type ResearchEvent = components["schemas"]["ResearchEventDtoClass"];
|
|
3827
|
+
type ResearchOperation = components["schemas"]["ResearchOperationDtoClass"];
|
|
3828
|
+
type DeepReplaceParsed<T, TData> = T extends {
|
|
3829
|
+
parsed?: Record<string, unknown>;
|
|
3830
|
+
} ? Omit<T, "parsed"> & {
|
|
3831
|
+
parsed: TData;
|
|
3832
|
+
} : T extends object ? {
|
|
3833
|
+
[K in keyof T]: DeepReplaceParsed<T[K], TData>;
|
|
3834
|
+
} : T;
|
|
3835
|
+
type ResearchTyped<T> = DeepReplaceParsed<Research, T>;
|
|
3836
|
+
type ResearchStreamEventTyped<T> = DeepReplaceParsed<ResearchStreamEvent, T>;
|
|
3837
|
+
type ListResearchRequest = {
|
|
3838
|
+
cursor?: string;
|
|
3839
|
+
limit?: number;
|
|
3840
|
+
};
|
|
3841
|
+
type ListResearchResponse = components["schemas"]["ListResearchResponseDto"];
|
|
3842
|
+
type ResearchCreateRequest = components["schemas"]["ResearchCreateRequestDtoClass"];
|
|
3843
|
+
type ResearchCreateResponse = Research;
|
|
3844
|
+
type ResearchStreamEvent = ResearchEvent;
|
|
3845
|
+
/**
|
|
3846
|
+
* Enhanced research creation params with zod schema support
|
|
3847
|
+
*/
|
|
3848
|
+
type ResearchCreateParamsTyped<T> = {
|
|
3849
|
+
instructions: string;
|
|
3850
|
+
model?: "exa-research" | "exa-research-pro";
|
|
3851
|
+
outputSchema?: T;
|
|
3852
|
+
};
|
|
3853
|
+
type ResearchDefinitionEvent = Extract<ResearchEvent, {
|
|
3854
|
+
eventType: "research-definition";
|
|
3855
|
+
}>;
|
|
3856
|
+
type ResearchOutputEvent = Extract<ResearchEvent, {
|
|
3857
|
+
eventType: "research-output";
|
|
3858
|
+
}>;
|
|
3859
|
+
type ResearchPlanDefinitionEvent = Extract<ResearchEvent, {
|
|
3860
|
+
eventType: "plan-definition";
|
|
3861
|
+
}>;
|
|
3862
|
+
type ResearchPlanOperationEvent = Extract<ResearchEvent, {
|
|
3863
|
+
eventType: "plan-operation";
|
|
3864
|
+
}>;
|
|
3865
|
+
type ResearchPlanOutputEvent = Extract<ResearchEvent, {
|
|
3866
|
+
eventType: "plan-output";
|
|
3867
|
+
}>;
|
|
3868
|
+
type ResearchTaskDefinitionEvent = Extract<ResearchEvent, {
|
|
3869
|
+
eventType: "task-definition";
|
|
3870
|
+
}>;
|
|
3871
|
+
type ResearchTaskOperationEvent = Extract<ResearchEvent, {
|
|
3872
|
+
eventType: "task-operation";
|
|
3873
|
+
}>;
|
|
3874
|
+
type ResearchTaskOutputEvent = Extract<ResearchEvent, {
|
|
3875
|
+
eventType: "task-output";
|
|
3876
|
+
}>;
|
|
3877
|
+
|
|
3878
|
+
type QueryParams = Record<string, string | number | boolean | string[] | undefined>;
|
|
3879
|
+
interface RequestBody {
|
|
3880
|
+
[key: string]: unknown;
|
|
3881
|
+
}
|
|
3882
|
+
declare class ResearchBaseClient {
|
|
3883
|
+
protected client: Exa;
|
|
3884
|
+
constructor(client: Exa);
|
|
3885
|
+
protected request<T = unknown>(endpoint: string, method?: string, data?: RequestBody, params?: QueryParams): Promise<T>;
|
|
3886
|
+
protected rawRequest(endpoint: string, method?: string, data?: RequestBody, params?: QueryParams): Promise<Response>;
|
|
3887
|
+
protected buildPaginationParams(pagination?: ListResearchRequest): QueryParams;
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3890
|
+
declare class ResearchClient extends ResearchBaseClient {
|
|
3891
|
+
constructor(client: Exa);
|
|
3892
|
+
create<T>(params: ResearchCreateParamsTyped<ZodSchema<T>>): Promise<ResearchCreateResponse>;
|
|
3893
|
+
create(params: {
|
|
3894
|
+
instructions: string;
|
|
3895
|
+
model?: "exa-research" | "exa-research-pro";
|
|
3896
|
+
outputSchema?: Record<string, unknown>;
|
|
3897
|
+
}): Promise<ResearchCreateResponse>;
|
|
3898
|
+
get(researchId: string): Promise<Research>;
|
|
3899
|
+
get(researchId: string, options: {
|
|
3900
|
+
stream?: false;
|
|
3901
|
+
events?: boolean;
|
|
3902
|
+
}): Promise<Research>;
|
|
3903
|
+
get<T>(researchId: string, options: {
|
|
3904
|
+
stream?: false;
|
|
3905
|
+
events?: boolean;
|
|
3906
|
+
outputSchema: ZodSchema<T>;
|
|
3907
|
+
}): Promise<ResearchTyped<T>>;
|
|
3908
|
+
get(researchId: string, options: {
|
|
3909
|
+
stream: true;
|
|
3910
|
+
events?: boolean;
|
|
3911
|
+
}): Promise<AsyncGenerator<ResearchStreamEvent, any, any>>;
|
|
3912
|
+
get<T>(researchId: string, options: {
|
|
3913
|
+
stream: true;
|
|
3914
|
+
events?: boolean;
|
|
3915
|
+
outputSchema?: ZodSchema<T>;
|
|
3916
|
+
}): Promise<AsyncGenerator<ResearchStreamEvent, any, any>>;
|
|
3917
|
+
list(options?: ListResearchRequest): Promise<ListResearchResponse>;
|
|
3918
|
+
pollUntilFinished(researchId: string, options?: {
|
|
3919
|
+
pollInterval?: number;
|
|
3920
|
+
timeoutMs?: number;
|
|
3921
|
+
events?: boolean;
|
|
3922
|
+
}): Promise<Research & {
|
|
3923
|
+
status: "completed" | "failed" | "canceled";
|
|
3924
|
+
}>;
|
|
3925
|
+
pollUntilFinished<T>(researchId: string, options?: {
|
|
3926
|
+
pollInterval?: number;
|
|
3927
|
+
timeoutMs?: number;
|
|
3928
|
+
events?: boolean;
|
|
3929
|
+
outputSchema: ZodSchema<T>;
|
|
3930
|
+
}): Promise<ResearchTyped<T> & {
|
|
3931
|
+
status: "completed" | "failed" | "canceled";
|
|
3932
|
+
}>;
|
|
3933
|
+
}
|
|
2714
3934
|
|
|
2715
3935
|
/**
|
|
2716
3936
|
* HTTP status codes
|
|
@@ -3087,21 +4307,6 @@ type AnswerResponseTyped<T> = Omit<AnswerResponse, "answer"> & {
|
|
|
3087
4307
|
type SummaryContentsOptionsTyped<T> = Omit<SummaryContentsOptions, "schema"> & {
|
|
3088
4308
|
schema: T;
|
|
3089
4309
|
};
|
|
3090
|
-
/**
|
|
3091
|
-
* Enhanced research task output options that accepts either JSON schema or Zod schema
|
|
3092
|
-
*/
|
|
3093
|
-
type ResearchTaskOutputTyped<T> = {
|
|
3094
|
-
inferSchema?: boolean;
|
|
3095
|
-
schema: T;
|
|
3096
|
-
};
|
|
3097
|
-
/**
|
|
3098
|
-
* Enhanced research task creation params with zod schema support
|
|
3099
|
-
*/
|
|
3100
|
-
type ResearchCreateTaskParamsTyped<T> = {
|
|
3101
|
-
instructions: string;
|
|
3102
|
-
model?: "exa-research" | "exa-research-pro";
|
|
3103
|
-
output?: ResearchTaskOutputTyped<T>;
|
|
3104
|
-
};
|
|
3105
4310
|
/**
|
|
3106
4311
|
* The Exa class encapsulates the API's endpoints.
|
|
3107
4312
|
*/
|
|
@@ -3135,7 +4340,7 @@ declare class Exa {
|
|
|
3135
4340
|
* @returns {Promise<any>} The response from the API.
|
|
3136
4341
|
* @throws {ExaError} When any API request fails with structured error information
|
|
3137
4342
|
*/
|
|
3138
|
-
request<T = unknown>(endpoint: string, method: string, body?: any, params?: Record<string, any>): Promise<T>;
|
|
4343
|
+
request<T = unknown>(endpoint: string, method: string, body?: any, params?: Record<string, any>, headers?: Record<string, string>): Promise<T>;
|
|
3139
4344
|
rawRequest(endpoint: string, method?: string, body?: Record<string, unknown>, queryParams?: Record<string, string | number | boolean | string[] | undefined>): Promise<Response>;
|
|
3140
4345
|
/**
|
|
3141
4346
|
* Performs a search with an Exa prompt-engineered query.
|
|
@@ -3240,4 +4445,4 @@ declare class Exa {
|
|
|
3240
4445
|
private parseSSEStream;
|
|
3241
4446
|
}
|
|
3242
4447
|
|
|
3243
|
-
export { type AnswerOptions, type AnswerOptionsTyped, type AnswerResponse, type AnswerResponseTyped, type AnswerStreamChunk, type AnswerStreamResponse, type ArticleEntity, type BaseSearchOptions, type CompanyEntity, type ContentsOptions, type ContentsResultComponent, type ContextOptions, type CostDollars, type CostDollarsContents, type CostDollarsSeearch, type CreateCriterionParameters, type CreateEnrichmentParameters, CreateEnrichmentParametersFormat, type CreateImportParameters, CreateImportParametersFormat, type CreateImportResponse, type CreateImportWithCsvParameters, type CreateMonitorParameters, type CreateWebhookParameters, type CreateWebsetParameters, CreateWebsetParametersImportSource, CreateWebsetParametersSearchExcludeSource, type CreateWebsetSearchParameters, CreateWebsetSearchParametersExcludeSource, CreateWebsetSearchParametersScopeSource, type CsvDataInput, type CustomEntity, type Default, type EnrichmentResult, type Entity, type Event, EventType, EventsClient, Exa, ExaError, type ExtrasOptions, type ExtrasResponse, type FindSimilarOptions, type GetWebsetResponse, type HighlightsContentsOptions, type HighlightsResponse, HttpStatusCode, type Import, ImportFailedReason, ImportFormat, ImportObject, ImportStatus, ImportsClient, type JSONSchema, type ListEventsResponse, type ListImportsResponse, type ListMonitorRunsResponse, type ListMonitorsOptions, type ListMonitorsResponse, type
|
|
4448
|
+
export { type AnswerOptions, type AnswerOptionsTyped, type AnswerResponse, type AnswerResponseTyped, type AnswerStreamChunk, type AnswerStreamResponse, type ArticleEntity, type BaseSearchOptions, type CompanyEntity, type ContentsOptions, type ContentsResultComponent, type ContextOptions, type CostDollars, type CostDollarsContents, type CostDollarsSeearch, type CreateCriterionParameters, type CreateEnrichmentParameters, CreateEnrichmentParametersFormat, type CreateImportParameters, CreateImportParametersFormat, type CreateImportResponse, type CreateImportWithCsvParameters, type CreateMonitorParameters, type CreateWebhookParameters, type CreateWebsetParameters, CreateWebsetParametersImportSource, CreateWebsetParametersSearchExcludeSource, type CreateWebsetSearchParameters, CreateWebsetSearchParametersExcludeSource, CreateWebsetSearchParametersScopeSource, type CsvDataInput, type CustomEntity, type Default, type EnrichmentResult, type Entity, type Event, EventType, EventsClient, Exa, ExaError, type ExtrasOptions, type ExtrasResponse, type FindSimilarOptions, type GetWebsetResponse, type HighlightsContentsOptions, type HighlightsResponse, HttpStatusCode, type Import, ImportFailedReason, ImportFormat, ImportObject, ImportStatus, ImportsClient, type JSONSchema, type ListEventsResponse, type ListImportsResponse, type ListMonitorRunsResponse, type ListMonitorsOptions, type ListMonitorsResponse, type ListResearchRequest, type ListResearchResponse, 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, type PersonEntity, type PreviewWebsetParameters, type PreviewWebsetResponse, PreviewWebsetResponseEnrichmentsFormat, type RegularSearchOptions, 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, ScopeSourceType, type SearchResponse, type SearchResult, type Status, type SubpagesResponse, type SummaryContentsOptions, type SummaryContentsOptionsTyped, type SummaryResponse, type TextContentsOptions, type TextResponse, type UpdateImport, type UpdateMonitor, UpdateMonitorStatus, type UpdateWebhookParameters, type UpdateWebsetRequest, type WaitUntilCompletedOptions, type Webhook, type WebhookAttempt, WebhookStatus, type Webset, type WebsetEnrichment, WebsetEnrichmentFormat, WebsetEnrichmentStatus, WebsetEnrichmentsClient, type WebsetHeadersLike, type WebsetItem, type WebsetItemArticleProperties, type WebsetItemCompanyProperties, type WebsetItemCustomProperties, type WebsetItemEvaluation, WebsetItemEvaluationSatisfied, type WebsetItemPersonProperties, type WebsetItemResearchPaperProperties, WebsetItemSource, WebsetItemsClient, WebsetMonitorsClient, type WebsetSearch, WebsetSearchBehavior, WebsetSearchCanceledReason, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, Exa as default };
|