@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.
Files changed (44) hide show
  1. package/README.md +0 -3
  2. package/jsr.json +1 -1
  3. package/lib/config.d.ts +3 -3
  4. package/lib/config.js +3 -3
  5. package/models/components/assignment.d.ts +28 -28
  6. package/models/components/assignment.d.ts.map +1 -1
  7. package/models/components/assignment.js +36 -36
  8. package/models/components/assignment.js.map +1 -1
  9. package/models/components/formatoption.d.ts +28 -0
  10. package/models/components/formatoption.d.ts.map +1 -0
  11. package/models/components/formatoption.js +60 -0
  12. package/models/components/formatoption.js.map +1 -0
  13. package/models/components/index.d.ts +1 -0
  14. package/models/components/index.d.ts.map +1 -1
  15. package/models/components/index.js +1 -0
  16. package/models/components/index.js.map +1 -1
  17. package/models/components/output.d.ts +41 -41
  18. package/models/components/output.d.ts.map +1 -1
  19. package/models/components/output.js +53 -53
  20. package/models/components/output.js.map +1 -1
  21. package/models/components/readresponse.d.ts +28 -28
  22. package/models/components/readresponse.d.ts.map +1 -1
  23. package/models/components/readresponse.js +36 -35
  24. package/models/components/readresponse.js.map +1 -1
  25. package/models/components/retentionpolicy.d.ts +17 -17
  26. package/models/components/retentionpolicy.js +18 -18
  27. package/models/operations/append.d.ts +4 -30
  28. package/models/operations/append.d.ts.map +1 -1
  29. package/models/operations/append.js +5 -25
  30. package/models/operations/append.js.map +1 -1
  31. package/models/operations/read.d.ts +4 -30
  32. package/models/operations/read.d.ts.map +1 -1
  33. package/models/operations/read.js +5 -24
  34. package/models/operations/read.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/lib/config.ts +3 -3
  37. package/src/models/components/assignment.ts +46 -49
  38. package/src/models/components/formatoption.ts +31 -0
  39. package/src/models/components/index.ts +1 -0
  40. package/src/models/components/output.ts +86 -80
  41. package/src/models/components/readresponse.ts +54 -53
  42. package/src/models/components/retentionpolicy.ts +21 -21
  43. package/src/models/operations/append.ts +6 -32
  44. package/src/models/operations/read.ts +6 -31
@@ -6,7 +6,6 @@ import * as z from "zod";
6
6
  import { EventStream } from "../../lib/event-streams.js";
7
7
  import { remap as remap$ } from "../../lib/primitives.js";
8
8
  import { safeParse } from "../../lib/schemas.js";
9
- import { ClosedEnum } from "../../types/enums.js";
10
9
  import { Result as SafeParseResult } from "../../types/fp.js";
11
10
  import * as components from "../components/index.js";
12
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -32,19 +31,13 @@ export type Limit = {
32
31
  count?: number | null | undefined;
33
32
  };
34
33
 
35
- export const One = {
36
- Json: "json",
37
- JsonBinsafe: "json-binsafe",
38
- } as const;
39
- export type One = ClosedEnum<typeof One>;
40
-
41
34
  /**
42
35
  * json: utf-8 plaintext data.
43
36
  *
44
37
  * @remarks
45
38
  * json-binsafe: base64 encoded binary data.
46
39
  */
47
- export type S2Format = One;
40
+ export type S2Format = components.FormatOption;
48
41
 
49
42
  export type ReadRequest = {
50
43
  /**
@@ -61,7 +54,7 @@ export type ReadRequest = {
61
54
  * @remarks
62
55
  * json-binsafe: base64 encoded binary data.
63
56
  */
64
- s2Format?: One | undefined;
57
+ s2Format?: components.FormatOption | undefined;
65
58
  /**
66
59
  * Name of the stream.
67
60
  */
@@ -122,30 +115,12 @@ export function limitFromJSON(
122
115
  );
123
116
  }
124
117
 
125
- /** @internal */
126
- export const One$inboundSchema: z.ZodNativeEnum<typeof One> = z.nativeEnum(One);
127
-
128
- /** @internal */
129
- export const One$outboundSchema: z.ZodNativeEnum<typeof One> =
130
- One$inboundSchema;
131
-
132
- /**
133
- * @internal
134
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
135
- */
136
- export namespace One$ {
137
- /** @deprecated use `One$inboundSchema` instead. */
138
- export const inboundSchema = One$inboundSchema;
139
- /** @deprecated use `One$outboundSchema` instead. */
140
- export const outboundSchema = One$outboundSchema;
141
- }
142
-
143
118
  /** @internal */
144
119
  export const S2Format$inboundSchema: z.ZodType<
145
120
  S2Format,
146
121
  z.ZodTypeDef,
147
122
  unknown
148
- > = One$inboundSchema;
123
+ > = components.FormatOption$inboundSchema;
149
124
 
150
125
  /** @internal */
151
126
  export type S2Format$Outbound = string;
@@ -155,7 +130,7 @@ export const S2Format$outboundSchema: z.ZodType<
155
130
  S2Format$Outbound,
156
131
  z.ZodTypeDef,
157
132
  S2Format
158
- > = One$outboundSchema;
133
+ > = components.FormatOption$outboundSchema;
159
134
 
160
135
  /**
161
136
  * @internal
@@ -192,7 +167,7 @@ export const ReadRequest$inboundSchema: z.ZodType<
192
167
  > = z.object({
193
168
  start_seq_num: z.number().int().optional(),
194
169
  limit: z.lazy(() => Limit$inboundSchema).optional(),
195
- "s2-format": One$inboundSchema.optional(),
170
+ "s2-format": components.FormatOption$inboundSchema.optional(),
196
171
  stream: z.string(),
197
172
  }).transform((v) => {
198
173
  return remap$(v, {
@@ -217,7 +192,7 @@ export const ReadRequest$outboundSchema: z.ZodType<
217
192
  > = z.object({
218
193
  startSeqNum: z.number().int().optional(),
219
194
  limit: z.lazy(() => Limit$outboundSchema).optional(),
220
- s2Format: One$outboundSchema.optional(),
195
+ s2Format: components.FormatOption$outboundSchema.optional(),
221
196
  stream: z.string(),
222
197
  }).transform((v) => {
223
198
  return remap$(v, {