ce-storefront 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 +53 -0
- package/bin/mcp-server.js +1672 -123
- package/bin/mcp-server.js.map +43 -13
- package/docs/sdks/auth/README.md +10 -10
- package/docs/sdks/carts/README.md +10 -0
- package/docs/sdks/customers/README.md +22 -22
- package/docs/sdks/kyc/README.md +547 -0
- package/esm/funcs/authGetAnonymousToken.js +1 -1
- package/esm/funcs/authGetAnonymousToken.js.map +1 -1
- package/esm/funcs/kycCreateDocument.d.ts +16 -0
- package/esm/funcs/kycCreateDocument.d.ts.map +1 -0
- package/esm/funcs/kycCreateDocument.js +106 -0
- package/esm/funcs/kycCreateDocument.js.map +1 -0
- package/esm/funcs/kycDeleteDocument.d.ts +16 -0
- package/esm/funcs/kycDeleteDocument.d.ts.map +1 -0
- package/esm/funcs/kycDeleteDocument.js +85 -0
- package/esm/funcs/kycDeleteDocument.js.map +1 -0
- package/esm/funcs/kycGetDocument.d.ts +16 -0
- package/esm/funcs/kycGetDocument.d.ts.map +1 -0
- package/esm/funcs/kycGetDocument.js +85 -0
- package/esm/funcs/kycGetDocument.js.map +1 -0
- package/esm/funcs/kycListDocumentType.d.ts +16 -0
- package/esm/funcs/kycListDocumentType.d.ts.map +1 -0
- package/esm/funcs/kycListDocumentType.js +66 -0
- package/esm/funcs/kycListDocumentType.js.map +1 -0
- package/esm/funcs/kycListDocuments.d.ts +16 -0
- package/esm/funcs/kycListDocuments.d.ts.map +1 -0
- package/esm/funcs/kycListDocuments.js +81 -0
- package/esm/funcs/kycListDocuments.js.map +1 -0
- package/esm/funcs/kycUpdateDocument.d.ts +16 -0
- package/esm/funcs/kycUpdateDocument.d.ts.map +1 -0
- package/esm/funcs/kycUpdateDocument.js +111 -0
- package/esm/funcs/kycUpdateDocument.js.map +1 -0
- package/esm/funcs/kycVerifyDocument.d.ts +16 -0
- package/esm/funcs/kycVerifyDocument.d.ts.map +1 -0
- package/esm/funcs/kycVerifyDocument.js +82 -0
- package/esm/funcs/kycVerifyDocument.js.map +1 -0
- package/esm/lib/config.d.ts +4 -4
- package/esm/lib/config.js +4 -4
- package/esm/lib/config.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/prompts.d.ts.map +1 -1
- package/esm/mcp-server/prompts.js +5 -1
- package/esm/mcp-server/prompts.js.map +1 -1
- package/esm/mcp-server/resources.d.ts.map +1 -1
- package/esm/mcp-server/resources.js +10 -2
- package/esm/mcp-server/resources.js.map +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +16 -3
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/kycCreateDocument.d.ts +8 -0
- package/esm/mcp-server/tools/kycCreateDocument.d.ts.map +1 -0
- package/esm/mcp-server/tools/kycCreateDocument.js +28 -0
- package/esm/mcp-server/tools/kycCreateDocument.js.map +1 -0
- package/esm/mcp-server/tools/kycDeleteDocument.d.ts +8 -0
- package/esm/mcp-server/tools/kycDeleteDocument.d.ts.map +1 -0
- package/esm/mcp-server/tools/kycDeleteDocument.js +28 -0
- package/esm/mcp-server/tools/kycDeleteDocument.js.map +1 -0
- package/esm/mcp-server/tools/kycGetDocument.d.ts +8 -0
- package/esm/mcp-server/tools/kycGetDocument.d.ts.map +1 -0
- package/esm/mcp-server/tools/kycGetDocument.js +28 -0
- package/esm/mcp-server/tools/kycGetDocument.js.map +1 -0
- package/esm/mcp-server/tools/kycListDocumentType.d.ts +3 -0
- package/esm/mcp-server/tools/kycListDocumentType.d.ts.map +1 -0
- package/esm/mcp-server/tools/kycListDocumentType.js +23 -0
- package/esm/mcp-server/tools/kycListDocumentType.js.map +1 -0
- package/esm/mcp-server/tools/kycListDocuments.d.ts +8 -0
- package/esm/mcp-server/tools/kycListDocuments.d.ts.map +1 -0
- package/esm/mcp-server/tools/kycListDocuments.js +28 -0
- package/esm/mcp-server/tools/kycListDocuments.js.map +1 -0
- package/esm/mcp-server/tools/kycUpdateDocument.d.ts +8 -0
- package/esm/mcp-server/tools/kycUpdateDocument.d.ts.map +1 -0
- package/esm/mcp-server/tools/kycUpdateDocument.js +28 -0
- package/esm/mcp-server/tools/kycUpdateDocument.js.map +1 -0
- package/esm/mcp-server/tools/kycVerifyDocument.d.ts +8 -0
- package/esm/mcp-server/tools/kycVerifyDocument.d.ts.map +1 -0
- package/esm/mcp-server/tools/kycVerifyDocument.js +28 -0
- package/esm/mcp-server/tools/kycVerifyDocument.js.map +1 -0
- package/esm/mcp-server/tools.d.ts.map +1 -1
- package/esm/mcp-server/tools.js +4 -3
- package/esm/mcp-server/tools.js.map +1 -1
- package/esm/models/components/document.d.ts +159 -0
- package/esm/models/components/document.d.ts.map +1 -0
- package/esm/models/components/document.js +166 -0
- package/esm/models/components/document.js.map +1 -0
- package/esm/models/components/documentinput.d.ts +65 -0
- package/esm/models/components/documentinput.d.ts.map +1 -0
- package/esm/models/components/documentinput.js +87 -0
- package/esm/models/components/documentinput.js.map +1 -0
- package/esm/models/components/documenttype.d.ts +97 -0
- package/esm/models/components/documenttype.d.ts.map +1 -0
- package/esm/models/components/documenttype.js +99 -0
- package/esm/models/components/documenttype.js.map +1 -0
- package/esm/models/components/gstindetail.d.ts +29 -0
- package/esm/models/components/gstindetail.d.ts.map +1 -0
- package/esm/models/components/gstindetail.js +31 -0
- package/esm/models/components/gstindetail.js.map +1 -0
- package/esm/models/components/index.d.ts +6 -0
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +6 -0
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/pandetail.d.ts +29 -0
- package/esm/models/components/pandetail.d.ts.map +1 -0
- package/esm/models/components/pandetail.js +31 -0
- package/esm/models/components/pandetail.js.map +1 -0
- package/esm/models/components/updatedocument.d.ts +67 -0
- package/esm/models/components/updatedocument.d.ts.map +1 -0
- package/esm/models/components/updatedocument.js +91 -0
- package/esm/models/components/updatedocument.js.map +1 -0
- package/esm/models/operations/createdocument.d.ts +92 -0
- package/esm/models/operations/createdocument.d.ts.map +1 -0
- package/esm/models/operations/createdocument.js +97 -0
- package/esm/models/operations/createdocument.js.map +1 -0
- package/esm/models/operations/deletedocument.d.ts +67 -0
- package/esm/models/operations/deletedocument.d.ts.map +1 -0
- package/esm/models/operations/deletedocument.js +69 -0
- package/esm/models/operations/deletedocument.js.map +1 -0
- package/esm/models/operations/getdocument.d.ts +95 -0
- package/esm/models/operations/getdocument.d.ts.map +1 -0
- package/esm/models/operations/getdocument.js +97 -0
- package/esm/models/operations/getdocument.js.map +1 -0
- package/esm/models/operations/index.d.ts +7 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +7 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/listdocuments.d.ts +90 -0
- package/esm/models/operations/listdocuments.d.ts.map +1 -0
- package/esm/models/operations/listdocuments.js +86 -0
- package/esm/models/operations/listdocuments.js.map +1 -0
- package/esm/models/operations/listdocumenttype.d.ts +62 -0
- package/esm/models/operations/listdocumenttype.d.ts.map +1 -0
- package/esm/models/operations/listdocumenttype.js +70 -0
- package/esm/models/operations/listdocumenttype.js.map +1 -0
- package/esm/models/operations/updatedocument.d.ts +97 -0
- package/esm/models/operations/updatedocument.d.ts.map +1 -0
- package/esm/models/operations/updatedocument.js +101 -0
- package/esm/models/operations/updatedocument.js.map +1 -0
- package/esm/models/operations/verifydocument.d.ts +140 -0
- package/esm/models/operations/verifydocument.d.ts.map +1 -0
- package/esm/models/operations/verifydocument.js +168 -0
- package/esm/models/operations/verifydocument.js.map +1 -0
- package/esm/sdk/kyc.d.ts +54 -0
- package/esm/sdk/kyc.d.ts.map +1 -0
- package/esm/sdk/kyc.js +78 -0
- package/esm/sdk/kyc.js.map +1 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +4 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/authGetAnonymousToken.ts +1 -1
- package/src/funcs/kycCreateDocument.ts +190 -0
- package/src/funcs/kycDeleteDocument.ts +166 -0
- package/src/funcs/kycGetDocument.ts +166 -0
- package/src/funcs/kycListDocumentType.ts +136 -0
- package/src/funcs/kycListDocuments.ts +160 -0
- package/src/funcs/kycUpdateDocument.ts +201 -0
- package/src/funcs/kycVerifyDocument.ts +161 -0
- package/src/lib/config.ts +4 -4
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/prompts.ts +8 -1
- package/src/mcp-server/resources.ts +16 -2
- package/src/mcp-server/server.ts +17 -3
- package/src/mcp-server/tools/kycCreateDocument.ts +37 -0
- package/src/mcp-server/tools/kycDeleteDocument.ts +37 -0
- package/src/mcp-server/tools/kycGetDocument.ts +37 -0
- package/src/mcp-server/tools/kycListDocumentType.ts +30 -0
- package/src/mcp-server/tools/kycListDocuments.ts +37 -0
- package/src/mcp-server/tools/kycUpdateDocument.ts +37 -0
- package/src/mcp-server/tools/kycVerifyDocument.ts +37 -0
- package/src/mcp-server/tools.ts +6 -3
- package/src/models/components/document.ts +252 -0
- package/src/models/components/documentinput.ts +154 -0
- package/src/models/components/documenttype.ts +163 -0
- package/src/models/components/gstindetail.ts +62 -0
- package/src/models/components/index.ts +6 -0
- package/src/models/components/pandetail.ts +62 -0
- package/src/models/components/updatedocument.ts +168 -0
- package/src/models/operations/createdocument.ts +210 -0
- package/src/models/operations/deletedocument.ts +150 -0
- package/src/models/operations/getdocument.ts +213 -0
- package/src/models/operations/index.ts +7 -0
- package/src/models/operations/listdocuments.ts +197 -0
- package/src/models/operations/listdocumenttype.ts +147 -0
- package/src/models/operations/updatedocument.ts +219 -0
- package/src/models/operations/verifydocument.ts +346 -0
- package/src/sdk/kyc.ts +133 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,163 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export const DocumentTypeDocumentType = {
|
|
13
|
+
Gst: "gst",
|
|
14
|
+
Pan: "pan",
|
|
15
|
+
Other: "other",
|
|
16
|
+
} as const;
|
|
17
|
+
export type DocumentTypeDocumentType = ClosedEnum<
|
|
18
|
+
typeof DocumentTypeDocumentType
|
|
19
|
+
>;
|
|
20
|
+
|
|
21
|
+
export const VerificationType = {
|
|
22
|
+
Auto: "auto",
|
|
23
|
+
Manual: "manual",
|
|
24
|
+
} as const;
|
|
25
|
+
export type VerificationType = ClosedEnum<typeof VerificationType>;
|
|
26
|
+
|
|
27
|
+
export type DocumentType = {
|
|
28
|
+
id?: string | undefined;
|
|
29
|
+
documentType: DocumentTypeDocumentType;
|
|
30
|
+
title: string;
|
|
31
|
+
description?: string | null | undefined;
|
|
32
|
+
active?: boolean | undefined;
|
|
33
|
+
isMandatory: boolean;
|
|
34
|
+
isAttachmentRequired: boolean;
|
|
35
|
+
verificationType: VerificationType;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const DocumentTypeDocumentType$inboundSchema: z.ZodNativeEnum<
|
|
40
|
+
typeof DocumentTypeDocumentType
|
|
41
|
+
> = z.nativeEnum(DocumentTypeDocumentType);
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const DocumentTypeDocumentType$outboundSchema: z.ZodNativeEnum<
|
|
45
|
+
typeof DocumentTypeDocumentType
|
|
46
|
+
> = DocumentTypeDocumentType$inboundSchema;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
|
+
*/
|
|
52
|
+
export namespace DocumentTypeDocumentType$ {
|
|
53
|
+
/** @deprecated use `DocumentTypeDocumentType$inboundSchema` instead. */
|
|
54
|
+
export const inboundSchema = DocumentTypeDocumentType$inboundSchema;
|
|
55
|
+
/** @deprecated use `DocumentTypeDocumentType$outboundSchema` instead. */
|
|
56
|
+
export const outboundSchema = DocumentTypeDocumentType$outboundSchema;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const VerificationType$inboundSchema: z.ZodNativeEnum<
|
|
61
|
+
typeof VerificationType
|
|
62
|
+
> = z.nativeEnum(VerificationType);
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const VerificationType$outboundSchema: z.ZodNativeEnum<
|
|
66
|
+
typeof VerificationType
|
|
67
|
+
> = VerificationType$inboundSchema;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
72
|
+
*/
|
|
73
|
+
export namespace VerificationType$ {
|
|
74
|
+
/** @deprecated use `VerificationType$inboundSchema` instead. */
|
|
75
|
+
export const inboundSchema = VerificationType$inboundSchema;
|
|
76
|
+
/** @deprecated use `VerificationType$outboundSchema` instead. */
|
|
77
|
+
export const outboundSchema = VerificationType$outboundSchema;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const DocumentType$inboundSchema: z.ZodType<
|
|
82
|
+
DocumentType,
|
|
83
|
+
z.ZodTypeDef,
|
|
84
|
+
unknown
|
|
85
|
+
> = z.object({
|
|
86
|
+
id: z.string().optional(),
|
|
87
|
+
document_type: DocumentTypeDocumentType$inboundSchema,
|
|
88
|
+
title: z.string(),
|
|
89
|
+
description: z.nullable(z.string()).optional(),
|
|
90
|
+
active: z.boolean().default(true),
|
|
91
|
+
is_mandatory: z.boolean(),
|
|
92
|
+
is_attachment_required: z.boolean(),
|
|
93
|
+
verification_type: VerificationType$inboundSchema,
|
|
94
|
+
}).transform((v) => {
|
|
95
|
+
return remap$(v, {
|
|
96
|
+
"document_type": "documentType",
|
|
97
|
+
"is_mandatory": "isMandatory",
|
|
98
|
+
"is_attachment_required": "isAttachmentRequired",
|
|
99
|
+
"verification_type": "verificationType",
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
export type DocumentType$Outbound = {
|
|
105
|
+
id?: string | undefined;
|
|
106
|
+
document_type: string;
|
|
107
|
+
title: string;
|
|
108
|
+
description?: string | null | undefined;
|
|
109
|
+
active: boolean;
|
|
110
|
+
is_mandatory: boolean;
|
|
111
|
+
is_attachment_required: boolean;
|
|
112
|
+
verification_type: string;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/** @internal */
|
|
116
|
+
export const DocumentType$outboundSchema: z.ZodType<
|
|
117
|
+
DocumentType$Outbound,
|
|
118
|
+
z.ZodTypeDef,
|
|
119
|
+
DocumentType
|
|
120
|
+
> = z.object({
|
|
121
|
+
id: z.string().optional(),
|
|
122
|
+
documentType: DocumentTypeDocumentType$outboundSchema,
|
|
123
|
+
title: z.string(),
|
|
124
|
+
description: z.nullable(z.string()).optional(),
|
|
125
|
+
active: z.boolean().default(true),
|
|
126
|
+
isMandatory: z.boolean(),
|
|
127
|
+
isAttachmentRequired: z.boolean(),
|
|
128
|
+
verificationType: VerificationType$outboundSchema,
|
|
129
|
+
}).transform((v) => {
|
|
130
|
+
return remap$(v, {
|
|
131
|
+
documentType: "document_type",
|
|
132
|
+
isMandatory: "is_mandatory",
|
|
133
|
+
isAttachmentRequired: "is_attachment_required",
|
|
134
|
+
verificationType: "verification_type",
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @internal
|
|
140
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
141
|
+
*/
|
|
142
|
+
export namespace DocumentType$ {
|
|
143
|
+
/** @deprecated use `DocumentType$inboundSchema` instead. */
|
|
144
|
+
export const inboundSchema = DocumentType$inboundSchema;
|
|
145
|
+
/** @deprecated use `DocumentType$outboundSchema` instead. */
|
|
146
|
+
export const outboundSchema = DocumentType$outboundSchema;
|
|
147
|
+
/** @deprecated use `DocumentType$Outbound` instead. */
|
|
148
|
+
export type Outbound = DocumentType$Outbound;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export function documentTypeToJSON(documentType: DocumentType): string {
|
|
152
|
+
return JSON.stringify(DocumentType$outboundSchema.parse(documentType));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function documentTypeFromJSON(
|
|
156
|
+
jsonString: string,
|
|
157
|
+
): SafeParseResult<DocumentType, SDKValidationError> {
|
|
158
|
+
return safeParse(
|
|
159
|
+
jsonString,
|
|
160
|
+
(x) => DocumentType$inboundSchema.parse(JSON.parse(x)),
|
|
161
|
+
`Failed to parse 'DocumentType' from JSON`,
|
|
162
|
+
);
|
|
163
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type GstinDetail = {
|
|
11
|
+
id?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const GstinDetail$inboundSchema: z.ZodType<
|
|
16
|
+
GstinDetail,
|
|
17
|
+
z.ZodTypeDef,
|
|
18
|
+
unknown
|
|
19
|
+
> = z.object({
|
|
20
|
+
id: z.string().optional(),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type GstinDetail$Outbound = {
|
|
25
|
+
id?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const GstinDetail$outboundSchema: z.ZodType<
|
|
30
|
+
GstinDetail$Outbound,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
GstinDetail
|
|
33
|
+
> = z.object({
|
|
34
|
+
id: z.string().optional(),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
40
|
+
*/
|
|
41
|
+
export namespace GstinDetail$ {
|
|
42
|
+
/** @deprecated use `GstinDetail$inboundSchema` instead. */
|
|
43
|
+
export const inboundSchema = GstinDetail$inboundSchema;
|
|
44
|
+
/** @deprecated use `GstinDetail$outboundSchema` instead. */
|
|
45
|
+
export const outboundSchema = GstinDetail$outboundSchema;
|
|
46
|
+
/** @deprecated use `GstinDetail$Outbound` instead. */
|
|
47
|
+
export type Outbound = GstinDetail$Outbound;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function gstinDetailToJSON(gstinDetail: GstinDetail): string {
|
|
51
|
+
return JSON.stringify(GstinDetail$outboundSchema.parse(gstinDetail));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function gstinDetailFromJSON(
|
|
55
|
+
jsonString: string,
|
|
56
|
+
): SafeParseResult<GstinDetail, SDKValidationError> {
|
|
57
|
+
return safeParse(
|
|
58
|
+
jsonString,
|
|
59
|
+
(x) => GstinDetail$inboundSchema.parse(JSON.parse(x)),
|
|
60
|
+
`Failed to parse 'GstinDetail' from JSON`,
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -19,8 +19,12 @@ export * from "./customerreadyforreview.js";
|
|
|
19
19
|
export * from "./customerreview.js";
|
|
20
20
|
export * from "./dateattribute.js";
|
|
21
21
|
export * from "./discountbasedpromotion.js";
|
|
22
|
+
export * from "./document.js";
|
|
23
|
+
export * from "./documentinput.js";
|
|
24
|
+
export * from "./documenttype.js";
|
|
22
25
|
export * from "./fixedpricepromotion.js";
|
|
23
26
|
export * from "./freegoodspromotion.js";
|
|
27
|
+
export * from "./gstindetail.js";
|
|
24
28
|
export * from "./item.js";
|
|
25
29
|
export * from "./juspaypaymentgatewayparams.js";
|
|
26
30
|
export * from "./juspaypaymentinfo.js";
|
|
@@ -35,6 +39,7 @@ export * from "./orderlist.js";
|
|
|
35
39
|
export * from "./orderpayment.js";
|
|
36
40
|
export * from "./ordershipment.js";
|
|
37
41
|
export * from "./pagination.js";
|
|
42
|
+
export * from "./pandetail.js";
|
|
38
43
|
export * from "./payupaymentgatewayparams.js";
|
|
39
44
|
export * from "./payupaymentinfo.js";
|
|
40
45
|
export * from "./pincode.js";
|
|
@@ -58,6 +63,7 @@ export * from "./singleselectattribute.js";
|
|
|
58
63
|
export * from "./singleselectoption.js";
|
|
59
64
|
export * from "./textattribute.js";
|
|
60
65
|
export * from "./updatecartitem.js";
|
|
66
|
+
export * from "./updatedocument.js";
|
|
61
67
|
export * from "./upipayment.js";
|
|
62
68
|
export * from "./user.js";
|
|
63
69
|
export * from "./variant.js";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type PanDetail = {
|
|
11
|
+
id?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const PanDetail$inboundSchema: z.ZodType<
|
|
16
|
+
PanDetail,
|
|
17
|
+
z.ZodTypeDef,
|
|
18
|
+
unknown
|
|
19
|
+
> = z.object({
|
|
20
|
+
id: z.string().optional(),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type PanDetail$Outbound = {
|
|
25
|
+
id?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const PanDetail$outboundSchema: z.ZodType<
|
|
30
|
+
PanDetail$Outbound,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
PanDetail
|
|
33
|
+
> = z.object({
|
|
34
|
+
id: z.string().optional(),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
40
|
+
*/
|
|
41
|
+
export namespace PanDetail$ {
|
|
42
|
+
/** @deprecated use `PanDetail$inboundSchema` instead. */
|
|
43
|
+
export const inboundSchema = PanDetail$inboundSchema;
|
|
44
|
+
/** @deprecated use `PanDetail$outboundSchema` instead. */
|
|
45
|
+
export const outboundSchema = PanDetail$outboundSchema;
|
|
46
|
+
/** @deprecated use `PanDetail$Outbound` instead. */
|
|
47
|
+
export type Outbound = PanDetail$Outbound;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function panDetailToJSON(panDetail: PanDetail): string {
|
|
51
|
+
return JSON.stringify(PanDetail$outboundSchema.parse(panDetail));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function panDetailFromJSON(
|
|
55
|
+
jsonString: string,
|
|
56
|
+
): SafeParseResult<PanDetail, SDKValidationError> {
|
|
57
|
+
return safeParse(
|
|
58
|
+
jsonString,
|
|
59
|
+
(x) => PanDetail$inboundSchema.parse(JSON.parse(x)),
|
|
60
|
+
`Failed to parse 'PanDetail' from JSON`,
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
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 { blobLikeSchema } from "../../types/blobs.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type UpdateDocumentFile = {
|
|
13
|
+
fileName: string;
|
|
14
|
+
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type UpdateDocument = {
|
|
18
|
+
documentNumber: string;
|
|
19
|
+
documentTypeId: string;
|
|
20
|
+
note?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* file attachment will be required or optional as per store setting.
|
|
23
|
+
*/
|
|
24
|
+
file?: UpdateDocumentFile | Blob | undefined;
|
|
25
|
+
modifiedReason: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const UpdateDocumentFile$inboundSchema: z.ZodType<
|
|
30
|
+
UpdateDocumentFile,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
fileName: z.string(),
|
|
35
|
+
content: z.union([
|
|
36
|
+
z.instanceof(ReadableStream<Uint8Array>),
|
|
37
|
+
z.instanceof(Blob),
|
|
38
|
+
z.instanceof(ArrayBuffer),
|
|
39
|
+
z.instanceof(Uint8Array),
|
|
40
|
+
]),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type UpdateDocumentFile$Outbound = {
|
|
45
|
+
fileName: string;
|
|
46
|
+
content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const UpdateDocumentFile$outboundSchema: z.ZodType<
|
|
51
|
+
UpdateDocumentFile$Outbound,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
UpdateDocumentFile
|
|
54
|
+
> = z.object({
|
|
55
|
+
fileName: z.string(),
|
|
56
|
+
content: z.union([
|
|
57
|
+
z.instanceof(ReadableStream<Uint8Array>),
|
|
58
|
+
z.instanceof(Blob),
|
|
59
|
+
z.instanceof(ArrayBuffer),
|
|
60
|
+
z.instanceof(Uint8Array),
|
|
61
|
+
]),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
67
|
+
*/
|
|
68
|
+
export namespace UpdateDocumentFile$ {
|
|
69
|
+
/** @deprecated use `UpdateDocumentFile$inboundSchema` instead. */
|
|
70
|
+
export const inboundSchema = UpdateDocumentFile$inboundSchema;
|
|
71
|
+
/** @deprecated use `UpdateDocumentFile$outboundSchema` instead. */
|
|
72
|
+
export const outboundSchema = UpdateDocumentFile$outboundSchema;
|
|
73
|
+
/** @deprecated use `UpdateDocumentFile$Outbound` instead. */
|
|
74
|
+
export type Outbound = UpdateDocumentFile$Outbound;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function updateDocumentFileToJSON(
|
|
78
|
+
updateDocumentFile: UpdateDocumentFile,
|
|
79
|
+
): string {
|
|
80
|
+
return JSON.stringify(
|
|
81
|
+
UpdateDocumentFile$outboundSchema.parse(updateDocumentFile),
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function updateDocumentFileFromJSON(
|
|
86
|
+
jsonString: string,
|
|
87
|
+
): SafeParseResult<UpdateDocumentFile, SDKValidationError> {
|
|
88
|
+
return safeParse(
|
|
89
|
+
jsonString,
|
|
90
|
+
(x) => UpdateDocumentFile$inboundSchema.parse(JSON.parse(x)),
|
|
91
|
+
`Failed to parse 'UpdateDocumentFile' from JSON`,
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const UpdateDocument$inboundSchema: z.ZodType<
|
|
97
|
+
UpdateDocument,
|
|
98
|
+
z.ZodTypeDef,
|
|
99
|
+
unknown
|
|
100
|
+
> = z.object({
|
|
101
|
+
document_number: z.string(),
|
|
102
|
+
document_type_id: z.string(),
|
|
103
|
+
note: z.string().optional(),
|
|
104
|
+
file: z.lazy(() => UpdateDocumentFile$inboundSchema).optional(),
|
|
105
|
+
modified_reason: z.string(),
|
|
106
|
+
}).transform((v) => {
|
|
107
|
+
return remap$(v, {
|
|
108
|
+
"document_number": "documentNumber",
|
|
109
|
+
"document_type_id": "documentTypeId",
|
|
110
|
+
"modified_reason": "modifiedReason",
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
/** @internal */
|
|
115
|
+
export type UpdateDocument$Outbound = {
|
|
116
|
+
document_number: string;
|
|
117
|
+
document_type_id: string;
|
|
118
|
+
note?: string | undefined;
|
|
119
|
+
file?: UpdateDocumentFile$Outbound | Blob | undefined;
|
|
120
|
+
modified_reason: string;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/** @internal */
|
|
124
|
+
export const UpdateDocument$outboundSchema: z.ZodType<
|
|
125
|
+
UpdateDocument$Outbound,
|
|
126
|
+
z.ZodTypeDef,
|
|
127
|
+
UpdateDocument
|
|
128
|
+
> = z.object({
|
|
129
|
+
documentNumber: z.string(),
|
|
130
|
+
documentTypeId: z.string(),
|
|
131
|
+
note: z.string().optional(),
|
|
132
|
+
file: z.lazy(() => UpdateDocumentFile$outboundSchema).or(blobLikeSchema)
|
|
133
|
+
.optional(),
|
|
134
|
+
modifiedReason: z.string(),
|
|
135
|
+
}).transform((v) => {
|
|
136
|
+
return remap$(v, {
|
|
137
|
+
documentNumber: "document_number",
|
|
138
|
+
documentTypeId: "document_type_id",
|
|
139
|
+
modifiedReason: "modified_reason",
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @internal
|
|
145
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
146
|
+
*/
|
|
147
|
+
export namespace UpdateDocument$ {
|
|
148
|
+
/** @deprecated use `UpdateDocument$inboundSchema` instead. */
|
|
149
|
+
export const inboundSchema = UpdateDocument$inboundSchema;
|
|
150
|
+
/** @deprecated use `UpdateDocument$outboundSchema` instead. */
|
|
151
|
+
export const outboundSchema = UpdateDocument$outboundSchema;
|
|
152
|
+
/** @deprecated use `UpdateDocument$Outbound` instead. */
|
|
153
|
+
export type Outbound = UpdateDocument$Outbound;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function updateDocumentToJSON(updateDocument: UpdateDocument): string {
|
|
157
|
+
return JSON.stringify(UpdateDocument$outboundSchema.parse(updateDocument));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function updateDocumentFromJSON(
|
|
161
|
+
jsonString: string,
|
|
162
|
+
): SafeParseResult<UpdateDocument, SDKValidationError> {
|
|
163
|
+
return safeParse(
|
|
164
|
+
jsonString,
|
|
165
|
+
(x) => UpdateDocument$inboundSchema.parse(JSON.parse(x)),
|
|
166
|
+
`Failed to parse 'UpdateDocument' from JSON`,
|
|
167
|
+
);
|
|
168
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type CreateDocumentRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* customer id
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
document?: components.DocumentInput | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type CreateDocumentContent = {
|
|
21
|
+
document?: components.Document | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* OK
|
|
26
|
+
*/
|
|
27
|
+
export type CreateDocumentResponseBody = {
|
|
28
|
+
message?: string | undefined;
|
|
29
|
+
success?: boolean | undefined;
|
|
30
|
+
content?: CreateDocumentContent | undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const CreateDocumentRequest$inboundSchema: z.ZodType<
|
|
35
|
+
CreateDocumentRequest,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
unknown
|
|
38
|
+
> = z.object({
|
|
39
|
+
id: z.string(),
|
|
40
|
+
Document: components.DocumentInput$inboundSchema.optional(),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"Document": "document",
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export type CreateDocumentRequest$Outbound = {
|
|
49
|
+
id: string;
|
|
50
|
+
Document?: components.DocumentInput$Outbound | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const CreateDocumentRequest$outboundSchema: z.ZodType<
|
|
55
|
+
CreateDocumentRequest$Outbound,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
CreateDocumentRequest
|
|
58
|
+
> = z.object({
|
|
59
|
+
id: z.string(),
|
|
60
|
+
document: components.DocumentInput$outboundSchema.optional(),
|
|
61
|
+
}).transform((v) => {
|
|
62
|
+
return remap$(v, {
|
|
63
|
+
document: "Document",
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
70
|
+
*/
|
|
71
|
+
export namespace CreateDocumentRequest$ {
|
|
72
|
+
/** @deprecated use `CreateDocumentRequest$inboundSchema` instead. */
|
|
73
|
+
export const inboundSchema = CreateDocumentRequest$inboundSchema;
|
|
74
|
+
/** @deprecated use `CreateDocumentRequest$outboundSchema` instead. */
|
|
75
|
+
export const outboundSchema = CreateDocumentRequest$outboundSchema;
|
|
76
|
+
/** @deprecated use `CreateDocumentRequest$Outbound` instead. */
|
|
77
|
+
export type Outbound = CreateDocumentRequest$Outbound;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function createDocumentRequestToJSON(
|
|
81
|
+
createDocumentRequest: CreateDocumentRequest,
|
|
82
|
+
): string {
|
|
83
|
+
return JSON.stringify(
|
|
84
|
+
CreateDocumentRequest$outboundSchema.parse(createDocumentRequest),
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function createDocumentRequestFromJSON(
|
|
89
|
+
jsonString: string,
|
|
90
|
+
): SafeParseResult<CreateDocumentRequest, SDKValidationError> {
|
|
91
|
+
return safeParse(
|
|
92
|
+
jsonString,
|
|
93
|
+
(x) => CreateDocumentRequest$inboundSchema.parse(JSON.parse(x)),
|
|
94
|
+
`Failed to parse 'CreateDocumentRequest' from JSON`,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const CreateDocumentContent$inboundSchema: z.ZodType<
|
|
100
|
+
CreateDocumentContent,
|
|
101
|
+
z.ZodTypeDef,
|
|
102
|
+
unknown
|
|
103
|
+
> = z.object({
|
|
104
|
+
document: components.Document$inboundSchema.optional(),
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
export type CreateDocumentContent$Outbound = {
|
|
109
|
+
document?: components.Document$Outbound | undefined;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/** @internal */
|
|
113
|
+
export const CreateDocumentContent$outboundSchema: z.ZodType<
|
|
114
|
+
CreateDocumentContent$Outbound,
|
|
115
|
+
z.ZodTypeDef,
|
|
116
|
+
CreateDocumentContent
|
|
117
|
+
> = z.object({
|
|
118
|
+
document: components.Document$outboundSchema.optional(),
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @internal
|
|
123
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
124
|
+
*/
|
|
125
|
+
export namespace CreateDocumentContent$ {
|
|
126
|
+
/** @deprecated use `CreateDocumentContent$inboundSchema` instead. */
|
|
127
|
+
export const inboundSchema = CreateDocumentContent$inboundSchema;
|
|
128
|
+
/** @deprecated use `CreateDocumentContent$outboundSchema` instead. */
|
|
129
|
+
export const outboundSchema = CreateDocumentContent$outboundSchema;
|
|
130
|
+
/** @deprecated use `CreateDocumentContent$Outbound` instead. */
|
|
131
|
+
export type Outbound = CreateDocumentContent$Outbound;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function createDocumentContentToJSON(
|
|
135
|
+
createDocumentContent: CreateDocumentContent,
|
|
136
|
+
): string {
|
|
137
|
+
return JSON.stringify(
|
|
138
|
+
CreateDocumentContent$outboundSchema.parse(createDocumentContent),
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function createDocumentContentFromJSON(
|
|
143
|
+
jsonString: string,
|
|
144
|
+
): SafeParseResult<CreateDocumentContent, SDKValidationError> {
|
|
145
|
+
return safeParse(
|
|
146
|
+
jsonString,
|
|
147
|
+
(x) => CreateDocumentContent$inboundSchema.parse(JSON.parse(x)),
|
|
148
|
+
`Failed to parse 'CreateDocumentContent' from JSON`,
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** @internal */
|
|
153
|
+
export const CreateDocumentResponseBody$inboundSchema: z.ZodType<
|
|
154
|
+
CreateDocumentResponseBody,
|
|
155
|
+
z.ZodTypeDef,
|
|
156
|
+
unknown
|
|
157
|
+
> = z.object({
|
|
158
|
+
message: z.string().optional(),
|
|
159
|
+
success: z.boolean().optional(),
|
|
160
|
+
content: z.lazy(() => CreateDocumentContent$inboundSchema).optional(),
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
/** @internal */
|
|
164
|
+
export type CreateDocumentResponseBody$Outbound = {
|
|
165
|
+
message?: string | undefined;
|
|
166
|
+
success?: boolean | undefined;
|
|
167
|
+
content?: CreateDocumentContent$Outbound | undefined;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
export const CreateDocumentResponseBody$outboundSchema: z.ZodType<
|
|
172
|
+
CreateDocumentResponseBody$Outbound,
|
|
173
|
+
z.ZodTypeDef,
|
|
174
|
+
CreateDocumentResponseBody
|
|
175
|
+
> = z.object({
|
|
176
|
+
message: z.string().optional(),
|
|
177
|
+
success: z.boolean().optional(),
|
|
178
|
+
content: z.lazy(() => CreateDocumentContent$outboundSchema).optional(),
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @internal
|
|
183
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
184
|
+
*/
|
|
185
|
+
export namespace CreateDocumentResponseBody$ {
|
|
186
|
+
/** @deprecated use `CreateDocumentResponseBody$inboundSchema` instead. */
|
|
187
|
+
export const inboundSchema = CreateDocumentResponseBody$inboundSchema;
|
|
188
|
+
/** @deprecated use `CreateDocumentResponseBody$outboundSchema` instead. */
|
|
189
|
+
export const outboundSchema = CreateDocumentResponseBody$outboundSchema;
|
|
190
|
+
/** @deprecated use `CreateDocumentResponseBody$Outbound` instead. */
|
|
191
|
+
export type Outbound = CreateDocumentResponseBody$Outbound;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export function createDocumentResponseBodyToJSON(
|
|
195
|
+
createDocumentResponseBody: CreateDocumentResponseBody,
|
|
196
|
+
): string {
|
|
197
|
+
return JSON.stringify(
|
|
198
|
+
CreateDocumentResponseBody$outboundSchema.parse(createDocumentResponseBody),
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export function createDocumentResponseBodyFromJSON(
|
|
203
|
+
jsonString: string,
|
|
204
|
+
): SafeParseResult<CreateDocumentResponseBody, SDKValidationError> {
|
|
205
|
+
return safeParse(
|
|
206
|
+
jsonString,
|
|
207
|
+
(x) => CreateDocumentResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
208
|
+
`Failed to parse 'CreateDocumentResponseBody' from JSON`,
|
|
209
|
+
);
|
|
210
|
+
}
|