@s2-dev/streamstore 0.2.8 → 0.2.11

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.
Files changed (178) hide show
  1. package/README.md +5 -1
  2. package/docs/sdks/account/README.md +11 -8
  3. package/docs/sdks/basin/README.md +11 -8
  4. package/docs/sdks/stream/README.md +12 -4
  5. package/funcs/accountCreateBasin.d.ts +1 -2
  6. package/funcs/accountCreateBasin.d.ts.map +1 -1
  7. package/funcs/accountCreateBasin.js +3 -2
  8. package/funcs/accountCreateBasin.js.map +1 -1
  9. package/funcs/accountDeleteBasin.d.ts +1 -1
  10. package/funcs/accountDeleteBasin.d.ts.map +1 -1
  11. package/funcs/accountDeleteBasin.js +1 -2
  12. package/funcs/accountDeleteBasin.js.map +1 -1
  13. package/funcs/accountGetBasinConfig.d.ts +1 -2
  14. package/funcs/accountGetBasinConfig.d.ts.map +1 -1
  15. package/funcs/accountGetBasinConfig.js +3 -2
  16. package/funcs/accountGetBasinConfig.js.map +1 -1
  17. package/funcs/accountListBasins.d.ts.map +1 -1
  18. package/funcs/accountListBasins.js +3 -1
  19. package/funcs/accountListBasins.js.map +1 -1
  20. package/funcs/accountReconfigureBasin.d.ts +1 -2
  21. package/funcs/accountReconfigureBasin.d.ts.map +1 -1
  22. package/funcs/accountReconfigureBasin.js +3 -2
  23. package/funcs/accountReconfigureBasin.js.map +1 -1
  24. package/funcs/basinCreateStream.d.ts +1 -2
  25. package/funcs/basinCreateStream.d.ts.map +1 -1
  26. package/funcs/basinCreateStream.js +3 -2
  27. package/funcs/basinCreateStream.js.map +1 -1
  28. package/funcs/basinDeleteStream.d.ts +1 -1
  29. package/funcs/basinDeleteStream.d.ts.map +1 -1
  30. package/funcs/basinDeleteStream.js +1 -2
  31. package/funcs/basinDeleteStream.js.map +1 -1
  32. package/funcs/basinGetStreamConfig.d.ts +1 -2
  33. package/funcs/basinGetStreamConfig.d.ts.map +1 -1
  34. package/funcs/basinGetStreamConfig.js +3 -2
  35. package/funcs/basinGetStreamConfig.js.map +1 -1
  36. package/funcs/basinListStreams.js +2 -2
  37. package/funcs/basinListStreams.js.map +1 -1
  38. package/funcs/basinReconfigureStream.d.ts +1 -2
  39. package/funcs/basinReconfigureStream.d.ts.map +1 -1
  40. package/funcs/basinReconfigureStream.js +3 -2
  41. package/funcs/basinReconfigureStream.js.map +1 -1
  42. package/funcs/streamAppend.d.ts +1 -2
  43. package/funcs/streamAppend.d.ts.map +1 -1
  44. package/funcs/streamAppend.js +3 -2
  45. package/funcs/streamAppend.js.map +1 -1
  46. package/funcs/streamCheckTail.d.ts +1 -2
  47. package/funcs/streamCheckTail.d.ts.map +1 -1
  48. package/funcs/streamCheckTail.js +3 -2
  49. package/funcs/streamCheckTail.js.map +1 -1
  50. package/funcs/streamRead.js +1 -1
  51. package/funcs/streamRead.js.map +1 -1
  52. package/jsr.json +1 -1
  53. package/lib/config.d.ts +2 -2
  54. package/lib/config.d.ts.map +1 -1
  55. package/lib/config.js +2 -2
  56. package/lib/config.js.map +1 -1
  57. package/lib/matchers.d.ts +1 -1
  58. package/lib/matchers.d.ts.map +1 -1
  59. package/lib/matchers.js +10 -11
  60. package/lib/matchers.js.map +1 -1
  61. package/models/components/httpmetadata.d.ts +37 -0
  62. package/models/components/httpmetadata.d.ts.map +1 -0
  63. package/models/components/httpmetadata.js +86 -0
  64. package/models/components/httpmetadata.js.map +1 -0
  65. package/models/components/index.d.ts +1 -0
  66. package/models/components/index.d.ts.map +1 -1
  67. package/models/components/index.js +1 -0
  68. package/models/components/index.js.map +1 -1
  69. package/models/errors/apierror.d.ts +8 -5
  70. package/models/errors/apierror.d.ts.map +1 -1
  71. package/models/errors/apierror.js +3 -9
  72. package/models/errors/apierror.js.map +1 -1
  73. package/models/errors/index.d.ts +1 -0
  74. package/models/errors/index.d.ts.map +1 -1
  75. package/models/errors/index.js +1 -0
  76. package/models/errors/index.js.map +1 -1
  77. package/models/errors/notfounderror.d.ts +31 -0
  78. package/models/errors/notfounderror.d.ts.map +1 -0
  79. package/models/errors/notfounderror.js +77 -0
  80. package/models/errors/notfounderror.js.map +1 -0
  81. package/models/operations/append.d.ts +27 -0
  82. package/models/operations/append.d.ts.map +1 -1
  83. package/models/operations/append.js +40 -1
  84. package/models/operations/append.js.map +1 -1
  85. package/models/operations/checktail.d.ts +28 -0
  86. package/models/operations/checktail.d.ts.map +1 -1
  87. package/models/operations/checktail.js +42 -1
  88. package/models/operations/checktail.js.map +1 -1
  89. package/models/operations/createbasin.d.ts +27 -0
  90. package/models/operations/createbasin.d.ts.map +1 -1
  91. package/models/operations/createbasin.js +40 -1
  92. package/models/operations/createbasin.js.map +1 -1
  93. package/models/operations/createstream.d.ts +27 -0
  94. package/models/operations/createstream.d.ts.map +1 -1
  95. package/models/operations/createstream.js +40 -1
  96. package/models/operations/createstream.js.map +1 -1
  97. package/models/operations/deletebasin.d.ts +26 -0
  98. package/models/operations/deletebasin.d.ts.map +1 -1
  99. package/models/operations/deletebasin.js +38 -1
  100. package/models/operations/deletebasin.js.map +1 -1
  101. package/models/operations/deletestream.d.ts +26 -0
  102. package/models/operations/deletestream.d.ts.map +1 -1
  103. package/models/operations/deletestream.js +38 -1
  104. package/models/operations/deletestream.js.map +1 -1
  105. package/models/operations/getbasinconfig.d.ts +28 -0
  106. package/models/operations/getbasinconfig.d.ts.map +1 -1
  107. package/models/operations/getbasinconfig.js +42 -1
  108. package/models/operations/getbasinconfig.js.map +1 -1
  109. package/models/operations/getstreamconfig.d.ts +28 -0
  110. package/models/operations/getstreamconfig.d.ts.map +1 -1
  111. package/models/operations/getstreamconfig.js +42 -1
  112. package/models/operations/getstreamconfig.js.map +1 -1
  113. package/models/operations/listbasins.d.ts +4 -2
  114. package/models/operations/listbasins.d.ts.map +1 -1
  115. package/models/operations/listbasins.js +8 -4
  116. package/models/operations/listbasins.js.map +1 -1
  117. package/models/operations/liststreams.d.ts +4 -2
  118. package/models/operations/liststreams.d.ts.map +1 -1
  119. package/models/operations/liststreams.js +8 -4
  120. package/models/operations/liststreams.js.map +1 -1
  121. package/models/operations/read.d.ts +10 -2
  122. package/models/operations/read.d.ts.map +1 -1
  123. package/models/operations/read.js +23 -6
  124. package/models/operations/read.js.map +1 -1
  125. package/models/operations/reconfigurebasin.d.ts +27 -0
  126. package/models/operations/reconfigurebasin.d.ts.map +1 -1
  127. package/models/operations/reconfigurebasin.js +40 -1
  128. package/models/operations/reconfigurebasin.js.map +1 -1
  129. package/models/operations/reconfigurestream.d.ts +27 -0
  130. package/models/operations/reconfigurestream.d.ts.map +1 -1
  131. package/models/operations/reconfigurestream.js +40 -1
  132. package/models/operations/reconfigurestream.js.map +1 -1
  133. package/package.json +1 -1
  134. package/sdk/account.d.ts +4 -5
  135. package/sdk/account.d.ts.map +1 -1
  136. package/sdk/account.js.map +1 -1
  137. package/sdk/basin.d.ts +4 -5
  138. package/sdk/basin.d.ts.map +1 -1
  139. package/sdk/basin.js.map +1 -1
  140. package/sdk/stream.d.ts +2 -3
  141. package/sdk/stream.d.ts.map +1 -1
  142. package/sdk/stream.js.map +1 -1
  143. package/src/funcs/accountCreateBasin.ts +6 -5
  144. package/src/funcs/accountDeleteBasin.ts +8 -6
  145. package/src/funcs/accountGetBasinConfig.ts +6 -5
  146. package/src/funcs/accountListBasins.ts +4 -2
  147. package/src/funcs/accountReconfigureBasin.ts +6 -5
  148. package/src/funcs/basinCreateStream.ts +6 -5
  149. package/src/funcs/basinDeleteStream.ts +8 -6
  150. package/src/funcs/basinGetStreamConfig.ts +6 -5
  151. package/src/funcs/basinListStreams.ts +2 -2
  152. package/src/funcs/basinReconfigureStream.ts +6 -5
  153. package/src/funcs/streamAppend.ts +6 -5
  154. package/src/funcs/streamCheckTail.ts +6 -5
  155. package/src/funcs/streamRead.ts +3 -3
  156. package/src/lib/config.ts +3 -2
  157. package/src/lib/matchers.ts +10 -16
  158. package/src/models/components/httpmetadata.ts +87 -0
  159. package/src/models/components/index.ts +1 -0
  160. package/src/models/errors/apierror.ts +7 -13
  161. package/src/models/errors/index.ts +1 -0
  162. package/src/models/errors/notfounderror.ts +69 -0
  163. package/src/models/operations/append.ts +68 -0
  164. package/src/models/operations/checktail.ts +74 -0
  165. package/src/models/operations/createbasin.ts +72 -0
  166. package/src/models/operations/createstream.ts +72 -0
  167. package/src/models/operations/deletebasin.ts +68 -0
  168. package/src/models/operations/deletestream.ts +68 -0
  169. package/src/models/operations/getbasinconfig.ts +74 -0
  170. package/src/models/operations/getstreamconfig.ts +74 -0
  171. package/src/models/operations/listbasins.ts +12 -6
  172. package/src/models/operations/liststreams.ts +12 -6
  173. package/src/models/operations/read.ts +33 -10
  174. package/src/models/operations/reconfigurebasin.ts +72 -0
  175. package/src/models/operations/reconfigurestream.ts +72 -0
  176. package/src/sdk/account.ts +4 -5
  177. package/src/sdk/basin.ts +4 -5
  178. package/src/sdk/stream.ts +2 -3
