vellum-ai 0.0.18 → 0.0.19

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.
Files changed (259) hide show
  1. package/Client.d.ts +8 -0
  2. package/Client.js +42 -0
  3. package/api/client/requests/ExecuteWorkflowStreamRequest.d.ts +15 -0
  4. package/api/client/requests/ExecuteWorkflowStreamRequest.js +5 -0
  5. package/api/client/requests/index.d.ts +1 -0
  6. package/api/errors/ForbiddenError.d.ts +8 -0
  7. package/api/errors/ForbiddenError.js +41 -0
  8. package/api/errors/index.d.ts +1 -0
  9. package/api/errors/index.js +1 -0
  10. package/api/types/ConditionalNodeResult.d.ts +7 -0
  11. package/api/types/ConditionalNodeResult.js +5 -0
  12. package/api/types/ConditionalNodeResultData.d.ts +6 -0
  13. package/api/types/ConditionalNodeResultData.js +5 -0
  14. package/api/types/ConstantValueChatHistoryVariable.d.ts +7 -0
  15. package/api/types/ConstantValueChatHistoryVariable.js +5 -0
  16. package/api/types/ConstantValueJsonVariable.d.ts +6 -0
  17. package/api/types/ConstantValueJsonVariable.js +5 -0
  18. package/api/types/ConstantValueStringVariable.d.ts +6 -0
  19. package/api/types/ConstantValueStringVariable.js +5 -0
  20. package/api/types/DeploymentNodeResult.d.ts +7 -0
  21. package/api/types/DeploymentNodeResult.js +5 -0
  22. package/api/types/DeploymentNodeResultData.d.ts +8 -0
  23. package/api/types/DeploymentNodeResultData.js +5 -0
  24. package/api/types/PromptNodeResult.d.ts +7 -0
  25. package/api/types/PromptNodeResult.js +5 -0
  26. package/api/types/PromptNodeResultData.d.ts +8 -0
  27. package/api/types/PromptNodeResultData.js +5 -0
  28. package/api/types/SandboxNodeResult.d.ts +7 -0
  29. package/api/types/SandboxNodeResult.js +5 -0
  30. package/api/types/SandboxNodeResultData.d.ts +8 -0
  31. package/api/types/SandboxNodeResultData.js +5 -0
  32. package/api/types/SearchNodeResult.d.ts +7 -0
  33. package/api/types/SearchNodeResult.js +5 -0
  34. package/api/types/SearchNodeResultData.d.ts +9 -0
  35. package/api/types/SearchNodeResultData.js +5 -0
  36. package/api/types/TerminalNodeResult.d.ts +7 -0
  37. package/api/types/TerminalNodeResult.js +5 -0
  38. package/api/types/TerminalNodeResultData.d.ts +7 -0
  39. package/api/types/TerminalNodeResultData.js +5 -0
  40. package/api/types/TerminalNodeResultOutput.d.ts +16 -0
  41. package/api/types/TerminalNodeResultOutput.js +5 -0
  42. package/api/types/WorkflowExecutionNodeResultEvent.d.ts +9 -0
  43. package/api/types/WorkflowExecutionNodeResultEvent.js +5 -0
  44. package/api/types/WorkflowExecutionWorkflowResultEvent.d.ts +9 -0
  45. package/api/types/WorkflowExecutionWorkflowResultEvent.js +5 -0
  46. package/api/types/WorkflowNodeResultData.d.ts +25 -0
  47. package/api/types/WorkflowNodeResultData.js +5 -0
  48. package/api/types/WorkflowNodeResultEvent.d.ts +13 -0
  49. package/api/types/WorkflowNodeResultEvent.js +5 -0
  50. package/api/types/WorkflowNodeResultEventStateEnum.d.ts +16 -0
  51. package/api/types/WorkflowNodeResultEventStateEnum.js +12 -0
  52. package/api/types/WorkflowRequestChatHistoryInputRequest.d.ts +9 -0
  53. package/api/types/WorkflowRequestChatHistoryInputRequest.js +5 -0
  54. package/api/types/WorkflowRequestInputRequest.d.ts +16 -0
  55. package/api/types/WorkflowRequestInputRequest.js +5 -0
  56. package/api/types/WorkflowRequestJsonInputRequest.d.ts +8 -0
  57. package/api/types/WorkflowRequestJsonInputRequest.js +5 -0
  58. package/api/types/WorkflowRequestStringInputRequest.d.ts +8 -0
  59. package/api/types/WorkflowRequestStringInputRequest.js +5 -0
  60. package/api/types/WorkflowResultEvent.d.ts +10 -0
  61. package/api/types/WorkflowResultEvent.js +5 -0
  62. package/api/types/WorkflowResultEventStateEnum.d.ts +14 -0
  63. package/api/types/WorkflowResultEventStateEnum.js +11 -0
  64. package/api/types/WorkflowStreamEvent.d.ts +13 -0
  65. package/api/types/WorkflowStreamEvent.js +5 -0
  66. package/api/types/index.d.ts +28 -0
  67. package/api/types/index.js +28 -0
  68. package/dist/Client.d.ts +8 -0
  69. package/dist/Client.js +42 -0
  70. package/dist/api/client/requests/ExecuteWorkflowStreamRequest.d.ts +15 -0
  71. package/dist/api/client/requests/ExecuteWorkflowStreamRequest.js +5 -0
  72. package/dist/api/client/requests/index.d.ts +1 -0
  73. package/dist/api/errors/ForbiddenError.d.ts +8 -0
  74. package/dist/api/errors/ForbiddenError.js +41 -0
  75. package/dist/api/errors/index.d.ts +1 -0
  76. package/dist/api/errors/index.js +1 -0
  77. package/dist/api/types/ConditionalNodeResult.d.ts +7 -0
  78. package/dist/api/types/ConditionalNodeResult.js +5 -0
  79. package/dist/api/types/ConditionalNodeResultData.d.ts +6 -0
  80. package/dist/api/types/ConditionalNodeResultData.js +5 -0
  81. package/dist/api/types/ConstantValueChatHistoryVariable.d.ts +7 -0
  82. package/dist/api/types/ConstantValueChatHistoryVariable.js +5 -0
  83. package/dist/api/types/ConstantValueJsonVariable.d.ts +6 -0
  84. package/dist/api/types/ConstantValueJsonVariable.js +5 -0
  85. package/dist/api/types/ConstantValueStringVariable.d.ts +6 -0
  86. package/dist/api/types/ConstantValueStringVariable.js +5 -0
  87. package/dist/api/types/DeploymentNodeResult.d.ts +7 -0
  88. package/dist/api/types/DeploymentNodeResult.js +5 -0
  89. package/dist/api/types/DeploymentNodeResultData.d.ts +8 -0
  90. package/dist/api/types/DeploymentNodeResultData.js +5 -0
  91. package/dist/api/types/PromptNodeResult.d.ts +7 -0
  92. package/dist/api/types/PromptNodeResult.js +5 -0
  93. package/dist/api/types/PromptNodeResultData.d.ts +8 -0
  94. package/dist/api/types/PromptNodeResultData.js +5 -0
  95. package/dist/api/types/SandboxNodeResult.d.ts +7 -0
  96. package/dist/api/types/SandboxNodeResult.js +5 -0
  97. package/dist/api/types/SandboxNodeResultData.d.ts +8 -0
  98. package/dist/api/types/SandboxNodeResultData.js +5 -0
  99. package/dist/api/types/SearchNodeResult.d.ts +7 -0
  100. package/dist/api/types/SearchNodeResult.js +5 -0
  101. package/dist/api/types/SearchNodeResultData.d.ts +9 -0
  102. package/dist/api/types/SearchNodeResultData.js +5 -0
  103. package/dist/api/types/TerminalNodeResult.d.ts +7 -0
  104. package/dist/api/types/TerminalNodeResult.js +5 -0
  105. package/dist/api/types/TerminalNodeResultData.d.ts +7 -0
  106. package/dist/api/types/TerminalNodeResultData.js +5 -0
  107. package/dist/api/types/TerminalNodeResultOutput.d.ts +16 -0
  108. package/dist/api/types/TerminalNodeResultOutput.js +5 -0
  109. package/dist/api/types/WorkflowExecutionNodeResultEvent.d.ts +9 -0
  110. package/dist/api/types/WorkflowExecutionNodeResultEvent.js +5 -0
  111. package/dist/api/types/WorkflowExecutionWorkflowResultEvent.d.ts +9 -0
  112. package/dist/api/types/WorkflowExecutionWorkflowResultEvent.js +5 -0
  113. package/dist/api/types/WorkflowNodeResultData.d.ts +25 -0
  114. package/dist/api/types/WorkflowNodeResultData.js +5 -0
  115. package/dist/api/types/WorkflowNodeResultEvent.d.ts +13 -0
  116. package/dist/api/types/WorkflowNodeResultEvent.js +5 -0
  117. package/dist/api/types/WorkflowNodeResultEventStateEnum.d.ts +16 -0
  118. package/dist/api/types/WorkflowNodeResultEventStateEnum.js +12 -0
  119. package/dist/api/types/WorkflowRequestChatHistoryInputRequest.d.ts +9 -0
  120. package/dist/api/types/WorkflowRequestChatHistoryInputRequest.js +5 -0
  121. package/dist/api/types/WorkflowRequestInputRequest.d.ts +16 -0
  122. package/dist/api/types/WorkflowRequestInputRequest.js +5 -0
  123. package/dist/api/types/WorkflowRequestJsonInputRequest.d.ts +8 -0
  124. package/dist/api/types/WorkflowRequestJsonInputRequest.js +5 -0
  125. package/dist/api/types/WorkflowRequestStringInputRequest.d.ts +8 -0
  126. package/dist/api/types/WorkflowRequestStringInputRequest.js +5 -0
  127. package/dist/api/types/WorkflowResultEvent.d.ts +10 -0
  128. package/dist/api/types/WorkflowResultEvent.js +5 -0
  129. package/dist/api/types/WorkflowResultEventStateEnum.d.ts +14 -0
  130. package/dist/api/types/WorkflowResultEventStateEnum.js +11 -0
  131. package/dist/api/types/WorkflowStreamEvent.d.ts +13 -0
  132. package/dist/api/types/WorkflowStreamEvent.js +5 -0
  133. package/dist/api/types/index.d.ts +28 -0
  134. package/dist/api/types/index.js +28 -0
  135. package/dist/serialization/client/requests/ExecuteWorkflowStreamRequest.d.ts +16 -0
  136. package/dist/serialization/client/requests/ExecuteWorkflowStreamRequest.js +37 -0
  137. package/dist/serialization/client/requests/index.d.ts +1 -0
  138. package/dist/serialization/client/requests/index.js +3 -1
  139. package/dist/serialization/types/ConditionalNodeResult.d.ts +12 -0
  140. package/dist/serialization/types/ConditionalNodeResult.js +33 -0
  141. package/dist/serialization/types/ConditionalNodeResultData.d.ts +12 -0
  142. package/dist/serialization/types/ConditionalNodeResultData.js +33 -0
  143. package/dist/serialization/types/ConstantValueChatHistoryVariable.d.ts +12 -0
  144. package/dist/serialization/types/ConstantValueChatHistoryVariable.js +35 -0
  145. package/dist/serialization/types/ConstantValueJsonVariable.d.ts +12 -0
  146. package/dist/serialization/types/ConstantValueJsonVariable.js +33 -0
  147. package/dist/serialization/types/ConstantValueStringVariable.d.ts +12 -0
  148. package/dist/serialization/types/ConstantValueStringVariable.js +33 -0
  149. package/dist/serialization/types/DeploymentNodeResult.d.ts +12 -0
  150. package/dist/serialization/types/DeploymentNodeResult.js +33 -0
  151. package/dist/serialization/types/DeploymentNodeResultData.d.ts +14 -0
  152. package/dist/serialization/types/DeploymentNodeResultData.js +35 -0
  153. package/dist/serialization/types/PromptNodeResult.d.ts +12 -0
  154. package/dist/serialization/types/PromptNodeResult.js +33 -0
  155. package/dist/serialization/types/PromptNodeResultData.d.ts +14 -0
  156. package/dist/serialization/types/PromptNodeResultData.js +35 -0
  157. package/dist/serialization/types/SandboxNodeResult.d.ts +12 -0
  158. package/dist/serialization/types/SandboxNodeResult.js +33 -0
  159. package/dist/serialization/types/SandboxNodeResultData.d.ts +14 -0
  160. package/dist/serialization/types/SandboxNodeResultData.js +35 -0
  161. package/dist/serialization/types/SearchNodeResult.d.ts +12 -0
  162. package/dist/serialization/types/SearchNodeResult.js +33 -0
  163. package/dist/serialization/types/SearchNodeResultData.d.ts +15 -0
  164. package/dist/serialization/types/SearchNodeResultData.js +36 -0
  165. package/dist/serialization/types/TerminalNodeResult.d.ts +12 -0
  166. package/dist/serialization/types/TerminalNodeResult.js +33 -0
  167. package/dist/serialization/types/TerminalNodeResultData.d.ts +12 -0
  168. package/dist/serialization/types/TerminalNodeResultData.js +33 -0
  169. package/dist/serialization/types/TerminalNodeResultOutput.d.ts +19 -0
  170. package/dist/serialization/types/TerminalNodeResultOutput.js +40 -0
  171. package/dist/serialization/types/WorkflowExecutionNodeResultEvent.d.ts +14 -0
  172. package/dist/serialization/types/WorkflowExecutionNodeResultEvent.js +35 -0
  173. package/dist/serialization/types/WorkflowExecutionWorkflowResultEvent.d.ts +14 -0
  174. package/dist/serialization/types/WorkflowExecutionWorkflowResultEvent.js +35 -0
  175. package/dist/serialization/types/WorkflowNodeResultData.d.ts +28 -0
  176. package/dist/serialization/types/WorkflowNodeResultData.js +43 -0
  177. package/dist/serialization/types/WorkflowNodeResultEvent.d.ts +18 -0
  178. package/dist/serialization/types/WorkflowNodeResultEvent.js +39 -0
  179. package/dist/serialization/types/WorkflowNodeResultEventStateEnum.d.ts +10 -0
  180. package/dist/serialization/types/WorkflowNodeResultEventStateEnum.js +31 -0
  181. package/dist/serialization/types/WorkflowRequestChatHistoryInputRequest.d.ts +13 -0
  182. package/dist/serialization/types/WorkflowRequestChatHistoryInputRequest.js +34 -0
  183. package/dist/serialization/types/WorkflowRequestInputRequest.d.ts +19 -0
  184. package/dist/serialization/types/WorkflowRequestInputRequest.js +40 -0
  185. package/dist/serialization/types/WorkflowRequestJsonInputRequest.d.ts +13 -0
  186. package/dist/serialization/types/WorkflowRequestJsonInputRequest.js +34 -0
  187. package/dist/serialization/types/WorkflowRequestStringInputRequest.d.ts +13 -0
  188. package/dist/serialization/types/WorkflowRequestStringInputRequest.js +34 -0
  189. package/dist/serialization/types/WorkflowResultEvent.d.ts +15 -0
  190. package/dist/serialization/types/WorkflowResultEvent.js +36 -0
  191. package/dist/serialization/types/WorkflowResultEventStateEnum.d.ts +10 -0
  192. package/dist/serialization/types/WorkflowResultEventStateEnum.js +31 -0
  193. package/dist/serialization/types/WorkflowStreamEvent.d.ts +16 -0
  194. package/dist/serialization/types/WorkflowStreamEvent.js +39 -0
  195. package/dist/serialization/types/index.d.ts +28 -0
  196. package/dist/serialization/types/index.js +28 -0
  197. package/package.json +1 -1
  198. package/serialization/client/requests/ExecuteWorkflowStreamRequest.d.ts +16 -0
  199. package/serialization/client/requests/ExecuteWorkflowStreamRequest.js +37 -0
  200. package/serialization/client/requests/index.d.ts +1 -0
  201. package/serialization/client/requests/index.js +3 -1
  202. package/serialization/types/ConditionalNodeResult.d.ts +12 -0
  203. package/serialization/types/ConditionalNodeResult.js +33 -0
  204. package/serialization/types/ConditionalNodeResultData.d.ts +12 -0
  205. package/serialization/types/ConditionalNodeResultData.js +33 -0
  206. package/serialization/types/ConstantValueChatHistoryVariable.d.ts +12 -0
  207. package/serialization/types/ConstantValueChatHistoryVariable.js +35 -0
  208. package/serialization/types/ConstantValueJsonVariable.d.ts +12 -0
  209. package/serialization/types/ConstantValueJsonVariable.js +33 -0
  210. package/serialization/types/ConstantValueStringVariable.d.ts +12 -0
  211. package/serialization/types/ConstantValueStringVariable.js +33 -0
  212. package/serialization/types/DeploymentNodeResult.d.ts +12 -0
  213. package/serialization/types/DeploymentNodeResult.js +33 -0
  214. package/serialization/types/DeploymentNodeResultData.d.ts +14 -0
  215. package/serialization/types/DeploymentNodeResultData.js +35 -0
  216. package/serialization/types/PromptNodeResult.d.ts +12 -0
  217. package/serialization/types/PromptNodeResult.js +33 -0
  218. package/serialization/types/PromptNodeResultData.d.ts +14 -0
  219. package/serialization/types/PromptNodeResultData.js +35 -0
  220. package/serialization/types/SandboxNodeResult.d.ts +12 -0
  221. package/serialization/types/SandboxNodeResult.js +33 -0
  222. package/serialization/types/SandboxNodeResultData.d.ts +14 -0
  223. package/serialization/types/SandboxNodeResultData.js +35 -0
  224. package/serialization/types/SearchNodeResult.d.ts +12 -0
  225. package/serialization/types/SearchNodeResult.js +33 -0
  226. package/serialization/types/SearchNodeResultData.d.ts +15 -0
  227. package/serialization/types/SearchNodeResultData.js +36 -0
  228. package/serialization/types/TerminalNodeResult.d.ts +12 -0
  229. package/serialization/types/TerminalNodeResult.js +33 -0
  230. package/serialization/types/TerminalNodeResultData.d.ts +12 -0
  231. package/serialization/types/TerminalNodeResultData.js +33 -0
  232. package/serialization/types/TerminalNodeResultOutput.d.ts +19 -0
  233. package/serialization/types/TerminalNodeResultOutput.js +40 -0
  234. package/serialization/types/WorkflowExecutionNodeResultEvent.d.ts +14 -0
  235. package/serialization/types/WorkflowExecutionNodeResultEvent.js +35 -0
  236. package/serialization/types/WorkflowExecutionWorkflowResultEvent.d.ts +14 -0
  237. package/serialization/types/WorkflowExecutionWorkflowResultEvent.js +35 -0
  238. package/serialization/types/WorkflowNodeResultData.d.ts +28 -0
  239. package/serialization/types/WorkflowNodeResultData.js +43 -0
  240. package/serialization/types/WorkflowNodeResultEvent.d.ts +18 -0
  241. package/serialization/types/WorkflowNodeResultEvent.js +39 -0
  242. package/serialization/types/WorkflowNodeResultEventStateEnum.d.ts +10 -0
  243. package/serialization/types/WorkflowNodeResultEventStateEnum.js +31 -0
  244. package/serialization/types/WorkflowRequestChatHistoryInputRequest.d.ts +13 -0
  245. package/serialization/types/WorkflowRequestChatHistoryInputRequest.js +34 -0
  246. package/serialization/types/WorkflowRequestInputRequest.d.ts +19 -0
  247. package/serialization/types/WorkflowRequestInputRequest.js +40 -0
  248. package/serialization/types/WorkflowRequestJsonInputRequest.d.ts +13 -0
  249. package/serialization/types/WorkflowRequestJsonInputRequest.js +34 -0
  250. package/serialization/types/WorkflowRequestStringInputRequest.d.ts +13 -0
  251. package/serialization/types/WorkflowRequestStringInputRequest.js +34 -0
  252. package/serialization/types/WorkflowResultEvent.d.ts +15 -0
  253. package/serialization/types/WorkflowResultEvent.js +36 -0
  254. package/serialization/types/WorkflowResultEventStateEnum.d.ts +10 -0
  255. package/serialization/types/WorkflowResultEventStateEnum.js +31 -0
  256. package/serialization/types/WorkflowStreamEvent.d.ts +16 -0
  257. package/serialization/types/WorkflowStreamEvent.js +39 -0
  258. package/serialization/types/index.d.ts +28 -0
  259. package/serialization/types/index.js +28 -0
