@s2-dev/streamstore 0.2.6 → 0.2.7

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.
@@ -10,7 +10,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
  /**
11
11
  * Explicit cell assignment, if it is owned by the account.
12
12
  */
13
- export type Two = {
13
+ export type Cell = {
14
14
  /**
15
15
  * Explicit cell assignment, if it is owned by the account.
16
16
  */
@@ -20,7 +20,7 @@ export type Two = {
20
20
  /**
21
21
  * Basin scope. It should be formatted as "{cloud}:{region}", e.g. "aws:us-east-1".
22
22
  */
23
- export type Assignment1 = {
23
+ export type Scope = {
24
24
  /**
25
25
  * Basin scope. It should be formatted as "{cloud}:{region}", e.g. "aws:us-east-1".
26
26
  */
@@ -30,22 +30,22 @@ export type Assignment1 = {
30
30
  /**
31
31
  * Assignment of the basin to a cloud and region, or an explicit cell.
32
32
  */
33
- export type Assignment = Assignment1 | Two;
33
+ export type Assignment = Scope | Cell;
34
34
 
35
35
  /** @internal */
36
- export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z
36
+ export const Cell$inboundSchema: z.ZodType<Cell, z.ZodTypeDef, unknown> = z
37
37
  .object({
38
38
  cell: z.string(),
39
39
  });
40
40
 
41
41
  /** @internal */
42
- export type Two$Outbound = {
42
+ export type Cell$Outbound = {
43
43
  cell: string;
44
44
  };
45
45
 
46
46
  /** @internal */
47
- export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
48
- .object({
47
+ export const Cell$outboundSchema: z.ZodType<Cell$Outbound, z.ZodTypeDef, Cell> =
48
+ z.object({
49
49
  cell: z.string(),
50
50
  });
51
51
 
@@ -53,48 +53,45 @@ export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
53
53
  * @internal
54
54
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
55
55
  */
56
- export namespace Two$ {
57
- /** @deprecated use `Two$inboundSchema` instead. */
58
- export const inboundSchema = Two$inboundSchema;
59
- /** @deprecated use `Two$outboundSchema` instead. */
60
- export const outboundSchema = Two$outboundSchema;
61
- /** @deprecated use `Two$Outbound` instead. */
62
- export type Outbound = Two$Outbound;
56
+ export namespace Cell$ {
57
+ /** @deprecated use `Cell$inboundSchema` instead. */
58
+ export const inboundSchema = Cell$inboundSchema;
59
+ /** @deprecated use `Cell$outboundSchema` instead. */
60
+ export const outboundSchema = Cell$outboundSchema;
61
+ /** @deprecated use `Cell$Outbound` instead. */
62
+ export type Outbound = Cell$Outbound;
63
63
  }
64
64
 
65
- export function twoToJSON(two: Two): string {
66
- return JSON.stringify(Two$outboundSchema.parse(two));
65
+ export function cellToJSON(cell: Cell): string {
66
+ return JSON.stringify(Cell$outboundSchema.parse(cell));
67
67
  }
68
68
 
69
- export function twoFromJSON(
69
+ export function cellFromJSON(
70
70
  jsonString: string,
71
- ): SafeParseResult<Two, SDKValidationError> {
71
+ ): SafeParseResult<Cell, SDKValidationError> {
72
72
  return safeParse(
73
73
  jsonString,
74
- (x) => Two$inboundSchema.parse(JSON.parse(x)),
75
- `Failed to parse 'Two' from JSON`,
74
+ (x) => Cell$inboundSchema.parse(JSON.parse(x)),
75
+ `Failed to parse 'Cell' from JSON`,
76
76
  );
77
77
  }
78
78
 
79
79
  /** @internal */
80
- export const Assignment1$inboundSchema: z.ZodType<
81
- Assignment1,
82
- z.ZodTypeDef,
83
- unknown
84
- > = z.object({
85
- scope: z.string(),
86
- });
80
+ export const Scope$inboundSchema: z.ZodType<Scope, z.ZodTypeDef, unknown> = z
81
+ .object({
82
+ scope: z.string(),
83
+ });
87
84
 
88
85
  /** @internal */
89
- export type Assignment1$Outbound = {
86
+ export type Scope$Outbound = {
90
87
  scope: string;
91
88
  };
92
89
 
93
90
  /** @internal */
94
- export const Assignment1$outboundSchema: z.ZodType<
95
- Assignment1$Outbound,
91
+ export const Scope$outboundSchema: z.ZodType<
92
+ Scope$Outbound,
96
93
  z.ZodTypeDef,
97
- Assignment1
94
+ Scope
98
95
  > = z.object({
99
96
  scope: z.string(),
100
97
  });
@@ -103,26 +100,26 @@ export const Assignment1$outboundSchema: z.ZodType<
103
100
  * @internal
104
101
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
105
102
  */
106
- export namespace Assignment1$ {
107
- /** @deprecated use `Assignment1$inboundSchema` instead. */
108
- export const inboundSchema = Assignment1$inboundSchema;
109
- /** @deprecated use `Assignment1$outboundSchema` instead. */
110
- export const outboundSchema = Assignment1$outboundSchema;
111
- /** @deprecated use `Assignment1$Outbound` instead. */
112
- export type Outbound = Assignment1$Outbound;
103
+ export namespace Scope$ {
104
+ /** @deprecated use `Scope$inboundSchema` instead. */
105
+ export const inboundSchema = Scope$inboundSchema;
106
+ /** @deprecated use `Scope$outboundSchema` instead. */
107
+ export const outboundSchema = Scope$outboundSchema;
108
+ /** @deprecated use `Scope$Outbound` instead. */
109
+ export type Outbound = Scope$Outbound;
113
110
  }
114
111
 
115
- export function assignment1ToJSON(assignment1: Assignment1): string {
116
- return JSON.stringify(Assignment1$outboundSchema.parse(assignment1));
112
+ export function scopeToJSON(scope: Scope): string {
113
+ return JSON.stringify(Scope$outboundSchema.parse(scope));
117
114
  }
118
115
 
119
- export function assignment1FromJSON(
116
+ export function scopeFromJSON(
120
117
  jsonString: string,
121
- ): SafeParseResult<Assignment1, SDKValidationError> {
118
+ ): SafeParseResult<Scope, SDKValidationError> {
122
119
  return safeParse(
123
120
  jsonString,
124
- (x) => Assignment1$inboundSchema.parse(JSON.parse(x)),
125
- `Failed to parse 'Assignment1' from JSON`,
121
+ (x) => Scope$inboundSchema.parse(JSON.parse(x)),
122
+ `Failed to parse 'Scope' from JSON`,
126
123
  );
127
124
  }
128
125
 
@@ -132,12 +129,12 @@ export const Assignment$inboundSchema: z.ZodType<
132
129
  z.ZodTypeDef,
133
130
  unknown
134
131
  > = z.union([
135
- z.lazy(() => Assignment1$inboundSchema),
136
- z.lazy(() => Two$inboundSchema),
132
+ z.lazy(() => Scope$inboundSchema),
133
+ z.lazy(() => Cell$inboundSchema),
137
134
  ]);
138
135
 
139
136
  /** @internal */
140
- export type Assignment$Outbound = Assignment1$Outbound | Two$Outbound;
137
+ export type Assignment$Outbound = Scope$Outbound | Cell$Outbound;
141
138
 
142
139
  /** @internal */
143
140
  export const Assignment$outboundSchema: z.ZodType<
@@ -145,8 +142,8 @@ export const Assignment$outboundSchema: z.ZodType<
145
142
  z.ZodTypeDef,
146
143
  Assignment
147
144
  > = z.union([
148
- z.lazy(() => Assignment1$outboundSchema),
149
- z.lazy(() => Two$outboundSchema),
145
+ z.lazy(() => Scope$outboundSchema),
146
+ z.lazy(() => Cell$outboundSchema),
150
147
  ]);
151
148
 
152
149
  /**
@@ -20,7 +20,7 @@ import {
20
20
  * @remarks
21
21
  * If returned in a streaming read session, this will be a terminal reply.
22
22
  */
23
- export type Three = {
23
+ export type NextSeqNum = {
24
24
  /**
25
25
  * Sequence number for the next record on this stream, in case the requested `start_seq_num` was larger.
26
26
  *
@@ -37,7 +37,7 @@ export type Three = {
37
37
  * If returned in a streaming read session, this will be a terminal reply, to signal that there is uncertainty about whether some records may be omitted.
38
38
  * The client can re-establish the session starting at this sequence number.
39
39
  */
40
- export type Output2 = {
40
+ export type FirstSeqNum = {
41
41
  /**
42
42
  * Sequence number for the first record on this stream, in case the requested `start_seq_num` is smaller.
43
43
  *
@@ -55,7 +55,7 @@ export type Output2 = {
55
55
  * This batch can be empty only if a `ReadLimit` was provided in the associated read request, but the first record
56
56
  * that could have been returned would violate the limit.
57
57
  */
58
- export type Output1 = {
58
+ export type Batch = {
59
59
  /**
60
60
  * A batch of sequenced records.
61
61
  */
@@ -65,28 +65,31 @@ export type Output1 = {
65
65
  /**
66
66
  * Reply which can be a batch of records, or a sequence number if the request could not be satisfied.
67
67
  */
68
- export type Output = Output1 | Output2 | Three;
68
+ export type Output = Batch | FirstSeqNum | NextSeqNum;
69
69
 
70
70
  /** @internal */
71
- export const Three$inboundSchema: z.ZodType<Three, z.ZodTypeDef, unknown> = z
72
- .object({
73
- next_seq_num: z.number().int(),
74
- }).transform((v) => {
75
- return remap$(v, {
76
- "next_seq_num": "nextSeqNum",
77
- });
71
+ export const NextSeqNum$inboundSchema: z.ZodType<
72
+ NextSeqNum,
73
+ z.ZodTypeDef,
74
+ unknown
75
+ > = z.object({
76
+ next_seq_num: z.number().int(),
77
+ }).transform((v) => {
78
+ return remap$(v, {
79
+ "next_seq_num": "nextSeqNum",
78
80
  });
81
+ });
79
82
 
80
83
  /** @internal */
81
- export type Three$Outbound = {
84
+ export type NextSeqNum$Outbound = {
82
85
  next_seq_num: number;
83
86
  };
84
87
 
85
88
  /** @internal */
86
- export const Three$outboundSchema: z.ZodType<
87
- Three$Outbound,
89
+ export const NextSeqNum$outboundSchema: z.ZodType<
90
+ NextSeqNum$Outbound,
88
91
  z.ZodTypeDef,
89
- Three
92
+ NextSeqNum
90
93
  > = z.object({
91
94
  nextSeqNum: z.number().int(),
92
95
  }).transform((v) => {
@@ -99,49 +102,52 @@ export const Three$outboundSchema: z.ZodType<
99
102
  * @internal
100
103
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
101
104
  */
102
- export namespace Three$ {
103
- /** @deprecated use `Three$inboundSchema` instead. */
104
- export const inboundSchema = Three$inboundSchema;
105
- /** @deprecated use `Three$outboundSchema` instead. */
106
- export const outboundSchema = Three$outboundSchema;
107
- /** @deprecated use `Three$Outbound` instead. */
108
- export type Outbound = Three$Outbound;
105
+ export namespace NextSeqNum$ {
106
+ /** @deprecated use `NextSeqNum$inboundSchema` instead. */
107
+ export const inboundSchema = NextSeqNum$inboundSchema;
108
+ /** @deprecated use `NextSeqNum$outboundSchema` instead. */
109
+ export const outboundSchema = NextSeqNum$outboundSchema;
110
+ /** @deprecated use `NextSeqNum$Outbound` instead. */
111
+ export type Outbound = NextSeqNum$Outbound;
109
112
  }
110
113
 
111
- export function threeToJSON(three: Three): string {
112
- return JSON.stringify(Three$outboundSchema.parse(three));
114
+ export function nextSeqNumToJSON(nextSeqNum: NextSeqNum): string {
115
+ return JSON.stringify(NextSeqNum$outboundSchema.parse(nextSeqNum));
113
116
  }
114
117
 
115
- export function threeFromJSON(
118
+ export function nextSeqNumFromJSON(
116
119
  jsonString: string,
117
- ): SafeParseResult<Three, SDKValidationError> {
120
+ ): SafeParseResult<NextSeqNum, SDKValidationError> {
118
121
  return safeParse(
119
122
  jsonString,
120
- (x) => Three$inboundSchema.parse(JSON.parse(x)),
121
- `Failed to parse 'Three' from JSON`,
123
+ (x) => NextSeqNum$inboundSchema.parse(JSON.parse(x)),
124
+ `Failed to parse 'NextSeqNum' from JSON`,
122
125
  );
123
126
  }
124
127
 
125
128
  /** @internal */
126
- export const Output2$inboundSchema: z.ZodType<Output2, z.ZodTypeDef, unknown> =
127
- z.object({
128
- first_seq_num: z.number().int(),
129
- }).transform((v) => {
130
- return remap$(v, {
131
- "first_seq_num": "firstSeqNum",
132
- });
129
+ export const FirstSeqNum$inboundSchema: z.ZodType<
130
+ FirstSeqNum,
131
+ z.ZodTypeDef,
132
+ unknown
133
+ > = z.object({
134
+ first_seq_num: z.number().int(),
135
+ }).transform((v) => {
136
+ return remap$(v, {
137
+ "first_seq_num": "firstSeqNum",
133
138
  });
139
+ });
134
140
 
135
141
  /** @internal */
136
- export type Output2$Outbound = {
142
+ export type FirstSeqNum$Outbound = {
137
143
  first_seq_num: number;
138
144
  };
139
145
 
140
146
  /** @internal */
141
- export const Output2$outboundSchema: z.ZodType<
142
- Output2$Outbound,
147
+ export const FirstSeqNum$outboundSchema: z.ZodType<
148
+ FirstSeqNum$Outbound,
143
149
  z.ZodTypeDef,
144
- Output2
150
+ FirstSeqNum
145
151
  > = z.object({
146
152
  firstSeqNum: z.number().int(),
147
153
  }).transform((v) => {
@@ -154,45 +160,45 @@ export const Output2$outboundSchema: z.ZodType<
154
160
  * @internal
155
161
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
156
162
  */
157
- export namespace Output2$ {
158
- /** @deprecated use `Output2$inboundSchema` instead. */
159
- export const inboundSchema = Output2$inboundSchema;
160
- /** @deprecated use `Output2$outboundSchema` instead. */
161
- export const outboundSchema = Output2$outboundSchema;
162
- /** @deprecated use `Output2$Outbound` instead. */
163
- export type Outbound = Output2$Outbound;
163
+ export namespace FirstSeqNum$ {
164
+ /** @deprecated use `FirstSeqNum$inboundSchema` instead. */
165
+ export const inboundSchema = FirstSeqNum$inboundSchema;
166
+ /** @deprecated use `FirstSeqNum$outboundSchema` instead. */
167
+ export const outboundSchema = FirstSeqNum$outboundSchema;
168
+ /** @deprecated use `FirstSeqNum$Outbound` instead. */
169
+ export type Outbound = FirstSeqNum$Outbound;
164
170
  }
165
171
 
166
- export function output2ToJSON(output2: Output2): string {
167
- return JSON.stringify(Output2$outboundSchema.parse(output2));
172
+ export function firstSeqNumToJSON(firstSeqNum: FirstSeqNum): string {
173
+ return JSON.stringify(FirstSeqNum$outboundSchema.parse(firstSeqNum));
168
174
  }
169
175
 
170
- export function output2FromJSON(
176
+ export function firstSeqNumFromJSON(
171
177
  jsonString: string,
172
- ): SafeParseResult<Output2, SDKValidationError> {
178
+ ): SafeParseResult<FirstSeqNum, SDKValidationError> {
173
179
  return safeParse(
174
180
  jsonString,
175
- (x) => Output2$inboundSchema.parse(JSON.parse(x)),
176
- `Failed to parse 'Output2' from JSON`,
181
+ (x) => FirstSeqNum$inboundSchema.parse(JSON.parse(x)),
182
+ `Failed to parse 'FirstSeqNum' from JSON`,
177
183
  );
178
184
  }
179
185
 
180
186
  /** @internal */
181
- export const Output1$inboundSchema: z.ZodType<Output1, z.ZodTypeDef, unknown> =
182
- z.object({
187
+ export const Batch$inboundSchema: z.ZodType<Batch, z.ZodTypeDef, unknown> = z
188
+ .object({
183
189
  batch: SequencedRecordBatch$inboundSchema,
184
190
  });
185
191
 
186
192
  /** @internal */
187
- export type Output1$Outbound = {
193
+ export type Batch$Outbound = {
188
194
  batch: SequencedRecordBatch$Outbound;
189
195
  };
190
196
 
191
197
  /** @internal */
192
- export const Output1$outboundSchema: z.ZodType<
193
- Output1$Outbound,
198
+ export const Batch$outboundSchema: z.ZodType<
199
+ Batch$Outbound,
194
200
  z.ZodTypeDef,
195
- Output1
201
+ Batch
196
202
  > = z.object({
197
203
  batch: SequencedRecordBatch$outboundSchema,
198
204
  });
@@ -201,42 +207,42 @@ export const Output1$outboundSchema: z.ZodType<
201
207
  * @internal
202
208
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
203
209
  */
204
- export namespace Output1$ {
205
- /** @deprecated use `Output1$inboundSchema` instead. */
206
- export const inboundSchema = Output1$inboundSchema;
207
- /** @deprecated use `Output1$outboundSchema` instead. */
208
- export const outboundSchema = Output1$outboundSchema;
209
- /** @deprecated use `Output1$Outbound` instead. */
210
- export type Outbound = Output1$Outbound;
210
+ export namespace Batch$ {
211
+ /** @deprecated use `Batch$inboundSchema` instead. */
212
+ export const inboundSchema = Batch$inboundSchema;
213
+ /** @deprecated use `Batch$outboundSchema` instead. */
214
+ export const outboundSchema = Batch$outboundSchema;
215
+ /** @deprecated use `Batch$Outbound` instead. */
216
+ export type Outbound = Batch$Outbound;
211
217
  }
212
218
 
213
- export function output1ToJSON(output1: Output1): string {
214
- return JSON.stringify(Output1$outboundSchema.parse(output1));
219
+ export function batchToJSON(batch: Batch): string {
220
+ return JSON.stringify(Batch$outboundSchema.parse(batch));
215
221
  }
216
222
 
217
- export function output1FromJSON(
223
+ export function batchFromJSON(
218
224
  jsonString: string,
219
- ): SafeParseResult<Output1, SDKValidationError> {
225
+ ): SafeParseResult<Batch, SDKValidationError> {
220
226
  return safeParse(
221
227
  jsonString,
222
- (x) => Output1$inboundSchema.parse(JSON.parse(x)),
223
- `Failed to parse 'Output1' from JSON`,
228
+ (x) => Batch$inboundSchema.parse(JSON.parse(x)),
229
+ `Failed to parse 'Batch' from JSON`,
224
230
  );
225
231
  }
226
232
 
227
233
  /** @internal */
228
234
  export const Output$inboundSchema: z.ZodType<Output, z.ZodTypeDef, unknown> = z
229
235
  .union([
230
- z.lazy(() => Output1$inboundSchema),
231
- z.lazy(() => Output2$inboundSchema),
232
- z.lazy(() => Three$inboundSchema),
236
+ z.lazy(() => Batch$inboundSchema),
237
+ z.lazy(() => FirstSeqNum$inboundSchema),
238
+ z.lazy(() => NextSeqNum$inboundSchema),
233
239
  ]);
234
240
 
235
241
  /** @internal */
236
242
  export type Output$Outbound =
237
- | Output1$Outbound
238
- | Output2$Outbound
239
- | Three$Outbound;
243
+ | Batch$Outbound
244
+ | FirstSeqNum$Outbound
245
+ | NextSeqNum$Outbound;
240
246
 
241
247
  /** @internal */
242
248
  export const Output$outboundSchema: z.ZodType<
@@ -244,9 +250,9 @@ export const Output$outboundSchema: z.ZodType<
244
250
  z.ZodTypeDef,
245
251
  Output
246
252
  > = z.union([
247
- z.lazy(() => Output1$outboundSchema),
248
- z.lazy(() => Output2$outboundSchema),
249
- z.lazy(() => Three$outboundSchema),
253
+ z.lazy(() => Batch$outboundSchema),
254
+ z.lazy(() => FirstSeqNum$outboundSchema),
255
+ z.lazy(() => NextSeqNum$outboundSchema),
250
256
  ]);
251
257
 
252
258
  /**
@@ -13,12 +13,12 @@ import {
13
13
  Output$outboundSchema,
14
14
  } from "./output.js";
15
15
 
16
- export type ReadResponse2 = {
16
+ export type ErrorT = {
17
17
  data: string;
18
18
  event: string;
19
19
  };
20
20
 
21
- export type ReadResponse1 = {
21
+ export type ReadResponseOutput = {
22
22
  /**
23
23
  * Reply which can be a batch of records, or a sequence number if the request could not be satisfied.
24
24
  */
@@ -26,29 +26,26 @@ export type ReadResponse1 = {
26
26
  event: string;
27
27
  };
28
28
 
29
- export type ReadResponse = ReadResponse1 | ReadResponse2;
29
+ export type ReadResponse = ReadResponseOutput | ErrorT;
30
30
 
31
31
  /** @internal */
32
- export const ReadResponse2$inboundSchema: z.ZodType<
33
- ReadResponse2,
34
- z.ZodTypeDef,
35
- unknown
36
- > = z.object({
37
- data: z.string(),
38
- event: z.string(),
39
- });
32
+ export const ErrorT$inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown> = z
33
+ .object({
34
+ data: z.string(),
35
+ event: z.string(),
36
+ });
40
37
 
41
38
  /** @internal */
42
- export type ReadResponse2$Outbound = {
39
+ export type ErrorT$Outbound = {
43
40
  data: string;
44
41
  event: string;
45
42
  };
46
43
 
47
44
  /** @internal */
48
- export const ReadResponse2$outboundSchema: z.ZodType<
49
- ReadResponse2$Outbound,
45
+ export const ErrorT$outboundSchema: z.ZodType<
46
+ ErrorT$Outbound,
50
47
  z.ZodTypeDef,
51
- ReadResponse2
48
+ ErrorT
52
49
  > = z.object({
53
50
  data: z.string(),
54
51
  event: z.string(),
@@ -58,32 +55,32 @@ export const ReadResponse2$outboundSchema: z.ZodType<
58
55
  * @internal
59
56
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
60
57
  */
61
- export namespace ReadResponse2$ {
62
- /** @deprecated use `ReadResponse2$inboundSchema` instead. */
63
- export const inboundSchema = ReadResponse2$inboundSchema;
64
- /** @deprecated use `ReadResponse2$outboundSchema` instead. */
65
- export const outboundSchema = ReadResponse2$outboundSchema;
66
- /** @deprecated use `ReadResponse2$Outbound` instead. */
67
- export type Outbound = ReadResponse2$Outbound;
58
+ export namespace ErrorT$ {
59
+ /** @deprecated use `ErrorT$inboundSchema` instead. */
60
+ export const inboundSchema = ErrorT$inboundSchema;
61
+ /** @deprecated use `ErrorT$outboundSchema` instead. */
62
+ export const outboundSchema = ErrorT$outboundSchema;
63
+ /** @deprecated use `ErrorT$Outbound` instead. */
64
+ export type Outbound = ErrorT$Outbound;
68
65
  }
69
66
 
70
- export function readResponse2ToJSON(readResponse2: ReadResponse2): string {
71
- return JSON.stringify(ReadResponse2$outboundSchema.parse(readResponse2));
67
+ export function errorToJSON(errorT: ErrorT): string {
68
+ return JSON.stringify(ErrorT$outboundSchema.parse(errorT));
72
69
  }
73
70
 
74
- export function readResponse2FromJSON(
71
+ export function errorFromJSON(
75
72
  jsonString: string,
76
- ): SafeParseResult<ReadResponse2, SDKValidationError> {
73
+ ): SafeParseResult<ErrorT, SDKValidationError> {
77
74
  return safeParse(
78
75
  jsonString,
79
- (x) => ReadResponse2$inboundSchema.parse(JSON.parse(x)),
80
- `Failed to parse 'ReadResponse2' from JSON`,
76
+ (x) => ErrorT$inboundSchema.parse(JSON.parse(x)),
77
+ `Failed to parse 'ErrorT' from JSON`,
81
78
  );
82
79
  }
83
80
 
84
81
  /** @internal */
85
- export const ReadResponse1$inboundSchema: z.ZodType<
86
- ReadResponse1,
82
+ export const ReadResponseOutput$inboundSchema: z.ZodType<
83
+ ReadResponseOutput,
87
84
  z.ZodTypeDef,
88
85
  unknown
89
86
  > = z.object({
@@ -102,16 +99,16 @@ export const ReadResponse1$inboundSchema: z.ZodType<
102
99
  });
103
100
 
104
101
  /** @internal */
105
- export type ReadResponse1$Outbound = {
102
+ export type ReadResponseOutput$Outbound = {
106
103
  data: Output$Outbound;
107
104
  event: string;
108
105
  };
109
106
 
110
107
  /** @internal */
111
- export const ReadResponse1$outboundSchema: z.ZodType<
112
- ReadResponse1$Outbound,
108
+ export const ReadResponseOutput$outboundSchema: z.ZodType<
109
+ ReadResponseOutput$Outbound,
113
110
  z.ZodTypeDef,
114
- ReadResponse1
111
+ ReadResponseOutput
115
112
  > = z.object({
116
113
  data: Output$outboundSchema,
117
114
  event: z.string(),
@@ -121,26 +118,30 @@ export const ReadResponse1$outboundSchema: z.ZodType<
121
118
  * @internal
122
119
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
123
120
  */
124
- export namespace ReadResponse1$ {
125
- /** @deprecated use `ReadResponse1$inboundSchema` instead. */
126
- export const inboundSchema = ReadResponse1$inboundSchema;
127
- /** @deprecated use `ReadResponse1$outboundSchema` instead. */
128
- export const outboundSchema = ReadResponse1$outboundSchema;
129
- /** @deprecated use `ReadResponse1$Outbound` instead. */
130
- export type Outbound = ReadResponse1$Outbound;
121
+ export namespace ReadResponseOutput$ {
122
+ /** @deprecated use `ReadResponseOutput$inboundSchema` instead. */
123
+ export const inboundSchema = ReadResponseOutput$inboundSchema;
124
+ /** @deprecated use `ReadResponseOutput$outboundSchema` instead. */
125
+ export const outboundSchema = ReadResponseOutput$outboundSchema;
126
+ /** @deprecated use `ReadResponseOutput$Outbound` instead. */
127
+ export type Outbound = ReadResponseOutput$Outbound;
131
128
  }
132
129
 
133
- export function readResponse1ToJSON(readResponse1: ReadResponse1): string {
134
- return JSON.stringify(ReadResponse1$outboundSchema.parse(readResponse1));
130
+ export function readResponseOutputToJSON(
131
+ readResponseOutput: ReadResponseOutput,
132
+ ): string {
133
+ return JSON.stringify(
134
+ ReadResponseOutput$outboundSchema.parse(readResponseOutput),
135
+ );
135
136
  }
136
137
 
137
- export function readResponse1FromJSON(
138
+ export function readResponseOutputFromJSON(
138
139
  jsonString: string,
139
- ): SafeParseResult<ReadResponse1, SDKValidationError> {
140
+ ): SafeParseResult<ReadResponseOutput, SDKValidationError> {
140
141
  return safeParse(
141
142
  jsonString,
142
- (x) => ReadResponse1$inboundSchema.parse(JSON.parse(x)),
143
- `Failed to parse 'ReadResponse1' from JSON`,
143
+ (x) => ReadResponseOutput$inboundSchema.parse(JSON.parse(x)),
144
+ `Failed to parse 'ReadResponseOutput' from JSON`,
144
145
  );
145
146
  }
146
147
 
@@ -150,14 +151,14 @@ export const ReadResponse$inboundSchema: z.ZodType<
150
151
  z.ZodTypeDef,
151
152
  unknown
152
153
  > = z.union([
153
- z.lazy(() => ReadResponse1$inboundSchema),
154
- z.lazy(() => ReadResponse2$inboundSchema),
154
+ z.lazy(() => ReadResponseOutput$inboundSchema),
155
+ z.lazy(() => ErrorT$inboundSchema),
155
156
  ]);
156
157
 
157
158
  /** @internal */
158
159
  export type ReadResponse$Outbound =
159
- | ReadResponse1$Outbound
160
- | ReadResponse2$Outbound;
160
+ | ReadResponseOutput$Outbound
161
+ | ErrorT$Outbound;
161
162
 
162
163
  /** @internal */
163
164
  export const ReadResponse$outboundSchema: z.ZodType<
@@ -165,8 +166,8 @@ export const ReadResponse$outboundSchema: z.ZodType<
165
166
  z.ZodTypeDef,
166
167
  ReadResponse
167
168
  > = z.union([
168
- z.lazy(() => ReadResponse1$outboundSchema),
169
- z.lazy(() => ReadResponse2$outboundSchema),
169
+ z.lazy(() => ReadResponseOutput$outboundSchema),
170
+ z.lazy(() => ErrorT$outboundSchema),
170
171
  ]);
171
172
 
172
173
  /**