@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
|
@@ -8,6 +8,7 @@ Manage basins
|
|
|
8
8
|
### Available Operations
|
|
9
9
|
|
|
10
10
|
* [listBasins](#listbasins) - List basins.
|
|
11
|
+
* [createBasin](#createbasin) - Create a basin.
|
|
11
12
|
* [getBasinConfig](#getbasinconfig) - Get basin config.
|
|
12
13
|
* [createOrReconfigureBasin](#createorreconfigurebasin) - Create or reconfigure a basin.
|
|
13
14
|
* [deleteBasin](#deletebasin) - Delete a basin.
|
|
@@ -87,7 +88,86 @@ run();
|
|
|
87
88
|
|
|
88
89
|
| Error Type | Status Code | Content Type |
|
|
89
90
|
| --------------------- | --------------------- | --------------------- |
|
|
90
|
-
| errors.ErrorResponse | 400,
|
|
91
|
+
| errors.ErrorResponse | 400, 403 | application/json |
|
|
92
|
+
| errors.RetryableError | 499 | application/json |
|
|
93
|
+
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
94
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
95
|
+
|
|
96
|
+
## createBasin
|
|
97
|
+
|
|
98
|
+
Create a basin.
|
|
99
|
+
|
|
100
|
+
### Example Usage
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
import { S2 } from "@s2-dev/streamstore";
|
|
104
|
+
|
|
105
|
+
const s2 = new S2({
|
|
106
|
+
accessToken: process.env["S2_ACCESS_TOKEN"] ?? "",
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
async function run() {
|
|
110
|
+
const result = await s2.basins.createBasin({
|
|
111
|
+
basin: "<value>",
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// Handle the result
|
|
115
|
+
console.log(result);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
run();
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Standalone function
|
|
122
|
+
|
|
123
|
+
The standalone function version of this method:
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
import { S2Core } from "@s2-dev/streamstore/core.js";
|
|
127
|
+
import { basinsCreateBasin } from "@s2-dev/streamstore/funcs/basinsCreateBasin.js";
|
|
128
|
+
|
|
129
|
+
// Use `S2Core` for best tree-shaking performance.
|
|
130
|
+
// You can create one instance of it to use across an application.
|
|
131
|
+
const s2 = new S2Core({
|
|
132
|
+
accessToken: process.env["S2_ACCESS_TOKEN"] ?? "",
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
async function run() {
|
|
136
|
+
const res = await basinsCreateBasin(s2, {
|
|
137
|
+
basin: "<value>",
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
if (!res.ok) {
|
|
141
|
+
throw res.error;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const { value: result } = res;
|
|
145
|
+
|
|
146
|
+
// Handle the result
|
|
147
|
+
console.log(result);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
run();
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Parameters
|
|
154
|
+
|
|
155
|
+
| Parameter | Type | Required | Description |
|
|
156
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
157
|
+
| `request` | [components.CreateBasinRequest](../../models/components/createbasinrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
158
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
159
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
160
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
161
|
+
|
|
162
|
+
### Response
|
|
163
|
+
|
|
164
|
+
**Promise\<[components.BasinInfo](../../models/components/basininfo.md)\>**
|
|
165
|
+
|
|
166
|
+
### Errors
|
|
167
|
+
|
|
168
|
+
| Error Type | Status Code | Content Type |
|
|
169
|
+
| --------------------- | --------------------- | --------------------- |
|
|
170
|
+
| errors.ErrorResponse | 400, 401, 403, 409 | application/json |
|
|
91
171
|
| errors.RetryableError | 499 | application/json |
|
|
92
172
|
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
93
173
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -166,7 +246,7 @@ run();
|
|
|
166
246
|
|
|
167
247
|
| Error Type | Status Code | Content Type |
|
|
168
248
|
| --------------------- | --------------------- | --------------------- |
|
|
169
|
-
| errors.ErrorResponse | 400,
|
|
249
|
+
| errors.ErrorResponse | 400, 403, 404 | application/json |
|
|
170
250
|
| errors.RetryableError | 499 | application/json |
|
|
171
251
|
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
172
252
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -187,7 +267,6 @@ const s2 = new S2({
|
|
|
187
267
|
async function run() {
|
|
188
268
|
const result = await s2.basins.createOrReconfigureBasin({
|
|
189
269
|
basin: "<value>",
|
|
190
|
-
createBasinRequest: {},
|
|
191
270
|
});
|
|
192
271
|
|
|
193
272
|
// Handle the result
|
|
@@ -214,7 +293,6 @@ const s2 = new S2Core({
|
|
|
214
293
|
async function run() {
|
|
215
294
|
const res = await basinsCreateOrReconfigureBasin(s2, {
|
|
216
295
|
basin: "<value>",
|
|
217
|
-
createBasinRequest: {},
|
|
218
296
|
});
|
|
219
297
|
|
|
220
298
|
if (!res.ok) {
|
|
@@ -247,7 +325,7 @@ run();
|
|
|
247
325
|
|
|
248
326
|
| Error Type | Status Code | Content Type |
|
|
249
327
|
| --------------------- | --------------------- | --------------------- |
|
|
250
|
-
| errors.ErrorResponse | 400
|
|
328
|
+
| errors.ErrorResponse | 400 | application/json |
|
|
251
329
|
| errors.RetryableError | 499 | application/json |
|
|
252
330
|
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
253
331
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -324,7 +402,8 @@ run();
|
|
|
324
402
|
|
|
325
403
|
| Error Type | Status Code | Content Type |
|
|
326
404
|
| --------------------- | --------------------- | --------------------- |
|
|
327
|
-
| errors.ErrorResponse | 400, 401
|
|
405
|
+
| errors.ErrorResponse | 400, 401, 403 | application/json |
|
|
406
|
+
| errors.NotFoundError | 404 | application/json |
|
|
328
407
|
| errors.RetryableError | 499 | application/json |
|
|
329
408
|
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
330
409
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -405,7 +484,7 @@ run();
|
|
|
405
484
|
|
|
406
485
|
| Error Type | Status Code | Content Type |
|
|
407
486
|
| --------------------- | --------------------- | --------------------- |
|
|
408
|
-
| errors.ErrorResponse | 400,
|
|
487
|
+
| errors.ErrorResponse | 400, 403, 404 | application/json |
|
|
409
488
|
| errors.RetryableError | 499 | application/json |
|
|
410
489
|
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
411
490
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# Records
|
|
2
|
+
(*records*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
Manage records
|
|
7
|
+
|
|
8
|
+
### Available Operations
|
|
9
|
+
|
|
10
|
+
* [read](#read) - Retrieve records.
|
|
11
|
+
* [append](#append) - Append records.
|
|
12
|
+
* [checkTail](#checktail) - Check the tail.
|
|
13
|
+
|
|
14
|
+
## read
|
|
15
|
+
|
|
16
|
+
Retrieve a batch of records, or set `Accept: text/event-stream` to stream using server-sent events.
|
|
17
|
+
|
|
18
|
+
### Example Usage
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { S2 } from "@s2-dev/streamstore";
|
|
22
|
+
|
|
23
|
+
const s2 = new S2({
|
|
24
|
+
accessToken: process.env["S2_ACCESS_TOKEN"] ?? "",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
async function run() {
|
|
28
|
+
const result = await s2.records.read({
|
|
29
|
+
stream: "<value>",
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
for await (const event of result) {
|
|
33
|
+
// Handle the event
|
|
34
|
+
console.log(event);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
run();
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Standalone function
|
|
42
|
+
|
|
43
|
+
The standalone function version of this method:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import { S2Core } from "@s2-dev/streamstore/core.js";
|
|
47
|
+
import { recordsRead } from "@s2-dev/streamstore/funcs/recordsRead.js";
|
|
48
|
+
|
|
49
|
+
// Use `S2Core` for best tree-shaking performance.
|
|
50
|
+
// You can create one instance of it to use across an application.
|
|
51
|
+
const s2 = new S2Core({
|
|
52
|
+
accessToken: process.env["S2_ACCESS_TOKEN"] ?? "",
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
async function run() {
|
|
56
|
+
const res = await recordsRead(s2, {
|
|
57
|
+
stream: "<value>",
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
if (!res.ok) {
|
|
61
|
+
throw res.error;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const { value: result } = res;
|
|
65
|
+
|
|
66
|
+
for await (const event of result) {
|
|
67
|
+
// Handle the event
|
|
68
|
+
console.log(event);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
run();
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Parameters
|
|
76
|
+
|
|
77
|
+
| Parameter | Type | Required | Description |
|
|
78
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
79
|
+
| `request` | [operations.ReadRequest](../../models/operations/readrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
80
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
81
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
82
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
83
|
+
| `options.serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
|
84
|
+
|
|
85
|
+
### Response
|
|
86
|
+
|
|
87
|
+
**Promise\<[operations.ReadResponse](../../models/operations/readresponse.md)\>**
|
|
88
|
+
|
|
89
|
+
### Errors
|
|
90
|
+
|
|
91
|
+
| Error Type | Status Code | Content Type |
|
|
92
|
+
| --------------------- | --------------------- | --------------------- |
|
|
93
|
+
| errors.ErrorResponse | 400, 401, 404, 409 | application/json |
|
|
94
|
+
| errors.TailResponse | 416 | application/json |
|
|
95
|
+
| errors.RetryableError | 499 | application/json |
|
|
96
|
+
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
97
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
98
|
+
|
|
99
|
+
## append
|
|
100
|
+
|
|
101
|
+
Append a batch of records to a stream.
|
|
102
|
+
|
|
103
|
+
### Example Usage
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
import { S2 } from "@s2-dev/streamstore";
|
|
107
|
+
|
|
108
|
+
const s2 = new S2({
|
|
109
|
+
accessToken: process.env["S2_ACCESS_TOKEN"] ?? "",
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
async function run() {
|
|
113
|
+
const result = await s2.records.append({
|
|
114
|
+
stream: "<value>",
|
|
115
|
+
appendInput: {
|
|
116
|
+
records: [
|
|
117
|
+
{},
|
|
118
|
+
{},
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// Handle the result
|
|
124
|
+
console.log(result);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
run();
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Standalone function
|
|
131
|
+
|
|
132
|
+
The standalone function version of this method:
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
import { S2Core } from "@s2-dev/streamstore/core.js";
|
|
136
|
+
import { recordsAppend } from "@s2-dev/streamstore/funcs/recordsAppend.js";
|
|
137
|
+
|
|
138
|
+
// Use `S2Core` for best tree-shaking performance.
|
|
139
|
+
// You can create one instance of it to use across an application.
|
|
140
|
+
const s2 = new S2Core({
|
|
141
|
+
accessToken: process.env["S2_ACCESS_TOKEN"] ?? "",
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
async function run() {
|
|
145
|
+
const res = await recordsAppend(s2, {
|
|
146
|
+
stream: "<value>",
|
|
147
|
+
appendInput: {
|
|
148
|
+
records: [
|
|
149
|
+
{},
|
|
150
|
+
{},
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
if (!res.ok) {
|
|
156
|
+
throw res.error;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const { value: result } = res;
|
|
160
|
+
|
|
161
|
+
// Handle the result
|
|
162
|
+
console.log(result);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
run();
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Parameters
|
|
169
|
+
|
|
170
|
+
| Parameter | Type | Required | Description |
|
|
171
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
172
|
+
| `request` | [operations.AppendRequest](../../models/operations/appendrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
173
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
174
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
175
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
176
|
+
| `options.serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
|
177
|
+
|
|
178
|
+
### Response
|
|
179
|
+
|
|
180
|
+
**Promise\<[components.AppendAck](../../models/components/appendack.md)\>**
|
|
181
|
+
|
|
182
|
+
### Errors
|
|
183
|
+
|
|
184
|
+
| Error Type | Status Code | Content Type |
|
|
185
|
+
| --------------------- | --------------------- | --------------------- |
|
|
186
|
+
| errors.ErrorResponse | 400, 401, 404, 409 | application/json |
|
|
187
|
+
| errors.One | 412 | application/json |
|
|
188
|
+
| errors.Two | 412 | application/json |
|
|
189
|
+
| errors.RetryableError | 499 | application/json |
|
|
190
|
+
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
191
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
192
|
+
|
|
193
|
+
## checkTail
|
|
194
|
+
|
|
195
|
+
Check the tail of a stream.
|
|
196
|
+
|
|
197
|
+
### Example Usage
|
|
198
|
+
|
|
199
|
+
```typescript
|
|
200
|
+
import { S2 } from "@s2-dev/streamstore";
|
|
201
|
+
|
|
202
|
+
const s2 = new S2({
|
|
203
|
+
accessToken: process.env["S2_ACCESS_TOKEN"] ?? "",
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
async function run() {
|
|
207
|
+
const result = await s2.records.checkTail({
|
|
208
|
+
stream: "<value>",
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
// Handle the result
|
|
212
|
+
console.log(result);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
run();
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Standalone function
|
|
219
|
+
|
|
220
|
+
The standalone function version of this method:
|
|
221
|
+
|
|
222
|
+
```typescript
|
|
223
|
+
import { S2Core } from "@s2-dev/streamstore/core.js";
|
|
224
|
+
import { recordsCheckTail } from "@s2-dev/streamstore/funcs/recordsCheckTail.js";
|
|
225
|
+
|
|
226
|
+
// Use `S2Core` for best tree-shaking performance.
|
|
227
|
+
// You can create one instance of it to use across an application.
|
|
228
|
+
const s2 = new S2Core({
|
|
229
|
+
accessToken: process.env["S2_ACCESS_TOKEN"] ?? "",
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
async function run() {
|
|
233
|
+
const res = await recordsCheckTail(s2, {
|
|
234
|
+
stream: "<value>",
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
if (!res.ok) {
|
|
238
|
+
throw res.error;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const { value: result } = res;
|
|
242
|
+
|
|
243
|
+
// Handle the result
|
|
244
|
+
console.log(result);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
run();
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Parameters
|
|
251
|
+
|
|
252
|
+
| Parameter | Type | Required | Description |
|
|
253
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
254
|
+
| `request` | [operations.CheckTailRequest](../../models/operations/checktailrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
255
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
256
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
257
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
258
|
+
| `options.serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
|
259
|
+
|
|
260
|
+
### Response
|
|
261
|
+
|
|
262
|
+
**Promise\<[components.TailResponse](../../models/components/tailresponse.md)\>**
|
|
263
|
+
|
|
264
|
+
### Errors
|
|
265
|
+
|
|
266
|
+
| Error Type | Status Code | Content Type |
|
|
267
|
+
| --------------------- | --------------------- | --------------------- |
|
|
268
|
+
| errors.ErrorResponse | 400, 401, 404, 409 | application/json |
|
|
269
|
+
| errors.RetryableError | 499 | application/json |
|
|
270
|
+
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
271
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -8,6 +8,7 @@ Manage streams
|
|
|
8
8
|
### Available Operations
|
|
9
9
|
|
|
10
10
|
* [listStreams](#liststreams) - List streams.
|
|
11
|
+
* [createStream](#createstream) - Create a stream.
|
|
11
12
|
* [getStreamConfig](#getstreamconfig) - Get stream configuration.
|
|
12
13
|
* [createOrReconfigureStream](#createorreconfigurestream) - Create or reconfigure a stream.
|
|
13
14
|
* [deleteStream](#deletestream) - Delete a stream.
|
|
@@ -88,7 +89,87 @@ run();
|
|
|
88
89
|
|
|
89
90
|
| Error Type | Status Code | Content Type |
|
|
90
91
|
| --------------------- | --------------------- | --------------------- |
|
|
91
|
-
| errors.ErrorResponse | 400,
|
|
92
|
+
| errors.ErrorResponse | 400, 403, 404 | application/json |
|
|
93
|
+
| errors.RetryableError | 499 | application/json |
|
|
94
|
+
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
95
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
96
|
+
|
|
97
|
+
## createStream
|
|
98
|
+
|
|
99
|
+
Create a stream.
|
|
100
|
+
|
|
101
|
+
### Example Usage
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
import { S2 } from "@s2-dev/streamstore";
|
|
105
|
+
|
|
106
|
+
const s2 = new S2({
|
|
107
|
+
accessToken: process.env["S2_ACCESS_TOKEN"] ?? "",
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
async function run() {
|
|
111
|
+
const result = await s2.streams.createStream({
|
|
112
|
+
stream: "<value>",
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// Handle the result
|
|
116
|
+
console.log(result);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
run();
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Standalone function
|
|
123
|
+
|
|
124
|
+
The standalone function version of this method:
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
import { S2Core } from "@s2-dev/streamstore/core.js";
|
|
128
|
+
import { streamsCreateStream } from "@s2-dev/streamstore/funcs/streamsCreateStream.js";
|
|
129
|
+
|
|
130
|
+
// Use `S2Core` for best tree-shaking performance.
|
|
131
|
+
// You can create one instance of it to use across an application.
|
|
132
|
+
const s2 = new S2Core({
|
|
133
|
+
accessToken: process.env["S2_ACCESS_TOKEN"] ?? "",
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
async function run() {
|
|
137
|
+
const res = await streamsCreateStream(s2, {
|
|
138
|
+
stream: "<value>",
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
if (!res.ok) {
|
|
142
|
+
throw res.error;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const { value: result } = res;
|
|
146
|
+
|
|
147
|
+
// Handle the result
|
|
148
|
+
console.log(result);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
run();
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Parameters
|
|
155
|
+
|
|
156
|
+
| Parameter | Type | Required | Description |
|
|
157
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
158
|
+
| `request` | [components.CreateStreamRequest](../../models/components/createstreamrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
159
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
160
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
161
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
162
|
+
| `options.serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. |
|
|
163
|
+
|
|
164
|
+
### Response
|
|
165
|
+
|
|
166
|
+
**Promise\<[components.StreamInfo](../../models/components/streaminfo.md)\>**
|
|
167
|
+
|
|
168
|
+
### Errors
|
|
169
|
+
|
|
170
|
+
| Error Type | Status Code | Content Type |
|
|
171
|
+
| --------------------- | --------------------- | --------------------- |
|
|
172
|
+
| errors.ErrorResponse | 400, 403, 404, 409 | application/json |
|
|
92
173
|
| errors.RetryableError | 499 | application/json |
|
|
93
174
|
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
94
175
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -168,7 +249,7 @@ run();
|
|
|
168
249
|
|
|
169
250
|
| Error Type | Status Code | Content Type |
|
|
170
251
|
| --------------------- | --------------------- | --------------------- |
|
|
171
|
-
| errors.ErrorResponse | 400,
|
|
252
|
+
| errors.ErrorResponse | 400, 403, 404, 409 | application/json |
|
|
172
253
|
| errors.RetryableError | 499 | application/json |
|
|
173
254
|
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
174
255
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -189,7 +270,6 @@ const s2 = new S2({
|
|
|
189
270
|
async function run() {
|
|
190
271
|
const result = await s2.streams.createOrReconfigureStream({
|
|
191
272
|
stream: "<value>",
|
|
192
|
-
streamConfig: {},
|
|
193
273
|
});
|
|
194
274
|
|
|
195
275
|
// Handle the result
|
|
@@ -216,7 +296,6 @@ const s2 = new S2Core({
|
|
|
216
296
|
async function run() {
|
|
217
297
|
const res = await streamsCreateOrReconfigureStream(s2, {
|
|
218
298
|
stream: "<value>",
|
|
219
|
-
streamConfig: {},
|
|
220
299
|
});
|
|
221
300
|
|
|
222
301
|
if (!res.ok) {
|
|
@@ -250,7 +329,7 @@ run();
|
|
|
250
329
|
|
|
251
330
|
| Error Type | Status Code | Content Type |
|
|
252
331
|
| --------------------- | --------------------- | --------------------- |
|
|
253
|
-
| errors.ErrorResponse | 400,
|
|
332
|
+
| errors.ErrorResponse | 400, 403, 404, 409 | application/json |
|
|
254
333
|
| errors.RetryableError | 499 | application/json |
|
|
255
334
|
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
256
335
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -328,7 +407,8 @@ run();
|
|
|
328
407
|
|
|
329
408
|
| Error Type | Status Code | Content Type |
|
|
330
409
|
| --------------------- | --------------------- | --------------------- |
|
|
331
|
-
| errors.ErrorResponse | 400,
|
|
410
|
+
| errors.ErrorResponse | 400, 403 | application/json |
|
|
411
|
+
| errors.NotFoundError | 404 | application/json |
|
|
332
412
|
| errors.RetryableError | 499 | application/json |
|
|
333
413
|
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
334
414
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -410,7 +490,7 @@ run();
|
|
|
410
490
|
|
|
411
491
|
| Error Type | Status Code | Content Type |
|
|
412
492
|
| --------------------- | --------------------- | --------------------- |
|
|
413
|
-
| errors.ErrorResponse | 400,
|
|
493
|
+
| errors.ErrorResponse | 400, 403, 404, 409 | application/json |
|
|
414
494
|
| errors.RetryableError | 499 | application/json |
|
|
415
495
|
| errors.RetryableError | 500, 503, 504 | application/json |
|
|
416
496
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
package/jsr.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
{
|
|
4
4
|
"name": "@s2-dev/streamstore",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.12.0",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./src/index.ts",
|
|
8
8
|
"./models/errors": "./src/models/errors/index.ts",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"./lib/http": "./src/lib/http.ts",
|
|
13
13
|
"./lib/retries": "./src/lib/retries.ts",
|
|
14
14
|
"./lib/sdks": "./src/lib/sdks.ts",
|
|
15
|
+
"./lib/event-streams": "./src/lib/event-streams.ts",
|
|
15
16
|
"./types": "./src/types/index.ts"
|
|
16
17
|
},
|
|
17
18
|
"publish": {
|
package/package.json
CHANGED
|
@@ -127,7 +127,7 @@ async function $do(
|
|
|
127
127
|
|
|
128
128
|
const doResult = await client._do(req, {
|
|
129
129
|
context,
|
|
130
|
-
errorCodes: ["400", "
|
|
130
|
+
errorCodes: ["400", "403", "409", "499", "4XX", "500", "503", "504", "5XX"],
|
|
131
131
|
retryConfig: context.retryConfig,
|
|
132
132
|
retryCodes: context.retryCodes,
|
|
133
133
|
});
|
|
@@ -154,7 +154,7 @@ async function $do(
|
|
|
154
154
|
| ConnectionError
|
|
155
155
|
>(
|
|
156
156
|
M.json(201, components.IssueAccessTokenResponse$inboundSchema),
|
|
157
|
-
M.jsonErr([400,
|
|
157
|
+
M.jsonErr([400, 403, 409], errors.ErrorResponse$inboundSchema),
|
|
158
158
|
M.jsonErr(499, errors.RetryableError$inboundSchema),
|
|
159
159
|
M.jsonErr([500, 503, 504], errors.RetryableError$inboundSchema),
|
|
160
160
|
M.fail("4XX"),
|
|
@@ -134,7 +134,7 @@ async function $do(
|
|
|
134
134
|
|
|
135
135
|
const doResult = await client._do(req, {
|
|
136
136
|
context,
|
|
137
|
-
errorCodes: ["400", "
|
|
137
|
+
errorCodes: ["400", "403", "499", "4XX", "500", "503", "504", "5XX"],
|
|
138
138
|
retryConfig: context.retryConfig,
|
|
139
139
|
retryCodes: context.retryCodes,
|
|
140
140
|
});
|
|
@@ -161,7 +161,7 @@ async function $do(
|
|
|
161
161
|
| ConnectionError
|
|
162
162
|
>(
|
|
163
163
|
M.json(200, components.ListAccessTokensResponse$inboundSchema),
|
|
164
|
-
M.jsonErr([400,
|
|
164
|
+
M.jsonErr([400, 403], errors.ErrorResponse$inboundSchema),
|
|
165
165
|
M.jsonErr(499, errors.RetryableError$inboundSchema),
|
|
166
166
|
M.jsonErr([500, 503, 504], errors.RetryableError$inboundSchema),
|
|
167
167
|
M.fail("4XX"),
|