@s2-dev/streamstore 0.3.9 → 0.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/README.md +15 -12
  2. package/docs/sdks/account/README.md +38 -35
  3. package/docs/sdks/basin/README.md +38 -35
  4. package/docs/sdks/stream/README.md +22 -27
  5. package/funcs/accountCreateBasin.d.ts +2 -1
  6. package/funcs/accountCreateBasin.d.ts.map +1 -1
  7. package/funcs/accountCreateBasin.js +3 -4
  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 +3 -2
  12. package/funcs/accountDeleteBasin.js.map +1 -1
  13. package/funcs/accountGetBasinConfig.d.ts +2 -1
  14. package/funcs/accountGetBasinConfig.d.ts.map +1 -1
  15. package/funcs/accountGetBasinConfig.js +3 -4
  16. package/funcs/accountGetBasinConfig.js.map +1 -1
  17. package/funcs/accountListBasins.d.ts +1 -1
  18. package/funcs/accountListBasins.d.ts.map +1 -1
  19. package/funcs/accountListBasins.js +2 -4
  20. package/funcs/accountListBasins.js.map +1 -1
  21. package/funcs/accountReconfigureBasin.d.ts +2 -1
  22. package/funcs/accountReconfigureBasin.d.ts.map +1 -1
  23. package/funcs/accountReconfigureBasin.js +3 -4
  24. package/funcs/accountReconfigureBasin.js.map +1 -1
  25. package/funcs/basinCreateStream.d.ts +2 -1
  26. package/funcs/basinCreateStream.d.ts.map +1 -1
  27. package/funcs/basinCreateStream.js +14 -4
  28. package/funcs/basinCreateStream.js.map +1 -1
  29. package/funcs/basinDeleteStream.d.ts +1 -1
  30. package/funcs/basinDeleteStream.d.ts.map +1 -1
  31. package/funcs/basinDeleteStream.js +3 -2
  32. package/funcs/basinDeleteStream.js.map +1 -1
  33. package/funcs/basinGetStreamConfig.d.ts +2 -1
  34. package/funcs/basinGetStreamConfig.d.ts.map +1 -1
  35. package/funcs/basinGetStreamConfig.js +3 -4
  36. package/funcs/basinGetStreamConfig.js.map +1 -1
  37. package/funcs/basinListStreams.d.ts +1 -1
  38. package/funcs/basinListStreams.d.ts.map +1 -1
  39. package/funcs/basinListStreams.js +3 -3
  40. package/funcs/basinListStreams.js.map +1 -1
  41. package/funcs/basinReconfigureStream.d.ts +2 -1
  42. package/funcs/basinReconfigureStream.d.ts.map +1 -1
  43. package/funcs/basinReconfigureStream.js +3 -4
  44. package/funcs/basinReconfigureStream.js.map +1 -1
  45. package/funcs/streamAppend.d.ts +2 -1
  46. package/funcs/streamAppend.d.ts.map +1 -1
  47. package/funcs/streamAppend.js +3 -4
  48. package/funcs/streamAppend.js.map +1 -1
  49. package/funcs/streamCheckTail.d.ts +2 -1
  50. package/funcs/streamCheckTail.d.ts.map +1 -1
  51. package/funcs/streamCheckTail.js +3 -4
  52. package/funcs/streamCheckTail.js.map +1 -1
  53. package/funcs/streamRead.d.ts +1 -1
  54. package/funcs/streamRead.d.ts.map +1 -1
  55. package/funcs/streamRead.js +2 -2
  56. package/funcs/streamRead.js.map +1 -1
  57. package/index.extras.d.ts +13 -5
  58. package/index.extras.d.ts.map +1 -1
  59. package/index.extras.js +64 -25
  60. package/index.extras.js.map +1 -1
  61. package/jsr.json +1 -1
  62. package/lib/config.d.ts +2 -2
  63. package/lib/config.d.ts.map +1 -1
  64. package/lib/config.js +2 -2
  65. package/lib/config.js.map +1 -1
  66. package/lib/matchers.d.ts +1 -1
  67. package/lib/matchers.d.ts.map +1 -1
  68. package/lib/matchers.js +11 -10
  69. package/lib/matchers.js.map +1 -1
  70. package/models/components/index.d.ts +0 -1
  71. package/models/components/index.d.ts.map +1 -1
  72. package/models/components/index.js +0 -1
  73. package/models/components/index.js.map +1 -1
  74. package/models/errors/apierror.d.ts +5 -8
  75. package/models/errors/apierror.d.ts.map +1 -1
  76. package/models/errors/apierror.js +9 -3
  77. package/models/errors/apierror.js.map +1 -1
  78. package/models/errors/index.d.ts +1 -0
  79. package/models/errors/index.d.ts.map +1 -1
  80. package/models/errors/index.js +1 -0
  81. package/models/errors/index.js.map +1 -1
  82. package/models/errors/retryableerror.d.ts +31 -0
  83. package/models/errors/retryableerror.d.ts.map +1 -0
  84. package/models/errors/retryableerror.js +77 -0
  85. package/models/errors/retryableerror.js.map +1 -0
  86. package/models/operations/append.d.ts +0 -27
  87. package/models/operations/append.d.ts.map +1 -1
  88. package/models/operations/append.js +1 -40
  89. package/models/operations/append.js.map +1 -1
  90. package/models/operations/checktail.d.ts +0 -28
  91. package/models/operations/checktail.d.ts.map +1 -1
  92. package/models/operations/checktail.js +1 -42
  93. package/models/operations/checktail.js.map +1 -1
  94. package/models/operations/createbasin.d.ts +0 -27
  95. package/models/operations/createbasin.d.ts.map +1 -1
  96. package/models/operations/createbasin.js +1 -40
  97. package/models/operations/createbasin.js.map +1 -1
  98. package/models/operations/createstream.d.ts +0 -27
  99. package/models/operations/createstream.d.ts.map +1 -1
  100. package/models/operations/createstream.js +1 -40
  101. package/models/operations/createstream.js.map +1 -1
  102. package/models/operations/deletebasin.d.ts +0 -26
  103. package/models/operations/deletebasin.d.ts.map +1 -1
  104. package/models/operations/deletebasin.js +1 -38
  105. package/models/operations/deletebasin.js.map +1 -1
  106. package/models/operations/deletestream.d.ts +0 -26
  107. package/models/operations/deletestream.d.ts.map +1 -1
  108. package/models/operations/deletestream.js +1 -38
  109. package/models/operations/deletestream.js.map +1 -1
  110. package/models/operations/getbasinconfig.d.ts +0 -28
  111. package/models/operations/getbasinconfig.d.ts.map +1 -1
  112. package/models/operations/getbasinconfig.js +1 -42
  113. package/models/operations/getbasinconfig.js.map +1 -1
  114. package/models/operations/getstreamconfig.d.ts +0 -28
  115. package/models/operations/getstreamconfig.d.ts.map +1 -1
  116. package/models/operations/getstreamconfig.js +1 -42
  117. package/models/operations/getstreamconfig.js.map +1 -1
  118. package/models/operations/listbasins.d.ts +2 -4
  119. package/models/operations/listbasins.d.ts.map +1 -1
  120. package/models/operations/listbasins.js +4 -8
  121. package/models/operations/listbasins.js.map +1 -1
  122. package/models/operations/liststreams.d.ts +2 -4
  123. package/models/operations/liststreams.d.ts.map +1 -1
  124. package/models/operations/liststreams.js +4 -8
  125. package/models/operations/liststreams.js.map +1 -1
  126. package/models/operations/read.d.ts +2 -10
  127. package/models/operations/read.d.ts.map +1 -1
  128. package/models/operations/read.js +6 -23
  129. package/models/operations/read.js.map +1 -1
  130. package/models/operations/reconfigurebasin.d.ts +0 -27
  131. package/models/operations/reconfigurebasin.d.ts.map +1 -1
  132. package/models/operations/reconfigurebasin.js +1 -40
  133. package/models/operations/reconfigurebasin.js.map +1 -1
  134. package/models/operations/reconfigurestream.d.ts +0 -27
  135. package/models/operations/reconfigurestream.d.ts.map +1 -1
  136. package/models/operations/reconfigurestream.js +1 -40
  137. package/models/operations/reconfigurestream.js.map +1 -1
  138. package/package.json +1 -1
  139. package/sdk/account.d.ts +5 -4
  140. package/sdk/account.d.ts.map +1 -1
  141. package/sdk/account.js.map +1 -1
  142. package/sdk/basin.d.ts +5 -4
  143. package/sdk/basin.d.ts.map +1 -1
  144. package/sdk/basin.js.map +1 -1
  145. package/sdk/stream.d.ts +3 -2
  146. package/sdk/stream.d.ts.map +1 -1
  147. package/sdk/stream.js.map +1 -1
  148. package/src/funcs/accountCreateBasin.ts +12 -10
  149. package/src/funcs/accountDeleteBasin.ts +12 -8
  150. package/src/funcs/accountGetBasinConfig.ts +12 -10
  151. package/src/funcs/accountListBasins.ts +11 -9
  152. package/src/funcs/accountReconfigureBasin.ts +12 -10
  153. package/src/funcs/basinCreateStream.ts +23 -10
  154. package/src/funcs/basinDeleteStream.ts +12 -8
  155. package/src/funcs/basinGetStreamConfig.ts +12 -10
  156. package/src/funcs/basinListStreams.ts +11 -7
  157. package/src/funcs/basinReconfigureStream.ts +12 -10
  158. package/src/funcs/streamAppend.ts +12 -10
  159. package/src/funcs/streamCheckTail.ts +12 -10
  160. package/src/funcs/streamRead.ts +10 -7
  161. package/src/index.extras.ts +139 -48
  162. package/src/lib/config.ts +3 -2
  163. package/src/lib/matchers.ts +16 -10
  164. package/src/models/components/index.ts +0 -1
  165. package/src/models/errors/apierror.ts +13 -7
  166. package/src/models/errors/index.ts +1 -0
  167. package/src/models/errors/retryableerror.ts +69 -0
  168. package/src/models/operations/append.ts +0 -68
  169. package/src/models/operations/checktail.ts +0 -74
  170. package/src/models/operations/createbasin.ts +0 -72
  171. package/src/models/operations/createstream.ts +0 -72
  172. package/src/models/operations/deletebasin.ts +0 -68
  173. package/src/models/operations/deletestream.ts +0 -68
  174. package/src/models/operations/getbasinconfig.ts +0 -74
  175. package/src/models/operations/getstreamconfig.ts +0 -74
  176. package/src/models/operations/listbasins.ts +6 -12
  177. package/src/models/operations/liststreams.ts +6 -12
  178. package/src/models/operations/read.ts +10 -33
  179. package/src/models/operations/reconfigurebasin.ts +0 -72
  180. package/src/models/operations/reconfigurestream.ts +0 -72
  181. package/src/sdk/account.ts +5 -4
  182. package/src/sdk/basin.ts +5 -4
  183. package/src/sdk/stream.ts +3 -2
  184. package/models/components/httpmetadata.d.ts +0 -37
  185. package/models/components/httpmetadata.d.ts.map +0 -1
  186. package/models/components/httpmetadata.js +0 -86
  187. package/models/components/httpmetadata.js.map +0 -1
  188. package/src/models/components/httpmetadata.ts +0 -87