@@ -3,8 +3,10 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
  import { safeParse } from "../../lib/schemas.js";
7
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
8
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
11
 
10
12
  export type GetBasinConfigRequest = {
@@ -14,6 +16,11 @@ export type GetBasinConfigRequest = {
14
16
  basin: string;
15
17
  };
16
18
 
19
+ export type GetBasinConfigResponse = {
20
+ httpMeta: components.HTTPMetadata;
21
+ basinConfig?: components.BasinConfig | undefined;
22
+ };
23
+
17
24
  /** @internal */
18
25
  export const GetBasinConfigRequest$inboundSchema: z.ZodType<
19
26
  GetBasinConfigRequest,
@@ -67,3 +74,70 @@ export function getBasinConfigRequestFromJSON(
67
74
  `Failed to parse 'GetBasinConfigRequest' from JSON`,
68
75
  );
69
76
  }
77
+
78
+ /** @internal */
79
+ export const GetBasinConfigResponse$inboundSchema: z.ZodType<
80
+ GetBasinConfigResponse,
81
+ z.ZodTypeDef,
82
+ unknown
83
+ > = z.object({
84
+ HttpMeta: components.HTTPMetadata$inboundSchema,
85
+ BasinConfig: components.BasinConfig$inboundSchema.optional(),
86
+ }).transform((v) => {
87
+ return remap$(v, {
88
+ "HttpMeta": "httpMeta",
89
+ "BasinConfig": "basinConfig",
90
+ });
91
+ });
92
+
93
+ /** @internal */
94
+ export type GetBasinConfigResponse$Outbound = {
95
+ HttpMeta: components.HTTPMetadata$Outbound;
96
+ BasinConfig?: components.BasinConfig$Outbound | undefined;
97
+ };
98
+
99
+ /** @internal */
100
+ export const GetBasinConfigResponse$outboundSchema: z.ZodType<
101
+ GetBasinConfigResponse$Outbound,
102
+ z.ZodTypeDef,
103
+ GetBasinConfigResponse
104
+ > = z.object({
105
+ httpMeta: components.HTTPMetadata$outboundSchema,
106
+ basinConfig: components.BasinConfig$outboundSchema.optional(),
107
+ }).transform((v) => {
108
+ return remap$(v, {
109
+ httpMeta: "HttpMeta",
110
+ basinConfig: "BasinConfig",
111
+ });
112
+ });
113
+
114
+ /**
115
+ * @internal
116
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
117
+ */
118
+ export namespace GetBasinConfigResponse$ {
119
+ /** @deprecated use `GetBasinConfigResponse$inboundSchema` instead. */
120
+ export const inboundSchema = GetBasinConfigResponse$inboundSchema;
121
+ /** @deprecated use `GetBasinConfigResponse$outboundSchema` instead. */
122
+ export const outboundSchema = GetBasinConfigResponse$outboundSchema;
123
+ /** @deprecated use `GetBasinConfigResponse$Outbound` instead. */
124
+ export type Outbound = GetBasinConfigResponse$Outbound;
125
+ }
126
+
127
+ export function getBasinConfigResponseToJSON(
128
+ getBasinConfigResponse: GetBasinConfigResponse,
129
+ ): string {
130
+ return JSON.stringify(
131
+ GetBasinConfigResponse$outboundSchema.parse(getBasinConfigResponse),
132
+ );
133
+ }
134
+
135
+ export function getBasinConfigResponseFromJSON(
136
+ jsonString: string,
137
+ ): SafeParseResult<GetBasinConfigResponse, SDKValidationError> {
138
+ return safeParse(
139
+ jsonString,
140
+ (x) => GetBasinConfigResponse$inboundSchema.parse(JSON.parse(x)),
141
+ `Failed to parse 'GetBasinConfigResponse' from JSON`,
142
+ );
143
+ }
@@ -3,8 +3,10 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
  import { safeParse } from "../../lib/schemas.js";
