From b8cd6db70ba42a0e035a4e9e6abab8535d1b6b0b Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 23 Oct 2025 00:22:28 +0000 Subject: [PATCH 1/2] ## Typescript SDK Changes Detected: * `s2.accessTokens.listAccessTokens()`: `error.code` **Changed** **Breaking** :warning: * `s2.accessTokens.issueAccessToken()`: `error.code` **Changed** **Breaking** :warning: * `s2.accessTokens.revokeAccessToken()`: `error.code` **Changed** **Breaking** :warning: * `s2.basins.listBasins()`: `error.code` **Changed** **Breaking** :warning: * `s2.basins.createBasin()`: `error` **Changed** **Breaking** :warning: * `s2.basins.getBasinConfig()`: `error.code` **Changed** **Breaking** :warning: * `s2.basins.createOrReconfigureBasin()`: `error.code` **Changed** **Breaking** :warning: * `s2.basins.deleteBasin()`: `error` **Changed** **Breaking** :warning: * `s2.basins.reconfigureBasin()`: `error.code` **Changed** **Breaking** :warning: * `s2.metrics.accountMetrics()`: `error.code` **Changed** **Breaking** :warning: * `s2.metrics.basinMetrics()`: `error.code` **Changed** **Breaking** :warning: * `s2.metrics.streamMetrics()`: `error.code` **Changed** **Breaking** :warning: * `s2.streams.listStreams()`: `error.code` **Changed** **Breaking** :warning: * `s2.streams.createStream()`: `error.code` **Changed** **Breaking** :warning: * `s2.streams.getStreamConfig()`: `error.code` **Changed** **Breaking** :warning: * `s2.streams.createOrReconfigureStream()`: `error.code` **Changed** **Breaking** :warning: * `s2.streams.deleteStream()`: `error.code` **Changed** **Breaking** :warning: * `s2.streams.reconfigureStream()`: `error.code` **Changed** **Breaking** :warning: * `s2.records.read()`: `error` **Changed** **Breaking** :warning: * `s2.records.append()`: `error` **Changed** **Breaking** :warning: * `s2.records.checkTail()`: `error` **Changed** **Breaking** :warning: --- .speakeasy/gen.lock | 86 ++++++++++++------- .speakeasy/gen.yaml | 5 +- .speakeasy/workflow.lock | 13 +-- README.md | 5 +- RELEASES.md | 12 ++- RUNTIMES.md | 12 +-- docs/models/components/readbatch.md | 8 +- .../errors/{errorresponse.md => errorinfo.md} | 6 +- docs/sdks/accesstokens/README.md | 24 +++--- docs/sdks/basins/README.md | 48 +++++------ docs/sdks/metrics/README.md | 24 +++--- docs/sdks/records/README.md | 33 ++++--- docs/sdks/s2/README.md | 7 -- docs/sdks/streams/README.md | 48 +++++------ examples/package-lock.json | 4 +- jsr.json | 2 +- package-lock.json | 6 +- package.json | 4 +- src/funcs/accessTokensIssueAccessToken.ts | 10 +-- src/funcs/accessTokensListAccessTokens.ts | 10 +-- src/funcs/accessTokensRevokeAccessToken.ts | 12 +-- src/funcs/basinsCreateBasin.ts | 12 +-- src/funcs/basinsCreateOrReconfigureBasin.ts | 10 +-- src/funcs/basinsDeleteBasin.ts | 14 +-- src/funcs/basinsGetBasinConfig.ts | 10 +-- src/funcs/basinsListBasins.ts | 19 ++-- src/funcs/basinsReconfigureBasin.ts | 10 +-- src/funcs/metricsAccountMetrics.ts | 10 +-- src/funcs/metricsBasinMetrics.ts | 10 +-- src/funcs/metricsStreamMetrics.ts | 10 +-- src/funcs/recordsAppend.ts | 13 ++- src/funcs/recordsCheckTail.ts | 13 ++- src/funcs/recordsRead.ts | 13 ++- src/funcs/streamsCreateOrReconfigureStream.ts | 10 +-- src/funcs/streamsCreateStream.ts | 10 +-- src/funcs/streamsDeleteStream.ts | 12 +-- src/funcs/streamsGetStreamConfig.ts | 10 +-- src/funcs/streamsListStreams.ts | 19 ++-- src/funcs/streamsReconfigureStream.ts | 10 +-- src/lib/base64.ts | 2 +- src/lib/config.ts | 6 +- src/lib/env.ts | 26 ++++-- src/lib/schemas.ts | 2 +- src/mcp-server/cli/start/command.ts | 5 +- src/mcp-server/extensions.ts | 2 +- src/mcp-server/mcp-server.ts | 2 +- src/mcp-server/prompts.ts | 2 +- src/mcp-server/server.ts | 2 +- src/mcp-server/shared.ts | 3 +- src/mcp-server/tools.ts | 2 +- src/models/components/accesstokeninfo.ts | 2 +- src/models/components/accesstokenscope.ts | 2 +- src/models/components/accountmetricset.ts | 2 +- src/models/components/accumulation.ts | 2 +- src/models/components/appendack.ts | 2 +- src/models/components/appendinput.ts | 2 +- src/models/components/appendrecord.ts | 2 +- src/models/components/basinconfig.ts | 2 +- src/models/components/basininfo.ts | 2 +- src/models/components/basinmetricset.ts | 2 +- src/models/components/basinreconfiguration.ts | 2 +- src/models/components/basinscope.ts | 2 +- src/models/components/basinstate.ts | 2 +- src/models/components/createbasinrequest.ts | 2 +- .../createorreconfigurebasinrequest.ts | 2 +- src/models/components/createstreamrequest.ts | 2 +- src/models/components/deleteonemptyconfig.ts | 2 +- .../deleteonemptyreconfiguration.ts | 2 +- src/models/components/gauge.ts | 2 +- src/models/components/infiniteretention.ts | 2 +- .../components/issueaccesstokenresponse.ts | 2 +- src/models/components/label.ts | 2 +- .../components/listaccesstokensresponse.ts | 2 +- src/models/components/listbasinsresponse.ts | 2 +- src/models/components/liststreamsresponse.ts | 2 +- src/models/components/metric.ts | 2 +- src/models/components/metricsetresponse.ts | 2 +- src/models/components/metricunit.ts | 2 +- src/models/components/operation.ts | 2 +- .../components/permittedoperationgroups.ts | 2 +- src/models/components/pingeventdata.ts | 2 +- src/models/components/readbatch.ts | 4 +- src/models/components/readevent.ts | 2 +- src/models/components/readwritepermissions.ts | 2 +- src/models/components/resourceset.ts | 2 +- src/models/components/retentionpolicy.ts | 2 +- src/models/components/s2format.ts | 2 +- src/models/components/scalar.ts | 2 +- src/models/components/security.ts | 2 +- src/models/components/sequencedrecord.ts | 2 +- src/models/components/storageclass.ts | 2 +- src/models/components/streamconfig.ts | 2 +- src/models/components/streaminfo.ts | 2 +- src/models/components/streammetricset.ts | 2 +- src/models/components/streamposition.ts | 2 +- .../components/streamreconfiguration.ts | 2 +- src/models/components/tailresponse.ts | 2 +- src/models/components/timeseriesinterval.ts | 2 +- src/models/components/timestampingconfig.ts | 2 +- src/models/components/timestampingmode.ts | 2 +- .../components/timestampingreconfiguration.ts | 2 +- src/models/errors/appendconditionfailed.ts | 2 +- src/models/errors/errorinfo.ts | 81 +++++++++++++++++ src/models/errors/errorresponse.ts | 81 ----------------- src/models/errors/index.ts | 2 +- src/models/errors/responsevalidationerror.ts | 2 +- src/models/errors/sdkvalidationerror.ts | 2 +- src/models/errors/tailresponse.ts | 2 +- src/models/operations/accountmetrics.ts | 2 +- src/models/operations/append.ts | 2 +- src/models/operations/basinmetrics.ts | 2 +- src/models/operations/checktail.ts | 2 +- .../operations/createorreconfigurebasin.ts | 2 +- .../operations/createorreconfigurestream.ts | 2 +- src/models/operations/createstream.ts | 2 +- src/models/operations/deletebasin.ts | 2 +- src/models/operations/deletestream.ts | 2 +- src/models/operations/getbasinconfig.ts | 2 +- src/models/operations/getstreamconfig.ts | 2 +- src/models/operations/listaccesstokens.ts | 2 +- src/models/operations/listbasins.ts | 2 +- src/models/operations/liststreams.ts | 2 +- src/models/operations/read.ts | 2 +- src/models/operations/reconfigurebasin.ts | 2 +- src/models/operations/reconfigurestream.ts | 2 +- src/models/operations/revokeaccesstoken.ts | 2 +- src/models/operations/streammetrics.ts | 2 +- src/types/blobs.ts | 13 +-- src/types/constdatetime.ts | 2 +- 129 files changed, 502 insertions(+), 475 deletions(-) rename docs/models/errors/{errorresponse.md => errorinfo.md} (71%) delete mode 100644 docs/sdks/s2/README.md create mode 100644 src/models/errors/errorinfo.ts delete mode 100644 src/models/errors/errorresponse.ts diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index e08325c..de179e1 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 2d20490e-9921-47d5-9711-d3c4b91c8cfa management: - docChecksum: d63100b8057ce0dab36ac6f9171462c7 + docChecksum: 4b97e5e3fa7185bf04131f37a65b5102 docVersion: 1.0.0 - speakeasyVersion: 1.631.3 - generationVersion: 2.716.14 - releaseVersion: 0.15.13 - configChecksum: fd1d259d63e358098f76eab7da910ee9 + speakeasyVersion: 1.638.1 + generationVersion: 2.729.2 + releaseVersion: 0.16.0 + configChecksum: e8d8d5b7a39ff5cbaf46e0e27452c0cc repoURL: https://github.com/s2-streamstore/s2-sdk-typescript.git installationURL: https://github.com/s2-streamstore/s2-sdk-typescript published: true @@ -15,7 +15,7 @@ features: acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 constsAndDefaults: 0.1.12 - core: 3.21.25 + core: 3.23.0 defaultEnabledRetries: 0.1.0 devContainers: 2.90.1 enumUnions: 0.1.0 @@ -32,9 +32,9 @@ features: responseFormat: 0.2.3 retries: 2.83.0 sdkHooks: 0.3.0 - serverEvents: 0.1.10 + serverEvents: 0.1.12 serverEventsSentinels: 0.1.0 - unions: 2.85.12 + unions: 2.86.0 generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json @@ -115,7 +115,7 @@ generatedFiles: - docs/models/components/two.md - docs/models/components/values.md - docs/models/errors/appendconditionfailed.md - - docs/models/errors/errorresponse.md + - docs/models/errors/errorinfo.md - docs/models/errors/fencingtoken.md - docs/models/errors/seqnum.md - docs/models/errors/tailresponse.md @@ -145,7 +145,6 @@ generatedFiles: - docs/sdks/basins/README.md - docs/sdks/metrics/README.md - docs/sdks/records/README.md - - docs/sdks/s2/README.md - docs/sdks/streams/README.md - eslint.config.mjs - examples/.env.template @@ -285,7 +284,7 @@ generatedFiles: - src/models/components/timestampingreconfiguration.ts - src/models/errors/apierror.ts - src/models/errors/appendconditionfailed.ts - - src/models/errors/errorresponse.ts + - src/models/errors/errorinfo.ts - src/models/errors/httpclienterrors.ts - src/models/errors/index.ts - src/models/errors/responsevalidationerror.ts @@ -341,7 +340,7 @@ examples: "200": application/json: {"access_tokens": [{"auto_prefix_streams": false, "id": "", "scope": {}}, {"auto_prefix_streams": false, "id": "", "scope": {}}, {"auto_prefix_streams": false, "id": "", "scope": {}}], "has_more": false} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "499": application/json: {"error": ""} "500": @@ -354,7 +353,7 @@ examples: "201": application/json: {"access_token": ""} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "499": application/json: {"error": ""} "500": @@ -366,7 +365,7 @@ examples: id: "" responses: "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "499": application/json: {"error": ""} "500": @@ -382,7 +381,7 @@ examples: "200": application/json: {"basins": [{"name": "", "scope": "aws:us-east-1", "state": "active"}, {"name": "", "scope": "aws:us-east-1", "state": "active"}, {"name": "", "scope": "aws:us-east-1", "state": "active"}], "has_more": false} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "499": application/json: {"error": ""} "500": @@ -395,7 +394,7 @@ examples: "201": application/json: {"name": "", "scope": "aws:us-east-1", "state": "deleting"} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "499": application/json: {"error": ""} "500": @@ -411,7 +410,7 @@ examples: "200": application/json: {} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "499": application/json: {"error": ""} "500": @@ -426,7 +425,7 @@ examples: "201": application/json: {"name": "", "scope": "aws:us-east-1", "state": "active"} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "499": application/json: {"error": ""} "500": @@ -440,7 +439,7 @@ examples: basin: "" responses: "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "404": application/json: {"error": ""} "499": @@ -458,7 +457,7 @@ examples: "200": application/json: {} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "499": application/json: {"error": ""} "500": @@ -476,7 +475,7 @@ examples: "200": application/json: {"has_more": true, "streams": [{"created_at": "", "name": ""}, {"created_at": "", "name": ""}, {"created_at": "", "name": ""}]} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "499": application/json: {"error": ""} "500": @@ -492,7 +491,7 @@ examples: "201": application/json: {"created_at": "", "name": ""} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "499": application/json: {"error": ""} "500": @@ -508,7 +507,7 @@ examples: "200": application/json: {} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "499": application/json: {"error": ""} "500": @@ -524,7 +523,7 @@ examples: "201": application/json: {"created_at": "", "name": ""} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "499": application/json: {"error": ""} "500": @@ -538,7 +537,7 @@ examples: s2-basin: "" responses: "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "404": application/json: {"error": ""} "499": @@ -558,7 +557,7 @@ examples: "200": application/json: {} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "499": application/json: {"error": ""} "500": @@ -575,7 +574,7 @@ examples: "200": application/json: {"records": [{"body": "", "seq_num": 726908, "timestamp": 537175}]} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "416": application/json: {"tail": {"seq_num": 297326, "timestamp": 934740}} "499": @@ -595,7 +594,7 @@ examples: "200": application/json: {"end": {"seq_num": 955507, "timestamp": 515119}, "start": {"seq_num": 141999, "timestamp": 468943}, "tail": {"seq_num": 543056, "timestamp": 568743}} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "412": application/json: {"seq_num_mismatch": 955507} "499": @@ -613,7 +612,7 @@ examples: "200": application/json: {"tail": {"seq_num": 552218, "timestamp": 574770}} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} "499": application/json: {"error": ""} "500": @@ -627,7 +626,7 @@ examples: "200": application/json: {"values": [{"gauge": {"name": "", "unit": "operations", "values": []}}, {"label": {"name": "", "values": ["", ""]}}]} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} basin_metrics: speakeasy-default-basin-metrics: parameters: @@ -639,7 +638,7 @@ examples: "200": application/json: {"values": [{"scalar": {"name": "", "unit": "operations", "value": 9897.85}}, {"label": {"name": "", "values": [""]}}]} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} stream_metrics: speakeasy-default-stream-metrics: parameters: @@ -652,6 +651,29 @@ examples: "200": application/json: {"values": [{"scalar": {"name": "", "unit": "operations", "value": 7152.04}}, {"label": {"name": "", "values": ["", ""]}}]} "400": - application/json: {"message": ""} + application/json: {"code": "", "message": ""} examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: | + ## Typescript SDK Changes Detected: + * `s2.accessTokens.listAccessTokens()`: `error.code` **Changed** **Breaking** :warning: + * `s2.accessTokens.issueAccessToken()`: `error.code` **Changed** **Breaking** :warning: + * `s2.accessTokens.revokeAccessToken()`: `error.code` **Changed** **Breaking** :warning: + * `s2.basins.listBasins()`: `error.code` **Changed** **Breaking** :warning: + * `s2.basins.createBasin()`: `error` **Changed** **Breaking** :warning: + * `s2.basins.getBasinConfig()`: `error.code` **Changed** **Breaking** :warning: + * `s2.basins.createOrReconfigureBasin()`: `error.code` **Changed** **Breaking** :warning: + * `s2.basins.deleteBasin()`: `error` **Changed** **Breaking** :warning: + * `s2.basins.reconfigureBasin()`: `error.code` **Changed** **Breaking** :warning: + * `s2.metrics.accountMetrics()`: `error.code` **Changed** **Breaking** :warning: + * `s2.metrics.basinMetrics()`: `error.code` **Changed** **Breaking** :warning: + * `s2.metrics.streamMetrics()`: `error.code` **Changed** **Breaking** :warning: + * `s2.streams.listStreams()`: `error.code` **Changed** **Breaking** :warning: + * `s2.streams.createStream()`: `error.code` **Changed** **Breaking** :warning: + * `s2.streams.getStreamConfig()`: `error.code` **Changed** **Breaking** :warning: + * `s2.streams.createOrReconfigureStream()`: `error.code` **Changed** **Breaking** :warning: + * `s2.streams.deleteStream()`: `error.code` **Changed** **Breaking** :warning: + * `s2.streams.reconfigureStream()`: `error.code` **Changed** **Breaking** :warning: + * `s2.records.read()`: `error` **Changed** **Breaking** :warning: + * `s2.records.append()`: `error` **Changed** **Breaking** :warning: + * `s2.records.checkTail()`: `error` **Changed** **Breaking** :warning: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index f772fe8..9559b9e 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -20,12 +20,15 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: true hoistGlobalSecurity: true + schemas: + allOfMergeStrategy: shallowMerge tests: generateTests: true generateNewTests: false skipResponseBodyAssertions: false typescript: - version: 0.15.13 + version: 0.16.0 + acceptHeaderEnum: true additionalDependencies: dependencies: uuid: ^9.0.1 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 0ce0603..0390c8d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,20 +1,21 @@ -speakeasyVersion: 1.631.3 +speakeasyVersion: 1.638.1 sources: S2 API: sourceNamespace: s-2-api - sourceRevisionDigest: sha256:1672d706a5fa626a9fa535bddef2246aa4dfda6c0c4f531a5f47f63c4bc0cf64 - sourceBlobDigest: sha256:72151070b6ef57d1b9a0bd99d41be6e28bc2981cff49b5a12daf8557d0a720ea + sourceRevisionDigest: sha256:2c8fe7acee5cced083bcf91537b23dacf64eccb86aebf2ffdfe81cc36b566103 + sourceBlobDigest: sha256:f605806fd7a2f7709ed67602e03ed90d10732d3c952815463358770c82cc17cd tags: - latest + - speakeasy-sdk-regen-1761178896 - 1.0.0 targets: streamstore: source: S2 API sourceNamespace: s-2-api - sourceRevisionDigest: sha256:1672d706a5fa626a9fa535bddef2246aa4dfda6c0c4f531a5f47f63c4bc0cf64 - sourceBlobDigest: sha256:72151070b6ef57d1b9a0bd99d41be6e28bc2981cff49b5a12daf8557d0a720ea + sourceRevisionDigest: sha256:2c8fe7acee5cced083bcf91537b23dacf64eccb86aebf2ffdfe81cc36b566103 + sourceBlobDigest: sha256:f605806fd7a2f7709ed67602e03ed90d10732d3c952815463358770c82cc17cd codeSamplesNamespace: s-2-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:1e2ae692ec013f44571117073a915f16932673aabe20e09aca8bf40d763919e5 + codeSamplesRevisionDigest: sha256:953f92dc85e3f7ebbac30bf4b7ef36a094bb7b8264d5c4dfcd218e2540041a29 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 56a0778..b0812c4 100644 --- a/README.md +++ b/README.md @@ -249,7 +249,6 @@ run(); * [append](docs/sdks/records/README.md#append) - Append records. * [checkTail](docs/sdks/records/README.md#checktail) - Check the tail. - ### [streams](docs/sdks/streams/README.md) * [listStreams](docs/sdks/streams/README.md#liststreams) - List streams. @@ -467,7 +466,7 @@ async function run() { console.log(error.headers); // Depending on the method different errors may be thrown - if (error instanceof errors.ErrorResponse) { + if (error instanceof errors.ErrorInfo) { console.log(error.data$.code); // string console.log(error.data$.message); // string } @@ -482,7 +481,7 @@ run(); ### Error Classes **Primary errors:** * [`S2Error`](./src/models/errors/s2error.ts): The base class for HTTP error responses. - * [`ErrorResponse`](./src/models/errors/errorresponse.ts): . + * [`ErrorInfo`](./src/models/errors/errorinfo.ts): .
Less common errors (9) diff --git a/RELEASES.md b/RELEASES.md index 600ad94..d938f53 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -108,4 +108,14 @@ Based on: ### Generated - [typescript v0.11.2] . ### Releases -- [NPM v0.11.2] https://www.npmjs.com/package/@s2-dev/streamstore/v/0.11.2 - . \ No newline at end of file +- [NPM v0.11.2] https://www.npmjs.com/package/@s2-dev/streamstore/v/0.11.2 - . + +## 2025-10-23 00:21:19 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.638.1 (2.729.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.16.0] . +### Releases +- [NPM v0.16.0] https://www.npmjs.com/package/@s2-dev/streamstore/v/0.16.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/docs/models/components/readbatch.md b/docs/models/components/readbatch.md index 393d512..64b4ffa 100644 --- a/docs/models/components/readbatch.md +++ b/docs/models/components/readbatch.md @@ -12,7 +12,7 @@ let value: ReadBatch = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `records` | [components.SequencedRecord](../../models/components/sequencedrecord.md)[] | :heavy_check_mark: | Records that are durably sequenced on the stream, retrieved based on the requested criteria.
This can only be empty in response to a regular (non-SSE) read, if the request cannot be satisfied without violating an explicit limit. | -| `tail` | [components.StreamPosition](../../models/components/streamposition.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `records` | [components.SequencedRecord](../../models/components/sequencedrecord.md)[] | :heavy_check_mark: | Records that are durably sequenced on the stream, retrieved based on the requested criteria.
This can only be empty in response to a unary read (i.e. not SSE), if the request cannot be satisfied without violating an explicit bound (`count`, `bytes`, or `until`). | +| `tail` | [components.StreamPosition](../../models/components/streamposition.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/errorresponse.md b/docs/models/errors/errorinfo.md similarity index 71% rename from docs/models/errors/errorresponse.md rename to docs/models/errors/errorinfo.md index 1404d53..9675522 100644 --- a/docs/models/errors/errorresponse.md +++ b/docs/models/errors/errorinfo.md @@ -1,9 +1,9 @@ -# ErrorResponse +# ErrorInfo ## Example Usage ```typescript -import { ErrorResponse } from "@s2-dev/streamstore/models/errors"; +import { ErrorInfo } from "@s2-dev/streamstore/models/errors"; // No examples available for this model ``` @@ -12,5 +12,5 @@ import { ErrorResponse } from "@s2-dev/streamstore/models/errors"; | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `code` | *string* | :heavy_minus_sign: | N/A | +| `code` | *string* | :heavy_check_mark: | N/A | | `message` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/accesstokens/README.md b/docs/sdks/accesstokens/README.md index 666677f..bbb87d8 100644 --- a/docs/sdks/accesstokens/README.md +++ b/docs/sdks/accesstokens/README.md @@ -76,10 +76,10 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorInfo | 400, 403 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## issueAccessToken @@ -152,10 +152,10 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403, 409 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorInfo | 400, 403, 409 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## revokeAccessToken @@ -226,7 +226,7 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorInfo | 400, 403 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/basins/README.md b/docs/sdks/basins/README.md index 858590a..9eadeff 100644 --- a/docs/sdks/basins/README.md +++ b/docs/sdks/basins/README.md @@ -83,10 +83,10 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorInfo | 400, 403 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## createBasin @@ -157,10 +157,10 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 401, 403, 409 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorInfo | 400, 403, 409 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## getBasinConfig @@ -231,10 +231,10 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403, 404 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorInfo | 400, 403, 404 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## createOrReconfigureBasin @@ -305,10 +305,10 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorInfo | 400 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## deleteBasin @@ -379,10 +379,10 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 401, 403, 404 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorInfo | 400, 403, 404 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## reconfigureBasin @@ -455,7 +455,7 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403, 404 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorInfo | 400, 403, 404 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/metrics/README.md b/docs/sdks/metrics/README.md index ebed50c..caa8f3d 100644 --- a/docs/sdks/metrics/README.md +++ b/docs/sdks/metrics/README.md @@ -80,10 +80,10 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorInfo | 400, 403 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## basinMetrics @@ -156,10 +156,10 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorInfo | 400, 403 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## streamMetrics @@ -234,7 +234,7 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorInfo | 400, 403 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/records/README.md b/docs/sdks/records/README.md index 528e2cb..6a64235 100644 --- a/docs/sdks/records/README.md +++ b/docs/sdks/records/README.md @@ -83,12 +83,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 401, 404, 409 | application/json | -| errors.TailResponse | 416 | application/json | -| errors.ErrorResponse | 500 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------- | ------------------- | ------------------- | +| errors.ErrorInfo | 400, 403, 404, 409 | application/json | +| errors.TailResponse | 416 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## append @@ -174,13 +173,12 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 401, 404, 409 | application/json | -| errors.FencingToken | 412 | application/json | -| errors.SeqNum | 412 | application/json | -| errors.ErrorResponse | 500 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------- | ------------------- | ------------------- | +| errors.ErrorInfo | 400, 403, 404, 409 | application/json | +| errors.FencingToken | 412 | application/json | +| errors.SeqNum | 412 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## checkTail @@ -254,8 +252,7 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 401, 404, 409 | application/json | -| errors.ErrorResponse | 500 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorInfo | 400, 403, 404, 409 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/s2/README.md b/docs/sdks/s2/README.md deleted file mode 100644 index 1ddb9e2..0000000 --- a/docs/sdks/s2/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# S2 SDK - -## Overview - -S2 API: Serverless API for streaming data backed by object storage. - -### Available Operations diff --git a/docs/sdks/streams/README.md b/docs/sdks/streams/README.md index b89dc07..cda7786 100644 --- a/docs/sdks/streams/README.md +++ b/docs/sdks/streams/README.md @@ -88,10 +88,10 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403, 404 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorInfo | 400, 403, 404 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## createStream @@ -169,10 +169,10 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403, 404, 409 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorInfo | 400, 403, 404, 409 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## getStreamConfig @@ -246,10 +246,10 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403, 404, 409 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorInfo | 400, 403, 404, 409 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## createOrReconfigureStream @@ -323,10 +323,10 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403, 404, 409 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorInfo | 400, 403, 404, 409 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## deleteStream @@ -400,10 +400,10 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403, 404 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------- | ---------------- | ---------------- | +| errors.ErrorInfo | 400, 403, 404 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | ## reconfigureStream @@ -479,7 +479,7 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| errors.ErrorResponse | 400, 403, 404, 409 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorInfo | 400, 403, 404, 409 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/examples/package-lock.json b/examples/package-lock.json index 9bf2389..10f0dd1 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -18,11 +18,11 @@ }, "..": { "name": "@s2-dev/streamstore", - "version": "0.15.13", + "version": "0.16.0", "dependencies": { "jsonpath-rfc9535": "1.1.0", "uuid": "^9.0.1", - "zod": "^3.20.0" + "zod": "^3.25.0 || ^4.0.0" }, "bin": { "mcp": "bin/mcp-server.js" diff --git a/jsr.json b/jsr.json index 45018be..3072ff8 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@s2-dev/streamstore", - "version": "0.15.13", + "version": "0.16.0", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index d3960c6..27d9f0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "@s2-dev/streamstore", - "version": "0.15.13", + "version": "0.16.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@s2-dev/streamstore", - "version": "0.15.13", + "version": "0.16.0", "dependencies": { "jsonpath-rfc9535": "1.1.0", "uuid": "^9.0.1", - "zod": "^3.20.0" + "zod": "^3.25.0 || ^4.0.0" }, "bin": { "mcp": "bin/mcp-server.js" diff --git a/package.json b/package.json index 200e474..663021a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@s2-dev/streamstore", - "version": "0.15.13", + "version": "0.16.0", "author": "Speakeasy", "type": "module", "bin": { @@ -59,7 +59,7 @@ "dependencies": { "jsonpath-rfc9535": "1.1.0", "uuid": "^9.0.1", - "zod": "^3.20.0" + "zod": "^3.25.0 || ^4.0.0" }, "exports": { ".": { diff --git a/src/funcs/accessTokensIssueAccessToken.ts b/src/funcs/accessTokensIssueAccessToken.ts index 9db47ca..3fc20f2 100644 --- a/src/funcs/accessTokensIssueAccessToken.ts +++ b/src/funcs/accessTokensIssueAccessToken.ts @@ -35,7 +35,7 @@ export function accessTokensIssueAccessToken( ): APIPromise< Result< components.IssueAccessTokenResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -61,7 +61,7 @@ async function $do( [ Result< components.IssueAccessTokenResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -100,7 +100,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "issue_access_token", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -143,7 +143,7 @@ async function $do( const [result] = await M.match< components.IssueAccessTokenResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -154,7 +154,7 @@ async function $do( | SDKValidationError >( M.json(201, components.IssueAccessTokenResponse$inboundSchema), - M.jsonErr([400, 403, 409], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403, 409], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/accessTokensListAccessTokens.ts b/src/funcs/accessTokensListAccessTokens.ts index 49f947d..d39ba6f 100644 --- a/src/funcs/accessTokensListAccessTokens.ts +++ b/src/funcs/accessTokensListAccessTokens.ts @@ -36,7 +36,7 @@ export function accessTokensListAccessTokens( ): APIPromise< Result< components.ListAccessTokensResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -62,7 +62,7 @@ async function $do( [ Result< components.ListAccessTokensResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -106,7 +106,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "list_access_tokens", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -177,7 +177,7 @@ async function $do( const [result] = await M.match< components.ListAccessTokensResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -188,7 +188,7 @@ async function $do( | SDKValidationError >( M.json(200, components.ListAccessTokensResponse$inboundSchema), - M.jsonErr([400, 403], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/accessTokensRevokeAccessToken.ts b/src/funcs/accessTokensRevokeAccessToken.ts index 1b52078..88571ab 100644 --- a/src/funcs/accessTokensRevokeAccessToken.ts +++ b/src/funcs/accessTokensRevokeAccessToken.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 { S2Core } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; @@ -36,7 +36,7 @@ export function accessTokensRevokeAccessToken( ): APIPromise< Result< void, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -62,7 +62,7 @@ async function $do( [ Result< void, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -107,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "revoke_access_token", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -177,7 +177,7 @@ async function $do( const [result] = await M.match< void, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -188,7 +188,7 @@ async function $do( | SDKValidationError >( M.nil(200, z.void()), - M.jsonErr([400, 403], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/basinsCreateBasin.ts b/src/funcs/basinsCreateBasin.ts index b1e775f..2bdd075 100644 --- a/src/funcs/basinsCreateBasin.ts +++ b/src/funcs/basinsCreateBasin.ts @@ -35,7 +35,7 @@ export function basinsCreateBasin( ): APIPromise< Result< components.BasinInfo, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -61,7 +61,7 @@ async function $do( [ Result< components.BasinInfo, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -100,7 +100,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create_basin", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -128,7 +128,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "403", "409", "4XX", "5XX"], + errorCodes: ["400", "403", "409", "4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -143,7 +143,7 @@ async function $do( const [result] = await M.match< components.BasinInfo, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -154,7 +154,7 @@ async function $do( | SDKValidationError >( M.json([200, 201], components.BasinInfo$inboundSchema), - M.jsonErr([400, 401, 403, 409], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403, 409], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/basinsCreateOrReconfigureBasin.ts b/src/funcs/basinsCreateOrReconfigureBasin.ts index 6cc4e35..e81cbe1 100644 --- a/src/funcs/basinsCreateOrReconfigureBasin.ts +++ b/src/funcs/basinsCreateOrReconfigureBasin.ts @@ -36,7 +36,7 @@ export function basinsCreateOrReconfigureBasin( ): APIPromise< Result< components.BasinInfo | undefined, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -62,7 +62,7 @@ async function $do( [ Result< components.BasinInfo | undefined, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -116,7 +116,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create_or_reconfigure_basin", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -186,7 +186,7 @@ async function $do( const [result] = await M.match< components.BasinInfo | undefined, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -198,7 +198,7 @@ async function $do( >( M.json([200, 201], components.BasinInfo$inboundSchema.optional()), M.nil(204, components.BasinInfo$inboundSchema.optional()), - M.jsonErr(400, errors.ErrorResponse$inboundSchema), + M.jsonErr(400, errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/basinsDeleteBasin.ts b/src/funcs/basinsDeleteBasin.ts index fdbb611..a4c42f7 100644 --- a/src/funcs/basinsDeleteBasin.ts +++ b/src/funcs/basinsDeleteBasin.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 { S2Core } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; @@ -36,7 +36,7 @@ export function basinsDeleteBasin( ): APIPromise< Result< void, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -62,7 +62,7 @@ async function $do( [ Result< void, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -107,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "delete_basin", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -162,7 +162,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "403", "404", "4XX", "5XX"], + errorCodes: ["400", "403", "404", "4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -177,7 +177,7 @@ async function $do( const [result] = await M.match< void, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -188,7 +188,7 @@ async function $do( | SDKValidationError >( M.nil(202, z.void()), - M.jsonErr([400, 401, 403, 404], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403, 404], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/basinsGetBasinConfig.ts b/src/funcs/basinsGetBasinConfig.ts index a378b27..5399686 100644 --- a/src/funcs/basinsGetBasinConfig.ts +++ b/src/funcs/basinsGetBasinConfig.ts @@ -36,7 +36,7 @@ export function basinsGetBasinConfig( ): APIPromise< Result< components.BasinConfig, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -62,7 +62,7 @@ async function $do( [ Result< components.BasinConfig, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -107,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get_basin_config", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -177,7 +177,7 @@ async function $do( const [result] = await M.match< components.BasinConfig, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -188,7 +188,7 @@ async function $do( | SDKValidationError >( M.json(200, components.BasinConfig$inboundSchema), - M.jsonErr([400, 403, 404], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403, 404], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/basinsListBasins.ts b/src/funcs/basinsListBasins.ts index ce6dd7f..221a022 100644 --- a/src/funcs/basinsListBasins.ts +++ b/src/funcs/basinsListBasins.ts @@ -43,7 +43,7 @@ export function basinsListBasins( PageIterator< Result< operations.ListBasinsResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -72,7 +72,7 @@ async function $do( PageIterator< Result< operations.ListBasinsResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -118,7 +118,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "list_basins", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -189,7 +189,7 @@ async function $do( const [result, raw] = await M.match< operations.ListBasinsResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -200,7 +200,7 @@ async function $do( | SDKValidationError >( M.json(200, operations.ListBasinsResponse$inboundSchema, { key: "Result" }), - M.jsonErr([400, 403], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); @@ -218,7 +218,7 @@ async function $do( next: Paginator< Result< operations.ListBasinsResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -231,13 +231,8 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const hasMore = jpQuery(responseData as JsonValue, "$.Result.has_more")[0]; - if (hasMore !== true) { - return { next: () => null }; - } - const nextCursor = - jpQuery(responseData as JsonValue, "$.Result.basins[-1].name")[0]; + jpQuery(responseData as JsonValue, "$.basins[-1].name")[0]; if (typeof nextCursor !== "string") { return { next: () => null }; } diff --git a/src/funcs/basinsReconfigureBasin.ts b/src/funcs/basinsReconfigureBasin.ts index 40b8f26..72dbf85 100644 --- a/src/funcs/basinsReconfigureBasin.ts +++ b/src/funcs/basinsReconfigureBasin.ts @@ -36,7 +36,7 @@ export function basinsReconfigureBasin( ): APIPromise< Result< components.BasinConfig, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -62,7 +62,7 @@ async function $do( [ Result< components.BasinConfig, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -110,7 +110,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "reconfigure_basin", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -153,7 +153,7 @@ async function $do( const [result] = await M.match< components.BasinConfig, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -164,7 +164,7 @@ async function $do( | SDKValidationError >( M.json(200, components.BasinConfig$inboundSchema), - M.jsonErr([400, 403, 404], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403, 404], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/metricsAccountMetrics.ts b/src/funcs/metricsAccountMetrics.ts index 2bafb48..219a627 100644 --- a/src/funcs/metricsAccountMetrics.ts +++ b/src/funcs/metricsAccountMetrics.ts @@ -36,7 +36,7 @@ export function metricsAccountMetrics( ): APIPromise< Result< components.MetricSetResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -62,7 +62,7 @@ async function $do( [ Result< components.MetricSetResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -107,7 +107,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "account_metrics", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -178,7 +178,7 @@ async function $do( const [result] = await M.match< components.MetricSetResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -189,7 +189,7 @@ async function $do( | SDKValidationError >( M.json(200, components.MetricSetResponse$inboundSchema), - M.jsonErr([400, 403], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/metricsBasinMetrics.ts b/src/funcs/metricsBasinMetrics.ts index 03f492d..3fbed74 100644 --- a/src/funcs/metricsBasinMetrics.ts +++ b/src/funcs/metricsBasinMetrics.ts @@ -36,7 +36,7 @@ export function metricsBasinMetrics( ): APIPromise< Result< components.MetricSetResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -62,7 +62,7 @@ async function $do( [ Result< components.MetricSetResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -114,7 +114,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "basin_metrics", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -185,7 +185,7 @@ async function $do( const [result] = await M.match< components.MetricSetResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -196,7 +196,7 @@ async function $do( | SDKValidationError >( M.json(200, components.MetricSetResponse$inboundSchema), - M.jsonErr([400, 403], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/metricsStreamMetrics.ts b/src/funcs/metricsStreamMetrics.ts index df882c7..39616f4 100644 --- a/src/funcs/metricsStreamMetrics.ts +++ b/src/funcs/metricsStreamMetrics.ts @@ -36,7 +36,7 @@ export function metricsStreamMetrics( ): APIPromise< Result< components.MetricSetResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -62,7 +62,7 @@ async function $do( [ Result< components.MetricSetResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -118,7 +118,7 @@ async function $do( options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "stream_metrics", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -189,7 +189,7 @@ async function $do( const [result] = await M.match< components.MetricSetResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -200,7 +200,7 @@ async function $do( | SDKValidationError >( M.json(200, components.MetricSetResponse$inboundSchema), - M.jsonErr([400, 403], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/recordsAppend.ts b/src/funcs/recordsAppend.ts index b3c111e..23c0a7c 100644 --- a/src/funcs/recordsAppend.ts +++ b/src/funcs/recordsAppend.ts @@ -37,7 +37,7 @@ export function recordsAppend( ): APIPromise< Result< components.AppendAck, - | errors.ErrorResponse + | errors.ErrorInfo | errors.AppendConditionFailed | S2Error | ResponseValidationError @@ -64,7 +64,7 @@ async function $do( [ Result< components.AppendAck, - | errors.ErrorResponse + | errors.ErrorInfo | errors.AppendConditionFailed | S2Error | ResponseValidationError @@ -124,7 +124,7 @@ async function $do( options: client._options, baseURL: baseURL ?? "", operationID: "append", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -152,7 +152,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "404", "409", "412", "4XX", "500", "5XX"], + errorCodes: ["400", "403", "404", "409", "412", "4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -167,7 +167,7 @@ async function $do( const [result] = await M.match< components.AppendAck, - | errors.ErrorResponse + | errors.ErrorInfo | errors.AppendConditionFailed | S2Error | ResponseValidationError @@ -179,9 +179,8 @@ async function $do( | SDKValidationError >( M.json(200, components.AppendAck$inboundSchema), - M.jsonErr([400, 401, 404, 409], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403, 404, 409], errors.ErrorInfo$inboundSchema), M.jsonErr(412, errors.AppendConditionFailed$inboundSchema), - M.jsonErr(500, errors.ErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/recordsCheckTail.ts b/src/funcs/recordsCheckTail.ts index 4e6bbf2..da85c92 100644 --- a/src/funcs/recordsCheckTail.ts +++ b/src/funcs/recordsCheckTail.ts @@ -37,7 +37,7 @@ export function recordsCheckTail( ): APIPromise< Result< components.TailResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -63,7 +63,7 @@ async function $do( [ Result< components.TailResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -117,7 +117,7 @@ async function $do( options: client._options, baseURL: baseURL ?? "", operationID: "check_tail", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -172,7 +172,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "404", "409", "4XX", "500", "5XX"], + errorCodes: ["400", "403", "404", "409", "4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -187,7 +187,7 @@ async function $do( const [result] = await M.match< components.TailResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -198,8 +198,7 @@ async function $do( | SDKValidationError >( M.json(200, components.TailResponse$inboundSchema), - M.jsonErr([400, 401, 404, 409], errors.ErrorResponse$inboundSchema), - M.jsonErr(500, errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403, 404, 409], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/recordsRead.ts b/src/funcs/recordsRead.ts index b448203..03f5ae7 100644 --- a/src/funcs/recordsRead.ts +++ b/src/funcs/recordsRead.ts @@ -41,7 +41,7 @@ export function recordsRead( ): APIPromise< Result< operations.ReadResponse, - | errors.ErrorResponse + | errors.ErrorInfo | errors.TailResponse | S2Error | ResponseValidationError @@ -68,7 +68,7 @@ async function $do( [ Result< operations.ReadResponse, - | errors.ErrorResponse + | errors.ErrorInfo | errors.TailResponse | S2Error | ResponseValidationError @@ -139,7 +139,7 @@ async function $do( options: client._options, baseURL: baseURL ?? "", operationID: "read", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -195,7 +195,7 @@ async function $do( const doResult = await client._do(req, { context, - errorCodes: ["400", "401", "404", "409", "416", "4XX", "500", "5XX"], + errorCodes: ["400", "403", "404", "409", "416", "4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); @@ -210,7 +210,7 @@ async function $do( const [result] = await M.match< operations.ReadResponse, - | errors.ErrorResponse + | errors.ErrorInfo | errors.TailResponse | S2Error | ResponseValidationError @@ -223,9 +223,8 @@ async function $do( >( M.json(200, operations.ReadResponse$inboundSchema), M.sse(200, operations.ReadResponse$inboundSchema), - M.jsonErr([400, 401, 404, 409], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403, 404, 409], errors.ErrorInfo$inboundSchema), M.jsonErr(416, errors.TailResponse$inboundSchema), - M.jsonErr(500, errors.ErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/streamsCreateOrReconfigureStream.ts b/src/funcs/streamsCreateOrReconfigureStream.ts index 26efa6a..c74dafb 100644 --- a/src/funcs/streamsCreateOrReconfigureStream.ts +++ b/src/funcs/streamsCreateOrReconfigureStream.ts @@ -37,7 +37,7 @@ export function streamsCreateOrReconfigureStream( ): APIPromise< Result< components.StreamInfo | undefined, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -63,7 +63,7 @@ async function $do( [ Result< components.StreamInfo | undefined, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -126,7 +126,7 @@ async function $do( options: client._options, baseURL: baseURL ?? "", operationID: "create_or_reconfigure_stream", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -196,7 +196,7 @@ async function $do( const [result] = await M.match< components.StreamInfo | undefined, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -208,7 +208,7 @@ async function $do( >( M.json(201, components.StreamInfo$inboundSchema.optional()), M.nil(204, components.StreamInfo$inboundSchema.optional()), - M.jsonErr([400, 403, 404, 409], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403, 404, 409], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/streamsCreateStream.ts b/src/funcs/streamsCreateStream.ts index 8a68f4d..99e7c40 100644 --- a/src/funcs/streamsCreateStream.ts +++ b/src/funcs/streamsCreateStream.ts @@ -37,7 +37,7 @@ export function streamsCreateStream( ): APIPromise< Result< components.StreamInfo, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -63,7 +63,7 @@ async function $do( [ Result< components.StreamInfo, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -113,7 +113,7 @@ async function $do( options: client._options, baseURL: baseURL ?? "", operationID: "create_stream", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -156,7 +156,7 @@ async function $do( const [result] = await M.match< components.StreamInfo, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -167,7 +167,7 @@ async function $do( | SDKValidationError >( M.json(201, components.StreamInfo$inboundSchema), - M.jsonErr([400, 403, 404, 409], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403, 404, 409], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/streamsDeleteStream.ts b/src/funcs/streamsDeleteStream.ts index 123650a..883e134 100644 --- a/src/funcs/streamsDeleteStream.ts +++ b/src/funcs/streamsDeleteStream.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 { S2Core } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; @@ -37,7 +37,7 @@ export function streamsDeleteStream( ): APIPromise< Result< void, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -63,7 +63,7 @@ async function $do( [ Result< void, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -117,7 +117,7 @@ async function $do( options: client._options, baseURL: baseURL ?? "", operationID: "delete_stream", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -187,7 +187,7 @@ async function $do( const [result] = await M.match< void, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -198,7 +198,7 @@ async function $do( | SDKValidationError >( M.nil(202, z.void()), - M.jsonErr([400, 403, 404], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403, 404], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/streamsGetStreamConfig.ts b/src/funcs/streamsGetStreamConfig.ts index 2cc28c4..31d6751 100644 --- a/src/funcs/streamsGetStreamConfig.ts +++ b/src/funcs/streamsGetStreamConfig.ts @@ -37,7 +37,7 @@ export function streamsGetStreamConfig( ): APIPromise< Result< components.StreamConfig, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -63,7 +63,7 @@ async function $do( [ Result< components.StreamConfig, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -117,7 +117,7 @@ async function $do( options: client._options, baseURL: baseURL ?? "", operationID: "get_stream_config", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -187,7 +187,7 @@ async function $do( const [result] = await M.match< components.StreamConfig, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -198,7 +198,7 @@ async function $do( | SDKValidationError >( M.json(200, components.StreamConfig$inboundSchema), - M.jsonErr([400, 403, 404, 409], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403, 404, 409], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); diff --git a/src/funcs/streamsListStreams.ts b/src/funcs/streamsListStreams.ts index 8fd8d81..861277f 100644 --- a/src/funcs/streamsListStreams.ts +++ b/src/funcs/streamsListStreams.ts @@ -44,7 +44,7 @@ export function streamsListStreams( PageIterator< Result< operations.ListStreamsResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -73,7 +73,7 @@ async function $do( PageIterator< Result< operations.ListStreamsResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -128,7 +128,7 @@ async function $do( options: client._options, baseURL: baseURL ?? "", operationID: "list_streams", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -199,7 +199,7 @@ async function $do( const [result, raw] = await M.match< operations.ListStreamsResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -212,7 +212,7 @@ async function $do( M.json(200, operations.ListStreamsResponse$inboundSchema, { key: "Result", }), - M.jsonErr([400, 403, 404], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403, 404], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); @@ -230,7 +230,7 @@ async function $do( next: Paginator< Result< operations.ListStreamsResponse, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -243,13 +243,8 @@ async function $do( >; "~next"?: { cursor: string }; } => { - const hasMore = jpQuery(responseData as JsonValue, "$.Result.has_more")[0]; - if (hasMore !== true) { - return { next: () => null }; - } - const nextCursor = - jpQuery(responseData as JsonValue, "$.Result.streams[-1].name")[0]; + jpQuery(responseData as JsonValue, "$.streams[-1].name")[0]; if (typeof nextCursor !== "string") { return { next: () => null }; } diff --git a/src/funcs/streamsReconfigureStream.ts b/src/funcs/streamsReconfigureStream.ts index 97aea6b..260c935 100644 --- a/src/funcs/streamsReconfigureStream.ts +++ b/src/funcs/streamsReconfigureStream.ts @@ -37,7 +37,7 @@ export function streamsReconfigureStream( ): APIPromise< Result< components.StreamConfig, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -63,7 +63,7 @@ async function $do( [ Result< components.StreamConfig, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -120,7 +120,7 @@ async function $do( options: client._options, baseURL: baseURL ?? "", operationID: "reconfigure_stream", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -163,7 +163,7 @@ async function $do( const [result] = await M.match< components.StreamConfig, - | errors.ErrorResponse + | errors.ErrorInfo | S2Error | ResponseValidationError | ConnectionError @@ -174,7 +174,7 @@ async function $do( | SDKValidationError >( M.json(200, components.StreamConfig$inboundSchema), - M.jsonErr([400, 403, 404, 409], errors.ErrorResponse$inboundSchema), + M.jsonErr([400, 403, 404, 409], errors.ErrorInfo$inboundSchema), M.fail("4XX"), M.fail("5XX"), )(response, req, { extraFields: responseFields }); 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 e426488..1b19f24 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -58,8 +58,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "0.15.13", - genVersion: "2.716.14", + sdkVersion: "0.16.0", + genVersion: "2.729.2", userAgent: - "speakeasy-sdk/typescript 0.15.13 2.716.14 1.0.0 @s2-dev/streamstore", + "speakeasy-sdk/typescript 0.16.0 2.729.2 1.0.0 @s2-dev/streamstore", } as const; diff --git a/src/lib/env.ts b/src/lib/env.ts index 576d9f4..1f8b545 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 { S2_ACCESS_TOKEN?: string | undefined; @@ -18,6 +17,18 @@ export const envSchema: z.ZodType = z.object({ S2_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. @@ -27,9 +38,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/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/mcp-server/cli/start/command.ts b/src/mcp-server/cli/start/command.ts index 14f0404..dfafae8 100644 --- a/src/mcp-server/cli/start/command.ts +++ b/src/mcp-server/cli/start/command.ts @@ -2,9 +2,8 @@ * 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"; 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 6a53b68..ad4bac4 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.15.13", + currentVersion: "0.16.0", }, }); diff --git a/src/mcp-server/prompts.ts b/src/mcp-server/prompts.ts index aba6845..f4e2c3e 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 { S2Core } 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 3265b83..2a12923 100644 --- a/src/mcp-server/server.ts +++ b/src/mcp-server/server.ts @@ -45,7 +45,7 @@ export function createMCPServer(deps: { }) { const server = new McpServer({ name: "S2", - version: "0.15.13", + version: "0.16.0", }); const client = new S2Core({ 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 7d0e397..f7633d0 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 { S2Core } from "../core.js"; import { ConsoleLogger } from "./console-logger.js"; import { MCPScope } from "./scopes.js"; diff --git a/src/models/components/accesstokeninfo.ts b/src/models/components/accesstokeninfo.ts index 98f3796..5583f90 100644 --- a/src/models/components/accesstokeninfo.ts +++ b/src/models/components/accesstokeninfo.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"; diff --git a/src/models/components/accesstokenscope.ts b/src/models/components/accesstokenscope.ts index c24859d..e17e751 100644 --- a/src/models/components/accesstokenscope.ts +++ b/src/models/components/accesstokenscope.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"; diff --git a/src/models/components/accountmetricset.ts b/src/models/components/accountmetricset.ts index 9405ce8..561ac95 100644 --- a/src/models/components/accountmetricset.ts +++ b/src/models/components/accountmetricset.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 { ClosedEnum } from "../../types/enums.js"; export const AccountMetricSet = { diff --git a/src/models/components/accumulation.ts b/src/models/components/accumulation.ts index 2d66eeb..198466a 100644 --- a/src/models/components/accumulation.ts +++ b/src/models/components/accumulation.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"; diff --git a/src/models/components/appendack.ts b/src/models/components/appendack.ts index a9c7127..8916f0c 100644 --- a/src/models/components/appendack.ts +++ b/src/models/components/appendack.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"; diff --git a/src/models/components/appendinput.ts b/src/models/components/appendinput.ts index be81257..e01b19b 100644 --- a/src/models/components/appendinput.ts +++ b/src/models/components/appendinput.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"; diff --git a/src/models/components/appendrecord.ts b/src/models/components/appendrecord.ts index cba883e..23c4989 100644 --- a/src/models/components/appendrecord.ts +++ b/src/models/components/appendrecord.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"; diff --git a/src/models/components/basinconfig.ts b/src/models/components/basinconfig.ts index bb21c33..003a952 100644 --- a/src/models/components/basinconfig.ts +++ b/src/models/components/basinconfig.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"; diff --git a/src/models/components/basininfo.ts b/src/models/components/basininfo.ts index a83d6f3..81e7434 100644 --- a/src/models/components/basininfo.ts +++ b/src/models/components/basininfo.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"; diff --git a/src/models/components/basinmetricset.ts b/src/models/components/basinmetricset.ts index fa405df..0d463c2 100644 --- a/src/models/components/basinmetricset.ts +++ b/src/models/components/basinmetricset.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 { ClosedEnum } from "../../types/enums.js"; export const BasinMetricSet = { diff --git a/src/models/components/basinreconfiguration.ts b/src/models/components/basinreconfiguration.ts index 961b05d..a769750 100644 --- a/src/models/components/basinreconfiguration.ts +++ b/src/models/components/basinreconfiguration.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"; diff --git a/src/models/components/basinscope.ts b/src/models/components/basinscope.ts index 6117aaa..337020e 100644 --- a/src/models/components/basinscope.ts +++ b/src/models/components/basinscope.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 { ClosedEnum } from "../../types/enums.js"; export const BasinScope = { diff --git a/src/models/components/basinstate.ts b/src/models/components/basinstate.ts index 6e56f3d..6ff92e4 100644 --- a/src/models/components/basinstate.ts +++ b/src/models/components/basinstate.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 { ClosedEnum } from "../../types/enums.js"; export const BasinState = { diff --git a/src/models/components/createbasinrequest.ts b/src/models/components/createbasinrequest.ts index 14c5f8e..4d3dd57 100644 --- a/src/models/components/createbasinrequest.ts +++ b/src/models/components/createbasinrequest.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"; diff --git a/src/models/components/createorreconfigurebasinrequest.ts b/src/models/components/createorreconfigurebasinrequest.ts index 42136d4..311e639 100644 --- a/src/models/components/createorreconfigurebasinrequest.ts +++ b/src/models/components/createorreconfigurebasinrequest.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"; diff --git a/src/models/components/createstreamrequest.ts b/src/models/components/createstreamrequest.ts index c8147ea..6bba42c 100644 --- a/src/models/components/createstreamrequest.ts +++ b/src/models/components/createstreamrequest.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"; diff --git a/src/models/components/deleteonemptyconfig.ts b/src/models/components/deleteonemptyconfig.ts index f61449a..7c29402 100644 --- a/src/models/components/deleteonemptyconfig.ts +++ b/src/models/components/deleteonemptyconfig.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"; diff --git a/src/models/components/deleteonemptyreconfiguration.ts b/src/models/components/deleteonemptyreconfiguration.ts index a5dd7df..6a327fa 100644 --- a/src/models/components/deleteonemptyreconfiguration.ts +++ b/src/models/components/deleteonemptyreconfiguration.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"; diff --git a/src/models/components/gauge.ts b/src/models/components/gauge.ts index d3d2d0b..19b86e9 100644 --- a/src/models/components/gauge.ts +++ b/src/models/components/gauge.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"; diff --git a/src/models/components/infiniteretention.ts b/src/models/components/infiniteretention.ts index 685e141..1f47d2e 100644 --- a/src/models/components/infiniteretention.ts +++ b/src/models/components/infiniteretention.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"; diff --git a/src/models/components/issueaccesstokenresponse.ts b/src/models/components/issueaccesstokenresponse.ts index 1099e89..2780744 100644 --- a/src/models/components/issueaccesstokenresponse.ts +++ b/src/models/components/issueaccesstokenresponse.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"; diff --git a/src/models/components/label.ts b/src/models/components/label.ts index 1813bf6..936f89a 100644 --- a/src/models/components/label.ts +++ b/src/models/components/label.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"; diff --git a/src/models/components/listaccesstokensresponse.ts b/src/models/components/listaccesstokensresponse.ts index 19330a8..bd3c421 100644 --- a/src/models/components/listaccesstokensresponse.ts +++ b/src/models/components/listaccesstokensresponse.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"; diff --git a/src/models/components/listbasinsresponse.ts b/src/models/components/listbasinsresponse.ts index db1a2b1..d2251e3 100644 --- a/src/models/components/listbasinsresponse.ts +++ b/src/models/components/listbasinsresponse.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"; diff --git a/src/models/components/liststreamsresponse.ts b/src/models/components/liststreamsresponse.ts index 21fa345..e38711a 100644 --- a/src/models/components/liststreamsresponse.ts +++ b/src/models/components/liststreamsresponse.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"; diff --git a/src/models/components/metric.ts b/src/models/components/metric.ts index e7ff4fc..ea06370 100644 --- a/src/models/components/metric.ts +++ b/src/models/components/metric.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"; diff --git a/src/models/components/metricsetresponse.ts b/src/models/components/metricsetresponse.ts index 45df224..a8fc853 100644 --- a/src/models/components/metricsetresponse.ts +++ b/src/models/components/metricsetresponse.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"; diff --git a/src/models/components/metricunit.ts b/src/models/components/metricunit.ts index a0a195a..d096bec 100644 --- a/src/models/components/metricunit.ts +++ b/src/models/components/metricunit.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 { ClosedEnum } from "../../types/enums.js"; export const MetricUnit = { diff --git a/src/models/components/operation.ts b/src/models/components/operation.ts index 4ca282d..ed0164c 100644 --- a/src/models/components/operation.ts +++ b/src/models/components/operation.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 { ClosedEnum } from "../../types/enums.js"; export const Operation = { diff --git a/src/models/components/permittedoperationgroups.ts b/src/models/components/permittedoperationgroups.ts index aebe803..01e1847 100644 --- a/src/models/components/permittedoperationgroups.ts +++ b/src/models/components/permittedoperationgroups.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"; diff --git a/src/models/components/pingeventdata.ts b/src/models/components/pingeventdata.ts index 0bbd809..31131be 100644 --- a/src/models/components/pingeventdata.ts +++ b/src/models/components/pingeventdata.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"; diff --git a/src/models/components/readbatch.ts b/src/models/components/readbatch.ts index fa5a32a..4d0cfa7 100644 --- a/src/models/components/readbatch.ts +++ b/src/models/components/readbatch.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"; @@ -24,7 +24,7 @@ export type ReadBatch = { * Records that are durably sequenced on the stream, retrieved based on the requested criteria. * * @remarks - * This can only be empty in response to a regular (non-SSE) read, if the request cannot be satisfied without violating an explicit limit. + * This can only be empty in response to a unary read (i.e. not SSE), if the request cannot be satisfied without violating an explicit bound (`count`, `bytes`, or `until`). */ records: Array; tail?: StreamPosition | null | undefined; diff --git a/src/models/components/readevent.ts b/src/models/components/readevent.ts index 4d47abf..24842a8 100644 --- a/src/models/components/readevent.ts +++ b/src/models/components/readevent.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"; diff --git a/src/models/components/readwritepermissions.ts b/src/models/components/readwritepermissions.ts index bc9c5a1..d777473 100644 --- a/src/models/components/readwritepermissions.ts +++ b/src/models/components/readwritepermissions.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"; diff --git a/src/models/components/resourceset.ts b/src/models/components/resourceset.ts index 03f9c22..84600f3 100644 --- a/src/models/components/resourceset.ts +++ b/src/models/components/resourceset.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"; diff --git a/src/models/components/retentionpolicy.ts b/src/models/components/retentionpolicy.ts index 84307e0..afde6c1 100644 --- a/src/models/components/retentionpolicy.ts +++ b/src/models/components/retentionpolicy.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"; diff --git a/src/models/components/s2format.ts b/src/models/components/s2format.ts index e303e8f..bf9e8e1 100644 --- a/src/models/components/s2format.ts +++ b/src/models/components/s2format.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 { ClosedEnum } from "../../types/enums.js"; export const S2Format = { diff --git a/src/models/components/scalar.ts b/src/models/components/scalar.ts index e38aff6..4d7a524 100644 --- a/src/models/components/scalar.ts +++ b/src/models/components/scalar.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"; diff --git a/src/models/components/security.ts b/src/models/components/security.ts index f98ed5e..7300c1c 100644 --- a/src/models/components/security.ts +++ b/src/models/components/security.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"; diff --git a/src/models/components/sequencedrecord.ts b/src/models/components/sequencedrecord.ts index 3a26a80..96d7475 100644 --- a/src/models/components/sequencedrecord.ts +++ b/src/models/components/sequencedrecord.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"; diff --git a/src/models/components/storageclass.ts b/src/models/components/storageclass.ts index 9a30f6d..ee169df 100644 --- a/src/models/components/storageclass.ts +++ b/src/models/components/storageclass.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 { ClosedEnum } from "../../types/enums.js"; export const StorageClass = { diff --git a/src/models/components/streamconfig.ts b/src/models/components/streamconfig.ts index 3a0bd35..4f6b26b 100644 --- a/src/models/components/streamconfig.ts +++ b/src/models/components/streamconfig.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"; diff --git a/src/models/components/streaminfo.ts b/src/models/components/streaminfo.ts index 61ef779..54d74c1 100644 --- a/src/models/components/streaminfo.ts +++ b/src/models/components/streaminfo.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"; diff --git a/src/models/components/streammetricset.ts b/src/models/components/streammetricset.ts index 86d715f..b1a7602 100644 --- a/src/models/components/streammetricset.ts +++ b/src/models/components/streammetricset.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 { ClosedEnum } from "../../types/enums.js"; export const StreamMetricSet = { diff --git a/src/models/components/streamposition.ts b/src/models/components/streamposition.ts index f961528..0f5a6fc 100644 --- a/src/models/components/streamposition.ts +++ b/src/models/components/streamposition.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"; diff --git a/src/models/components/streamreconfiguration.ts b/src/models/components/streamreconfiguration.ts index 2026f03..1b0c35c 100644 --- a/src/models/components/streamreconfiguration.ts +++ b/src/models/components/streamreconfiguration.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"; diff --git a/src/models/components/tailresponse.ts b/src/models/components/tailresponse.ts index 83f5acf..c9d27ad 100644 --- a/src/models/components/tailresponse.ts +++ b/src/models/components/tailresponse.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"; diff --git a/src/models/components/timeseriesinterval.ts b/src/models/components/timeseriesinterval.ts index 7f7f344..6090f1c 100644 --- a/src/models/components/timeseriesinterval.ts +++ b/src/models/components/timeseriesinterval.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 { ClosedEnum } from "../../types/enums.js"; export const TimeseriesInterval = { diff --git a/src/models/components/timestampingconfig.ts b/src/models/components/timestampingconfig.ts index 036c09a..91e65dc 100644 --- a/src/models/components/timestampingconfig.ts +++ b/src/models/components/timestampingconfig.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"; diff --git a/src/models/components/timestampingmode.ts b/src/models/components/timestampingmode.ts index 3cccb92..f1800c9 100644 --- a/src/models/components/timestampingmode.ts +++ b/src/models/components/timestampingmode.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 { ClosedEnum } from "../../types/enums.js"; export const TimestampingMode = { diff --git a/src/models/components/timestampingreconfiguration.ts b/src/models/components/timestampingreconfiguration.ts index c5a90e4..70b0e1e 100644 --- a/src/models/components/timestampingreconfiguration.ts +++ b/src/models/components/timestampingreconfiguration.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"; diff --git a/src/models/errors/appendconditionfailed.ts b/src/models/errors/appendconditionfailed.ts index 9a52f42..f2425b8 100644 --- a/src/models/errors/appendconditionfailed.ts +++ b/src/models/errors/appendconditionfailed.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"; diff --git a/src/models/errors/errorinfo.ts b/src/models/errors/errorinfo.ts new file mode 100644 index 0000000..90fc019 --- /dev/null +++ b/src/models/errors/errorinfo.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { S2Error } from "./s2error.js"; + +export type ErrorInfoData = { + code: string; + message: string; +}; + +export class ErrorInfo extends S2Error { + code: string; + + /** The original data that was passed to this error instance. */ + data$: ErrorInfoData; + + constructor( + err: ErrorInfoData, + httpMeta: { response: Response; request: Request; body: string }, + ) { + const message = err.message || `API error occurred: ${JSON.stringify(err)}`; + super(message, httpMeta); + this.data$ = err; + this.code = err.code; + + this.name = "ErrorInfo"; + } +} + +/** @internal */ +export const ErrorInfo$inboundSchema: z.ZodType< + ErrorInfo, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.string(), + message: z.string(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), +}) + .transform((v) => { + return new ErrorInfo(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); + }); + +/** @internal */ +export type ErrorInfo$Outbound = { + code: string; + message: string; +}; + +/** @internal */ +export const ErrorInfo$outboundSchema: z.ZodType< + ErrorInfo$Outbound, + z.ZodTypeDef, + ErrorInfo +> = z.instanceof(ErrorInfo) + .transform(v => v.data$) + .pipe(z.object({ + code: z.string(), + 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 ErrorInfo$ { + /** @deprecated use `ErrorInfo$inboundSchema` instead. */ + export const inboundSchema = ErrorInfo$inboundSchema; + /** @deprecated use `ErrorInfo$outboundSchema` instead. */ + export const outboundSchema = ErrorInfo$outboundSchema; + /** @deprecated use `ErrorInfo$Outbound` instead. */ + export type Outbound = ErrorInfo$Outbound; +} diff --git a/src/models/errors/errorresponse.ts b/src/models/errors/errorresponse.ts deleted file mode 100644 index 88d8777..0000000 --- a/src/models/errors/errorresponse.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { S2Error } from "./s2error.js"; - -export type ErrorResponseData = { - code?: string | null | undefined; - message: string; -}; - -export class ErrorResponse extends S2Error { - code?: string | null | undefined; - - /** The original data that was passed to this error instance. */ - data$: ErrorResponseData; - - constructor( - err: ErrorResponseData, - httpMeta: { response: Response; request: Request; body: string }, - ) { - const message = err.message || `API error occurred: ${JSON.stringify(err)}`; - super(message, httpMeta); - this.data$ = err; - if (err.code != null) this.code = err.code; - - this.name = "ErrorResponse"; - } -} - -/** @internal */ -export const ErrorResponse$inboundSchema: z.ZodType< - ErrorResponse, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.nullable(z.string()).optional(), - message: z.string(), - request$: z.instanceof(Request), - response$: z.instanceof(Response), - body$: z.string(), -}) - .transform((v) => { - return new ErrorResponse(v, { - request: v.request$, - response: v.response$, - body: v.body$, - }); - }); - -/** @internal */ -export type ErrorResponse$Outbound = { - code?: string | null | undefined; - message: string; -}; - -/** @internal */ -export const ErrorResponse$outboundSchema: z.ZodType< - ErrorResponse$Outbound, - z.ZodTypeDef, - ErrorResponse -> = z.instanceof(ErrorResponse) - .transform(v => v.data$) - .pipe(z.object({ - code: z.nullable(z.string()).optional(), - 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 ErrorResponse$ { - /** @deprecated use `ErrorResponse$inboundSchema` instead. */ - export const inboundSchema = ErrorResponse$inboundSchema; - /** @deprecated use `ErrorResponse$outboundSchema` instead. */ - export const outboundSchema = ErrorResponse$outboundSchema; - /** @deprecated use `ErrorResponse$Outbound` instead. */ - export type Outbound = ErrorResponse$Outbound; -} diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts index 712c815..e6fd7d2 100644 --- a/src/models/errors/index.ts +++ b/src/models/errors/index.ts @@ -4,7 +4,7 @@ export * from "./apierror.js"; export * from "./appendconditionfailed.js"; -export * from "./errorresponse.js"; +export * from "./errorinfo.js"; export * from "./httpclienterrors.js"; export * from "./responsevalidationerror.js"; export * from "./s2error.js"; diff --git a/src/models/errors/responsevalidationerror.ts b/src/models/errors/responsevalidationerror.ts index cd6a71d..b123621 100644 --- a/src/models/errors/responsevalidationerror.ts +++ b/src/models/errors/responsevalidationerror.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 { S2Error } from "./s2error.js"; import { formatZodError } from "./sdkvalidationerror.js"; diff --git a/src/models/errors/sdkvalidationerror.ts b/src/models/errors/sdkvalidationerror.ts index 37face8..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 { /** diff --git a/src/models/errors/tailresponse.ts b/src/models/errors/tailresponse.ts index d0e8ba7..24a9ad4 100644 --- a/src/models/errors/tailresponse.ts +++ b/src/models/errors/tailresponse.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 components from "../components/index.js"; import { S2Error } from "./s2error.js"; diff --git a/src/models/operations/accountmetrics.ts b/src/models/operations/accountmetrics.ts index 11aa98a..068492f 100644 --- a/src/models/operations/accountmetrics.ts +++ b/src/models/operations/accountmetrics.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 * as components from "../components/index.js"; diff --git a/src/models/operations/append.ts b/src/models/operations/append.ts index 381aa26..0be3bad 100644 --- a/src/models/operations/append.ts +++ b/src/models/operations/append.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"; diff --git a/src/models/operations/basinmetrics.ts b/src/models/operations/basinmetrics.ts index 841f7e6..01f2cb7 100644 --- a/src/models/operations/basinmetrics.ts +++ b/src/models/operations/basinmetrics.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 * as components from "../components/index.js"; diff --git a/src/models/operations/checktail.ts b/src/models/operations/checktail.ts index 49e9f46..7659e5d 100644 --- a/src/models/operations/checktail.ts +++ b/src/models/operations/checktail.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"; diff --git a/src/models/operations/createorreconfigurebasin.ts b/src/models/operations/createorreconfigurebasin.ts index 66126b6..566bcff 100644 --- a/src/models/operations/createorreconfigurebasin.ts +++ b/src/models/operations/createorreconfigurebasin.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"; diff --git a/src/models/operations/createorreconfigurestream.ts b/src/models/operations/createorreconfigurestream.ts index a0d144a..d477c40 100644 --- a/src/models/operations/createorreconfigurestream.ts +++ b/src/models/operations/createorreconfigurestream.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"; diff --git a/src/models/operations/createstream.ts b/src/models/operations/createstream.ts index 8649894..7af58d3 100644 --- a/src/models/operations/createstream.ts +++ b/src/models/operations/createstream.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"; diff --git a/src/models/operations/deletebasin.ts b/src/models/operations/deletebasin.ts index d78b827..4b429e8 100644 --- a/src/models/operations/deletebasin.ts +++ b/src/models/operations/deletebasin.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"; diff --git a/src/models/operations/deletestream.ts b/src/models/operations/deletestream.ts index da25288..864e137 100644 --- a/src/models/operations/deletestream.ts +++ b/src/models/operations/deletestream.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"; diff --git a/src/models/operations/getbasinconfig.ts b/src/models/operations/getbasinconfig.ts index 93adfd0..05a5e67 100644 --- a/src/models/operations/getbasinconfig.ts +++ b/src/models/operations/getbasinconfig.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"; diff --git a/src/models/operations/getstreamconfig.ts b/src/models/operations/getstreamconfig.ts index dd240ed..3c46b6d 100644 --- a/src/models/operations/getstreamconfig.ts +++ b/src/models/operations/getstreamconfig.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"; diff --git a/src/models/operations/listaccesstokens.ts b/src/models/operations/listaccesstokens.ts index 962bec3..7e82f6d 100644 --- a/src/models/operations/listaccesstokens.ts +++ b/src/models/operations/listaccesstokens.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"; diff --git a/src/models/operations/listbasins.ts b/src/models/operations/listbasins.ts index b2d11e5..c736628 100644 --- a/src/models/operations/listbasins.ts +++ b/src/models/operations/listbasins.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"; diff --git a/src/models/operations/liststreams.ts b/src/models/operations/liststreams.ts index fec2240..d80063d 100644 --- a/src/models/operations/liststreams.ts +++ b/src/models/operations/liststreams.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"; diff --git a/src/models/operations/read.ts b/src/models/operations/read.ts index 2c1a6e3..c04bb9c 100644 --- a/src/models/operations/read.ts +++ b/src/models/operations/read.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 { EventStream } from "../../lib/event-streams.js"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; diff --git a/src/models/operations/reconfigurebasin.ts b/src/models/operations/reconfigurebasin.ts index 1b14055..1ec5485 100644 --- a/src/models/operations/reconfigurebasin.ts +++ b/src/models/operations/reconfigurebasin.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"; diff --git a/src/models/operations/reconfigurestream.ts b/src/models/operations/reconfigurestream.ts index cbdcc29..835812e 100644 --- a/src/models/operations/reconfigurestream.ts +++ b/src/models/operations/reconfigurestream.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"; diff --git a/src/models/operations/revokeaccesstoken.ts b/src/models/operations/revokeaccesstoken.ts index 0fa02ed..f690fe6 100644 --- a/src/models/operations/revokeaccesstoken.ts +++ b/src/models/operations/revokeaccesstoken.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"; diff --git a/src/models/operations/streammetrics.ts b/src/models/operations/streammetrics.ts index 661e494..a621e7a 100644 --- a/src/models/operations/streammetrics.ts +++ b/src/models/operations/streammetrics.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 * as components from "../components/index.js"; 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 eeff4dd..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, From 663bcf322094e34dc67282d67b58054c609e2431 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Thu, 23 Oct 2025 00:22:41 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow