@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
@@ -14,6 +14,7 @@ export * from "./createbasinrequest.js";
14
14
  export * from "./createstreamrequest.js";
15
15
  export * from "./formatoption.js";
16
16
  export * from "./header.js";
17
+ export * from "./httpmetadata.js";
17
18
  export * from "./listbasinsresponse.js";
18
19
  export * from "./liststreamsresponse.js";
19
20
  export * from "./output.js";
@@ -3,25 +3,19 @@
3
3
  */
4
4
 
5
5
  export class APIError extends Error {
6
- public readonly statusCode: number;
7
- public readonly contentType: string;
8
-
9
6
  constructor(
10
7
  message: string,
11
- public readonly rawResponse: Response,
12
- public readonly body: string = "",
8
+ public readonly httpMeta: {
9
+ response: Response;
10
+ request: Request;
11
+ },
13
12
  ) {
14
- const statusCode = rawResponse.status;
15
- const contentType = rawResponse.headers.get("content-type") || "";
16
- const bodyString = body.length > 0 ? `\n${body}` : "";
17
-
18
13
  super(
19
- `${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`,
14
+ `${message}: Status ${httpMeta.response.status} Content-Type ${
15
+ httpMeta.response.headers.get("content-type") || ""
16
+ }`,
20
17
  );
21
18
 
22
- this.statusCode = statusCode;
23
- this.contentType = contentType;
24
-
25
19
  this.name = "APIError";
26
20
  }
27
21
  }
@@ -5,4 +5,5 @@
5
5
  export * from "./apierror.js";
6
6
  export * from "./errorresponse.js";
7
7
  export * from "./httpclienterrors.js";
8
+ export * from "./notfounderror.js";
8
9
  export * from "./sdkvalidationerror.js";
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export type NotFoundErrorData = {
8
+ error: string;
9
+ };
10
+
11
+ export class NotFoundError extends Error {
12
+ error: string;
13
+
14
+ /** The original data that was passed to this error instance. */
15
+ data$: NotFoundErrorData;
16
+
17
+ constructor(err: NotFoundErrorData) {
18
+ const message = "message" in err && typeof err.message === "string"
19
+ ? err.message
20
+ : `API error occurred: ${JSON.stringify(err)}`;
21
+ super(message);
22
+ this.data$ = err;
23
+
24
+ this.error = err.error;
25
+
26
+ this.name = "NotFoundError";
27
+ }
28
+ }
29
+
30
+ /** @internal */
31
+ export const NotFoundError$inboundSchema: z.ZodType<
32
+ NotFoundError,
33
+ z.ZodTypeDef,
34
+ unknown
35
+ > = z.object({
36
+ error: z.string(),
37
+ })
38
+ .transform((v) => {
39
+ return new NotFoundError(v);
40
+ });
41
+
42
+ /** @internal */
43
+ export type NotFoundError$Outbound = {
44
+ error: string;
45
+ };
46
+
47
+ /** @internal */
48
+ export const NotFoundError$outboundSchema: z.ZodType<
49
+ NotFoundError$Outbound,
50
+ z.ZodTypeDef,
51
+ NotFoundError
52
+ > = z.instanceof(NotFoundError)
53
+ .transform(v => v.data$)
54
+ .pipe(z.object({
55
+ error: z.string(),
56
+ }));
57
+
58
+ /**
59
+ * @internal
60
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
61
+ */
62
+ export namespace NotFoundError$ {
63
+ /** @deprecated use `NotFoundError$inboundSchema` instead. */
64
+ export const inboundSchema = NotFoundError$inboundSchema;
65
+ /** @deprecated use `NotFoundError$outboundSchema` instead. */
66
+ export const outboundSchema = NotFoundError$outboundSchema;
67
+ /** @deprecated use `NotFoundError$Outbound` instead. */
68
+ export type Outbound = NotFoundError$Outbound;
69
+ }
@@ -39,6 +39,11 @@ export type AppendRequest = {
39
39
  appendInput: components.AppendInput;
40
40
  };