7
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
8
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
11
 
10
12
  export const GetStreamConfigServerList = [
@@ -21,6 +23,11 @@ export type GetStreamConfigRequest = {
21
23
  stream: string;
22
24
  };
23
25
 
26
+ export type GetStreamConfigResponse = {
27
+ httpMeta: components.HTTPMetadata;
28
+ streamConfig?: components.StreamConfig | undefined;
29
+ };
30
+
24
31
  /** @internal */
25
32
  export const GetStreamConfigRequest$inboundSchema: z.ZodType<
26
33
  GetStreamConfigRequest,
@@ -74,3 +81,70 @@ export function getStreamConfigRequestFromJSON(
74
81
  `Failed to parse 'GetStreamConfigRequest' from JSON`,
75
82
  );
76
83
  }
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,7 +29,8 @@ export type ListBasinsRequest = {
29
29
  };
30
30
 
31
31
  export type ListBasinsResponse = {
32
- result: components.ListBasinsResponse;
32
+ httpMeta: components.HTTPMetadata;
33
+ listBasinsResponse?: components.ListBasinsResponse | undefined;
33
34
  };
34
35
 
35
36
  /** @internal */
@@ -106,16 +107,19 @@ export const ListBasinsResponse$inboundSchema: z.ZodType<
106
107
  z.ZodTypeDef,
