vellum-ai 0.14.41 → 0.14.43
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.d.ts +1 -1
- package/Client.js +12 -12
- package/api/resources/adHoc/client/Client.d.ts +1 -1
- package/api/resources/adHoc/client/Client.js +3 -3
- package/api/resources/containerImages/client/Client.d.ts +1 -1
- package/api/resources/containerImages/client/Client.js +5 -5
- package/api/resources/deployments/client/Client.d.ts +1 -1
- package/api/resources/deployments/client/Client.js +8 -8
- package/api/resources/documentIndexes/client/Client.d.ts +1 -1
- package/api/resources/documentIndexes/client/Client.js +9 -9
- package/api/resources/documents/client/Client.d.ts +4 -4
- package/api/resources/documents/client/Client.js +9 -9
- package/api/resources/folderEntities/client/Client.d.ts +1 -1
- package/api/resources/folderEntities/client/Client.js +3 -3
- package/api/resources/metricDefinitions/client/Client.d.ts +1 -1
- package/api/resources/metricDefinitions/client/Client.js +3 -3
- package/api/resources/mlModels/client/Client.d.ts +1 -1
- package/api/resources/mlModels/client/Client.js +2 -2
- package/api/resources/organizations/client/Client.d.ts +1 -1
- package/api/resources/organizations/client/Client.js +2 -2
- package/api/resources/prompts/client/Client.d.ts +28 -1
- package/api/resources/prompts/client/Client.js +79 -2
- package/api/resources/prompts/client/requests/PromptPush.d.ts +27 -0
- package/api/resources/prompts/client/requests/index.d.ts +1 -0
- package/api/resources/releaseReviews/client/Client.d.ts +1 -1
- package/api/resources/releaseReviews/client/Client.js +3 -3
- package/api/resources/sandboxes/client/Client.d.ts +1 -1
- package/api/resources/sandboxes/client/Client.js +4 -4
- package/api/resources/testSuiteRuns/client/Client.d.ts +1 -1
- package/api/resources/testSuiteRuns/client/Client.js +4 -4
- package/api/resources/testSuites/client/Client.d.ts +1 -1
- package/api/resources/testSuites/client/Client.js +5 -5
- package/api/resources/workflowDeployments/client/Client.d.ts +1 -1
- package/api/resources/workflowDeployments/client/Client.js +9 -9
- package/api/resources/workflowSandboxes/client/Client.d.ts +1 -1
- package/api/resources/workflowSandboxes/client/Client.js +3 -3
- package/api/resources/workflows/client/Client.d.ts +1 -1
- package/api/resources/workflows/client/Client.js +3 -3
- package/api/resources/workspaceSecrets/client/Client.d.ts +1 -1
- package/api/resources/workspaceSecrets/client/Client.js +3 -3
- package/api/resources/workspaces/client/Client.d.ts +1 -1
- package/api/resources/workspaces/client/Client.js +2 -2
- package/api/types/DeploymentRead.d.ts +2 -2
- package/api/types/ExecuteApiResponse.d.ts +2 -1
- package/api/types/ExecuteApiResponseJson.d.ts +4 -0
- package/api/types/PromptPushResponse.d.ts +7 -0
- package/api/types/PromptSettings.d.ts +1 -0
- package/api/types/WorkflowExecutionInitiatedBody.d.ts +0 -1
- package/api/types/index.d.ts +2 -2
- package/api/types/index.js +2 -2
- package/dist/Client.d.ts +1 -1
- package/dist/Client.js +12 -12
- package/dist/api/resources/adHoc/client/Client.d.ts +1 -1
- package/dist/api/resources/adHoc/client/Client.js +3 -3
- package/dist/api/resources/containerImages/client/Client.d.ts +1 -1
- package/dist/api/resources/containerImages/client/Client.js +5 -5
- package/dist/api/resources/deployments/client/Client.d.ts +1 -1
- package/dist/api/resources/deployments/client/Client.js +8 -8
- package/dist/api/resources/documentIndexes/client/Client.d.ts +1 -1
- package/dist/api/resources/documentIndexes/client/Client.js +9 -9
- package/dist/api/resources/documents/client/Client.d.ts +4 -4
- package/dist/api/resources/documents/client/Client.js +9 -9
- package/dist/api/resources/folderEntities/client/Client.d.ts +1 -1
- package/dist/api/resources/folderEntities/client/Client.js +3 -3
- package/dist/api/resources/metricDefinitions/client/Client.d.ts +1 -1
- package/dist/api/resources/metricDefinitions/client/Client.js +3 -3
- package/dist/api/resources/mlModels/client/Client.d.ts +1 -1
- package/dist/api/resources/mlModels/client/Client.js +2 -2
- package/dist/api/resources/organizations/client/Client.d.ts +1 -1
- package/dist/api/resources/organizations/client/Client.js +2 -2
- package/dist/api/resources/prompts/client/Client.d.ts +28 -1
- package/dist/api/resources/prompts/client/Client.js +79 -2
- package/dist/api/resources/prompts/client/requests/PromptPush.d.ts +27 -0
- package/dist/api/resources/prompts/client/requests/index.d.ts +1 -0
- package/dist/api/resources/releaseReviews/client/Client.d.ts +1 -1
- package/dist/api/resources/releaseReviews/client/Client.js +3 -3
- package/dist/api/resources/sandboxes/client/Client.d.ts +1 -1
- package/dist/api/resources/sandboxes/client/Client.js +4 -4
- package/dist/api/resources/testSuiteRuns/client/Client.d.ts +1 -1
- package/dist/api/resources/testSuiteRuns/client/Client.js +4 -4
- package/dist/api/resources/testSuites/client/Client.d.ts +1 -1
- package/dist/api/resources/testSuites/client/Client.js +5 -5
- package/dist/api/resources/workflowDeployments/client/Client.d.ts +1 -1
- package/dist/api/resources/workflowDeployments/client/Client.js +9 -9
- package/dist/api/resources/workflowSandboxes/client/Client.d.ts +1 -1
- package/dist/api/resources/workflowSandboxes/client/Client.js +3 -3
- package/dist/api/resources/workflows/client/Client.d.ts +1 -1
- package/dist/api/resources/workflows/client/Client.js +3 -3
- package/dist/api/resources/workspaceSecrets/client/Client.d.ts +1 -1
- package/dist/api/resources/workspaceSecrets/client/Client.js +3 -3
- package/dist/api/resources/workspaces/client/Client.d.ts +1 -1
- package/dist/api/resources/workspaces/client/Client.js +2 -2
- package/dist/api/types/DeploymentRead.d.ts +2 -2
- package/dist/api/types/ExecuteApiResponse.d.ts +2 -1
- package/dist/api/types/ExecuteApiResponseJson.d.ts +4 -0
- package/dist/api/types/ExecuteApiResponseJson.js +5 -0
- package/dist/api/types/PromptPushResponse.d.ts +7 -0
- package/dist/api/types/PromptPushResponse.js +5 -0
- package/dist/api/types/PromptSettings.d.ts +1 -0
- package/dist/api/types/WorkflowExecutionInitiatedBody.d.ts +0 -1
- package/dist/api/types/index.d.ts +2 -2
- package/dist/api/types/index.js +2 -2
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +3 -1
- package/dist/serialization/resources/prompts/client/index.d.ts +1 -0
- package/dist/serialization/resources/prompts/client/index.js +17 -0
- package/dist/serialization/resources/prompts/client/requests/PromptPush.d.ts +15 -0
- package/dist/serialization/resources/prompts/client/requests/PromptPush.js +46 -0
- package/dist/serialization/resources/prompts/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/prompts/client/requests/index.js +5 -0
- package/dist/serialization/resources/prompts/index.d.ts +1 -0
- package/dist/serialization/resources/prompts/index.js +17 -0
- package/dist/serialization/types/DeploymentRead.d.ts +1 -1
- package/dist/serialization/types/DeploymentRead.js +1 -1
- package/dist/serialization/types/ExecuteApiResponse.d.ts +2 -1
- package/dist/serialization/types/ExecuteApiResponse.js +2 -1
- package/dist/serialization/types/ExecuteApiResponseJson.d.ts +10 -0
- package/dist/serialization/types/{NodeEventDisplayContext.js → ExecuteApiResponseJson.js} +5 -8
- package/dist/serialization/types/PromptPushResponse.d.ts +13 -0
- package/dist/serialization/types/{WorkflowEventDisplayContext.js → PromptPushResponse.js} +4 -6
- package/dist/serialization/types/PromptSettings.d.ts +1 -0
- package/dist/serialization/types/PromptSettings.js +1 -0
- package/dist/serialization/types/WorkflowExecutionInitiatedBody.d.ts +0 -1
- package/dist/serialization/types/WorkflowExecutionInitiatedBody.js +0 -2
- package/dist/serialization/types/index.d.ts +2 -2
- package/dist/serialization/types/index.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +84 -3
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +3 -1
- package/serialization/resources/prompts/client/index.d.ts +1 -0
- package/serialization/resources/prompts/client/index.js +17 -0
- package/serialization/resources/prompts/client/requests/PromptPush.d.ts +15 -0
- package/serialization/resources/prompts/client/requests/PromptPush.js +46 -0
- package/serialization/resources/prompts/client/requests/index.d.ts +1 -0
- package/serialization/resources/prompts/client/requests/index.js +5 -0
- package/serialization/resources/prompts/index.d.ts +1 -0
- package/serialization/resources/prompts/index.js +17 -0
- package/serialization/types/DeploymentRead.d.ts +1 -1
- package/serialization/types/DeploymentRead.js +1 -1
- package/serialization/types/ExecuteApiResponse.d.ts +2 -1
- package/serialization/types/ExecuteApiResponse.js +2 -1
- package/serialization/types/ExecuteApiResponseJson.d.ts +10 -0
- package/serialization/types/{NodeEventDisplayContext.js → ExecuteApiResponseJson.js} +5 -8
- package/serialization/types/PromptPushResponse.d.ts +13 -0
- package/serialization/types/{WorkflowEventDisplayContext.js → PromptPushResponse.js} +4 -6
- package/serialization/types/PromptSettings.d.ts +1 -0
- package/serialization/types/PromptSettings.js +1 -0
- package/serialization/types/WorkflowExecutionInitiatedBody.d.ts +0 -1
- package/serialization/types/WorkflowExecutionInitiatedBody.js +0 -2
- package/serialization/types/index.d.ts +2 -2
- package/serialization/types/index.js +2 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/types/NodeEventDisplayContext.d.ts +0 -10
- package/api/types/WorkflowEventDisplayContext.d.ts +0 -9
- package/dist/api/types/NodeEventDisplayContext.d.ts +0 -10
- package/dist/api/types/WorkflowEventDisplayContext.d.ts +0 -9
- package/dist/serialization/types/NodeEventDisplayContext.d.ts +0 -15
- package/dist/serialization/types/WorkflowEventDisplayContext.d.ts +0 -14
- package/serialization/types/NodeEventDisplayContext.d.ts +0 -15
- package/serialization/types/WorkflowEventDisplayContext.d.ts +0 -14
- /package/api/{types/NodeEventDisplayContext.js → resources/prompts/client/requests/PromptPush.js} +0 -0
- /package/api/types/{WorkflowEventDisplayContext.js → ExecuteApiResponseJson.js} +0 -0
- /package/{dist/api/types/NodeEventDisplayContext.js → api/types/PromptPushResponse.js} +0 -0
- /package/dist/api/{types/WorkflowEventDisplayContext.js → resources/prompts/client/requests/PromptPush.js} +0 -0
|
@@ -93,7 +93,7 @@ class DocumentIndexes {
|
|
|
93
93
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
94
94
|
.default, "v1/document-indexes"),
|
|
95
95
|
method: "GET",
|
|
96
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
96
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
97
97
|
contentType: "application/json",
|
|
98
98
|
queryParameters: _queryParams,
|
|
99
99
|
requestType: "json",
|
|
@@ -208,7 +208,7 @@ class DocumentIndexes {
|
|
|
208
208
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
209
209
|
.default, "v1/document-indexes"),
|
|
210
210
|
method: "POST",
|
|
211
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
211
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
212
212
|
contentType: "application/json",
|
|
213
213
|
requestType: "json",
|
|
214
214
|
body: serializers.DocumentIndexCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -261,7 +261,7 @@ class DocumentIndexes {
|
|
|
261
261
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
262
262
|
.default, `v1/document-indexes/${encodeURIComponent(id)}`),
|
|
263
263
|
method: "GET",
|
|
264
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
264
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
265
265
|
contentType: "application/json",
|
|
266
266
|
requestType: "json",
|
|
267
267
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -316,7 +316,7 @@ class DocumentIndexes {
|
|
|
316
316
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
317
317
|
.default, `v1/document-indexes/${encodeURIComponent(id)}`),
|
|
318
318
|
method: "PUT",
|
|
319
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
319
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
320
320
|
contentType: "application/json",
|
|
321
321
|
requestType: "json",
|
|
322
322
|
body: serializers.DocumentIndexUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -369,7 +369,7 @@ class DocumentIndexes {
|
|
|
369
369
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
370
370
|
.documents, `v1/document-indexes/${encodeURIComponent(id)}`),
|
|
371
371
|
method: "DELETE",
|
|
372
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
372
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
373
373
|
contentType: "application/json",
|
|
374
374
|
requestType: "json",
|
|
375
375
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -417,7 +417,7 @@ class DocumentIndexes {
|
|
|
417
417
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
418
418
|
.default, `v1/document-indexes/${encodeURIComponent(id)}`),
|
|
419
419
|
method: "PATCH",
|
|
420
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
420
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
421
421
|
contentType: "application/json",
|
|
422
422
|
requestType: "json",
|
|
423
423
|
body: serializers.PatchedDocumentIndexUpdateRequest.jsonOrThrow(request, {
|
|
@@ -473,7 +473,7 @@ class DocumentIndexes {
|
|
|
473
473
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
474
474
|
.default, `v1/document-indexes/${encodeURIComponent(id)}/documents/${encodeURIComponent(documentId)}`),
|
|
475
475
|
method: "POST",
|
|
476
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
476
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
477
477
|
contentType: "application/json",
|
|
478
478
|
requestType: "json",
|
|
479
479
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -521,7 +521,7 @@ class DocumentIndexes {
|
|
|
521
521
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
522
522
|
.documents, `v1/document-indexes/${encodeURIComponent(id)}/documents/${encodeURIComponent(documentId)}`),
|
|
523
523
|
method: "DELETE",
|
|
524
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
524
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
525
525
|
contentType: "application/json",
|
|
526
526
|
requestType: "json",
|
|
527
527
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -555,7 +555,7 @@ class DocumentIndexes {
|
|
|
555
555
|
_getCustomAuthorizationHeaders() {
|
|
556
556
|
return __awaiter(this, void 0, void 0, function* () {
|
|
557
557
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
558
|
-
return {
|
|
558
|
+
return { "X-API-KEY": apiKeyValue };
|
|
559
559
|
});
|
|
560
560
|
}
|
|
561
561
|
}
|
|
@@ -40,7 +40,7 @@ export declare class Documents {
|
|
|
40
40
|
/**
|
|
41
41
|
* Retrieve a Document, keying off of either its Vellum-generated ID or its external ID.
|
|
42
42
|
*
|
|
43
|
-
* @param {string} id
|
|
43
|
+
* @param {string} id
|
|
44
44
|
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
45
|
*
|
|
46
46
|
* @example
|
|
@@ -50,7 +50,7 @@ export declare class Documents {
|
|
|
50
50
|
/**
|
|
51
51
|
* Delete a Document, keying off of either its Vellum-generated ID or its external ID.
|
|
52
52
|
*
|
|
53
|
-
* @param {string} id
|
|
53
|
+
* @param {string} id
|
|
54
54
|
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
55
|
*
|
|
56
56
|
* @example
|
|
@@ -60,7 +60,7 @@ export declare class Documents {
|
|
|
60
60
|
/**
|
|
61
61
|
* Update a Document, keying off of either its Vellum-generated ID or its external ID. Particularly useful for updating its metadata.
|
|
62
62
|
*
|
|
63
|
-
* @param {string} id
|
|
63
|
+
* @param {string} id
|
|
64
64
|
* @param {Vellum.PatchedDocumentUpdateRequest} request
|
|
65
65
|
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
66
|
*
|
|
@@ -88,6 +88,6 @@ export declare class Documents {
|
|
|
88
88
|
*/
|
|
89
89
|
upload(contents: File | fs.ReadStream | Blob, request: Vellum.UploadDocumentBodyRequest, requestOptions?: Documents.RequestOptions): Promise<Vellum.UploadDocumentResponse>;
|
|
90
90
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
91
|
-
|
|
91
|
+
"X-API-KEY": string;
|
|
92
92
|
}>;
|
|
93
93
|
}
|
|
@@ -92,7 +92,7 @@ class Documents {
|
|
|
92
92
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
93
93
|
.default, "v1/documents"),
|
|
94
94
|
method: "GET",
|
|
95
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
95
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
96
96
|
contentType: "application/json",
|
|
97
97
|
queryParameters: _queryParams,
|
|
98
98
|
requestType: "json",
|
|
@@ -132,7 +132,7 @@ class Documents {
|
|
|
132
132
|
/**
|
|
133
133
|
* Retrieve a Document, keying off of either its Vellum-generated ID or its external ID.
|
|
134
134
|
*
|
|
135
|
-
* @param {string} id
|
|
135
|
+
* @param {string} id
|
|
136
136
|
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
137
137
|
*
|
|
138
138
|
* @example
|
|
@@ -145,7 +145,7 @@ class Documents {
|
|
|
145
145
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
146
146
|
.default, `v1/documents/${encodeURIComponent(id)}`),
|
|
147
147
|
method: "GET",
|
|
148
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
148
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
149
149
|
contentType: "application/json",
|
|
150
150
|
requestType: "json",
|
|
151
151
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -184,7 +184,7 @@ class Documents {
|
|
|
184
184
|
/**
|
|
185
185
|
* Delete a Document, keying off of either its Vellum-generated ID or its external ID.
|
|
186
186
|
*
|
|
187
|
-
* @param {string} id
|
|
187
|
+
* @param {string} id
|
|
188
188
|
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
189
189
|
*
|
|
190
190
|
* @example
|
|
@@ -197,7 +197,7 @@ class Documents {
|
|
|
197
197
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
198
198
|
.documents, `v1/documents/${encodeURIComponent(id)}`),
|
|
199
199
|
method: "DELETE",
|
|
200
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
200
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
201
201
|
contentType: "application/json",
|
|
202
202
|
requestType: "json",
|
|
203
203
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -231,7 +231,7 @@ class Documents {
|
|
|
231
231
|
/**
|
|
232
232
|
* Update a Document, keying off of either its Vellum-generated ID or its external ID. Particularly useful for updating its metadata.
|
|
233
233
|
*
|
|
234
|
-
* @param {string} id
|
|
234
|
+
* @param {string} id
|
|
235
235
|
* @param {Vellum.PatchedDocumentUpdateRequest} request
|
|
236
236
|
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
237
237
|
*
|
|
@@ -245,7 +245,7 @@ class Documents {
|
|
|
245
245
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
246
246
|
.default, `v1/documents/${encodeURIComponent(id)}`),
|
|
247
247
|
method: "PATCH",
|
|
248
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
248
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
249
249
|
contentType: "application/json",
|
|
250
250
|
requestType: "json",
|
|
251
251
|
body: serializers.PatchedDocumentUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -327,7 +327,7 @@ class Documents {
|
|
|
327
327
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
328
328
|
.documents, "v1/upload-document"),
|
|
329
329
|
method: "POST",
|
|
330
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
330
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
331
331
|
requestType: "file",
|
|
332
332
|
duplex: _maybeEncodedRequest.duplex,
|
|
333
333
|
body: _maybeEncodedRequest.body,
|
|
@@ -376,7 +376,7 @@ class Documents {
|
|
|
376
376
|
_getCustomAuthorizationHeaders() {
|
|
377
377
|
return __awaiter(this, void 0, void 0, function* () {
|
|
378
378
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
379
|
-
return {
|
|
379
|
+
return { "X-API-KEY": apiKeyValue };
|
|
380
380
|
});
|
|
381
381
|
}
|
|
382
382
|
}
|
|
@@ -58,6 +58,6 @@ export declare class FolderEntities {
|
|
|
58
58
|
*/
|
|
59
59
|
addEntityToFolder(folderId: string, request: Vellum.AddEntityToFolderRequest, requestOptions?: FolderEntities.RequestOptions): Promise<void>;
|
|
60
60
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
61
|
-
|
|
61
|
+
"X-API-KEY": string;
|
|
62
62
|
}>;
|
|
63
63
|
}
|
|
@@ -91,7 +91,7 @@ class FolderEntities {
|
|
|
91
91
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
92
92
|
.default, "v1/folder-entities"),
|
|
93
93
|
method: "GET",
|
|
94
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
94
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
95
95
|
contentType: "application/json",
|
|
96
96
|
queryParameters: _queryParams,
|
|
97
97
|
requestType: "json",
|
|
@@ -154,7 +154,7 @@ class FolderEntities {
|
|
|
154
154
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
155
155
|
.default, `v1/folders/${encodeURIComponent(folderId)}/add-entity`),
|
|
156
156
|
method: "POST",
|
|
157
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
157
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
158
158
|
contentType: "application/json",
|
|
159
159
|
requestType: "json",
|
|
160
160
|
body: serializers.AddEntityToFolderRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -189,7 +189,7 @@ class FolderEntities {
|
|
|
189
189
|
_getCustomAuthorizationHeaders() {
|
|
190
190
|
return __awaiter(this, void 0, void 0, function* () {
|
|
191
191
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
192
|
-
return {
|
|
192
|
+
return { "X-API-KEY": apiKeyValue };
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
195
|
}
|
|
@@ -50,6 +50,6 @@ export declare class MetricDefinitions {
|
|
|
50
50
|
*/
|
|
51
51
|
metricDefinitionHistoryItemRetrieve(historyIdOrReleaseTag: string, id: string, requestOptions?: MetricDefinitions.RequestOptions): Promise<Vellum.MetricDefinitionHistoryItem>;
|
|
52
52
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
53
|
-
|
|
53
|
+
"X-API-KEY": string;
|
|
54
54
|
}>;
|
|
55
55
|
}
|
|
@@ -79,7 +79,7 @@ class MetricDefinitions {
|
|
|
79
79
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
80
80
|
.predict, `v1/metric-definitions/${encodeURIComponent(id)}/execute`),
|
|
81
81
|
method: "POST",
|
|
82
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
82
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
83
83
|
contentType: "application/json",
|
|
84
84
|
requestType: "json",
|
|
85
85
|
body: serializers.ExecuteMetricDefinition.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -131,7 +131,7 @@ class MetricDefinitions {
|
|
|
131
131
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
132
132
|
.default, `v1/metric-definitions/${encodeURIComponent(id)}/history/${encodeURIComponent(historyIdOrReleaseTag)}`),
|
|
133
133
|
method: "GET",
|
|
134
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
134
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
135
135
|
contentType: "application/json",
|
|
136
136
|
requestType: "json",
|
|
137
137
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -170,7 +170,7 @@ class MetricDefinitions {
|
|
|
170
170
|
_getCustomAuthorizationHeaders() {
|
|
171
171
|
return __awaiter(this, void 0, void 0, function* () {
|
|
172
172
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
173
|
-
return {
|
|
173
|
+
return { "X-API-KEY": apiKeyValue };
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
}
|
|
@@ -74,7 +74,7 @@ class MlModels {
|
|
|
74
74
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
75
75
|
.default, `v1/ml-models/${encodeURIComponent(id)}`),
|
|
76
76
|
method: "GET",
|
|
77
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
77
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
78
78
|
contentType: "application/json",
|
|
79
79
|
requestType: "json",
|
|
80
80
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -113,7 +113,7 @@ class MlModels {
|
|
|
113
113
|
_getCustomAuthorizationHeaders() {
|
|
114
114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
115
115
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
116
|
-
return {
|
|
116
|
+
return { "X-API-KEY": apiKeyValue };
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -35,6 +35,6 @@ export declare class Organizations {
|
|
|
35
35
|
*/
|
|
36
36
|
organizationIdentity(requestOptions?: Organizations.RequestOptions): Promise<Vellum.OrganizationRead>;
|
|
37
37
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
38
|
-
|
|
38
|
+
"X-API-KEY": string;
|
|
39
39
|
}>;
|
|
40
40
|
}
|
|
@@ -73,7 +73,7 @@ class Organizations {
|
|
|
73
73
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
74
74
|
.default, "v1/organizations/identity"),
|
|
75
75
|
method: "GET",
|
|
76
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
76
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
77
77
|
contentType: "application/json",
|
|
78
78
|
requestType: "json",
|
|
79
79
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -112,7 +112,7 @@ class Organizations {
|
|
|
112
112
|
_getCustomAuthorizationHeaders() {
|
|
113
113
|
return __awaiter(this, void 0, void 0, function* () {
|
|
114
114
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
115
|
-
return {
|
|
115
|
+
return { "X-API-KEY": apiKeyValue };
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
}
|
|
@@ -39,7 +39,34 @@ export declare class Prompts {
|
|
|
39
39
|
* await client.prompts.pull("id")
|
|
40
40
|
*/
|
|
41
41
|
pull(id: string, request?: Vellum.PromptsPullRequest, requestOptions?: Prompts.RequestOptions): Promise<Vellum.PromptExecConfig>;
|
|
42
|
+
/**
|
|
43
|
+
* Used to push updates to a Prompt in Vellum.
|
|
44
|
+
*
|
|
45
|
+
* @param {Vellum.PromptPush} request
|
|
46
|
+
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
47
|
+
*
|
|
48
|
+
* @throws {@link Vellum.BadRequestError}
|
|
49
|
+
* @throws {@link Vellum.NotFoundError}
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* await client.prompts.push({
|
|
53
|
+
* execConfig: {
|
|
54
|
+
* mlModel: "ml_model",
|
|
55
|
+
* inputVariables: [{
|
|
56
|
+
* id: "id",
|
|
57
|
+
* key: "key",
|
|
58
|
+
* type: "STRING"
|
|
59
|
+
* }],
|
|
60
|
+
* parameters: {},
|
|
61
|
+
* blocks: [{
|
|
62
|
+
* blockType: "JINJA",
|
|
63
|
+
* template: "template"
|
|
64
|
+
* }]
|
|
65
|
+
* }
|
|
66
|
+
* })
|
|
67
|
+
*/
|
|
68
|
+
push(request: Vellum.PromptPush, requestOptions?: Prompts.RequestOptions): Promise<Vellum.PromptPushResponse>;
|
|
42
69
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
43
|
-
|
|
70
|
+
"X-API-KEY": string;
|
|
44
71
|
}>;
|
|
45
72
|
}
|
|
@@ -84,7 +84,7 @@ class Prompts {
|
|
|
84
84
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
85
85
|
.default, `v1/prompts/${encodeURIComponent(id)}/pull`),
|
|
86
86
|
method: "GET",
|
|
87
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
87
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, Accept: "application/json" }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
88
88
|
contentType: "application/json",
|
|
89
89
|
queryParameters: _queryParams,
|
|
90
90
|
requestType: "json",
|
|
@@ -128,10 +128,87 @@ class Prompts {
|
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
+
/**
|
|
132
|
+
* Used to push updates to a Prompt in Vellum.
|
|
133
|
+
*
|
|
134
|
+
* @param {Vellum.PromptPush} request
|
|
135
|
+
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
136
|
+
*
|
|
137
|
+
* @throws {@link Vellum.BadRequestError}
|
|
138
|
+
* @throws {@link Vellum.NotFoundError}
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* await client.prompts.push({
|
|
142
|
+
* execConfig: {
|
|
143
|
+
* mlModel: "ml_model",
|
|
144
|
+
* inputVariables: [{
|
|
145
|
+
* id: "id",
|
|
146
|
+
* key: "key",
|
|
147
|
+
* type: "STRING"
|
|
148
|
+
* }],
|
|
149
|
+
* parameters: {},
|
|
150
|
+
* blocks: [{
|
|
151
|
+
* blockType: "JINJA",
|
|
152
|
+
* template: "template"
|
|
153
|
+
* }]
|
|
154
|
+
* }
|
|
155
|
+
* })
|
|
156
|
+
*/
|
|
157
|
+
push(request, requestOptions) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
var _a, _b;
|
|
160
|
+
const _response = yield core.fetcher({
|
|
161
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
162
|
+
.default, "v1/prompts/push"),
|
|
163
|
+
method: "POST",
|
|
164
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
165
|
+
contentType: "application/json",
|
|
166
|
+
requestType: "json",
|
|
167
|
+
body: serializers.PromptPush.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
168
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
169
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
170
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
171
|
+
});
|
|
172
|
+
if (_response.ok) {
|
|
173
|
+
return serializers.PromptPushResponse.parseOrThrow(_response.body, {
|
|
174
|
+
unrecognizedObjectKeys: "passthrough",
|
|
175
|
+
allowUnrecognizedUnionMembers: true,
|
|
176
|
+
allowUnrecognizedEnumValues: true,
|
|
177
|
+
breadcrumbsPrefix: ["response"],
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
if (_response.error.reason === "status-code") {
|
|
181
|
+
switch (_response.error.statusCode) {
|
|
182
|
+
case 400:
|
|
183
|
+
throw new Vellum.BadRequestError(_response.error.body);
|
|
184
|
+
case 404:
|
|
185
|
+
throw new Vellum.NotFoundError(_response.error.body);
|
|
186
|
+
default:
|
|
187
|
+
throw new errors.VellumError({
|
|
188
|
+
statusCode: _response.error.statusCode,
|
|
189
|
+
body: _response.error.body,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
switch (_response.error.reason) {
|
|
194
|
+
case "non-json":
|
|
195
|
+
throw new errors.VellumError({
|
|
196
|
+
statusCode: _response.error.statusCode,
|
|
197
|
+
body: _response.error.rawBody,
|
|
198
|
+
});
|
|
199
|
+
case "timeout":
|
|
200
|
+
throw new errors.VellumTimeoutError("Timeout exceeded when calling POST /v1/prompts/push.");
|
|
201
|
+
case "unknown":
|
|
202
|
+
throw new errors.VellumError({
|
|
203
|
+
message: _response.error.errorMessage,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}
|
|
131
208
|
_getCustomAuthorizationHeaders() {
|
|
132
209
|
return __awaiter(this, void 0, void 0, function* () {
|
|
133
210
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
134
|
-
return {
|
|
211
|
+
return { "X-API-KEY": apiKeyValue };
|
|
135
212
|
});
|
|
136
213
|
}
|
|
137
214
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Vellum from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* execConfig: {
|
|
9
|
+
* mlModel: "ml_model",
|
|
10
|
+
* inputVariables: [{
|
|
11
|
+
* id: "id",
|
|
12
|
+
* key: "key",
|
|
13
|
+
* type: "STRING"
|
|
14
|
+
* }],
|
|
15
|
+
* parameters: {},
|
|
16
|
+
* blocks: [{
|
|
17
|
+
* blockType: "JINJA",
|
|
18
|
+
* template: "template"
|
|
19
|
+
* }]
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
*/
|
|
23
|
+
export interface PromptPush {
|
|
24
|
+
execConfig: Vellum.PromptExecConfig;
|
|
25
|
+
promptVariantId?: string;
|
|
26
|
+
promptSandboxId?: string;
|
|
27
|
+
}
|
|
@@ -48,6 +48,6 @@ export declare class ReleaseReviews {
|
|
|
48
48
|
*/
|
|
49
49
|
retrieveWorkflowDeploymentRelease(id: string, releaseIdOrReleaseTag: string, requestOptions?: ReleaseReviews.RequestOptions): Promise<Vellum.WorkflowDeploymentRelease>;
|
|
50
50
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
51
|
-
|
|
51
|
+
"X-API-KEY": string;
|
|
52
52
|
}>;
|
|
53
53
|
}
|
|
@@ -75,7 +75,7 @@ class ReleaseReviews {
|
|
|
75
75
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
76
76
|
.default, `v1/deployments/${encodeURIComponent(id)}/releases/${encodeURIComponent(releaseIdOrReleaseTag)}`),
|
|
77
77
|
method: "GET",
|
|
78
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
78
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
79
79
|
contentType: "application/json",
|
|
80
80
|
requestType: "json",
|
|
81
81
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -128,7 +128,7 @@ class ReleaseReviews {
|
|
|
128
128
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
129
129
|
.default, `v1/workflow-deployments/${encodeURIComponent(id)}/releases/${encodeURIComponent(releaseIdOrReleaseTag)}`),
|
|
130
130
|
method: "GET",
|
|
131
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
131
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
132
132
|
contentType: "application/json",
|
|
133
133
|
requestType: "json",
|
|
134
134
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -167,7 +167,7 @@ class ReleaseReviews {
|
|
|
167
167
|
_getCustomAuthorizationHeaders() {
|
|
168
168
|
return __awaiter(this, void 0, void 0, function* () {
|
|
169
169
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
170
|
-
return {
|
|
170
|
+
return { "X-API-KEY": apiKeyValue };
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
}
|
|
@@ -91,6 +91,6 @@ export declare class Sandboxes {
|
|
|
91
91
|
*/
|
|
92
92
|
deleteSandboxScenario(id: string, scenarioId: string, requestOptions?: Sandboxes.RequestOptions): Promise<void>;
|
|
93
93
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
94
|
-
|
|
94
|
+
"X-API-KEY": string;
|
|
95
95
|
}>;
|
|
96
96
|
}
|
|
@@ -74,7 +74,7 @@ class Sandboxes {
|
|
|
74
74
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
75
75
|
.default, `v1/sandboxes/${encodeURIComponent(id)}/prompts/${encodeURIComponent(promptVariantId)}/deploy`),
|
|
76
76
|
method: "POST",
|
|
77
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
77
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
78
78
|
contentType: "application/json",
|
|
79
79
|
requestType: "json",
|
|
80
80
|
body: serializers.DeploySandboxPromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -161,7 +161,7 @@ class Sandboxes {
|
|
|
161
161
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
162
162
|
.default, `v1/sandboxes/${encodeURIComponent(id)}/scenarios`),
|
|
163
163
|
method: "POST",
|
|
164
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
164
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
165
165
|
contentType: "application/json",
|
|
166
166
|
requestType: "json",
|
|
167
167
|
body: serializers.UpsertSandboxScenarioRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -215,7 +215,7 @@ class Sandboxes {
|
|
|
215
215
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.VellumEnvironment.Production)
|
|
216
216
|
.default, `v1/sandboxes/${encodeURIComponent(id)}/scenarios/${encodeURIComponent(scenarioId)}`),
|
|
217
217
|
method: "DELETE",
|
|
218
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.
|
|
218
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.14.43", "User-Agent": "vellum-ai/0.14.43", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
219
219
|
contentType: "application/json",
|
|
220
220
|
requestType: "json",
|
|
221
221
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -249,7 +249,7 @@ class Sandboxes {
|
|
|
249
249
|
_getCustomAuthorizationHeaders() {
|
|
250
250
|
return __awaiter(this, void 0, void 0, function* () {
|
|
251
251
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
252
|
-
return {
|
|
252
|
+
return { "X-API-KEY": apiKeyValue };
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
255
|
}
|