41
41
 
42
+ export type AppendResponse = {
43
+ httpMeta: components.HTTPMetadata;
44
+ appendOutput?: components.AppendOutput | undefined;
45
+ };
46
+
42
47
  /** @internal */
43
48
  export const HeaderS2Format$inboundSchema: z.ZodType<
44
49
  HeaderS2Format,
@@ -148,3 +153,66 @@ export function appendRequestFromJSON(
148
153
  `Failed to parse 'AppendRequest' from JSON`,
149
154
  );
150
155
  }
156
+
157
+ /** @internal */
158
+ export const AppendResponse$inboundSchema: z.ZodType<
159
+ AppendResponse,
160
+ z.ZodTypeDef,
161
+ unknown
162
+ > = z.object({
163
+ HttpMeta: components.HTTPMetadata$inboundSchema,
164
+ AppendOutput: components.AppendOutput$inboundSchema.optional(),
165
+ }).transform((v) => {
166
+ return remap$(v, {
167
+ "HttpMeta": "httpMeta",
168
+ "AppendOutput": "appendOutput",
169
+ });
170
+ });
171
+
172
+ /** @internal */
173
+ export type AppendResponse$Outbound = {
174
+ HttpMeta: components.HTTPMetadata$Outbound;
175
+ AppendOutput?: components.AppendOutput$Outbound | undefined;
176
+ };
177
+
178
+ /** @internal */
179
+ export const AppendResponse$outboundSchema: z.ZodType<
180
+ AppendResponse$Outbound,
181
+ z.ZodTypeDef,
182
+ AppendResponse
183
+ > = z.object({
184
+ httpMeta: components.HTTPMetadata$outboundSchema,
185
+ appendOutput: components.AppendOutput$outboundSchema.optional(),
186
+ }).transform((v) => {
187
+ return remap$(v, {
188
+ httpMeta: "HttpMeta",
189
+ appendOutput: "AppendOutput",
190
+ });
191
+ });
192
+
193
+ /**
194
+ * @internal
195
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
196
+ */
197
+ export namespace AppendResponse$ {
198
+ /** @deprecated use `AppendResponse$inboundSchema` instead. */
199
+ export const inboundSchema = AppendResponse$inboundSchema;
200
+ /** @deprecated use `AppendResponse$outboundSchema` instead. */
201
+ export const outboundSchema = AppendResponse$outboundSchema;
202
+ /** @deprecated use `AppendResponse$Outbound` instead. */
203
+ export type Outbound = AppendResponse$Outbound;
204
+ }
205
+
206
+ export function appendResponseToJSON(appendResponse: AppendResponse): string {
207
+ return JSON.stringify(AppendResponse$outboundSchema.parse(appendResponse));
208
+ }
209
+
210
+ export function appendResponseFromJSON(
211
+ jsonString: string,
212
+ ): SafeParseResult<AppendResponse, SDKValidationError> {
213
+ return safeParse(
214
+ jsonString,
215
+ (x) => AppendResponse$inboundSchema.parse(JSON.parse(x)),
216
+ `Failed to parse 'AppendResponse' from JSON`,
217
+ );
218
+ }
@@ -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 CheckTailServerList = [
@@ -21,6 +23,11 @@ export type CheckTailRequest = {
21
23
  stream: string;
22
24
  };
23
25
 
26
+ export type CheckTailResponse = {
27
+ httpMeta: components.HTTPMetadata;
28
+ checkTailResponse?: components.CheckTailResponse | undefined;
29
+ };
30
+
24
31
  /** @internal */
25
32
  export const CheckTailRequest$inboundSchema: z.ZodType<
26
33
  CheckTailRequest,
@@ -74,3 +81,70 @@ export function checkTailRequestFromJSON(
74
81
  `Failed to parse 'CheckTailRequest' from JSON`,
75
82
  );
76
83
  }
