exa-js 2.0.2 → 2.0.5
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 +21 -4
- package/dist/index.d.ts +21 -4
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -771,7 +771,7 @@ interface components {
|
|
|
771
771
|
*
|
|
772
772
|
* You can use this to reference the Webset by your own internal identifiers. */
|
|
773
773
|
externalId?: string;
|
|
774
|
-
/** @description
|
|
774
|
+
/** @description Attach/load data from existing Imports or Websets into this Webset. For CSV Imports, this schedules ingestion and creates a staging pool of items (ImportItems do not automatically appear as Webset Items; searches create Webset Items). This does not filter searches. To filter a search to only look within an Import or Webset, use search.scope instead. */
|
|
775
775
|
import?: {
|
|
776
776
|
/** @description The ID of the source to search. */
|
|
777
777
|
id: string;
|
|
@@ -815,13 +815,14 @@ interface components {
|
|
|
815
815
|
/** @description Whether to provide an estimate of how many total relevant results could exist for this search.
|
|
816
816
|
* Result of the analysis will be available in the `recall` field within the search request. */
|
|
817
817
|
recall?: boolean;
|
|
818
|
-
/** @description Limit
|
|
818
|
+
/** @description Limit this search to only consider candidates from the listed sources (existing Imports or Websets). Scope applies per-search; if you run another search and want to stay within the same dataset, pass scope again. When scope is present, the search behavior is OVERRIDE (replaces results rather than appending). Note: Using the same Import in both top-level import and search.scope will return a 400 error. */
|
|
819
819
|
scope?: {
|
|
820
820
|
/** @description The ID of the source to search. */
|
|
821
821
|
id: string;
|
|
822
822
|
relationship?: {
|
|
823
|
-
/** @description What the relationship of the entities you hope to find is relative to the entities contained in the provided source. */
|
|
823
|
+
/** @description What the relationship of the entities you hope to find is relative to the entities contained in the provided source. Only needed for hop searches (graph traversal) from the source entities to related targets. Examples: "investors of", "current employer", "employees at". Omit for simple filtering within the source. */
|
|
824
824
|
definition: string;
|
|
825
|
+
/** @description Number of related entities to find per source entity (fanout). Only used for hop searches. Range: 1-10. */
|
|
825
826
|
limit: number;
|
|
826
827
|
};
|
|
827
828
|
/** @enum {string} */
|
|
@@ -1576,6 +1577,8 @@ interface components {
|
|
|
1576
1577
|
label: string;
|
|
1577
1578
|
}[];
|
|
1578
1579
|
}[];
|
|
1580
|
+
/** @description Preview items matching the search criteria. */
|
|
1581
|
+
items: components["schemas"]["WebsetItemPreview"][];
|
|
1579
1582
|
search: {
|
|
1580
1583
|
/** @description Detected criteria from the query. */
|
|
1581
1584
|
criteria: {
|
|
@@ -2013,6 +2016,17 @@ interface components {
|
|
|
2013
2016
|
*/
|
|
2014
2017
|
url: string;
|
|
2015
2018
|
};
|
|
2019
|
+
WebsetItemPreview: {
|
|
2020
|
+
/**
|
|
2021
|
+
* Format: date-time
|
|
2022
|
+
* @description The date and time the preview was created
|
|
2023
|
+
*/
|
|
2024
|
+
createdAt: string;
|
|
2025
|
+
/** @description The unique identifier for the preview item */
|
|
2026
|
+
id: string;
|
|
2027
|
+
/** @description The properties of the preview item */
|
|
2028
|
+
properties: components["schemas"]["WebsetItemPersonProperties"] | components["schemas"]["WebsetItemCompanyProperties"] | components["schemas"]["WebsetItemArticleProperties"] | components["schemas"]["WebsetItemResearchPaperProperties"] | components["schemas"]["WebsetItemCustomProperties"];
|
|
2029
|
+
};
|
|
2016
2030
|
WebsetItemResearchPaperProperties: {
|
|
2017
2031
|
/** @description The text content of the research paper */
|
|
2018
2032
|
content: string | null;
|
|
@@ -2871,9 +2885,12 @@ declare class WebsetsClient extends WebsetsBaseClient {
|
|
|
2871
2885
|
/**
|
|
2872
2886
|
* Preview a webset
|
|
2873
2887
|
* @param params The preview parameters
|
|
2888
|
+
* @param options Optional parameters. Search = true allows you to retrieve a preview set of items that could be returned by the webset.
|
|
2874
2889
|
* @returns The preview response showing how the query will be decomposed
|
|
2875
2890
|
*/
|
|
2876
|
-
preview(params: PreviewWebsetParameters
|
|
2891
|
+
preview(params: PreviewWebsetParameters, options?: {
|
|
2892
|
+
search?: boolean;
|
|
2893
|
+
}): Promise<PreviewWebsetResponse>;
|
|
2877
2894
|
/**
|
|
2878
2895
|
* Get a Webset by ID
|
|
2879
2896
|
* @param id The ID of the Webset
|
package/dist/index.d.ts
CHANGED
|
@@ -771,7 +771,7 @@ interface components {
|
|
|
771
771
|
*
|
|
772
772
|
* You can use this to reference the Webset by your own internal identifiers. */
|
|
773
773
|
externalId?: string;
|
|
774
|
-
/** @description
|
|
774
|
+
/** @description Attach/load data from existing Imports or Websets into this Webset. For CSV Imports, this schedules ingestion and creates a staging pool of items (ImportItems do not automatically appear as Webset Items; searches create Webset Items). This does not filter searches. To filter a search to only look within an Import or Webset, use search.scope instead. */
|
|
775
775
|
import?: {
|
|
776
776
|
/** @description The ID of the source to search. */
|
|
777
777
|
id: string;
|
|
@@ -815,13 +815,14 @@ interface components {
|
|
|
815
815
|
/** @description Whether to provide an estimate of how many total relevant results could exist for this search.
|
|
816
816
|
* Result of the analysis will be available in the `recall` field within the search request. */
|
|
817
817
|
recall?: boolean;
|
|
818
|
-
/** @description Limit
|
|
818
|
+
/** @description Limit this search to only consider candidates from the listed sources (existing Imports or Websets). Scope applies per-search; if you run another search and want to stay within the same dataset, pass scope again. When scope is present, the search behavior is OVERRIDE (replaces results rather than appending). Note: Using the same Import in both top-level import and search.scope will return a 400 error. */
|
|
819
819
|
scope?: {
|
|
820
820
|
/** @description The ID of the source to search. */
|
|
821
821
|
id: string;
|
|
822
822
|
relationship?: {
|
|
823
|
-
/** @description What the relationship of the entities you hope to find is relative to the entities contained in the provided source. */
|
|
823
|
+
/** @description What the relationship of the entities you hope to find is relative to the entities contained in the provided source. Only needed for hop searches (graph traversal) from the source entities to related targets. Examples: "investors of", "current employer", "employees at". Omit for simple filtering within the source. */
|
|
824
824
|
definition: string;
|
|
825
|
+
/** @description Number of related entities to find per source entity (fanout). Only used for hop searches. Range: 1-10. */
|
|
825
826
|
limit: number;
|
|
826
827
|
};
|
|
827
828
|
/** @enum {string} */
|
|
@@ -1576,6 +1577,8 @@ interface components {
|
|
|
1576
1577
|
label: string;
|
|
1577
1578
|
}[];
|
|
1578
1579
|
}[];
|
|
1580
|
+
/** @description Preview items matching the search criteria. */
|
|
1581
|
+
items: components["schemas"]["WebsetItemPreview"][];
|
|
1579
1582
|
search: {
|
|
1580
1583
|
/** @description Detected criteria from the query. */
|
|
1581
1584
|
criteria: {
|
|
@@ -2013,6 +2016,17 @@ interface components {
|
|
|
2013
2016
|
*/
|
|
2014
2017
|
url: string;
|
|
2015
2018
|
};
|
|
2019
|
+
WebsetItemPreview: {
|
|
2020
|
+
/**
|
|
2021
|
+
* Format: date-time
|
|
2022
|
+
* @description The date and time the preview was created
|
|
2023
|
+
*/
|
|
2024
|
+
createdAt: string;
|
|
2025
|
+
/** @description The unique identifier for the preview item */
|
|
2026
|
+
id: string;
|
|
2027
|
+
/** @description The properties of the preview item */
|
|
2028
|
+
properties: components["schemas"]["WebsetItemPersonProperties"] | components["schemas"]["WebsetItemCompanyProperties"] | components["schemas"]["WebsetItemArticleProperties"] | components["schemas"]["WebsetItemResearchPaperProperties"] | components["schemas"]["WebsetItemCustomProperties"];
|
|
2029
|
+
};
|
|
2016
2030
|
WebsetItemResearchPaperProperties: {
|
|
2017
2031
|
/** @description The text content of the research paper */
|
|
2018
2032
|
content: string | null;
|
|
@@ -2871,9 +2885,12 @@ declare class WebsetsClient extends WebsetsBaseClient {
|
|
|
2871
2885
|
/**
|
|
2872
2886
|
* Preview a webset
|
|
2873
2887
|
* @param params The preview parameters
|
|
2888
|
+
* @param options Optional parameters. Search = true allows you to retrieve a preview set of items that could be returned by the webset.
|
|
2874
2889
|
* @returns The preview response showing how the query will be decomposed
|
|
2875
2890
|
*/
|
|
2876
|
-
preview(params: PreviewWebsetParameters
|
|
2891
|
+
preview(params: PreviewWebsetParameters, options?: {
|
|
2892
|
+
search?: boolean;
|
|
2893
|
+
}): Promise<PreviewWebsetResponse>;
|
|
2877
2894
|
/**
|
|
2878
2895
|
* Get a Webset by ID
|
|
2879
2896
|
* @param id The ID of the Webset
|
package/dist/index.js
CHANGED
|
@@ -74,7 +74,7 @@ var import_cross_fetch = __toESM(require("cross-fetch"));
|
|
|
74
74
|
// package.json
|
|
75
75
|
var package_default = {
|
|
76
76
|
name: "exa-js",
|
|
77
|
-
version: "2.0.
|
|
77
|
+
version: "2.0.5",
|
|
78
78
|
description: "Exa SDK for Node.js and the browser",
|
|
79
79
|
publishConfig: {
|
|
80
80
|
access: "public"
|
|
@@ -1191,13 +1191,19 @@ var WebsetsClient = class extends WebsetsBaseClient {
|
|
|
1191
1191
|
/**
|
|
1192
1192
|
* Preview a webset
|
|
1193
1193
|
* @param params The preview parameters
|
|
1194
|
+
* @param options Optional parameters. Search = true allows you to retrieve a preview set of items that could be returned by the webset.
|
|
1194
1195
|
* @returns The preview response showing how the query will be decomposed
|
|
1195
1196
|
*/
|
|
1196
|
-
async preview(params) {
|
|
1197
|
+
async preview(params, options) {
|
|
1198
|
+
const queryParams = {};
|
|
1199
|
+
if (options?.search !== void 0) {
|
|
1200
|
+
queryParams.search = options.search;
|
|
1201
|
+
}
|
|
1197
1202
|
return this.request(
|
|
1198
1203
|
"/v0/websets/preview",
|
|
1199
1204
|
"POST",
|
|
1200
|
-
params
|
|
1205
|
+
params,
|
|
1206
|
+
queryParams
|
|
1201
1207
|
);
|
|
1202
1208
|
}
|
|
1203
1209
|
/**
|