@s2-dev/streamstore 0.2.5 → 0.2.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/README.md +4 -7
- package/docs/sdks/stream/README.md +5 -5
- package/funcs/streamAppend.d.ts +4 -1
- package/funcs/streamAppend.d.ts.map +1 -1
- package/funcs/streamAppend.js +4 -1
- package/funcs/streamAppend.js.map +1 -1
- package/funcs/streamCheckTail.d.ts +3 -0
- package/funcs/streamCheckTail.d.ts.map +1 -1
- package/funcs/streamCheckTail.js +3 -0
- package/funcs/streamCheckTail.js.map +1 -1
- package/funcs/streamRead.d.ts +4 -1
- package/funcs/streamRead.d.ts.map +1 -1
- package/funcs/streamRead.js +4 -1
- package/funcs/streamRead.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/retries.js +0 -1
- package/lib/retries.js.map +1 -1
- package/models/components/assignment.d.ts +28 -28
- package/models/components/assignment.d.ts.map +1 -1
- package/models/components/assignment.js +36 -36
- package/models/components/assignment.js.map +1 -1
- package/models/components/output.d.ts +41 -41
- package/models/components/output.d.ts.map +1 -1
- package/models/components/output.js +53 -53
- package/models/components/output.js.map +1 -1
- package/models/components/readresponse.d.ts +28 -28
- package/models/components/readresponse.d.ts.map +1 -1
- package/models/components/readresponse.js +36 -35
- package/models/components/readresponse.js.map +1 -1
- package/models/components/retentionpolicy.d.ts +17 -17
- package/models/components/retentionpolicy.js +18 -18
- package/package.json +6 -7
- package/sdk/stream.d.ts +11 -2
- package/sdk/stream.d.ts.map +1 -1
- package/sdk/stream.js +11 -2
- package/sdk/stream.js.map +1 -1
- package/src/funcs/streamAppend.ts +4 -1
- package/src/funcs/streamCheckTail.ts +3 -0
- package/src/funcs/streamRead.ts +4 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/retries.ts +0 -1
- package/src/models/components/assignment.ts +46 -49
- package/src/models/components/output.ts +86 -80
- package/src/models/components/readresponse.ts +54 -53
- package/src/models/components/retentionpolicy.ts +21 -21
- package/src/sdk/stream.ts +11 -2
|
@@ -7,7 +7,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
7
7
|
* @remarks
|
|
8
8
|
* If set to 0, the stream will have infinite retention.
|
|
9
9
|
*/
|
|
10
|
-
export type
|
|
10
|
+
export type Age = {
|
|
11
11
|
/**
|
|
12
12
|
* Age in seconds for automatic trimming of records older than this threshold.
|
|
13
13
|
*
|
|
@@ -22,33 +22,33 @@ export type One = {
|
|
|
22
22
|
* @remarks
|
|
23
23
|
* If unspecified, the default is to retain records for 7 days.
|
|
24
24
|
*/
|
|
25
|
-
export type RetentionPolicy =
|
|
25
|
+
export type RetentionPolicy = Age;
|
|
26
26
|
/** @internal */
|
|
27
|
-
export declare const
|
|
27
|
+
export declare const Age$inboundSchema: z.ZodType<Age, z.ZodTypeDef, unknown>;
|
|
28
28
|
/** @internal */
|
|
29
|
-
export type
|
|
29
|
+
export type Age$Outbound = {
|
|
30
30
|
age: number;
|
|
31
31
|
};
|
|
32
32
|
/** @internal */
|
|
33
|
-
export declare const
|
|
33
|
+
export declare const Age$outboundSchema: z.ZodType<Age$Outbound, z.ZodTypeDef, Age>;
|
|
34
34
|
/**
|
|
35
35
|
* @internal
|
|
36
36
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
37
37
|
*/
|
|
38
|
-
export declare namespace
|
|
39
|
-
/** @deprecated use `
|
|
40
|
-
const inboundSchema: z.ZodType<
|
|
41
|
-
/** @deprecated use `
|
|
42
|
-
const outboundSchema: z.ZodType<
|
|
43
|
-
/** @deprecated use `
|
|
44
|
-
type Outbound =
|
|
38
|
+
export declare namespace Age$ {
|
|
39
|
+
/** @deprecated use `Age$inboundSchema` instead. */
|
|
40
|
+
const inboundSchema: z.ZodType<Age, z.ZodTypeDef, unknown>;
|
|
41
|
+
/** @deprecated use `Age$outboundSchema` instead. */
|
|
42
|
+
const outboundSchema: z.ZodType<Age$Outbound, z.ZodTypeDef, Age>;
|
|
43
|
+
/** @deprecated use `Age$Outbound` instead. */
|
|
44
|
+
type Outbound = Age$Outbound;
|
|
45
45
|
}
|
|
46
|
-
export declare function
|
|
47
|
-
export declare function
|
|
46
|
+
export declare function ageToJSON(age: Age): string;
|
|
47
|
+
export declare function ageFromJSON(jsonString: string): SafeParseResult<Age, SDKValidationError>;
|
|
48
48
|
/** @internal */
|
|
49
49
|
export declare const RetentionPolicy$inboundSchema: z.ZodType<RetentionPolicy, z.ZodTypeDef, unknown>;
|
|
50
50
|
/** @internal */
|
|
51
|
-
export type RetentionPolicy$Outbound =
|
|
51
|
+
export type RetentionPolicy$Outbound = Age$Outbound;
|
|
52
52
|
/** @internal */
|
|
53
53
|
export declare const RetentionPolicy$outboundSchema: z.ZodType<RetentionPolicy$Outbound, z.ZodTypeDef, RetentionPolicy>;
|
|
54
54
|
/**
|
|
@@ -57,9 +57,9 @@ export declare const RetentionPolicy$outboundSchema: z.ZodType<RetentionPolicy$O
|
|
|
57
57
|
*/
|
|
58
58
|
export declare namespace RetentionPolicy$ {
|
|
59
59
|
/** @deprecated use `RetentionPolicy$inboundSchema` instead. */
|
|
60
|
-
const inboundSchema: z.ZodType<
|
|
60
|
+
const inboundSchema: z.ZodType<Age, z.ZodTypeDef, unknown>;
|
|
61
61
|
/** @deprecated use `RetentionPolicy$outboundSchema` instead. */
|
|
62
|
-
const outboundSchema: z.ZodType<
|
|
62
|
+
const outboundSchema: z.ZodType<Age$Outbound, z.ZodTypeDef, Age>;
|
|
63
63
|
/** @deprecated use `RetentionPolicy$Outbound` instead. */
|
|
64
64
|
type Outbound = RetentionPolicy$Outbound;
|
|
65
65
|
}
|
|
@@ -36,20 +36,20 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.RetentionPolicy$ = exports.RetentionPolicy$outboundSchema = exports.RetentionPolicy$inboundSchema = exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
39
|
+
exports.RetentionPolicy$ = exports.RetentionPolicy$outboundSchema = exports.RetentionPolicy$inboundSchema = exports.Age$ = exports.Age$outboundSchema = exports.Age$inboundSchema = void 0;
|
|
40
|
+
exports.ageToJSON = ageToJSON;
|
|
41
|
+
exports.ageFromJSON = ageFromJSON;
|
|
42
42
|
exports.retentionPolicyToJSON = retentionPolicyToJSON;
|
|
43
43
|
exports.retentionPolicyFromJSON = retentionPolicyFromJSON;
|
|
44
44
|
const z = __importStar(require("zod"));
|
|
45
45
|
const schemas_js_1 = require("../../lib/schemas.js");
|
|
46
46
|
/** @internal */
|
|
47
|
-
exports.
|
|
47
|
+
exports.Age$inboundSchema = z
|
|
48
48
|
.object({
|
|
49
49
|
age: z.number().int(),
|
|
50
50
|
});
|
|
51
51
|
/** @internal */
|
|
52
|
-
exports.
|
|
52
|
+
exports.Age$outboundSchema = z
|
|
53
53
|
.object({
|
|
54
54
|
age: z.number().int(),
|
|
55
55
|
});
|
|
@@ -57,23 +57,23 @@ exports.One$outboundSchema = z
|
|
|
57
57
|
* @internal
|
|
58
58
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
59
59
|
*/
|
|
60
|
-
var
|
|
61
|
-
(function (
|
|
62
|
-
/** @deprecated use `
|
|
63
|
-
|
|
64
|
-
/** @deprecated use `
|
|
65
|
-
|
|
66
|
-
})(
|
|
67
|
-
function
|
|
68
|
-
return JSON.stringify(exports.
|
|
60
|
+
var Age$;
|
|
61
|
+
(function (Age$) {
|
|
62
|
+
/** @deprecated use `Age$inboundSchema` instead. */
|
|
63
|
+
Age$.inboundSchema = exports.Age$inboundSchema;
|
|
64
|
+
/** @deprecated use `Age$outboundSchema` instead. */
|
|
65
|
+
Age$.outboundSchema = exports.Age$outboundSchema;
|
|
66
|
+
})(Age$ || (exports.Age$ = Age$ = {}));
|
|
67
|
+
function ageToJSON(age) {
|
|
68
|
+
return JSON.stringify(exports.Age$outboundSchema.parse(age));
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.
|
|
70
|
+
function ageFromJSON(jsonString) {
|
|
71
|
+
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Age$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Age' from JSON`);
|
|
72
72
|
}
|
|
73
73
|
/** @internal */
|
|
74
|
-
exports.RetentionPolicy$inboundSchema = z.lazy(() => exports.
|
|
74
|
+
exports.RetentionPolicy$inboundSchema = z.lazy(() => exports.Age$inboundSchema);
|
|
75
75
|
/** @internal */
|
|
76
|
-
exports.RetentionPolicy$outboundSchema = z.lazy(() => exports.
|
|
76
|
+
exports.RetentionPolicy$outboundSchema = z.lazy(() => exports.Age$outboundSchema);
|
|
77
77
|
/**
|
|
78
78
|
* @internal
|
|
79
79
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@s2-dev/streamstore",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"author": "Speakeasy",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "https://github.com/s2-streamstore/s2-sdk-typescript.git"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
|
-
"lint": "eslint --max-warnings=0 src",
|
|
12
|
+
"lint": "eslint --cache --max-warnings=0 src",
|
|
13
13
|
"build": "tsc",
|
|
14
14
|
"prepublishOnly": "npm run build"
|
|
15
15
|
},
|
|
@@ -17,13 +17,12 @@
|
|
|
17
17
|
"zod": ">= 3"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
+
"@eslint/js": "^9.19.0",
|
|
20
21
|
"@types/jsonpath": "^0.2.4",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"eslint": "^8.57.0",
|
|
24
|
-
"eslint-import-resolver-typescript": "^3.6.1",
|
|
25
|
-
"eslint-plugin-import": "^2.29.1",
|
|
22
|
+
"eslint": "^9.19.0",
|
|
23
|
+
"globals": "^15.14.0",
|
|
26
24
|
"typescript": "^5.4.5",
|
|
25
|
+
"typescript-eslint": "^8.22.0",
|
|
27
26
|
"zod": "^3.23.4"
|
|
28
27
|
},
|
|
29
28
|
"dependencies": {
|
package/sdk/stream.d.ts
CHANGED
|
@@ -5,17 +5,26 @@ import * as operations from "../models/operations/index.js";
|
|
|
5
5
|
export { ReadAcceptEnum } from "../funcs/streamRead.js";
|
|
6
6
|
export declare class Stream extends ClientSDK {
|
|
7
7
|
/**
|
|
8
|
-
* Retrieve
|
|
8
|
+
* Retrieve records.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* Retrieve a batch of records, or set `Accept: text/event-stream` to stream using server-sent events.
|
|
9
12
|
*/
|
|
10
13
|
read(request: operations.ReadRequest, options?: RequestOptions & {
|
|
11
14
|
acceptHeaderOverride?: ReadAcceptEnum;
|
|
12
15
|
}): Promise<operations.ReadResponse>;
|
|
13
16
|
/**
|
|
14
|
-
* Append
|
|
17
|
+
* Append records.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Append a batch of records to a stream.
|
|
15
21
|
*/
|
|
16
22
|
append(request: operations.AppendRequest, options?: RequestOptions): Promise<components.AppendOutput>;
|
|
17
23
|
/**
|
|
18
24
|
* Check the tail.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Check the sequence number that will be assigned to the next record on a stream.
|
|
19
28
|
*/
|
|
20
29
|
checkTail(request: operations.CheckTailRequest, options?: RequestOptions): Promise<components.CheckTailResponse>;
|
|
21
30
|
}
|
package/sdk/stream.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/sdk/stream.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAc,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,qBAAa,MAAO,SAAQ,SAAS;IACnC
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/sdk/stream.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAc,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,qBAAa,MAAO,SAAQ,SAAS;IACnC;;;;;OAKG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,WAAW,EAC/B,OAAO,CAAC,EAAE,cAAc,GAAG;QAAE,oBAAoB,CAAC,EAAE,cAAc,CAAA;KAAE,GACnE,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC;IAQnC;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,aAAa,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC;IAQnC;;;;;OAKG;IACG,SAAS,CACb,OAAO,EAAE,UAAU,CAAC,gBAAgB,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC;CAOzC"}
|
package/sdk/stream.js
CHANGED
|
@@ -13,19 +13,28 @@ var streamRead_js_2 = require("../funcs/streamRead.js");
|
|
|
13
13
|
Object.defineProperty(exports, "ReadAcceptEnum", { enumerable: true, get: function () { return streamRead_js_2.ReadAcceptEnum; } });
|
|
14
14
|
class Stream extends sdks_js_1.ClientSDK {
|
|
15
15
|
/**
|
|
16
|
-
* Retrieve
|
|
16
|
+
* Retrieve records.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Retrieve a batch of records, or set `Accept: text/event-stream` to stream using server-sent events.
|
|
17
20
|
*/
|
|
18
21
|
async read(request, options) {
|
|
19
22
|
return (0, fp_js_1.unwrapAsync)((0, streamRead_js_1.streamRead)(this, request, options));
|
|
20
23
|
}
|
|
21
24
|
/**
|
|
22
|
-
* Append
|
|
25
|
+
* Append records.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* Append a batch of records to a stream.
|
|
23
29
|
*/
|
|
24
30
|
async append(request, options) {
|
|
25
31
|
return (0, fp_js_1.unwrapAsync)((0, streamAppend_js_1.streamAppend)(this, request, options));
|
|
26
32
|
}
|
|
27
33
|
/**
|
|
28
34
|
* Check the tail.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Check the sequence number that will be assigned to the next record on a stream.
|
|
29
38
|
*/
|
|
30
39
|
async checkTail(request, options) {
|
|
31
40
|
return (0, fp_js_1.unwrapAsync)((0, streamCheckTail_js_1.streamCheckTail)(this, request, options));
|
package/sdk/stream.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../src/sdk/stream.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8DAAwD;AACxD,oEAA8D;AAC9D,0DAAoE;AACpE,4CAA2D;AAG3D,0CAA6C;AAE7C,wDAAwD;AAA/C,+GAAA,cAAc,OAAA;AAEvB,MAAa,MAAO,SAAQ,mBAAS;IACnC
|
|
1
|
+
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../src/sdk/stream.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8DAAwD;AACxD,oEAA8D;AAC9D,0DAAoE;AACpE,4CAA2D;AAG3D,0CAA6C;AAE7C,wDAAwD;AAA/C,+GAAA,cAAc,OAAA;AAEvB,MAAa,MAAO,SAAQ,mBAAS;IACnC;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CACR,OAA+B,EAC/B,OAAoE;QAEpE,OAAO,IAAA,mBAAW,EAAC,IAAA,0BAAU,EAC3B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAiC,EACjC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,SAAS,CACb,OAAoC,EACpC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAnDD,wBAmDC"}
|
|
@@ -26,7 +26,10 @@ import * as operations from "../models/operations/index.js";
|
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Append
|
|
29
|
+
* Append records.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Append a batch of records to a stream.
|
|
30
33
|
*/
|
|
31
34
|
export async function streamAppend(
|
|
32
35
|
client: S2Core,
|
package/src/funcs/streamRead.ts
CHANGED
|
@@ -30,7 +30,10 @@ export enum ReadAcceptEnum {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* Retrieve
|
|
33
|
+
* Retrieve records.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Retrieve a batch of records, or set `Accept: text/event-stream` to stream using server-sent events.
|
|
34
37
|
*/
|
|
35
38
|
export async function streamRead(
|
|
36
39
|
client: S2Core,
|
package/src/lib/config.ts
CHANGED
|
@@ -54,7 +54,7 @@ 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.2.
|
|
58
|
-
genVersion: "2.
|
|
59
|
-
userAgent: "speakeasy-sdk/typescript 0.2.
|
|
57
|
+
sdkVersion: "0.2.7",
|
|
58
|
+
genVersion: "2.503.0",
|
|
59
|
+
userAgent: "speakeasy-sdk/typescript 0.2.7 2.503.0 1.0.0 @s2-dev/streamstore",
|
|
60
60
|
} as const;
|
package/src/lib/retries.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
10
10
|
/**
|
|
11
11
|
* Explicit cell assignment, if it is owned by the account.
|
|
12
12
|
*/
|
|
13
|
-
export type
|
|
13
|
+
export type Cell = {
|
|
14
14
|
/**
|
|
15
15
|
* Explicit cell assignment, if it is owned by the account.
|
|
16
16
|
*/
|
|
@@ -20,7 +20,7 @@ export type Two = {
|
|
|
20
20
|
/**
|
|
21
21
|
* Basin scope. It should be formatted as "{cloud}:{region}", e.g. "aws:us-east-1".
|
|
22
22
|
*/
|
|
23
|
-
export type
|
|
23
|
+
export type Scope = {
|
|
24
24
|
/**
|
|
25
25
|
* Basin scope. It should be formatted as "{cloud}:{region}", e.g. "aws:us-east-1".
|
|
26
26
|
*/
|
|
@@ -30,22 +30,22 @@ export type Assignment1 = {
|
|
|
30
30
|
/**
|
|
31
31
|
* Assignment of the basin to a cloud and region, or an explicit cell.
|
|
32
32
|
*/
|
|
33
|
-
export type Assignment =
|
|
33
|
+
export type Assignment = Scope | Cell;
|
|
34
34
|
|
|
35
35
|
/** @internal */
|
|
36
|
-
export const
|
|
36
|
+
export const Cell$inboundSchema: z.ZodType<Cell, z.ZodTypeDef, unknown> = z
|
|
37
37
|
.object({
|
|
38
38
|
cell: z.string(),
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
/** @internal */
|
|
42
|
-
export type
|
|
42
|
+
export type Cell$Outbound = {
|
|
43
43
|
cell: string;
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
/** @internal */
|
|
47
|
-
export const
|
|
48
|
-
.object({
|
|
47
|
+
export const Cell$outboundSchema: z.ZodType<Cell$Outbound, z.ZodTypeDef, Cell> =
|
|
48
|
+
z.object({
|
|
49
49
|
cell: z.string(),
|
|
50
50
|
});
|
|
51
51
|
|
|
@@ -53,48 +53,45 @@ export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
|
|
|
53
53
|
* @internal
|
|
54
54
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
55
|
*/
|
|
56
|
-
export namespace
|
|
57
|
-
/** @deprecated use `
|
|
58
|
-
export const inboundSchema =
|
|
59
|
-
/** @deprecated use `
|
|
60
|
-
export const outboundSchema =
|
|
61
|
-
/** @deprecated use `
|
|
62
|
-
export type Outbound =
|
|
56
|
+
export namespace Cell$ {
|
|
57
|
+
/** @deprecated use `Cell$inboundSchema` instead. */
|
|
58
|
+
export const inboundSchema = Cell$inboundSchema;
|
|
59
|
+
/** @deprecated use `Cell$outboundSchema` instead. */
|
|
60
|
+
export const outboundSchema = Cell$outboundSchema;
|
|
61
|
+
/** @deprecated use `Cell$Outbound` instead. */
|
|
62
|
+
export type Outbound = Cell$Outbound;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
export function
|
|
66
|
-
return JSON.stringify(
|
|
65
|
+
export function cellToJSON(cell: Cell): string {
|
|
66
|
+
return JSON.stringify(Cell$outboundSchema.parse(cell));
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
export function
|
|
69
|
+
export function cellFromJSON(
|
|
70
70
|
jsonString: string,
|
|
71
|
-
): SafeParseResult<
|
|
71
|
+
): SafeParseResult<Cell, SDKValidationError> {
|
|
72
72
|
return safeParse(
|
|
73
73
|
jsonString,
|
|
74
|
-
(x) =>
|
|
75
|
-
`Failed to parse '
|
|
74
|
+
(x) => Cell$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'Cell' from JSON`,
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/** @internal */
|
|
80
|
-
export const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
> = z.object({
|
|
85
|
-
scope: z.string(),
|
|
86
|
-
});
|
|
80
|
+
export const Scope$inboundSchema: z.ZodType<Scope, z.ZodTypeDef, unknown> = z
|
|
81
|
+
.object({
|
|
82
|
+
scope: z.string(),
|
|
83
|
+
});
|
|
87
84
|
|
|
88
85
|
/** @internal */
|
|
89
|
-
export type
|
|
86
|
+
export type Scope$Outbound = {
|
|
90
87
|
scope: string;
|
|
91
88
|
};
|
|
92
89
|
|
|
93
90
|
/** @internal */
|
|
94
|
-
export const
|
|
95
|
-
|
|
91
|
+
export const Scope$outboundSchema: z.ZodType<
|
|
92
|
+
Scope$Outbound,
|
|
96
93
|
z.ZodTypeDef,
|
|
97
|
-
|
|
94
|
+
Scope
|
|
98
95
|
> = z.object({
|
|
99
96
|
scope: z.string(),
|
|
100
97
|
});
|
|
@@ -103,26 +100,26 @@ export const Assignment1$outboundSchema: z.ZodType<
|
|
|
103
100
|
* @internal
|
|
104
101
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
105
102
|
*/
|
|
106
|
-
export namespace
|
|
107
|
-
/** @deprecated use `
|
|
108
|
-
export const inboundSchema =
|
|
109
|
-
/** @deprecated use `
|
|
110
|
-
export const outboundSchema =
|
|
111
|
-
/** @deprecated use `
|
|
112
|
-
export type Outbound =
|
|
103
|
+
export namespace Scope$ {
|
|
104
|
+
/** @deprecated use `Scope$inboundSchema` instead. */
|
|
105
|
+
export const inboundSchema = Scope$inboundSchema;
|
|
106
|
+
/** @deprecated use `Scope$outboundSchema` instead. */
|
|
107
|
+
export const outboundSchema = Scope$outboundSchema;
|
|
108
|
+
/** @deprecated use `Scope$Outbound` instead. */
|
|
109
|
+
export type Outbound = Scope$Outbound;
|
|
113
110
|
}
|
|
114
111
|
|
|
115
|
-
export function
|
|
116
|
-
return JSON.stringify(
|
|
112
|
+
export function scopeToJSON(scope: Scope): string {
|
|
113
|
+
return JSON.stringify(Scope$outboundSchema.parse(scope));
|
|
117
114
|
}
|
|
118
115
|
|
|
119
|
-
export function
|
|
116
|
+
export function scopeFromJSON(
|
|
120
117
|
jsonString: string,
|
|
121
|
-
): SafeParseResult<
|
|
118
|
+
): SafeParseResult<Scope, SDKValidationError> {
|
|
122
119
|
return safeParse(
|
|
123
120
|
jsonString,
|
|
124
|
-
(x) =>
|
|
125
|
-
`Failed to parse '
|
|
121
|
+
(x) => Scope$inboundSchema.parse(JSON.parse(x)),
|
|
122
|
+
`Failed to parse 'Scope' from JSON`,
|
|
126
123
|
);
|
|
127
124
|
}
|
|
128
125
|
|
|
@@ -132,12 +129,12 @@ export const Assignment$inboundSchema: z.ZodType<
|
|
|
132
129
|
z.ZodTypeDef,
|
|
133
130
|
unknown
|
|
134
131
|
> = z.union([
|
|
135
|
-
z.lazy(() =>
|
|
136
|
-
z.lazy(() =>
|
|
132
|
+
z.lazy(() => Scope$inboundSchema),
|
|
133
|
+
z.lazy(() => Cell$inboundSchema),
|
|
137
134
|
]);
|
|
138
135
|
|
|
139
136
|
/** @internal */
|
|
140
|
-
export type Assignment$Outbound =
|
|
137
|
+
export type Assignment$Outbound = Scope$Outbound | Cell$Outbound;
|
|
141
138
|
|
|
142
139
|
/** @internal */
|
|
143
140
|
export const Assignment$outboundSchema: z.ZodType<
|
|
@@ -145,8 +142,8 @@ export const Assignment$outboundSchema: z.ZodType<
|
|
|
145
142
|
z.ZodTypeDef,
|
|
146
143
|
Assignment
|
|
147
144
|
> = z.union([
|
|
148
|
-
z.lazy(() =>
|
|
149
|
-
z.lazy(() =>
|
|
145
|
+
z.lazy(() => Scope$outboundSchema),
|
|
146
|
+
z.lazy(() => Cell$outboundSchema),
|
|
150
147
|
]);
|
|
151
148
|
|
|
152
149
|
/**
|