@s2-dev/streamstore 0.2.5 → 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.
- package/README.md +4 -7
- package/docs/sdks/stream/README.md +5 -5
- package/funcs/streamAppend.d.ts +4 -1
- package/funcs/streamAppend.d.ts.map +1 -1
- package/funcs/streamAppend.js +4 -1
- package/funcs/streamAppend.js.map +1 -1
- package/funcs/streamCheckTail.d.ts +3 -0
- package/funcs/streamCheckTail.d.ts.map +1 -1
- package/funcs/streamCheckTail.js +3 -0
- package/funcs/streamCheckTail.js.map +1 -1
- package/funcs/streamRead.d.ts +4 -1
- package/funcs/streamRead.d.ts.map +1 -1
- package/funcs/streamRead.js +4 -1
- package/funcs/streamRead.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/retries.js +0 -1
- package/lib/retries.js.map +1 -1
- package/models/components/assignment.d.ts +28 -28
- package/models/components/assignment.d.ts.map +1 -1
- package/models/components/assignment.js +36 -36
- package/models/components/assignment.js.map +1 -1
- package/models/components/output.d.ts +41 -41
- package/models/components/output.d.ts.map +1 -1
- package/models/components/output.js +53 -53
- package/models/components/output.js.map +1 -1
- package/models/components/readresponse.d.ts +28 -28
- package/models/components/readresponse.d.ts.map +1 -1
- package/models/components/readresponse.js +36 -35
- package/models/components/readresponse.js.map +1 -1
- package/models/components/retentionpolicy.d.ts +17 -17
- package/models/components/retentionpolicy.js +18 -18
- package/package.json +6 -7
- package/sdk/stream.d.ts +11 -2
- package/sdk/stream.d.ts.map +1 -1
- package/sdk/stream.js +11 -2
- package/sdk/stream.js.map +1 -1
- package/src/funcs/streamAppend.ts +4 -1
- package/src/funcs/streamCheckTail.ts +3 -0
- package/src/funcs/streamRead.ts +4 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/retries.ts +0 -1
- package/src/models/components/assignment.ts +46 -49
- package/src/models/components/output.ts +86 -80
- package/src/models/components/readresponse.ts +54 -53
- package/src/models/components/retentionpolicy.ts +21 -21
- package/src/sdk/stream.ts +11 -2
|
@@ -8,7 +8,7 @@ import { SequencedRecordBatch, SequencedRecordBatch$Outbound } from "./sequenced
|
|
|
8
8
|
* @remarks
|
|
9
9
|
* If returned in a streaming read session, this will be a terminal reply.
|
|
10
10
|
*/
|
|
11
|
-
export type
|
|
11
|
+
export type NextSeqNum = {
|
|
12
12
|
/**
|
|
13
13
|
* Sequence number for the next record on this stream, in case the requested `start_seq_num` was larger.
|
|
14
14
|
*
|
|
@@ -24,7 +24,7 @@ export type Three = {
|
|
|
24
24
|
* 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.
|
|
25
25
|
* The client can re-establish the session starting at this sequence number.
|
|
26
26
|
*/
|
|
27
|
-
export type
|
|
27
|
+
export type FirstSeqNum = {
|
|
28
28
|
/**
|
|
29
29
|
* Sequence number for the first record on this stream, in case the requested `start_seq_num` is smaller.
|
|
30
30
|
*
|
|
@@ -41,7 +41,7 @@ export type Output2 = {
|
|
|
41
41
|
* This batch can be empty only if a `ReadLimit` was provided in the associated read request, but the first record
|
|
42
42
|
* that could have been returned would violate the limit.
|
|
43
43
|
*/
|
|
44
|
-
export type
|
|
44
|
+
export type Batch = {
|
|
45
45
|
/**
|
|
46
46
|
* A batch of sequenced records.
|
|
47
47
|
*/
|
|
@@ -50,77 +50,77 @@ export type Output1 = {
|
|
|
50
50
|
/**
|
|
51
51
|
* Reply which can be a batch of records, or a sequence number if the request could not be satisfied.
|
|
52
52
|
*/
|
|
53
|
-
export type Output =
|
|
53
|
+
export type Output = Batch | FirstSeqNum | NextSeqNum;
|
|
54
54
|
/** @internal */
|
|
55
|
-
export declare const
|
|
55
|
+
export declare const NextSeqNum$inboundSchema: z.ZodType<NextSeqNum, z.ZodTypeDef, unknown>;
|
|
56
56
|
/** @internal */
|
|
57
|
-
export type
|
|
57
|
+
export type NextSeqNum$Outbound = {
|
|
58
58
|
next_seq_num: number;
|
|
59
59
|
};
|
|
60
60
|
/** @internal */
|
|
61
|
-
export declare const
|
|
61
|
+
export declare const NextSeqNum$outboundSchema: z.ZodType<NextSeqNum$Outbound, z.ZodTypeDef, NextSeqNum>;
|
|
62
62
|
/**
|
|
63
63
|
* @internal
|
|
64
64
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
65
65
|
*/
|
|
66
|
-
export declare namespace
|
|
67
|
-
/** @deprecated use `
|
|
68
|
-
const inboundSchema: z.ZodType<
|
|
69
|
-
/** @deprecated use `
|
|
70
|
-
const outboundSchema: z.ZodType<
|
|
71
|
-
/** @deprecated use `
|
|
72
|
-
type Outbound =
|
|
66
|
+
export declare namespace NextSeqNum$ {
|
|
67
|
+
/** @deprecated use `NextSeqNum$inboundSchema` instead. */
|
|
68
|
+
const inboundSchema: z.ZodType<NextSeqNum, z.ZodTypeDef, unknown>;
|
|
69
|
+
/** @deprecated use `NextSeqNum$outboundSchema` instead. */
|
|
70
|
+
const outboundSchema: z.ZodType<NextSeqNum$Outbound, z.ZodTypeDef, NextSeqNum>;
|
|
71
|
+
/** @deprecated use `NextSeqNum$Outbound` instead. */
|
|
72
|
+
type Outbound = NextSeqNum$Outbound;
|
|
73
73
|
}
|
|
74
|
-
export declare function
|
|
75
|
-
export declare function
|
|
74
|
+
export declare function nextSeqNumToJSON(nextSeqNum: NextSeqNum): string;
|
|
75
|
+
export declare function nextSeqNumFromJSON(jsonString: string): SafeParseResult<NextSeqNum, SDKValidationError>;
|
|
76
76
|
/** @internal */
|
|
77
|
-
export declare const
|
|
77
|
+
export declare const FirstSeqNum$inboundSchema: z.ZodType<FirstSeqNum, z.ZodTypeDef, unknown>;
|
|
78
78
|
/** @internal */
|
|
79
|
-
export type
|
|
79
|
+
export type FirstSeqNum$Outbound = {
|
|
80
80
|
first_seq_num: number;
|
|
81
81
|
};
|
|
82
82
|
/** @internal */
|
|
83
|
-
export declare const
|
|
83
|
+
export declare const FirstSeqNum$outboundSchema: z.ZodType<FirstSeqNum$Outbound, z.ZodTypeDef, FirstSeqNum>;
|
|
84
84
|
/**
|
|
85
85
|
* @internal
|
|
86
86
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
87
87
|
*/
|
|
88
|
-
export declare namespace
|
|
89
|
-
/** @deprecated use `
|
|
90
|
-
const inboundSchema: z.ZodType<
|
|
91
|
-
/** @deprecated use `
|
|
92
|
-
const outboundSchema: z.ZodType<
|
|
93
|
-
/** @deprecated use `
|
|
94
|
-
type Outbound =
|
|
88
|
+
export declare namespace FirstSeqNum$ {
|
|
89
|
+
/** @deprecated use `FirstSeqNum$inboundSchema` instead. */
|
|
90
|
+
const inboundSchema: z.ZodType<FirstSeqNum, z.ZodTypeDef, unknown>;
|
|
91
|
+
/** @deprecated use `FirstSeqNum$outboundSchema` instead. */
|
|
92
|
+
const outboundSchema: z.ZodType<FirstSeqNum$Outbound, z.ZodTypeDef, FirstSeqNum>;
|
|
93
|
+
/** @deprecated use `FirstSeqNum$Outbound` instead. */
|
|
94
|
+
type Outbound = FirstSeqNum$Outbound;
|
|
95
95
|
}
|
|
96
|
-
export declare function
|
|
97
|
-
export declare function
|
|
96
|
+
export declare function firstSeqNumToJSON(firstSeqNum: FirstSeqNum): string;
|
|
97
|
+
export declare function firstSeqNumFromJSON(jsonString: string): SafeParseResult<FirstSeqNum, SDKValidationError>;
|
|
98
98
|
/** @internal */
|
|
99
|
-
export declare const
|
|
99
|
+
export declare const Batch$inboundSchema: z.ZodType<Batch, z.ZodTypeDef, unknown>;
|
|
100
100
|
/** @internal */
|
|
101
|
-
export type
|
|
101
|
+
export type Batch$Outbound = {
|
|
102
102
|
batch: SequencedRecordBatch$Outbound;
|
|
103
103
|
};
|
|
104
104
|
/** @internal */
|
|
105
|
-
export declare const
|
|
105
|
+
export declare const Batch$outboundSchema: z.ZodType<Batch$Outbound, z.ZodTypeDef, Batch>;
|
|
106
106
|
/**
|
|
107
107
|
* @internal
|
|
108
108
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
109
109
|
*/
|
|
110
|
-
export declare namespace
|
|
111
|
-
/** @deprecated use `
|
|
112
|
-
const inboundSchema: z.ZodType<
|
|
113
|
-
/** @deprecated use `
|
|
114
|
-
const outboundSchema: z.ZodType<
|
|
115
|
-
/** @deprecated use `
|
|
116
|
-
type Outbound =
|
|
110
|
+
export declare namespace Batch$ {
|
|
111
|
+
/** @deprecated use `Batch$inboundSchema` instead. */
|
|
112
|
+
const inboundSchema: z.ZodType<Batch, z.ZodTypeDef, unknown>;
|
|
113
|
+
/** @deprecated use `Batch$outboundSchema` instead. */
|
|
114
|
+
const outboundSchema: z.ZodType<Batch$Outbound, z.ZodTypeDef, Batch>;
|
|
115
|
+
/** @deprecated use `Batch$Outbound` instead. */
|
|
116
|
+
type Outbound = Batch$Outbound;
|
|
117
117
|
}
|
|
118
|
-
export declare function
|
|
119
|
-
export declare function
|
|
118
|
+
export declare function batchToJSON(batch: Batch): string;
|
|
119
|
+
export declare function batchFromJSON(jsonString: string): SafeParseResult<Batch, SDKValidationError>;
|
|
120
120
|
/** @internal */
|
|
121
121
|
export declare const Output$inboundSchema: z.ZodType<Output, z.ZodTypeDef, unknown>;
|
|
122
122
|
/** @internal */
|
|
123
|
-
export type Output$Outbound =
|
|
123
|
+
export type Output$Outbound = Batch$Outbound | FirstSeqNum$Outbound | NextSeqNum$Outbound;
|
|
124
124
|
/** @internal */
|
|
125
125
|
export declare const Output$outboundSchema: z.ZodType<Output$Outbound, z.ZodTypeDef, Output>;
|
|
126
126
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/models/components/output.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,CA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exports, "__esModule", { value: true });
|
|
39
|
-
exports.Output$ = exports.Output$outboundSchema = exports.Output$inboundSchema = exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
39
|
+
exports.Output$ = exports.Output$outboundSchema = exports.Output$inboundSchema = exports.Batch$ = exports.Batch$outboundSchema = exports.Batch$inboundSchema = exports.FirstSeqNum$ = exports.FirstSeqNum$outboundSchema = exports.FirstSeqNum$inboundSchema = exports.NextSeqNum$ = exports.NextSeqNum$outboundSchema = exports.NextSeqNum$inboundSchema = void 0;
|
|
40
|
+
exports.nextSeqNumToJSON = nextSeqNumToJSON;
|
|
41
|
+
exports.nextSeqNumFromJSON = nextSeqNumFromJSON;
|
|
42
|
+
exports.firstSeqNumToJSON = firstSeqNumToJSON;
|
|
43
|
+
exports.firstSeqNumFromJSON = firstSeqNumFromJSON;
|
|
44
|
+
exports.batchToJSON = batchToJSON;
|
|
45
|
+
exports.batchFromJSON = batchFromJSON;
|
|
46
46
|
exports.outputToJSON = outputToJSON;
|
|
47
47
|
exports.outputFromJSON = outputFromJSON;
|
|
48
48
|
const z = __importStar(require("zod"));
|
|
@@ -50,8 +50,7 @@ const primitives_js_1 = require("../../lib/primitives.js");
|
|
|
50
50
|
const schemas_js_1 = require("../../lib/schemas.js");
|
|
51
51
|
const sequencedrecordbatch_js_1 = require("./sequencedrecordbatch.js");
|
|
52
52
|
/** @internal */
|
|
53
|
-
exports.
|
|
54
|
-
.object({
|
|
53
|
+
exports.NextSeqNum$inboundSchema = z.object({
|
|
55
54
|
next_seq_num: z.number().int(),
|
|
56
55
|
}).transform((v) => {
|
|
57
56
|
return (0, primitives_js_1.remap)(v, {
|
|
@@ -59,7 +58,7 @@ exports.Three$inboundSchema = z
|
|
|
59
58
|
});
|
|
60
59
|
});
|
|
61
60
|
/** @internal */
|
|
62
|
-
exports.
|
|
61
|
+
exports.NextSeqNum$outboundSchema = z.object({
|
|
63
62
|
nextSeqNum: z.number().int(),
|
|
64
63
|
}).transform((v) => {
|
|
65
64
|
return (0, primitives_js_1.remap)(v, {
|
|
@@ -70,21 +69,21 @@ exports.Three$outboundSchema = z.object({
|
|
|
70
69
|
* @internal
|
|
71
70
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
72
71
|
*/
|
|
73
|
-
var
|
|
74
|
-
(function (
|
|
75
|
-
/** @deprecated use `
|
|
76
|
-
|
|
77
|
-
/** @deprecated use `
|
|
78
|
-
|
|
79
|
-
})(
|
|
80
|
-
function
|
|
81
|
-
return JSON.stringify(exports.
|
|
72
|
+
var NextSeqNum$;
|
|
73
|
+
(function (NextSeqNum$) {
|
|
74
|
+
/** @deprecated use `NextSeqNum$inboundSchema` instead. */
|
|
75
|
+
NextSeqNum$.inboundSchema = exports.NextSeqNum$inboundSchema;
|
|
76
|
+
/** @deprecated use `NextSeqNum$outboundSchema` instead. */
|
|
77
|
+
NextSeqNum$.outboundSchema = exports.NextSeqNum$outboundSchema;
|
|
78
|
+
})(NextSeqNum$ || (exports.NextSeqNum$ = NextSeqNum$ = {}));
|
|
79
|
+
function nextSeqNumToJSON(nextSeqNum) {
|
|
80
|
+
return JSON.stringify(exports.NextSeqNum$outboundSchema.parse(nextSeqNum));
|
|
82
81
|
}
|
|
83
|
-
function
|
|
84
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.
|
|
82
|
+
function nextSeqNumFromJSON(jsonString) {
|
|
83
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.NextSeqNum$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'NextSeqNum' from JSON`);
|
|
85
84
|
}
|
|
86
85
|
/** @internal */
|
|
87
|
-
exports.
|
|
86
|
+
exports.FirstSeqNum$inboundSchema = z.object({
|
|
88
87
|
first_seq_num: z.number().int(),
|
|
89
88
|
}).transform((v) => {
|
|
90
89
|
return (0, primitives_js_1.remap)(v, {
|
|
@@ -92,7 +91,7 @@ exports.Output2$inboundSchema = z.object({
|
|
|
92
91
|
});
|
|
93
92
|
});
|
|
94
93
|
/** @internal */
|
|
95
|
-
exports.
|
|
94
|
+
exports.FirstSeqNum$outboundSchema = z.object({
|
|
96
95
|
firstSeqNum: z.number().int(),
|
|
97
96
|
}).transform((v) => {
|
|
98
97
|
return (0, primitives_js_1.remap)(v, {
|
|
@@ -103,56 +102,57 @@ exports.Output2$outboundSchema = z.object({
|
|
|
103
102
|
* @internal
|
|
104
103
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
105
104
|
*/
|
|
106
|
-
var
|
|
107
|
-
(function (
|
|
108
|
-
/** @deprecated use `
|
|
109
|
-
|
|
110
|
-
/** @deprecated use `
|
|
111
|
-
|
|
112
|
-
})(
|
|
113
|
-
function
|
|
114
|
-
return JSON.stringify(exports.
|
|
105
|
+
var FirstSeqNum$;
|
|
106
|
+
(function (FirstSeqNum$) {
|
|
107
|
+
/** @deprecated use `FirstSeqNum$inboundSchema` instead. */
|
|
108
|
+
FirstSeqNum$.inboundSchema = exports.FirstSeqNum$inboundSchema;
|
|
109
|
+
/** @deprecated use `FirstSeqNum$outboundSchema` instead. */
|
|
110
|
+
FirstSeqNum$.outboundSchema = exports.FirstSeqNum$outboundSchema;
|
|
111
|
+
})(FirstSeqNum$ || (exports.FirstSeqNum$ = FirstSeqNum$ = {}));
|
|
112
|
+
function firstSeqNumToJSON(firstSeqNum) {
|
|
113
|
+
return JSON.stringify(exports.FirstSeqNum$outboundSchema.parse(firstSeqNum));
|
|
115
114
|
}
|
|
116
|
-
function
|
|
117
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.
|
|
115
|
+
function firstSeqNumFromJSON(jsonString) {
|
|
116
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.FirstSeqNum$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FirstSeqNum' from JSON`);
|
|
118
117
|
}
|
|
119
118
|
/** @internal */
|
|
120
|
-
exports.
|
|
119
|
+
exports.Batch$inboundSchema = z
|
|
120
|
+
.object({
|
|
121
121
|
batch: sequencedrecordbatch_js_1.SequencedRecordBatch$inboundSchema,
|
|
122
122
|
});
|
|
123
123
|
/** @internal */
|
|
124
|
-
exports.
|
|
124
|
+
exports.Batch$outboundSchema = z.object({
|
|
125
125
|
batch: sequencedrecordbatch_js_1.SequencedRecordBatch$outboundSchema,
|
|
126
126
|
});
|
|
127
127
|
/**
|
|
128
128
|
* @internal
|
|
129
129
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
130
130
|
*/
|
|
131
|
-
var
|
|
132
|
-
(function (
|
|
133
|
-
/** @deprecated use `
|
|
134
|
-
|
|
135
|
-
/** @deprecated use `
|
|
136
|
-
|
|
137
|
-
})(
|
|
138
|
-
function
|
|
139
|
-
return JSON.stringify(exports.
|
|
131
|
+
var Batch$;
|
|
132
|
+
(function (Batch$) {
|
|
133
|
+
/** @deprecated use `Batch$inboundSchema` instead. */
|
|
134
|
+
Batch$.inboundSchema = exports.Batch$inboundSchema;
|
|
135
|
+
/** @deprecated use `Batch$outboundSchema` instead. */
|
|
136
|
+
Batch$.outboundSchema = exports.Batch$outboundSchema;
|
|
137
|
+
})(Batch$ || (exports.Batch$ = Batch$ = {}));
|
|
138
|
+
function batchToJSON(batch) {
|
|
139
|
+
return JSON.stringify(exports.Batch$outboundSchema.parse(batch));
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.
|
|
141
|
+
function batchFromJSON(jsonString) {
|
|
142
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Batch$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Batch' from JSON`);
|
|
143
143
|
}
|
|
144
144
|
/** @internal */
|
|
145
145
|
exports.Output$inboundSchema = z
|
|
146
146
|
.union([
|
|
147
|
-
z.lazy(() => exports.
|
|
148
|
-
z.lazy(() => exports.
|
|
149
|
-
z.lazy(() => exports.
|
|
147
|
+
z.lazy(() => exports.Batch$inboundSchema),
|
|
148
|
+
z.lazy(() => exports.FirstSeqNum$inboundSchema),
|
|
149
|
+
z.lazy(() => exports.NextSeqNum$inboundSchema),
|
|
150
150
|
]);
|
|
151
151
|
/** @internal */
|
|
152
152
|
exports.Output$outboundSchema = z.union([
|
|
153
|
-
z.lazy(() => exports.
|
|
154
|
-
z.lazy(() => exports.
|
|
155
|
-
z.lazy(() => exports.
|
|
153
|
+
z.lazy(() => exports.Batch$outboundSchema),
|
|
154
|
+
z.lazy(() => exports.FirstSeqNum$outboundSchema),
|
|
155
|
+
z.lazy(() => exports.NextSeqNum$outboundSchema),
|
|
156
156
|
]);
|
|
157
157
|
/**
|
|
158
158
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/models/components/output.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/models/components/output.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+GH,4CAEC;AAED,gDAQC;AA8CD,8CAEC;AAED,kDAQC;AAmCD,kCAEC;AAED,sCAQC;AAwCD,oCAEC;AAED,wCAQC;AAtRD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAGjD,uEAKmC;AAuDnC,gBAAgB;AACH,QAAA,wBAAwB,GAIjC,CAAC,CAAC,MAAM,CAAC;IACX,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CAC/B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,cAAc,EAAE,YAAY;KAC7B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAOH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BAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChD,oCAAoC,CACrC,CAAC;AACJ,CAAC"}
|
|
@@ -2,68 +2,68 @@ import * as z from "zod";
|
|
|
2
2
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
4
|
import { Output, Output$Outbound } from "./output.js";
|
|
5
|
-
export type
|
|
5
|
+
export type ErrorT = {
|
|
6
6
|
data: string;
|
|
7
7
|
event: string;
|
|
8
8
|
};
|
|
9
|
-
export type
|
|
9
|
+
export type ReadResponseOutput = {
|
|
10
10
|
/**
|
|
11
11
|
* Reply which can be a batch of records, or a sequence number if the request could not be satisfied.
|
|
12
12
|
*/
|
|
13
13
|
data: Output;
|
|
14
14
|
event: string;
|
|
15
15
|
};
|
|
16
|
-
export type ReadResponse =
|
|
16
|
+
export type ReadResponse = ReadResponseOutput | ErrorT;
|
|
17
17
|
/** @internal */
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const ErrorT$inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown>;
|
|
19
19
|
/** @internal */
|
|
20
|
-
export type
|
|
20
|
+
export type ErrorT$Outbound = {
|
|
21
21
|
data: string;
|
|
22
22
|
event: string;
|
|
23
23
|
};
|
|
24
24
|
/** @internal */
|
|
25
|
-
export declare const
|
|
25
|
+
export declare const ErrorT$outboundSchema: z.ZodType<ErrorT$Outbound, z.ZodTypeDef, ErrorT>;
|
|
26
26
|
/**
|
|
27
27
|
* @internal
|
|
28
28
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
29
29
|
*/
|
|
30
|
-
export declare namespace
|
|
31
|
-
/** @deprecated use `
|
|
32
|
-
const inboundSchema: z.ZodType<
|
|
33
|
-
/** @deprecated use `
|
|
34
|
-
const outboundSchema: z.ZodType<
|
|
35
|
-
/** @deprecated use `
|
|
36
|
-
type Outbound =
|
|
30
|
+
export declare namespace ErrorT$ {
|
|
31
|
+
/** @deprecated use `ErrorT$inboundSchema` instead. */
|
|
32
|
+
const inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown>;
|
|
33
|
+
/** @deprecated use `ErrorT$outboundSchema` instead. */
|
|
34
|
+
const outboundSchema: z.ZodType<ErrorT$Outbound, z.ZodTypeDef, ErrorT>;
|
|
35
|
+
/** @deprecated use `ErrorT$Outbound` instead. */
|
|
36
|
+
type Outbound = ErrorT$Outbound;
|
|
37
37
|
}
|
|
38
|
-
export declare function
|
|
39
|
-
export declare function
|
|
38
|
+
export declare function errorToJSON(errorT: ErrorT): string;
|
|
39
|
+
export declare function errorFromJSON(jsonString: string): SafeParseResult<ErrorT, SDKValidationError>;
|
|
40
40
|
/** @internal */
|
|
41
|
-
export declare const
|
|
41
|
+
export declare const ReadResponseOutput$inboundSchema: z.ZodType<ReadResponseOutput, z.ZodTypeDef, unknown>;
|
|
42
42
|
/** @internal */
|
|
43
|
-
export type
|
|
43
|
+
export type ReadResponseOutput$Outbound = {
|
|
44
44
|
data: Output$Outbound;
|
|
45
45
|
event: string;
|
|
46
46
|
};
|
|
47
47
|
/** @internal */
|
|
48
|
-
export declare const
|
|
48
|
+
export declare const ReadResponseOutput$outboundSchema: z.ZodType<ReadResponseOutput$Outbound, z.ZodTypeDef, ReadResponseOutput>;
|
|
49
49
|
/**
|
|
50
50
|
* @internal
|
|
51
51
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
52
|
*/
|
|
53
|
-
export declare namespace
|
|
54
|
-
/** @deprecated use `
|
|
55
|
-
const inboundSchema: z.ZodType<
|
|
56
|
-
/** @deprecated use `
|
|
57
|
-
const outboundSchema: z.ZodType<
|
|
58
|
-
/** @deprecated use `
|
|
59
|
-
type Outbound =
|
|
53
|
+
export declare namespace ReadResponseOutput$ {
|
|
54
|
+
/** @deprecated use `ReadResponseOutput$inboundSchema` instead. */
|
|
55
|
+
const inboundSchema: z.ZodType<ReadResponseOutput, z.ZodTypeDef, unknown>;
|
|
56
|
+
/** @deprecated use `ReadResponseOutput$outboundSchema` instead. */
|
|
57
|
+
const outboundSchema: z.ZodType<ReadResponseOutput$Outbound, z.ZodTypeDef, ReadResponseOutput>;
|
|
58
|
+
/** @deprecated use `ReadResponseOutput$Outbound` instead. */
|
|
59
|
+
type Outbound = ReadResponseOutput$Outbound;
|
|
60
60
|
}
|
|
61
|
-
export declare function
|
|
62
|
-
export declare function
|
|
61
|
+
export declare function readResponseOutputToJSON(readResponseOutput: ReadResponseOutput): string;
|
|
62
|
+
export declare function readResponseOutputFromJSON(jsonString: string): SafeParseResult<ReadResponseOutput, SDKValidationError>;
|
|
63
63
|
/** @internal */
|
|
64
64
|
export declare const ReadResponse$inboundSchema: z.ZodType<ReadResponse, z.ZodTypeDef, unknown>;
|
|
65
65
|
/** @internal */
|
|
66
|
-
export type ReadResponse$Outbound =
|
|
66
|
+
export type ReadResponse$Outbound = ReadResponseOutput$Outbound | ErrorT$Outbound;
|
|
67
67
|
/** @internal */
|
|
68
68
|
export declare const ReadResponse$outboundSchema: z.ZodType<ReadResponse$Outbound, z.ZodTypeDef, ReadResponse>;
|
|
69
69
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readresponse.d.ts","sourceRoot":"","sources":["../../src/models/components/readresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,MAAM,EAEN,eAAe,EAEhB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"readresponse.d.ts","sourceRoot":"","sources":["../../src/models/components/readresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAE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YAAY,EAAE,YAAY,GAAG,MAAM,CAErE;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAMnD"}
|
|
@@ -36,23 +36,24 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.ReadResponse$ = exports.ReadResponse$outboundSchema = exports.ReadResponse$inboundSchema = exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
39
|
+
exports.ReadResponse$ = exports.ReadResponse$outboundSchema = exports.ReadResponse$inboundSchema = exports.ReadResponseOutput$ = exports.ReadResponseOutput$outboundSchema = exports.ReadResponseOutput$inboundSchema = exports.ErrorT$ = exports.ErrorT$outboundSchema = exports.ErrorT$inboundSchema = void 0;
|
|
40
|
+
exports.errorToJSON = errorToJSON;
|
|
41
|
+
exports.errorFromJSON = errorFromJSON;
|
|
42
|
+
exports.readResponseOutputToJSON = readResponseOutputToJSON;
|
|
43
|
+
exports.readResponseOutputFromJSON = readResponseOutputFromJSON;
|
|
44
44
|
exports.readResponseToJSON = readResponseToJSON;
|
|
45
45
|
exports.readResponseFromJSON = readResponseFromJSON;
|
|
46
46
|
const z = __importStar(require("zod"));
|
|
47
47
|
const schemas_js_1 = require("../../lib/schemas.js");
|
|
48
48
|
const output_js_1 = require("./output.js");
|
|
49
49
|
/** @internal */
|
|
50
|
-
exports.
|
|
50
|
+
exports.ErrorT$inboundSchema = z
|
|
51
|
+
.object({
|
|
51
52
|
data: z.string(),
|
|
52
53
|
event: z.string(),
|
|
53
54
|
});
|
|
54
55
|
/** @internal */
|
|
55
|
-
exports.
|
|
56
|
+
exports.ErrorT$outboundSchema = z.object({
|
|
56
57
|
data: z.string(),
|
|
57
58
|
event: z.string(),
|
|
58
59
|
});
|
|
@@ -60,21 +61,21 @@ exports.ReadResponse2$outboundSchema = z.object({
|
|
|
60
61
|
* @internal
|
|
61
62
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
62
63
|
*/
|
|
63
|
-
var
|
|
64
|
-
(function (
|
|
65
|
-
/** @deprecated use `
|
|
66
|
-
|
|
67
|
-
/** @deprecated use `
|
|
68
|
-
|
|
69
|
-
})(
|
|
70
|
-
function
|
|
71
|
-
return JSON.stringify(exports.
|
|
64
|
+
var ErrorT$;
|
|
65
|
+
(function (ErrorT$) {
|
|
66
|
+
/** @deprecated use `ErrorT$inboundSchema` instead. */
|
|
67
|
+
ErrorT$.inboundSchema = exports.ErrorT$inboundSchema;
|
|
68
|
+
/** @deprecated use `ErrorT$outboundSchema` instead. */
|
|
69
|
+
ErrorT$.outboundSchema = exports.ErrorT$outboundSchema;
|
|
70
|
+
})(ErrorT$ || (exports.ErrorT$ = ErrorT$ = {}));
|
|
71
|
+
function errorToJSON(errorT) {
|
|
72
|
+
return JSON.stringify(exports.ErrorT$outboundSchema.parse(errorT));
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.
|
|
74
|
+
function errorFromJSON(jsonString) {
|
|
75
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ErrorT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorT' from JSON`);
|
|
75
76
|
}
|
|
76
77
|
/** @internal */
|
|
77
|
-
exports.
|
|
78
|
+
exports.ReadResponseOutput$inboundSchema = z.object({
|
|
78
79
|
data: z.string().transform((v, ctx) => {
|
|
79
80
|
try {
|
|
80
81
|
return JSON.parse(v);
|
|
@@ -90,7 +91,7 @@ exports.ReadResponse1$inboundSchema = z.object({
|
|
|
90
91
|
event: z.string(),
|
|
91
92
|
});
|
|
92
93
|
/** @internal */
|
|
93
|
-
exports.
|
|
94
|
+
exports.ReadResponseOutput$outboundSchema = z.object({
|
|
94
95
|
data: output_js_1.Output$outboundSchema,
|
|
95
96
|
event: z.string(),
|
|
96
97
|
});
|
|
@@ -98,28 +99,28 @@ exports.ReadResponse1$outboundSchema = z.object({
|
|
|
98
99
|
* @internal
|
|
99
100
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
100
101
|
*/
|
|
101
|
-
var
|
|
102
|
-
(function (
|
|
103
|
-
/** @deprecated use `
|
|
104
|
-
|
|
105
|
-
/** @deprecated use `
|
|
106
|
-
|
|
107
|
-
})(
|
|
108
|
-
function
|
|
109
|
-
return JSON.stringify(exports.
|
|
102
|
+
var ReadResponseOutput$;
|
|
103
|
+
(function (ReadResponseOutput$) {
|
|
104
|
+
/** @deprecated use `ReadResponseOutput$inboundSchema` instead. */
|
|
105
|
+
ReadResponseOutput$.inboundSchema = exports.ReadResponseOutput$inboundSchema;
|
|
106
|
+
/** @deprecated use `ReadResponseOutput$outboundSchema` instead. */
|
|
107
|
+
ReadResponseOutput$.outboundSchema = exports.ReadResponseOutput$outboundSchema;
|
|
108
|
+
})(ReadResponseOutput$ || (exports.ReadResponseOutput$ = ReadResponseOutput$ = {}));
|
|
109
|
+
function readResponseOutputToJSON(readResponseOutput) {
|
|
110
|
+
return JSON.stringify(exports.ReadResponseOutput$outboundSchema.parse(readResponseOutput));
|
|
110
111
|
}
|
|
111
|
-
function
|
|
112
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.
|
|
112
|
+
function readResponseOutputFromJSON(jsonString) {
|
|
113
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ReadResponseOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReadResponseOutput' from JSON`);
|
|
113
114
|
}
|
|
114
115
|
/** @internal */
|
|
115
116
|
exports.ReadResponse$inboundSchema = z.union([
|
|
116
|
-
z.lazy(() => exports.
|
|
117
|
-
z.lazy(() => exports.
|
|
117
|
+
z.lazy(() => exports.ReadResponseOutput$inboundSchema),
|
|
118
|
+
z.lazy(() => exports.ErrorT$inboundSchema),
|
|
118
119
|
]);
|
|
119
120
|
/** @internal */
|
|
120
121
|
exports.ReadResponse$outboundSchema = z.union([
|
|
121
|
-
z.lazy(() => exports.
|
|
122
|
-
z.lazy(() => exports.
|
|
122
|
+
z.lazy(() => exports.ReadResponseOutput$outboundSchema),
|
|
123
|
+
z.lazy(() => exports.ErrorT$outboundSchema),
|
|
123
124
|
]);
|
|
124
125
|
/**
|
|
125
126
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readresponse.js","sourceRoot":"","sources":["../../src/models/components/readresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"readresponse.js","sourceRoot":"","sources":["../../src/models/components/readresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEH,kCAEC;AAED,sCAQC;AAmDD,4DAMC;AAED,gEAQC;AAwCD,gDAEC;AAED,oDAQC;AAjMD,uCAAyB;AACzB,qDAAiD;AAGjD,2CAKqB;AAiBrB,gBAAgB;AACH,QAAA,oBAAoB,GAA6C,CAAC;KAC5E,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAQL,gBAAgB;AACH,QAAA,qBAAqB,GAI9B,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,OAAO,CAOvB;AAPD,WAAiB,OAAO;IACtB,sDAAsD;IACzC,qBAAa,GAAG,4BAAoB,CAAC;IAClD,uDAAuD;IAC1C,sBAAc,GAAG,6BAAqB,CAAC;AAGtD,CAAC,EAPgB,OAAO,uBAAP,OAA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