@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.
- 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/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 +1 -1
- package/src/lib/config.ts +3 -3
- 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
|
@@ -13,7 +13,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
13
13
|
* @remarks
|
|
14
14
|
* If set to 0, the stream will have infinite retention.
|
|
15
15
|
*/
|
|
16
|
-
export type
|
|
16
|
+
export type Age = {
|
|
17
17
|
/**
|
|
18
18
|
* Age in seconds for automatic trimming of records older than this threshold.
|
|
19
19
|
*
|
|
@@ -29,21 +29,21 @@ export type One = {
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* If unspecified, the default is to retain records for 7 days.
|
|
31
31
|
*/
|
|
32
|
-
export type RetentionPolicy =
|
|
32
|
+
export type RetentionPolicy = Age;
|
|
33
33
|
|
|
34
34
|
/** @internal */
|
|
35
|
-
export const
|
|
35
|
+
export const Age$inboundSchema: z.ZodType<Age, z.ZodTypeDef, unknown> = z
|
|
36
36
|
.object({
|
|
37
37
|
age: z.number().int(),
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
/** @internal */
|
|
41
|
-
export type
|
|
41
|
+
export type Age$Outbound = {
|
|
42
42
|
age: number;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
/** @internal */
|
|
46
|
-
export const
|
|
46
|
+
export const Age$outboundSchema: z.ZodType<Age$Outbound, z.ZodTypeDef, Age> = z
|
|
47
47
|
.object({
|
|
48
48
|
age: z.number().int(),
|
|
49
49
|
});
|
|
@@ -52,26 +52,26 @@ export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
|
|
|
52
52
|
* @internal
|
|
53
53
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
54
54
|
*/
|
|
55
|
-
export namespace
|
|
56
|
-
/** @deprecated use `
|
|
57
|
-
export const inboundSchema =
|
|
58
|
-
/** @deprecated use `
|
|
59
|
-
export const outboundSchema =
|
|
60
|
-
/** @deprecated use `
|
|
61
|
-
export type Outbound =
|
|
55
|
+
export namespace Age$ {
|
|
56
|
+
/** @deprecated use `Age$inboundSchema` instead. */
|
|
57
|
+
export const inboundSchema = Age$inboundSchema;
|
|
58
|
+
/** @deprecated use `Age$outboundSchema` instead. */
|
|
59
|
+
export const outboundSchema = Age$outboundSchema;
|
|
60
|
+
/** @deprecated use `Age$Outbound` instead. */
|
|
61
|
+
export type Outbound = Age$Outbound;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export function
|
|
65
|
-
return JSON.stringify(
|
|
64
|
+
export function ageToJSON(age: Age): string {
|
|
65
|
+
return JSON.stringify(Age$outboundSchema.parse(age));
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
export function
|
|
68
|
+
export function ageFromJSON(
|
|
69
69
|
jsonString: string,
|
|
70
|
-
): SafeParseResult<
|
|
70
|
+
): SafeParseResult<Age, SDKValidationError> {
|
|
71
71
|
return safeParse(
|
|
72
72
|
jsonString,
|
|
73
|
-
(x) =>
|
|
74
|
-
`Failed to parse '
|
|
73
|
+
(x) => Age$inboundSchema.parse(JSON.parse(x)),
|
|
74
|
+
`Failed to parse 'Age' from JSON`,
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -80,17 +80,17 @@ export const RetentionPolicy$inboundSchema: z.ZodType<
|
|
|
80
80
|
RetentionPolicy,
|
|
81
81
|
z.ZodTypeDef,
|
|
82
82
|
unknown
|
|
83
|
-
> = z.lazy(() =>
|
|
83
|
+
> = z.lazy(() => Age$inboundSchema);
|
|
84
84
|
|
|
85
85
|
/** @internal */
|
|
86
|
-
export type RetentionPolicy$Outbound =
|
|
86
|
+
export type RetentionPolicy$Outbound = Age$Outbound;
|
|
87
87
|
|
|
88
88
|
/** @internal */
|
|
89
89
|
export const RetentionPolicy$outboundSchema: z.ZodType<
|
|
90
90
|
RetentionPolicy$Outbound,
|
|
91
91
|
z.ZodTypeDef,
|
|
92
92
|
RetentionPolicy
|
|
93
|
-
> = z.lazy(() =>
|
|
93
|
+
> = z.lazy(() => Age$outboundSchema);
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* @internal
|