vellum-ai 0.6.8 → 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 +21 -7
- package/api/resources/documentIndexes/client/Client.js +77 -26
- 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 +21 -7
- package/dist/api/resources/documentIndexes/client/Client.js +77 -26
- 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 Documents {
|
|
|
56
56
|
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
57
|
*
|
|
58
58
|
* @example
|
|
59
|
-
* await
|
|
59
|
+
* await client.documents.list()
|
|
60
60
|
*/
|
|
61
61
|
list(request = {}, requestOptions) {
|
|
62
62
|
var _a;
|
|
@@ -79,15 +79,16 @@ class Documents {
|
|
|
79
79
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
80
80
|
.default, "v1/documents"),
|
|
81
81
|
method: "GET",
|
|
82
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
82
|
+
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())),
|
|
83
83
|
contentType: "application/json",
|
|
84
84
|
queryParameters: _queryParams,
|
|
85
|
+
requestType: "json",
|
|
85
86
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
86
87
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
87
88
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
88
89
|
});
|
|
89
90
|
if (_response.ok) {
|
|
90
|
-
return
|
|
91
|
+
return serializers.PaginatedSlimDocumentList.parseOrThrow(_response.body, {
|
|
91
92
|
unrecognizedObjectKeys: "passthrough",
|
|
92
93
|
allowUnrecognizedUnionMembers: true,
|
|
93
94
|
allowUnrecognizedEnumValues: true,
|
|
@@ -122,7 +123,7 @@ class Documents {
|
|
|
122
123
|
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
123
124
|
*
|
|
124
125
|
* @example
|
|
125
|
-
* await
|
|
126
|
+
* await client.documents.retrieve("id")
|
|
126
127
|
*/
|
|
127
128
|
retrieve(id, requestOptions) {
|
|
128
129
|
var _a;
|
|
@@ -131,14 +132,15 @@ class Documents {
|
|
|
131
132
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
132
133
|
.default, `v1/documents/${encodeURIComponent(id)}`),
|
|
133
134
|
method: "GET",
|
|
134
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
135
|
+
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())),
|
|
135
136
|
contentType: "application/json",
|
|
137
|
+
requestType: "json",
|
|
136
138
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
137
139
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
138
140
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
139
141
|
});
|
|
140
142
|
if (_response.ok) {
|
|
141
|
-
return
|
|
143
|
+
return serializers.DocumentRead.parseOrThrow(_response.body, {
|
|
142
144
|
unrecognizedObjectKeys: "passthrough",
|
|
143
145
|
allowUnrecognizedUnionMembers: true,
|
|
144
146
|
allowUnrecognizedEnumValues: true,
|
|
@@ -173,7 +175,7 @@ class Documents {
|
|
|
173
175
|
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
174
176
|
*
|
|
175
177
|
* @example
|
|
176
|
-
* await
|
|
178
|
+
* await client.documents.destroy("id")
|
|
177
179
|
*/
|
|
178
180
|
destroy(id, requestOptions) {
|
|
179
181
|
var _a;
|
|
@@ -182,8 +184,9 @@ class Documents {
|
|
|
182
184
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
183
185
|
.default, `v1/documents/${encodeURIComponent(id)}`),
|
|
184
186
|
method: "DELETE",
|
|
185
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
187
|
+
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())),
|
|
186
188
|
contentType: "application/json",
|
|
189
|
+
requestType: "json",
|
|
187
190
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
188
191
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
189
192
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -220,7 +223,7 @@ class Documents {
|
|
|
220
223
|
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
221
224
|
*
|
|
222
225
|
* @example
|
|
223
|
-
* await
|
|
226
|
+
* await client.documents.partialUpdate("id")
|
|
224
227
|
*/
|
|
225
228
|
partialUpdate(id, request = {}, requestOptions) {
|
|
226
229
|
var _a;
|
|
@@ -229,17 +232,16 @@ class Documents {
|
|
|
229
232
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
230
233
|
.default, `v1/documents/${encodeURIComponent(id)}`),
|
|
231
234
|
method: "PATCH",
|
|
232
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
235
|
+
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())),
|
|
233
236
|
contentType: "application/json",
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}),
|
|
237
|
+
requestType: "json",
|
|
238
|
+
body: serializers.PatchedDocumentUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
237
239
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
238
240
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
239
241
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
240
242
|
});
|
|
241
243
|
if (_response.ok) {
|
|
242
|
-
return
|
|
244
|
+
return serializers.DocumentRead.parseOrThrow(_response.body, {
|
|
243
245
|
unrecognizedObjectKeys: "passthrough",
|
|
244
246
|
allowUnrecognizedUnionMembers: true,
|
|
245
247
|
allowUnrecognizedEnumValues: true,
|
|
@@ -280,7 +282,7 @@ class Documents {
|
|
|
280
282
|
* - `keywords: list[str] | None` - Optionally include a list of keywords that'll be associated with this document. Used when performing keyword searches.
|
|
281
283
|
* - `metadata: dict[str, Any]` - A stringified JSON object containing any metadata associated with the document that you'd like to filter upon later.
|
|
282
284
|
*
|
|
283
|
-
* @param {File | fs.ReadStream} contents
|
|
285
|
+
* @param {File | fs.ReadStream | Blob} contents
|
|
284
286
|
* @param {Vellum.UploadDocumentBodyRequest} request
|
|
285
287
|
* @param {Documents.RequestOptions} requestOptions - Request-specific configuration.
|
|
286
288
|
*
|
|
@@ -289,14 +291,14 @@ class Documents {
|
|
|
289
291
|
* @throws {@link Vellum.InternalServerError}
|
|
290
292
|
*
|
|
291
293
|
* @example
|
|
292
|
-
* await
|
|
294
|
+
* await client.documents.upload(fs.createReadStream("/path/to/your/file"), {
|
|
293
295
|
* label: "label"
|
|
294
296
|
* })
|
|
295
297
|
*/
|
|
296
298
|
upload(contents, request, requestOptions) {
|
|
297
299
|
var _a;
|
|
298
300
|
return __awaiter(this, void 0, void 0, function* () {
|
|
299
|
-
const _request =
|
|
301
|
+
const _request = yield core.newFormData();
|
|
300
302
|
if (request.addToIndexNames != null) {
|
|
301
303
|
for (const _item of request.addToIndexNames) {
|
|
302
304
|
yield _request.append("add_to_index_names", _item);
|
|
@@ -306,7 +308,7 @@ class Documents {
|
|
|
306
308
|
yield _request.append("external_id", request.externalId);
|
|
307
309
|
}
|
|
308
310
|
yield _request.append("label", request.label);
|
|
309
|
-
yield _request.
|
|
311
|
+
yield _request.appendFile("contents", contents);
|
|
310
312
|
if (request.keywords != null) {
|
|
311
313
|
for (const _item of request.keywords) {
|
|
312
314
|
yield _request.append("keywords", _item);
|
|
@@ -315,19 +317,20 @@ class Documents {
|
|
|
315
317
|
if (request.metadata != null) {
|
|
316
318
|
yield _request.append("metadata", request.metadata);
|
|
317
319
|
}
|
|
318
|
-
const _maybeEncodedRequest = _request.getRequest();
|
|
320
|
+
const _maybeEncodedRequest = yield _request.getRequest();
|
|
319
321
|
const _response = yield core.fetcher({
|
|
320
322
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
321
323
|
.documents, "v1/upload-document"),
|
|
322
324
|
method: "POST",
|
|
323
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
324
|
-
|
|
325
|
+
headers: Object.assign(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())), (yield _maybeEncodedRequest.headers)),
|
|
326
|
+
requestType: "file",
|
|
327
|
+
body: yield _maybeEncodedRequest.body,
|
|
325
328
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
326
329
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
327
330
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
328
331
|
});
|
|
329
332
|
if (_response.ok) {
|
|
330
|
-
return
|
|
333
|
+
return serializers.UploadDocumentResponse.parseOrThrow(_response.body, {
|
|
331
334
|
unrecognizedObjectKeys: "passthrough",
|
|
332
335
|
allowUnrecognizedUnionMembers: true,
|
|
333
336
|
allowUnrecognizedEnumValues: true,
|
|
@@ -10,8 +10,11 @@ export declare namespace FolderEntities {
|
|
|
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
|
}
|
|
@@ -28,7 +31,7 @@ export declare class FolderEntities {
|
|
|
28
31
|
* @param {FolderEntities.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
32
|
*
|
|
30
33
|
* @example
|
|
31
|
-
* await
|
|
34
|
+
* await client.folderEntities.addEntityToFolder("folder_id", {
|
|
32
35
|
* entityId: "entity_id"
|
|
33
36
|
* })
|
|
34
37
|
*/
|
|
@@ -58,7 +58,7 @@ class FolderEntities {
|
|
|
58
58
|
* @param {FolderEntities.RequestOptions} requestOptions - Request-specific configuration.
|
|
59
59
|
*
|
|
60
60
|
* @example
|
|
61
|
-
* await
|
|
61
|
+
* await client.folderEntities.addEntityToFolder("folder_id", {
|
|
62
62
|
* entityId: "entity_id"
|
|
63
63
|
* })
|
|
64
64
|
*/
|
|
@@ -69,9 +69,10 @@ class FolderEntities {
|
|
|
69
69
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
70
70
|
.default, `v1/folders/${encodeURIComponent(folderId)}/add-entity`),
|
|
71
71
|
method: "POST",
|
|
72
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
72
|
+
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())),
|
|
73
73
|
contentType: "application/json",
|
|
74
|
-
|
|
74
|
+
requestType: "json",
|
|
75
|
+
body: serializers.AddEntityToFolderRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
75
76
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
76
77
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
77
78
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -10,8 +10,11 @@ export declare namespace Sandboxes {
|
|
|
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 Sandboxes {
|
|
|
25
28
|
* @param {Sandboxes.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
29
|
*
|
|
27
30
|
* @example
|
|
28
|
-
* await
|
|
31
|
+
* await client.sandboxes.deployPrompt("id", "prompt_id")
|
|
29
32
|
*/
|
|
30
33
|
deployPrompt(id: string, promptId: string, request?: Vellum.DeploySandboxPromptRequest, requestOptions?: Sandboxes.RequestOptions): Promise<Vellum.DeploymentRead>;
|
|
31
34
|
/**
|
|
@@ -42,13 +45,13 @@ export declare class Sandboxes {
|
|
|
42
45
|
* @param {Sandboxes.RequestOptions} requestOptions - Request-specific configuration.
|
|
43
46
|
*
|
|
44
47
|
* @example
|
|
45
|
-
* await
|
|
48
|
+
* await client.sandboxes.upsertSandboxScenario("id", {
|
|
46
49
|
* label: "Scenario 1",
|
|
47
50
|
* inputs: []
|
|
48
51
|
* })
|
|
49
52
|
*
|
|
50
53
|
* @example
|
|
51
|
-
* await
|
|
54
|
+
* await client.sandboxes.upsertSandboxScenario("id", {
|
|
52
55
|
* label: "Scenario 2",
|
|
53
56
|
* inputs: []
|
|
54
57
|
* })
|
|
@@ -62,7 +65,7 @@ export declare class Sandboxes {
|
|
|
62
65
|
* @param {Sandboxes.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
66
|
*
|
|
64
67
|
* @example
|
|
65
|
-
* await
|
|
68
|
+
* await client.sandboxes.deleteSandboxScenario("id", "scenario_id")
|
|
66
69
|
*/
|
|
67
70
|
deleteSandboxScenario(id: string, scenarioId: string, requestOptions?: Sandboxes.RequestOptions): Promise<void>;
|
|
68
71
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
@@ -55,7 +55,7 @@ class Sandboxes {
|
|
|
55
55
|
* @param {Sandboxes.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
|
-
* await
|
|
58
|
+
* await client.sandboxes.deployPrompt("id", "prompt_id")
|
|
59
59
|
*/
|
|
60
60
|
deployPrompt(id, promptId, request = {}, requestOptions) {
|
|
61
61
|
var _a;
|
|
@@ -64,17 +64,16 @@ class Sandboxes {
|
|
|
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/sandboxes/${encodeURIComponent(id)}/prompts/${encodeURIComponent(promptId)}/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.DeploySandboxPromptRequest.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.DeploymentRead.parseOrThrow(_response.body, {
|
|
78
77
|
unrecognizedObjectKeys: "passthrough",
|
|
79
78
|
allowUnrecognizedUnionMembers: true,
|
|
80
79
|
allowUnrecognizedEnumValues: true,
|
|
@@ -116,13 +115,13 @@ class Sandboxes {
|
|
|
116
115
|
* @param {Sandboxes.RequestOptions} requestOptions - Request-specific configuration.
|
|
117
116
|
*
|
|
118
117
|
* @example
|
|
119
|
-
* await
|
|
118
|
+
* await client.sandboxes.upsertSandboxScenario("id", {
|
|
120
119
|
* label: "Scenario 1",
|
|
121
120
|
* inputs: []
|
|
122
121
|
* })
|
|
123
122
|
*
|
|
124
123
|
* @example
|
|
125
|
-
* await
|
|
124
|
+
* await client.sandboxes.upsertSandboxScenario("id", {
|
|
126
125
|
* label: "Scenario 2",
|
|
127
126
|
* inputs: []
|
|
128
127
|
* })
|
|
@@ -134,9 +133,10 @@ class Sandboxes {
|
|
|
134
133
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
135
134
|
.default, `v1/sandboxes/${encodeURIComponent(id)}/scenarios`),
|
|
136
135
|
method: "POST",
|
|
137
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
136
|
+
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())),
|
|
138
137
|
contentType: "application/json",
|
|
139
|
-
|
|
138
|
+
requestType: "json",
|
|
139
|
+
body: serializers.UpsertSandboxScenarioRequestRequest.jsonOrThrow(request, {
|
|
140
140
|
unrecognizedObjectKeys: "strip",
|
|
141
141
|
}),
|
|
142
142
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -144,7 +144,7 @@ class Sandboxes {
|
|
|
144
144
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
145
145
|
});
|
|
146
146
|
if (_response.ok) {
|
|
147
|
-
return
|
|
147
|
+
return serializers.SandboxScenario.parseOrThrow(_response.body, {
|
|
148
148
|
unrecognizedObjectKeys: "passthrough",
|
|
149
149
|
allowUnrecognizedUnionMembers: true,
|
|
150
150
|
allowUnrecognizedEnumValues: true,
|
|
@@ -180,7 +180,7 @@ class Sandboxes {
|
|
|
180
180
|
* @param {Sandboxes.RequestOptions} requestOptions - Request-specific configuration.
|
|
181
181
|
*
|
|
182
182
|
* @example
|
|
183
|
-
* await
|
|
183
|
+
* await client.sandboxes.deleteSandboxScenario("id", "scenario_id")
|
|
184
184
|
*/
|
|
185
185
|
deleteSandboxScenario(id, scenarioId, requestOptions) {
|
|
186
186
|
var _a;
|
|
@@ -189,8 +189,9 @@ class Sandboxes {
|
|
|
189
189
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
190
190
|
.default, `v1/sandboxes/${encodeURIComponent(id)}/scenarios/${encodeURIComponent(scenarioId)}`),
|
|
191
191
|
method: "DELETE",
|
|
192
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
192
|
+
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())),
|
|
193
193
|
contentType: "application/json",
|
|
194
|
+
requestType: "json",
|
|
194
195
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
195
196
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
196
197
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -10,8 +10,11 @@ export declare namespace TestSuiteRuns {
|
|
|
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 TestSuiteRuns {
|
|
|
25
28
|
* @param {TestSuiteRuns.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
29
|
*
|
|
27
30
|
* @example
|
|
28
|
-
* await
|
|
31
|
+
* await client.testSuiteRuns.create({
|
|
29
32
|
* testSuiteId: "string",
|
|
30
33
|
* execConfig: {
|
|
31
34
|
* type: "DEPLOYMENT_RELEASE_TAG",
|
|
@@ -45,7 +48,7 @@ export declare class TestSuiteRuns {
|
|
|
45
48
|
* @param {TestSuiteRuns.RequestOptions} requestOptions - Request-specific configuration.
|
|
46
49
|
*
|
|
47
50
|
* @example
|
|
48
|
-
* await
|
|
51
|
+
* await client.testSuiteRuns.retrieve("id")
|
|
49
52
|
*/
|
|
50
53
|
retrieve(id: string, requestOptions?: TestSuiteRuns.RequestOptions): Promise<Vellum.TestSuiteRunRead>;
|
|
51
54
|
/**
|
|
@@ -54,7 +57,7 @@ export declare class TestSuiteRuns {
|
|
|
54
57
|
* @param {TestSuiteRuns.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
58
|
*
|
|
56
59
|
* @example
|
|
57
|
-
* await
|
|
60
|
+
* await client.testSuiteRuns.listExecutions("id")
|
|
58
61
|
*/
|
|
59
62
|
listExecutions(id: string, request?: Vellum.TestSuiteRunsListExecutionsRequest, requestOptions?: TestSuiteRuns.RequestOptions): Promise<Vellum.PaginatedTestSuiteRunExecutionList>;
|
|
60
63
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
@@ -55,7 +55,7 @@ class TestSuiteRuns {
|
|
|
55
55
|
* @param {TestSuiteRuns.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
|
-
* await
|
|
58
|
+
* await client.testSuiteRuns.create({
|
|
59
59
|
* testSuiteId: "string",
|
|
60
60
|
* execConfig: {
|
|
61
61
|
* type: "DEPLOYMENT_RELEASE_TAG",
|
|
@@ -74,15 +74,16 @@ class TestSuiteRuns {
|
|
|
74
74
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
75
75
|
.default, "v1/test-suite-runs"),
|
|
76
76
|
method: "POST",
|
|
77
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
77
|
+
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())),
|
|
78
78
|
contentType: "application/json",
|
|
79
|
-
|
|
79
|
+
requestType: "json",
|
|
80
|
+
body: serializers.TestSuiteRunCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
80
81
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
81
82
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
82
83
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
83
84
|
});
|
|
84
85
|
if (_response.ok) {
|
|
85
|
-
return
|
|
86
|
+
return serializers.TestSuiteRunRead.parseOrThrow(_response.body, {
|
|
86
87
|
unrecognizedObjectKeys: "passthrough",
|
|
87
88
|
allowUnrecognizedUnionMembers: true,
|
|
88
89
|
allowUnrecognizedEnumValues: true,
|
|
@@ -117,7 +118,7 @@ class TestSuiteRuns {
|
|
|
117
118
|
* @param {TestSuiteRuns.RequestOptions} requestOptions - Request-specific configuration.
|
|
118
119
|
*
|
|
119
120
|
* @example
|
|
120
|
-
* await
|
|
121
|
+
* await client.testSuiteRuns.retrieve("id")
|
|
121
122
|
*/
|
|
122
123
|
retrieve(id, requestOptions) {
|
|
123
124
|
var _a;
|
|
@@ -126,14 +127,15 @@ class TestSuiteRuns {
|
|
|
126
127
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
127
128
|
.default, `v1/test-suite-runs/${encodeURIComponent(id)}`),
|
|
128
129
|
method: "GET",
|
|
129
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
130
|
+
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())),
|
|
130
131
|
contentType: "application/json",
|
|
132
|
+
requestType: "json",
|
|
131
133
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
132
134
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
133
135
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
134
136
|
});
|
|
135
137
|
if (_response.ok) {
|
|
136
|
-
return
|
|
138
|
+
return serializers.TestSuiteRunRead.parseOrThrow(_response.body, {
|
|
137
139
|
unrecognizedObjectKeys: "passthrough",
|
|
138
140
|
allowUnrecognizedUnionMembers: true,
|
|
139
141
|
allowUnrecognizedEnumValues: true,
|
|
@@ -167,7 +169,7 @@ class TestSuiteRuns {
|
|
|
167
169
|
* @param {TestSuiteRuns.RequestOptions} requestOptions - Request-specific configuration.
|
|
168
170
|
*
|
|
169
171
|
* @example
|
|
170
|
-
* await
|
|
172
|
+
* await client.testSuiteRuns.listExecutions("id")
|
|
171
173
|
*/
|
|
172
174
|
listExecutions(id, request = {}, requestOptions) {
|
|
173
175
|
var _a;
|
|
@@ -192,15 +194,16 @@ class TestSuiteRuns {
|
|
|
192
194
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
193
195
|
.default, `v1/test-suite-runs/${encodeURIComponent(id)}/executions`),
|
|
194
196
|
method: "GET",
|
|
195
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.6.
|
|
197
|
+
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())),
|
|
196
198
|
contentType: "application/json",
|
|
197
199
|
queryParameters: _queryParams,
|
|
200
|
+
requestType: "json",
|
|
198
201
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
199
202
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
200
203
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
201
204
|
});
|
|
202
205
|
if (_response.ok) {
|
|
203
|
-
return
|
|
206
|
+
return serializers.PaginatedTestSuiteRunExecutionList.parseOrThrow(_response.body, {
|
|
204
207
|
unrecognizedObjectKeys: "passthrough",
|
|
205
208
|
allowUnrecognizedUnionMembers: true,
|
|
206
209
|
allowUnrecognizedEnumValues: true,
|
|
@@ -10,8 +10,11 @@ export declare namespace TestSuites {
|
|
|
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
|
}
|
|
@@ -26,7 +29,7 @@ export declare class TestSuites {
|
|
|
26
29
|
* @param {TestSuites.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
30
|
*
|
|
28
31
|
* @example
|
|
29
|
-
* await
|
|
32
|
+
* await client.testSuites.listTestSuiteTestCases("id")
|
|
30
33
|
*/
|
|
31
34
|
listTestSuiteTestCases(id: string, request?: Vellum.ListTestSuiteTestCasesRequest, requestOptions?: TestSuites.RequestOptions): Promise<Vellum.PaginatedTestSuiteTestCaseList>;
|
|
32
35
|
/**
|
|
@@ -43,7 +46,7 @@ export declare class TestSuites {
|
|
|
43
46
|
* @param {TestSuites.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
47
|
*
|
|
45
48
|
* @example
|
|
46
|
-
* await
|
|
49
|
+
* await client.testSuites.upsertTestSuiteTestCase("id", {
|
|
47
50
|
* inputValues: [],
|
|
48
51
|
* evaluationValues: []
|
|
49
52
|
* })
|
|
@@ -61,7 +64,7 @@ export declare class TestSuites {
|
|
|
61
64
|
* @param {TestSuites.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
65
|
*
|
|
63
66
|
* @example
|
|
64
|
-
* await
|
|
67
|
+
* await client.testSuites.deleteTestSuiteTestCase("id", "test_case_id")
|
|
65
68
|
*/
|
|
66
69
|
deleteTestSuiteTestCase(id: string, testCaseId: string, requestOptions?: TestSuites.RequestOptions): Promise<void>;
|
|
67
70
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
@@ -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,
|