vellum-ai 0.3.11 → 0.3.12

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 (101) hide show
  1. package/Client.js +9 -9
  2. package/api/resources/deployments/client/Client.js +3 -3
  3. package/api/resources/documentIndexes/client/Client.d.ts +23 -0
  4. package/api/resources/documentIndexes/client/Client.js +168 -3
  5. package/api/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.d.ts +29 -0
  6. package/api/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.js +5 -0
  7. package/api/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.d.ts +27 -0
  8. package/api/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.js +5 -0
  9. package/api/resources/documentIndexes/client/requests/index.d.ts +2 -0
  10. package/api/resources/documents/client/Client.js +4 -4
  11. package/api/resources/folderEntities/client/Client.js +1 -1
  12. package/api/resources/modelVersions/client/Client.js +1 -1
  13. package/api/resources/registeredPrompts/client/Client.js +1 -1
  14. package/api/resources/sandboxes/client/Client.js +2 -2
  15. package/api/resources/testSuites/client/Client.js +2 -2
  16. package/api/resources/workflowDeployments/client/Client.js +2 -2
  17. package/api/types/ArrayVariableValueItem.d.ts +4 -1
  18. package/api/types/FulfilledWorkflowNodeResultEvent.d.ts +2 -0
  19. package/api/types/GenerateRequest.d.ts +1 -1
  20. package/api/types/ImageVariableValue.d.ts +10 -0
  21. package/api/types/ImageVariableValue.js +5 -0
  22. package/api/types/InitiatedWorkflowNodeResultEvent.d.ts +1 -0
  23. package/api/types/RejectedWorkflowNodeResultEvent.d.ts +1 -0
  24. package/api/types/StreamingWorkflowNodeResultEvent.d.ts +1 -0
  25. package/api/types/WorkflowExecutionEventErrorCode.d.ts +3 -1
  26. package/api/types/WorkflowExecutionEventErrorCode.js +1 -0
  27. package/api/types/index.d.ts +1 -0
  28. package/api/types/index.js +1 -0
  29. package/dist/Client.js +9 -9
  30. package/dist/api/resources/deployments/client/Client.js +3 -3
  31. package/dist/api/resources/documentIndexes/client/Client.d.ts +23 -0
  32. package/dist/api/resources/documentIndexes/client/Client.js +168 -3
  33. package/dist/api/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.d.ts +29 -0
  34. package/dist/api/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.js +5 -0
  35. package/dist/api/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.d.ts +27 -0
  36. package/dist/api/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.js +5 -0
  37. package/dist/api/resources/documentIndexes/client/requests/index.d.ts +2 -0
  38. package/dist/api/resources/documents/client/Client.js +4 -4
  39. package/dist/api/resources/folderEntities/client/Client.js +1 -1
  40. package/dist/api/resources/modelVersions/client/Client.js +1 -1
  41. package/dist/api/resources/registeredPrompts/client/Client.js +1 -1
  42. package/dist/api/resources/sandboxes/client/Client.js +2 -2
  43. package/dist/api/resources/testSuites/client/Client.js +2 -2
  44. package/dist/api/resources/workflowDeployments/client/Client.js +2 -2
  45. package/dist/api/types/ArrayVariableValueItem.d.ts +4 -1
  46. package/dist/api/types/FulfilledWorkflowNodeResultEvent.d.ts +2 -0
  47. package/dist/api/types/GenerateRequest.d.ts +1 -1
  48. package/dist/api/types/ImageVariableValue.d.ts +10 -0
  49. package/dist/api/types/ImageVariableValue.js +5 -0
  50. package/dist/api/types/InitiatedWorkflowNodeResultEvent.d.ts +1 -0
  51. package/dist/api/types/RejectedWorkflowNodeResultEvent.d.ts +1 -0
  52. package/dist/api/types/StreamingWorkflowNodeResultEvent.d.ts +1 -0
  53. package/dist/api/types/WorkflowExecutionEventErrorCode.d.ts +3 -1
  54. package/dist/api/types/WorkflowExecutionEventErrorCode.js +1 -0
  55. package/dist/api/types/index.d.ts +1 -0
  56. package/dist/api/types/index.js +1 -0
  57. package/dist/serialization/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.d.ts +14 -0
  58. package/dist/serialization/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.js +44 -0
  59. package/dist/serialization/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.d.ts +14 -0
  60. package/dist/serialization/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.js +44 -0
  61. package/dist/serialization/resources/documentIndexes/client/requests/index.d.ts +2 -0
  62. package/dist/serialization/resources/documentIndexes/client/requests/index.js +5 -1
  63. package/dist/serialization/types/ArrayVariableValueItem.d.ts +4 -1
  64. package/dist/serialization/types/ArrayVariableValueItem.js +1 -0
  65. package/dist/serialization/types/FulfilledWorkflowNodeResultEvent.d.ts +2 -0
  66. package/dist/serialization/types/FulfilledWorkflowNodeResultEvent.js +2 -0
  67. package/dist/serialization/types/ImageVariableValue.d.ts +12 -0
  68. package/dist/serialization/types/ImageVariableValue.js +42 -0
  69. package/dist/serialization/types/InitiatedWorkflowNodeResultEvent.d.ts +1 -0
  70. package/dist/serialization/types/InitiatedWorkflowNodeResultEvent.js +1 -0
  71. package/dist/serialization/types/RejectedWorkflowNodeResultEvent.d.ts +1 -0
  72. package/dist/serialization/types/RejectedWorkflowNodeResultEvent.js +1 -0
  73. package/dist/serialization/types/StreamingWorkflowNodeResultEvent.d.ts +1 -0
  74. package/dist/serialization/types/StreamingWorkflowNodeResultEvent.js +1 -0
  75. package/dist/serialization/types/WorkflowExecutionEventErrorCode.d.ts +1 -1
  76. package/dist/serialization/types/WorkflowExecutionEventErrorCode.js +1 -0
  77. package/dist/serialization/types/index.d.ts +1 -0
  78. package/dist/serialization/types/index.js +1 -0
  79. package/package.json +1 -1
  80. package/serialization/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.d.ts +14 -0
  81. package/serialization/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.js +44 -0
  82. package/serialization/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.d.ts +14 -0
  83. package/serialization/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.js +44 -0
  84. package/serialization/resources/documentIndexes/client/requests/index.d.ts +2 -0
  85. package/serialization/resources/documentIndexes/client/requests/index.js +5 -1
  86. package/serialization/types/ArrayVariableValueItem.d.ts +4 -1
  87. package/serialization/types/ArrayVariableValueItem.js +1 -0
  88. package/serialization/types/FulfilledWorkflowNodeResultEvent.d.ts +2 -0
  89. package/serialization/types/FulfilledWorkflowNodeResultEvent.js +2 -0
  90. package/serialization/types/ImageVariableValue.d.ts +12 -0
  91. package/serialization/types/ImageVariableValue.js +42 -0
  92. package/serialization/types/InitiatedWorkflowNodeResultEvent.d.ts +1 -0
  93. package/serialization/types/InitiatedWorkflowNodeResultEvent.js +1 -0
  94. package/serialization/types/RejectedWorkflowNodeResultEvent.d.ts +1 -0
  95. package/serialization/types/RejectedWorkflowNodeResultEvent.js +1 -0
  96. package/serialization/types/StreamingWorkflowNodeResultEvent.d.ts +1 -0
  97. package/serialization/types/StreamingWorkflowNodeResultEvent.js +1 -0
  98. package/serialization/types/WorkflowExecutionEventErrorCode.d.ts +1 -1
  99. package/serialization/types/WorkflowExecutionEventErrorCode.js +1 -0
  100. package/serialization/types/index.d.ts +1 -0
  101. package/serialization/types/index.js +1 -0
