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