ce-storefront 0.9.2 → 0.10.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.
Files changed (254) hide show
  1. package/README.md +6 -55
  2. package/bin/mcp-server.js +763 -2034
  3. package/bin/mcp-server.js.map +22 -45
  4. package/docs/sdks/carts/README.md +164 -0
  5. package/docs/sdks/customers/README.md +79 -77
  6. package/esm/funcs/{kycCreateDocument.d.ts → cartsRedeemLoyaltyPoints.d.ts} +4 -4
  7. package/esm/funcs/cartsRedeemLoyaltyPoints.d.ts.map +1 -0
  8. package/esm/funcs/{kycVerifyDocument.js → cartsRedeemLoyaltyPoints.js} +9 -9
  9. package/esm/funcs/cartsRedeemLoyaltyPoints.js.map +1 -0
  10. package/esm/funcs/{kycListDocuments.d.ts → cartsRemoveLoyaltyPoints.d.ts} +4 -4
  11. package/esm/funcs/cartsRemoveLoyaltyPoints.d.ts.map +1 -0
  12. package/esm/funcs/{kycListDocuments.js → cartsRemoveLoyaltyPoints.js} +9 -9
  13. package/esm/funcs/cartsRemoveLoyaltyPoints.js.map +1 -0
  14. package/esm/funcs/{kycListKycDocument.d.ts → customersGetLoyaltyDetails.d.ts} +4 -4
  15. package/esm/funcs/customersGetLoyaltyDetails.d.ts.map +1 -0
  16. package/esm/funcs/{kycGetDocument.js → customersGetLoyaltyDetails.js} +10 -14
  17. package/esm/funcs/customersGetLoyaltyDetails.js.map +1 -0
  18. package/esm/lib/config.d.ts +4 -4
  19. package/esm/lib/config.js +4 -4
  20. package/esm/lib/config.js.map +1 -1
  21. package/esm/mcp-server/mcp-server.js +1 -1
  22. package/esm/mcp-server/mcp-server.js.map +1 -1
  23. package/esm/mcp-server/server.d.ts.map +1 -1
  24. package/esm/mcp-server/server.js +7 -17
  25. package/esm/mcp-server/server.js.map +1 -1
  26. package/esm/mcp-server/tools/cartsRedeemLoyaltyPoints.d.ts +8 -0
  27. package/esm/mcp-server/tools/cartsRedeemLoyaltyPoints.d.ts.map +1 -0
  28. package/esm/mcp-server/tools/{kycListDocuments.js → cartsRedeemLoyaltyPoints.js} +8 -8
  29. package/esm/mcp-server/tools/cartsRedeemLoyaltyPoints.js.map +1 -0
  30. package/esm/mcp-server/tools/cartsRemoveLoyaltyPoints.d.ts +8 -0
  31. package/esm/mcp-server/tools/cartsRemoveLoyaltyPoints.d.ts.map +1 -0
  32. package/esm/mcp-server/tools/{kycGetDocument.js → cartsRemoveLoyaltyPoints.js} +8 -8
  33. package/esm/mcp-server/tools/cartsRemoveLoyaltyPoints.js.map +1 -0
  34. package/esm/mcp-server/tools/customersGetLoyaltyDetails.d.ts +8 -0
  35. package/esm/mcp-server/tools/customersGetLoyaltyDetails.d.ts.map +1 -0
  36. package/esm/mcp-server/tools/{kycCreateDocument.js → customersGetLoyaltyDetails.js} +8 -8
  37. package/esm/mcp-server/tools/customersGetLoyaltyDetails.js.map +1 -0
  38. package/esm/models/components/customerloyalty.d.ts +41 -0
  39. package/esm/models/components/customerloyalty.d.ts.map +1 -0
  40. package/esm/models/components/customerloyalty.js +64 -0
  41. package/esm/models/components/customerloyalty.js.map +1 -0
  42. package/esm/models/components/index.d.ts +1 -6
  43. package/esm/models/components/index.d.ts.map +1 -1
  44. package/esm/models/components/index.js +1 -6
  45. package/esm/models/components/index.js.map +1 -1
  46. package/esm/models/operations/createorder.d.ts +14 -14
  47. package/esm/models/operations/createorder.d.ts.map +1 -1
  48. package/esm/models/operations/createorder.js +12 -12
  49. package/esm/models/operations/createorder.js.map +1 -1
  50. package/esm/models/operations/getaddressdetail.d.ts +15 -15
  51. package/esm/models/operations/getaddressdetail.d.ts.map +1 -1
  52. package/esm/models/operations/getaddressdetail.js +15 -17
  53. package/esm/models/operations/getaddressdetail.js.map +1 -1
  54. package/esm/models/operations/getloyaltydetails.d.ts +92 -0
  55. package/esm/models/operations/getloyaltydetails.d.ts.map +1 -0
  56. package/esm/models/operations/getloyaltydetails.js +105 -0
  57. package/esm/models/operations/getloyaltydetails.js.map +1 -0
  58. package/esm/models/operations/getorderdetail.d.ts +6 -6
  59. package/esm/models/operations/getorderdetail.d.ts.map +1 -1
  60. package/esm/models/operations/getorderdetail.js +6 -6
  61. package/esm/models/operations/getorderdetail.js.map +1 -1
  62. package/esm/models/operations/index.d.ts +3 -8
  63. package/esm/models/operations/index.d.ts.map +1 -1
  64. package/esm/models/operations/index.js +3 -8
  65. package/esm/models/operations/index.js.map +1 -1
  66. package/esm/models/operations/redeemloyaltypoints.d.ts +120 -0
  67. package/esm/models/operations/redeemloyaltypoints.d.ts.map +1 -0
  68. package/esm/models/operations/redeemloyaltypoints.js +130 -0
  69. package/esm/models/operations/redeemloyaltypoints.js.map +1 -0
  70. package/esm/models/operations/removeloyaltypoints.d.ts +93 -0
  71. package/esm/models/operations/removeloyaltypoints.d.ts.map +1 -0
  72. package/esm/models/operations/removeloyaltypoints.js +86 -0
  73. package/esm/models/operations/removeloyaltypoints.js.map +1 -0
  74. package/esm/models/operations/retryorderpayment.d.ts +14 -12
  75. package/esm/models/operations/retryorderpayment.d.ts.map +1 -1
  76. package/esm/models/operations/retryorderpayment.js +12 -10
  77. package/esm/models/operations/retryorderpayment.js.map +1 -1
  78. package/esm/sdk/carts.d.ts +14 -0
  79. package/esm/sdk/carts.d.ts.map +1 -1
  80. package/esm/sdk/carts.js +20 -0
  81. package/esm/sdk/carts.js.map +1 -1
  82. package/esm/sdk/customers.d.ts +7 -7
  83. package/esm/sdk/customers.d.ts.map +1 -1
  84. package/esm/sdk/customers.js +10 -10
  85. package/esm/sdk/customers.js.map +1 -1
  86. package/esm/sdk/sdk.d.ts +0 -3
  87. package/esm/sdk/sdk.d.ts.map +1 -1
  88. package/esm/sdk/sdk.js +0 -4
  89. package/esm/sdk/sdk.js.map +1 -1
  90. package/jsr.json +1 -1
  91. package/package.json +1 -1
  92. package/src/funcs/{kycVerifyDocument.ts → cartsRedeemLoyaltyPoints.ts} +19 -14
  93. package/src/funcs/{kycListDocuments.ts → cartsRemoveLoyaltyPoints.ts} +15 -18
  94. package/src/funcs/{kycGetDocument.ts → customersGetLoyaltyDetails.ts} +14 -24
  95. package/src/lib/config.ts +4 -4
  96. package/src/mcp-server/mcp-server.ts +1 -1
  97. package/src/mcp-server/server.ts +7 -17
  98. package/src/mcp-server/tools/{kycListDocuments.ts → cartsRedeemLoyaltyPoints.ts} +7 -7
  99. package/src/mcp-server/tools/{kycDeleteDocument.ts → cartsRemoveLoyaltyPoints.ts} +7 -7
  100. package/src/mcp-server/tools/{kycCreateDocument.ts → customersGetLoyaltyDetails.ts} +7 -7
  101. package/src/models/components/customerloyalty.ts +109 -0
  102. package/src/models/components/index.ts +1 -6
  103. package/src/models/operations/createorder.ts +26 -28
  104. package/src/models/operations/getaddressdetail.ts +57 -66
  105. package/src/models/operations/getloyaltydetails.ts +220 -0
  106. package/src/models/operations/getorderdetail.ts +12 -12
  107. package/src/models/operations/index.ts +3 -8
  108. package/src/models/operations/redeemloyaltypoints.ts +283 -0
  109. package/src/models/operations/removeloyaltypoints.ts +202 -0
  110. package/src/models/operations/retryorderpayment.ts +26 -24
  111. package/src/sdk/carts.ts +36 -0
  112. package/src/sdk/customers.ts +18 -18
  113. package/src/sdk/sdk.ts +0 -6
  114. package/docs/sdks/kyc/README.md +0 -566
  115. package/esm/funcs/customersListAddresses.d.ts +0 -16
  116. package/esm/funcs/customersListAddresses.d.ts.map +0 -1
  117. package/esm/funcs/customersListAddresses.js +0 -86
  118. package/esm/funcs/customersListAddresses.js.map +0 -1
  119. package/esm/funcs/kycCreateDocument.d.ts.map +0 -1
  120. package/esm/funcs/kycCreateDocument.js +0 -110
  121. package/esm/funcs/kycCreateDocument.js.map +0 -1
  122. package/esm/funcs/kycDeleteDocument.d.ts +0 -17
  123. package/esm/funcs/kycDeleteDocument.d.ts.map +0 -1
  124. package/esm/funcs/kycDeleteDocument.js +0 -89
  125. package/esm/funcs/kycDeleteDocument.js.map +0 -1
  126. package/esm/funcs/kycGetDocument.d.ts +0 -17
  127. package/esm/funcs/kycGetDocument.d.ts.map +0 -1
  128. package/esm/funcs/kycGetDocument.js.map +0 -1
  129. package/esm/funcs/kycListDocuments.d.ts.map +0 -1
  130. package/esm/funcs/kycListDocuments.js.map +0 -1
  131. package/esm/funcs/kycListKycDocument.d.ts.map +0 -1
  132. package/esm/funcs/kycListKycDocument.js +0 -70
  133. package/esm/funcs/kycListKycDocument.js.map +0 -1
  134. package/esm/funcs/kycUpdateDocument.d.ts +0 -17
  135. package/esm/funcs/kycUpdateDocument.d.ts.map +0 -1
  136. package/esm/funcs/kycUpdateDocument.js +0 -115
  137. package/esm/funcs/kycUpdateDocument.js.map +0 -1
  138. package/esm/funcs/kycVerifyDocument.d.ts +0 -17
  139. package/esm/funcs/kycVerifyDocument.d.ts.map +0 -1
  140. package/esm/funcs/kycVerifyDocument.js.map +0 -1
  141. package/esm/mcp-server/tools/customersListAddresses.d.ts +0 -8
  142. package/esm/mcp-server/tools/customersListAddresses.d.ts.map +0 -1
  143. package/esm/mcp-server/tools/customersListAddresses.js +0 -28
  144. package/esm/mcp-server/tools/customersListAddresses.js.map +0 -1
  145. package/esm/mcp-server/tools/kycCreateDocument.d.ts +0 -8
  146. package/esm/mcp-server/tools/kycCreateDocument.d.ts.map +0 -1
  147. package/esm/mcp-server/tools/kycCreateDocument.js.map +0 -1
  148. package/esm/mcp-server/tools/kycDeleteDocument.d.ts +0 -8
  149. package/esm/mcp-server/tools/kycDeleteDocument.d.ts.map +0 -1
  150. package/esm/mcp-server/tools/kycDeleteDocument.js +0 -28
  151. package/esm/mcp-server/tools/kycDeleteDocument.js.map +0 -1
  152. package/esm/mcp-server/tools/kycGetDocument.d.ts +0 -8
  153. package/esm/mcp-server/tools/kycGetDocument.d.ts.map +0 -1
  154. package/esm/mcp-server/tools/kycGetDocument.js.map +0 -1
  155. package/esm/mcp-server/tools/kycListDocuments.d.ts +0 -8
  156. package/esm/mcp-server/tools/kycListDocuments.d.ts.map +0 -1
  157. package/esm/mcp-server/tools/kycListDocuments.js.map +0 -1
  158. package/esm/mcp-server/tools/kycListKycDocument.d.ts +0 -3
  159. package/esm/mcp-server/tools/kycListKycDocument.d.ts.map +0 -1
  160. package/esm/mcp-server/tools/kycListKycDocument.js +0 -23
  161. package/esm/mcp-server/tools/kycListKycDocument.js.map +0 -1
  162. package/esm/mcp-server/tools/kycUpdateDocument.d.ts +0 -8
  163. package/esm/mcp-server/tools/kycUpdateDocument.d.ts.map +0 -1
  164. package/esm/mcp-server/tools/kycUpdateDocument.js +0 -28
  165. package/esm/mcp-server/tools/kycUpdateDocument.js.map +0 -1
  166. package/esm/mcp-server/tools/kycVerifyDocument.d.ts +0 -8
  167. package/esm/mcp-server/tools/kycVerifyDocument.d.ts.map +0 -1
  168. package/esm/mcp-server/tools/kycVerifyDocument.js +0 -28
  169. package/esm/mcp-server/tools/kycVerifyDocument.js.map +0 -1
  170. package/esm/models/components/document.d.ts +0 -164
  171. package/esm/models/components/document.d.ts.map +0 -1
  172. package/esm/models/components/document.js +0 -172
  173. package/esm/models/components/document.js.map +0 -1
  174. package/esm/models/components/documentinput.d.ts +0 -65
  175. package/esm/models/components/documentinput.d.ts.map +0 -1
  176. package/esm/models/components/documentinput.js +0 -87
  177. package/esm/models/components/documentinput.js.map +0 -1
  178. package/esm/models/components/gstindetail.d.ts +0 -29
  179. package/esm/models/components/gstindetail.d.ts.map +0 -1
  180. package/esm/models/components/gstindetail.js +0 -31
  181. package/esm/models/components/gstindetail.js.map +0 -1
  182. package/esm/models/components/kycdocument.d.ts +0 -103
  183. package/esm/models/components/kycdocument.d.ts.map +0 -1
  184. package/esm/models/components/kycdocument.js +0 -101
  185. package/esm/models/components/kycdocument.js.map +0 -1
  186. package/esm/models/components/pandetail.d.ts +0 -29
  187. package/esm/models/components/pandetail.d.ts.map +0 -1
  188. package/esm/models/components/pandetail.js +0 -31
  189. package/esm/models/components/pandetail.js.map +0 -1
  190. package/esm/models/components/updatedocument.d.ts +0 -67
  191. package/esm/models/components/updatedocument.d.ts.map +0 -1
  192. package/esm/models/components/updatedocument.js +0 -91
  193. package/esm/models/components/updatedocument.js.map +0 -1
  194. package/esm/models/operations/createdocument.d.ts +0 -92
  195. package/esm/models/operations/createdocument.d.ts.map +0 -1
  196. package/esm/models/operations/createdocument.js +0 -97
  197. package/esm/models/operations/createdocument.js.map +0 -1
  198. package/esm/models/operations/deletedocument.d.ts +0 -67
  199. package/esm/models/operations/deletedocument.d.ts.map +0 -1
  200. package/esm/models/operations/deletedocument.js +0 -69
  201. package/esm/models/operations/deletedocument.js.map +0 -1
  202. package/esm/models/operations/getdocument.d.ts +0 -95
  203. package/esm/models/operations/getdocument.d.ts.map +0 -1
  204. package/esm/models/operations/getdocument.js +0 -97
  205. package/esm/models/operations/getdocument.js.map +0 -1
  206. package/esm/models/operations/listaddresses.d.ts +0 -183
  207. package/esm/models/operations/listaddresses.d.ts.map +0 -1
  208. package/esm/models/operations/listaddresses.js +0 -190
  209. package/esm/models/operations/listaddresses.js.map +0 -1
  210. package/esm/models/operations/listdocuments.d.ts +0 -90
  211. package/esm/models/operations/listdocuments.d.ts.map +0 -1
  212. package/esm/models/operations/listdocuments.js +0 -86
  213. package/esm/models/operations/listdocuments.js.map +0 -1
  214. package/esm/models/operations/listkycdocument.d.ts +0 -64
  215. package/esm/models/operations/listkycdocument.d.ts.map +0 -1
  216. package/esm/models/operations/listkycdocument.js +0 -74
  217. package/esm/models/operations/listkycdocument.js.map +0 -1
  218. package/esm/models/operations/updatedocument.d.ts +0 -97
  219. package/esm/models/operations/updatedocument.d.ts.map +0 -1
  220. package/esm/models/operations/updatedocument.js +0 -101
  221. package/esm/models/operations/updatedocument.js.map +0 -1
  222. package/esm/models/operations/verifydocument.d.ts +0 -140
  223. package/esm/models/operations/verifydocument.d.ts.map +0 -1
  224. package/esm/models/operations/verifydocument.js +0 -168
  225. package/esm/models/operations/verifydocument.js.map +0 -1
  226. package/esm/sdk/kyc.d.ts +0 -54
  227. package/esm/sdk/kyc.d.ts.map +0 -1
  228. package/esm/sdk/kyc.js +0 -78
  229. package/esm/sdk/kyc.js.map +0 -1
  230. package/src/funcs/customersListAddresses.ts +0 -166
  231. package/src/funcs/kycCreateDocument.ts +0 -207
  232. package/src/funcs/kycDeleteDocument.ts +0 -183
  233. package/src/funcs/kycListKycDocument.ts +0 -153
  234. package/src/funcs/kycUpdateDocument.ts +0 -214
  235. package/src/mcp-server/tools/customersListAddresses.ts +0 -37
  236. package/src/mcp-server/tools/kycGetDocument.ts +0 -37
  237. package/src/mcp-server/tools/kycListKycDocument.ts +0 -30
  238. package/src/mcp-server/tools/kycUpdateDocument.ts +0 -37
  239. package/src/mcp-server/tools/kycVerifyDocument.ts +0 -37
  240. package/src/models/components/document.ts +0 -260
  241. package/src/models/components/documentinput.ts +0 -154
  242. package/src/models/components/gstindetail.ts +0 -62
  243. package/src/models/components/kycdocument.ts +0 -161
  244. package/src/models/components/pandetail.ts +0 -62
  245. package/src/models/components/updatedocument.ts +0 -168
  246. package/src/models/operations/createdocument.ts +0 -210
  247. package/src/models/operations/deletedocument.ts +0 -150
  248. package/src/models/operations/getdocument.ts +0 -213
  249. package/src/models/operations/listaddresses.ts +0 -395
  250. package/src/models/operations/listdocuments.ts +0 -197
  251. package/src/models/operations/listkycdocument.ts +0 -153
  252. package/src/models/operations/updatedocument.ts +0 -219
  253. package/src/models/operations/verifydocument.ts +0 -346
  254. package/src/sdk/kyc.ts +0 -133