@@ -81,6 +81,7 @@ export * from "./GenerateStreamResultData";
81
81
  export * from "./ImageChatMessageContent";
82
82
  export * from "./ImageChatMessageContentRequest";
83
83
  export * from "./ImageEnum";
84
+ export * from "./ImageVariableValue";
84
85
  export * from "./IndexingStateEnum";
85
86
  export * from "./InitiatedEnum";
86
87
  export * from "./InitiatedExecutePromptEvent";
@@ -97,6 +97,7 @@ __exportStar(require("./GenerateStreamResultData"), exports);
97
97
  __exportStar(require("./ImageChatMessageContent"), exports);
98
98
  __exportStar(require("./ImageChatMessageContentRequest"), exports);
99
99
  __exportStar(require("./ImageEnum"), exports);
100
+ __exportStar(require("./ImageVariableValue"), exports);
100
101
  __exportStar(require("./IndexingStateEnum"), exports);
101
102
  __exportStar(require("./InitiatedEnum"), exports);
102
103
  __exportStar(require("./InitiatedExecutePromptEvent"), exports);
package/dist/Client.js CHANGED
@@ -76,7 +76,7 @@ class VellumClient {
76
76
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
77
77
  "X-Fern-Language": "JavaScript",
78
78
  "X-Fern-SDK-Name": "vellum-ai",
79
- "X-Fern-SDK-Version": "0.3.11",
79
+ "X-Fern-SDK-Version": "0.3.12",
80
80
  "X-Fern-Runtime": core.RUNTIME.type,
81
81
  "X-Fern-Runtime-Version": core.RUNTIME.version,
82
82
  },
