exa-js 1.9.0 → 1.9.1

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 CHANGED
@@ -253,7 +253,7 @@ interface components$1 {
253
253
  /** @description The ID of the source to search. */
254
254
  id: string;
255
255
  /** @enum {string} */
256
- source: CreateWebsetParametersImportSource;
256
+ source: WebsetImportSource;
257
257
  }[];
258
258
  /** @description Set of key-value pairs you want to associate with this object. */
259
259
  metadata?: {
@@ -281,7 +281,7 @@ interface components$1 {
281
281
  /** @description The ID of the source to exclude. */
282
282
  id: string;
283
283
  /** @enum {string} */
284
- source: CreateWebsetParametersSearchExcludeSource;
284
+ source: WebsetSearchExcludeSource;
285
285
  }[];
286
286
  /** @description Natural language search query describing what you are looking for.
287
287
  *
@@ -302,7 +302,7 @@ interface components$1 {
302
302
  limit: number;
303
303
  };
304
304
  /** @enum {string} */
305
- source: CreateWebsetSearchParametersScopeSource;
305
+ source: WebsetSearchScopeSource;
306
306
  }[];
307
307
  };
308
308
  };
@@ -314,7 +314,7 @@ interface components$1 {
314
314
  * - **append**: Add new items to existing ones, keeping items that match the new criteria
315
315
  * @default override
316
316
  */
317
- behavior: components$1["schemas"]["WebsetSearchBehavior"];
317
+ behavior: WebsetSearchBehavior;
318
318
  /** @description Number of Items the Search will attempt to find.
319
319
  *
320
320
  * The actual number of Items found may be less than this number depending on the query complexity. */
@@ -332,7 +332,7 @@ interface components$1 {
332
332
  /** @description The ID of the source to exclude. */
333
333
  id: string;
334
334
  /** @enum {string} */
335
- source: CreateWebsetSearchParametersExcludeSource;
335
+ source: WebsetSearchExcludeSource;
336
336
  }[];
337
337
  /** @description Set of key-value pairs you want to associate with this object. */
338
338
  metadata?: {
@@ -357,7 +357,7 @@ interface components$1 {
357
357
  limit: number;
358
358
  };
359
359
  /** @enum {string} */
360
- source: CreateWebsetSearchParametersScopeSource;
360
+ source: WebsetSearchScopeSource;
361
361
  }[];
362
362
  };
363
363
  /** Custom */
@@ -592,6 +592,139 @@ interface components$1 {
592
592
  * @constant
593
593
  */
594
594
  type: "webset.search.completed";
595
+ } | {
596
+ /**
597
+ * Format: date-time
598
+ * @description The date and time the event was created
599
+ */
600
+ createdAt: string;
601
+ data: components$1["schemas"]["Import"];
602
+ /** @description The unique identifier for the event */
603
+ id: string;
604
+ /**
605
+ * @default event
606
+ * @constant
607
+ */
608
+ object: "event";
609
+ /**
610
+ * @default import.created
611
+ * @constant
612
+ */
613
+ type: "import.created";
614
+ } | {
615
+ /**
616
+ * Format: date-time
617
+ * @description The date and time the event was created
618
+ */
619
+ createdAt: string;
620
+ data: components$1["schemas"]["Import"];
621
+ /** @description The unique identifier for the event */
622
+ id: string;
623
+ /**
624
+ * @default event
625
+ * @constant
626
+ */
627
+ object: "event";
628
+ /**
629
+ * @default import.completed
630
+ * @constant
631
+ */
632
+ type: "import.completed";
633
+ } | {
634
+ /**
635
+ * Format: date-time
636
+ * @description The date and time the event was created
637
+ */
638
+ createdAt: string;
639
+ data: components$1["schemas"]["Monitor"];
640
+ /** @description The unique identifier for the event */
641
+ id: string;
642
+ /**
643
+ * @default event
644
+ * @constant
645
+ */
646
+ object: "event";
647
+ /**
648
+ * @default monitor.created
649
+ * @constant
650
+ */
651
+ type: "monitor.created";
652
+ } | {
653
+ /**
654
+ * Format: date-time
655
+ * @description The date and time the event was created
656
+ */
657
+ createdAt: string;
658
+ data: components$1["schemas"]["Monitor"];
659
+ /** @description The unique identifier for the event */
660
+ id: string;
661
+ /**
662
+ * @default event
663
+ * @constant
664
+ */
665
+ object: "event";
666
+ /**
667
+ * @default monitor.updated
668
+ * @constant
669
+ */
670
+ type: "monitor.updated";
671
+ } | {
672
+ /**
673
+ * Format: date-time
674
+ * @description The date and time the event was created
675
+ */
676
+ createdAt: string;
677
+ data: components$1["schemas"]["Monitor"];
678
+ /** @description The unique identifier for the event */
679
+ id: string;
680
+ /**
681
+ * @default event
682
+ * @constant
683
+ */
684
+ object: "event";
685
+ /**
686
+ * @default monitor.deleted
687
+ * @constant
688
+ */
689
+ type: "monitor.deleted";
690
+ } | {
691
+ /**
692
+ * Format: date-time
693
+ * @description The date and time the event was created
694
+ */
695
+ createdAt: string;
696
+ data: components$1["schemas"]["MonitorRun"];
697
+ /** @description The unique identifier for the event */
698
+ id: string;
699
+ /**
700
+ * @default event
701
+ * @constant
702
+ */
703
+ object: "event";
704
+ /**
705
+ * @default monitor.run.created
706
+ * @constant
707
+ */
708
+ type: "monitor.run.created";
709
+ } | {
710
+ /**
711
+ * Format: date-time
712
+ * @description The date and time the event was created
713
+ */
714
+ createdAt: string;
715
+ data: components$1["schemas"]["MonitorRun"];
716
+ /** @description The unique identifier for the event */
717
+ id: string;
718
+ /**
719
+ * @default event
720
+ * @constant
721
+ */
722
+ object: "event";
723
+ /**
724
+ * @default monitor.run.completed
725
+ * @constant
726
+ */
727
+ type: "monitor.run.completed";
595
728
  };