@@ -1,154 +0,0 @@
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 FileT = {
13
- fileName: string;
14
- content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
15
- };
16
-
17
- export type DocumentInput = {
18
- documentNumber: string;
19
- kycDocumentId: string;
20
- note?: string | undefined;
21
- /**
22
- * file attachment will be required or optional as per store setting.
23
- */
24
- file?: FileT | Blob | undefined;
25
- };
26
-
27
- /** @internal */
28
- export const FileT$inboundSchema: z.ZodType<FileT, z.ZodTypeDef, unknown> = z
29
- .object({
30
- fileName: z.string(),
31
- content: z.union([
32
- z.instanceof(ReadableStream<Uint8Array>),
33
- z.instanceof(Blob),
34
- z.instanceof(ArrayBuffer),
35
- z.instanceof(Uint8Array),
36
- ]),
37
- });
38
-
39
- /** @internal */
40
- export type FileT$Outbound = {
41
- fileName: string;
42
- content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
43
- };
44
-
45
- /** @internal */
46
- export const FileT$outboundSchema: z.ZodType<
47
- FileT$Outbound,
48
- z.ZodTypeDef,
49
- FileT
50
- > = z.object({
51
- fileName: z.string(),
52
- content: z.union([
53
- z.instanceof(ReadableStream<Uint8Array>),
54
- z.instanceof(Blob),
55
- z.instanceof(ArrayBuffer),
56
- z.instanceof(Uint8Array),
57
- ]),
58
- });
59
-
60
- /**
61
- * @internal
62
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
63
- */
64
- export namespace FileT$ {
65
- /** @deprecated use `FileT$inboundSchema` instead. */
66
- export const inboundSchema = FileT$inboundSchema;
67
- /** @deprecated use `FileT$outboundSchema` instead. */
68
- export const outboundSchema = FileT$outboundSchema;
69
- /** @deprecated use `FileT$Outbound` instead. */
70
- export type Outbound = FileT$Outbound;
71
- }
72
-
73
- export function fileToJSON(fileT: FileT): string {
74
- return JSON.stringify(FileT$outboundSchema.parse(fileT));
75
- }
76
-
77
- export function fileFromJSON(
78
- jsonString: string,
79
- ): SafeParseResult<FileT, SDKValidationError> {
80
- return safeParse(
81
- jsonString,
82
- (x) => FileT$inboundSchema.parse(JSON.parse(x)),
83
- `Failed to parse 'FileT' from JSON`,
84
- );
85
- }
86
-
87
- /** @internal */
88
- export const DocumentInput$inboundSchema: z.ZodType<
89
- DocumentInput,
90
- z.ZodTypeDef,
91
- unknown
92
- > = z.object({
93
- document_number: z.string(),
94
- kyc_document_id: z.string(),
95
- note: z.string().optional(),
96
- file: z.lazy(() => FileT$inboundSchema).optional(),
97
- }).transform((v) => {
98
- return remap$(v, {
99
- "document_number": "documentNumber",
100
- "kyc_document_id": "kycDocumentId",
101
- });
102
- });
103
-
104
- /** @internal */
105
- export type DocumentInput$Outbound = {
106
- document_number: string;
107
- kyc_document_id: string;
108
- note?: string | undefined;
109
- file?: FileT$Outbound | Blob | undefined;
110
- };
111
-
112
- /** @internal */
113
- export const DocumentInput$outboundSchema: z.ZodType<
114
- DocumentInput$Outbound,
115
- z.ZodTypeDef,
116
- DocumentInput
117
- > = z.object({
118
- documentNumber: z.string(),
119
- kycDocumentId: z.string(),
120
- note: z.string().optional(),
121
- file: z.lazy(() => FileT$outboundSchema).or(blobLikeSchema).optional(),
122
- }).transform((v) => {
123
- return remap$(v, {
124
- documentNumber: "document_number",
125
- kycDocumentId: "kyc_document_id",
126
- });
127
- });
128
-
129
- /**
130
- * @internal
131
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
132
- */
133
- export namespace DocumentInput$ {
134
- /** @deprecated use `DocumentInput$inboundSchema` instead. */
135
- export const inboundSchema = DocumentInput$inboundSchema;
136
- /** @deprecated use `DocumentInput$outboundSchema` instead. */
137
- export const outboundSchema = DocumentInput$outboundSchema;
138
- /** @deprecated use `DocumentInput$Outbound` instead. */
139
- export type Outbound = DocumentInput$Outbound;
140
- }
141
-
142
- export function documentInputToJSON(documentInput: DocumentInput): string {
143
- return JSON.stringify(DocumentInput$outboundSchema.parse(documentInput));
144
- }
145
-
146
- export function documentInputFromJSON(
147
- jsonString: string,
148
- ): SafeParseResult<DocumentInput, SDKValidationError> {
149
- return safeParse(
150
- jsonString,
151
- (x) => DocumentInput$inboundSchema.parse(JSON.parse(x)),
152
- `Failed to parse 'DocumentInput' from JSON`,
153
- );
154
- }
@@ -1,62 +0,0 @@
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
- }
@@ -1,161 +0,0 @@
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 DocumentType = {
13
- Gst: "gst",
14
- Pan: "pan",
15
- Tin: "tin",
16
- Cin: "cin",
17
- Other: "other",
18
- } as const;
19
- export type DocumentType = ClosedEnum<typeof DocumentType>;
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 KycDocument = {
28
- id?: string | undefined;
29
- documentType?: DocumentType | undefined;
30
- title?: string | undefined;
31
- description?: string | null | undefined;
32
- active?: boolean | undefined;
33
- isMandatory?: boolean | undefined;
34
- isAttachmentRequired?: boolean | undefined;
35
- verificationType?: VerificationType | undefined;
36
- };
37
-
38
- /** @internal */
39
- export const DocumentType$inboundSchema: z.ZodNativeEnum<typeof DocumentType> =
40
- z.nativeEnum(DocumentType);
41
-
42
- /** @internal */
43
- export const DocumentType$outboundSchema: z.ZodNativeEnum<typeof DocumentType> =
44
- DocumentType$inboundSchema;
45
-
46
- /**
47
- * @internal
48
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
49
- */
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;
55
- }
56
-
57
- /** @internal */
58
- export const VerificationType$inboundSchema: z.ZodNativeEnum<
59
- typeof VerificationType
60
- > = z.nativeEnum(VerificationType);
61
-
62
- /** @internal */
63
- export const VerificationType$outboundSchema: z.ZodNativeEnum<
64
- typeof VerificationType
65
- > = VerificationType$inboundSchema;
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 VerificationType$ {
72
- /** @deprecated use `VerificationType$inboundSchema` instead. */
73
- export const inboundSchema = VerificationType$inboundSchema;
74
- /** @deprecated use `VerificationType$outboundSchema` instead. */
75
- export const outboundSchema = VerificationType$outboundSchema;
76
- }
77
-
78
- /** @internal */
79
- export const KycDocument$inboundSchema: z.ZodType<
80
- KycDocument,
81
- z.ZodTypeDef,
82
- unknown
83
- > = z.object({
84
- id: z.string().optional(),
85
- document_type: DocumentType$inboundSchema.optional(),
86
- title: z.string().optional(),
87
- description: z.nullable(z.string()).optional(),
88
- active: z.boolean().default(true),
89
- is_mandatory: z.boolean().optional(),
90
- is_attachment_required: z.boolean().optional(),
91
- verification_type: VerificationType$inboundSchema.optional(),
92
- }).transform((v) => {
93
- return remap$(v, {
94
- "document_type": "documentType",
95
- "is_mandatory": "isMandatory",
96
- "is_attachment_required": "isAttachmentRequired",
97
- "verification_type": "verificationType",
98
- });
99
- });
100
-
101
- /** @internal */
102
- export type KycDocument$Outbound = {
103
- id?: string | undefined;
104
- document_type?: string | undefined;
105
- title?: string | undefined;
106
- description?: string | null | undefined;
107
- active: boolean;
108
- is_mandatory?: boolean | undefined;
109
- is_attachment_required?: boolean | undefined;
110
- verification_type?: string | undefined;
111
- };
112
-
113
- /** @internal */
114
- export const KycDocument$outboundSchema: z.ZodType<
115
- KycDocument$Outbound,
116
- z.ZodTypeDef,
117
- KycDocument
118
- > = z.object({
119
- id: z.string().optional(),
120
- documentType: DocumentType$outboundSchema.optional(),
121
- title: z.string().optional(),
122
- description: z.nullable(z.string()).optional(),
123
- active: z.boolean().default(true),
124
- isMandatory: z.boolean().optional(),
125
- isAttachmentRequired: z.boolean().optional(),
126
- verificationType: VerificationType$outboundSchema.optional(),
127
- }).transform((v) => {
128
- return remap$(v, {
129
- documentType: "document_type",
130
- isMandatory: "is_mandatory",
131
- isAttachmentRequired: "is_attachment_required",
132
- verificationType: "verification_type",
133
- });
134
- });
135
-
136
- /**
137
- * @internal
138
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
139
- */
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;
147
- }
148
-
149
- export function kycDocumentToJSON(kycDocument: KycDocument): string {
150
- return JSON.stringify(KycDocument$outboundSchema.parse(kycDocument));
151
- }
152
-
153
- export function kycDocumentFromJSON(
154
- jsonString: string,
155
- ): SafeParseResult<KycDocument, SDKValidationError> {
156
- return safeParse(
157
- jsonString,
158
- (x) => KycDocument$inboundSchema.parse(JSON.parse(x)),
159
- `Failed to parse 'KycDocument' from JSON`,
160
- );
161
- }
@@ -1,62 +0,0 @@
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
- }
@@ -1,168 +0,0 @@
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
- kycDocumentId: 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
- kyc_document_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
- "kyc_document_id": "kycDocumentId",
110
- "modified_reason": "modifiedReason",
111
- });
112
- });
113
-
114
- /** @internal */
115
- export type UpdateDocument$Outbound = {
116
- document_number: string;
117
- kyc_document_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
- kycDocumentId: 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
- kycDocumentId: "kyc_document_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
- }