@@ -139,7 +139,7 @@ class VellumClient {
139
139
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
140
140
  "X-Fern-Language": "JavaScript",
141
141
  "X-Fern-SDK-Name": "vellum-ai",
142
- "X-Fern-SDK-Version": "0.3.11",
142
+ "X-Fern-SDK-Version": "0.3.12",
143
143
  "X-Fern-Runtime": core.RUNTIME.type,
144
144
  "X-Fern-Runtime-Version": core.RUNTIME.version,
145
145
  },
@@ -214,7 +214,7 @@ class VellumClient {
214
214
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
215
215
  "X-Fern-Language": "JavaScript",
216
216
  "X-Fern-SDK-Name": "vellum-ai",
217
- "X-Fern-SDK-Version": "0.3.11",
217
+ "X-Fern-SDK-Version": "0.3.12",
218
218
  "X-Fern-Runtime": core.RUNTIME.type,
219
219
  "X-Fern-Runtime-Version": core.RUNTIME.version,
220
220
  },
@@ -275,7 +275,7 @@ class VellumClient {
275
275
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
276
276
  "X-Fern-Language": "JavaScript",
277
277
  "X-Fern-SDK-Name": "vellum-ai",
278
- "X-Fern-SDK-Version": "0.3.11",
278
+ "X-Fern-SDK-Version": "0.3.12",
279
279
  "X-Fern-Runtime": core.RUNTIME.type,
280
280
  "X-Fern-Runtime-Version": core.RUNTIME.version,
281
281
  },
@@ -358,7 +358,7 @@ class VellumClient {
358
358
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
359
359
  "X-Fern-Language": "JavaScript",
360
360
  "X-Fern-SDK-Name": "vellum-ai",
361
- "X-Fern-SDK-Version": "0.3.11",
361
+ "X-Fern-SDK-Version": "0.3.12",
362
362
  "X-Fern-Runtime": core.RUNTIME.type,
363
363
  "X-Fern-Runtime-Version": core.RUNTIME.version,
364
364
  },
@@ -423,7 +423,7 @@ class VellumClient {
423
423
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
424
424
  "X-Fern-Language": "JavaScript",
425
425
  "X-Fern-SDK-Name": "vellum-ai",
426
- "X-Fern-SDK-Version": "0.3.11",
426
+ "X-Fern-SDK-Version": "0.3.12",
427
427
  "X-Fern-Runtime": core.RUNTIME.type,
428
428
  "X-Fern-Runtime-Version": core.RUNTIME.version,
429
429
  },
@@ -503,7 +503,7 @@ class VellumClient {
503
503
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
504
504
  "X-Fern-Language": "JavaScript",
505
505
  "X-Fern-SDK-Name": "vellum-ai",
506
- "X-Fern-SDK-Version": "0.3.11",
506
+ "X-Fern-SDK-Version": "0.3.12",
507
507
  "X-Fern-Runtime": core.RUNTIME.type,
508
508
  "X-Fern-Runtime-Version": core.RUNTIME.version,
509
509
  },
@@ -574,7 +574,7 @@ class VellumClient {
574
574
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
575
575
  "X-Fern-Language": "JavaScript",
576
576
  "X-Fern-SDK-Name": "vellum-ai",
577
- "X-Fern-SDK-Version": "0.3.11",
577
+ "X-Fern-SDK-Version": "0.3.12",
578
578
  "X-Fern-Runtime": core.RUNTIME.type,
579
579
  "X-Fern-Runtime-Version": core.RUNTIME.version,
580
580
  },
@@ -639,7 +639,7 @@ class VellumClient {
639
639
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
640
640
  "X-Fern-Language": "JavaScript",
641
641
  "X-Fern-SDK-Name": "vellum-ai",
642
- "X-Fern-SDK-Version": "0.3.11",
642
+ "X-Fern-SDK-Version": "0.3.12",
643
643
  "X-Fern-Runtime": core.RUNTIME.type,
644
644
  "X-Fern-Runtime-Version": core.RUNTIME.version,
645
645
  },
@@ -74,7 +74,7 @@ class Deployments {
74
74
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
75
75
  "X-Fern-Language": "JavaScript",
76
76
  "X-Fern-SDK-Name": "vellum-ai",
77
- "X-Fern-SDK-Version": "0.3.11",
77
+ "X-Fern-SDK-Version": "0.3.12",
78
78
  "X-Fern-Runtime": core.RUNTIME.type,
79
79
  "X-Fern-Runtime-Version": core.RUNTIME.version,
80
80
  },
