vellum-ai 0.6.0 → 0.6.2
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 +3 -0
- package/Client.js +22 -17
- package/README.md +1 -1
- package/api/resources/deployments/client/Client.d.ts +15 -0
- package/api/resources/deployments/client/Client.js +144 -3
- package/api/resources/deployments/client/requests/DeploySandboxWorkflowRequest.d.ts +17 -0
- package/api/resources/deployments/client/requests/DeploySandboxWorkflowRequest.js +5 -0
- package/api/resources/deployments/client/requests/PatchedDeploymentReleaseTagUpdateRequest.d.ts +11 -0
- package/api/resources/deployments/client/requests/PatchedDeploymentReleaseTagUpdateRequest.js +5 -0
- package/api/resources/deployments/client/requests/index.d.ts +2 -0
- package/api/resources/documentIndexes/client/Client.js +6 -6
- package/api/resources/documents/client/Client.js +5 -5
- package/api/resources/folderEntities/client/Client.js +1 -1
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +3 -1
- package/api/resources/promptVersions/client/Client.d.ts +24 -0
- package/api/resources/promptVersions/client/Client.js +102 -0
- package/api/resources/promptVersions/client/index.d.ts +1 -0
- package/api/resources/promptVersions/client/index.js +17 -0
- package/api/resources/promptVersions/client/requests/DeploySandboxPromptRequest.d.ts +17 -0
- package/api/resources/promptVersions/client/requests/DeploySandboxPromptRequest.js +5 -0
- package/api/resources/promptVersions/client/requests/index.d.ts +1 -0
- package/api/resources/promptVersions/client/requests/index.js +2 -0
- package/api/resources/promptVersions/index.d.ts +1 -0
- package/api/resources/promptVersions/index.js +17 -0
- package/api/resources/sandboxes/client/Client.js +2 -2
- package/api/resources/testSuiteRuns/client/Client.js +3 -3
- package/api/resources/testSuites/client/Client.js +3 -3
- package/api/resources/workflowDeployments/client/Client.d.ts +14 -0
- package/api/resources/workflowDeployments/client/Client.js +99 -2
- package/api/resources/workflowDeployments/client/requests/PatchedWorkflowReleaseTagUpdateRequest.d.ts +11 -0
- package/api/resources/workflowDeployments/client/requests/PatchedWorkflowReleaseTagUpdateRequest.js +5 -0
- package/api/resources/workflowDeployments/client/requests/index.d.ts +1 -0
- package/api/types/DeploymentReleaseTagDeploymentHistoryItem.d.ts +7 -0
- package/api/types/DeploymentReleaseTagDeploymentHistoryItem.js +5 -0
- package/api/types/DeploymentReleaseTagRead.d.ts +17 -0
- package/api/types/DeploymentReleaseTagRead.js +5 -0
- package/api/types/DocumentStatus.d.ts +3 -0
- package/api/types/MergeEnum.d.ts +4 -0
- package/api/types/MergeEnum.js +5 -0
- package/api/types/MergeNodeResult.d.ts +8 -0
- package/api/types/MergeNodeResult.js +5 -0
- package/api/types/ReleaseTagSource.d.ts +12 -0
- package/api/types/ReleaseTagSource.js +10 -0
- package/api/types/SearchResultDocument.d.ts +1 -1
- package/api/types/SearchResultDocumentRequest.d.ts +2 -0
- package/api/types/SubmitCompletionActualRequest.d.ts +2 -0
- package/api/types/SubworkflowNodeResult.d.ts +2 -0
- package/api/types/SubworkflowNodeResultData.d.ts +6 -0
- package/api/types/SubworkflowNodeResultData.js +5 -0
- package/api/types/TestSuiteRunDeploymentReleaseTagExecConfigTypeEnum.d.ts +3 -0
- package/api/types/TestSuiteRunExternalExecConfigTypeEnum.d.ts +3 -0
- package/api/types/TestSuiteRunMetricErrorOutputTypeEnum.d.ts +3 -0
- package/api/types/TestSuiteRunMetricNumberOutputTypeEnum.d.ts +3 -0
- package/api/types/TestSuiteRunMetricStringOutputTypeEnum.d.ts +3 -0
- package/api/types/TestSuiteRunWorkflowReleaseTagExecConfigTypeEnum.d.ts +3 -0
- package/api/types/WorkflowNodeResultData.d.ts +4 -1
- package/api/types/WorkflowReleaseTagRead.d.ts +17 -0
- package/api/types/WorkflowReleaseTagRead.js +5 -0
- package/api/types/WorkflowReleaseTagWorkflowDeploymentHistoryItem.d.ts +9 -0
- package/api/types/WorkflowReleaseTagWorkflowDeploymentHistoryItem.js +5 -0
- package/api/types/index.d.ts +8 -0
- package/api/types/index.js +8 -0
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +22 -17
- package/dist/api/resources/deployments/client/Client.d.ts +15 -0
- package/dist/api/resources/deployments/client/Client.js +144 -3
- package/dist/api/resources/deployments/client/requests/DeploySandboxWorkflowRequest.d.ts +17 -0
- package/dist/api/resources/deployments/client/requests/DeploySandboxWorkflowRequest.js +5 -0
- package/dist/api/resources/deployments/client/requests/PatchedDeploymentReleaseTagUpdateRequest.d.ts +11 -0
- package/dist/api/resources/deployments/client/requests/PatchedDeploymentReleaseTagUpdateRequest.js +5 -0
- package/dist/api/resources/deployments/client/requests/index.d.ts +2 -0
- package/dist/api/resources/documentIndexes/client/Client.js +6 -6
- package/dist/api/resources/documents/client/Client.js +5 -5
- package/dist/api/resources/folderEntities/client/Client.js +1 -1
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/promptVersions/client/Client.d.ts +24 -0
- package/dist/api/resources/promptVersions/client/Client.js +102 -0
- package/dist/api/resources/promptVersions/client/index.d.ts +1 -0
- package/dist/api/resources/promptVersions/client/index.js +17 -0
- package/dist/api/resources/promptVersions/client/requests/DeploySandboxPromptRequest.d.ts +17 -0
- package/dist/api/resources/promptVersions/client/requests/DeploySandboxPromptRequest.js +5 -0
- package/dist/api/resources/promptVersions/client/requests/index.d.ts +1 -0
- package/dist/api/resources/promptVersions/client/requests/index.js +2 -0
- package/dist/api/resources/promptVersions/index.d.ts +1 -0
- package/dist/api/resources/promptVersions/index.js +17 -0
- package/dist/api/resources/sandboxes/client/Client.js +2 -2
- package/dist/api/resources/testSuiteRuns/client/Client.js +3 -3
- package/dist/api/resources/testSuites/client/Client.js +3 -3
- package/dist/api/resources/workflowDeployments/client/Client.d.ts +14 -0
- package/dist/api/resources/workflowDeployments/client/Client.js +99 -2
- package/dist/api/resources/workflowDeployments/client/requests/PatchedWorkflowReleaseTagUpdateRequest.d.ts +11 -0
- package/dist/api/resources/workflowDeployments/client/requests/PatchedWorkflowReleaseTagUpdateRequest.js +5 -0
- package/dist/api/resources/workflowDeployments/client/requests/index.d.ts +1 -0
- package/dist/api/types/DeploymentReleaseTagDeploymentHistoryItem.d.ts +7 -0
- package/dist/api/types/DeploymentReleaseTagDeploymentHistoryItem.js +5 -0
- package/dist/api/types/DeploymentReleaseTagRead.d.ts +17 -0
- package/dist/api/types/DeploymentReleaseTagRead.js +5 -0
- package/dist/api/types/DocumentStatus.d.ts +3 -0
- package/dist/api/types/MergeEnum.d.ts +4 -0
- package/dist/api/types/MergeEnum.js +5 -0
- package/dist/api/types/MergeNodeResult.d.ts +8 -0
- package/dist/api/types/MergeNodeResult.js +5 -0
- package/dist/api/types/ReleaseTagSource.d.ts +12 -0
- package/dist/api/types/ReleaseTagSource.js +10 -0
- package/dist/api/types/SearchResultDocument.d.ts +1 -1
- package/dist/api/types/SearchResultDocumentRequest.d.ts +2 -0
- package/dist/api/types/SubmitCompletionActualRequest.d.ts +2 -0
- package/dist/api/types/SubworkflowNodeResult.d.ts +2 -0
- package/dist/api/types/SubworkflowNodeResultData.d.ts +6 -0
- package/dist/api/types/SubworkflowNodeResultData.js +5 -0
- package/dist/api/types/TestSuiteRunDeploymentReleaseTagExecConfigTypeEnum.d.ts +3 -0
- package/dist/api/types/TestSuiteRunExternalExecConfigTypeEnum.d.ts +3 -0
- package/dist/api/types/TestSuiteRunMetricErrorOutputTypeEnum.d.ts +3 -0
- package/dist/api/types/TestSuiteRunMetricNumberOutputTypeEnum.d.ts +3 -0
- package/dist/api/types/TestSuiteRunMetricStringOutputTypeEnum.d.ts +3 -0
- package/dist/api/types/TestSuiteRunWorkflowReleaseTagExecConfigTypeEnum.d.ts +3 -0
- package/dist/api/types/WorkflowNodeResultData.d.ts +4 -1
- package/dist/api/types/WorkflowReleaseTagRead.d.ts +17 -0
- package/dist/api/types/WorkflowReleaseTagRead.js +5 -0
- package/dist/api/types/WorkflowReleaseTagWorkflowDeploymentHistoryItem.d.ts +9 -0
- package/dist/api/types/WorkflowReleaseTagWorkflowDeploymentHistoryItem.js +5 -0
- package/dist/api/types/index.d.ts +8 -0
- package/dist/api/types/index.js +8 -0
- package/dist/serialization/resources/deployments/client/requests/DeploySandboxWorkflowRequest.d.ts +15 -0
- package/dist/serialization/resources/deployments/client/requests/DeploySandboxWorkflowRequest.js +36 -0
- package/dist/serialization/resources/deployments/client/requests/PatchedDeploymentReleaseTagUpdateRequest.d.ts +12 -0
- package/dist/serialization/resources/deployments/client/requests/PatchedDeploymentReleaseTagUpdateRequest.js +33 -0
- package/dist/serialization/resources/deployments/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/deployments/client/requests/index.js +5 -1
- package/dist/serialization/resources/index.d.ts +3 -0
- package/dist/serialization/resources/index.js +4 -1
- package/dist/serialization/resources/promptVersions/client/index.d.ts +1 -0
- package/dist/serialization/resources/promptVersions/client/index.js +17 -0
- package/dist/serialization/resources/promptVersions/client/requests/DeploySandboxPromptRequest.d.ts +15 -0
- package/dist/serialization/resources/promptVersions/client/requests/DeploySandboxPromptRequest.js +36 -0
- package/dist/serialization/resources/promptVersions/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/promptVersions/client/requests/index.js +5 -0
- package/dist/serialization/resources/promptVersions/index.d.ts +1 -0
- package/dist/serialization/resources/promptVersions/index.js +17 -0
- package/dist/serialization/resources/workflowDeployments/client/index.d.ts +1 -0
- package/dist/serialization/resources/workflowDeployments/client/index.js +17 -0
- package/dist/serialization/resources/workflowDeployments/client/requests/PatchedWorkflowReleaseTagUpdateRequest.d.ts +12 -0
- package/dist/serialization/resources/workflowDeployments/client/requests/PatchedWorkflowReleaseTagUpdateRequest.js +33 -0
- package/dist/serialization/resources/workflowDeployments/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/workflowDeployments/client/requests/index.js +5 -0
- package/dist/serialization/resources/workflowDeployments/index.d.ts +1 -0
- package/dist/serialization/resources/workflowDeployments/index.js +1 -0
- package/dist/serialization/types/DeploymentReleaseTagDeploymentHistoryItem.d.ts +13 -0
- package/dist/serialization/types/DeploymentReleaseTagDeploymentHistoryItem.js +34 -0
- package/dist/serialization/types/DeploymentReleaseTagRead.d.ts +16 -0
- package/dist/serialization/types/DeploymentReleaseTagRead.js +37 -0
- package/dist/serialization/types/MergeEnum.d.ts +10 -0
- package/dist/serialization/types/MergeEnum.js +31 -0
- package/dist/serialization/types/MergeNodeResult.d.ts +11 -0
- package/dist/serialization/types/MergeNodeResult.js +31 -0
- package/dist/serialization/types/ReleaseTagSource.d.ts +10 -0
- package/dist/serialization/types/ReleaseTagSource.js +31 -0
- package/dist/serialization/types/SearchResultDocument.d.ts +1 -1
- package/dist/serialization/types/SearchResultDocument.js +1 -1
- package/dist/serialization/types/SearchResultDocumentRequest.d.ts +1 -0
- package/dist/serialization/types/SearchResultDocumentRequest.js +1 -0
- package/dist/serialization/types/SubmitCompletionActualRequest.d.ts +1 -0
- package/dist/serialization/types/SubmitCompletionActualRequest.js +1 -0
- package/dist/serialization/types/SubworkflowNodeResult.d.ts +2 -0
- package/dist/serialization/types/SubworkflowNodeResult.js +4 -1
- package/dist/serialization/types/SubworkflowNodeResultData.d.ts +12 -0
- package/dist/serialization/types/SubworkflowNodeResultData.js +33 -0
- package/dist/serialization/types/WorkflowNodeResultData.d.ts +5 -1
- package/dist/serialization/types/WorkflowNodeResultData.js +2 -0
- package/dist/serialization/types/WorkflowReleaseTagRead.d.ts +16 -0
- package/dist/serialization/types/WorkflowReleaseTagRead.js +37 -0
- package/dist/serialization/types/WorkflowReleaseTagWorkflowDeploymentHistoryItem.d.ts +13 -0
- package/dist/serialization/types/WorkflowReleaseTagWorkflowDeploymentHistoryItem.js +34 -0
- package/dist/serialization/types/index.d.ts +8 -0
- package/dist/serialization/types/index.js +8 -0
- package/package.json +1 -1
- package/serialization/resources/deployments/client/requests/DeploySandboxWorkflowRequest.d.ts +15 -0
- package/serialization/resources/deployments/client/requests/DeploySandboxWorkflowRequest.js +36 -0
- package/serialization/resources/deployments/client/requests/PatchedDeploymentReleaseTagUpdateRequest.d.ts +12 -0
- package/serialization/resources/deployments/client/requests/PatchedDeploymentReleaseTagUpdateRequest.js +33 -0
- package/serialization/resources/deployments/client/requests/index.d.ts +2 -0
- package/serialization/resources/deployments/client/requests/index.js +5 -1
- package/serialization/resources/index.d.ts +3 -0
- package/serialization/resources/index.js +4 -1
- package/serialization/resources/promptVersions/client/index.d.ts +1 -0
- package/serialization/resources/promptVersions/client/index.js +17 -0
- package/serialization/resources/promptVersions/client/requests/DeploySandboxPromptRequest.d.ts +15 -0
- package/serialization/resources/promptVersions/client/requests/DeploySandboxPromptRequest.js +36 -0
- package/serialization/resources/promptVersions/client/requests/index.d.ts +1 -0
- package/serialization/resources/promptVersions/client/requests/index.js +5 -0
- package/serialization/resources/promptVersions/index.d.ts +1 -0
- package/serialization/resources/promptVersions/index.js +17 -0
- package/serialization/resources/workflowDeployments/client/index.d.ts +1 -0
- package/serialization/resources/workflowDeployments/client/index.js +17 -0
- package/serialization/resources/workflowDeployments/client/requests/PatchedWorkflowReleaseTagUpdateRequest.d.ts +12 -0
- package/serialization/resources/workflowDeployments/client/requests/PatchedWorkflowReleaseTagUpdateRequest.js +33 -0
- package/serialization/resources/workflowDeployments/client/requests/index.d.ts +1 -0
- package/serialization/resources/workflowDeployments/client/requests/index.js +5 -0
- package/serialization/resources/workflowDeployments/index.d.ts +1 -0
- package/serialization/resources/workflowDeployments/index.js +1 -0
- package/serialization/types/DeploymentReleaseTagDeploymentHistoryItem.d.ts +13 -0
- package/serialization/types/DeploymentReleaseTagDeploymentHistoryItem.js +34 -0
- package/serialization/types/DeploymentReleaseTagRead.d.ts +16 -0
- package/serialization/types/DeploymentReleaseTagRead.js +37 -0
- package/serialization/types/MergeEnum.d.ts +10 -0
- package/serialization/types/MergeEnum.js +31 -0
- package/serialization/types/MergeNodeResult.d.ts +11 -0
- package/serialization/types/MergeNodeResult.js +31 -0
- package/serialization/types/ReleaseTagSource.d.ts +10 -0
- package/serialization/types/ReleaseTagSource.js +31 -0
- package/serialization/types/SearchResultDocument.d.ts +1 -1
- package/serialization/types/SearchResultDocument.js +1 -1
- package/serialization/types/SearchResultDocumentRequest.d.ts +1 -0
- package/serialization/types/SearchResultDocumentRequest.js +1 -0
- package/serialization/types/SubmitCompletionActualRequest.d.ts +1 -0
- package/serialization/types/SubmitCompletionActualRequest.js +1 -0
- package/serialization/types/SubworkflowNodeResult.d.ts +2 -0
- package/serialization/types/SubworkflowNodeResult.js +4 -1
- package/serialization/types/SubworkflowNodeResultData.d.ts +12 -0
- package/serialization/types/SubworkflowNodeResultData.js +33 -0
- package/serialization/types/WorkflowNodeResultData.d.ts +5 -1
- package/serialization/types/WorkflowNodeResultData.js +2 -0
- package/serialization/types/WorkflowReleaseTagRead.d.ts +16 -0
- package/serialization/types/WorkflowReleaseTagRead.js +37 -0
- package/serialization/types/WorkflowReleaseTagWorkflowDeploymentHistoryItem.d.ts +13 -0
- package/serialization/types/WorkflowReleaseTagWorkflowDeploymentHistoryItem.js +34 -0
- package/serialization/types/index.d.ts +8 -0
- package/serialization/types/index.js +8 -0
package/Client.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { Deployments } from "./api/resources/deployments/client/Client";
|
|
|
8
8
|
import { DocumentIndexes } from "./api/resources/documentIndexes/client/Client";
|
|
9
9
|
import { Documents } from "./api/resources/documents/client/Client";
|
|
10
10
|
import { FolderEntities } from "./api/resources/folderEntities/client/Client";
|
|
11
|
+
import { PromptVersions } from "./api/resources/promptVersions/client/Client";
|
|
11
12
|
import { Sandboxes } from "./api/resources/sandboxes/client/Client";
|
|
12
13
|
import { TestSuiteRuns } from "./api/resources/testSuiteRuns/client/Client";
|
|
13
14
|
import { TestSuites } from "./api/resources/testSuites/client/Client";
|
|
@@ -118,6 +119,8 @@ export declare class VellumClient {
|
|
|
118
119
|
get documents(): Documents;
|
|
119
120
|
protected _folderEntities: FolderEntities | undefined;
|
|
120
121
|
get folderEntities(): FolderEntities;
|
|
122
|
+
protected _promptVersions: PromptVersions | undefined;
|
|
123
|
+
get promptVersions(): PromptVersions;
|
|
121
124
|
protected _sandboxes: Sandboxes | undefined;
|
|
122
125
|
get sandboxes(): Sandboxes;
|
|
123
126
|
protected _testSuiteRuns: TestSuiteRuns | undefined;
|
package/Client.js
CHANGED
|
@@ -49,10 +49,11 @@ const Client_1 = require("./api/resources/deployments/client/Client");
|
|
|
49
49
|
const Client_2 = require("./api/resources/documentIndexes/client/Client");
|
|
50
50
|
const Client_3 = require("./api/resources/documents/client/Client");
|
|
51
51
|
const Client_4 = require("./api/resources/folderEntities/client/Client");
|
|
52
|
-
const Client_5 = require("./api/resources/
|
|
53
|
-
const Client_6 = require("./api/resources/
|
|
54
|
-
const Client_7 = require("./api/resources/
|
|
55
|
-
const Client_8 = require("./api/resources/
|
|
52
|
+
const Client_5 = require("./api/resources/promptVersions/client/Client");
|
|
53
|
+
const Client_6 = require("./api/resources/sandboxes/client/Client");
|
|
54
|
+
const Client_7 = require("./api/resources/testSuiteRuns/client/Client");
|
|
55
|
+
const Client_8 = require("./api/resources/testSuites/client/Client");
|
|
56
|
+
const Client_9 = require("./api/resources/workflowDeployments/client/Client");
|
|
56
57
|
class VellumClient {
|
|
57
58
|
constructor(_options) {
|
|
58
59
|
this._options = _options;
|
|
@@ -71,7 +72,7 @@ class VellumClient {
|
|
|
71
72
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
72
73
|
.predict, "v1/execute-prompt"),
|
|
73
74
|
method: "POST",
|
|
74
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
75
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
75
76
|
contentType: "application/json",
|
|
76
77
|
body: yield serializers.ExecutePromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
77
78
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -127,7 +128,7 @@ class VellumClient {
|
|
|
127
128
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
128
129
|
.predict, "v1/execute-prompt-stream"),
|
|
129
130
|
method: "POST",
|
|
130
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
131
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
131
132
|
contentType: "application/json",
|
|
132
133
|
body: yield serializers.ExecutePromptStreamRequest.jsonOrThrow(request, {
|
|
133
134
|
unrecognizedObjectKeys: "strip",
|
|
@@ -195,7 +196,7 @@ class VellumClient {
|
|
|
195
196
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
196
197
|
.predict, "v1/execute-workflow"),
|
|
197
198
|
method: "POST",
|
|
198
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
199
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
199
200
|
contentType: "application/json",
|
|
200
201
|
body: yield serializers.ExecuteWorkflowRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
201
202
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -249,7 +250,7 @@ class VellumClient {
|
|
|
249
250
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
250
251
|
.predict, "v1/execute-workflow-stream"),
|
|
251
252
|
method: "POST",
|
|
252
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
253
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
253
254
|
contentType: "application/json",
|
|
254
255
|
body: yield serializers.ExecuteWorkflowStreamRequest.jsonOrThrow(request, {
|
|
255
256
|
unrecognizedObjectKeys: "strip",
|
|
@@ -325,7 +326,7 @@ class VellumClient {
|
|
|
325
326
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
326
327
|
.predict, "v1/generate"),
|
|
327
328
|
method: "POST",
|
|
328
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
329
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
329
330
|
contentType: "application/json",
|
|
330
331
|
body: yield serializers.GenerateBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
331
332
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -383,7 +384,7 @@ class VellumClient {
|
|
|
383
384
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
384
385
|
.predict, "v1/generate-stream"),
|
|
385
386
|
method: "POST",
|
|
386
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
387
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
387
388
|
contentType: "application/json",
|
|
388
389
|
body: yield serializers.GenerateStreamBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
389
390
|
responseType: "streaming",
|
|
@@ -456,7 +457,7 @@ class VellumClient {
|
|
|
456
457
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
457
458
|
.predict, "v1/search"),
|
|
458
459
|
method: "POST",
|
|
459
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
460
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
460
461
|
contentType: "application/json",
|
|
461
462
|
body: yield serializers.SearchRequestBodyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
462
463
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -520,7 +521,7 @@ class VellumClient {
|
|
|
520
521
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
521
522
|
.predict, "v1/submit-completion-actuals"),
|
|
522
523
|
method: "POST",
|
|
523
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
524
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
524
525
|
contentType: "application/json",
|
|
525
526
|
body: yield serializers.SubmitCompletionActualsRequest.jsonOrThrow(request, {
|
|
526
527
|
unrecognizedObjectKeys: "strip",
|
|
@@ -578,7 +579,7 @@ class VellumClient {
|
|
|
578
579
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
579
580
|
.predict, "v1/submit-workflow-execution-actuals"),
|
|
580
581
|
method: "POST",
|
|
581
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
582
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
582
583
|
contentType: "application/json",
|
|
583
584
|
body: yield serializers.SubmitWorkflowExecutionActualsRequest.jsonOrThrow(request, {
|
|
584
585
|
unrecognizedObjectKeys: "strip",
|
|
@@ -626,21 +627,25 @@ class VellumClient {
|
|
|
626
627
|
var _a;
|
|
627
628
|
return ((_a = this._folderEntities) !== null && _a !== void 0 ? _a : (this._folderEntities = new Client_4.FolderEntities(this._options)));
|
|
628
629
|
}
|
|
630
|
+
get promptVersions() {
|
|
631
|
+
var _a;
|
|
632
|
+
return ((_a = this._promptVersions) !== null && _a !== void 0 ? _a : (this._promptVersions = new Client_5.PromptVersions(this._options)));
|
|
633
|
+
}
|
|
629
634
|
get sandboxes() {
|
|
630
635
|
var _a;
|
|
631
|
-
return ((_a = this._sandboxes) !== null && _a !== void 0 ? _a : (this._sandboxes = new
|
|
636
|
+
return ((_a = this._sandboxes) !== null && _a !== void 0 ? _a : (this._sandboxes = new Client_6.Sandboxes(this._options)));
|
|
632
637
|
}
|
|
633
638
|
get testSuiteRuns() {
|
|
634
639
|
var _a;
|
|
635
|
-
return ((_a = this._testSuiteRuns) !== null && _a !== void 0 ? _a : (this._testSuiteRuns = new
|
|
640
|
+
return ((_a = this._testSuiteRuns) !== null && _a !== void 0 ? _a : (this._testSuiteRuns = new Client_7.TestSuiteRuns(this._options)));
|
|
636
641
|
}
|
|
637
642
|
get testSuites() {
|
|
638
643
|
var _a;
|
|
639
|
-
return ((_a = this._testSuites) !== null && _a !== void 0 ? _a : (this._testSuites = new
|
|
644
|
+
return ((_a = this._testSuites) !== null && _a !== void 0 ? _a : (this._testSuites = new Client_8.TestSuites(this._options)));
|
|
640
645
|
}
|
|
641
646
|
get workflowDeployments() {
|
|
642
647
|
var _a;
|
|
643
|
-
return ((_a = this._workflowDeployments) !== null && _a !== void 0 ? _a : (this._workflowDeployments = new
|
|
648
|
+
return ((_a = this._workflowDeployments) !== null && _a !== void 0 ? _a : (this._workflowDeployments = new Client_9.WorkflowDeployments(this._options)));
|
|
644
649
|
}
|
|
645
650
|
_getCustomAuthorizationHeaders() {
|
|
646
651
|
return __awaiter(this, void 0, void 0, function* () {
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Vellum Node Library
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/vellum-ai)
|
|
4
|
-
[](https://
|
|
4
|
+
[](https://buildwithfern.com/?utm_source=vellum-ai/vellum-client-node/readme)
|
|
5
5
|
|
|
6
6
|
The Vellum Node.js library provides access to the Vellum API from JavaScript/TypeScript.
|
|
7
7
|
|
|
@@ -25,6 +25,20 @@ export declare class Deployments {
|
|
|
25
25
|
* await vellum.deployments.retrieve("id")
|
|
26
26
|
*/
|
|
27
27
|
retrieve(id: string, requestOptions?: Deployments.RequestOptions): Promise<Vellum.DeploymentRead>;
|
|
28
|
+
/**
|
|
29
|
+
* Retrieve a Deployment Release Tag by tag name, associated with a specified Deployment.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* await vellum.deployments.retrieveDeploymentReleaseTag("id", "name")
|
|
33
|
+
*/
|
|
34
|
+
retrieveDeploymentReleaseTag(id: string, name: string, requestOptions?: Deployments.RequestOptions): Promise<Vellum.DeploymentReleaseTagRead>;
|
|
35
|
+
/**
|
|
36
|
+
* Updates an existing Release Tag associated with the specified Deployment.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* await vellum.deployments.updateDeploymentReleaseTag("id", "name")
|
|
40
|
+
*/
|
|
41
|
+
updateDeploymentReleaseTag(id: string, name: string, request?: Vellum.PatchedDeploymentReleaseTagUpdateRequest, requestOptions?: Deployments.RequestOptions): Promise<Vellum.DeploymentReleaseTagRead>;
|
|
28
42
|
/**
|
|
29
43
|
* @throws {@link Vellum.BadRequestError}
|
|
30
44
|
* @throws {@link Vellum.ForbiddenError}
|
|
@@ -37,6 +51,7 @@ export declare class Deployments {
|
|
|
37
51
|
* })
|
|
38
52
|
*/
|
|
39
53
|
retrieveProviderPayload(request: Vellum.DeploymentProviderPayloadRequest, requestOptions?: Deployments.RequestOptions): Promise<Vellum.DeploymentProviderPayloadResponse>;
|
|
54
|
+
deployWorkflow(id: string, workflowId: string, request?: Vellum.DeploySandboxWorkflowRequest, requestOptions?: Deployments.RequestOptions): Promise<Vellum.WorkflowDeploymentRead>;
|
|
40
55
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
41
56
|
X_API_KEY: string;
|
|
42
57
|
}>;
|
|
@@ -70,7 +70,7 @@ class Deployments {
|
|
|
70
70
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
71
71
|
.default, "v1/deployments"),
|
|
72
72
|
method: "GET",
|
|
73
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
73
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
74
74
|
contentType: "application/json",
|
|
75
75
|
queryParameters: _queryParams,
|
|
76
76
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -118,7 +118,7 @@ class Deployments {
|
|
|
118
118
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
119
119
|
.default, `v1/deployments/${id}`),
|
|
120
120
|
method: "GET",
|
|
121
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
121
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
122
122
|
contentType: "application/json",
|
|
123
123
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
124
124
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -152,6 +152,103 @@ class Deployments {
|
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Retrieve a Deployment Release Tag by tag name, associated with a specified Deployment.
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* await vellum.deployments.retrieveDeploymentReleaseTag("id", "name")
|
|
160
|
+
*/
|
|
161
|
+
retrieveDeploymentReleaseTag(id, name, requestOptions) {
|
|
162
|
+
var _a;
|
|
163
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
164
|
+
const _response = yield core.fetcher({
|
|
165
|
+
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
166
|
+
.default, `v1/deployments/${id}/release-tags/${name}`),
|
|
167
|
+
method: "GET",
|
|
168
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
169
|
+
contentType: "application/json",
|
|
170
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
171
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
172
|
+
});
|
|
173
|
+
if (_response.ok) {
|
|
174
|
+
return yield serializers.DeploymentReleaseTagRead.parseOrThrow(_response.body, {
|
|
175
|
+
unrecognizedObjectKeys: "passthrough",
|
|
176
|
+
allowUnrecognizedUnionMembers: true,
|
|
177
|
+
allowUnrecognizedEnumValues: true,
|
|
178
|
+
breadcrumbsPrefix: ["response"],
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
if (_response.error.reason === "status-code") {
|
|
182
|
+
throw new errors.VellumError({
|
|
183
|
+
statusCode: _response.error.statusCode,
|
|
184
|
+
body: _response.error.body,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
switch (_response.error.reason) {
|
|
188
|
+
case "non-json":
|
|
189
|
+
throw new errors.VellumError({
|
|
190
|
+
statusCode: _response.error.statusCode,
|
|
191
|
+
body: _response.error.rawBody,
|
|
192
|
+
});
|
|
193
|
+
case "timeout":
|
|
194
|
+
throw new errors.VellumTimeoutError();
|
|
195
|
+
case "unknown":
|
|
196
|
+
throw new errors.VellumError({
|
|
197
|
+
message: _response.error.errorMessage,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Updates an existing Release Tag associated with the specified Deployment.
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* await vellum.deployments.updateDeploymentReleaseTag("id", "name")
|
|
207
|
+
*/
|
|
208
|
+
updateDeploymentReleaseTag(id, name, request = {}, requestOptions) {
|
|
209
|
+
var _a;
|
|
210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
const _response = yield core.fetcher({
|
|
212
|
+
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
213
|
+
.default, `v1/deployments/${id}/release-tags/${name}`),
|
|
214
|
+
method: "PATCH",
|
|
215
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
216
|
+
contentType: "application/json",
|
|
217
|
+
body: yield serializers.PatchedDeploymentReleaseTagUpdateRequest.jsonOrThrow(request, {
|
|
218
|
+
unrecognizedObjectKeys: "strip",
|
|
219
|
+
}),
|
|
220
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
221
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
222
|
+
});
|
|
223
|
+
if (_response.ok) {
|
|
224
|
+
return yield serializers.DeploymentReleaseTagRead.parseOrThrow(_response.body, {
|
|
225
|
+
unrecognizedObjectKeys: "passthrough",
|
|
226
|
+
allowUnrecognizedUnionMembers: true,
|
|
227
|
+
allowUnrecognizedEnumValues: true,
|
|
228
|
+
breadcrumbsPrefix: ["response"],
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
if (_response.error.reason === "status-code") {
|
|
232
|
+
throw new errors.VellumError({
|
|
233
|
+
statusCode: _response.error.statusCode,
|
|
234
|
+
body: _response.error.body,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
switch (_response.error.reason) {
|
|
238
|
+
case "non-json":
|
|
239
|
+
throw new errors.VellumError({
|
|
240
|
+
statusCode: _response.error.statusCode,
|
|
241
|
+
body: _response.error.rawBody,
|
|
242
|
+
});
|
|
243
|
+
case "timeout":
|
|
244
|
+
throw new errors.VellumTimeoutError();
|
|
245
|
+
case "unknown":
|
|
246
|
+
throw new errors.VellumError({
|
|
247
|
+
message: _response.error.errorMessage,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
}
|
|
155
252
|
/**
|
|
156
253
|
* @throws {@link Vellum.BadRequestError}
|
|
157
254
|
* @throws {@link Vellum.ForbiddenError}
|
|
@@ -170,7 +267,7 @@ class Deployments {
|
|
|
170
267
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
171
268
|
.default, "v1/deployments/provider-payload"),
|
|
172
269
|
method: "POST",
|
|
173
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
270
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
174
271
|
contentType: "application/json",
|
|
175
272
|
body: yield serializers.DeploymentProviderPayloadRequest.jsonOrThrow(request, {
|
|
176
273
|
unrecognizedObjectKeys: "strip",
|
|
@@ -218,6 +315,50 @@ class Deployments {
|
|
|
218
315
|
}
|
|
219
316
|
});
|
|
220
317
|
}
|
|
318
|
+
deployWorkflow(id, workflowId, request = {}, requestOptions) {
|
|
319
|
+
var _a;
|
|
320
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
+
const _response = yield core.fetcher({
|
|
322
|
+
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
323
|
+
.default, `v1/workflow-sandboxes/${id}/workflows/${workflowId}/deploy`),
|
|
324
|
+
method: "POST",
|
|
325
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
326
|
+
contentType: "application/json",
|
|
327
|
+
body: yield serializers.DeploySandboxWorkflowRequest.jsonOrThrow(request, {
|
|
328
|
+
unrecognizedObjectKeys: "strip",
|
|
329
|
+
}),
|
|
330
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
331
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
332
|
+
});
|
|
333
|
+
if (_response.ok) {
|
|
334
|
+
return yield serializers.WorkflowDeploymentRead.parseOrThrow(_response.body, {
|
|
335
|
+
unrecognizedObjectKeys: "passthrough",
|
|
336
|
+
allowUnrecognizedUnionMembers: true,
|
|
337
|
+
allowUnrecognizedEnumValues: true,
|
|
338
|
+
breadcrumbsPrefix: ["response"],
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
if (_response.error.reason === "status-code") {
|
|
342
|
+
throw new errors.VellumError({
|
|
343
|
+
statusCode: _response.error.statusCode,
|
|
344
|
+
body: _response.error.body,
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
switch (_response.error.reason) {
|
|
348
|
+
case "non-json":
|
|
349
|
+
throw new errors.VellumError({
|
|
350
|
+
statusCode: _response.error.statusCode,
|
|
351
|
+
body: _response.error.rawBody,
|
|
352
|
+
});
|
|
353
|
+
case "timeout":
|
|
354
|
+
throw new errors.VellumTimeoutError();
|
|
355
|
+
case "unknown":
|
|
356
|
+
throw new errors.VellumError({
|
|
357
|
+
message: _response.error.errorMessage,
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
}
|
|
221
362
|
_getCustomAuthorizationHeaders() {
|
|
222
363
|
return __awaiter(this, void 0, void 0, function* () {
|
|
223
364
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {}
|
|
7
|
+
*/
|
|
8
|
+
export interface DeploySandboxWorkflowRequest {
|
|
9
|
+
/** The Vellum-generated ID of the Workflow Deployment you'd like to update. Cannot specify both this and workflow_deployment_name. Leave null to create a new Workflow Deployment. */
|
|
10
|
+
workflowDeploymentId?: string;
|
|
11
|
+
/** The unique name of the Workflow Deployment you'd like to either create or update. Cannot specify both this and workflow_deployment_id. If provided and matches an existing Workflow Deployment, that Workflow Deployment will be updated. Otherwise, a new Prompt Deployment will be created. */
|
|
12
|
+
workflowDeploymentName?: string;
|
|
13
|
+
/** In the event that a new Workflow Deployment is created, this will be the label it's given. */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** Optionally provide the release tags that you'd like to be associated with the latest release of the created/updated Prompt Deployment. */
|
|
16
|
+
releaseTags?: string[];
|
|
17
|
+
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { DeploymentsListRequest } from "./DeploymentsListRequest";
|
|
2
|
+
export { PatchedDeploymentReleaseTagUpdateRequest } from "./PatchedDeploymentReleaseTagUpdateRequest";
|
|
2
3
|
export { DeploymentProviderPayloadRequest } from "./DeploymentProviderPayloadRequest";
|
|
4
|
+
export { DeploySandboxWorkflowRequest } from "./DeploySandboxWorkflowRequest";
|
|
@@ -78,7 +78,7 @@ class DocumentIndexes {
|
|
|
78
78
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
79
79
|
.default, "v1/document-indexes"),
|
|
80
80
|
method: "GET",
|
|
81
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
81
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
82
82
|
contentType: "application/json",
|
|
83
83
|
queryParameters: _queryParams,
|
|
84
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -123,7 +123,7 @@ class DocumentIndexes {
|
|
|
123
123
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
124
124
|
.default, "v1/document-indexes"),
|
|
125
125
|
method: "POST",
|
|
126
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
126
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
127
127
|
contentType: "application/json",
|
|
128
128
|
body: yield serializers.DocumentIndexCreateRequest.jsonOrThrow(request, {
|
|
129
129
|
unrecognizedObjectKeys: "strip",
|
|
@@ -170,7 +170,7 @@ class DocumentIndexes {
|
|
|
170
170
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
171
171
|
.default, `v1/document-indexes/${id}`),
|
|
172
172
|
method: "GET",
|
|
173
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
173
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
174
174
|
contentType: "application/json",
|
|
175
175
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
176
176
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -214,7 +214,7 @@ class DocumentIndexes {
|
|
|
214
214
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
215
215
|
.default, `v1/document-indexes/${id}`),
|
|
216
216
|
method: "PUT",
|
|
217
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
217
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
218
218
|
contentType: "application/json",
|
|
219
219
|
body: yield serializers.DocumentIndexUpdateRequest.jsonOrThrow(request, {
|
|
220
220
|
unrecognizedObjectKeys: "strip",
|
|
@@ -264,7 +264,7 @@ class DocumentIndexes {
|
|
|
264
264
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
265
265
|
.default, `v1/document-indexes/${id}`),
|
|
266
266
|
method: "DELETE",
|
|
267
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
267
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
268
268
|
contentType: "application/json",
|
|
269
269
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
270
270
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -303,7 +303,7 @@ class DocumentIndexes {
|
|
|
303
303
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
304
304
|
.default, `v1/document-indexes/${id}`),
|
|
305
305
|
method: "PATCH",
|
|
306
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
306
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
307
307
|
contentType: "application/json",
|
|
308
308
|
body: yield serializers.PatchedDocumentIndexUpdateRequest.jsonOrThrow(request, {
|
|
309
309
|
unrecognizedObjectKeys: "strip",
|
|
@@ -77,7 +77,7 @@ class Documents {
|
|
|
77
77
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
78
78
|
.default, "v1/documents"),
|
|
79
79
|
method: "GET",
|
|
80
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
80
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
81
81
|
contentType: "application/json",
|
|
82
82
|
queryParameters: _queryParams,
|
|
83
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -125,7 +125,7 @@ class Documents {
|
|
|
125
125
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
126
126
|
.default, `v1/documents/${id}`),
|
|
127
127
|
method: "GET",
|
|
128
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
128
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
129
129
|
contentType: "application/json",
|
|
130
130
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
131
131
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -172,7 +172,7 @@ class Documents {
|
|
|
172
172
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
173
173
|
.default, `v1/documents/${id}`),
|
|
174
174
|
method: "DELETE",
|
|
175
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
175
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
176
176
|
contentType: "application/json",
|
|
177
177
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
178
178
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -214,7 +214,7 @@ class Documents {
|
|
|
214
214
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
215
215
|
.default, `v1/documents/${id}`),
|
|
216
216
|
method: "PATCH",
|
|
217
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
217
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
218
218
|
contentType: "application/json",
|
|
219
219
|
body: yield serializers.PatchedDocumentUpdateRequest.jsonOrThrow(request, {
|
|
220
220
|
unrecognizedObjectKeys: "strip",
|
|
@@ -293,7 +293,7 @@ class Documents {
|
|
|
293
293
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
294
294
|
.documents, "v1/upload-document"),
|
|
295
295
|
method: "POST",
|
|
296
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
296
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
297
297
|
contentType: "multipart/form-data; boundary=" + _request.getBoundary(),
|
|
298
298
|
body: _request,
|
|
299
299
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -65,7 +65,7 @@ class FolderEntities {
|
|
|
65
65
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
66
66
|
.default, `v1/folders/${folderId}/add-entity`),
|
|
67
67
|
method: "POST",
|
|
68
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
68
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
69
69
|
contentType: "application/json",
|
|
70
70
|
body: yield serializers.AddEntityToFolderRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
71
71
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
package/api/resources/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * as workflowDeployments from "./workflowDeployments";
|
|
|
6
6
|
export * from "./workflowDeployments/types";
|
|
7
7
|
export * as documents from "./documents";
|
|
8
8
|
export * as folderEntities from "./folderEntities";
|
|
9
|
+
export * as promptVersions from "./promptVersions";
|
|
9
10
|
export * as sandboxes from "./sandboxes";
|
|
10
11
|
export * as testSuiteRuns from "./testSuiteRuns";
|
|
11
12
|
export * as testSuites from "./testSuites";
|
|
@@ -13,6 +14,7 @@ export * from "./deployments/client/requests";
|
|
|
13
14
|
export * from "./documentIndexes/client/requests";
|
|
14
15
|
export * from "./documents/client/requests";
|
|
15
16
|
export * from "./folderEntities/client/requests";
|
|
17
|
+
export * from "./promptVersions/client/requests";
|
|
16
18
|
export * from "./sandboxes/client/requests";
|
|
17
19
|
export * from "./testSuiteRuns/client/requests";
|
|
18
20
|
export * from "./testSuites/client/requests";
|
package/api/resources/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.testSuites = exports.testSuiteRuns = exports.sandboxes = exports.folderEntities = exports.documents = exports.workflowDeployments = exports.documentIndexes = exports.deployments = void 0;
|
|
29
|
+
exports.testSuites = exports.testSuiteRuns = exports.sandboxes = exports.promptVersions = exports.folderEntities = exports.documents = exports.workflowDeployments = exports.documentIndexes = exports.deployments = void 0;
|
|
30
30
|
exports.deployments = __importStar(require("./deployments"));
|
|
31
31
|
__exportStar(require("./deployments/types"), exports);
|
|
32
32
|
exports.documentIndexes = __importStar(require("./documentIndexes"));
|
|
@@ -35,6 +35,7 @@ exports.workflowDeployments = __importStar(require("./workflowDeployments"));
|
|
|
35
35
|
__exportStar(require("./workflowDeployments/types"), exports);
|
|
36
36
|
exports.documents = __importStar(require("./documents"));
|
|
37
37
|
exports.folderEntities = __importStar(require("./folderEntities"));
|
|
38
|
+
exports.promptVersions = __importStar(require("./promptVersions"));
|
|
38
39
|
exports.sandboxes = __importStar(require("./sandboxes"));
|
|
39
40
|
exports.testSuiteRuns = __importStar(require("./testSuiteRuns"));
|
|
40
41
|
exports.testSuites = __importStar(require("./testSuites"));
|
|
@@ -42,6 +43,7 @@ __exportStar(require("./deployments/client/requests"), exports);
|
|
|
42
43
|
__exportStar(require("./documentIndexes/client/requests"), exports);
|
|
43
44
|
__exportStar(require("./documents/client/requests"), exports);
|
|
44
45
|
__exportStar(require("./folderEntities/client/requests"), exports);
|
|
46
|
+
__exportStar(require("./promptVersions/client/requests"), exports);
|
|
45
47
|
__exportStar(require("./sandboxes/client/requests"), exports);
|
|
46
48
|
__exportStar(require("./testSuiteRuns/client/requests"), exports);
|
|
47
49
|
__exportStar(require("./testSuites/client/requests"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as Vellum from "../../..";
|
|
7
|
+
export declare namespace PromptVersions {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.VellumEnvironment | environments.VellumEnvironmentUrls>;
|
|
10
|
+
apiKey: core.Supplier<string>;
|
|
11
|
+
}
|
|
12
|
+
interface RequestOptions {
|
|
13
|
+
timeoutInSeconds?: number;
|
|
14
|
+
maxRetries?: number;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare class PromptVersions {
|
|
18
|
+
protected readonly _options: PromptVersions.Options;
|
|
19
|
+
constructor(_options: PromptVersions.Options);
|
|
20
|
+
deployPrompt(id: string, promptId: string, request?: Vellum.DeploySandboxPromptRequest, requestOptions?: PromptVersions.RequestOptions): Promise<Vellum.DeploymentRead>;
|
|
21
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
22
|
+
X_API_KEY: string;
|
|
23
|
+
}>;
|
|
24
|
+
}
|