@s2-dev/streamstore 0.13.1 → 0.13.3
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 +1 -1
- package/bin/mcp-server.js +1044 -999
- package/bin/mcp-server.js.map +20 -12
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.extras.d.ts +2 -0
- package/dist/commonjs/index.extras.d.ts.map +1 -0
- package/dist/commonjs/index.extras.js +18 -0
- package/dist/commonjs/index.extras.js.map +1 -0
- package/dist/commonjs/index.js +1 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/appendrecord.d.ts +2 -3
- package/dist/commonjs/models/components/appendrecord.d.ts.map +1 -1
- package/dist/commonjs/models/components/appendrecord.js +2 -3
- package/dist/commonjs/models/components/appendrecord.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +0 -1
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +0 -1
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/sequencedrecord.d.ts +2 -3
- package/dist/commonjs/models/components/sequencedrecord.d.ts.map +1 -1
- package/dist/commonjs/models/components/sequencedrecord.js +2 -3
- package/dist/commonjs/models/components/sequencedrecord.js.map +1 -1
- package/dist/commonjs/models/errors/appendconditionfailed.d.ts +36 -36
- package/dist/commonjs/models/errors/appendconditionfailed.d.ts.map +1 -1
- package/dist/commonjs/models/errors/appendconditionfailed.js +40 -40
- package/dist/commonjs/models/errors/appendconditionfailed.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.extras.d.ts +2 -0
- package/dist/esm/index.extras.d.ts.map +1 -0
- package/dist/esm/index.extras.js +2 -0
- package/dist/esm/index.extras.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/appendrecord.d.ts +2 -3
- package/dist/esm/models/components/appendrecord.d.ts.map +1 -1
- package/dist/esm/models/components/appendrecord.js +2 -3
- package/dist/esm/models/components/appendrecord.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +0 -1
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +0 -1
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/sequencedrecord.d.ts +2 -3
- package/dist/esm/models/components/sequencedrecord.d.ts.map +1 -1
- package/dist/esm/models/components/sequencedrecord.js +2 -3
- package/dist/esm/models/components/sequencedrecord.js.map +1 -1
- package/dist/esm/models/errors/appendconditionfailed.d.ts +36 -36
- package/dist/esm/models/errors/appendconditionfailed.d.ts.map +1 -1
- package/dist/esm/models/errors/appendconditionfailed.js +37 -37
- package/dist/esm/models/errors/appendconditionfailed.js.map +1 -1
- package/docs/sdks/records/README.md +2 -2
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/index.extras.ts +1 -0
- package/src/index.ts +2 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/appendrecord.ts +4 -10
- package/src/models/components/index.ts +0 -1
- package/src/models/components/sequencedrecord.ts +4 -10
- package/src/models/errors/appendconditionfailed.ts +67 -53
- package/dist/commonjs/models/components/header.d.ts +0 -43
- package/dist/commonjs/models/components/header.d.ts.map +0 -1
- package/dist/commonjs/models/components/header.js +0 -72
- package/dist/commonjs/models/components/header.js.map +0 -1
- package/dist/esm/models/components/header.d.ts +0 -43
- package/dist/esm/models/components/header.d.ts.map +0 -1
- package/dist/esm/models/components/header.js +0 -34
- package/dist/esm/models/components/header.js.map +0 -1
- package/src/models/components/header.ts +0 -75
package/src/lib/config.ts
CHANGED
|
@@ -54,8 +54,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
54
54
|
export const SDK_METADATA = {
|
|
55
55
|
language: "typescript",
|
|
56
56
|
openapiDocVersion: "1.0.0",
|
|
57
|
-
sdkVersion: "0.13.
|
|
58
|
-
genVersion: "2.
|
|
57
|
+
sdkVersion: "0.13.3",
|
|
58
|
+
genVersion: "2.610.0",
|
|
59
59
|
userAgent:
|
|
60
|
-
"speakeasy-sdk/typescript 0.13.
|
|
60
|
+
"speakeasy-sdk/typescript 0.13.3 2.610.0 1.0.0 @s2-dev/streamstore",
|
|
61
61
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -6,12 +6,6 @@ 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
|
-
Header,
|
|
11
|
-
Header$inboundSchema,
|
|
12
|
-
Header$Outbound,
|
|
13
|
-
Header$outboundSchema,
|
|
14
|
-
} from "./header.js";
|
|
15
9
|
|
|
16
10
|
/**
|
|
17
11
|
* Record to be appended to a stream.
|
|
@@ -24,7 +18,7 @@ export type AppendRecord = {
|
|
|
24
18
|
/**
|
|
25
19
|
* Series of name-value pairs for this record.
|
|
26
20
|
*/
|
|
27
|
-
headers?: Array<
|
|
21
|
+
headers?: Array<Array<string>> | undefined;
|
|
28
22
|
timestamp?: number | null | undefined;
|
|
29
23
|
};
|
|
30
24
|
|
|
@@ -35,14 +29,14 @@ export const AppendRecord$inboundSchema: z.ZodType<
|
|
|
35
29
|
unknown
|
|
36
30
|
> = z.object({
|
|
37
31
|
body: z.string().optional(),
|
|
38
|
-
headers: z.array(
|
|
32
|
+
headers: z.array(z.array(z.string())).optional(),
|
|
39
33
|
timestamp: z.nullable(z.number().int()).optional(),
|
|
40
34
|
});
|
|
41
35
|
|
|
42
36
|
/** @internal */
|
|
43
37
|
export type AppendRecord$Outbound = {
|
|
44
38
|
body?: string | undefined;
|
|
45
|
-
headers?: Array<
|
|
39
|
+
headers?: Array<Array<string>> | undefined;
|
|
46
40
|
timestamp?: number | null | undefined;
|
|
47
41
|
};
|
|
48
42
|
|
|
@@ -53,7 +47,7 @@ export const AppendRecord$outboundSchema: z.ZodType<
|
|
|
53
47
|
AppendRecord
|
|
54
48
|
> = z.object({
|
|
55
49
|
body: z.string().optional(),
|
|
56
|
-
headers: z.array(
|
|
50
|
+
headers: z.array(z.array(z.string())).optional(),
|
|
57
51
|
timestamp: z.nullable(z.number().int()).optional(),
|
|
58
52
|
});
|
|
59
53
|
|
|
@@ -15,7 +15,6 @@ export * from "./basinstate.js";
|
|
|
15
15
|
export * from "./createbasinrequest.js";
|
|
16
16
|
export * from "./createorreconfigurebasinrequest.js";
|
|
17
17
|
export * from "./createstreamrequest.js";
|
|
18
|
-
export * from "./header.js";
|
|
19
18
|
export * from "./issueaccesstokenresponse.js";
|
|
20
19
|
export * from "./listaccesstokensresponse.js";
|
|
21
20
|
export * from "./listbasinsresponse.js";
|
|
@@ -7,12 +7,6 @@ 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
|
-
Header,
|
|
12
|
-
Header$inboundSchema,
|
|
13
|
-
Header$Outbound,
|
|
14
|
-
Header$outboundSchema,
|
|
15
|
-
} from "./header.js";
|
|
16
10
|
|
|
17
11
|
/**
|
|
18
12
|
* Record that is durably sequenced on a stream.
|
|
@@ -25,7 +19,7 @@ export type SequencedRecord = {
|
|
|
25
19
|
/**
|
|
26
20
|
* Series of name-value pairs for this record.
|
|
27
21
|
*/
|
|
28
|
-
headers?: Array<
|
|
22
|
+
headers?: Array<Array<string>> | undefined;
|
|
29
23
|
seqNum: number;
|
|
30
24
|
timestamp: number;
|
|
31
25
|
};
|
|
@@ -37,7 +31,7 @@ export const SequencedRecord$inboundSchema: z.ZodType<
|
|
|
37
31
|
unknown
|
|
38
32
|
> = z.object({
|
|
39
33
|
body: z.string().optional(),
|
|
40
|
-
headers: z.array(
|
|
34
|
+
headers: z.array(z.array(z.string())).optional(),
|
|
41
35
|
seq_num: z.number().int(),
|
|
42
36
|
timestamp: z.number().int(),
|
|
43
37
|
}).transform((v) => {
|
|
@@ -49,7 +43,7 @@ export const SequencedRecord$inboundSchema: z.ZodType<
|
|
|
49
43
|
/** @internal */
|
|
50
44
|
export type SequencedRecord$Outbound = {
|
|
51
45
|
body?: string | undefined;
|
|
52
|
-
headers?: Array<
|
|
46
|
+
headers?: Array<Array<string>> | undefined;
|
|
53
47
|
seq_num: number;
|
|
54
48
|
timestamp: number;
|
|
55
49
|
};
|
|
@@ -61,7 +55,7 @@ export const SequencedRecord$outboundSchema: z.ZodType<
|
|
|
61
55
|
SequencedRecord
|
|
62
56
|
> = z.object({
|
|
63
57
|
body: z.string().optional(),
|
|
64
|
-
headers: z.array(
|
|
58
|
+
headers: z.array(z.array(z.string())).optional(),
|
|
65
59
|
seqNum: z.number().int(),
|
|
66
60
|
timestamp: z.number().int(),
|
|
67
61
|
}).transform((v) => {
|
|
@@ -14,7 +14,7 @@ import { SDKValidationError } from "./sdkvalidationerror.js";
|
|
|
14
14
|
* @remarks
|
|
15
15
|
* The expected next sequence number is returned.
|
|
16
16
|
*/
|
|
17
|
-
export type
|
|
17
|
+
export type SeqNumData = {
|
|
18
18
|
/**
|
|
19
19
|
* Sequence number did not match the tail of the stream.
|
|
20
20
|
*
|
|
@@ -30,7 +30,7 @@ export type TwoData = {
|
|
|
30
30
|
* @remarks
|
|
31
31
|
* The expected next sequence number is returned.
|
|
32
32
|
*/
|
|
33
|
-
export class
|
|
33
|
+
export class SeqNum extends Error {
|
|
34
34
|
/**
|
|
35
35
|
* Sequence number did not match the tail of the stream.
|
|
36
36
|
*
|
|
@@ -40,9 +40,9 @@ export class Two extends Error {
|
|
|
40
40
|
seqNumMismatch: number;
|
|
41
41
|
|
|
42
42
|
/** The original data that was passed to this error instance. */
|
|
43
|
-
data$:
|
|
43
|
+
data$: SeqNumData;
|
|
44
44
|
|
|
45
|
-
constructor(err:
|
|
45
|
+
constructor(err: SeqNumData) {
|
|
46
46
|
const message = "message" in err && typeof err.message === "string"
|
|
47
47
|
? err.message
|
|
48
48
|
: `API error occurred: ${JSON.stringify(err)}`;
|
|
@@ -51,7 +51,7 @@ export class Two extends Error {
|
|
|
51
51
|
|
|
52
52
|
this.seqNumMismatch = err.seqNumMismatch;
|
|
53
53
|
|
|
54
|
-
this.name = "
|
|
54
|
+
this.name = "SeqNum";
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -59,14 +59,14 @@ export class Two extends Error {
|
|
|
59
59
|
* Fencing token did not match.
|
|
60
60
|
*
|
|
61
61
|
* @remarks
|
|
62
|
-
* The expected fencing token is returned.
|
|
62
|
+
* The expected fencing token is returned, encoded with base64.
|
|
63
63
|
*/
|
|
64
|
-
export type
|
|
64
|
+
export type FencingTokenData = {
|
|
65
65
|
/**
|
|
66
66
|
* Fencing token did not match.
|
|
67
67
|
*
|
|
68
68
|
* @remarks
|
|
69
|
-
* The expected fencing token is returned.
|
|
69
|
+
* The expected fencing token is returned, encoded with base64.
|
|
70
70
|
*/
|
|
71
71
|
fencingTokenMismatch: string;
|
|
72
72
|
};
|
|
@@ -75,21 +75,21 @@ export type OneData = {
|
|
|
75
75
|
* Fencing token did not match.
|
|
76
76
|
*
|
|
77
77
|
* @remarks
|
|
78
|
-
* The expected fencing token is returned.
|
|
78
|
+
* The expected fencing token is returned, encoded with base64.
|
|
79
79
|
*/
|
|
80
|
-
export class
|
|
80
|
+
export class FencingToken extends Error {
|
|
81
81
|
/**
|
|
82
82
|
* Fencing token did not match.
|
|
83
83
|
*
|
|
84
84
|
* @remarks
|
|
85
|
-
* The expected fencing token is returned.
|
|
85
|
+
* The expected fencing token is returned, encoded with base64.
|
|
86
86
|
*/
|
|
87
87
|
fencingTokenMismatch: string;
|
|
88
88
|
|
|
89
89
|
/** The original data that was passed to this error instance. */
|
|
90
|
-
data$:
|
|
90
|
+
data$: FencingTokenData;
|
|
91
91
|
|
|
92
|
-
constructor(err:
|
|
92
|
+
constructor(err: FencingTokenData) {
|
|
93
93
|
const message = "message" in err && typeof err.message === "string"
|
|
94
94
|
? err.message
|
|
95
95
|
: `API error occurred: ${JSON.stringify(err)}`;
|
|
@@ -98,43 +98,46 @@ export class One extends Error {
|
|
|
98
98
|
|
|
99
99
|
this.fencingTokenMismatch = err.fencingTokenMismatch;
|
|
100
100
|
|
|
101
|
-
this.name = "
|
|
101
|
+
this.name = "FencingToken";
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Failure response message when an Append is aborted due to a failed condition.
|
|
107
107
|
*/
|
|
108
|
-
export type AppendConditionFailed =
|
|
108
|
+
export type AppendConditionFailed = FencingToken | SeqNum;
|
|
109
109
|
|
|
110
110
|
/** @internal */
|
|
111
|
-
export const
|
|
111
|
+
export const SeqNum$inboundSchema: z.ZodType<SeqNum, z.ZodTypeDef, unknown> = z
|
|
112
112
|
.object({
|
|
113
|
-
|
|
113
|
+
seq_num_mismatch: z.number().int(),
|
|
114
114
|
})
|
|
115
115
|
.transform((v) => {
|
|
116
116
|
const remapped = remap$(v, {
|
|
117
|
-
"
|
|
117
|
+
"seq_num_mismatch": "seqNumMismatch",
|
|
118
118
|
});
|
|
119
119
|
|
|
120
|
-
return new
|
|
120
|
+
return new SeqNum(remapped);
|
|
121
121
|
});
|
|
122
122
|
|
|
123
123
|
/** @internal */
|
|
124
|
-
export type
|
|
125
|
-
|
|
124
|
+
export type SeqNum$Outbound = {
|
|
125
|
+
seq_num_mismatch: number;
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
/** @internal */
|
|
129
|
-
export const
|
|
130
|
-
|
|
129
|
+
export const SeqNum$outboundSchema: z.ZodType<
|
|
130
|
+
SeqNum$Outbound,
|
|
131
|
+
z.ZodTypeDef,
|
|
132
|
+
SeqNum
|
|
133
|
+
> = z.instanceof(SeqNum)
|
|
131
134
|
.transform(v => v.data$)
|
|
132
135
|
.pipe(
|
|
133
136
|
z.object({
|
|
134
137
|
seqNumMismatch: z.number().int(),
|
|
135
138
|
}).transform((v) => {
|
|
136
139
|
return remap$(v, {
|
|
137
|
-
seqNumMismatch: "
|
|
140
|
+
seqNumMismatch: "seq_num_mismatch",
|
|
138
141
|
});
|
|
139
142
|
}),
|
|
140
143
|
);
|
|
@@ -143,43 +146,49 @@ export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
|
|
|
143
146
|
* @internal
|
|
144
147
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
145
148
|
*/
|
|
146
|
-
export namespace
|
|
147
|
-
/** @deprecated use `
|
|
148
|
-
export const inboundSchema =
|
|
149
|
-
/** @deprecated use `
|
|
150
|
-
export const outboundSchema =
|
|
151
|
-
/** @deprecated use `
|
|
152
|
-
export type Outbound =
|
|
149
|
+
export namespace SeqNum$ {
|
|
150
|
+
/** @deprecated use `SeqNum$inboundSchema` instead. */
|
|
151
|
+
export const inboundSchema = SeqNum$inboundSchema;
|
|
152
|
+
/** @deprecated use `SeqNum$outboundSchema` instead. */
|
|
153
|
+
export const outboundSchema = SeqNum$outboundSchema;
|
|
154
|
+
/** @deprecated use `SeqNum$Outbound` instead. */
|
|
155
|
+
export type Outbound = SeqNum$Outbound;
|
|
153
156
|
}
|
|
154
157
|
|
|
155
158
|
/** @internal */
|
|
156
|
-
export const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
export const FencingToken$inboundSchema: z.ZodType<
|
|
160
|
+
FencingToken,
|
|
161
|
+
z.ZodTypeDef,
|
|
162
|
+
unknown
|
|
163
|
+
> = z.object({
|
|
164
|
+
fencing_token_mismatch: z.string(),
|
|
165
|
+
})
|
|
160
166
|
.transform((v) => {
|
|
161
167
|
const remapped = remap$(v, {
|
|
162
|
-
"
|
|
168
|
+
"fencing_token_mismatch": "fencingTokenMismatch",
|
|
163
169
|
});
|
|
164
170
|
|
|
165
|
-
return new
|
|
171
|
+
return new FencingToken(remapped);
|
|
166
172
|
});
|
|
167
173
|
|
|
168
174
|
/** @internal */
|
|
169
|
-
export type
|
|
170
|
-
|
|
175
|
+
export type FencingToken$Outbound = {
|
|
176
|
+
fencing_token_mismatch: string;
|
|
171
177
|
};
|
|
172
178
|
|
|
173
179
|
/** @internal */
|
|
174
|
-
export const
|
|
175
|
-
|
|
180
|
+
export const FencingToken$outboundSchema: z.ZodType<
|
|
181
|
+
FencingToken$Outbound,
|
|
182
|
+
z.ZodTypeDef,
|
|
183
|
+
FencingToken
|
|
184
|
+
> = z.instanceof(FencingToken)
|
|
176
185
|
.transform(v => v.data$)
|
|
177
186
|
.pipe(
|
|
178
187
|
z.object({
|
|
179
188
|
fencingTokenMismatch: z.string(),
|
|
180
189
|
}).transform((v) => {
|
|
181
190
|
return remap$(v, {
|
|
182
|
-
fencingTokenMismatch: "
|
|
191
|
+
fencingTokenMismatch: "fencing_token_mismatch",
|
|
183
192
|
});
|
|
184
193
|
}),
|
|
185
194
|
);
|
|
@@ -188,13 +197,13 @@ export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
|
|
|
188
197
|
* @internal
|
|
189
198
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
190
199
|
*/
|
|
191
|
-
export namespace
|
|
192
|
-
/** @deprecated use `
|
|
193
|
-
export const inboundSchema =
|
|
194
|
-
/** @deprecated use `
|
|
195
|
-
export const outboundSchema =
|
|
196
|
-
/** @deprecated use `
|
|
197
|
-
export type Outbound =
|
|
200
|
+
export namespace FencingToken$ {
|
|
201
|
+
/** @deprecated use `FencingToken$inboundSchema` instead. */
|
|
202
|
+
export const inboundSchema = FencingToken$inboundSchema;
|
|
203
|
+
/** @deprecated use `FencingToken$outboundSchema` instead. */
|
|
204
|
+
export const outboundSchema = FencingToken$outboundSchema;
|
|
205
|
+
/** @deprecated use `FencingToken$Outbound` instead. */
|
|
206
|
+
export type Outbound = FencingToken$Outbound;
|
|
198
207
|
}
|
|
199
208
|
|
|
200
209
|
/** @internal */
|
|
@@ -202,10 +211,15 @@ export const AppendConditionFailed$inboundSchema: z.ZodType<
|
|
|
202
211
|
AppendConditionFailed,
|
|
203
212
|
z.ZodTypeDef,
|
|
204
213
|
unknown
|
|
205
|
-
> = z.union([
|
|
214
|
+
> = z.union([
|
|
215
|
+
z.lazy(() => FencingToken$inboundSchema),
|
|
216
|
+
z.lazy(() => SeqNum$inboundSchema),
|
|
217
|
+
]);
|
|
206
218
|
|
|
207
219
|
/** @internal */
|
|
208
|
-
export type AppendConditionFailed$Outbound =
|
|
220
|
+
export type AppendConditionFailed$Outbound =
|
|
221
|
+
| FencingToken$Outbound
|
|
222
|
+
| SeqNum$Outbound;
|
|
209
223
|
|
|
210
224
|
/** @internal */
|
|
211
225
|
export const AppendConditionFailed$outboundSchema: z.ZodType<
|
|
@@ -213,8 +227,8 @@ export const AppendConditionFailed$outboundSchema: z.ZodType<
|
|
|
213
227
|
z.ZodTypeDef,
|
|
214
228
|
AppendConditionFailed
|
|
215
229
|
> = z.union([
|
|
216
|
-
z.lazy(() =>
|
|
217
|
-
z.lazy(() =>
|
|
230
|
+
z.lazy(() => FencingToken$outboundSchema),
|
|
231
|
+
z.lazy(() => SeqNum$outboundSchema),
|
|
218
232
|
]);
|
|
219
233
|
|
|
220
234
|
/**
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
/**
|
|
5
|
-
* Headers add structured information to a record as name-value pairs.
|
|
6
|
-
*/
|
|
7
|
-
export type Header = {
|
|
8
|
-
/**
|
|
9
|
-
* Header name blob.
|
|
10
|
-
*
|
|
11
|
-
* @remarks
|
|
12
|
-
* The name cannot be empty, with the exception of an S2 command record.
|
|
13
|
-
*/
|
|
14
|
-
name: string;
|
|
15
|
-
/**
|
|
16
|
-
* Header value blob.
|
|
17
|
-
*/
|
|
18
|
-
value: string;
|
|
19
|
-
};
|
|
20
|
-
/** @internal */
|
|
21
|
-
export declare const Header$inboundSchema: z.ZodType<Header, z.ZodTypeDef, unknown>;
|
|
22
|
-
/** @internal */
|
|
23
|
-
export type Header$Outbound = {
|
|
24
|
-
name: string;
|
|
25
|
-
value: string;
|
|
26
|
-
};
|
|
27
|
-
/** @internal */
|
|
28
|
-
export declare const Header$outboundSchema: z.ZodType<Header$Outbound, z.ZodTypeDef, Header>;
|
|
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 declare namespace Header$ {
|
|
34
|
-
/** @deprecated use `Header$inboundSchema` instead. */
|
|
35
|
-
const inboundSchema: z.ZodType<Header, z.ZodTypeDef, unknown>;
|
|
36
|
-
/** @deprecated use `Header$outboundSchema` instead. */
|
|
37
|
-
const outboundSchema: z.ZodType<Header$Outbound, z.ZodTypeDef, Header>;
|
|
38
|
-
/** @deprecated use `Header$Outbound` instead. */
|
|
39
|
-
type Outbound = Header$Outbound;
|
|
40
|
-
}
|
|
41
|
-
export declare function headerToJSON(header: Header): string;
|
|
42
|
-
export declare function headerFromJSON(jsonString: string): SafeParseResult<Header, SDKValidationError>;
|
|
43
|
-
//# sourceMappingURL=header.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/models/components/header.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAItE,CAAC;AAEL,gBAAgB;AAChB,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,OAAO,CAC3C,eAAe,EACf,CAAC,CAAC,UAAU,EACZ,MAAM,CAIN,CAAC;AAEH;;;GAGG;AACH,yBAAiB,OAAO,CAAC;IACvB,sDAAsD;IAC/C,MAAM,aAAa,0CAAuB,CAAC;IAClD,uDAAuD;IAChD,MAAM,cAAc,kDAAwB,CAAC;IACpD,iDAAiD;IACjD,KAAY,QAAQ,GAAG,eAAe,CAAC;CACxC;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wBAAgB,cAAc,CAC5B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAM7C"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.Header$ = exports.Header$outboundSchema = exports.Header$inboundSchema = void 0;
|
|
40
|
-
exports.headerToJSON = headerToJSON;
|
|
41
|
-
exports.headerFromJSON = headerFromJSON;
|
|
42
|
-
const z = __importStar(require("zod"));
|
|
43
|
-
const schemas_js_1 = require("../../lib/schemas.js");
|
|
44
|
-
/** @internal */
|
|
45
|
-
exports.Header$inboundSchema = z
|
|
46
|
-
.object({
|
|
47
|
-
name: z.string(),
|
|
48
|
-
value: z.string(),
|
|
49
|
-
});
|
|
50
|
-
/** @internal */
|
|
51
|
-
exports.Header$outboundSchema = z.object({
|
|
52
|
-
name: z.string(),
|
|
53
|
-
value: z.string(),
|
|
54
|
-
});
|
|
55
|
-
/**
|
|
56
|
-
* @internal
|
|
57
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
58
|
-
*/
|
|
59
|
-
var Header$;
|
|
60
|
-
(function (Header$) {
|
|
61
|
-
/** @deprecated use `Header$inboundSchema` instead. */
|
|
62
|
-
Header$.inboundSchema = exports.Header$inboundSchema;
|
|
63
|
-
/** @deprecated use `Header$outboundSchema` instead. */
|
|
64
|
-
Header$.outboundSchema = exports.Header$outboundSchema;
|
|
65
|
-
})(Header$ || (exports.Header$ = Header$ = {}));
|
|
66
|
-
function headerToJSON(header) {
|
|
67
|
-
return JSON.stringify(exports.Header$outboundSchema.parse(header));
|
|
68
|
-
}
|
|
69
|
-
function headerFromJSON(jsonString) {
|
|
70
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Header$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Header' from JSON`);
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=header.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../src/models/components/header.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DH,oCAEC;AAED,wCAQC;AAtED,uCAAyB;AACzB,qDAAiD;AAqBjD,gBAAgB;AACH,QAAA,oBAAoB,GAA6C,CAAC;KAC5E,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAQL,gBAAgB;AACH,QAAA,qBAAqB,GAI9B,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,OAAO,CAOvB;AAPD,WAAiB,OAAO;IACtB,sDAAsD;IACzC,qBAAa,GAAG,4BAAoB,CAAC;IAClD,uDAAuD;IAC1C,sBAAc,GAAG,6BAAqB,CAAC;AAGtD,CAAC,EAPgB,OAAO,uBAAP,OAAO,QAOvB;AAED,SAAgB,YAAY,CAAC,MAAc;IACzC,OAAO,IAAI,CAAC,SAAS,CAAC,6BAAqB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7D,CAAC;AAED,SAAgB,cAAc,CAC5B,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,4BAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChD,oCAAoC,CACrC,CAAC;AACJ,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
/**
|
|
5
|
-
* Headers add structured information to a record as name-value pairs.
|
|
6
|
-
*/
|
|
7
|
-
export type Header = {
|
|
8
|
-
/**
|
|
9
|
-
* Header name blob.
|
|
10
|
-
*
|
|
11
|
-
* @remarks
|
|
12
|
-
* The name cannot be empty, with the exception of an S2 command record.
|
|
13
|
-
*/
|
|
14
|
-
name: string;
|
|
15
|
-
/**
|
|
16
|
-
* Header value blob.
|
|
17
|
-
*/
|
|
18
|
-
value: string;
|
|
19
|
-
};
|
|
20
|
-
/** @internal */
|
|
21
|
-
export declare const Header$inboundSchema: z.ZodType<Header, z.ZodTypeDef, unknown>;
|
|
22
|
-
/** @internal */
|
|
23
|
-
export type Header$Outbound = {
|
|
24
|
-
name: string;
|
|
25
|
-
value: string;
|
|
26
|
-
};
|
|
27
|
-
/** @internal */
|
|
28
|
-
export declare const Header$outboundSchema: z.ZodType<Header$Outbound, z.ZodTypeDef, Header>;
|
|
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 declare namespace Header$ {
|
|
34
|
-
/** @deprecated use `Header$inboundSchema` instead. */
|
|
35
|
-
const inboundSchema: z.ZodType<Header, z.ZodTypeDef, unknown>;
|
|
36
|
-
/** @deprecated use `Header$outboundSchema` instead. */
|
|
37
|
-
const outboundSchema: z.ZodType<Header$Outbound, z.ZodTypeDef, Header>;
|
|
38
|
-
/** @deprecated use `Header$Outbound` instead. */
|
|
39
|
-
type Outbound = Header$Outbound;
|
|
40
|
-
}
|
|
41
|
-
export declare function headerToJSON(header: Header): string;
|
|
42
|
-
export declare function headerFromJSON(jsonString: string): SafeParseResult<Header, SDKValidationError>;
|
|
43
|
-
//# sourceMappingURL=header.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/models/components/header.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAItE,CAAC;AAEL,gBAAgB;AAChB,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,OAAO,CAC3C,eAAe,EACf,CAAC,CAAC,UAAU,EACZ,MAAM,CAIN,CAAC;AAEH;;;GAGG;AACH,yBAAiB,OAAO,CAAC;IACvB,sDAAsD;IAC/C,MAAM,aAAa,0CAAuB,CAAC;IAClD,uDAAuD;IAChD,MAAM,cAAc,kDAAwB,CAAC;IACpD,iDAAiD;IACjD,KAAY,QAAQ,GAAG,eAAe,CAAC;CACxC;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,wBAAgB,cAAc,CAC5B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAM7C"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod";
|
|
5
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
6
|
-
/** @internal */
|
|
7
|
-
export const Header$inboundSchema = z
|
|
8
|
-
.object({
|
|
9
|
-
name: z.string(),
|
|
10
|
-
value: z.string(),
|
|
11
|
-
});
|
|
12
|
-
/** @internal */
|
|
13
|
-
export const Header$outboundSchema = z.object({
|
|
14
|
-
name: z.string(),
|
|
15
|
-
value: z.string(),
|
|
16
|
-
});
|
|
17
|
-
/**
|
|
18
|
-
* @internal
|
|
19
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
20
|
-
*/
|
|
21
|
-
export var Header$;
|
|
22
|
-
(function (Header$) {
|
|
23
|
-
/** @deprecated use `Header$inboundSchema` instead. */
|
|
24
|
-
Header$.inboundSchema = Header$inboundSchema;
|
|
25
|
-
/** @deprecated use `Header$outboundSchema` instead. */
|
|
26
|
-
Header$.outboundSchema = Header$outboundSchema;
|
|
27
|
-
})(Header$ || (Header$ = {}));
|
|
28
|
-
export function headerToJSON(header) {
|
|
29
|
-
return JSON.stringify(Header$outboundSchema.parse(header));
|
|
30
|
-
}
|
|
31
|
-
export function headerFromJSON(jsonString) {
|
|
32
|
-
return safeParse(jsonString, (x) => Header$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Header' from JSON`);
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=header.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../../src/models/components/header.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAqBjD,gBAAgB;AAChB,MAAM,CAAC,MAAM,oBAAoB,GAA6C,CAAC;KAC5E,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAQL,gBAAgB;AAChB,MAAM,CAAC,MAAM,qBAAqB,GAI9B,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,OAAO,CAOvB;AAPD,WAAiB,OAAO;IACtB,sDAAsD;IACzC,qBAAa,GAAG,oBAAoB,CAAC;IAClD,uDAAuD;IAC1C,sBAAc,GAAG,qBAAqB,CAAC;AAGtD,CAAC,EAPgB,OAAO,KAAP,OAAO,QAOvB;AAED,MAAM,UAAU,YAAY,CAAC,MAAc;IACzC,OAAO,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAChD,oCAAoC,CACrC,CAAC;AACJ,CAAC"}
|