@@ -129,7 +129,7 @@ class Deployments {
129
129
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
130
130
  "X-Fern-Language": "JavaScript",
131
131
  "X-Fern-SDK-Name": "vellum-ai",
132
- "X-Fern-SDK-Version": "0.3.11",
132
+ "X-Fern-SDK-Version": "0.3.12",
133
133
  "X-Fern-Runtime": core.RUNTIME.type,
134
134
  "X-Fern-Runtime-Version": core.RUNTIME.version,
135
135
  },
@@ -188,7 +188,7 @@ class Deployments {
188
188
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
189
189
  "X-Fern-Language": "JavaScript",
190
190
  "X-Fern-SDK-Name": "vellum-ai",
191
- "X-Fern-SDK-Version": "0.3.11",
191
+ "X-Fern-SDK-Version": "0.3.12",
192
192
  "X-Fern-Runtime": core.RUNTIME.type,
193
193
  "X-Fern-Runtime-Version": core.RUNTIME.version,
194
194
  },
@@ -58,4 +58,27 @@ export declare class DocumentIndexes {
58
58
  * await vellum.documentIndexes.retrieve("id")
59
59
  */
60
60
  retrieve(id: string, requestOptions?: DocumentIndexes.RequestOptions): Promise<Vellum.DocumentIndexRead>;
61
+ /**
62
+ * Used to fully update a Document Index given its ID.
63
+ *
64
+ * @example
65
+ * await vellum.documentIndexes.update("id", {
66
+ * label: "label"
67
+ * })
68
+ */
69
+ update(id: string, request: Vellum.DocumentIndexUpdateRequest, requestOptions?: DocumentIndexes.RequestOptions): Promise<Vellum.DocumentIndexRead>;
70
+ /**
71
+ * Used to delete a Document Index given its ID.
72
+ *
73
+ * @example
74
+ * await vellum.documentIndexes.destroy("id")
75
+ */
76
+ destroy(id: string, requestOptions?: DocumentIndexes.RequestOptions): Promise<void>;
77
+ /**
78
+ * Used to partial update a Document Index given its ID.
79
+ *
80
+ * @example
81
+ * await vellum.documentIndexes.partialUpdate("id", {})
82
+ */
83
+ partialUpdate(id: string, request?: Vellum.PatchedDocumentIndexUpdateRequest, requestOptions?: DocumentIndexes.RequestOptions): Promise<Vellum.DocumentIndexRead>;
61
84
  }
@@ -79,7 +79,7 @@ class DocumentIndexes {
79
79
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
80
80
  "X-Fern-Language": "JavaScript",
81
81
  "X-Fern-SDK-Name": "vellum-ai",
82
- "X-Fern-SDK-Version": "0.3.11",
82
+ "X-Fern-SDK-Version": "0.3.12",
83
83
  "X-Fern-Runtime": core.RUNTIME.type,
84
84
  "X-Fern-Runtime-Version": core.RUNTIME.version,
85
85
  },
@@ -154,7 +154,7 @@ class DocumentIndexes {
154
154
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
155
155
  "X-Fern-Language": "JavaScript",
156
156
  "X-Fern-SDK-Name": "vellum-ai",
157
- "X-Fern-SDK-Version": "0.3.11",
157
+ "X-Fern-SDK-Version": "0.3.12",
158
158
  "X-Fern-Runtime": core.RUNTIME.type,
159
159
  "X-Fern-Runtime-Version": core.RUNTIME.version,
160
160
  },
@@ -211,7 +211,7 @@ class DocumentIndexes {
211
211
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
212
212
  "X-Fern-Language": "JavaScript",
213
213
  "X-Fern-SDK-Name": "vellum-ai",
214
- "X-Fern-SDK-Version": "0.3.11",
214
+ "X-Fern-SDK-Version": "0.3.12",
215
215
  "X-Fern-Runtime": core.RUNTIME.type,
216
216
  "X-Fern-Runtime-Version": core.RUNTIME.version,
217
217
  },
@@ -248,5 +248,170 @@ class DocumentIndexes {
248
248
  }
249
249
  });
250
250
  }