84
+
85
+ /** @internal */
86
+ export const CheckTailResponse$inboundSchema: z.ZodType<
87
+ CheckTailResponse,
88
+ z.ZodTypeDef,
89
+ unknown
90
+ > = z.object({
91
+ HttpMeta: components.HTTPMetadata$inboundSchema,
92
+ CheckTailResponse: components.CheckTailResponse$inboundSchema.optional(),
93
+ }).transform((v) => {
94
+ return remap$(v, {
95
+ "HttpMeta": "httpMeta",
96
+ "CheckTailResponse": "checkTailResponse",
97
+ });
98
+ });
99
+
100
+ /** @internal */
101
+ export type CheckTailResponse$Outbound = {
102
+ HttpMeta: components.HTTPMetadata$Outbound;
103
+ CheckTailResponse?: components.CheckTailResponse$Outbound | undefined;
104
+ };
105
+
106
+ /** @internal */
107
+ export const CheckTailResponse$outboundSchema: z.ZodType<
108
+ CheckTailResponse$Outbound,
109
+ z.ZodTypeDef,
110
+ CheckTailResponse
111
+ > = z.object({
112
+ httpMeta: components.HTTPMetadata$outboundSchema,
113
+ checkTailResponse: components.CheckTailResponse$outboundSchema.optional(),
114
+ }).transform((v) => {
115
+ return remap$(v, {
116
+ httpMeta: "HttpMeta",
117
+ checkTailResponse: "CheckTailResponse",
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 CheckTailResponse$ {
126
+ /** @deprecated use `CheckTailResponse$inboundSchema` instead. */
127
+ export const inboundSchema = CheckTailResponse$inboundSchema;
128
+ /** @deprecated use `CheckTailResponse$outboundSchema` instead. */
129
+ export const outboundSchema = CheckTailResponse$outboundSchema;
130
+ /** @deprecated use `CheckTailResponse$Outbound` instead. */
131
+ export type Outbound = CheckTailResponse$Outbound;
132
+ }
133
+
134
+ export function checkTailResponseToJSON(
135
+ checkTailResponse: CheckTailResponse,
136
+ ): string {
137
+ return JSON.stringify(
138
+ CheckTailResponse$outboundSchema.parse(checkTailResponse),
139
+ );
140
+ }
141
+
142
+ export function checkTailResponseFromJSON(
143
+ jsonString: string,
144
+ ): SafeParseResult<CheckTailResponse, SDKValidationError> {
145
+ return safeParse(
146
+ jsonString,
147
+ (x) => CheckTailResponse$inboundSchema.parse(JSON.parse(x)),
148
+ `Failed to parse 'CheckTailResponse' from JSON`,
149
+ );
150
+ }
@@ -18,6 +18,11 @@ export type CreateBasinRequest = {
18
18
  createBasinRequest: components.CreateBasinRequest;
19
19
  };
20
20
 
21
+ export type CreateBasinResponse = {
22
+ httpMeta: components.HTTPMetadata;
23
+ basinInfo?: components.BasinInfo | undefined;
24
+ };
25
+
21
26
  /** @internal */
22
27
  export const CreateBasinRequest$inboundSchema: z.ZodType<
23
28
  CreateBasinRequest,
@@ -87,3 +92,70 @@ export function createBasinRequestFromJSON(
87
92
  `Failed to parse 'CreateBasinRequest' from JSON`,
88
93
  );
89
94
  }
95
+
96
+ /** @internal */
97
+ export const CreateBasinResponse$inboundSchema: z.ZodType<
98
+ CreateBasinResponse,
99
+ z.ZodTypeDef,
100
+ unknown
101
+ > = z.object({
102
+ HttpMeta: components.HTTPMetadata$inboundSchema,
103
+ BasinInfo: components.BasinInfo$inboundSchema.optional(),
104
+ }).transform((v) => {
105
+ return remap$(v, {
106
+ "HttpMeta": "httpMeta",
107
+ "BasinInfo": "basinInfo",
108
+ });
109
+ });
110
+
111
+ /** @internal */
112
+ export type CreateBasinResponse$Outbound = {
113
+ HttpMeta: components.HTTPMetadata$Outbound;
114
+ BasinInfo?: components.BasinInfo$Outbound | undefined;
115
+ };
116
+
117
+ /** @internal */
118
+ export const CreateBasinResponse$outboundSchema: z.ZodType<
119
+ CreateBasinResponse$Outbound,
120
+ z.ZodTypeDef,
121
+ CreateBasinResponse
122
+ > = z.object({
123
+ httpMeta: components.HTTPMetadata$outboundSchema,
124
+ basinInfo: components.BasinInfo$outboundSchema.optional(),
125
+ }).transform((v) => {
126
+ return remap$(v, {
127
+ httpMeta: "HttpMeta",
128
+ basinInfo: "BasinInfo",
129
+ });
130
+ });
131
+
132
+ /**
133
+ * @internal
134
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
135
+ */
136
+ export namespace CreateBasinResponse$ {
137
+ /** @deprecated use `CreateBasinResponse$inboundSchema` instead. */
138
+ export const inboundSchema = CreateBasinResponse$inboundSchema;
139
+ /** @deprecated use `CreateBasinResponse$outboundSchema` instead. */
140
+ export const outboundSchema = CreateBasinResponse$outboundSchema;
141
+ /** @deprecated use `CreateBasinResponse$Outbound` instead. */
142
+ export type Outbound = CreateBasinResponse$Outbound;
143
+ }
144
+
145
+ export function createBasinResponseToJSON(
146
+ createBasinResponse: CreateBasinResponse,
147
+ ): string {
148
+ return JSON.stringify(
149
+ CreateBasinResponse$outboundSchema.parse(createBasinResponse),
150
+ );
151
+ }
152
+
153
+ export function createBasinResponseFromJSON(
154
+ jsonString: string,
155
+ ): SafeParseResult<CreateBasinResponse, SDKValidationError> {
156
+ return safeParse(
157
+ jsonString,
158
+ (x) => CreateBasinResponse$inboundSchema.parse(JSON.parse(x)),
159
+ `Failed to parse 'CreateBasinResponse' from JSON`,
160
+ );
161
+ }
@@ -25,6 +25,11 @@ export type CreateStreamRequest = {
25
25
  createStreamRequest: components.CreateStreamRequest;
26
26
  };
27
27
 
28
+ export type CreateStreamResponse = {
29
+ httpMeta: components.HTTPMetadata;
30
+ streamInfo?: components.StreamInfo | undefined;
31
+ };
32
+
28
33
  /** @internal */
29
34
  export const CreateStreamRequest$inboundSchema: z.ZodType<
30
35
  CreateStreamRequest,
@@ -94,3 +99,70 @@ export function createStreamRequestFromJSON(
94
99
  `Failed to parse 'CreateStreamRequest' from JSON`,
95
100
  );
96
101
  }
102
+
103
+ /** @internal */
104
+ export const CreateStreamResponse$inboundSchema: z.ZodType<
105
+ CreateStreamResponse,
106
+ z.ZodTypeDef,
107
+ unknown
108
+ > = z.object({
109
+ HttpMeta: components.HTTPMetadata$inboundSchema,
110
+ StreamInfo: components.StreamInfo$inboundSchema.optional(),
111
+ }).transform((v) => {
112
+ return remap$(v, {
113
+ "HttpMeta": "httpMeta",
114
+ "StreamInfo": "streamInfo",
115
+ });
116
+ });
117
+
118
+ /** @internal */
119
+ export type CreateStreamResponse$Outbound = {
120
+ HttpMeta: components.HTTPMetadata$Outbound;
121
+ StreamInfo?: components.StreamInfo$Outbound | undefined;
122
+ };
123
+
124
+ /** @internal */
125
+ export const CreateStreamResponse$outboundSchema: z.ZodType<
126
+ CreateStreamResponse$Outbound,
127
+ z.ZodTypeDef,
128
+ CreateStreamResponse
129
+ > = z.object({
130
+ httpMeta: components.HTTPMetadata$outboundSchema,
131
+ streamInfo: components.StreamInfo$outboundSchema.optional(),
132
+ }).transform((v) => {
133
+ return remap$(v, {
134
+ httpMeta: "HttpMeta",
135
+ streamInfo: "StreamInfo",
136
+ });
137
+ });
138
+
139
+ /**
140
+ * @internal
141
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
142
+ */
143
+ export namespace CreateStreamResponse$ {
144
+ /** @deprecated use `CreateStreamResponse$inboundSchema` instead. */
145
+ export const inboundSchema = CreateStreamResponse$inboundSchema;
146
+ /** @deprecated use `CreateStreamResponse$outboundSchema` instead. */
147
+ export const outboundSchema = CreateStreamResponse$outboundSchema;
148
+ /** @deprecated use `CreateStreamResponse$Outbound` instead. */
149
+ export type Outbound = CreateStreamResponse$Outbound;
150
+ }
151
+
152
+ export function createStreamResponseToJSON(
153
+ createStreamResponse: CreateStreamResponse,
154
+ ): string {
155
+ return JSON.stringify(
156
+ CreateStreamResponse$outboundSchema.parse(createStreamResponse),
157
+ );
158
+ }
159
+
160
+ export function createStreamResponseFromJSON(
161
+ jsonString: string,
162
+ ): SafeParseResult<CreateStreamResponse, SDKValidationError> {
163
+ return safeParse(
164
+ jsonString,
165
+ (x) => CreateStreamResponse$inboundSchema.parse(JSON.parse(x)),
166
+ `Failed to parse 'CreateStreamResponse' from JSON`,
167
+ );
168
+ }
@@ -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 DeleteBasinRequest = {
@@ -14,6 +16,10 @@ export type DeleteBasinRequest = {
14
16
  basin: string;
15
17
  };
16
18
 
19
+ export type DeleteBasinResponse = {
20
+ httpMeta: components.HTTPMetadata;
21
+ };
22
+
17
23
  /** @internal */
18
24
  export const DeleteBasinRequest$inboundSchema: z.ZodType<
19
25
  DeleteBasinRequest,
@@ -67,3 +73,65 @@ export function deleteBasinRequestFromJSON(
67
73
  `Failed to parse 'DeleteBasinRequest' from JSON`,
68
74
  );
69
75
  }
76
+
77
+ /** @internal */
78
+ export const DeleteBasinResponse$inboundSchema: z.ZodType<
79
+ DeleteBasinResponse,
80
+ z.ZodTypeDef,
81
+ unknown
82
+ > = z.object({
83
+ HttpMeta: components.HTTPMetadata$inboundSchema,
84
+ }).transform((v) => {
85
+ return remap$(v, {
86
+ "HttpMeta": "httpMeta",
87
+ });
88
+ });
89
+
90
+ /** @internal */
91
+ export type DeleteBasinResponse$Outbound = {
92
+ HttpMeta: components.HTTPMetadata$Outbound;
93
+ };
94
+
95
+ /** @internal */
96
+ export const DeleteBasinResponse$outboundSchema: z.ZodType<
97
+ DeleteBasinResponse$Outbound,
98
+ z.ZodTypeDef,
99
+ DeleteBasinResponse
100
+ > = z.object({
101
+ httpMeta: components.HTTPMetadata$outboundSchema,
102
+ }).transform((v) => {
103
+ return remap$(v, {
104
+ httpMeta: "HttpMeta",
105
+ });
106
+ });
107
+
108
+ /**
109
+ * @internal
110
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
111
+ */
112
+ export namespace DeleteBasinResponse$ {
113
+ /** @deprecated use `DeleteBasinResponse$inboundSchema` instead. */
114
+ export const inboundSchema = DeleteBasinResponse$inboundSchema;
115
+ /** @deprecated use `DeleteBasinResponse$outboundSchema` instead. */
116
+ export const outboundSchema = DeleteBasinResponse$outboundSchema;
117
+ /** @deprecated use `DeleteBasinResponse$Outbound` instead. */
118
+ export type Outbound = DeleteBasinResponse$Outbound;
119
+ }
120
+
121
+ export function deleteBasinResponseToJSON(
122
+ deleteBasinResponse: DeleteBasinResponse,
123
+ ): string {
124
+ return JSON.stringify(
125
+ DeleteBasinResponse$outboundSchema.parse(deleteBasinResponse),
126
+ );
127
+ }
128
+
129
+ export function deleteBasinResponseFromJSON(
130
+ jsonString: string,
131
+ ): SafeParseResult<DeleteBasinResponse, SDKValidationError> {
132
+ return safeParse(
133
+ jsonString,
134
+ (x) => DeleteBasinResponse$inboundSchema.parse(JSON.parse(x)),
135
+ `Failed to parse 'DeleteBasinResponse' from JSON`,
136
+ );
137
+ }
@@ -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 DeleteStreamServerList = [
@@ -21,6 +23,10 @@ export type DeleteStreamRequest = {
21
23
  stream: string;
22
24
  };
23
25
 
26
+ export type DeleteStreamResponse = {
27
+ httpMeta: components.HTTPMetadata;
28
+ };
29
+
24
30
  /** @internal */
25
31
  export const DeleteStreamRequest$inboundSchema: z.ZodType<
26
32
  DeleteStreamRequest,
@@ -74,3 +80,65 @@ export function deleteStreamRequestFromJSON(
74
80
  `Failed to parse 'DeleteStreamRequest' from JSON`,
75
81
  );
76
82
  }
83
+
84
+ /** @internal */
85
+ export const DeleteStreamResponse$inboundSchema: z.ZodType<
86
+ DeleteStreamResponse,
87
+ z.ZodTypeDef,
88
+ unknown
89
+ > = z.object({
90
+ HttpMeta: components.HTTPMetadata$inboundSchema,
91
+ }).transform((v) => {
92
+ return remap$(v, {
93
+ "HttpMeta": "httpMeta",
94
+ });
95
+ });
96
+
97
+ /** @internal */
98
+ export type DeleteStreamResponse$Outbound = {
99
+ HttpMeta: components.HTTPMetadata$Outbound;
100
+ };
101
+
102
+ /** @internal */
103
+ export const DeleteStreamResponse$outboundSchema: z.ZodType<
104
+ DeleteStreamResponse$Outbound,
105
+ z.ZodTypeDef,
106
+ DeleteStreamResponse
107
+ > = z.object({
108
+ httpMeta: components.HTTPMetadata$outboundSchema,
109
+ }).transform((v) => {
110
+ return remap$(v, {
111
+ httpMeta: "HttpMeta",
112
+ });
113
+ });
114
+
115
+ /**
116
+ * @internal
117
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
118
+ */
119
+ export namespace DeleteStreamResponse$ {
120
+ /** @deprecated use `DeleteStreamResponse$inboundSchema` instead. */
121
+ export const inboundSchema = DeleteStreamResponse$inboundSchema;
122
+ /** @deprecated use `DeleteStreamResponse$outboundSchema` instead. */
123
+ export const outboundSchema = DeleteStreamResponse$outboundSchema;
124
+ /** @deprecated use `DeleteStreamResponse$Outbound` instead. */
125
+ export type Outbound = DeleteStreamResponse$Outbound;
126
+ }
127
+
128
+ export function deleteStreamResponseToJSON(
129
+ deleteStreamResponse: DeleteStreamResponse,
130
+ ): string {
131
+ return JSON.stringify(
132
+ DeleteStreamResponse$outboundSchema.parse(deleteStreamResponse),
133
+ );
134
+ }
135
+
136
+ export function deleteStreamResponseFromJSON(
137
+ jsonString: string,
138
+ ): SafeParseResult<DeleteStreamResponse, SDKValidationError> {
139
+ return safeParse(
140
+ jsonString,
141
+ (x) => DeleteStreamResponse$inboundSchema.parse(JSON.parse(x)),
142
+ `Failed to parse 'DeleteStreamResponse' from JSON`,
143
+ );
144
+ }