@s2-dev/streamstore 0.2.6 → 0.2.8
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 +0 -3
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- 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/formatoption.d.ts +28 -0
- package/models/components/formatoption.d.ts.map +1 -0
- package/models/components/formatoption.js +60 -0
- package/models/components/formatoption.js.map +1 -0
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.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/models/operations/append.d.ts +4 -30
- package/models/operations/append.d.ts.map +1 -1
- package/models/operations/append.js +5 -25
- package/models/operations/append.js.map +1 -1
- package/models/operations/read.d.ts +4 -30
- package/models/operations/read.d.ts.map +1 -1
- package/models/operations/read.js +5 -24
- package/models/operations/read.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/assignment.ts +46 -49
- package/src/models/components/formatoption.ts +31 -0
- package/src/models/components/index.ts +1 -0
- 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/models/operations/append.ts +6 -32
- package/src/models/operations/read.ts +6 -31
|
@@ -36,13 +36,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(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,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AC,EAAE,EAAE,CAAC,4BAAoB,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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wBAAgB,kBAAkB,CAAC,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,E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AS,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"}
|
|
@@ -7,7 +7,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
7
7
|
* @remarks
|
|
8
8
|
* If set to 0, the stream will have infinite retention.
|
|
9
9
|
*/
|
|
10
|
-
export type
|
|
10
|
+
export type Age = {
|
|
11
11
|
/**
|
|
12
12
|
* Age in seconds for automatic trimming of records older than this threshold.
|
|
13
13
|
*
|
|
@@ -22,33 +22,33 @@ export type One = {
|
|
|
22
22
|
* @remarks
|
|
23
23
|
* If unspecified, the default is to retain records for 7 days.
|
|
24
24
|
*/
|
|
25
|
-
export type RetentionPolicy =
|
|
25
|
+
export type RetentionPolicy = Age;
|
|
26
26
|
/** @internal */
|
|
27
|
-
export declare const
|
|
27
|
+
export declare const Age$inboundSchema: z.ZodType<Age, z.ZodTypeDef, unknown>;
|
|
28
28
|
/** @internal */
|
|
29
|
-
export type
|
|
29
|
+
export type Age$Outbound = {
|
|
30
30
|
age: number;
|
|
31
31
|
};
|
|
32
32
|
/** @internal */
|
|
33
|
-
export declare const
|
|
33
|
+
export declare const Age$outboundSchema: z.ZodType<Age$Outbound, z.ZodTypeDef, Age>;
|
|
34
34
|
/**
|
|
35
35
|
* @internal
|
|
36
36
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
37
37
|
*/
|
|
38
|
-
export declare namespace
|
|
39
|
-
/** @deprecated use `
|
|
40
|
-
const inboundSchema: z.ZodType<
|
|
41
|
-
/** @deprecated use `
|
|
42
|
-
const outboundSchema: z.ZodType<
|
|
43
|
-
/** @deprecated use `
|
|
44
|
-
type Outbound =
|
|
38
|
+
export declare namespace Age$ {
|
|
39
|
+
/** @deprecated use `Age$inboundSchema` instead. */
|
|
40
|
+
const inboundSchema: z.ZodType<Age, z.ZodTypeDef, unknown>;
|
|
41
|
+
/** @deprecated use `Age$outboundSchema` instead. */
|
|
42
|
+
const outboundSchema: z.ZodType<Age$Outbound, z.ZodTypeDef, Age>;
|
|
43
|
+
/** @deprecated use `Age$Outbound` instead. */
|
|
44
|
+
type Outbound = Age$Outbound;
|
|
45
45
|
}
|
|
46
|
-
export declare function
|
|
47
|
-
export declare function
|
|
46
|
+
export declare function ageToJSON(age: Age): string;
|
|
47
|
+
export declare function ageFromJSON(jsonString: string): SafeParseResult<Age, SDKValidationError>;
|
|
48
48
|
/** @internal */
|
|
49
49
|
export declare const RetentionPolicy$inboundSchema: z.ZodType<RetentionPolicy, z.ZodTypeDef, unknown>;
|
|
50
50
|
/** @internal */
|
|
51
|
-
export type RetentionPolicy$Outbound =
|
|
51
|
+
export type RetentionPolicy$Outbound = Age$Outbound;
|
|
52
52
|
/** @internal */
|
|
53
53
|
export declare const RetentionPolicy$outboundSchema: z.ZodType<RetentionPolicy$Outbound, z.ZodTypeDef, RetentionPolicy>;
|
|
54
54
|
/**
|
|
@@ -57,9 +57,9 @@ export declare const RetentionPolicy$outboundSchema: z.ZodType<RetentionPolicy$O
|
|
|
57
57
|
*/
|
|
58
58
|
export declare namespace RetentionPolicy$ {
|
|
59
59
|
/** @deprecated use `RetentionPolicy$inboundSchema` instead. */
|
|
60
|
-
const inboundSchema: z.ZodType<
|
|
60
|
+
const inboundSchema: z.ZodType<Age, z.ZodTypeDef, unknown>;
|
|
61
61
|
/** @deprecated use `RetentionPolicy$outboundSchema` instead. */
|
|
62
|
-
const outboundSchema: z.ZodType<
|
|
62
|
+
const outboundSchema: z.ZodType<Age$Outbound, z.ZodTypeDef, Age>;
|
|
63
63
|
/** @deprecated use `RetentionPolicy$Outbound` instead. */
|
|
64
64
|
type Outbound = RetentionPolicy$Outbound;
|
|
65
65
|
}
|
|
@@ -36,20 +36,20 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.RetentionPolicy$ = exports.RetentionPolicy$outboundSchema = exports.RetentionPolicy$inboundSchema = exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
39
|
+
exports.RetentionPolicy$ = exports.RetentionPolicy$outboundSchema = exports.RetentionPolicy$inboundSchema = exports.Age$ = exports.Age$outboundSchema = exports.Age$inboundSchema = void 0;
|
|
40
|
+
exports.ageToJSON = ageToJSON;
|
|
41
|
+
exports.ageFromJSON = ageFromJSON;
|
|
42
42
|
exports.retentionPolicyToJSON = retentionPolicyToJSON;
|
|
43
43
|
exports.retentionPolicyFromJSON = retentionPolicyFromJSON;
|
|
44
44
|
const z = __importStar(require("zod"));
|
|
45
45
|
const schemas_js_1 = require("../../lib/schemas.js");
|
|
46
46
|
/** @internal */
|
|
47
|
-
exports.
|
|
47
|
+
exports.Age$inboundSchema = z
|
|
48
48
|
.object({
|
|
49
49
|
age: z.number().int(),
|
|
50
50
|
});
|
|
51
51
|
/** @internal */
|
|
52
|
-
exports.
|
|
52
|
+
exports.Age$outboundSchema = z
|
|
53
53
|
.object({
|
|
54
54
|
age: z.number().int(),
|
|
55
55
|
});
|
|
@@ -57,23 +57,23 @@ exports.One$outboundSchema = z
|
|
|
57
57
|
* @internal
|
|
58
58
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
59
59
|
*/
|
|
60
|
-
var
|
|
61
|
-
(function (
|
|
62
|
-
/** @deprecated use `
|
|
63
|
-
|
|
64
|
-
/** @deprecated use `
|
|
65
|
-
|
|
66
|
-
})(
|
|
67
|
-
function
|
|
68
|
-
return JSON.stringify(exports.
|
|
60
|
+
var Age$;
|
|
61
|
+
(function (Age$) {
|
|
62
|
+
/** @deprecated use `Age$inboundSchema` instead. */
|
|
63
|
+
Age$.inboundSchema = exports.Age$inboundSchema;
|
|
64
|
+
/** @deprecated use `Age$outboundSchema` instead. */
|
|
65
|
+
Age$.outboundSchema = exports.Age$outboundSchema;
|
|
66
|
+
})(Age$ || (exports.Age$ = Age$ = {}));
|
|
67
|
+
function ageToJSON(age) {
|
|
68
|
+
return JSON.stringify(exports.Age$outboundSchema.parse(age));
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.
|
|
70
|
+
function ageFromJSON(jsonString) {
|
|
71
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Age$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Age' from JSON`);
|
|
72
72
|
}
|
|
73
73
|
/** @internal */
|
|
74
|
-
exports.RetentionPolicy$inboundSchema = z.lazy(() => exports.
|
|
74
|
+
exports.RetentionPolicy$inboundSchema = z.lazy(() => exports.Age$inboundSchema);
|
|
75
75
|
/** @internal */
|
|
76
|
-
exports.RetentionPolicy$outboundSchema = z.lazy(() => exports.
|
|
76
|
+
exports.RetentionPolicy$outboundSchema = z.lazy(() => exports.Age$outboundSchema);
|
|
77
77
|
/**
|
|
78
78
|
* @internal
|
|
79
79
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|