251
+ /**
252
+ * Used to fully update a Document Index given its ID.
253
+ *
254
+ * @example
255
+ * await vellum.documentIndexes.update("id", {
256
+ * label: "label"
257
+ * })
258
+ */
259
+ update(id, request, requestOptions) {
260
+ var _a;
261
+ return __awaiter(this, void 0, void 0, function* () {
262
+ const _response = yield core.fetcher({
263
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
264
+ .default, `v1/document-indexes/${id}`),
265
+ method: "PUT",
266
+ headers: {
267
+ X_API_KEY: yield core.Supplier.get(this._options.apiKey),
268
+ "X-Fern-Language": "JavaScript",
269
+ "X-Fern-SDK-Name": "vellum-ai",
270
+ "X-Fern-SDK-Version": "0.3.12",
271
+ "X-Fern-Runtime": core.RUNTIME.type,
272
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
273
+ },
274
+ contentType: "application/json",
275
+ body: yield serializers.DocumentIndexUpdateRequest.jsonOrThrow(request, {
276
+ unrecognizedObjectKeys: "strip",
277
+ }),
278
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
279
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
280
+ });
281
+ if (_response.ok) {
282
+ return yield serializers.DocumentIndexRead.parseOrThrow(_response.body, {
283
+ unrecognizedObjectKeys: "passthrough",
284
+ allowUnrecognizedUnionMembers: true,
285
+ allowUnrecognizedEnumValues: true,
286
+ breadcrumbsPrefix: ["response"],
287
+ });
288
+ }
289
+ if (_response.error.reason === "status-code") {
290
+ throw new errors.VellumError({
291
+ statusCode: _response.error.statusCode,
292
+ body: _response.error.body,
293
+ });
294
+ }
295
+ switch (_response.error.reason) {
296
+ case "non-json":
297
+ throw new errors.VellumError({
298
+ statusCode: _response.error.statusCode,
299
+ body: _response.error.rawBody,
300
+ });
301
+ case "timeout":
302
+ throw new errors.VellumTimeoutError();
303
+ case "unknown":
304
+ throw new errors.VellumError({
305
+ message: _response.error.errorMessage,
306
+ });
307
+ }
308
+ });
309
+ }
310
+ /**
311
+ * Used to delete a Document Index given its ID.
312
+ *
313
+ * @example
314
+ * await vellum.documentIndexes.destroy("id")
315
+ */
316
+ destroy(id, requestOptions) {
317
+ var _a;
318
+ return __awaiter(this, void 0, void 0, function* () {
319
+ const _response = yield core.fetcher({
320
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
321
+ .default, `v1/document-indexes/${id}`),
322
+ method: "DELETE",
323
+ headers: {
324
+ X_API_KEY: yield core.Supplier.get(this._options.apiKey),
325
+ "X-Fern-Language": "JavaScript",
326
+ "X-Fern-SDK-Name": "vellum-ai",
327
+ "X-Fern-SDK-Version": "0.3.12",
328
+ "X-Fern-Runtime": core.RUNTIME.type,
329
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
330
+ },
331
+ contentType: "application/json",
332
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
333
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
334
+ });
335
+ if (_response.ok) {
336
+ return;
337
+ }
338
+ if (_response.error.reason === "status-code") {
339
+ throw new errors.VellumError({
340
+ statusCode: _response.error.statusCode,
341
+ body: _response.error.body,
342
+ });
343
+ }
344
+ switch (_response.error.reason) {
345
+ case "non-json":
346
+ throw new errors.VellumError({
347
+ statusCode: _response.error.statusCode,
348
+ body: _response.error.rawBody,
349
+ });
350
+ case "timeout":
351
+ throw new errors.VellumTimeoutError();
352
+ case "unknown":
353
+ throw new errors.VellumError({
354
+ message: _response.error.errorMessage,
355
+ });
356
+ }
357
+ });
358
+ }
359
+ /**
360
+ * Used to partial update a Document Index given its ID.
361
+ *
362
+ * @example
363
+ * await vellum.documentIndexes.partialUpdate("id", {})
364
+ */
365
+ partialUpdate(id, request = {}, requestOptions) {
366
+ var _a;
367
+ return __awaiter(this, void 0, void 0, function* () {
368
+ const _response = yield core.fetcher({
369
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
370
+ .default, `v1/document-indexes/${id}`),
371
+ method: "PATCH",
372
+ headers: {
373
+ X_API_KEY: yield core.Supplier.get(this._options.apiKey),
374
+ "X-Fern-Language": "JavaScript",
375
+ "X-Fern-SDK-Name": "vellum-ai",
376
+ "X-Fern-SDK-Version": "0.3.12",
377
+ "X-Fern-Runtime": core.RUNTIME.type,
378
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
379
+ },
380
+ contentType: "application/json",
381
+ body: yield serializers.PatchedDocumentIndexUpdateRequest.jsonOrThrow(request, {
382
+ unrecognizedObjectKeys: "strip",
383
+ }),
384
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
385
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
386
+ });
387
+ if (_response.ok) {
388
+ return yield serializers.DocumentIndexRead.parseOrThrow(_response.body, {
389
+ unrecognizedObjectKeys: "passthrough",
390
+ allowUnrecognizedUnionMembers: true,
391
+ allowUnrecognizedEnumValues: true,
392
+ breadcrumbsPrefix: ["response"],
393
+ });
394
+ }
395
+ if (_response.error.reason === "status-code") {
396
+ throw new errors.VellumError({
397
+ statusCode: _response.error.statusCode,
398
+ body: _response.error.body,
399
+ });
400
+ }
401
+ switch (_response.error.reason) {
402
+ case "non-json":
403
+ throw new errors.VellumError({
404
+ statusCode: _response.error.statusCode,
405
+ body: _response.error.rawBody,
406
+ });
407
+ case "timeout":
408
+ throw new errors.VellumTimeoutError();
409
+ case "unknown":
410
+ throw new errors.VellumError({
411
+ message: _response.error.errorMessage,
412
+ });
413
+ }
414
+ });
415
+ }
251
416
  }