596
729
  /** @enum {string} */
597
730
  EventType: EventType;
@@ -911,7 +1044,7 @@ interface components$1 {
911
1044
  * @description Format of the enrichment.
912
1045
  * @enum {string}
913
1046
  */
914
- format: PreviewWebsetResponseEnrichmentsFormat;
1047
+ format: WebsetEnrichmentFormat;
915
1048
  /** @description When format is options, the options detected from the query. */
916
1049
  options?: {
917
1050
  /** @description Label of the option. */
@@ -935,6 +1068,26 @@ interface components$1 {
935
1068
  */
936
1069
  type: "research_paper";
937
1070
  };
1071
+ UpdateEnrichmentParameters: {
1072
+ /** @description Provide a description of the enrichment task you want to perform to each Webset Item. */
1073
+ description?: string;
1074
+ /**
1075
+ * @description Format of the enrichment response.
1076
+ *
1077
+ * We automatically select the best format based on the description. If you want to explicitly specify the format, you can do so here.
1078
+ * @enum {string}
1079
+ */
1080
+ format?: WebsetEnrichmentFormat;
1081
+ /** @description Set of key-value pairs you want to associate with this object. */
1082
+ metadata?: {
1083
+ [key: string]: string;
1084
+ } | null;
1085
+ /** @description When the format is options, the different options for the enrichment agent to choose from. */
1086
+ options?: {
1087
+ /** @description The label of the option */
1088
+ label: string;
1089
+ }[];
1090
+ };
938
1091
  UpdateImport: {
939
1092
  metadata?: {
940
1093
  [key: string]: string;
@@ -1027,7 +1180,7 @@ interface components$1 {
1027
1180
  * @description The type of event
1028
1181
  * @enum {string}
1029
1182
  */
1030
- eventType: WebhookAttemptEventType;
1183
+ eventType: EventType;
1031
1184
  /** @description The unique identifier for the webhook attempt */
1032
1185
  id: string;
1033
1186
  /**
@@ -1364,14 +1517,14 @@ interface components$1 {
1364
1517
  * - `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.
1365
1518
  * @default override
1366
1519
  */
1367
- behavior: components$1["schemas"]["WebsetSearchBehavior"];
1520
+ behavior: WebsetSearchBehavior;
1368
1521
  /**
1369
1522
  * Format: date-time
1370
1523
  * @description The date and time the search was canceled
1371
1524
  */
1372
1525
  canceledAt: string | null;
1373
1526
  /** @description The reason the search was canceled */
1374
- canceledReason: components$1["schemas"]["WebsetSearchCanceledReason"];
1527
+ canceledReason: WebsetSearchCanceledReason;
1375
1528
  /** @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. */
1376
1529
  count: number;
1377
1530
  /**
@@ -1448,11 +1601,13 @@ interface components$1 {
1448
1601
  * If provided during creation, the search will only be performed on the sources provided. */
1449
1602
  scope: {
1450
1603
  id: string;
1451
- /**
1452
- * @default import
1453
- * @enum {string}
1454
- */
1455
- source: ScopeSourceType;
1604
+ relationship?: {
1605
+ /** @description What the relationship of the entities you hope to find is relative to the entities contained in the provided source. */
1606
+ definition: string;
1607
+ limit: number;
1608
+ };
1609
+ /** @enum {string} */
1610
+ source: WebsetSearchScopeSource;
1456
1611
  }[];
1457
1612
  /**
1458
1613
  * WebsetSearchStatus
@@ -1468,10 +1623,6 @@ interface components$1 {
1468
1623
  /** @description The unique identifier for the Webset this search belongs to */
1469
1624
  websetId: string;
1470
1625
  };
1471
- /** @enum {string} */
1472
- WebsetSearchBehavior: WebsetSearchBehavior;
1473
- /** @enum {string} */
1474
- WebsetSearchCanceledReason: WebsetSearchCanceledReason;
1475
1626
  };
1476
1627
  responses: never;
1477
1628
  parameters: never;
@@ -1511,6 +1662,7 @@ type PersonEntity = components$1["schemas"]["PersonEntity"];
1511
1662
  type PreviewWebsetParameters = components$1["schemas"]["PreviewWebsetParameters"];
1512
1663
  type PreviewWebsetResponse = components$1["schemas"]["PreviewWebsetResponse"];
1513
1664
  type ResearchPaperEntity = components$1["schemas"]["ResearchPaperEntity"];
1665
+ type UpdateEnrichmentParameters = components$1["schemas"]["UpdateEnrichmentParameters"];
1514
1666
  type UpdateImport = components$1["schemas"]["UpdateImport"];
1515
1667
  type UpdateMonitor = components$1["schemas"]["UpdateMonitor"];
1516
1668
  type UpdateWebhookParameters = components$1["schemas"]["UpdateWebhookParameters"];
@@ -1533,7 +1685,8 @@ declare enum CreateEnrichmentParametersFormat {
1533
1685
  number = "number",
1534
1686
  options = "options",
1535
1687
  email = "email",
1536
- phone = "phone"
1688
+ phone = "phone",
1689
+ url = "url"
1537
1690
  }
1538
1691
  declare enum CreateImportParametersFormat {
1539
1692
  csv = "csv"
@@ -1556,23 +1709,7 @@ declare enum CreateImportResponseStatus {
1556
1709
  completed = "completed",
1557
1710
  failed = "failed"
1558
1711
  }
1559
- declare enum CreateWebsetParametersImportSource {
1560
- import = "import",
1561
- webset = "webset"
1562
- }
1563
- declare enum CreateWebsetParametersSearchExcludeSource {
1564
- import = "import",
1565
- webset = "webset"
1566
- }
1567
- declare enum ScopeSourceType {
1568
- import = "import",
1569
- webset = "webset"
1570
- }
1571
- declare enum CreateWebsetSearchParametersExcludeSource {
1572
- import = "import",
1573
- webset = "webset"
1574
- }
1575
- declare enum CreateWebsetSearchParametersScopeSource {
1712
+ declare enum WebsetImportSource {
1576
1713
  import = "import",
1577
1714
  webset = "webset"
1578
1715
  }
@@ -1592,9 +1729,13 @@ declare enum EventType {
1592
1729
  webset_search_updated = "webset.search.updated",
1593
1730
  import_created = "import.created",
1594
1731
  import_completed = "import.completed",
1595
- import_processing = "import.processing",
1596
1732
  webset_item_created = "webset.item.created",
1597
1733
  webset_item_enriched = "webset.item.enriched",
1734
+ monitor_created = "monitor.created",
1735
+ monitor_updated = "monitor.updated",
1736
+ monitor_deleted = "monitor.deleted",
1737
+ monitor_run_created = "monitor.run.created",
1738
+ monitor_run_completed = "monitor.run.completed",
1598
1739
  webset_export_created = "webset.export.created",
1599
1740
  webset_export_completed = "webset.export.completed"
1600
1741
  }
@@ -1637,14 +1778,6 @@ declare enum MonitorRunType {
1637
1778
  search = "search",
1638
1779
  refresh = "refresh"
1639
1780
  }
1640
- declare enum PreviewWebsetResponseEnrichmentsFormat {
1641
- text = "text",
1642
- date = "date",
1643
- number = "number",
1644
- options = "options",
1645
- email = "email",
1646
- phone = "phone"
1647
- }
1648
1781
  declare enum UpdateMonitorStatus {
1649
1782
  enabled = "enabled",
1650
1783
  disabled = "disabled"
@@ -1653,23 +1786,6 @@ declare enum WebhookStatus {
1653
1786
  active = "active",
1654
1787
  inactive = "inactive"
1655
1788
  }
1656
- declare enum WebhookAttemptEventType {
1657
- webset_created = "webset.created",
1658
- webset_deleted = "webset.deleted",
1659
- webset_paused = "webset.paused",
1660
- webset_idle = "webset.idle",
1661
- webset_search_created = "webset.search.created",
1662
- webset_search_canceled = "webset.search.canceled",
1663
- webset_search_completed = "webset.search.completed",
1664
- webset_search_updated = "webset.search.updated",
1665
- import_created = "import.created",
1666
- import_completed = "import.completed",
1667
- import_processing = "import.processing",
1668
- webset_item_created = "webset.item.created",
1669
- webset_item_enriched = "webset.item.enriched",
1670
- webset_export_created = "webset.export.created",
1671
- webset_export_completed = "webset.export.completed"
1672
- }
1673
1789
  declare enum WebsetStatus {
1674
1790
  idle = "idle",
1675
1791
  pending = "pending",
@@ -1687,7 +1803,8 @@ declare enum WebsetEnrichmentFormat {
1687
1803
  number = "number",
1688
1804
  options = "options",
1689
1805
  email = "email",
1690
- phone = "phone"
1806
+ phone = "phone",
1807
+ url = "url"
1691
1808
  }
1692
1809
  declare enum WebsetItemSource {
1693
1810
  search = "search",
@@ -1707,6 +1824,10 @@ declare enum WebsetSearchRecallExpectedConfidence {
1707
1824
  medium = "medium",
1708
1825
  low = "low"
1709
1826
  }
1827
+ declare enum WebsetSearchScopeSource {
1828
+ import = "import",
1829
+ webset = "webset"
1830
+ }
1710
1831
  declare enum WebsetSearchStatus {
1711
1832
  created = "created",
1712
1833
  pending = "pending",
@@ -1752,6 +1873,14 @@ declare class WebsetEnrichmentsClient extends WebsetsBaseClient {
1752
1873
  * @returns The deleted Webset Enrichment
1753
1874
  */
1754
1875
  delete(websetId: string, id: string): Promise<WebsetEnrichment>;
1876
+ /**
1877
+ * Update an Enrichment
1878
+ * @param websetId The ID of the Webset
1879
+ * @param id The ID of the Enrichment
1880
+ * @param params The enrichment update parameters
1881
+ * @returns Promise that resolves when the update is complete
1882
+ */
1883
+ update(websetId: string, id: string, params: UpdateEnrichmentParameters): Promise<void>;
1755
1884
  /**
1756
1885
  * Cancel a running Enrichment
1757
1886
  * @param websetId The ID of the Webset
@@ -4445,4 +4574,4 @@ declare class Exa {
4445
4574
  private parseSSEStream;
4446
4575
  }
4447
4576
 
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 };
4577
+ 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, type CreateWebsetSearchParameters, 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, 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, type SearchResponse, type SearchResult, type Status, type SubpagesResponse, type SummaryContentsOptions, type SummaryContentsOptionsTyped, type SummaryResponse, type TextContentsOptions, type TextResponse, type UpdateEnrichmentParameters, 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, WebsetImportSource, type WebsetItem, type WebsetItemArticleProperties, type WebsetItemCompanyProperties, type WebsetItemCustomProperties, type WebsetItemEvaluation, WebsetItemEvaluationSatisfied, type WebsetItemPersonProperties, type WebsetItemResearchPaperProperties, WebsetItemSource, WebsetItemsClient, WebsetMonitorsClient, type WebsetSearch, WebsetSearchBehavior, WebsetSearchCanceledReason, WebsetSearchExcludeSource, WebsetSearchScopeSource, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, Exa as default };