valyu-js 2.7.2 → 2.7.4

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
@@ -207,7 +207,7 @@ type DeepResearchMode = "fast" | "standard" | "lite" | "heavy" | "max";
207
207
  type DeepResearchStatus = "queued" | "running" | "awaiting_input" | "paused" | "completed" | "failed" | "cancelled";
208
208
  type DeepResearchOutputFormat = "markdown" | "pdf" | "toon" | Record<string, any>;
209
209
  type DeepResearchOutputType = "markdown" | "json" | "toon";
210
- type ImageType = "chart" | "ai_generated";
210
+ type ImageType = "chart" | "ai_generated" | "screenshot";
211
211
  type ChartType = "line" | "bar" | "area";
212
212
  interface FileAttachment {
213
213
  data: string;
@@ -261,6 +261,10 @@ interface DeepResearchSearchConfig {
261
261
  category?: string;
262
262
  countryCode?: CountryCode;
263
263
  }
264
+ interface DeepResearchTools {
265
+ code_execution?: boolean;
266
+ screenshots?: boolean;
267
+ }
264
268
  interface DeepResearchCreateOptions {
265
269
  query?: string;
266
270
  input?: string;
@@ -275,7 +279,9 @@ interface DeepResearchCreateOptions {
275
279
  files?: FileAttachment[];
276
280
  deliverables?: (string | Deliverable)[];
277
281
  mcpServers?: MCPServerConfig[];
282
+ /** @deprecated Use tools.code_execution instead */
278
283
  codeExecution?: boolean;
284
+ tools?: DeepResearchTools;
279
285
  previousReports?: string[];
280
286
  webhookUrl?: string;
281
287
  alertEmail?: string | AlertEmailConfig;
@@ -321,16 +327,16 @@ interface ChartDataSeries {
321
327
  interface ImageMetadata {
322
328
  image_id: string;
323
329
  image_type: ImageType;
324
- deepresearch_id: string;
325
330
  title: string;
326
331
  description?: string;
327
332
  image_url: string;
328
- s3_key: string;
329
333
  created_at: number;
330
334
  chart_type?: ChartType;
331
335
  x_axis_label?: string;
332
336
  y_axis_label?: string;
333
337
  data_series?: ChartDataSeries[];
338
+ source_url?: string;
339
+ captured_at?: number;
334
340
  }
335
341
  interface DeepResearchSource {
336
342
  title: string;
@@ -354,6 +360,12 @@ interface DeepResearchUsage {
354
360
  compute_cost: number;
355
361
  total_cost: number;
356
362
  }
363
+ interface DeepResearchCostBreakdown {
364
+ task: number;
365
+ screenshots?: number;
366
+ code_execution?: number;
367
+ deliverables?: number;
368
+ }
357
369
  interface DeepResearchCreateResponse {
358
370
  success: boolean;
359
371
  deepresearch_id?: string;
@@ -387,6 +399,8 @@ interface DeepResearchStatusResponse {
387
399
  sources?: DeepResearchSource[];
388
400
  cost?: number;
389
401
  usage?: DeepResearchUsage;
402
+ cost_breakdown?: DeepResearchCostBreakdown;
403
+ tools?: DeepResearchTools;
390
404
  batch_id?: string;
391
405
  batch_task_id?: string;
392
406
  hitl_config?: Record<string, boolean>;
@@ -968,4 +982,4 @@ declare class Valyu {
968
982
  private _datasourcesCategories;
969
983
  }
970
984
 
971
- export { type AIUsage, type AddBatchTasksOptions, type AddBatchTasksResponse, type AlertEmailConfig, type AnswerErrorResponse, type AnswerOptions, type AnswerResponse, type AnswerStreamChunk, type AnswerStreamChunkType, type AnswerSuccessResponse, type BatchCounts, type BatchPagination, type BatchStatus, type BatchStatusResponse, type BatchTaskCreated, type BatchTaskInput, type BatchTaskListItem, type BatchWaitOptions, type CancelBatchResponse, type ChartDataPoint, type ChartDataSeries, type ChartType, type ContentResponseLength, type ContentResult, type ContentResultFailed, type ContentResultSuccess, type ContentsAsyncJobResponse, type ContentsJobResponse, type ContentsJobStatus, type ContentsJobWaitOptions, type ContentsOptions, type ContentsResponse, type Cost, type CountryCode, type CreateBatchOptions, type CreateBatchResponse, type Datasource, type DatasourceCategory, type DatasourceCategoryId, type DatasourceCoverage, type DatasourceModality, type DatasourcePricing, type DatasourcesCategoriesResponse, type DatasourcesListOptions, type DatasourcesListResponse, type DeepResearchBatch, type DeepResearchCancelResponse, type DeepResearchCreateOptions, type DeepResearchCreateResponse, type DeepResearchDeleteResponse, type DeepResearchGetAssetsOptions, type DeepResearchGetAssetsResponse, type DeepResearchListResponse, type DeepResearchMode, type DeepResearchOutputFormat, type DeepResearchRespondResponse, type DeepResearchSearchConfig, type DeepResearchSource, type DeepResearchStatus, type DeepResearchStatusResponse, type DeepResearchTaskListItem, type DeepResearchTogglePublicResponse, type DeepResearchUpdateResponse, type DeepResearchUsage, type ExtractEffort, type ExtractionMetadata, type FeedbackResponse, type FeedbackSentiment, type FileAttachment, type HitlConfig, type ImageMetadata, type ImageType, type Interaction, type InteractionHistoryEntry, type InteractionType, type ListBatchTasksOptions, type ListBatchTasksResponse, type ListBatchesOptions, type ListBatchesResponse, type ListOptions, type MCPServerConfig, type Progress, type ResponseLength, type SearchMetadata, type SearchOptions, type SearchResponse, type SearchResult, type SearchType, type StreamCallback, Valyu, type WaitOptions, verifyContentsWebhookSignature };
985
+ export { type AIUsage, type AddBatchTasksOptions, type AddBatchTasksResponse, type AlertEmailConfig, type AnswerErrorResponse, type AnswerOptions, type AnswerResponse, type AnswerStreamChunk, type AnswerStreamChunkType, type AnswerSuccessResponse, type BatchCounts, type BatchPagination, type BatchStatus, type BatchStatusResponse, type BatchTaskCreated, type BatchTaskInput, type BatchTaskListItem, type BatchWaitOptions, type CancelBatchResponse, type ChartDataPoint, type ChartDataSeries, type ChartType, type ContentResponseLength, type ContentResult, type ContentResultFailed, type ContentResultSuccess, type ContentsAsyncJobResponse, type ContentsJobResponse, type ContentsJobStatus, type ContentsJobWaitOptions, type ContentsOptions, type ContentsResponse, type Cost, type CountryCode, type CreateBatchOptions, type CreateBatchResponse, type Datasource, type DatasourceCategory, type DatasourceCategoryId, type DatasourceCoverage, type DatasourceModality, type DatasourcePricing, type DatasourcesCategoriesResponse, type DatasourcesListOptions, type DatasourcesListResponse, type DeepResearchBatch, type DeepResearchCancelResponse, type DeepResearchCostBreakdown, type DeepResearchCreateOptions, type DeepResearchCreateResponse, type DeepResearchDeleteResponse, type DeepResearchGetAssetsOptions, type DeepResearchGetAssetsResponse, type DeepResearchListResponse, type DeepResearchMode, type DeepResearchOutputFormat, type DeepResearchRespondResponse, type DeepResearchSearchConfig, type DeepResearchSource, type DeepResearchStatus, type DeepResearchStatusResponse, type DeepResearchTaskListItem, type DeepResearchTogglePublicResponse, type DeepResearchTools, type DeepResearchUpdateResponse, type DeepResearchUsage, type ExtractEffort, type ExtractionMetadata, type FeedbackResponse, type FeedbackSentiment, type FileAttachment, type HitlConfig, type ImageMetadata, type ImageType, type Interaction, type InteractionHistoryEntry, type InteractionType, type ListBatchTasksOptions, type ListBatchTasksResponse, type ListBatchesOptions, type ListBatchesResponse, type ListOptions, type MCPServerConfig, type Progress, type ResponseLength, type SearchMetadata, type SearchOptions, type SearchResponse, type SearchResult, type SearchType, type StreamCallback, Valyu, type WaitOptions, verifyContentsWebhookSignature };
package/dist/index.d.ts CHANGED
@@ -207,7 +207,7 @@ type DeepResearchMode = "fast" | "standard" | "lite" | "heavy" | "max";
207
207
  type DeepResearchStatus = "queued" | "running" | "awaiting_input" | "paused" | "completed" | "failed" | "cancelled";
208
208
  type DeepResearchOutputFormat = "markdown" | "pdf" | "toon" | Record<string, any>;
209
209
  type DeepResearchOutputType = "markdown" | "json" | "toon";
210
- type ImageType = "chart" | "ai_generated";
210
+ type ImageType = "chart" | "ai_generated" | "screenshot";
211
211
  type ChartType = "line" | "bar" | "area";
212
212
  interface FileAttachment {
213
213
  data: string;
@@ -261,6 +261,10 @@ interface DeepResearchSearchConfig {
261
261
  category?: string;
262
262
  countryCode?: CountryCode;
263
263
  }
264
+ interface DeepResearchTools {
265
+ code_execution?: boolean;
266
+ screenshots?: boolean;
267
+ }
264
268
  interface DeepResearchCreateOptions {
265
269
  query?: string;
266
270
  input?: string;
@@ -275,7 +279,9 @@ interface DeepResearchCreateOptions {
275
279
  files?: FileAttachment[];
276
280
  deliverables?: (string | Deliverable)[];
277
281
  mcpServers?: MCPServerConfig[];
282
+ /** @deprecated Use tools.code_execution instead */
278
283
  codeExecution?: boolean;
284
+ tools?: DeepResearchTools;
279
285
  previousReports?: string[];
280
286
  webhookUrl?: string;
281
287
  alertEmail?: string | AlertEmailConfig;
@@ -321,16 +327,16 @@ interface ChartDataSeries {
321
327
  interface ImageMetadata {
322
328
  image_id: string;
323
329
  image_type: ImageType;
324
- deepresearch_id: string;
325
330
  title: string;
326
331
  description?: string;
327
332
  image_url: string;
328
- s3_key: string;
329
333
  created_at: number;
330
334
  chart_type?: ChartType;
331
335
  x_axis_label?: string;
332
336
  y_axis_label?: string;
333
337
  data_series?: ChartDataSeries[];
338
+ source_url?: string;
339
+ captured_at?: number;
334
340
  }
335
341
  interface DeepResearchSource {
336
342
  title: string;
@@ -354,6 +360,12 @@ interface DeepResearchUsage {
354
360
  compute_cost: number;
355
361
  total_cost: number;
356
362
  }
363
+ interface DeepResearchCostBreakdown {
364
+ task: number;
365
+ screenshots?: number;
366
+ code_execution?: number;
367
+ deliverables?: number;
368
+ }
357
369
  interface DeepResearchCreateResponse {
358
370
  success: boolean;
359
371
  deepresearch_id?: string;
@@ -387,6 +399,8 @@ interface DeepResearchStatusResponse {
387
399
  sources?: DeepResearchSource[];
388
400
  cost?: number;
389
401
  usage?: DeepResearchUsage;
402
+ cost_breakdown?: DeepResearchCostBreakdown;
403
+ tools?: DeepResearchTools;
390
404
  batch_id?: string;
391
405
  batch_task_id?: string;
392
406
  hitl_config?: Record<string, boolean>;
@@ -968,4 +982,4 @@ declare class Valyu {
968
982
  private _datasourcesCategories;
969
983
  }
970
984
 
971
- export { type AIUsage, type AddBatchTasksOptions, type AddBatchTasksResponse, type AlertEmailConfig, type AnswerErrorResponse, type AnswerOptions, type AnswerResponse, type AnswerStreamChunk, type AnswerStreamChunkType, type AnswerSuccessResponse, type BatchCounts, type BatchPagination, type BatchStatus, type BatchStatusResponse, type BatchTaskCreated, type BatchTaskInput, type BatchTaskListItem, type BatchWaitOptions, type CancelBatchResponse, type ChartDataPoint, type ChartDataSeries, type ChartType, type ContentResponseLength, type ContentResult, type ContentResultFailed, type ContentResultSuccess, type ContentsAsyncJobResponse, type ContentsJobResponse, type ContentsJobStatus, type ContentsJobWaitOptions, type ContentsOptions, type ContentsResponse, type Cost, type CountryCode, type CreateBatchOptions, type CreateBatchResponse, type Datasource, type DatasourceCategory, type DatasourceCategoryId, type DatasourceCoverage, type DatasourceModality, type DatasourcePricing, type DatasourcesCategoriesResponse, type DatasourcesListOptions, type DatasourcesListResponse, type DeepResearchBatch, type DeepResearchCancelResponse, type DeepResearchCreateOptions, type DeepResearchCreateResponse, type DeepResearchDeleteResponse, type DeepResearchGetAssetsOptions, type DeepResearchGetAssetsResponse, type DeepResearchListResponse, type DeepResearchMode, type DeepResearchOutputFormat, type DeepResearchRespondResponse, type DeepResearchSearchConfig, type DeepResearchSource, type DeepResearchStatus, type DeepResearchStatusResponse, type DeepResearchTaskListItem, type DeepResearchTogglePublicResponse, type DeepResearchUpdateResponse, type DeepResearchUsage, type ExtractEffort, type ExtractionMetadata, type FeedbackResponse, type FeedbackSentiment, type FileAttachment, type HitlConfig, type ImageMetadata, type ImageType, type Interaction, type InteractionHistoryEntry, type InteractionType, type ListBatchTasksOptions, type ListBatchTasksResponse, type ListBatchesOptions, type ListBatchesResponse, type ListOptions, type MCPServerConfig, type Progress, type ResponseLength, type SearchMetadata, type SearchOptions, type SearchResponse, type SearchResult, type SearchType, type StreamCallback, Valyu, type WaitOptions, verifyContentsWebhookSignature };
985
+ export { type AIUsage, type AddBatchTasksOptions, type AddBatchTasksResponse, type AlertEmailConfig, type AnswerErrorResponse, type AnswerOptions, type AnswerResponse, type AnswerStreamChunk, type AnswerStreamChunkType, type AnswerSuccessResponse, type BatchCounts, type BatchPagination, type BatchStatus, type BatchStatusResponse, type BatchTaskCreated, type BatchTaskInput, type BatchTaskListItem, type BatchWaitOptions, type CancelBatchResponse, type ChartDataPoint, type ChartDataSeries, type ChartType, type ContentResponseLength, type ContentResult, type ContentResultFailed, type ContentResultSuccess, type ContentsAsyncJobResponse, type ContentsJobResponse, type ContentsJobStatus, type ContentsJobWaitOptions, type ContentsOptions, type ContentsResponse, type Cost, type CountryCode, type CreateBatchOptions, type CreateBatchResponse, type Datasource, type DatasourceCategory, type DatasourceCategoryId, type DatasourceCoverage, type DatasourceModality, type DatasourcePricing, type DatasourcesCategoriesResponse, type DatasourcesListOptions, type DatasourcesListResponse, type DeepResearchBatch, type DeepResearchCancelResponse, type DeepResearchCostBreakdown, type DeepResearchCreateOptions, type DeepResearchCreateResponse, type DeepResearchDeleteResponse, type DeepResearchGetAssetsOptions, type DeepResearchGetAssetsResponse, type DeepResearchListResponse, type DeepResearchMode, type DeepResearchOutputFormat, type DeepResearchRespondResponse, type DeepResearchSearchConfig, type DeepResearchSource, type DeepResearchStatus, type DeepResearchStatusResponse, type DeepResearchTaskListItem, type DeepResearchTogglePublicResponse, type DeepResearchTools, type DeepResearchUpdateResponse, type DeepResearchUsage, type ExtractEffort, type ExtractionMetadata, type FeedbackResponse, type FeedbackSentiment, type FileAttachment, type HitlConfig, type ImageMetadata, type ImageType, type Interaction, type InteractionHistoryEntry, type InteractionType, type ListBatchTasksOptions, type ListBatchTasksResponse, type ListBatchesOptions, type ListBatchesResponse, type ListOptions, type MCPServerConfig, type Progress, type ResponseLength, type SearchMetadata, type SearchOptions, type SearchResponse, type SearchResult, type SearchType, type StreamCallback, Valyu, type WaitOptions, verifyContentsWebhookSignature };
package/dist/index.js CHANGED
@@ -660,9 +660,13 @@ var Valyu = class {
660
660
  query: queryValue,
661
661
  mode: mode || "fast",
662
662
  // API defaults to "standard", but we keep "fast" for backward compatibility
663
- output_formats: options.outputFormats || ["markdown"],
664
- code_execution: options.codeExecution !== false
663
+ output_formats: options.outputFormats || ["markdown"]
665
664
  };
665
+ if (options.tools) {
666
+ payload.tools = options.tools;
667
+ } else if (options.codeExecution !== void 0) {
668
+ payload.code_execution = options.codeExecution;
669
+ }
666
670
  if (options.strategy) payload.strategy = options.strategy;
667
671
  if (options.researchStrategy)
668
672
  payload.research_strategy = options.researchStrategy;