@s2-dev/streamstore 0.3.9 → 0.3.14
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 +16 -5
- package/index.extras.d.ts.map +1 -1
- package/index.extras.js +89 -26
- 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 +170 -52
- 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
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
-
import * as components from "../components/index.js";
|
|
10
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
9
|
|
|
12
10
|
export const GetStreamConfigServerList = [
|
|
@@ -23,11 +21,6 @@ export type GetStreamConfigRequest = {
|
|
|
23
21
|
stream: string;
|
|
24
22
|
};
|
|
25
23
|
|
|
26
|
-
export type GetStreamConfigResponse = {
|
|
27
|
-
httpMeta: components.HTTPMetadata;
|
|
28
|
-
streamConfig?: components.StreamConfig | undefined;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
24
|
/** @internal */
|
|
32
25
|
export const GetStreamConfigRequest$inboundSchema: z.ZodType<
|
|
33
26
|
GetStreamConfigRequest,
|
|
@@ -81,70 +74,3 @@ export function getStreamConfigRequestFromJSON(
|
|
|
81
74
|
`Failed to parse 'GetStreamConfigRequest' from JSON`,
|
|
82
75
|
);
|
|
83
76
|
}
|
|
84
|
-
|
|
85
|
-
/** @internal */
|
|
86
|
-
export const GetStreamConfigResponse$inboundSchema: z.ZodType<
|
|
87
|
-
GetStreamConfigResponse,
|
|
88
|
-
z.ZodTypeDef,
|
|
89
|
-
unknown
|
|
90
|
-
> = z.object({
|
|
91
|
-
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
92
|
-
StreamConfig: components.StreamConfig$inboundSchema.optional(),
|
|
93
|
-
}).transform((v) => {
|
|
94
|
-
return remap$(v, {
|
|
95
|
-
"HttpMeta": "httpMeta",
|
|
96
|
-
"StreamConfig": "streamConfig",
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
/** @internal */
|
|
101
|
-
export type GetStreamConfigResponse$Outbound = {
|
|
102
|
-
HttpMeta: components.HTTPMetadata$Outbound;
|
|
103
|
-
StreamConfig?: components.StreamConfig$Outbound | undefined;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
/** @internal */
|
|
107
|
-
export const GetStreamConfigResponse$outboundSchema: z.ZodType<
|
|
108
|
-
GetStreamConfigResponse$Outbound,
|
|
109
|
-
z.ZodTypeDef,
|
|
110
|
-
GetStreamConfigResponse
|
|
111
|
-
> = z.object({
|
|
112
|
-
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
113
|
-
streamConfig: components.StreamConfig$outboundSchema.optional(),
|
|
114
|
-
}).transform((v) => {
|
|
115
|
-
return remap$(v, {
|
|
116
|
-
httpMeta: "HttpMeta",
|
|
117
|
-
streamConfig: "StreamConfig",
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* @internal
|
|
123
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
124
|
-
*/
|
|
125
|
-
export namespace GetStreamConfigResponse$ {
|
|
126
|
-
/** @deprecated use `GetStreamConfigResponse$inboundSchema` instead. */
|
|
127
|
-
export const inboundSchema = GetStreamConfigResponse$inboundSchema;
|
|
128
|
-
/** @deprecated use `GetStreamConfigResponse$outboundSchema` instead. */
|
|
129
|
-
export const outboundSchema = GetStreamConfigResponse$outboundSchema;
|
|
130
|
-
/** @deprecated use `GetStreamConfigResponse$Outbound` instead. */
|
|
131
|
-
export type Outbound = GetStreamConfigResponse$Outbound;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export function getStreamConfigResponseToJSON(
|
|
135
|
-
getStreamConfigResponse: GetStreamConfigResponse,
|
|
136
|
-
): string {
|
|
137
|
-
return JSON.stringify(
|
|
138
|
-
GetStreamConfigResponse$outboundSchema.parse(getStreamConfigResponse),
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export function getStreamConfigResponseFromJSON(
|
|
143
|
-
jsonString: string,
|
|
144
|
-
): SafeParseResult<GetStreamConfigResponse, SDKValidationError> {
|
|
145
|
-
return safeParse(
|
|
146
|
-
jsonString,
|
|
147
|
-
(x) => GetStreamConfigResponse$inboundSchema.parse(JSON.parse(x)),
|
|
148
|
-
`Failed to parse 'GetStreamConfigResponse' from JSON`,
|
|
149
|
-
);
|
|
150
|
-
}
|
|
@@ -29,8 +29,7 @@ export type ListBasinsRequest = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export type ListBasinsResponse = {
|
|
32
|
-
|
|
33
|
-
listBasinsResponse?: components.ListBasinsResponse | undefined;
|
|
32
|
+
result: components.ListBasinsResponse;
|
|
34
33
|
};
|
|
35
34
|
|
|
36
35
|
/** @internal */
|
|
@@ -107,19 +106,16 @@ export const ListBasinsResponse$inboundSchema: z.ZodType<
|
|
|
107
106
|
z.ZodTypeDef,
|
|
108
107
|
unknown
|
|
109
108
|
> = z.object({
|
|
110
|
-
|
|
111
|
-
ListBasinsResponse: components.ListBasinsResponse$inboundSchema.optional(),
|
|
109
|
+
Result: components.ListBasinsResponse$inboundSchema,
|
|
112
110
|
}).transform((v) => {
|
|
113
111
|
return remap$(v, {
|
|
114
|
-
"
|
|
115
|
-
"ListBasinsResponse": "listBasinsResponse",
|
|
112
|
+
"Result": "result",
|
|
116
113
|
});
|
|
117
114
|
});
|
|
118
115
|
|
|
119
116
|
/** @internal */
|
|
120
117
|
export type ListBasinsResponse$Outbound = {
|
|
121
|
-
|
|
122
|
-
ListBasinsResponse?: components.ListBasinsResponse$Outbound | undefined;
|
|
118
|
+
Result: components.ListBasinsResponse$Outbound;
|
|
123
119
|
};
|
|
124
120
|
|
|
125
121
|
/** @internal */
|
|
@@ -128,12 +124,10 @@ export const ListBasinsResponse$outboundSchema: z.ZodType<
|
|
|
128
124
|
z.ZodTypeDef,
|
|
129
125
|
ListBasinsResponse
|
|
130
126
|
> = z.object({
|
|
131
|
-
|
|
132
|
-
listBasinsResponse: components.ListBasinsResponse$outboundSchema.optional(),
|
|
127
|
+
result: components.ListBasinsResponse$outboundSchema,
|
|
133
128
|
}).transform((v) => {
|
|
134
129
|
return remap$(v, {
|
|
135
|
-
|
|
136
|
-
listBasinsResponse: "ListBasinsResponse",
|
|
130
|
+
result: "Result",
|
|
137
131
|
});
|
|
138
132
|
});
|
|
139
133
|
|
|
@@ -36,8 +36,7 @@ export type ListStreamsRequest = {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
export type ListStreamsResponse = {
|
|
39
|
-
|
|
40
|
-
listStreamsResponse?: components.ListStreamsResponse | undefined;
|
|
39
|
+
result: components.ListStreamsResponse;
|
|
41
40
|
};
|
|
42
41
|
|
|
43
42
|
/** @internal */
|
|
@@ -114,19 +113,16 @@ export const ListStreamsResponse$inboundSchema: z.ZodType<
|
|
|
114
113
|
z.ZodTypeDef,
|
|
115
114
|
unknown
|
|
116
115
|
> = z.object({
|
|
117
|
-
|
|
118
|
-
ListStreamsResponse: components.ListStreamsResponse$inboundSchema.optional(),
|
|
116
|
+
Result: components.ListStreamsResponse$inboundSchema,
|
|
119
117
|
}).transform((v) => {
|
|
120
118
|
return remap$(v, {
|
|
121
|
-
"
|
|
122
|
-
"ListStreamsResponse": "listStreamsResponse",
|
|
119
|
+
"Result": "result",
|
|
123
120
|
});
|
|
124
121
|
});
|
|
125
122
|
|
|
126
123
|
/** @internal */
|
|
127
124
|
export type ListStreamsResponse$Outbound = {
|
|
128
|
-
|
|
129
|
-
ListStreamsResponse?: components.ListStreamsResponse$Outbound | undefined;
|
|
125
|
+
Result: components.ListStreamsResponse$Outbound;
|
|
130
126
|
};
|
|
131
127
|
|
|
132
128
|
/** @internal */
|
|
@@ -135,12 +131,10 @@ export const ListStreamsResponse$outboundSchema: z.ZodType<
|
|
|
135
131
|
z.ZodTypeDef,
|
|
136
132
|
ListStreamsResponse
|
|
137
133
|
> = z.object({
|
|
138
|
-
|
|
139
|
-
listStreamsResponse: components.ListStreamsResponse$outboundSchema.optional(),
|
|
134
|
+
result: components.ListStreamsResponse$outboundSchema,
|
|
140
135
|
}).transform((v) => {
|
|
141
136
|
return remap$(v, {
|
|
142
|
-
|
|
143
|
-
listStreamsResponse: "ListStreamsResponse",
|
|
137
|
+
result: "Result",
|
|
144
138
|
});
|
|
145
139
|
});
|
|
146
140
|
|
|
@@ -61,11 +61,9 @@ export type ReadRequest = {
|
|
|
61
61
|
stream: string;
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
export type ReadResponse =
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
readResponse?: EventStream<components.ReadResponse> | undefined;
|
|
68
|
-
};
|
|
64
|
+
export type ReadResponse =
|
|
65
|
+
| components.Output
|
|
66
|
+
| EventStream<components.ReadResponse>;
|
|
69
67
|
|
|
70
68
|
/** @internal */
|
|
71
69
|
export const Limit$inboundSchema: z.ZodType<Limit, z.ZodTypeDef, unknown> = z
|
|
@@ -235,10 +233,9 @@ export const ReadResponse$inboundSchema: z.ZodType<
|
|
|
235
233
|
ReadResponse,
|
|
236
234
|
z.ZodTypeDef,
|
|
237
235
|
unknown
|
|
238
|
-
> = z.
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
ReadResponse: z.instanceof(ReadableStream<Uint8Array>).transform(stream => {
|
|
236
|
+
> = z.union([
|
|
237
|
+
components.Output$inboundSchema,
|
|
238
|
+
z.instanceof(ReadableStream<Uint8Array>).transform(stream => {
|
|
242
239
|
return new EventStream({
|
|
243
240
|
stream,
|
|
244
241
|
decoder(rawEvent) {
|
|
@@ -246,38 +243,18 @@ export const ReadResponse$inboundSchema: z.ZodType<
|
|
|
246
243
|
return schema.parse(rawEvent);
|
|
247
244
|
},
|
|
248
245
|
});
|
|
249
|
-
})
|
|
250
|
-
|
|
251
|
-
return remap$(v, {
|
|
252
|
-
"HttpMeta": "httpMeta",
|
|
253
|
-
"Output": "output",
|
|
254
|
-
"ReadResponse": "readResponse",
|
|
255
|
-
});
|
|
256
|
-
});
|
|
246
|
+
}),
|
|
247
|
+
]);
|
|
257
248
|
|
|
258
249
|
/** @internal */
|
|
259
|
-
export type ReadResponse$Outbound =
|
|
260
|
-
HttpMeta: components.HTTPMetadata$Outbound;
|
|
261
|
-
Output?: components.Output$Outbound | undefined;
|
|
262
|
-
ReadResponse?: never | undefined;
|
|
263
|
-
};
|
|
250
|
+
export type ReadResponse$Outbound = components.Output$Outbound | never;
|
|
264
251
|
|
|
265
252
|
/** @internal */
|
|
266
253
|
export const ReadResponse$outboundSchema: z.ZodType<
|
|
267
254
|
ReadResponse$Outbound,
|
|
268
255
|
z.ZodTypeDef,
|
|
269
256
|
ReadResponse
|
|
270
|
-
> = z.
|
|
271
|
-
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
272
|
-
output: components.Output$outboundSchema.optional(),
|
|
273
|
-
readResponse: z.never().optional(),
|
|
274
|
-
}).transform((v) => {
|
|
275
|
-
return remap$(v, {
|
|
276
|
-
httpMeta: "HttpMeta",
|
|
277
|
-
output: "Output",
|
|
278
|
-
readResponse: "ReadResponse",
|
|
279
|
-
});
|
|
280
|
-
});
|
|
257
|
+
> = z.union([components.Output$outboundSchema, z.never()]);
|
|
281
258
|
|
|
282
259
|
/**
|
|
283
260
|
* @internal
|
|
@@ -17,11 +17,6 @@ export type ReconfigureBasinRequest = {
|
|
|
17
17
|
basinConfig: components.BasinConfig;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
export type ReconfigureBasinResponse = {
|
|
21
|
-
httpMeta: components.HTTPMetadata;
|
|
22
|
-
basinConfig?: components.BasinConfig | undefined;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
20
|
/** @internal */
|
|
26
21
|
export const ReconfigureBasinRequest$inboundSchema: z.ZodType<
|
|
27
22
|
ReconfigureBasinRequest,
|
|
@@ -86,70 +81,3 @@ export function reconfigureBasinRequestFromJSON(
|
|
|
86
81
|
`Failed to parse 'ReconfigureBasinRequest' from JSON`,
|
|
87
82
|
);
|
|
88
83
|
}
|
|
89
|
-
|
|
90
|
-
/** @internal */
|
|
91
|
-
export const ReconfigureBasinResponse$inboundSchema: z.ZodType<
|
|
92
|
-
ReconfigureBasinResponse,
|
|
93
|
-
z.ZodTypeDef,
|
|
94
|
-
unknown
|
|
95
|
-
> = z.object({
|
|
96
|
-
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
97
|
-
BasinConfig: components.BasinConfig$inboundSchema.optional(),
|
|
98
|
-
}).transform((v) => {
|
|
99
|
-
return remap$(v, {
|
|
100
|
-
"HttpMeta": "httpMeta",
|
|
101
|
-
"BasinConfig": "basinConfig",
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
/** @internal */
|
|
106
|
-
export type ReconfigureBasinResponse$Outbound = {
|
|
107
|
-
HttpMeta: components.HTTPMetadata$Outbound;
|
|
108
|
-
BasinConfig?: components.BasinConfig$Outbound | undefined;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
/** @internal */
|
|
112
|
-
export const ReconfigureBasinResponse$outboundSchema: z.ZodType<
|
|
113
|
-
ReconfigureBasinResponse$Outbound,
|
|
114
|
-
z.ZodTypeDef,
|
|
115
|
-
ReconfigureBasinResponse
|
|
116
|
-
> = z.object({
|
|
117
|
-
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
118
|
-
basinConfig: components.BasinConfig$outboundSchema.optional(),
|
|
119
|
-
}).transform((v) => {
|
|
120
|
-
return remap$(v, {
|
|
121
|
-
httpMeta: "HttpMeta",
|
|
122
|
-
basinConfig: "BasinConfig",
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @internal
|
|
128
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
129
|
-
*/
|
|
130
|
-
export namespace ReconfigureBasinResponse$ {
|
|
131
|
-
/** @deprecated use `ReconfigureBasinResponse$inboundSchema` instead. */
|
|
132
|
-
export const inboundSchema = ReconfigureBasinResponse$inboundSchema;
|
|
133
|
-
/** @deprecated use `ReconfigureBasinResponse$outboundSchema` instead. */
|
|
134
|
-
export const outboundSchema = ReconfigureBasinResponse$outboundSchema;
|
|
135
|
-
/** @deprecated use `ReconfigureBasinResponse$Outbound` instead. */
|
|
136
|
-
export type Outbound = ReconfigureBasinResponse$Outbound;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export function reconfigureBasinResponseToJSON(
|
|
140
|
-
reconfigureBasinResponse: ReconfigureBasinResponse,
|
|
141
|
-
): string {
|
|
142
|
-
return JSON.stringify(
|
|
143
|
-
ReconfigureBasinResponse$outboundSchema.parse(reconfigureBasinResponse),
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export function reconfigureBasinResponseFromJSON(
|
|
148
|
-
jsonString: string,
|
|
149
|
-
): SafeParseResult<ReconfigureBasinResponse, SDKValidationError> {
|
|
150
|
-
return safeParse(
|
|
151
|
-
jsonString,
|
|
152
|
-
(x) => ReconfigureBasinResponse$inboundSchema.parse(JSON.parse(x)),
|
|
153
|
-
`Failed to parse 'ReconfigureBasinResponse' from JSON`,
|
|
154
|
-
);
|
|
155
|
-
}
|
|
@@ -24,11 +24,6 @@ export type ReconfigureStreamRequest = {
|
|
|
24
24
|
streamConfig: components.StreamConfig;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
export type ReconfigureStreamResponse = {
|
|
28
|
-
httpMeta: components.HTTPMetadata;
|
|
29
|
-
streamConfig?: components.StreamConfig | undefined;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
27
|
/** @internal */
|
|
33
28
|
export const ReconfigureStreamRequest$inboundSchema: z.ZodType<
|
|
34
29
|
ReconfigureStreamRequest,
|
|
@@ -93,70 +88,3 @@ export function reconfigureStreamRequestFromJSON(
|
|
|
93
88
|
`Failed to parse 'ReconfigureStreamRequest' from JSON`,
|
|
94
89
|
);
|
|
95
90
|
}
|
|
96
|
-
|
|
97
|
-
/** @internal */
|
|
98
|
-
export const ReconfigureStreamResponse$inboundSchema: z.ZodType<
|
|
99
|
-
ReconfigureStreamResponse,
|
|
100
|
-
z.ZodTypeDef,
|
|
101
|
-
unknown
|
|
102
|
-
> = z.object({
|
|
103
|
-
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
104
|
-
StreamConfig: components.StreamConfig$inboundSchema.optional(),
|
|
105
|
-
}).transform((v) => {
|
|
106
|
-
return remap$(v, {
|
|
107
|
-
"HttpMeta": "httpMeta",
|
|
108
|
-
"StreamConfig": "streamConfig",
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
/** @internal */
|
|
113
|
-
export type ReconfigureStreamResponse$Outbound = {
|
|
114
|
-
HttpMeta: components.HTTPMetadata$Outbound;
|
|
115
|
-
StreamConfig?: components.StreamConfig$Outbound | undefined;
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
/** @internal */
|
|
119
|
-
export const ReconfigureStreamResponse$outboundSchema: z.ZodType<
|
|
120
|
-
ReconfigureStreamResponse$Outbound,
|
|
121
|
-
z.ZodTypeDef,
|
|
122
|
-
ReconfigureStreamResponse
|
|
123
|
-
> = z.object({
|
|
124
|
-
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
125
|
-
streamConfig: components.StreamConfig$outboundSchema.optional(),
|
|
126
|
-
}).transform((v) => {
|
|
127
|
-
return remap$(v, {
|
|
128
|
-
httpMeta: "HttpMeta",
|
|
129
|
-
streamConfig: "StreamConfig",
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* @internal
|
|
135
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
136
|
-
*/
|
|
137
|
-
export namespace ReconfigureStreamResponse$ {
|
|
138
|
-
/** @deprecated use `ReconfigureStreamResponse$inboundSchema` instead. */
|
|
139
|
-
export const inboundSchema = ReconfigureStreamResponse$inboundSchema;
|
|
140
|
-
/** @deprecated use `ReconfigureStreamResponse$outboundSchema` instead. */
|
|
141
|
-
export const outboundSchema = ReconfigureStreamResponse$outboundSchema;
|
|
142
|
-
/** @deprecated use `ReconfigureStreamResponse$Outbound` instead. */
|
|
143
|
-
export type Outbound = ReconfigureStreamResponse$Outbound;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export function reconfigureStreamResponseToJSON(
|
|
147
|
-
reconfigureStreamResponse: ReconfigureStreamResponse,
|
|
148
|
-
): string {
|
|
149
|
-
return JSON.stringify(
|
|
150
|
-
ReconfigureStreamResponse$outboundSchema.parse(reconfigureStreamResponse),
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export function reconfigureStreamResponseFromJSON(
|
|
155
|
-
jsonString: string,
|
|
156
|
-
): SafeParseResult<ReconfigureStreamResponse, SDKValidationError> {
|
|
157
|
-
return safeParse(
|
|
158
|
-
jsonString,
|
|
159
|
-
(x) => ReconfigureStreamResponse$inboundSchema.parse(JSON.parse(x)),
|
|
160
|
-
`Failed to parse 'ReconfigureStreamResponse' from JSON`,
|
|
161
|
-
);
|
|
162
|
-
}
|
package/src/sdk/account.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { accountGetBasinConfig } from "../funcs/accountGetBasinConfig.js";
|
|
|
8
8
|
import { accountListBasins } from "../funcs/accountListBasins.js";
|
|
9
9
|
import { accountReconfigureBasin } from "../funcs/accountReconfigureBasin.js";
|
|
10
10
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import * as components from "../models/components/index.js";
|
|
11
12
|
import * as operations from "../models/operations/index.js";
|
|
12
13
|
import { unwrapAsync } from "../types/fp.js";
|
|
13
14
|
import { PageIterator, unwrapResultIterator } from "../types/operations.js";
|
|
@@ -33,7 +34,7 @@ export class Account extends ClientSDK {
|
|
|
33
34
|
async getBasinConfig(
|
|
34
35
|
request: operations.GetBasinConfigRequest,
|
|
35
36
|
options?: RequestOptions,
|
|
36
|
-
): Promise<
|
|
37
|
+
): Promise<components.BasinConfig> {
|
|
37
38
|
return unwrapAsync(accountGetBasinConfig(
|
|
38
39
|
this,
|
|
39
40
|
request,
|
|
@@ -47,7 +48,7 @@ export class Account extends ClientSDK {
|
|
|
47
48
|
async createBasin(
|
|
48
49
|
request: operations.CreateBasinRequest,
|
|
49
50
|
options?: RequestOptions,
|
|
50
|
-
): Promise<
|
|
51
|
+
): Promise<components.BasinInfo> {
|
|
51
52
|
return unwrapAsync(accountCreateBasin(
|
|
52
53
|
this,
|
|
53
54
|
request,
|
|
@@ -61,7 +62,7 @@ export class Account extends ClientSDK {
|
|
|
61
62
|
async deleteBasin(
|
|
62
63
|
request: operations.DeleteBasinRequest,
|
|
63
64
|
options?: RequestOptions,
|
|
64
|
-
): Promise<
|
|
65
|
+
): Promise<void> {
|
|
65
66
|
return unwrapAsync(accountDeleteBasin(
|
|
66
67
|
this,
|
|
67
68
|
request,
|
|
@@ -75,7 +76,7 @@ export class Account extends ClientSDK {
|
|
|
75
76
|
async reconfigureBasin(
|
|
76
77
|
request: operations.ReconfigureBasinRequest,
|
|
77
78
|
options?: RequestOptions,
|
|
78
|
-
): Promise<
|
|
79
|
+
): Promise<components.BasinConfig> {
|
|
79
80
|
return unwrapAsync(accountReconfigureBasin(
|
|
80
81
|
this,
|
|
81
82
|
request,
|
package/src/sdk/basin.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { basinGetStreamConfig } from "../funcs/basinGetStreamConfig.js";
|
|
|
8
8
|
import { basinListStreams } from "../funcs/basinListStreams.js";
|
|
9
9
|
import { basinReconfigureStream } from "../funcs/basinReconfigureStream.js";
|
|
10
10
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import * as components from "../models/components/index.js";
|
|
11
12
|
import * as operations from "../models/operations/index.js";
|
|
12
13
|
import { unwrapAsync } from "../types/fp.js";
|
|
13
14
|
import { PageIterator, unwrapResultIterator } from "../types/operations.js";
|
|
@@ -33,7 +34,7 @@ export class Basin extends ClientSDK {
|
|
|
33
34
|
async getStreamConfig(
|
|
34
35
|
request: operations.GetStreamConfigRequest,
|
|
35
36
|
options?: RequestOptions,
|
|
36
|
-
): Promise<
|
|
37
|
+
): Promise<components.StreamConfig> {
|
|
37
38
|
return unwrapAsync(basinGetStreamConfig(
|
|
38
39
|
this,
|
|
39
40
|
request,
|
|
@@ -47,7 +48,7 @@ export class Basin extends ClientSDK {
|
|
|
47
48
|
async createStream(
|
|
48
49
|
request: operations.CreateStreamRequest,
|
|
49
50
|
options?: RequestOptions,
|
|
50
|
-
): Promise<
|
|
51
|
+
): Promise<components.StreamInfo> {
|
|
51
52
|
return unwrapAsync(basinCreateStream(
|
|
52
53
|
this,
|
|
53
54
|
request,
|
|
@@ -61,7 +62,7 @@ export class Basin extends ClientSDK {
|
|
|
61
62
|
async deleteStream(
|
|
62
63
|
request: operations.DeleteStreamRequest,
|
|
63
64
|
options?: RequestOptions,
|
|
64
|
-
): Promise<
|
|
65
|
+
): Promise<void> {
|
|
65
66
|
return unwrapAsync(basinDeleteStream(
|
|
66
67
|
this,
|
|
67
68
|
request,
|
|
@@ -75,7 +76,7 @@ export class Basin extends ClientSDK {
|
|
|
75
76
|
async reconfigureStream(
|
|
76
77
|
request: operations.ReconfigureStreamRequest,
|
|
77
78
|
options?: RequestOptions,
|
|
78
|
-
): Promise<
|
|
79
|
+
): Promise<components.StreamConfig> {
|
|
79
80
|
return unwrapAsync(basinReconfigureStream(
|
|
80
81
|
this,
|
|
81
82
|
request,
|
package/src/sdk/stream.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { streamAppend } from "../funcs/streamAppend.js";
|
|
|
6
6
|
import { streamCheckTail } from "../funcs/streamCheckTail.js";
|
|
7
7
|
import { ReadAcceptEnum, streamRead } from "../funcs/streamRead.js";
|
|
8
8
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import * as components from "../models/components/index.js";
|
|
9
10
|
import * as operations from "../models/operations/index.js";
|
|
10
11
|
import { unwrapAsync } from "../types/fp.js";
|
|
11
12
|
|
|
@@ -38,7 +39,7 @@ export class Stream extends ClientSDK {
|
|
|
38
39
|
async append(
|
|
39
40
|
request: operations.AppendRequest,
|
|
40
41
|
options?: RequestOptions,
|
|
41
|
-
): Promise<
|
|
42
|
+
): Promise<components.AppendOutput> {
|
|
42
43
|
return unwrapAsync(streamAppend(
|
|
43
44
|
this,
|
|
44
45
|
request,
|
|
@@ -55,7 +56,7 @@ export class Stream extends ClientSDK {
|
|
|
55
56
|
async checkTail(
|
|
56
57
|
request: operations.CheckTailRequest,
|
|
57
58
|
options?: RequestOptions,
|
|
58
|
-
): Promise<
|
|
59
|
+
): Promise<components.CheckTailResponse> {
|
|
59
60
|
return unwrapAsync(streamCheckTail(
|
|
60
61
|
this,
|
|
61
62
|
request,
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
export type HTTPMetadata = {
|
|
5
|
-
/**
|
|
6
|
-
* Raw HTTP response; suitable for custom response parsing
|
|
7
|
-
*/
|
|
8
|
-
response: Response;
|
|
9
|
-
/**
|
|
10
|
-
* Raw HTTP request; suitable for debugging
|
|
11
|
-
*/
|
|
12
|
-
request: Request;
|
|
13
|
-
};
|
|
14
|
-
/** @internal */
|
|
15
|
-
export declare const HTTPMetadata$inboundSchema: z.ZodType<HTTPMetadata, z.ZodTypeDef, unknown>;
|
|
16
|
-
/** @internal */
|
|
17
|
-
export type HTTPMetadata$Outbound = {
|
|
18
|
-
Response: never;
|
|
19
|
-
Request: never;
|
|
20
|
-
};
|
|
21
|
-
/** @internal */
|
|
22
|
-
export declare const HTTPMetadata$outboundSchema: z.ZodType<HTTPMetadata$Outbound, z.ZodTypeDef, HTTPMetadata>;
|
|
23
|
-
/**
|
|
24
|
-
* @internal
|
|
25
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
26
|
-
*/
|
|
27
|
-
export declare namespace HTTPMetadata$ {
|
|
28
|
-
/** @deprecated use `HTTPMetadata$inboundSchema` instead. */
|
|
29
|
-
const inboundSchema: z.ZodType<HTTPMetadata, z.ZodTypeDef, unknown>;
|
|
30
|
-
/** @deprecated use `HTTPMetadata$outboundSchema` instead. */
|
|
31
|
-
const outboundSchema: z.ZodType<HTTPMetadata$Outbound, z.ZodTypeDef, HTTPMetadata>;
|
|
32
|
-
/** @deprecated use `HTTPMetadata$Outbound` instead. */
|
|
33
|
-
type Outbound = HTTPMetadata$Outbound;
|
|
34
|
-
}
|
|
35
|
-
export declare function httpMetadataToJSON(httpMetadata: HTTPMetadata): string;
|
|
36
|
-
export declare function httpMetadataFromJSON(jsonString: string): SafeParseResult<HTTPMetadata, SDKValidationError>;
|
|
37
|
-
//# sourceMappingURL=httpmetadata.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"httpmetadata.d.ts","sourceRoot":"","sources":["../../src/models/components/httpmetadata.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAChD,YAAY,EACZ,CAAC,CAAC,UAAU,EACZ,OAAO,CASP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,KAAK,CAAC;IAChB,OAAO,EAAE,KAAK,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,OAAO,CACjD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,YAAY,CAaZ,CAAC;AAEH;;;GAGG;AACH,yBAAiB,aAAa,CAAC;IAC7B,4DAA4D;IACrD,MAAM,aAAa,gDAA6B,CAAC;IACxD,6DAA6D;IACtD,MAAM,cAAc,8DAA8B,CAAC;IAC1D,uDAAuD;IACvD,KAAY,QAAQ,GAAG,qBAAqB,CAAC;CAC9C;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAErE;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAMnD"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.HTTPMetadata$ = exports.HTTPMetadata$outboundSchema = exports.HTTPMetadata$inboundSchema = void 0;
|
|
40
|
-
exports.httpMetadataToJSON = httpMetadataToJSON;
|
|
41
|
-
exports.httpMetadataFromJSON = httpMetadataFromJSON;
|
|
42
|
-
const z = __importStar(require("zod"));
|
|
43
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
44
|
-
const schemas_js_1 = require("../../lib/schemas.js");
|
|
45
|
-
/** @internal */
|
|
46
|
-
exports.HTTPMetadata$inboundSchema = z.object({
|
|
47
|
-
Response: z.instanceof(Response),
|
|
48
|
-
Request: z.instanceof(Request),
|
|
49
|
-
}).transform((v) => {
|
|
50
|
-
return (0, primitives_js_1.remap)(v, {
|
|
51
|
-
"Response": "response",
|
|
52
|
-
"Request": "request",
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
/** @internal */
|
|
56
|
-
exports.HTTPMetadata$outboundSchema = z.object({
|
|
57
|
-
response: z.instanceof(Response).transform(() => {
|
|
58
|
-
throw new Error("Response cannot be serialized");
|
|
59
|
-
}),
|
|
60
|
-
request: z.instanceof(Request).transform(() => {
|
|
61
|
-
throw new Error("Response cannot be serialized");
|
|
62
|
-
}),
|
|
63
|
-
}).transform((v) => {
|
|
64
|
-
return (0, primitives_js_1.remap)(v, {
|
|
65
|
-
response: "Response",
|
|
66
|
-
request: "Request",
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
/**
|
|
70
|
-
* @internal
|
|
71
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
72
|
-
*/
|
|
73
|
-
var HTTPMetadata$;
|
|
74
|
-
(function (HTTPMetadata$) {
|
|
75
|
-
/** @deprecated use `HTTPMetadata$inboundSchema` instead. */
|
|
76
|
-
HTTPMetadata$.inboundSchema = exports.HTTPMetadata$inboundSchema;
|
|
77
|
-
/** @deprecated use `HTTPMetadata$outboundSchema` instead. */
|
|
78
|
-
HTTPMetadata$.outboundSchema = exports.HTTPMetadata$outboundSchema;
|
|
79
|
-
})(HTTPMetadata$ || (exports.HTTPMetadata$ = HTTPMetadata$ = {}));
|
|
80
|
-
function httpMetadataToJSON(httpMetadata) {
|
|
81
|
-
return JSON.stringify(exports.HTTPMetadata$outboundSchema.parse(httpMetadata));
|
|
82
|
-
}
|
|
83
|
-
function httpMetadataFromJSON(jsonString) {
|
|
84
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.HTTPMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HTTPMetadata' from JSON`);
|
|
85
|
-
}
|
|
86
|
-
//# sourceMappingURL=httpmetadata.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"httpmetadata.js","sourceRoot":"","sources":["../../src/models/components/httpmetadata.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEH,gDAEC;AAED,oDAQC;AAlFD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAejD,gBAAgB;AACH,QAAA,0BAA0B,GAInC,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC;IAChC,OAAO,EAAE,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC;CAC/B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,UAAU,EAAE,UAAU;QACtB,SAAS,EAAE,SAAS;KACrB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAQH,gBAAgB;AACH,QAAA,2BAA2B,GAIpC,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE;QAC9C,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC,CAAC;IACF,OAAO,EAAE,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE;QAC5C,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC,CAAC;CACH,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,SAAS;KACnB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,aAAa,CAO7B;AAPD,WAAiB,aAAa;IAC5B,4DAA4D;IAC/C,2BAAa,GAAG,kCAA0B,CAAC;IACxD,6DAA6D;IAChD,4BAAc,GAAG,mCAA2B,CAAC;AAG5D,CAAC,EAPgB,aAAa,6BAAb,aAAa,QAO7B;AAED,SAAgB,kBAAkB,CAAC,YAA0B;IAC3D,OAAO,IAAI,CAAC,SAAS,CAAC,mCAA2B,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,SAAgB,oBAAoB,CAClC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,kCAA0B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtD,0CAA0C,CAC3C,CAAC;AACJ,CAAC"}
|