@s2-dev/streamstore 0.11.1 → 0.12.0
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/README.md +50 -1
- package/bin/mcp-server.js +1705 -192
- package/bin/mcp-server.js.map +73 -40
- package/dist/commonjs/funcs/accessTokensIssueAccessToken.js +2 -2
- package/dist/commonjs/funcs/accessTokensIssueAccessToken.js.map +1 -1
- package/dist/commonjs/funcs/accessTokensListAccessTokens.js +2 -2
- package/dist/commonjs/funcs/accessTokensRevokeAccessToken.js +2 -2
- package/dist/commonjs/funcs/basinsCreateBasin.d.ts +14 -0
- package/dist/commonjs/funcs/basinsCreateBasin.d.ts.map +1 -0
- package/dist/commonjs/funcs/basinsCreateBasin.js +124 -0
- package/dist/commonjs/funcs/basinsCreateBasin.js.map +1 -0
- package/dist/commonjs/funcs/basinsCreateOrReconfigureBasin.js +3 -3
- package/dist/commonjs/funcs/basinsCreateOrReconfigureBasin.js.map +1 -1
- package/dist/commonjs/funcs/basinsDeleteBasin.d.ts +1 -1
- package/dist/commonjs/funcs/basinsDeleteBasin.d.ts.map +1 -1
- package/dist/commonjs/funcs/basinsDeleteBasin.js +13 -2
- package/dist/commonjs/funcs/basinsDeleteBasin.js.map +1 -1
- package/dist/commonjs/funcs/basinsGetBasinConfig.js +2 -2
- package/dist/commonjs/funcs/basinsGetBasinConfig.js.map +1 -1
- package/dist/commonjs/funcs/basinsListBasins.js +2 -2
- package/dist/commonjs/funcs/basinsReconfigureBasin.js +2 -2
- package/dist/commonjs/funcs/basinsReconfigureBasin.js.map +1 -1
- package/dist/commonjs/funcs/recordsAppend.d.ts +18 -0
- package/dist/commonjs/funcs/recordsAppend.d.ts.map +1 -0
- package/dist/commonjs/funcs/recordsAppend.js +144 -0
- package/dist/commonjs/funcs/recordsAppend.js.map +1 -0
- package/dist/commonjs/funcs/recordsCheckTail.d.ts +18 -0
- package/dist/commonjs/funcs/recordsCheckTail.d.ts.map +1 -0
- package/dist/commonjs/funcs/recordsCheckTail.js +138 -0
- package/dist/commonjs/funcs/recordsCheckTail.js.map +1 -0
- package/dist/commonjs/funcs/recordsRead.d.ts +23 -0
- package/dist/commonjs/funcs/recordsRead.d.ts.map +1 -0
- package/dist/commonjs/funcs/recordsRead.js +157 -0
- package/dist/commonjs/funcs/recordsRead.js.map +1 -0
- package/dist/commonjs/funcs/streamsCreateOrReconfigureStream.js +14 -3
- package/dist/commonjs/funcs/streamsCreateOrReconfigureStream.js.map +1 -1
- package/dist/commonjs/funcs/streamsCreateStream.d.ts +14 -0
- package/dist/commonjs/funcs/streamsCreateStream.d.ts.map +1 -0
- package/dist/commonjs/funcs/streamsCreateStream.js +129 -0
- package/dist/commonjs/funcs/streamsCreateStream.js.map +1 -0
- package/dist/commonjs/funcs/streamsDeleteStream.d.ts +1 -1
- package/dist/commonjs/funcs/streamsDeleteStream.d.ts.map +1 -1
- package/dist/commonjs/funcs/streamsDeleteStream.js +2 -2
- package/dist/commonjs/funcs/streamsDeleteStream.js.map +1 -1
- package/dist/commonjs/funcs/streamsGetStreamConfig.js +13 -2
- package/dist/commonjs/funcs/streamsGetStreamConfig.js.map +1 -1
- package/dist/commonjs/funcs/streamsListStreams.js +2 -2
- package/dist/commonjs/funcs/streamsListStreams.js.map +1 -1
- package/dist/commonjs/funcs/streamsReconfigureStream.js +13 -2
- package/dist/commonjs/funcs/streamsReconfigureStream.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/event-streams.d.ts +17 -0
- package/dist/commonjs/lib/event-streams.d.ts.map +1 -0
- package/dist/commonjs/lib/event-streams.js +220 -0
- package/dist/commonjs/lib/event-streams.js.map +1 -0
- package/dist/commonjs/lib/matchers.d.ts.map +1 -1
- package/dist/commonjs/lib/matchers.js +4 -1
- package/dist/commonjs/lib/matchers.js.map +1 -1
- package/dist/commonjs/lib/sdks.d.ts +3 -1
- package/dist/commonjs/lib/sdks.d.ts.map +1 -1
- package/dist/commonjs/lib/sdks.js +6 -11
- package/dist/commonjs/lib/sdks.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +11 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/basinsCreateBasin.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/basinsCreateBasin.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/basinsCreateBasin.js +63 -0
- package/dist/commonjs/mcp-server/tools/basinsCreateBasin.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/recordsAppend.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/recordsAppend.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/recordsAppend.js +65 -0
- package/dist/commonjs/mcp-server/tools/recordsAppend.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/recordsCheckTail.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/recordsCheckTail.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/recordsCheckTail.js +65 -0
- package/dist/commonjs/mcp-server/tools/recordsCheckTail.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/recordsRead.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/recordsRead.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/recordsRead.js +65 -0
- package/dist/commonjs/mcp-server/tools/recordsRead.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/streamsCreateStream.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/streamsCreateStream.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/streamsCreateStream.js +63 -0
- package/dist/commonjs/mcp-server/tools/streamsCreateStream.js.map +1 -0
- package/dist/commonjs/models/components/accesstokeninfo.d.ts +2 -2
- package/dist/commonjs/models/components/appendack.d.ts +46 -0
- package/dist/commonjs/models/components/appendack.d.ts.map +1 -0
- package/dist/commonjs/models/components/appendack.js +74 -0
- package/dist/commonjs/models/components/appendack.js.map +1 -0
- package/dist/commonjs/models/components/appendinput.d.ts +46 -0
- package/dist/commonjs/models/components/appendinput.d.ts.map +1 -0
- package/dist/commonjs/models/components/appendinput.js +85 -0
- package/dist/commonjs/models/components/appendinput.js.map +1 -0
- package/dist/commonjs/models/components/appendrecord.d.ts +43 -0
- package/dist/commonjs/models/components/appendrecord.d.ts.map +1 -0
- package/dist/commonjs/models/components/appendrecord.js +74 -0
- package/dist/commonjs/models/components/appendrecord.js.map +1 -0
- package/dist/commonjs/models/components/basinconfig.d.ts +4 -4
- package/dist/commonjs/models/components/basinconfig.d.ts.map +1 -1
- package/dist/commonjs/models/components/basinconfig.js +4 -4
- package/dist/commonjs/models/components/basinconfig.js.map +1 -1
- package/dist/commonjs/models/components/createbasinrequest.d.ts +5 -0
- package/dist/commonjs/models/components/createbasinrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/createbasinrequest.js +2 -0
- package/dist/commonjs/models/components/createbasinrequest.js.map +1 -1
- package/dist/commonjs/models/components/createorreconfigurebasinrequest.d.ts +54 -0
- package/dist/commonjs/models/components/createorreconfigurebasinrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/createorreconfigurebasinrequest.js +96 -0
- package/dist/commonjs/models/components/createorreconfigurebasinrequest.js.map +1 -0
- package/dist/commonjs/models/components/createstreamrequest.d.ts +35 -0
- package/dist/commonjs/models/components/createstreamrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/createstreamrequest.js +72 -0
- package/dist/commonjs/models/components/createstreamrequest.js.map +1 -0
- package/dist/commonjs/models/components/header.d.ts +43 -0
- package/dist/commonjs/models/components/header.d.ts.map +1 -0
- package/dist/commonjs/models/components/header.js +72 -0
- package/dist/commonjs/models/components/header.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +15 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +15 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/listaccesstokensresponse.d.ts +5 -5
- package/dist/commonjs/models/components/listaccesstokensresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/listaccesstokensresponse.js +4 -2
- package/dist/commonjs/models/components/listaccesstokensresponse.js.map +1 -1
- package/dist/commonjs/models/components/listbasinsresponse.d.ts +1 -1
- package/dist/commonjs/models/components/liststreamsresponse.d.ts +1 -1
- package/dist/commonjs/models/components/readbatch.d.ts +30 -0
- package/dist/commonjs/models/components/readbatch.d.ts.map +1 -0
- package/dist/commonjs/models/components/readbatch.js +70 -0
- package/dist/commonjs/models/components/readbatch.js.map +1 -0
- package/dist/commonjs/models/components/readevent.d.ts +107 -0
- package/dist/commonjs/models/components/readevent.d.ts.map +1 -0
- package/dist/commonjs/models/components/readevent.js +175 -0
- package/dist/commonjs/models/components/readevent.js.map +1 -0
- package/dist/commonjs/models/components/s2format.d.ts +28 -0
- package/dist/commonjs/models/components/s2format.d.ts.map +1 -0
- package/dist/commonjs/models/components/s2format.js +61 -0
- package/dist/commonjs/models/components/s2format.js.map +1 -0
- package/dist/commonjs/models/components/sequencedrecord.d.ts +45 -0
- package/dist/commonjs/models/components/sequencedrecord.d.ts.map +1 -0
- package/dist/commonjs/models/components/sequencedrecord.js +85 -0
- package/dist/commonjs/models/components/sequencedrecord.js.map +1 -0
- package/dist/commonjs/models/components/streamconfig.d.ts +3 -18
- package/dist/commonjs/models/components/streamconfig.d.ts.map +1 -1
- package/dist/commonjs/models/components/streamconfig.js +3 -8
- package/dist/commonjs/models/components/streamconfig.js.map +1 -1
- package/dist/commonjs/models/components/streaminfo.d.ts +2 -2
- package/dist/commonjs/models/components/streamposition.d.ts +43 -0
- package/dist/commonjs/models/components/streamposition.d.ts.map +1 -0
- package/dist/commonjs/models/components/streamposition.js +80 -0
- package/dist/commonjs/models/components/streamposition.js.map +1 -0
- package/dist/commonjs/models/components/streamreconfiguration.d.ts +3 -18
- package/dist/commonjs/models/components/streamreconfiguration.d.ts.map +1 -1
- package/dist/commonjs/models/components/streamreconfiguration.js +5 -8
- package/dist/commonjs/models/components/streamreconfiguration.js.map +1 -1
- package/dist/commonjs/models/components/tailresponse.d.ts +33 -0
- package/dist/commonjs/models/components/tailresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/tailresponse.js +70 -0
- package/dist/commonjs/models/components/tailresponse.js.map +1 -0
- package/dist/commonjs/models/components/timestampingconfig.d.ts +38 -0
- package/dist/commonjs/models/components/timestampingconfig.d.ts.map +1 -0
- package/dist/commonjs/models/components/timestampingconfig.js +72 -0
- package/dist/commonjs/models/components/timestampingconfig.js.map +1 -0
- package/dist/commonjs/models/components/timestampingmode.d.ts +31 -0
- package/dist/commonjs/models/components/timestampingmode.d.ts.map +1 -0
- package/dist/commonjs/models/components/timestampingmode.js +61 -0
- package/dist/commonjs/models/components/timestampingmode.js.map +1 -0
- package/dist/commonjs/models/components/timestampingreconfiguration.d.ts +35 -0
- package/dist/commonjs/models/components/timestampingreconfiguration.d.ts.map +1 -0
- package/dist/commonjs/models/components/timestampingreconfiguration.js +72 -0
- package/dist/commonjs/models/components/timestampingreconfiguration.js.map +1 -0
- package/dist/commonjs/models/errors/appendconditionfailed.d.ts +134 -0
- package/dist/commonjs/models/errors/appendconditionfailed.d.ts.map +1 -0
- package/dist/commonjs/models/errors/appendconditionfailed.js +171 -0
- package/dist/commonjs/models/errors/appendconditionfailed.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +3 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +3 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/errors/notfounderror.d.ts +31 -0
- package/dist/commonjs/models/errors/notfounderror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/notfounderror.js +75 -0
- package/dist/commonjs/models/errors/notfounderror.js.map +1 -0
- package/dist/commonjs/models/errors/tailresponse.d.ts +38 -0
- package/dist/commonjs/models/errors/tailresponse.d.ts.map +1 -0
- package/dist/commonjs/models/errors/tailresponse.js +78 -0
- package/dist/commonjs/models/errors/tailresponse.js.map +1 -0
- package/dist/commonjs/models/operations/append.d.ts +48 -0
- package/dist/commonjs/models/operations/append.d.ts.map +1 -0
- package/dist/commonjs/models/operations/append.js +91 -0
- package/dist/commonjs/models/operations/append.js.map +1 -0
- package/dist/commonjs/models/operations/checktail.d.ts +36 -0
- package/dist/commonjs/models/operations/checktail.d.ts.map +1 -0
- package/dist/commonjs/models/operations/checktail.js +75 -0
- package/dist/commonjs/models/operations/checktail.js.map +1 -0
- package/dist/commonjs/models/operations/createorreconfigurebasin.d.ts +7 -7
- package/dist/commonjs/models/operations/createorreconfigurebasin.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createorreconfigurebasin.js +6 -6
- package/dist/commonjs/models/operations/createorreconfigurebasin.js.map +1 -1
- package/dist/commonjs/models/operations/createorreconfigurestream.d.ts +3 -4
- package/dist/commonjs/models/operations/createorreconfigurestream.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createorreconfigurestream.js +2 -2
- package/dist/commonjs/models/operations/createorreconfigurestream.js.map +1 -1
- package/dist/commonjs/models/operations/createstream.d.ts +2 -0
- package/dist/commonjs/models/operations/createstream.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createstream.js +13 -0
- package/dist/commonjs/models/operations/createstream.js.map +1 -0
- package/dist/commonjs/models/operations/deletestream.d.ts +1 -2
- package/dist/commonjs/models/operations/deletestream.d.ts.map +1 -1
- package/dist/commonjs/models/operations/deletestream.js.map +1 -1
- package/dist/commonjs/models/operations/getstreamconfig.d.ts +1 -2
- package/dist/commonjs/models/operations/getstreamconfig.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getstreamconfig.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +4 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +4 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listbasins.d.ts +1 -1
- package/dist/commonjs/models/operations/read.d.ts +93 -0
- package/dist/commonjs/models/operations/read.d.ts.map +1 -0
- package/dist/commonjs/models/operations/read.js +136 -0
- package/dist/commonjs/models/operations/read.js.map +1 -0
- package/dist/commonjs/models/operations/reconfigurestream.d.ts +1 -2
- package/dist/commonjs/models/operations/reconfigurestream.d.ts.map +1 -1
- package/dist/commonjs/models/operations/reconfigurestream.js.map +1 -1
- package/dist/commonjs/models/operations/revokeaccesstoken.d.ts +1 -1
- package/dist/commonjs/sdk/basins.d.ts +4 -0
- package/dist/commonjs/sdk/basins.d.ts.map +1 -1
- package/dist/commonjs/sdk/basins.js +7 -0
- package/dist/commonjs/sdk/basins.js.map +1 -1
- package/dist/commonjs/sdk/records.d.ts +31 -0
- package/dist/commonjs/sdk/records.d.ts.map +1 -0
- package/dist/commonjs/sdk/records.js +44 -0
- package/dist/commonjs/sdk/records.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/streams.d.ts +4 -0
- package/dist/commonjs/sdk/streams.d.ts.map +1 -1
- package/dist/commonjs/sdk/streams.js +7 -0
- package/dist/commonjs/sdk/streams.js.map +1 -1
- package/dist/esm/funcs/accessTokensIssueAccessToken.js +2 -2
- package/dist/esm/funcs/accessTokensIssueAccessToken.js.map +1 -1
- package/dist/esm/funcs/accessTokensListAccessTokens.js +2 -2
- package/dist/esm/funcs/accessTokensRevokeAccessToken.js +2 -2
- package/dist/esm/funcs/basinsCreateBasin.d.ts +14 -0
- package/dist/esm/funcs/basinsCreateBasin.d.ts.map +1 -0
- package/dist/esm/funcs/basinsCreateBasin.js +88 -0
- package/dist/esm/funcs/basinsCreateBasin.js.map +1 -0
- package/dist/esm/funcs/basinsCreateOrReconfigureBasin.js +3 -3
- package/dist/esm/funcs/basinsCreateOrReconfigureBasin.js.map +1 -1
- package/dist/esm/funcs/basinsDeleteBasin.d.ts +1 -1
- package/dist/esm/funcs/basinsDeleteBasin.d.ts.map +1 -1
- package/dist/esm/funcs/basinsDeleteBasin.js +13 -2
- package/dist/esm/funcs/basinsDeleteBasin.js.map +1 -1
- package/dist/esm/funcs/basinsGetBasinConfig.js +2 -2
- package/dist/esm/funcs/basinsGetBasinConfig.js.map +1 -1
- package/dist/esm/funcs/basinsListBasins.js +2 -2
- package/dist/esm/funcs/basinsReconfigureBasin.js +2 -2
- package/dist/esm/funcs/basinsReconfigureBasin.js.map +1 -1
- package/dist/esm/funcs/recordsAppend.d.ts +18 -0
- package/dist/esm/funcs/recordsAppend.d.ts.map +1 -0
- package/dist/esm/funcs/recordsAppend.js +108 -0
- package/dist/esm/funcs/recordsAppend.js.map +1 -0
- package/dist/esm/funcs/recordsCheckTail.d.ts +18 -0
- package/dist/esm/funcs/recordsCheckTail.d.ts.map +1 -0
- package/dist/esm/funcs/recordsCheckTail.js +102 -0
- package/dist/esm/funcs/recordsCheckTail.js.map +1 -0
- package/dist/esm/funcs/recordsRead.d.ts +23 -0
- package/dist/esm/funcs/recordsRead.d.ts.map +1 -0
- package/dist/esm/funcs/recordsRead.js +120 -0
- package/dist/esm/funcs/recordsRead.js.map +1 -0
- package/dist/esm/funcs/streamsCreateOrReconfigureStream.js +14 -3
- package/dist/esm/funcs/streamsCreateOrReconfigureStream.js.map +1 -1
- package/dist/esm/funcs/streamsCreateStream.d.ts +14 -0
- package/dist/esm/funcs/streamsCreateStream.d.ts.map +1 -0
- package/dist/esm/funcs/streamsCreateStream.js +93 -0
- package/dist/esm/funcs/streamsCreateStream.js.map +1 -0
- package/dist/esm/funcs/streamsDeleteStream.d.ts +1 -1
- package/dist/esm/funcs/streamsDeleteStream.d.ts.map +1 -1
- package/dist/esm/funcs/streamsDeleteStream.js +2 -2
- package/dist/esm/funcs/streamsDeleteStream.js.map +1 -1
- package/dist/esm/funcs/streamsGetStreamConfig.js +13 -2
- package/dist/esm/funcs/streamsGetStreamConfig.js.map +1 -1
- package/dist/esm/funcs/streamsListStreams.js +2 -2
- package/dist/esm/funcs/streamsListStreams.js.map +1 -1
- package/dist/esm/funcs/streamsReconfigureStream.js +13 -2
- package/dist/esm/funcs/streamsReconfigureStream.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/event-streams.d.ts +17 -0
- package/dist/esm/lib/event-streams.d.ts.map +1 -0
- package/dist/esm/lib/event-streams.js +215 -0
- package/dist/esm/lib/event-streams.js.map +1 -0
- package/dist/esm/lib/matchers.d.ts.map +1 -1
- package/dist/esm/lib/matchers.js +4 -1
- package/dist/esm/lib/matchers.js.map +1 -1
- package/dist/esm/lib/sdks.d.ts +3 -1
- package/dist/esm/lib/sdks.d.ts.map +1 -1
- package/dist/esm/lib/sdks.js +6 -11
- package/dist/esm/lib/sdks.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +11 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/basinsCreateBasin.d.ts +8 -0
- package/dist/esm/mcp-server/tools/basinsCreateBasin.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/basinsCreateBasin.js +27 -0
- package/dist/esm/mcp-server/tools/basinsCreateBasin.js.map +1 -0
- package/dist/esm/mcp-server/tools/recordsAppend.d.ts +8 -0
- package/dist/esm/mcp-server/tools/recordsAppend.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/recordsAppend.js +29 -0
- package/dist/esm/mcp-server/tools/recordsAppend.js.map +1 -0
- package/dist/esm/mcp-server/tools/recordsCheckTail.d.ts +8 -0
- package/dist/esm/mcp-server/tools/recordsCheckTail.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/recordsCheckTail.js +29 -0
- package/dist/esm/mcp-server/tools/recordsCheckTail.js.map +1 -0
- package/dist/esm/mcp-server/tools/recordsRead.d.ts +8 -0
- package/dist/esm/mcp-server/tools/recordsRead.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/recordsRead.js +29 -0
- package/dist/esm/mcp-server/tools/recordsRead.js.map +1 -0
- package/dist/esm/mcp-server/tools/streamsCreateStream.d.ts +8 -0
- package/dist/esm/mcp-server/tools/streamsCreateStream.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/streamsCreateStream.js +27 -0
- package/dist/esm/mcp-server/tools/streamsCreateStream.js.map +1 -0
- package/dist/esm/models/components/accesstokeninfo.d.ts +2 -2
- package/dist/esm/models/components/appendack.d.ts +46 -0
- package/dist/esm/models/components/appendack.d.ts.map +1 -0
- package/dist/esm/models/components/appendack.js +36 -0
- package/dist/esm/models/components/appendack.js.map +1 -0
- package/dist/esm/models/components/appendinput.d.ts +46 -0
- package/dist/esm/models/components/appendinput.d.ts.map +1 -0
- package/dist/esm/models/components/appendinput.js +47 -0
- package/dist/esm/models/components/appendinput.js.map +1 -0
- package/dist/esm/models/components/appendrecord.d.ts +43 -0
- package/dist/esm/models/components/appendrecord.d.ts.map +1 -0
- package/dist/esm/models/components/appendrecord.js +36 -0
- package/dist/esm/models/components/appendrecord.js.map +1 -0
- package/dist/esm/models/components/basinconfig.d.ts +4 -4
- package/dist/esm/models/components/basinconfig.d.ts.map +1 -1
- package/dist/esm/models/components/basinconfig.js +4 -4
- package/dist/esm/models/components/basinconfig.js.map +1 -1
- package/dist/esm/models/components/createbasinrequest.d.ts +5 -0
- package/dist/esm/models/components/createbasinrequest.d.ts.map +1 -1
- package/dist/esm/models/components/createbasinrequest.js +2 -0
- package/dist/esm/models/components/createbasinrequest.js.map +1 -1
- package/dist/esm/models/components/createorreconfigurebasinrequest.d.ts +54 -0
- package/dist/esm/models/components/createorreconfigurebasinrequest.d.ts.map +1 -0
- package/dist/esm/models/components/createorreconfigurebasinrequest.js +56 -0
- package/dist/esm/models/components/createorreconfigurebasinrequest.js.map +1 -0
- package/dist/esm/models/components/createstreamrequest.d.ts +35 -0
- package/dist/esm/models/components/createstreamrequest.d.ts.map +1 -0
- package/dist/esm/models/components/createstreamrequest.js +34 -0
- package/dist/esm/models/components/createstreamrequest.js.map +1 -0
- package/dist/esm/models/components/header.d.ts +43 -0
- package/dist/esm/models/components/header.d.ts.map +1 -0
- package/dist/esm/models/components/header.js +34 -0
- package/dist/esm/models/components/header.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +15 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +15 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/listaccesstokensresponse.d.ts +5 -5
- package/dist/esm/models/components/listaccesstokensresponse.d.ts.map +1 -1
- package/dist/esm/models/components/listaccesstokensresponse.js +4 -2
- package/dist/esm/models/components/listaccesstokensresponse.js.map +1 -1
- package/dist/esm/models/components/listbasinsresponse.d.ts +1 -1
- package/dist/esm/models/components/liststreamsresponse.d.ts +1 -1
- package/dist/esm/models/components/readbatch.d.ts +30 -0
- package/dist/esm/models/components/readbatch.d.ts.map +1 -0
- package/dist/esm/models/components/readbatch.js +32 -0
- package/dist/esm/models/components/readbatch.js.map +1 -0
- package/dist/esm/models/components/readevent.d.ts +107 -0
- package/dist/esm/models/components/readevent.d.ts.map +1 -0
- package/dist/esm/models/components/readevent.js +131 -0
- package/dist/esm/models/components/readevent.js.map +1 -0
- package/dist/esm/models/components/s2format.d.ts +28 -0
- package/dist/esm/models/components/s2format.d.ts.map +1 -0
- package/dist/esm/models/components/s2format.js +25 -0
- package/dist/esm/models/components/s2format.js.map +1 -0
- package/dist/esm/models/components/sequencedrecord.d.ts +45 -0
- package/dist/esm/models/components/sequencedrecord.d.ts.map +1 -0
- package/dist/esm/models/components/sequencedrecord.js +47 -0
- package/dist/esm/models/components/sequencedrecord.js.map +1 -0
- package/dist/esm/models/components/streamconfig.d.ts +3 -18
- package/dist/esm/models/components/streamconfig.d.ts.map +1 -1
- package/dist/esm/models/components/streamconfig.js +3 -8
- package/dist/esm/models/components/streamconfig.js.map +1 -1
- package/dist/esm/models/components/streaminfo.d.ts +2 -2
- package/dist/esm/models/components/streamposition.d.ts +43 -0
- package/dist/esm/models/components/streamposition.d.ts.map +1 -0
- package/dist/esm/models/components/streamposition.js +42 -0
- package/dist/esm/models/components/streamposition.js.map +1 -0
- package/dist/esm/models/components/streamreconfiguration.d.ts +3 -18
- package/dist/esm/models/components/streamreconfiguration.d.ts.map +1 -1
- package/dist/esm/models/components/streamreconfiguration.js +5 -8
- package/dist/esm/models/components/streamreconfiguration.js.map +1 -1
- package/dist/esm/models/components/tailresponse.d.ts +33 -0
- package/dist/esm/models/components/tailresponse.d.ts.map +1 -0
- package/dist/esm/models/components/tailresponse.js +32 -0
- package/dist/esm/models/components/tailresponse.js.map +1 -0
- package/dist/esm/models/components/timestampingconfig.d.ts +38 -0
- package/dist/esm/models/components/timestampingconfig.d.ts.map +1 -0
- package/dist/esm/models/components/timestampingconfig.js +34 -0
- package/dist/esm/models/components/timestampingconfig.js.map +1 -0
- package/dist/esm/models/components/timestampingmode.d.ts +31 -0
- package/dist/esm/models/components/timestampingmode.d.ts.map +1 -0
- package/dist/esm/models/components/timestampingmode.js +25 -0
- package/dist/esm/models/components/timestampingmode.js.map +1 -0
- package/dist/esm/models/components/timestampingreconfiguration.d.ts +35 -0
- package/dist/esm/models/components/timestampingreconfiguration.d.ts.map +1 -0
- package/dist/esm/models/components/timestampingreconfiguration.js +34 -0
- package/dist/esm/models/components/timestampingreconfiguration.js.map +1 -0
- package/dist/esm/models/errors/appendconditionfailed.d.ts +134 -0
- package/dist/esm/models/errors/appendconditionfailed.d.ts.map +1 -0
- package/dist/esm/models/errors/appendconditionfailed.js +131 -0
- package/dist/esm/models/errors/appendconditionfailed.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +3 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +3 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/errors/notfounderror.d.ts +31 -0
- package/dist/esm/models/errors/notfounderror.d.ts.map +1 -0
- package/dist/esm/models/errors/notfounderror.js +38 -0
- package/dist/esm/models/errors/notfounderror.js.map +1 -0
- package/dist/esm/models/errors/tailresponse.d.ts +38 -0
- package/dist/esm/models/errors/tailresponse.d.ts.map +1 -0
- package/dist/esm/models/errors/tailresponse.js +41 -0
- package/dist/esm/models/errors/tailresponse.js.map +1 -0
- package/dist/esm/models/operations/append.d.ts +48 -0
- package/dist/esm/models/operations/append.d.ts.map +1 -0
- package/dist/esm/models/operations/append.js +53 -0
- package/dist/esm/models/operations/append.js.map +1 -0
- package/dist/esm/models/operations/checktail.d.ts +36 -0
- package/dist/esm/models/operations/checktail.d.ts.map +1 -0
- package/dist/esm/models/operations/checktail.js +37 -0
- package/dist/esm/models/operations/checktail.js.map +1 -0
- package/dist/esm/models/operations/createorreconfigurebasin.d.ts +7 -7
- package/dist/esm/models/operations/createorreconfigurebasin.d.ts.map +1 -1
- package/dist/esm/models/operations/createorreconfigurebasin.js +6 -6
- package/dist/esm/models/operations/createorreconfigurebasin.js.map +1 -1
- package/dist/esm/models/operations/createorreconfigurestream.d.ts +3 -4
- package/dist/esm/models/operations/createorreconfigurestream.d.ts.map +1 -1
- package/dist/esm/models/operations/createorreconfigurestream.js +2 -2
- package/dist/esm/models/operations/createorreconfigurestream.js.map +1 -1
- package/dist/esm/models/operations/createstream.d.ts +2 -0
- package/dist/esm/models/operations/createstream.d.ts.map +1 -0
- package/dist/esm/models/operations/createstream.js +10 -0
- package/dist/esm/models/operations/createstream.js.map +1 -0
- package/dist/esm/models/operations/deletestream.d.ts +1 -2
- package/dist/esm/models/operations/deletestream.d.ts.map +1 -1
- package/dist/esm/models/operations/deletestream.js.map +1 -1
- package/dist/esm/models/operations/getstreamconfig.d.ts +1 -2
- package/dist/esm/models/operations/getstreamconfig.d.ts.map +1 -1
- package/dist/esm/models/operations/getstreamconfig.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +4 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +4 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listbasins.d.ts +1 -1
- package/dist/esm/models/operations/read.d.ts +93 -0
- package/dist/esm/models/operations/read.d.ts.map +1 -0
- package/dist/esm/models/operations/read.js +96 -0
- package/dist/esm/models/operations/read.js.map +1 -0
- package/dist/esm/models/operations/reconfigurestream.d.ts +1 -2
- package/dist/esm/models/operations/reconfigurestream.d.ts.map +1 -1
- package/dist/esm/models/operations/reconfigurestream.js.map +1 -1
- package/dist/esm/models/operations/revokeaccesstoken.d.ts +1 -1
- package/dist/esm/sdk/basins.d.ts +4 -0
- package/dist/esm/sdk/basins.d.ts.map +1 -1
- package/dist/esm/sdk/basins.js +7 -0
- package/dist/esm/sdk/basins.js.map +1 -1
- package/dist/esm/sdk/records.d.ts +31 -0
- package/dist/esm/sdk/records.d.ts.map +1 -0
- package/dist/esm/sdk/records.js +39 -0
- package/dist/esm/sdk/records.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/streams.d.ts +4 -0
- package/dist/esm/sdk/streams.d.ts.map +1 -1
- package/dist/esm/sdk/streams.js +7 -0
- package/dist/esm/sdk/streams.js.map +1 -1
- package/docs/sdks/accesstokens/README.md +3 -3
- package/docs/sdks/basins/README.md +86 -7
- package/docs/sdks/records/README.md +271 -0
- package/docs/sdks/streams/README.md +87 -7
- package/jsr.json +2 -1
- package/package.json +1 -1
- package/src/funcs/accessTokensIssueAccessToken.ts +2 -2
- package/src/funcs/accessTokensListAccessTokens.ts +2 -2
- package/src/funcs/accessTokensRevokeAccessToken.ts +2 -2
- package/src/funcs/basinsCreateBasin.ts +179 -0
- package/src/funcs/basinsCreateOrReconfigureBasin.ts +3 -3
- package/src/funcs/basinsDeleteBasin.ts +17 -2
- package/src/funcs/basinsGetBasinConfig.ts +2 -2
- package/src/funcs/basinsListBasins.ts +2 -2
- package/src/funcs/basinsReconfigureBasin.ts +2 -2
- package/src/funcs/recordsAppend.ts +205 -0
- package/src/funcs/recordsCheckTail.ts +195 -0
- package/src/funcs/recordsRead.ts +219 -0
- package/src/funcs/streamsCreateOrReconfigureStream.ts +14 -3
- package/src/funcs/streamsCreateStream.ts +185 -0
- package/src/funcs/streamsDeleteStream.ts +6 -2
- package/src/funcs/streamsGetStreamConfig.ts +13 -2
- package/src/funcs/streamsListStreams.ts +2 -2
- package/src/funcs/streamsReconfigureStream.ts +13 -2
- package/src/lib/config.ts +3 -3
- package/src/lib/event-streams.ts +264 -0
- package/src/lib/matchers.ts +4 -1
- package/src/lib/sdks.ts +11 -11
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +11 -1
- package/src/mcp-server/tools/basinsCreateBasin.ts +36 -0
- package/src/mcp-server/tools/recordsAppend.ts +38 -0
- package/src/mcp-server/tools/recordsCheckTail.ts +38 -0
- package/src/mcp-server/tools/recordsRead.ts +38 -0
- package/src/mcp-server/tools/streamsCreateStream.ts +36 -0
- package/src/models/components/accesstokeninfo.ts +2 -2
- package/src/models/components/appendack.ts +88 -0
- package/src/models/components/appendinput.ts +99 -0
- package/src/models/components/appendrecord.ts +85 -0
- package/src/models/components/basinconfig.ts +8 -8
- package/src/models/components/createbasinrequest.ts +7 -0
- package/src/models/components/createorreconfigurebasinrequest.ts +138 -0
- package/src/models/components/createstreamrequest.ts +79 -0
- package/src/models/components/header.ts +75 -0
- package/src/models/components/index.ts +15 -0
- package/src/models/components/listaccesstokensresponse.ts +9 -7
- package/src/models/components/listbasinsresponse.ts +1 -1
- package/src/models/components/liststreamsresponse.ts +1 -1
- package/src/models/components/readbatch.ts +68 -0
- package/src/models/components/readevent.ts +243 -0
- package/src/models/components/s2format.ts +31 -0
- package/src/models/components/sequencedrecord.ts +100 -0
- package/src/models/components/streamconfig.ts +10 -26
- package/src/models/components/streaminfo.ts +2 -2
- package/src/models/components/streamposition.ts +87 -0
- package/src/models/components/streamreconfiguration.ts +12 -26
- package/src/models/components/tailresponse.ts +71 -0
- package/src/models/components/timestampingconfig.ts +81 -0
- package/src/models/components/timestampingmode.ts +34 -0
- package/src/models/components/timestampingreconfiguration.ts +80 -0
- package/src/models/errors/appendconditionfailed.ts +249 -0
- package/src/models/errors/index.ts +3 -0
- package/src/models/errors/notfounderror.ts +67 -0
- package/src/models/errors/tailresponse.ts +76 -0
- package/src/models/operations/append.ts +102 -0
- package/src/models/operations/checktail.ts +79 -0
- package/src/models/operations/createorreconfigurebasin.ts +23 -13
- package/src/models/operations/createorreconfigurestream.ts +5 -6
- package/src/models/operations/createstream.ts +10 -0
- package/src/models/operations/deletestream.ts +1 -2
- package/src/models/operations/getstreamconfig.ts +1 -2
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/listbasins.ts +1 -1
- package/src/models/operations/read.ts +195 -0
- package/src/models/operations/reconfigurestream.ts +1 -2
- package/src/models/operations/revokeaccesstoken.ts +1 -1
- package/src/sdk/basins.ts +15 -0
- package/src/sdk/records.ts +66 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/streams.ts +15 -0
|
@@ -18,26 +18,17 @@ import {
|
|
|
18
18
|
StorageClass$inboundSchema,
|
|
19
19
|
StorageClass$outboundSchema,
|
|
20
20
|
} from "./storageclass.js";
|
|
21
|
+
import {
|
|
22
|
+
TimestampingReconfiguration,
|
|
23
|
+
TimestampingReconfiguration$inboundSchema,
|
|
24
|
+
TimestampingReconfiguration$Outbound,
|
|
25
|
+
TimestampingReconfiguration$outboundSchema,
|
|
26
|
+
} from "./timestampingreconfiguration.js";
|
|
21
27
|
|
|
22
28
|
export type StreamReconfiguration = {
|
|
23
|
-
/**
|
|
24
|
-
* Controls how to handle timestamps when they are not provided by the client.
|
|
25
|
-
*
|
|
26
|
-
* @remarks
|
|
27
|
-
* If this is false (or not set), the record's arrival time in milliseconds since Unix epoch
|
|
28
|
-
* will be assigned as its timestamp. If this is true, then any append without a
|
|
29
|
-
* client-specified timestamp will be rejected as invalid.
|
|
30
|
-
*/
|
|
31
|
-
requireClientTimestamps?: boolean | null | undefined;
|
|
32
29
|
retentionPolicy?: RetentionPolicy | null | undefined;
|
|
33
30
|
storageClass?: StorageClass | null | undefined;
|
|
34
|
-
|
|
35
|
-
* Allow client timestamps to exceed the arrival time in milliseconds since Unix epoch.
|
|
36
|
-
*
|
|
37
|
-
* @remarks
|
|
38
|
-
* If this is false (or not set), client timestamps will be capped at the arrival time.
|
|
39
|
-
*/
|
|
40
|
-
uncappedClientTimestamps?: boolean | null | undefined;
|
|
31
|
+
timestamping?: TimestampingReconfiguration | null | undefined;
|
|
41
32
|
};
|
|
42
33
|
|
|
43
34
|
/** @internal */
|
|
@@ -46,25 +37,22 @@ export const StreamReconfiguration$inboundSchema: z.ZodType<
|
|
|
46
37
|
z.ZodTypeDef,
|
|
47
38
|
unknown
|
|
48
39
|
> = z.object({
|
|
49
|
-
require_client_timestamps: z.nullable(z.boolean()).optional(),
|
|
50
40
|
retention_policy: z.nullable(RetentionPolicy$inboundSchema).optional(),
|
|
51
41
|
storage_class: z.nullable(StorageClass$inboundSchema).optional(),
|
|
52
|
-
|
|
42
|
+
timestamping: z.nullable(TimestampingReconfiguration$inboundSchema)
|
|
43
|
+
.optional(),
|
|
53
44
|
}).transform((v) => {
|
|
54
45
|
return remap$(v, {
|
|
55
|
-
"require_client_timestamps": "requireClientTimestamps",
|
|
56
46
|
"retention_policy": "retentionPolicy",
|
|
57
47
|
"storage_class": "storageClass",
|
|
58
|
-
"uncapped_client_timestamps": "uncappedClientTimestamps",
|
|
59
48
|
});
|
|
60
49
|
});
|
|
61
50
|
|
|
62
51
|
/** @internal */
|
|
63
52
|
export type StreamReconfiguration$Outbound = {
|
|
64
|
-
require_client_timestamps?: boolean | null | undefined;
|
|
65
53
|
retention_policy?: RetentionPolicy$Outbound | null | undefined;
|
|
66
54
|
storage_class?: string | null | undefined;
|
|
67
|
-
|
|
55
|
+
timestamping?: TimestampingReconfiguration$Outbound | null | undefined;
|
|
68
56
|
};
|
|
69
57
|
|
|
70
58
|
/** @internal */
|
|
@@ -73,16 +61,14 @@ export const StreamReconfiguration$outboundSchema: z.ZodType<
|
|
|
73
61
|
z.ZodTypeDef,
|
|
74
62
|
StreamReconfiguration
|
|
75
63
|
> = z.object({
|
|
76
|
-
requireClientTimestamps: z.nullable(z.boolean()).optional(),
|
|
77
64
|
retentionPolicy: z.nullable(RetentionPolicy$outboundSchema).optional(),
|
|
78
65
|
storageClass: z.nullable(StorageClass$outboundSchema).optional(),
|
|
79
|
-
|
|
66
|
+
timestamping: z.nullable(TimestampingReconfiguration$outboundSchema)
|
|
67
|
+
.optional(),
|
|
80
68
|
}).transform((v) => {
|
|
81
69
|
return remap$(v, {
|
|
82
|
-
requireClientTimestamps: "require_client_timestamps",
|
|
83
70
|
retentionPolicy: "retention_policy",
|
|
84
71
|
storageClass: "storage_class",
|
|
85
|
-
uncappedClientTimestamps: "uncapped_client_timestamps",
|
|
86
72
|
});
|
|
87
73
|
});
|
|
88
74
|
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
StreamPosition,
|
|
11
|
+
StreamPosition$inboundSchema,
|
|
12
|
+
StreamPosition$Outbound,
|
|
13
|
+
StreamPosition$outboundSchema,
|
|
14
|
+
} from "./streamposition.js";
|
|
15
|
+
|
|
16
|
+
export type TailResponse = {
|
|
17
|
+
/**
|
|
18
|
+
* Position of a record in a stream.
|
|
19
|
+
*/
|
|
20
|
+
tail: StreamPosition;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const TailResponse$inboundSchema: z.ZodType<
|
|
25
|
+
TailResponse,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
tail: StreamPosition$inboundSchema,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type TailResponse$Outbound = {
|
|
34
|
+
tail: StreamPosition$Outbound;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const TailResponse$outboundSchema: z.ZodType<
|
|
39
|
+
TailResponse$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
TailResponse
|
|
42
|
+
> = z.object({
|
|
43
|
+
tail: StreamPosition$outboundSchema,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
+
*/
|
|
50
|
+
export namespace TailResponse$ {
|
|
51
|
+
/** @deprecated use `TailResponse$inboundSchema` instead. */
|
|
52
|
+
export const inboundSchema = TailResponse$inboundSchema;
|
|
53
|
+
/** @deprecated use `TailResponse$outboundSchema` instead. */
|
|
54
|
+
export const outboundSchema = TailResponse$outboundSchema;
|
|
55
|
+
/** @deprecated use `TailResponse$Outbound` instead. */
|
|
56
|
+
export type Outbound = TailResponse$Outbound;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function tailResponseToJSON(tailResponse: TailResponse): string {
|
|
60
|
+
return JSON.stringify(TailResponse$outboundSchema.parse(tailResponse));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function tailResponseFromJSON(
|
|
64
|
+
jsonString: string,
|
|
65
|
+
): SafeParseResult<TailResponse, SDKValidationError> {
|
|
66
|
+
return safeParse(
|
|
67
|
+
jsonString,
|
|
68
|
+
(x) => TailResponse$inboundSchema.parse(JSON.parse(x)),
|
|
69
|
+
`Failed to parse 'TailResponse' from JSON`,
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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
|
+
TimestampingMode,
|
|
11
|
+
TimestampingMode$inboundSchema,
|
|
12
|
+
TimestampingMode$outboundSchema,
|
|
13
|
+
} from "./timestampingmode.js";
|
|
14
|
+
|
|
15
|
+
export type TimestampingConfig = {
|
|
16
|
+
mode?: TimestampingMode | null | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Allow client-specified timestamps to exceed the arrival time.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* If this is false or not set, client timestamps will be capped at the arrival time.
|
|
22
|
+
*/
|
|
23
|
+
uncapped?: boolean | null | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const TimestampingConfig$inboundSchema: z.ZodType<
|
|
28
|
+
TimestampingConfig,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
mode: z.nullable(TimestampingMode$inboundSchema).optional(),
|
|
33
|
+
uncapped: z.nullable(z.boolean()).optional(),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type TimestampingConfig$Outbound = {
|
|
38
|
+
mode?: string | null | undefined;
|
|
39
|
+
uncapped?: boolean | null | undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const TimestampingConfig$outboundSchema: z.ZodType<
|
|
44
|
+
TimestampingConfig$Outbound,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
TimestampingConfig
|
|
47
|
+
> = z.object({
|
|
48
|
+
mode: z.nullable(TimestampingMode$outboundSchema).optional(),
|
|
49
|
+
uncapped: z.nullable(z.boolean()).optional(),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export namespace TimestampingConfig$ {
|
|
57
|
+
/** @deprecated use `TimestampingConfig$inboundSchema` instead. */
|
|
58
|
+
export const inboundSchema = TimestampingConfig$inboundSchema;
|
|
59
|
+
/** @deprecated use `TimestampingConfig$outboundSchema` instead. */
|
|
60
|
+
export const outboundSchema = TimestampingConfig$outboundSchema;
|
|
61
|
+
/** @deprecated use `TimestampingConfig$Outbound` instead. */
|
|
62
|
+
export type Outbound = TimestampingConfig$Outbound;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function timestampingConfigToJSON(
|
|
66
|
+
timestampingConfig: TimestampingConfig,
|
|
67
|
+
): string {
|
|
68
|
+
return JSON.stringify(
|
|
69
|
+
TimestampingConfig$outboundSchema.parse(timestampingConfig),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function timestampingConfigFromJSON(
|
|
74
|
+
jsonString: string,
|
|
75
|
+
): SafeParseResult<TimestampingConfig, SDKValidationError> {
|
|
76
|
+
return safeParse(
|
|
77
|
+
jsonString,
|
|
78
|
+
(x) => TimestampingConfig$inboundSchema.parse(JSON.parse(x)),
|
|
79
|
+
`Failed to parse 'TimestampingConfig' from JSON`,
|
|
80
|
+
);
|
|
81
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const TimestampingMode = {
|
|
9
|
+
ClientPrefer: "client-prefer",
|
|
10
|
+
ClientRequire: "client-require",
|
|
11
|
+
Arrival: "arrival",
|
|
12
|
+
} as const;
|
|
13
|
+
export type TimestampingMode = ClosedEnum<typeof TimestampingMode>;
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const TimestampingMode$inboundSchema: z.ZodNativeEnum<
|
|
17
|
+
typeof TimestampingMode
|
|
18
|
+
> = z.nativeEnum(TimestampingMode);
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const TimestampingMode$outboundSchema: z.ZodNativeEnum<
|
|
22
|
+
typeof TimestampingMode
|
|
23
|
+
> = TimestampingMode$inboundSchema;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
28
|
+
*/
|
|
29
|
+
export namespace TimestampingMode$ {
|
|
30
|
+
/** @deprecated use `TimestampingMode$inboundSchema` instead. */
|
|
31
|
+
export const inboundSchema = TimestampingMode$inboundSchema;
|
|
32
|
+
/** @deprecated use `TimestampingMode$outboundSchema` instead. */
|
|
33
|
+
export const outboundSchema = TimestampingMode$outboundSchema;
|
|
34
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
TimestampingMode,
|
|
11
|
+
TimestampingMode$inboundSchema,
|
|
12
|
+
TimestampingMode$outboundSchema,
|
|
13
|
+
} from "./timestampingmode.js";
|
|
14
|
+
|
|
15
|
+
export type TimestampingReconfiguration = {
|
|
16
|
+
mode?: TimestampingMode | null | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Allow client-specified timestamps to exceed the arrival time.
|
|
19
|
+
*/
|
|
20
|
+
uncapped?: boolean | null | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const TimestampingReconfiguration$inboundSchema: z.ZodType<
|
|
25
|
+
TimestampingReconfiguration,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
mode: z.nullable(TimestampingMode$inboundSchema).optional(),
|
|
30
|
+
uncapped: z.nullable(z.boolean()).optional(),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type TimestampingReconfiguration$Outbound = {
|
|
35
|
+
mode?: string | null | undefined;
|
|
36
|
+
uncapped?: boolean | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const TimestampingReconfiguration$outboundSchema: z.ZodType<
|
|
41
|
+
TimestampingReconfiguration$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
TimestampingReconfiguration
|
|
44
|
+
> = z.object({
|
|
45
|
+
mode: z.nullable(TimestampingMode$outboundSchema).optional(),
|
|
46
|
+
uncapped: z.nullable(z.boolean()).optional(),
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
|
+
*/
|
|
53
|
+
export namespace TimestampingReconfiguration$ {
|
|
54
|
+
/** @deprecated use `TimestampingReconfiguration$inboundSchema` instead. */
|
|
55
|
+
export const inboundSchema = TimestampingReconfiguration$inboundSchema;
|
|
56
|
+
/** @deprecated use `TimestampingReconfiguration$outboundSchema` instead. */
|
|
57
|
+
export const outboundSchema = TimestampingReconfiguration$outboundSchema;
|
|
58
|
+
/** @deprecated use `TimestampingReconfiguration$Outbound` instead. */
|
|
59
|
+
export type Outbound = TimestampingReconfiguration$Outbound;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function timestampingReconfigurationToJSON(
|
|
63
|
+
timestampingReconfiguration: TimestampingReconfiguration,
|
|
64
|
+
): string {
|
|
65
|
+
return JSON.stringify(
|
|
66
|
+
TimestampingReconfiguration$outboundSchema.parse(
|
|
67
|
+
timestampingReconfiguration,
|
|
68
|
+
),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function timestampingReconfigurationFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<TimestampingReconfiguration, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => TimestampingReconfiguration$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'TimestampingReconfiguration' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -0,0 +1,249 @@
|
|
|
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 "./sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Sequence number did not match the tail of the stream.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* The expected next sequence number is returned.
|
|
16
|
+
*/
|
|
17
|
+
export type TwoData = {
|
|
18
|
+
/**
|
|
19
|
+
* Sequence number did not match the tail of the stream.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* The expected next sequence number is returned.
|
|
23
|
+
*/
|
|
24
|
+
seqNumMismatch: number;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Sequence number did not match the tail of the stream.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* The expected next sequence number is returned.
|
|
32
|
+
*/
|
|
33
|
+
export class Two extends Error {
|
|
34
|
+
/**
|
|
35
|
+
* Sequence number did not match the tail of the stream.
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* The expected next sequence number is returned.
|
|
39
|
+
*/
|
|
40
|
+
seqNumMismatch: number;
|
|
41
|
+
|
|
42
|
+
/** The original data that was passed to this error instance. */
|
|
43
|
+
data$: TwoData;
|
|
44
|
+
|
|
45
|
+
constructor(err: TwoData) {
|
|
46
|
+
const message = "message" in err && typeof err.message === "string"
|
|
47
|
+
? err.message
|
|
48
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
49
|
+
super(message);
|
|
50
|
+
this.data$ = err;
|
|
51
|
+
|
|
52
|
+
this.seqNumMismatch = err.seqNumMismatch;
|
|
53
|
+
|
|
54
|
+
this.name = "Two";
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Fencing token did not match.
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* The expected fencing token is returned.
|
|
63
|
+
*/
|
|
64
|
+
export type OneData = {
|
|
65
|
+
/**
|
|
66
|
+
* Fencing token did not match.
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* The expected fencing token is returned.
|
|
70
|
+
*/
|
|
71
|
+
fencingTokenMismatch: string;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Fencing token did not match.
|
|
76
|
+
*
|
|
77
|
+
* @remarks
|
|
78
|
+
* The expected fencing token is returned.
|
|
79
|
+
*/
|
|
80
|
+
export class One extends Error {
|
|
81
|
+
/**
|
|
82
|
+
* Fencing token did not match.
|
|
83
|
+
*
|
|
84
|
+
* @remarks
|
|
85
|
+
* The expected fencing token is returned.
|
|
86
|
+
*/
|
|
87
|
+
fencingTokenMismatch: string;
|
|
88
|
+
|
|
89
|
+
/** The original data that was passed to this error instance. */
|
|
90
|
+
data$: OneData;
|
|
91
|
+
|
|
92
|
+
constructor(err: OneData) {
|
|
93
|
+
const message = "message" in err && typeof err.message === "string"
|
|
94
|
+
? err.message
|
|
95
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
96
|
+
super(message);
|
|
97
|
+
this.data$ = err;
|
|
98
|
+
|
|
99
|
+
this.fencingTokenMismatch = err.fencingTokenMismatch;
|
|
100
|
+
|
|
101
|
+
this.name = "One";
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Failure response message when an Append is aborted due to a failed condition.
|
|
107
|
+
*/
|
|
108
|
+
export type AppendConditionFailed = One | Two;
|
|
109
|
+
|
|
110
|
+
/** @internal */
|
|
111
|
+
export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z
|
|
112
|
+
.object({
|
|
113
|
+
SeqNumMismatch: z.number().int(),
|
|
114
|
+
})
|
|
115
|
+
.transform((v) => {
|
|
116
|
+
const remapped = remap$(v, {
|
|
117
|
+
"SeqNumMismatch": "seqNumMismatch",
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
return new Two(remapped);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
/** @internal */
|
|
124
|
+
export type Two$Outbound = {
|
|
125
|
+
SeqNumMismatch: number;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/** @internal */
|
|
129
|
+
export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
|
|
130
|
+
.instanceof(Two)
|
|
131
|
+
.transform(v => v.data$)
|
|
132
|
+
.pipe(
|
|
133
|
+
z.object({
|
|
134
|
+
seqNumMismatch: z.number().int(),
|
|
135
|
+
}).transform((v) => {
|
|
136
|
+
return remap$(v, {
|
|
137
|
+
seqNumMismatch: "SeqNumMismatch",
|
|
138
|
+
});
|
|
139
|
+
}),
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @internal
|
|
144
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
145
|
+
*/
|
|
146
|
+
export namespace Two$ {
|
|
147
|
+
/** @deprecated use `Two$inboundSchema` instead. */
|
|
148
|
+
export const inboundSchema = Two$inboundSchema;
|
|
149
|
+
/** @deprecated use `Two$outboundSchema` instead. */
|
|
150
|
+
export const outboundSchema = Two$outboundSchema;
|
|
151
|
+
/** @deprecated use `Two$Outbound` instead. */
|
|
152
|
+
export type Outbound = Two$Outbound;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** @internal */
|
|
156
|
+
export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
|
|
157
|
+
.object({
|
|
158
|
+
FencingTokenMismatch: z.string(),
|
|
159
|
+
})
|
|
160
|
+
.transform((v) => {
|
|
161
|
+
const remapped = remap$(v, {
|
|
162
|
+
"FencingTokenMismatch": "fencingTokenMismatch",
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
return new One(remapped);
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
/** @internal */
|
|
169
|
+
export type One$Outbound = {
|
|
170
|
+
FencingTokenMismatch: string;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
|
|
175
|
+
.instanceof(One)
|
|
176
|
+
.transform(v => v.data$)
|
|
177
|
+
.pipe(
|
|
178
|
+
z.object({
|
|
179
|
+
fencingTokenMismatch: z.string(),
|
|
180
|
+
}).transform((v) => {
|
|
181
|
+
return remap$(v, {
|
|
182
|
+
fencingTokenMismatch: "FencingTokenMismatch",
|
|
183
|
+
});
|
|
184
|
+
}),
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* @internal
|
|
189
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
190
|
+
*/
|
|
191
|
+
export namespace One$ {
|
|
192
|
+
/** @deprecated use `One$inboundSchema` instead. */
|
|
193
|
+
export const inboundSchema = One$inboundSchema;
|
|
194
|
+
/** @deprecated use `One$outboundSchema` instead. */
|
|
195
|
+
export const outboundSchema = One$outboundSchema;
|
|
196
|
+
/** @deprecated use `One$Outbound` instead. */
|
|
197
|
+
export type Outbound = One$Outbound;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/** @internal */
|
|
201
|
+
export const AppendConditionFailed$inboundSchema: z.ZodType<
|
|
202
|
+
AppendConditionFailed,
|
|
203
|
+
z.ZodTypeDef,
|
|
204
|
+
unknown
|
|
205
|
+
> = z.union([z.lazy(() => One$inboundSchema), z.lazy(() => Two$inboundSchema)]);
|
|
206
|
+
|
|
207
|
+
/** @internal */
|
|
208
|
+
export type AppendConditionFailed$Outbound = One$Outbound | Two$Outbound;
|
|
209
|
+
|
|
210
|
+
/** @internal */
|
|
211
|
+
export const AppendConditionFailed$outboundSchema: z.ZodType<
|
|
212
|
+
AppendConditionFailed$Outbound,
|
|
213
|
+
z.ZodTypeDef,
|
|
214
|
+
AppendConditionFailed
|
|
215
|
+
> = z.union([
|
|
216
|
+
z.lazy(() => One$outboundSchema),
|
|
217
|
+
z.lazy(() => Two$outboundSchema),
|
|
218
|
+
]);
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @internal
|
|
222
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
223
|
+
*/
|
|
224
|
+
export namespace AppendConditionFailed$ {
|
|
225
|
+
/** @deprecated use `AppendConditionFailed$inboundSchema` instead. */
|
|
226
|
+
export const inboundSchema = AppendConditionFailed$inboundSchema;
|
|
227
|
+
/** @deprecated use `AppendConditionFailed$outboundSchema` instead. */
|
|
228
|
+
export const outboundSchema = AppendConditionFailed$outboundSchema;
|
|
229
|
+
/** @deprecated use `AppendConditionFailed$Outbound` instead. */
|
|
230
|
+
export type Outbound = AppendConditionFailed$Outbound;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export function appendConditionFailedToJSON(
|
|
234
|
+
appendConditionFailed: AppendConditionFailed,
|
|
235
|
+
): string {
|
|
236
|
+
return JSON.stringify(
|
|
237
|
+
AppendConditionFailed$outboundSchema.parse(appendConditionFailed),
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export function appendConditionFailedFromJSON(
|
|
242
|
+
jsonString: string,
|
|
243
|
+
): SafeParseResult<AppendConditionFailed, SDKValidationError> {
|
|
244
|
+
return safeParse(
|
|
245
|
+
jsonString,
|
|
246
|
+
(x) => AppendConditionFailed$inboundSchema.parse(JSON.parse(x)),
|
|
247
|
+
`Failed to parse 'AppendConditionFailed' from JSON`,
|
|
248
|
+
);
|
|
249
|
+
}
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
export * from "./apierror.js";
|
|
6
|
+
export * from "./appendconditionfailed.js";
|
|
6
7
|
export * from "./errorresponse.js";
|
|
7
8
|
export * from "./httpclienterrors.js";
|
|
9
|
+
export * from "./notfounderror.js";
|
|
8
10
|
export * from "./retryableerror.js";
|
|
9
11
|
export * from "./sdkvalidationerror.js";
|
|
12
|
+
export * from "./tailresponse.js";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type NotFoundErrorData = {
|
|
8
|
+
error: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export class NotFoundError extends Error {
|
|
12
|
+
error: string;
|
|
13
|
+
|
|
14
|
+
/** The original data that was passed to this error instance. */
|
|
15
|
+
data$: NotFoundErrorData;
|
|
16
|
+
|
|
17
|
+
constructor(err: NotFoundErrorData) {
|
|
18
|
+
const message = err.error || "API error occurred";
|
|
19
|
+
super(message);
|
|
20
|
+
this.data$ = err;
|
|
21
|
+
|
|
22
|
+
this.error = err.error;
|
|
23
|
+
|
|
24
|
+
this.name = "NotFoundError";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const NotFoundError$inboundSchema: z.ZodType<
|
|
30
|
+
NotFoundError,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
error: z.string(),
|
|
35
|
+
})
|
|
36
|
+
.transform((v) => {
|
|
37
|
+
return new NotFoundError(v);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type NotFoundError$Outbound = {
|
|
42
|
+
error: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const NotFoundError$outboundSchema: z.ZodType<
|
|
47
|
+
NotFoundError$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
NotFoundError
|
|
50
|
+
> = z.instanceof(NotFoundError)
|
|
51
|
+
.transform(v => v.data$)
|
|
52
|
+
.pipe(z.object({
|
|
53
|
+
error: z.string(),
|
|
54
|
+
}));
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
59
|
+
*/
|
|
60
|
+
export namespace NotFoundError$ {
|
|
61
|
+
/** @deprecated use `NotFoundError$inboundSchema` instead. */
|
|
62
|
+
export const inboundSchema = NotFoundError$inboundSchema;
|
|
63
|
+
/** @deprecated use `NotFoundError$outboundSchema` instead. */
|
|
64
|
+
export const outboundSchema = NotFoundError$outboundSchema;
|
|
65
|
+
/** @deprecated use `NotFoundError$Outbound` instead. */
|
|
66
|
+
export type Outbound = NotFoundError$Outbound;
|
|
67
|
+
}
|