@s2-dev/streamstore 0.3.8 → 0.3.13
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 +15 -12
- package/docs/sdks/account/README.md +38 -35
- package/docs/sdks/basin/README.md +38 -35
- package/docs/sdks/stream/README.md +22 -27
- package/funcs/accountCreateBasin.d.ts +2 -1
- package/funcs/accountCreateBasin.d.ts.map +1 -1
- package/funcs/accountCreateBasin.js +3 -4
- package/funcs/accountCreateBasin.js.map +1 -1
- package/funcs/accountDeleteBasin.d.ts +1 -1
- package/funcs/accountDeleteBasin.d.ts.map +1 -1
- package/funcs/accountDeleteBasin.js +3 -2
- package/funcs/accountDeleteBasin.js.map +1 -1
- package/funcs/accountGetBasinConfig.d.ts +2 -1
- package/funcs/accountGetBasinConfig.d.ts.map +1 -1
- package/funcs/accountGetBasinConfig.js +3 -4
- package/funcs/accountGetBasinConfig.js.map +1 -1
- package/funcs/accountListBasins.d.ts +1 -1
- package/funcs/accountListBasins.d.ts.map +1 -1
- package/funcs/accountListBasins.js +2 -4
- package/funcs/accountListBasins.js.map +1 -1
- package/funcs/accountReconfigureBasin.d.ts +2 -1
- package/funcs/accountReconfigureBasin.d.ts.map +1 -1
- package/funcs/accountReconfigureBasin.js +3 -4
- package/funcs/accountReconfigureBasin.js.map +1 -1
- package/funcs/basinCreateStream.d.ts +2 -1
- package/funcs/basinCreateStream.d.ts.map +1 -1
- package/funcs/basinCreateStream.js +14 -4
- package/funcs/basinCreateStream.js.map +1 -1
- package/funcs/basinDeleteStream.d.ts +1 -1
- package/funcs/basinDeleteStream.d.ts.map +1 -1
- package/funcs/basinDeleteStream.js +3 -2
- package/funcs/basinDeleteStream.js.map +1 -1
- package/funcs/basinGetStreamConfig.d.ts +2 -1
- package/funcs/basinGetStreamConfig.d.ts.map +1 -1
- package/funcs/basinGetStreamConfig.js +3 -4
- package/funcs/basinGetStreamConfig.js.map +1 -1
- package/funcs/basinListStreams.d.ts +1 -1
- package/funcs/basinListStreams.d.ts.map +1 -1
- package/funcs/basinListStreams.js +3 -3
- package/funcs/basinListStreams.js.map +1 -1
- package/funcs/basinReconfigureStream.d.ts +2 -1
- package/funcs/basinReconfigureStream.d.ts.map +1 -1
- package/funcs/basinReconfigureStream.js +3 -4
- package/funcs/basinReconfigureStream.js.map +1 -1
- package/funcs/streamAppend.d.ts +2 -1
- package/funcs/streamAppend.d.ts.map +1 -1
- package/funcs/streamAppend.js +3 -4
- package/funcs/streamAppend.js.map +1 -1
- package/funcs/streamCheckTail.d.ts +2 -1
- package/funcs/streamCheckTail.d.ts.map +1 -1
- package/funcs/streamCheckTail.js +3 -4
- package/funcs/streamCheckTail.js.map +1 -1
- package/funcs/streamRead.d.ts +1 -1
- package/funcs/streamRead.d.ts.map +1 -1
- package/funcs/streamRead.js +2 -2
- package/funcs/streamRead.js.map +1 -1
- package/index.extras.d.ts +13 -5
- package/index.extras.d.ts.map +1 -1
- package/index.extras.js +68 -29
- package/index.extras.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +2 -2
- package/lib/config.js.map +1 -1
- package/lib/matchers.d.ts +1 -1
- package/lib/matchers.d.ts.map +1 -1
- package/lib/matchers.js +11 -10
- package/lib/matchers.js.map +1 -1
- package/models/components/index.d.ts +0 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +0 -1
- package/models/components/index.js.map +1 -1
- package/models/errors/apierror.d.ts +5 -8
- package/models/errors/apierror.d.ts.map +1 -1
- package/models/errors/apierror.js +9 -3
- package/models/errors/apierror.js.map +1 -1
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/retryableerror.d.ts +31 -0
- package/models/errors/retryableerror.d.ts.map +1 -0
- package/models/errors/retryableerror.js +77 -0
- package/models/errors/retryableerror.js.map +1 -0
- package/models/operations/append.d.ts +0 -27
- package/models/operations/append.d.ts.map +1 -1
- package/models/operations/append.js +1 -40
- package/models/operations/append.js.map +1 -1
- package/models/operations/checktail.d.ts +0 -28
- package/models/operations/checktail.d.ts.map +1 -1
- package/models/operations/checktail.js +1 -42
- package/models/operations/checktail.js.map +1 -1
- package/models/operations/createbasin.d.ts +0 -27
- package/models/operations/createbasin.d.ts.map +1 -1
- package/models/operations/createbasin.js +1 -40
- package/models/operations/createbasin.js.map +1 -1
- package/models/operations/createstream.d.ts +0 -27
- package/models/operations/createstream.d.ts.map +1 -1
- package/models/operations/createstream.js +1 -40
- package/models/operations/createstream.js.map +1 -1
- package/models/operations/deletebasin.d.ts +0 -26
- package/models/operations/deletebasin.d.ts.map +1 -1
- package/models/operations/deletebasin.js +1 -38
- package/models/operations/deletebasin.js.map +1 -1
- package/models/operations/deletestream.d.ts +0 -26
- package/models/operations/deletestream.d.ts.map +1 -1
- package/models/operations/deletestream.js +1 -38
- package/models/operations/deletestream.js.map +1 -1
- package/models/operations/getbasinconfig.d.ts +0 -28
- package/models/operations/getbasinconfig.d.ts.map +1 -1
- package/models/operations/getbasinconfig.js +1 -42
- package/models/operations/getbasinconfig.js.map +1 -1
- package/models/operations/getstreamconfig.d.ts +0 -28
- package/models/operations/getstreamconfig.d.ts.map +1 -1
- package/models/operations/getstreamconfig.js +1 -42
- package/models/operations/getstreamconfig.js.map +1 -1
- package/models/operations/listbasins.d.ts +2 -4
- package/models/operations/listbasins.d.ts.map +1 -1
- package/models/operations/listbasins.js +4 -8
- package/models/operations/listbasins.js.map +1 -1
- package/models/operations/liststreams.d.ts +2 -4
- package/models/operations/liststreams.d.ts.map +1 -1
- package/models/operations/liststreams.js +4 -8
- package/models/operations/liststreams.js.map +1 -1
- package/models/operations/read.d.ts +2 -10
- package/models/operations/read.d.ts.map +1 -1
- package/models/operations/read.js +6 -23
- package/models/operations/read.js.map +1 -1
- package/models/operations/reconfigurebasin.d.ts +0 -27
- package/models/operations/reconfigurebasin.d.ts.map +1 -1
- package/models/operations/reconfigurebasin.js +1 -40
- package/models/operations/reconfigurebasin.js.map +1 -1
- package/models/operations/reconfigurestream.d.ts +0 -27
- package/models/operations/reconfigurestream.d.ts.map +1 -1
- package/models/operations/reconfigurestream.js +1 -40
- package/models/operations/reconfigurestream.js.map +1 -1
- package/package.json +1 -1
- package/sdk/account.d.ts +5 -4
- package/sdk/account.d.ts.map +1 -1
- package/sdk/account.js.map +1 -1
- package/sdk/basin.d.ts +5 -4
- package/sdk/basin.d.ts.map +1 -1
- package/sdk/basin.js.map +1 -1
- package/sdk/stream.d.ts +3 -2
- package/sdk/stream.d.ts.map +1 -1
- package/sdk/stream.js.map +1 -1
- package/src/funcs/accountCreateBasin.ts +12 -10
- package/src/funcs/accountDeleteBasin.ts +12 -8
- package/src/funcs/accountGetBasinConfig.ts +12 -10
- package/src/funcs/accountListBasins.ts +11 -9
- package/src/funcs/accountReconfigureBasin.ts +12 -10
- package/src/funcs/basinCreateStream.ts +23 -10
- package/src/funcs/basinDeleteStream.ts +12 -8
- package/src/funcs/basinGetStreamConfig.ts +12 -10
- package/src/funcs/basinListStreams.ts +11 -7
- package/src/funcs/basinReconfigureStream.ts +12 -10
- package/src/funcs/streamAppend.ts +12 -10
- package/src/funcs/streamCheckTail.ts +12 -10
- package/src/funcs/streamRead.ts +10 -7
- package/src/index.extras.ts +145 -54
- package/src/lib/config.ts +3 -2
- package/src/lib/matchers.ts +16 -10
- package/src/models/components/index.ts +0 -1
- package/src/models/errors/apierror.ts +13 -7
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/retryableerror.ts +69 -0
- package/src/models/operations/append.ts +0 -68
- package/src/models/operations/checktail.ts +0 -74
- package/src/models/operations/createbasin.ts +0 -72
- package/src/models/operations/createstream.ts +0 -72
- package/src/models/operations/deletebasin.ts +0 -68
- package/src/models/operations/deletestream.ts +0 -68
- package/src/models/operations/getbasinconfig.ts +0 -74
- package/src/models/operations/getstreamconfig.ts +0 -74
- package/src/models/operations/listbasins.ts +6 -12
- package/src/models/operations/liststreams.ts +6 -12
- package/src/models/operations/read.ts +10 -33
- package/src/models/operations/reconfigurebasin.ts +0 -72
- package/src/models/operations/reconfigurestream.ts +0 -72
- package/src/sdk/account.ts +5 -4
- package/src/sdk/basin.ts +5 -4
- package/src/sdk/stream.ts +3 -2
- package/models/components/httpmetadata.d.ts +0 -37
- package/models/components/httpmetadata.d.ts.map +0 -1
- package/models/components/httpmetadata.js +0 -86
- package/models/components/httpmetadata.js.map +0 -1
- package/src/models/components/httpmetadata.ts +0 -87
|
@@ -10,6 +10,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
10
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
13
14
|
import { APIError } from "../models/errors/apierror.js";
|
|
14
15
|
import {
|
|
15
16
|
ConnectionError,
|
|
@@ -32,9 +33,10 @@ export async function accountCreateBasin(
|
|
|
32
33
|
options?: RequestOptions,
|
|
33
34
|
): Promise<
|
|
34
35
|
Result<
|
|
35
|
-
|
|
36
|
-
| errors.ErrorResponse
|
|
36
|
+
components.BasinInfo,
|
|
37
37
|
| errors.ErrorResponse
|
|
38
|
+
| errors.RetryableError
|
|
39
|
+
| errors.RetryableError
|
|
38
40
|
| APIError
|
|
39
41
|
| SDKValidationError
|
|
40
42
|
| UnexpectedClientError
|
|
@@ -109,7 +111,7 @@ export async function accountCreateBasin(
|
|
|
109
111
|
|
|
110
112
|
const doResult = await client._do(req, {
|
|
111
113
|
context,
|
|
112
|
-
errorCodes: ["400", "401", "409", "4XX", "500", "5XX"],
|
|
114
|
+
errorCodes: ["400", "401", "409", "499", "4XX", "500", "503", "504", "5XX"],
|
|
113
115
|
retryConfig: context.retryConfig,
|
|
114
116
|
retryCodes: context.retryCodes,
|
|
115
117
|
});
|
|
@@ -123,9 +125,10 @@ export async function accountCreateBasin(
|
|
|
123
125
|
};
|
|
124
126
|
|
|
125
127
|
const [result] = await M.match<
|
|
126
|
-
|
|
127
|
-
| errors.ErrorResponse
|
|
128
|
+
components.BasinInfo,
|
|
128
129
|
| errors.ErrorResponse
|
|
130
|
+
| errors.RetryableError
|
|
131
|
+
| errors.RetryableError
|
|
129
132
|
| APIError
|
|
130
133
|
| SDKValidationError
|
|
131
134
|
| UnexpectedClientError
|
|
@@ -134,14 +137,13 @@ export async function accountCreateBasin(
|
|
|
134
137
|
| RequestTimeoutError
|
|
135
138
|
| ConnectionError
|
|
136
139
|
>(
|
|
137
|
-
M.json(201,
|
|
138
|
-
key: "BasinInfo",
|
|
139
|
-
}),
|
|
140
|
+
M.json(201, components.BasinInfo$inboundSchema),
|
|
140
141
|
M.jsonErr([400, 401, 409], errors.ErrorResponse$inboundSchema),
|
|
141
|
-
M.jsonErr(
|
|
142
|
+
M.jsonErr(499, errors.RetryableError$inboundSchema),
|
|
143
|
+
M.jsonErr([500, 503, 504], errors.RetryableError$inboundSchema),
|
|
142
144
|
M.fail("4XX"),
|
|
143
145
|
M.fail("5XX"),
|
|
144
|
-
)(response,
|
|
146
|
+
)(response, { extraFields: responseFields });
|
|
145
147
|
if (!result.ok) {
|
|
146
148
|
return result;
|
|
147
149
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import * as z from "zod";
|
|
5
6
|
import { S2Core } from "../core.js";
|
|
6
7
|
import { encodeSimple } from "../lib/encodings.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
@@ -32,10 +33,11 @@ export async function accountDeleteBasin(
|
|
|
32
33
|
options?: RequestOptions,
|
|
33
34
|
): Promise<
|
|
34
35
|
Result<
|
|
35
|
-
|
|
36
|
+
void,
|
|
36
37
|
| errors.ErrorResponse
|
|
37
38
|
| errors.NotFoundError
|
|
38
|
-
| errors.
|
|
39
|
+
| errors.RetryableError
|
|
40
|
+
| errors.RetryableError
|
|
39
41
|
| APIError
|
|
40
42
|
| SDKValidationError
|
|
41
43
|
| UnexpectedClientError
|
|
@@ -102,7 +104,7 @@ export async function accountDeleteBasin(
|
|
|
102
104
|
|
|
103
105
|
const doResult = await client._do(req, {
|
|
104
106
|
context,
|
|
105
|
-
errorCodes: ["400", "401", "404", "4XX", "500", "5XX"],
|
|
107
|
+
errorCodes: ["400", "401", "404", "499", "4XX", "500", "503", "504", "5XX"],
|
|
106
108
|
retryConfig: context.retryConfig,
|
|
107
109
|
retryCodes: context.retryCodes,
|
|
108
110
|
});
|
|
@@ -116,10 +118,11 @@ export async function accountDeleteBasin(
|
|
|
116
118
|
};
|
|
117
119
|
|
|
118
120
|
const [result] = await M.match<
|
|
119
|
-
|
|
121
|
+
void,
|
|
120
122
|
| errors.ErrorResponse
|
|
121
123
|
| errors.NotFoundError
|
|
122
|
-
| errors.
|
|
124
|
+
| errors.RetryableError
|
|
125
|
+
| errors.RetryableError
|
|
123
126
|
| APIError
|
|
124
127
|
| SDKValidationError
|
|
125
128
|
| UnexpectedClientError
|
|
@@ -128,13 +131,14 @@ export async function accountDeleteBasin(
|
|
|
128
131
|
| RequestTimeoutError
|
|
129
132
|
| ConnectionError
|
|
130
133
|
>(
|
|
131
|
-
M.nil(202,
|
|
134
|
+
M.nil(202, z.void()),
|
|
132
135
|
M.jsonErr([400, 401], errors.ErrorResponse$inboundSchema),
|
|
133
136
|
M.jsonErr(404, errors.NotFoundError$inboundSchema),
|
|
134
|
-
M.jsonErr(
|
|
137
|
+
M.jsonErr(499, errors.RetryableError$inboundSchema),
|
|
138
|
+
M.jsonErr([500, 503, 504], errors.RetryableError$inboundSchema),
|
|
135
139
|
M.fail("4XX"),
|
|
136
140
|
M.fail("5XX"),
|
|
137
|
-
)(response,
|
|
141
|
+
)(response, { extraFields: responseFields });
|
|
138
142
|
if (!result.ok) {
|
|
139
143
|
return result;
|
|
140
144
|
}
|
|
@@ -10,6 +10,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
10
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
13
14
|
import { APIError } from "../models/errors/apierror.js";
|
|
14
15
|
import {
|
|
15
16
|
ConnectionError,
|
|
@@ -32,9 +33,10 @@ export async function accountGetBasinConfig(
|
|
|
32
33
|
options?: RequestOptions,
|
|
33
34
|
): Promise<
|
|
34
35
|
Result<
|
|
35
|
-
|
|
36
|
-
| errors.ErrorResponse
|
|
36
|
+
components.BasinConfig,
|
|
37
37
|
| errors.ErrorResponse
|
|
38
|
+
| errors.RetryableError
|
|
39
|
+
| errors.RetryableError
|
|
38
40
|
| APIError
|
|
39
41
|
| SDKValidationError
|
|
40
42
|
| UnexpectedClientError
|
|
@@ -101,7 +103,7 @@ export async function accountGetBasinConfig(
|
|
|
101
103
|
|
|
102
104
|
const doResult = await client._do(req, {
|
|
103
105
|
context,
|
|
104
|
-
errorCodes: ["400", "401", "404", "4XX", "500", "5XX"],
|
|
106
|
+
errorCodes: ["400", "401", "404", "499", "4XX", "500", "503", "504", "5XX"],
|
|
105
107
|
retryConfig: context.retryConfig,
|
|
106
108
|
retryCodes: context.retryCodes,
|
|
107
109
|
});
|
|
@@ -115,9 +117,10 @@ export async function accountGetBasinConfig(
|
|
|
115
117
|
};
|
|
116
118
|
|
|
117
119
|
const [result] = await M.match<
|
|
118
|
-
|
|
119
|
-
| errors.ErrorResponse
|
|
120
|
+
components.BasinConfig,
|
|
120
121
|
| errors.ErrorResponse
|
|
122
|
+
| errors.RetryableError
|
|
123
|
+
| errors.RetryableError
|
|
121
124
|
| APIError
|
|
122
125
|
| SDKValidationError
|
|
123
126
|
| UnexpectedClientError
|
|
@@ -126,14 +129,13 @@ export async function accountGetBasinConfig(
|
|
|
126
129
|
| RequestTimeoutError
|
|
127
130
|
| ConnectionError
|
|
128
131
|
>(
|
|
129
|
-
M.json(200,
|
|
130
|
-
key: "BasinConfig",
|
|
131
|
-
}),
|
|
132
|
+
M.json(200, components.BasinConfig$inboundSchema),
|
|
132
133
|
M.jsonErr([400, 401, 404], errors.ErrorResponse$inboundSchema),
|
|
133
|
-
M.jsonErr(
|
|
134
|
+
M.jsonErr(499, errors.RetryableError$inboundSchema),
|
|
135
|
+
M.jsonErr([500, 503, 504], errors.RetryableError$inboundSchema),
|
|
134
136
|
M.fail("4XX"),
|
|
135
137
|
M.fail("5XX"),
|
|
136
|
-
)(response,
|
|
138
|
+
)(response, { extraFields: responseFields });
|
|
137
139
|
if (!result.ok) {
|
|
138
140
|
return result;
|
|
139
141
|
}
|
|
@@ -42,7 +42,8 @@ export async function accountListBasins(
|
|
|
42
42
|
Result<
|
|
43
43
|
operations.ListBasinsResponse,
|
|
44
44
|
| errors.ErrorResponse
|
|
45
|
-
| errors.
|
|
45
|
+
| errors.RetryableError
|
|
46
|
+
| errors.RetryableError
|
|
46
47
|
| APIError
|
|
47
48
|
| SDKValidationError
|
|
48
49
|
| UnexpectedClientError
|
|
@@ -111,7 +112,7 @@ export async function accountListBasins(
|
|
|
111
112
|
|
|
112
113
|
const doResult = await client._do(req, {
|
|
113
114
|
context,
|
|
114
|
-
errorCodes: ["400", "401", "4XX", "500", "5XX"],
|
|
115
|
+
errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
|
|
115
116
|
retryConfig: context.retryConfig,
|
|
116
117
|
retryCodes: context.retryCodes,
|
|
117
118
|
});
|
|
@@ -127,7 +128,8 @@ export async function accountListBasins(
|
|
|
127
128
|
const [result, raw] = await M.match<
|
|
128
129
|
operations.ListBasinsResponse,
|
|
129
130
|
| errors.ErrorResponse
|
|
130
|
-
| errors.
|
|
131
|
+
| errors.RetryableError
|
|
132
|
+
| errors.RetryableError
|
|
131
133
|
| APIError
|
|
132
134
|
| SDKValidationError
|
|
133
135
|
| UnexpectedClientError
|
|
@@ -136,14 +138,13 @@ export async function accountListBasins(
|
|
|
136
138
|
| RequestTimeoutError
|
|
137
139
|
| ConnectionError
|
|
138
140
|
>(
|
|
139
|
-
M.json(200, operations.ListBasinsResponse$inboundSchema, {
|
|
140
|
-
key: "ListBasinsResponse",
|
|
141
|
-
}),
|
|
141
|
+
M.json(200, operations.ListBasinsResponse$inboundSchema, { key: "Result" }),
|
|
142
142
|
M.jsonErr([400, 401], errors.ErrorResponse$inboundSchema),
|
|
143
|
-
M.jsonErr(
|
|
143
|
+
M.jsonErr(499, errors.RetryableError$inboundSchema),
|
|
144
|
+
M.jsonErr([500, 503, 504], errors.RetryableError$inboundSchema),
|
|
144
145
|
M.fail("4XX"),
|
|
145
146
|
M.fail("5XX"),
|
|
146
|
-
)(response,
|
|
147
|
+
)(response, { extraFields: responseFields });
|
|
147
148
|
if (!result.ok) {
|
|
148
149
|
return haltIterator(result);
|
|
149
150
|
}
|
|
@@ -155,7 +156,8 @@ export async function accountListBasins(
|
|
|
155
156
|
Result<
|
|
156
157
|
operations.ListBasinsResponse,
|
|
157
158
|
| errors.ErrorResponse
|
|
158
|
-
| errors.
|
|
159
|
+
| errors.RetryableError
|
|
160
|
+
| errors.RetryableError
|
|
159
161
|
| APIError
|
|
160
162
|
| SDKValidationError
|
|
161
163
|
| UnexpectedClientError
|
|
@@ -10,6 +10,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
10
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
13
14
|
import { APIError } from "../models/errors/apierror.js";
|
|
14
15
|
import {
|
|
15
16
|
ConnectionError,
|
|
@@ -32,9 +33,10 @@ export async function accountReconfigureBasin(
|
|
|
32
33
|
options?: RequestOptions,
|
|
33
34
|
): Promise<
|
|
34
35
|
Result<
|
|
35
|
-
|
|
36
|
-
| errors.ErrorResponse
|
|
36
|
+
components.BasinConfig,
|
|
37
37
|
| errors.ErrorResponse
|
|
38
|
+
| errors.RetryableError
|
|
39
|
+
| errors.RetryableError
|
|
38
40
|
| APIError
|
|
39
41
|
| SDKValidationError
|
|
40
42
|
| UnexpectedClientError
|
|
@@ -102,7 +104,7 @@ export async function accountReconfigureBasin(
|
|
|
102
104
|
|
|
103
105
|
const doResult = await client._do(req, {
|
|
104
106
|
context,
|
|
105
|
-
errorCodes: ["400", "401", "404", "4XX", "500", "5XX"],
|
|
107
|
+
errorCodes: ["400", "401", "404", "499", "4XX", "500", "503", "504", "5XX"],
|
|
106
108
|
retryConfig: context.retryConfig,
|
|
107
109
|
retryCodes: context.retryCodes,
|
|
108
110
|
});
|
|
@@ -116,9 +118,10 @@ export async function accountReconfigureBasin(
|
|
|
116
118
|
};
|
|
117
119
|
|
|
118
120
|
const [result] = await M.match<
|
|
119
|
-
|
|
120
|
-
| errors.ErrorResponse
|
|
121
|
+
components.BasinConfig,
|
|
121
122
|
| errors.ErrorResponse
|
|
123
|
+
| errors.RetryableError
|
|
124
|
+
| errors.RetryableError
|
|
122
125
|
| APIError
|
|
123
126
|
| SDKValidationError
|
|
124
127
|
| UnexpectedClientError
|
|
@@ -127,14 +130,13 @@ export async function accountReconfigureBasin(
|
|
|
127
130
|
| RequestTimeoutError
|
|
128
131
|
| ConnectionError
|
|
129
132
|
>(
|
|
130
|
-
M.json(200,
|
|
131
|
-
key: "BasinConfig",
|
|
132
|
-
}),
|
|
133
|
+
M.json(200, components.BasinConfig$inboundSchema),
|
|
133
134
|
M.jsonErr([400, 401, 404], errors.ErrorResponse$inboundSchema),
|
|
134
|
-
M.jsonErr(
|
|
135
|
+
M.jsonErr(499, errors.RetryableError$inboundSchema),
|
|
136
|
+
M.jsonErr([500, 503, 504], errors.RetryableError$inboundSchema),
|
|
135
137
|
M.fail("4XX"),
|
|
136
138
|
M.fail("5XX"),
|
|
137
|
-
)(response,
|
|
139
|
+
)(response, { extraFields: responseFields });
|
|
138
140
|
if (!result.ok) {
|
|
139
141
|
return result;
|
|
140
142
|
}
|
|
@@ -10,6 +10,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
10
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
13
14
|
import { APIError } from "../models/errors/apierror.js";
|
|
14
15
|
import {
|
|
15
16
|
ConnectionError,
|
|
@@ -33,9 +34,10 @@ export async function basinCreateStream(
|
|
|
33
34
|
options?: RequestOptions,
|
|
34
35
|
): Promise<
|
|
35
36
|
Result<
|
|
36
|
-
|
|
37
|
-
| errors.ErrorResponse
|
|
37
|
+
components.StreamInfo,
|
|
38
38
|
| errors.ErrorResponse
|
|
39
|
+
| errors.RetryableError
|
|
40
|
+
| errors.RetryableError
|
|
39
41
|
| APIError
|
|
40
42
|
| SDKValidationError
|
|
41
43
|
| UnexpectedClientError
|
|
@@ -115,7 +117,18 @@ export async function basinCreateStream(
|
|
|
115
117
|
|
|
116
118
|
const doResult = await client._do(req, {
|
|
117
119
|
context,
|
|
118
|
-
errorCodes: [
|
|
120
|
+
errorCodes: [
|
|
121
|
+
"400",
|
|
122
|
+
"401",
|
|
123
|
+
"404",
|
|
124
|
+
"409",
|
|
125
|
+
"499",
|
|
126
|
+
"4XX",
|
|
127
|
+
"500",
|
|
128
|
+
"503",
|
|
129
|
+
"504",
|
|
130
|
+
"5XX",
|
|
131
|
+
],
|
|
119
132
|
retryConfig: context.retryConfig,
|
|
120
133
|
retryCodes: context.retryCodes,
|
|
121
134
|
});
|
|
@@ -129,9 +142,10 @@ export async function basinCreateStream(
|
|
|
129
142
|
};
|
|
130
143
|
|
|
131
144
|
const [result] = await M.match<
|
|
132
|
-
|
|
133
|
-
| errors.ErrorResponse
|
|
145
|
+
components.StreamInfo,
|
|
134
146
|
| errors.ErrorResponse
|
|
147
|
+
| errors.RetryableError
|
|
148
|
+
| errors.RetryableError
|
|
135
149
|
| APIError
|
|
136
150
|
| SDKValidationError
|
|
137
151
|
| UnexpectedClientError
|
|
@@ -140,14 +154,13 @@ export async function basinCreateStream(
|
|
|
140
154
|
| RequestTimeoutError
|
|
141
155
|
| ConnectionError
|
|
142
156
|
>(
|
|
143
|
-
M.json(201,
|
|
144
|
-
key: "StreamInfo",
|
|
145
|
-
}),
|
|
157
|
+
M.json(201, components.StreamInfo$inboundSchema),
|
|
146
158
|
M.jsonErr([400, 401, 404, 409], errors.ErrorResponse$inboundSchema),
|
|
147
|
-
M.jsonErr(
|
|
159
|
+
M.jsonErr(499, errors.RetryableError$inboundSchema),
|
|
160
|
+
M.jsonErr([500, 503, 504], errors.RetryableError$inboundSchema),
|
|
148
161
|
M.fail("4XX"),
|
|
149
162
|
M.fail("5XX"),
|
|
150
|
-
)(response,
|
|
163
|
+
)(response, { extraFields: responseFields });
|
|
151
164
|
if (!result.ok) {
|
|
152
165
|
return result;
|
|
153
166
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import * as z from "zod";
|
|
5
6
|
import { S2Core } from "../core.js";
|
|
6
7
|
import { encodeSimple } from "../lib/encodings.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
@@ -33,10 +34,11 @@ export async function basinDeleteStream(
|
|
|
33
34
|
options?: RequestOptions,
|
|
34
35
|
): Promise<
|
|
35
36
|
Result<
|
|
36
|
-
|
|
37
|
+
void,
|
|
37
38
|
| errors.ErrorResponse
|
|
38
39
|
| errors.NotFoundError
|
|
39
|
-
| errors.
|
|
40
|
+
| errors.RetryableError
|
|
41
|
+
| errors.RetryableError
|
|
40
42
|
| APIError
|
|
41
43
|
| SDKValidationError
|
|
42
44
|
| UnexpectedClientError
|
|
@@ -108,7 +110,7 @@ export async function basinDeleteStream(
|
|
|
108
110
|
|
|
109
111
|
const doResult = await client._do(req, {
|
|
110
112
|
context,
|
|
111
|
-
errorCodes: ["400", "401", "404", "4XX", "500", "5XX"],
|
|
113
|
+
errorCodes: ["400", "401", "404", "499", "4XX", "500", "503", "504", "5XX"],
|
|
112
114
|
retryConfig: context.retryConfig,
|
|
113
115
|
retryCodes: context.retryCodes,
|
|
114
116
|
});
|
|
@@ -122,10 +124,11 @@ export async function basinDeleteStream(
|
|
|
122
124
|
};
|
|
123
125
|
|
|
124
126
|
const [result] = await M.match<
|
|
125
|
-
|
|
127
|
+
void,
|
|
126
128
|
| errors.ErrorResponse
|
|
127
129
|
| errors.NotFoundError
|
|
128
|
-
| errors.
|
|
130
|
+
| errors.RetryableError
|
|
131
|
+
| errors.RetryableError
|
|
129
132
|
| APIError
|
|
130
133
|
| SDKValidationError
|
|
131
134
|
| UnexpectedClientError
|
|
@@ -134,13 +137,14 @@ export async function basinDeleteStream(
|
|
|
134
137
|
| RequestTimeoutError
|
|
135
138
|
| ConnectionError
|
|
136
139
|
>(
|
|
137
|
-
M.nil(202,
|
|
140
|
+
M.nil(202, z.void()),
|
|
138
141
|
M.jsonErr([400, 401], errors.ErrorResponse$inboundSchema),
|
|
139
142
|
M.jsonErr(404, errors.NotFoundError$inboundSchema),
|
|
140
|
-
M.jsonErr(
|
|
143
|
+
M.jsonErr(499, errors.RetryableError$inboundSchema),
|
|
144
|
+
M.jsonErr([500, 503, 504], errors.RetryableError$inboundSchema),
|
|
141
145
|
M.fail("4XX"),
|
|
142
146
|
M.fail("5XX"),
|
|
143
|
-
)(response,
|
|
147
|
+
)(response, { extraFields: responseFields });
|
|
144
148
|
if (!result.ok) {
|
|
145
149
|
return result;
|
|
146
150
|
}
|
|
@@ -10,6 +10,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
10
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
13
14
|
import { APIError } from "../models/errors/apierror.js";
|
|
14
15
|
import {
|
|
15
16
|
ConnectionError,
|
|
@@ -33,9 +34,10 @@ export async function basinGetStreamConfig(
|
|
|
33
34
|
options?: RequestOptions,
|
|
34
35
|
): Promise<
|
|
35
36
|
Result<
|
|
36
|
-
|
|
37
|
-
| errors.ErrorResponse
|
|
37
|
+
components.StreamConfig,
|
|
38
38
|
| errors.ErrorResponse
|
|
39
|
+
| errors.RetryableError
|
|
40
|
+
| errors.RetryableError
|
|
39
41
|
| APIError
|
|
40
42
|
| SDKValidationError
|
|
41
43
|
| UnexpectedClientError
|
|
@@ -107,7 +109,7 @@ export async function basinGetStreamConfig(
|
|
|
107
109
|
|
|
108
110
|
const doResult = await client._do(req, {
|
|
109
111
|
context,
|
|
110
|
-
errorCodes: ["400", "401", "404", "4XX", "500", "5XX"],
|
|
112
|
+
errorCodes: ["400", "401", "404", "499", "4XX", "500", "503", "504", "5XX"],
|
|
111
113
|
retryConfig: context.retryConfig,
|
|
112
114
|
retryCodes: context.retryCodes,
|
|
113
115
|
});
|
|
@@ -121,9 +123,10 @@ export async function basinGetStreamConfig(
|
|
|
121
123
|
};
|
|
122
124
|
|
|
123
125
|
const [result] = await M.match<
|
|
124
|
-
|
|
125
|
-
| errors.ErrorResponse
|
|
126
|
+
components.StreamConfig,
|
|
126
127
|
| errors.ErrorResponse
|
|
128
|
+
| errors.RetryableError
|
|
129
|
+
| errors.RetryableError
|
|
127
130
|
| APIError
|
|
128
131
|
| SDKValidationError
|
|
129
132
|
| UnexpectedClientError
|
|
@@ -132,14 +135,13 @@ export async function basinGetStreamConfig(
|
|
|
132
135
|
| RequestTimeoutError
|
|
133
136
|
| ConnectionError
|
|
134
137
|
>(
|
|
135
|
-
M.json(200,
|
|
136
|
-
key: "StreamConfig",
|
|
137
|
-
}),
|
|
138
|
+
M.json(200, components.StreamConfig$inboundSchema),
|
|
138
139
|
M.jsonErr([400, 401, 404], errors.ErrorResponse$inboundSchema),
|
|
139
|
-
M.jsonErr(
|
|
140
|
+
M.jsonErr(499, errors.RetryableError$inboundSchema),
|
|
141
|
+
M.jsonErr([500, 503, 504], errors.RetryableError$inboundSchema),
|
|
140
142
|
M.fail("4XX"),
|
|
141
143
|
M.fail("5XX"),
|
|
142
|
-
)(response,
|
|
144
|
+
)(response, { extraFields: responseFields });
|
|
143
145
|
if (!result.ok) {
|
|
144
146
|
return result;
|
|
145
147
|
}
|
|
@@ -43,7 +43,8 @@ export async function basinListStreams(
|
|
|
43
43
|
Result<
|
|
44
44
|
operations.ListStreamsResponse,
|
|
45
45
|
| errors.ErrorResponse
|
|
46
|
-
| errors.
|
|
46
|
+
| errors.RetryableError
|
|
47
|
+
| errors.RetryableError
|
|
47
48
|
| APIError
|
|
48
49
|
| SDKValidationError
|
|
49
50
|
| UnexpectedClientError
|
|
@@ -117,7 +118,7 @@ export async function basinListStreams(
|
|
|
117
118
|
|
|
118
119
|
const doResult = await client._do(req, {
|
|
119
120
|
context,
|
|
120
|
-
errorCodes: ["400", "401", "4XX", "500", "5XX"],
|
|
121
|
+
errorCodes: ["400", "401", "499", "4XX", "500", "503", "504", "5XX"],
|
|
121
122
|
retryConfig: context.retryConfig,
|
|
122
123
|
retryCodes: context.retryCodes,
|
|
123
124
|
});
|
|
@@ -133,7 +134,8 @@ export async function basinListStreams(
|
|
|
133
134
|
const [result, raw] = await M.match<
|
|
134
135
|
operations.ListStreamsResponse,
|
|
135
136
|
| errors.ErrorResponse
|
|
136
|
-
| errors.
|
|
137
|
+
| errors.RetryableError
|
|
138
|
+
| errors.RetryableError
|
|
137
139
|
| APIError
|
|
138
140
|
| SDKValidationError
|
|
139
141
|
| UnexpectedClientError
|
|
@@ -143,13 +145,14 @@ export async function basinListStreams(
|
|
|
143
145
|
| ConnectionError
|
|
144
146
|
>(
|
|
145
147
|
M.json(200, operations.ListStreamsResponse$inboundSchema, {
|
|
146
|
-
key: "
|
|
148
|
+
key: "Result",
|
|
147
149
|
}),
|
|
148
150
|
M.jsonErr([400, 401], errors.ErrorResponse$inboundSchema),
|
|
149
|
-
M.jsonErr(
|
|
151
|
+
M.jsonErr(499, errors.RetryableError$inboundSchema),
|
|
152
|
+
M.jsonErr([500, 503, 504], errors.RetryableError$inboundSchema),
|
|
150
153
|
M.fail("4XX"),
|
|
151
154
|
M.fail("5XX"),
|
|
152
|
-
)(response,
|
|
155
|
+
)(response, { extraFields: responseFields });
|
|
153
156
|
if (!result.ok) {
|
|
154
157
|
return haltIterator(result);
|
|
155
158
|
}
|
|
@@ -161,7 +164,8 @@ export async function basinListStreams(
|
|
|
161
164
|
Result<
|
|
162
165
|
operations.ListStreamsResponse,
|
|
163
166
|
| errors.ErrorResponse
|
|
164
|
-
| errors.
|
|
167
|
+
| errors.RetryableError
|
|
168
|
+
| errors.RetryableError
|
|
165
169
|
| APIError
|
|
166
170
|
| SDKValidationError
|
|
167
171
|
| UnexpectedClientError
|
|
@@ -10,6 +10,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
10
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
13
14
|
import { APIError } from "../models/errors/apierror.js";
|
|
14
15
|
import {
|
|
15
16
|
ConnectionError,
|
|
@@ -33,9 +34,10 @@ export async function basinReconfigureStream(
|
|
|
33
34
|
options?: RequestOptions,
|
|
34
35
|
): Promise<
|
|
35
36
|
Result<
|
|
36
|
-
|
|
37
|
-
| errors.ErrorResponse
|
|
37
|
+
components.StreamConfig,
|
|
38
38
|
| errors.ErrorResponse
|
|
39
|
+
| errors.RetryableError
|
|
40
|
+
| errors.RetryableError
|
|
39
41
|
| APIError
|
|
40
42
|
| SDKValidationError
|
|
41
43
|
| UnexpectedClientError
|
|
@@ -108,7 +110,7 @@ export async function basinReconfigureStream(
|
|
|
108
110
|
|
|
109
111
|
const doResult = await client._do(req, {
|
|
110
112
|
context,
|
|
111
|
-
errorCodes: ["400", "401", "404", "4XX", "500", "5XX"],
|
|
113
|
+
errorCodes: ["400", "401", "404", "499", "4XX", "500", "503", "504", "5XX"],
|
|
112
114
|
retryConfig: context.retryConfig,
|
|
113
115
|
retryCodes: context.retryCodes,
|
|
114
116
|
});
|
|
@@ -122,9 +124,10 @@ export async function basinReconfigureStream(
|
|
|
122
124
|
};
|
|
123
125
|
|
|
124
126
|
const [result] = await M.match<
|
|
125
|
-
|
|
126
|
-
| errors.ErrorResponse
|
|
127
|
+
components.StreamConfig,
|
|
127
128
|
| errors.ErrorResponse
|
|
129
|
+
| errors.RetryableError
|
|
130
|
+
| errors.RetryableError
|
|
128
131
|
| APIError
|
|
129
132
|
| SDKValidationError
|
|
130
133
|
| UnexpectedClientError
|
|
@@ -133,14 +136,13 @@ export async function basinReconfigureStream(
|
|
|
133
136
|
| RequestTimeoutError
|
|
134
137
|
| ConnectionError
|
|
135
138
|
>(
|
|
136
|
-
M.json(200,
|
|
137
|
-
key: "StreamConfig",
|
|
138
|
-
}),
|
|
139
|
+
M.json(200, components.StreamConfig$inboundSchema),
|
|
139
140
|
M.jsonErr([400, 401, 404], errors.ErrorResponse$inboundSchema),
|
|
140
|
-
M.jsonErr(
|
|
141
|
+
M.jsonErr(499, errors.RetryableError$inboundSchema),
|
|
142
|
+
M.jsonErr([500, 503, 504], errors.RetryableError$inboundSchema),
|
|
141
143
|
M.fail("4XX"),
|
|
142
144
|
M.fail("5XX"),
|
|
143
|
-
)(response,
|
|
145
|
+
)(response, { extraFields: responseFields });
|
|
144
146
|
if (!result.ok) {
|
|
145
147
|
return result;
|
|
146
148
|
}
|
|
@@ -10,6 +10,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
10
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
13
14
|
import { APIError } from "../models/errors/apierror.js";
|
|
14
15
|
import {
|
|
15
16
|
ConnectionError,
|
|
@@ -36,9 +37,10 @@ export async function streamAppend(
|
|
|
36
37
|
options?: RequestOptions,
|
|
37
38
|
): Promise<
|
|
38
39
|
Result<
|
|
39
|
-
|
|
40
|
-
| errors.ErrorResponse
|
|
40
|
+
components.AppendOutput,
|
|
41
41
|
| errors.ErrorResponse
|
|
42
|
+
| errors.RetryableError
|
|
43
|
+
| errors.RetryableError
|
|
42
44
|
| APIError
|
|
43
45
|
| SDKValidationError
|
|
44
46
|
| UnexpectedClientError
|
|
@@ -115,7 +117,7 @@ export async function streamAppend(
|
|
|
115
117
|
|
|
116
118
|
const doResult = await client._do(req, {
|
|
117
119
|
context,
|
|
118
|
-
errorCodes: ["400", "401", "404", "4XX", "500", "5XX"],
|
|
120
|
+
errorCodes: ["400", "401", "404", "499", "4XX", "500", "503", "504", "5XX"],
|
|
119
121
|
retryConfig: context.retryConfig,
|
|
120
122
|
retryCodes: context.retryCodes,
|
|
121
123
|
});
|
|
@@ -129,9 +131,10 @@ export async function streamAppend(
|
|
|
129
131
|
};
|
|
130
132
|
|
|
131
133
|
const [result] = await M.match<
|
|
132
|
-
|
|
133
|
-
| errors.ErrorResponse
|
|
134
|
+
components.AppendOutput,
|
|
134
135
|
| errors.ErrorResponse
|
|
136
|
+
| errors.RetryableError
|
|
137
|
+
| errors.RetryableError
|
|
135
138
|
| APIError
|
|
136
139
|
| SDKValidationError
|
|
137
140
|
| UnexpectedClientError
|
|
@@ -140,14 +143,13 @@ export async function streamAppend(
|
|
|
140
143
|
| RequestTimeoutError
|
|
141
144
|
| ConnectionError
|
|
142
145
|
>(
|
|
143
|
-
M.json(200,
|
|
144
|
-
key: "AppendOutput",
|
|
145
|
-
}),
|
|
146
|
+
M.json(200, components.AppendOutput$inboundSchema),
|
|
146
147
|
M.jsonErr([400, 401, 404], errors.ErrorResponse$inboundSchema),
|
|
147
|
-
M.jsonErr(
|
|
148
|
+
M.jsonErr(499, errors.RetryableError$inboundSchema),
|
|
149
|
+
M.jsonErr([500, 503, 504], errors.RetryableError$inboundSchema),
|
|
148
150
|
M.fail("4XX"),
|
|
149
151
|
M.fail("5XX"),
|
|
150
|
-
)(response,
|
|
152
|
+
)(response, { extraFields: responseFields });
|
|
151
153
|
if (!result.ok) {
|
|
152
154
|
return result;
|
|
153
155
|
}
|