exa-js 2.1.0 → 2.2.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
@@ -2998,6 +2998,7 @@ declare class ExaError extends Error {
2998
2998
  * @property {SummaryContentsOptions | boolean} [summary] - Options for retrieving summary.
2999
2999
  * @property {LivecrawlOptions} [livecrawl] - Options for livecrawling contents. Default is "never" for neural/auto search, "fallback" for keyword search.
3000
3000
  * @property {number} [livecrawlTimeout] - The timeout for livecrawling. Max and default is 10000ms.
3001
+ * @property {number} [maxAgeHours] - Maximum age of indexed content in hours. If older, fetches with livecrawl. 0 = always livecrawl, -1 = never livecrawl (cache only). Cannot be used together with livecrawl.
3001
3002
  * @property {boolean} [filterEmptyResults] - If true, filters out results with no contents. Default is true.
3002
3003
  * @property {number} [subpages] - The number of subpages to return for each result, where each subpage is derived from an internal link for the result.
3003
3004
  * @property {string | string[]} [subpageTarget] - Text used to match/rank subpages in the returned subpage list. You could use "about" to get *about* page for websites. Note that this is a fuzzy matcher.
@@ -3010,6 +3011,7 @@ type ContentsOptions = {
3010
3011
  livecrawl?: LivecrawlOptions;
3011
3012
  context?: ContextOptions | true;
3012
3013
  livecrawlTimeout?: number;
3014
+ maxAgeHours?: number;
3013
3015
  filterEmptyResults?: boolean;
3014
3016
  subpages?: number;
3015
3017
  subpageTarget?: string | string[];
@@ -3041,7 +3043,7 @@ type BaseSearchOptions = {
3041
3043
  endCrawlDate?: string;
3042
3044
  startPublishedDate?: string;
3043
3045
  endPublishedDate?: string;
3044
- category?: "company" | "research paper" | "news" | "pdf" | "github" | "tweet" | "personal site" | "financial report" | "people";
3046
+ category?: "company" | "research paper" | "news" | "pdf" | "tweet" | "personal site" | "financial report" | "people";
3045
3047
  includeText?: string[];
3046
3048
  excludeText?: string[];
3047
3049
  flags?: string[];
@@ -3108,15 +3110,32 @@ type ExtrasOptions = {
3108
3110
  * @typedef {string} LivecrawlOptions
3109
3111
  */
3110
3112
  type LivecrawlOptions = "never" | "fallback" | "always" | "auto" | "preferred";
3113
+ /**
3114
+ * Verbosity levels for content filtering.
3115
+ * - compact: Most concise output, main content only (default)
3116
+ * - standard: Balanced content with more detail
3117
+ * - full: Complete content including all sections
3118
+ */
3119
+ type VerbosityOptions = "compact" | "standard" | "full";
3120
+ /**
3121
+ * Section tags for semantic content filtering.
3122
+ */
3123
+ type SectionTag = "unspecified" | "header" | "navigation" | "banner" | "body" | "sidebar" | "footer" | "metadata";
3111
3124
  /**
3112
3125
  * Options for retrieving text from page.
3113
3126
  * @typedef {Object} TextContentsOptions
3114
3127
  * @property {number} [maxCharacters] - The maximum number of characters to return.
3115
3128
  * @property {boolean} [includeHtmlTags] - If true, includes HTML tags in the returned text. Default: false
3129
+ * @property {VerbosityOptions} [verbosity] - Controls verbosity level of returned content. Default: "compact". Requires livecrawl: "always".
3130
+ * @property {SectionTag[]} [includeSections] - Only include content from these semantic sections. Requires livecrawl: "always".
3131
+ * @property {SectionTag[]} [excludeSections] - Exclude content from these semantic sections. Requires livecrawl: "always".
3116
3132
  */
3117
3133
  type TextContentsOptions = {
3118
3134
  maxCharacters?: number;
3119
3135
  includeHtmlTags?: boolean;
3136
+ verbosity?: VerbosityOptions;
3137
+ includeSections?: SectionTag[];
3138
+ excludeSections?: SectionTag[];
3120
3139
  };
3121
3140
  /**
3122
3141
  * Options for retrieving highlights from page.
@@ -3267,6 +3286,10 @@ type EntityCompanyPropertiesFinancials = {
3267
3286
  fundingTotal?: number | null;
3268
3287
  fundingLatestRound?: EntityCompanyPropertiesFundingRound | null;
3269
3288
  };
3289
+ /** Company web traffic information. */
3290
+ type EntityCompanyPropertiesWebTraffic = {
3291
+ visitsMonthly?: number | null;
3292
+ };
3270
3293
  /** Structured properties for a company entity. */
3271
3294
  type EntityCompanyProperties = {
3272
3295
  name?: string | null;
@@ -3275,6 +3298,7 @@ type EntityCompanyProperties = {
3275
3298
  workforce?: EntityCompanyPropertiesWorkforce | null;
3276
3299
  headquarters?: EntityCompanyPropertiesHeadquarters | null;
3277
3300
  financials?: EntityCompanyPropertiesFinancials | null;
3301
+ webTraffic?: EntityCompanyPropertiesWebTraffic | null;
3278
3302
  };
3279
3303
  /** Date range for work history entries. */
3280
3304
  type EntityDateRange = {
@@ -3660,4 +3684,4 @@ declare class Exa {
3660
3684
  private parseSSEStream;
3661
3685
  }
3662
3686
 
3663
- 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 EntityCompanyProperties, type EntityCompanyPropertiesFinancials, type EntityCompanyPropertiesFundingRound, type EntityCompanyPropertiesHeadquarters, type EntityCompanyPropertiesWorkforce, type EntityDateRange, type EntityPersonProperties, type EntityPersonPropertiesCompanyRef, type EntityPersonPropertiesWorkHistoryEntry, 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, WebsetExcludeSource, 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, WebsetSearchScopeSource, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, Exa as default };
3687
+ 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 EntityCompanyProperties, type EntityCompanyPropertiesFinancials, type EntityCompanyPropertiesFundingRound, type EntityCompanyPropertiesHeadquarters, type EntityCompanyPropertiesWebTraffic, type EntityCompanyPropertiesWorkforce, type EntityDateRange, type EntityPersonProperties, type EntityPersonPropertiesCompanyRef, type EntityPersonPropertiesWorkHistoryEntry, 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 SectionTag, 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 VerbosityOptions, type WaitUntilCompletedOptions, type Webhook, type WebhookAttempt, WebhookStatus, type Webset, type WebsetEnrichment, WebsetEnrichmentFormat, WebsetEnrichmentStatus, WebsetEnrichmentsClient, WebsetExcludeSource, 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, WebsetSearchScopeSource, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, Exa as default };
package/dist/index.d.ts CHANGED
@@ -2998,6 +2998,7 @@ declare class ExaError extends Error {
2998
2998
  * @property {SummaryContentsOptions | boolean} [summary] - Options for retrieving summary.
2999
2999
  * @property {LivecrawlOptions} [livecrawl] - Options for livecrawling contents. Default is "never" for neural/auto search, "fallback" for keyword search.
3000
3000
  * @property {number} [livecrawlTimeout] - The timeout for livecrawling. Max and default is 10000ms.
3001
+ * @property {number} [maxAgeHours] - Maximum age of indexed content in hours. If older, fetches with livecrawl. 0 = always livecrawl, -1 = never livecrawl (cache only). Cannot be used together with livecrawl.
3001
3002
  * @property {boolean} [filterEmptyResults] - If true, filters out results with no contents. Default is true.
3002
3003
  * @property {number} [subpages] - The number of subpages to return for each result, where each subpage is derived from an internal link for the result.
3003
3004
  * @property {string | string[]} [subpageTarget] - Text used to match/rank subpages in the returned subpage list. You could use "about" to get *about* page for websites. Note that this is a fuzzy matcher.
@@ -3010,6 +3011,7 @@ type ContentsOptions = {
3010
3011
  livecrawl?: LivecrawlOptions;
3011
3012
  context?: ContextOptions | true;
3012
3013
  livecrawlTimeout?: number;
3014
+ maxAgeHours?: number;
3013
3015
  filterEmptyResults?: boolean;
3014
3016
  subpages?: number;
3015
3017
  subpageTarget?: string | string[];
@@ -3041,7 +3043,7 @@ type BaseSearchOptions = {
3041
3043
  endCrawlDate?: string;
3042
3044
  startPublishedDate?: string;
3043
3045
  endPublishedDate?: string;
3044
- category?: "company" | "research paper" | "news" | "pdf" | "github" | "tweet" | "personal site" | "financial report" | "people";
3046
+ category?: "company" | "research paper" | "news" | "pdf" | "tweet" | "personal site" | "financial report" | "people";
3045
3047
  includeText?: string[];
3046
3048
  excludeText?: string[];
3047
3049
  flags?: string[];
@@ -3108,15 +3110,32 @@ type ExtrasOptions = {
3108
3110
  * @typedef {string} LivecrawlOptions
3109
3111
  */
3110
3112
  type LivecrawlOptions = "never" | "fallback" | "always" | "auto" | "preferred";
3113
+ /**
3114
+ * Verbosity levels for content filtering.
3115
+ * - compact: Most concise output, main content only (default)
3116
+ * - standard: Balanced content with more detail
3117
+ * - full: Complete content including all sections
3118
+ */
3119
+ type VerbosityOptions = "compact" | "standard" | "full";
3120
+ /**
3121
+ * Section tags for semantic content filtering.
3122
+ */
3123
+ type SectionTag = "unspecified" | "header" | "navigation" | "banner" | "body" | "sidebar" | "footer" | "metadata";
3111
3124
  /**
3112
3125
  * Options for retrieving text from page.
3113
3126
  * @typedef {Object} TextContentsOptions
3114
3127
  * @property {number} [maxCharacters] - The maximum number of characters to return.
3115
3128
  * @property {boolean} [includeHtmlTags] - If true, includes HTML tags in the returned text. Default: false
3129
+ * @property {VerbosityOptions} [verbosity] - Controls verbosity level of returned content. Default: "compact". Requires livecrawl: "always".
3130
+ * @property {SectionTag[]} [includeSections] - Only include content from these semantic sections. Requires livecrawl: "always".
3131
+ * @property {SectionTag[]} [excludeSections] - Exclude content from these semantic sections. Requires livecrawl: "always".
3116
3132
  */
3117
3133
  type TextContentsOptions = {
3118
3134
  maxCharacters?: number;
3119
3135
  includeHtmlTags?: boolean;
3136
+ verbosity?: VerbosityOptions;
3137
+ includeSections?: SectionTag[];
3138
+ excludeSections?: SectionTag[];
3120
3139
  };
3121
3140
  /**
3122
3141
  * Options for retrieving highlights from page.
@@ -3267,6 +3286,10 @@ type EntityCompanyPropertiesFinancials = {
3267
3286
  fundingTotal?: number | null;
3268
3287
  fundingLatestRound?: EntityCompanyPropertiesFundingRound | null;
3269
3288
  };
3289
+ /** Company web traffic information. */
3290
+ type EntityCompanyPropertiesWebTraffic = {
3291
+ visitsMonthly?: number | null;
3292
+ };
3270
3293
  /** Structured properties for a company entity. */
3271
3294
  type EntityCompanyProperties = {
3272
3295
  name?: string | null;
@@ -3275,6 +3298,7 @@ type EntityCompanyProperties = {
3275
3298
  workforce?: EntityCompanyPropertiesWorkforce | null;
3276
3299
  headquarters?: EntityCompanyPropertiesHeadquarters | null;
3277
3300
  financials?: EntityCompanyPropertiesFinancials | null;
3301
+ webTraffic?: EntityCompanyPropertiesWebTraffic | null;
3278
3302
  };
3279
3303
  /** Date range for work history entries. */
3280
3304
  type EntityDateRange = {
@@ -3660,4 +3684,4 @@ declare class Exa {
3660
3684
  private parseSSEStream;
3661
3685
  }
3662
3686
 
3663
- 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 EntityCompanyProperties, type EntityCompanyPropertiesFinancials, type EntityCompanyPropertiesFundingRound, type EntityCompanyPropertiesHeadquarters, type EntityCompanyPropertiesWorkforce, type EntityDateRange, type EntityPersonProperties, type EntityPersonPropertiesCompanyRef, type EntityPersonPropertiesWorkHistoryEntry, 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, WebsetExcludeSource, 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, WebsetSearchScopeSource, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, Exa as default };
3687
+ 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 EntityCompanyProperties, type EntityCompanyPropertiesFinancials, type EntityCompanyPropertiesFundingRound, type EntityCompanyPropertiesHeadquarters, type EntityCompanyPropertiesWebTraffic, type EntityCompanyPropertiesWorkforce, type EntityDateRange, type EntityPersonProperties, type EntityPersonPropertiesCompanyRef, type EntityPersonPropertiesWorkHistoryEntry, 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 SectionTag, 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 VerbosityOptions, type WaitUntilCompletedOptions, type Webhook, type WebhookAttempt, WebhookStatus, type Webset, type WebsetEnrichment, WebsetEnrichmentFormat, WebsetEnrichmentStatus, WebsetEnrichmentsClient, WebsetExcludeSource, 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, WebsetSearchScopeSource, WebsetSearchStatus, WebsetSearchesClient, WebsetStatus, WebsetWebhooksClient, WebsetsClient, Exa as default };
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.1.0",
77
+ version: "2.2.0",
78
78
  description: "Exa SDK for Node.js and the browser",
79
79
  publishConfig: {
80
80
  access: "public"
@@ -105,6 +105,7 @@ var package_default = {
105
105
  "generate:types:websets": "openapi-typescript https://raw.githubusercontent.com/exa-labs/openapi-spec/refs/heads/master/exa-websets-spec.yaml --enum --root-types --alphabetize --root-types-no-schema-prefix --output ./src/websets/openapi.ts && npm run format:websets",
106
106
  format: 'prettier --write "src/**/*.ts" "examples/**/*.ts"',
107
107
  "format:websets": "prettier --write src/websets/openapi.ts",
108
+ "generate-docs": "npx tsx scripts/generate-docs.ts",
108
109
  "build:beta": "cross-env NPM_CONFIG_TAG=beta npm run build",
109
110
  "version:beta": "npm version prerelease --preid=beta",
110
111
  "version:stable": "npm version patch",
@@ -118,8 +119,10 @@ var package_default = {
118
119
  "cross-env": "~7.0.3",
119
120
  "openapi-typescript": "~7.6.1",
120
121
  prettier: "~3.5.3",
122
+ "ts-morph": "^27.0.2",
121
123
  "ts-node": "~10.9.2",
122
124
  tsup: "~8.4.0",
125
+ tsx: "^4.21.0",
123
126
  typescript: "~5.8.3",
124
127
  vitest: "~3.1.1"
125
128
  },
@@ -1351,6 +1354,7 @@ var Exa2 = class {
1351
1354
  extras,
1352
1355
  livecrawl,
1353
1356
  livecrawlTimeout,
1357
+ maxAgeHours,
1354
1358
  context,
1355
1359
  ...rest
1356
1360
  } = options;
@@ -1377,6 +1381,7 @@ var Exa2 = class {
1377
1381
  if (livecrawl !== void 0) contentsOptions.livecrawl = livecrawl;
1378
1382
  if (livecrawlTimeout !== void 0)
1379
1383
  contentsOptions.livecrawlTimeout = livecrawlTimeout;
1384
+ if (maxAgeHours !== void 0) contentsOptions.maxAgeHours = maxAgeHours;
1380
1385
  if (context !== void 0) contentsOptions.context = context;
1381
1386
  return {
1382
1387
  contentsOptions,