@s2-dev/streamstore 0.13.2 → 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mcp-server.js +1040 -974
- package/bin/mcp-server.js.map +17 -8
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/errors/appendconditionfailed.d.ts +36 -36
- package/dist/commonjs/models/errors/appendconditionfailed.d.ts.map +1 -1
- package/dist/commonjs/models/errors/appendconditionfailed.js +40 -40
- package/dist/commonjs/models/errors/appendconditionfailed.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/errors/appendconditionfailed.d.ts +36 -36
- package/dist/esm/models/errors/appendconditionfailed.d.ts.map +1 -1
- package/dist/esm/models/errors/appendconditionfailed.js +37 -37
- package/dist/esm/models/errors/appendconditionfailed.js.map +1 -1
- package/docs/sdks/records/README.md +2 -2
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/errors/appendconditionfailed.ts +67 -53
|
@@ -10,7 +10,7 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
10
10
|
* @remarks
|
|
11
11
|
* The expected next sequence number is returned.
|
|
12
12
|
*/
|
|
13
|
-
export class
|
|
13
|
+
export class SeqNum extends Error {
|
|
14
14
|
constructor(err) {
|
|
15
15
|
const message = "message" in err && typeof err.message === "string"
|
|
16
16
|
? err.message
|
|
@@ -18,16 +18,16 @@ export class Two extends Error {
|
|
|
18
18
|
super(message);
|
|
19
19
|
this.data$ = err;
|
|
20
20
|
this.seqNumMismatch = err.seqNumMismatch;
|
|
21
|
-
this.name = "
|
|
21
|
+
this.name = "SeqNum";
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Fencing token did not match.
|
|
26
26
|
*
|
|
27
27
|
* @remarks
|
|
28
|
-
* The expected fencing token is returned.
|
|
28
|
+
* The expected fencing token is returned, encoded with base64.
|
|
29
29
|
*/
|
|
30
|
-
export class
|
|
30
|
+
export class FencingToken extends Error {
|
|
31
31
|
constructor(err) {
|
|
32
32
|
const message = "message" in err && typeof err.message === "string"
|
|
33
33
|
? err.message
|
|
@@ -35,81 +35,81 @@ export class One extends Error {
|
|
|
35
35
|
super(message);
|
|
36
36
|
this.data$ = err;
|
|
37
37
|
this.fencingTokenMismatch = err.fencingTokenMismatch;
|
|
38
|
-
this.name = "
|
|
38
|
+
this.name = "FencingToken";
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
/** @internal */
|
|
42
|
-
export const
|
|
42
|
+
export const SeqNum$inboundSchema = z
|
|
43
43
|
.object({
|
|
44
|
-
|
|
44
|
+
seq_num_mismatch: z.number().int(),
|
|
45
45
|
})
|
|
46
46
|
.transform((v) => {
|
|
47
47
|
const remapped = remap$(v, {
|
|
48
|
-
"
|
|
48
|
+
"seq_num_mismatch": "seqNumMismatch",
|
|
49
49
|
});
|
|
50
|
-
return new
|
|
50
|
+
return new SeqNum(remapped);
|
|
51
51
|
});
|
|
52
52
|
/** @internal */
|
|
53
|
-
export const
|
|
54
|
-
.instanceof(Two)
|
|
53
|
+
export const SeqNum$outboundSchema = z.instanceof(SeqNum)
|
|
55
54
|
.transform(v => v.data$)
|
|
56
55
|
.pipe(z.object({
|
|
57
56
|
seqNumMismatch: z.number().int(),
|
|
58
57
|
}).transform((v) => {
|
|
59
58
|
return remap$(v, {
|
|
60
|
-
seqNumMismatch: "
|
|
59
|
+
seqNumMismatch: "seq_num_mismatch",
|
|
61
60
|
});
|
|
62
61
|
}));
|
|
63
62
|
/**
|
|
64
63
|
* @internal
|
|
65
64
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
66
65
|
*/
|
|
67
|
-
export var
|
|
68
|
-
(function (
|
|
69
|
-
/** @deprecated use `
|
|
70
|
-
|
|
71
|
-
/** @deprecated use `
|
|
72
|
-
|
|
73
|
-
})(
|
|
66
|
+
export var SeqNum$;
|
|
67
|
+
(function (SeqNum$) {
|
|
68
|
+
/** @deprecated use `SeqNum$inboundSchema` instead. */
|
|
69
|
+
SeqNum$.inboundSchema = SeqNum$inboundSchema;
|
|
70
|
+
/** @deprecated use `SeqNum$outboundSchema` instead. */
|
|
71
|
+
SeqNum$.outboundSchema = SeqNum$outboundSchema;
|
|
72
|
+
})(SeqNum$ || (SeqNum$ = {}));
|
|
74
73
|
/** @internal */
|
|
75
|
-
export const
|
|
76
|
-
.
|
|
77
|
-
FencingTokenMismatch: z.string(),
|
|
74
|
+
export const FencingToken$inboundSchema = z.object({
|
|
75
|
+
fencing_token_mismatch: z.string(),
|
|
78
76
|
})
|
|
79
77
|
.transform((v) => {
|
|
80
78
|
const remapped = remap$(v, {
|
|
81
|
-
"
|
|
79
|
+
"fencing_token_mismatch": "fencingTokenMismatch",
|
|
82
80
|
});
|
|
83
|
-
return new
|
|
81
|
+
return new FencingToken(remapped);
|
|
84
82
|
});
|
|
85
83
|
/** @internal */
|
|
86
|
-
export const
|
|
87
|
-
.instanceof(One)
|
|
84
|
+
export const FencingToken$outboundSchema = z.instanceof(FencingToken)
|
|
88
85
|
.transform(v => v.data$)
|
|
89
86
|
.pipe(z.object({
|
|
90
87
|
fencingTokenMismatch: z.string(),
|
|
91
88
|
}).transform((v) => {
|
|
92
89
|
return remap$(v, {
|
|
93
|
-
fencingTokenMismatch: "
|
|
90
|
+
fencingTokenMismatch: "fencing_token_mismatch",
|
|
94
91
|
});
|
|
95
92
|
}));
|
|
96
93
|
/**
|
|
97
94
|
* @internal
|
|
98
95
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
99
96
|
*/
|
|
100
|
-
export var
|
|
101
|
-
(function (
|
|
102
|
-
/** @deprecated use `
|
|
103
|
-
|
|
104
|
-
/** @deprecated use `
|
|
105
|
-
|
|
106
|
-
})(
|
|
97
|
+
export var FencingToken$;
|
|
98
|
+
(function (FencingToken$) {
|
|
99
|
+
/** @deprecated use `FencingToken$inboundSchema` instead. */
|
|
100
|
+
FencingToken$.inboundSchema = FencingToken$inboundSchema;
|
|
101
|
+
/** @deprecated use `FencingToken$outboundSchema` instead. */
|
|
102
|
+
FencingToken$.outboundSchema = FencingToken$outboundSchema;
|
|
103
|
+
})(FencingToken$ || (FencingToken$ = {}));
|
|
107
104
|
/** @internal */
|
|
108
|
-
export const AppendConditionFailed$inboundSchema = z.union([
|
|
105
|
+
export const AppendConditionFailed$inboundSchema = z.union([
|
|
106
|
+
z.lazy(() => FencingToken$inboundSchema),
|
|
107
|
+
z.lazy(() => SeqNum$inboundSchema),
|
|
108
|
+
]);
|
|
109
109
|
/** @internal */
|
|
110
110
|
export const AppendConditionFailed$outboundSchema = z.union([
|
|
111
|
-
z.lazy(() =>
|
|
112
|
-
z.lazy(() =>
|
|
111
|
+
z.lazy(() => FencingToken$outboundSchema),
|
|
112
|
+
z.lazy(() => SeqNum$outboundSchema),
|
|
113
113
|
]);
|
|
114
114
|
/**
|
|
115
115
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appendconditionfailed.js","sourceRoot":"","sources":["../../../../src/models/errors/appendconditionfailed.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAoBjD;;;;;GAKG;AACH,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"appendconditionfailed.js","sourceRoot":"","sources":["../../../../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AAC,EAPgB,sBAAsB,KAAtB,sBAAsB,QAOtC;AAED,MAAM,UAAU,2BAA2B,CACzC,qBAA4C;IAE5C,OAAO,IAAI,CAAC,SAAS,CACnB,oCAAoC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAClE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,mCAAmC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC/D,mDAAmD,CACpD,CAAC;AACJ,CAAC"}
|
|
@@ -187,8 +187,8 @@ run();
|
|
|
187
187
|
| Error Type | Status Code | Content Type |
|
|
188
188
|
| -------------------- | -------------------- | -------------------- |
|
|
189
189
|
| errors.ErrorResponse | 400, 401, 404, 409 | application/json |
|
|
190
|
-
| errors.
|
|
191
|
-
| errors.
|
|
190
|
+
| errors.FencingToken | 412 | application/json |
|
|
191
|
+
| errors.SeqNum | 412 | application/json |
|
|
192
192
|
| errors.ErrorResponse | 500 | application/json |
|
|
193
193
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
194
194
|
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@s2-dev/streamstore",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"author": "Speakeasy",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"tshy": "^2.0.0",
|
|
57
57
|
"typescript": "^5.4.5",
|
|
58
58
|
"typescript-eslint": "^8.22.0",
|
|
59
|
-
"zod": "^3.
|
|
59
|
+
"zod": "^3.25.17"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"jsonpath-rfc9535": "1.1.0",
|
package/src/lib/config.ts
CHANGED
|
@@ -54,8 +54,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
54
54
|
export const SDK_METADATA = {
|
|
55
55
|
language: "typescript",
|
|
56
56
|
openapiDocVersion: "1.0.0",
|
|
57
|
-
sdkVersion: "0.13.
|
|
58
|
-
genVersion: "2.
|
|
57
|
+
sdkVersion: "0.13.3",
|
|
58
|
+
genVersion: "2.610.0",
|
|
59
59
|
userAgent:
|
|
60
|
-
"speakeasy-sdk/typescript 0.13.
|
|
60
|
+
"speakeasy-sdk/typescript 0.13.3 2.610.0 1.0.0 @s2-dev/streamstore",
|
|
61
61
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { SDKValidationError } from "./sdkvalidationerror.js";
|
|
|
14
14
|
* @remarks
|
|
15
15
|
* The expected next sequence number is returned.
|
|
16
16
|
*/
|
|
17
|
-
export type
|
|
17
|
+
export type SeqNumData = {
|
|
18
18
|
/**
|
|
19
19
|
* Sequence number did not match the tail of the stream.
|
|
20
20
|
*
|
|
@@ -30,7 +30,7 @@ export type TwoData = {
|
|
|
30
30
|
* @remarks
|
|
31
31
|
* The expected next sequence number is returned.
|
|
32
32
|
*/
|
|
33
|
-
export class
|
|
33
|
+
export class SeqNum extends Error {
|
|
34
34
|
/**
|
|
35
35
|
* Sequence number did not match the tail of the stream.
|
|
36
36
|
*
|
|
@@ -40,9 +40,9 @@ export class Two extends Error {
|
|
|
40
40
|
seqNumMismatch: number;
|
|
41
41
|
|
|
42
42
|
/** The original data that was passed to this error instance. */
|
|
43
|
-
data$:
|
|
43
|
+
data$: SeqNumData;
|
|
44
44
|
|
|
45
|
-
constructor(err:
|
|
45
|
+
constructor(err: SeqNumData) {
|
|
46
46
|
const message = "message" in err && typeof err.message === "string"
|
|
47
47
|
? err.message
|
|
48
48
|
: `API error occurred: ${JSON.stringify(err)}`;
|
|
@@ -51,7 +51,7 @@ export class Two extends Error {
|
|
|
51
51
|
|
|
52
52
|
this.seqNumMismatch = err.seqNumMismatch;
|
|
53
53
|
|
|
54
|
-
this.name = "
|
|
54
|
+
this.name = "SeqNum";
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -59,14 +59,14 @@ export class Two extends Error {
|
|
|
59
59
|
* Fencing token did not match.
|
|
60
60
|
*
|
|
61
61
|
* @remarks
|
|
62
|
-
* The expected fencing token is returned.
|
|
62
|
+
* The expected fencing token is returned, encoded with base64.
|
|
63
63
|
*/
|
|
64
|
-
export type
|
|
64
|
+
export type FencingTokenData = {
|
|
65
65
|
/**
|
|
66
66
|
* Fencing token did not match.
|
|
67
67
|
*
|
|
68
68
|
* @remarks
|
|
69
|
-
* The expected fencing token is returned.
|
|
69
|
+
* The expected fencing token is returned, encoded with base64.
|
|
70
70
|
*/
|
|
71
71
|
fencingTokenMismatch: string;
|
|
72
72
|
};
|
|
@@ -75,21 +75,21 @@ export type OneData = {
|
|
|
75
75
|
* Fencing token did not match.
|
|
76
76
|
*
|
|
77
77
|
* @remarks
|
|
78
|
-
* The expected fencing token is returned.
|
|
78
|
+
* The expected fencing token is returned, encoded with base64.
|
|
79
79
|
*/
|
|
80
|
-
export class
|
|
80
|
+
export class FencingToken extends Error {
|
|
81
81
|
/**
|
|
82
82
|
* Fencing token did not match.
|
|
83
83
|
*
|
|
84
84
|
* @remarks
|
|
85
|
-
* The expected fencing token is returned.
|
|
85
|
+
* The expected fencing token is returned, encoded with base64.
|
|
86
86
|
*/
|
|
87
87
|
fencingTokenMismatch: string;
|
|
88
88
|
|
|
89
89
|
/** The original data that was passed to this error instance. */
|
|
90
|
-
data$:
|
|
90
|
+
data$: FencingTokenData;
|
|
91
91
|
|
|
92
|
-
constructor(err:
|
|
92
|
+
constructor(err: FencingTokenData) {
|
|
93
93
|
const message = "message" in err && typeof err.message === "string"
|
|
94
94
|
? err.message
|
|
95
95
|
: `API error occurred: ${JSON.stringify(err)}`;
|
|
@@ -98,43 +98,46 @@ export class One extends Error {
|
|
|
98
98
|
|
|
99
99
|
this.fencingTokenMismatch = err.fencingTokenMismatch;
|
|
100
100
|
|
|
101
|
-
this.name = "
|
|
101
|
+
this.name = "FencingToken";
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Failure response message when an Append is aborted due to a failed condition.
|
|
107
107
|
*/
|
|
108
|
-
export type AppendConditionFailed =
|
|
108
|
+
export type AppendConditionFailed = FencingToken | SeqNum;
|
|
109
109
|
|
|
110
110
|
/** @internal */
|
|
111
|
-
export const
|
|
111
|
+
export const SeqNum$inboundSchema: z.ZodType<SeqNum, z.ZodTypeDef, unknown> = z
|
|
112
112
|
.object({
|
|
113
|
-
|
|
113
|
+
seq_num_mismatch: z.number().int(),
|
|
114
114
|
})
|
|
115
115
|
.transform((v) => {
|
|
116
116
|
const remapped = remap$(v, {
|
|
117
|
-
"
|
|
117
|
+
"seq_num_mismatch": "seqNumMismatch",
|
|
118
118
|
});
|
|
119
119
|
|
|
120
|
-
return new
|
|
120
|
+
return new SeqNum(remapped);
|
|
121
121
|
});
|
|
122
122
|
|
|
123
123
|
/** @internal */
|
|
124
|
-
export type
|
|
125
|
-
|
|
124
|
+
export type SeqNum$Outbound = {
|
|
125
|
+
seq_num_mismatch: number;
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
/** @internal */
|
|
129
|
-
export const
|
|
130
|
-
|
|
129
|
+
export const SeqNum$outboundSchema: z.ZodType<
|
|
130
|
+
SeqNum$Outbound,
|
|
131
|
+
z.ZodTypeDef,
|
|
132
|
+
SeqNum
|
|
133
|
+
> = z.instanceof(SeqNum)
|
|
131
134
|
.transform(v => v.data$)
|
|
132
135
|
.pipe(
|
|
133
136
|
z.object({
|
|
134
137
|
seqNumMismatch: z.number().int(),
|
|
135
138
|
}).transform((v) => {
|
|
136
139
|
return remap$(v, {
|
|
137
|
-
seqNumMismatch: "
|
|
140
|
+
seqNumMismatch: "seq_num_mismatch",
|
|
138
141
|
});
|
|
139
142
|
}),
|
|
140
143
|
);
|
|
@@ -143,43 +146,49 @@ export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
|
|
|
143
146
|
* @internal
|
|
144
147
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
145
148
|
*/
|
|
146
|
-
export namespace
|
|
147
|
-
/** @deprecated use `
|
|
148
|
-
export const inboundSchema =
|
|
149
|
-
/** @deprecated use `
|
|
150
|
-
export const outboundSchema =
|
|
151
|
-
/** @deprecated use `
|
|
152
|
-
export type Outbound =
|
|
149
|
+
export namespace SeqNum$ {
|
|
150
|
+
/** @deprecated use `SeqNum$inboundSchema` instead. */
|
|
151
|
+
export const inboundSchema = SeqNum$inboundSchema;
|
|
152
|
+
/** @deprecated use `SeqNum$outboundSchema` instead. */
|
|
153
|
+
export const outboundSchema = SeqNum$outboundSchema;
|
|
154
|
+
/** @deprecated use `SeqNum$Outbound` instead. */
|
|
155
|
+
export type Outbound = SeqNum$Outbound;
|
|
153
156
|
}
|
|
154
157
|
|
|
155
158
|
/** @internal */
|
|
156
|
-
export const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
export const FencingToken$inboundSchema: z.ZodType<
|
|
160
|
+
FencingToken,
|
|
161
|
+
z.ZodTypeDef,
|
|
162
|
+
unknown
|
|
163
|
+
> = z.object({
|
|
164
|
+
fencing_token_mismatch: z.string(),
|
|
165
|
+
})
|
|
160
166
|
.transform((v) => {
|
|
161
167
|
const remapped = remap$(v, {
|
|
162
|
-
"
|
|
168
|
+
"fencing_token_mismatch": "fencingTokenMismatch",
|
|
163
169
|
});
|
|
164
170
|
|
|
165
|
-
return new
|
|
171
|
+
return new FencingToken(remapped);
|
|
166
172
|
});
|
|
167
173
|
|
|
168
174
|
/** @internal */
|
|
169
|
-
export type
|
|
170
|
-
|
|
175
|
+
export type FencingToken$Outbound = {
|
|
176
|
+
fencing_token_mismatch: string;
|
|
171
177
|
};
|
|
172
178
|
|
|
173
179
|
/** @internal */
|
|
174
|
-
export const
|
|
175
|
-
|
|
180
|
+
export const FencingToken$outboundSchema: z.ZodType<
|
|
181
|
+
FencingToken$Outbound,
|
|
182
|
+
z.ZodTypeDef,
|
|
183
|
+
FencingToken
|
|
184
|
+
> = z.instanceof(FencingToken)
|
|
176
185
|
.transform(v => v.data$)
|
|
177
186
|
.pipe(
|
|
178
187
|
z.object({
|
|
179
188
|
fencingTokenMismatch: z.string(),
|
|
180
189
|
}).transform((v) => {
|
|
181
190
|
return remap$(v, {
|
|
182
|
-
fencingTokenMismatch: "
|
|
191
|
+
fencingTokenMismatch: "fencing_token_mismatch",
|
|
183
192
|
});
|
|
184
193
|
}),
|
|
185
194
|
);
|
|
@@ -188,13 +197,13 @@ export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
|
|
|
188
197
|
* @internal
|
|
189
198
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
190
199
|
*/
|
|
191
|
-
export namespace
|
|
192
|
-
/** @deprecated use `
|
|
193
|
-
export const inboundSchema =
|
|
194
|
-
/** @deprecated use `
|
|
195
|
-
export const outboundSchema =
|
|
196
|
-
/** @deprecated use `
|
|
197
|
-
export type Outbound =
|
|
200
|
+
export namespace FencingToken$ {
|
|
201
|
+
/** @deprecated use `FencingToken$inboundSchema` instead. */
|
|
202
|
+
export const inboundSchema = FencingToken$inboundSchema;
|
|
203
|
+
/** @deprecated use `FencingToken$outboundSchema` instead. */
|
|
204
|
+
export const outboundSchema = FencingToken$outboundSchema;
|
|
205
|
+
/** @deprecated use `FencingToken$Outbound` instead. */
|
|
206
|
+
export type Outbound = FencingToken$Outbound;
|
|
198
207
|
}
|
|
199
208
|
|
|
200
209
|
/** @internal */
|
|
@@ -202,10 +211,15 @@ export const AppendConditionFailed$inboundSchema: z.ZodType<
|
|
|
202
211
|
AppendConditionFailed,
|
|
203
212
|
z.ZodTypeDef,
|
|
204
213
|
unknown
|
|
205
|
-
> = z.union([
|
|
214
|
+
> = z.union([
|
|
215
|
+
z.lazy(() => FencingToken$inboundSchema),
|
|
216
|
+
z.lazy(() => SeqNum$inboundSchema),
|
|
217
|
+
]);
|
|
206
218
|
|
|
207
219
|
/** @internal */
|
|
208
|
-
export type AppendConditionFailed$Outbound =
|
|
220
|
+
export type AppendConditionFailed$Outbound =
|
|
221
|
+
| FencingToken$Outbound
|
|
222
|
+
| SeqNum$Outbound;
|
|
209
223
|
|
|
210
224
|
/** @internal */
|
|
211
225
|
export const AppendConditionFailed$outboundSchema: z.ZodType<
|
|
@@ -213,8 +227,8 @@ export const AppendConditionFailed$outboundSchema: z.ZodType<
|
|
|
213
227
|
z.ZodTypeDef,
|
|
214
228
|
AppendConditionFailed
|
|
215
229
|
> = z.union([
|
|
216
|
-
z.lazy(() =>
|
|
217
|
-
z.lazy(() =>
|
|
230
|
+
z.lazy(() => FencingToken$outboundSchema),
|
|
231
|
+
z.lazy(() => SeqNum$outboundSchema),
|
|
218
232
|
]);
|
|
219
233
|
|
|
220
234
|
/**
|