107
108
  unknown
108
109
  > = z.object({
109
- Result: components.ListBasinsResponse$inboundSchema,
110
+ HttpMeta: components.HTTPMetadata$inboundSchema,
111
+ ListBasinsResponse: components.ListBasinsResponse$inboundSchema.optional(),
110
112
  }).transform((v) => {
111
113
  return remap$(v, {
112
- "Result": "result",
114
+ "HttpMeta": "httpMeta",
115
+ "ListBasinsResponse": "listBasinsResponse",
113
116
  });
114
117
  });
115
118
 
116
119
  /** @internal */
117
120
  export type ListBasinsResponse$Outbound = {
118
- Result: components.ListBasinsResponse$Outbound;
121
+ HttpMeta: components.HTTPMetadata$Outbound;
122
+ ListBasinsResponse?: components.ListBasinsResponse$Outbound | undefined;
119
123
  };
120
124
 
121
125
  /** @internal */
@@ -124,10 +128,12 @@ export const ListBasinsResponse$outboundSchema: z.ZodType<
124
128
  z.ZodTypeDef,
125
129
  ListBasinsResponse
126
130
  > = z.object({
127
- result: components.ListBasinsResponse$outboundSchema,
131
+ httpMeta: components.HTTPMetadata$outboundSchema,
132
+ listBasinsResponse: components.ListBasinsResponse$outboundSchema.optional(),
128
133
  }).transform((v) => {
129
134
  return remap$(v, {
130
- result: "Result",
135
+ httpMeta: "HttpMeta",
136
+ listBasinsResponse: "ListBasinsResponse",
131
137
  });
132
138
  });
