@s2-dev/streamstore 0.8.2 → 0.9.0
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 +40 -7
- package/bin/mcp-server.js +50 -12
- package/bin/mcp-server.js.map +16 -15
- package/dist/commonjs/hooks/types.d.ts +1 -1
- package/dist/commonjs/hooks/types.d.ts.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/security.d.ts +4 -3
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +6 -1
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/mcp-server/extensions.d.ts +2 -0
- package/dist/commonjs/mcp-server/extensions.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/prompts.d.ts +26 -0
- package/dist/commonjs/mcp-server/prompts.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/prompts.js +47 -0
- package/dist/commonjs/mcp-server/prompts.js.map +1 -0
- package/dist/commonjs/mcp-server/resources.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/resources.js +1 -0
- package/dist/commonjs/mcp-server/resources.js.map +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +4 -2
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools.js +1 -0
- package/dist/commonjs/mcp-server/tools.js.map +1 -1
- package/dist/commonjs/models/components/appendrecord.d.ts +10 -0
- package/dist/commonjs/models/components/appendrecord.d.ts.map +1 -1
- package/dist/commonjs/models/components/appendrecord.js +2 -0
- package/dist/commonjs/models/components/appendrecord.js.map +1 -1
- package/dist/commonjs/models/components/output.d.ts +18 -13
- package/dist/commonjs/models/components/output.d.ts.map +1 -1
- package/dist/commonjs/models/components/output.js.map +1 -1
- package/dist/commonjs/models/components/readresponse.d.ts +4 -1
- package/dist/commonjs/models/components/readresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/readresponse.js.map +1 -1
- package/dist/commonjs/models/components/sequencedrecord.d.ts +6 -1
- package/dist/commonjs/models/components/sequencedrecord.d.ts.map +1 -1
- package/dist/commonjs/models/components/sequencedrecord.js +2 -0
- package/dist/commonjs/models/components/sequencedrecord.js.map +1 -1
- package/dist/commonjs/models/components/streamconfig.d.ts +9 -0
- package/dist/commonjs/models/components/streamconfig.d.ts.map +1 -1
- package/dist/commonjs/models/components/streamconfig.js +4 -0
- package/dist/commonjs/models/components/streamconfig.js.map +1 -1
- package/dist/commonjs/models/operations/read.d.ts +10 -2
- package/dist/commonjs/models/operations/read.d.ts.map +1 -1
- package/dist/commonjs/models/operations/read.js.map +1 -1
- package/dist/esm/hooks/types.d.ts +1 -1
- package/dist/esm/hooks/types.d.ts.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/security.d.ts +4 -3
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +6 -1
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/mcp-server/extensions.d.ts +2 -0
- package/dist/esm/mcp-server/extensions.d.ts.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/prompts.d.ts +26 -0
- package/dist/esm/mcp-server/prompts.d.ts.map +1 -0
- package/dist/esm/mcp-server/prompts.js +43 -0
- package/dist/esm/mcp-server/prompts.js.map +1 -0
- package/dist/esm/mcp-server/resources.d.ts.map +1 -1
- package/dist/esm/mcp-server/resources.js +1 -0
- package/dist/esm/mcp-server/resources.js.map +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +4 -2
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools.js +1 -0
- package/dist/esm/mcp-server/tools.js.map +1 -1
- package/dist/esm/models/components/appendrecord.d.ts +10 -0
- package/dist/esm/models/components/appendrecord.d.ts.map +1 -1
- package/dist/esm/models/components/appendrecord.js +2 -0
- package/dist/esm/models/components/appendrecord.js.map +1 -1
- package/dist/esm/models/components/output.d.ts +18 -13
- package/dist/esm/models/components/output.d.ts.map +1 -1
- package/dist/esm/models/components/output.js.map +1 -1
- package/dist/esm/models/components/readresponse.d.ts +4 -1
- package/dist/esm/models/components/readresponse.d.ts.map +1 -1
- package/dist/esm/models/components/readresponse.js.map +1 -1
- package/dist/esm/models/components/sequencedrecord.d.ts +6 -1
- package/dist/esm/models/components/sequencedrecord.d.ts.map +1 -1
- package/dist/esm/models/components/sequencedrecord.js +2 -0
- package/dist/esm/models/components/sequencedrecord.js.map +1 -1
- package/dist/esm/models/components/streamconfig.d.ts +9 -0
- package/dist/esm/models/components/streamconfig.d.ts.map +1 -1
- package/dist/esm/models/components/streamconfig.js +4 -0
- package/dist/esm/models/components/streamconfig.js.map +1 -1
- package/dist/esm/models/operations/read.d.ts +10 -2
- package/dist/esm/models/operations/read.d.ts.map +1 -1
- package/dist/esm/models/operations/read.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/hooks/types.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/security.ts +11 -3
- package/src/mcp-server/extensions.ts +4 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/prompts.ts +110 -0
- package/src/mcp-server/resources.ts +1 -0
- package/src/mcp-server/server.ts +4 -2
- package/src/mcp-server/tools.ts +1 -0
- package/src/models/components/appendrecord.ts +12 -0
- package/src/models/components/output.ts +18 -13
- package/src/models/components/readresponse.ts +4 -1
- package/src/models/components/sequencedrecord.ts +8 -1
- package/src/models/components/streamconfig.ts +13 -0
- package/src/models/operations/read.ts +10 -2
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
6
|
+
import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
7
|
+
import { GetPromptResult } from "@modelcontextprotocol/sdk/types.js";
|
|
8
|
+
import {
|
|
9
|
+
objectOutputType,
|
|
10
|
+
ZodOptional,
|
|
11
|
+
ZodType,
|
|
12
|
+
ZodTypeAny,
|
|
13
|
+
ZodTypeDef,
|
|
14
|
+
} from "zod";
|
|
15
|
+
import { S2Core } from "../core.js";
|
|
16
|
+
import { ConsoleLogger } from "./console-logger.js";
|
|
17
|
+
import { MCPScope } from "./scopes.js";
|
|
18
|
+
|
|
19
|
+
// '@modelcontextprotocol/sdk' currently does not export this type
|
|
20
|
+
export type PromptArgsRawShape = {
|
|
21
|
+
[k: string]:
|
|
22
|
+
| ZodType<string, ZodTypeDef, string>
|
|
23
|
+
| ZodOptional<ZodType<string, ZodTypeDef, string>>;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type PromptDefinition<
|
|
27
|
+
Args extends undefined | PromptArgsRawShape = undefined,
|
|
28
|
+
> = Args extends PromptArgsRawShape ? {
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
scopes?: MCPScope[];
|
|
32
|
+
args: Args;
|
|
33
|
+
prompt: (
|
|
34
|
+
client: S2Core,
|
|
35
|
+
args: objectOutputType<Args, ZodTypeAny>,
|
|
36
|
+
extra: RequestHandlerExtra,
|
|
37
|
+
) => GetPromptResult | Promise<GetPromptResult>;
|
|
38
|
+
}
|
|
39
|
+
: {
|
|
40
|
+
name: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
scopes?: MCPScope[];
|
|
43
|
+
args?: undefined;
|
|
44
|
+
prompt: (
|
|
45
|
+
client: S2Core,
|
|
46
|
+
extra: RequestHandlerExtra,
|
|
47
|
+
) => GetPromptResult | Promise<GetPromptResult>;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// Optional function to assist with formatting prompt results
|
|
51
|
+
export async function formatResult(value: string): Promise<GetPromptResult> {
|
|
52
|
+
return {
|
|
53
|
+
messages: [
|
|
54
|
+
{
|
|
55
|
+
role: "user",
|
|
56
|
+
content: {
|
|
57
|
+
type: "text",
|
|
58
|
+
text: value,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function createRegisterPrompt(
|
|
66
|
+
logger: ConsoleLogger,
|
|
67
|
+
server: McpServer,
|
|
68
|
+
sdk: S2Core,
|
|
69
|
+
allowedScopes: Set<MCPScope>,
|
|
70
|
+
): <A extends PromptArgsRawShape | undefined>(
|
|
71
|
+
prompt: PromptDefinition<A>,
|
|
72
|
+
) => void {
|
|
73
|
+
return <A extends PromptArgsRawShape | undefined>(
|
|
74
|
+
prompt: PromptDefinition<A>,
|
|
75
|
+
): void => {
|
|
76
|
+
const scopes = prompt.scopes ?? [];
|
|
77
|
+
if (!scopes.every((s: MCPScope) => allowedScopes.has(s))) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (prompt.args) {
|
|
82
|
+
if (prompt.description) {
|
|
83
|
+
server.prompt(
|
|
84
|
+
prompt.name,
|
|
85
|
+
prompt.description,
|
|
86
|
+
prompt.args,
|
|
87
|
+
async (args, ctx) => prompt.prompt(sdk, args, ctx),
|
|
88
|
+
);
|
|
89
|
+
} else {
|
|
90
|
+
server.prompt(
|
|
91
|
+
prompt.name,
|
|
92
|
+
prompt.args,
|
|
93
|
+
async (args, ctx) => prompt.prompt(sdk, args, ctx),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
if (prompt.description) {
|
|
98
|
+
server.prompt(
|
|
99
|
+
prompt.name,
|
|
100
|
+
prompt.description,
|
|
101
|
+
async (ctx) => prompt.prompt(sdk, ctx),
|
|
102
|
+
);
|
|
103
|
+
} else {
|
|
104
|
+
server.prompt(prompt.name, async (ctx) => prompt.prompt(sdk, ctx));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
logger.debug("Registered prompt", { name: prompt.name });
|
|
109
|
+
};
|
|
110
|
+
}
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
6
6
|
import { S2Core } from "../core.js";
|
|
7
7
|
import { SDKOptions } from "../lib/config.js";
|
|
8
8
|
import type { ConsoleLogger } from "./console-logger.js";
|
|
9
|
+
import { createRegisterPrompt } from "./prompts.js";
|
|
9
10
|
import {
|
|
10
11
|
createRegisterResource,
|
|
11
12
|
createRegisterResourceTemplate,
|
|
@@ -36,7 +37,7 @@ export function createMCPServer(deps: {
|
|
|
36
37
|
}) {
|
|
37
38
|
const server = new McpServer({
|
|
38
39
|
name: "S2",
|
|
39
|
-
version: "0.
|
|
40
|
+
version: "0.9.0",
|
|
40
41
|
});
|
|
41
42
|
|
|
42
43
|
const client = new S2Core({
|
|
@@ -62,7 +63,8 @@ export function createMCPServer(deps: {
|
|
|
62
63
|
client,
|
|
63
64
|
scopes,
|
|
64
65
|
);
|
|
65
|
-
const
|
|
66
|
+
const prompt = createRegisterPrompt(deps.logger, server, client, scopes);
|
|
67
|
+
const register = { tool, resource, resourceTemplate, prompt };
|
|
66
68
|
void register; // suppress unused warnings
|
|
67
69
|
|
|
68
70
|
tool(tool$accountListBasins);
|
package/src/mcp-server/tools.ts
CHANGED
|
@@ -34,6 +34,7 @@ export type ToolDefinition<Args extends undefined | ZodRawShape = undefined> =
|
|
|
34
34
|
) => CallToolResult | Promise<CallToolResult>;
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
+
// Optional function to assist with formatting tool results
|
|
37
38
|
export async function formatResult(
|
|
38
39
|
value: unknown,
|
|
39
40
|
init: { response?: Response | undefined },
|
|
@@ -19,6 +19,15 @@ export type AppendRecord = {
|
|
|
19
19
|
* Series of name-value pairs for this record.
|
|
20
20
|
*/
|
|
21
21
|
headers?: Array<Array<string>> | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Timestamp for this record in milliseconds since Unix epoch.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* The service ensures monotonicity by adjusting it up if necessary to the maximum observed timestamp.
|
|
27
|
+
* A timestamp detected to be in the future will be adjusted down.
|
|
28
|
+
* If not provided, the semantics depend on the stream's `require_client_timestamps` config.
|
|
29
|
+
*/
|
|
30
|
+
timestamp?: number | null | undefined;
|
|
22
31
|
};
|
|
23
32
|
|
|
24
33
|
/** @internal */
|
|
@@ -29,12 +38,14 @@ export const AppendRecord$inboundSchema: z.ZodType<
|
|
|
29
38
|
> = z.object({
|
|
30
39
|
body: z.string(),
|
|
31
40
|
headers: z.array(z.array(z.string())).optional(),
|
|
41
|
+
timestamp: z.nullable(z.number().int()).optional(),
|
|
32
42
|
});
|
|
33
43
|
|
|
34
44
|
/** @internal */
|
|
35
45
|
export type AppendRecord$Outbound = {
|
|
36
46
|
body: string;
|
|
37
47
|
headers?: Array<Array<string>> | undefined;
|
|
48
|
+
timestamp?: number | null | undefined;
|
|
38
49
|
};
|
|
39
50
|
|
|
40
51
|
/** @internal */
|
|
@@ -45,6 +56,7 @@ export const AppendRecord$outboundSchema: z.ZodType<
|
|
|
45
56
|
> = z.object({
|
|
46
57
|
body: z.string(),
|
|
47
58
|
headers: z.array(z.array(z.string())).optional(),
|
|
59
|
+
timestamp: z.nullable(z.number().int()).optional(),
|
|
48
60
|
});
|
|
49
61
|
|
|
50
62
|
/**
|
|
@@ -15,35 +15,37 @@ import {
|
|
|
15
15
|
} from "./sequencedrecordbatch.js";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Sequence number
|
|
18
|
+
* Sequence number that will be assigned to the next record on this stream.
|
|
19
19
|
*
|
|
20
20
|
* @remarks
|
|
21
|
-
*
|
|
21
|
+
* This will be returned either because the requested `start_seq_num` was larger,
|
|
22
|
+
* or in case of a limited read, equal to it.
|
|
22
23
|
*/
|
|
23
24
|
export type NextSeqNum = {
|
|
24
25
|
/**
|
|
25
|
-
* Sequence number
|
|
26
|
+
* Sequence number that will be assigned to the next record on this stream.
|
|
26
27
|
*
|
|
27
28
|
* @remarks
|
|
28
|
-
*
|
|
29
|
+
* This will be returned either because the requested `start_seq_num` was larger,
|
|
30
|
+
* or in case of a limited read, equal to it.
|
|
29
31
|
*/
|
|
30
32
|
nextSeqNum: number;
|
|
31
33
|
};
|
|
32
34
|
|
|
33
35
|
/**
|
|
34
|
-
* Sequence number for the first record on this stream
|
|
36
|
+
* Sequence number for the first record on this stream.
|
|
35
37
|
*
|
|
36
38
|
* @remarks
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
+
* Typically this will be returned when the requested `start_seq_num` was smaller.
|
|
40
|
+
* It may also be returned during a session, if the stream gets concurrently trimmed.
|
|
39
41
|
*/
|
|
40
42
|
export type FirstSeqNum = {
|
|
41
43
|
/**
|
|
42
|
-
* Sequence number for the first record on this stream
|
|
44
|
+
* Sequence number for the first record on this stream.
|
|
43
45
|
*
|
|
44
46
|
* @remarks
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
+
* Typically this will be returned when the requested `start_seq_num` was smaller.
|
|
48
|
+
* It may also be returned during a session, if the stream gets concurrently trimmed.
|
|
47
49
|
*/
|
|
48
50
|
firstSeqNum: number;
|
|
49
51
|
};
|
|
@@ -52,8 +54,8 @@ export type FirstSeqNum = {
|
|
|
52
54
|
* Batch of records.
|
|
53
55
|
*
|
|
54
56
|
* @remarks
|
|
55
|
-
*
|
|
56
|
-
* that could have been
|
|
57
|
+
* It can only be empty when not in a session context (which implies a limit),
|
|
58
|
+
* if the first record that could have been retrieved would violate the limit.
|
|
57
59
|
*/
|
|
58
60
|
export type Batch = {
|
|
59
61
|
/**
|
|
@@ -63,7 +65,10 @@ export type Batch = {
|
|
|
63
65
|
};
|
|
64
66
|
|
|
65
67
|
/**
|
|
66
|
-
*
|
|
68
|
+
* Batch of records, or a sequence number if the read could not be satisfied.
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* An empty batch or a sequence number output will be a terminal message in a session.
|
|
67
72
|
*/
|
|
68
73
|
export type Output = Batch | FirstSeqNum | NextSeqNum;
|
|
69
74
|
|
|
@@ -41,7 +41,10 @@ export type Event = ClosedEnum<typeof Event>;
|
|
|
41
41
|
|
|
42
42
|
export type Message = {
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Batch of records, or a sequence number if the read could not be satisfied.
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* An empty batch or a sequence number output will be a terminal message in a session.
|
|
45
48
|
*/
|
|
46
49
|
data: Output;
|
|
47
50
|
event: Event;
|
|
@@ -27,9 +27,13 @@ export type SequencedRecord = {
|
|
|
27
27
|
*/
|
|
28
28
|
headers: Array<Header>;
|
|
29
29
|
/**
|
|
30
|
-
* Sequence number
|
|
30
|
+
* Sequence number assigned to this record.
|
|
31
31
|
*/
|
|
32
32
|
seqNum: number;
|
|
33
|
+
/**
|
|
34
|
+
* Timestamp for this record in milliseconds since Unix epoch.
|
|
35
|
+
*/
|
|
36
|
+
timestamp: number;
|
|
33
37
|
};
|
|
34
38
|
|
|
35
39
|
/** @internal */
|
|
@@ -41,6 +45,7 @@ export const SequencedRecord$inboundSchema: z.ZodType<
|
|
|
41
45
|
body: z.string(),
|
|
42
46
|
headers: z.array(Header$inboundSchema),
|
|
43
47
|
seq_num: z.number().int(),
|
|
48
|
+
timestamp: z.number().int(),
|
|
44
49
|
}).transform((v) => {
|
|
45
50
|
return remap$(v, {
|
|
46
51
|
"seq_num": "seqNum",
|
|
@@ -52,6 +57,7 @@ export type SequencedRecord$Outbound = {
|
|
|
52
57
|
body: string;
|
|
53
58
|
headers: Array<Header$Outbound>;
|
|
54
59
|
seq_num: number;
|
|
60
|
+
timestamp: number;
|
|
55
61
|
};
|
|
56
62
|
|
|
57
63
|
/** @internal */
|
|
@@ -63,6 +69,7 @@ export const SequencedRecord$outboundSchema: z.ZodType<
|
|
|
63
69
|
body: z.string(),
|
|
64
70
|
headers: z.array(Header$outboundSchema),
|
|
65
71
|
seqNum: z.number().int(),
|
|
72
|
+
timestamp: z.number().int(),
|
|
66
73
|
}).transform((v) => {
|
|
67
74
|
return remap$(v, {
|
|
68
75
|
seqNum: "seq_num",
|
|
@@ -23,6 +23,14 @@ import {
|
|
|
23
23
|
* Stream configuration.
|
|
24
24
|
*/
|
|
25
25
|
export type StreamConfig = {
|
|
26
|
+
/**
|
|
27
|
+
* Controls how to handle timestamps when they are not provided by the client.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* If this is false (or not set), the record's arrival time will be assigned as its timestamp.
|
|
31
|
+
* If this is true, then any append without a client-specified timestamp will be rejected as invalid.
|
|
32
|
+
*/
|
|
33
|
+
requireClientTimestamps?: boolean | null | undefined;
|
|
26
34
|
retentionPolicy?: RetentionPolicy | null | undefined;
|
|
27
35
|
/**
|
|
28
36
|
* Storage class for recent writes.
|
|
@@ -36,10 +44,12 @@ export const StreamConfig$inboundSchema: z.ZodType<
|
|
|
36
44
|
z.ZodTypeDef,
|
|
37
45
|
unknown
|
|
38
46
|
> = z.object({
|
|
47
|
+
require_client_timestamps: z.nullable(z.boolean()).optional(),
|
|
39
48
|
retention_policy: z.nullable(RetentionPolicy$inboundSchema).optional(),
|
|
40
49
|
storage_class: StorageClass$inboundSchema.optional(),
|
|
41
50
|
}).transform((v) => {
|
|
42
51
|
return remap$(v, {
|
|
52
|
+
"require_client_timestamps": "requireClientTimestamps",
|
|
43
53
|
"retention_policy": "retentionPolicy",
|
|
44
54
|
"storage_class": "storageClass",
|
|
45
55
|
});
|
|
@@ -47,6 +57,7 @@ export const StreamConfig$inboundSchema: z.ZodType<
|
|
|
47
57
|
|
|
48
58
|
/** @internal */
|
|
49
59
|
export type StreamConfig$Outbound = {
|
|
60
|
+
require_client_timestamps?: boolean | null | undefined;
|
|
50
61
|
retention_policy?: RetentionPolicy$Outbound | null | undefined;
|
|
51
62
|
storage_class?: string | undefined;
|
|
52
63
|
};
|
|
@@ -57,10 +68,12 @@ export const StreamConfig$outboundSchema: z.ZodType<
|
|
|
57
68
|
z.ZodTypeDef,
|
|
58
69
|
StreamConfig
|
|
59
70
|
> = z.object({
|
|
71
|
+
requireClientTimestamps: z.nullable(z.boolean()).optional(),
|
|
60
72
|
retentionPolicy: z.nullable(RetentionPolicy$outboundSchema).optional(),
|
|
61
73
|
storageClass: StorageClass$outboundSchema.optional(),
|
|
62
74
|
}).transform((v) => {
|
|
63
75
|
return remap$(v, {
|
|
76
|
+
requireClientTimestamps: "require_client_timestamps",
|
|
64
77
|
retentionPolicy: "retention_policy",
|
|
65
78
|
storageClass: "storage_class",
|
|
66
79
|
});
|
|
@@ -18,7 +18,11 @@ export const ReadServerList = [
|
|
|
18
18
|
] as const;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* Limit
|
|
21
|
+
* Limit how many records can be returned.
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* This will get capped at the default limit,
|
|
25
|
+
* which is up to 1000 records or 1MiB of metered bytes.
|
|
22
26
|
*/
|
|
23
27
|
export type Limit = {
|
|
24
28
|
/**
|
|
@@ -45,7 +49,11 @@ export type ReadRequest = {
|
|
|
45
49
|
*/
|
|
46
50
|
startSeqNum?: number | undefined;
|
|
47
51
|
/**
|
|
48
|
-
* Limit
|
|
52
|
+
* Limit how many records can be returned.
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* This will get capped at the default limit,
|
|
56
|
+
* which is up to 1000 records or 1MiB of metered bytes.
|
|
49
57
|
*/
|
|
50
58
|
limit?: Limit | undefined;
|
|
51
59
|
/**
|