exa-js 1.7.3 → 1.8.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.ts CHANGED
@@ -15,7 +15,7 @@ interface RequestBody$1 {
15
15
  /**
16
16
  * Common pagination parameters
17
17
  */
18
- interface PaginationParams {
18
+ interface PaginationParams$1 {
19
19
  /**
20
20
  * Cursor for pagination
21
21
  */
@@ -50,10 +50,10 @@ declare class WebsetsBaseClient {
50
50
  * @param pagination The pagination parameters
51
51
  * @returns QueryParams object with pagination parameters
52
52
  */
53
- protected buildPaginationParams(pagination?: PaginationParams): QueryParams$1;
53
+ protected buildPaginationParams(pagination?: PaginationParams$1): QueryParams$1;
54
54
  }
55
55
 
56
- interface components {
56
+ interface components$1 {
57
57
  schemas: {
58
58
  CreateCriterionParameters: {
59
59
  /** @description The description of the criterion */
@@ -79,9 +79,28 @@ interface components {
79
79
  label: string;
80
80
  }[];
81
81
  };
82
+ CreateStreamParameters: {
83
+ /** @description Behavior to perform when stream runs */
84
+ behavior: components$1["schemas"]["StreamBehaviorSearch"] | components$1["schemas"]["StreamBehaviorRefresh"];
85
+ /** @description How often the stream will run */
86
+ cadence: {
87
+ /** @description Cron expression for stream cadence (must be a valid Unix cron with 5 fields). The schedule must trigger at most once per day. */
88
+ cron: string;
89
+ /**
90
+ * @description IANA timezone (e.g., "America/New_York")
91
+ * @default Etc/UTC
92
+ */
93
+ timezone: string;
94
+ };
95
+ metadata?: {
96
+ [key: string]: string;
97
+ };
98
+ /** @description The id of the Webset */
99
+ websetId: string;
100
+ };
82
101
  CreateWebhookParameters: {
83
102
  /** @description The events to trigger the webhook */
84
- events: components["schemas"]["EventType"][];
103
+ events: components$1["schemas"]["EventType"][];
85
104
  /** @description Set of key-value pairs you want to associate with this object. */
86
105
  metadata?: {
87
106
  [key: string]: string;
@@ -94,7 +113,7 @@ interface components {
94
113
  };
95
114
  CreateWebsetParameters: {
96
115
  /** @description Add Enrichments for the Webset. */
97
- enrichments?: components["schemas"]["CreateEnrichmentParameters"][];
116
+ enrichments?: components$1["schemas"]["CreateEnrichmentParameters"][];
98
117
  /** @description The external identifier for the webset.
99
118
  *
100
119
  * You can use this to reference the Webset by your own internal identifiers. */
@@ -115,11 +134,11 @@ interface components {
115
134
  /** @description Criteria every item is evaluated against.
116
135
  *
117
136
  * It's not required to provide your own criteria, we automatically detect the criteria from all the information provided in the query. Only use this when you need more fine control. */
118
- criteria?: components["schemas"]["CreateCriterionParameters"][];
137
+ criteria?: components$1["schemas"]["CreateCriterionParameters"][];
119
138
  /** @description Entity the Webset will return results for.
120
139
  *
121
140
  * It is not required to provide it, we automatically detect the entity from all the information provided in the query. Only use this when you need more fine control. */
122
- entity?: components["schemas"]["WebsetEntity"];
141
+ entity?: components$1["schemas"]["WebsetEntity"];
123
142
  /** @description Your search query.
124
143
  *
125
144
  * Use this to describe what you are looking for.
@@ -130,14 +149,13 @@ interface components {
130
149
  };
131
150
  CreateWebsetSearchParameters: {
132
151
  /**
133
- * WebsetSearchBehaviour
134
- * @description The behaviour of the Search when it is added to a Webset.
152
+ * @description The behavior of the Search when it is added to a Webset.
135
153
  *
136
- * - `override`: the search will reuse the existing Items found in the Webset and evaluate them against the new criteria. Any Items that don't match the new criteria will be discarded.
154
+ * - `override`: the search will replace the existing Items found in the Webset and evaluate them against the new criteria. Any Items that don't match the new criteria will be discarded.
155
+ * - `append`: the search will add the new Items found to the existing Webset. Any Items that don't match the new criteria will be discarded.
137
156
  * @default override
138
- * @enum {string}
139
157
  */
140
- behaviour: CreateWebsetSearchParametersBehaviour;
158
+ behavior: WebsetSearchBehavior;
141
159
  /** @description Number of Items the Search will attempt to find.
142
160
  *
143
161
  * The actual number of Items found may be less than this number depending on the query complexity. */
@@ -145,11 +163,11 @@ interface components {
145
163
  /** @description Criteria every item is evaluated against.
146
164
  *
147
165
  * It's not required to provide your own criteria, we automatically detect the criteria from all the information provided in the query. */
148
- criteria?: components["schemas"]["CreateCriterionParameters"][];
166
+ criteria?: components$1["schemas"]["CreateCriterionParameters"][];
149
167
  /** @description Entity the Webset will return results for.
150
168
  *
151
169
  * It is not required to provide it, we automatically detect the entity from all the information provided in the query. */
152
- entity?: components["schemas"]["WebsetEntity"];
170
+ entity?: components$1["schemas"]["WebsetEntity"];
153
171
  /** @description Set of key-value pairs you want to associate with this object. */
154
172
  metadata?: {
155
173
  [key: string]: string;
@@ -162,7 +180,7 @@ interface components {
162
180
  EnrichmentResult: {
163
181
  /** @description The id of the Enrichment that generated the result */
164
182
  enrichmentId: string;
165
- format: components["schemas"]["WebsetEnrichmentFormat"];
183
+ format: WebsetEnrichmentFormat;
166
184
  /**
167
185
  * @default enrichment_result
168
186
  * @constant
@@ -189,7 +207,7 @@ interface components {
189
207
  * @description The date and time the event was created
190
208
  */
191
209
  createdAt: string;
192
- data: components["schemas"]["Webset"];
210
+ data: components$1["schemas"]["Webset"];
193
211
  /** @description The unique identifier for the event */
194
212
  id: string;
195
213
  /**
@@ -208,7 +226,7 @@ interface components {
208
226
  * @description The date and time the event was created
209
227
  */
210
228
  createdAt: string;
211
- data: components["schemas"]["Webset"];
229
+ data: components$1["schemas"]["Webset"];
212
230
  /** @description The unique identifier for the event */
213
231
  id: string;
214
232
  /**
@@ -227,7 +245,7 @@ interface components {
227
245
  * @description The date and time the event was created
228
246
  */
229
247
  createdAt: string;
230
- data: components["schemas"]["Webset"];
248
+ data: components$1["schemas"]["Webset"];
231
249
  /** @description The unique identifier for the event */
232
250
  id: string;
233
251
  /**
@@ -246,7 +264,7 @@ interface components {
246
264
  * @description The date and time the event was created
247
265
  */
248
266
  createdAt: string;
249
- data: components["schemas"]["Webset"];
267
+ data: components$1["schemas"]["Webset"];
250
268
  /** @description The unique identifier for the event */
251
269
  id: string;
252
270
  /**
@@ -265,7 +283,7 @@ interface components {
265
283
  * @description The date and time the event was created
266
284
  */
267
285
  createdAt: string;
268
- data: components["schemas"]["WebsetItem"];
286
+ data: components$1["schemas"]["WebsetItem"];
269
287
  /** @description The unique identifier for the event */
270
288
  id: string;
271
289
  /**
@@ -284,7 +302,7 @@ interface components {
284
302
  * @description The date and time the event was created
285
303
  */
286
304
  createdAt: string;
287
- data: components["schemas"]["WebsetItem"];
305
+ data: components$1["schemas"]["WebsetItem"];
288
306
  /** @description The unique identifier for the event */
289
307
  id: string;
290
308
  /**
@@ -303,7 +321,7 @@ interface components {
303
321
  * @description The date and time the event was created
304
322
  */
305
323
  createdAt: string;
306
- data: components["schemas"]["WebsetSearch"];
324
+ data: components$1["schemas"]["WebsetSearch"];
307
325
  /** @description The unique identifier for the event */
308
326
  id: string;
309
327
  /**
@@ -322,7 +340,7 @@ interface components {
322
340
  * @description The date and time the event was created
323
341
  */
324
342
  createdAt: string;
325
- data: components["schemas"]["WebsetSearch"];
343
+ data: components$1["schemas"]["WebsetSearch"];
326
344
  /** @description The unique identifier for the event */
327
345
  id: string;
328
346
  /**
@@ -341,7 +359,7 @@ interface components {
341
359
  * @description The date and time the event was created
342
360
  */
343
361
  createdAt: string;
344
- data: components["schemas"]["WebsetSearch"];
362
+ data: components$1["schemas"]["WebsetSearch"];
345
363
  /** @description The unique identifier for the event */
346
364
  id: string;
347
365
  /**
@@ -360,7 +378,7 @@ interface components {
360
378
  * @description The date and time the event was created
361
379
  */
362
380
  createdAt: string;
363
- data: components["schemas"]["WebsetSearch"];
381
+ data: components$1["schemas"]["WebsetSearch"];
364
382
  /** @description The unique identifier for the event */
365
383
  id: string;
366
384
  /**
@@ -376,13 +394,29 @@ interface components {
376
394
  };
377
395
  /** @enum {string} */
378
396
  EventType: EventType;
379
- GetWebsetResponse: components["schemas"]["Webset"] & {
397
+ GetWebsetResponse: components$1["schemas"]["Webset"] & {
380
398
  /** @description When expand query parameter contains `items`, this will contain the items in the webset */
381
- items?: components["schemas"]["WebsetItem"][];
399
+ items?: components$1["schemas"]["WebsetItem"][];
382
400
  };
383
401
  ListEventsResponse: {
384
402
  /** @description The list of events */
385
- data: components["schemas"]["Event"][];
403
+ data: components$1["schemas"]["Event"][];
404
+ /** @description Whether there are more results to paginate through */
405
+ hasMore: boolean;
406
+ /** @description The cursor to paginate through the next set of results */
407
+ nextCursor: string | null;
408
+ };
409
+ ListStreamRunsResponse: {
410
+ /** @description The list of stream runs */
411
+ data: components$1["schemas"]["StreamRun"][];
412
+ /** @description Whether there are more results to paginate through */
413
+ hasMore: boolean;
414
+ /** @description The cursor to paginate through the next set of results */
415
+ nextCursor: string | null;
416
+ };
417
+ ListStreamsResponse: {
418
+ /** @description The list of streams */
419
+ data: components$1["schemas"]["Stream"][];
386
420
  /** @description Whether there are more results to paginate through */
387
421
  hasMore: boolean;
388
422
  /** @description The cursor to paginate through the next set of results */
@@ -390,7 +424,7 @@ interface components {
390
424
  };
391
425
  ListWebhookAttemptsResponse: {
392
426
  /** @description The list of webhook attempts */
393
- data: components["schemas"]["WebhookAttempt"][];
427
+ data: components$1["schemas"]["WebhookAttempt"][];
394
428
  /** @description Whether there are more results to paginate through */
395
429
  hasMore: boolean;
396
430
  /** @description The cursor to paginate through the next set of results */
@@ -398,7 +432,7 @@ interface components {
398
432
  };
399
433
  ListWebhooksResponse: {
400
434
  /** @description The list of webhooks */
401
- data: components["schemas"]["Webhook"][];
435
+ data: components$1["schemas"]["Webhook"][];
402
436
  /** @description Whether there are more results to paginate through */
403
437
  hasMore: boolean;
404
438
  /** @description The cursor to paginate through the next set of results */
@@ -406,7 +440,7 @@ interface components {
406
440
  };
407
441
  ListWebsetItemResponse: {
408
442
  /** @description The list of webset items */
409
- data: components["schemas"]["WebsetItem"][];
443
+ data: components$1["schemas"]["WebsetItem"][];
410
444
  /** @description Whether there are more Items to paginate through */
411
445
  hasMore: boolean;
412
446
  /** @description The cursor to paginate through the next set of Items */
@@ -414,15 +448,181 @@ interface components {
414
448
  };
415
449
  ListWebsetsResponse: {
416
450
  /** @description The list of websets */
417
- data: components["schemas"]["Webset"][];
451
+ data: components$1["schemas"]["Webset"][];
418
452
  /** @description Whether there are more results to paginate through */
419
453
  hasMore: boolean;
420
454
  /** @description The cursor to paginate through the next set of results */
421
455
  nextCursor: string | null;
422
456
  };
457
+ Stream: {
458
+ /** @description Behavior to perform when stream runs */
459
+ behavior: components$1["schemas"]["StreamBehaviorSearch"] | components$1["schemas"]["StreamBehaviorRefresh"];
460
+ /** @description How often the stream will run */
461
+ cadence: {
462
+ /** @description Cron expression for stream cadence (must be a valid Unix cron with 5 fields). The schedule must trigger at most once per day. */
463
+ cron: string;
464
+ /**
465
+ * @description IANA timezone (e.g., "America/New_York")
466
+ * @default Etc/UTC
467
+ */
468
+ timezone: string;
469
+ };
470
+ /**
471
+ * Format: date-time
472
+ * @description When the stream was created
473
+ */
474
+ createdAt: string;
475
+ /** @description The unique identifier for the Stream */
476
+ id: string;
477
+ /**
478
+ * StreamRun
479
+ * @description The last run of the stream
480
+ */
481
+ lastRun: components$1["schemas"]["StreamRun"];
482
+ /** @description Set of key-value pairs you want to associate with this object. */
483
+ metadata: {
484
+ [key: string]: string;
485
+ };
486
+ /**
487
+ * Format: date-time
488
+ * @description When the next run will occur
489
+ */
490
+ nextRunAt: string | null;
491
+ /**
492
+ * @description The type of object
493
+ * @enum {string}
494
+ */
495
+ object: StreamObject;
496
+ /**
497
+ * @description The status of the Stream
498
+ * @enum {string}
499
+ */
500
+ status: StreamStatus;
501
+ /**
502
+ * Format: date-time
503
+ * @description When the stream was last updated
504
+ */
505
+ updatedAt: string;
506
+ /** @description The id of the Webset the Stream belongs to */
507
+ websetId: string;
508
+ };
509
+ StreamBehaviorRefresh: {
510
+ /** @description Specify the target of the refresh */
511
+ config: components$1["schemas"]["StreamRefreshBehaviorEnrichmentsConfig"] | components$1["schemas"]["StreamRefreshBehaviorContentsConfig"];
512
+ /**
513
+ * @default refresh
514
+ * @constant
515
+ */
516
+ type: "refresh";
517
+ };
518
+ StreamBehaviorSearch: {
519
+ config: {
520
+ /**
521
+ * @description The behaviour of the Search when it is added to a Webset.
522
+ * @default append
523
+ */
524
+ behavior?: WebsetSearchBehavior;
525
+ /** @description The maximum number of results to find */
526
+ count: number;
527
+ criteria: {
528
+ description: string;
529
+ }[];
530
+ /** WebsetEntity */
531
+ entity: components$1["schemas"]["WebsetEntity"];
532
+ query: string;
533
+ };
534
+ /**
535
+ * @default search
536
+ * @constant
537
+ */
538
+ type: "search";
539
+ };
540
+ StreamCadence: {
541
+ /** @description Cron expression for stream cadence (must be a valid Unix cron with 5 fields). The schedule must trigger at most once per day. */
542
+ cron: string;
543
+ /**
544
+ * @description IANA timezone (e.g., "America/New_York")
545
+ * @default Etc/UTC
546
+ */
547
+ timezone: string;
548
+ };
549
+ StreamRefreshBehaviorContentsConfig: {
550
+ /**
551
+ * @default contents
552
+ * @constant
553
+ */
554
+ target: "contents";
555
+ };
556
+ StreamRefreshBehaviorEnrichmentsConfig: {
557
+ /** @description Only refresh specific enrichments */
558
+ enrichments?: {
559
+ ids?: string[];
560
+ };
561
+ /**
562
+ * @default enrichments
563
+ * @constant
564
+ */
565
+ target: "enrichments";
566
+ };
567
+ StreamRun: {
568
+ /**
569
+ * Format: date-time
570
+ * @description When the run was canceled
571
+ */
572
+ canceledAt: string | null;
573
+ /**
574
+ * Format: date-time
575
+ * @description When the run completed
576
+ */
577
+ completedAt: string | null;
578
+ /**
579
+ * Format: date-time
580
+ * @description When the run was created
581
+ */
582
+ createdAt: string;
583
+ /**
584
+ * Format: date-time
585
+ * @description When the run failed
586
+ */
587
+ failedAt: string | null;
588
+ /** @description The unique identifier for the Stream Run */
589
+ id: string;
590
+ /**
591
+ * @description The type of object
592
+ * @enum {string}
593
+ */
594
+ object: StreamRunObject;
595
+ /**
596
+ * @description The status of the Stream Run
597
+ * @enum {string}
598
+ */
599
+ status: StreamRunStatus;
600
+ /** @description The stream that the run is associated with */
601
+ streamId: string;
602
+ /**
603
+ * @description The type of the Stream Run
604
+ * @enum {string}
605
+ */
606
+ type: StreamRunType;
607
+ /**
608
+ * Format: date-time
609
+ * @description When the run was last updated
610
+ */
611
+ updatedAt: string;
612
+ };
613
+ UpdateStream: {
614
+ metadata?: {
615
+ [key: string]: string;
616
+ };
617
+ /**
618
+ * @description The status of the stream.
619
+ * @enum {string}
620
+ */
621
+ status?: UpdateStreamStatus;
622
+ };
423
623
  UpdateWebhookParameters: {
424
624
  /** @description The events to trigger the webhook */
425
- events?: components["schemas"]["EventType"][];
625
+ events?: components$1["schemas"]["EventType"][];
426
626
  /** @description Set of key-value pairs you want to associate with this object. */
427
627
  metadata?: {
428
628
  [key: string]: string;
@@ -446,7 +646,7 @@ interface components {
446
646
  */
447
647
  createdAt: string;
448
648
  /** @description The events to trigger the webhook */
449
- events: components["schemas"]["EventType"][];
649
+ events: components$1["schemas"]["EventType"][];
450
650
  /** @description The unique identifier for the webhook */
451
651
  id: string;
452
652
  /**
@@ -524,7 +724,7 @@ interface components {
524
724
  */
525
725
  createdAt: string;
526
726
  /** @description The Enrichments to apply to the Webset Items. */
527
- enrichments: components["schemas"]["WebsetEnrichment"][];
727
+ enrichments: components$1["schemas"]["WebsetEnrichment"][];
528
728
  /** @description The external identifier for the webset */
529
729
  externalId: string | null;
530
730
  /** @description The unique identifier for the webset */
@@ -542,13 +742,15 @@ interface components {
542
742
  */
543
743
  object: "webset";
544
744
  /** @description The searches that have been performed on the webset. */
545
- searches: components["schemas"]["WebsetSearch"][];
745
+ searches: components$1["schemas"]["WebsetSearch"][];
546
746
  /**
547
747
  * WebsetStatus
548
748
  * @description The status of the webset
549
749
  * @enum {string}
550
750
  */
551
751
  status: WebsetStatus;
752
+ /** @description The Streams for the Webset. */
753
+ streams: components$1["schemas"]["Stream"][];
552
754
  /**
553
755
  * Format: date-time
554
756
  * @description The date and time the webset was updated
@@ -589,7 +791,7 @@ interface components {
589
791
  /** @description The description of the enrichment task provided during the creation of the enrichment. */
590
792
  description: string;
591
793
  /** @description The format of the enrichment response. */
592
- format: components["schemas"]["WebsetEnrichmentFormat"];
794
+ format: WebsetEnrichmentFormat;
593
795
  /** @description The unique identifier for the enrichment */
594
796
  id: string;
595
797
  /** @description The instructions for the enrichment Agent.
@@ -635,8 +837,7 @@ interface components {
635
837
  websetId: string;
636
838
  };
637
839
  /** @enum {string} */
638
- WebsetEnrichmentFormat: WebsetEnrichmentFormat;
639
- WebsetEntity: components["schemas"]["WebsetCompanyEntity"] | components["schemas"]["WebsetPersonEntity"] | components["schemas"]["WebsetArticleEntity"] | components["schemas"]["WebsetResearchPaperEntity"] | components["schemas"]["WebsetCustomEntity"];
840
+ WebsetEntity: components$1["schemas"]["WebsetCompanyEntity"] | components$1["schemas"]["WebsetPersonEntity"] | components$1["schemas"]["WebsetArticleEntity"] | components$1["schemas"]["WebsetResearchPaperEntity"] | components$1["schemas"]["WebsetCustomEntity"];
640
841
  WebsetItem: {
641
842
  /**
642
843
  * Format: date-time
@@ -644,9 +845,9 @@ interface components {
644
845
  */
645
846
  createdAt: string;
646
847
  /** @description The enrichments results of the Webset item */
647
- enrichments: components["schemas"]["EnrichmentResult"][] | null;
848
+ enrichments: components$1["schemas"]["EnrichmentResult"][] | null;
648
849
  /** @description The criteria evaluations of the item */
649
- evaluations: components["schemas"]["WebsetItemEvaluation"][];
850
+ evaluations: components$1["schemas"]["WebsetItemEvaluation"][];
650
851
  /** @description The unique identifier for the Webset Item */
651
852
  id: string;
652
853
  /**
@@ -655,7 +856,7 @@ interface components {
655
856
  */
656
857
  object: "webset_item";
657
858
  /** @description The properties of the Item */
658
- properties: components["schemas"]["WebsetItemPersonProperties"] | components["schemas"]["WebsetItemCompanyProperties"] | components["schemas"]["WebsetItemArticleProperties"] | components["schemas"]["WebsetItemResearchPaperProperties"] | components["schemas"]["WebsetItemCustomProperties"];
859
+ properties: components$1["schemas"]["WebsetItemPersonProperties"] | components$1["schemas"]["WebsetItemCompanyProperties"] | components$1["schemas"]["WebsetItemArticleProperties"] | components$1["schemas"]["WebsetItemResearchPaperProperties"] | components$1["schemas"]["WebsetItemCustomProperties"];
659
860
  /**
660
861
  * @description The source of the Item
661
862
  * @enum {string}
@@ -840,16 +1041,21 @@ interface components {
840
1041
  type: "research_paper";
841
1042
  };
842
1043
  WebsetSearch: {
1044
+ /**
1045
+ * @description The behavior of the search when it is added to a Webset.
1046
+ *
1047
+ * - `override`: the search will replace the existing Items found in the Webset and evaluate them against the new criteria. Any Items that don't match the new criteria will be discarded.
1048
+ * - `append`: the search will add the new Items found to the existing Webset. Any Items that don't match the new criteria will be discarded.
1049
+ * @default override
1050
+ */
1051
+ behavior: WebsetSearchBehavior;
843
1052
  /**
844
1053
  * Format: date-time
845
1054
  * @description The date and time the search was canceled
846
1055
  */
847
1056
  canceledAt: string | null;
848
- /**
849
- * @description The reason the search was canceled
850
- * @enum {string|null}
851
- */
852
- canceledReason: WebsetSearchCanceledReason;
1057
+ /** @description The reason the search was canceled */
1058
+ canceledReason: WebsetSearchCanceledReason | null;
853
1059
  /** @description The number of results the search will attempt to find. The actual number of results may be less than this number depending on the search complexity. */
854
1060
  count: number;
855
1061
  /**
@@ -867,7 +1073,7 @@ interface components {
867
1073
  /** @description The entity the search will return results for.
868
1074
  *
869
1075
  * When no entity is provided during creation, we will automatically select the best entity based on the query. */
870
- entity: components["schemas"]["WebsetEntity"];
1076
+ entity: components$1["schemas"]["WebsetEntity"];
871
1077
  /** @description The unique identifier for the search */
872
1078
  id: string;
873
1079
  /**
@@ -910,26 +1116,32 @@ interface components {
910
1116
  headers: never;
911
1117
  pathItems: never;
912
1118
  }
913
- type CreateEnrichmentParameters = components["schemas"]["CreateEnrichmentParameters"];
914
- type CreateWebhookParameters = components["schemas"]["CreateWebhookParameters"];
915
- type CreateWebsetParameters = components["schemas"]["CreateWebsetParameters"];
916
- type CreateWebsetSearchParameters = components["schemas"]["CreateWebsetSearchParameters"];
917
- type EnrichmentResult = components["schemas"]["EnrichmentResult"];
918
- type Event = components["schemas"]["Event"];
919
- type GetWebsetResponse = components["schemas"]["GetWebsetResponse"];
920
- type ListEventsResponse = components["schemas"]["ListEventsResponse"];
921
- type ListWebhookAttemptsResponse = components["schemas"]["ListWebhookAttemptsResponse"];
922
- type ListWebhooksResponse = components["schemas"]["ListWebhooksResponse"];
923
- type ListWebsetItemResponse = components["schemas"]["ListWebsetItemResponse"];
924
- type ListWebsetsResponse = components["schemas"]["ListWebsetsResponse"];
925
- type UpdateWebhookParameters = components["schemas"]["UpdateWebhookParameters"];
926
- type UpdateWebsetRequest = components["schemas"]["UpdateWebsetRequest"];
927
- type Webhook = components["schemas"]["Webhook"];
928
- type WebhookAttempt = components["schemas"]["WebhookAttempt"];
929
- type Webset = components["schemas"]["Webset"];
930
- type WebsetEnrichment = components["schemas"]["WebsetEnrichment"];
931
- type WebsetItem = components["schemas"]["WebsetItem"];
932
- type WebsetSearch = components["schemas"]["WebsetSearch"];
1119
+ type CreateEnrichmentParameters = components$1["schemas"]["CreateEnrichmentParameters"];
1120
+ type CreateStreamParameters = components$1["schemas"]["CreateStreamParameters"];
1121
+ type CreateWebhookParameters = components$1["schemas"]["CreateWebhookParameters"];
1122
+ type CreateWebsetParameters = components$1["schemas"]["CreateWebsetParameters"];
1123
+ type CreateWebsetSearchParameters = components$1["schemas"]["CreateWebsetSearchParameters"];
1124
+ type EnrichmentResult = components$1["schemas"]["EnrichmentResult"];
1125
+ type Event = components$1["schemas"]["Event"];
1126
+ type GetWebsetResponse = components$1["schemas"]["GetWebsetResponse"];
1127
+ type ListEventsResponse = components$1["schemas"]["ListEventsResponse"];
1128
+ type ListStreamRunsResponse = components$1["schemas"]["ListStreamRunsResponse"];
1129
+ type ListStreamsResponse = components$1["schemas"]["ListStreamsResponse"];
1130
+ type ListWebhookAttemptsResponse = components$1["schemas"]["ListWebhookAttemptsResponse"];
1131
+ type ListWebhooksResponse = components$1["schemas"]["ListWebhooksResponse"];
1132
+ type ListWebsetItemResponse = components$1["schemas"]["ListWebsetItemResponse"];
1133
+ type ListWebsetsResponse = components$1["schemas"]["ListWebsetsResponse"];
1134
+ type Stream = components$1["schemas"]["Stream"];
1135
+ type StreamRun = components$1["schemas"]["StreamRun"];
1136
+ type UpdateStream = components$1["schemas"]["UpdateStream"];
1137
+ type UpdateWebhookParameters = components$1["schemas"]["UpdateWebhookParameters"];
1138
+ type UpdateWebsetRequest = components$1["schemas"]["UpdateWebsetRequest"];
1139
+ type Webhook = components$1["schemas"]["Webhook"];
1140
+ type WebhookAttempt = components$1["schemas"]["WebhookAttempt"];
1141
+ type Webset = components$1["schemas"]["Webset"];
1142
+ type WebsetEnrichment = components$1["schemas"]["WebsetEnrichment"];
1143
+ type WebsetItem = components$1["schemas"]["WebsetItem"];
1144
+ type WebsetSearch = components$1["schemas"]["WebsetSearch"];
933
1145
  declare enum CreateEnrichmentParametersFormat {
934
1146
  text = "text",
935
1147
  date = "date",
@@ -938,9 +1150,6 @@ declare enum CreateEnrichmentParametersFormat {
938
1150
  email = "email",
939
1151
  phone = "phone"
940
1152
  }
941
- declare enum CreateWebsetSearchParametersBehaviour {
942
- override = "override"
943
- }
944
1153
  declare enum EventType {
945
1154
  webset_created = "webset.created",
946
1155
  webset_deleted = "webset.deleted",
@@ -955,6 +1164,30 @@ declare enum EventType {
955
1164
  webset_item_created = "webset.item.created",
956
1165
  webset_item_enriched = "webset.item.enriched"
957
1166
  }
1167
+ declare enum StreamObject {
1168
+ stream = "stream"
1169
+ }
1170
+ declare enum StreamStatus {
1171
+ open = "open",
1172
+ closed = "closed"
1173
+ }
1174
+ declare enum StreamRunObject {
1175
+ stream_run = "stream_run"
1176
+ }
1177
+ declare enum StreamRunStatus {
1178
+ created = "created",
1179
+ running = "running",
1180
+ completed = "completed",
1181
+ canceled = "canceled"
1182
+ }
1183
+ declare enum StreamRunType {
1184
+ search = "search",
1185
+ refresh = "refresh"
1186
+ }
1187
+ declare enum UpdateStreamStatus {
1188
+ open = "open",
1189
+ closed = "closed"
1190
+ }
958
1191
  declare enum WebhookStatus {
959
1192
  active = "active",
960
1193
  inactive = "inactive"
@@ -978,23 +1211,28 @@ declare enum WebsetEnrichmentFormat {
978
1211
  phone = "phone"
979
1212
  }
980
1213
  declare enum WebsetItemSource {
981
- search = "search"
1214
+ search = "search",
1215
+ import = "import"
982
1216
  }
983
1217
  declare enum WebsetItemEvaluationSatisfied {
984
1218
  yes = "yes",
985
1219
  no = "no",
986
1220
  unclear = "unclear"
987
1221
  }
988
- declare enum WebsetSearchCanceledReason {
989
- webset_deleted = "webset_deleted",
990
- webset_canceled = "webset_canceled"
991
- }
992
1222
  declare enum WebsetSearchStatus {
993
1223
  created = "created",
994
1224
  running = "running",
995
1225
  completed = "completed",
996
1226
  canceled = "canceled"
997
1227
  }
1228
+ declare enum WebsetSearchBehavior {
1229
+ override = "override",
1230
+ append = "append"
1231
+ }
1232
+ declare enum WebsetSearchCanceledReason {
1233
+ webset_deleted = "webset_deleted",
1234
+ webset_canceled = "webset_canceled"
1235
+ }
998
1236
 
999
1237
  /**
1000
1238
  * Client for managing Webset Enrichments
@@ -1088,21 +1326,21 @@ declare class WebsetItemsClient extends WebsetsBaseClient {
1088
1326
  * @param params - Optional pagination parameters
1089
1327
  * @returns A promise that resolves with the list of Items
1090
1328
  */
1091
- list(websetId: string, params?: PaginationParams): Promise<ListWebsetItemResponse>;
1329
+ list(websetId: string, params?: PaginationParams$1): Promise<ListWebsetItemResponse>;
1092
1330
  /**
1093
1331
  * Iterate through all Items in a Webset, handling pagination automatically
1094
1332
  * @param websetId The ID of the Webset
1095
1333
  * @param options Pagination options
1096
1334
  * @returns Async generator of Webset Items
1097
1335
  */
1098
- listAll(websetId: string, options?: PaginationParams): AsyncGenerator<WebsetItem>;
1336
+ listAll(websetId: string, options?: PaginationParams$1): AsyncGenerator<WebsetItem>;
1099
1337
  /**
1100
1338
  * Collect all items from a Webset into an array
1101
1339
  * @param websetId The ID of the Webset
1102
1340
  * @param options Pagination options
1103
1341
  * @returns Promise resolving to an array of all Webset Items
1104
1342
  */
1105
- getAll(websetId: string, options?: PaginationParams): Promise<WebsetItem[]>;
1343
+ getAll(websetId: string, options?: PaginationParams$1): Promise<WebsetItem[]>;
1106
1344
  /**
1107
1345
  * Get an Item by ID
1108
1346
  * @param websetId The ID of the Webset
@@ -1150,6 +1388,80 @@ declare class WebsetSearchesClient extends WebsetsBaseClient {
1150
1388
  cancel(websetId: string, id: string): Promise<WebsetSearch>;
1151
1389
  }
1152
1390
 
1391
+ /**
1392
+ * Client for managing Webset Streams
1393
+ */
1394
+
1395
+ /**
1396
+ * Options for listing streams
1397
+ */
1398
+ interface ListStreamsOptions extends PaginationParams$1 {
1399
+ /**
1400
+ * The id of the Webset to list streams for
1401
+ */
1402
+ websetId?: string;
1403
+ }
1404
+ /**
1405
+ * Client for managing Stream Runs
1406
+ */
1407
+ declare class WebsetStreamRunsClient extends WebsetsBaseClient {
1408
+ /**
1409
+ * List all runs for a Stream
1410
+ * @param streamId The ID of the Stream
1411
+ * @param options Pagination options
1412
+ * @returns The list of Stream runs
1413
+ */
1414
+ list(streamId: string, options?: PaginationParams$1): Promise<ListStreamRunsResponse>;
1415
+ /**
1416
+ * Get a specific Stream run
1417
+ * @param streamId The ID of the Stream
1418
+ * @param runId The ID of the Stream run
1419
+ * @returns The Stream run
1420
+ */
1421
+ get(streamId: string, runId: string): Promise<StreamRun>;
1422
+ }
1423
+ /**
1424
+ * Client for managing Webset Streams
1425
+ */
1426
+ declare class WebsetStreamsClient extends WebsetsBaseClient {
1427
+ /**
1428
+ * Client for managing Stream Runs
1429
+ */
1430
+ runs: WebsetStreamRunsClient;
1431
+ constructor(client: Exa);
1432
+ /**
1433
+ * Create a Stream
1434
+ * @param params The stream parameters
1435
+ * @returns The created Stream
1436
+ */
1437
+ create(params: CreateStreamParameters): Promise<Stream>;
1438
+ /**
1439
+ * Get a Stream by ID
1440
+ * @param id The ID of the Stream
1441
+ * @returns The Stream
1442
+ */
1443
+ get(id: string): Promise<Stream>;
1444
+ /**
1445
+ * List all Streams
1446
+ * @param options Pagination and filtering options
1447
+ * @returns The list of Streams
1448
+ */
1449
+ list(options?: ListStreamsOptions): Promise<ListStreamsResponse>;
1450
+ /**
1451
+ * Update a Stream
1452
+ * @param id The ID of the Stream
1453
+ * @param params The stream update parameters (status, metadata)
1454
+ * @returns The updated Stream
1455
+ */
1456
+ update(id: string, params: UpdateStream): Promise<Stream>;
1457
+ /**
1458
+ * Delete a Stream
1459
+ * @param id The ID of the Stream
1460
+ * @returns The deleted Stream
1461
+ */
1462
+ delete(id: string): Promise<Stream>;
1463
+ }
1464
+
1153
1465
  /**
1154
1466
  * Client for managing Webset Webhooks
1155
1467
  */
@@ -1157,12 +1469,12 @@ declare class WebsetSearchesClient extends WebsetsBaseClient {
1157
1469
  /**
1158
1470
  * Options for listing webhooks (only pagination is supported by API)
1159
1471
  */
1160
- interface ListWebhooksOptions extends PaginationParams {
1472
+ interface ListWebhooksOptions extends PaginationParams$1 {
1161
1473
  }
1162
1474
  /**
1163
1475
  * Options for listing webhook attempts
1164
1476
  */
1165
- interface ListWebhookAttemptsOptions extends PaginationParams {
1477
+ interface ListWebhookAttemptsOptions extends PaginationParams$1 {
1166
1478
  /**
1167
1479
  * The type of event to filter by
1168
1480
  */
@@ -1245,7 +1557,7 @@ declare class WebsetWebhooksClient extends WebsetsBaseClient {
1245
1557
  /**
1246
1558
  * Options for listing Websets (API only supports pagination)
1247
1559
  */
1248
- interface ListWebsetsOptions extends PaginationParams {
1560
+ interface ListWebsetsOptions extends PaginationParams$1 {
1249
1561
  }
1250
1562
  /**
1251
1563
  * Client for managing Websets
@@ -1267,6 +1579,10 @@ declare class WebsetsClient extends WebsetsBaseClient {
1267
1579
  * Client for managing Webset Enrichments
1268
1580
  */
1269
1581
  enrichments: WebsetEnrichmentsClient;
1582
+ /**
1583
+ * Client for managing Webset Streams
1584
+ */
1585
+ streams: WebsetStreamsClient;
1270
1586
  /**
1271
1587
  * Client for managing Webset Webhooks
1272
1588
  */
@@ -1340,6 +1656,101 @@ declare class WebsetsClient extends WebsetsBaseClient {
1340
1656
  } | number): Promise<Webset>;
1341
1657
  }
1342
1658
 
1659
+ interface components {
1660
+ schemas: {
1661
+ ListResearchTasksRequestDto: {
1662
+ /** @description The cursor to paginate through the results */
1663
+ cursor?: string;
1664
+ /**
1665
+ * @description The number of results to return
1666
+ * @default 25
1667
+ */
1668
+ limit: number;
1669
+ };
1670
+ ListResearchTasksResponseDto: {
1671
+ /** @description The list of research tasks */
1672
+ data: components["schemas"]["ResearchTaskDto"][];
1673
+ /** @description Whether there are more results to paginate through */
1674
+ hasMore: boolean;
1675
+ /** @description The cursor to paginate through the next set of results */
1676
+ nextCursor: string | null;
1677
+ };
1678
+ ResearchCreateTaskRequestDto: {
1679
+ /** @description Instructions for what the research task should accomplish */
1680
+ instructions: string;
1681
+ /**
1682
+ * @default exa-research
1683
+ * @enum {string}
1684
+ */
1685
+ model: ResearchCreateTaskRequestDtoModel;
1686
+ output?: {
1687
+ /** @description A JsonSchema specification of the desired output. See https://json-schema.org/draft-07. */
1688
+ schema?: unknown;
1689
+ };
1690
+ };
1691
+ ResearchCreateTaskResponseDto: {
1692
+ /** @description The unique identifier for the research task */
1693
+ id: string;
1694
+ };
1695
+ ResearchTaskDto: {
1696
+ /** @description Citations grouped by the root field they were used in */
1697
+ citations?: {
1698
+ [key: string]: {
1699
+ id: string;
1700
+ snippet: string;
1701
+ title?: string;
1702
+ url: string;
1703
+ }[];
1704
+ };
1705
+ /** @description The research results data conforming to the specified schema */
1706
+ data?: {
1707
+ [key: string]: unknown;
1708
+ };
1709
+ /** @description The unique identifier for the research task */
1710
+ id: string;
1711
+ /** @description The instructions or query for the research task */
1712
+ instructions: string;
1713
+ /** @description The JSON schema specification for the expected output format */
1714
+ schema?: {
1715
+ [key: string]: unknown;
1716
+ };
1717
+ /**
1718
+ * @description The current status of the research task
1719
+ * @enum {string}
1720
+ */
1721
+ status: ResearchTaskDtoStatus;
1722
+ };
1723
+ };
1724
+ responses: never;
1725
+ parameters: never;
1726
+ requestBodies: never;
1727
+ headers: never;
1728
+ pathItems: never;
1729
+ }
1730
+ type SchemaListResearchTasksResponseDto = components["schemas"]["ListResearchTasksResponseDto"];
1731
+ type SchemaResearchCreateTaskResponseDto = components["schemas"]["ResearchCreateTaskResponseDto"];
1732
+ type SchemaResearchTaskDto = components["schemas"]["ResearchTaskDto"];
1733
+ declare enum ResearchCreateTaskRequestDtoModel {
1734
+ exa_research = "exa-research",
1735
+ exa_ultra = "exa-ultra"
1736
+ }
1737
+ declare enum ResearchTaskDtoStatus {
1738
+ running = "running",
1739
+ completed = "completed",
1740
+ failed = "failed"
1741
+ }
1742
+
1743
+ interface PaginationParams {
1744
+ /** Cursor for pagination */
1745
+ cursor?: string;
1746
+ /** Maximum number of items per page */
1747
+ limit?: number;
1748
+ }
1749
+ /**
1750
+ * Options for listing research tasks (API only supports pagination)
1751
+ */
1752
+ type ListResearchTasksOptions = PaginationParams;
1753
+
1343
1754
  type QueryParams = Record<string, string | number | boolean | string[] | undefined>;
1344
1755
  interface RequestBody {
1345
1756
  [key: string]: unknown;
@@ -1363,6 +1774,12 @@ declare class ResearchBaseClient {
1363
1774
  * @returns The parsed JSON response
1364
1775
  */
1365
1776
  protected request<T = unknown>(endpoint: string, method?: string, data?: RequestBody, params?: QueryParams): Promise<T>;
1777
+ /**
1778
+ * Helper to build pagination parameters.
1779
+ * @param pagination The pagination parameters
1780
+ * @returns QueryParams object with pagination parameters
1781
+ */
1782
+ protected buildPaginationParams(pagination?: PaginationParams): QueryParams;
1366
1783
  }
1367
1784
 
1368
1785
  /**
@@ -1371,71 +1788,39 @@ declare class ResearchBaseClient {
1371
1788
  declare class ResearchClient extends ResearchBaseClient {
1372
1789
  constructor(client: Exa);
1373
1790
  /**
1374
- * Create a research task.
1791
+ * Create a new research task.
1375
1792
  *
1376
- * Both parameters are required and have fixed shapes:
1377
- * 1. `input`
1378
- * `{ instructions: string }`
1379
- * `instructions` High-level guidance that tells the research agent what to do.
1380
- * 2. `output`
1381
- * defines the exact structure you expect back, and guides the research conducted by the agent.
1382
- * `{ schema: JSONSchema }`.
1383
- * The agent's response will be validated against this schema.
1793
+ * @param params Object containing:
1794
+ * - model: The research model to use (e.g., ResearchModel.ExaResearch).
1795
+ * - instructions: High-level guidance for the research agent.
1796
+ * - output: An object with a `schema` property (JSONSchema) that defines the expected output structure.
1384
1797
  *
1385
- * @param input Object containing high-level research instructions.
1386
- * @param output Object containing the expected output schema.
1387
- * @returns The ResearchTaskResponse returned by the API.
1798
+ * @returns An object containing the unique ID of the created research task.
1388
1799
  */
1389
- createTask(input: {
1800
+ createTask(params: {
1390
1801
  instructions: string;
1391
- }, output: {
1392
- schema: JSONSchema;
1393
- }): Promise<{
1394
- id: string;
1395
- }>;
1802
+ model?: ResearchCreateTaskRequestDtoModel;
1803
+ output: {
1804
+ schema: JSONSchema;
1805
+ };
1806
+ }): Promise<SchemaResearchCreateTaskResponseDto>;
1396
1807
  /**
1397
1808
  * Retrieve a research task by ID.
1398
1809
  */
1399
- getTask(id: string): Promise<ResearchTask>;
1810
+ getTask(id: string): Promise<SchemaResearchTaskDto>;
1400
1811
  /**
1401
1812
  * Poll a research task until completion or failure.
1402
1813
  * Polls every 1 second with a maximum timeout of 10 minutes.
1814
+ * Resilient to up to 10 consecutive polling failures.
1403
1815
  */
1404
- pollTask(id: string): Promise<ResearchTask>;
1405
- }
1406
-
1407
- /**
1408
- * Enum representing the status of a research task.
1409
- */
1410
- declare enum ResearchStatus {
1411
- /** The research task is still in progress. */
1412
- in_progress = "in_progress",
1413
- /** The research request has finished successfully. */
1414
- completed = "completed",
1415
- /** The research task request failed. */
1416
- failed = "failed"
1816
+ pollTask(id: string): Promise<SchemaResearchTaskDto>;
1817
+ /**
1818
+ * List research tasks
1819
+ * @param options Pagination options
1820
+ * @returns The paginated list of research tasks
1821
+ */
1822
+ listTasks(options?: ListResearchTasksOptions): Promise<SchemaListResearchTasksResponseDto>;
1417
1823
  }
1418
- /**
1419
- * Response object returned from the research API.
1420
- */
1421
- type ResearchTask = {
1422
- /** Unique identifier for the task. */
1423
- id: string;
1424
- /** Current status. */
1425
- status: ResearchStatus;
1426
- /** The original instructions provided along with the task. */
1427
- instructions: string;
1428
- /** The original schema defining the task */
1429
- schema: Record<string, any>;
1430
- /** Structured output that follows the user-provided schema (null while running or if failed). */
1431
- data: Record<string, any> | null;
1432
- /**
1433
- * Citations collected while deriving each top-level field in `output`.
1434
- * The key is the field name, the value is the list of `SearchResult`s that
1435
- * were used to compute that field.
1436
- */
1437
- citations: Record<string, SearchResult<{}>[]>;
1438
- };
1439
1824
 
1440
1825
  /**
1441
1826
  * HTTP status codes
@@ -1914,4 +2299,4 @@ declare class Exa {
1914
2299
  private parseSSEStream;
1915
2300
  }
1916
2301
 
1917
- export { type AnswerOptions, type AnswerResponse, type AnswerStreamChunk, type AnswerStreamResponse, type BaseSearchOptions, type ContentsOptions, type ContentsResultComponent, type CostDollars, type CostDollarsContents, type CostDollarsSeearch, type CreateEnrichmentParameters, CreateEnrichmentParametersFormat, type CreateWebhookParameters, type CreateWebsetParameters, type CreateWebsetSearchParameters, CreateWebsetSearchParametersBehaviour, type Default, type EnrichmentResult, type Event, EventType, Exa, ExaError, type ExtrasOptions, type ExtrasResponse, type FindSimilarOptions, type GetWebsetResponse, type HighlightsContentsOptions, type HighlightsResponse, HttpStatusCode, type JSONSchema, type ListEventsResponse, type ListWebhooksOptions, type ListWebhooksResponse, type ListWebsetItemResponse, type ListWebsetsOptions, type ListWebsetsResponse, type LivecrawlOptions, type RegularSearchOptions, ResearchClient, ResearchStatus, type ResearchTask, type SearchResponse, type SearchResult, type SubpagesResponse, type SummaryContentsOptions, type SummaryResponse, type TextContentsOptions, type TextResponse, type UpdateWebhookParameters, type UpdateWebsetRequest, type Webhook, WebhookStatus, type Webset, type WebsetEnrichment, WebsetEnrichmentFormat, WebsetEnrichmentStatus, WebsetEnrichmentsClient, type WebsetItem, WebsetItemEvaluationSatisfied, WebsetItemSource, WebsetItemsClient, type WebsetSearch, WebsetSearchCanceledReason, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, Exa as default };
2302
+ export { type AnswerOptions, type AnswerResponse, type AnswerStreamChunk, type AnswerStreamResponse, type BaseSearchOptions, type ContentsOptions, type ContentsResultComponent, type CostDollars, type CostDollarsContents, type CostDollarsSeearch, type CreateEnrichmentParameters, CreateEnrichmentParametersFormat, type CreateStreamParameters, type CreateWebhookParameters, type CreateWebsetParameters, type CreateWebsetSearchParameters, type Default, type EnrichmentResult, type Event, EventType, Exa, ExaError, type ExtrasOptions, type ExtrasResponse, type FindSimilarOptions, type GetWebsetResponse, type HighlightsContentsOptions, type HighlightsResponse, HttpStatusCode, type JSONSchema, type ListEventsResponse, type ListResearchTasksOptions, type SchemaListResearchTasksResponseDto as ListResearchTasksResponse, type ListStreamRunsResponse, type ListStreamsOptions, type ListStreamsResponse, type ListWebhooksOptions, type ListWebhooksResponse, type ListWebsetItemResponse, type ListWebsetsOptions, type ListWebsetsResponse, type LivecrawlOptions, type RegularSearchOptions, ResearchClient, ResearchCreateTaskRequestDtoModel as ResearchModel, ResearchTaskDtoStatus as ResearchStatus, type SchemaResearchTaskDto as ResearchTask, type SearchResponse, type SearchResult, type Stream, type StreamRun, type SubpagesResponse, type SummaryContentsOptions, type SummaryResponse, type TextContentsOptions, type TextResponse, type UpdateStream, UpdateStreamStatus, type UpdateWebhookParameters, type UpdateWebsetRequest, type Webhook, WebhookStatus, type Webset, type WebsetEnrichment, WebsetEnrichmentFormat, WebsetEnrichmentStatus, WebsetEnrichmentsClient, type WebsetItem, WebsetItemEvaluationSatisfied, WebsetItemSource, WebsetItemsClient, type WebsetSearch, WebsetSearchBehavior, WebsetSearchCanceledReason, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetStreamsClient, WebsetWebhooksClient, WebsetsClient, Exa as default };