package/Client.d.ts CHANGED
@@ -20,6 +20,12 @@ export declare namespace VellumClient {
20
20
  export declare class VellumClient {
21
21
  protected readonly options: VellumClient.Options;
22
22
  constructor(options: VellumClient.Options);
23
+ /**
24
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
25
+ *
26
+ * Executes a deployed Workflow and streams back its results.
27
+ */
28
+ executeWorkflowStream(request: Vellum.ExecuteWorkflowStreamRequest, cb: (data: Vellum.WorkflowStreamEvent) => void, opts?: Pick<core.StreamingFetcher.Args, "onError" | "onFinish" | "abortController" | "timeoutMs">): Promise<void>;
23
29
  /**
24
30
  * <strong style="background-color:#4caf50; color:white; padding:4px; border-radius:4px">Stable</strong>
25
31
  *
@@ -27,6 +33,7 @@ export declare class VellumClient {
27
33
  *
28
34
  * **Note:** Uses a base url of `https://predict.vellum.ai`.
29
35
  * @throws {Vellum.BadRequestError}
36
+ * @throws {Vellum.ForbiddenError}
30
37
  * @throws {Vellum.NotFoundError}
31
38
  * @throws {Vellum.InternalServerError}
32
39
  */
@@ -38,6 +45,7 @@ export declare class VellumClient {
38
45
  *
39
46
  * **Note:** Uses a base url of `https://predict.vellum.ai`.
40
47
  * @throws {Vellum.BadRequestError}
48
+ * @throws {Vellum.ForbiddenError}
41
49
  * @throws {Vellum.NotFoundError}
42
50
  * @throws {Vellum.InternalServerError}
43
51
  */
package/Client.js CHANGED
@@ -48,6 +48,40 @@ class VellumClient {
48
48
  constructor(options) {
49
49
  this.options = options;
50
50
  }
51
+ /**
52
+ * <strong style="background-color:#ffc107; color:white; padding:4px; border-radius:4px">Unstable</strong>
53
+ *
54
+ * Executes a deployed Workflow and streams back its results.
55
+ */
56
+ async executeWorkflowStream(request, cb, opts) {
57
+ const _queue = new core.CallbackQueue();
58
+ await core.streamingFetcher({
59
+ url: (0, url_join_1.default)((this.options.environment ?? environments.VellumEnvironment.Production).predict, "v1/execute-workflow-stream"),
60
+ method: "POST",
61
+ headers: {
62
+ X_API_KEY: await core.Supplier.get(this.options.apiKey),
63
+ },
64
+ body: await serializers.ExecuteWorkflowStreamRequest.jsonOrThrow(request, {
65
+ unrecognizedObjectKeys: "strip",
66
+ }),
67
+ onData: _queue.wrap(async (data) => {
68
+ const parsed = await serializers.WorkflowStreamEvent.parse(data, {
69
+ unrecognizedObjectKeys: "passthrough",
70
+ allowUnrecognizedUnionMembers: true,
71
+ allowUnrecognizedEnumValues: true,
72
+ });
73
+ if (parsed.ok) {
74
+ cb(parsed.value);
75
+ }
76
+ else {
77
+ opts?.onError?.(parsed.errors);
78
+ }
79
+ }),
80
+ onError: opts?.onError != null ? _queue.wrap(opts.onError) : undefined,
81
+ onFinish: opts?.onFinish != null ? _queue.wrap(opts.onFinish) : undefined,
82
+ abortController: opts?.abortController,
83
+ });
84
+ }
51
85
  /**
52
86
  * <strong style="background-color:#4caf50; color:white; padding:4px; border-radius:4px">Stable</strong>
53
87
  *
@@ -55,6 +89,7 @@ class VellumClient {
55
89
  *
56
90
  * **Note:** Uses a base url of `https://predict.vellum.ai`.
57
91
  * @throws {Vellum.BadRequestError}
92
+ * @throws {Vellum.ForbiddenError}
58
93
  * @throws {Vellum.NotFoundError}
59
94
  * @throws {Vellum.InternalServerError}
60
95
  */
@@ -79,6 +114,12 @@ class VellumClient {
79
114
  switch (_response.error.statusCode) {
80
115
  case 400:
81
116
  throw new Vellum.BadRequestError(_response.error.body);
117
+ case 403:
118
+ throw new Vellum.ForbiddenError(await serializers.GenerateErrorResponse.parseOrThrow(_response.error.body, {
119
+ unrecognizedObjectKeys: "passthrough",
120
+ allowUnrecognizedUnionMembers: true,
121
+ allowUnrecognizedEnumValues: true,
122
+ }));
82
123
  case 404:
83
124
  throw new Vellum.NotFoundError(_response.error.body);
84
125
  case 500:
@@ -111,6 +152,7 @@ class VellumClient {
111
152
  *
112
153
  * **Note:** Uses a base url of `https://predict.vellum.ai`.
113
154
  * @throws {Vellum.BadRequestError}
155
+ * @throws {Vellum.ForbiddenError}
114
156
  * @throws {Vellum.NotFoundError}
115
157
  * @throws {Vellum.InternalServerError}
116
158
  */
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "../..";
5
+ export interface ExecuteWorkflowStreamRequest {
6
+ /** The ID of the Workflow Deployment. Must provide either this or workflow_deployment_name. */
7
+ workflowDeploymentId?: string;
8
+ /** The name of the Workflow Deployment. Must provide either this or workflow_deployment_id. */
9
+ workflowDeploymentName?: string;
10
+ /** Optionally specify a release tag if you want to pin to a specific release of the Workflow Deployment */
11
+ releaseTag?: string;
12
+ inputs: Vellum.WorkflowRequestInputRequest[];
13
+ /** Optionally include a unique identifier for tracking purposes. */
14
+ externalId?: string;
15
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ export { ExecuteWorkflowStreamRequest } from "./ExecuteWorkflowStreamRequest";
1
2
  export { GenerateBodyRequest } from "./GenerateBodyRequest";
2
3
  export { GenerateStreamBodyRequest } from "./GenerateStreamBodyRequest";
3
4
  export { SearchRequestBodyRequest } from "./SearchRequestBodyRequest";
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../errors";
5
+ import * as Vellum from "..";
6
+ export declare class ForbiddenError extends errors.VellumError {
7
+ constructor(body: Vellum.GenerateErrorResponse);
8
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ForbiddenError = void 0;
30
+ const errors = __importStar(require("../../errors"));
31
+ class ForbiddenError extends errors.VellumError {
32
+ constructor(body) {
33
+ super({
34
+ message: "ForbiddenError",
35
+ statusCode: 403,
36
+ body: body,
37
+ });
38
+ Object.setPrototypeOf(this, ForbiddenError.prototype);
39
+ }
40
+ }
41
+ exports.ForbiddenError = ForbiddenError;
@@ -1,4 +1,5 @@
1
1
  export * from "./BadRequestError";
2
+ export * from "./ForbiddenError";
2
3
  export * from "./NotFoundError";
3
4
  export * from "./ConflictError";
4
5
  export * from "./InternalServerError";
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./BadRequestError"), exports);
18
+ __exportStar(require("./ForbiddenError"), exports);
18
19
  __exportStar(require("./NotFoundError"), exports);
19
20
  __exportStar(require("./ConflictError"), exports);
20
21
  __exportStar(require("./InternalServerError"), exports);
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface ConditionalNodeResult {
6
+ data: Vellum.ConditionalNodeResultData;
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ConditionalNodeResultData {
5
+ sourceHandleId?: string;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface ConstantValueChatHistoryVariable {
6
+ value?: Vellum.ChatMessage[];
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ConstantValueJsonVariable {
5
+ value?: Record<string, unknown>;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ConstantValueStringVariable {
5
+ value?: string;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface DeploymentNodeResult {
6
+ data: Vellum.DeploymentNodeResultData;
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface DeploymentNodeResultData {
5
+ outputId: string;
6
+ text?: string;
7
+ delta?: string;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface PromptNodeResult {
6
+ data: Vellum.PromptNodeResultData;
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface PromptNodeResultData {
5
+ outputId: string;
6
+ text?: string;
7
+ delta?: string;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface SandboxNodeResult {
6
+ data: Vellum.SandboxNodeResultData;
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface SandboxNodeResultData {
5
+ outputId: string;
6
+ text?: string;
7
+ delta?: string;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface SearchNodeResult {
6
+ data: Vellum.SearchNodeResultData;
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface SearchNodeResultData {
5
+ resultsOutputId: string;
6
+ results: Record<string, unknown>[];
7
+ textOutputId?: string;
8
+ text?: string;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface TerminalNodeResult {
6
+ data: Vellum.TerminalNodeResultData;
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface TerminalNodeResultData {
6
+ output: Vellum.TerminalNodeResultOutput;
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export declare type TerminalNodeResultOutput = Vellum.TerminalNodeResultOutput.String | Vellum.TerminalNodeResultOutput.Json | Vellum.TerminalNodeResultOutput.ChatHistory;
6
+ export declare namespace TerminalNodeResultOutput {
7
+ interface String extends Vellum.ConstantValueStringVariable {
8
+ type: "STRING";
9
+ }
10
+ interface Json extends Vellum.ConstantValueJsonVariable {
11
+ type: "JSON";
12
+ }
13
+ interface ChatHistory extends Vellum.ConstantValueChatHistoryVariable {
14
+ type: "CHAT_HISTORY";
15
+ }
16
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface WorkflowExecutionNodeResultEvent {
6
+ runId: string;
7
+ externalId?: string;
8
+ data: Vellum.WorkflowNodeResultEvent;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface WorkflowExecutionWorkflowResultEvent {
6
+ runId: string;
7
+ externalId?: string;
8
+ data: Vellum.WorkflowResultEvent;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export declare type WorkflowNodeResultData = Vellum.WorkflowNodeResultData.Prompt | Vellum.WorkflowNodeResultData.Sandbox | Vellum.WorkflowNodeResultData.Deployment | Vellum.WorkflowNodeResultData.Search | Vellum.WorkflowNodeResultData.Conditional | Vellum.WorkflowNodeResultData.Terminal;
6
+ export declare namespace WorkflowNodeResultData {
7
+ interface Prompt extends Vellum.PromptNodeResult {
8
+ type: "PROMPT";
9
+ }
10
+ interface Sandbox extends Vellum.SandboxNodeResult {
11
+ type: "SANDBOX";
12
+ }
13
+ interface Deployment extends Vellum.DeploymentNodeResult {
14
+ type: "DEPLOYMENT";
15
+ }
16
+ interface Search extends Vellum.SearchNodeResult {
17
+ type: "SEARCH";
18
+ }
19
+ interface Conditional extends Vellum.ConditionalNodeResult {
20
+ type: "CONDITIONAL";
21
+ }
22
+ interface Terminal extends Vellum.TerminalNodeResult {
23
+ type: "TERMINAL";
24
+ }
25
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface WorkflowNodeResultEvent {
6
+ id: string;
7
+ nodeId: string;
8
+ nodeResultId: string;
9
+ state: Vellum.WorkflowNodeResultEventStateEnum;
10
+ ts?: string;
11
+ data?: Vellum.WorkflowNodeResultData;
12
+ error?: string;
13
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * * `INITIATED` - INITIATED
6
+ * * `STREAMING` - STREAMING
7
+ * * `FULFILLED` - FULFILLED
8
+ * * `REJECTED` - REJECTED
9
+ */
10
+ export declare type WorkflowNodeResultEventStateEnum = "INITIATED" | "STREAMING" | "FULFILLED" | "REJECTED";
11
+ export declare const WorkflowNodeResultEventStateEnum: {
12
+ readonly Initiated: "INITIATED";
13
+ readonly Streaming: "STREAMING";
14
+ readonly Fulfilled: "FULFILLED";
15
+ readonly Rejected: "REJECTED";
16
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.WorkflowNodeResultEventStateEnum = void 0;
7
+ exports.WorkflowNodeResultEventStateEnum = {
8
+ Initiated: "INITIATED",
9
+ Streaming: "STREAMING",
10
+ Fulfilled: "FULFILLED",
11
+ Rejected: "REJECTED",
12
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export interface WorkflowRequestChatHistoryInputRequest {
6
+ /** The variable's name, as defined in the Workflow. <span style="white-space: nowrap">`non-empty`</span> */
7
+ name: string;
8
+ value: Vellum.ChatMessageRequest[];
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ export declare type WorkflowRequestInputRequest = Vellum.WorkflowRequestInputRequest.String | Vellum.WorkflowRequestInputRequest.Json | Vellum.WorkflowRequestInputRequest.ChatHistory;
6
+ export declare namespace WorkflowRequestInputRequest {
7
+ interface String extends Vellum.WorkflowRequestStringInputRequest {
8
+ type: "STRING";
9
+ }
10
+ interface Json extends Vellum.WorkflowRequestJsonInputRequest {
11
+ type: "JSON";
12
+ }
13
+ interface ChatHistory extends Vellum.WorkflowRequestChatHistoryInputRequest {
14
+ type: "CHAT_HISTORY";
15
+ }
16
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface WorkflowRequestJsonInputRequest {
5
+ /** The variable's name, as defined in the Workflow. <span style="white-space: nowrap">`non-empty`</span> */
6
+ name: string;
7
+ value: Record<string, unknown>;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });