vellum-ai 0.8.18 → 0.8.21
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 +2 -2
- package/Client.js +12 -12
- package/api/client/requests/CodeExecutorRequest.d.ts +2 -2
- package/api/client/requests/ExecuteWorkflowStreamRequest.d.ts +1 -1
- package/api/client/requests/GenerateStreamBodyRequest.d.ts +2 -2
- package/api/resources/adHoc/client/Client.js +1 -1
- package/api/resources/adHoc/client/requests/AdHocExecutePromptStreamRequest.d.ts +3 -3
- package/api/resources/deployments/client/Client.js +5 -5
- package/api/resources/documentIndexes/client/Client.js +8 -8
- package/api/resources/documents/client/Client.js +5 -5
- package/api/resources/folderEntities/client/Client.js +1 -1
- package/api/resources/metricDefinitions/client/Client.js +1 -1
- package/api/resources/sandboxes/client/Client.d.ts +2 -2
- package/api/resources/sandboxes/client/Client.js +5 -5
- package/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequest.d.ts +2 -2
- package/api/resources/testSuiteRuns/client/Client.js +3 -3
- package/api/resources/testSuites/client/Client.js +4 -4
- package/api/resources/workflowDeployments/client/Client.js +4 -4
- package/api/resources/workflowSandboxes/client/Client.js +1 -1
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +1 -2
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +4 -2
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +4 -2
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +1 -1
- package/core/form-data-utils/FormDataWrapper.d.ts +2 -2
- package/core/form-data-utils/FormDataWrapper.js +7 -7
- package/core/schemas/Schema.d.ts +1 -0
- package/core/schemas/Schema.js +1 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +50 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +5 -0
- package/core/schemas/builders/index.d.ts +1 -0
- package/core/schemas/builders/index.js +1 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/dist/Client.d.ts +2 -2
- package/dist/Client.js +12 -12
- package/dist/api/client/requests/CodeExecutorRequest.d.ts +2 -2
- package/dist/api/client/requests/ExecuteWorkflowStreamRequest.d.ts +1 -1
- package/dist/api/client/requests/GenerateStreamBodyRequest.d.ts +2 -2
- package/dist/api/resources/adHoc/client/Client.js +1 -1
- package/dist/api/resources/adHoc/client/requests/AdHocExecutePromptStreamRequest.d.ts +3 -3
- package/dist/api/resources/deployments/client/Client.js +5 -5
- package/dist/api/resources/documentIndexes/client/Client.js +8 -8
- package/dist/api/resources/documents/client/Client.js +5 -5
- package/dist/api/resources/folderEntities/client/Client.js +1 -1
- package/dist/api/resources/metricDefinitions/client/Client.js +1 -1
- package/dist/api/resources/sandboxes/client/Client.d.ts +2 -2
- package/dist/api/resources/sandboxes/client/Client.js +5 -5
- package/dist/api/resources/sandboxes/client/requests/UpsertSandboxScenarioRequest.d.ts +2 -2
- package/dist/api/resources/testSuiteRuns/client/Client.js +3 -3
- package/dist/api/resources/testSuites/client/Client.js +4 -4
- package/dist/api/resources/workflowDeployments/client/Client.js +4 -4
- package/dist/api/resources/workflowSandboxes/client/Client.js +1 -1
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +1 -2
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +4 -2
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +4 -2
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +1 -1
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +2 -2
- package/dist/core/form-data-utils/FormDataWrapper.js +7 -7
- package/dist/core/schemas/Schema.d.ts +1 -0
- package/dist/core/schemas/Schema.js +1 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +50 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +5 -0
- package/dist/core/schemas/builders/index.d.ts +1 -0
- package/dist/core/schemas/builders/index.js +1 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/package.json +5 -1
- package/reference.md +3 -3
- package/version.d.ts +1 -0
- package/version.js +4 -0
|
@@ -81,7 +81,7 @@ class DocumentIndexes {
|
|
|
81
81
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
82
82
|
.default, "v1/document-indexes"),
|
|
83
83
|
method: "GET",
|
|
84
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
84
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
85
85
|
contentType: "application/json",
|
|
86
86
|
queryParameters: _queryParams,
|
|
87
87
|
requestType: "json",
|
|
@@ -196,7 +196,7 @@ class DocumentIndexes {
|
|
|
196
196
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
197
197
|
.default, "v1/document-indexes"),
|
|
198
198
|
method: "POST",
|
|
199
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
199
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
200
200
|
contentType: "application/json",
|
|
201
201
|
requestType: "json",
|
|
202
202
|
body: serializers.DocumentIndexCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -249,7 +249,7 @@ class DocumentIndexes {
|
|
|
249
249
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
250
250
|
.default, `v1/document-indexes/${encodeURIComponent(id)}`),
|
|
251
251
|
method: "GET",
|
|
252
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
252
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
253
253
|
contentType: "application/json",
|
|
254
254
|
requestType: "json",
|
|
255
255
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -304,7 +304,7 @@ class DocumentIndexes {
|
|
|
304
304
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
305
305
|
.default, `v1/document-indexes/${encodeURIComponent(id)}`),
|
|
306
306
|
method: "PUT",
|
|
307
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
307
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
308
308
|
contentType: "application/json",
|
|
309
309
|
requestType: "json",
|
|
310
310
|
body: serializers.DocumentIndexUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -357,7 +357,7 @@ class DocumentIndexes {
|
|
|
357
357
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
358
358
|
.documents, `v1/document-indexes/${encodeURIComponent(id)}`),
|
|
359
359
|
method: "DELETE",
|
|
360
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
360
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
361
361
|
contentType: "application/json",
|
|
362
362
|
requestType: "json",
|
|
363
363
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -405,7 +405,7 @@ class DocumentIndexes {
|
|
|
405
405
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
406
406
|
.default, `v1/document-indexes/${encodeURIComponent(id)}`),
|
|
407
407
|
method: "PATCH",
|
|
408
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
408
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
409
409
|
contentType: "application/json",
|
|
410
410
|
requestType: "json",
|
|
411
411
|
body: serializers.PatchedDocumentIndexUpdateRequest.jsonOrThrow(request, {
|
|
@@ -461,7 +461,7 @@ class DocumentIndexes {
|
|
|
461
461
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
462
462
|
.default, `v1/document-indexes/${encodeURIComponent(id)}/documents/${encodeURIComponent(documentId)}`),
|
|
463
463
|
method: "POST",
|
|
464
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
464
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
465
465
|
contentType: "application/json",
|
|
466
466
|
requestType: "json",
|
|
467
467
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -509,7 +509,7 @@ class DocumentIndexes {
|
|
|
509
509
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
510
510
|
.documents, `v1/document-indexes/${encodeURIComponent(id)}/documents/${encodeURIComponent(documentId)}`),
|
|
511
511
|
method: "DELETE",
|
|
512
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
512
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
513
513
|
contentType: "application/json",
|
|
514
514
|
requestType: "json",
|
|
515
515
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -79,7 +79,7 @@ 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.8.
|
|
82
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "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
85
|
requestType: "json",
|
|
@@ -132,7 +132,7 @@ class Documents {
|
|
|
132
132
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
133
133
|
.default, `v1/documents/${encodeURIComponent(id)}`),
|
|
134
134
|
method: "GET",
|
|
135
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
135
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
136
136
|
contentType: "application/json",
|
|
137
137
|
requestType: "json",
|
|
138
138
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -184,7 +184,7 @@ class Documents {
|
|
|
184
184
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
185
185
|
.documents, `v1/documents/${encodeURIComponent(id)}`),
|
|
186
186
|
method: "DELETE",
|
|
187
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
187
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
188
188
|
contentType: "application/json",
|
|
189
189
|
requestType: "json",
|
|
190
190
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -232,7 +232,7 @@ class Documents {
|
|
|
232
232
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
233
233
|
.default, `v1/documents/${encodeURIComponent(id)}`),
|
|
234
234
|
method: "PATCH",
|
|
235
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
235
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
236
236
|
contentType: "application/json",
|
|
237
237
|
requestType: "json",
|
|
238
238
|
body: serializers.PatchedDocumentUpdateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -322,7 +322,7 @@ class Documents {
|
|
|
322
322
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
323
323
|
.documents, "v1/upload-document"),
|
|
324
324
|
method: "POST",
|
|
325
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
325
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers),
|
|
326
326
|
requestType: "file",
|
|
327
327
|
duplex: _maybeEncodedRequest.duplex,
|
|
328
328
|
body: _maybeEncodedRequest.body,
|
|
@@ -69,7 +69,7 @@ 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.8.
|
|
72
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "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
75
|
body: serializers.AddEntityToFolderRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -71,7 +71,7 @@ class MetricDefinitions {
|
|
|
71
71
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
72
72
|
.default, `v1/metric-definitions/${encodeURIComponent(id)}/execute`),
|
|
73
73
|
method: "POST",
|
|
74
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
74
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
75
75
|
contentType: "application/json",
|
|
76
76
|
requestType: "json",
|
|
77
77
|
body: serializers.ExecuteMetricDefinitionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -65,10 +65,10 @@ export declare class Sandboxes {
|
|
|
65
65
|
* type: "CHAT_HISTORY",
|
|
66
66
|
* value: [{
|
|
67
67
|
* text: "What's your favorite color?",
|
|
68
|
-
* role:
|
|
68
|
+
* role: "USER"
|
|
69
69
|
* }, {
|
|
70
70
|
* text: "AI's don't have a favorite color.... Yet.",
|
|
71
|
-
* role:
|
|
71
|
+
* role: "ASSISTANT"
|
|
72
72
|
* }],
|
|
73
73
|
* name: "chat_history"
|
|
74
74
|
* }]
|
|
@@ -64,7 +64,7 @@ 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(promptVariantId)}/deploy`),
|
|
66
66
|
method: "POST",
|
|
67
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
67
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
68
68
|
contentType: "application/json",
|
|
69
69
|
requestType: "json",
|
|
70
70
|
body: serializers.DeploySandboxPromptRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -135,10 +135,10 @@ class Sandboxes {
|
|
|
135
135
|
* type: "CHAT_HISTORY",
|
|
136
136
|
* value: [{
|
|
137
137
|
* text: "What's your favorite color?",
|
|
138
|
-
* role:
|
|
138
|
+
* role: "USER"
|
|
139
139
|
* }, {
|
|
140
140
|
* text: "AI's don't have a favorite color.... Yet.",
|
|
141
|
-
* role:
|
|
141
|
+
* role: "ASSISTANT"
|
|
142
142
|
* }],
|
|
143
143
|
* name: "chat_history"
|
|
144
144
|
* }]
|
|
@@ -151,7 +151,7 @@ class Sandboxes {
|
|
|
151
151
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
152
152
|
.default, `v1/sandboxes/${encodeURIComponent(id)}/scenarios`),
|
|
153
153
|
method: "POST",
|
|
154
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
154
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
155
155
|
contentType: "application/json",
|
|
156
156
|
requestType: "json",
|
|
157
157
|
body: serializers.UpsertSandboxScenarioRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -205,7 +205,7 @@ class Sandboxes {
|
|
|
205
205
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
206
206
|
.default, `v1/sandboxes/${encodeURIComponent(id)}/scenarios/${encodeURIComponent(scenarioId)}`),
|
|
207
207
|
method: "DELETE",
|
|
208
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
208
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
209
209
|
contentType: "application/json",
|
|
210
210
|
requestType: "json",
|
|
211
211
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -24,10 +24,10 @@ import * as Vellum from "../../../../index";
|
|
|
24
24
|
* type: "CHAT_HISTORY",
|
|
25
25
|
* value: [{
|
|
26
26
|
* text: "What's your favorite color?",
|
|
27
|
-
* role:
|
|
27
|
+
* role: "USER"
|
|
28
28
|
* }, {
|
|
29
29
|
* text: "AI's don't have a favorite color.... Yet.",
|
|
30
|
-
* role:
|
|
30
|
+
* role: "ASSISTANT"
|
|
31
31
|
* }],
|
|
32
32
|
* name: "chat_history"
|
|
33
33
|
* }]
|
|
@@ -72,7 +72,7 @@ class TestSuiteRuns {
|
|
|
72
72
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
73
73
|
.default, "v1/test-suite-runs"),
|
|
74
74
|
method: "POST",
|
|
75
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
75
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
76
76
|
contentType: "application/json",
|
|
77
77
|
requestType: "json",
|
|
78
78
|
body: serializers.TestSuiteRunCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -125,7 +125,7 @@ class TestSuiteRuns {
|
|
|
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/test-suite-runs/${encodeURIComponent(id)}`),
|
|
127
127
|
method: "GET",
|
|
128
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
128
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
129
129
|
contentType: "application/json",
|
|
130
130
|
requestType: "json",
|
|
131
131
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -192,7 +192,7 @@ class TestSuiteRuns {
|
|
|
192
192
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
193
193
|
.default, `v1/test-suite-runs/${encodeURIComponent(id)}/executions`),
|
|
194
194
|
method: "GET",
|
|
195
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
195
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
196
196
|
contentType: "application/json",
|
|
197
197
|
queryParameters: _queryParams,
|
|
198
198
|
requestType: "json",
|
|
@@ -73,7 +73,7 @@ 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.8.
|
|
76
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "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
79
|
requestType: "json",
|
|
@@ -142,7 +142,7 @@ class TestSuites {
|
|
|
142
142
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
143
143
|
.default, `v1/test-suites/${encodeURIComponent(id)}/test-cases`),
|
|
144
144
|
method: "POST",
|
|
145
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
145
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
146
146
|
contentType: "application/json",
|
|
147
147
|
requestType: "json",
|
|
148
148
|
body: serializers.UpsertTestSuiteTestCaseRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -189,7 +189,7 @@ class TestSuites {
|
|
|
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/test-suites/${encodeURIComponent(id)}/test-cases-bulk`),
|
|
191
191
|
method: "POST",
|
|
192
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
192
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
193
193
|
contentType: "application/json",
|
|
194
194
|
requestType: "json",
|
|
195
195
|
body: serializers.testSuites.testSuiteTestCasesBulk.Request.jsonOrThrow(request, {
|
|
@@ -256,7 +256,7 @@ class TestSuites {
|
|
|
256
256
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
257
257
|
.default, `v1/test-suites/${encodeURIComponent(id)}/test-cases/${encodeURIComponent(testCaseId)}`),
|
|
258
258
|
method: "DELETE",
|
|
259
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
259
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
260
260
|
contentType: "application/json",
|
|
261
261
|
requestType: "json",
|
|
262
262
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -78,7 +78,7 @@ class WorkflowDeployments {
|
|
|
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/workflow-deployments"),
|
|
80
80
|
method: "GET",
|
|
81
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
81
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "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
|
requestType: "json",
|
|
@@ -131,7 +131,7 @@ class WorkflowDeployments {
|
|
|
131
131
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
132
132
|
.default, `v1/workflow-deployments/${encodeURIComponent(id)}`),
|
|
133
133
|
method: "GET",
|
|
134
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
134
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
135
135
|
contentType: "application/json",
|
|
136
136
|
requestType: "json",
|
|
137
137
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -184,7 +184,7 @@ class WorkflowDeployments {
|
|
|
184
184
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
185
185
|
.default, `v1/workflow-deployments/${encodeURIComponent(id)}/release-tags/${encodeURIComponent(name)}`),
|
|
186
186
|
method: "GET",
|
|
187
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
187
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
188
188
|
contentType: "application/json",
|
|
189
189
|
requestType: "json",
|
|
190
190
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
|
|
@@ -238,7 +238,7 @@ class WorkflowDeployments {
|
|
|
238
238
|
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.VellumEnvironment.Production)
|
|
239
239
|
.default, `v1/workflow-deployments/${encodeURIComponent(id)}/release-tags/${encodeURIComponent(name)}`),
|
|
240
240
|
method: "PATCH",
|
|
241
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.
|
|
241
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
242
242
|
contentType: "application/json",
|
|
243
243
|
requestType: "json",
|
|
244
244
|
body: serializers.PatchedWorkflowReleaseTagUpdateRequest.jsonOrThrow(request, {
|
|
@@ -64,7 +64,7 @@ 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.8.
|
|
67
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "vellum-ai", "X-Fern-SDK-Version": "0.8.21", "User-Agent": "vellum-ai/0.8.21", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
68
68
|
contentType: "application/json",
|
|
69
69
|
requestType: "json",
|
|
70
70
|
body: serializers.DeploySandboxWorkflowRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import type { Writable } from "stream";
|
|
1
|
+
import type { Writable } from "readable-stream";
|
|
3
2
|
import { EventCallback, StreamWrapper } from "./chooseStreamWrapper";
|
|
4
3
|
export declare class Node18UniversalStreamWrapper<ReadFormat extends Uint8Array | Uint16Array | Uint32Array> implements StreamWrapper<Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>, ReadFormat> {
|
|
5
4
|
private readableStream;
|
|
@@ -165,10 +165,12 @@ class Node18UniversalStreamWrapper {
|
|
|
165
165
|
const chunks = [];
|
|
166
166
|
while (true) {
|
|
167
167
|
const { done, value } = yield this.reader.read();
|
|
168
|
-
if (done)
|
|
168
|
+
if (done) {
|
|
169
169
|
break;
|
|
170
|
-
|
|
170
|
+
}
|
|
171
|
+
if (value) {
|
|
171
172
|
chunks.push(value);
|
|
173
|
+
}
|
|
172
174
|
}
|
|
173
175
|
const decoder = new TextDecoder(this.encoding || "utf-8");
|
|
174
176
|
return decoder.decode(yield new Blob(chunks).arrayBuffer());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import type { Readable, Writable } from "stream";
|
|
2
|
+
import type { Readable, Writable } from "readable-stream";
|
|
3
3
|
import { EventCallback, StreamWrapper } from "./chooseStreamWrapper";
|
|
4
4
|
export declare class NodePre18StreamWrapper implements StreamWrapper<Writable, Buffer> {
|
|
5
5
|
private readableStream;
|
|
@@ -12,7 +12,7 @@ export declare class UndiciStreamWrapper<ReadFormat extends Uint8Array | Uint16A
|
|
|
12
12
|
off(event: string, callback: EventCallback): void;
|
|
13
13
|
pipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>): UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>;
|
|
14
14
|
pipeTo(dest: UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>): UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>;
|
|
15
|
-
unpipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream
|
|
15
|
+
unpipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream): void;
|
|
16
16
|
destroy(error?: Error): void;
|
|
17
17
|
pause(): void;
|
|
18
18
|
resume(): void;
|
|
@@ -147,10 +147,12 @@ class UndiciStreamWrapper {
|
|
|
147
147
|
const chunks = [];
|
|
148
148
|
while (true) {
|
|
149
149
|
const { done, value } = yield this.reader.read();
|
|
150
|
-
if (done)
|
|
150
|
+
if (done) {
|
|
151
151
|
break;
|
|
152
|
-
|
|
152
|
+
}
|
|
153
|
+
if (value) {
|
|
153
154
|
chunks.push(value);
|
|
155
|
+
}
|
|
154
156
|
}
|
|
155
157
|
const decoder = new TextDecoder(this.encoding || "utf-8");
|
|
156
158
|
return decoder.decode(yield new Blob(chunks).arrayBuffer());
|
|
@@ -39,7 +39,7 @@ function chooseStreamWrapper(responseBody) {
|
|
|
39
39
|
if (runtime_1.RUNTIME.type === "node" && runtime_1.RUNTIME.parsedVersion != null && runtime_1.RUNTIME.parsedVersion >= 18) {
|
|
40
40
|
return new (yield Promise.resolve().then(() => __importStar(require("./Node18UniversalStreamWrapper")))).Node18UniversalStreamWrapper(responseBody);
|
|
41
41
|
}
|
|
42
|
-
else if (runtime_1.RUNTIME.type !== "node" && typeof fetch
|
|
42
|
+
else if (runtime_1.RUNTIME.type !== "node" && typeof fetch === "function") {
|
|
43
43
|
return new (yield Promise.resolve().then(() => __importStar(require("./UndiciStreamWrapper")))).UndiciStreamWrapper(responseBody);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare type MaybePromise<T> = Promise<T> | T;
|
|
2
|
-
|
|
2
|
+
interface FormDataRequest<Body> {
|
|
3
3
|
body: Body;
|
|
4
4
|
headers: Record<string, string>;
|
|
5
5
|
duplex?: "half";
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
export interface CrossPlatformFormData {
|
|
8
8
|
setup(): Promise<void>;
|
|
9
9
|
append(key: string, value: unknown): void;
|
|
@@ -73,8 +73,11 @@ class Node18FormData {
|
|
|
73
73
|
if (fileName == null && isNamedValue(value)) {
|
|
74
74
|
fileName = value.name;
|
|
75
75
|
}
|
|
76
|
-
if (value instanceof
|
|
77
|
-
(_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key,
|
|
76
|
+
if (value instanceof Blob) {
|
|
77
|
+
(_a = this.fd) === null || _a === void 0 ? void 0 : _a.append(key, value, fileName);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
(_b = this.fd) === null || _b === void 0 ? void 0 : _b.append(key, {
|
|
78
81
|
type: undefined,
|
|
79
82
|
name: fileName,
|
|
80
83
|
[Symbol.toStringTag]: "File",
|
|
@@ -83,16 +86,13 @@ class Node18FormData {
|
|
|
83
86
|
},
|
|
84
87
|
});
|
|
85
88
|
}
|
|
86
|
-
else {
|
|
87
|
-
(_b = this.fd) === null || _b === void 0 ? void 0 : _b.append(key, value, fileName);
|
|
88
|
-
}
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
getRequest() {
|
|
92
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
93
93
|
const encoder = new (yield Promise.resolve().then(() => __importStar(require("form-data-encoder")))).FormDataEncoder(this.fd);
|
|
94
94
|
return {
|
|
95
|
-
body:
|
|
95
|
+
body: (yield Promise.resolve().then(() => __importStar(require("readable-stream")))).Readable.from(encoder),
|
|
96
96
|
headers: encoder.headers,
|
|
97
97
|
duplex: "half",
|
|
98
98
|
};
|
|
@@ -120,7 +120,7 @@ class Node16FormData {
|
|
|
120
120
|
fileName = value.name;
|
|
121
121
|
}
|
|
122
122
|
let bufferedValue;
|
|
123
|
-
if (
|
|
123
|
+
if (value instanceof Blob) {
|
|
124
124
|
bufferedValue = Buffer.from(yield value.arrayBuffer());
|
|
125
125
|
}
|
|
126
126
|
else {
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bigint = void 0;
|
|
4
|
+
const Schema_1 = require("../../Schema");
|
|
5
|
+
const getErrorMessageForIncorrectType_1 = require("../../utils/getErrorMessageForIncorrectType");
|
|
6
|
+
const maybeSkipValidation_1 = require("../../utils/maybeSkipValidation");
|
|
7
|
+
const schema_utils_1 = require("../schema-utils");
|
|
8
|
+
function bigint() {
|
|
9
|
+
const baseSchema = {
|
|
10
|
+
parse: (raw, { breadcrumbsPrefix = [] } = {}) => {
|
|
11
|
+
if (typeof raw !== "string") {
|
|
12
|
+
return {
|
|
13
|
+
ok: false,
|
|
14
|
+
errors: [
|
|
15
|
+
{
|
|
16
|
+
path: breadcrumbsPrefix,
|
|
17
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(raw, "string"),
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
ok: true,
|
|
24
|
+
value: BigInt(raw),
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
json: (bigint, { breadcrumbsPrefix = [] } = {}) => {
|
|
28
|
+
if (typeof bigint === "bigint") {
|
|
29
|
+
return {
|
|
30
|
+
ok: true,
|
|
31
|
+
value: bigint.toString(),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return {
|
|
36
|
+
ok: false,
|
|
37
|
+
errors: [
|
|
38
|
+
{
|
|
39
|
+
path: breadcrumbsPrefix,
|
|
40
|
+
message: (0, getErrorMessageForIncorrectType_1.getErrorMessageForIncorrectType)(bigint, "bigint"),
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
getType: () => Schema_1.SchemaType.BIGINT,
|
|
47
|
+
};
|
|
48
|
+
return Object.assign(Object.assign({}, (0, maybeSkipValidation_1.maybeSkipValidation)(baseSchema)), (0, schema_utils_1.getSchemaUtils)(baseSchema));
|
|
49
|
+
}
|
|
50
|
+
exports.bigint = bigint;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { bigint } from "./bigint";
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./bigint"), exports);
|
|
17
18
|
__exportStar(require("./date"), exports);
|
|
18
19
|
__exportStar(require("./enum"), exports);
|
|
19
20
|
__exportStar(require("./lazy"), exports);
|
|
@@ -12,9 +12,13 @@ function getTypeAsString(value) {
|
|
|
12
12
|
if (value === null) {
|
|
13
13
|
return "null";
|
|
14
14
|
}
|
|
15
|
+
if (value instanceof BigInt) {
|
|
16
|
+
return "BigInt";
|
|
17
|
+
}
|
|
15
18
|
switch (typeof value) {
|
|
16
19
|
case "string":
|
|
17
20
|
return `"${value}"`;
|
|
21
|
+
case "bigint":
|
|
18
22
|
case "number":
|
|
19
23
|
case "boolean":
|
|
20
24
|
case "undefined":
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SDK_VERSION = "0.8.21";
|
package/dist/version.js
ADDED