valyu-js 2.7.18 → 2.9.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/README.md CHANGED
@@ -171,6 +171,57 @@ const result = await valyu.batch.waitForCompletion(batch.batch_id, {
171
171
  });
172
172
  ```
173
173
 
174
+ ### Workflows
175
+
176
+ Templated DeepResearch starting points - curated by Valyu or created by your org - with typed `{variable}` placeholders and version history.
177
+
178
+ ```typescript
179
+ // Browse curated workflows
180
+ const catalog = await valyu.workflows.list({ scope: "valyu", vertical: "investment-banking" });
181
+ for (const wf of catalog.workflows ?? []) {
182
+ console.log(`${wf.slug} - ${wf.title}`);
183
+ }
184
+
185
+ // Run one as a DeepResearch task
186
+ const task = await valyu.deepresearch.create({
187
+ workflowId: "ib-company-profile",
188
+ workflowParams: { company: "NVIDIA (NVDA)" },
189
+ });
190
+
191
+ const result = await valyu.deepresearch.wait(task.deepresearch_id);
192
+ console.log(result.output);
193
+ ```
194
+
195
+ Create your own:
196
+
197
+ ```typescript
198
+ await valyu.workflows.create({
199
+ slug: "weekly-competitor-scan",
200
+ title: "Weekly Competitor Scan",
201
+ version: {
202
+ prompt: "Summarize the week's most important developments at {company}.",
203
+ strategy: "Prioritize primary sources: filings, press releases, earnings calls.",
204
+ report_format: "Bullet-point briefing, grouped by theme.",
205
+ variables: [{ key: "company", label: "Company", required: true }],
206
+ },
207
+ });
208
+ ```
209
+
210
+ <details>
211
+ <summary>All Workflows methods</summary>
212
+
213
+ | Method | Description |
214
+ |---|---|
215
+ | `list(options?)` | List available workflows (filter by vertical, scope, tags, free text) |
216
+ | `get(slug, version?)` | Get a workflow's full template |
217
+ | `versions(slug)` | List a workflow's version history |
218
+ | `preview(slug, options?)` | Resolve the template without creating a task |
219
+ | `create(options)` | Create an org workflow |
220
+ | `update(slug, options)` | Update metadata and/or publish a new version |
221
+ | `delete(slug)` | Delete an org workflow |
222
+
223
+ </details>
224
+
174
225
  ### Data Sources
175
226
 
176
227
  List available data sources programmatically.
package/dist/index.d.mts CHANGED
@@ -329,6 +329,9 @@ interface DeepResearchCreateOptions {
329
329
  brandCollectionId?: string;
330
330
  metadata?: Record<string, string | number | boolean>;
331
331
  hitl?: HitlConfig;
332
+ workflowId?: string;
333
+ workflowParams?: Record<string, any>;
334
+ workflowVersion?: number;
332
335
  }
333
336
  interface HitlConfig {
334
337
  planningQuestions?: boolean;
@@ -423,6 +426,7 @@ interface DeepResearchCreateResponse {
423
426
  public?: boolean;
424
427
  webhook_secret?: string;
425
428
  message?: string;
429
+ workflow?: WorkflowRunInfo;
426
430
  error?: string;
427
431
  }
428
432
  interface DeepResearchStatusResponse {
@@ -455,6 +459,7 @@ interface DeepResearchStatusResponse {
455
459
  interaction?: Interaction;
456
460
  hitl_history?: InteractionHistoryEntry[];
457
461
  error?: string;
462
+ unreachable?: boolean;
458
463
  }
459
464
  interface DeepResearchTaskListItem {
460
465
  deepresearch_id: string;
@@ -722,6 +727,153 @@ interface DatasourcesCategoriesResponse {
722
727
  categories?: DatasourceCategory[];
723
728
  error?: string;
724
729
  }
730
+ type WorkflowMode = "fast" | "standard" | "heavy" | "max";
731
+ type WorkflowVariableType = "text" | "textarea" | "number" | "date" | "enum";
732
+ interface WorkflowVariableValidation {
733
+ min_length?: number;
734
+ max_length?: number;
735
+ pattern?: string;
736
+ enum?: string[];
737
+ }
738
+ interface WorkflowVariable {
739
+ key: string;
740
+ label?: string;
741
+ type?: WorkflowVariableType;
742
+ required?: boolean;
743
+ placeholder?: string;
744
+ help?: string;
745
+ examples?: string[];
746
+ validation?: WorkflowVariableValidation;
747
+ }
748
+ interface WorkflowDeliverable {
749
+ type: string;
750
+ description?: string;
751
+ }
752
+ interface WorkflowTools {
753
+ code_execution?: boolean;
754
+ screenshots?: boolean;
755
+ browser_use?: boolean;
756
+ charts?: boolean;
757
+ }
758
+ interface Workflow {
759
+ slug: string;
760
+ version?: number;
761
+ vertical?: string | null;
762
+ tags?: string[];
763
+ title?: string;
764
+ subtitle?: string | null;
765
+ description?: string | null;
766
+ popular?: boolean;
767
+ recommended_mode?: WorkflowMode;
768
+ estimated_time?: string | null;
769
+ is_valyu?: boolean;
770
+ owner_org_id?: string | null;
771
+ variables?: WorkflowVariable[];
772
+ deliverables?: WorkflowDeliverable[];
773
+ created_at?: string;
774
+ updated_at?: string;
775
+ prompt?: string;
776
+ strategy?: string;
777
+ report_format?: string;
778
+ tools?: WorkflowTools;
779
+ changelog?: string | null;
780
+ }
781
+ interface WorkflowVersionSummary {
782
+ version: number;
783
+ recommended_mode?: WorkflowMode;
784
+ estimated_time?: string | null;
785
+ changelog?: string | null;
786
+ created_at?: string;
787
+ is_current?: boolean;
788
+ }
789
+ interface WorkflowRunInfo {
790
+ slug?: string;
791
+ version?: number;
792
+ }
793
+ interface ResolvedWorkflowTemplate {
794
+ input?: string;
795
+ research_strategy?: string;
796
+ report_format?: string;
797
+ deliverables?: WorkflowDeliverable[];
798
+ mode?: WorkflowMode;
799
+ tools?: WorkflowTools;
800
+ }
801
+ /** Template body for creating a workflow or publishing a new version. */
802
+ interface WorkflowVersionInput {
803
+ prompt: string;
804
+ strategy: string;
805
+ report_format: string;
806
+ variables?: WorkflowVariable[];
807
+ deliverables?: WorkflowDeliverable[];
808
+ tools?: WorkflowTools;
809
+ recommended_mode?: WorkflowMode;
810
+ estimated_time?: string;
811
+ changelog?: string;
812
+ }
813
+ interface WorkflowsListOptions {
814
+ vertical?: string;
815
+ scope?: "valyu" | "org" | "all";
816
+ q?: string;
817
+ tags?: string[];
818
+ limit?: number;
819
+ expand?: boolean;
820
+ }
821
+ interface WorkflowCreateOptions {
822
+ slug: string;
823
+ title: string;
824
+ version: WorkflowVersionInput;
825
+ subtitle?: string;
826
+ description?: string;
827
+ vertical?: string;
828
+ tags?: string[];
829
+ icon?: string;
830
+ }
831
+ interface WorkflowUpdateOptions {
832
+ title?: string;
833
+ subtitle?: string;
834
+ description?: string;
835
+ vertical?: string;
836
+ tags?: string[];
837
+ icon?: string;
838
+ version?: WorkflowVersionInput;
839
+ setCurrent?: boolean;
840
+ }
841
+ interface WorkflowPreviewOptions {
842
+ workflowParams?: Record<string, any>;
843
+ workflowVersion?: number;
844
+ }
845
+ interface WorkflowsListResponse {
846
+ success: boolean;
847
+ workflows?: Workflow[];
848
+ total?: number;
849
+ next_cursor?: string | null;
850
+ verticals?: string[];
851
+ error?: string;
852
+ }
853
+ interface WorkflowResponse {
854
+ success: boolean;
855
+ workflow?: Workflow;
856
+ error?: string;
857
+ }
858
+ interface WorkflowVersionsResponse {
859
+ success: boolean;
860
+ slug?: string;
861
+ versions?: WorkflowVersionSummary[];
862
+ error?: string;
863
+ }
864
+ interface WorkflowPreviewResponse {
865
+ success: boolean;
866
+ workflow?: WorkflowRunInfo;
867
+ resolved?: ResolvedWorkflowTemplate;
868
+ estimated_credits?: number | null;
869
+ error?: string;
870
+ }
871
+ interface WorkflowDeleteResponse {
872
+ success: boolean;
873
+ slug?: string;
874
+ deleted_at?: string;
875
+ error?: string;
876
+ }
725
877
 
726
878
  /**
727
879
  * Verify webhook signature for Contents API async completion notifications.
@@ -772,6 +924,15 @@ declare class Valyu {
772
924
  list: (options?: DatasourcesListOptions) => Promise<DatasourcesListResponse>;
773
925
  categories: () => Promise<DatasourcesCategoriesResponse>;
774
926
  };
927
+ workflows: {
928
+ list: (options?: WorkflowsListOptions) => Promise<WorkflowsListResponse>;
929
+ get: (slug: string, version?: number) => Promise<WorkflowResponse>;
930
+ versions: (slug: string) => Promise<WorkflowVersionsResponse>;
931
+ preview: (slug: string, options?: WorkflowPreviewOptions) => Promise<WorkflowPreviewResponse>;
932
+ create: (options: WorkflowCreateOptions) => Promise<WorkflowResponse>;
933
+ update: (slug: string, options: WorkflowUpdateOptions) => Promise<WorkflowResponse>;
934
+ delete: (slug: string) => Promise<WorkflowDeleteResponse>;
935
+ };
775
936
  constructor(apiKey?: string, baseUrl?: string);
776
937
  /**
777
938
  * Validates date format (YYYY-MM-DD)
@@ -1036,6 +1197,48 @@ declare class Valyu {
1036
1197
  * @returns Promise resolving to list of categories with their metadata
1037
1198
  */
1038
1199
  private _datasourcesCategories;
1200
+ /** Extract the most descriptive error message from a Workflows API error. */
1201
+ private workflowError;
1202
+ /**
1203
+ * Workflows: List workflows available to your org
1204
+ * @param options - Filters: vertical, scope ("valyu" | "org" | "all"), q, tags, limit, expand
1205
+ */
1206
+ private _workflowsList;
1207
+ /**
1208
+ * Workflows: Get a workflow's full detail, including its template
1209
+ * @param slug - Workflow slug
1210
+ * @param version - Specific version to fetch (defaults to the current version)
1211
+ */
1212
+ private _workflowsGet;
1213
+ /**
1214
+ * Workflows: List a workflow's version history
1215
+ * @param slug - Workflow slug
1216
+ */
1217
+ private _workflowsVersions;
1218
+ /**
1219
+ * Workflows: Resolve a workflow's template with params without creating a task
1220
+ * @param slug - Workflow slug
1221
+ * @param options - workflowParams (variable values) and optional workflowVersion
1222
+ */
1223
+ private _workflowsPreview;
1224
+ /**
1225
+ * Workflows: Create a new workflow for your org
1226
+ * @param options - slug, title, version (template body), and optional metadata
1227
+ */
1228
+ private _workflowsCreate;
1229
+ /**
1230
+ * Workflows: Update a workflow's metadata and/or publish a new template version.
1231
+ * Only workflows owned by your org can be updated; versions are append-only
1232
+ * (a version body requires a changelog).
1233
+ * @param slug - Workflow slug
1234
+ * @param options - Metadata fields and/or a new version body
1235
+ */
1236
+ private _workflowsUpdate;
1237
+ /**
1238
+ * Workflows: Delete a workflow owned by your org (soft delete)
1239
+ * @param slug - Workflow slug
1240
+ */
1241
+ private _workflowsDelete;
1039
1242
  }
1040
1243
 
1041
- 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, type ToolConfig, Valyu, type WaitOptions, verifyContentsWebhookSignature };
1244
+ 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 ResolvedWorkflowTemplate, type ResponseLength, type SearchMetadata, type SearchOptions, type SearchResponse, type SearchResult, type SearchType, type StreamCallback, type ToolConfig, Valyu, type WaitOptions, type Workflow, type WorkflowCreateOptions, type WorkflowDeleteResponse, type WorkflowDeliverable, type WorkflowMode, type WorkflowPreviewOptions, type WorkflowPreviewResponse, type WorkflowResponse, type WorkflowRunInfo, type WorkflowTools, type WorkflowUpdateOptions, type WorkflowVariable, type WorkflowVariableType, type WorkflowVariableValidation, type WorkflowVersionInput, type WorkflowVersionSummary, type WorkflowVersionsResponse, type WorkflowsListOptions, type WorkflowsListResponse, verifyContentsWebhookSignature };
package/dist/index.d.ts CHANGED
@@ -329,6 +329,9 @@ interface DeepResearchCreateOptions {
329
329
  brandCollectionId?: string;
330
330
  metadata?: Record<string, string | number | boolean>;
331
331
  hitl?: HitlConfig;
332
+ workflowId?: string;
333
+ workflowParams?: Record<string, any>;
334
+ workflowVersion?: number;
332
335
  }
333
336
  interface HitlConfig {
334
337
  planningQuestions?: boolean;
@@ -423,6 +426,7 @@ interface DeepResearchCreateResponse {
423
426
  public?: boolean;
424
427
  webhook_secret?: string;
425
428
  message?: string;
429
+ workflow?: WorkflowRunInfo;
426
430
  error?: string;
427
431
  }
428
432
  interface DeepResearchStatusResponse {
@@ -455,6 +459,7 @@ interface DeepResearchStatusResponse {
455
459
  interaction?: Interaction;
456
460
  hitl_history?: InteractionHistoryEntry[];
457
461
  error?: string;
462
+ unreachable?: boolean;
458
463
  }
459
464
  interface DeepResearchTaskListItem {
460
465
  deepresearch_id: string;
@@ -722,6 +727,153 @@ interface DatasourcesCategoriesResponse {
722
727
  categories?: DatasourceCategory[];
723
728
  error?: string;
724
729
  }
730
+ type WorkflowMode = "fast" | "standard" | "heavy" | "max";
731
+ type WorkflowVariableType = "text" | "textarea" | "number" | "date" | "enum";
732
+ interface WorkflowVariableValidation {
733
+ min_length?: number;
734
+ max_length?: number;
735
+ pattern?: string;
736
+ enum?: string[];
737
+ }
738
+ interface WorkflowVariable {
739
+ key: string;
740
+ label?: string;
741
+ type?: WorkflowVariableType;
742
+ required?: boolean;
743
+ placeholder?: string;
744
+ help?: string;
745
+ examples?: string[];
746
+ validation?: WorkflowVariableValidation;
747
+ }
748
+ interface WorkflowDeliverable {
749
+ type: string;
750
+ description?: string;
751
+ }
752
+ interface WorkflowTools {
753
+ code_execution?: boolean;
754
+ screenshots?: boolean;
755
+ browser_use?: boolean;
756
+ charts?: boolean;
757
+ }
758
+ interface Workflow {
759
+ slug: string;
760
+ version?: number;
761
+ vertical?: string | null;
762
+ tags?: string[];
763
+ title?: string;
764
+ subtitle?: string | null;
765
+ description?: string | null;
766
+ popular?: boolean;
767
+ recommended_mode?: WorkflowMode;
768
+ estimated_time?: string | null;
769
+ is_valyu?: boolean;
770
+ owner_org_id?: string | null;
771
+ variables?: WorkflowVariable[];
772
+ deliverables?: WorkflowDeliverable[];
773
+ created_at?: string;
774
+ updated_at?: string;
775
+ prompt?: string;
776
+ strategy?: string;
777
+ report_format?: string;
778
+ tools?: WorkflowTools;
779
+ changelog?: string | null;
780
+ }
781
+ interface WorkflowVersionSummary {
782
+ version: number;
783
+ recommended_mode?: WorkflowMode;
784
+ estimated_time?: string | null;
785
+ changelog?: string | null;
786
+ created_at?: string;
787
+ is_current?: boolean;
788
+ }
789
+ interface WorkflowRunInfo {
790
+ slug?: string;
791
+ version?: number;
792
+ }
793
+ interface ResolvedWorkflowTemplate {
794
+ input?: string;
795
+ research_strategy?: string;
796
+ report_format?: string;
797
+ deliverables?: WorkflowDeliverable[];
798
+ mode?: WorkflowMode;
799
+ tools?: WorkflowTools;
800
+ }
801
+ /** Template body for creating a workflow or publishing a new version. */
802
+ interface WorkflowVersionInput {
803
+ prompt: string;
804
+ strategy: string;
805
+ report_format: string;
806
+ variables?: WorkflowVariable[];
807
+ deliverables?: WorkflowDeliverable[];
808
+ tools?: WorkflowTools;
809
+ recommended_mode?: WorkflowMode;
810
+ estimated_time?: string;
811
+ changelog?: string;
812
+ }
813
+ interface WorkflowsListOptions {
814
+ vertical?: string;
815
+ scope?: "valyu" | "org" | "all";
816
+ q?: string;
817
+ tags?: string[];
818
+ limit?: number;
819
+ expand?: boolean;
820
+ }
821
+ interface WorkflowCreateOptions {
822
+ slug: string;
823
+ title: string;
824
+ version: WorkflowVersionInput;
825
+ subtitle?: string;
826
+ description?: string;
827
+ vertical?: string;
828
+ tags?: string[];
829
+ icon?: string;
830
+ }
831
+ interface WorkflowUpdateOptions {
832
+ title?: string;
833
+ subtitle?: string;
834
+ description?: string;
835
+ vertical?: string;
836
+ tags?: string[];
837
+ icon?: string;
838
+ version?: WorkflowVersionInput;
839
+ setCurrent?: boolean;
840
+ }
841
+ interface WorkflowPreviewOptions {
842
+ workflowParams?: Record<string, any>;
843
+ workflowVersion?: number;
844
+ }
845
+ interface WorkflowsListResponse {
846
+ success: boolean;
847
+ workflows?: Workflow[];
848
+ total?: number;
849
+ next_cursor?: string | null;
850
+ verticals?: string[];
851
+ error?: string;
852
+ }
853
+ interface WorkflowResponse {
854
+ success: boolean;
855
+ workflow?: Workflow;
856
+ error?: string;
857
+ }
858
+ interface WorkflowVersionsResponse {
859
+ success: boolean;
860
+ slug?: string;
861
+ versions?: WorkflowVersionSummary[];
862
+ error?: string;
863
+ }
864
+ interface WorkflowPreviewResponse {
865
+ success: boolean;
866
+ workflow?: WorkflowRunInfo;
867
+ resolved?: ResolvedWorkflowTemplate;
868
+ estimated_credits?: number | null;
869
+ error?: string;
870
+ }
871
+ interface WorkflowDeleteResponse {
872
+ success: boolean;
873
+ slug?: string;
874
+ deleted_at?: string;
875
+ error?: string;
876
+ }
725
877
 
726
878
  /**
727
879
  * Verify webhook signature for Contents API async completion notifications.
@@ -772,6 +924,15 @@ declare class Valyu {
772
924
  list: (options?: DatasourcesListOptions) => Promise<DatasourcesListResponse>;
773
925
  categories: () => Promise<DatasourcesCategoriesResponse>;
774
926
  };
927
+ workflows: {
928
+ list: (options?: WorkflowsListOptions) => Promise<WorkflowsListResponse>;
929
+ get: (slug: string, version?: number) => Promise<WorkflowResponse>;
930
+ versions: (slug: string) => Promise<WorkflowVersionsResponse>;
931
+ preview: (slug: string, options?: WorkflowPreviewOptions) => Promise<WorkflowPreviewResponse>;
932
+ create: (options: WorkflowCreateOptions) => Promise<WorkflowResponse>;
933
+ update: (slug: string, options: WorkflowUpdateOptions) => Promise<WorkflowResponse>;
934
+ delete: (slug: string) => Promise<WorkflowDeleteResponse>;
935
+ };
775
936
  constructor(apiKey?: string, baseUrl?: string);
776
937
  /**
777
938
  * Validates date format (YYYY-MM-DD)
@@ -1036,6 +1197,48 @@ declare class Valyu {
1036
1197
  * @returns Promise resolving to list of categories with their metadata
1037
1198
  */
1038
1199
  private _datasourcesCategories;
1200
+ /** Extract the most descriptive error message from a Workflows API error. */
1201
+ private workflowError;
1202
+ /**
1203
+ * Workflows: List workflows available to your org
1204
+ * @param options - Filters: vertical, scope ("valyu" | "org" | "all"), q, tags, limit, expand
1205
+ */
1206
+ private _workflowsList;
1207
+ /**
1208
+ * Workflows: Get a workflow's full detail, including its template
1209
+ * @param slug - Workflow slug
1210
+ * @param version - Specific version to fetch (defaults to the current version)
1211
+ */
1212
+ private _workflowsGet;
1213
+ /**
1214
+ * Workflows: List a workflow's version history
1215
+ * @param slug - Workflow slug
1216
+ */
1217
+ private _workflowsVersions;
1218
+ /**
1219
+ * Workflows: Resolve a workflow's template with params without creating a task
1220
+ * @param slug - Workflow slug
1221
+ * @param options - workflowParams (variable values) and optional workflowVersion
1222
+ */
1223
+ private _workflowsPreview;
1224
+ /**
1225
+ * Workflows: Create a new workflow for your org
1226
+ * @param options - slug, title, version (template body), and optional metadata
1227
+ */
1228
+ private _workflowsCreate;
1229
+ /**
1230
+ * Workflows: Update a workflow's metadata and/or publish a new template version.
1231
+ * Only workflows owned by your org can be updated; versions are append-only
1232
+ * (a version body requires a changelog).
1233
+ * @param slug - Workflow slug
1234
+ * @param options - Metadata fields and/or a new version body
1235
+ */
1236
+ private _workflowsUpdate;
1237
+ /**
1238
+ * Workflows: Delete a workflow owned by your org (soft delete)
1239
+ * @param slug - Workflow slug
1240
+ */
1241
+ private _workflowsDelete;
1039
1242
  }
1040
1243
 
1041
- 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, type ToolConfig, Valyu, type WaitOptions, verifyContentsWebhookSignature };
1244
+ 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 ResolvedWorkflowTemplate, type ResponseLength, type SearchMetadata, type SearchOptions, type SearchResponse, type SearchResult, type SearchType, type StreamCallback, type ToolConfig, Valyu, type WaitOptions, type Workflow, type WorkflowCreateOptions, type WorkflowDeleteResponse, type WorkflowDeliverable, type WorkflowMode, type WorkflowPreviewOptions, type WorkflowPreviewResponse, type WorkflowResponse, type WorkflowRunInfo, type WorkflowTools, type WorkflowUpdateOptions, type WorkflowVariable, type WorkflowVariableType, type WorkflowVariableValidation, type WorkflowVersionInput, type WorkflowVersionSummary, type WorkflowVersionsResponse, type WorkflowsListOptions, type WorkflowsListResponse, verifyContentsWebhookSignature };