@@ -29,8 +29,7 @@ export type ListBasinsRequest = {
29
29
  };
30
30
 
31
31
  export type ListBasinsResponse = {
32
- httpMeta: components.HTTPMetadata;
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
- HttpMeta: components.HTTPMetadata$inboundSchema,
111
- ListBasinsResponse: components.ListBasinsResponse$inboundSchema.optional(),
109
+ Result: components.ListBasinsResponse$inboundSchema,
112
110
  }).transform((v) => {
113
111
  return remap$(v, {
114
- "HttpMeta": "httpMeta",
115
- "ListBasinsResponse": "listBasinsResponse",
112
+ "Result": "result",
116
113
  });
117
114
  });
118
115
 
119
116
  /** @internal */
120
117
  export type ListBasinsResponse$Outbound = {
121
- HttpMeta: components.HTTPMetadata$Outbound;
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
- httpMeta: components.HTTPMetadata$outboundSchema,
132
- listBasinsResponse: components.ListBasinsResponse$outboundSchema.optional(),
127
+ result: components.ListBasinsResponse$outboundSchema,
133
128
  }).transform((v) => {
134
129
  return remap$(v, {
135
- httpMeta: "HttpMeta",
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
- httpMeta: components.HTTPMetadata;
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
- HttpMeta: components.HTTPMetadata$inboundSchema,
118
- ListStreamsResponse: components.ListStreamsResponse$inboundSchema.optional(),
116
+ Result: components.ListStreamsResponse$inboundSchema,
119
117
  }).transform((v) => {
120
118
  return remap$(v, {
121
- "HttpMeta": "httpMeta",
122
- "ListStreamsResponse": "listStreamsResponse",
119
+ "Result": "result",
123
120
  });
124
121
  });
125
122
 
126
123
  /** @internal */
127
124
  export type ListStreamsResponse$Outbound = {
128
- HttpMeta: components.HTTPMetadata$Outbound;
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
- httpMeta: components.HTTPMetadata$outboundSchema,
139
- listStreamsResponse: components.ListStreamsResponse$outboundSchema.optional(),
134
+ result: components.ListStreamsResponse$outboundSchema,
140
135
  }).transform((v) => {
141
136
  return remap$(v, {
142
- httpMeta: "HttpMeta",
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
- httpMeta: components.HTTPMetadata;
66
- output?: components.Output | undefined;
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.object({
239
- HttpMeta: components.HTTPMetadata$inboundSchema,
240
- Output: components.Output$inboundSchema.optional(),
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
- }).optional(),
250
- }).transform((v) => {
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.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
- });
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
- }
@@ -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<operations.GetBasinConfigResponse> {
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<operations.CreateBasinResponse> {
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<operations.DeleteBasinResponse> {
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<operations.ReconfigureBasinResponse> {
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<operations.GetStreamConfigResponse> {
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<operations.CreateStreamResponse> {
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<operations.DeleteStreamResponse> {
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<operations.ReconfigureStreamResponse> {
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<operations.AppendResponse> {
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<operations.CheckTailResponse> {
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"}
@@ -1,87 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
-
11
- export type HTTPMetadata = {
12
- /**
13
- * Raw HTTP response; suitable for custom response parsing
14
- */
15
- response: Response;
16
- /**
17
- * Raw HTTP request; suitable for debugging
18
- */
19
- request: Request;
20
- };
21
-
22
- /** @internal */
23
- export const HTTPMetadata$inboundSchema: z.ZodType<
24
- HTTPMetadata,
25
- z.ZodTypeDef,
26
- unknown
27
- > = z.object({
28
- Response: z.instanceof(Response),
29
- Request: z.instanceof(Request),
30
- }).transform((v) => {
31
- return remap$(v, {
32
- "Response": "response",
33
- "Request": "request",
34
- });
35
- });
36
-
37
- /** @internal */
38
- export type HTTPMetadata$Outbound = {
39
- Response: never;
40
- Request: never;
41
- };
42
-
43
- /** @internal */
44
- export const HTTPMetadata$outboundSchema: z.ZodType<
45
- HTTPMetadata$Outbound,
46
- z.ZodTypeDef,
47
- HTTPMetadata
48
- > = z.object({
49
- response: z.instanceof(Response).transform(() => {
50
- throw new Error("Response cannot be serialized");
51
- }),
52
- request: z.instanceof(Request).transform(() => {
53
- throw new Error("Response cannot be serialized");
54
- }),
55
- }).transform((v) => {
56
- return remap$(v, {
57
- response: "Response",
58
- request: "Request",
59
- });
60
- });
61
-
62
- /**
63
- * @internal
64
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
65
- */
66
- export namespace HTTPMetadata$ {
67
- /** @deprecated use `HTTPMetadata$inboundSchema` instead. */
68
- export const inboundSchema = HTTPMetadata$inboundSchema;
69
- /** @deprecated use `HTTPMetadata$outboundSchema` instead. */
70
- export const outboundSchema = HTTPMetadata$outboundSchema;
71
- /** @deprecated use `HTTPMetadata$Outbound` instead. */
72
- export type Outbound = HTTPMetadata$Outbound;
73
- }
74
-
75
- export function httpMetadataToJSON(httpMetadata: HTTPMetadata): string {
76
- return JSON.stringify(HTTPMetadata$outboundSchema.parse(httpMetadata));
77
- }
78
-
79
- export function httpMetadataFromJSON(
80
- jsonString: string,
81
- ): SafeParseResult<HTTPMetadata, SDKValidationError> {
82
- return safeParse(
83
- jsonString,
84
- (x) => HTTPMetadata$inboundSchema.parse(JSON.parse(x)),
85
- `Failed to parse 'HTTPMetadata' from JSON`,
86
- );
87
- }