exa-js 1.8.19 → 1.8.21
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 +119 -16
- package/dist/index.d.ts +119 -16
- package/dist/index.js +35 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
package/dist/index.d.mts
CHANGED
|
@@ -289,8 +289,16 @@ interface components$1 {
|
|
|
289
289
|
*
|
|
290
290
|
* Any URLs provided will be crawled and used as additional context for the search. */
|
|
291
291
|
query: string;
|
|
292
|
-
/** @description Whether to
|
|
292
|
+
/** @description Whether to provide an estimate of how many total relevant results could exist for this search.
|
|
293
|
+
* Result of the analysis will be available in the `recall` field within the search request. */
|
|
293
294
|
recall?: boolean;
|
|
295
|
+
/** @description Limit the search to specific sources (existing imports or websets). Any results found within these sources matching the search criteria will be included in the Webset. */
|
|
296
|
+
scope?: {
|
|
297
|
+
/** @description The ID of the source to search. */
|
|
298
|
+
id: string;
|
|
299
|
+
/** @enum {string} */
|
|
300
|
+
source: ScopeSourceType;
|
|
301
|
+
}[];
|
|
294
302
|
};
|
|
295
303
|
};
|
|
296
304
|
CreateWebsetSearchParameters: {
|
|
@@ -331,8 +339,16 @@ interface components$1 {
|
|
|
331
339
|
*
|
|
332
340
|
* Any URLs provided will be crawled and used as additional context for the search. */
|
|
333
341
|
query: string;
|
|
334
|
-
/** @description Whether to
|
|
342
|
+
/** @description Whether to provide an estimate of how many total relevant results could exist for this search.
|
|
343
|
+
* Result of the analysis will be available in the `recall` field within the search request. */
|
|
335
344
|
recall?: boolean;
|
|
345
|
+
/** @description Limit the search to specific sources (existing imports). Any results found within these sources matching the search criteria will be included in the Webset. */
|
|
346
|
+
scope?: {
|
|
347
|
+
/** @description The ID of the source to search. */
|
|
348
|
+
id: string;
|
|
349
|
+
/** @enum {string} */
|
|
350
|
+
source: ScopeSourceType;
|
|
351
|
+
}[];
|
|
336
352
|
};
|
|
337
353
|
/** Custom */
|
|
338
354
|
CustomEntity: {
|
|
@@ -360,7 +376,10 @@ interface components$1 {
|
|
|
360
376
|
snippet: string | null;
|
|
361
377
|
/** @description The title of the reference */
|
|
362
378
|
title: string | null;
|
|
363
|
-
/**
|
|
379
|
+
/**
|
|
380
|
+
* Format: uri
|
|
381
|
+
* @description The URL of the reference
|
|
382
|
+
*/
|
|
364
383
|
url: string;
|
|
365
384
|
}[];
|
|
366
385
|
/** @description The result of the enrichment. */
|
|
@@ -697,7 +716,7 @@ interface components$1 {
|
|
|
697
716
|
* @default append
|
|
698
717
|
* @enum {string}
|
|
699
718
|
*/
|
|
700
|
-
behavior:
|
|
719
|
+
behavior: WebsetSearchBehavior;
|
|
701
720
|
/** @description The maximum number of results to find */
|
|
702
721
|
count: number;
|
|
703
722
|
/** @description The criteria to search for. By default, the criteria from the last search is used. */
|
|
@@ -777,7 +796,7 @@ interface components$1 {
|
|
|
777
796
|
* @default append
|
|
778
797
|
* @enum {string}
|
|
779
798
|
*/
|
|
780
|
-
behavior:
|
|
799
|
+
behavior: WebsetSearchBehavior;
|
|
781
800
|
/** @description The maximum number of results to find */
|
|
782
801
|
count: number;
|
|
783
802
|
/** @description The criteria to search for. By default, the criteria from the last search is used. */
|
|
@@ -828,6 +847,8 @@ interface components$1 {
|
|
|
828
847
|
* @description When the run failed
|
|
829
848
|
*/
|
|
830
849
|
failedAt: string | null;
|
|
850
|
+
/** @description The reason the run failed */
|
|
851
|
+
failedReason: string | null;
|
|
831
852
|
/** @description The unique identifier for the Monitor Run */
|
|
832
853
|
id: string;
|
|
833
854
|
/** @description The monitor that the run is associated with */
|
|
@@ -861,6 +882,41 @@ interface components$1 {
|
|
|
861
882
|
*/
|
|
862
883
|
type: "person";
|
|
863
884
|
};
|
|
885
|
+
PreviewWebsetParameters: {
|
|
886
|
+
/** @description Entity used to inform the decomposition.
|
|
887
|
+
*
|
|
888
|
+
* It is not required to provide it, we automatically detect the entity from all the information provided in the query. Only use this when you need more fine control. */
|
|
889
|
+
entity?: components$1["schemas"]["Entity"];
|
|
890
|
+
/** @description Natural language search query describing what you are looking for.
|
|
891
|
+
*
|
|
892
|
+
* Be specific and descriptive about your requirements, characteristics, and any constraints that help narrow down the results. */
|
|
893
|
+
query: string;
|
|
894
|
+
};
|
|
895
|
+
PreviewWebsetResponse: {
|
|
896
|
+
/** @description Detected enrichments from the query. */
|
|
897
|
+
enrichments: {
|
|
898
|
+
/** @description Description of the enrichment. */
|
|
899
|
+
description: string;
|
|
900
|
+
/**
|
|
901
|
+
* @description Format of the enrichment.
|
|
902
|
+
* @enum {string}
|
|
903
|
+
*/
|
|
904
|
+
format: PreviewWebsetResponseEnrichmentsFormat;
|
|
905
|
+
/** @description When format is options, the options detected from the query. */
|
|
906
|
+
options?: {
|
|
907
|
+
/** @description Label of the option. */
|
|
908
|
+
label: string;
|
|
909
|
+
}[];
|
|
910
|
+
}[];
|
|
911
|
+
search: {
|
|
912
|
+
/** @description Detected criteria from the query. */
|
|
913
|
+
criteria: {
|
|
914
|
+
description: string;
|
|
915
|
+
}[];
|
|
916
|
+
/** @description Detected entity from the query. */
|
|
917
|
+
entity: components$1["schemas"]["CompanyEntity"] | components$1["schemas"]["PersonEntity"] | components$1["schemas"]["ArticleEntity"] | components$1["schemas"]["ResearchPaperEntity"] | components$1["schemas"]["CustomEntity"];
|
|
918
|
+
};
|
|
919
|
+
};
|
|
864
920
|
/** Research Paper */
|
|
865
921
|
ResearchPaperEntity: {
|
|
866
922
|
/**
|
|
@@ -1022,6 +1078,8 @@ interface components$1 {
|
|
|
1022
1078
|
status: WebsetStatus;
|
|
1023
1079
|
/** @description The Streams for the Webset. */
|
|
1024
1080
|
streams: unknown[];
|
|
1081
|
+
/** @description The title of the webset */
|
|
1082
|
+
title: string | null;
|
|
1025
1083
|
/**
|
|
1026
1084
|
* Format: date-time
|
|
1027
1085
|
* @description The date and time the webset was updated
|
|
@@ -1216,7 +1274,10 @@ interface components$1 {
|
|
|
1216
1274
|
snippet: string | null;
|
|
1217
1275
|
/** @description The title of the reference */
|
|
1218
1276
|
title: string | null;
|
|
1219
|
-
/**
|
|
1277
|
+
/**
|
|
1278
|
+
* Format: uri
|
|
1279
|
+
* @description The URL of the reference
|
|
1280
|
+
*/
|
|
1220
1281
|
url: string;
|
|
1221
1282
|
}[];
|
|
1222
1283
|
/**
|
|
@@ -1372,6 +1433,17 @@ interface components$1 {
|
|
|
1372
1433
|
/** @description The reasoning for the estimate */
|
|
1373
1434
|
reasoning: string;
|
|
1374
1435
|
} | null;
|
|
1436
|
+
/** @description The scope of the search. By default, there is no scope - thus searching the web.
|
|
1437
|
+
*
|
|
1438
|
+
* If provided during creation, the search will only be performed on the sources provided. */
|
|
1439
|
+
scope: {
|
|
1440
|
+
id: string;
|
|
1441
|
+
/**
|
|
1442
|
+
* @default import
|
|
1443
|
+
* @enum {string}
|
|
1444
|
+
*/
|
|
1445
|
+
source: ScopeSourceType;
|
|
1446
|
+
}[];
|
|
1375
1447
|
/**
|
|
1376
1448
|
* WebsetSearchStatus
|
|
1377
1449
|
* @description The status of the search
|
|
@@ -1424,6 +1496,8 @@ type MonitorBehavior = components$1["schemas"]["MonitorBehavior"];
|
|
|
1424
1496
|
type MonitorCadence = components$1["schemas"]["MonitorCadence"];
|
|
1425
1497
|
type MonitorRun = components$1["schemas"]["MonitorRun"];
|
|
1426
1498
|
type PersonEntity = components$1["schemas"]["PersonEntity"];
|
|
1499
|
+
type PreviewWebsetParameters = components$1["schemas"]["PreviewWebsetParameters"];
|
|
1500
|
+
type PreviewWebsetResponse = components$1["schemas"]["PreviewWebsetResponse"];
|
|
1427
1501
|
type ResearchPaperEntity = components$1["schemas"]["ResearchPaperEntity"];
|
|
1428
1502
|
type UpdateImport = components$1["schemas"]["UpdateImport"];
|
|
1429
1503
|
type UpdateMonitor = components$1["schemas"]["UpdateMonitor"];
|
|
@@ -1478,6 +1552,9 @@ declare enum CreateWebsetParametersSearchExcludeSource {
|
|
|
1478
1552
|
import = "import",
|
|
1479
1553
|
webset = "webset"
|
|
1480
1554
|
}
|
|
1555
|
+
declare enum ScopeSourceType {
|
|
1556
|
+
import = "import"
|
|
1557
|
+
}
|
|
1481
1558
|
declare enum CreateWebsetSearchParametersExcludeSource {
|
|
1482
1559
|
import = "import",
|
|
1483
1560
|
webset = "webset"
|
|
@@ -1529,10 +1606,6 @@ declare enum MonitorStatus {
|
|
|
1529
1606
|
enabled = "enabled",
|
|
1530
1607
|
disabled = "disabled"
|
|
1531
1608
|
}
|
|
1532
|
-
declare enum MonitorBehaviorConfigBehavior {
|
|
1533
|
-
override = "override",
|
|
1534
|
-
append = "append"
|
|
1535
|
-
}
|
|
1536
1609
|
declare enum MonitorRunObject {
|
|
1537
1610
|
monitor_run = "monitor_run"
|
|
1538
1611
|
}
|
|
@@ -1540,12 +1613,21 @@ declare enum MonitorRunStatus {
|
|
|
1540
1613
|
created = "created",
|
|
1541
1614
|
running = "running",
|
|
1542
1615
|
completed = "completed",
|
|
1543
|
-
canceled = "canceled"
|
|
1616
|
+
canceled = "canceled",
|
|
1617
|
+
failed = "failed"
|
|
1544
1618
|
}
|
|
1545
1619
|
declare enum MonitorRunType {
|
|
1546
1620
|
search = "search",
|
|
1547
1621
|
refresh = "refresh"
|
|
1548
1622
|
}
|
|
1623
|
+
declare enum PreviewWebsetResponseEnrichmentsFormat {
|
|
1624
|
+
text = "text",
|
|
1625
|
+
date = "date",
|
|
1626
|
+
number = "number",
|
|
1627
|
+
options = "options",
|
|
1628
|
+
email = "email",
|
|
1629
|
+
phone = "phone"
|
|
1630
|
+
}
|
|
1549
1631
|
declare enum UpdateMonitorStatus {
|
|
1550
1632
|
enabled = "enabled",
|
|
1551
1633
|
disabled = "disabled"
|
|
@@ -1573,6 +1655,7 @@ declare enum WebhookAttemptEventType {
|
|
|
1573
1655
|
}
|
|
1574
1656
|
declare enum WebsetStatus {
|
|
1575
1657
|
idle = "idle",
|
|
1658
|
+
pending = "pending",
|
|
1576
1659
|
running = "running",
|
|
1577
1660
|
paused = "paused"
|
|
1578
1661
|
}
|
|
@@ -1609,6 +1692,7 @@ declare enum WebsetSearchRecallExpectedConfidence {
|
|
|
1609
1692
|
}
|
|
1610
1693
|
declare enum WebsetSearchStatus {
|
|
1611
1694
|
created = "created",
|
|
1695
|
+
pending = "pending",
|
|
1612
1696
|
running = "running",
|
|
1613
1697
|
completed = "completed",
|
|
1614
1698
|
canceled = "canceled"
|
|
@@ -1798,6 +1882,15 @@ declare class ImportsClient extends WebsetsBaseClient {
|
|
|
1798
1882
|
* Client for managing Webset Items
|
|
1799
1883
|
*/
|
|
1800
1884
|
|
|
1885
|
+
/**
|
|
1886
|
+
* Options for listing webset items
|
|
1887
|
+
*/
|
|
1888
|
+
interface ListWebsetItemsOptions extends PaginationParams {
|
|
1889
|
+
/**
|
|
1890
|
+
* The id of the source to filter items by
|
|
1891
|
+
*/
|
|
1892
|
+
sourceId?: string;
|
|
1893
|
+
}
|
|
1801
1894
|
/**
|
|
1802
1895
|
* Client for managing Webset Items
|
|
1803
1896
|
*/
|
|
@@ -1805,24 +1898,24 @@ declare class WebsetItemsClient extends WebsetsBaseClient {
|
|
|
1805
1898
|
/**
|
|
1806
1899
|
* List all Items for a Webset
|
|
1807
1900
|
* @param websetId The ID of the Webset
|
|
1808
|
-
* @param params - Optional pagination parameters
|
|
1901
|
+
* @param params - Optional pagination and filtering parameters
|
|
1809
1902
|
* @returns A promise that resolves with the list of Items
|
|
1810
1903
|
*/
|
|
1811
|
-
list(websetId: string, params?:
|
|
1904
|
+
list(websetId: string, params?: ListWebsetItemsOptions): Promise<ListWebsetItemResponse>;
|
|
1812
1905
|
/**
|
|
1813
1906
|
* Iterate through all Items in a Webset, handling pagination automatically
|
|
1814
1907
|
* @param websetId The ID of the Webset
|
|
1815
1908
|
* @param options Pagination options
|
|
1816
1909
|
* @returns Async generator of Webset Items
|
|
1817
1910
|
*/
|
|
1818
|
-
listAll(websetId: string, options?:
|
|
1911
|
+
listAll(websetId: string, options?: ListWebsetItemsOptions): AsyncGenerator<WebsetItem>;
|
|
1819
1912
|
/**
|
|
1820
1913
|
* Collect all items from a Webset into an array
|
|
1821
1914
|
* @param websetId The ID of the Webset
|
|
1822
1915
|
* @param options Pagination options
|
|
1823
1916
|
* @returns Promise resolving to an array of all Webset Items
|
|
1824
1917
|
*/
|
|
1825
|
-
getAll(websetId: string, options?:
|
|
1918
|
+
getAll(websetId: string, options?: ListWebsetItemsOptions): Promise<WebsetItem[]>;
|
|
1826
1919
|
/**
|
|
1827
1920
|
* Get an Item by ID
|
|
1828
1921
|
* @param websetId The ID of the Webset
|
|
@@ -1961,6 +2054,10 @@ interface ListWebhookAttemptsOptions extends PaginationParams {
|
|
|
1961
2054
|
* The type of event to filter by
|
|
1962
2055
|
*/
|
|
1963
2056
|
eventType?: EventType;
|
|
2057
|
+
/**
|
|
2058
|
+
* Filter attempts by their success status
|
|
2059
|
+
*/
|
|
2060
|
+
successful?: boolean;
|
|
1964
2061
|
}
|
|
1965
2062
|
/**
|
|
1966
2063
|
* Client for managing Webset Webhooks
|
|
@@ -2084,6 +2181,12 @@ declare class WebsetsClient extends WebsetsBaseClient {
|
|
|
2084
2181
|
* @returns The created Webset
|
|
2085
2182
|
*/
|
|
2086
2183
|
create(params: CreateWebsetParameters): Promise<Webset>;
|
|
2184
|
+
/**
|
|
2185
|
+
* Preview a webset
|
|
2186
|
+
* @param params The preview parameters
|
|
2187
|
+
* @returns The preview response showing how the query will be decomposed
|
|
2188
|
+
*/
|
|
2189
|
+
preview(params: PreviewWebsetParameters): Promise<PreviewWebsetResponse>;
|
|
2087
2190
|
/**
|
|
2088
2191
|
* Get a Webset by ID
|
|
2089
2192
|
* @param id The ID of the Webset
|
|
@@ -3118,4 +3221,4 @@ declare class Exa {
|
|
|
3118
3221
|
private parseSSEStream;
|
|
3119
3222
|
}
|
|
3120
3223
|
|
|
3121
|
-
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, 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 SchemaListResearchTasksRequestDto as ListResearchTasksRequest, type SchemaListResearchTasksResponseDto as ListResearchTasksResponse, type ListWebhookAttemptsResponse, type ListWebhooksResponse, type ListWebsetItemResponse, type ListWebsetsResponse, type LivecrawlOptions, type Monitor, type MonitorBehavior, type MonitorCadence, MonitorObject, type MonitorRun, MonitorRunObject, MonitorRunStatus, MonitorRunType, MonitorStatus, type PersonEntity, type RegularSearchOptions, ResearchClient, type ResearchCreateTaskParamsTyped, type SchemaResearchCreateTaskRequestDto as ResearchCreateTaskRequest, type SchemaResearchCreateTaskResponseDto as ResearchCreateTaskResponse, type ResearchPaperEntity, type SchemaResearchTaskDto as ResearchTask, type ResearchTaskEvent, type ResearchTaskOperation, type ResearchTaskOutputTyped, 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 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 };
|
|
3224
|
+
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, 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 SchemaListResearchTasksRequestDto as ListResearchTasksRequest, type SchemaListResearchTasksResponseDto as ListResearchTasksResponse, 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, ResearchClient, type ResearchCreateTaskParamsTyped, type SchemaResearchCreateTaskRequestDto as ResearchCreateTaskRequest, type SchemaResearchCreateTaskResponseDto as ResearchCreateTaskResponse, type ResearchPaperEntity, type SchemaResearchTaskDto as ResearchTask, type ResearchTaskEvent, type ResearchTaskOperation, type ResearchTaskOutputTyped, 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 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -289,8 +289,16 @@ interface components$1 {
|
|
|
289
289
|
*
|
|
290
290
|
* Any URLs provided will be crawled and used as additional context for the search. */
|
|
291
291
|
query: string;
|
|
292
|
-
/** @description Whether to
|
|
292
|
+
/** @description Whether to provide an estimate of how many total relevant results could exist for this search.
|
|
293
|
+
* Result of the analysis will be available in the `recall` field within the search request. */
|
|
293
294
|
recall?: boolean;
|
|
295
|
+
/** @description Limit the search to specific sources (existing imports or websets). Any results found within these sources matching the search criteria will be included in the Webset. */
|
|
296
|
+
scope?: {
|
|
297
|
+
/** @description The ID of the source to search. */
|
|
298
|
+
id: string;
|
|
299
|
+
/** @enum {string} */
|
|
300
|
+
source: ScopeSourceType;
|
|
301
|
+
}[];
|
|
294
302
|
};
|
|
295
303
|
};
|
|
296
304
|
CreateWebsetSearchParameters: {
|
|
@@ -331,8 +339,16 @@ interface components$1 {
|
|
|
331
339
|
*
|
|
332
340
|
* Any URLs provided will be crawled and used as additional context for the search. */
|
|
333
341
|
query: string;
|
|
334
|
-
/** @description Whether to
|
|
342
|
+
/** @description Whether to provide an estimate of how many total relevant results could exist for this search.
|
|
343
|
+
* Result of the analysis will be available in the `recall` field within the search request. */
|
|
335
344
|
recall?: boolean;
|
|
345
|
+
/** @description Limit the search to specific sources (existing imports). Any results found within these sources matching the search criteria will be included in the Webset. */
|
|
346
|
+
scope?: {
|
|
347
|
+
/** @description The ID of the source to search. */
|
|
348
|
+
id: string;
|
|
349
|
+
/** @enum {string} */
|
|
350
|
+
source: ScopeSourceType;
|
|
351
|
+
}[];
|
|
336
352
|
};
|
|
337
353
|
/** Custom */
|
|
338
354
|
CustomEntity: {
|
|
@@ -360,7 +376,10 @@ interface components$1 {
|
|
|
360
376
|
snippet: string | null;
|
|
361
377
|
/** @description The title of the reference */
|
|
362
378
|
title: string | null;
|
|
363
|
-
/**
|
|
379
|
+
/**
|
|
380
|
+
* Format: uri
|
|
381
|
+
* @description The URL of the reference
|
|
382
|
+
*/
|
|
364
383
|
url: string;
|
|
365
384
|
}[];
|
|
366
385
|
/** @description The result of the enrichment. */
|
|
@@ -697,7 +716,7 @@ interface components$1 {
|
|
|
697
716
|
* @default append
|
|
698
717
|
* @enum {string}
|
|
699
718
|
*/
|
|
700
|
-
behavior:
|
|
719
|
+
behavior: WebsetSearchBehavior;
|
|
701
720
|
/** @description The maximum number of results to find */
|
|
702
721
|
count: number;
|
|
703
722
|
/** @description The criteria to search for. By default, the criteria from the last search is used. */
|
|
@@ -777,7 +796,7 @@ interface components$1 {
|
|
|
777
796
|
* @default append
|
|
778
797
|
* @enum {string}
|
|
779
798
|
*/
|
|
780
|
-
behavior:
|
|
799
|
+
behavior: WebsetSearchBehavior;
|
|
781
800
|
/** @description The maximum number of results to find */
|
|
782
801
|
count: number;
|
|
783
802
|
/** @description The criteria to search for. By default, the criteria from the last search is used. */
|
|
@@ -828,6 +847,8 @@ interface components$1 {
|
|
|
828
847
|
* @description When the run failed
|
|
829
848
|
*/
|
|
830
849
|
failedAt: string | null;
|
|
850
|
+
/** @description The reason the run failed */
|
|
851
|
+
failedReason: string | null;
|
|
831
852
|
/** @description The unique identifier for the Monitor Run */
|
|
832
853
|
id: string;
|
|
833
854
|
/** @description The monitor that the run is associated with */
|
|
@@ -861,6 +882,41 @@ interface components$1 {
|
|
|
861
882
|
*/
|
|
862
883
|
type: "person";
|
|
863
884
|
};
|
|
885
|
+
PreviewWebsetParameters: {
|
|
886
|
+
/** @description Entity used to inform the decomposition.
|
|
887
|
+
*
|
|
888
|
+
* It is not required to provide it, we automatically detect the entity from all the information provided in the query. Only use this when you need more fine control. */
|
|
889
|
+
entity?: components$1["schemas"]["Entity"];
|
|
890
|
+
/** @description Natural language search query describing what you are looking for.
|
|
891
|
+
*
|
|
892
|
+
* Be specific and descriptive about your requirements, characteristics, and any constraints that help narrow down the results. */
|
|
893
|
+
query: string;
|
|
894
|
+
};
|
|
895
|
+
PreviewWebsetResponse: {
|
|
896
|
+
/** @description Detected enrichments from the query. */
|
|
897
|
+
enrichments: {
|
|
898
|
+
/** @description Description of the enrichment. */
|
|
899
|
+
description: string;
|
|
900
|
+
/**
|
|
901
|
+
* @description Format of the enrichment.
|
|
902
|
+
* @enum {string}
|
|
903
|
+
*/
|
|
904
|
+
format: PreviewWebsetResponseEnrichmentsFormat;
|
|
905
|
+
/** @description When format is options, the options detected from the query. */
|
|
906
|
+
options?: {
|
|
907
|
+
/** @description Label of the option. */
|
|
908
|
+
label: string;
|
|
909
|
+
}[];
|
|
910
|
+
}[];
|
|
911
|
+
search: {
|
|
912
|
+
/** @description Detected criteria from the query. */
|
|
913
|
+
criteria: {
|
|
914
|
+
description: string;
|
|
915
|
+
}[];
|
|
916
|
+
/** @description Detected entity from the query. */
|
|
917
|
+
entity: components$1["schemas"]["CompanyEntity"] | components$1["schemas"]["PersonEntity"] | components$1["schemas"]["ArticleEntity"] | components$1["schemas"]["ResearchPaperEntity"] | components$1["schemas"]["CustomEntity"];
|
|
918
|
+
};
|
|
919
|
+
};
|
|
864
920
|
/** Research Paper */
|
|
865
921
|
ResearchPaperEntity: {
|
|
866
922
|
/**
|
|
@@ -1022,6 +1078,8 @@ interface components$1 {
|
|
|
1022
1078
|
status: WebsetStatus;
|
|
1023
1079
|
/** @description The Streams for the Webset. */
|
|
1024
1080
|
streams: unknown[];
|
|
1081
|
+
/** @description The title of the webset */
|
|
1082
|
+
title: string | null;
|
|
1025
1083
|
/**
|
|
1026
1084
|
* Format: date-time
|
|
1027
1085
|
* @description The date and time the webset was updated
|
|
@@ -1216,7 +1274,10 @@ interface components$1 {
|
|
|
1216
1274
|
snippet: string | null;
|
|
1217
1275
|
/** @description The title of the reference */
|
|
1218
1276
|
title: string | null;
|
|
1219
|
-
/**
|
|
1277
|
+
/**
|
|
1278
|
+
* Format: uri
|
|
1279
|
+
* @description The URL of the reference
|
|
1280
|
+
*/
|
|
1220
1281
|
url: string;
|
|
1221
1282
|
}[];
|
|
1222
1283
|
/**
|
|
@@ -1372,6 +1433,17 @@ interface components$1 {
|
|
|
1372
1433
|
/** @description The reasoning for the estimate */
|
|
1373
1434
|
reasoning: string;
|
|
1374
1435
|
} | null;
|
|
1436
|
+
/** @description The scope of the search. By default, there is no scope - thus searching the web.
|
|
1437
|
+
*
|
|
1438
|
+
* If provided during creation, the search will only be performed on the sources provided. */
|
|
1439
|
+
scope: {
|
|
1440
|
+
id: string;
|
|
1441
|
+
/**
|
|
1442
|
+
* @default import
|
|
1443
|
+
* @enum {string}
|
|
1444
|
+
*/
|
|
1445
|
+
source: ScopeSourceType;
|
|
1446
|
+
}[];
|
|
1375
1447
|
/**
|
|
1376
1448
|
* WebsetSearchStatus
|
|
1377
1449
|
* @description The status of the search
|
|
@@ -1424,6 +1496,8 @@ type MonitorBehavior = components$1["schemas"]["MonitorBehavior"];
|
|
|
1424
1496
|
type MonitorCadence = components$1["schemas"]["MonitorCadence"];
|
|
1425
1497
|
type MonitorRun = components$1["schemas"]["MonitorRun"];
|
|
1426
1498
|
type PersonEntity = components$1["schemas"]["PersonEntity"];
|
|
1499
|
+
type PreviewWebsetParameters = components$1["schemas"]["PreviewWebsetParameters"];
|
|
1500
|
+
type PreviewWebsetResponse = components$1["schemas"]["PreviewWebsetResponse"];
|
|
1427
1501
|
type ResearchPaperEntity = components$1["schemas"]["ResearchPaperEntity"];
|
|
1428
1502
|
type UpdateImport = components$1["schemas"]["UpdateImport"];
|
|
1429
1503
|
type UpdateMonitor = components$1["schemas"]["UpdateMonitor"];
|
|
@@ -1478,6 +1552,9 @@ declare enum CreateWebsetParametersSearchExcludeSource {
|
|
|
1478
1552
|
import = "import",
|
|
1479
1553
|
webset = "webset"
|
|
1480
1554
|
}
|
|
1555
|
+
declare enum ScopeSourceType {
|
|
1556
|
+
import = "import"
|
|
1557
|
+
}
|
|
1481
1558
|
declare enum CreateWebsetSearchParametersExcludeSource {
|
|
1482
1559
|
import = "import",
|
|
1483
1560
|
webset = "webset"
|
|
@@ -1529,10 +1606,6 @@ declare enum MonitorStatus {
|
|
|
1529
1606
|
enabled = "enabled",
|
|
1530
1607
|
disabled = "disabled"
|
|
1531
1608
|
}
|
|
1532
|
-
declare enum MonitorBehaviorConfigBehavior {
|
|
1533
|
-
override = "override",
|
|
1534
|
-
append = "append"
|
|
1535
|
-
}
|
|
1536
1609
|
declare enum MonitorRunObject {
|
|
1537
1610
|
monitor_run = "monitor_run"
|
|
1538
1611
|
}
|
|
@@ -1540,12 +1613,21 @@ declare enum MonitorRunStatus {
|
|
|
1540
1613
|
created = "created",
|
|
1541
1614
|
running = "running",
|
|
1542
1615
|
completed = "completed",
|
|
1543
|
-
canceled = "canceled"
|
|
1616
|
+
canceled = "canceled",
|
|
1617
|
+
failed = "failed"
|
|
1544
1618
|
}
|
|
1545
1619
|
declare enum MonitorRunType {
|
|
1546
1620
|
search = "search",
|
|
1547
1621
|
refresh = "refresh"
|
|
1548
1622
|
}
|
|
1623
|
+
declare enum PreviewWebsetResponseEnrichmentsFormat {
|
|
1624
|
+
text = "text",
|
|
1625
|
+
date = "date",
|
|
1626
|
+
number = "number",
|
|
1627
|
+
options = "options",
|
|
1628
|
+
email = "email",
|
|
1629
|
+
phone = "phone"
|
|
1630
|
+
}
|
|
1549
1631
|
declare enum UpdateMonitorStatus {
|
|
1550
1632
|
enabled = "enabled",
|
|
1551
1633
|
disabled = "disabled"
|
|
@@ -1573,6 +1655,7 @@ declare enum WebhookAttemptEventType {
|
|
|
1573
1655
|
}
|
|
1574
1656
|
declare enum WebsetStatus {
|
|
1575
1657
|
idle = "idle",
|
|
1658
|
+
pending = "pending",
|
|
1576
1659
|
running = "running",
|
|
1577
1660
|
paused = "paused"
|
|
1578
1661
|
}
|
|
@@ -1609,6 +1692,7 @@ declare enum WebsetSearchRecallExpectedConfidence {
|
|
|
1609
1692
|
}
|
|
1610
1693
|
declare enum WebsetSearchStatus {
|
|
1611
1694
|
created = "created",
|
|
1695
|
+
pending = "pending",
|
|
1612
1696
|
running = "running",
|
|
1613
1697
|
completed = "completed",
|
|
1614
1698
|
canceled = "canceled"
|
|
@@ -1798,6 +1882,15 @@ declare class ImportsClient extends WebsetsBaseClient {
|
|
|
1798
1882
|
* Client for managing Webset Items
|
|
1799
1883
|
*/
|
|
1800
1884
|
|
|
1885
|
+
/**
|
|
1886
|
+
* Options for listing webset items
|
|
1887
|
+
*/
|
|
1888
|
+
interface ListWebsetItemsOptions extends PaginationParams {
|
|
1889
|
+
/**
|
|
1890
|
+
* The id of the source to filter items by
|
|
1891
|
+
*/
|
|
1892
|
+
sourceId?: string;
|
|
1893
|
+
}
|
|
1801
1894
|
/**
|
|
1802
1895
|
* Client for managing Webset Items
|
|
1803
1896
|
*/
|
|
@@ -1805,24 +1898,24 @@ declare class WebsetItemsClient extends WebsetsBaseClient {
|
|
|
1805
1898
|
/**
|
|
1806
1899
|
* List all Items for a Webset
|
|
1807
1900
|
* @param websetId The ID of the Webset
|
|
1808
|
-
* @param params - Optional pagination parameters
|
|
1901
|
+
* @param params - Optional pagination and filtering parameters
|
|
1809
1902
|
* @returns A promise that resolves with the list of Items
|
|
1810
1903
|
*/
|
|
1811
|
-
list(websetId: string, params?:
|
|
1904
|
+
list(websetId: string, params?: ListWebsetItemsOptions): Promise<ListWebsetItemResponse>;
|
|
1812
1905
|
/**
|
|
1813
1906
|
* Iterate through all Items in a Webset, handling pagination automatically
|
|
1814
1907
|
* @param websetId The ID of the Webset
|
|
1815
1908
|
* @param options Pagination options
|
|
1816
1909
|
* @returns Async generator of Webset Items
|
|
1817
1910
|
*/
|
|
1818
|
-
listAll(websetId: string, options?:
|
|
1911
|
+
listAll(websetId: string, options?: ListWebsetItemsOptions): AsyncGenerator<WebsetItem>;
|
|
1819
1912
|
/**
|
|
1820
1913
|
* Collect all items from a Webset into an array
|
|
1821
1914
|
* @param websetId The ID of the Webset
|
|
1822
1915
|
* @param options Pagination options
|
|
1823
1916
|
* @returns Promise resolving to an array of all Webset Items
|
|
1824
1917
|
*/
|
|
1825
|
-
getAll(websetId: string, options?:
|
|
1918
|
+
getAll(websetId: string, options?: ListWebsetItemsOptions): Promise<WebsetItem[]>;
|
|
1826
1919
|
/**
|
|
1827
1920
|
* Get an Item by ID
|
|
1828
1921
|
* @param websetId The ID of the Webset
|
|
@@ -1961,6 +2054,10 @@ interface ListWebhookAttemptsOptions extends PaginationParams {
|
|
|
1961
2054
|
* The type of event to filter by
|
|
1962
2055
|
*/
|
|
1963
2056
|
eventType?: EventType;
|
|
2057
|
+
/**
|
|
2058
|
+
* Filter attempts by their success status
|
|
2059
|
+
*/
|
|
2060
|
+
successful?: boolean;
|
|
1964
2061
|
}
|
|
1965
2062
|
/**
|
|
1966
2063
|
* Client for managing Webset Webhooks
|
|
@@ -2084,6 +2181,12 @@ declare class WebsetsClient extends WebsetsBaseClient {
|
|
|
2084
2181
|
* @returns The created Webset
|
|
2085
2182
|
*/
|
|
2086
2183
|
create(params: CreateWebsetParameters): Promise<Webset>;
|
|
2184
|
+
/**
|
|
2185
|
+
* Preview a webset
|
|
2186
|
+
* @param params The preview parameters
|
|
2187
|
+
* @returns The preview response showing how the query will be decomposed
|
|
2188
|
+
*/
|
|
2189
|
+
preview(params: PreviewWebsetParameters): Promise<PreviewWebsetResponse>;
|
|
2087
2190
|
/**
|
|
2088
2191
|
* Get a Webset by ID
|
|
2089
2192
|
* @param id The ID of the Webset
|
|
@@ -3118,4 +3221,4 @@ declare class Exa {
|
|
|
3118
3221
|
private parseSSEStream;
|
|
3119
3222
|
}
|
|
3120
3223
|
|
|
3121
|
-
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, 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 SchemaListResearchTasksRequestDto as ListResearchTasksRequest, type SchemaListResearchTasksResponseDto as ListResearchTasksResponse, type ListWebhookAttemptsResponse, type ListWebhooksResponse, type ListWebsetItemResponse, type ListWebsetsResponse, type LivecrawlOptions, type Monitor, type MonitorBehavior, type MonitorCadence, MonitorObject, type MonitorRun, MonitorRunObject, MonitorRunStatus, MonitorRunType, MonitorStatus, type PersonEntity, type RegularSearchOptions, ResearchClient, type ResearchCreateTaskParamsTyped, type SchemaResearchCreateTaskRequestDto as ResearchCreateTaskRequest, type SchemaResearchCreateTaskResponseDto as ResearchCreateTaskResponse, type ResearchPaperEntity, type SchemaResearchTaskDto as ResearchTask, type ResearchTaskEvent, type ResearchTaskOperation, type ResearchTaskOutputTyped, 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 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 };
|
|
3224
|
+
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, 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 SchemaListResearchTasksRequestDto as ListResearchTasksRequest, type SchemaListResearchTasksResponseDto as ListResearchTasksResponse, 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, ResearchClient, type ResearchCreateTaskParamsTyped, type SchemaResearchCreateTaskRequestDto as ResearchCreateTaskRequest, type SchemaResearchCreateTaskResponseDto as ResearchCreateTaskResponse, type ResearchPaperEntity, type SchemaResearchTaskDto as ResearchTask, type ResearchTaskEvent, type ResearchTaskOperation, type ResearchTaskOutputTyped, 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 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 };
|