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.
- package/Client.js +9 -9
- package/api/resources/deployments/client/Client.js +3 -3
- package/api/resources/documentIndexes/client/Client.d.ts +23 -0
- package/api/resources/documentIndexes/client/Client.js +168 -3
- package/api/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.d.ts +29 -0
- package/api/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.js +5 -0
- package/api/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.d.ts +27 -0
- package/api/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.js +5 -0
- package/api/resources/documentIndexes/client/requests/index.d.ts +2 -0
- package/api/resources/documents/client/Client.js +4 -4
- package/api/resources/folderEntities/client/Client.js +1 -1
- package/api/resources/modelVersions/client/Client.js +1 -1
- package/api/resources/registeredPrompts/client/Client.js +1 -1
- package/api/resources/sandboxes/client/Client.js +2 -2
- package/api/resources/testSuites/client/Client.js +2 -2
- package/api/resources/workflowDeployments/client/Client.js +2 -2
- package/api/types/ArrayVariableValueItem.d.ts +4 -1
- package/api/types/FulfilledWorkflowNodeResultEvent.d.ts +2 -0
- package/api/types/GenerateRequest.d.ts +1 -1
- package/api/types/ImageVariableValue.d.ts +10 -0
- package/api/types/ImageVariableValue.js +5 -0
- package/api/types/InitiatedWorkflowNodeResultEvent.d.ts +1 -0
- package/api/types/RejectedWorkflowNodeResultEvent.d.ts +1 -0
- package/api/types/StreamingWorkflowNodeResultEvent.d.ts +1 -0
- package/api/types/WorkflowExecutionEventErrorCode.d.ts +3 -1
- package/api/types/WorkflowExecutionEventErrorCode.js +1 -0
- package/api/types/index.d.ts +1 -0
- package/api/types/index.js +1 -0
- package/dist/Client.js +9 -9
- package/dist/api/resources/deployments/client/Client.js +3 -3
- package/dist/api/resources/documentIndexes/client/Client.d.ts +23 -0
- package/dist/api/resources/documentIndexes/client/Client.js +168 -3
- package/dist/api/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.d.ts +29 -0
- package/dist/api/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.js +5 -0
- package/dist/api/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.d.ts +27 -0
- package/dist/api/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.js +5 -0
- package/dist/api/resources/documentIndexes/client/requests/index.d.ts +2 -0
- package/dist/api/resources/documents/client/Client.js +4 -4
- package/dist/api/resources/folderEntities/client/Client.js +1 -1
- package/dist/api/resources/modelVersions/client/Client.js +1 -1
- package/dist/api/resources/registeredPrompts/client/Client.js +1 -1
- package/dist/api/resources/sandboxes/client/Client.js +2 -2
- package/dist/api/resources/testSuites/client/Client.js +2 -2
- package/dist/api/resources/workflowDeployments/client/Client.js +2 -2
- package/dist/api/types/ArrayVariableValueItem.d.ts +4 -1
- package/dist/api/types/FulfilledWorkflowNodeResultEvent.d.ts +2 -0
- package/dist/api/types/GenerateRequest.d.ts +1 -1
- package/dist/api/types/ImageVariableValue.d.ts +10 -0
- package/dist/api/types/ImageVariableValue.js +5 -0
- package/dist/api/types/InitiatedWorkflowNodeResultEvent.d.ts +1 -0
- package/dist/api/types/RejectedWorkflowNodeResultEvent.d.ts +1 -0
- package/dist/api/types/StreamingWorkflowNodeResultEvent.d.ts +1 -0
- package/dist/api/types/WorkflowExecutionEventErrorCode.d.ts +3 -1
- package/dist/api/types/WorkflowExecutionEventErrorCode.js +1 -0
- package/dist/api/types/index.d.ts +1 -0
- package/dist/api/types/index.js +1 -0
- package/dist/serialization/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.d.ts +14 -0
- package/dist/serialization/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.js +44 -0
- package/dist/serialization/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.d.ts +14 -0
- package/dist/serialization/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.js +44 -0
- package/dist/serialization/resources/documentIndexes/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/documentIndexes/client/requests/index.js +5 -1
- package/dist/serialization/types/ArrayVariableValueItem.d.ts +4 -1
- package/dist/serialization/types/ArrayVariableValueItem.js +1 -0
- package/dist/serialization/types/FulfilledWorkflowNodeResultEvent.d.ts +2 -0
- package/dist/serialization/types/FulfilledWorkflowNodeResultEvent.js +2 -0
- package/dist/serialization/types/ImageVariableValue.d.ts +12 -0
- package/dist/serialization/types/ImageVariableValue.js +42 -0
- package/dist/serialization/types/InitiatedWorkflowNodeResultEvent.d.ts +1 -0
- package/dist/serialization/types/InitiatedWorkflowNodeResultEvent.js +1 -0
- package/dist/serialization/types/RejectedWorkflowNodeResultEvent.d.ts +1 -0
- package/dist/serialization/types/RejectedWorkflowNodeResultEvent.js +1 -0
- package/dist/serialization/types/StreamingWorkflowNodeResultEvent.d.ts +1 -0
- package/dist/serialization/types/StreamingWorkflowNodeResultEvent.js +1 -0
- package/dist/serialization/types/WorkflowExecutionEventErrorCode.d.ts +1 -1
- package/dist/serialization/types/WorkflowExecutionEventErrorCode.js +1 -0
- package/dist/serialization/types/index.d.ts +1 -0
- package/dist/serialization/types/index.js +1 -0
- package/package.json +1 -1
- package/serialization/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.d.ts +14 -0
- package/serialization/resources/documentIndexes/client/requests/DocumentIndexUpdateRequest.js +44 -0
- package/serialization/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.d.ts +14 -0
- package/serialization/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.js +44 -0
- package/serialization/resources/documentIndexes/client/requests/index.d.ts +2 -0
- package/serialization/resources/documentIndexes/client/requests/index.js +5 -1
- package/serialization/types/ArrayVariableValueItem.d.ts +4 -1
- package/serialization/types/ArrayVariableValueItem.js +1 -0
- package/serialization/types/FulfilledWorkflowNodeResultEvent.d.ts +2 -0
- package/serialization/types/FulfilledWorkflowNodeResultEvent.js +2 -0
- package/serialization/types/ImageVariableValue.d.ts +12 -0
- package/serialization/types/ImageVariableValue.js +42 -0
- package/serialization/types/InitiatedWorkflowNodeResultEvent.d.ts +1 -0
- package/serialization/types/InitiatedWorkflowNodeResultEvent.js +1 -0
- package/serialization/types/RejectedWorkflowNodeResultEvent.d.ts +1 -0
- package/serialization/types/RejectedWorkflowNodeResultEvent.js +1 -0
- package/serialization/types/StreamingWorkflowNodeResultEvent.d.ts +1 -0
- package/serialization/types/StreamingWorkflowNodeResultEvent.js +1 -0
- package/serialization/types/WorkflowExecutionEventErrorCode.d.ts +1 -1
- package/serialization/types/WorkflowExecutionEventErrorCode.js +1 -0
- package/serialization/types/index.d.ts +1 -0
- package/serialization/types/index.js +1 -0
package/api/types/index.d.ts
CHANGED
|
@@ -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";
|
package/api/types/index.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
+
}
|
package/dist/api/resources/documentIndexes/client/requests/PatchedDocumentIndexUpdateRequest.d.ts
ADDED
|
@@ -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
|
+
}
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
}
|
|
@@ -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
|
|
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[];
|