@s2-dev/streamstore 0.15.8 → 0.15.11
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 +74 -50
- package/bin/mcp-server.js.map +15 -14
- package/dist/commonjs/funcs/basinsListBasins.js +3 -0
- package/dist/commonjs/funcs/basinsListBasins.js.map +1 -1
- package/dist/commonjs/funcs/streamsListStreams.js +3 -0
- package/dist/commonjs/funcs/streamsListStreams.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/encodings.d.ts.map +1 -1
- package/dist/commonjs/lib/event-streams.d.ts +1 -1
- package/dist/commonjs/lib/event-streams.d.ts.map +1 -1
- package/dist/commonjs/lib/event-streams.js +23 -32
- package/dist/commonjs/lib/event-streams.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js.map +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/infiniteretention.d.ts +25 -0
- package/dist/commonjs/models/components/infiniteretention.d.ts.map +1 -0
- package/dist/commonjs/models/components/infiniteretention.js +65 -0
- package/dist/commonjs/models/components/infiniteretention.js.map +1 -0
- package/dist/commonjs/models/components/metric.d.ts +15 -15
- package/dist/commonjs/models/components/metric.d.ts.map +1 -1
- package/dist/commonjs/models/components/metric.js +18 -20
- package/dist/commonjs/models/components/metric.js.map +1 -1
- package/dist/commonjs/models/components/retentionpolicy.d.ts +37 -6
- package/dist/commonjs/models/components/retentionpolicy.d.ts.map +1 -1
- package/dist/commonjs/models/components/retentionpolicy.js +36 -3
- package/dist/commonjs/models/components/retentionpolicy.js.map +1 -1
- package/dist/commonjs/models/operations/read.d.ts +3 -0
- package/dist/commonjs/models/operations/read.d.ts.map +1 -1
- package/dist/commonjs/models/operations/read.js.map +1 -1
- package/dist/esm/funcs/basinsListBasins.js +3 -0
- package/dist/esm/funcs/basinsListBasins.js.map +1 -1
- package/dist/esm/funcs/streamsListStreams.js +3 -0
- package/dist/esm/funcs/streamsListStreams.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/encodings.d.ts.map +1 -1
- package/dist/esm/lib/event-streams.d.ts +1 -1
- package/dist/esm/lib/event-streams.d.ts.map +1 -1
- package/dist/esm/lib/event-streams.js +23 -32
- package/dist/esm/lib/event-streams.js.map +1 -1
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/mcp-server.js.map +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/infiniteretention.d.ts +25 -0
- package/dist/esm/models/components/infiniteretention.d.ts.map +1 -0
- package/dist/esm/models/components/infiniteretention.js +27 -0
- package/dist/esm/models/components/infiniteretention.js.map +1 -0
- package/dist/esm/models/components/metric.d.ts +15 -15
- package/dist/esm/models/components/metric.d.ts.map +1 -1
- package/dist/esm/models/components/metric.js +15 -17
- package/dist/esm/models/components/metric.js.map +1 -1
- package/dist/esm/models/components/retentionpolicy.d.ts +37 -6
- package/dist/esm/models/components/retentionpolicy.d.ts.map +1 -1
- package/dist/esm/models/components/retentionpolicy.js +33 -2
- package/dist/esm/models/components/retentionpolicy.js.map +1 -1
- package/dist/esm/models/operations/read.d.ts +3 -0
- package/dist/esm/models/operations/read.d.ts.map +1 -1
- package/dist/esm/models/operations/read.js.map +1 -1
- package/examples/accessTokensListAccessTokens.example.ts +1 -1
- package/examples/package-lock.json +3 -3
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/funcs/basinsListBasins.ts +3 -0
- package/src/funcs/streamsListStreams.ts +3 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/event-streams.ts +21 -33
- package/src/lib/security.ts +4 -1
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/index.ts +1 -0
- package/src/models/components/infiniteretention.ts +58 -0
- package/src/models/components/metric.ts +28 -25
- package/src/models/components/retentionpolicy.ts +68 -6
- package/src/models/operations/read.ts +3 -0
- package/temp/example.ts +5 -0
package/src/lib/event-streams.ts
CHANGED
|
@@ -13,34 +13,37 @@ export class EventStream<T extends ServerEvent<unknown>>
|
|
|
13
13
|
extends ReadableStream<T>
|
|
14
14
|
{
|
|
15
15
|
constructor(
|
|
16
|
-
|
|
16
|
+
responseBody: ReadableStream<Uint8Array>,
|
|
17
17
|
parse: (x: ServerEvent<string>) => IteratorResult<T, undefined>,
|
|
18
18
|
) {
|
|
19
|
-
const
|
|
19
|
+
const upstream = responseBody.getReader();
|
|
20
20
|
let buffer: Uint8Array = new Uint8Array();
|
|
21
21
|
super({
|
|
22
|
-
async pull(
|
|
22
|
+
async pull(downstream) {
|
|
23
23
|
try {
|
|
24
24
|
while (true) {
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
buffer =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
const match = findBoundary(buffer);
|
|
26
|
+
if (!match) {
|
|
27
|
+
const chunk = await upstream.read();
|
|
28
|
+
if (chunk.done) return downstream.close();
|
|
29
|
+
buffer = concatBuffer(buffer, chunk.value);
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const message = buffer.slice(0, match.index);
|
|
33
|
+
buffer = buffer.slice(match.index + match.length);
|
|
34
|
+
const item = parseMessage(message, parse);
|
|
35
|
+
if (item?.value) return downstream.enqueue(item.value);
|
|
36
|
+
if (item?.done) {
|
|
37
|
+
await upstream.cancel("done");
|
|
38
|
+
return downstream.close();
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
} catch (e) {
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
downstream.error(e);
|
|
43
|
+
await upstream.cancel(e);
|
|
41
44
|
}
|
|
42
45
|
},
|
|
43
|
-
cancel: reason =>
|
|
46
|
+
cancel: reason => upstream.cancel(reason),
|
|
44
47
|
});
|
|
45
48
|
}
|
|
46
49
|
|
|
@@ -105,22 +108,7 @@ function findBoundary(
|
|
|
105
108
|
return null;
|
|
106
109
|
}
|
|
107
110
|
|
|
108
|
-
function
|
|
109
|
-
remainder: Uint8Array,
|
|
110
|
-
): Generator<{ chunk: Uint8Array; remainder: Uint8Array }> {
|
|
111
|
-
while (true) {
|
|
112
|
-
const match = findBoundary(remainder);
|
|
113
|
-
if (!match) {
|
|
114
|
-
yield { chunk: new Uint8Array(), remainder };
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
const chunk = remainder.slice(0, match.index);
|
|
118
|
-
remainder = remainder.slice(match.index + match.length);
|
|
119
|
-
yield { chunk, remainder };
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function parseChunk<T extends ServerEvent<unknown>>(
|
|
111
|
+
function parseMessage<T extends ServerEvent<unknown>>(
|
|
124
112
|
chunk: Uint8Array,
|
|
125
113
|
parse: (x: ServerEvent<string>) => IteratorResult<T, undefined>,
|
|
126
114
|
) {
|
package/src/lib/security.ts
CHANGED
|
@@ -84,7 +84,10 @@ type SecurityInputOAuth2 = {
|
|
|
84
84
|
type SecurityInputOAuth2ClientCredentials = {
|
|
85
85
|
type: "oauth2:client_credentials";
|
|
86
86
|
value:
|
|
87
|
-
| {
|
|
87
|
+
| {
|
|
88
|
+
clientID?: string | undefined;
|
|
89
|
+
clientSecret?: string | undefined;
|
|
90
|
+
}
|
|
88
91
|
| null
|
|
89
92
|
| string
|
|
90
93
|
| undefined;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from "./createstreamrequest.js";
|
|
|
21
21
|
export * from "./deleteonemptyconfig.js";
|
|
22
22
|
export * from "./deleteonemptyreconfiguration.js";
|
|
23
23
|
export * from "./gauge.js";
|
|
24
|
+
export * from "./infiniteretention.js";
|
|
24
25
|
export * from "./issueaccesstokenresponse.js";
|
|
25
26
|
export * from "./label.js";
|
|
26
27
|
export * from "./listaccesstokensresponse.js";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type InfiniteRetention = {};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const InfiniteRetention$inboundSchema: z.ZodType<
|
|
14
|
+
InfiniteRetention,
|
|
15
|
+
z.ZodTypeDef,
|
|
16
|
+
unknown
|
|
17
|
+
> = z.object({});
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type InfiniteRetention$Outbound = {};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const InfiniteRetention$outboundSchema: z.ZodType<
|
|
24
|
+
InfiniteRetention$Outbound,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
InfiniteRetention
|
|
27
|
+
> = z.object({});
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
32
|
+
*/
|
|
33
|
+
export namespace InfiniteRetention$ {
|
|
34
|
+
/** @deprecated use `InfiniteRetention$inboundSchema` instead. */
|
|
35
|
+
export const inboundSchema = InfiniteRetention$inboundSchema;
|
|
36
|
+
/** @deprecated use `InfiniteRetention$outboundSchema` instead. */
|
|
37
|
+
export const outboundSchema = InfiniteRetention$outboundSchema;
|
|
38
|
+
/** @deprecated use `InfiniteRetention$Outbound` instead. */
|
|
39
|
+
export type Outbound = InfiniteRetention$Outbound;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function infiniteRetentionToJSON(
|
|
43
|
+
infiniteRetention: InfiniteRetention,
|
|
44
|
+
): string {
|
|
45
|
+
return JSON.stringify(
|
|
46
|
+
InfiniteRetention$outboundSchema.parse(infiniteRetention),
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function infiniteRetentionFromJSON(
|
|
51
|
+
jsonString: string,
|
|
52
|
+
): SafeParseResult<InfiniteRetention, SDKValidationError> {
|
|
53
|
+
return safeParse(
|
|
54
|
+
jsonString,
|
|
55
|
+
(x) => InfiniteRetention$inboundSchema.parse(JSON.parse(x)),
|
|
56
|
+
`Failed to parse 'InfiniteRetention' from JSON`,
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -51,7 +51,7 @@ export type Three = {
|
|
|
51
51
|
* @remarks
|
|
52
52
|
* bucket.
|
|
53
53
|
*/
|
|
54
|
-
export type
|
|
54
|
+
export type Metric2 = {
|
|
55
55
|
accumulation: Accumulation;
|
|
56
56
|
};
|
|
57
57
|
|
|
@@ -62,7 +62,7 @@ export type Metric1 = {
|
|
|
62
62
|
scalar: Scalar;
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
export type Metric = Metric1 |
|
|
65
|
+
export type Metric = Metric1 | Metric2 | Three | Four;
|
|
66
66
|
|
|
67
67
|
/** @internal */
|
|
68
68
|
export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
|
|
@@ -156,46 +156,49 @@ export function threeFromJSON(
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
/** @internal */
|
|
159
|
-
export const
|
|
160
|
-
.object({
|
|
159
|
+
export const Metric2$inboundSchema: z.ZodType<Metric2, z.ZodTypeDef, unknown> =
|
|
160
|
+
z.object({
|
|
161
161
|
accumulation: Accumulation$inboundSchema,
|
|
162
162
|
});
|
|
163
163
|
|
|
164
164
|
/** @internal */
|
|
165
|
-
export type
|
|
165
|
+
export type Metric2$Outbound = {
|
|
166
166
|
accumulation: Accumulation$Outbound;
|
|
167
167
|
};
|
|
168
168
|
|
|
169
169
|
/** @internal */
|
|
170
|
-
export const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
export const Metric2$outboundSchema: z.ZodType<
|
|
171
|
+
Metric2$Outbound,
|
|
172
|
+
z.ZodTypeDef,
|
|
173
|
+
Metric2
|
|
174
|
+
> = z.object({
|
|
175
|
+
accumulation: Accumulation$outboundSchema,
|
|
176
|
+
});
|
|
174
177
|
|
|
175
178
|
/**
|
|
176
179
|
* @internal
|
|
177
180
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
178
181
|
*/
|
|
179
|
-
export namespace
|
|
180
|
-
/** @deprecated use `
|
|
181
|
-
export const inboundSchema =
|
|
182
|
-
/** @deprecated use `
|
|
183
|
-
export const outboundSchema =
|
|
184
|
-
/** @deprecated use `
|
|
185
|
-
export type Outbound =
|
|
182
|
+
export namespace Metric2$ {
|
|
183
|
+
/** @deprecated use `Metric2$inboundSchema` instead. */
|
|
184
|
+
export const inboundSchema = Metric2$inboundSchema;
|
|
185
|
+
/** @deprecated use `Metric2$outboundSchema` instead. */
|
|
186
|
+
export const outboundSchema = Metric2$outboundSchema;
|
|
187
|
+
/** @deprecated use `Metric2$Outbound` instead. */
|
|
188
|
+
export type Outbound = Metric2$Outbound;
|
|
186
189
|
}
|
|
187
190
|
|
|
188
|
-
export function
|
|
189
|
-
return JSON.stringify(
|
|
191
|
+
export function metric2ToJSON(metric2: Metric2): string {
|
|
192
|
+
return JSON.stringify(Metric2$outboundSchema.parse(metric2));
|
|
190
193
|
}
|
|
191
194
|
|
|
192
|
-
export function
|
|
195
|
+
export function metric2FromJSON(
|
|
193
196
|
jsonString: string,
|
|
194
|
-
): SafeParseResult<
|
|
197
|
+
): SafeParseResult<Metric2, SDKValidationError> {
|
|
195
198
|
return safeParse(
|
|
196
199
|
jsonString,
|
|
197
|
-
(x) =>
|
|
198
|
-
`Failed to parse '
|
|
200
|
+
(x) => Metric2$inboundSchema.parse(JSON.parse(x)),
|
|
201
|
+
`Failed to parse 'Metric2' from JSON`,
|
|
199
202
|
);
|
|
200
203
|
}
|
|
201
204
|
|
|
@@ -250,7 +253,7 @@ export function metric1FromJSON(
|
|
|
250
253
|
export const Metric$inboundSchema: z.ZodType<Metric, z.ZodTypeDef, unknown> = z
|
|
251
254
|
.union([
|
|
252
255
|
z.lazy(() => Metric1$inboundSchema),
|
|
253
|
-
z.lazy(() =>
|
|
256
|
+
z.lazy(() => Metric2$inboundSchema),
|
|
254
257
|
z.lazy(() => Three$inboundSchema),
|
|
255
258
|
z.lazy(() => Four$inboundSchema),
|
|
256
259
|
]);
|
|
@@ -258,7 +261,7 @@ export const Metric$inboundSchema: z.ZodType<Metric, z.ZodTypeDef, unknown> = z
|
|
|
258
261
|
/** @internal */
|
|
259
262
|
export type Metric$Outbound =
|
|
260
263
|
| Metric1$Outbound
|
|
261
|
-
|
|
|
264
|
+
| Metric2$Outbound
|
|
262
265
|
| Three$Outbound
|
|
263
266
|
| Four$Outbound;
|
|
264
267
|
|
|
@@ -269,7 +272,7 @@ export const Metric$outboundSchema: z.ZodType<
|
|
|
269
272
|
Metric
|
|
270
273
|
> = z.union([
|
|
271
274
|
z.lazy(() => Metric1$outboundSchema),
|
|
272
|
-
z.lazy(() =>
|
|
275
|
+
z.lazy(() => Metric2$outboundSchema),
|
|
273
276
|
z.lazy(() => Three$outboundSchema),
|
|
274
277
|
z.lazy(() => Four$outboundSchema),
|
|
275
278
|
]);
|
|
@@ -6,24 +6,83 @@ import * as z from "zod";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
InfiniteRetention,
|
|
11
|
+
InfiniteRetention$inboundSchema,
|
|
12
|
+
InfiniteRetention$Outbound,
|
|
13
|
+
InfiniteRetention$outboundSchema,
|
|
14
|
+
} from "./infiniteretention.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Retain records unless explicitly trimmed.
|
|
18
|
+
*/
|
|
19
|
+
export type Two = {
|
|
20
|
+
infinite: InfiniteRetention;
|
|
21
|
+
};
|
|
9
22
|
|
|
10
23
|
/**
|
|
11
24
|
* Age in seconds for automatic trimming of records older than this threshold.
|
|
12
25
|
*
|
|
13
26
|
* @remarks
|
|
14
|
-
*
|
|
27
|
+
* This must be set to a value greater than 0 seconds.
|
|
28
|
+
* (While S2 is in public preview, this is capped at 28 days. Let us know if you'd like the cap removed.)
|
|
15
29
|
*/
|
|
16
30
|
export type One = {
|
|
17
31
|
/**
|
|
18
32
|
* Age in seconds for automatic trimming of records older than this threshold.
|
|
19
33
|
*
|
|
20
34
|
* @remarks
|
|
21
|
-
*
|
|
35
|
+
* This must be set to a value greater than 0 seconds.
|
|
36
|
+
* (While S2 is in public preview, this is capped at 28 days. Let us know if you'd like the cap removed.)
|
|
22
37
|
*/
|
|
23
38
|
age: number;
|
|
24
39
|
};
|
|
25
40
|
|
|
26
|
-
export type RetentionPolicy = One;
|
|
41
|
+
export type RetentionPolicy = One | Two;
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z
|
|
45
|
+
.object({
|
|
46
|
+
infinite: InfiniteRetention$inboundSchema,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type Two$Outbound = {
|
|
51
|
+
infinite: InfiniteRetention$Outbound;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
|
|
56
|
+
.object({
|
|
57
|
+
infinite: InfiniteRetention$outboundSchema,
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
63
|
+
*/
|
|
64
|
+
export namespace Two$ {
|
|
65
|
+
/** @deprecated use `Two$inboundSchema` instead. */
|
|
66
|
+
export const inboundSchema = Two$inboundSchema;
|
|
67
|
+
/** @deprecated use `Two$outboundSchema` instead. */
|
|
68
|
+
export const outboundSchema = Two$outboundSchema;
|
|
69
|
+
/** @deprecated use `Two$Outbound` instead. */
|
|
70
|
+
export type Outbound = Two$Outbound;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function twoToJSON(two: Two): string {
|
|
74
|
+
return JSON.stringify(Two$outboundSchema.parse(two));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function twoFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<Two, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) => Two$inboundSchema.parse(JSON.parse(x)),
|
|
83
|
+
`Failed to parse 'Two' from JSON`,
|
|
84
|
+
);
|
|
85
|
+
}
|
|
27
86
|
|
|
28
87
|
/** @internal */
|
|
29
88
|
export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
|
|
@@ -74,17 +133,20 @@ export const RetentionPolicy$inboundSchema: z.ZodType<
|
|
|
74
133
|
RetentionPolicy,
|
|
75
134
|
z.ZodTypeDef,
|
|
76
135
|
unknown
|
|
77
|
-
> = z.lazy(() => One$inboundSchema);
|
|
136
|
+
> = z.union([z.lazy(() => One$inboundSchema), z.lazy(() => Two$inboundSchema)]);
|
|
78
137
|
|
|
79
138
|
/** @internal */
|
|
80
|
-
export type RetentionPolicy$Outbound = One$Outbound;
|
|
139
|
+
export type RetentionPolicy$Outbound = One$Outbound | Two$Outbound;
|
|
81
140
|
|
|
82
141
|
/** @internal */
|
|
83
142
|
export const RetentionPolicy$outboundSchema: z.ZodType<
|
|
84
143
|
RetentionPolicy$Outbound,
|
|
85
144
|
z.ZodTypeDef,
|
|
86
145
|
RetentionPolicy
|
|
87
|
-
> = z.
|
|
146
|
+
> = z.union([
|
|
147
|
+
z.lazy(() => One$outboundSchema),
|
|
148
|
+
z.lazy(() => Two$outboundSchema),
|
|
149
|
+
]);
|
|
88
150
|
|
|
89
151
|
/**
|
|
90
152
|
* @internal
|
|
@@ -65,6 +65,9 @@ export type ReadRequest = {
|
|
|
65
65
|
until?: number | undefined;
|
|
66
66
|
/**
|
|
67
67
|
* Clamp the start position at the tail position.
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* If set, the read will start at the tail of the stream if the requested position is greater than it.
|
|
68
71
|
*/
|
|
69
72
|
clamp?: boolean | undefined;
|
|
70
73
|
/**
|