133
139
 
@@ -36,7 +36,8 @@ export type ListStreamsRequest = {
36
36
  };
37
37
 
38
38
  export type ListStreamsResponse = {
39
- result: components.ListStreamsResponse;
39
+ httpMeta: components.HTTPMetadata;
40
+ listStreamsResponse?: components.ListStreamsResponse | undefined;
40
41
  };
41
42
 
42
43
  /** @internal */
@@ -113,16 +114,19 @@ export const ListStreamsResponse$inboundSchema: z.ZodType<
113
114
  z.ZodTypeDef,
114
115
  unknown
115
116
  > = z.object({
116
- Result: components.ListStreamsResponse$inboundSchema,
117
+ HttpMeta: components.HTTPMetadata$inboundSchema,
118
+ ListStreamsResponse: components.ListStreamsResponse$inboundSchema.optional(),
117
119
  }).transform((v) => {
118
120
  return remap$(v, {
119
- "Result": "result",
121
+ "HttpMeta": "httpMeta",
122
+ "ListStreamsResponse": "listStreamsResponse",
120
123
  });
121
124
  });
122
125
 
123
126
  /** @internal */
124
127
  export type ListStreamsResponse$Outbound = {
125
- Result: components.ListStreamsResponse$Outbound;
128
+ HttpMeta: components.HTTPMetadata$Outbound;
129
+ ListStreamsResponse?: components.ListStreamsResponse$Outbound | undefined;
126
130
  };
127
131
 
128
132
  /** @internal */
@@ -131,10 +135,12 @@ export const ListStreamsResponse$outboundSchema: z.ZodType<
131
135
  z.ZodTypeDef,
132
136
  ListStreamsResponse
133
137
  > = z.object({
134
- result: components.ListStreamsResponse$outboundSchema,
138
+ httpMeta: components.HTTPMetadata$outboundSchema,
139
+ listStreamsResponse: components.ListStreamsResponse$outboundSchema.optional(),
135
140
  }).transform((v) => {
136
141
  return remap$(v, {
137
- result: "Result",
142
+ httpMeta: "HttpMeta",
143
+ listStreamsResponse: "ListStreamsResponse",
138
144
  });
139
145
  });
140
146
 
@@ -61,9 +61,11 @@ export type ReadRequest = {
61
61
  stream: string;
62
62
  };
63
63
 