252
417
  exports.DocumentIndexes = DocumentIndexes;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "../../../..";
5
+ /**
6
+ * @example
7
+ * {
8
+ * label: "label"
9
+ * }
10
+ */
11
+ export interface DocumentIndexUpdateRequest {
12
+ /** A human-readable label for the document index */
13
+ label: string;
14
+ /**
15
+ * The current status of the document index
16
+ *
17
+ * * `ACTIVE` - Active
18
+ * * `ARCHIVED` - Archived
19
+ */
20
+ status?: Vellum.EntityStatus;
21
+ /**
22
+ * The environment this document index is used in
23
+ *
24
+ * * `DEVELOPMENT` - Development
25
+ * * `STAGING` - Staging
26
+ * * `PRODUCTION` - Production
27
+ */
28
+ environment?: Vellum.EnvironmentEnum;
29
+ }
@@ -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,27 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "../../../..";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface PatchedDocumentIndexUpdateRequest {
10
+ /** A human-readable label for the document index */
11
+ label?: string;
12
+ /**
13
+ * The current status of the document index
14
+ *
15
+ * * `ACTIVE` - Active
16
+ * * `ARCHIVED` - Archived
17
+ */
18
+ status?: Vellum.EntityStatus;
19
+ /**
20
+ * The environment this document index is used in
21
+ *
22
+ * * `DEVELOPMENT` - Development
23
+ * * `STAGING` - Staging
24
+ * * `PRODUCTION` - Production
25
+ */
26
+ environment?: Vellum.EnvironmentEnum;
27
+ }
@@ -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,2 +1,4 @@
1
1
  export { DocumentIndexesListRequest } from "./DocumentIndexesListRequest";
2
2
  export { DocumentIndexCreateRequest } from "./DocumentIndexCreateRequest";
3
+ export { DocumentIndexUpdateRequest } from "./DocumentIndexUpdateRequest";
4
+ export { PatchedDocumentIndexUpdateRequest } from "./PatchedDocumentIndexUpdateRequest";
@@ -81,7 +81,7 @@ class Documents {
81
81
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
82
82
  "X-Fern-Language": "JavaScript",
83
83
  "X-Fern-SDK-Name": "vellum-ai",
84
- "X-Fern-SDK-Version": "0.3.11",
84
+ "X-Fern-SDK-Version": "0.3.12",
85
85
  "X-Fern-Runtime": core.RUNTIME.type,
86
86
  "X-Fern-Runtime-Version": core.RUNTIME.version,
87
87
  },
@@ -130,7 +130,7 @@ class Documents {
130
130
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
131
131
  "X-Fern-Language": "JavaScript",
132
132
  "X-Fern-SDK-Name": "vellum-ai",
133
- "X-Fern-SDK-Version": "0.3.11",
133
+ "X-Fern-SDK-Version": "0.3.12",
134
134
  "X-Fern-Runtime": core.RUNTIME.type,
135
135
  "X-Fern-Runtime-Version": core.RUNTIME.version,
136
136
  },
@@ -179,7 +179,7 @@ class Documents {
179
179
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
180
180
  "X-Fern-Language": "JavaScript",
181
181
  "X-Fern-SDK-Name": "vellum-ai",
182
- "X-Fern-SDK-Version": "0.3.11",
182
+ "X-Fern-SDK-Version": "0.3.12",
183
183
  "X-Fern-Runtime": core.RUNTIME.type,
184
184
  "X-Fern-Runtime-Version": core.RUNTIME.version,
185
185
  },
