@s2-dev/streamstore 0.15.5 → 0.15.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/bin/mcp-server.js +105 -8
- package/bin/mcp-server.js.map +19 -16
- package/dist/commonjs/funcs/basinsCreateBasin.js +1 -1
- package/dist/commonjs/funcs/basinsCreateBasin.js.map +1 -1
- package/dist/commonjs/funcs/basinsCreateOrReconfigureBasin.js +1 -1
- package/dist/commonjs/funcs/basinsCreateOrReconfigureBasin.js.map +1 -1
- package/dist/commonjs/funcs/metricsStreamMetrics.js +7 -0
- package/dist/commonjs/funcs/metricsStreamMetrics.js.map +1 -1
- package/dist/commonjs/funcs/recordsRead.js +1 -0
- package/dist/commonjs/funcs/recordsRead.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/event-streams.d.ts +1 -1
- package/dist/commonjs/lib/event-streams.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/deleteonemptyconfig.d.ts +35 -0
- package/dist/commonjs/models/components/deleteonemptyconfig.d.ts.map +1 -0
- package/dist/commonjs/models/components/deleteonemptyconfig.js +78 -0
- package/dist/commonjs/models/components/deleteonemptyconfig.js.map +1 -0
- package/dist/commonjs/models/components/deleteonemptyreconfiguration.d.ts +35 -0
- package/dist/commonjs/models/components/deleteonemptyreconfiguration.d.ts.map +1 -0
- package/dist/commonjs/models/components/deleteonemptyreconfiguration.js +78 -0
- package/dist/commonjs/models/components/deleteonemptyreconfiguration.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +3 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +3 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/streamconfig.d.ts +3 -0
- package/dist/commonjs/models/components/streamconfig.d.ts.map +1 -1
- package/dist/commonjs/models/components/streamconfig.js +5 -0
- package/dist/commonjs/models/components/streamconfig.js.map +1 -1
- package/dist/commonjs/models/components/streammetricset.d.ts +25 -0
- package/dist/commonjs/models/components/streammetricset.d.ts.map +1 -0
- package/dist/commonjs/models/components/streammetricset.js +59 -0
- package/dist/commonjs/models/components/streammetricset.js.map +1 -0
- package/dist/commonjs/models/components/streamreconfiguration.d.ts +3 -0
- package/dist/commonjs/models/components/streamreconfiguration.d.ts.map +1 -1
- package/dist/commonjs/models/components/streamreconfiguration.js +7 -0
- package/dist/commonjs/models/components/streamreconfiguration.js.map +1 -1
- package/dist/commonjs/models/operations/read.d.ts +5 -0
- package/dist/commonjs/models/operations/read.d.ts.map +1 -1
- package/dist/commonjs/models/operations/read.js +2 -0
- package/dist/commonjs/models/operations/read.js.map +1 -1
- package/dist/commonjs/models/operations/streammetrics.d.ts +21 -0
- package/dist/commonjs/models/operations/streammetrics.d.ts.map +1 -1
- package/dist/commonjs/models/operations/streammetrics.js +9 -0
- package/dist/commonjs/models/operations/streammetrics.js.map +1 -1
- package/dist/esm/funcs/basinsCreateBasin.js +1 -1
- package/dist/esm/funcs/basinsCreateBasin.js.map +1 -1
- package/dist/esm/funcs/basinsCreateOrReconfigureBasin.js +1 -1
- package/dist/esm/funcs/basinsCreateOrReconfigureBasin.js.map +1 -1
- package/dist/esm/funcs/metricsStreamMetrics.js +8 -1
- package/dist/esm/funcs/metricsStreamMetrics.js.map +1 -1
- package/dist/esm/funcs/recordsRead.js +1 -0
- package/dist/esm/funcs/recordsRead.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/event-streams.d.ts +1 -1
- package/dist/esm/lib/event-streams.d.ts.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/deleteonemptyconfig.d.ts +35 -0
- package/dist/esm/models/components/deleteonemptyconfig.d.ts.map +1 -0
- package/dist/esm/models/components/deleteonemptyconfig.js +40 -0
- package/dist/esm/models/components/deleteonemptyconfig.js.map +1 -0
- package/dist/esm/models/components/deleteonemptyreconfiguration.d.ts +35 -0
- package/dist/esm/models/components/deleteonemptyreconfiguration.d.ts.map +1 -0
- package/dist/esm/models/components/deleteonemptyreconfiguration.js +40 -0
- package/dist/esm/models/components/deleteonemptyreconfiguration.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +3 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +3 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/streamconfig.d.ts +3 -0
- package/dist/esm/models/components/streamconfig.d.ts.map +1 -1
- package/dist/esm/models/components/streamconfig.js +5 -0
- package/dist/esm/models/components/streamconfig.js.map +1 -1
- package/dist/esm/models/components/streammetricset.d.ts +25 -0
- package/dist/esm/models/components/streammetricset.d.ts.map +1 -0
- package/dist/esm/models/components/streammetricset.js +23 -0
- package/dist/esm/models/components/streammetricset.js.map +1 -0
- package/dist/esm/models/components/streamreconfiguration.d.ts +3 -0
- package/dist/esm/models/components/streamreconfiguration.d.ts.map +1 -1
- package/dist/esm/models/components/streamreconfiguration.js +7 -0
- package/dist/esm/models/components/streamreconfiguration.js.map +1 -1
- package/dist/esm/models/operations/read.d.ts +5 -0
- package/dist/esm/models/operations/read.d.ts.map +1 -1
- package/dist/esm/models/operations/read.js +2 -0
- package/dist/esm/models/operations/read.js.map +1 -1
- package/dist/esm/models/operations/streammetrics.d.ts +21 -0
- package/dist/esm/models/operations/streammetrics.d.ts.map +1 -1
- package/dist/esm/models/operations/streammetrics.js +9 -0
- package/dist/esm/models/operations/streammetrics.js.map +1 -1
- package/docs/sdks/metrics/README.md +2 -0
- package/examples/README.md +5 -0
- package/examples/accessTokensListAccessTokens.example.ts +2 -0
- package/examples/package-lock.json +2 -2
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/funcs/basinsCreateBasin.ts +1 -1
- package/src/funcs/basinsCreateOrReconfigureBasin.ts +1 -1
- package/src/funcs/metricsStreamMetrics.ts +9 -1
- package/src/funcs/recordsRead.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/event-streams.ts +1 -1
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/deleteonemptyconfig.ts +81 -0
- package/src/models/components/deleteonemptyreconfiguration.ts +83 -0
- package/src/models/components/index.ts +3 -0
- package/src/models/components/streamconfig.ts +12 -0
- package/src/models/components/streammetricset.ts +32 -0
- package/src/models/components/streamreconfiguration.ts +14 -0
- package/src/models/operations/read.ts +7 -0
- package/src/models/operations/streammetrics.ts +29 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { S2Core } from "../core.js";
|
|
6
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -99,6 +99,13 @@ async function $do(
|
|
|
99
99
|
|
|
100
100
|
const path = pathToFunc("/metrics/{basin}/{stream}")(pathParams);
|
|
101
101
|
|
|
102
|
+
const query = encodeFormQuery({
|
|
103
|
+
"end": payload.end,
|
|
104
|
+
"interval": payload.interval,
|
|
105
|
+
"set": payload.set,
|
|
106
|
+
"start": payload.start,
|
|
107
|
+
});
|
|
108
|
+
|
|
102
109
|
const headers = new Headers(compactMap({
|
|
103
110
|
Accept: "application/json",
|
|
104
111
|
}));
|
|
@@ -155,6 +162,7 @@ async function $do(
|
|
|
155
162
|
baseURL: options?.serverURL,
|
|
156
163
|
path: path,
|
|
157
164
|
headers: headers,
|
|
165
|
+
query: query,
|
|
158
166
|
body: body,
|
|
159
167
|
userAgent: client._options.userAgent,
|
|
160
168
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
package/src/funcs/recordsRead.ts
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -58,8 +58,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
58
58
|
export const SDK_METADATA = {
|
|
59
59
|
language: "typescript",
|
|
60
60
|
openapiDocVersion: "1.0.0",
|
|
61
|
-
sdkVersion: "0.15.
|
|
62
|
-
genVersion: "2.
|
|
61
|
+
sdkVersion: "0.15.7",
|
|
62
|
+
genVersion: "2.662.0",
|
|
63
63
|
userAgent:
|
|
64
|
-
"speakeasy-sdk/typescript 0.15.
|
|
64
|
+
"speakeasy-sdk/typescript 0.15.7 2.662.0 1.0.0 @s2-dev/streamstore",
|
|
65
65
|
} as const;
|
package/src/lib/event-streams.ts
CHANGED
|
@@ -43,7 +43,7 @@ export class EventStream<T extends ServerEvent<unknown>>
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
// Polyfill for older browsers
|
|
46
|
-
[Symbol.asyncIterator](): AsyncIterableIterator<T
|
|
46
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<T> {
|
|
47
47
|
const fn = (ReadableStream.prototype as any)[Symbol.asyncIterator];
|
|
48
48
|
if (typeof fn === "function") return fn.call(this);
|
|
49
49
|
const reader = this.getReader();
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type DeleteOnEmptyConfig = {
|
|
12
|
+
/**
|
|
13
|
+
* Minimum age in seconds before an empty stream can be deleted.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Set to 0 (default) to disable delete-on-empty (don't delete automatically).
|
|
17
|
+
*/
|
|
18
|
+
minAgeSecs?: number | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const DeleteOnEmptyConfig$inboundSchema: z.ZodType<
|
|
23
|
+
DeleteOnEmptyConfig,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
min_age_secs: z.number().int().optional(),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"min_age_secs": "minAgeSecs",
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type DeleteOnEmptyConfig$Outbound = {
|
|
36
|
+
min_age_secs?: number | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const DeleteOnEmptyConfig$outboundSchema: z.ZodType<
|
|
41
|
+
DeleteOnEmptyConfig$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
DeleteOnEmptyConfig
|
|
44
|
+
> = z.object({
|
|
45
|
+
minAgeSecs: z.number().int().optional(),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
minAgeSecs: "min_age_secs",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export namespace DeleteOnEmptyConfig$ {
|
|
57
|
+
/** @deprecated use `DeleteOnEmptyConfig$inboundSchema` instead. */
|
|
58
|
+
export const inboundSchema = DeleteOnEmptyConfig$inboundSchema;
|
|
59
|
+
/** @deprecated use `DeleteOnEmptyConfig$outboundSchema` instead. */
|
|
60
|
+
export const outboundSchema = DeleteOnEmptyConfig$outboundSchema;
|
|
61
|
+
/** @deprecated use `DeleteOnEmptyConfig$Outbound` instead. */
|
|
62
|
+
export type Outbound = DeleteOnEmptyConfig$Outbound;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function deleteOnEmptyConfigToJSON(
|
|
66
|
+
deleteOnEmptyConfig: DeleteOnEmptyConfig,
|
|
67
|
+
): string {
|
|
68
|
+
return JSON.stringify(
|
|
69
|
+
DeleteOnEmptyConfig$outboundSchema.parse(deleteOnEmptyConfig),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function deleteOnEmptyConfigFromJSON(
|
|
74
|
+
jsonString: string,
|
|
75
|
+
): SafeParseResult<DeleteOnEmptyConfig, SDKValidationError> {
|
|
76
|
+
return safeParse(
|
|
77
|
+
jsonString,
|
|
78
|
+
(x) => DeleteOnEmptyConfig$inboundSchema.parse(JSON.parse(x)),
|
|
79
|
+
`Failed to parse 'DeleteOnEmptyConfig' from JSON`,
|
|
80
|
+
);
|
|
81
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type DeleteOnEmptyReconfiguration = {
|
|
12
|
+
/**
|
|
13
|
+
* Minimum age in seconds before an empty stream can be deleted.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Set to 0 to disable delete-on-empty (don't delete automatically).
|
|
17
|
+
*/
|
|
18
|
+
minAgeSecs?: number | null | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const DeleteOnEmptyReconfiguration$inboundSchema: z.ZodType<
|
|
23
|
+
DeleteOnEmptyReconfiguration,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
min_age_secs: z.nullable(z.number().int()).optional(),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"min_age_secs": "minAgeSecs",
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type DeleteOnEmptyReconfiguration$Outbound = {
|
|
36
|
+
min_age_secs?: number | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const DeleteOnEmptyReconfiguration$outboundSchema: z.ZodType<
|
|
41
|
+
DeleteOnEmptyReconfiguration$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
DeleteOnEmptyReconfiguration
|
|
44
|
+
> = z.object({
|
|
45
|
+
minAgeSecs: z.nullable(z.number().int()).optional(),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
minAgeSecs: "min_age_secs",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export namespace DeleteOnEmptyReconfiguration$ {
|
|
57
|
+
/** @deprecated use `DeleteOnEmptyReconfiguration$inboundSchema` instead. */
|
|
58
|
+
export const inboundSchema = DeleteOnEmptyReconfiguration$inboundSchema;
|
|
59
|
+
/** @deprecated use `DeleteOnEmptyReconfiguration$outboundSchema` instead. */
|
|
60
|
+
export const outboundSchema = DeleteOnEmptyReconfiguration$outboundSchema;
|
|
61
|
+
/** @deprecated use `DeleteOnEmptyReconfiguration$Outbound` instead. */
|
|
62
|
+
export type Outbound = DeleteOnEmptyReconfiguration$Outbound;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function deleteOnEmptyReconfigurationToJSON(
|
|
66
|
+
deleteOnEmptyReconfiguration: DeleteOnEmptyReconfiguration,
|
|
67
|
+
): string {
|
|
68
|
+
return JSON.stringify(
|
|
69
|
+
DeleteOnEmptyReconfiguration$outboundSchema.parse(
|
|
70
|
+
deleteOnEmptyReconfiguration,
|
|
71
|
+
),
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function deleteOnEmptyReconfigurationFromJSON(
|
|
76
|
+
jsonString: string,
|
|
77
|
+
): SafeParseResult<DeleteOnEmptyReconfiguration, SDKValidationError> {
|
|
78
|
+
return safeParse(
|
|
79
|
+
jsonString,
|
|
80
|
+
(x) => DeleteOnEmptyReconfiguration$inboundSchema.parse(JSON.parse(x)),
|
|
81
|
+
`Failed to parse 'DeleteOnEmptyReconfiguration' from JSON`,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
@@ -18,6 +18,8 @@ export * from "./basinstate.js";
|
|
|
18
18
|
export * from "./createbasinrequest.js";
|
|
19
19
|
export * from "./createorreconfigurebasinrequest.js";
|
|
20
20
|
export * from "./createstreamrequest.js";
|
|
21
|
+
export * from "./deleteonemptyconfig.js";
|
|
22
|
+
export * from "./deleteonemptyreconfiguration.js";
|
|
21
23
|
export * from "./gauge.js";
|
|
22
24
|
export * from "./issueaccesstokenresponse.js";
|
|
23
25
|
export * from "./label.js";
|
|
@@ -42,6 +44,7 @@ export * from "./sequencedrecord.js";
|
|
|
42
44
|
export * from "./storageclass.js";
|
|
43
45
|
export * from "./streamconfig.js";
|
|
44
46
|
export * from "./streaminfo.js";
|
|
47
|
+
export * from "./streammetricset.js";
|
|
45
48
|
export * from "./streamposition.js";
|
|
46
49
|
export * from "./streamreconfiguration.js";
|
|
47
50
|
export * from "./tailresponse.js";
|
|
@@ -7,6 +7,12 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
DeleteOnEmptyConfig,
|
|
12
|
+
DeleteOnEmptyConfig$inboundSchema,
|
|
13
|
+
DeleteOnEmptyConfig$Outbound,
|
|
14
|
+
DeleteOnEmptyConfig$outboundSchema,
|
|
15
|
+
} from "./deleteonemptyconfig.js";
|
|
10
16
|
import {
|
|
11
17
|
RetentionPolicy,
|
|
12
18
|
RetentionPolicy$inboundSchema,
|
|
@@ -26,6 +32,7 @@ import {
|
|
|
26
32
|
} from "./timestampingconfig.js";
|
|
27
33
|
|
|
28
34
|
export type StreamConfig = {
|
|
35
|
+
deleteOnEmpty?: DeleteOnEmptyConfig | null | undefined;
|
|
29
36
|
retentionPolicy?: RetentionPolicy | null | undefined;
|
|
30
37
|
storageClass?: StorageClass | null | undefined;
|
|
31
38
|
timestamping?: TimestampingConfig | null | undefined;
|
|
@@ -37,11 +44,13 @@ export const StreamConfig$inboundSchema: z.ZodType<
|
|
|
37
44
|
z.ZodTypeDef,
|
|
38
45
|
unknown
|
|
39
46
|
> = z.object({
|
|
47
|
+
delete_on_empty: z.nullable(DeleteOnEmptyConfig$inboundSchema).optional(),
|
|
40
48
|
retention_policy: z.nullable(RetentionPolicy$inboundSchema).optional(),
|
|
41
49
|
storage_class: z.nullable(StorageClass$inboundSchema).optional(),
|
|
42
50
|
timestamping: z.nullable(TimestampingConfig$inboundSchema).optional(),
|
|
43
51
|
}).transform((v) => {
|
|
44
52
|
return remap$(v, {
|
|
53
|
+
"delete_on_empty": "deleteOnEmpty",
|
|
45
54
|
"retention_policy": "retentionPolicy",
|
|
46
55
|
"storage_class": "storageClass",
|
|
47
56
|
});
|
|
@@ -49,6 +58,7 @@ export const StreamConfig$inboundSchema: z.ZodType<
|
|
|
49
58
|
|
|
50
59
|
/** @internal */
|
|
51
60
|
export type StreamConfig$Outbound = {
|
|
61
|
+
delete_on_empty?: DeleteOnEmptyConfig$Outbound | null | undefined;
|
|
52
62
|
retention_policy?: RetentionPolicy$Outbound | null | undefined;
|
|
53
63
|
storage_class?: string | null | undefined;
|
|
54
64
|
timestamping?: TimestampingConfig$Outbound | null | undefined;
|
|
@@ -60,11 +70,13 @@ export const StreamConfig$outboundSchema: z.ZodType<
|
|
|
60
70
|
z.ZodTypeDef,
|
|
61
71
|
StreamConfig
|
|
62
72
|
> = z.object({
|
|
73
|
+
deleteOnEmpty: z.nullable(DeleteOnEmptyConfig$outboundSchema).optional(),
|
|
63
74
|
retentionPolicy: z.nullable(RetentionPolicy$outboundSchema).optional(),
|
|
64
75
|
storageClass: z.nullable(StorageClass$outboundSchema).optional(),
|
|
65
76
|
timestamping: z.nullable(TimestampingConfig$outboundSchema).optional(),
|
|
66
77
|
}).transform((v) => {
|
|
67
78
|
return remap$(v, {
|
|
79
|
+
deleteOnEmpty: "delete_on_empty",
|
|
68
80
|
retentionPolicy: "retention_policy",
|
|
69
81
|
storageClass: "storage_class",
|
|
70
82
|
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const StreamMetricSet = {
|
|
9
|
+
Storage: "storage",
|
|
10
|
+
} as const;
|
|
11
|
+
export type StreamMetricSet = ClosedEnum<typeof StreamMetricSet>;
|
|
12
|
+
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const StreamMetricSet$inboundSchema: z.ZodNativeEnum<
|
|
15
|
+
typeof StreamMetricSet
|
|
16
|
+
> = z.nativeEnum(StreamMetricSet);
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const StreamMetricSet$outboundSchema: z.ZodNativeEnum<
|
|
20
|
+
typeof StreamMetricSet
|
|
21
|
+
> = StreamMetricSet$inboundSchema;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
26
|
+
*/
|
|
27
|
+
export namespace StreamMetricSet$ {
|
|
28
|
+
/** @deprecated use `StreamMetricSet$inboundSchema` instead. */
|
|
29
|
+
export const inboundSchema = StreamMetricSet$inboundSchema;
|
|
30
|
+
/** @deprecated use `StreamMetricSet$outboundSchema` instead. */
|
|
31
|
+
export const outboundSchema = StreamMetricSet$outboundSchema;
|
|
32
|
+
}
|
|
@@ -7,6 +7,12 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
DeleteOnEmptyReconfiguration,
|
|
12
|
+
DeleteOnEmptyReconfiguration$inboundSchema,
|
|
13
|
+
DeleteOnEmptyReconfiguration$Outbound,
|
|
14
|
+
DeleteOnEmptyReconfiguration$outboundSchema,
|
|
15
|
+
} from "./deleteonemptyreconfiguration.js";
|
|
10
16
|
import {
|
|
11
17
|
RetentionPolicy,
|
|
12
18
|
RetentionPolicy$inboundSchema,
|
|
@@ -26,6 +32,7 @@ import {
|
|
|
26
32
|
} from "./timestampingreconfiguration.js";
|
|
27
33
|
|
|
28
34
|
export type StreamReconfiguration = {
|
|
35
|
+
deleteOnEmpty?: DeleteOnEmptyReconfiguration | null | undefined;
|
|
29
36
|
retentionPolicy?: RetentionPolicy | null | undefined;
|
|
30
37
|
storageClass?: StorageClass | null | undefined;
|
|
31
38
|
timestamping?: TimestampingReconfiguration | null | undefined;
|
|
@@ -37,12 +44,15 @@ export const StreamReconfiguration$inboundSchema: z.ZodType<
|
|
|
37
44
|
z.ZodTypeDef,
|
|
38
45
|
unknown
|
|
39
46
|
> = z.object({
|
|
47
|
+
delete_on_empty: z.nullable(DeleteOnEmptyReconfiguration$inboundSchema)
|
|
48
|
+
.optional(),
|
|
40
49
|
retention_policy: z.nullable(RetentionPolicy$inboundSchema).optional(),
|
|
41
50
|
storage_class: z.nullable(StorageClass$inboundSchema).optional(),
|
|
42
51
|
timestamping: z.nullable(TimestampingReconfiguration$inboundSchema)
|
|
43
52
|
.optional(),
|
|
44
53
|
}).transform((v) => {
|
|
45
54
|
return remap$(v, {
|
|
55
|
+
"delete_on_empty": "deleteOnEmpty",
|
|
46
56
|
"retention_policy": "retentionPolicy",
|
|
47
57
|
"storage_class": "storageClass",
|
|
48
58
|
});
|
|
@@ -50,6 +60,7 @@ export const StreamReconfiguration$inboundSchema: z.ZodType<
|
|
|
50
60
|
|
|
51
61
|
/** @internal */
|
|
52
62
|
export type StreamReconfiguration$Outbound = {
|
|
63
|
+
delete_on_empty?: DeleteOnEmptyReconfiguration$Outbound | null | undefined;
|
|
53
64
|
retention_policy?: RetentionPolicy$Outbound | null | undefined;
|
|
54
65
|
storage_class?: string | null | undefined;
|
|
55
66
|
timestamping?: TimestampingReconfiguration$Outbound | null | undefined;
|
|
@@ -61,12 +72,15 @@ export const StreamReconfiguration$outboundSchema: z.ZodType<
|
|
|
61
72
|
z.ZodTypeDef,
|
|
62
73
|
StreamReconfiguration
|
|
63
74
|
> = z.object({
|
|
75
|
+
deleteOnEmpty: z.nullable(DeleteOnEmptyReconfiguration$outboundSchema)
|
|
76
|
+
.optional(),
|
|
64
77
|
retentionPolicy: z.nullable(RetentionPolicy$outboundSchema).optional(),
|
|
65
78
|
storageClass: z.nullable(StorageClass$outboundSchema).optional(),
|
|
66
79
|
timestamping: z.nullable(TimestampingReconfiguration$outboundSchema)
|
|
67
80
|
.optional(),
|
|
68
81
|
}).transform((v) => {
|
|
69
82
|
return remap$(v, {
|
|
83
|
+
deleteOnEmpty: "delete_on_empty",
|
|
70
84
|
retentionPolicy: "retention_policy",
|
|
71
85
|
storageClass: "storage_class",
|
|
72
86
|
});
|
|
@@ -63,6 +63,10 @@ export type ReadRequest = {
|
|
|
63
63
|
* If this is provided, tailing will be disabled.
|
|
64
64
|
*/
|
|
65
65
|
until?: number | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Clamp the start position at the tail position.
|
|
68
|
+
*/
|
|
69
|
+
clamp?: boolean | undefined;
|
|
66
70
|
/**
|
|
67
71
|
* Basin name for basin-specific endpoints
|
|
68
72
|
*/
|
|
@@ -87,6 +91,7 @@ export const ReadRequest$inboundSchema: z.ZodType<
|
|
|
87
91
|
count: z.number().int().optional(),
|
|
88
92
|
bytes: z.number().int().optional(),
|
|
89
93
|
until: z.number().int().optional(),
|
|
94
|
+
clamp: z.boolean().optional(),
|
|
90
95
|
"s2-basin": z.string(),
|
|
91
96
|
}).transform((v) => {
|
|
92
97
|
return remap$(v, {
|
|
@@ -107,6 +112,7 @@ export type ReadRequest$Outbound = {
|
|
|
107
112
|
count?: number | undefined;
|
|
108
113
|
bytes?: number | undefined;
|
|
109
114
|
until?: number | undefined;
|
|
115
|
+
clamp?: boolean | undefined;
|
|
110
116
|
"s2-basin": string;
|
|
111
117
|
};
|
|
112
118
|
|
|
@@ -124,6 +130,7 @@ export const ReadRequest$outboundSchema: z.ZodType<
|
|
|
124
130
|
count: z.number().int().optional(),
|
|
125
131
|
bytes: z.number().int().optional(),
|
|
126
132
|
until: z.number().int().optional(),
|
|
133
|
+
clamp: z.boolean().optional(),
|
|
127
134
|
s2Basin: z.string(),
|
|
128
135
|
}).transform((v) => {
|
|
129
136
|
return remap$(v, {
|
|
@@ -5,9 +5,26 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import * as components from "../components/index.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
10
|
|
|
10
11
|
export type StreamMetricsRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* Metric set to return.
|
|
14
|
+
*/
|
|
15
|
+
set: components.StreamMetricSet;
|
|
16
|
+
/**
|
|
17
|
+
* Start timestamp as Unix epoch seconds, if applicable for the metric set.
|
|
18
|
+
*/
|
|
19
|
+
start?: number | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* End timestamp as Unix epoch seconds, if applicable for metric set.
|
|
22
|
+
*/
|
|
23
|
+
end?: number | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Interval to aggregate over for timeseries metric sets.
|
|
26
|
+
*/
|
|
27
|
+
interval?: components.TimeseriesInterval | undefined;
|
|
11
28
|
/**
|
|
12
29
|
* Basin name.
|
|
13
30
|
*/
|
|
@@ -24,12 +41,20 @@ export const StreamMetricsRequest$inboundSchema: z.ZodType<
|
|
|
24
41
|
z.ZodTypeDef,
|
|
25
42
|
unknown
|
|
26
43
|
> = z.object({
|
|
44
|
+
set: components.StreamMetricSet$inboundSchema,
|
|
45
|
+
start: z.number().int().optional(),
|
|
46
|
+
end: z.number().int().optional(),
|
|
47
|
+
interval: components.TimeseriesInterval$inboundSchema.optional(),
|
|
27
48
|
basin: z.string(),
|
|
28
49
|
stream: z.string(),
|
|
29
50
|
});
|
|
30
51
|
|
|
31
52
|
/** @internal */
|
|
32
53
|
export type StreamMetricsRequest$Outbound = {
|
|
54
|
+
set: string;
|
|
55
|
+
start?: number | undefined;
|
|
56
|
+
end?: number | undefined;
|
|
57
|
+
interval?: string | undefined;
|
|
33
58
|
basin: string;
|
|
34
59
|
stream: string;
|
|
35
60
|
};
|
|
@@ -40,6 +65,10 @@ export const StreamMetricsRequest$outboundSchema: z.ZodType<
|
|
|
40
65
|
z.ZodTypeDef,
|
|
41
66
|
StreamMetricsRequest
|
|
42
67
|
> = z.object({
|
|
68
|
+
set: components.StreamMetricSet$outboundSchema,
|
|
69
|
+
start: z.number().int().optional(),
|
|
70
|
+
end: z.number().int().optional(),
|
|
71
|
+
interval: components.TimeseriesInterval$outboundSchema.optional(),
|
|
43
72
|
basin: z.string(),
|
|
44
73
|
stream: z.string(),
|
|
45
74
|
});
|