ce-storefront 0.9.0 → 0.9.2
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 +2 -2
- package/bin/mcp-server.js +223 -172
- package/bin/mcp-server.js.map +25 -25
- package/docs/sdks/auth/README.md +4 -6
- package/docs/sdks/customers/README.md +2 -2
- package/docs/sdks/kyc/README.md +47 -28
- package/esm/funcs/kycCreateDocument.d.ts +2 -1
- package/esm/funcs/kycCreateDocument.d.ts.map +1 -1
- package/esm/funcs/kycCreateDocument.js +7 -3
- package/esm/funcs/kycCreateDocument.js.map +1 -1
- package/esm/funcs/kycDeleteDocument.d.ts +2 -1
- package/esm/funcs/kycDeleteDocument.d.ts.map +1 -1
- package/esm/funcs/kycDeleteDocument.js +6 -2
- package/esm/funcs/kycDeleteDocument.js.map +1 -1
- package/esm/funcs/kycGetDocument.d.ts +2 -1
- package/esm/funcs/kycGetDocument.d.ts.map +1 -1
- package/esm/funcs/kycGetDocument.js +6 -2
- package/esm/funcs/kycGetDocument.js.map +1 -1
- package/esm/funcs/kycListDocuments.d.ts +2 -1
- package/esm/funcs/kycListDocuments.d.ts.map +1 -1
- package/esm/funcs/kycListDocuments.js +6 -2
- package/esm/funcs/kycListDocuments.js.map +1 -1
- package/esm/funcs/{kycListDocumentType.d.ts → kycListKycDocument.d.ts} +5 -4
- package/esm/funcs/kycListKycDocument.d.ts.map +1 -0
- package/esm/funcs/{kycListDocumentType.js → kycListKycDocument.js} +12 -8
- package/esm/funcs/kycListKycDocument.js.map +1 -0
- package/esm/funcs/kycUpdateDocument.d.ts +2 -1
- package/esm/funcs/kycUpdateDocument.d.ts.map +1 -1
- package/esm/funcs/kycUpdateDocument.js +7 -3
- package/esm/funcs/kycUpdateDocument.js.map +1 -1
- package/esm/funcs/kycVerifyDocument.d.ts +2 -1
- package/esm/funcs/kycVerifyDocument.d.ts.map +1 -1
- package/esm/funcs/kycVerifyDocument.js +6 -2
- package/esm/funcs/kycVerifyDocument.js.map +1 -1
- 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/lib/matchers.d.ts +3 -1
- package/esm/lib/matchers.d.ts.map +1 -1
- package/esm/lib/matchers.js +10 -0
- package/esm/lib/matchers.js.map +1 -1
- package/esm/lib/sdks.js +7 -2
- package/esm/lib/sdks.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.js +3 -3
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/kycListKycDocument.d.ts +3 -0
- package/esm/mcp-server/tools/kycListKycDocument.d.ts.map +1 -0
- package/esm/mcp-server/tools/kycListKycDocument.js +23 -0
- package/esm/mcp-server/tools/kycListKycDocument.js.map +1 -0
- package/esm/models/components/document.d.ts +5 -0
- package/esm/models/components/document.d.ts.map +1 -1
- package/esm/models/components/document.js +6 -0
- package/esm/models/components/document.js.map +1 -1
- package/esm/models/components/documentinput.d.ts +2 -2
- package/esm/models/components/documentinput.d.ts.map +1 -1
- package/esm/models/components/documentinput.js +4 -4
- package/esm/models/components/documentinput.js.map +1 -1
- package/esm/models/components/index.d.ts +1 -1
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +1 -1
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/{documenttype.d.ts → kycdocument.d.ts} +37 -31
- package/esm/models/components/kycdocument.d.ts.map +1 -0
- package/esm/models/components/{documenttype.js → kycdocument.js} +36 -34
- package/esm/models/components/kycdocument.js.map +1 -0
- package/esm/models/components/updatedocument.d.ts +2 -2
- package/esm/models/components/updatedocument.d.ts.map +1 -1
- package/esm/models/components/updatedocument.js +4 -4
- package/esm/models/components/updatedocument.js.map +1 -1
- package/esm/models/components/user.d.ts +27 -22
- package/esm/models/components/user.d.ts.map +1 -1
- package/esm/models/components/user.js +26 -22
- package/esm/models/components/user.js.map +1 -1
- package/esm/models/operations/index.d.ts +1 -1
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +1 -1
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/listkycdocument.d.ts +64 -0
- package/esm/models/operations/listkycdocument.d.ts.map +1 -0
- package/esm/models/operations/listkycdocument.js +74 -0
- package/esm/models/operations/listkycdocument.js.map +1 -0
- package/esm/models/operations/verifyotp.d.ts +4 -4
- package/esm/models/operations/verifyotp.d.ts.map +1 -1
- package/esm/models/operations/verifyotp.js +4 -4
- package/esm/models/operations/verifyotp.js.map +1 -1
- package/esm/sdk/kyc.d.ts +3 -3
- package/esm/sdk/kyc.d.ts.map +1 -1
- package/esm/sdk/kyc.js +5 -5
- package/esm/sdk/kyc.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/funcs/kycCreateDocument.ts +20 -3
- package/src/funcs/kycDeleteDocument.ts +19 -2
- package/src/funcs/kycGetDocument.ts +19 -2
- package/src/funcs/kycListDocuments.ts +19 -2
- package/src/funcs/{kycListDocumentType.ts → kycListKycDocument.ts} +28 -11
- package/src/funcs/kycUpdateDocument.ts +20 -7
- package/src/funcs/kycVerifyDocument.ts +12 -3
- package/src/lib/config.ts +4 -4
- package/src/lib/matchers.ts +20 -0
- package/src/lib/sdks.ts +8 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -3
- package/src/mcp-server/tools/{kycListDocumentType.ts → kycListKycDocument.ts} +6 -6
- package/src/models/components/document.ts +8 -0
- package/src/models/components/documentinput.ts +6 -6
- package/src/models/components/index.ts +1 -1
- package/src/models/components/{documenttype.ts → kycdocument.ts} +53 -55
- package/src/models/components/updatedocument.ts +6 -6
- package/src/models/components/user.ts +53 -44
- package/src/models/operations/index.ts +1 -1
- package/src/models/operations/listkycdocument.ts +153 -0
- package/src/models/operations/verifyotp.ts +8 -8
- package/src/sdk/kyc.ts +6 -6
- package/esm/funcs/kycListDocumentType.d.ts.map +0 -1
- package/esm/funcs/kycListDocumentType.js.map +0 -1
- package/esm/mcp-server/tools/kycListDocumentType.d.ts +0 -3
- package/esm/mcp-server/tools/kycListDocumentType.d.ts.map +0 -1
- package/esm/mcp-server/tools/kycListDocumentType.js +0 -23
- package/esm/mcp-server/tools/kycListDocumentType.js.map +0 -1
- package/esm/models/components/documenttype.d.ts.map +0 -1
- package/esm/models/components/documenttype.js.map +0 -1
- package/esm/models/operations/listdocumenttype.d.ts +0 -62
- package/esm/models/operations/listdocumenttype.d.ts.map +0 -1
- package/esm/models/operations/listdocumenttype.js +0 -70
- package/esm/models/operations/listdocumenttype.js.map +0 -1
- package/src/models/operations/listdocumenttype.ts +0 -147
|
@@ -16,12 +16,12 @@ export type FileT = {
|
|
|
16
16
|
|
|
17
17
|
export type DocumentInput = {
|
|
18
18
|
documentNumber: string;
|
|
19
|
+
kycDocumentId: string;
|
|
19
20
|
note?: string | undefined;
|
|
20
21
|
/**
|
|
21
22
|
* file attachment will be required or optional as per store setting.
|
|
22
23
|
*/
|
|
23
24
|
file?: FileT | Blob | undefined;
|
|
24
|
-
documentTypeId: string;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
/** @internal */
|
|
@@ -91,22 +91,22 @@ export const DocumentInput$inboundSchema: z.ZodType<
|
|
|
91
91
|
unknown
|
|
92
92
|
> = z.object({
|
|
93
93
|
document_number: z.string(),
|
|
94
|
+
kyc_document_id: z.string(),
|
|
94
95
|
note: z.string().optional(),
|
|
95
96
|
file: z.lazy(() => FileT$inboundSchema).optional(),
|
|
96
|
-
document_type_id: z.string(),
|
|
97
97
|
}).transform((v) => {
|
|
98
98
|
return remap$(v, {
|
|
99
99
|
"document_number": "documentNumber",
|
|
100
|
-
"
|
|
100
|
+
"kyc_document_id": "kycDocumentId",
|
|
101
101
|
});
|
|
102
102
|
});
|
|
103
103
|
|
|
104
104
|
/** @internal */
|
|
105
105
|
export type DocumentInput$Outbound = {
|
|
106
106
|
document_number: string;
|
|
107
|
+
kyc_document_id: string;
|
|
107
108
|
note?: string | undefined;
|
|
108
109
|
file?: FileT$Outbound | Blob | undefined;
|
|
109
|
-
document_type_id: string;
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
/** @internal */
|
|
@@ -116,13 +116,13 @@ export const DocumentInput$outboundSchema: z.ZodType<
|
|
|
116
116
|
DocumentInput
|
|
117
117
|
> = z.object({
|
|
118
118
|
documentNumber: z.string(),
|
|
119
|
+
kycDocumentId: z.string(),
|
|
119
120
|
note: z.string().optional(),
|
|
120
121
|
file: z.lazy(() => FileT$outboundSchema).or(blobLikeSchema).optional(),
|
|
121
|
-
documentTypeId: z.string(),
|
|
122
122
|
}).transform((v) => {
|
|
123
123
|
return remap$(v, {
|
|
124
124
|
documentNumber: "document_number",
|
|
125
|
-
|
|
125
|
+
kycDocumentId: "kyc_document_id",
|
|
126
126
|
});
|
|
127
127
|
});
|
|
128
128
|
|
|
@@ -21,13 +21,13 @@ export * from "./dateattribute.js";
|
|
|
21
21
|
export * from "./discountbasedpromotion.js";
|
|
22
22
|
export * from "./document.js";
|
|
23
23
|
export * from "./documentinput.js";
|
|
24
|
-
export * from "./documenttype.js";
|
|
25
24
|
export * from "./fixedpricepromotion.js";
|
|
26
25
|
export * from "./freegoodspromotion.js";
|
|
27
26
|
export * from "./gstindetail.js";
|
|
28
27
|
export * from "./item.js";
|
|
29
28
|
export * from "./juspaypaymentgatewayparams.js";
|
|
30
29
|
export * from "./juspaypaymentinfo.js";
|
|
30
|
+
export * from "./kycdocument.js";
|
|
31
31
|
export * from "./multiselectattribute.js";
|
|
32
32
|
export * from "./netbankingpayment.js";
|
|
33
33
|
export * from "./notificationchannelpreferences.js";
|
|
@@ -9,14 +9,14 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
|
-
export const
|
|
12
|
+
export const DocumentType = {
|
|
13
13
|
Gst: "gst",
|
|
14
14
|
Pan: "pan",
|
|
15
|
+
Tin: "tin",
|
|
16
|
+
Cin: "cin",
|
|
15
17
|
Other: "other",
|
|
16
18
|
} as const;
|
|
17
|
-
export type
|
|
18
|
-
typeof DocumentTypeDocumentType
|
|
19
|
-
>;
|
|
19
|
+
export type DocumentType = ClosedEnum<typeof DocumentType>;
|
|
20
20
|
|
|
21
21
|
export const VerificationType = {
|
|
22
22
|
Auto: "auto",
|
|
@@ -24,36 +24,34 @@ export const VerificationType = {
|
|
|
24
24
|
} as const;
|
|
25
25
|
export type VerificationType = ClosedEnum<typeof VerificationType>;
|
|
26
26
|
|
|
27
|
-
export type
|
|
27
|
+
export type KycDocument = {
|
|
28
28
|
id?: string | undefined;
|
|
29
|
-
documentType
|
|
30
|
-
title
|
|
29
|
+
documentType?: DocumentType | undefined;
|
|
30
|
+
title?: string | undefined;
|
|
31
31
|
description?: string | null | undefined;
|
|
32
32
|
active?: boolean | undefined;
|
|
33
|
-
isMandatory
|
|
34
|
-
isAttachmentRequired
|
|
35
|
-
verificationType
|
|
33
|
+
isMandatory?: boolean | undefined;
|
|
34
|
+
isAttachmentRequired?: boolean | undefined;
|
|
35
|
+
verificationType?: VerificationType | undefined;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
/** @internal */
|
|
39
|
-
export const
|
|
40
|
-
|
|
41
|
-
> = z.nativeEnum(DocumentTypeDocumentType);
|
|
39
|
+
export const DocumentType$inboundSchema: z.ZodNativeEnum<typeof DocumentType> =
|
|
40
|
+
z.nativeEnum(DocumentType);
|
|
42
41
|
|
|
43
42
|
/** @internal */
|
|
44
|
-
export const
|
|
45
|
-
|
|
46
|
-
> = DocumentTypeDocumentType$inboundSchema;
|
|
43
|
+
export const DocumentType$outboundSchema: z.ZodNativeEnum<typeof DocumentType> =
|
|
44
|
+
DocumentType$inboundSchema;
|
|
47
45
|
|
|
48
46
|
/**
|
|
49
47
|
* @internal
|
|
50
48
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
49
|
*/
|
|
52
|
-
export namespace
|
|
53
|
-
/** @deprecated use `
|
|
54
|
-
export const inboundSchema =
|
|
55
|
-
/** @deprecated use `
|
|
56
|
-
export const outboundSchema =
|
|
50
|
+
export namespace DocumentType$ {
|
|
51
|
+
/** @deprecated use `DocumentType$inboundSchema` instead. */
|
|
52
|
+
export const inboundSchema = DocumentType$inboundSchema;
|
|
53
|
+
/** @deprecated use `DocumentType$outboundSchema` instead. */
|
|
54
|
+
export const outboundSchema = DocumentType$outboundSchema;
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
/** @internal */
|
|
@@ -78,19 +76,19 @@ export namespace VerificationType$ {
|
|
|
78
76
|
}
|
|
79
77
|
|
|
80
78
|
/** @internal */
|
|
81
|
-
export const
|
|
82
|
-
|
|
79
|
+
export const KycDocument$inboundSchema: z.ZodType<
|
|
80
|
+
KycDocument,
|
|
83
81
|
z.ZodTypeDef,
|
|
84
82
|
unknown
|
|
85
83
|
> = z.object({
|
|
86
84
|
id: z.string().optional(),
|
|
87
|
-
document_type:
|
|
88
|
-
title: z.string(),
|
|
85
|
+
document_type: DocumentType$inboundSchema.optional(),
|
|
86
|
+
title: z.string().optional(),
|
|
89
87
|
description: z.nullable(z.string()).optional(),
|
|
90
88
|
active: z.boolean().default(true),
|
|
91
|
-
is_mandatory: z.boolean(),
|
|
92
|
-
is_attachment_required: z.boolean(),
|
|
93
|
-
verification_type: VerificationType$inboundSchema,
|
|
89
|
+
is_mandatory: z.boolean().optional(),
|
|
90
|
+
is_attachment_required: z.boolean().optional(),
|
|
91
|
+
verification_type: VerificationType$inboundSchema.optional(),
|
|
94
92
|
}).transform((v) => {
|
|
95
93
|
return remap$(v, {
|
|
96
94
|
"document_type": "documentType",
|
|
@@ -101,31 +99,31 @@ export const DocumentType$inboundSchema: z.ZodType<
|
|
|
101
99
|
});
|
|
102
100
|
|
|
103
101
|
/** @internal */
|
|
104
|
-
export type
|
|
102
|
+
export type KycDocument$Outbound = {
|
|
105
103
|
id?: string | undefined;
|
|
106
|
-
document_type
|
|
107
|
-
title
|
|
104
|
+
document_type?: string | undefined;
|
|
105
|
+
title?: string | undefined;
|
|
108
106
|
description?: string | null | undefined;
|
|
109
107
|
active: boolean;
|
|
110
|
-
is_mandatory
|
|
111
|
-
is_attachment_required
|
|
112
|
-
verification_type
|
|
108
|
+
is_mandatory?: boolean | undefined;
|
|
109
|
+
is_attachment_required?: boolean | undefined;
|
|
110
|
+
verification_type?: string | undefined;
|
|
113
111
|
};
|
|
114
112
|
|
|
115
113
|
/** @internal */
|
|
116
|
-
export const
|
|
117
|
-
|
|
114
|
+
export const KycDocument$outboundSchema: z.ZodType<
|
|
115
|
+
KycDocument$Outbound,
|
|
118
116
|
z.ZodTypeDef,
|
|
119
|
-
|
|
117
|
+
KycDocument
|
|
120
118
|
> = z.object({
|
|
121
119
|
id: z.string().optional(),
|
|
122
|
-
documentType:
|
|
123
|
-
title: z.string(),
|
|
120
|
+
documentType: DocumentType$outboundSchema.optional(),
|
|
121
|
+
title: z.string().optional(),
|
|
124
122
|
description: z.nullable(z.string()).optional(),
|
|
125
123
|
active: z.boolean().default(true),
|
|
126
|
-
isMandatory: z.boolean(),
|
|
127
|
-
isAttachmentRequired: z.boolean(),
|
|
128
|
-
verificationType: VerificationType$outboundSchema,
|
|
124
|
+
isMandatory: z.boolean().optional(),
|
|
125
|
+
isAttachmentRequired: z.boolean().optional(),
|
|
126
|
+
verificationType: VerificationType$outboundSchema.optional(),
|
|
129
127
|
}).transform((v) => {
|
|
130
128
|
return remap$(v, {
|
|
131
129
|
documentType: "document_type",
|
|
@@ -139,25 +137,25 @@ export const DocumentType$outboundSchema: z.ZodType<
|
|
|
139
137
|
* @internal
|
|
140
138
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
141
139
|
*/
|
|
142
|
-
export namespace
|
|
143
|
-
/** @deprecated use `
|
|
144
|
-
export const inboundSchema =
|
|
145
|
-
/** @deprecated use `
|
|
146
|
-
export const outboundSchema =
|
|
147
|
-
/** @deprecated use `
|
|
148
|
-
export type Outbound =
|
|
140
|
+
export namespace KycDocument$ {
|
|
141
|
+
/** @deprecated use `KycDocument$inboundSchema` instead. */
|
|
142
|
+
export const inboundSchema = KycDocument$inboundSchema;
|
|
143
|
+
/** @deprecated use `KycDocument$outboundSchema` instead. */
|
|
144
|
+
export const outboundSchema = KycDocument$outboundSchema;
|
|
145
|
+
/** @deprecated use `KycDocument$Outbound` instead. */
|
|
146
|
+
export type Outbound = KycDocument$Outbound;
|
|
149
147
|
}
|
|
150
148
|
|
|
151
|
-
export function
|
|
152
|
-
return JSON.stringify(
|
|
149
|
+
export function kycDocumentToJSON(kycDocument: KycDocument): string {
|
|
150
|
+
return JSON.stringify(KycDocument$outboundSchema.parse(kycDocument));
|
|
153
151
|
}
|
|
154
152
|
|
|
155
|
-
export function
|
|
153
|
+
export function kycDocumentFromJSON(
|
|
156
154
|
jsonString: string,
|
|
157
|
-
): SafeParseResult<
|
|
155
|
+
): SafeParseResult<KycDocument, SDKValidationError> {
|
|
158
156
|
return safeParse(
|
|
159
157
|
jsonString,
|
|
160
|
-
(x) =>
|
|
161
|
-
`Failed to parse '
|
|
158
|
+
(x) => KycDocument$inboundSchema.parse(JSON.parse(x)),
|
|
159
|
+
`Failed to parse 'KycDocument' from JSON`,
|
|
162
160
|
);
|
|
163
161
|
}
|
|
@@ -16,7 +16,7 @@ export type UpdateDocumentFile = {
|
|
|
16
16
|
|
|
17
17
|
export type UpdateDocument = {
|
|
18
18
|
documentNumber: string;
|
|
19
|
-
|
|
19
|
+
kycDocumentId: string;
|
|
20
20
|
note?: string | undefined;
|
|
21
21
|
/**
|
|
22
22
|
* file attachment will be required or optional as per store setting.
|
|
@@ -99,14 +99,14 @@ export const UpdateDocument$inboundSchema: z.ZodType<
|
|
|
99
99
|
unknown
|
|
100
100
|
> = z.object({
|
|
101
101
|
document_number: z.string(),
|
|
102
|
-
|
|
102
|
+
kyc_document_id: z.string(),
|
|
103
103
|
note: z.string().optional(),
|
|
104
104
|
file: z.lazy(() => UpdateDocumentFile$inboundSchema).optional(),
|
|
105
105
|
modified_reason: z.string(),
|
|
106
106
|
}).transform((v) => {
|
|
107
107
|
return remap$(v, {
|
|
108
108
|
"document_number": "documentNumber",
|
|
109
|
-
"
|
|
109
|
+
"kyc_document_id": "kycDocumentId",
|
|
110
110
|
"modified_reason": "modifiedReason",
|
|
111
111
|
});
|
|
112
112
|
});
|
|
@@ -114,7 +114,7 @@ export const UpdateDocument$inboundSchema: z.ZodType<
|
|
|
114
114
|
/** @internal */
|
|
115
115
|
export type UpdateDocument$Outbound = {
|
|
116
116
|
document_number: string;
|
|
117
|
-
|
|
117
|
+
kyc_document_id: string;
|
|
118
118
|
note?: string | undefined;
|
|
119
119
|
file?: UpdateDocumentFile$Outbound | Blob | undefined;
|
|
120
120
|
modified_reason: string;
|
|
@@ -127,7 +127,7 @@ export const UpdateDocument$outboundSchema: z.ZodType<
|
|
|
127
127
|
UpdateDocument
|
|
128
128
|
> = z.object({
|
|
129
129
|
documentNumber: z.string(),
|
|
130
|
-
|
|
130
|
+
kycDocumentId: z.string(),
|
|
131
131
|
note: z.string().optional(),
|
|
132
132
|
file: z.lazy(() => UpdateDocumentFile$outboundSchema).or(blobLikeSchema)
|
|
133
133
|
.optional(),
|
|
@@ -135,7 +135,7 @@ export const UpdateDocument$outboundSchema: z.ZodType<
|
|
|
135
135
|
}).transform((v) => {
|
|
136
136
|
return remap$(v, {
|
|
137
137
|
documentNumber: "document_number",
|
|
138
|
-
|
|
138
|
+
kycDocumentId: "kyc_document_id",
|
|
139
139
|
modifiedReason: "modified_reason",
|
|
140
140
|
});
|
|
141
141
|
});
|
|
@@ -31,15 +31,15 @@ export type User = {
|
|
|
31
31
|
/**
|
|
32
32
|
* User’s first name.
|
|
33
33
|
*/
|
|
34
|
-
firstName: string;
|
|
34
|
+
firstName: string | null;
|
|
35
35
|
/**
|
|
36
36
|
* User’s last name.
|
|
37
37
|
*/
|
|
38
|
-
lastName: string;
|
|
38
|
+
lastName: string | null;
|
|
39
39
|
/**
|
|
40
40
|
* User’s email I’d.
|
|
41
41
|
*/
|
|
42
|
-
email: string;
|
|
42
|
+
email: string | null;
|
|
43
43
|
/**
|
|
44
44
|
* Boolean indicating whether the email is verified.
|
|
45
45
|
*/
|
|
@@ -47,14 +47,14 @@ export type User = {
|
|
|
47
47
|
/**
|
|
48
48
|
* 10 digit phone number without country code.
|
|
49
49
|
*/
|
|
50
|
-
phone: string;
|
|
50
|
+
phone: string | null;
|
|
51
51
|
/**
|
|
52
52
|
* Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.
|
|
53
53
|
*
|
|
54
54
|
* @remarks
|
|
55
55
|
* Use this key along with phone. Not necessary for email.
|
|
56
56
|
*/
|
|
57
|
-
countryCode: string;
|
|
57
|
+
countryCode: string | null;
|
|
58
58
|
/**
|
|
59
59
|
* Boolean indicating whether the phone is verified.
|
|
60
60
|
*/
|
|
@@ -62,7 +62,7 @@ export type User = {
|
|
|
62
62
|
/**
|
|
63
63
|
* URL to the user's profile image.
|
|
64
64
|
*/
|
|
65
|
-
profileImageUrl: string;
|
|
65
|
+
profileImageUrl: string | null;
|
|
66
66
|
/**
|
|
67
67
|
* Indicates whether the user is anonymous.
|
|
68
68
|
*/
|
|
@@ -90,26 +90,30 @@ export type UserInput = {
|
|
|
90
90
|
/**
|
|
91
91
|
* User’s first name.
|
|
92
92
|
*/
|
|
93
|
-
firstName: string;
|
|
93
|
+
firstName: string | null;
|
|
94
94
|
/**
|
|
95
95
|
* User’s last name.
|
|
96
96
|
*/
|
|
97
|
-
lastName: string;
|
|
97
|
+
lastName: string | null;
|
|
98
98
|
/**
|
|
99
99
|
* User’s email I’d.
|
|
100
100
|
*/
|
|
101
|
-
email: string;
|
|
101
|
+
email: string | null;
|
|
102
102
|
/**
|
|
103
103
|
* 10 digit phone number without country code.
|
|
104
104
|
*/
|
|
105
|
-
phone: string;
|
|
105
|
+
phone: string | null;
|
|
106
106
|
/**
|
|
107
107
|
* Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.
|
|
108
108
|
*
|
|
109
109
|
* @remarks
|
|
110
110
|
* Use this key along with phone. Not necessary for email.
|
|
111
111
|
*/
|
|
112
|
-
countryCode: string;
|
|
112
|
+
countryCode: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* URL to the user's profile image.
|
|
115
|
+
*/
|
|
116
|
+
profileImageUrl: string | null;
|
|
113
117
|
loginMethods: Array<LoginMethods>;
|
|
114
118
|
/**
|
|
115
119
|
* Set channel preferences for each type of
|
|
@@ -140,14 +144,14 @@ export namespace LoginMethods$ {
|
|
|
140
144
|
export const User$inboundSchema: z.ZodType<User, z.ZodTypeDef, unknown> = z
|
|
141
145
|
.object({
|
|
142
146
|
id: z.string(),
|
|
143
|
-
first_name: z.string(),
|
|
144
|
-
last_name: z.string(),
|
|
145
|
-
email: z.string(),
|
|
147
|
+
first_name: z.nullable(z.string()),
|
|
148
|
+
last_name: z.nullable(z.string()),
|
|
149
|
+
email: z.nullable(z.string()),
|
|
146
150
|
is_email_verified: z.boolean(),
|
|
147
|
-
phone: z.string(),
|
|
148
|
-
country_code: z.string(),
|
|
151
|
+
phone: z.nullable(z.string()),
|
|
152
|
+
country_code: z.nullable(z.string()),
|
|
149
153
|
is_phone_verified: z.boolean(),
|
|
150
|
-
profile_image_url: z.string(),
|
|
154
|
+
profile_image_url: z.nullable(z.string()),
|
|
151
155
|
is_anonymous: z.boolean(),
|
|
152
156
|
is_logged_in: z.boolean(),
|
|
153
157
|
login_methods: z.array(LoginMethods$inboundSchema),
|
|
@@ -174,14 +178,14 @@ export const User$inboundSchema: z.ZodType<User, z.ZodTypeDef, unknown> = z
|
|
|
174
178
|
/** @internal */
|
|
175
179
|
export type User$Outbound = {
|
|
176
180
|
id: string;
|
|
177
|
-
first_name: string;
|
|
178
|
-
last_name: string;
|
|
179
|
-
email: string;
|
|
181
|
+
first_name: string | null;
|
|
182
|
+
last_name: string | null;
|
|
183
|
+
email: string | null;
|
|
180
184
|
is_email_verified: boolean;
|
|
181
|
-
phone: string;
|
|
182
|
-
country_code: string;
|
|
185
|
+
phone: string | null;
|
|
186
|
+
country_code: string | null;
|
|
183
187
|
is_phone_verified: boolean;
|
|
184
|
-
profile_image_url: string;
|
|
188
|
+
profile_image_url: string | null;
|
|
185
189
|
is_anonymous: boolean;
|
|
186
190
|
is_logged_in: boolean;
|
|
187
191
|
login_methods: Array<string>;
|
|
@@ -194,14 +198,14 @@ export type User$Outbound = {
|
|
|
194
198
|
export const User$outboundSchema: z.ZodType<User$Outbound, z.ZodTypeDef, User> =
|
|
195
199
|
z.object({
|
|
196
200
|
id: z.string(),
|
|
197
|
-
firstName: z.string(),
|
|
198
|
-
lastName: z.string(),
|
|
199
|
-
email: z.string(),
|
|
201
|
+
firstName: z.nullable(z.string()),
|
|
202
|
+
lastName: z.nullable(z.string()),
|
|
203
|
+
email: z.nullable(z.string()),
|
|
200
204
|
isEmailVerified: z.boolean(),
|
|
201
|
-
phone: z.string(),
|
|
202
|
-
countryCode: z.string(),
|
|
205
|
+
phone: z.nullable(z.string()),
|
|
206
|
+
countryCode: z.nullable(z.string()),
|
|
203
207
|
isPhoneVerified: z.boolean(),
|
|
204
|
-
profileImageUrl: z.string(),
|
|
208
|
+
profileImageUrl: z.nullable(z.string()),
|
|
205
209
|
isAnonymous: z.boolean(),
|
|
206
210
|
isLoggedIn: z.boolean(),
|
|
207
211
|
loginMethods: z.array(LoginMethods$outboundSchema),
|
|
@@ -258,11 +262,12 @@ export const UserInput$inboundSchema: z.ZodType<
|
|
|
258
262
|
z.ZodTypeDef,
|
|
259
263
|
unknown
|
|
260
264
|
> = z.object({
|
|
261
|
-
first_name: z.string(),
|
|
262
|
-
last_name: z.string(),
|
|
263
|
-
email: z.string(),
|
|
264
|
-
phone: z.string(),
|
|
265
|
-
country_code: z.string(),
|
|
265
|
+
first_name: z.nullable(z.string()),
|
|
266
|
+
last_name: z.nullable(z.string()),
|
|
267
|
+
email: z.nullable(z.string()),
|
|
268
|
+
phone: z.nullable(z.string()),
|
|
269
|
+
country_code: z.nullable(z.string()),
|
|
270
|
+
profile_image_url: z.nullable(z.string()),
|
|
266
271
|
login_methods: z.array(LoginMethods$inboundSchema),
|
|
267
272
|
notification_preferences: NotificationPreferences$inboundSchema,
|
|
268
273
|
}).transform((v) => {
|
|
@@ -270,6 +275,7 @@ export const UserInput$inboundSchema: z.ZodType<
|
|
|
270
275
|
"first_name": "firstName",
|
|
271
276
|
"last_name": "lastName",
|
|
272
277
|
"country_code": "countryCode",
|
|
278
|
+
"profile_image_url": "profileImageUrl",
|
|
273
279
|
"login_methods": "loginMethods",
|
|
274
280
|
"notification_preferences": "notificationPreferences",
|
|
275
281
|
});
|
|
@@ -277,11 +283,12 @@ export const UserInput$inboundSchema: z.ZodType<
|
|
|
277
283
|
|
|
278
284
|
/** @internal */
|
|
279
285
|
export type UserInput$Outbound = {
|
|
280
|
-
first_name: string;
|
|
281
|
-
last_name: string;
|
|
282
|
-
email: string;
|
|
283
|
-
phone: string;
|
|
284
|
-
country_code: string;
|
|
286
|
+
first_name: string | null;
|
|
287
|
+
last_name: string | null;
|
|
288
|
+
email: string | null;
|
|
289
|
+
phone: string | null;
|
|
290
|
+
country_code: string | null;
|
|
291
|
+
profile_image_url: string | null;
|
|
285
292
|
login_methods: Array<string>;
|
|
286
293
|
notification_preferences: NotificationPreferences$Outbound;
|
|
287
294
|
};
|
|
@@ -292,11 +299,12 @@ export const UserInput$outboundSchema: z.ZodType<
|
|
|
292
299
|
z.ZodTypeDef,
|
|
293
300
|
UserInput
|
|
294
301
|
> = z.object({
|
|
295
|
-
firstName: z.string(),
|
|
296
|
-
lastName: z.string(),
|
|
297
|
-
email: z.string(),
|
|
298
|
-
phone: z.string(),
|
|
299
|
-
countryCode: z.string(),
|
|
302
|
+
firstName: z.nullable(z.string()),
|
|
303
|
+
lastName: z.nullable(z.string()),
|
|
304
|
+
email: z.nullable(z.string()),
|
|
305
|
+
phone: z.nullable(z.string()),
|
|
306
|
+
countryCode: z.nullable(z.string()),
|
|
307
|
+
profileImageUrl: z.nullable(z.string()),
|
|
300
308
|
loginMethods: z.array(LoginMethods$outboundSchema),
|
|
301
309
|
notificationPreferences: NotificationPreferences$outboundSchema,
|
|
302
310
|
}).transform((v) => {
|
|
@@ -304,6 +312,7 @@ export const UserInput$outboundSchema: z.ZodType<
|
|
|
304
312
|
firstName: "first_name",
|
|
305
313
|
lastName: "last_name",
|
|
306
314
|
countryCode: "country_code",
|
|
315
|
+
profileImageUrl: "profile_image_url",
|
|
307
316
|
loginMethods: "login_methods",
|
|
308
317
|
notificationPreferences: "notification_preferences",
|
|
309
318
|
});
|
|
@@ -33,7 +33,7 @@ export * from "./listcategories.js";
|
|
|
33
33
|
export * from "./listcountrypincodes.js";
|
|
34
34
|
export * from "./listcrosssellproducts.js";
|
|
35
35
|
export * from "./listdocuments.js";
|
|
36
|
-
export * from "./
|
|
36
|
+
export * from "./listkycdocument.js";
|
|
37
37
|
export * from "./listorders.js";
|
|
38
38
|
export * from "./listordershipments.js";
|
|
39
39
|
export * from "./listproductreviews.js";
|
|
@@ -0,0 +1,153 @@
|
|
|
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 ListKycDocumentContent = {
|
|
13
|
+
kycDocuments?: Array<components.KycDocument> | undefined;
|
|
14
|
+
isKycEnabled?: boolean | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* OK
|
|
19
|
+
*/
|
|
20
|
+
export type ListKycDocumentResponseBody = {
|
|
21
|
+
message?: string | undefined;
|
|
22
|
+
success?: boolean | undefined;
|
|
23
|
+
content?: ListKycDocumentContent | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const ListKycDocumentContent$inboundSchema: z.ZodType<
|
|
28
|
+
ListKycDocumentContent,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
kyc_documents: z.array(components.KycDocument$inboundSchema).optional(),
|
|
33
|
+
is_kyc_enabled: z.boolean().default(false),
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"kyc_documents": "kycDocuments",
|
|
37
|
+
"is_kyc_enabled": "isKycEnabled",
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export type ListKycDocumentContent$Outbound = {
|
|
43
|
+
kyc_documents?: Array<components.KycDocument$Outbound> | undefined;
|
|
44
|
+
is_kyc_enabled: boolean;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const ListKycDocumentContent$outboundSchema: z.ZodType<
|
|
49
|
+
ListKycDocumentContent$Outbound,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
ListKycDocumentContent
|
|
52
|
+
> = z.object({
|
|
53
|
+
kycDocuments: z.array(components.KycDocument$outboundSchema).optional(),
|
|
54
|
+
isKycEnabled: z.boolean().default(false),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
kycDocuments: "kyc_documents",
|
|
58
|
+
isKycEnabled: "is_kyc_enabled",
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
65
|
+
*/
|
|
66
|
+
export namespace ListKycDocumentContent$ {
|
|
67
|
+
/** @deprecated use `ListKycDocumentContent$inboundSchema` instead. */
|
|
68
|
+
export const inboundSchema = ListKycDocumentContent$inboundSchema;
|
|
69
|
+
/** @deprecated use `ListKycDocumentContent$outboundSchema` instead. */
|
|
70
|
+
export const outboundSchema = ListKycDocumentContent$outboundSchema;
|
|
71
|
+
/** @deprecated use `ListKycDocumentContent$Outbound` instead. */
|
|
72
|
+
export type Outbound = ListKycDocumentContent$Outbound;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function listKycDocumentContentToJSON(
|
|
76
|
+
listKycDocumentContent: ListKycDocumentContent,
|
|
77
|
+
): string {
|
|
78
|
+
return JSON.stringify(
|
|
79
|
+
ListKycDocumentContent$outboundSchema.parse(listKycDocumentContent),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function listKycDocumentContentFromJSON(
|
|
84
|
+
jsonString: string,
|
|
85
|
+
): SafeParseResult<ListKycDocumentContent, SDKValidationError> {
|
|
86
|
+
return safeParse(
|
|
87
|
+
jsonString,
|
|
88
|
+
(x) => ListKycDocumentContent$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'ListKycDocumentContent' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export const ListKycDocumentResponseBody$inboundSchema: z.ZodType<
|
|
95
|
+
ListKycDocumentResponseBody,
|
|
96
|
+
z.ZodTypeDef,
|
|
97
|
+
unknown
|
|
98
|
+
> = z.object({
|
|
99
|
+
message: z.string().optional(),
|
|
100
|
+
success: z.boolean().optional(),
|
|
101
|
+
content: z.lazy(() => ListKycDocumentContent$inboundSchema).optional(),
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
export type ListKycDocumentResponseBody$Outbound = {
|
|
106
|
+
message?: string | undefined;
|
|
107
|
+
success?: boolean | undefined;
|
|
108
|
+
content?: ListKycDocumentContent$Outbound | undefined;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export const ListKycDocumentResponseBody$outboundSchema: z.ZodType<
|
|
113
|
+
ListKycDocumentResponseBody$Outbound,
|
|
114
|
+
z.ZodTypeDef,
|
|
115
|
+
ListKycDocumentResponseBody
|
|
116
|
+
> = z.object({
|
|
117
|
+
message: z.string().optional(),
|
|
118
|
+
success: z.boolean().optional(),
|
|
119
|
+
content: z.lazy(() => ListKycDocumentContent$outboundSchema).optional(),
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @internal
|
|
124
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
125
|
+
*/
|
|
126
|
+
export namespace ListKycDocumentResponseBody$ {
|
|
127
|
+
/** @deprecated use `ListKycDocumentResponseBody$inboundSchema` instead. */
|
|
128
|
+
export const inboundSchema = ListKycDocumentResponseBody$inboundSchema;
|
|
129
|
+
/** @deprecated use `ListKycDocumentResponseBody$outboundSchema` instead. */
|
|
130
|
+
export const outboundSchema = ListKycDocumentResponseBody$outboundSchema;
|
|
131
|
+
/** @deprecated use `ListKycDocumentResponseBody$Outbound` instead. */
|
|
132
|
+
export type Outbound = ListKycDocumentResponseBody$Outbound;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function listKycDocumentResponseBodyToJSON(
|
|
136
|
+
listKycDocumentResponseBody: ListKycDocumentResponseBody,
|
|
137
|
+
): string {
|
|
138
|
+
return JSON.stringify(
|
|
139
|
+
ListKycDocumentResponseBody$outboundSchema.parse(
|
|
140
|
+
listKycDocumentResponseBody,
|
|
141
|
+
),
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function listKycDocumentResponseBodyFromJSON(
|
|
146
|
+
jsonString: string,
|
|
147
|
+
): SafeParseResult<ListKycDocumentResponseBody, SDKValidationError> {
|
|
148
|
+
return safeParse(
|
|
149
|
+
jsonString,
|
|
150
|
+
(x) => ListKycDocumentResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
151
|
+
`Failed to parse 'ListKycDocumentResponseBody' from JSON`,
|
|
152
|
+
);
|
|
153
|
+
}
|