@@ -265,7 +265,7 @@ class Documents {
265
265
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
266
266
  "X-Fern-Language": "JavaScript",
267
267
  "X-Fern-SDK-Name": "vellum-ai",
268
- "X-Fern-SDK-Version": "0.3.11",
268
+ "X-Fern-SDK-Version": "0.3.12",
269
269
  "X-Fern-Runtime": core.RUNTIME.type,
270
270
  "X-Fern-Runtime-Version": core.RUNTIME.version,
271
271
  },
@@ -69,7 +69,7 @@ class FolderEntities {
69
69
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
70
70
  "X-Fern-Language": "JavaScript",
71
71
  "X-Fern-SDK-Name": "vellum-ai",
72
- "X-Fern-SDK-Version": "0.3.11",
72
+ "X-Fern-SDK-Version": "0.3.12",
73
73
  "X-Fern-Runtime": core.RUNTIME.type,
74
74
  "X-Fern-Runtime-Version": core.RUNTIME.version,
75
75
  },
@@ -65,7 +65,7 @@ class ModelVersions {
65
65
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
66
66
  "X-Fern-Language": "JavaScript",
67
67
  "X-Fern-SDK-Name": "vellum-ai",
68
- "X-Fern-SDK-Version": "0.3.11",
68
+ "X-Fern-SDK-Version": "0.3.12",
69
69
  "X-Fern-Runtime": core.RUNTIME.type,
70
70
  "X-Fern-Runtime-Version": core.RUNTIME.version,
71
71
  },
@@ -96,7 +96,7 @@ class RegisteredPrompts {
96
96
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
97
97
  "X-Fern-Language": "JavaScript",
98
98
  "X-Fern-SDK-Name": "vellum-ai",
99
- "X-Fern-SDK-Version": "0.3.11",
99
+ "X-Fern-SDK-Version": "0.3.12",
100
100
  "X-Fern-Runtime": core.RUNTIME.type,
101
101
  "X-Fern-Runtime-Version": core.RUNTIME.version,
102
102
  },
@@ -84,7 +84,7 @@ class Sandboxes {
84
84
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
85
85
  "X-Fern-Language": "JavaScript",
86
86
  "X-Fern-SDK-Name": "vellum-ai",
87
- "X-Fern-SDK-Version": "0.3.11",
87
+ "X-Fern-SDK-Version": "0.3.12",
88
88
  "X-Fern-Runtime": core.RUNTIME.type,
89
89
  "X-Fern-Runtime-Version": core.RUNTIME.version,
90
90
  },
@@ -141,7 +141,7 @@ class Sandboxes {
141
141
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
142
142
  "X-Fern-Language": "JavaScript",
143
143
  "X-Fern-SDK-Name": "vellum-ai",
144
- "X-Fern-SDK-Version": "0.3.11",
144
+ "X-Fern-SDK-Version": "0.3.12",
145
145
  "X-Fern-Runtime": core.RUNTIME.type,
146
146
  "X-Fern-Runtime-Version": core.RUNTIME.version,
147
147
  },
@@ -74,7 +74,7 @@ class TestSuites {
74
74
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
75
75
  "X-Fern-Language": "JavaScript",
76
76
  "X-Fern-SDK-Name": "vellum-ai",
77
- "X-Fern-SDK-Version": "0.3.11",
77
+ "X-Fern-SDK-Version": "0.3.12",
78
78
  "X-Fern-Runtime": core.RUNTIME.type,
79
79
  "X-Fern-Runtime-Version": core.RUNTIME.version,
80
80
  },
@@ -131,7 +131,7 @@ class TestSuites {
131
131
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
132
132
  "X-Fern-Language": "JavaScript",
133
133
  "X-Fern-SDK-Name": "vellum-ai",
134
- "X-Fern-SDK-Version": "0.3.11",
134
+ "X-Fern-SDK-Version": "0.3.12",
135
135
  "X-Fern-Runtime": core.RUNTIME.type,
136
136
  "X-Fern-Runtime-Version": core.RUNTIME.version,
137
137
  },
@@ -73,7 +73,7 @@ class WorkflowDeployments {
73
73
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
74
74
  "X-Fern-Language": "JavaScript",
75
75
  "X-Fern-SDK-Name": "vellum-ai",
76
- "X-Fern-SDK-Version": "0.3.11",
76
+ "X-Fern-SDK-Version": "0.3.12",
77
77
  "X-Fern-Runtime": core.RUNTIME.type,
78
78
  "X-Fern-Runtime-Version": core.RUNTIME.version,
79
79
  },
