exa-js 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -3043,6 +3043,7 @@ type ContentsOptions = {
3043
3043
  highlights?: HighlightsContentsOptions | true;
3044
3044
  summary?: SummaryContentsOptions | true;
3045
3045
  livecrawl?: LivecrawlOptions;
3046
+ /** @deprecated Use `highlights` or `text` instead. Will be removed in a future version. */
3046
3047
  context?: ContextOptions | true;
3047
3048
  livecrawlTimeout?: number;
3048
3049
  maxAgeHours?: number;
@@ -3094,14 +3095,15 @@ type BaseRegularSearchOptions = BaseSearchOptions & {
3094
3095
  useAutoprompt?: boolean;
3095
3096
  };
3096
3097
  /**
3097
- * Contents options for deep search - context is always returned and cannot be disabled
3098
+ * Contents options for deep search.
3099
+ * @deprecated The `context` field is deprecated. Use `highlights` or `text` instead.
3098
3100
  */
3099
3101
  type DeepContentsOptions = Omit<ContentsOptions, "context"> & {
3102
+ /** @deprecated Use `highlights` or `text` instead. Will be removed in a future version. */
3100
3103
  context?: Omit<ContextOptions, never> | true;
3101
3104
  };
3102
3105
  /**
3103
3106
  * Search options for deep search type, which supports additional queries.
3104
- * Note: context is always returned by the API for deep search and cannot be set to false.
3105
3107
  */
3106
3108
  type DeepSearchOptions = Omit<BaseRegularSearchOptions, "contents"> & {
3107
3109
  type: "deep";
@@ -3117,10 +3119,10 @@ type DeepSearchOptions = Omit<BaseRegularSearchOptions, "contents"> & {
3117
3119
  contents?: DeepContentsOptions;
3118
3120
  };
3119
3121
  /**
3120
- * Search options for non-deep search types (keyword, neural, auto, hybrid, fast)
3122
+ * Search options for non-deep search types (keyword, neural, auto, hybrid, fast, instant)
3121
3123
  */
3122
3124
  type NonDeepSearchOptions = BaseRegularSearchOptions & {
3123
- type?: "keyword" | "neural" | "auto" | "hybrid" | "fast";
3125
+ type?: "keyword" | "neural" | "auto" | "hybrid" | "fast" | "instant";
3124
3126
  };
3125
3127
  /**
3126
3128
  * Search options for performing a search query.
@@ -3204,6 +3206,8 @@ type SummaryContentsOptions = {
3204
3206
  */
3205
3207
  type JSONSchema = Record<string, unknown>;
3206
3208
  /**
3209
+ * @deprecated Use `highlights` or `text` instead. The `context` option is deprecated and will be removed in a future version.
3210
+ *
3207
3211
  * Options for retrieving the context from a list of search results. The context is a string
3208
3212
  * representation of all the search results.
3209
3213
  * @typedef {Object} ContextOptions
@@ -3405,7 +3409,7 @@ type SearchResult<T extends ContentsOptions> = {
3405
3409
  * Represents a search response object.
3406
3410
  * @typedef {Object} SearchResponse
3407
3411
  * @property {Result[]} results - The list of search results.
3408
- * @property {string} [context] - The context for the search.
3412
+ * @property {string} [context] - Deprecated. The context for the search.
3409
3413
  * @property {string} [autoDate] - The autoprompt date, if applicable.
3410
3414
  * @property {string} requestId - The request ID for the search.
3411
3415
  * @property {CostDollars} [costDollars] - The cost breakdown for this request.
@@ -3414,6 +3418,7 @@ type SearchResult<T extends ContentsOptions> = {
3414
3418
  */
3415
3419
  type SearchResponse<T extends ContentsOptions> = {
3416
3420
  results: SearchResult<T>[];
3421
+ /** @deprecated Use `highlights` or `text` on individual results instead. Will be removed in a future version. */
3417
3422
  context?: string;
3418
3423
  autoDate?: string;
3419
3424
  requestId: string;
package/dist/index.d.ts CHANGED
@@ -3043,6 +3043,7 @@ type ContentsOptions = {
3043
3043
  highlights?: HighlightsContentsOptions | true;
3044
3044
  summary?: SummaryContentsOptions | true;
3045
3045
  livecrawl?: LivecrawlOptions;
3046
+ /** @deprecated Use `highlights` or `text` instead. Will be removed in a future version. */
3046
3047
  context?: ContextOptions | true;
3047
3048
  livecrawlTimeout?: number;
3048
3049
  maxAgeHours?: number;
@@ -3094,14 +3095,15 @@ type BaseRegularSearchOptions = BaseSearchOptions & {
3094
3095
  useAutoprompt?: boolean;
3095
3096
  };
3096
3097
  /**
3097
- * Contents options for deep search - context is always returned and cannot be disabled
3098
+ * Contents options for deep search.
3099
+ * @deprecated The `context` field is deprecated. Use `highlights` or `text` instead.
3098
3100
  */
3099
3101
  type DeepContentsOptions = Omit<ContentsOptions, "context"> & {
3102
+ /** @deprecated Use `highlights` or `text` instead. Will be removed in a future version. */
3100
3103
  context?: Omit<ContextOptions, never> | true;
3101
3104
  };
3102
3105
  /**
3103
3106
  * Search options for deep search type, which supports additional queries.
3104
- * Note: context is always returned by the API for deep search and cannot be set to false.
3105
3107
  */
3106
3108
  type DeepSearchOptions = Omit<BaseRegularSearchOptions, "contents"> & {
3107
3109
  type: "deep";
@@ -3117,10 +3119,10 @@ type DeepSearchOptions = Omit<BaseRegularSearchOptions, "contents"> & {
3117
3119
  contents?: DeepContentsOptions;
3118
3120
  };
3119
3121
  /**
3120
- * Search options for non-deep search types (keyword, neural, auto, hybrid, fast)
3122
+ * Search options for non-deep search types (keyword, neural, auto, hybrid, fast, instant)
3121
3123
  */
3122
3124
  type NonDeepSearchOptions = BaseRegularSearchOptions & {
3123
- type?: "keyword" | "neural" | "auto" | "hybrid" | "fast";
3125
+ type?: "keyword" | "neural" | "auto" | "hybrid" | "fast" | "instant";
3124
3126
  };
3125
3127
  /**
3126
3128
  * Search options for performing a search query.
@@ -3204,6 +3206,8 @@ type SummaryContentsOptions = {
3204
3206
  */
3205
3207
  type JSONSchema = Record<string, unknown>;
3206
3208
  /**
3209
+ * @deprecated Use `highlights` or `text` instead. The `context` option is deprecated and will be removed in a future version.
3210
+ *
3207
3211
  * Options for retrieving the context from a list of search results. The context is a string
3208
3212
  * representation of all the search results.
3209
3213
  * @typedef {Object} ContextOptions
@@ -3405,7 +3409,7 @@ type SearchResult<T extends ContentsOptions> = {
3405
3409
  * Represents a search response object.
3406
3410
  * @typedef {Object} SearchResponse
3407
3411
  * @property {Result[]} results - The list of search results.
3408
- * @property {string} [context] - The context for the search.
3412
+ * @property {string} [context] - Deprecated. The context for the search.
3409
3413
  * @property {string} [autoDate] - The autoprompt date, if applicable.
3410
3414
  * @property {string} requestId - The request ID for the search.
3411
3415
  * @property {CostDollars} [costDollars] - The cost breakdown for this request.
@@ -3414,6 +3418,7 @@ type SearchResult<T extends ContentsOptions> = {
3414
3418
  */
3415
3419
  type SearchResponse<T extends ContentsOptions> = {
3416
3420
  results: SearchResult<T>[];
3421
+ /** @deprecated Use `highlights` or `text` on individual results instead. Will be removed in a future version. */
3417
3422
  context?: string;
3418
3423
  autoDate?: string;
3419
3424
  requestId: string;
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.3.0",
77
+ version: "2.4.0",
78
78
  description: "Exa SDK for Node.js and the browser",
79
79
  publishConfig: {
80
80
  access: "public"