@s2-dev/streamstore 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/README.md +35 -0
- package/.devcontainer/devcontainer.json +45 -0
- package/FUNCTIONS.md +106 -0
- package/README.md +559 -0
- package/RUNTIMES.md +48 -0
- package/core.d.ts +10 -0
- package/core.d.ts.map +1 -0
- package/core.js +17 -0
- package/core.js.map +1 -0
- package/docs/sdks/account/README.md +406 -0
- package/docs/sdks/basin/README.md +415 -0
- package/docs/sdks/s2/README.md +7 -0
- package/docs/sdks/stream/README.md +267 -0
- package/funcs/accountCreateBasin.d.ts +14 -0
- package/funcs/accountCreateBasin.d.ts.map +1 -0
- package/funcs/accountCreateBasin.js +118 -0
- package/funcs/accountCreateBasin.js.map +1 -0
- package/funcs/accountDeleteBasin.d.ts +13 -0
- package/funcs/accountDeleteBasin.d.ts.map +1 -0
- package/funcs/accountDeleteBasin.js +114 -0
- package/funcs/accountDeleteBasin.js.map +1 -0
- package/funcs/accountGetBasinConfig.d.ts +14 -0
- package/funcs/accountGetBasinConfig.d.ts.map +1 -0
- package/funcs/accountGetBasinConfig.js +114 -0
- package/funcs/accountGetBasinConfig.js.map +1 -0
- package/funcs/accountListBasins.d.ts +16 -0
- package/funcs/accountListBasins.d.ts.map +1 -0
- package/funcs/accountListBasins.js +130 -0
- package/funcs/accountListBasins.js.map +1 -0
- package/funcs/accountReconfigureBasin.d.ts +14 -0
- package/funcs/accountReconfigureBasin.d.ts.map +1 -0
- package/funcs/accountReconfigureBasin.js +115 -0
- package/funcs/accountReconfigureBasin.js.map +1 -0
- package/funcs/basinCreateStream.d.ts +14 -0
- package/funcs/basinCreateStream.d.ts.map +1 -0
- package/funcs/basinCreateStream.js +123 -0
- package/funcs/basinCreateStream.js.map +1 -0
- package/funcs/basinDeleteStream.d.ts +13 -0
- package/funcs/basinDeleteStream.d.ts.map +1 -0
- package/funcs/basinDeleteStream.js +119 -0
- package/funcs/basinDeleteStream.js.map +1 -0
- package/funcs/basinGetStreamConfig.d.ts +14 -0
- package/funcs/basinGetStreamConfig.d.ts.map +1 -0
- package/funcs/basinGetStreamConfig.js +119 -0
- package/funcs/basinGetStreamConfig.js.map +1 -0
- package/funcs/basinListStreams.d.ts +16 -0
- package/funcs/basinListStreams.d.ts.map +1 -0
- package/funcs/basinListStreams.js +137 -0
- package/funcs/basinListStreams.js.map +1 -0
- package/funcs/basinReconfigureStream.d.ts +14 -0
- package/funcs/basinReconfigureStream.d.ts.map +1 -0
- package/funcs/basinReconfigureStream.js +120 -0
- package/funcs/basinReconfigureStream.js.map +1 -0
- package/funcs/streamAppend.d.ts +14 -0
- package/funcs/streamAppend.d.ts.map +1 -0
- package/funcs/streamAppend.js +124 -0
- package/funcs/streamAppend.js.map +1 -0
- package/funcs/streamCheckTail.d.ts +14 -0
- package/funcs/streamCheckTail.d.ts.map +1 -0
- package/funcs/streamCheckTail.js +119 -0
- package/funcs/streamCheckTail.js.map +1 -0
- package/funcs/streamRead.d.ts +19 -0
- package/funcs/streamRead.d.ts.map +1 -0
- package/funcs/streamRead.js +134 -0
- package/funcs/streamRead.js.map +1 -0
- package/hooks/hooks.d.ts +24 -0
- package/hooks/hooks.d.ts.map +1 -0
- package/hooks/hooks.js +86 -0
- package/hooks/hooks.js.map +1 -0
- package/hooks/index.d.ts +3 -0
- package/hooks/index.d.ts.map +1 -0
- package/hooks/index.js +22 -0
- package/hooks/index.js.map +1 -0
- package/hooks/registration.d.ts +3 -0
- package/hooks/registration.d.ts.map +1 -0
- package/hooks/registration.js +15 -0
- package/hooks/registration.js.map +1 -0
- package/hooks/types.d.ts +77 -0
- package/hooks/types.d.ts.map +1 -0
- package/hooks/types.js +6 -0
- package/hooks/types.js.map +1 -0
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -0
- package/index.js +46 -0
- package/index.js.map +1 -0
- package/jsr.json +28 -0
- package/lib/base64.d.ts +10 -0
- package/lib/base64.d.ts.map +1 -0
- package/lib/base64.js +71 -0
- package/lib/base64.js.map +1 -0
- package/lib/config.d.ts +34 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +35 -0
- package/lib/config.js.map +1 -0
- package/lib/dlv.d.ts +14 -0
- package/lib/dlv.d.ts.map +1 -0
- package/lib/dlv.js +49 -0
- package/lib/dlv.js.map +1 -0
- package/lib/encodings.d.ts +52 -0
- package/lib/encodings.d.ts.map +1 -0
- package/lib/encodings.js +368 -0
- package/lib/encodings.js.map +1 -0
- package/lib/env.d.ts +15 -0
- package/lib/env.d.ts.map +1 -0
- package/lib/env.js +65 -0
- package/lib/env.js.map +1 -0
- package/lib/event-streams.d.ts +17 -0
- package/lib/event-streams.d.ts.map +1 -0
- package/lib/event-streams.js +220 -0
- package/lib/event-streams.js.map +1 -0
- package/lib/files.d.ts +8 -0
- package/lib/files.d.ts.map +1 -0
- package/lib/files.js +36 -0
- package/lib/files.js.map +1 -0
- package/lib/http.d.ts +67 -0
- package/lib/http.d.ts.map +1 -0
- package/lib/http.js +217 -0
- package/lib/http.js.map +1 -0
- package/lib/is-plain-object.d.ts +2 -0
- package/lib/is-plain-object.d.ts.map +1 -0
- package/lib/is-plain-object.js +41 -0
- package/lib/is-plain-object.js.map +1 -0
- package/lib/logger.d.ts +6 -0
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +6 -0
- package/lib/logger.js.map +1 -0
- package/lib/matchers.d.ts +64 -0
- package/lib/matchers.d.ts.map +1 -0
- package/lib/matchers.js +207 -0
- package/lib/matchers.js.map +1 -0
- package/lib/primitives.d.ts +23 -0
- package/lib/primitives.d.ts.map +1 -0
- package/lib/primitives.js +104 -0
- package/lib/primitives.js.map +1 -0
- package/lib/retries.d.ts +38 -0
- package/lib/retries.d.ts.map +1 -0
- package/lib/retries.js +154 -0
- package/lib/retries.js.map +1 -0
- package/lib/schemas.d.ts +19 -0
- package/lib/schemas.d.ts.map +1 -0
- package/lib/schemas.js +62 -0
- package/lib/schemas.js.map +1 -0
- package/lib/sdks.d.ts +60 -0
- package/lib/sdks.d.ts.map +1 -0
- package/lib/sdks.js +280 -0
- package/lib/sdks.js.map +1 -0
- package/lib/security.d.ts +82 -0
- package/lib/security.d.ts.map +1 -0
- package/lib/security.js +139 -0
- package/lib/security.js.map +1 -0
- package/lib/url.d.ts +5 -0
- package/lib/url.d.ts.map +1 -0
- package/lib/url.js +25 -0
- package/lib/url.js.map +1 -0
- package/models/components/appendinput.d.ts +49 -0
- package/models/components/appendinput.d.ts.map +1 -0
- package/models/components/appendinput.js +85 -0
- package/models/components/appendinput.js.map +1 -0
- package/models/components/appendoutput.d.ts +51 -0
- package/models/components/appendoutput.d.ts.map +1 -0
- package/models/components/appendoutput.js +86 -0
- package/models/components/appendoutput.js.map +1 -0
- package/models/components/appendrecord.d.ts +40 -0
- package/models/components/appendrecord.d.ts.map +1 -0
- package/models/components/appendrecord.js +71 -0
- package/models/components/appendrecord.js.map +1 -0
- package/models/components/assignment.d.ts +90 -0
- package/models/components/assignment.d.ts.map +1 -0
- package/models/components/assignment.js +127 -0
- package/models/components/assignment.js.map +1 -0
- package/models/components/basinconfig.d.ts +33 -0
- package/models/components/basinconfig.d.ts.map +1 -0
- package/models/components/basinconfig.js +79 -0
- package/models/components/basinconfig.js.map +1 -0
- package/models/components/basininfo.d.ts +51 -0
- package/models/components/basininfo.d.ts.map +1 -0
- package/models/components/basininfo.js +76 -0
- package/models/components/basininfo.js.map +1 -0
- package/models/components/basinstate.d.ts +40 -0
- package/models/components/basinstate.d.ts.map +1 -0
- package/models/components/basinstate.js +66 -0
- package/models/components/basinstate.js.map +1 -0
- package/models/components/checktailresponse.d.ts +35 -0
- package/models/components/checktailresponse.d.ts.map +1 -0
- package/models/components/checktailresponse.js +78 -0
- package/models/components/checktailresponse.js.map +1 -0
- package/models/components/createbasinrequest.d.ts +36 -0
- package/models/components/createbasinrequest.d.ts.map +1 -0
- package/models/components/createbasinrequest.js +73 -0
- package/models/components/createbasinrequest.js.map +1 -0
- package/models/components/createstreamrequest.d.ts +33 -0
- package/models/components/createstreamrequest.d.ts.map +1 -0
- package/models/components/createstreamrequest.js +70 -0
- package/models/components/createstreamrequest.js.map +1 -0
- package/models/components/header.d.ts +43 -0
- package/models/components/header.d.ts.map +1 -0
- package/models/components/header.js +72 -0
- package/models/components/header.js.map +1 -0
- package/models/components/index.d.ts +23 -0
- package/models/components/index.d.ts.map +1 -0
- package/models/components/index.js +42 -0
- package/models/components/index.js.map +1 -0
- package/models/components/listbasinsresponse.d.ts +41 -0
- package/models/components/listbasinsresponse.d.ts.map +1 -0
- package/models/components/listbasinsresponse.js +81 -0
- package/models/components/listbasinsresponse.js.map +1 -0
- package/models/components/liststreamsresponse.d.ts +41 -0
- package/models/components/liststreamsresponse.d.ts.map +1 -0
- package/models/components/liststreamsresponse.js +81 -0
- package/models/components/liststreamsresponse.js.map +1 -0
- package/models/components/output.d.ts +140 -0
- package/models/components/output.d.ts.map +1 -0
- package/models/components/output.js +174 -0
- package/models/components/output.js.map +1 -0
- package/models/components/readresponse.d.ts +83 -0
- package/models/components/readresponse.d.ts.map +1 -0
- package/models/components/readresponse.js +141 -0
- package/models/components/readresponse.js.map +1 -0
- package/models/components/retentionpolicy.d.ts +68 -0
- package/models/components/retentionpolicy.d.ts.map +1 -0
- package/models/components/retentionpolicy.js +94 -0
- package/models/components/retentionpolicy.js.map +1 -0
- package/models/components/security.d.ts +29 -0
- package/models/components/security.d.ts.map +1 -0
- package/models/components/security.js +69 -0
- package/models/components/security.js.map +1 -0
- package/models/components/sequencedrecord.d.ts +46 -0
- package/models/components/sequencedrecord.d.ts.map +1 -0
- package/models/components/sequencedrecord.js +83 -0
- package/models/components/sequencedrecord.js.map +1 -0
- package/models/components/sequencedrecordbatch.d.ts +36 -0
- package/models/components/sequencedrecordbatch.d.ts.map +1 -0
- package/models/components/sequencedrecordbatch.js +70 -0
- package/models/components/sequencedrecordbatch.js.map +1 -0
- package/models/components/storageclass.d.ts +37 -0
- package/models/components/storageclass.d.ts.map +1 -0
- package/models/components/storageclass.js +64 -0
- package/models/components/storageclass.js.map +1 -0
- package/models/components/streamconfig.d.ts +39 -0
- package/models/components/streamconfig.d.ts.map +1 -0
- package/models/components/streamconfig.js +84 -0
- package/models/components/streamconfig.js.map +1 -0
- package/models/components/streaminfo.d.ts +45 -0
- package/models/components/streaminfo.d.ts.map +1 -0
- package/models/components/streaminfo.js +84 -0
- package/models/components/streaminfo.js.map +1 -0
- package/models/errors/apierror.d.ts +8 -0
- package/models/errors/apierror.d.ts.map +1 -0
- package/models/errors/apierror.js +21 -0
- package/models/errors/apierror.js.map +1 -0
- package/models/errors/errorresponse.d.ts +31 -0
- package/models/errors/errorresponse.d.ts.map +1 -0
- package/models/errors/errorresponse.js +77 -0
- package/models/errors/errorresponse.js.map +1 -0
- package/models/errors/httpclienterrors.d.ts +44 -0
- package/models/errors/httpclienterrors.d.ts.map +1 -0
- package/models/errors/httpclienterrors.js +78 -0
- package/models/errors/httpclienterrors.js.map +1 -0
- package/models/errors/index.d.ts +5 -0
- package/models/errors/index.d.ts.map +1 -0
- package/models/errors/index.js +24 -0
- package/models/errors/index.js.map +1 -0
- package/models/errors/sdkvalidationerror.d.ts +20 -0
- package/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/models/errors/sdkvalidationerror.js +115 -0
- package/models/errors/sdkvalidationerror.js.map +1 -0
- package/models/operations/append.d.ts +97 -0
- package/models/operations/append.d.ts.map +1 -0
- package/models/operations/append.js +134 -0
- package/models/operations/append.js.map +1 -0
- package/models/operations/checktail.d.ts +33 -0
- package/models/operations/checktail.d.ts.map +1 -0
- package/models/operations/checktail.js +75 -0
- package/models/operations/checktail.js.map +1 -0
- package/models/operations/createbasin.d.ts +37 -0
- package/models/operations/createbasin.d.ts.map +1 -0
- package/models/operations/createbasin.js +85 -0
- package/models/operations/createbasin.js.map +1 -0
- package/models/operations/createstream.d.ts +38 -0
- package/models/operations/createstream.d.ts.map +1 -0
- package/models/operations/createstream.js +91 -0
- package/models/operations/createstream.js.map +1 -0
- package/models/operations/deletebasin.d.ts +32 -0
- package/models/operations/deletebasin.d.ts.map +1 -0
- package/models/operations/deletebasin.js +69 -0
- package/models/operations/deletebasin.js.map +1 -0
- package/models/operations/deletestream.d.ts +33 -0
- package/models/operations/deletestream.d.ts.map +1 -0
- package/models/operations/deletestream.js +75 -0
- package/models/operations/deletestream.js.map +1 -0
- package/models/operations/getbasinconfig.d.ts +32 -0
- package/models/operations/getbasinconfig.d.ts.map +1 -0
- package/models/operations/getbasinconfig.js +69 -0
- package/models/operations/getbasinconfig.js.map +1 -0
- package/models/operations/getstreamconfig.d.ts +33 -0
- package/models/operations/getstreamconfig.d.ts.map +1 -0
- package/models/operations/getstreamconfig.js +75 -0
- package/models/operations/getstreamconfig.js.map +1 -0
- package/models/operations/index.d.ts +14 -0
- package/models/operations/index.d.ts.map +1 -0
- package/models/operations/index.js +33 -0
- package/models/operations/index.js.map +1 -0
- package/models/operations/listbasins.d.ts +72 -0
- package/models/operations/listbasins.d.ts.map +1 -0
- package/models/operations/listbasins.js +118 -0
- package/models/operations/listbasins.js.map +1 -0
- package/models/operations/liststreams.d.ts +73 -0
- package/models/operations/liststreams.d.ts.map +1 -0
- package/models/operations/liststreams.js +124 -0
- package/models/operations/liststreams.js.map +1 -0
- package/models/operations/read.d.ts +163 -0
- package/models/operations/read.d.ts.map +1 -0
- package/models/operations/read.js +200 -0
- package/models/operations/read.js.map +1 -0
- package/models/operations/reconfigurebasin.d.ts +35 -0
- package/models/operations/reconfigurebasin.d.ts.map +1 -0
- package/models/operations/reconfigurebasin.js +81 -0
- package/models/operations/reconfigurebasin.js.map +1 -0
- package/models/operations/reconfigurestream.d.ts +36 -0
- package/models/operations/reconfigurestream.d.ts.map +1 -0
- package/models/operations/reconfigurestream.js +87 -0
- package/models/operations/reconfigurestream.js.map +1 -0
- package/package.json +32 -0
- package/sdk/account.d.ts +29 -0
- package/sdk/account.d.ts.map +1 -0
- package/sdk/account.js +48 -0
- package/sdk/account.js.map +1 -0
- package/sdk/basin.d.ts +29 -0
- package/sdk/basin.d.ts.map +1 -0
- package/sdk/basin.js +48 -0
- package/sdk/basin.js.map +1 -0
- package/sdk/index.d.ts +2 -0
- package/sdk/index.d.ts.map +1 -0
- package/sdk/index.js +21 -0
- package/sdk/index.js.map +1 -0
- package/sdk/sdk.d.ts +13 -0
- package/sdk/sdk.d.ts.map +1 -0
- package/sdk/sdk.js +23 -0
- package/sdk/sdk.js.map +1 -0
- package/sdk/stream.d.ts +22 -0
- package/sdk/stream.d.ts.map +1 -0
- package/sdk/stream.js +35 -0
- package/sdk/stream.js.map +1 -0
- package/src/core.ts +13 -0
- package/src/funcs/accountCreateBasin.ts +149 -0
- package/src/funcs/accountDeleteBasin.ts +141 -0
- package/src/funcs/accountGetBasinConfig.ts +141 -0
- package/src/funcs/accountListBasins.ts +188 -0
- package/src/funcs/accountReconfigureBasin.ts +142 -0
- package/src/funcs/basinCreateStream.ts +155 -0
- package/src/funcs/basinDeleteStream.ts +147 -0
- package/src/funcs/basinGetStreamConfig.ts +147 -0
- package/src/funcs/basinListStreams.ts +196 -0
- package/src/funcs/basinReconfigureStream.ts +148 -0
- package/src/funcs/streamAppend.ts +152 -0
- package/src/funcs/streamCheckTail.ts +147 -0
- package/src/funcs/streamRead.ts +163 -0
- package/src/hooks/hooks.ts +132 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/registration.ts +14 -0
- package/src/hooks/types.ts +109 -0
- package/src/index.ts +7 -0
- package/src/lib/base64.ts +37 -0
- package/src/lib/config.ts +60 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +483 -0
- package/src/lib/env.ts +41 -0
- package/src/lib/event-streams.ts +264 -0
- package/src/lib/files.ts +40 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +325 -0
- package/src/lib/primitives.ts +136 -0
- package/src/lib/retries.ts +219 -0
- package/src/lib/schemas.ts +91 -0
- package/src/lib/sdks.ts +400 -0
- package/src/lib/security.ts +254 -0
- package/src/lib/url.ts +33 -0
- package/src/models/components/appendinput.ts +102 -0
- package/src/models/components/appendoutput.ts +101 -0
- package/src/models/components/appendrecord.ts +75 -0
- package/src/models/components/assignment.ts +177 -0
- package/src/models/components/basinconfig.ts +80 -0
- package/src/models/components/basininfo.ts +94 -0
- package/src/models/components/basinstate.ts +39 -0
- package/src/models/components/checktailresponse.ts +81 -0
- package/src/models/components/createbasinrequest.ts +85 -0
- package/src/models/components/createstreamrequest.ts +75 -0
- package/src/models/components/header.ts +75 -0
- package/src/models/components/index.ts +26 -0
- package/src/models/components/listbasinsresponse.ts +94 -0
- package/src/models/components/liststreamsresponse.ts +94 -0
- package/src/models/components/output.ts +277 -0
- package/src/models/components/readresponse.ts +197 -0
- package/src/models/components/retentionpolicy.ts +122 -0
- package/src/models/components/security.ts +62 -0
- package/src/models/components/sequencedrecord.ts +99 -0
- package/src/models/components/sequencedrecordbatch.ts +78 -0
- package/src/models/components/storageclass.ts +38 -0
- package/src/models/components/streamconfig.ts +94 -0
- package/src/models/components/streaminfo.ts +93 -0
- package/src/models/errors/apierror.ts +27 -0
- package/src/models/errors/errorresponse.ts +69 -0
- package/src/models/errors/httpclienterrors.ts +62 -0
- package/src/models/errors/index.ts +8 -0
- package/src/models/errors/sdkvalidationerror.ts +97 -0
- package/src/models/operations/append.ts +176 -0
- package/src/models/operations/checktail.ts +76 -0
- package/src/models/operations/createbasin.ts +89 -0
- package/src/models/operations/createstream.ts +96 -0
- package/src/models/operations/deletebasin.ts +69 -0
- package/src/models/operations/deletestream.ts +76 -0
- package/src/models/operations/getbasinconfig.ts +69 -0
- package/src/models/operations/getstreamconfig.ts +76 -0
- package/src/models/operations/index.ts +17 -0
- package/src/models/operations/listbasins.ts +163 -0
- package/src/models/operations/liststreams.ts +170 -0
- package/src/models/operations/read.ts +309 -0
- package/src/models/operations/reconfigurebasin.ts +83 -0
- package/src/models/operations/reconfigurestream.ts +90 -0
- package/src/sdk/account.ts +86 -0
- package/src/sdk/basin.ts +86 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/sdk.ts +25 -0
- package/src/sdk/stream.ts +57 -0
- package/src/types/blobs.ts +31 -0
- package/src/types/constdatetime.ts +15 -0
- package/src/types/enums.ts +16 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +11 -0
- package/src/types/operations.ts +105 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/streams.ts +21 -0
- package/tsconfig.json +41 -0
- package/types/blobs.d.ts +4 -0
- package/types/blobs.d.ts.map +1 -0
- package/types/blobs.js +62 -0
- package/types/blobs.js.map +1 -0
- package/types/constdatetime.d.ts +3 -0
- package/types/constdatetime.d.ts.map +1 -0
- package/types/constdatetime.js +46 -0
- package/types/constdatetime.js.map +1 -0
- package/types/enums.d.ts +12 -0
- package/types/enums.d.ts.map +1 -0
- package/types/enums.js +10 -0
- package/types/enums.js.map +1 -0
- package/types/fp.d.ts +31 -0
- package/types/fp.d.ts.map +1 -0
- package/types/fp.js +37 -0
- package/types/fp.js.map +1 -0
- package/types/index.d.ts +8 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +16 -0
- package/types/index.js.map +1 -0
- package/types/operations.d.ts +27 -0
- package/types/operations.d.ts.map +1 -0
- package/types/operations.js +83 -0
- package/types/operations.js.map +1 -0
- package/types/rfcdate.d.ts +21 -0
- package/types/rfcdate.d.ts.map +1 -0
- package/types/rfcdate.js +46 -0
- package/types/rfcdate.js.map +1 -0
- package/types/streams.d.ts +2 -0
- package/types/streams.d.ts.map +1 -0
- package/types/streams.js +18 -0
- package/types/streams.js.map +1 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from "./appendinput.js";
|
|
6
|
+
export * from "./appendoutput.js";
|
|
7
|
+
export * from "./appendrecord.js";
|
|
8
|
+
export * from "./assignment.js";
|
|
9
|
+
export * from "./basinconfig.js";
|
|
10
|
+
export * from "./basininfo.js";
|
|
11
|
+
export * from "./basinstate.js";
|
|
12
|
+
export * from "./checktailresponse.js";
|
|
13
|
+
export * from "./createbasinrequest.js";
|
|
14
|
+
export * from "./createstreamrequest.js";
|
|
15
|
+
export * from "./header.js";
|
|
16
|
+
export * from "./listbasinsresponse.js";
|
|
17
|
+
export * from "./liststreamsresponse.js";
|
|
18
|
+
export * from "./output.js";
|
|
19
|
+
export * from "./readresponse.js";
|
|
20
|
+
export * from "./retentionpolicy.js";
|
|
21
|
+
export * from "./security.js";
|
|
22
|
+
export * from "./sequencedrecord.js";
|
|
23
|
+
export * from "./sequencedrecordbatch.js";
|
|
24
|
+
export * from "./storageclass.js";
|
|
25
|
+
export * from "./streamconfig.js";
|
|
26
|
+
export * from "./streaminfo.js";
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
BasinInfo,
|
|
12
|
+
BasinInfo$inboundSchema,
|
|
13
|
+
BasinInfo$Outbound,
|
|
14
|
+
BasinInfo$outboundSchema,
|
|
15
|
+
} from "./basininfo.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* List basins response.
|
|
19
|
+
*/
|
|
20
|
+
export type ListBasinsResponse = {
|
|
21
|
+
/**
|
|
22
|
+
* Matching basins.
|
|
23
|
+
*/
|
|
24
|
+
basins: Array<BasinInfo>;
|
|
25
|
+
/**
|
|
26
|
+
* If set, indicates there are more results that can be listed with `start_after`.
|
|
27
|
+
*/
|
|
28
|
+
hasMore: boolean;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const ListBasinsResponse$inboundSchema: z.ZodType<
|
|
33
|
+
ListBasinsResponse,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({
|
|
37
|
+
basins: z.array(BasinInfo$inboundSchema),
|
|
38
|
+
has_more: z.boolean(),
|
|
39
|
+
}).transform((v) => {
|
|
40
|
+
return remap$(v, {
|
|
41
|
+
"has_more": "hasMore",
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type ListBasinsResponse$Outbound = {
|
|
47
|
+
basins: Array<BasinInfo$Outbound>;
|
|
48
|
+
has_more: boolean;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const ListBasinsResponse$outboundSchema: z.ZodType<
|
|
53
|
+
ListBasinsResponse$Outbound,
|
|
54
|
+
z.ZodTypeDef,
|
|
55
|
+
ListBasinsResponse
|
|
56
|
+
> = z.object({
|
|
57
|
+
basins: z.array(BasinInfo$outboundSchema),
|
|
58
|
+
hasMore: z.boolean(),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
hasMore: "has_more",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
68
|
+
*/
|
|
69
|
+
export namespace ListBasinsResponse$ {
|
|
70
|
+
/** @deprecated use `ListBasinsResponse$inboundSchema` instead. */
|
|
71
|
+
export const inboundSchema = ListBasinsResponse$inboundSchema;
|
|
72
|
+
/** @deprecated use `ListBasinsResponse$outboundSchema` instead. */
|
|
73
|
+
export const outboundSchema = ListBasinsResponse$outboundSchema;
|
|
74
|
+
/** @deprecated use `ListBasinsResponse$Outbound` instead. */
|
|
75
|
+
export type Outbound = ListBasinsResponse$Outbound;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function listBasinsResponseToJSON(
|
|
79
|
+
listBasinsResponse: ListBasinsResponse,
|
|
80
|
+
): string {
|
|
81
|
+
return JSON.stringify(
|
|
82
|
+
ListBasinsResponse$outboundSchema.parse(listBasinsResponse),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function listBasinsResponseFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<ListBasinsResponse, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => ListBasinsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'ListBasinsResponse' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
StreamInfo,
|
|
12
|
+
StreamInfo$inboundSchema,
|
|
13
|
+
StreamInfo$Outbound,
|
|
14
|
+
StreamInfo$outboundSchema,
|
|
15
|
+
} from "./streaminfo.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* List streams response.
|
|
19
|
+
*/
|
|
20
|
+
export type ListStreamsResponse = {
|
|
21
|
+
/**
|
|
22
|
+
* If set, indicates there are more results that can be listed with `start_after`.
|
|
23
|
+
*/
|
|
24
|
+
hasMore: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Matching streams.
|
|
27
|
+
*/
|
|
28
|
+
streams: Array<StreamInfo>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const ListStreamsResponse$inboundSchema: z.ZodType<
|
|
33
|
+
ListStreamsResponse,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({
|
|
37
|
+
has_more: z.boolean(),
|
|
38
|
+
streams: z.array(StreamInfo$inboundSchema),
|
|
39
|
+
}).transform((v) => {
|
|
40
|
+
return remap$(v, {
|
|
41
|
+
"has_more": "hasMore",
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type ListStreamsResponse$Outbound = {
|
|
47
|
+
has_more: boolean;
|
|
48
|
+
streams: Array<StreamInfo$Outbound>;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const ListStreamsResponse$outboundSchema: z.ZodType<
|
|
53
|
+
ListStreamsResponse$Outbound,
|
|
54
|
+
z.ZodTypeDef,
|
|
55
|
+
ListStreamsResponse
|
|
56
|
+
> = z.object({
|
|
57
|
+
hasMore: z.boolean(),
|
|
58
|
+
streams: z.array(StreamInfo$outboundSchema),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
hasMore: "has_more",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
68
|
+
*/
|
|
69
|
+
export namespace ListStreamsResponse$ {
|
|
70
|
+
/** @deprecated use `ListStreamsResponse$inboundSchema` instead. */
|
|
71
|
+
export const inboundSchema = ListStreamsResponse$inboundSchema;
|
|
72
|
+
/** @deprecated use `ListStreamsResponse$outboundSchema` instead. */
|
|
73
|
+
export const outboundSchema = ListStreamsResponse$outboundSchema;
|
|
74
|
+
/** @deprecated use `ListStreamsResponse$Outbound` instead. */
|
|
75
|
+
export type Outbound = ListStreamsResponse$Outbound;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function listStreamsResponseToJSON(
|
|
79
|
+
listStreamsResponse: ListStreamsResponse,
|
|
80
|
+
): string {
|
|
81
|
+
return JSON.stringify(
|
|
82
|
+
ListStreamsResponse$outboundSchema.parse(listStreamsResponse),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function listStreamsResponseFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<ListStreamsResponse, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => ListStreamsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'ListStreamsResponse' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
SequencedRecordBatch,
|
|
12
|
+
SequencedRecordBatch$inboundSchema,
|
|
13
|
+
SequencedRecordBatch$Outbound,
|
|
14
|
+
SequencedRecordBatch$outboundSchema,
|
|
15
|
+
} from "./sequencedrecordbatch.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Sequence number for the next record on this stream, in case the requested `start_seq_num` was larger.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* If returned in a streaming read session, this will be a terminal reply.
|
|
22
|
+
*/
|
|
23
|
+
export type Three = {
|
|
24
|
+
/**
|
|
25
|
+
* Sequence number for the next record on this stream, in case the requested `start_seq_num` was larger.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* If returned in a streaming read session, this will be a terminal reply.
|
|
29
|
+
*/
|
|
30
|
+
nextSeqNum: number;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Sequence number for the first record on this stream, in case the requested `start_seq_num` is smaller.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* If returned in a streaming read session, this will be a terminal reply, to signal that there is uncertainty about whether some records may be omitted.
|
|
38
|
+
* The client can re-establish the session starting at this sequence number.
|
|
39
|
+
*/
|
|
40
|
+
export type Output2 = {
|
|
41
|
+
/**
|
|
42
|
+
* Sequence number for the first record on this stream, in case the requested `start_seq_num` is smaller.
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* If returned in a streaming read session, this will be a terminal reply, to signal that there is uncertainty about whether some records may be omitted.
|
|
46
|
+
* The client can re-establish the session starting at this sequence number.
|
|
47
|
+
*/
|
|
48
|
+
firstSeqNum: number;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Batch of records.
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* This batch can be empty only if a `ReadLimit` was provided in the associated read request, but the first record
|
|
56
|
+
* that could have been returned would violate the limit.
|
|
57
|
+
*/
|
|
58
|
+
export type Output1 = {
|
|
59
|
+
/**
|
|
60
|
+
* A batch of sequenced records.
|
|
61
|
+
*/
|
|
62
|
+
batch: SequencedRecordBatch;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Reply which can be a batch of records, or a sequence number if the request could not be satisfied.
|
|
67
|
+
*/
|
|
68
|
+
export type Output = Output1 | Output2 | Three;
|
|
69
|
+
|
|
70
|
+
/** @internal */
|
|
71
|
+
export const Three$inboundSchema: z.ZodType<Three, z.ZodTypeDef, unknown> = z
|
|
72
|
+
.object({
|
|
73
|
+
next_seq_num: z.number().int(),
|
|
74
|
+
}).transform((v) => {
|
|
75
|
+
return remap$(v, {
|
|
76
|
+
"next_seq_num": "nextSeqNum",
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export type Three$Outbound = {
|
|
82
|
+
next_seq_num: number;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const Three$outboundSchema: z.ZodType<
|
|
87
|
+
Three$Outbound,
|
|
88
|
+
z.ZodTypeDef,
|
|
89
|
+
Three
|
|
90
|
+
> = z.object({
|
|
91
|
+
nextSeqNum: z.number().int(),
|
|
92
|
+
}).transform((v) => {
|
|
93
|
+
return remap$(v, {
|
|
94
|
+
nextSeqNum: "next_seq_num",
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
101
|
+
*/
|
|
102
|
+
export namespace Three$ {
|
|
103
|
+
/** @deprecated use `Three$inboundSchema` instead. */
|
|
104
|
+
export const inboundSchema = Three$inboundSchema;
|
|
105
|
+
/** @deprecated use `Three$outboundSchema` instead. */
|
|
106
|
+
export const outboundSchema = Three$outboundSchema;
|
|
107
|
+
/** @deprecated use `Three$Outbound` instead. */
|
|
108
|
+
export type Outbound = Three$Outbound;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function threeToJSON(three: Three): string {
|
|
112
|
+
return JSON.stringify(Three$outboundSchema.parse(three));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function threeFromJSON(
|
|
116
|
+
jsonString: string,
|
|
117
|
+
): SafeParseResult<Three, SDKValidationError> {
|
|
118
|
+
return safeParse(
|
|
119
|
+
jsonString,
|
|
120
|
+
(x) => Three$inboundSchema.parse(JSON.parse(x)),
|
|
121
|
+
`Failed to parse 'Three' from JSON`,
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** @internal */
|
|
126
|
+
export const Output2$inboundSchema: z.ZodType<Output2, z.ZodTypeDef, unknown> =
|
|
127
|
+
z.object({
|
|
128
|
+
first_seq_num: z.number().int(),
|
|
129
|
+
}).transform((v) => {
|
|
130
|
+
return remap$(v, {
|
|
131
|
+
"first_seq_num": "firstSeqNum",
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
/** @internal */
|
|
136
|
+
export type Output2$Outbound = {
|
|
137
|
+
first_seq_num: number;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/** @internal */
|
|
141
|
+
export const Output2$outboundSchema: z.ZodType<
|
|
142
|
+
Output2$Outbound,
|
|
143
|
+
z.ZodTypeDef,
|
|
144
|
+
Output2
|
|
145
|
+
> = z.object({
|
|
146
|
+
firstSeqNum: z.number().int(),
|
|
147
|
+
}).transform((v) => {
|
|
148
|
+
return remap$(v, {
|
|
149
|
+
firstSeqNum: "first_seq_num",
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @internal
|
|
155
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
156
|
+
*/
|
|
157
|
+
export namespace Output2$ {
|
|
158
|
+
/** @deprecated use `Output2$inboundSchema` instead. */
|
|
159
|
+
export const inboundSchema = Output2$inboundSchema;
|
|
160
|
+
/** @deprecated use `Output2$outboundSchema` instead. */
|
|
161
|
+
export const outboundSchema = Output2$outboundSchema;
|
|
162
|
+
/** @deprecated use `Output2$Outbound` instead. */
|
|
163
|
+
export type Outbound = Output2$Outbound;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function output2ToJSON(output2: Output2): string {
|
|
167
|
+
return JSON.stringify(Output2$outboundSchema.parse(output2));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function output2FromJSON(
|
|
171
|
+
jsonString: string,
|
|
172
|
+
): SafeParseResult<Output2, SDKValidationError> {
|
|
173
|
+
return safeParse(
|
|
174
|
+
jsonString,
|
|
175
|
+
(x) => Output2$inboundSchema.parse(JSON.parse(x)),
|
|
176
|
+
`Failed to parse 'Output2' from JSON`,
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** @internal */
|
|
181
|
+
export const Output1$inboundSchema: z.ZodType<Output1, z.ZodTypeDef, unknown> =
|
|
182
|
+
z.object({
|
|
183
|
+
batch: SequencedRecordBatch$inboundSchema,
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
/** @internal */
|
|
187
|
+
export type Output1$Outbound = {
|
|
188
|
+
batch: SequencedRecordBatch$Outbound;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
/** @internal */
|
|
192
|
+
export const Output1$outboundSchema: z.ZodType<
|
|
193
|
+
Output1$Outbound,
|
|
194
|
+
z.ZodTypeDef,
|
|
195
|
+
Output1
|
|
196
|
+
> = z.object({
|
|
197
|
+
batch: SequencedRecordBatch$outboundSchema,
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @internal
|
|
202
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
203
|
+
*/
|
|
204
|
+
export namespace Output1$ {
|
|
205
|
+
/** @deprecated use `Output1$inboundSchema` instead. */
|
|
206
|
+
export const inboundSchema = Output1$inboundSchema;
|
|
207
|
+
/** @deprecated use `Output1$outboundSchema` instead. */
|
|
208
|
+
export const outboundSchema = Output1$outboundSchema;
|
|
209
|
+
/** @deprecated use `Output1$Outbound` instead. */
|
|
210
|
+
export type Outbound = Output1$Outbound;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export function output1ToJSON(output1: Output1): string {
|
|
214
|
+
return JSON.stringify(Output1$outboundSchema.parse(output1));
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function output1FromJSON(
|
|
218
|
+
jsonString: string,
|
|
219
|
+
): SafeParseResult<Output1, SDKValidationError> {
|
|
220
|
+
return safeParse(
|
|
221
|
+
jsonString,
|
|
222
|
+
(x) => Output1$inboundSchema.parse(JSON.parse(x)),
|
|
223
|
+
`Failed to parse 'Output1' from JSON`,
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** @internal */
|
|
228
|
+
export const Output$inboundSchema: z.ZodType<Output, z.ZodTypeDef, unknown> = z
|
|
229
|
+
.union([
|
|
230
|
+
z.lazy(() => Output1$inboundSchema),
|
|
231
|
+
z.lazy(() => Output2$inboundSchema),
|
|
232
|
+
z.lazy(() => Three$inboundSchema),
|
|
233
|
+
]);
|
|
234
|
+
|
|
235
|
+
/** @internal */
|
|
236
|
+
export type Output$Outbound =
|
|
237
|
+
| Output1$Outbound
|
|
238
|
+
| Output2$Outbound
|
|
239
|
+
| Three$Outbound;
|
|
240
|
+
|
|
241
|
+
/** @internal */
|
|
242
|
+
export const Output$outboundSchema: z.ZodType<
|
|
243
|
+
Output$Outbound,
|
|
244
|
+
z.ZodTypeDef,
|
|
245
|
+
Output
|
|
246
|
+
> = z.union([
|
|
247
|
+
z.lazy(() => Output1$outboundSchema),
|
|
248
|
+
z.lazy(() => Output2$outboundSchema),
|
|
249
|
+
z.lazy(() => Three$outboundSchema),
|
|
250
|
+
]);
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @internal
|
|
254
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
255
|
+
*/
|
|
256
|
+
export namespace Output$ {
|
|
257
|
+
/** @deprecated use `Output$inboundSchema` instead. */
|
|
258
|
+
export const inboundSchema = Output$inboundSchema;
|
|
259
|
+
/** @deprecated use `Output$outboundSchema` instead. */
|
|
260
|
+
export const outboundSchema = Output$outboundSchema;
|
|
261
|
+
/** @deprecated use `Output$Outbound` instead. */
|
|
262
|
+
export type Outbound = Output$Outbound;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export function outputToJSON(output: Output): string {
|
|
266
|
+
return JSON.stringify(Output$outboundSchema.parse(output));
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export function outputFromJSON(
|
|
270
|
+
jsonString: string,
|
|
271
|
+
): SafeParseResult<Output, SDKValidationError> {
|
|
272
|
+
return safeParse(
|
|
273
|
+
jsonString,
|
|
274
|
+
(x) => Output$inboundSchema.parse(JSON.parse(x)),
|
|
275
|
+
`Failed to parse 'Output' from JSON`,
|
|
276
|
+
);
|
|
277
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
Output,
|
|
11
|
+
Output$inboundSchema,
|
|
12
|
+
Output$Outbound,
|
|
13
|
+
Output$outboundSchema,
|
|
14
|
+
} from "./output.js";
|
|
15
|
+
|
|
16
|
+
export type ReadResponse2 = {
|
|
17
|
+
data: string;
|
|
18
|
+
event: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type ReadResponse1 = {
|
|
22
|
+
/**
|
|
23
|
+
* Reply which can be a batch of records, or a sequence number if the request could not be satisfied.
|
|
24
|
+
*/
|
|
25
|
+
data: Output;
|
|
26
|
+
event: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type ReadResponse = ReadResponse1 | ReadResponse2;
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const ReadResponse2$inboundSchema: z.ZodType<
|
|
33
|
+
ReadResponse2,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({
|
|
37
|
+
data: z.string(),
|
|
38
|
+
event: z.string(),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export type ReadResponse2$Outbound = {
|
|
43
|
+
data: string;
|
|
44
|
+
event: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const ReadResponse2$outboundSchema: z.ZodType<
|
|
49
|
+
ReadResponse2$Outbound,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
ReadResponse2
|
|
52
|
+
> = z.object({
|
|
53
|
+
data: z.string(),
|
|
54
|
+
event: z.string(),
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
60
|
+
*/
|
|
61
|
+
export namespace ReadResponse2$ {
|
|
62
|
+
/** @deprecated use `ReadResponse2$inboundSchema` instead. */
|
|
63
|
+
export const inboundSchema = ReadResponse2$inboundSchema;
|
|
64
|
+
/** @deprecated use `ReadResponse2$outboundSchema` instead. */
|
|
65
|
+
export const outboundSchema = ReadResponse2$outboundSchema;
|
|
66
|
+
/** @deprecated use `ReadResponse2$Outbound` instead. */
|
|
67
|
+
export type Outbound = ReadResponse2$Outbound;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function readResponse2ToJSON(readResponse2: ReadResponse2): string {
|
|
71
|
+
return JSON.stringify(ReadResponse2$outboundSchema.parse(readResponse2));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function readResponse2FromJSON(
|
|
75
|
+
jsonString: string,
|
|
76
|
+
): SafeParseResult<ReadResponse2, SDKValidationError> {
|
|
77
|
+
return safeParse(
|
|
78
|
+
jsonString,
|
|
79
|
+
(x) => ReadResponse2$inboundSchema.parse(JSON.parse(x)),
|
|
80
|
+
`Failed to parse 'ReadResponse2' from JSON`,
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const ReadResponse1$inboundSchema: z.ZodType<
|
|
86
|
+
ReadResponse1,
|
|
87
|
+
z.ZodTypeDef,
|
|
88
|
+
unknown
|
|
89
|
+
> = z.object({
|
|
90
|
+
data: z.string().transform((v, ctx) => {
|
|
91
|
+
try {
|
|
92
|
+
return JSON.parse(v);
|
|
93
|
+
} catch (err) {
|
|
94
|
+
ctx.addIssue({
|
|
95
|
+
code: z.ZodIssueCode.custom,
|
|
96
|
+
message: `malformed json: ${err}`,
|
|
97
|
+
});
|
|
98
|
+
return z.NEVER;
|
|
99
|
+
}
|
|
100
|
+
}).pipe(Output$inboundSchema),
|
|
101
|
+
event: z.string(),
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
export type ReadResponse1$Outbound = {
|
|
106
|
+
data: Output$Outbound;
|
|
107
|
+
event: string;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/** @internal */
|
|
111
|
+
export const ReadResponse1$outboundSchema: z.ZodType<
|
|
112
|
+
ReadResponse1$Outbound,
|
|
113
|
+
z.ZodTypeDef,
|
|
114
|
+
ReadResponse1
|
|
115
|
+
> = z.object({
|
|
116
|
+
data: Output$outboundSchema,
|
|
117
|
+
event: z.string(),
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @internal
|
|
122
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
123
|
+
*/
|
|
124
|
+
export namespace ReadResponse1$ {
|
|
125
|
+
/** @deprecated use `ReadResponse1$inboundSchema` instead. */
|
|
126
|
+
export const inboundSchema = ReadResponse1$inboundSchema;
|
|
127
|
+
/** @deprecated use `ReadResponse1$outboundSchema` instead. */
|
|
128
|
+
export const outboundSchema = ReadResponse1$outboundSchema;
|
|
129
|
+
/** @deprecated use `ReadResponse1$Outbound` instead. */
|
|
130
|
+
export type Outbound = ReadResponse1$Outbound;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function readResponse1ToJSON(readResponse1: ReadResponse1): string {
|
|
134
|
+
return JSON.stringify(ReadResponse1$outboundSchema.parse(readResponse1));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function readResponse1FromJSON(
|
|
138
|
+
jsonString: string,
|
|
139
|
+
): SafeParseResult<ReadResponse1, SDKValidationError> {
|
|
140
|
+
return safeParse(
|
|
141
|
+
jsonString,
|
|
142
|
+
(x) => ReadResponse1$inboundSchema.parse(JSON.parse(x)),
|
|
143
|
+
`Failed to parse 'ReadResponse1' from JSON`,
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** @internal */
|
|
148
|
+
export const ReadResponse$inboundSchema: z.ZodType<
|
|
149
|
+
ReadResponse,
|
|
150
|
+
z.ZodTypeDef,
|
|
151
|
+
unknown
|
|
152
|
+
> = z.union([
|
|
153
|
+
z.lazy(() => ReadResponse1$inboundSchema),
|
|
154
|
+
z.lazy(() => ReadResponse2$inboundSchema),
|
|
155
|
+
]);
|
|
156
|
+
|
|
157
|
+
/** @internal */
|
|
158
|
+
export type ReadResponse$Outbound =
|
|
159
|
+
| ReadResponse1$Outbound
|
|
160
|
+
| ReadResponse2$Outbound;
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
export const ReadResponse$outboundSchema: z.ZodType<
|
|
164
|
+
ReadResponse$Outbound,
|
|
165
|
+
z.ZodTypeDef,
|
|
166
|
+
ReadResponse
|
|
167
|
+
> = z.union([
|
|
168
|
+
z.lazy(() => ReadResponse1$outboundSchema),
|
|
169
|
+
z.lazy(() => ReadResponse2$outboundSchema),
|
|
170
|
+
]);
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @internal
|
|
174
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
175
|
+
*/
|
|
176
|
+
export namespace ReadResponse$ {
|
|
177
|
+
/** @deprecated use `ReadResponse$inboundSchema` instead. */
|
|
178
|
+
export const inboundSchema = ReadResponse$inboundSchema;
|
|
179
|
+
/** @deprecated use `ReadResponse$outboundSchema` instead. */
|
|
180
|
+
export const outboundSchema = ReadResponse$outboundSchema;
|
|
181
|
+
/** @deprecated use `ReadResponse$Outbound` instead. */
|
|
182
|
+
export type Outbound = ReadResponse$Outbound;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export function readResponseToJSON(readResponse: ReadResponse): string {
|
|
186
|
+
return JSON.stringify(ReadResponse$outboundSchema.parse(readResponse));
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export function readResponseFromJSON(
|
|
190
|
+
jsonString: string,
|
|
191
|
+
): SafeParseResult<ReadResponse, SDKValidationError> {
|
|
192
|
+
return safeParse(
|
|
193
|
+
jsonString,
|
|
194
|
+
(x) => ReadResponse$inboundSchema.parse(JSON.parse(x)),
|
|
195
|
+
`Failed to parse 'ReadResponse' from JSON`,
|
|
196
|
+
);
|
|
197
|
+
}
|