64
- export type ReadResponse =
65
- | components.Output
66
- | EventStream<components.ReadResponse>;
64
+ export type ReadResponse = {
65
+ httpMeta: components.HTTPMetadata;
66
+ output?: components.Output | undefined;
67
+ readResponse?: EventStream<components.ReadResponse> | undefined;
68
+ };
67
69
 
68
70
  /** @internal */
69
71
  export const Limit$inboundSchema: z.ZodType<Limit, z.ZodTypeDef, unknown> = z
@@ -233,9 +235,10 @@ export const ReadResponse$inboundSchema: z.ZodType<
233
235
  ReadResponse,
234
236
  z.ZodTypeDef,
235
237
  unknown
236
- > = z.union([
237
- components.Output$inboundSchema,
238
- z.instanceof(ReadableStream<Uint8Array>).transform(stream => {
238
+ > = z.object({
239
+ HttpMeta: components.HTTPMetadata$inboundSchema,
240
+ Output: components.Output$inboundSchema.optional(),
241
+ ReadResponse: z.instanceof(ReadableStream<Uint8Array>).transform(stream => {
239
242
  return new EventStream({
240
243
  stream,
241
244
  decoder(rawEvent) {
@@ -243,18 +246,38 @@ export const ReadResponse$inboundSchema: z.ZodType<
243
246
  return schema.parse(rawEvent);
244
247
  },
245
248
  });
246
- }),
247
- ]);
249
+ }).optional(),
250
+ }).transform((v) => {
251
+ return remap$(v, {
252
+ "HttpMeta": "httpMeta",
253
+ "Output": "output",
254
+ "ReadResponse": "readResponse",
255
+ });
256
+ });
248
257
 
249
258
  /** @internal */
250
- export type ReadResponse$Outbound = components.Output$Outbound | never;
259
+ export type ReadResponse$Outbound = {
260
+ HttpMeta: components.HTTPMetadata$Outbound;
261
+ Output?: components.Output$Outbound | undefined;
262
+ ReadResponse?: never | undefined;
263
+ };
251
264
 
252
265
  /** @internal */
253
266
  export const ReadResponse$outboundSchema: z.ZodType<
254
267
  ReadResponse$Outbound,
255
268
  z.ZodTypeDef,
256
269
  ReadResponse
257
- > = z.union([components.Output$outboundSchema, z.never()]);
270
+ > = z.object({
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
+ });
258
281
 
259
282
  /**
260
283
  * @internal
@@ -17,6 +17,11 @@ 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
+
20
25
  /** @internal */
21
26
  export const ReconfigureBasinRequest$inboundSchema: z.ZodType<
22
27
  ReconfigureBasinRequest,
@@ -81,3 +86,70 @@ export function reconfigureBasinRequestFromJSON(
81
86
  `Failed to parse 'ReconfigureBasinRequest' from JSON`,
82
87
  );
83
88
  }
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,6 +24,11 @@ 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
+
27
32
  /** @internal */
28
33
  export const ReconfigureStreamRequest$inboundSchema: z.ZodType<
29
34
  ReconfigureStreamRequest,
@@ -88,3 +93,70 @@ export function reconfigureStreamRequestFromJSON(
88
93
  `Failed to parse 'ReconfigureStreamRequest' from JSON`,
89
94
  );
90
95
  }
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
+ }
@@ -8,7 +8,6 @@ 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";
12
11
  import * as operations from "../models/operations/index.js";
13
12
  import { unwrapAsync } from "../types/fp.js";
14
13
  import { PageIterator, unwrapResultIterator } from "../types/operations.js";
