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,147 @@
|
|
|
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 ListDocumentTypeContent = {
|
|
13
|
+
documentTypes?: Array<components.DocumentType> | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* OK
|
|
18
|
+
*/
|
|
19
|
+
export type ListDocumentTypeResponseBody = {
|
|
20
|
+
message?: string | undefined;
|
|
21
|
+
success?: boolean | undefined;
|
|
22
|
+
content?: ListDocumentTypeContent | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ListDocumentTypeContent$inboundSchema: z.ZodType<
|
|
27
|
+
ListDocumentTypeContent,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
document_types: z.array(components.DocumentType$inboundSchema).optional(),
|
|
32
|
+
}).transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
"document_types": "documentTypes",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type ListDocumentTypeContent$Outbound = {
|
|
40
|
+
document_types?: Array<components.DocumentType$Outbound> | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const ListDocumentTypeContent$outboundSchema: z.ZodType<
|
|
45
|
+
ListDocumentTypeContent$Outbound,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
ListDocumentTypeContent
|
|
48
|
+
> = z.object({
|
|
49
|
+
documentTypes: z.array(components.DocumentType$outboundSchema).optional(),
|
|
50
|
+
}).transform((v) => {
|
|
51
|
+
return remap$(v, {
|
|
52
|
+
documentTypes: "document_types",
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
59
|
+
*/
|
|
60
|
+
export namespace ListDocumentTypeContent$ {
|
|
61
|
+
/** @deprecated use `ListDocumentTypeContent$inboundSchema` instead. */
|
|
62
|
+
export const inboundSchema = ListDocumentTypeContent$inboundSchema;
|
|
63
|
+
/** @deprecated use `ListDocumentTypeContent$outboundSchema` instead. */
|
|
64
|
+
export const outboundSchema = ListDocumentTypeContent$outboundSchema;
|
|
65
|
+
/** @deprecated use `ListDocumentTypeContent$Outbound` instead. */
|
|
66
|
+
export type Outbound = ListDocumentTypeContent$Outbound;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function listDocumentTypeContentToJSON(
|
|
70
|
+
listDocumentTypeContent: ListDocumentTypeContent,
|
|
71
|
+
): string {
|
|
72
|
+
return JSON.stringify(
|
|
73
|
+
ListDocumentTypeContent$outboundSchema.parse(listDocumentTypeContent),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function listDocumentTypeContentFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<ListDocumentTypeContent, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) => ListDocumentTypeContent$inboundSchema.parse(JSON.parse(x)),
|
|
83
|
+
`Failed to parse 'ListDocumentTypeContent' from JSON`,
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const ListDocumentTypeResponseBody$inboundSchema: z.ZodType<
|
|
89
|
+
ListDocumentTypeResponseBody,
|
|
90
|
+
z.ZodTypeDef,
|
|
91
|
+
unknown
|
|
92
|
+
> = z.object({
|
|
93
|
+
message: z.string().optional(),
|
|
94
|
+
success: z.boolean().optional(),
|
|
95
|
+
content: z.lazy(() => ListDocumentTypeContent$inboundSchema).optional(),
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
export type ListDocumentTypeResponseBody$Outbound = {
|
|
100
|
+
message?: string | undefined;
|
|
101
|
+
success?: boolean | undefined;
|
|
102
|
+
content?: ListDocumentTypeContent$Outbound | undefined;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export const ListDocumentTypeResponseBody$outboundSchema: z.ZodType<
|
|
107
|
+
ListDocumentTypeResponseBody$Outbound,
|
|
108
|
+
z.ZodTypeDef,
|
|
109
|
+
ListDocumentTypeResponseBody
|
|
110
|
+
> = z.object({
|
|
111
|
+
message: z.string().optional(),
|
|
112
|
+
success: z.boolean().optional(),
|
|
113
|
+
content: z.lazy(() => ListDocumentTypeContent$outboundSchema).optional(),
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @internal
|
|
118
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
119
|
+
*/
|
|
120
|
+
export namespace ListDocumentTypeResponseBody$ {
|
|
121
|
+
/** @deprecated use `ListDocumentTypeResponseBody$inboundSchema` instead. */
|
|
122
|
+
export const inboundSchema = ListDocumentTypeResponseBody$inboundSchema;
|
|
123
|
+
/** @deprecated use `ListDocumentTypeResponseBody$outboundSchema` instead. */
|
|
124
|
+
export const outboundSchema = ListDocumentTypeResponseBody$outboundSchema;
|
|
125
|
+
/** @deprecated use `ListDocumentTypeResponseBody$Outbound` instead. */
|
|
126
|
+
export type Outbound = ListDocumentTypeResponseBody$Outbound;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function listDocumentTypeResponseBodyToJSON(
|
|
130
|
+
listDocumentTypeResponseBody: ListDocumentTypeResponseBody,
|
|
131
|
+
): string {
|
|
132
|
+
return JSON.stringify(
|
|
133
|
+
ListDocumentTypeResponseBody$outboundSchema.parse(
|
|
134
|
+
listDocumentTypeResponseBody,
|
|
135
|
+
),
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function listDocumentTypeResponseBodyFromJSON(
|
|
140
|
+
jsonString: string,
|
|
141
|
+
): SafeParseResult<ListDocumentTypeResponseBody, SDKValidationError> {
|
|
142
|
+
return safeParse(
|
|
143
|
+
jsonString,
|
|
144
|
+
(x) => ListDocumentTypeResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
145
|
+
`Failed to parse 'ListDocumentTypeResponseBody' from JSON`,
|
|
146
|
+
);
|
|
147
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
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 UpdateDocumentRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* customer id
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* document id
|
|
19
|
+
*/
|
|
20
|
+
documentId: string;
|
|
21
|
+
updateDocument?: components.UpdateDocument | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type UpdateDocumentContent = {
|
|
25
|
+
document?: components.Document | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* OK
|
|
30
|
+
*/
|
|
31
|
+
export type UpdateDocumentResponseBody = {
|
|
32
|
+
message?: string | undefined;
|
|
33
|
+
success?: boolean | undefined;
|
|
34
|
+
content?: UpdateDocumentContent | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const UpdateDocumentRequest$inboundSchema: z.ZodType<
|
|
39
|
+
UpdateDocumentRequest,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
id: z.string(),
|
|
44
|
+
document_id: z.string(),
|
|
45
|
+
UpdateDocument: components.UpdateDocument$inboundSchema.optional(),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
"document_id": "documentId",
|
|
49
|
+
"UpdateDocument": "updateDocument",
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export type UpdateDocumentRequest$Outbound = {
|
|
55
|
+
id: string;
|
|
56
|
+
document_id: string;
|
|
57
|
+
UpdateDocument?: components.UpdateDocument$Outbound | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const UpdateDocumentRequest$outboundSchema: z.ZodType<
|
|
62
|
+
UpdateDocumentRequest$Outbound,
|
|
63
|
+
z.ZodTypeDef,
|
|
64
|
+
UpdateDocumentRequest
|
|
65
|
+
> = z.object({
|
|
66
|
+
id: z.string(),
|
|
67
|
+
documentId: z.string(),
|
|
68
|
+
updateDocument: components.UpdateDocument$outboundSchema.optional(),
|
|
69
|
+
}).transform((v) => {
|
|
70
|
+
return remap$(v, {
|
|
71
|
+
documentId: "document_id",
|
|
72
|
+
updateDocument: "UpdateDocument",
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
79
|
+
*/
|
|
80
|
+
export namespace UpdateDocumentRequest$ {
|
|
81
|
+
/** @deprecated use `UpdateDocumentRequest$inboundSchema` instead. */
|
|
82
|
+
export const inboundSchema = UpdateDocumentRequest$inboundSchema;
|
|
83
|
+
/** @deprecated use `UpdateDocumentRequest$outboundSchema` instead. */
|
|
84
|
+
export const outboundSchema = UpdateDocumentRequest$outboundSchema;
|
|
85
|
+
/** @deprecated use `UpdateDocumentRequest$Outbound` instead. */
|
|
86
|
+
export type Outbound = UpdateDocumentRequest$Outbound;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function updateDocumentRequestToJSON(
|
|
90
|
+
updateDocumentRequest: UpdateDocumentRequest,
|
|
91
|
+
): string {
|
|
92
|
+
return JSON.stringify(
|
|
93
|
+
UpdateDocumentRequest$outboundSchema.parse(updateDocumentRequest),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function updateDocumentRequestFromJSON(
|
|
98
|
+
jsonString: string,
|
|
99
|
+
): SafeParseResult<UpdateDocumentRequest, SDKValidationError> {
|
|
100
|
+
return safeParse(
|
|
101
|
+
jsonString,
|
|
102
|
+
(x) => UpdateDocumentRequest$inboundSchema.parse(JSON.parse(x)),
|
|
103
|
+
`Failed to parse 'UpdateDocumentRequest' from JSON`,
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
export const UpdateDocumentContent$inboundSchema: z.ZodType<
|
|
109
|
+
UpdateDocumentContent,
|
|
110
|
+
z.ZodTypeDef,
|
|
111
|
+
unknown
|
|
112
|
+
> = z.object({
|
|
113
|
+
document: components.Document$inboundSchema.optional(),
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
/** @internal */
|
|
117
|
+
export type UpdateDocumentContent$Outbound = {
|
|
118
|
+
document?: components.Document$Outbound | undefined;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export const UpdateDocumentContent$outboundSchema: z.ZodType<
|
|
123
|
+
UpdateDocumentContent$Outbound,
|
|
124
|
+
z.ZodTypeDef,
|
|
125
|
+
UpdateDocumentContent
|
|
126
|
+
> = z.object({
|
|
127
|
+
document: components.Document$outboundSchema.optional(),
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @internal
|
|
132
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
133
|
+
*/
|
|
134
|
+
export namespace UpdateDocumentContent$ {
|
|
135
|
+
/** @deprecated use `UpdateDocumentContent$inboundSchema` instead. */
|
|
136
|
+
export const inboundSchema = UpdateDocumentContent$inboundSchema;
|
|
137
|
+
/** @deprecated use `UpdateDocumentContent$outboundSchema` instead. */
|
|
138
|
+
export const outboundSchema = UpdateDocumentContent$outboundSchema;
|
|
139
|
+
/** @deprecated use `UpdateDocumentContent$Outbound` instead. */
|
|
140
|
+
export type Outbound = UpdateDocumentContent$Outbound;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export function updateDocumentContentToJSON(
|
|
144
|
+
updateDocumentContent: UpdateDocumentContent,
|
|
145
|
+
): string {
|
|
146
|
+
return JSON.stringify(
|
|
147
|
+
UpdateDocumentContent$outboundSchema.parse(updateDocumentContent),
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export function updateDocumentContentFromJSON(
|
|
152
|
+
jsonString: string,
|
|
153
|
+
): SafeParseResult<UpdateDocumentContent, SDKValidationError> {
|
|
154
|
+
return safeParse(
|
|
155
|
+
jsonString,
|
|
156
|
+
(x) => UpdateDocumentContent$inboundSchema.parse(JSON.parse(x)),
|
|
157
|
+
`Failed to parse 'UpdateDocumentContent' from JSON`,
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** @internal */
|
|
162
|
+
export const UpdateDocumentResponseBody$inboundSchema: z.ZodType<
|
|
163
|
+
UpdateDocumentResponseBody,
|
|
164
|
+
z.ZodTypeDef,
|
|
165
|
+
unknown
|
|
166
|
+
> = z.object({
|
|
167
|
+
message: z.string().optional(),
|
|
168
|
+
success: z.boolean().optional(),
|
|
169
|
+
content: z.lazy(() => UpdateDocumentContent$inboundSchema).optional(),
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
/** @internal */
|
|
173
|
+
export type UpdateDocumentResponseBody$Outbound = {
|
|
174
|
+
message?: string | undefined;
|
|
175
|
+
success?: boolean | undefined;
|
|
176
|
+
content?: UpdateDocumentContent$Outbound | undefined;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/** @internal */
|
|
180
|
+
export const UpdateDocumentResponseBody$outboundSchema: z.ZodType<
|
|
181
|
+
UpdateDocumentResponseBody$Outbound,
|
|
182
|
+
z.ZodTypeDef,
|
|
183
|
+
UpdateDocumentResponseBody
|
|
184
|
+
> = z.object({
|
|
185
|
+
message: z.string().optional(),
|
|
186
|
+
success: z.boolean().optional(),
|
|
187
|
+
content: z.lazy(() => UpdateDocumentContent$outboundSchema).optional(),
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* @internal
|
|
192
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
193
|
+
*/
|
|
194
|
+
export namespace UpdateDocumentResponseBody$ {
|
|
195
|
+
/** @deprecated use `UpdateDocumentResponseBody$inboundSchema` instead. */
|
|
196
|
+
export const inboundSchema = UpdateDocumentResponseBody$inboundSchema;
|
|
197
|
+
/** @deprecated use `UpdateDocumentResponseBody$outboundSchema` instead. */
|
|
198
|
+
export const outboundSchema = UpdateDocumentResponseBody$outboundSchema;
|
|
199
|
+
/** @deprecated use `UpdateDocumentResponseBody$Outbound` instead. */
|
|
200
|
+
export type Outbound = UpdateDocumentResponseBody$Outbound;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export function updateDocumentResponseBodyToJSON(
|
|
204
|
+
updateDocumentResponseBody: UpdateDocumentResponseBody,
|
|
205
|
+
): string {
|
|
206
|
+
return JSON.stringify(
|
|
207
|
+
UpdateDocumentResponseBody$outboundSchema.parse(updateDocumentResponseBody),
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export function updateDocumentResponseBodyFromJSON(
|
|
212
|
+
jsonString: string,
|
|
213
|
+
): SafeParseResult<UpdateDocumentResponseBody, SDKValidationError> {
|
|
214
|
+
return safeParse(
|
|
215
|
+
jsonString,
|
|
216
|
+
(x) => UpdateDocumentResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
217
|
+
`Failed to parse 'UpdateDocumentResponseBody' from JSON`,
|
|
218
|
+
);
|
|
219
|
+
}
|
|
@@ -0,0 +1,346 @@
|
|
|
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 VerifyDocumentRequestBody = {
|
|
13
|
+
documentNumber: string;
|
|
14
|
+
documentTypeId: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type VerifyDocumentRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* customer id
|
|
20
|
+
*/
|
|
21
|
+
id: string;
|
|
22
|
+
requestBody?: VerifyDocumentRequestBody | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type Document = components.GstinDetail | components.PanDetail;
|
|
26
|
+
|
|
27
|
+
export type VerifyDocumentContent = {
|
|
28
|
+
document?: components.GstinDetail | components.PanDetail | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* OK
|
|
33
|
+
*/
|
|
34
|
+
export type VerifyDocumentResponseBody = {
|
|
35
|
+
message?: string | undefined;
|
|
36
|
+
success?: boolean | undefined;
|
|
37
|
+
content?: VerifyDocumentContent | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const VerifyDocumentRequestBody$inboundSchema: z.ZodType<
|
|
42
|
+
VerifyDocumentRequestBody,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
unknown
|
|
45
|
+
> = z.object({
|
|
46
|
+
document_number: z.string(),
|
|
47
|
+
document_type_id: z.string(),
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
"document_number": "documentNumber",
|
|
51
|
+
"document_type_id": "documentTypeId",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export type VerifyDocumentRequestBody$Outbound = {
|
|
57
|
+
document_number: string;
|
|
58
|
+
document_type_id: string;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const VerifyDocumentRequestBody$outboundSchema: z.ZodType<
|
|
63
|
+
VerifyDocumentRequestBody$Outbound,
|
|
64
|
+
z.ZodTypeDef,
|
|
65
|
+
VerifyDocumentRequestBody
|
|
66
|
+
> = z.object({
|
|
67
|
+
documentNumber: z.string(),
|
|
68
|
+
documentTypeId: z.string(),
|
|
69
|
+
}).transform((v) => {
|
|
70
|
+
return remap$(v, {
|
|
71
|
+
documentNumber: "document_number",
|
|
72
|
+
documentTypeId: "document_type_id",
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
79
|
+
*/
|
|
80
|
+
export namespace VerifyDocumentRequestBody$ {
|
|
81
|
+
/** @deprecated use `VerifyDocumentRequestBody$inboundSchema` instead. */
|
|
82
|
+
export const inboundSchema = VerifyDocumentRequestBody$inboundSchema;
|
|
83
|
+
/** @deprecated use `VerifyDocumentRequestBody$outboundSchema` instead. */
|
|
84
|
+
export const outboundSchema = VerifyDocumentRequestBody$outboundSchema;
|
|
85
|
+
/** @deprecated use `VerifyDocumentRequestBody$Outbound` instead. */
|
|
86
|
+
export type Outbound = VerifyDocumentRequestBody$Outbound;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function verifyDocumentRequestBodyToJSON(
|
|
90
|
+
verifyDocumentRequestBody: VerifyDocumentRequestBody,
|
|
91
|
+
): string {
|
|
92
|
+
return JSON.stringify(
|
|
93
|
+
VerifyDocumentRequestBody$outboundSchema.parse(verifyDocumentRequestBody),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function verifyDocumentRequestBodyFromJSON(
|
|
98
|
+
jsonString: string,
|
|
99
|
+
): SafeParseResult<VerifyDocumentRequestBody, SDKValidationError> {
|
|
100
|
+
return safeParse(
|
|
101
|
+
jsonString,
|
|
102
|
+
(x) => VerifyDocumentRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
103
|
+
`Failed to parse 'VerifyDocumentRequestBody' from JSON`,
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
export const VerifyDocumentRequest$inboundSchema: z.ZodType<
|
|
109
|
+
VerifyDocumentRequest,
|
|
110
|
+
z.ZodTypeDef,
|
|
111
|
+
unknown
|
|
112
|
+
> = z.object({
|
|
113
|
+
id: z.string(),
|
|
114
|
+
RequestBody: z.lazy(() => VerifyDocumentRequestBody$inboundSchema).optional(),
|
|
115
|
+
}).transform((v) => {
|
|
116
|
+
return remap$(v, {
|
|
117
|
+
"RequestBody": "requestBody",
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export type VerifyDocumentRequest$Outbound = {
|
|
123
|
+
id: string;
|
|
124
|
+
RequestBody?: VerifyDocumentRequestBody$Outbound | undefined;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/** @internal */
|
|
128
|
+
export const VerifyDocumentRequest$outboundSchema: z.ZodType<
|
|
129
|
+
VerifyDocumentRequest$Outbound,
|
|
130
|
+
z.ZodTypeDef,
|
|
131
|
+
VerifyDocumentRequest
|
|
132
|
+
> = z.object({
|
|
133
|
+
id: z.string(),
|
|
134
|
+
requestBody: z.lazy(() => VerifyDocumentRequestBody$outboundSchema)
|
|
135
|
+
.optional(),
|
|
136
|
+
}).transform((v) => {
|
|
137
|
+
return remap$(v, {
|
|
138
|
+
requestBody: "RequestBody",
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @internal
|
|
144
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
145
|
+
*/
|
|
146
|
+
export namespace VerifyDocumentRequest$ {
|
|
147
|
+
/** @deprecated use `VerifyDocumentRequest$inboundSchema` instead. */
|
|
148
|
+
export const inboundSchema = VerifyDocumentRequest$inboundSchema;
|
|
149
|
+
/** @deprecated use `VerifyDocumentRequest$outboundSchema` instead. */
|
|
150
|
+
export const outboundSchema = VerifyDocumentRequest$outboundSchema;
|
|
151
|
+
/** @deprecated use `VerifyDocumentRequest$Outbound` instead. */
|
|
152
|
+
export type Outbound = VerifyDocumentRequest$Outbound;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function verifyDocumentRequestToJSON(
|
|
156
|
+
verifyDocumentRequest: VerifyDocumentRequest,
|
|
157
|
+
): string {
|
|
158
|
+
return JSON.stringify(
|
|
159
|
+
VerifyDocumentRequest$outboundSchema.parse(verifyDocumentRequest),
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function verifyDocumentRequestFromJSON(
|
|
164
|
+
jsonString: string,
|
|
165
|
+
): SafeParseResult<VerifyDocumentRequest, SDKValidationError> {
|
|
166
|
+
return safeParse(
|
|
167
|
+
jsonString,
|
|
168
|
+
(x) => VerifyDocumentRequest$inboundSchema.parse(JSON.parse(x)),
|
|
169
|
+
`Failed to parse 'VerifyDocumentRequest' from JSON`,
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export const Document$inboundSchema: z.ZodType<
|
|
175
|
+
Document,
|
|
176
|
+
z.ZodTypeDef,
|
|
177
|
+
unknown
|
|
178
|
+
> = z.union([
|
|
179
|
+
components.GstinDetail$inboundSchema,
|
|
180
|
+
components.PanDetail$inboundSchema,
|
|
181
|
+
]);
|
|
182
|
+
|
|
183
|
+
/** @internal */
|
|
184
|
+
export type Document$Outbound =
|
|
185
|
+
| components.GstinDetail$Outbound
|
|
186
|
+
| components.PanDetail$Outbound;
|
|
187
|
+
|
|
188
|
+
/** @internal */
|
|
189
|
+
export const Document$outboundSchema: z.ZodType<
|
|
190
|
+
Document$Outbound,
|
|
191
|
+
z.ZodTypeDef,
|
|
192
|
+
Document
|
|
193
|
+
> = z.union([
|
|
194
|
+
components.GstinDetail$outboundSchema,
|
|
195
|
+
components.PanDetail$outboundSchema,
|
|
196
|
+
]);
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @internal
|
|
200
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
201
|
+
*/
|
|
202
|
+
export namespace Document$ {
|
|
203
|
+
/** @deprecated use `Document$inboundSchema` instead. */
|
|
204
|
+
export const inboundSchema = Document$inboundSchema;
|
|
205
|
+
/** @deprecated use `Document$outboundSchema` instead. */
|
|
206
|
+
export const outboundSchema = Document$outboundSchema;
|
|
207
|
+
/** @deprecated use `Document$Outbound` instead. */
|
|
208
|
+
export type Outbound = Document$Outbound;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export function documentToJSON(document: Document): string {
|
|
212
|
+
return JSON.stringify(Document$outboundSchema.parse(document));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export function documentFromJSON(
|
|
216
|
+
jsonString: string,
|
|
217
|
+
): SafeParseResult<Document, SDKValidationError> {
|
|
218
|
+
return safeParse(
|
|
219
|
+
jsonString,
|
|
220
|
+
(x) => Document$inboundSchema.parse(JSON.parse(x)),
|
|
221
|
+
`Failed to parse 'Document' from JSON`,
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/** @internal */
|
|
226
|
+
export const VerifyDocumentContent$inboundSchema: z.ZodType<
|
|
227
|
+
VerifyDocumentContent,
|
|
228
|
+
z.ZodTypeDef,
|
|
229
|
+
unknown
|
|
230
|
+
> = z.object({
|
|
231
|
+
document: z.union([
|
|
232
|
+
components.GstinDetail$inboundSchema,
|
|
233
|
+
components.PanDetail$inboundSchema,
|
|
234
|
+
]).optional(),
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
/** @internal */
|
|
238
|
+
export type VerifyDocumentContent$Outbound = {
|
|
239
|
+
document?:
|
|
240
|
+
| components.GstinDetail$Outbound
|
|
241
|
+
| components.PanDetail$Outbound
|
|
242
|
+
| undefined;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
/** @internal */
|
|
246
|
+
export const VerifyDocumentContent$outboundSchema: z.ZodType<
|
|
247
|
+
VerifyDocumentContent$Outbound,
|
|
248
|
+
z.ZodTypeDef,
|
|
249
|
+
VerifyDocumentContent
|
|
250
|
+
> = z.object({
|
|
251
|
+
document: z.union([
|
|
252
|
+
components.GstinDetail$outboundSchema,
|
|
253
|
+
components.PanDetail$outboundSchema,
|
|
254
|
+
]).optional(),
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* @internal
|
|
259
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
260
|
+
*/
|
|
261
|
+
export namespace VerifyDocumentContent$ {
|
|
262
|
+
/** @deprecated use `VerifyDocumentContent$inboundSchema` instead. */
|
|
263
|
+
export const inboundSchema = VerifyDocumentContent$inboundSchema;
|
|
264
|
+
/** @deprecated use `VerifyDocumentContent$outboundSchema` instead. */
|
|
265
|
+
export const outboundSchema = VerifyDocumentContent$outboundSchema;
|
|
266
|
+
/** @deprecated use `VerifyDocumentContent$Outbound` instead. */
|
|
267
|
+
export type Outbound = VerifyDocumentContent$Outbound;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function verifyDocumentContentToJSON(
|
|
271
|
+
verifyDocumentContent: VerifyDocumentContent,
|
|
272
|
+
): string {
|
|
273
|
+
return JSON.stringify(
|
|
274
|
+
VerifyDocumentContent$outboundSchema.parse(verifyDocumentContent),
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export function verifyDocumentContentFromJSON(
|
|
279
|
+
jsonString: string,
|
|
280
|
+
): SafeParseResult<VerifyDocumentContent, SDKValidationError> {
|
|
281
|
+
return safeParse(
|
|
282
|
+
jsonString,
|
|
283
|
+
(x) => VerifyDocumentContent$inboundSchema.parse(JSON.parse(x)),
|
|
284
|
+
`Failed to parse 'VerifyDocumentContent' from JSON`,
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/** @internal */
|
|
289
|
+
export const VerifyDocumentResponseBody$inboundSchema: z.ZodType<
|
|
290
|
+
VerifyDocumentResponseBody,
|
|
291
|
+
z.ZodTypeDef,
|
|
292
|
+
unknown
|
|
293
|
+
> = z.object({
|
|
294
|
+
message: z.string().optional(),
|
|
295
|
+
success: z.boolean().optional(),
|
|
296
|
+
content: z.lazy(() => VerifyDocumentContent$inboundSchema).optional(),
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
/** @internal */
|
|
300
|
+
export type VerifyDocumentResponseBody$Outbound = {
|
|
301
|
+
message?: string | undefined;
|
|
302
|
+
success?: boolean | undefined;
|
|
303
|
+
content?: VerifyDocumentContent$Outbound | undefined;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
/** @internal */
|
|
307
|
+
export const VerifyDocumentResponseBody$outboundSchema: z.ZodType<
|
|
308
|
+
VerifyDocumentResponseBody$Outbound,
|
|
309
|
+
z.ZodTypeDef,
|
|
310
|
+
VerifyDocumentResponseBody
|
|
311
|
+
> = z.object({
|
|
312
|
+
message: z.string().optional(),
|
|
313
|
+
success: z.boolean().optional(),
|
|
314
|
+
content: z.lazy(() => VerifyDocumentContent$outboundSchema).optional(),
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* @internal
|
|
319
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
320
|
+
*/
|
|
321
|
+
export namespace VerifyDocumentResponseBody$ {
|
|
322
|
+
/** @deprecated use `VerifyDocumentResponseBody$inboundSchema` instead. */
|
|
323
|
+
export const inboundSchema = VerifyDocumentResponseBody$inboundSchema;
|
|
324
|
+
/** @deprecated use `VerifyDocumentResponseBody$outboundSchema` instead. */
|
|
325
|
+
export const outboundSchema = VerifyDocumentResponseBody$outboundSchema;
|
|
326
|
+
/** @deprecated use `VerifyDocumentResponseBody$Outbound` instead. */
|
|
327
|
+
export type Outbound = VerifyDocumentResponseBody$Outbound;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export function verifyDocumentResponseBodyToJSON(
|
|
331
|
+
verifyDocumentResponseBody: VerifyDocumentResponseBody,
|
|
332
|
+
): string {
|
|
333
|
+
return JSON.stringify(
|
|
334
|
+
VerifyDocumentResponseBody$outboundSchema.parse(verifyDocumentResponseBody),
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export function verifyDocumentResponseBodyFromJSON(
|
|
339
|
+
jsonString: string,
|
|
340
|
+
): SafeParseResult<VerifyDocumentResponseBody, SDKValidationError> {
|
|
341
|
+
return safeParse(
|
|
342
|
+
jsonString,
|
|
343
|
+
(x) => VerifyDocumentResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
344
|
+
`Failed to parse 'VerifyDocumentResponseBody' from JSON`,
|
|
345
|
+
);
|
|
346
|
+
}
|