diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index a7d058a..3d43554 100644 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -7,8 +7,8 @@ curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/instal rmdir samples || true mkdir samples -npm install -npm install -g ts-node +npm install --ignore-scripts +npm install -g ts-node --ignore-scripts npm link npm link iris-sdk TS_CONFIG_CONTENT=$(cat <" frameIndex: 2353.28 requestBody: - application/json: {"text": "New caption text here"} + application/json: {"caption": {}, "text": "New caption text here"} responses: "200": application/json: {"success": true} @@ -481,7 +487,7 @@ examples: startExecution: speakeasy-default-start-execution: requestBody: - application/json: {"recordingId": "a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6", "actionDelay": 1500} + application/json: {"recordingId": "a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6", "actionDelay": 1500, "parameterOverrides": {}} responses: "201": application/json: {"executionId": "rpa_1695872345678", "recordingId": "a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6", "status": "running", "currentActionIndex": 3, "totalActions": 15, "startedAt": 1695872345678, "operatorType": "browser", "errorMessage": "Failed to execute click action: Element not found"} @@ -519,7 +525,7 @@ examples: uploadVideo: speakeasy-default-upload-video: requestBody: - multipart/form-data: {"file": {"": "x-file: example.file"}} + multipart/form-data: {"file": "x-file: example.file"} responses: "200": application/json: {"analysisId": "1682598432741", "originalVideo": "recording-1682598432741.mp4", "processedVideo": "processed-recording-1682598432741.mp4", "message": "Video uploaded and analyzed successfully"} @@ -549,7 +555,7 @@ examples: uploadFile: speakeasy-default-upload-file: requestBody: - multipart/form-data: {"file": {"": "x-file: example.file"}} + multipart/form-data: {"file": "x-file: example.file"} responses: "200": application/json: {"fileId": "1682598432741", "fileName": "document-1682598432741.pdf", "filePath": "/Users/username/.iris/files/document-1682598432741.pdf", "fileUrl": "/api/files/download/document-1682598432741.pdf", "fileSize": 24560, "mimeType": "application/pdf", "message": "File uploaded successfully"} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 2f153d4..e5e2c76 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -7,6 +7,7 @@ generation: maintainOpenAPIOrder: true usageSnippets: optionalPropertyRendering: withExample + sdkInitStyle: constructor useClassNamesForArrayFields: true fixes: nameResolutionDec2023: true @@ -16,25 +17,43 @@ generation: securityFeb2025: false sharedErrorComponentsApr2025: false auth: - oAuth2ClientCredentialsEnabled: true - oAuth2PasswordEnabled: true + oAuth2ClientCredentialsEnabled: false + oAuth2PasswordEnabled: false + hoistGlobalSecurity: true + schemas: + allOfMergeStrategy: shallowMerge + requestBodyFieldName: "" + tests: + generateTests: true + generateNewTests: false + skipResponseBodyAssertions: false typescript: - version: 0.2.1 + version: 0.3.0 + acceptHeaderEnum: true additionalDependencies: dependencies: {} devDependencies: {} peerDependencies: {} additionalPackageJSON: {} + additionalScripts: {} + alwaysIncludeInboundAndOutbound: false author: Speakeasy + baseErrorName: IrisSDKError clientServerStatusCodesAsErrors: true + constFieldsAlwaysOptional: false defaultErrorName: APIError enableCustomCodeRegions: false enableMCPServer: true enableReactQuery: false enumFormat: union envVarPrefix: IRISSDK + exportZodModelNamespace: false flattenGlobalSecurity: true flatteningOrder: parameters-first + formStringArrayEncodeMode: encoded-string + forwardCompatibleEnumsByDefault: false + forwardCompatibleUnionsByDefault: "false" + generateExamples: true imports: option: openapi paths: @@ -43,13 +62,22 @@ typescript: operations: models/operations shared: models/components webhooks: models/webhooks + inferUnionDiscriminators: true inputModelSuffix: input jsonpath: legacy + laxMode: strict maxMethodParams: 0 methodArguments: require-security-and-request + modelPropertyCasing: camel moduleFormat: commonjs + multipartArrayFormat: legacy outputModelSuffix: output packageName: iris-sdk + preApplyUnionDiscriminators: true responseFormat: flat + sseFlatResponse: false templateVersion: v2 + unionStrategy: left-to-right + usageSDKInitImports: [] useIndexModules: true + zodVersion: v3 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index b7a1e08..9538666 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.546.1 +speakeasyVersion: 1.666.2 sources: Zenobia Intelligent Automation Platform API: sourceNamespace: zenobia-intelligent-automation-platform-api - sourceRevisionDigest: sha256:a15d5da61636ad8a483d17cd642ec2f118a0dfe06cf0fffc513162d3cbc5867e - sourceBlobDigest: sha256:0c8d7bd4c35bf5b9ffa4817986135614df2bde763eaece2e154c49865c8ef6c5 + sourceRevisionDigest: sha256:5691d4cf2db75dd9126cd0d8b6c05c473d64a9d4cdf4750f63464098dad55d61 + sourceBlobDigest: sha256:ea2887935810946fbc2bda55b3cdf90fdcbf3a01cc47ae45ecf5556872db5cd8 tags: - latest - - speakeasy-sdk-regen-1747505453 + - speakeasy-sdk-regen-1752111786 - 0.1.0 targets: iris-sdk: source: Zenobia Intelligent Automation Platform API sourceNamespace: zenobia-intelligent-automation-platform-api - sourceRevisionDigest: sha256:a15d5da61636ad8a483d17cd642ec2f118a0dfe06cf0fffc513162d3cbc5867e - sourceBlobDigest: sha256:0c8d7bd4c35bf5b9ffa4817986135614df2bde763eaece2e154c49865c8ef6c5 + sourceRevisionDigest: sha256:5691d4cf2db75dd9126cd0d8b6c05c473d64a9d4cdf4750f63464098dad55d61 + sourceBlobDigest: sha256:ea2887935810946fbc2bda55b3cdf90fdcbf3a01cc47ae45ecf5556872db5cd8 codeSamplesNamespace: zenobia-intelligent-automation-platform-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:9ce126259d3c32437284a0100c9f9c3a8bdfcd54a630d6642b752ccaa7f356ba + codeSamplesRevisionDigest: sha256:b5c0efb7dd999be0d0ef0e9aa84431202142d5942b21cd5433b06e872147780a workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/FUNCTIONS.md b/FUNCTIONS.md index 8261ca6..c20b499 100644 --- a/FUNCTIONS.md +++ b/FUNCTIONS.md @@ -21,7 +21,6 @@ specific category of applications. ```typescript import { IrisSDKCore } from "iris-sdk/core.js"; import { configGet } from "iris-sdk/funcs/configGet.js"; -import { SDKValidationError } from "iris-sdk/models/errors/sdkvalidationerror.js"; // Use `IrisSDKCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -29,28 +28,12 @@ const irisSDK = new IrisSDKCore(); async function run() { const res = await configGet(irisSDK); - - switch (true) { - case res.ok: - // The success case will be handled outside of the switch block - break; - case res.error instanceof SDKValidationError: - // Pretty-print validation errors. - return console.log(res.error.pretty()); - case res.error instanceof Error: - return console.log(res.error); - default: - // TypeScript's type checking will fail on the following line if the above - // cases were not exhaustive. - res.error satisfies never; - throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("configGet failed:", res.error); } - - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); diff --git a/README.md b/README.md index de9f86e..caf900b 100644 --- a/README.md +++ b/README.md @@ -83,10 +83,7 @@ bun add https://github.com/iris-networks/iris-sdk ### Yarn ```bash -yarn add https://github.com/iris-networks/iris-sdk zod - -# Note that Yarn does not install peer dependencies automatically. You will need -# to install zod as shown above. +yarn add https://github.com/iris-networks/iris-sdk ``` @@ -192,7 +189,6 @@ const irisSDK = new IrisSDK(); async function run() { const result = await irisSDK.config.get(); - // Handle the result console.log(result); } @@ -231,7 +227,6 @@ run(); * [downloadFile](docs/sdks/irisartifacts/README.md#downloadfile) - Download a file artifact from the .iris folder * [downloadFolder](docs/sdks/irisartifacts/README.md#downloadfolder) - Download a directory of artifacts as a zip file - ### [operators](docs/sdks/operators/README.md) * [getTypes](docs/sdks/operators/README.md#gettypes) - Get available operator types @@ -358,7 +353,6 @@ async function run() { file: await openAsBlob("example.file"), }); - // Handle the result console.log(result); } @@ -392,7 +386,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -420,7 +413,6 @@ const irisSDK = new IrisSDK({ async function run() { const result = await irisSDK.config.get(); - // Handle the result console.log(result); } @@ -432,47 +424,34 @@ run(); ## Error Handling -If the request fails due to, for example 4XX or 5XX status codes, it will throw a `APIError`. +[`IrisSDKError`](./src/models/errors/irissdkerror.ts) is the base class for all HTTP error responses. It has the following properties: -| Error Type | Status Code | Content Type | -| --------------- | ----------- | ------------ | -| errors.APIError | 4XX, 5XX | \*/\* | +| Property | Type | Description | +| ------------------- | ---------- | ------------------------------------------------------ | +| `error.message` | `string` | Error message | +| `error.statusCode` | `number` | HTTP response status code eg `404` | +| `error.headers` | `Headers` | HTTP response headers | +| `error.body` | `string` | HTTP body. Can be empty string if no body is returned. | +| `error.rawResponse` | `Response` | Raw HTTP response | +### Example ```typescript import { IrisSDK } from "iris-sdk"; -import { SDKValidationError } from "iris-sdk/models/errors"; +import * as errors from "iris-sdk/models/errors"; const irisSDK = new IrisSDK(); async function run() { - let result; try { - result = await irisSDK.config.get(); + const result = await irisSDK.config.get(); - // Handle the result console.log(result); - } catch (err) { - switch (true) { - // The server response does not match the expected SDK schema - case (err instanceof SDKValidationError): - { - // Pretty-print will provide a human-readable multi-line error message - console.error(err.pretty()); - // Raw value may also be inspected - console.error(err.rawValue); - return; - } - apierror.js; - // Server returned an error status code or an unknown content type - case (err instanceof APIError): { - console.error(err.statusCode); - console.error(err.rawResponse.body); - return; - } - default: { - // Other errors such as network errors, see HTTPClientErrors for more details - throw err; - } + } catch (error) { + if (error instanceof errors.IrisSDKError) { + console.log(error.message); + console.log(error.statusCode); + console.log(error.body); + console.log(error.headers); } } } @@ -481,17 +460,26 @@ run(); ``` -Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging. +### Error Classes +**Primary error:** +* [`IrisSDKError`](./src/models/errors/irissdkerror.ts): The base class for HTTP error responses. + +
Less common errors (6) -In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `models/errors/httpclienterrors.ts` module: +
-| HTTP Client Error | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | -| RequestAbortedError | HTTP request was aborted by the client | -| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal | -| ConnectionError | HTTP client was unable to make a request to a server | -| InvalidRequestError | Any input used to create a request is invalid | -| UnexpectedClientError | Unrecognised or unexpected error | +**Network errors:** +* [`ConnectionError`](./src/models/errors/httpclienterrors.ts): HTTP client was unable to make a request to a server. +* [`RequestTimeoutError`](./src/models/errors/httpclienterrors.ts): HTTP request timed out due to an AbortSignal signal. +* [`RequestAbortedError`](./src/models/errors/httpclienterrors.ts): HTTP request was aborted by the client. +* [`InvalidRequestError`](./src/models/errors/httpclienterrors.ts): Any input used to create a request is invalid. +* [`UnexpectedClientError`](./src/models/errors/httpclienterrors.ts): Unrecognised or unexpected error. + + +**Inherit from [`IrisSDKError`](./src/models/errors/irissdkerror.ts)**: +* [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string. + +
@@ -510,7 +498,6 @@ const irisSDK = new IrisSDK({ async function run() { const result = await irisSDK.config.get(); - // Handle the result console.log(result); } @@ -564,7 +551,7 @@ httpClient.addHook("requestError", (error, request) => { console.groupEnd(); }); -const sdk = new IrisSDK({ httpClient }); +const sdk = new IrisSDK({ httpClient: httpClient }); ``` diff --git a/RELEASES.md b/RELEASES.md index b99a6e2..1b24185 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -14,4 +14,12 @@ Based on: - OpenAPI Doc - Speakeasy CLI 1.546.1 (2.604.2) https://github.com/speakeasy-api/speakeasy ### Generated -- [typescript v0.2.1] . \ No newline at end of file +- [typescript v0.2.1] . + +## 2025-12-03 01:39:35 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.666.2 (2.768.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.3.0] . \ No newline at end of file diff --git a/RUNTIMES.md b/RUNTIMES.md index db7ea94..27731c3 100644 --- a/RUNTIMES.md +++ b/RUNTIMES.md @@ -2,9 +2,9 @@ This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features: -* [Web Fetch API][web-fetch] -* [Web Streams API][web-streams] and in particular `ReadableStream` -* [Async iterables][async-iter] using `Symbol.asyncIterator` +- [Web Fetch API][web-fetch] +- [Web Streams API][web-streams] and in particular `ReadableStream` +- [Async iterables][async-iter] using `Symbol.asyncIterator` [web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API [web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API @@ -25,7 +25,7 @@ Runtime environments that are explicitly supported are: The following `tsconfig.json` options are recommended for projects using this SDK in order to get static type support for features like async iterables, -streams and `fetch`-related APIs ([`for await...of`][for-await-of], +streams and `fetch`-related APIs ([`for await...of`][for-await-of], [`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and so on): @@ -38,11 +38,11 @@ so on): { "compilerOptions": { "target": "es2020", // or higher - "lib": ["es2020", "dom", "dom.iterable"], + "lib": ["es2020", "dom", "dom.iterable"] } } ``` While `target` can be set to older ECMAScript versions, it may result in extra, unnecessary compatibility code being generated if you are not targeting old -runtimes. \ No newline at end of file +runtimes. diff --git a/USAGE.md b/USAGE.md index af2853b..a448aed 100644 --- a/USAGE.md +++ b/USAGE.md @@ -7,7 +7,6 @@ const irisSDK = new IrisSDK(); async function run() { const result = await irisSDK.config.get(); - // Handle the result console.log(result); } diff --git a/docs/models/components/batchexecuterpadto.md b/docs/models/components/batchexecuterpadto.md index d69d6c4..79f1332 100644 --- a/docs/models/components/batchexecuterpadto.md +++ b/docs/models/components/batchexecuterpadto.md @@ -7,6 +7,7 @@ import { BatchExecuteRpaDto } from "iris-sdk/models/components"; let value: BatchExecuteRpaDto = { recordingId: "a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6", + actionDelay: 1500, parameterSets: [ "{\"name\":\"Run 1\",\"parameterOverrides\":{\"2.action_inputs.content\":\"First search term\"}}", "{\"name\":\"Run 2\",\"parameterOverrides\":{\"2.action_inputs.content\":\"Second search term\"}}", diff --git a/docs/models/components/framesandcaptionsresponsedto.md b/docs/models/components/framesandcaptionsresponsedto.md index f2b422d..66e05f7 100644 --- a/docs/models/components/framesandcaptionsresponsedto.md +++ b/docs/models/components/framesandcaptionsresponsedto.md @@ -8,15 +8,10 @@ import { FramesAndCaptionsResponseDto } from "iris-sdk/models/components"; let value: FramesAndCaptionsResponseDto = { success: true, frames: [ - "", - ], - captions: [ - { - timestamp: 1651234567890, - conversation: {}, - frameIndex: 0, - }, + "", + "", ], + captions: [], }; ``` diff --git a/docs/models/components/operatortypesdto.md b/docs/models/components/operatortypesdto.md index 05965ba..fe0af2c 100644 --- a/docs/models/components/operatortypesdto.md +++ b/docs/models/components/operatortypesdto.md @@ -7,7 +7,7 @@ import { OperatorTypesDto } from "iris-sdk/models/components"; let value: OperatorTypesDto = { types: [ - "computer", + "browser", ], }; ``` diff --git a/docs/models/components/recordinglistresponsedto.md b/docs/models/components/recordinglistresponsedto.md index c3cd868..44371d8 100644 --- a/docs/models/components/recordinglistresponsedto.md +++ b/docs/models/components/recordinglistresponsedto.md @@ -6,18 +6,7 @@ import { RecordingListResponseDto } from "iris-sdk/models/components"; let value: RecordingListResponseDto = { - recordings: [ - { - id: "", - sessionId: "", - title: "", - createdAt: 724.68, - duration: 6323.79, - frameCount: 9098.17, - filePath: "/usr/sbin/unlike.vss", - size: 2774.1, - }, - ], + recordings: [], }; ``` diff --git a/docs/models/components/startrpaexecutiondto.md b/docs/models/components/startrpaexecutiondto.md index d98178c..729983f 100644 --- a/docs/models/components/startrpaexecutiondto.md +++ b/docs/models/components/startrpaexecutiondto.md @@ -7,6 +7,7 @@ import { StartRpaExecutionDto } from "iris-sdk/models/components"; let value: StartRpaExecutionDto = { recordingId: "a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6", + actionDelay: 1500, parameterOverrides: {}, }; ``` diff --git a/docs/models/operations/generatevideorequest.md b/docs/models/operations/generatevideorequest.md index ae401bc..136db42 100644 --- a/docs/models/operations/generatevideorequest.md +++ b/docs/models/operations/generatevideorequest.md @@ -7,7 +7,6 @@ import { GenerateVideoRequest } from "iris-sdk/models/operations"; let value: GenerateVideoRequest = { id: "", - generateVideoDto: {}, }; ``` diff --git a/docs/sdks/config/README.md b/docs/sdks/config/README.md index 8f350eb..2bdd236 100644 --- a/docs/sdks/config/README.md +++ b/docs/sdks/config/README.md @@ -16,6 +16,7 @@ Get current configuration ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -24,7 +25,6 @@ const irisSDK = new IrisSDK(); async function run() { const result = await irisSDK.config.get(); - // Handle the result console.log(result); } @@ -45,15 +45,12 @@ const irisSDK = new IrisSDKCore(); async function run() { const res = await configGet(irisSDK); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("configGet failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -83,6 +80,7 @@ Update configuration ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -91,7 +89,6 @@ const irisSDK = new IrisSDK(); async function run() { const result = await irisSDK.config.update({}); - // Handle the result console.log(result); } @@ -112,15 +109,12 @@ const irisSDK = new IrisSDKCore(); async function run() { const res = await configUpdate(irisSDK, {}); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("configUpdate failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); diff --git a/docs/sdks/files/README.md b/docs/sdks/files/README.md index 9522c9d..a310777 100644 --- a/docs/sdks/files/README.md +++ b/docs/sdks/files/README.md @@ -17,6 +17,7 @@ Upload a file for later processing. The system stores the file and provides a un ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; import { openAsBlob } from "node:fs"; @@ -28,7 +29,6 @@ async function run() { file: await openAsBlob("example.file"), }); - // Handle the result console.log(result); } @@ -52,15 +52,12 @@ async function run() { const res = await filesUpload(irisSDK, { file: await openAsBlob("example.file"), }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("filesUpload failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -91,6 +88,7 @@ List all uploaded files ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -99,7 +97,6 @@ const irisSDK = new IrisSDK(); async function run() { const result = await irisSDK.files.list(); - // Handle the result console.log(result); } @@ -120,15 +117,12 @@ const irisSDK = new IrisSDKCore(); async function run() { const res = await filesList(irisSDK); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("filesList failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -158,6 +152,7 @@ Get information about a specific file ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -168,7 +163,6 @@ async function run() { id: "1682598432741", }); - // Handle the result console.log(result); } @@ -191,15 +185,12 @@ async function run() { const res = await filesGetInfo(irisSDK, { id: "1682598432741", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("filesGetInfo failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -230,6 +221,7 @@ Delete a file ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -240,7 +232,6 @@ async function run() { id: "1682598432741", }); - // Handle the result console.log(result); } @@ -263,15 +254,12 @@ async function run() { const res = await filesDelete(irisSDK, { id: "1682598432741", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("filesDelete failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -302,6 +290,7 @@ Download a file ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -334,14 +323,12 @@ async function run() { const res = await filesDownload(irisSDK, { filename: "document-1682598432741.pdf", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("filesDownload failed:", res.error); } - - const { value: result } = res; - - } run(); diff --git a/docs/sdks/humanlayer/README.md b/docs/sdks/humanlayer/README.md index 271d6b8..59c6aa6 100644 --- a/docs/sdks/humanlayer/README.md +++ b/docs/sdks/humanlayer/README.md @@ -14,6 +14,7 @@ Get all pending human layer requests ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -42,14 +43,12 @@ const irisSDK = new IrisSDKCore(); async function run() { const res = await humanLayerGetRequests(irisSDK); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("humanLayerGetRequests failed:", res.error); } - - const { value: result } = res; - - } run(); @@ -79,6 +78,7 @@ Approve a pending human layer request ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -111,14 +111,12 @@ async function run() { const res = await humanLayerApprove(irisSDK, { requestId: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("humanLayerApprove failed:", res.error); } - - const { value: result } = res; - - } run(); diff --git a/docs/sdks/irisartifacts/README.md b/docs/sdks/irisartifacts/README.md index 637e1f3..2cca759 100644 --- a/docs/sdks/irisartifacts/README.md +++ b/docs/sdks/irisartifacts/README.md @@ -15,6 +15,7 @@ List artifacts in a directory within the .iris folder ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -25,7 +26,6 @@ async function run() { path: "code/my-project", }); - // Handle the result console.log(result); } @@ -48,15 +48,12 @@ async function run() { const res = await irisArtifactsList(irisSDK, { path: "code/my-project", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("irisArtifactsList failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -87,6 +84,7 @@ Download a file artifact from the .iris folder ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -119,14 +117,12 @@ async function run() { const res = await irisArtifactsDownloadFile(irisSDK, { path: "/usr/include", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("irisArtifactsDownloadFile failed:", res.error); } - - const { value: result } = res; - - } run(); @@ -157,6 +153,7 @@ Download a directory of artifacts as a zip file ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -189,14 +186,12 @@ async function run() { const res = await irisArtifactsDownloadFolder(irisSDK, { path: "/media", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("irisArtifactsDownloadFolder failed:", res.error); } - - const { value: result } = res; - - } run(); diff --git a/docs/sdks/irissdk/README.md b/docs/sdks/irissdk/README.md deleted file mode 100644 index ce181bd..0000000 --- a/docs/sdks/irissdk/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# IrisSDK - -## Overview - -Zenobia Intelligent Automation Platform API: -Zenobia is an intelligent automation platform that learns from demonstrations and transforms them into robust workflows. - -## Key Features -- **Demonstration-Based Learning**: Create automation by showing how tasks are performed -- **Video Analysis**: Convert screen recordings into precise automation instructions -- **Task Recording & Replay**: Record workflows and replay them with the same or different parameters -- **RPA Process Generation**: Automatically convert recordings into parameterized workflows -- **Action Caching**: Efficiently reuse automation steps across different tasks -- **Multi-operator Support**: Control browsers or native desktop applications - -The API enables developers to create automation that can handle complex real-world tasks through a combination of visual analysis, session recording, and parameterized execution. - - -### Available Operations diff --git a/docs/sdks/operators/README.md b/docs/sdks/operators/README.md index 8d5fd98..900fb08 100644 --- a/docs/sdks/operators/README.md +++ b/docs/sdks/operators/README.md @@ -15,6 +15,7 @@ Returns a list of available automation operator types that autonomous agents can ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -23,7 +24,6 @@ const irisSDK = new IrisSDK(); async function run() { const result = await irisSDK.operators.getTypes(); - // Handle the result console.log(result); } @@ -44,15 +44,12 @@ const irisSDK = new IrisSDKCore(); async function run() { const res = await operatorsGetTypes(irisSDK); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("operatorsGetTypes failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); diff --git a/docs/sdks/rpa/README.md b/docs/sdks/rpa/README.md index b13732b..fa6596e 100644 --- a/docs/sdks/rpa/README.md +++ b/docs/sdks/rpa/README.md @@ -19,6 +19,7 @@ Initiates an automated execution of actions captured in a recording. This endpoi ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -27,9 +28,10 @@ const irisSDK = new IrisSDK(); async function run() { const result = await irisSDK.rpa.startExecution({ recordingId: "a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6", + actionDelay: 1500, + parameterOverrides: {}, }); - // Handle the result console.log(result); } @@ -51,16 +53,15 @@ const irisSDK = new IrisSDKCore(); async function run() { const res = await rpaStartExecution(irisSDK, { recordingId: "a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6", + actionDelay: 1500, + parameterOverrides: {}, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("rpaStartExecution failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -91,6 +92,7 @@ Stops a running RPA execution and releases resources. ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -101,7 +103,6 @@ async function run() { executionId: "rpa_1695872345678", }); - // Handle the result console.log(result); } @@ -124,15 +125,12 @@ async function run() { const res = await rpaStopExecution(irisSDK, { executionId: "rpa_1695872345678", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("rpaStopExecution failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -163,6 +161,7 @@ Returns the current status and progress of an RPA execution. ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -173,7 +172,6 @@ async function run() { executionId: "rpa_1695872345678", }); - // Handle the result console.log(result); } @@ -196,15 +194,12 @@ async function run() { const res = await rpaGetStatus(irisSDK, { executionId: "rpa_1695872345678", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("rpaGetStatus failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -235,6 +230,7 @@ Returns a template with all parameterizable fields in a recording. This endpoint ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -245,7 +241,6 @@ async function run() { recordingId: "a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6", }); - // Handle the result console.log(result); } @@ -268,15 +263,12 @@ async function run() { const res = await rpaGetParameterTemplate(irisSDK, { recordingId: "a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("rpaGetParameterTemplate failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -307,6 +299,7 @@ Starts multiple RPA executions with different parameter values. This powerful en ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -315,13 +308,13 @@ const irisSDK = new IrisSDK(); async function run() { const result = await irisSDK.rpa.batchExecute({ recordingId: "a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6", + actionDelay: 1500, parameterSets: [ "{\"name\":\"Run 1\",\"parameterOverrides\":{\"2.action_inputs.content\":\"First search term\"}}", "{\"name\":\"Run 2\",\"parameterOverrides\":{\"2.action_inputs.content\":\"Second search term\"}}", ], }); - // Handle the result console.log(result); } @@ -343,20 +336,18 @@ const irisSDK = new IrisSDKCore(); async function run() { const res = await rpaBatchExecute(irisSDK, { recordingId: "a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6", + actionDelay: 1500, parameterSets: [ "{\"name\":\"Run 1\",\"parameterOverrides\":{\"2.action_inputs.content\":\"First search term\"}}", "{\"name\":\"Run 2\",\"parameterOverrides\":{\"2.action_inputs.content\":\"Second search term\"}}", ], }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("rpaBatchExecute failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md index 0c66855..d4862a5 100644 --- a/docs/sdks/video/README.md +++ b/docs/sdks/video/README.md @@ -19,6 +19,7 @@ Upload a video recording of any task to automatically generate RPA workflows. Th ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; import { openAsBlob } from "node:fs"; @@ -30,7 +31,6 @@ async function run() { file: await openAsBlob("example.file"), }); - // Handle the result console.log(result); } @@ -54,15 +54,12 @@ async function run() { const res = await videoUpload(irisSDK, { file: await openAsBlob("example.file"), }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videoUpload failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -93,6 +90,7 @@ Get analysis results for a video ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -103,7 +101,6 @@ async function run() { id: "", }); - // Handle the result console.log(result); } @@ -126,15 +123,12 @@ async function run() { const res = await videoGetAnalysisResults(irisSDK, { id: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videoGetAnalysisResults failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -165,6 +159,7 @@ Executes automation steps extracted from video analysis. This endpoint enables t ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -197,14 +192,12 @@ async function run() { const res = await videoExecuteRpa(irisSDK, { id: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("videoExecuteRpa failed:", res.error); } - - const { value: result } = res; - - } run(); @@ -233,6 +226,7 @@ run(); ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -265,14 +259,12 @@ async function run() { const res = await videoStreamProcessed(irisSDK, { filename: "example.file", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("videoStreamProcessed failed:", res.error); } - - const { value: result } = res; - - } run(); @@ -301,6 +293,7 @@ run(); ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -333,14 +326,12 @@ async function run() { const res = await videoStreamOriginal(irisSDK, { filename: "example.file", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("videoStreamOriginal failed:", res.error); } - - const { value: result } = res; - - } run(); diff --git a/docs/sdks/videoediting/README.md b/docs/sdks/videoediting/README.md index 4cb0304..cfb09bd 100644 --- a/docs/sdks/videoediting/README.md +++ b/docs/sdks/videoediting/README.md @@ -15,6 +15,7 @@ Deletes a specific frame from a recording and updates captions accordingly ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -26,7 +27,6 @@ async function run() { frameIndex: 1580.86, }); - // Handle the result console.log(result); } @@ -50,15 +50,12 @@ async function run() { id: "", frameIndex: 1580.86, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videoEditingDeleteFrame failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -89,6 +86,7 @@ Updates the caption text for a specific frame ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -99,11 +97,11 @@ async function run() { id: "", frameIndex: 2353.28, updateCaptionDto: { + caption: {}, text: "New caption text here", }, }); - // Handle the result console.log(result); } @@ -127,18 +125,16 @@ async function run() { id: "", frameIndex: 2353.28, updateCaptionDto: { + caption: {}, text: "New caption text here", }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videoEditingUpdateCaption failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -169,6 +165,7 @@ Regenerates the video file after frames or captions have been edited ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -179,7 +176,6 @@ async function run() { id: "", }); - // Handle the result console.log(result); } @@ -202,15 +198,12 @@ async function run() { const res = await videoEditingRegenerate(irisSDK, { id: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videoEditingRegenerate failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); diff --git a/docs/sdks/videos/README.md b/docs/sdks/videos/README.md index 59a4ad8..3d82fe5 100644 --- a/docs/sdks/videos/README.md +++ b/docs/sdks/videos/README.md @@ -26,6 +26,7 @@ Returns a list of all video recordings available in the system ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -34,7 +35,6 @@ const irisSDK = new IrisSDK(); async function run() { const result = await irisSDK.videos.list(); - // Handle the result console.log(result); } @@ -55,15 +55,12 @@ const irisSDK = new IrisSDKCore(); async function run() { const res = await videosList(irisSDK); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videosList failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -93,6 +90,7 @@ Returns detailed metadata about a specific recording ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -103,7 +101,6 @@ async function run() { id: "", }); - // Handle the result console.log(result); } @@ -126,15 +123,12 @@ async function run() { const res = await videosGetMetadata(irisSDK, { id: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videosGetMetadata failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -165,6 +159,7 @@ Permanently deletes a recording and all associated files. This operation cannot ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -175,7 +170,6 @@ async function run() { id: "", }); - // Handle the result console.log(result); } @@ -198,15 +192,12 @@ async function run() { const res = await videosDeleteRecording(irisSDK, { id: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videosDeleteRecording failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -237,6 +228,7 @@ Returns the current status of video generation for a recording. This endpoint pr ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -247,7 +239,6 @@ async function run() { id: "", }); - // Handle the result console.log(result); } @@ -270,15 +261,12 @@ async function run() { const res = await videosGetStatus(irisSDK, { id: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videosGetStatus failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -309,6 +297,7 @@ Returns the thumbnail image for a recording as a PNG file. This is typically the ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -319,7 +308,6 @@ async function run() { id: "", }); - // Handle the result console.log(result); } @@ -342,15 +330,12 @@ async function run() { const res = await videosGetThumbnail(irisSDK, { id: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videosGetThumbnail failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -381,6 +366,7 @@ Saves the current active session as a video recording. This endpoint captures al ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -389,7 +375,6 @@ const irisSDK = new IrisSDK(); async function run() { const result = await irisSDK.videos.saveCurrentSession(); - // Handle the result console.log(result); } @@ -410,15 +395,12 @@ const irisSDK = new IrisSDKCore(); async function run() { const res = await videosSaveCurrentSession(irisSDK); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videosSaveCurrentSession failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -448,6 +430,7 @@ Returns the raw frames and captions for the current active session. This endpoin ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -456,7 +439,6 @@ const irisSDK = new IrisSDK(); async function run() { const result = await irisSDK.videos.getCurrentSessionData(); - // Handle the result console.log(result); } @@ -477,15 +459,12 @@ const irisSDK = new IrisSDKCore(); async function run() { const res = await videosGetCurrentSessionData(irisSDK); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videosGetCurrentSessionData failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -515,6 +494,7 @@ Returns the raw frames and captions for a specific recording. This endpoint is p ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -525,7 +505,6 @@ async function run() { id: "", }); - // Handle the result console.log(result); } @@ -548,15 +527,12 @@ async function run() { const res = await videosGetRecordingData(irisSDK, { id: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videosGetRecordingData failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -587,6 +563,7 @@ Downloads a recording as a ZIP archive containing all frames, captions, and meta ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -597,7 +574,6 @@ async function run() { id: "", }); - // Handle the result console.log(result); } @@ -620,15 +596,12 @@ async function run() { const res = await videosDownload(irisSDK, { id: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videosDownload failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -659,6 +632,7 @@ Creates a video file from the frames of a recording with customizable options. T ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -670,7 +644,6 @@ async function run() { generateVideoDto: {}, }); - // Handle the result console.log(result); } @@ -694,15 +667,12 @@ async function run() { id: "", generateVideoDto: {}, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videosGenerate failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -733,6 +703,7 @@ Streams the generated video file for a recording. This endpoint can be used dire ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -743,7 +714,6 @@ async function run() { id: "", }); - // Handle the result console.log(result); } @@ -766,15 +736,12 @@ async function run() { const res = await videosStream(irisSDK, { id: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videosStream failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -805,6 +772,7 @@ Returns all frames and their associated captions for a recording to be edited ### Example Usage + ```typescript import { IrisSDK } from "iris-sdk"; @@ -815,7 +783,6 @@ async function run() { id: "", }); - // Handle the result console.log(result); } @@ -838,15 +805,12 @@ async function run() { const res = await videosGetFramesAndCaptions(irisSDK, { id: "", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("videosGetFramesAndCaptions failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); diff --git a/examples/.env.template b/examples/.env.template new file mode 100644 index 0000000..bad455e --- /dev/null +++ b/examples/.env.template @@ -0,0 +1,9 @@ +# iris-sdk SDK Environment Variables +# Copy this file to .env and fill in your actual values +# DO NOT commit the .env file to version control + +# Security Configuration + +# Debug Configuration +# Enable HTTP request/response logging for debugging +IRISSDK_DEBUG=true diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..e640854 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,31 @@ +# iris-sdk Examples + +This directory contains example scripts demonstrating how to use the iris-sdk SDK. + +## Prerequisites + +- Node.js (v18 or higher) +- npm + +## Setup + +1. Copy `.env.template` to `.env`: + ```bash + cp .env.template .env + ``` + +2. Edit `.env` and add your actual credentials (API keys, tokens, etc.) + +## Running the Examples + +To run an example file from the examples directory: + +```bash +npm run build && npx tsx example.ts +``` + +## Creating new examples + +Duplicate an existing example file, they won't be overwritten by the generation process. + + diff --git a/examples/configGet.example.ts b/examples/configGet.example.ts new file mode 100644 index 0000000..377e739 --- /dev/null +++ b/examples/configGet.example.ts @@ -0,0 +1,24 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import dotenv from "dotenv"; +dotenv.config(); +/** + * Example usage of the iris-sdk SDK + * + * To run this example from the examples directory: + * npm run build && npx tsx configGet.example.ts + */ + +import { IrisSDK } from "iris-sdk"; + +const irisSDK = new IrisSDK(); + +async function main() { + const result = await irisSDK.config.get(); + + console.log(result); +} + +main().catch(console.error); diff --git a/examples/package-lock.json b/examples/package-lock.json new file mode 100644 index 0000000..7e082e6 --- /dev/null +++ b/examples/package-lock.json @@ -0,0 +1,619 @@ +{ + "name": "iris-sdk-examples", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "iris-sdk-examples", + "version": "1.0.0", + "dependencies": { + "iris-sdk": "file:.." + }, + "devDependencies": { + "@types/node": "^20.0.0", + "dotenv": "^16.4.5", + "tsx": "^4.19.2" + } + }, + "..": { + "name": "iris-sdk", + "version": "0.3.0", + "dependencies": { + "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", + "zod": "^3.25.0 || ^4.0.0" + }, + "bin": { + "mcp": "bin/mcp-server.js" + }, + "devDependencies": { + "@eslint/js": "^9.19.0", + "@stricli/core": "^1.1.1", + "@types/express": "^4.17.21", + "bun": "1.2.17", + "bun-types": "1.2.17", + "eslint": "^9.19.0", + "express": "^4.21.2", + "globals": "^15.14.0", + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.0.tgz", + "integrity": "sha512-KuZrd2hRjz01y5JK9mEBSD3Vj3mbCvemhT466rSuJYeE/hjuBrHfjjcjMdTm/sz7au+++sdbJZJmuBwQLuw68A==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.0.tgz", + "integrity": "sha512-j67aezrPNYWJEOHUNLPj9maeJte7uSMM6gMoxfPC9hOg8N02JuQi/T7ewumf4tNvJadFkvLZMlAq73b9uwdMyQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.0.tgz", + "integrity": "sha512-CC3vt4+1xZrs97/PKDkl0yN7w8edvU2vZvAFGD16n9F0Cvniy5qvzRXjfO1l94efczkkQE6g1x0i73Qf5uthOQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.0.tgz", + "integrity": "sha512-wurMkF1nmQajBO1+0CJmcN17U4BP6GqNSROP8t0X/Jiw2ltYGLHpEksp9MpoBqkrFR3kv2/te6Sha26k3+yZ9Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.0.tgz", + "integrity": "sha512-uJOQKYCcHhg07DL7i8MzjvS2LaP7W7Pn/7uA0B5S1EnqAirJtbyw4yC5jQ5qcFjHK9l6o/MX9QisBg12kNkdHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.0.tgz", + "integrity": "sha512-8mG6arH3yB/4ZXiEnXof5MK72dE6zM9cDvUcPtxhUZsDjESl9JipZYW60C3JGreKCEP+p8P/72r69m4AZGJd5g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.0.tgz", + "integrity": "sha512-9FHtyO988CwNMMOE3YIeci+UV+x5Zy8fI2qHNpsEtSF83YPBmE8UWmfYAQg6Ux7Gsmd4FejZqnEUZCMGaNQHQw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.0.tgz", + "integrity": "sha512-zCMeMXI4HS/tXvJz8vWGexpZj2YVtRAihHLk1imZj4efx1BQzN76YFeKqlDr3bUWI26wHwLWPd3rwh6pe4EV7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.0.tgz", + "integrity": "sha512-t76XLQDpxgmq2cNXKTVEB7O7YMb42atj2Re2Haf45HkaUpjM2J0UuJZDuaGbPbamzZ7bawyGFUkodL+zcE+jvQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.0.tgz", + "integrity": "sha512-AS18v0V+vZiLJyi/4LphvBE+OIX682Pu7ZYNsdUHyUKSoRwdnOsMf6FDekwoAFKej14WAkOef3zAORJgAtXnlQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.0.tgz", + "integrity": "sha512-Mz1jxqm/kfgKkc/KLHC5qIujMvnnarD9ra1cEcrs7qshTUSksPihGrWHVG5+osAIQ68577Zpww7SGapmzSt4Nw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.0.tgz", + "integrity": "sha512-QbEREjdJeIreIAbdG2hLU1yXm1uu+LTdzoq1KCo4G4pFOLlvIspBm36QrQOar9LFduavoWX2msNFAAAY9j4BDg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.0.tgz", + "integrity": "sha512-sJz3zRNe4tO2wxvDpH/HYJilb6+2YJxo/ZNbVdtFiKDufzWq4JmKAiHy9iGoLjAV7r/W32VgaHGkk35cUXlNOg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.0.tgz", + "integrity": "sha512-z9N10FBD0DCS2dmSABDBb5TLAyF1/ydVb+N4pi88T45efQ/w4ohr/F/QYCkxDPnkhkp6AIpIcQKQ8F0ANoA2JA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.0.tgz", + "integrity": "sha512-pQdyAIZ0BWIC5GyvVFn5awDiO14TkT/19FTmFcPdDec94KJ1uZcmFs21Fo8auMXzD4Tt+diXu1LW1gHus9fhFQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.0.tgz", + "integrity": "sha512-hPlRWR4eIDDEci953RI1BLZitgi5uqcsjKMxwYfmi4LcwyWo2IcRP+lThVnKjNtk90pLS8nKdroXYOqW+QQH+w==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.0.tgz", + "integrity": "sha512-1hBWx4OUJE2cab++aVZ7pObD6s+DK4mPGpemtnAORBvb5l/g5xFGk0vc0PjSkrDs0XaXj9yyob3d14XqvnQ4gw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.0.tgz", + "integrity": "sha512-6m0sfQfxfQfy1qRuecMkJlf1cIzTOgyaeXaiVaaki8/v+WB+U4hc6ik15ZW6TAllRlg/WuQXxWj1jx6C+dfy3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.0.tgz", + "integrity": "sha512-xbbOdfn06FtcJ9d0ShxxvSn2iUsGd/lgPIO2V3VZIPDbEaIj1/3nBBe1AwuEZKXVXkMmpr6LUAgMkLD/4D2PPA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.0.tgz", + "integrity": "sha512-fWgqR8uNbCQ/GGv0yhzttj6sU/9Z5/Sv/VGU3F5OuXK6J6SlriONKrQ7tNlwBrJZXRYk5jUhuWvF7GYzGguBZQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.0.tgz", + "integrity": "sha512-aCwlRdSNMNxkGGqQajMUza6uXzR/U0dIl1QmLjPtRbLOx3Gy3otfFu/VjATy4yQzo9yFDGTxYDo1FfAD9oRD2A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.0.tgz", + "integrity": "sha512-nyvsBccxNAsNYz2jVFYwEGuRRomqZ149A39SHWk4hV0jWxKM0hjBPm3AmdxcbHiFLbBSwG6SbpIcUbXjgyECfA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.0.tgz", + "integrity": "sha512-Q1KY1iJafM+UX6CFEL+F4HRTgygmEW568YMqDA5UV97AuZSm21b7SXIrRJDwXWPzr8MGr75fUZPV67FdtMHlHA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.0.tgz", + "integrity": "sha512-W1eyGNi6d+8kOmZIwi/EDjrL9nxQIQ0MiGqe/AWc6+IaHloxHSGoeRgDRKHFISThLmsewZ5nHFvGFWdBYlgKPg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.0.tgz", + "integrity": "sha512-30z1aKL9h22kQhilnYkORFYt+3wp7yZsHWus+wSKAJR8JtdfI76LJ4SBdMsCopTR3z/ORqVu5L1vtnHZWVj4cQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.0.tgz", + "integrity": "sha512-aIitBcjQeyOhMTImhLZmtxfdOcuNRpwlPNmlFKPcHQYPhEssw75Cl1TSXJXpMkzaua9FUetx/4OQKq7eJul5Cg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@types/node": { + "version": "20.19.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.25.tgz", + "integrity": "sha512-ZsJzA5thDQMSQO788d7IocwwQbI8B5OPzmqNvpf3NY/+MHDAS759Wo0gd2WQeXYt5AAAQjzcrTVC6SKCuYgoCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/esbuild": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.0.tgz", + "integrity": "sha512-jd0f4NHbD6cALCyGElNpGAOtWxSq46l9X/sWB0Nzd5er4Kz2YTm+Vl0qKFT9KUJvD8+fiO8AvoHhFvEatfVixA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.0", + "@esbuild/android-arm": "0.27.0", + "@esbuild/android-arm64": "0.27.0", + "@esbuild/android-x64": "0.27.0", + "@esbuild/darwin-arm64": "0.27.0", + "@esbuild/darwin-x64": "0.27.0", + "@esbuild/freebsd-arm64": "0.27.0", + "@esbuild/freebsd-x64": "0.27.0", + "@esbuild/linux-arm": "0.27.0", + "@esbuild/linux-arm64": "0.27.0", + "@esbuild/linux-ia32": "0.27.0", + "@esbuild/linux-loong64": "0.27.0", + "@esbuild/linux-mips64el": "0.27.0", + "@esbuild/linux-ppc64": "0.27.0", + "@esbuild/linux-riscv64": "0.27.0", + "@esbuild/linux-s390x": "0.27.0", + "@esbuild/linux-x64": "0.27.0", + "@esbuild/netbsd-arm64": "0.27.0", + "@esbuild/netbsd-x64": "0.27.0", + "@esbuild/openbsd-arm64": "0.27.0", + "@esbuild/openbsd-x64": "0.27.0", + "@esbuild/openharmony-arm64": "0.27.0", + "@esbuild/sunos-x64": "0.27.0", + "@esbuild/win32-arm64": "0.27.0", + "@esbuild/win32-ia32": "0.27.0", + "@esbuild/win32-x64": "0.27.0" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-tsconfig": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.0.tgz", + "integrity": "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/iris-sdk": { + "resolved": "..", + "link": true + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/tsx": { + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", + "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.27.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/examples/package.json b/examples/package.json new file mode 100644 index 0000000..3ad3f03 --- /dev/null +++ b/examples/package.json @@ -0,0 +1,18 @@ +{ + "name": "iris-sdk-examples", + "version": "1.0.0", + "private": true, + "scripts": { + "build:parent": "cd .. && npm i && npm run build && cd -", + "build:examples": "npm i", + "build": "npm run build:parent && npm run build:examples" + }, + "devDependencies": { + "@types/node": "^20.0.0", + "dotenv": "^16.4.5", + "tsx": "^4.19.2" + }, + "dependencies": { + "iris-sdk": "file:.." + } +} \ No newline at end of file diff --git a/jsr.json b/jsr.json index 49adc68..229421e 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "iris-sdk", - "version": "0.2.1", + "version": "0.3.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 292a12e..4fd21f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,37 +1,30 @@ { "name": "iris-sdk", - "version": "0.2.1", + "version": "0.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iris-sdk", - "version": "0.2.1", + "version": "0.3.0", + "dependencies": { + "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", + "zod": "^3.25.0 || ^4.0.0" + }, "bin": { "mcp": "bin/mcp-server.js" }, "devDependencies": { "@eslint/js": "^9.19.0", - "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", "@stricli/core": "^1.1.1", "@types/express": "^4.17.21", - "bun": "^1.2.2", - "bun-types": "^1.2.2", + "bun": "1.2.17", + "bun-types": "1.2.17", "eslint": "^9.19.0", "express": "^4.21.2", "globals": "^15.14.0", - "typescript": "^5.4.5", - "typescript-eslint": "^8.22.0", - "zod": "^3.23.4" - }, - "peerDependencies": { - "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", - "zod": ">= 3" - }, - "peerDependenciesMeta": { - "@modelcontextprotocol/sdk": { - "optional": true - } + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" } }, "node_modules/@eslint-community/eslint-utils": { @@ -293,7 +286,6 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.9.0.tgz", "integrity": "sha512-Jq2EUCQpe0iyO5FGpzVYDNFR6oR53AIrwph9yWl7uSc7IWUMsrmpmSaTGra5hQNunXpM+9oit85p924jWuHzUA==", - "dev": true, "license": "MIT", "dependencies": { "content-type": "^1.0.5", @@ -315,7 +307,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", - "dev": true, "license": "MIT", "dependencies": { "mime-types": "^3.0.0", @@ -329,7 +320,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz", "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==", - "dev": true, "license": "MIT", "dependencies": { "bytes": "^3.1.2", @@ -350,7 +340,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==", - "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "5.2.1" @@ -363,7 +352,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", - "dev": true, "license": "MIT", "engines": { "node": ">=6.6.0" @@ -373,7 +361,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz", "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==", - "dev": true, "license": "MIT", "dependencies": { "accepts": "^2.0.0", @@ -416,7 +403,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==", - "dev": true, "license": "MIT", "dependencies": { "debug": "^4.4.0", @@ -434,7 +420,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -444,7 +429,6 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -457,7 +441,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -467,7 +450,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", - "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -480,7 +462,6 @@ "version": "1.54.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -490,7 +471,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", - "dev": true, "license": "MIT", "dependencies": { "mime-db": "^1.54.0" @@ -503,7 +483,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -513,7 +492,6 @@ "version": "6.14.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", - "dev": true, "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.1.0" @@ -529,7 +507,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", - "dev": true, "license": "MIT", "dependencies": { "debug": "^4.3.5", @@ -552,7 +529,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz", "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==", - "dev": true, "license": "MIT", "dependencies": { "encodeurl": "^2.0.0", @@ -568,7 +544,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", - "dev": true, "license": "MIT", "dependencies": { "content-type": "^1.0.5", @@ -618,9 +593,9 @@ } }, "node_modules/@oven/bun-darwin-aarch64": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@oven/bun-darwin-aarch64/-/bun-darwin-aarch64-1.2.13.tgz", - "integrity": "sha512-AOU4O9jxRp2TXeqoEfOjEaUNZb3+SUPBN8TIEnUjpnyLWPoYJGCeNdQuCDcUkmF3MJEmEuJdyF1IeOITozpC6A==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-aarch64/-/bun-darwin-aarch64-1.2.17.tgz", + "integrity": "sha512-66Xjz3NZXUUWKZJPvWKuwEkaqMZpir1Gm4SbhbB2iiRSSTW8jqwdkSb9RhgTCDt5OnSPd3+Cq0WsP/T5ExJbhA==", "cpu": [ "arm64" ], @@ -632,9 +607,9 @@ ] }, "node_modules/@oven/bun-darwin-x64": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64/-/bun-darwin-x64-1.2.13.tgz", - "integrity": "sha512-kJ2iOvxY8uz5/nu+8zIjKf4LmRIHBH9pJJM2q+tA47U04Tod6k6rtntDOI8SdmRe2M5c87RfbadWdxhpYHFIWQ==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64/-/bun-darwin-x64-1.2.17.tgz", + "integrity": "sha512-OMJMHpcpBlWcVnWfSQ6x+8fF7HpkQLqBfoIvzxgUjIZZvj2d8K46XX4N/h62RglDEinRC9VDGxt24vwvlk5tTw==", "cpu": [ "x64" ], @@ -646,9 +621,9 @@ ] }, "node_modules/@oven/bun-darwin-x64-baseline": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64-baseline/-/bun-darwin-x64-baseline-1.2.13.tgz", - "integrity": "sha512-bZpIUOvx9np07AmH5MVXGYHWZ40m2vCpNV74fma6sCzBlssJclS2V3BZgO+lLvtUKSqnW3HAyJBGsRF34wPbNw==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64-baseline/-/bun-darwin-x64-baseline-1.2.17.tgz", + "integrity": "sha512-VSIctl90tV8yg1LRMvPg/8LgUzl55Q7Jcxe+u6PfuvLQIJOTIPbNn7HtRpJg7MGc3+qyztB5KDd70xC7qI2yEg==", "cpu": [ "x64" ], @@ -660,9 +635,9 @@ ] }, "node_modules/@oven/bun-linux-aarch64": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64/-/bun-linux-aarch64-1.2.13.tgz", - "integrity": "sha512-hocSJmblX4CCjP1HpaM64I65erB+CONUCCwKzGGOfLGLobVi+vn/G56UaYWsje1y/Z7WlVaUSgKYVWl7EJ6T9g==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64/-/bun-linux-aarch64-1.2.17.tgz", + "integrity": "sha512-KPoMqaibCXcSv+VZ3uMqKUNZqMxE6Hho1be6+laolYGOIJxJTMnZPfmKfIlQmnnW3vLlm3g2Rm8pPPC7doSHWg==", "cpu": [ "arm64" ], @@ -674,9 +649,9 @@ ] }, "node_modules/@oven/bun-linux-aarch64-musl": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64-musl/-/bun-linux-aarch64-musl-1.2.13.tgz", - "integrity": "sha512-P56m718KXeyu4Vq5fsESFktfu+0Us1jhu/ZzgHYFRYJcm/hjs6AUA/RJtUAifFy5PNAM5IJdrYl3xPsE8Wa+pg==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64-musl/-/bun-linux-aarch64-musl-1.2.17.tgz", + "integrity": "sha512-PH+hUV+I6DGD1VRHdAIAKEAOed+GSdvn6S1b3qqX27/VuHBU781V+hzt+6DBlcWBHYLw8PIg9sfIdNp485gQmw==", "cpu": [ "aarch64" ], @@ -688,9 +663,9 @@ ] }, "node_modules/@oven/bun-linux-x64": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64/-/bun-linux-x64-1.2.13.tgz", - "integrity": "sha512-pf8+Kn2GLrFKLcb8JSLM6Z147Af6L9GQODpnOHM4gvXQv6E/GwQg47/o+7f1XCfzib3fdzOTJlDPvvO1rnXOTA==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64/-/bun-linux-x64-1.2.17.tgz", + "integrity": "sha512-BfySnrTxp7D9hVUi9JEpviJl8ndsuESiRiQKTzgmdTLrMjUxP4SwrwMtYt6R9X20n9rREG6a47C0IyQMhbwG/g==", "cpu": [ "x64" ], @@ -702,9 +677,9 @@ ] }, "node_modules/@oven/bun-linux-x64-baseline": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-baseline/-/bun-linux-x64-baseline-1.2.13.tgz", - "integrity": "sha512-9n1ai2ejEpxEMqpbHQMWFyvacq3MYsB7gh5mxRlFwhNFPCWu/Sv6gyrO+q2vkOYgcEIGhJb6dqJ6L9vBNaL61A==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-baseline/-/bun-linux-x64-baseline-1.2.17.tgz", + "integrity": "sha512-IrnFMUwYWxoKICQgK8ZlJ6rI/HU2gITFNEW0MIOPIcuT0s3j0/33631M9EzYDoL4NuLQPks6569JDvSHEVqdeA==", "cpu": [ "x64" ], @@ -716,9 +691,9 @@ ] }, "node_modules/@oven/bun-linux-x64-musl": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-musl/-/bun-linux-x64-musl-1.2.13.tgz", - "integrity": "sha512-w5Ob+GM3Ww4yRA6f1N845o6wEvuwHSmipFUGaRaVp4UELrFnIV9G3pmrlBbYHFnWhk13o8Q7H1/4ZphOkCRJmQ==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-musl/-/bun-linux-x64-musl-1.2.17.tgz", + "integrity": "sha512-fW9qn/WqO131/qSIkIPW8zN+thQnYUWa/k98EWubLG87htKSPh1v023E5ikKb7WlUv4Yb6UlE/z4NmMYKffmAg==", "cpu": [ "x64" ], @@ -730,9 +705,9 @@ ] }, "node_modules/@oven/bun-linux-x64-musl-baseline": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-musl-baseline/-/bun-linux-x64-musl-baseline-1.2.13.tgz", - "integrity": "sha512-VI8hVdfqk0QmbAbyrsIdo2O95n3fkbt72E0h3Wu69cHD1iKJqRXG28R8QoHdehoLSJnKVzRTwsUzHp764nefWQ==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-musl-baseline/-/bun-linux-x64-musl-baseline-1.2.17.tgz", + "integrity": "sha512-YE5wQ/YA79BykMLhuwgdoF8Yjj5dRipD8dwmXs8n7gzR+/L9tL7Q69NQgskW2KkAalmWPoGAv3TV0IwbU+1dFw==", "cpu": [ "x64" ], @@ -744,9 +719,9 @@ ] }, "node_modules/@oven/bun-windows-x64": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64/-/bun-windows-x64-1.2.13.tgz", - "integrity": "sha512-sArgbRmT7V3mUdNFaAdUcuJsuS+oeMDZLPWFSg0gtQZpRrURs9nPzEnZMmVCFo4+kPF9Tb5ujQT9uDySh6/qVg==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64/-/bun-windows-x64-1.2.17.tgz", + "integrity": "sha512-GJUg1oA59DWH6eyV8uccpgfTEVxjmgfTWQCOl2ySMXR3IfRoFwS4aQfpjcVzNmEZrv8eYt+yMuw1K7aNcWTTIg==", "cpu": [ "x64" ], @@ -758,9 +733,9 @@ ] }, "node_modules/@oven/bun-windows-x64-baseline": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64-baseline/-/bun-windows-x64-baseline-1.2.13.tgz", - "integrity": "sha512-Aiezu99fOUJJpzGuylOJryd6w9Syg2TBigHeXV2+RJsouBzvAnIEYIBA94ZspRq1ulD26Wmkk8Ae+jZ4edk9GA==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64-baseline/-/bun-windows-x64-baseline-1.2.17.tgz", + "integrity": "sha512-aVkq4l1yZ9VKfBOtZ2HEj0OCU5kUe3Fx6LbAG6oY6OglWVYj051i3RGaE2OdR4L4F2jDyxzfGYRTM/qs8nU5qA==", "cpu": [ "x64" ], @@ -1140,7 +1115,6 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, "license": "MIT", "dependencies": { "mime-types": "~2.1.34", @@ -1217,7 +1191,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true, "license": "MIT" }, "node_modules/balanced-match": { @@ -1231,7 +1204,6 @@ "version": "1.20.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", - "dev": true, "license": "MIT", "dependencies": { "bytes": "3.1.2", @@ -1256,7 +1228,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "license": "MIT", "dependencies": { "ms": "2.0.0" @@ -1266,14 +1237,12 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, "license": "MIT" }, "node_modules/body-parser/node_modules/raw-body": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "dev": true, "license": "MIT", "dependencies": { "bytes": "3.1.2", @@ -1309,9 +1278,9 @@ } }, "node_modules/bun": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/bun/-/bun-1.2.13.tgz", - "integrity": "sha512-EhP1MhFbicqtaRSFCbEZdkcFco8Ov47cNJcB9QmKS8U4cojKHfLU+dQR14lCvLYmtBvGgwv/Lp+9SSver2OPzQ==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/bun/-/bun-1.2.17.tgz", + "integrity": "sha512-lrUZTWS24eVy6v+Eph8VTwqFPcG7/XQ0rLBQEMNoQs2Vd7ctVdMGAzJKKGZRUQH+rgkD8rBeHGIVoWxX4vJLCA==", "cpu": [ "arm64", "x64", @@ -1327,26 +1296,26 @@ ], "bin": { "bun": "bin/bun.exe", - "bunx": "bin/bun.exe" + "bunx": "bin/bunx.exe" }, "optionalDependencies": { - "@oven/bun-darwin-aarch64": "1.2.13", - "@oven/bun-darwin-x64": "1.2.13", - "@oven/bun-darwin-x64-baseline": "1.2.13", - "@oven/bun-linux-aarch64": "1.2.13", - "@oven/bun-linux-aarch64-musl": "1.2.13", - "@oven/bun-linux-x64": "1.2.13", - "@oven/bun-linux-x64-baseline": "1.2.13", - "@oven/bun-linux-x64-musl": "1.2.13", - "@oven/bun-linux-x64-musl-baseline": "1.2.13", - "@oven/bun-windows-x64": "1.2.13", - "@oven/bun-windows-x64-baseline": "1.2.13" + "@oven/bun-darwin-aarch64": "1.2.17", + "@oven/bun-darwin-x64": "1.2.17", + "@oven/bun-darwin-x64-baseline": "1.2.17", + "@oven/bun-linux-aarch64": "1.2.17", + "@oven/bun-linux-aarch64-musl": "1.2.17", + "@oven/bun-linux-x64": "1.2.17", + "@oven/bun-linux-x64-baseline": "1.2.17", + "@oven/bun-linux-x64-musl": "1.2.17", + "@oven/bun-linux-x64-musl-baseline": "1.2.17", + "@oven/bun-windows-x64": "1.2.17", + "@oven/bun-windows-x64-baseline": "1.2.17" } }, "node_modules/bun-types": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.2.13.tgz", - "integrity": "sha512-rRjA1T6n7wto4gxhAO/ErZEtOXyEZEmnIHQfl0Dt1QQSB4QV0iP6BZ9/YB5fZaHFQ2dwHFrmPaRQ9GGMX01k9Q==", + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.2.17.tgz", + "integrity": "sha512-ElC7ItwT3SCQwYZDYoAH+q6KT4Fxjl8DtZ6qDulUFBmXA8YB4xo+l54J9ZJN+k2pphfn9vk7kfubeSd5QfTVJQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1357,7 +1326,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -1367,7 +1335,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -1381,7 +1348,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", @@ -1452,7 +1418,6 @@ "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "5.2.1" @@ -1465,7 +1430,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -1475,7 +1439,6 @@ "version": "0.7.1", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -1485,14 +1448,12 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true, "license": "MIT" }, "node_modules/cors": { "version": "2.8.5", "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, "license": "MIT", "dependencies": { "object-assign": "^4", @@ -1506,7 +1467,6 @@ "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -1521,7 +1481,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", - "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -1546,7 +1505,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -1556,7 +1514,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8", @@ -1567,7 +1524,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", @@ -1582,14 +1538,12 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true, "license": "MIT" }, "node_modules/encodeurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -1599,7 +1553,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -1609,7 +1562,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -1619,7 +1571,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0" @@ -1632,7 +1583,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true, "license": "MIT" }, "node_modules/escape-string-regexp": { @@ -1857,7 +1807,6 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -1867,7 +1816,6 @@ "version": "3.0.7", "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", - "dev": true, "license": "MIT", "dependencies": { "eventsource-parser": "^3.0.1" @@ -1880,7 +1828,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.2.tgz", "integrity": "sha512-6RxOBZ/cYgd8usLwsEl+EC09Au/9BcmCKYF2/xbml6DNczf7nv0MQb+7BA2F+li6//I+28VNlQR37XfQtcAJuA==", - "dev": true, "license": "MIT", "engines": { "node": ">=18.0.0" @@ -1890,7 +1837,6 @@ "version": "4.21.2", "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", - "dev": true, "license": "MIT", "dependencies": { "accepts": "~1.3.8", @@ -1937,7 +1883,6 @@ "version": "7.5.0", "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.0.tgz", "integrity": "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 16" @@ -1953,7 +1898,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "license": "MIT", "dependencies": { "ms": "2.0.0" @@ -1963,7 +1907,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, "license": "MIT" }, "node_modules/fast-deep-equal": { @@ -2057,7 +2000,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", - "dev": true, "license": "MIT", "dependencies": { "debug": "2.6.9", @@ -2076,7 +2018,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "license": "MIT", "dependencies": { "ms": "2.0.0" @@ -2086,7 +2027,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, "license": "MIT" }, "node_modules/find-up": { @@ -2131,7 +2071,6 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -2141,7 +2080,6 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -2151,7 +2089,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2161,7 +2098,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", @@ -2186,7 +2122,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, "license": "MIT", "dependencies": { "dunder-proto": "^1.0.1", @@ -2226,7 +2161,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2256,7 +2190,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2269,7 +2202,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -2282,7 +2214,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, "license": "MIT", "dependencies": { "depd": "2.0.0", @@ -2299,7 +2230,6 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" @@ -2349,14 +2279,12 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, "license": "ISC" }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.10" @@ -2399,14 +2327,12 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", - "dev": true, "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, "license": "ISC" }, "node_modules/js-yaml": { @@ -2494,7 +2420,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2504,7 +2429,6 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -2514,7 +2438,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -2534,7 +2457,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -2558,7 +2480,6 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, "license": "MIT", "bin": { "mime": "cli.js" @@ -2571,7 +2492,6 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -2581,7 +2501,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "license": "MIT", "dependencies": { "mime-db": "1.52.0" @@ -2610,7 +2529,6 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, "license": "MIT" }, "node_modules/natural-compare": { @@ -2624,7 +2542,6 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -2634,7 +2551,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -2644,7 +2560,6 @@ "version": "1.13.4", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -2657,7 +2572,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, "license": "MIT", "dependencies": { "ee-first": "1.1.1" @@ -2670,7 +2584,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -2743,7 +2656,6 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -2763,7 +2675,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -2773,7 +2684,6 @@ "version": "0.1.12", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", - "dev": true, "license": "MIT" }, "node_modules/picomatch": { @@ -2793,7 +2703,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.0.tgz", "integrity": "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=16.20.0" @@ -2813,7 +2722,6 @@ "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, "license": "MIT", "dependencies": { "forwarded": "0.2.0", @@ -2837,7 +2745,6 @@ "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "dev": true, "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.0.6" @@ -2874,7 +2781,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" @@ -2884,7 +2790,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", - "dev": true, "license": "MIT", "dependencies": { "bytes": "3.1.2", @@ -2900,7 +2805,6 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -2934,7 +2838,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", - "dev": true, "license": "MIT", "dependencies": { "debug": "^4.4.0", @@ -2951,7 +2854,6 @@ "version": "8.2.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=16" @@ -2985,7 +2887,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -3006,7 +2907,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, "license": "MIT" }, "node_modules/semver": { @@ -3026,7 +2926,6 @@ "version": "0.19.0", "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", - "dev": true, "license": "MIT", "dependencies": { "debug": "2.6.9", @@ -3051,7 +2950,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "license": "MIT", "dependencies": { "ms": "2.0.0" @@ -3061,14 +2959,12 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, "license": "MIT" }, "node_modules/send/node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -3078,7 +2974,6 @@ "version": "1.16.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", - "dev": true, "license": "MIT", "dependencies": { "encodeurl": "~2.0.0", @@ -3094,14 +2989,12 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true, "license": "ISC" }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" @@ -3114,7 +3007,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -3124,7 +3016,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -3144,7 +3035,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -3161,7 +3051,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "dev": true, "license": "MIT", "dependencies": { "call-bound": "^1.0.2", @@ -3180,7 +3069,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "dev": true, "license": "MIT", "dependencies": { "call-bound": "^1.0.2", @@ -3200,7 +3088,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -3249,7 +3136,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.6" @@ -3272,7 +3158,6 @@ "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, "license": "MIT", "dependencies": { "media-typer": "0.3.0", @@ -3498,7 +3383,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -3518,7 +3402,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4.0" @@ -3528,7 +3411,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.8" @@ -3538,7 +3420,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -3564,7 +3445,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, "license": "ISC" }, "node_modules/yocto-queue": { @@ -3581,23 +3461,21 @@ } }, "node_modules/zod": { - "version": "3.24.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.4.tgz", - "integrity": "sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==", - "dev": true, + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" } }, "node_modules/zod-to-json-schema": { - "version": "3.24.5", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.5.tgz", - "integrity": "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==", - "dev": true, + "version": "3.25.0", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.0.tgz", + "integrity": "sha512-HvWtU2UG41LALjajJrML6uQejQhNJx+JBO9IflpSja4R03iNWfKXrj6W2h7ljuLyc1nKS+9yDyL/9tD1U/yBnQ==", "license": "ISC", "peerDependencies": { - "zod": "^3.24.1" + "zod": "^3.25 || ^4" } } } diff --git a/package.json b/package.json index f234f79..9eb2ad7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iris-sdk", - "version": "0.2.1", + "version": "0.3.0", "author": "Speakeasy", "bin": { "mcp": "bin/mcp-server.js" @@ -18,27 +18,22 @@ "prepublishOnly": "npm run build" }, "peerDependencies": { - "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", - "zod": ">= 3" - }, - "peerDependenciesMeta": { - "@modelcontextprotocol/sdk": {"optional":true} + }, "devDependencies": { "@eslint/js": "^9.19.0", - "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", "@stricli/core": "^1.1.1", "@types/express": "^4.17.21", - "bun": "^1.2.2", - "bun-types": "^1.2.2", + "bun": "1.2.17", + "bun-types": "1.2.17", "eslint": "^9.19.0", "express": "^4.21.2", "globals": "^15.14.0", - "typescript": "^5.4.5", - "typescript-eslint": "^8.22.0", - "zod": "^3.23.4" + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" }, "dependencies": { - + "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", + "zod": "^3.25.0 || ^4.0.0" } } diff --git a/src/funcs/configGet.ts b/src/funcs/configGet.ts index 8ac6c82..7491b88 100644 --- a/src/funcs/configGet.ts +++ b/src/funcs/configGet.ts @@ -8,7 +8,6 @@ import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -16,6 +15,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -29,13 +30,14 @@ export function configGet( ): APIPromise< Result< components.ConfigResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -51,13 +53,14 @@ async function $do( [ Result< components.ConfigResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -69,9 +72,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getConfig", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -87,6 +91,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -107,18 +112,19 @@ async function $do( const [result] = await M.match< components.ConfigResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.ConfigResponseDto$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/configUpdate.ts b/src/funcs/configUpdate.ts index 034d923..23d26a6 100644 --- a/src/funcs/configUpdate.ts +++ b/src/funcs/configUpdate.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -32,13 +33,14 @@ export function configUpdate( ): APIPromise< Result< components.ConfigResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -56,13 +58,14 @@ async function $do( [ Result< components.ConfigResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -86,9 +89,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateConfig", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -105,6 +109,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -125,18 +130,19 @@ async function $do( const [result] = await M.match< components.ConfigResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.ConfigResponseDto$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/filesDelete.ts b/src/funcs/filesDelete.ts index 034dbb5..61407ce 100644 --- a/src/funcs/filesDelete.ts +++ b/src/funcs/filesDelete.ts @@ -9,7 +9,6 @@ import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -17,6 +16,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -32,13 +33,14 @@ export function filesDelete( ): APIPromise< Result< operations.DeleteFileResponseBody, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -56,13 +58,14 @@ async function $do( [ Result< operations.DeleteFileResponseBody, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -92,9 +95,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "deleteFile", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -111,6 +115,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -131,18 +136,19 @@ async function $do( const [result] = await M.match< operations.DeleteFileResponseBody, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, operations.DeleteFileResponseBody$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/filesDownload.ts b/src/funcs/filesDownload.ts index b630c62..d47144e 100644 --- a/src/funcs/filesDownload.ts +++ b/src/funcs/filesDownload.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { IrisSDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; @@ -10,7 +10,6 @@ import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -33,13 +34,14 @@ export function filesDownload( ): APIPromise< Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -57,13 +59,14 @@ async function $do( [ Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -93,9 +96,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "downloadFile", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -112,6 +116,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -132,18 +137,19 @@ async function $do( const [result] = await M.match< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(200, z.void()), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/filesGetInfo.ts b/src/funcs/filesGetInfo.ts index b5fecf7..8223c8b 100644 --- a/src/funcs/filesGetInfo.ts +++ b/src/funcs/filesGetInfo.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -33,13 +34,14 @@ export function filesGetInfo( ): APIPromise< Result< components.FileInfoDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -57,13 +59,14 @@ async function $do( [ Result< components.FileInfoDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -93,9 +96,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getFileInfo", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -112,6 +116,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -132,18 +137,19 @@ async function $do( const [result] = await M.match< components.FileInfoDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.FileInfoDto$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/filesList.ts b/src/funcs/filesList.ts index c4f083f..cd6efc9 100644 --- a/src/funcs/filesList.ts +++ b/src/funcs/filesList.ts @@ -2,14 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { IrisSDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -17,6 +16,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -30,13 +31,14 @@ export function filesList( ): APIPromise< Result< Array, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -52,13 +54,14 @@ async function $do( [ Result< Array, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -70,9 +73,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "listFiles", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -88,6 +92,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -108,18 +113,19 @@ async function $do( const [result] = await M.match< Array, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, z.array(components.FileInfoDto$inboundSchema)), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/filesUpload.ts b/src/funcs/filesUpload.ts index 7a4994e..a71f541 100644 --- a/src/funcs/filesUpload.ts +++ b/src/funcs/filesUpload.ts @@ -4,14 +4,16 @@ import { IrisSDKCore } from "../core.js"; import { appendForm } from "../lib/encodings.js"; -import { readableStreamToArrayBuffer } from "../lib/files.js"; +import { + getContentTypeFromFileName, + readableStreamToArrayBuffer, +} from "../lib/files.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -19,6 +21,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { isBlobLike } from "../types/blobs.js"; @@ -38,13 +42,14 @@ export function filesUpload( ): APIPromise< Result< components.FileUploadResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -62,13 +67,14 @@ async function $do( [ Result< components.FileUploadResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -88,13 +94,17 @@ async function $do( appendForm(body, "file", payload.file); } else if (isReadableStream(payload.file.content)) { const buffer = await readableStreamToArrayBuffer(payload.file.content); - const blob = new Blob([buffer], { type: "application/octet-stream" }); - appendForm(body, "file", blob); + const contentType = getContentTypeFromFileName(payload.file.fileName) + || "application/octet-stream"; + const blob = new Blob([buffer], { type: contentType }); + appendForm(body, "file", blob, payload.file.fileName); } else { + const contentType = getContentTypeFromFileName(payload.file.fileName) + || "application/octet-stream"; appendForm( body, "file", - new Blob([payload.file.content], { type: "application/octet-stream" }), + new Blob([payload.file.content], { type: contentType }), payload.file.fileName, ); } @@ -106,9 +116,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "uploadFile", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -125,6 +136,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -145,18 +157,19 @@ async function $do( const [result] = await M.match< components.FileUploadResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.FileUploadResponseDto$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/humanLayerApprove.ts b/src/funcs/humanLayerApprove.ts index da48d3e..2354362 100644 --- a/src/funcs/humanLayerApprove.ts +++ b/src/funcs/humanLayerApprove.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { IrisSDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; @@ -10,7 +10,6 @@ import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -33,13 +34,14 @@ export function humanLayerApprove( ): APIPromise< Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -57,13 +59,14 @@ async function $do( [ Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -93,9 +96,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "approveRequest", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -112,6 +116,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -132,18 +137,19 @@ async function $do( const [result] = await M.match< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil([200, 201], z.void()), M.fail([404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/humanLayerGetRequests.ts b/src/funcs/humanLayerGetRequests.ts index f5d26d3..f72d498 100644 --- a/src/funcs/humanLayerGetRequests.ts +++ b/src/funcs/humanLayerGetRequests.ts @@ -2,13 +2,12 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { IrisSDKCore } from "../core.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -16,6 +15,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -29,13 +30,14 @@ export function humanLayerGetRequests( ): APIPromise< Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -51,13 +53,14 @@ async function $do( [ Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -69,9 +72,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getRequests", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -87,6 +91,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -107,18 +112,19 @@ async function $do( const [result] = await M.match< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(200, z.void()), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/irisArtifactsDownloadFile.ts b/src/funcs/irisArtifactsDownloadFile.ts index d7424fe..1bf2970 100644 --- a/src/funcs/irisArtifactsDownloadFile.ts +++ b/src/funcs/irisArtifactsDownloadFile.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { IrisSDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; @@ -10,7 +10,6 @@ import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -33,13 +34,14 @@ export function irisArtifactsDownloadFile( ): APIPromise< Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -57,13 +59,14 @@ async function $do( [ Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -96,9 +99,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "downloadArtifactFile", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -115,6 +119,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -135,18 +140,19 @@ async function $do( const [result] = await M.match< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(200, z.void()), M.fail([400, 404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/irisArtifactsDownloadFolder.ts b/src/funcs/irisArtifactsDownloadFolder.ts index dcdd7e9..8b0ab35 100644 --- a/src/funcs/irisArtifactsDownloadFolder.ts +++ b/src/funcs/irisArtifactsDownloadFolder.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { IrisSDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; @@ -10,7 +10,6 @@ import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -33,13 +34,14 @@ export function irisArtifactsDownloadFolder( ): APIPromise< Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -57,13 +59,14 @@ async function $do( [ Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -96,9 +99,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "downloadArtifactFolder", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -115,6 +119,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -135,18 +140,19 @@ async function $do( const [result] = await M.match< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(200, z.void()), M.fail([400, 404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/irisArtifactsList.ts b/src/funcs/irisArtifactsList.ts index 5326b18..d8df49d 100644 --- a/src/funcs/irisArtifactsList.ts +++ b/src/funcs/irisArtifactsList.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -33,13 +34,14 @@ export function irisArtifactsList( ): APIPromise< Result< components.ArtifactsContentDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -57,13 +59,14 @@ async function $do( [ Result< components.ArtifactsContentDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -90,9 +93,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "listArtifacts", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -110,6 +114,7 @@ async function $do( headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -130,18 +135,19 @@ async function $do( const [result] = await M.match< components.ArtifactsContentDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.ArtifactsContentDto$inboundSchema), M.fail([400, 404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/operatorsGetTypes.ts b/src/funcs/operatorsGetTypes.ts index 5733f04..95fc4d9 100644 --- a/src/funcs/operatorsGetTypes.ts +++ b/src/funcs/operatorsGetTypes.ts @@ -8,7 +8,6 @@ import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -16,6 +15,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -32,13 +33,14 @@ export function operatorsGetTypes( ): APIPromise< Result< components.OperatorTypesDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -54,13 +56,14 @@ async function $do( [ Result< components.OperatorTypesDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -72,9 +75,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getOperatorTypes", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -90,6 +94,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -110,18 +115,19 @@ async function $do( const [result] = await M.match< components.OperatorTypesDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.OperatorTypesDto$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/rpaBatchExecute.ts b/src/funcs/rpaBatchExecute.ts index 07a056f..b07d746 100644 --- a/src/funcs/rpaBatchExecute.ts +++ b/src/funcs/rpaBatchExecute.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -35,13 +36,14 @@ export function rpaBatchExecute( ): APIPromise< Result< components.SimpleSuccessResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -59,13 +61,14 @@ async function $do( [ Result< components.SimpleSuccessResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -89,9 +92,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "batchExecute", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -108,6 +112,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -128,18 +133,19 @@ async function $do( const [result] = await M.match< components.SimpleSuccessResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(201, components.SimpleSuccessResponseDto$inboundSchema), M.fail([400, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/rpaGetParameterTemplate.ts b/src/funcs/rpaGetParameterTemplate.ts index 4f95eb8..65d7669 100644 --- a/src/funcs/rpaGetParameterTemplate.ts +++ b/src/funcs/rpaGetParameterTemplate.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function rpaGetParameterTemplate( ): APIPromise< Result< components.ParameterTemplateResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< components.ParameterTemplateResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -99,9 +102,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getParameterTemplate", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -118,6 +122,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -138,18 +143,19 @@ async function $do( const [result] = await M.match< components.ParameterTemplateResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.ParameterTemplateResponseDto$inboundSchema), M.fail([400, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/rpaGetStatus.ts b/src/funcs/rpaGetStatus.ts index 5e4e4b5..a58ac9f 100644 --- a/src/funcs/rpaGetStatus.ts +++ b/src/funcs/rpaGetStatus.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function rpaGetStatus( ): APIPromise< Result< components.RpaExecutionStatusDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< components.RpaExecutionStatusDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -96,9 +99,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getExecutionStatus", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -115,6 +119,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -135,18 +140,19 @@ async function $do( const [result] = await M.match< components.RpaExecutionStatusDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.RpaExecutionStatusDto$inboundSchema), M.fail([404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/rpaStartExecution.ts b/src/funcs/rpaStartExecution.ts index d9d5021..ddd313c 100644 --- a/src/funcs/rpaStartExecution.ts +++ b/src/funcs/rpaStartExecution.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -35,13 +36,14 @@ export function rpaStartExecution( ): APIPromise< Result< components.RpaExecutionStatusDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -59,13 +61,14 @@ async function $do( [ Result< components.RpaExecutionStatusDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -89,9 +92,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "startExecution", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -108,6 +112,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -128,18 +133,19 @@ async function $do( const [result] = await M.match< components.RpaExecutionStatusDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(201, components.RpaExecutionStatusDto$inboundSchema), M.fail([400, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/rpaStopExecution.ts b/src/funcs/rpaStopExecution.ts index 54539bd..46e3781 100644 --- a/src/funcs/rpaStopExecution.ts +++ b/src/funcs/rpaStopExecution.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function rpaStopExecution( ): APIPromise< Result< components.RpaExecutionStatusDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< components.RpaExecutionStatusDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -96,9 +99,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "stopExecution", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -115,6 +119,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -135,18 +140,19 @@ async function $do( const [result] = await M.match< components.RpaExecutionStatusDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.RpaExecutionStatusDto$inboundSchema), M.fail([404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videoEditingDeleteFrame.ts b/src/funcs/videoEditingDeleteFrame.ts index cf4005e..f3dff51 100644 --- a/src/funcs/videoEditingDeleteFrame.ts +++ b/src/funcs/videoEditingDeleteFrame.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function videoEditingDeleteFrame( ): APIPromise< Result< components.SuccessResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< components.SuccessResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -100,9 +103,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "deleteFrame", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -119,6 +123,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -139,18 +144,19 @@ async function $do( const [result] = await M.match< components.SuccessResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.SuccessResponseDto$inboundSchema), M.fail([404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videoEditingRegenerate.ts b/src/funcs/videoEditingRegenerate.ts index b09e8fd..f6ce654 100644 --- a/src/funcs/videoEditingRegenerate.ts +++ b/src/funcs/videoEditingRegenerate.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function videoEditingRegenerate( ): APIPromise< Result< components.SuccessResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< components.SuccessResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -96,9 +99,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "regenerateVideo", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -115,6 +119,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -135,18 +140,19 @@ async function $do( const [result] = await M.match< components.SuccessResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(201, components.SuccessResponseDto$inboundSchema), M.fail([404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videoEditingUpdateCaption.ts b/src/funcs/videoEditingUpdateCaption.ts index 809030a..4fceab4 100644 --- a/src/funcs/videoEditingUpdateCaption.ts +++ b/src/funcs/videoEditingUpdateCaption.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function videoEditingUpdateCaption( ): APIPromise< Result< components.SuccessResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< components.SuccessResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -101,9 +104,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "updateCaption", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -120,6 +124,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -140,18 +145,19 @@ async function $do( const [result] = await M.match< components.SuccessResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.SuccessResponseDto$inboundSchema), M.fail([404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videoExecuteRpa.ts b/src/funcs/videoExecuteRpa.ts index d671390..af8e674 100644 --- a/src/funcs/videoExecuteRpa.ts +++ b/src/funcs/videoExecuteRpa.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { IrisSDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; @@ -10,7 +10,6 @@ import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function videoExecuteRpa( ): APIPromise< Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -96,9 +99,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "executeRpaSteps", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -115,6 +119,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -135,18 +140,19 @@ async function $do( const [result] = await M.match< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(200, z.void()), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videoGetAnalysisResults.ts b/src/funcs/videoGetAnalysisResults.ts index 2caafa1..697c8fc 100644 --- a/src/funcs/videoGetAnalysisResults.ts +++ b/src/funcs/videoGetAnalysisResults.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -33,13 +34,14 @@ export function videoGetAnalysisResults( ): APIPromise< Result< components.RpaStepsDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -57,13 +59,14 @@ async function $do( [ Result< components.RpaStepsDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -93,9 +96,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getAnalysisResults", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -112,6 +116,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -132,18 +137,19 @@ async function $do( const [result] = await M.match< components.RpaStepsDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.RpaStepsDto$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videoStreamOriginal.ts b/src/funcs/videoStreamOriginal.ts index df5fdd7..80f0af4 100644 --- a/src/funcs/videoStreamOriginal.ts +++ b/src/funcs/videoStreamOriginal.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { IrisSDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; @@ -10,7 +10,6 @@ import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -30,13 +31,14 @@ export function videoStreamOriginal( ): APIPromise< Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -54,13 +56,14 @@ async function $do( [ Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -91,9 +94,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "streamOriginalVideo", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -110,6 +114,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -130,18 +135,19 @@ async function $do( const [result] = await M.match< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(200, z.void()), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videoStreamProcessed.ts b/src/funcs/videoStreamProcessed.ts index 15f9f83..ebb33ab 100644 --- a/src/funcs/videoStreamProcessed.ts +++ b/src/funcs/videoStreamProcessed.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { IrisSDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; @@ -10,7 +10,6 @@ import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -30,13 +31,14 @@ export function videoStreamProcessed( ): APIPromise< Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -54,13 +56,14 @@ async function $do( [ Result< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -91,9 +94,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "streamProcessedVideo", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -110,6 +114,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -130,18 +135,19 @@ async function $do( const [result] = await M.match< void, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(200, z.void()), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videoUpload.ts b/src/funcs/videoUpload.ts index 7df0cc7..5f665a4 100644 --- a/src/funcs/videoUpload.ts +++ b/src/funcs/videoUpload.ts @@ -4,14 +4,16 @@ import { IrisSDKCore } from "../core.js"; import { appendForm } from "../lib/encodings.js"; -import { readableStreamToArrayBuffer } from "../lib/files.js"; +import { + getContentTypeFromFileName, + readableStreamToArrayBuffer, +} from "../lib/files.js"; import * as M from "../lib/matchers.js"; import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -19,6 +21,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { isBlobLike } from "../types/blobs.js"; @@ -38,13 +42,14 @@ export function videoUpload( ): APIPromise< Result< components.VideoAnalysisResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -62,13 +67,14 @@ async function $do( [ Result< components.VideoAnalysisResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -88,13 +94,17 @@ async function $do( appendForm(body, "file", payload.file); } else if (isReadableStream(payload.file.content)) { const buffer = await readableStreamToArrayBuffer(payload.file.content); - const blob = new Blob([buffer], { type: "application/octet-stream" }); - appendForm(body, "file", blob); + const contentType = getContentTypeFromFileName(payload.file.fileName) + || "application/octet-stream"; + const blob = new Blob([buffer], { type: contentType }); + appendForm(body, "file", blob, payload.file.fileName); } else { + const contentType = getContentTypeFromFileName(payload.file.fileName) + || "application/octet-stream"; appendForm( body, "file", - new Blob([payload.file.content], { type: "application/octet-stream" }), + new Blob([payload.file.content], { type: contentType }), payload.file.fileName, ); } @@ -106,9 +116,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "uploadVideo", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -125,6 +136,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -145,18 +157,19 @@ async function $do( const [result] = await M.match< components.VideoAnalysisResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.VideoAnalysisResponseDto$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videosDeleteRecording.ts b/src/funcs/videosDeleteRecording.ts index 0af15d6..519b5c3 100644 --- a/src/funcs/videosDeleteRecording.ts +++ b/src/funcs/videosDeleteRecording.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function videosDeleteRecording( ): APIPromise< Result< components.DeleteRecordingResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< components.DeleteRecordingResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -96,9 +99,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "deleteRecording", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -115,6 +119,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -135,18 +140,19 @@ async function $do( const [result] = await M.match< components.DeleteRecordingResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.DeleteRecordingResponseDto$inboundSchema), M.fail([404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videosDownload.ts b/src/funcs/videosDownload.ts index 341aaa9..bd8dae4 100644 --- a/src/funcs/videosDownload.ts +++ b/src/funcs/videosDownload.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { IrisSDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; @@ -10,7 +10,6 @@ import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function videosDownload( ): APIPromise< Result< ReadableStream, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< ReadableStream, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -96,9 +99,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "downloadRecording", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -115,6 +119,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -135,20 +140,21 @@ async function $do( const [result] = await M.match< ReadableStream, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.stream(200, z.instanceof(ReadableStream), { ctype: "application/zip", }), M.fail([404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videosGenerate.ts b/src/funcs/videosGenerate.ts index d4bc218..fcc486d 100644 --- a/src/funcs/videosGenerate.ts +++ b/src/funcs/videosGenerate.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function videosGenerate( ): APIPromise< Result< components.GenerateVideoResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< components.GenerateVideoResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -97,9 +100,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "generateVideo", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -116,6 +120,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -136,18 +141,19 @@ async function $do( const [result] = await M.match< components.GenerateVideoResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(201, components.GenerateVideoResponseDto$inboundSchema), M.fail([400, 404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videosGetCurrentSessionData.ts b/src/funcs/videosGetCurrentSessionData.ts index 331540b..ac891b5 100644 --- a/src/funcs/videosGetCurrentSessionData.ts +++ b/src/funcs/videosGetCurrentSessionData.ts @@ -8,7 +8,6 @@ import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -16,6 +15,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -32,13 +33,14 @@ export function videosGetCurrentSessionData( ): APIPromise< Result< components.CurrentSessionVideoDataResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -54,13 +56,14 @@ async function $do( [ Result< components.CurrentSessionVideoDataResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -72,9 +75,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getCurrentSessionVideoData", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -90,6 +94,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -110,18 +115,19 @@ async function $do( const [result] = await M.match< components.CurrentSessionVideoDataResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.CurrentSessionVideoDataResponseDto$inboundSchema), M.fail([400, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videosGetFramesAndCaptions.ts b/src/funcs/videosGetFramesAndCaptions.ts index a60d6ee..7abc91d 100644 --- a/src/funcs/videosGetFramesAndCaptions.ts +++ b/src/funcs/videosGetFramesAndCaptions.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function videosGetFramesAndCaptions( ): APIPromise< Result< components.FramesAndCaptionsResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< components.FramesAndCaptionsResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -97,9 +100,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getFramesAndCaptions", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -116,6 +120,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -136,18 +141,19 @@ async function $do( const [result] = await M.match< components.FramesAndCaptionsResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.FramesAndCaptionsResponseDto$inboundSchema), M.fail([404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videosGetMetadata.ts b/src/funcs/videosGetMetadata.ts index 77566be..ff624dc 100644 --- a/src/funcs/videosGetMetadata.ts +++ b/src/funcs/videosGetMetadata.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function videosGetMetadata( ): APIPromise< Result< components.RecordingResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< components.RecordingResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -97,9 +100,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getRecordingMetadata", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -116,6 +120,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -136,18 +141,19 @@ async function $do( const [result] = await M.match< components.RecordingResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.RecordingResponseDto$inboundSchema), M.fail([404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videosGetRecordingData.ts b/src/funcs/videosGetRecordingData.ts index 6167beb..4a501b1 100644 --- a/src/funcs/videosGetRecordingData.ts +++ b/src/funcs/videosGetRecordingData.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function videosGetRecordingData( ): APIPromise< Result< components.SessionReplayDataResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< components.SessionReplayDataResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -97,9 +100,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getRecordingVideoData", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -116,6 +120,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -136,18 +141,19 @@ async function $do( const [result] = await M.match< components.SessionReplayDataResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.SessionReplayDataResponseDto$inboundSchema), M.fail([404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videosGetStatus.ts b/src/funcs/videosGetStatus.ts index a218b08..5b0e629 100644 --- a/src/funcs/videosGetStatus.ts +++ b/src/funcs/videosGetStatus.ts @@ -10,7 +10,6 @@ import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function videosGetStatus( ): APIPromise< Result< components.VideoStatusResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< components.VideoStatusResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -96,9 +99,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getVideoStatus", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -115,6 +119,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -135,18 +140,19 @@ async function $do( const [result] = await M.match< components.VideoStatusResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.VideoStatusResponseDto$inboundSchema), M.fail([404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videosGetThumbnail.ts b/src/funcs/videosGetThumbnail.ts index 67e80ab..b685b19 100644 --- a/src/funcs/videosGetThumbnail.ts +++ b/src/funcs/videosGetThumbnail.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { IrisSDKCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; @@ -10,7 +10,6 @@ import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -18,6 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -36,13 +37,14 @@ export function videosGetThumbnail( ): APIPromise< Result< ReadableStream, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -60,13 +62,14 @@ async function $do( [ Result< ReadableStream, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -97,9 +100,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "getRecordingThumbnail", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -116,6 +120,7 @@ async function $do( path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -136,20 +141,21 @@ async function $do( const [result] = await M.match< ReadableStream, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.stream(200, z.instanceof(ReadableStream), { ctype: "image/png", }), M.fail([404, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videosList.ts b/src/funcs/videosList.ts index 603558d..bce8502 100644 --- a/src/funcs/videosList.ts +++ b/src/funcs/videosList.ts @@ -8,7 +8,6 @@ import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -16,6 +15,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -32,13 +33,14 @@ export function videosList( ): APIPromise< Result< components.RecordingListResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -54,13 +56,14 @@ async function $do( [ Result< components.RecordingListResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -72,9 +75,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "listRecordings", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -90,6 +94,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -110,18 +115,19 @@ async function $do( const [result] = await M.match< components.RecordingListResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, components.RecordingListResponseDto$inboundSchema), M.fail("4XX"), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videosSaveCurrentSession.ts b/src/funcs/videosSaveCurrentSession.ts index 2ee116e..1ca67ca 100644 --- a/src/funcs/videosSaveCurrentSession.ts +++ b/src/funcs/videosSaveCurrentSession.ts @@ -8,7 +8,6 @@ import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -16,6 +15,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; @@ -32,13 +33,14 @@ export function videosSaveCurrentSession( ): APIPromise< Result< components.SaveSessionRecordingResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -54,13 +56,14 @@ async function $do( [ Result< components.SaveSessionRecordingResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -72,9 +75,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "saveCurrentSession", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -90,6 +94,7 @@ async function $do( baseURL: options?.serverURL, path: path, headers: headers, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -110,18 +115,19 @@ async function $do( const [result] = await M.match< components.SaveSessionRecordingResponseDto, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(201, components.SaveSessionRecordingResponseDto$inboundSchema), M.fail([400, "4XX"]), M.fail("5XX"), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/videosStream.ts b/src/funcs/videosStream.ts index 7058772..56b452a 100644 --- a/src/funcs/videosStream.ts +++ b/src/funcs/videosStream.ts @@ -9,7 +9,6 @@ import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, InvalidRequestError, @@ -17,6 +16,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; +import { IrisSDKError } from "../models/errors/irissdkerror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; import { APICall, APIPromise } from "../types/async.js"; @@ -41,13 +42,14 @@ export function videosStream( ): APIPromise< Result< operations.StreamVideoResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > > { return new APIPromise($do( @@ -65,13 +67,14 @@ async function $do( [ Result< operations.StreamVideoResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >, APICall, ] @@ -106,9 +109,10 @@ async function $do( })); const context = { + options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "streamVideo", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: null, @@ -126,6 +130,7 @@ async function $do( headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { @@ -146,13 +151,14 @@ async function $do( const [result] = await M.match< operations.StreamVideoResponse, - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | IrisSDKError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.stream(200, operations.StreamVideoResponse$inboundSchema, { ctype: "video/mp4", @@ -174,7 +180,7 @@ async function $do( }), M.fail([404, "4XX"]), M.fail([500, "5XX"]), - )(response); + )(response, req); if (!result.ok) { return [result, { status: "complete", request: req, response }]; } diff --git a/src/hooks/hooks.ts b/src/hooks/hooks.ts index d34c884..fc9b13b 100644 --- a/src/hooks/hooks.ts +++ b/src/hooks/hooks.ts @@ -18,8 +18,6 @@ import { SDKInitOptions, } from "./types.js"; -import { initHooks } from "./registration.js"; - export class SDKHooks implements Hooks { sdkInitHooks: SDKInitHook[] = []; beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; @@ -47,7 +45,6 @@ export class SDKHooks implements Hooks { this.registerAfterErrorHook(hook); } } - initHooks(this); } registerSDKInitHook(hook: SDKInitHook) { diff --git a/src/hooks/types.ts b/src/hooks/types.ts index 1d56c6f..8bfe4fe 100644 --- a/src/hooks/types.ts +++ b/src/hooks/types.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import { SDKOptions } from "../lib/config.js"; import { HTTPClient, RequestInput } from "../lib/http.js"; import { RetryConfig } from "../lib/retries.js"; import { SecurityState } from "../lib/security.js"; @@ -13,6 +14,7 @@ export type HookContext = { securitySource?: any | (() => Promise); retryConfig: RetryConfig; resolvedSecurity: SecurityState | null; + options: SDKOptions; }; export type Awaitable = T | Promise; diff --git a/src/index.ts b/src/index.ts index 5ddc765..dbcba16 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,4 +4,6 @@ export * from "./lib/config.js"; export * as files from "./lib/files.js"; +export { HTTPClient } from "./lib/http.js"; +export type { Fetcher, HTTPClientOptions } from "./lib/http.js"; export * from "./sdk/sdk.js"; diff --git a/src/lib/base64.ts b/src/lib/base64.ts index c2d5b38..0aebd8b 100644 --- a/src/lib/base64.ts +++ b/src/lib/base64.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; export function bytesToBase64(u8arr: Uint8Array): string { return btoa(String.fromCodePoint(...u8arr)); diff --git a/src/lib/config.ts b/src/lib/config.ts index 961d66f..a5605b5 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -27,6 +27,10 @@ export type SDKOptions = { * Allows overriding the default server URL used by the SDK */ serverURL?: string | undefined; + /** + * Allows overriding the default user agent used by the SDK + */ + userAgent?: string | undefined; /** * Allows overriding the default retry config used by the SDK */ @@ -55,7 +59,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.1.0", - sdkVersion: "0.2.1", - genVersion: "2.604.2", - userAgent: "speakeasy-sdk/typescript 0.2.1 2.604.2 0.1.0 iris-sdk", + sdkVersion: "0.3.0", + genVersion: "2.768.1", + userAgent: "speakeasy-sdk/typescript 0.3.0 2.768.1 0.1.0 iris-sdk", } as const; diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts index 25c9dcb..31cd373 100644 --- a/src/lib/encodings.ts +++ b/src/lib/encodings.ts @@ -102,8 +102,9 @@ export function encodeLabel( }); encValue = mapped?.join("").slice(1); } else { - const k = - options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; + const k = options?.explode && isPlainObject(value) + ? `${encodeString(pk)}=` + : ""; encValue = `${k}${encodeValue(pv)}`; } @@ -426,6 +427,7 @@ export function queryJoin(...args: (string | undefined)[]): string { type QueryEncoderOptions = { explode?: boolean; charEncoding?: "percent" | "none"; + allowEmptyValue?: string[]; }; type QueryEncoder = ( @@ -440,7 +442,7 @@ type BulkQueryEncoder = ( ) => string; export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { - const bulkEncode = function ( + const bulkEncode = function( values: Record, options?: QueryEncoderOptions, ): string { @@ -450,7 +452,19 @@ export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { charEncoding: options?.charEncoding ?? "percent", }; + const allowEmptySet = new Set(options?.allowEmptyValue ?? []); + const encoded = Object.entries(values).map(([key, value]) => { + if (allowEmptySet.has(key)) { + if ( + value === undefined + || value === null + || value === "" + || (Array.isArray(value) && value.length === 0) + ) { + return `${encodeURIComponent(key)}=`; + } + } return f(key, value, opts); }); return queryJoin(...encoded); diff --git a/src/lib/env.ts b/src/lib/env.ts index a9bfcfd..61857bf 100644 --- a/src/lib/env.ts +++ b/src/lib/env.ts @@ -2,10 +2,9 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod/v3"; import { dlv } from "./dlv.js"; -import * as z from "zod"; - export interface Env { IRISSDK_DEBUG?: boolean | undefined; } @@ -14,6 +13,18 @@ export const envSchema: z.ZodType = z.object({ IRISSDK_DEBUG: z.coerce.boolean().optional(), }); +/** + * Checks for the existence of the Deno global object to determine the environment. + * @returns {boolean} True if the runtime is Deno, false otherwise. + */ +function isDeno() { + if ("Deno" in globalThis) { + return true; + } + + return false; +} + let envMemo: Env | undefined = undefined; /** * Reads and validates environment variables. @@ -23,9 +34,14 @@ export function env(): Env { return envMemo; } - envMemo = envSchema.parse( - dlv(globalThis, "process.env") ?? dlv(globalThis, "Deno.env") ?? {}, - ); + let envObject: Record = {}; + if (isDeno()) { + envObject = (globalThis as any).Deno?.env?.toObject?.() ?? {}; + } else { + envObject = dlv(globalThis, "process.env") ?? {}; + } + + envMemo = envSchema.parse(envObject); return envMemo; } diff --git a/src/lib/files.ts b/src/lib/files.ts index 59d15f0..0344cd0 100644 --- a/src/lib/files.ts +++ b/src/lib/files.ts @@ -38,3 +38,45 @@ export async function readableStreamToArrayBuffer( return concatenatedChunks.buffer as ArrayBuffer; } + +/** + * Determines the MIME content type based on a file's extension. + * Returns null if the extension is not recognized. + */ +export function getContentTypeFromFileName(fileName: string): string | null { + if (!fileName) return null; + + const ext = fileName.toLowerCase().split(".").pop(); + if (!ext) return null; + + const mimeTypes: Record = { + json: "application/json", + xml: "application/xml", + html: "text/html", + htm: "text/html", + txt: "text/plain", + csv: "text/csv", + pdf: "application/pdf", + png: "image/png", + jpg: "image/jpeg", + jpeg: "image/jpeg", + gif: "image/gif", + svg: "image/svg+xml", + js: "application/javascript", + css: "text/css", + zip: "application/zip", + tar: "application/x-tar", + gz: "application/gzip", + mp4: "video/mp4", + mp3: "audio/mpeg", + wav: "audio/wav", + webp: "image/webp", + ico: "image/x-icon", + woff: "font/woff", + woff2: "font/woff2", + ttf: "font/ttf", + otf: "font/otf", + }; + + return mimeTypes[ext] || null; +} diff --git a/src/lib/matchers.ts b/src/lib/matchers.ts index 17151be..77d4108 100644 --- a/src/lib/matchers.ts +++ b/src/lib/matchers.ts @@ -3,11 +3,10 @@ */ import { APIError } from "../models/errors/apierror.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { ERR, OK, Result } from "../types/fp.js"; import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js"; import { isPlainObject } from "./is-plain-object.js"; -import { safeParse } from "./schemas.js"; export type Encoding = | "jsonl" @@ -176,17 +175,19 @@ export type MatchedError = Matchers extends Matcher[] : never; export type MatchFunc = ( response: Response, + request: Request, options?: { resultKey?: string; extraFields?: Record }, ) => Promise<[result: Result, raw: unknown]>; export function match( ...matchers: Array> -): MatchFunc { +): MatchFunc { return async function matchFunc( response: Response, + request: Request, options?: { resultKey?: string; extraFields?: Record }, ): Promise< - [result: Result, raw: unknown] + [result: Result, raw: unknown] > { let raw: unknown; let matcher: Matcher | undefined; @@ -205,21 +206,22 @@ export function match( } if (!matcher) { - const responseBody = await response.text(); return [{ ok: false, - error: new APIError( - "Unexpected API response status or content-type", + error: new APIError("Unexpected Status or Content-Type", { response, - responseBody, - ), - }, responseBody]; + request, + body: await response.text().catch(() => ""), + }), + }, raw]; } const encoding = matcher.enc; + let body = ""; switch (encoding) { case "json": - raw = await response.json(); + body = await response.text(); + raw = JSON.parse(body); break; case "jsonl": raw = response.body; @@ -231,16 +233,19 @@ export function match( raw = response.body; break; case "text": - raw = await response.text(); + body = await response.text(); + raw = body; break; case "sse": raw = response.body; break; case "nil": - raw = await discardResponseBody(response); + body = await response.text(); + raw = undefined; break; case "fail": - raw = await response.text(); + body = await response.text(); + raw = body; break; default: encoding satisfies never; @@ -250,11 +255,7 @@ export function match( if (matcher.enc === "fail") { return [{ ok: false, - error: new APIError( - "API error occurred", - response, - typeof raw === "string" ? raw : "", - ), + error: new APIError("API error occurred", { request, response, body }), }, raw]; } @@ -266,6 +267,9 @@ export function match( ...options?.extraFields, ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), ...(isPlainObject(raw) ? raw : null), + request$: request, + response$: response, + body$: body, }; } else if (resultKey) { data = { @@ -284,18 +288,20 @@ export function match( } if ("err" in matcher) { - const result = safeParse( + const result = safeParseResponse( data, (v: unknown) => matcher.schema.parse(v), "Response validation failed", + { request, response, body }, ); return [result.ok ? { ok: false, error: result.value } : result, raw]; } else { return [ - safeParse( + safeParseResponse( data, (v: unknown) => matcher.schema.parse(v), "Response validation failed", + { request, response, body }, ), raw, ]; @@ -318,25 +324,22 @@ export function unpackHeaders(headers: Headers): Record { return out; } -/** - * Discards the response body to free up resources. - * - * To learn why this is need, see the undici docs: - * https://undici.nodejs.org/#/?id=garbage-collection - */ -export async function discardResponseBody(res: Response) { - const reader = res.body?.getReader(); - if (reader == null) { - return; - } - +function safeParseResponse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, + httpMeta: { response: Response; request: Request; body: string }, +): Result { try { - let done = false; - while (!done) { - const res = await reader.read(); - done = res.done; - } - } finally { - reader.releaseLock(); + return OK(fn(rawValue)); + } catch (err) { + return ERR( + new ResponseValidationError(errorMessage, { + cause: err, + rawValue, + rawMessage: errorMessage, + ...httpMeta, + }), + ); } } diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index 0e340b7..47edb97 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -9,7 +9,7 @@ import { ZodObject, ZodRawShape, ZodTypeAny, -} from "zod"; +} from "zod/v3"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import { ERR, OK, Result } from "../types/fp.js"; diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 2fdad0c..717944c 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -65,6 +65,7 @@ type RequestConfig = { headers?: HeadersInit; security?: SecurityState | null; uaHeader?: string; + userAgent?: string | undefined; timeoutMs?: number; }; @@ -96,19 +97,21 @@ export class ClientSDK { } else { this.#hooks = new SDKHooks(); } - this._options = { ...options, hooks: this.#hooks }; - const url = serverURLFromOptions(options); if (url) { url.pathname = url.pathname.replace(/\/+$/, "") + "/"; } + const { baseURL, client } = this.#hooks.sdkInit({ baseURL: url, client: options.httpClient || new HTTPClient(), }); this._baseURL = baseURL; this.#httpClient = client; - this.#logger = options.debugLogger; + + this._options = { ...options, hooks: this.#hooks }; + + this.#logger = this._options.debugLogger; if (!this.#logger && env().IRISSDK_DEBUG) { this.#logger = console; } @@ -184,7 +187,10 @@ export class ClientSDK { // Only set user agent header in non-browser-like environments since CORS // policy disallows setting it in browsers e.g. Chrome throws an error. if (!isBrowserLike) { - headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); + headers.set( + conf.uaHeader ?? "user-agent", + conf.userAgent ?? SDK_METADATA.userAgent, + ); } const fetchOptions: Omit = { diff --git a/src/lib/security.ts b/src/lib/security.ts index 4d918d6..7506265 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -4,8 +4,8 @@ type OAuth2PasswordFlow = { username: string; - password?: string | undefined; - clientID: string; + password: string; + clientID?: string | undefined; clientSecret?: string | undefined; tokenURL: string; }; @@ -81,7 +81,10 @@ type SecurityInputOAuth2 = { type SecurityInputOAuth2ClientCredentials = { type: "oauth2:client_credentials"; value: - | { clientID?: string | undefined; clientSecret?: string | undefined } + | { + clientID?: string | undefined; + clientSecret?: string | undefined; + } | null | string | undefined; diff --git a/src/lib/url.ts b/src/lib/url.ts index 6bc6356..f3a8de6 100644 --- a/src/lib/url.ts +++ b/src/lib/url.ts @@ -10,7 +10,7 @@ export function pathToFunc( pathPattern: string, options?: { charEncoding?: "percent" | "none" }, ): (params?: Params) => string { - const paramRE = /\{([a-zA-Z0-9_]+?)\}/g; + const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g; return function buildURLPath(params: Record = {}): string { return pathPattern.replace(paramRE, function (_, placeholder) { diff --git a/src/mcp-server/cli/start/command.ts b/src/mcp-server/cli/start/command.ts index a577a83..08354d0 100644 --- a/src/mcp-server/cli/start/command.ts +++ b/src/mcp-server/cli/start/command.ts @@ -2,11 +2,9 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { buildCommand } from "@stricli/core"; -import { numberParser } from "@stricli/core"; -import * as z from "zod"; +import { buildCommand, numberParser } from "@stricli/core"; +import * as z from "zod/v3"; import { consoleLoggerLevels } from "../../console-logger.js"; -import { mcpScopes } from "../../scopes.js"; export const startCommand = buildCommand({ loader: async () => { @@ -37,18 +35,6 @@ export const startCommand = buildCommand({ return z.string().parse(value); }, }, - ...(mcpScopes.length - ? { - scope: { - kind: "enum", - brief: - "Mount tools/resources that match given scope (repeatable flag)", - values: mcpScopes, - variadic: true, - optional: true, - }, - } - : {}), "server-url": { kind: "parsed", brief: "Overrides the default server URL used by the SDK", diff --git a/src/mcp-server/cli/start/impl.ts b/src/mcp-server/cli/start/impl.ts index bad018b..74d11fd 100644 --- a/src/mcp-server/cli/start/impl.ts +++ b/src/mcp-server/cli/start/impl.ts @@ -11,14 +11,12 @@ import { ConsoleLoggerLevel, createConsoleLogger, } from "../../console-logger.js"; -import { MCPScope } from "../../scopes.js"; import { createMCPServer } from "../../server.js"; interface StartCommandFlags { readonly transport: "stdio" | "sse"; readonly port: number; readonly tool?: string[]; - readonly scope?: MCPScope[]; readonly "server-url"?: string; readonly "server-index"?: SDKOptions["serverIdx"]; readonly "log-level": ConsoleLoggerLevel; @@ -48,7 +46,6 @@ async function startStdio(flags: StartCommandFlags) { const server = createMCPServer({ logger, allowedTools: flags.tool, - scopes: flags.scope, serverURL: flags["server-url"], serverIdx: flags["server-index"], }); @@ -68,7 +65,6 @@ async function startSSE(flags: StartCommandFlags) { const mcpServer = createMCPServer({ logger, allowedTools: flags.tool, - scopes: flags.scope, serverURL: flags["server-url"], serverIdx: flags["server-index"], }); diff --git a/src/mcp-server/extensions.ts b/src/mcp-server/extensions.ts index 7aab280..0955a57 100644 --- a/src/mcp-server/extensions.ts +++ b/src/mcp-server/extensions.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ZodRawShape } from "zod"; +import { ZodRawShape } from "zod/v3"; import { PromptArgsRawShape, PromptDefinition } from "./prompts.js"; import { ResourceDefinition, ResourceTemplateDefinition } from "./resources.js"; import { ToolDefinition } from "./tools.js"; diff --git a/src/mcp-server/mcp-server.ts b/src/mcp-server/mcp-server.ts index abd8c81..a70686a 100644 --- a/src/mcp-server/mcp-server.ts +++ b/src/mcp-server/mcp-server.ts @@ -19,7 +19,7 @@ const routes = buildRouteMap({ export const app = buildApplication(routes, { name: "mcp", versionInfo: { - currentVersion: "0.2.1", + currentVersion: "0.3.0", }, }); diff --git a/src/mcp-server/prompts.ts b/src/mcp-server/prompts.ts index 67dca07..f887af9 100644 --- a/src/mcp-server/prompts.ts +++ b/src/mcp-server/prompts.ts @@ -11,7 +11,7 @@ import { ZodType, ZodTypeAny, ZodTypeDef, -} from "zod"; +} from "zod/v3"; import { IrisSDKCore } from "../core.js"; import { ConsoleLogger } from "./console-logger.js"; import { MCPScope } from "./scopes.js"; diff --git a/src/mcp-server/server.ts b/src/mcp-server/server.ts index 62f784c..279a9f7 100644 --- a/src/mcp-server/server.ts +++ b/src/mcp-server/server.ts @@ -61,7 +61,7 @@ export function createMCPServer(deps: { }) { const server = new McpServer({ name: "IrisSDK", - version: "0.2.1", + version: "0.3.0", }); const client = new IrisSDKCore({ diff --git a/src/mcp-server/shared.ts b/src/mcp-server/shared.ts index 9dc6d2f..3e94144 100644 --- a/src/mcp-server/shared.ts +++ b/src/mcp-server/shared.ts @@ -2,9 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { bytesToBase64 } from "../lib/base64.js"; - type BinaryData = | Uint8Array | ArrayBuffer diff --git a/src/mcp-server/tools.ts b/src/mcp-server/tools.ts index e6b92c1..c33e9c1 100644 --- a/src/mcp-server/tools.ts +++ b/src/mcp-server/tools.ts @@ -5,7 +5,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js"; import { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; -import { objectOutputType, ZodRawShape, ZodTypeAny } from "zod"; +import { objectOutputType, ZodRawShape, ZodTypeAny } from "zod/v3"; import { IrisSDKCore } from "../core.js"; import { ConsoleLogger } from "./console-logger.js"; import { MCPScope } from "./scopes.js"; diff --git a/src/models/components/artifactitemdto.ts b/src/models/components/artifactitemdto.ts index 2bea3db..9d999bf 100644 --- a/src/models/components/artifactitemdto.ts +++ b/src/models/components/artifactitemdto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -51,22 +51,10 @@ export type ArtifactItemDto = { export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( Type, ); - /** @internal */ export const Type$outboundSchema: z.ZodNativeEnum = Type$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Type$ { - /** @deprecated use `Type$inboundSchema` instead. */ - export const inboundSchema = Type$inboundSchema; - /** @deprecated use `Type$outboundSchema` instead. */ - export const outboundSchema = Type$outboundSchema; -} - /** @internal */ export const ArtifactItemDto$inboundSchema: z.ZodType< ArtifactItemDto, @@ -80,7 +68,6 @@ export const ArtifactItemDto$inboundSchema: z.ZodType< path: z.string(), extension: z.string().optional(), }); - /** @internal */ export type ArtifactItemDto$Outbound = { name: string; @@ -105,25 +92,11 @@ export const ArtifactItemDto$outboundSchema: z.ZodType< extension: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ArtifactItemDto$ { - /** @deprecated use `ArtifactItemDto$inboundSchema` instead. */ - export const inboundSchema = ArtifactItemDto$inboundSchema; - /** @deprecated use `ArtifactItemDto$outboundSchema` instead. */ - export const outboundSchema = ArtifactItemDto$outboundSchema; - /** @deprecated use `ArtifactItemDto$Outbound` instead. */ - export type Outbound = ArtifactItemDto$Outbound; -} - export function artifactItemDtoToJSON( artifactItemDto: ArtifactItemDto, ): string { return JSON.stringify(ArtifactItemDto$outboundSchema.parse(artifactItemDto)); } - export function artifactItemDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/artifactscontentdto.ts b/src/models/components/artifactscontentdto.ts index 9526170..93f7c1f 100644 --- a/src/models/components/artifactscontentdto.ts +++ b/src/models/components/artifactscontentdto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -38,7 +38,6 @@ export const ArtifactsContentDto$inboundSchema: z.ZodType< parentPath: z.string().optional(), items: z.array(ArtifactItemDto$inboundSchema), }); - /** @internal */ export type ArtifactsContentDto$Outbound = { currentPath: string; @@ -57,19 +56,6 @@ export const ArtifactsContentDto$outboundSchema: z.ZodType< items: z.array(ArtifactItemDto$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ArtifactsContentDto$ { - /** @deprecated use `ArtifactsContentDto$inboundSchema` instead. */ - export const inboundSchema = ArtifactsContentDto$inboundSchema; - /** @deprecated use `ArtifactsContentDto$outboundSchema` instead. */ - export const outboundSchema = ArtifactsContentDto$outboundSchema; - /** @deprecated use `ArtifactsContentDto$Outbound` instead. */ - export type Outbound = ArtifactsContentDto$Outbound; -} - export function artifactsContentDtoToJSON( artifactsContentDto: ArtifactsContentDto, ): string { @@ -77,7 +63,6 @@ export function artifactsContentDtoToJSON( ArtifactsContentDto$outboundSchema.parse(artifactsContentDto), ); } - export function artifactsContentDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/batchexecuterpadto.ts b/src/models/components/batchexecuterpadto.ts index 737f9ce..7be77a8 100644 --- a/src/models/components/batchexecuterpadto.ts +++ b/src/models/components/batchexecuterpadto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -32,7 +32,6 @@ export const BatchExecuteRpaDto$inboundSchema: z.ZodType< actionDelay: z.number().default(1000), parameterSets: z.array(z.string()), }); - /** @internal */ export type BatchExecuteRpaDto$Outbound = { recordingId: string; @@ -51,19 +50,6 @@ export const BatchExecuteRpaDto$outboundSchema: z.ZodType< parameterSets: z.array(z.string()), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace BatchExecuteRpaDto$ { - /** @deprecated use `BatchExecuteRpaDto$inboundSchema` instead. */ - export const inboundSchema = BatchExecuteRpaDto$inboundSchema; - /** @deprecated use `BatchExecuteRpaDto$outboundSchema` instead. */ - export const outboundSchema = BatchExecuteRpaDto$outboundSchema; - /** @deprecated use `BatchExecuteRpaDto$Outbound` instead. */ - export type Outbound = BatchExecuteRpaDto$Outbound; -} - export function batchExecuteRpaDtoToJSON( batchExecuteRpaDto: BatchExecuteRpaDto, ): string { @@ -71,7 +57,6 @@ export function batchExecuteRpaDtoToJSON( BatchExecuteRpaDto$outboundSchema.parse(batchExecuteRpaDto), ); } - export function batchExecuteRpaDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/captiondatadto.ts b/src/models/components/captiondatadto.ts index fd0eec6..37334f4 100644 --- a/src/models/components/captiondatadto.ts +++ b/src/models/components/captiondatadto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -33,7 +33,6 @@ export const Conversation$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({}); - /** @internal */ export type Conversation$Outbound = {}; @@ -44,23 +43,9 @@ export const Conversation$outboundSchema: z.ZodType< Conversation > = z.object({}); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Conversation$ { - /** @deprecated use `Conversation$inboundSchema` instead. */ - export const inboundSchema = Conversation$inboundSchema; - /** @deprecated use `Conversation$outboundSchema` instead. */ - export const outboundSchema = Conversation$outboundSchema; - /** @deprecated use `Conversation$Outbound` instead. */ - export type Outbound = Conversation$Outbound; -} - export function conversationToJSON(conversation: Conversation): string { return JSON.stringify(Conversation$outboundSchema.parse(conversation)); } - export function conversationFromJSON( jsonString: string, ): SafeParseResult { @@ -81,7 +66,6 @@ export const CaptionDataDto$inboundSchema: z.ZodType< conversation: z.lazy(() => Conversation$inboundSchema), frameIndex: z.number(), }); - /** @internal */ export type CaptionDataDto$Outbound = { timestamp: number; @@ -100,23 +84,9 @@ export const CaptionDataDto$outboundSchema: z.ZodType< frameIndex: z.number(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CaptionDataDto$ { - /** @deprecated use `CaptionDataDto$inboundSchema` instead. */ - export const inboundSchema = CaptionDataDto$inboundSchema; - /** @deprecated use `CaptionDataDto$outboundSchema` instead. */ - export const outboundSchema = CaptionDataDto$outboundSchema; - /** @deprecated use `CaptionDataDto$Outbound` instead. */ - export type Outbound = CaptionDataDto$Outbound; -} - export function captionDataDtoToJSON(captionDataDto: CaptionDataDto): string { return JSON.stringify(CaptionDataDto$outboundSchema.parse(captionDataDto)); } - export function captionDataDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/configresponsedto.ts b/src/models/components/configresponsedto.ts index 465ddf6..c9096aa 100644 --- a/src/models/components/configresponsedto.ts +++ b/src/models/components/configresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -59,23 +59,11 @@ export type ConfigResponseDto = { export const DefaultOperator$inboundSchema: z.ZodNativeEnum< typeof DefaultOperator > = z.nativeEnum(DefaultOperator); - /** @internal */ export const DefaultOperator$outboundSchema: z.ZodNativeEnum< typeof DefaultOperator > = DefaultOperator$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DefaultOperator$ { - /** @deprecated use `DefaultOperator$inboundSchema` instead. */ - export const inboundSchema = DefaultOperator$inboundSchema; - /** @deprecated use `DefaultOperator$outboundSchema` instead. */ - export const outboundSchema = DefaultOperator$outboundSchema; -} - /** @internal */ export const ConfigResponseDto$inboundSchema: z.ZodType< ConfigResponseDto, @@ -91,7 +79,6 @@ export const ConfigResponseDto$inboundSchema: z.ZodType< maxLoopCount: z.number(), loopIntervalInMs: z.number(), }); - /** @internal */ export type ConfigResponseDto$Outbound = { vlmBaseUrl: string; @@ -120,19 +107,6 @@ export const ConfigResponseDto$outboundSchema: z.ZodType< loopIntervalInMs: z.number(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ConfigResponseDto$ { - /** @deprecated use `ConfigResponseDto$inboundSchema` instead. */ - export const inboundSchema = ConfigResponseDto$inboundSchema; - /** @deprecated use `ConfigResponseDto$outboundSchema` instead. */ - export const outboundSchema = ConfigResponseDto$outboundSchema; - /** @deprecated use `ConfigResponseDto$Outbound` instead. */ - export type Outbound = ConfigResponseDto$Outbound; -} - export function configResponseDtoToJSON( configResponseDto: ConfigResponseDto, ): string { @@ -140,7 +114,6 @@ export function configResponseDtoToJSON( ConfigResponseDto$outboundSchema.parse(configResponseDto), ); } - export function configResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/currentsessionvideodataresponsedto.ts b/src/models/components/currentsessionvideodataresponsedto.ts index 40c1852..1e60ef8 100644 --- a/src/models/components/currentsessionvideodataresponsedto.ts +++ b/src/models/components/currentsessionvideodataresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -58,7 +58,6 @@ export const VideoData$inboundSchema: z.ZodType< captions: z.array(CaptionDataDto$inboundSchema), metadata: VideoRecordingDto$inboundSchema.optional(), }); - /** @internal */ export type VideoData$Outbound = { frames: Array; @@ -77,23 +76,9 @@ export const VideoData$outboundSchema: z.ZodType< metadata: VideoRecordingDto$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VideoData$ { - /** @deprecated use `VideoData$inboundSchema` instead. */ - export const inboundSchema = VideoData$inboundSchema; - /** @deprecated use `VideoData$outboundSchema` instead. */ - export const outboundSchema = VideoData$outboundSchema; - /** @deprecated use `VideoData$Outbound` instead. */ - export type Outbound = VideoData$Outbound; -} - export function videoDataToJSON(videoData: VideoData): string { return JSON.stringify(VideoData$outboundSchema.parse(videoData)); } - export function videoDataFromJSON( jsonString: string, ): SafeParseResult { @@ -113,7 +98,6 @@ export const CurrentSessionVideoDataResponseDto$inboundSchema: z.ZodType< success: z.boolean(), videoData: z.lazy(() => VideoData$inboundSchema), }); - /** @internal */ export type CurrentSessionVideoDataResponseDto$Outbound = { success: boolean; @@ -130,20 +114,6 @@ export const CurrentSessionVideoDataResponseDto$outboundSchema: z.ZodType< videoData: z.lazy(() => VideoData$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CurrentSessionVideoDataResponseDto$ { - /** @deprecated use `CurrentSessionVideoDataResponseDto$inboundSchema` instead. */ - export const inboundSchema = CurrentSessionVideoDataResponseDto$inboundSchema; - /** @deprecated use `CurrentSessionVideoDataResponseDto$outboundSchema` instead. */ - export const outboundSchema = - CurrentSessionVideoDataResponseDto$outboundSchema; - /** @deprecated use `CurrentSessionVideoDataResponseDto$Outbound` instead. */ - export type Outbound = CurrentSessionVideoDataResponseDto$Outbound; -} - export function currentSessionVideoDataResponseDtoToJSON( currentSessionVideoDataResponseDto: CurrentSessionVideoDataResponseDto, ): string { @@ -153,7 +123,6 @@ export function currentSessionVideoDataResponseDtoToJSON( ), ); } - export function currentSessionVideoDataResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/deleterecordingresponsedto.ts b/src/models/components/deleterecordingresponsedto.ts index 659c64d..a8d447b 100644 --- a/src/models/components/deleterecordingresponsedto.ts +++ b/src/models/components/deleterecordingresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const DeleteRecordingResponseDto$inboundSchema: z.ZodType< > = z.object({ success: z.boolean(), }); - /** @internal */ export type DeleteRecordingResponseDto$Outbound = { success: boolean; @@ -37,19 +36,6 @@ export const DeleteRecordingResponseDto$outboundSchema: z.ZodType< success: z.boolean(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteRecordingResponseDto$ { - /** @deprecated use `DeleteRecordingResponseDto$inboundSchema` instead. */ - export const inboundSchema = DeleteRecordingResponseDto$inboundSchema; - /** @deprecated use `DeleteRecordingResponseDto$outboundSchema` instead. */ - export const outboundSchema = DeleteRecordingResponseDto$outboundSchema; - /** @deprecated use `DeleteRecordingResponseDto$Outbound` instead. */ - export type Outbound = DeleteRecordingResponseDto$Outbound; -} - export function deleteRecordingResponseDtoToJSON( deleteRecordingResponseDto: DeleteRecordingResponseDto, ): string { @@ -57,7 +43,6 @@ export function deleteRecordingResponseDtoToJSON( DeleteRecordingResponseDto$outboundSchema.parse(deleteRecordingResponseDto), ); } - export function deleteRecordingResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/fileinfodto.ts b/src/models/components/fileinfodto.ts index c5108e2..15be94a 100644 --- a/src/models/components/fileinfodto.ts +++ b/src/models/components/fileinfodto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -52,7 +52,6 @@ export const FileInfoDto$inboundSchema: z.ZodType< mimeType: z.string(), uploadDate: z.string(), }); - /** @internal */ export type FileInfoDto$Outbound = { fileId: string; @@ -79,23 +78,9 @@ export const FileInfoDto$outboundSchema: z.ZodType< uploadDate: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace FileInfoDto$ { - /** @deprecated use `FileInfoDto$inboundSchema` instead. */ - export const inboundSchema = FileInfoDto$inboundSchema; - /** @deprecated use `FileInfoDto$outboundSchema` instead. */ - export const outboundSchema = FileInfoDto$outboundSchema; - /** @deprecated use `FileInfoDto$Outbound` instead. */ - export type Outbound = FileInfoDto$Outbound; -} - export function fileInfoDtoToJSON(fileInfoDto: FileInfoDto): string { return JSON.stringify(FileInfoDto$outboundSchema.parse(fileInfoDto)); } - export function fileInfoDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/fileuploaddto.ts b/src/models/components/fileuploaddto.ts index daf3704..9ba4948 100644 --- a/src/models/components/fileuploaddto.ts +++ b/src/models/components/fileuploaddto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { blobLikeSchema } from "../../types/blobs.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -34,7 +34,6 @@ export const FileUploadDtoFile$inboundSchema: z.ZodType< z.instanceof(Uint8Array), ]), }); - /** @internal */ export type FileUploadDtoFile$Outbound = { fileName: string; @@ -56,19 +55,6 @@ export const FileUploadDtoFile$outboundSchema: z.ZodType< ]), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace FileUploadDtoFile$ { - /** @deprecated use `FileUploadDtoFile$inboundSchema` instead. */ - export const inboundSchema = FileUploadDtoFile$inboundSchema; - /** @deprecated use `FileUploadDtoFile$outboundSchema` instead. */ - export const outboundSchema = FileUploadDtoFile$outboundSchema; - /** @deprecated use `FileUploadDtoFile$Outbound` instead. */ - export type Outbound = FileUploadDtoFile$Outbound; -} - export function fileUploadDtoFileToJSON( fileUploadDtoFile: FileUploadDtoFile, ): string { @@ -76,7 +62,6 @@ export function fileUploadDtoFileToJSON( FileUploadDtoFile$outboundSchema.parse(fileUploadDtoFile), ); } - export function fileUploadDtoFileFromJSON( jsonString: string, ): SafeParseResult { @@ -95,7 +80,6 @@ export const FileUploadDto$inboundSchema: z.ZodType< > = z.object({ file: z.lazy(() => FileUploadDtoFile$inboundSchema), }); - /** @internal */ export type FileUploadDto$Outbound = { file: FileUploadDtoFile$Outbound | Blob; @@ -110,23 +94,9 @@ export const FileUploadDto$outboundSchema: z.ZodType< file: z.lazy(() => FileUploadDtoFile$outboundSchema).or(blobLikeSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace FileUploadDto$ { - /** @deprecated use `FileUploadDto$inboundSchema` instead. */ - export const inboundSchema = FileUploadDto$inboundSchema; - /** @deprecated use `FileUploadDto$outboundSchema` instead. */ - export const outboundSchema = FileUploadDto$outboundSchema; - /** @deprecated use `FileUploadDto$Outbound` instead. */ - export type Outbound = FileUploadDto$Outbound; -} - export function fileUploadDtoToJSON(fileUploadDto: FileUploadDto): string { return JSON.stringify(FileUploadDto$outboundSchema.parse(fileUploadDto)); } - export function fileUploadDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/fileuploadresponsedto.ts b/src/models/components/fileuploadresponsedto.ts index c4c8fa9..5a565ff 100644 --- a/src/models/components/fileuploadresponsedto.ts +++ b/src/models/components/fileuploadresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -52,7 +52,6 @@ export const FileUploadResponseDto$inboundSchema: z.ZodType< mimeType: z.string(), message: z.string(), }); - /** @internal */ export type FileUploadResponseDto$Outbound = { fileId: string; @@ -79,19 +78,6 @@ export const FileUploadResponseDto$outboundSchema: z.ZodType< message: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace FileUploadResponseDto$ { - /** @deprecated use `FileUploadResponseDto$inboundSchema` instead. */ - export const inboundSchema = FileUploadResponseDto$inboundSchema; - /** @deprecated use `FileUploadResponseDto$outboundSchema` instead. */ - export const outboundSchema = FileUploadResponseDto$outboundSchema; - /** @deprecated use `FileUploadResponseDto$Outbound` instead. */ - export type Outbound = FileUploadResponseDto$Outbound; -} - export function fileUploadResponseDtoToJSON( fileUploadResponseDto: FileUploadResponseDto, ): string { @@ -99,7 +85,6 @@ export function fileUploadResponseDtoToJSON( FileUploadResponseDto$outboundSchema.parse(fileUploadResponseDto), ); } - export function fileUploadResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/framesandcaptionsresponsedto.ts b/src/models/components/framesandcaptionsresponsedto.ts index 807af55..d40bae0 100644 --- a/src/models/components/framesandcaptionsresponsedto.ts +++ b/src/models/components/framesandcaptionsresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -38,7 +38,6 @@ export const FramesAndCaptionsResponseDto$inboundSchema: z.ZodType< frames: z.array(z.string()), captions: z.array(CaptionDataDto$inboundSchema), }); - /** @internal */ export type FramesAndCaptionsResponseDto$Outbound = { success: boolean; @@ -57,19 +56,6 @@ export const FramesAndCaptionsResponseDto$outboundSchema: z.ZodType< captions: z.array(CaptionDataDto$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace FramesAndCaptionsResponseDto$ { - /** @deprecated use `FramesAndCaptionsResponseDto$inboundSchema` instead. */ - export const inboundSchema = FramesAndCaptionsResponseDto$inboundSchema; - /** @deprecated use `FramesAndCaptionsResponseDto$outboundSchema` instead. */ - export const outboundSchema = FramesAndCaptionsResponseDto$outboundSchema; - /** @deprecated use `FramesAndCaptionsResponseDto$Outbound` instead. */ - export type Outbound = FramesAndCaptionsResponseDto$Outbound; -} - export function framesAndCaptionsResponseDtoToJSON( framesAndCaptionsResponseDto: FramesAndCaptionsResponseDto, ): string { @@ -79,7 +65,6 @@ export function framesAndCaptionsResponseDtoToJSON( ), ); } - export function framesAndCaptionsResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/generatevideodto.ts b/src/models/components/generatevideodto.ts index 21b770b..b624477 100644 --- a/src/models/components/generatevideodto.ts +++ b/src/models/components/generatevideodto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -56,41 +56,17 @@ export type GenerateVideoDto = { /** @internal */ export const Format$inboundSchema: z.ZodNativeEnum = z .nativeEnum(Format); - /** @internal */ export const Format$outboundSchema: z.ZodNativeEnum = Format$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Format$ { - /** @deprecated use `Format$inboundSchema` instead. */ - export const inboundSchema = Format$inboundSchema; - /** @deprecated use `Format$outboundSchema` instead. */ - export const outboundSchema = Format$outboundSchema; -} - /** @internal */ export const Quality$inboundSchema: z.ZodNativeEnum = z .nativeEnum(Quality); - /** @internal */ export const Quality$outboundSchema: z.ZodNativeEnum = Quality$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Quality$ { - /** @deprecated use `Quality$inboundSchema` instead. */ - export const inboundSchema = Quality$inboundSchema; - /** @deprecated use `Quality$outboundSchema` instead. */ - export const outboundSchema = Quality$outboundSchema; -} - /** @internal */ export const GenerateVideoDto$inboundSchema: z.ZodType< GenerateVideoDto, @@ -102,7 +78,6 @@ export const GenerateVideoDto$inboundSchema: z.ZodType< format: Format$inboundSchema.default("mp4"), quality: Quality$inboundSchema.default("medium"), }); - /** @internal */ export type GenerateVideoDto$Outbound = { fps: number; @@ -123,19 +98,6 @@ export const GenerateVideoDto$outboundSchema: z.ZodType< quality: Quality$outboundSchema.default("medium"), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GenerateVideoDto$ { - /** @deprecated use `GenerateVideoDto$inboundSchema` instead. */ - export const inboundSchema = GenerateVideoDto$inboundSchema; - /** @deprecated use `GenerateVideoDto$outboundSchema` instead. */ - export const outboundSchema = GenerateVideoDto$outboundSchema; - /** @deprecated use `GenerateVideoDto$Outbound` instead. */ - export type Outbound = GenerateVideoDto$Outbound; -} - export function generateVideoDtoToJSON( generateVideoDto: GenerateVideoDto, ): string { @@ -143,7 +105,6 @@ export function generateVideoDtoToJSON( GenerateVideoDto$outboundSchema.parse(generateVideoDto), ); } - export function generateVideoDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/generatevideoresponsedto.ts b/src/models/components/generatevideoresponsedto.ts index bbc0643..34a54a5 100644 --- a/src/models/components/generatevideoresponsedto.ts +++ b/src/models/components/generatevideoresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { collectExtraKeys as collectExtraKeys$, @@ -124,7 +124,7 @@ export type GenerateVideoResponseDtoRecording = { * Size of the generated video in bytes */ videoSize?: number | undefined; - additionalProperties?: { [k: string]: any }; + additionalProperties?: { [k: string]: any } | undefined; }; export type GenerateVideoResponseDto = { @@ -147,48 +147,20 @@ export const GenerateVideoResponseDtoOperatorType$inboundSchema: z.ZodNativeEnum = z.nativeEnum( GenerateVideoResponseDtoOperatorType, ); - /** @internal */ export const GenerateVideoResponseDtoOperatorType$outboundSchema: z.ZodNativeEnum = GenerateVideoResponseDtoOperatorType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GenerateVideoResponseDtoOperatorType$ { - /** @deprecated use `GenerateVideoResponseDtoOperatorType$inboundSchema` instead. */ - export const inboundSchema = - GenerateVideoResponseDtoOperatorType$inboundSchema; - /** @deprecated use `GenerateVideoResponseDtoOperatorType$outboundSchema` instead. */ - export const outboundSchema = - GenerateVideoResponseDtoOperatorType$outboundSchema; -} - /** @internal */ export const GenerateVideoResponseDtoVideoGenerationStatus$inboundSchema: z.ZodNativeEnum = z .nativeEnum(GenerateVideoResponseDtoVideoGenerationStatus); - /** @internal */ export const GenerateVideoResponseDtoVideoGenerationStatus$outboundSchema: z.ZodNativeEnum = GenerateVideoResponseDtoVideoGenerationStatus$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GenerateVideoResponseDtoVideoGenerationStatus$ { - /** @deprecated use `GenerateVideoResponseDtoVideoGenerationStatus$inboundSchema` instead. */ - export const inboundSchema = - GenerateVideoResponseDtoVideoGenerationStatus$inboundSchema; - /** @deprecated use `GenerateVideoResponseDtoVideoGenerationStatus$outboundSchema` instead. */ - export const outboundSchema = - GenerateVideoResponseDtoVideoGenerationStatus$outboundSchema; -} - /** @internal */ export const GenerateVideoResponseDtoRecording$inboundSchema: z.ZodType< GenerateVideoResponseDtoRecording, @@ -220,7 +192,6 @@ export const GenerateVideoResponseDtoRecording$inboundSchema: z.ZodType< "additionalProperties", true, ); - /** @internal */ export type GenerateVideoResponseDtoRecording$Outbound = { id: string; @@ -271,7 +242,7 @@ export const GenerateVideoResponseDtoRecording$outboundSchema: z.ZodType< videoPath: z.string().optional(), videoFormat: z.string().optional(), videoSize: z.number().optional(), - additionalProperties: z.record(z.any()), + additionalProperties: z.record(z.any()).optional(), }).transform((v) => { return { ...v.additionalProperties, @@ -281,20 +252,6 @@ export const GenerateVideoResponseDtoRecording$outboundSchema: z.ZodType< }; }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GenerateVideoResponseDtoRecording$ { - /** @deprecated use `GenerateVideoResponseDtoRecording$inboundSchema` instead. */ - export const inboundSchema = GenerateVideoResponseDtoRecording$inboundSchema; - /** @deprecated use `GenerateVideoResponseDtoRecording$outboundSchema` instead. */ - export const outboundSchema = - GenerateVideoResponseDtoRecording$outboundSchema; - /** @deprecated use `GenerateVideoResponseDtoRecording$Outbound` instead. */ - export type Outbound = GenerateVideoResponseDtoRecording$Outbound; -} - export function generateVideoResponseDtoRecordingToJSON( generateVideoResponseDtoRecording: GenerateVideoResponseDtoRecording, ): string { @@ -304,7 +261,6 @@ export function generateVideoResponseDtoRecordingToJSON( ), ); } - export function generateVideoResponseDtoRecordingFromJSON( jsonString: string, ): SafeParseResult { @@ -325,7 +281,6 @@ export const GenerateVideoResponseDto$inboundSchema: z.ZodType< videoPath: z.string(), recording: z.lazy(() => GenerateVideoResponseDtoRecording$inboundSchema), }); - /** @internal */ export type GenerateVideoResponseDto$Outbound = { success: boolean; @@ -344,19 +299,6 @@ export const GenerateVideoResponseDto$outboundSchema: z.ZodType< recording: z.lazy(() => GenerateVideoResponseDtoRecording$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GenerateVideoResponseDto$ { - /** @deprecated use `GenerateVideoResponseDto$inboundSchema` instead. */ - export const inboundSchema = GenerateVideoResponseDto$inboundSchema; - /** @deprecated use `GenerateVideoResponseDto$outboundSchema` instead. */ - export const outboundSchema = GenerateVideoResponseDto$outboundSchema; - /** @deprecated use `GenerateVideoResponseDto$Outbound` instead. */ - export type Outbound = GenerateVideoResponseDto$Outbound; -} - export function generateVideoResponseDtoToJSON( generateVideoResponseDto: GenerateVideoResponseDto, ): string { @@ -364,7 +306,6 @@ export function generateVideoResponseDtoToJSON( GenerateVideoResponseDto$outboundSchema.parse(generateVideoResponseDto), ); } - export function generateVideoResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/operatortypesdto.ts b/src/models/components/operatortypesdto.ts index 5abf255..7fd2c3a 100644 --- a/src/models/components/operatortypesdto.ts +++ b/src/models/components/operatortypesdto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -25,22 +25,10 @@ export type OperatorTypesDto = { export const Types$inboundSchema: z.ZodNativeEnum = z.nativeEnum( Types, ); - /** @internal */ export const Types$outboundSchema: z.ZodNativeEnum = Types$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Types$ { - /** @deprecated use `Types$inboundSchema` instead. */ - export const inboundSchema = Types$inboundSchema; - /** @deprecated use `Types$outboundSchema` instead. */ - export const outboundSchema = Types$outboundSchema; -} - /** @internal */ export const OperatorTypesDto$inboundSchema: z.ZodType< OperatorTypesDto, @@ -49,7 +37,6 @@ export const OperatorTypesDto$inboundSchema: z.ZodType< > = z.object({ types: z.array(Types$inboundSchema), }); - /** @internal */ export type OperatorTypesDto$Outbound = { types: Array; @@ -64,19 +51,6 @@ export const OperatorTypesDto$outboundSchema: z.ZodType< types: z.array(Types$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OperatorTypesDto$ { - /** @deprecated use `OperatorTypesDto$inboundSchema` instead. */ - export const inboundSchema = OperatorTypesDto$inboundSchema; - /** @deprecated use `OperatorTypesDto$outboundSchema` instead. */ - export const outboundSchema = OperatorTypesDto$outboundSchema; - /** @deprecated use `OperatorTypesDto$Outbound` instead. */ - export type Outbound = OperatorTypesDto$Outbound; -} - export function operatorTypesDtoToJSON( operatorTypesDto: OperatorTypesDto, ): string { @@ -84,7 +58,6 @@ export function operatorTypesDtoToJSON( OperatorTypesDto$outboundSchema.parse(operatorTypesDto), ); } - export function operatorTypesDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/parametertemplateresponsedto.ts b/src/models/components/parametertemplateresponsedto.ts index fda622f..15c2a7e 100644 --- a/src/models/components/parametertemplateresponsedto.ts +++ b/src/models/components/parametertemplateresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -29,7 +29,6 @@ export const ParameterTemplate$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({}); - /** @internal */ export type ParameterTemplate$Outbound = {}; @@ -40,19 +39,6 @@ export const ParameterTemplate$outboundSchema: z.ZodType< ParameterTemplate > = z.object({}); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ParameterTemplate$ { - /** @deprecated use `ParameterTemplate$inboundSchema` instead. */ - export const inboundSchema = ParameterTemplate$inboundSchema; - /** @deprecated use `ParameterTemplate$outboundSchema` instead. */ - export const outboundSchema = ParameterTemplate$outboundSchema; - /** @deprecated use `ParameterTemplate$Outbound` instead. */ - export type Outbound = ParameterTemplate$Outbound; -} - export function parameterTemplateToJSON( parameterTemplate: ParameterTemplate, ): string { @@ -60,7 +46,6 @@ export function parameterTemplateToJSON( ParameterTemplate$outboundSchema.parse(parameterTemplate), ); } - export function parameterTemplateFromJSON( jsonString: string, ): SafeParseResult { @@ -80,7 +65,6 @@ export const ParameterTemplateResponseDto$inboundSchema: z.ZodType< recordingId: z.string(), parameterTemplate: z.lazy(() => ParameterTemplate$inboundSchema), }); - /** @internal */ export type ParameterTemplateResponseDto$Outbound = { recordingId: string; @@ -97,19 +81,6 @@ export const ParameterTemplateResponseDto$outboundSchema: z.ZodType< parameterTemplate: z.lazy(() => ParameterTemplate$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ParameterTemplateResponseDto$ { - /** @deprecated use `ParameterTemplateResponseDto$inboundSchema` instead. */ - export const inboundSchema = ParameterTemplateResponseDto$inboundSchema; - /** @deprecated use `ParameterTemplateResponseDto$outboundSchema` instead. */ - export const outboundSchema = ParameterTemplateResponseDto$outboundSchema; - /** @deprecated use `ParameterTemplateResponseDto$Outbound` instead. */ - export type Outbound = ParameterTemplateResponseDto$Outbound; -} - export function parameterTemplateResponseDtoToJSON( parameterTemplateResponseDto: ParameterTemplateResponseDto, ): string { @@ -119,7 +90,6 @@ export function parameterTemplateResponseDtoToJSON( ), ); } - export function parameterTemplateResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/recordinglistresponsedto.ts b/src/models/components/recordinglistresponsedto.ts index 7d2617d..2445e4c 100644 --- a/src/models/components/recordinglistresponsedto.ts +++ b/src/models/components/recordinglistresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -28,7 +28,6 @@ export const RecordingListResponseDto$inboundSchema: z.ZodType< > = z.object({ recordings: z.array(VideoRecordingDto$inboundSchema), }); - /** @internal */ export type RecordingListResponseDto$Outbound = { recordings: Array; @@ -43,19 +42,6 @@ export const RecordingListResponseDto$outboundSchema: z.ZodType< recordings: z.array(VideoRecordingDto$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RecordingListResponseDto$ { - /** @deprecated use `RecordingListResponseDto$inboundSchema` instead. */ - export const inboundSchema = RecordingListResponseDto$inboundSchema; - /** @deprecated use `RecordingListResponseDto$outboundSchema` instead. */ - export const outboundSchema = RecordingListResponseDto$outboundSchema; - /** @deprecated use `RecordingListResponseDto$Outbound` instead. */ - export type Outbound = RecordingListResponseDto$Outbound; -} - export function recordingListResponseDtoToJSON( recordingListResponseDto: RecordingListResponseDto, ): string { @@ -63,7 +49,6 @@ export function recordingListResponseDtoToJSON( RecordingListResponseDto$outboundSchema.parse(recordingListResponseDto), ); } - export function recordingListResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/recordingresponsedto.ts b/src/models/components/recordingresponsedto.ts index 945fa89..d90d97b 100644 --- a/src/models/components/recordingresponsedto.ts +++ b/src/models/components/recordingresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { collectExtraKeys as collectExtraKeys$, @@ -122,7 +122,7 @@ export type Recording = { * Size of the generated video in bytes */ videoSize?: number | undefined; - additionalProperties?: { [k: string]: any }; + additionalProperties?: { [k: string]: any } | undefined; }; export type RecordingResponseDto = { @@ -140,46 +140,20 @@ export type RecordingResponseDto = { export const RecordingResponseDtoOperatorType$inboundSchema: z.ZodNativeEnum< typeof RecordingResponseDtoOperatorType > = z.nativeEnum(RecordingResponseDtoOperatorType); - /** @internal */ export const RecordingResponseDtoOperatorType$outboundSchema: z.ZodNativeEnum< typeof RecordingResponseDtoOperatorType > = RecordingResponseDtoOperatorType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RecordingResponseDtoOperatorType$ { - /** @deprecated use `RecordingResponseDtoOperatorType$inboundSchema` instead. */ - export const inboundSchema = RecordingResponseDtoOperatorType$inboundSchema; - /** @deprecated use `RecordingResponseDtoOperatorType$outboundSchema` instead. */ - export const outboundSchema = RecordingResponseDtoOperatorType$outboundSchema; -} - /** @internal */ export const RecordingResponseDtoVideoGenerationStatus$inboundSchema: z.ZodNativeEnum = z .nativeEnum(RecordingResponseDtoVideoGenerationStatus); - /** @internal */ export const RecordingResponseDtoVideoGenerationStatus$outboundSchema: z.ZodNativeEnum = RecordingResponseDtoVideoGenerationStatus$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RecordingResponseDtoVideoGenerationStatus$ { - /** @deprecated use `RecordingResponseDtoVideoGenerationStatus$inboundSchema` instead. */ - export const inboundSchema = - RecordingResponseDtoVideoGenerationStatus$inboundSchema; - /** @deprecated use `RecordingResponseDtoVideoGenerationStatus$outboundSchema` instead. */ - export const outboundSchema = - RecordingResponseDtoVideoGenerationStatus$outboundSchema; -} - /** @internal */ export const Recording$inboundSchema: z.ZodType< Recording, @@ -211,7 +185,6 @@ export const Recording$inboundSchema: z.ZodType< "additionalProperties", true, ); - /** @internal */ export type Recording$Outbound = { id: string; @@ -262,7 +235,7 @@ export const Recording$outboundSchema: z.ZodType< videoPath: z.string().optional(), videoFormat: z.string().optional(), videoSize: z.number().optional(), - additionalProperties: z.record(z.any()), + additionalProperties: z.record(z.any()).optional(), }).transform((v) => { return { ...v.additionalProperties, @@ -272,23 +245,9 @@ export const Recording$outboundSchema: z.ZodType< }; }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Recording$ { - /** @deprecated use `Recording$inboundSchema` instead. */ - export const inboundSchema = Recording$inboundSchema; - /** @deprecated use `Recording$outboundSchema` instead. */ - export const outboundSchema = Recording$outboundSchema; - /** @deprecated use `Recording$Outbound` instead. */ - export type Outbound = Recording$Outbound; -} - export function recordingToJSON(recording: Recording): string { return JSON.stringify(Recording$outboundSchema.parse(recording)); } - export function recordingFromJSON( jsonString: string, ): SafeParseResult { @@ -308,7 +267,6 @@ export const RecordingResponseDto$inboundSchema: z.ZodType< success: z.boolean(), recording: z.lazy(() => Recording$inboundSchema), }); - /** @internal */ export type RecordingResponseDto$Outbound = { success: boolean; @@ -325,19 +283,6 @@ export const RecordingResponseDto$outboundSchema: z.ZodType< recording: z.lazy(() => Recording$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RecordingResponseDto$ { - /** @deprecated use `RecordingResponseDto$inboundSchema` instead. */ - export const inboundSchema = RecordingResponseDto$inboundSchema; - /** @deprecated use `RecordingResponseDto$outboundSchema` instead. */ - export const outboundSchema = RecordingResponseDto$outboundSchema; - /** @deprecated use `RecordingResponseDto$Outbound` instead. */ - export type Outbound = RecordingResponseDto$Outbound; -} - export function recordingResponseDtoToJSON( recordingResponseDto: RecordingResponseDto, ): string { @@ -345,7 +290,6 @@ export function recordingResponseDtoToJSON( RecordingResponseDto$outboundSchema.parse(recordingResponseDto), ); } - export function recordingResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/rpaexecutionstatusdto.ts b/src/models/components/rpaexecutionstatusdto.ts index 03cf75c..6762e1e 100644 --- a/src/models/components/rpaexecutionstatusdto.ts +++ b/src/models/components/rpaexecutionstatusdto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -77,45 +77,20 @@ export type RpaExecutionStatusDto = { export const RpaExecutionStatusDtoStatus$inboundSchema: z.ZodNativeEnum< typeof RpaExecutionStatusDtoStatus > = z.nativeEnum(RpaExecutionStatusDtoStatus); - /** @internal */ export const RpaExecutionStatusDtoStatus$outboundSchema: z.ZodNativeEnum< typeof RpaExecutionStatusDtoStatus > = RpaExecutionStatusDtoStatus$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RpaExecutionStatusDtoStatus$ { - /** @deprecated use `RpaExecutionStatusDtoStatus$inboundSchema` instead. */ - export const inboundSchema = RpaExecutionStatusDtoStatus$inboundSchema; - /** @deprecated use `RpaExecutionStatusDtoStatus$outboundSchema` instead. */ - export const outboundSchema = RpaExecutionStatusDtoStatus$outboundSchema; -} - /** @internal */ export const RpaExecutionStatusDtoOperatorType$inboundSchema: z.ZodNativeEnum< typeof RpaExecutionStatusDtoOperatorType > = z.nativeEnum(RpaExecutionStatusDtoOperatorType); - /** @internal */ export const RpaExecutionStatusDtoOperatorType$outboundSchema: z.ZodNativeEnum< typeof RpaExecutionStatusDtoOperatorType > = RpaExecutionStatusDtoOperatorType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RpaExecutionStatusDtoOperatorType$ { - /** @deprecated use `RpaExecutionStatusDtoOperatorType$inboundSchema` instead. */ - export const inboundSchema = RpaExecutionStatusDtoOperatorType$inboundSchema; - /** @deprecated use `RpaExecutionStatusDtoOperatorType$outboundSchema` instead. */ - export const outboundSchema = - RpaExecutionStatusDtoOperatorType$outboundSchema; -} - /** @internal */ export const RpaExecutionStatusDto$inboundSchema: z.ZodType< RpaExecutionStatusDto, @@ -131,7 +106,6 @@ export const RpaExecutionStatusDto$inboundSchema: z.ZodType< operatorType: RpaExecutionStatusDtoOperatorType$inboundSchema, errorMessage: z.string().optional(), }); - /** @internal */ export type RpaExecutionStatusDto$Outbound = { executionId: string; @@ -160,19 +134,6 @@ export const RpaExecutionStatusDto$outboundSchema: z.ZodType< errorMessage: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RpaExecutionStatusDto$ { - /** @deprecated use `RpaExecutionStatusDto$inboundSchema` instead. */ - export const inboundSchema = RpaExecutionStatusDto$inboundSchema; - /** @deprecated use `RpaExecutionStatusDto$outboundSchema` instead. */ - export const outboundSchema = RpaExecutionStatusDto$outboundSchema; - /** @deprecated use `RpaExecutionStatusDto$Outbound` instead. */ - export type Outbound = RpaExecutionStatusDto$Outbound; -} - export function rpaExecutionStatusDtoToJSON( rpaExecutionStatusDto: RpaExecutionStatusDto, ): string { @@ -180,7 +141,6 @@ export function rpaExecutionStatusDtoToJSON( RpaExecutionStatusDto$outboundSchema.parse(rpaExecutionStatusDto), ); } - export function rpaExecutionStatusDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/rpastepsdto.ts b/src/models/components/rpastepsdto.ts index 4888973..28630ce 100644 --- a/src/models/components/rpastepsdto.ts +++ b/src/models/components/rpastepsdto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -37,7 +37,6 @@ export const RpaStepsDto$inboundSchema: z.ZodType< processedVideoUrl: z.string(), originalVideoUrl: z.string(), }); - /** @internal */ export type RpaStepsDto$Outbound = { analysisId: string; @@ -58,23 +57,9 @@ export const RpaStepsDto$outboundSchema: z.ZodType< originalVideoUrl: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RpaStepsDto$ { - /** @deprecated use `RpaStepsDto$inboundSchema` instead. */ - export const inboundSchema = RpaStepsDto$inboundSchema; - /** @deprecated use `RpaStepsDto$outboundSchema` instead. */ - export const outboundSchema = RpaStepsDto$outboundSchema; - /** @deprecated use `RpaStepsDto$Outbound` instead. */ - export type Outbound = RpaStepsDto$Outbound; -} - export function rpaStepsDtoToJSON(rpaStepsDto: RpaStepsDto): string { return JSON.stringify(RpaStepsDto$outboundSchema.parse(rpaStepsDto)); } - export function rpaStepsDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/savesessionrecordingresponsedto.ts b/src/models/components/savesessionrecordingresponsedto.ts index 558ae58..51b2213 100644 --- a/src/models/components/savesessionrecordingresponsedto.ts +++ b/src/models/components/savesessionrecordingresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { collectExtraKeys as collectExtraKeys$, @@ -124,7 +124,7 @@ export type SaveSessionRecordingResponseDtoRecording = { * Size of the generated video in bytes */ videoSize?: number | undefined; - additionalProperties?: { [k: string]: any }; + additionalProperties?: { [k: string]: any } | undefined; }; export type SaveSessionRecordingResponseDto = { @@ -142,48 +142,20 @@ export type SaveSessionRecordingResponseDto = { export const SaveSessionRecordingResponseDtoOperatorType$inboundSchema: z.ZodNativeEnum = z .nativeEnum(SaveSessionRecordingResponseDtoOperatorType); - /** @internal */ export const SaveSessionRecordingResponseDtoOperatorType$outboundSchema: z.ZodNativeEnum = SaveSessionRecordingResponseDtoOperatorType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SaveSessionRecordingResponseDtoOperatorType$ { - /** @deprecated use `SaveSessionRecordingResponseDtoOperatorType$inboundSchema` instead. */ - export const inboundSchema = - SaveSessionRecordingResponseDtoOperatorType$inboundSchema; - /** @deprecated use `SaveSessionRecordingResponseDtoOperatorType$outboundSchema` instead. */ - export const outboundSchema = - SaveSessionRecordingResponseDtoOperatorType$outboundSchema; -} - /** @internal */ export const SaveSessionRecordingResponseDtoVideoGenerationStatus$inboundSchema: z.ZodNativeEnum = z.nativeEnum(SaveSessionRecordingResponseDtoVideoGenerationStatus); - /** @internal */ export const SaveSessionRecordingResponseDtoVideoGenerationStatus$outboundSchema: z.ZodNativeEnum = SaveSessionRecordingResponseDtoVideoGenerationStatus$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SaveSessionRecordingResponseDtoVideoGenerationStatus$ { - /** @deprecated use `SaveSessionRecordingResponseDtoVideoGenerationStatus$inboundSchema` instead. */ - export const inboundSchema = - SaveSessionRecordingResponseDtoVideoGenerationStatus$inboundSchema; - /** @deprecated use `SaveSessionRecordingResponseDtoVideoGenerationStatus$outboundSchema` instead. */ - export const outboundSchema = - SaveSessionRecordingResponseDtoVideoGenerationStatus$outboundSchema; -} - /** @internal */ export const SaveSessionRecordingResponseDtoRecording$inboundSchema: z.ZodType< SaveSessionRecordingResponseDtoRecording, @@ -217,7 +189,6 @@ export const SaveSessionRecordingResponseDtoRecording$inboundSchema: z.ZodType< "additionalProperties", true, ); - /** @internal */ export type SaveSessionRecordingResponseDtoRecording$Outbound = { id: string; @@ -270,7 +241,7 @@ export const SaveSessionRecordingResponseDtoRecording$outboundSchema: z.ZodType< videoPath: z.string().optional(), videoFormat: z.string().optional(), videoSize: z.number().optional(), - additionalProperties: z.record(z.any()), + additionalProperties: z.record(z.any()).optional(), }).transform((v) => { return { ...v.additionalProperties, @@ -280,21 +251,6 @@ export const SaveSessionRecordingResponseDtoRecording$outboundSchema: z.ZodType< }; }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SaveSessionRecordingResponseDtoRecording$ { - /** @deprecated use `SaveSessionRecordingResponseDtoRecording$inboundSchema` instead. */ - export const inboundSchema = - SaveSessionRecordingResponseDtoRecording$inboundSchema; - /** @deprecated use `SaveSessionRecordingResponseDtoRecording$outboundSchema` instead. */ - export const outboundSchema = - SaveSessionRecordingResponseDtoRecording$outboundSchema; - /** @deprecated use `SaveSessionRecordingResponseDtoRecording$Outbound` instead. */ - export type Outbound = SaveSessionRecordingResponseDtoRecording$Outbound; -} - export function saveSessionRecordingResponseDtoRecordingToJSON( saveSessionRecordingResponseDtoRecording: SaveSessionRecordingResponseDtoRecording, @@ -305,7 +261,6 @@ export function saveSessionRecordingResponseDtoRecordingToJSON( ), ); } - export function saveSessionRecordingResponseDtoRecordingFromJSON( jsonString: string, ): SafeParseResult< @@ -333,7 +288,6 @@ export const SaveSessionRecordingResponseDto$inboundSchema: z.ZodType< SaveSessionRecordingResponseDtoRecording$inboundSchema ), }); - /** @internal */ export type SaveSessionRecordingResponseDto$Outbound = { success: boolean; @@ -352,19 +306,6 @@ export const SaveSessionRecordingResponseDto$outboundSchema: z.ZodType< ), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SaveSessionRecordingResponseDto$ { - /** @deprecated use `SaveSessionRecordingResponseDto$inboundSchema` instead. */ - export const inboundSchema = SaveSessionRecordingResponseDto$inboundSchema; - /** @deprecated use `SaveSessionRecordingResponseDto$outboundSchema` instead. */ - export const outboundSchema = SaveSessionRecordingResponseDto$outboundSchema; - /** @deprecated use `SaveSessionRecordingResponseDto$Outbound` instead. */ - export type Outbound = SaveSessionRecordingResponseDto$Outbound; -} - export function saveSessionRecordingResponseDtoToJSON( saveSessionRecordingResponseDto: SaveSessionRecordingResponseDto, ): string { @@ -374,7 +315,6 @@ export function saveSessionRecordingResponseDtoToJSON( ), ); } - export function saveSessionRecordingResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/sessionreplaydataresponsedto.ts b/src/models/components/sessionreplaydataresponsedto.ts index 6621cae..05e6630 100644 --- a/src/models/components/sessionreplaydataresponsedto.ts +++ b/src/models/components/sessionreplaydataresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -33,7 +33,6 @@ export const SessionReplayDataResponseDto$inboundSchema: z.ZodType< success: z.boolean(), replayData: VideoDataDto$inboundSchema, }); - /** @internal */ export type SessionReplayDataResponseDto$Outbound = { success: boolean; @@ -50,19 +49,6 @@ export const SessionReplayDataResponseDto$outboundSchema: z.ZodType< replayData: VideoDataDto$outboundSchema, }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SessionReplayDataResponseDto$ { - /** @deprecated use `SessionReplayDataResponseDto$inboundSchema` instead. */ - export const inboundSchema = SessionReplayDataResponseDto$inboundSchema; - /** @deprecated use `SessionReplayDataResponseDto$outboundSchema` instead. */ - export const outboundSchema = SessionReplayDataResponseDto$outboundSchema; - /** @deprecated use `SessionReplayDataResponseDto$Outbound` instead. */ - export type Outbound = SessionReplayDataResponseDto$Outbound; -} - export function sessionReplayDataResponseDtoToJSON( sessionReplayDataResponseDto: SessionReplayDataResponseDto, ): string { @@ -72,7 +58,6 @@ export function sessionReplayDataResponseDtoToJSON( ), ); } - export function sessionReplayDataResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/simplesuccessresponsedto.ts b/src/models/components/simplesuccessresponsedto.ts index eb17100..c450516 100644 --- a/src/models/components/simplesuccessresponsedto.ts +++ b/src/models/components/simplesuccessresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -27,7 +27,6 @@ export const SimpleSuccessResponseDto$inboundSchema: z.ZodType< success: z.boolean(), message: z.string().optional(), }); - /** @internal */ export type SimpleSuccessResponseDto$Outbound = { success: boolean; @@ -44,19 +43,6 @@ export const SimpleSuccessResponseDto$outboundSchema: z.ZodType< message: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SimpleSuccessResponseDto$ { - /** @deprecated use `SimpleSuccessResponseDto$inboundSchema` instead. */ - export const inboundSchema = SimpleSuccessResponseDto$inboundSchema; - /** @deprecated use `SimpleSuccessResponseDto$outboundSchema` instead. */ - export const outboundSchema = SimpleSuccessResponseDto$outboundSchema; - /** @deprecated use `SimpleSuccessResponseDto$Outbound` instead. */ - export type Outbound = SimpleSuccessResponseDto$Outbound; -} - export function simpleSuccessResponseDtoToJSON( simpleSuccessResponseDto: SimpleSuccessResponseDto, ): string { @@ -64,7 +50,6 @@ export function simpleSuccessResponseDtoToJSON( SimpleSuccessResponseDto$outboundSchema.parse(simpleSuccessResponseDto), ); } - export function simpleSuccessResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/startrpaexecutiondto.ts b/src/models/components/startrpaexecutiondto.ts index f6a6f7b..6234d15 100644 --- a/src/models/components/startrpaexecutiondto.ts +++ b/src/models/components/startrpaexecutiondto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -33,7 +33,6 @@ export const ParameterOverrides$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({}); - /** @internal */ export type ParameterOverrides$Outbound = {}; @@ -44,19 +43,6 @@ export const ParameterOverrides$outboundSchema: z.ZodType< ParameterOverrides > = z.object({}); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ParameterOverrides$ { - /** @deprecated use `ParameterOverrides$inboundSchema` instead. */ - export const inboundSchema = ParameterOverrides$inboundSchema; - /** @deprecated use `ParameterOverrides$outboundSchema` instead. */ - export const outboundSchema = ParameterOverrides$outboundSchema; - /** @deprecated use `ParameterOverrides$Outbound` instead. */ - export type Outbound = ParameterOverrides$Outbound; -} - export function parameterOverridesToJSON( parameterOverrides: ParameterOverrides, ): string { @@ -64,7 +50,6 @@ export function parameterOverridesToJSON( ParameterOverrides$outboundSchema.parse(parameterOverrides), ); } - export function parameterOverridesFromJSON( jsonString: string, ): SafeParseResult { @@ -85,7 +70,6 @@ export const StartRpaExecutionDto$inboundSchema: z.ZodType< actionDelay: z.number().default(1000), parameterOverrides: z.lazy(() => ParameterOverrides$inboundSchema).optional(), }); - /** @internal */ export type StartRpaExecutionDto$Outbound = { recordingId: string; @@ -105,19 +89,6 @@ export const StartRpaExecutionDto$outboundSchema: z.ZodType< .optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace StartRpaExecutionDto$ { - /** @deprecated use `StartRpaExecutionDto$inboundSchema` instead. */ - export const inboundSchema = StartRpaExecutionDto$inboundSchema; - /** @deprecated use `StartRpaExecutionDto$outboundSchema` instead. */ - export const outboundSchema = StartRpaExecutionDto$outboundSchema; - /** @deprecated use `StartRpaExecutionDto$Outbound` instead. */ - export type Outbound = StartRpaExecutionDto$Outbound; -} - export function startRpaExecutionDtoToJSON( startRpaExecutionDto: StartRpaExecutionDto, ): string { @@ -125,7 +96,6 @@ export function startRpaExecutionDtoToJSON( StartRpaExecutionDto$outboundSchema.parse(startRpaExecutionDto), ); } - export function startRpaExecutionDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/successresponsedto.ts b/src/models/components/successresponsedto.ts index f12dd92..ba5f00a 100644 --- a/src/models/components/successresponsedto.ts +++ b/src/models/components/successresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const SuccessResponseDto$inboundSchema: z.ZodType< > = z.object({ success: z.boolean(), }); - /** @internal */ export type SuccessResponseDto$Outbound = { success: boolean; @@ -37,19 +36,6 @@ export const SuccessResponseDto$outboundSchema: z.ZodType< success: z.boolean(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SuccessResponseDto$ { - /** @deprecated use `SuccessResponseDto$inboundSchema` instead. */ - export const inboundSchema = SuccessResponseDto$inboundSchema; - /** @deprecated use `SuccessResponseDto$outboundSchema` instead. */ - export const outboundSchema = SuccessResponseDto$outboundSchema; - /** @deprecated use `SuccessResponseDto$Outbound` instead. */ - export type Outbound = SuccessResponseDto$Outbound; -} - export function successResponseDtoToJSON( successResponseDto: SuccessResponseDto, ): string { @@ -57,7 +43,6 @@ export function successResponseDtoToJSON( SuccessResponseDto$outboundSchema.parse(successResponseDto), ); } - export function successResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/updatecaptiondto.ts b/src/models/components/updatecaptiondto.ts index a9ae448..e015fbf 100644 --- a/src/models/components/updatecaptiondto.ts +++ b/src/models/components/updatecaptiondto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -26,7 +26,6 @@ export type UpdateCaptionDto = { /** @internal */ export const Caption$inboundSchema: z.ZodType = z.object({}); - /** @internal */ export type Caption$Outbound = {}; @@ -37,23 +36,9 @@ export const Caption$outboundSchema: z.ZodType< Caption > = z.object({}); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Caption$ { - /** @deprecated use `Caption$inboundSchema` instead. */ - export const inboundSchema = Caption$inboundSchema; - /** @deprecated use `Caption$outboundSchema` instead. */ - export const outboundSchema = Caption$outboundSchema; - /** @deprecated use `Caption$Outbound` instead. */ - export type Outbound = Caption$Outbound; -} - export function captionToJSON(caption: Caption): string { return JSON.stringify(Caption$outboundSchema.parse(caption)); } - export function captionFromJSON( jsonString: string, ): SafeParseResult { @@ -73,7 +58,6 @@ export const UpdateCaptionDto$inboundSchema: z.ZodType< caption: z.lazy(() => Caption$inboundSchema).optional(), text: z.string().optional(), }); - /** @internal */ export type UpdateCaptionDto$Outbound = { caption?: Caption$Outbound | undefined; @@ -90,19 +74,6 @@ export const UpdateCaptionDto$outboundSchema: z.ZodType< text: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateCaptionDto$ { - /** @deprecated use `UpdateCaptionDto$inboundSchema` instead. */ - export const inboundSchema = UpdateCaptionDto$inboundSchema; - /** @deprecated use `UpdateCaptionDto$outboundSchema` instead. */ - export const outboundSchema = UpdateCaptionDto$outboundSchema; - /** @deprecated use `UpdateCaptionDto$Outbound` instead. */ - export type Outbound = UpdateCaptionDto$Outbound; -} - export function updateCaptionDtoToJSON( updateCaptionDto: UpdateCaptionDto, ): string { @@ -110,7 +81,6 @@ export function updateCaptionDtoToJSON( UpdateCaptionDto$outboundSchema.parse(updateCaptionDto), ); } - export function updateCaptionDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/updateconfigdto.ts b/src/models/components/updateconfigdto.ts index 0c00088..182789c 100644 --- a/src/models/components/updateconfigdto.ts +++ b/src/models/components/updateconfigdto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -61,23 +61,11 @@ export type UpdateConfigDto = { export const UpdateConfigDtoDefaultOperator$inboundSchema: z.ZodNativeEnum< typeof UpdateConfigDtoDefaultOperator > = z.nativeEnum(UpdateConfigDtoDefaultOperator); - /** @internal */ export const UpdateConfigDtoDefaultOperator$outboundSchema: z.ZodNativeEnum< typeof UpdateConfigDtoDefaultOperator > = UpdateConfigDtoDefaultOperator$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateConfigDtoDefaultOperator$ { - /** @deprecated use `UpdateConfigDtoDefaultOperator$inboundSchema` instead. */ - export const inboundSchema = UpdateConfigDtoDefaultOperator$inboundSchema; - /** @deprecated use `UpdateConfigDtoDefaultOperator$outboundSchema` instead. */ - export const outboundSchema = UpdateConfigDtoDefaultOperator$outboundSchema; -} - /** @internal */ export const UpdateConfigDto$inboundSchema: z.ZodType< UpdateConfigDto, @@ -93,7 +81,6 @@ export const UpdateConfigDto$inboundSchema: z.ZodType< maxLoopCount: z.number().optional(), loopIntervalInMs: z.number().optional(), }); - /** @internal */ export type UpdateConfigDto$Outbound = { vlmBaseUrl?: string | undefined; @@ -122,25 +109,11 @@ export const UpdateConfigDto$outboundSchema: z.ZodType< loopIntervalInMs: z.number().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateConfigDto$ { - /** @deprecated use `UpdateConfigDto$inboundSchema` instead. */ - export const inboundSchema = UpdateConfigDto$inboundSchema; - /** @deprecated use `UpdateConfigDto$outboundSchema` instead. */ - export const outboundSchema = UpdateConfigDto$outboundSchema; - /** @deprecated use `UpdateConfigDto$Outbound` instead. */ - export type Outbound = UpdateConfigDto$Outbound; -} - export function updateConfigDtoToJSON( updateConfigDto: UpdateConfigDto, ): string { return JSON.stringify(UpdateConfigDto$outboundSchema.parse(updateConfigDto)); } - export function updateConfigDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/videoanalysisresponsedto.ts b/src/models/components/videoanalysisresponsedto.ts index 5626bb3..33177c5 100644 --- a/src/models/components/videoanalysisresponsedto.ts +++ b/src/models/components/videoanalysisresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -37,7 +37,6 @@ export const VideoAnalysisResponseDto$inboundSchema: z.ZodType< processedVideo: z.string(), message: z.string(), }); - /** @internal */ export type VideoAnalysisResponseDto$Outbound = { analysisId: string; @@ -58,19 +57,6 @@ export const VideoAnalysisResponseDto$outboundSchema: z.ZodType< message: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VideoAnalysisResponseDto$ { - /** @deprecated use `VideoAnalysisResponseDto$inboundSchema` instead. */ - export const inboundSchema = VideoAnalysisResponseDto$inboundSchema; - /** @deprecated use `VideoAnalysisResponseDto$outboundSchema` instead. */ - export const outboundSchema = VideoAnalysisResponseDto$outboundSchema; - /** @deprecated use `VideoAnalysisResponseDto$Outbound` instead. */ - export type Outbound = VideoAnalysisResponseDto$Outbound; -} - export function videoAnalysisResponseDtoToJSON( videoAnalysisResponseDto: VideoAnalysisResponseDto, ): string { @@ -78,7 +64,6 @@ export function videoAnalysisResponseDtoToJSON( VideoAnalysisResponseDto$outboundSchema.parse(videoAnalysisResponseDto), ); } - export function videoAnalysisResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/videodatadto.ts b/src/models/components/videodatadto.ts index 58ba28d..c0eb698 100644 --- a/src/models/components/videodatadto.ts +++ b/src/models/components/videodatadto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -44,7 +44,6 @@ export const VideoDataDto$inboundSchema: z.ZodType< captions: z.array(CaptionDataDto$inboundSchema), metadata: VideoRecordingDto$inboundSchema.optional(), }); - /** @internal */ export type VideoDataDto$Outbound = { frames: Array; @@ -63,23 +62,9 @@ export const VideoDataDto$outboundSchema: z.ZodType< metadata: VideoRecordingDto$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VideoDataDto$ { - /** @deprecated use `VideoDataDto$inboundSchema` instead. */ - export const inboundSchema = VideoDataDto$inboundSchema; - /** @deprecated use `VideoDataDto$outboundSchema` instead. */ - export const outboundSchema = VideoDataDto$outboundSchema; - /** @deprecated use `VideoDataDto$Outbound` instead. */ - export type Outbound = VideoDataDto$Outbound; -} - export function videoDataDtoToJSON(videoDataDto: VideoDataDto): string { return JSON.stringify(VideoDataDto$outboundSchema.parse(videoDataDto)); } - export function videoDataDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/videorecordingdto.ts b/src/models/components/videorecordingdto.ts index 6f40ffd..c4e9947 100644 --- a/src/models/components/videorecordingdto.ts +++ b/src/models/components/videorecordingdto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -116,43 +116,19 @@ export type VideoRecordingDto = { /** @internal */ export const OperatorType$inboundSchema: z.ZodNativeEnum = z.nativeEnum(OperatorType); - /** @internal */ export const OperatorType$outboundSchema: z.ZodNativeEnum = OperatorType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OperatorType$ { - /** @deprecated use `OperatorType$inboundSchema` instead. */ - export const inboundSchema = OperatorType$inboundSchema; - /** @deprecated use `OperatorType$outboundSchema` instead. */ - export const outboundSchema = OperatorType$outboundSchema; -} - /** @internal */ export const VideoGenerationStatus$inboundSchema: z.ZodNativeEnum< typeof VideoGenerationStatus > = z.nativeEnum(VideoGenerationStatus); - /** @internal */ export const VideoGenerationStatus$outboundSchema: z.ZodNativeEnum< typeof VideoGenerationStatus > = VideoGenerationStatus$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VideoGenerationStatus$ { - /** @deprecated use `VideoGenerationStatus$inboundSchema` instead. */ - export const inboundSchema = VideoGenerationStatus$inboundSchema; - /** @deprecated use `VideoGenerationStatus$outboundSchema` instead. */ - export const outboundSchema = VideoGenerationStatus$outboundSchema; -} - /** @internal */ export const VideoRecordingDto$inboundSchema: z.ZodType< VideoRecordingDto, @@ -179,7 +155,6 @@ export const VideoRecordingDto$inboundSchema: z.ZodType< videoFormat: z.string().optional(), videoSize: z.number().optional(), }); - /** @internal */ export type VideoRecordingDto$Outbound = { id: string; @@ -230,19 +205,6 @@ export const VideoRecordingDto$outboundSchema: z.ZodType< videoSize: z.number().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VideoRecordingDto$ { - /** @deprecated use `VideoRecordingDto$inboundSchema` instead. */ - export const inboundSchema = VideoRecordingDto$inboundSchema; - /** @deprecated use `VideoRecordingDto$outboundSchema` instead. */ - export const outboundSchema = VideoRecordingDto$outboundSchema; - /** @deprecated use `VideoRecordingDto$Outbound` instead. */ - export type Outbound = VideoRecordingDto$Outbound; -} - export function videoRecordingDtoToJSON( videoRecordingDto: VideoRecordingDto, ): string { @@ -250,7 +212,6 @@ export function videoRecordingDtoToJSON( VideoRecordingDto$outboundSchema.parse(videoRecordingDto), ); } - export function videoRecordingDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/videostatusresponsedto.ts b/src/models/components/videostatusresponsedto.ts index 3ced137..86520b7 100644 --- a/src/models/components/videostatusresponsedto.ts +++ b/src/models/components/videostatusresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -68,22 +68,10 @@ export type VideoStatusResponseDto = { /** @internal */ export const Status$inboundSchema: z.ZodNativeEnum = z .nativeEnum(Status); - /** @internal */ export const Status$outboundSchema: z.ZodNativeEnum = Status$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Status$ { - /** @deprecated use `Status$inboundSchema` instead. */ - export const inboundSchema = Status$inboundSchema; - /** @deprecated use `Status$outboundSchema` instead. */ - export const outboundSchema = Status$outboundSchema; -} - /** @internal */ export const VideoStatusResponseDto$inboundSchema: z.ZodType< VideoStatusResponseDto, @@ -101,7 +89,6 @@ export const VideoStatusResponseDto$inboundSchema: z.ZodType< sizeMB: z.number().optional(), error: z.string().optional(), }); - /** @internal */ export type VideoStatusResponseDto$Outbound = { recordingId: string; @@ -134,19 +121,6 @@ export const VideoStatusResponseDto$outboundSchema: z.ZodType< error: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VideoStatusResponseDto$ { - /** @deprecated use `VideoStatusResponseDto$inboundSchema` instead. */ - export const inboundSchema = VideoStatusResponseDto$inboundSchema; - /** @deprecated use `VideoStatusResponseDto$outboundSchema` instead. */ - export const outboundSchema = VideoStatusResponseDto$outboundSchema; - /** @deprecated use `VideoStatusResponseDto$Outbound` instead. */ - export type Outbound = VideoStatusResponseDto$Outbound; -} - export function videoStatusResponseDtoToJSON( videoStatusResponseDto: VideoStatusResponseDto, ): string { @@ -154,7 +128,6 @@ export function videoStatusResponseDtoToJSON( VideoStatusResponseDto$outboundSchema.parse(videoStatusResponseDto), ); } - export function videoStatusResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/videostreaminprogressresponsedto.ts b/src/models/components/videostreaminprogressresponsedto.ts index a9e9ef1..a807293 100644 --- a/src/models/components/videostreaminprogressresponsedto.ts +++ b/src/models/components/videostreaminprogressresponsedto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -41,25 +41,11 @@ export const VideoStreamInProgressResponseDtoStatus$inboundSchema: z.ZodNativeEnum = z.nativeEnum( VideoStreamInProgressResponseDtoStatus, ); - /** @internal */ export const VideoStreamInProgressResponseDtoStatus$outboundSchema: z.ZodNativeEnum = VideoStreamInProgressResponseDtoStatus$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VideoStreamInProgressResponseDtoStatus$ { - /** @deprecated use `VideoStreamInProgressResponseDtoStatus$inboundSchema` instead. */ - export const inboundSchema = - VideoStreamInProgressResponseDtoStatus$inboundSchema; - /** @deprecated use `VideoStreamInProgressResponseDtoStatus$outboundSchema` instead. */ - export const outboundSchema = - VideoStreamInProgressResponseDtoStatus$outboundSchema; -} - /** @internal */ export const VideoStreamInProgressResponseDto$inboundSchema: z.ZodType< VideoStreamInProgressResponseDto, @@ -70,7 +56,6 @@ export const VideoStreamInProgressResponseDto$inboundSchema: z.ZodType< message: z.string(), startedAt: z.number().optional(), }); - /** @internal */ export type VideoStreamInProgressResponseDto$Outbound = { status: string; @@ -89,19 +74,6 @@ export const VideoStreamInProgressResponseDto$outboundSchema: z.ZodType< startedAt: z.number().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VideoStreamInProgressResponseDto$ { - /** @deprecated use `VideoStreamInProgressResponseDto$inboundSchema` instead. */ - export const inboundSchema = VideoStreamInProgressResponseDto$inboundSchema; - /** @deprecated use `VideoStreamInProgressResponseDto$outboundSchema` instead. */ - export const outboundSchema = VideoStreamInProgressResponseDto$outboundSchema; - /** @deprecated use `VideoStreamInProgressResponseDto$Outbound` instead. */ - export type Outbound = VideoStreamInProgressResponseDto$Outbound; -} - export function videoStreamInProgressResponseDtoToJSON( videoStreamInProgressResponseDto: VideoStreamInProgressResponseDto, ): string { @@ -111,7 +83,6 @@ export function videoStreamInProgressResponseDtoToJSON( ), ); } - export function videoStreamInProgressResponseDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/components/videouploaddto.ts b/src/models/components/videouploaddto.ts index 24f5937..391ddde 100644 --- a/src/models/components/videouploaddto.ts +++ b/src/models/components/videouploaddto.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { blobLikeSchema } from "../../types/blobs.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -31,7 +31,6 @@ export const FileT$inboundSchema: z.ZodType = z z.instanceof(Uint8Array), ]), }); - /** @internal */ export type FileT$Outbound = { fileName: string; @@ -53,23 +52,9 @@ export const FileT$outboundSchema: z.ZodType< ]), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace FileT$ { - /** @deprecated use `FileT$inboundSchema` instead. */ - export const inboundSchema = FileT$inboundSchema; - /** @deprecated use `FileT$outboundSchema` instead. */ - export const outboundSchema = FileT$outboundSchema; - /** @deprecated use `FileT$Outbound` instead. */ - export type Outbound = FileT$Outbound; -} - export function fileToJSON(fileT: FileT): string { return JSON.stringify(FileT$outboundSchema.parse(fileT)); } - export function fileFromJSON( jsonString: string, ): SafeParseResult { @@ -88,7 +73,6 @@ export const VideoUploadDto$inboundSchema: z.ZodType< > = z.object({ file: z.lazy(() => FileT$inboundSchema), }); - /** @internal */ export type VideoUploadDto$Outbound = { file: FileT$Outbound | Blob; @@ -103,23 +87,9 @@ export const VideoUploadDto$outboundSchema: z.ZodType< file: z.lazy(() => FileT$outboundSchema).or(blobLikeSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VideoUploadDto$ { - /** @deprecated use `VideoUploadDto$inboundSchema` instead. */ - export const inboundSchema = VideoUploadDto$inboundSchema; - /** @deprecated use `VideoUploadDto$outboundSchema` instead. */ - export const outboundSchema = VideoUploadDto$outboundSchema; - /** @deprecated use `VideoUploadDto$Outbound` instead. */ - export type Outbound = VideoUploadDto$Outbound; -} - export function videoUploadDtoToJSON(videoUploadDto: VideoUploadDto): string { return JSON.stringify(VideoUploadDto$outboundSchema.parse(videoUploadDto)); } - export function videoUploadDtoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/errors/apierror.ts b/src/models/errors/apierror.ts index 3a04a1c..1db0447 100644 --- a/src/models/errors/apierror.ts +++ b/src/models/errors/apierror.ts @@ -2,26 +2,39 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export class APIError extends Error { - public readonly statusCode: number; - public readonly contentType: string; +import { IrisSDKError } from "./irissdkerror.js"; +/** The fallback error class if no more specific error class is matched */ +export class APIError extends IrisSDKError { constructor( message: string, - public readonly rawResponse: Response, - public readonly body: string = "", + httpMeta: { + response: Response; + request: Request; + body: string; + }, ) { - const statusCode = rawResponse.status; - const contentType = rawResponse.headers.get("content-type") || ""; - const bodyString = body.length > 0 ? `\n${body}` : ""; - - super( - `${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`, - ); - - this.statusCode = statusCode; - this.contentType = contentType; - + if (message) { + message += `: `; + } + message += `Status ${httpMeta.response.status}`; + const contentType = httpMeta.response.headers.get("content-type") || `""`; + if (contentType !== "application/json") { + message += ` Content-Type ${ + contentType.includes(" ") ? `"${contentType}"` : contentType + }`; + } + const body = httpMeta.body || `""`; + message += body.length > 100 ? "\n" : ". "; + let bodyDisplay = body; + if (body.length > 10000) { + const truncated = body.substring(0, 10000); + const remaining = body.length - 10000; + bodyDisplay = `${truncated}...and ${remaining} more chars`; + } + message += `Body: ${bodyDisplay}`; + message = message.trim(); + super(message, httpMeta); this.name = "APIError"; } } diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts index 7b2a3be..99fde31 100644 --- a/src/models/errors/index.ts +++ b/src/models/errors/index.ts @@ -4,4 +4,6 @@ export * from "./apierror.js"; export * from "./httpclienterrors.js"; +export * from "./irissdkerror.js"; +export * from "./responsevalidationerror.js"; export * from "./sdkvalidationerror.js"; diff --git a/src/models/errors/irissdkerror.ts b/src/models/errors/irissdkerror.ts new file mode 100644 index 0000000..dfcf41f --- /dev/null +++ b/src/models/errors/irissdkerror.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** The base class for all HTTP error responses */ +export class IrisSDKError extends Error { + /** HTTP status code */ + public readonly statusCode: number; + /** HTTP body */ + public readonly body: string; + /** HTTP headers */ + public readonly headers: Headers; + /** HTTP content type */ + public readonly contentType: string; + /** Raw response */ + public readonly rawResponse: Response; + + constructor( + message: string, + httpMeta: { + response: Response; + request: Request; + body: string; + }, + ) { + super(message); + this.statusCode = httpMeta.response.status; + this.body = httpMeta.body; + this.headers = httpMeta.response.headers; + this.contentType = httpMeta.response.headers.get("content-type") || ""; + this.rawResponse = httpMeta.response; + + this.name = "IrisSDKError"; + } +} diff --git a/src/models/errors/responsevalidationerror.ts b/src/models/errors/responsevalidationerror.ts new file mode 100644 index 0000000..db852d7 --- /dev/null +++ b/src/models/errors/responsevalidationerror.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { IrisSDKError } from "./irissdkerror.js"; +import { formatZodError } from "./sdkvalidationerror.js"; + +export class ResponseValidationError extends IrisSDKError { + /** + * The raw value that failed validation. + */ + public readonly rawValue: unknown; + + /** + * The raw message that failed validation. + */ + public readonly rawMessage: unknown; + + constructor( + message: string, + extra: { + response: Response; + request: Request; + body: string; + cause: unknown; + rawValue: unknown; + rawMessage: unknown; + }, + ) { + super(message, extra); + this.name = "ResponseValidationError"; + this.cause = extra.cause; + this.rawValue = extra.rawValue; + this.rawMessage = extra.rawMessage; + } + + /** + * Return a pretty-formatted error message if the underlying validation error + * is a ZodError or some other recognized error type, otherwise return the + * default error message. + */ + public pretty(): string { + if (this.cause instanceof z.ZodError) { + return `${this.rawMessage}\n${formatZodError(this.cause)}`; + } else { + return this.toString(); + } + } +} diff --git a/src/models/errors/sdkvalidationerror.ts b/src/models/errors/sdkvalidationerror.ts index 16929b9..6826e12 100644 --- a/src/models/errors/sdkvalidationerror.ts +++ b/src/models/errors/sdkvalidationerror.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; export class SDKValidationError extends Error { /** @@ -15,6 +15,18 @@ export class SDKValidationError extends Error { */ public readonly rawMessage: unknown; + // Allows for backwards compatibility for `instanceof` checks of `ResponseValidationError` + static override [Symbol.hasInstance]( + instance: unknown, + ): instance is SDKValidationError { + if (!(instance instanceof Error)) return false; + if (!("rawValue" in instance)) return false; + if (!("rawMessage" in instance)) return false; + if (!("pretty" in instance)) return false; + if (typeof instance.pretty !== "function") return false; + return true; + } + constructor(message: string, cause: unknown, rawValue: unknown) { super(`${message}: ${cause}`); this.name = "SDKValidationError"; diff --git a/src/models/operations/approverequest.ts b/src/models/operations/approverequest.ts index 938e7e8..0c81eea 100644 --- a/src/models/operations/approverequest.ts +++ b/src/models/operations/approverequest.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -19,7 +19,6 @@ export const ApproveRequestRequest$inboundSchema: z.ZodType< > = z.object({ requestId: z.string(), }); - /** @internal */ export type ApproveRequestRequest$Outbound = { requestId: string; @@ -34,19 +33,6 @@ export const ApproveRequestRequest$outboundSchema: z.ZodType< requestId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ApproveRequestRequest$ { - /** @deprecated use `ApproveRequestRequest$inboundSchema` instead. */ - export const inboundSchema = ApproveRequestRequest$inboundSchema; - /** @deprecated use `ApproveRequestRequest$outboundSchema` instead. */ - export const outboundSchema = ApproveRequestRequest$outboundSchema; - /** @deprecated use `ApproveRequestRequest$Outbound` instead. */ - export type Outbound = ApproveRequestRequest$Outbound; -} - export function approveRequestRequestToJSON( approveRequestRequest: ApproveRequestRequest, ): string { @@ -54,7 +40,6 @@ export function approveRequestRequestToJSON( ApproveRequestRequest$outboundSchema.parse(approveRequestRequest), ); } - export function approveRequestRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deletefile.ts b/src/models/operations/deletefile.ts index d1feb8d..a399382 100644 --- a/src/models/operations/deletefile.ts +++ b/src/models/operations/deletefile.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -30,7 +30,6 @@ export const DeleteFileRequest$inboundSchema: z.ZodType< > = z.object({ id: z.string(), }); - /** @internal */ export type DeleteFileRequest$Outbound = { id: string; @@ -45,19 +44,6 @@ export const DeleteFileRequest$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteFileRequest$ { - /** @deprecated use `DeleteFileRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteFileRequest$inboundSchema; - /** @deprecated use `DeleteFileRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteFileRequest$outboundSchema; - /** @deprecated use `DeleteFileRequest$Outbound` instead. */ - export type Outbound = DeleteFileRequest$Outbound; -} - export function deleteFileRequestToJSON( deleteFileRequest: DeleteFileRequest, ): string { @@ -65,7 +51,6 @@ export function deleteFileRequestToJSON( DeleteFileRequest$outboundSchema.parse(deleteFileRequest), ); } - export function deleteFileRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -85,7 +70,6 @@ export const DeleteFileResponseBody$inboundSchema: z.ZodType< success: z.boolean().optional(), message: z.string().optional(), }); - /** @internal */ export type DeleteFileResponseBody$Outbound = { success?: boolean | undefined; @@ -102,19 +86,6 @@ export const DeleteFileResponseBody$outboundSchema: z.ZodType< message: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteFileResponseBody$ { - /** @deprecated use `DeleteFileResponseBody$inboundSchema` instead. */ - export const inboundSchema = DeleteFileResponseBody$inboundSchema; - /** @deprecated use `DeleteFileResponseBody$outboundSchema` instead. */ - export const outboundSchema = DeleteFileResponseBody$outboundSchema; - /** @deprecated use `DeleteFileResponseBody$Outbound` instead. */ - export type Outbound = DeleteFileResponseBody$Outbound; -} - export function deleteFileResponseBodyToJSON( deleteFileResponseBody: DeleteFileResponseBody, ): string { @@ -122,7 +93,6 @@ export function deleteFileResponseBodyToJSON( DeleteFileResponseBody$outboundSchema.parse(deleteFileResponseBody), ); } - export function deleteFileResponseBodyFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deleteframe.ts b/src/models/operations/deleteframe.ts index 2ccb76d..ca083fc 100644 --- a/src/models/operations/deleteframe.ts +++ b/src/models/operations/deleteframe.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -27,7 +27,6 @@ export const DeleteFrameRequest$inboundSchema: z.ZodType< id: z.string(), frameIndex: z.number(), }); - /** @internal */ export type DeleteFrameRequest$Outbound = { id: string; @@ -44,19 +43,6 @@ export const DeleteFrameRequest$outboundSchema: z.ZodType< frameIndex: z.number(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteFrameRequest$ { - /** @deprecated use `DeleteFrameRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteFrameRequest$inboundSchema; - /** @deprecated use `DeleteFrameRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteFrameRequest$outboundSchema; - /** @deprecated use `DeleteFrameRequest$Outbound` instead. */ - export type Outbound = DeleteFrameRequest$Outbound; -} - export function deleteFrameRequestToJSON( deleteFrameRequest: DeleteFrameRequest, ): string { @@ -64,7 +50,6 @@ export function deleteFrameRequestToJSON( DeleteFrameRequest$outboundSchema.parse(deleteFrameRequest), ); } - export function deleteFrameRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deleterecording.ts b/src/models/operations/deleterecording.ts index 2cbecd2..ede57e7 100644 --- a/src/models/operations/deleterecording.ts +++ b/src/models/operations/deleterecording.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const DeleteRecordingRequest$inboundSchema: z.ZodType< > = z.object({ id: z.string(), }); - /** @internal */ export type DeleteRecordingRequest$Outbound = { id: string; @@ -37,19 +36,6 @@ export const DeleteRecordingRequest$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteRecordingRequest$ { - /** @deprecated use `DeleteRecordingRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteRecordingRequest$inboundSchema; - /** @deprecated use `DeleteRecordingRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteRecordingRequest$outboundSchema; - /** @deprecated use `DeleteRecordingRequest$Outbound` instead. */ - export type Outbound = DeleteRecordingRequest$Outbound; -} - export function deleteRecordingRequestToJSON( deleteRecordingRequest: DeleteRecordingRequest, ): string { @@ -57,7 +43,6 @@ export function deleteRecordingRequestToJSON( DeleteRecordingRequest$outboundSchema.parse(deleteRecordingRequest), ); } - export function deleteRecordingRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/downloadartifactfile.ts b/src/models/operations/downloadartifactfile.ts index 7d121b4..fe10ee3 100644 --- a/src/models/operations/downloadartifactfile.ts +++ b/src/models/operations/downloadartifactfile.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const DownloadArtifactFileRequest$inboundSchema: z.ZodType< > = z.object({ path: z.string(), }); - /** @internal */ export type DownloadArtifactFileRequest$Outbound = { path: string; @@ -37,19 +36,6 @@ export const DownloadArtifactFileRequest$outboundSchema: z.ZodType< path: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DownloadArtifactFileRequest$ { - /** @deprecated use `DownloadArtifactFileRequest$inboundSchema` instead. */ - export const inboundSchema = DownloadArtifactFileRequest$inboundSchema; - /** @deprecated use `DownloadArtifactFileRequest$outboundSchema` instead. */ - export const outboundSchema = DownloadArtifactFileRequest$outboundSchema; - /** @deprecated use `DownloadArtifactFileRequest$Outbound` instead. */ - export type Outbound = DownloadArtifactFileRequest$Outbound; -} - export function downloadArtifactFileRequestToJSON( downloadArtifactFileRequest: DownloadArtifactFileRequest, ): string { @@ -59,7 +45,6 @@ export function downloadArtifactFileRequestToJSON( ), ); } - export function downloadArtifactFileRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/downloadartifactfolder.ts b/src/models/operations/downloadartifactfolder.ts index fcc0878..93a1ec4 100644 --- a/src/models/operations/downloadartifactfolder.ts +++ b/src/models/operations/downloadartifactfolder.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const DownloadArtifactFolderRequest$inboundSchema: z.ZodType< > = z.object({ path: z.string(), }); - /** @internal */ export type DownloadArtifactFolderRequest$Outbound = { path: string; @@ -37,19 +36,6 @@ export const DownloadArtifactFolderRequest$outboundSchema: z.ZodType< path: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DownloadArtifactFolderRequest$ { - /** @deprecated use `DownloadArtifactFolderRequest$inboundSchema` instead. */ - export const inboundSchema = DownloadArtifactFolderRequest$inboundSchema; - /** @deprecated use `DownloadArtifactFolderRequest$outboundSchema` instead. */ - export const outboundSchema = DownloadArtifactFolderRequest$outboundSchema; - /** @deprecated use `DownloadArtifactFolderRequest$Outbound` instead. */ - export type Outbound = DownloadArtifactFolderRequest$Outbound; -} - export function downloadArtifactFolderRequestToJSON( downloadArtifactFolderRequest: DownloadArtifactFolderRequest, ): string { @@ -59,7 +45,6 @@ export function downloadArtifactFolderRequestToJSON( ), ); } - export function downloadArtifactFolderRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/downloadfile.ts b/src/models/operations/downloadfile.ts index 992b0e7..14256f3 100644 --- a/src/models/operations/downloadfile.ts +++ b/src/models/operations/downloadfile.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const DownloadFileRequest$inboundSchema: z.ZodType< > = z.object({ filename: z.string(), }); - /** @internal */ export type DownloadFileRequest$Outbound = { filename: string; @@ -37,19 +36,6 @@ export const DownloadFileRequest$outboundSchema: z.ZodType< filename: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DownloadFileRequest$ { - /** @deprecated use `DownloadFileRequest$inboundSchema` instead. */ - export const inboundSchema = DownloadFileRequest$inboundSchema; - /** @deprecated use `DownloadFileRequest$outboundSchema` instead. */ - export const outboundSchema = DownloadFileRequest$outboundSchema; - /** @deprecated use `DownloadFileRequest$Outbound` instead. */ - export type Outbound = DownloadFileRequest$Outbound; -} - export function downloadFileRequestToJSON( downloadFileRequest: DownloadFileRequest, ): string { @@ -57,7 +43,6 @@ export function downloadFileRequestToJSON( DownloadFileRequest$outboundSchema.parse(downloadFileRequest), ); } - export function downloadFileRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/downloadrecording.ts b/src/models/operations/downloadrecording.ts index 0fcd442..b8b4b2c 100644 --- a/src/models/operations/downloadrecording.ts +++ b/src/models/operations/downloadrecording.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const DownloadRecordingRequest$inboundSchema: z.ZodType< > = z.object({ id: z.string(), }); - /** @internal */ export type DownloadRecordingRequest$Outbound = { id: string; @@ -37,19 +36,6 @@ export const DownloadRecordingRequest$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DownloadRecordingRequest$ { - /** @deprecated use `DownloadRecordingRequest$inboundSchema` instead. */ - export const inboundSchema = DownloadRecordingRequest$inboundSchema; - /** @deprecated use `DownloadRecordingRequest$outboundSchema` instead. */ - export const outboundSchema = DownloadRecordingRequest$outboundSchema; - /** @deprecated use `DownloadRecordingRequest$Outbound` instead. */ - export type Outbound = DownloadRecordingRequest$Outbound; -} - export function downloadRecordingRequestToJSON( downloadRecordingRequest: DownloadRecordingRequest, ): string { @@ -57,7 +43,6 @@ export function downloadRecordingRequestToJSON( DownloadRecordingRequest$outboundSchema.parse(downloadRecordingRequest), ); } - export function downloadRecordingRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/executerpasteps.ts b/src/models/operations/executerpasteps.ts index 6e2cf5f..474981c 100644 --- a/src/models/operations/executerpasteps.ts +++ b/src/models/operations/executerpasteps.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -19,7 +19,6 @@ export const ExecuteRpaStepsRequest$inboundSchema: z.ZodType< > = z.object({ id: z.string(), }); - /** @internal */ export type ExecuteRpaStepsRequest$Outbound = { id: string; @@ -34,19 +33,6 @@ export const ExecuteRpaStepsRequest$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ExecuteRpaStepsRequest$ { - /** @deprecated use `ExecuteRpaStepsRequest$inboundSchema` instead. */ - export const inboundSchema = ExecuteRpaStepsRequest$inboundSchema; - /** @deprecated use `ExecuteRpaStepsRequest$outboundSchema` instead. */ - export const outboundSchema = ExecuteRpaStepsRequest$outboundSchema; - /** @deprecated use `ExecuteRpaStepsRequest$Outbound` instead. */ - export type Outbound = ExecuteRpaStepsRequest$Outbound; -} - export function executeRpaStepsRequestToJSON( executeRpaStepsRequest: ExecuteRpaStepsRequest, ): string { @@ -54,7 +40,6 @@ export function executeRpaStepsRequestToJSON( ExecuteRpaStepsRequest$outboundSchema.parse(executeRpaStepsRequest), ); } - export function executeRpaStepsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/generatevideo.ts b/src/models/operations/generatevideo.ts index ecce8d3..4de7974 100644 --- a/src/models/operations/generatevideo.ts +++ b/src/models/operations/generatevideo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -33,7 +33,6 @@ export const GenerateVideoRequest$inboundSchema: z.ZodType< "GenerateVideoDto": "generateVideoDto", }); }); - /** @internal */ export type GenerateVideoRequest$Outbound = { id: string; @@ -54,19 +53,6 @@ export const GenerateVideoRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GenerateVideoRequest$ { - /** @deprecated use `GenerateVideoRequest$inboundSchema` instead. */ - export const inboundSchema = GenerateVideoRequest$inboundSchema; - /** @deprecated use `GenerateVideoRequest$outboundSchema` instead. */ - export const outboundSchema = GenerateVideoRequest$outboundSchema; - /** @deprecated use `GenerateVideoRequest$Outbound` instead. */ - export type Outbound = GenerateVideoRequest$Outbound; -} - export function generateVideoRequestToJSON( generateVideoRequest: GenerateVideoRequest, ): string { @@ -74,7 +60,6 @@ export function generateVideoRequestToJSON( GenerateVideoRequest$outboundSchema.parse(generateVideoRequest), ); } - export function generateVideoRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getanalysisresults.ts b/src/models/operations/getanalysisresults.ts index f076a7e..c602fe7 100644 --- a/src/models/operations/getanalysisresults.ts +++ b/src/models/operations/getanalysisresults.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -19,7 +19,6 @@ export const GetAnalysisResultsRequest$inboundSchema: z.ZodType< > = z.object({ id: z.string(), }); - /** @internal */ export type GetAnalysisResultsRequest$Outbound = { id: string; @@ -34,19 +33,6 @@ export const GetAnalysisResultsRequest$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetAnalysisResultsRequest$ { - /** @deprecated use `GetAnalysisResultsRequest$inboundSchema` instead. */ - export const inboundSchema = GetAnalysisResultsRequest$inboundSchema; - /** @deprecated use `GetAnalysisResultsRequest$outboundSchema` instead. */ - export const outboundSchema = GetAnalysisResultsRequest$outboundSchema; - /** @deprecated use `GetAnalysisResultsRequest$Outbound` instead. */ - export type Outbound = GetAnalysisResultsRequest$Outbound; -} - export function getAnalysisResultsRequestToJSON( getAnalysisResultsRequest: GetAnalysisResultsRequest, ): string { @@ -54,7 +40,6 @@ export function getAnalysisResultsRequestToJSON( GetAnalysisResultsRequest$outboundSchema.parse(getAnalysisResultsRequest), ); } - export function getAnalysisResultsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getexecutionstatus.ts b/src/models/operations/getexecutionstatus.ts index 899beef..9865935 100644 --- a/src/models/operations/getexecutionstatus.ts +++ b/src/models/operations/getexecutionstatus.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const GetExecutionStatusRequest$inboundSchema: z.ZodType< > = z.object({ executionId: z.string(), }); - /** @internal */ export type GetExecutionStatusRequest$Outbound = { executionId: string; @@ -37,19 +36,6 @@ export const GetExecutionStatusRequest$outboundSchema: z.ZodType< executionId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetExecutionStatusRequest$ { - /** @deprecated use `GetExecutionStatusRequest$inboundSchema` instead. */ - export const inboundSchema = GetExecutionStatusRequest$inboundSchema; - /** @deprecated use `GetExecutionStatusRequest$outboundSchema` instead. */ - export const outboundSchema = GetExecutionStatusRequest$outboundSchema; - /** @deprecated use `GetExecutionStatusRequest$Outbound` instead. */ - export type Outbound = GetExecutionStatusRequest$Outbound; -} - export function getExecutionStatusRequestToJSON( getExecutionStatusRequest: GetExecutionStatusRequest, ): string { @@ -57,7 +43,6 @@ export function getExecutionStatusRequestToJSON( GetExecutionStatusRequest$outboundSchema.parse(getExecutionStatusRequest), ); } - export function getExecutionStatusRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getfileinfo.ts b/src/models/operations/getfileinfo.ts index 9a5f941..c5fa3ed 100644 --- a/src/models/operations/getfileinfo.ts +++ b/src/models/operations/getfileinfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const GetFileInfoRequest$inboundSchema: z.ZodType< > = z.object({ id: z.string(), }); - /** @internal */ export type GetFileInfoRequest$Outbound = { id: string; @@ -37,19 +36,6 @@ export const GetFileInfoRequest$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetFileInfoRequest$ { - /** @deprecated use `GetFileInfoRequest$inboundSchema` instead. */ - export const inboundSchema = GetFileInfoRequest$inboundSchema; - /** @deprecated use `GetFileInfoRequest$outboundSchema` instead. */ - export const outboundSchema = GetFileInfoRequest$outboundSchema; - /** @deprecated use `GetFileInfoRequest$Outbound` instead. */ - export type Outbound = GetFileInfoRequest$Outbound; -} - export function getFileInfoRequestToJSON( getFileInfoRequest: GetFileInfoRequest, ): string { @@ -57,7 +43,6 @@ export function getFileInfoRequestToJSON( GetFileInfoRequest$outboundSchema.parse(getFileInfoRequest), ); } - export function getFileInfoRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getframesandcaptions.ts b/src/models/operations/getframesandcaptions.ts index 9d53f6e..d4ee735 100644 --- a/src/models/operations/getframesandcaptions.ts +++ b/src/models/operations/getframesandcaptions.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const GetFramesAndCaptionsRequest$inboundSchema: z.ZodType< > = z.object({ id: z.string(), }); - /** @internal */ export type GetFramesAndCaptionsRequest$Outbound = { id: string; @@ -37,19 +36,6 @@ export const GetFramesAndCaptionsRequest$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetFramesAndCaptionsRequest$ { - /** @deprecated use `GetFramesAndCaptionsRequest$inboundSchema` instead. */ - export const inboundSchema = GetFramesAndCaptionsRequest$inboundSchema; - /** @deprecated use `GetFramesAndCaptionsRequest$outboundSchema` instead. */ - export const outboundSchema = GetFramesAndCaptionsRequest$outboundSchema; - /** @deprecated use `GetFramesAndCaptionsRequest$Outbound` instead. */ - export type Outbound = GetFramesAndCaptionsRequest$Outbound; -} - export function getFramesAndCaptionsRequestToJSON( getFramesAndCaptionsRequest: GetFramesAndCaptionsRequest, ): string { @@ -59,7 +45,6 @@ export function getFramesAndCaptionsRequestToJSON( ), ); } - export function getFramesAndCaptionsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getparametertemplate.ts b/src/models/operations/getparametertemplate.ts index 8c02d54..90da817 100644 --- a/src/models/operations/getparametertemplate.ts +++ b/src/models/operations/getparametertemplate.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const GetParameterTemplateRequest$inboundSchema: z.ZodType< > = z.object({ recordingId: z.string(), }); - /** @internal */ export type GetParameterTemplateRequest$Outbound = { recordingId: string; @@ -37,19 +36,6 @@ export const GetParameterTemplateRequest$outboundSchema: z.ZodType< recordingId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetParameterTemplateRequest$ { - /** @deprecated use `GetParameterTemplateRequest$inboundSchema` instead. */ - export const inboundSchema = GetParameterTemplateRequest$inboundSchema; - /** @deprecated use `GetParameterTemplateRequest$outboundSchema` instead. */ - export const outboundSchema = GetParameterTemplateRequest$outboundSchema; - /** @deprecated use `GetParameterTemplateRequest$Outbound` instead. */ - export type Outbound = GetParameterTemplateRequest$Outbound; -} - export function getParameterTemplateRequestToJSON( getParameterTemplateRequest: GetParameterTemplateRequest, ): string { @@ -59,7 +45,6 @@ export function getParameterTemplateRequestToJSON( ), ); } - export function getParameterTemplateRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getrecordingmetadata.ts b/src/models/operations/getrecordingmetadata.ts index 9501842..10de257 100644 --- a/src/models/operations/getrecordingmetadata.ts +++ b/src/models/operations/getrecordingmetadata.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const GetRecordingMetadataRequest$inboundSchema: z.ZodType< > = z.object({ id: z.string(), }); - /** @internal */ export type GetRecordingMetadataRequest$Outbound = { id: string; @@ -37,19 +36,6 @@ export const GetRecordingMetadataRequest$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetRecordingMetadataRequest$ { - /** @deprecated use `GetRecordingMetadataRequest$inboundSchema` instead. */ - export const inboundSchema = GetRecordingMetadataRequest$inboundSchema; - /** @deprecated use `GetRecordingMetadataRequest$outboundSchema` instead. */ - export const outboundSchema = GetRecordingMetadataRequest$outboundSchema; - /** @deprecated use `GetRecordingMetadataRequest$Outbound` instead. */ - export type Outbound = GetRecordingMetadataRequest$Outbound; -} - export function getRecordingMetadataRequestToJSON( getRecordingMetadataRequest: GetRecordingMetadataRequest, ): string { @@ -59,7 +45,6 @@ export function getRecordingMetadataRequestToJSON( ), ); } - export function getRecordingMetadataRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getrecordingthumbnail.ts b/src/models/operations/getrecordingthumbnail.ts index 04876bb..6504b33 100644 --- a/src/models/operations/getrecordingthumbnail.ts +++ b/src/models/operations/getrecordingthumbnail.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const GetRecordingThumbnailRequest$inboundSchema: z.ZodType< > = z.object({ id: z.string(), }); - /** @internal */ export type GetRecordingThumbnailRequest$Outbound = { id: string; @@ -37,19 +36,6 @@ export const GetRecordingThumbnailRequest$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetRecordingThumbnailRequest$ { - /** @deprecated use `GetRecordingThumbnailRequest$inboundSchema` instead. */ - export const inboundSchema = GetRecordingThumbnailRequest$inboundSchema; - /** @deprecated use `GetRecordingThumbnailRequest$outboundSchema` instead. */ - export const outboundSchema = GetRecordingThumbnailRequest$outboundSchema; - /** @deprecated use `GetRecordingThumbnailRequest$Outbound` instead. */ - export type Outbound = GetRecordingThumbnailRequest$Outbound; -} - export function getRecordingThumbnailRequestToJSON( getRecordingThumbnailRequest: GetRecordingThumbnailRequest, ): string { @@ -59,7 +45,6 @@ export function getRecordingThumbnailRequestToJSON( ), ); } - export function getRecordingThumbnailRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getrecordingvideodata.ts b/src/models/operations/getrecordingvideodata.ts index 6b1d90f..fe9d8d5 100644 --- a/src/models/operations/getrecordingvideodata.ts +++ b/src/models/operations/getrecordingvideodata.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const GetRecordingVideoDataRequest$inboundSchema: z.ZodType< > = z.object({ id: z.string(), }); - /** @internal */ export type GetRecordingVideoDataRequest$Outbound = { id: string; @@ -37,19 +36,6 @@ export const GetRecordingVideoDataRequest$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetRecordingVideoDataRequest$ { - /** @deprecated use `GetRecordingVideoDataRequest$inboundSchema` instead. */ - export const inboundSchema = GetRecordingVideoDataRequest$inboundSchema; - /** @deprecated use `GetRecordingVideoDataRequest$outboundSchema` instead. */ - export const outboundSchema = GetRecordingVideoDataRequest$outboundSchema; - /** @deprecated use `GetRecordingVideoDataRequest$Outbound` instead. */ - export type Outbound = GetRecordingVideoDataRequest$Outbound; -} - export function getRecordingVideoDataRequestToJSON( getRecordingVideoDataRequest: GetRecordingVideoDataRequest, ): string { @@ -59,7 +45,6 @@ export function getRecordingVideoDataRequestToJSON( ), ); } - export function getRecordingVideoDataRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getvideostatus.ts b/src/models/operations/getvideostatus.ts index e97271a..d292edb 100644 --- a/src/models/operations/getvideostatus.ts +++ b/src/models/operations/getvideostatus.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const GetVideoStatusRequest$inboundSchema: z.ZodType< > = z.object({ id: z.string(), }); - /** @internal */ export type GetVideoStatusRequest$Outbound = { id: string; @@ -37,19 +36,6 @@ export const GetVideoStatusRequest$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetVideoStatusRequest$ { - /** @deprecated use `GetVideoStatusRequest$inboundSchema` instead. */ - export const inboundSchema = GetVideoStatusRequest$inboundSchema; - /** @deprecated use `GetVideoStatusRequest$outboundSchema` instead. */ - export const outboundSchema = GetVideoStatusRequest$outboundSchema; - /** @deprecated use `GetVideoStatusRequest$Outbound` instead. */ - export type Outbound = GetVideoStatusRequest$Outbound; -} - export function getVideoStatusRequestToJSON( getVideoStatusRequest: GetVideoStatusRequest, ): string { @@ -57,7 +43,6 @@ export function getVideoStatusRequestToJSON( GetVideoStatusRequest$outboundSchema.parse(getVideoStatusRequest), ); } - export function getVideoStatusRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/listartifacts.ts b/src/models/operations/listartifacts.ts index e2e49cc..029777e 100644 --- a/src/models/operations/listartifacts.ts +++ b/src/models/operations/listartifacts.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const ListArtifactsRequest$inboundSchema: z.ZodType< > = z.object({ path: z.string().optional(), }); - /** @internal */ export type ListArtifactsRequest$Outbound = { path?: string | undefined; @@ -37,19 +36,6 @@ export const ListArtifactsRequest$outboundSchema: z.ZodType< path: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListArtifactsRequest$ { - /** @deprecated use `ListArtifactsRequest$inboundSchema` instead. */ - export const inboundSchema = ListArtifactsRequest$inboundSchema; - /** @deprecated use `ListArtifactsRequest$outboundSchema` instead. */ - export const outboundSchema = ListArtifactsRequest$outboundSchema; - /** @deprecated use `ListArtifactsRequest$Outbound` instead. */ - export type Outbound = ListArtifactsRequest$Outbound; -} - export function listArtifactsRequestToJSON( listArtifactsRequest: ListArtifactsRequest, ): string { @@ -57,7 +43,6 @@ export function listArtifactsRequestToJSON( ListArtifactsRequest$outboundSchema.parse(listArtifactsRequest), ); } - export function listArtifactsRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/regeneratevideo.ts b/src/models/operations/regeneratevideo.ts index 06f9d2a..cca85d1 100644 --- a/src/models/operations/regeneratevideo.ts +++ b/src/models/operations/regeneratevideo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const RegenerateVideoRequest$inboundSchema: z.ZodType< > = z.object({ id: z.string(), }); - /** @internal */ export type RegenerateVideoRequest$Outbound = { id: string; @@ -37,19 +36,6 @@ export const RegenerateVideoRequest$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RegenerateVideoRequest$ { - /** @deprecated use `RegenerateVideoRequest$inboundSchema` instead. */ - export const inboundSchema = RegenerateVideoRequest$inboundSchema; - /** @deprecated use `RegenerateVideoRequest$outboundSchema` instead. */ - export const outboundSchema = RegenerateVideoRequest$outboundSchema; - /** @deprecated use `RegenerateVideoRequest$Outbound` instead. */ - export type Outbound = RegenerateVideoRequest$Outbound; -} - export function regenerateVideoRequestToJSON( regenerateVideoRequest: RegenerateVideoRequest, ): string { @@ -57,7 +43,6 @@ export function regenerateVideoRequestToJSON( RegenerateVideoRequest$outboundSchema.parse(regenerateVideoRequest), ); } - export function regenerateVideoRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/stopexecution.ts b/src/models/operations/stopexecution.ts index 3659e2f..ad72169 100644 --- a/src/models/operations/stopexecution.ts +++ b/src/models/operations/stopexecution.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const StopExecutionRequest$inboundSchema: z.ZodType< > = z.object({ executionId: z.string(), }); - /** @internal */ export type StopExecutionRequest$Outbound = { executionId: string; @@ -37,19 +36,6 @@ export const StopExecutionRequest$outboundSchema: z.ZodType< executionId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace StopExecutionRequest$ { - /** @deprecated use `StopExecutionRequest$inboundSchema` instead. */ - export const inboundSchema = StopExecutionRequest$inboundSchema; - /** @deprecated use `StopExecutionRequest$outboundSchema` instead. */ - export const outboundSchema = StopExecutionRequest$outboundSchema; - /** @deprecated use `StopExecutionRequest$Outbound` instead. */ - export type Outbound = StopExecutionRequest$Outbound; -} - export function stopExecutionRequestToJSON( stopExecutionRequest: StopExecutionRequest, ): string { @@ -57,7 +43,6 @@ export function stopExecutionRequestToJSON( StopExecutionRequest$outboundSchema.parse(stopExecutionRequest), ); } - export function stopExecutionRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/streamoriginalvideo.ts b/src/models/operations/streamoriginalvideo.ts index 48b468a..3d79168 100644 --- a/src/models/operations/streamoriginalvideo.ts +++ b/src/models/operations/streamoriginalvideo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -19,7 +19,6 @@ export const StreamOriginalVideoRequest$inboundSchema: z.ZodType< > = z.object({ filename: z.string(), }); - /** @internal */ export type StreamOriginalVideoRequest$Outbound = { filename: string; @@ -34,19 +33,6 @@ export const StreamOriginalVideoRequest$outboundSchema: z.ZodType< filename: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace StreamOriginalVideoRequest$ { - /** @deprecated use `StreamOriginalVideoRequest$inboundSchema` instead. */ - export const inboundSchema = StreamOriginalVideoRequest$inboundSchema; - /** @deprecated use `StreamOriginalVideoRequest$outboundSchema` instead. */ - export const outboundSchema = StreamOriginalVideoRequest$outboundSchema; - /** @deprecated use `StreamOriginalVideoRequest$Outbound` instead. */ - export type Outbound = StreamOriginalVideoRequest$Outbound; -} - export function streamOriginalVideoRequestToJSON( streamOriginalVideoRequest: StreamOriginalVideoRequest, ): string { @@ -54,7 +40,6 @@ export function streamOriginalVideoRequestToJSON( StreamOriginalVideoRequest$outboundSchema.parse(streamOriginalVideoRequest), ); } - export function streamOriginalVideoRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/streamprocessedvideo.ts b/src/models/operations/streamprocessedvideo.ts index b27e437..33eb84a 100644 --- a/src/models/operations/streamprocessedvideo.ts +++ b/src/models/operations/streamprocessedvideo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -19,7 +19,6 @@ export const StreamProcessedVideoRequest$inboundSchema: z.ZodType< > = z.object({ filename: z.string(), }); - /** @internal */ export type StreamProcessedVideoRequest$Outbound = { filename: string; @@ -34,19 +33,6 @@ export const StreamProcessedVideoRequest$outboundSchema: z.ZodType< filename: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace StreamProcessedVideoRequest$ { - /** @deprecated use `StreamProcessedVideoRequest$inboundSchema` instead. */ - export const inboundSchema = StreamProcessedVideoRequest$inboundSchema; - /** @deprecated use `StreamProcessedVideoRequest$outboundSchema` instead. */ - export const outboundSchema = StreamProcessedVideoRequest$outboundSchema; - /** @deprecated use `StreamProcessedVideoRequest$Outbound` instead. */ - export type Outbound = StreamProcessedVideoRequest$Outbound; -} - export function streamProcessedVideoRequestToJSON( streamProcessedVideoRequest: StreamProcessedVideoRequest, ): string { @@ -56,7 +42,6 @@ export function streamProcessedVideoRequestToJSON( ), ); } - export function streamProcessedVideoRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/streamvideo.ts b/src/models/operations/streamvideo.ts index c6cbdd6..034f190 100644 --- a/src/models/operations/streamvideo.ts +++ b/src/models/operations/streamvideo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import * as b64$ from "../../lib/base64.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -35,7 +35,6 @@ export const StreamVideoRequest$inboundSchema: z.ZodType< id: z.string(), download: z.boolean().optional(), }); - /** @internal */ export type StreamVideoRequest$Outbound = { id: string; @@ -52,19 +51,6 @@ export const StreamVideoRequest$outboundSchema: z.ZodType< download: z.boolean().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace StreamVideoRequest$ { - /** @deprecated use `StreamVideoRequest$inboundSchema` instead. */ - export const inboundSchema = StreamVideoRequest$inboundSchema; - /** @deprecated use `StreamVideoRequest$outboundSchema` instead. */ - export const outboundSchema = StreamVideoRequest$outboundSchema; - /** @deprecated use `StreamVideoRequest$Outbound` instead. */ - export type Outbound = StreamVideoRequest$Outbound; -} - export function streamVideoRequestToJSON( streamVideoRequest: StreamVideoRequest, ): string { @@ -72,7 +58,6 @@ export function streamVideoRequestToJSON( StreamVideoRequest$outboundSchema.parse(streamVideoRequest), ); } - export function streamVideoRequestFromJSON( jsonString: string, ): SafeParseResult { @@ -94,7 +79,6 @@ export const StreamVideoResponse$inboundSchema: z.ZodType< z.instanceof(ReadableStream), b64$.zodInbound, ]); - /** @internal */ export type StreamVideoResponse$Outbound = | ReadableStream @@ -114,19 +98,6 @@ export const StreamVideoResponse$outboundSchema: z.ZodType< b64$.zodOutbound, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace StreamVideoResponse$ { - /** @deprecated use `StreamVideoResponse$inboundSchema` instead. */ - export const inboundSchema = StreamVideoResponse$inboundSchema; - /** @deprecated use `StreamVideoResponse$outboundSchema` instead. */ - export const outboundSchema = StreamVideoResponse$outboundSchema; - /** @deprecated use `StreamVideoResponse$Outbound` instead. */ - export type Outbound = StreamVideoResponse$Outbound; -} - export function streamVideoResponseToJSON( streamVideoResponse: StreamVideoResponse, ): string { @@ -134,7 +105,6 @@ export function streamVideoResponseToJSON( StreamVideoResponse$outboundSchema.parse(streamVideoResponse), ); } - export function streamVideoResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/updatecaption.ts b/src/models/operations/updatecaption.ts index ce5dbde..29d3675 100644 --- a/src/models/operations/updatecaption.ts +++ b/src/models/operations/updatecaption.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -38,7 +38,6 @@ export const UpdateCaptionRequest$inboundSchema: z.ZodType< "UpdateCaptionDto": "updateCaptionDto", }); }); - /** @internal */ export type UpdateCaptionRequest$Outbound = { id: string; @@ -61,19 +60,6 @@ export const UpdateCaptionRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateCaptionRequest$ { - /** @deprecated use `UpdateCaptionRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateCaptionRequest$inboundSchema; - /** @deprecated use `UpdateCaptionRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateCaptionRequest$outboundSchema; - /** @deprecated use `UpdateCaptionRequest$Outbound` instead. */ - export type Outbound = UpdateCaptionRequest$Outbound; -} - export function updateCaptionRequestToJSON( updateCaptionRequest: UpdateCaptionRequest, ): string { @@ -81,7 +67,6 @@ export function updateCaptionRequestToJSON( UpdateCaptionRequest$outboundSchema.parse(updateCaptionRequest), ); } - export function updateCaptionRequestFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/types/blobs.ts b/src/types/blobs.ts index 4ce8460..cce2892 100644 --- a/src/types/blobs.ts +++ b/src/types/blobs.ts @@ -2,13 +2,14 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; -export const blobLikeSchema: z.ZodType = - z.custom(isBlobLike, { - message: "expected a Blob, File or Blob-like object", - fatal: true, - }); +export const blobLikeSchema: z.ZodType = z.custom< + Blob +>(isBlobLike, { + message: "expected a Blob, File or Blob-like object", + fatal: true, +}); export function isBlobLike(val: unknown): val is Blob { if (val instanceof Blob) { diff --git a/src/types/constdatetime.ts b/src/types/constdatetime.ts index c0a4409..fe62144 100644 --- a/src/types/constdatetime.ts +++ b/src/types/constdatetime.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; export function constDateTime( val: string, @@ -11,5 +11,5 @@ export function constDateTime( return ( typeof v === "string" && new Date(v).getTime() === new Date(val).getTime() ); - }, `Value must be equivelant to ${val}`); + }, `Value must be equivalent to ${val}`); } diff --git a/src/types/enums.ts b/src/types/enums.ts index 6fb6d91..aba0ffd 100644 --- a/src/types/enums.ts +++ b/src/types/enums.ts @@ -2,15 +2,44 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -declare const __brand: unique symbol; -export type Unrecognized = T & { [__brand]: "unrecognized" }; +import * as z from "zod/v3"; +import { Unrecognized, unrecognized } from "./unrecognized.js"; -export function catchUnrecognizedEnum(value: T): Unrecognized { - return value as Unrecognized; +export type ClosedEnum>> = + T[keyof T]; +export type OpenEnum>> = + | T[keyof T] + | Unrecognized; + +export function inboundSchema>( + enumObj: T, +): z.ZodType, z.ZodTypeDef, unknown> { + const options = Object.values(enumObj); + return z.union([ + ...options.map(x => z.literal(x)), + z.string().transform(x => unrecognized(x)), + ] as any); } -type Prettify = { [K in keyof T]: T[K] } & {}; -export type ClosedEnum = T[keyof T]; -export type OpenEnum = - | Prettify - | Unrecognized; +export function inboundSchemaInt>( + enumObj: T, +): z.ZodType, z.ZodTypeDef, unknown> { + // For numeric enums, Object.values returns both numbers and string keys + const options = Object.values(enumObj).filter(v => typeof v === "number"); + return z.union([ + ...options.map(x => z.literal(x)), + z.number().int().transform(x => unrecognized(x)), + ] as any); +} + +export function outboundSchema>( + _: T, +): z.ZodType> { + return z.string() as any; +} + +export function outboundSchemaInt>( + _: T, +): z.ZodType> { + return z.number().int() as any; +} diff --git a/src/types/index.ts b/src/types/index.ts index e124e81..abf0b7a 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -3,9 +3,9 @@ */ export { blobLikeSchema, isBlobLike } from "./blobs.js"; -export { catchUnrecognizedEnum } from "./enums.js"; -export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js"; +export type { ClosedEnum, OpenEnum } from "./enums.js"; export type { Result } from "./fp.js"; export type { PageIterator, Paginator } from "./operations.js"; export { createPageIterator } from "./operations.js"; export { RFCDate } from "./rfcdate.js"; +export * from "./unrecognized.js"; diff --git a/src/types/unrecognized.ts b/src/types/unrecognized.ts new file mode 100644 index 0000000..b7a2a13 --- /dev/null +++ b/src/types/unrecognized.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +declare const __brand: unique symbol; +export type Unrecognized = T & { [__brand]: "unrecognized" }; + +function unrecognized(value: T): Unrecognized { + globalCount++; + return value as Unrecognized; +} + +let globalCount = 0; +let refCount = 0; +export function startCountingUnrecognized() { + refCount++; + const start = globalCount; + return { + /** + * Ends counting and returns the delta. + * @param delta - If provided, only this amount is added to the parent counter + * (used for nested unions where we only want to record the winning option's count). + * If not provided, records all counts since start(). + */ + end: (delta?: number) => { + const count = globalCount - start; + // Reset globalCount back to start, then add only the specified delta + globalCount = start + (delta ?? count); + if (--refCount === 0) globalCount = 0; + return count; + }, + }; +} + +export { unrecognized }; diff --git a/tsconfig.json b/tsconfig.json index 94d81a3..0ccdbe2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,6 @@ { "compilerOptions": { - "incremental": true, - "tsBuildInfoFile": ".tsbuildinfo", + "incremental": false, "target": "ES2020", "lib": ["ES2022", "DOM", "DOM.Iterable"], "jsx": "react-jsx",