@@ -34,7 +33,7 @@ export class Account extends ClientSDK {
34
33
  async getBasinConfig(
35
34
  request: operations.GetBasinConfigRequest,
36
35
  options?: RequestOptions,
37
- ): Promise<components.BasinConfig> {
36
+ ): Promise<operations.GetBasinConfigResponse> {
38
37
  return unwrapAsync(accountGetBasinConfig(
39
38
  this,
40
39
  request,
@@ -48,7 +47,7 @@ export class Account extends ClientSDK {
48
47
  async createBasin(
49
48
  request: operations.CreateBasinRequest,
50
49
  options?: RequestOptions,
51
- ): Promise<components.BasinInfo> {
50
+ ): Promise<operations.CreateBasinResponse> {
52
51
  return unwrapAsync(accountCreateBasin(
53
52
  this,
54
53
  request,
@@ -62,7 +61,7 @@ export class Account extends ClientSDK {
62
61
  async deleteBasin(
63
62
  request: operations.DeleteBasinRequest,
64
63
  options?: RequestOptions,
65
- ): Promise<void> {
64
+ ): Promise<operations.DeleteBasinResponse> {
66
65
  return unwrapAsync(accountDeleteBasin(
67
66
  this,
68
67
  request,
@@ -76,7 +75,7 @@ export class Account extends ClientSDK {
76
75
  async reconfigureBasin(
77
76
  request: operations.ReconfigureBasinRequest,
78
77
  options?: RequestOptions,
79
- ): Promise<components.BasinConfig> {
78
+ ): Promise<operations.ReconfigureBasinResponse> {
80
79
  return unwrapAsync(accountReconfigureBasin(
81
80
  this,
82
81
  request,
package/src/sdk/basin.ts CHANGED
@@ -8,7 +8,6 @@ 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";
12
11
  import * as operations from "../models/operations/index.js";
13
12
  import { unwrapAsync } from "../types/fp.js";
14
13
  import { PageIterator, unwrapResultIterator } from "../types/operations.js";
@@ -34,7 +33,7 @@ export class Basin extends ClientSDK {
34
33
  async getStreamConfig(
35
34
  request: operations.GetStreamConfigRequest,
36
35
  options?: RequestOptions,
37
- ): Promise<components.StreamConfig> {
36
+ ): Promise<operations.GetStreamConfigResponse> {
38
37
  return unwrapAsync(basinGetStreamConfig(
39
38
  this,
40
39
  request,
@@ -48,7 +47,7 @@ export class Basin extends ClientSDK {
48
47
  async createStream(
49
48
  request: operations.CreateStreamRequest,
50
49
  options?: RequestOptions,
51
- ): Promise<components.StreamInfo> {
50
+ ): Promise<operations.CreateStreamResponse> {
52
51
  return unwrapAsync(basinCreateStream(
53
52
  this,
54
53
  request,
@@ -62,7 +61,7 @@ export class Basin extends ClientSDK {
62
61
  async deleteStream(
63
62
  request: operations.DeleteStreamRequest,
64
63
  options?: RequestOptions,
65
- ): Promise<void> {
64
+ ): Promise<operations.DeleteStreamResponse> {
66
65
  return unwrapAsync(basinDeleteStream(
67
66
  this,
68
67
  request,
@@ -76,7 +75,7 @@ export class Basin extends ClientSDK {
76
75
  async reconfigureStream(
77
76
  request: operations.ReconfigureStreamRequest,
78
77
  options?: RequestOptions,
79
- ): Promise<components.StreamConfig> {
78
+ ): Promise<operations.ReconfigureStreamResponse> {
80
79
  return unwrapAsync(basinReconfigureStream(
81
80
  this,
82
81
  request,
package/src/sdk/stream.ts CHANGED
@@ -6,7 +6,6 @@ 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";
10
9
  import * as operations from "../models/operations/index.js";
11
10
  import { unwrapAsync } from "../types/fp.js";
12
11
 
@@ -39,7 +38,7 @@ export class Stream extends ClientSDK {
39
38
  async append(
40
39
  request: operations.AppendRequest,
41
40
  options?: RequestOptions,
42
- ): Promise<components.AppendOutput> {
41
+ ): Promise<operations.AppendResponse> {
43
42
  return unwrapAsync(streamAppend(
44
43
  this,
45
44
  request,
@@ -56,7 +55,7 @@ export class Stream extends ClientSDK {
56
55
  async checkTail(
57
56
  request: operations.CheckTailRequest,
58
57
  options?: RequestOptions,
59
- ): Promise<components.CheckTailResponse> {
58
+ ): Promise<operations.CheckTailResponse> {
60
59
  return unwrapAsync(streamCheckTail(
61
60
  this,
62
61
  request,