@@ -128,7 +128,7 @@ class WorkflowDeployments {
128
128
  X_API_KEY: yield core.Supplier.get(this._options.apiKey),
129
129
  "X-Fern-Language": "JavaScript",
130
130
  "X-Fern-SDK-Name": "vellum-ai",
131
- "X-Fern-SDK-Version": "0.3.11",
131
+ "X-Fern-SDK-Version": "0.3.12",
132
132
  "X-Fern-Runtime": core.RUNTIME.type,
133
133
  "X-Fern-Runtime-Version": core.RUNTIME.version,
134
134
  },
@@ -2,7 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Vellum from "..";
5
- export declare type ArrayVariableValueItem = Vellum.ArrayVariableValueItem.String | Vellum.ArrayVariableValueItem.Number | Vellum.ArrayVariableValueItem.Json | Vellum.ArrayVariableValueItem.ChatHistory | Vellum.ArrayVariableValueItem.SearchResults | Vellum.ArrayVariableValueItem.Error_ | Vellum.ArrayVariableValueItem.FunctionCall;
5
+ export declare type ArrayVariableValueItem = Vellum.ArrayVariableValueItem.String | Vellum.ArrayVariableValueItem.Number | Vellum.ArrayVariableValueItem.Json | Vellum.ArrayVariableValueItem.ChatHistory | Vellum.ArrayVariableValueItem.SearchResults | Vellum.ArrayVariableValueItem.Error_ | Vellum.ArrayVariableValueItem.FunctionCall | Vellum.ArrayVariableValueItem.Image;
6
6
  export declare namespace ArrayVariableValueItem {
7
7
  interface String extends Vellum.StringVariableValue {
8
8
  type: "STRING";
@@ -25,4 +25,7 @@ export declare namespace ArrayVariableValueItem {
25
25
  interface FunctionCall extends Vellum.FunctionCallVariableValue {
26
26
  type: "FUNCTION_CALL";
27
27
  }
28
+ interface Image extends Vellum.ImageVariableValue {
29
+ type: "IMAGE";
30
+ }
28
31
  }
@@ -11,5 +11,7 @@ export interface FulfilledWorkflowNodeResultEvent {
11
11
  nodeResultId: string;
12
12
  ts?: Date;
13
13
  data?: Vellum.WorkflowNodeResultData;
14
+ sourceExecutionId?: string;
14
15
  outputValues?: Vellum.NodeOutputCompiledValue[];
16
+ mocked?: boolean;
15
17
  }
@@ -5,7 +5,7 @@ import * as Vellum from "..";
5
5
  export interface GenerateRequest {
6
6
  /** Key/value pairs for each template variable defined in the deployment's prompt. */
7
7
  inputValues: Record<string, unknown>;
8
- /** Optionally provide a list of chat messages that'll be used in place of the special {$chat_history} variable, if included in the prompt. */
8
+ /** Optionally provide a list of chat messages that'll be used in place of the special chat_history variable, if included in the prompt. */
9
9
  chatHistory?: Vellum.ChatMessageRequest[];
10
10
  /** Optionally include a unique identifier for each generation, as represented outside of Vellum. Note that this should generally be a list of length one. */
11
11
  externalIds?: string[];
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Vellum from "..";
5
+ /**
6
+ * A base Vellum primitive value representing an image.
7
+ */
8
+ export interface ImageVariableValue {
9
+ value?: Vellum.VellumImage;
10
+ }
@@ -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 });
@@ -11,5 +11,6 @@ export interface InitiatedWorkflowNodeResultEvent {
11
11
  nodeResultId: string;
12
12
  ts?: Date;
13
13
  data?: Vellum.WorkflowNodeResultData;
14
+ sourceExecutionId?: string;
14
15
  inputValues?: Vellum.NodeInputVariableCompiledValue[];
15
16
  }
@@ -11,5 +11,6 @@ export interface RejectedWorkflowNodeResultEvent {
11
11
  nodeResultId: string;
12
12
  ts?: Date;
13
13
  data?: Vellum.WorkflowNodeResultData;
14
+ sourceExecutionId?: string;
14
15
  error: Vellum.WorkflowEventError;
15
16
  }
@@ -11,6 +11,7 @@ export interface StreamingWorkflowNodeResultEvent {
11
11
  nodeResultId: string;
12
12
  ts?: Date;
13
13
  data?: Vellum.WorkflowNodeResultData;
14
+ sourceExecutionId?: string;
14
15
  output?: Vellum.NodeOutputCompiledValue;
15
16
  outputIndex?: number;
16
17
  }