vellum-ai 0.6.7 → 0.6.11
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 +9 -6
- package/Client.js +40 -37
- package/api/client/requests/ExecutePromptRequest.d.ts +7 -5
- package/api/client/requests/ExecutePromptStreamRequest.d.ts +7 -5
- package/api/resources/deployments/client/Client.d.ts +8 -5
- package/api/resources/deployments/client/Client.js +22 -17
- package/api/resources/documentIndexes/client/Client.d.ts +37 -12
- package/api/resources/documentIndexes/client/Client.js +128 -30
- package/api/resources/documents/client/Client.d.ts +11 -7
- package/api/resources/documents/client/Client.js +25 -22
- package/api/resources/folderEntities/client/Client.d.ts +4 -1
- package/api/resources/folderEntities/client/Client.js +4 -3
- package/api/resources/sandboxes/client/Client.d.ts +7 -4
- package/api/resources/sandboxes/client/Client.js +14 -13
- package/api/resources/testSuiteRuns/client/Client.d.ts +6 -3
- package/api/resources/testSuiteRuns/client/Client.js +13 -10
- package/api/resources/testSuites/client/Client.d.ts +6 -3
- package/api/resources/testSuites/client/Client.js +16 -14
- package/api/resources/workflowDeployments/client/Client.d.ts +7 -4
- package/api/resources/workflowDeployments/client/Client.js +17 -13
- package/api/resources/workflowSandboxes/client/Client.d.ts +4 -1
- package/api/resources/workflowSandboxes/client/Client.js +5 -6
- package/api/types/IterationStateEnum.d.ts +12 -0
- package/api/types/IterationStateEnum.js +10 -0
- package/api/types/MapNodeResultData.d.ts +2 -0
- package/api/types/PromptNodeResultData.d.ts +1 -0
- package/api/types/TestSuiteRunMetricNumberOutput.d.ts +1 -1
- package/api/types/TestSuiteRunMetricStringOutput.d.ts +1 -1
- package/api/types/TestSuiteTestCaseRejectedBulkResult.d.ts +1 -1
- package/api/types/index.d.ts +1 -0
- package/api/types/index.js +1 -0
- package/core/fetcher/Fetcher.d.ts +2 -0
- package/core/fetcher/Fetcher.js +19 -185
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +13 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +55 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +48 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +40 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +32 -0
- package/core/fetcher/signals.d.ts +12 -0
- package/core/fetcher/signals.js +37 -0
- package/core/form-data-utils/FormDataWrapper.d.ts +10 -21
- package/core/form-data-utils/FormDataWrapper.js +82 -49
- package/core/runtime/runtime.d.ts +1 -0
- package/core/runtime/runtime.js +1 -0
- package/core/schemas/Schema.d.ts +7 -4
- package/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/core/schemas/builders/lazy/lazy.js +8 -19
- package/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/core/schemas/builders/list/list.js +31 -44
- package/core/schemas/builders/object/object.js +90 -111
- package/core/schemas/builders/object/types.d.ts +2 -2
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/core/schemas/builders/record/record.js +49 -60
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/core/schemas/builders/set/set.js +6 -15
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/core/schemas/builders/union/union.js +51 -62
- package/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/Client.d.ts +9 -6
- package/dist/Client.js +40 -37
- package/dist/api/client/requests/ExecutePromptRequest.d.ts +7 -5
- package/dist/api/client/requests/ExecutePromptStreamRequest.d.ts +7 -5
- package/dist/api/resources/deployments/client/Client.d.ts +8 -5
- package/dist/api/resources/deployments/client/Client.js +22 -17
- package/dist/api/resources/documentIndexes/client/Client.d.ts +37 -12
- package/dist/api/resources/documentIndexes/client/Client.js +128 -30
- package/dist/api/resources/documents/client/Client.d.ts +11 -7
- package/dist/api/resources/documents/client/Client.js +25 -22
- package/dist/api/resources/folderEntities/client/Client.d.ts +4 -1
- package/dist/api/resources/folderEntities/client/Client.js +4 -3
- package/dist/api/resources/sandboxes/client/Client.d.ts +7 -4
- package/dist/api/resources/sandboxes/client/Client.js +14 -13
- package/dist/api/resources/testSuiteRuns/client/Client.d.ts +6 -3
- package/dist/api/resources/testSuiteRuns/client/Client.js +13 -10
- package/dist/api/resources/testSuites/client/Client.d.ts +6 -3
- package/dist/api/resources/testSuites/client/Client.js +16 -14
- package/dist/api/resources/workflowDeployments/client/Client.d.ts +7 -4
- package/dist/api/resources/workflowDeployments/client/Client.js +17 -13
- package/dist/api/resources/workflowSandboxes/client/Client.d.ts +4 -1
- package/dist/api/resources/workflowSandboxes/client/Client.js +5 -6
- package/dist/api/types/IterationStateEnum.d.ts +12 -0
- package/dist/api/types/IterationStateEnum.js +10 -0
- package/dist/api/types/MapNodeResultData.d.ts +2 -0
- package/dist/api/types/PromptNodeResultData.d.ts +1 -0
- package/dist/api/types/TestSuiteRunMetricNumberOutput.d.ts +1 -1
- package/dist/api/types/TestSuiteRunMetricStringOutput.d.ts +1 -1
- package/dist/api/types/TestSuiteTestCaseRejectedBulkResult.d.ts +1 -1
- package/dist/api/types/index.d.ts +1 -0
- package/dist/api/types/index.js +1 -0
- package/dist/core/fetcher/Fetcher.d.ts +2 -0
- package/dist/core/fetcher/Fetcher.js +19 -185
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +13 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +55 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +48 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +40 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +32 -0
- package/dist/core/fetcher/signals.d.ts +12 -0
- package/dist/core/fetcher/signals.js +37 -0
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +10 -21
- package/dist/core/form-data-utils/FormDataWrapper.js +82 -49
- package/dist/core/runtime/runtime.d.ts +1 -0
- package/dist/core/runtime/runtime.js +1 -0
- package/dist/core/schemas/Schema.d.ts +7 -4
- package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/dist/core/schemas/builders/lazy/lazy.js +8 -19
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
- package/dist/core/schemas/builders/list/list.js +31 -44
- package/dist/core/schemas/builders/object/object.js +90 -111
- package/dist/core/schemas/builders/object/types.d.ts +2 -2
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
- package/dist/core/schemas/builders/record/record.js +49 -60
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
- package/dist/core/schemas/builders/set/set.js +6 -15
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
- package/dist/core/schemas/builders/union/union.js +51 -62
- package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
- package/dist/serialization/types/IterationStateEnum.d.ts +10 -0
- package/dist/serialization/types/IterationStateEnum.js +31 -0
- package/dist/serialization/types/MapNodeResultData.d.ts +2 -0
- package/dist/serialization/types/MapNodeResultData.js +2 -0
- package/dist/serialization/types/MetadataFilterConfigRequest.js +2 -10
- package/dist/serialization/types/MetadataFilterRuleRequest.js +2 -10
- package/dist/serialization/types/PromptNodeResultData.d.ts +1 -0
- package/dist/serialization/types/PromptNodeResultData.js +1 -0
- package/dist/serialization/types/TestSuiteRunMetricNumberOutput.d.ts +1 -1
- package/dist/serialization/types/TestSuiteRunMetricNumberOutput.js +1 -1
- package/dist/serialization/types/TestSuiteRunMetricStringOutput.d.ts +1 -1
- package/dist/serialization/types/TestSuiteRunMetricStringOutput.js +1 -1
- package/dist/serialization/types/TestSuiteTestCaseRejectedBulkResult.d.ts +1 -1
- package/dist/serialization/types/TestSuiteTestCaseRejectedBulkResult.js +1 -1
- package/dist/serialization/types/index.d.ts +1 -0
- package/dist/serialization/types/index.js +1 -0
- package/package.json +6 -1
- package/reference.md +2418 -0
- package/serialization/types/IterationStateEnum.d.ts +10 -0
- package/serialization/types/IterationStateEnum.js +31 -0
- package/serialization/types/MapNodeResultData.d.ts +2 -0
- package/serialization/types/MapNodeResultData.js +2 -0
- package/serialization/types/MetadataFilterConfigRequest.js +2 -10
- package/serialization/types/MetadataFilterRuleRequest.js +2 -10
- package/serialization/types/PromptNodeResultData.d.ts +1 -0
- package/serialization/types/PromptNodeResultData.js +1 -0
- package/serialization/types/TestSuiteRunMetricNumberOutput.d.ts +1 -1
- package/serialization/types/TestSuiteRunMetricNumberOutput.js +1 -1
- package/serialization/types/TestSuiteRunMetricStringOutput.d.ts +1 -1
- package/serialization/types/TestSuiteRunMetricStringOutput.js +1 -1
- package/serialization/types/TestSuiteTestCaseRejectedBulkResult.d.ts +1 -1
- package/serialization/types/TestSuiteTestCaseRejectedBulkResult.js +1 -1
- package/serialization/types/index.d.ts +1 -0
- package/serialization/types/index.js +1 -0
|
@@ -56,7 +56,7 @@ class TestSuites {
|
|
|
56
56
|
* @param {TestSuites.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
57
|
*
|
|
58
58
|
* @example
|
|
59
|
-
* await
|
|
59
|
+
* await client.testSuites.listTestSuiteTestCases("id")
|
|
60
60
|
*/
|
|
61
61
|
listTestSuiteTestCases(id, request = {}, requestOptions) {
|
|
62
62
|
var _a;
|
|
@@ -73,15 +73,16 @@ class TestSuites {
|
|
|
73
73
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
74
74
|
.default, `v1/test-suites/${encodeURIComponent(id)}/test-cases`),
|
|
75
75
|
method: "GET",
|
|
76
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
76
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
77
77
|
contentType: "application/json",
|
|
78
78
|
queryParameters: _queryParams,
|
|
79
|
+
requestType: "json",
|
|
79
80
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
80
81
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
81
82
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
82
83
|
});
|
|
83
84
|
if (_response.ok) {
|
|
84
|
-
return
|
|
85
|
+
return serializers.PaginatedTestSuiteTestCaseList.parseOrThrow(_response.body, {
|
|
85
86
|
unrecognizedObjectKeys: "passthrough",
|
|
86
87
|
allowUnrecognizedUnionMembers: true,
|
|
87
88
|
allowUnrecognizedEnumValues: true,
|
|
@@ -123,7 +124,7 @@ class TestSuites {
|
|
|
123
124
|
* @param {TestSuites.RequestOptions} requestOptions - Request-specific configuration.
|
|
124
125
|
*
|
|
125
126
|
* @example
|
|
126
|
-
* await
|
|
127
|
+
* await client.testSuites.upsertTestSuiteTestCase("id", {
|
|
127
128
|
* inputValues: [],
|
|
128
129
|
* evaluationValues: []
|
|
129
130
|
* })
|
|
@@ -135,17 +136,16 @@ class TestSuites {
|
|
|
135
136
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
136
137
|
.default, `v1/test-suites/${encodeURIComponent(id)}/test-cases`),
|
|
137
138
|
method: "POST",
|
|
138
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
139
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
139
140
|
contentType: "application/json",
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}),
|
|
141
|
+
requestType: "json",
|
|
142
|
+
body: serializers.UpsertTestSuiteTestCaseRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
143
143
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
144
144
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
145
145
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
146
146
|
});
|
|
147
147
|
if (_response.ok) {
|
|
148
|
-
return
|
|
148
|
+
return serializers.TestSuiteTestCase.parseOrThrow(_response.body, {
|
|
149
149
|
unrecognizedObjectKeys: "passthrough",
|
|
150
150
|
allowUnrecognizedUnionMembers: true,
|
|
151
151
|
allowUnrecognizedEnumValues: true,
|
|
@@ -183,9 +183,10 @@ class TestSuites {
|
|
|
183
183
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
184
184
|
.default, `v1/test-suites/${encodeURIComponent(id)}/test-cases-bulk`),
|
|
185
185
|
method: "POST",
|
|
186
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
186
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
187
187
|
contentType: "application/json",
|
|
188
|
-
|
|
188
|
+
requestType: "json",
|
|
189
|
+
body: serializers.testSuites.testSuiteTestCasesBulk.Request.jsonOrThrow(request, {
|
|
189
190
|
unrecognizedObjectKeys: "strip",
|
|
190
191
|
}),
|
|
191
192
|
responseType: "streaming",
|
|
@@ -197,7 +198,7 @@ class TestSuites {
|
|
|
197
198
|
return new core.Stream({
|
|
198
199
|
stream: _response.body,
|
|
199
200
|
parse: (data) => __awaiter(this, void 0, void 0, function* () {
|
|
200
|
-
return
|
|
201
|
+
return serializers.testSuites.testSuiteTestCasesBulk.StreamData.parseOrThrow(data, {
|
|
201
202
|
unrecognizedObjectKeys: "passthrough",
|
|
202
203
|
allowUnrecognizedUnionMembers: true,
|
|
203
204
|
allowUnrecognizedEnumValues: true,
|
|
@@ -240,7 +241,7 @@ class TestSuites {
|
|
|
240
241
|
* @param {TestSuites.RequestOptions} requestOptions - Request-specific configuration.
|
|
241
242
|
*
|
|
242
243
|
* @example
|
|
243
|
-
* await
|
|
244
|
+
* await client.testSuites.deleteTestSuiteTestCase("id", "test_case_id")
|
|
244
245
|
*/
|
|
245
246
|
deleteTestSuiteTestCase(id, testCaseId, requestOptions) {
|
|
246
247
|
var _a;
|
|
@@ -249,8 +250,9 @@ class TestSuites {
|
|
|
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
|
.default, `v1/test-suites/${encodeURIComponent(id)}/test-cases/${encodeURIComponent(testCaseId)}`),
|
|
251
252
|
method: "DELETE",
|
|
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.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
253
254
|
contentType: "application/json",
|
|
255
|
+
requestType: "json",
|
|
254
256
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
255
257
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
256
258
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -10,8 +10,11 @@ export declare namespace WorkflowDeployments {
|
|
|
10
10
|
apiKey: core.Supplier<string>;
|
|
11
11
|
}
|
|
12
12
|
interface RequestOptions {
|
|
13
|
+
/** The maximum time to wait for a response in seconds. */
|
|
13
14
|
timeoutInSeconds?: number;
|
|
15
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
14
16
|
maxRetries?: number;
|
|
17
|
+
/** A hook to abort the request. */
|
|
15
18
|
abortSignal?: AbortSignal;
|
|
16
19
|
}
|
|
17
20
|
}
|
|
@@ -23,7 +26,7 @@ export declare class WorkflowDeployments {
|
|
|
23
26
|
* @param {WorkflowDeployments.RequestOptions} requestOptions - Request-specific configuration.
|
|
24
27
|
*
|
|
25
28
|
* @example
|
|
26
|
-
* await
|
|
29
|
+
* await client.workflowDeployments.list()
|
|
27
30
|
*/
|
|
28
31
|
list(request?: Vellum.WorkflowDeploymentsListRequest, requestOptions?: WorkflowDeployments.RequestOptions): Promise<Vellum.PaginatedSlimWorkflowDeploymentList>;
|
|
29
32
|
/**
|
|
@@ -33,7 +36,7 @@ export declare class WorkflowDeployments {
|
|
|
33
36
|
* @param {WorkflowDeployments.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
37
|
*
|
|
35
38
|
* @example
|
|
36
|
-
* await
|
|
39
|
+
* await client.workflowDeployments.retrieve("id")
|
|
37
40
|
*/
|
|
38
41
|
retrieve(id: string, requestOptions?: WorkflowDeployments.RequestOptions): Promise<Vellum.WorkflowDeploymentRead>;
|
|
39
42
|
/**
|
|
@@ -44,7 +47,7 @@ export declare class WorkflowDeployments {
|
|
|
44
47
|
* @param {WorkflowDeployments.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
48
|
*
|
|
46
49
|
* @example
|
|
47
|
-
* await
|
|
50
|
+
* await client.workflowDeployments.retrieveWorkflowReleaseTag("id", "name")
|
|
48
51
|
*/
|
|
49
52
|
retrieveWorkflowReleaseTag(id: string, name: string, requestOptions?: WorkflowDeployments.RequestOptions): Promise<Vellum.WorkflowReleaseTagRead>;
|
|
50
53
|
/**
|
|
@@ -56,7 +59,7 @@ export declare class WorkflowDeployments {
|
|
|
56
59
|
* @param {WorkflowDeployments.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
60
|
*
|
|
58
61
|
* @example
|
|
59
|
-
* await
|
|
62
|
+
* await client.workflowDeployments.updateWorkflowReleaseTag("id", "name")
|
|
60
63
|
*/
|
|
61
64
|
updateWorkflowReleaseTag(id: string, name: string, request?: Vellum.PatchedWorkflowReleaseTagUpdateRequest, requestOptions?: WorkflowDeployments.RequestOptions): Promise<Vellum.WorkflowReleaseTagRead>;
|
|
62
65
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
@@ -53,7 +53,7 @@ class WorkflowDeployments {
|
|
|
53
53
|
* @param {WorkflowDeployments.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
54
|
*
|
|
55
55
|
* @example
|
|
56
|
-
* await
|
|
56
|
+
* await client.workflowDeployments.list()
|
|
57
57
|
*/
|
|
58
58
|
list(request = {}, requestOptions) {
|
|
59
59
|
var _a;
|
|
@@ -76,15 +76,16 @@ class WorkflowDeployments {
|
|
|
76
76
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
77
77
|
.default, "v1/workflow-deployments"),
|
|
78
78
|
method: "GET",
|
|
79
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
79
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
80
80
|
contentType: "application/json",
|
|
81
81
|
queryParameters: _queryParams,
|
|
82
|
+
requestType: "json",
|
|
82
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
83
84
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
84
85
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
85
86
|
});
|
|
86
87
|
if (_response.ok) {
|
|
87
|
-
return
|
|
88
|
+
return serializers.PaginatedSlimWorkflowDeploymentList.parseOrThrow(_response.body, {
|
|
88
89
|
unrecognizedObjectKeys: "passthrough",
|
|
89
90
|
allowUnrecognizedUnionMembers: true,
|
|
90
91
|
allowUnrecognizedEnumValues: true,
|
|
@@ -119,7 +120,7 @@ class WorkflowDeployments {
|
|
|
119
120
|
* @param {WorkflowDeployments.RequestOptions} requestOptions - Request-specific configuration.
|
|
120
121
|
*
|
|
121
122
|
* @example
|
|
122
|
-
* await
|
|
123
|
+
* await client.workflowDeployments.retrieve("id")
|
|
123
124
|
*/
|
|
124
125
|
retrieve(id, requestOptions) {
|
|
125
126
|
var _a;
|
|
@@ -128,14 +129,15 @@ class WorkflowDeployments {
|
|
|
128
129
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
129
130
|
.default, `v1/workflow-deployments/${encodeURIComponent(id)}`),
|
|
130
131
|
method: "GET",
|
|
131
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
132
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
132
133
|
contentType: "application/json",
|
|
134
|
+
requestType: "json",
|
|
133
135
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
134
136
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
135
137
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
136
138
|
});
|
|
137
139
|
if (_response.ok) {
|
|
138
|
-
return
|
|
140
|
+
return serializers.WorkflowDeploymentRead.parseOrThrow(_response.body, {
|
|
139
141
|
unrecognizedObjectKeys: "passthrough",
|
|
140
142
|
allowUnrecognizedUnionMembers: true,
|
|
141
143
|
allowUnrecognizedEnumValues: true,
|
|
@@ -171,7 +173,7 @@ class WorkflowDeployments {
|
|
|
171
173
|
* @param {WorkflowDeployments.RequestOptions} requestOptions - Request-specific configuration.
|
|
172
174
|
*
|
|
173
175
|
* @example
|
|
174
|
-
* await
|
|
176
|
+
* await client.workflowDeployments.retrieveWorkflowReleaseTag("id", "name")
|
|
175
177
|
*/
|
|
176
178
|
retrieveWorkflowReleaseTag(id, name, requestOptions) {
|
|
177
179
|
var _a;
|
|
@@ -180,14 +182,15 @@ class WorkflowDeployments {
|
|
|
180
182
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
181
183
|
.default, `v1/workflow-deployments/${encodeURIComponent(id)}/release-tags/${encodeURIComponent(name)}`),
|
|
182
184
|
method: "GET",
|
|
183
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
185
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
184
186
|
contentType: "application/json",
|
|
187
|
+
requestType: "json",
|
|
185
188
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
186
189
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
187
190
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
188
191
|
});
|
|
189
192
|
if (_response.ok) {
|
|
190
|
-
return
|
|
193
|
+
return serializers.WorkflowReleaseTagRead.parseOrThrow(_response.body, {
|
|
191
194
|
unrecognizedObjectKeys: "passthrough",
|
|
192
195
|
allowUnrecognizedUnionMembers: true,
|
|
193
196
|
allowUnrecognizedEnumValues: true,
|
|
@@ -224,7 +227,7 @@ class WorkflowDeployments {
|
|
|
224
227
|
* @param {WorkflowDeployments.RequestOptions} requestOptions - Request-specific configuration.
|
|
225
228
|
*
|
|
226
229
|
* @example
|
|
227
|
-
* await
|
|
230
|
+
* await client.workflowDeployments.updateWorkflowReleaseTag("id", "name")
|
|
228
231
|
*/
|
|
229
232
|
updateWorkflowReleaseTag(id, name, request = {}, requestOptions) {
|
|
230
233
|
var _a;
|
|
@@ -233,9 +236,10 @@ class WorkflowDeployments {
|
|
|
233
236
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
234
237
|
.default, `v1/workflow-deployments/${encodeURIComponent(id)}/release-tags/${encodeURIComponent(name)}`),
|
|
235
238
|
method: "PATCH",
|
|
236
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
239
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
237
240
|
contentType: "application/json",
|
|
238
|
-
|
|
241
|
+
requestType: "json",
|
|
242
|
+
body: serializers.PatchedWorkflowReleaseTagUpdateRequest.jsonOrThrow(request, {
|
|
239
243
|
unrecognizedObjectKeys: "strip",
|
|
240
244
|
}),
|
|
241
245
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -243,7 +247,7 @@ class WorkflowDeployments {
|
|
|
243
247
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
244
248
|
});
|
|
245
249
|
if (_response.ok) {
|
|
246
|
-
return
|
|
250
|
+
return serializers.WorkflowReleaseTagRead.parseOrThrow(_response.body, {
|
|
247
251
|
unrecognizedObjectKeys: "passthrough",
|
|
248
252
|
allowUnrecognizedUnionMembers: true,
|
|
249
253
|
allowUnrecognizedEnumValues: true,
|
|
@@ -10,8 +10,11 @@ export declare namespace WorkflowSandboxes {
|
|
|
10
10
|
apiKey: core.Supplier<string>;
|
|
11
11
|
}
|
|
12
12
|
interface RequestOptions {
|
|
13
|
+
/** The maximum time to wait for a response in seconds. */
|
|
13
14
|
timeoutInSeconds?: number;
|
|
15
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
14
16
|
maxRetries?: number;
|
|
17
|
+
/** A hook to abort the request. */
|
|
15
18
|
abortSignal?: AbortSignal;
|
|
16
19
|
}
|
|
17
20
|
}
|
|
@@ -25,7 +28,7 @@ export declare class WorkflowSandboxes {
|
|
|
25
28
|
* @param {WorkflowSandboxes.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
29
|
*
|
|
27
30
|
* @example
|
|
28
|
-
* await
|
|
31
|
+
* await client.workflowSandboxes.deployWorkflow("id", "workflow_id")
|
|
29
32
|
*/
|
|
30
33
|
deployWorkflow(id: string, workflowId: string, request?: Vellum.DeploySandboxWorkflowRequest, requestOptions?: WorkflowSandboxes.RequestOptions): Promise<Vellum.WorkflowDeploymentRead>;
|
|
31
34
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
@@ -55,7 +55,7 @@ class WorkflowSandboxes {
|
|
|
55
55
|
* @param {WorkflowSandboxes.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
|
-
* await
|
|
58
|
+
* await client.workflowSandboxes.deployWorkflow("id", "workflow_id")
|
|
59
59
|
*/
|
|
60
60
|
deployWorkflow(id, workflowId, request = {}, requestOptions) {
|
|
61
61
|
var _a;
|
|
@@ -64,17 +64,16 @@ class WorkflowSandboxes {
|
|
|
64
64
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
65
65
|
.default, `v1/workflow-sandboxes/${encodeURIComponent(id)}/workflows/${encodeURIComponent(workflowId)}/deploy`),
|
|
66
66
|
method: "POST",
|
|
67
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
67
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
68
68
|
contentType: "application/json",
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}),
|
|
69
|
+
requestType: "json",
|
|
70
|
+
body: serializers.DeploySandboxWorkflowRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
72
71
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
73
72
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
74
73
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
75
74
|
});
|
|
76
75
|
if (_response.ok) {
|
|
77
|
-
return
|
|
76
|
+
return serializers.WorkflowDeploymentRead.parseOrThrow(_response.body, {
|
|
78
77
|
unrecognizedObjectKeys: "passthrough",
|
|
79
78
|
allowUnrecognizedUnionMembers: true,
|
|
80
79
|
allowUnrecognizedEnumValues: true,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* - `INITIATED` - INITIATED
|
|
6
|
+
* - `FULFILLED` - FULFILLED
|
|
7
|
+
*/
|
|
8
|
+
export declare type IterationStateEnum = "INITIATED" | "FULFILLED";
|
|
9
|
+
export declare const IterationStateEnum: {
|
|
10
|
+
readonly Initiated: "INITIATED";
|
|
11
|
+
readonly Fulfilled: "FULFILLED";
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.IterationStateEnum = void 0;
|
|
7
|
+
exports.IterationStateEnum = {
|
|
8
|
+
Initiated: "INITIATED",
|
|
9
|
+
Fulfilled: "FULFILLED",
|
|
10
|
+
};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export interface TestSuiteTestCaseRejectedBulkResult {
|
|
8
8
|
/** An ID that maps back to one of the initially supplied operations. Can be used to determine the result of a given operation. */
|
|
9
|
-
id
|
|
9
|
+
id?: string;
|
|
10
10
|
/** Details about the error that occurred */
|
|
11
11
|
data: Record<string, unknown>;
|
|
12
12
|
}
|
|
@@ -118,6 +118,7 @@ export * from "./InitiatedPromptExecutionMeta";
|
|
|
118
118
|
export * from "./InitiatedWorkflowNodeResultEvent";
|
|
119
119
|
export * from "./InstructorVectorizerConfig";
|
|
120
120
|
export * from "./InstructorVectorizerConfigRequest";
|
|
121
|
+
export * from "./IterationStateEnum";
|
|
121
122
|
export * from "./JsonInputRequest";
|
|
122
123
|
export * from "./JsonEnum";
|
|
123
124
|
export * from "./JsonVariableValue";
|
package/dist/api/types/index.js
CHANGED
|
@@ -134,6 +134,7 @@ __exportStar(require("./InitiatedPromptExecutionMeta"), exports);
|
|
|
134
134
|
__exportStar(require("./InitiatedWorkflowNodeResultEvent"), exports);
|
|
135
135
|
__exportStar(require("./InstructorVectorizerConfig"), exports);
|
|
136
136
|
__exportStar(require("./InstructorVectorizerConfigRequest"), exports);
|
|
137
|
+
__exportStar(require("./IterationStateEnum"), exports);
|
|
137
138
|
__exportStar(require("./JsonInputRequest"), exports);
|
|
138
139
|
__exportStar(require("./JsonEnum"), exports);
|
|
139
140
|
__exportStar(require("./JsonVariableValue"), exports);
|
|
@@ -12,6 +12,7 @@ export declare namespace Fetcher {
|
|
|
12
12
|
maxRetries?: number;
|
|
13
13
|
withCredentials?: boolean;
|
|
14
14
|
abortSignal?: AbortSignal;
|
|
15
|
+
requestType?: "json" | "file" | "bytes";
|
|
15
16
|
responseType?: "json" | "blob" | "streaming" | "text";
|
|
16
17
|
}
|
|
17
18
|
type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
|
|
@@ -33,4 +34,5 @@ export declare namespace Fetcher {
|
|
|
33
34
|
errorMessage: string;
|
|
34
35
|
}
|
|
35
36
|
}
|
|
37
|
+
export declare function fetcherImpl<R = unknown>(args: Fetcher.Args): Promise<APIResponse<R, Fetcher.Error>>;
|
|
36
38
|
export declare const fetcher: FetchFunction;
|