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
package/src/sdk/sdk.ts CHANGED
@@ -9,7 +9,6 @@ import { Carts } from "./carts.js";
9
9
  import { Catalog } from "./catalog.js";
10
10
  import { Common } from "./common.js";
11
11
  import { Customers } from "./customers.js";
12
- import { Kyc } from "./kyc.js";
13
12
  import { Orders } from "./orders.js";
14
13
  import { Shipping } from "./shipping.js";
15
14
 
@@ -29,11 +28,6 @@ export class CeStorefront extends ClientSDK {
29
28
  return (this._customers ??= new Customers(this._options));
30
29
  }
31
30
 
32
- private _kyc?: Kyc;
33
- get kyc(): Kyc {
34
- return (this._kyc ??= new Kyc(this._options));
35
- }
36
-
37
31
  private _orders?: Orders;
38
32
  get orders(): Orders {
39
33
  return (this._orders ??= new Orders(this._options));
@@ -1,566 +0,0 @@
1
- # Kyc
2
- (*kyc*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [listKycDocument](#listkycdocument) - List all kyc documents
9
- * [listDocuments](#listdocuments) - List all documents
10
- * [createDocument](#createdocument) - Create document
11
- * [getDocument](#getdocument) - Retrieve document detail
12
- * [updateDocument](#updatedocument) - Update document detail
13
- * [deleteDocument](#deletedocument) - Delete document
14
- * [verifyDocument](#verifydocument) - Verify document
15
-
16
- ## listKycDocument
17
-
18
- List all kyc documents added for a particular store.
19
-
20
- ### Example Usage
21
-
22
- ```typescript
23
- import { CeStorefront } from "ce-storefront";
24
-
25
- const ceStorefront = new CeStorefront({
26
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
27
- });
28
-
29
- async function run() {
30
- const result = await ceStorefront.kyc.listKycDocument();
31
-
32
- // Handle the result
33
- console.log(result);
34
- }
35
-
36
- run();
37
- ```
38
-
39
- ### Standalone function
40
-
41
- The standalone function version of this method:
42
-
43
- ```typescript
44
- import { CeStorefrontCore } from "ce-storefront/core.js";
45
- import { kycListKycDocument } from "ce-storefront/funcs/kycListKycDocument.js";
46
-
47
- // Use `CeStorefrontCore` for best tree-shaking performance.
48
- // You can create one instance of it to use across an application.
49
- const ceStorefront = new CeStorefrontCore({
50
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
51
- });
52
-
53
- async function run() {
54
- const res = await kycListKycDocument(ceStorefront);
55
-
56
- if (!res.ok) {
57
- throw res.error;
58
- }
59
-
60
- const { value: result } = res;
61
-
62
- // Handle the result
63
- console.log(result);
64
- }
65
-
66
- run();
67
- ```
68
-
69
- ### Parameters
70
-
71
- | Parameter | Type | Required | Description |
72
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
73
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
74
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
75
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
76
-
77
- ### Response
78
-
79
- **Promise\<[operations.ListKycDocumentResponseBody](../../models/operations/listkycdocumentresponsebody.md)\>**
80
-
81
- ### Errors
82
-
83
- | Error Type | Status Code | Content Type |
84
- | ------------------- | ------------------- | ------------------- |
85
- | errors.BadRequest | 400 | application/json |
86
- | errors.Unauthorized | 401 | application/json |
87
- | errors.NotFound | 404 | application/json |
88
- | errors.CeError | 4XX, 5XX | \*/\* |
89
-
90
- ## listDocuments
91
-
92
- List all documents added by a particular customer.
93
-
94
- ### Example Usage
95
-
96
- ```typescript
97
- import { CeStorefront } from "ce-storefront";
98
-
99
- const ceStorefront = new CeStorefront({
100
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
101
- });
102
-
103
- async function run() {
104
- const result = await ceStorefront.kyc.listDocuments({
105
- id: "<id>",
106
- });
107
-
108
- // Handle the result
109
- console.log(result);
110
- }
111
-
112
- run();
113
- ```
114
-
115
- ### Standalone function
116
-
117
- The standalone function version of this method:
118
-
119
- ```typescript
120
- import { CeStorefrontCore } from "ce-storefront/core.js";
121
- import { kycListDocuments } from "ce-storefront/funcs/kycListDocuments.js";
122
-
123
- // Use `CeStorefrontCore` for best tree-shaking performance.
124
- // You can create one instance of it to use across an application.
125
- const ceStorefront = new CeStorefrontCore({
126
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
127
- });
128
-
129
- async function run() {
130
- const res = await kycListDocuments(ceStorefront, {
131
- id: "<id>",
132
- });
133
-
134
- if (!res.ok) {
135
- throw res.error;
136
- }
137
-
138
- const { value: result } = res;
139
-
140
- // Handle the result
141
- console.log(result);
142
- }
143
-
144
- run();
145
- ```
146
-
147
- ### Parameters
148
-
149
- | Parameter | Type | Required | Description |
150
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
151
- | `request` | [operations.ListDocumentsRequest](../../models/operations/listdocumentsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
152
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
153
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
154
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
155
-
156
- ### Response
157
-
158
- **Promise\<[operations.ListDocumentsResponseBody](../../models/operations/listdocumentsresponsebody.md)\>**
159
-
160
- ### Errors
161
-
162
- | Error Type | Status Code | Content Type |
163
- | ------------------- | ------------------- | ------------------- |
164
- | errors.BadRequest | 400 | application/json |
165
- | errors.Unauthorized | 401 | application/json |
166
- | errors.NotFound | 404 | application/json |
167
- | errors.CeError | 4XX, 5XX | \*/\* |
168
-
169
- ## createDocument
170
-
171
- Create document
172
-
173
- ### Example Usage
174
-
175
- ```typescript
176
- import { CeStorefront } from "ce-storefront";
177
-
178
- const ceStorefront = new CeStorefront({
179
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
180
- });
181
-
182
- async function run() {
183
- const result = await ceStorefront.kyc.createDocument({
184
- id: "<id>",
185
- });
186
-
187
- // Handle the result
188
- console.log(result);
189
- }
190
-
191
- run();
192
- ```
193
-
194
- ### Standalone function
195
-
196
- The standalone function version of this method:
197
-
198
- ```typescript
199
- import { CeStorefrontCore } from "ce-storefront/core.js";
200
- import { kycCreateDocument } from "ce-storefront/funcs/kycCreateDocument.js";
201
-
202
- // Use `CeStorefrontCore` for best tree-shaking performance.
203
- // You can create one instance of it to use across an application.
204
- const ceStorefront = new CeStorefrontCore({
205
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
206
- });
207
-
208
- async function run() {
209
- const res = await kycCreateDocument(ceStorefront, {
210
- id: "<id>",
211
- });
212
-
213
- if (!res.ok) {
214
- throw res.error;
215
- }
216
-
217
- const { value: result } = res;
218
-
219
- // Handle the result
220
- console.log(result);
221
- }
222
-
223
- run();
224
- ```
225
-
226
- ### Parameters
227
-
228
- | Parameter | Type | Required | Description |
229
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
230
- | `request` | [operations.CreateDocumentRequest](../../models/operations/createdocumentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
231
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
232
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
233
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
234
-
235
- ### Response
236
-
237
- **Promise\<[operations.CreateDocumentResponseBody](../../models/operations/createdocumentresponsebody.md)\>**
238
-
239
- ### Errors
240
-
241
- | Error Type | Status Code | Content Type |
242
- | ------------------- | ------------------- | ------------------- |
243
- | errors.BadRequest | 400 | application/json |
244
- | errors.Unauthorized | 401 | application/json |
245
- | errors.NotFound | 404 | application/json |
246
- | errors.CeError | 4XX, 5XX | \*/\* |
247
-
248
- ## getDocument
249
-
250
- Retrieve document detail
251
-
252
- ### Example Usage
253
-
254
- ```typescript
255
- import { CeStorefront } from "ce-storefront";
256
-
257
- const ceStorefront = new CeStorefront({
258
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
259
- });
260
-
261
- async function run() {
262
- const result = await ceStorefront.kyc.getDocument({
263
- id: "<id>",
264
- documentId: "<id>",
265
- });
266
-
267
- // Handle the result
268
- console.log(result);
269
- }
270
-
271
- run();
272
- ```
273
-
274
- ### Standalone function
275
-
276
- The standalone function version of this method:
277
-
278
- ```typescript
279
- import { CeStorefrontCore } from "ce-storefront/core.js";
280
- import { kycGetDocument } from "ce-storefront/funcs/kycGetDocument.js";
281
-
282
- // Use `CeStorefrontCore` for best tree-shaking performance.
283
- // You can create one instance of it to use across an application.
284
- const ceStorefront = new CeStorefrontCore({
285
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
286
- });
287
-
288
- async function run() {
289
- const res = await kycGetDocument(ceStorefront, {
290
- id: "<id>",
291
- documentId: "<id>",
292
- });
293
-
294
- if (!res.ok) {
295
- throw res.error;
296
- }
297
-
298
- const { value: result } = res;
299
-
300
- // Handle the result
301
- console.log(result);
302
- }
303
-
304
- run();
305
- ```
306
-
307
- ### Parameters
308
-
309
- | Parameter | Type | Required | Description |
310
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
311
- | `request` | [operations.GetDocumentRequest](../../models/operations/getdocumentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
312
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
313
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
314
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
315
-
316
- ### Response
317
-
318
- **Promise\<[operations.GetDocumentResponseBody](../../models/operations/getdocumentresponsebody.md)\>**
319
-
320
- ### Errors
321
-
322
- | Error Type | Status Code | Content Type |
323
- | ------------------- | ------------------- | ------------------- |
324
- | errors.BadRequest | 400 | application/json |
325
- | errors.Unauthorized | 401 | application/json |
326
- | errors.NotFound | 404 | application/json |
327
- | errors.CeError | 4XX, 5XX | \*/\* |
328
-
329
- ## updateDocument
330
-
331
- Update document detail
332
-
333
- ### Example Usage
334
-
335
- ```typescript
336
- import { CeStorefront } from "ce-storefront";
337
-
338
- const ceStorefront = new CeStorefront({
339
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
340
- });
341
-
342
- async function run() {
343
- const result = await ceStorefront.kyc.updateDocument({
344
- id: "<id>",
345
- documentId: "<id>",
346
- });
347
-
348
- // Handle the result
349
- console.log(result);
350
- }
351
-
352
- run();
353
- ```
354
-
355
- ### Standalone function
356
-
357
- The standalone function version of this method:
358
-
359
- ```typescript
360
- import { CeStorefrontCore } from "ce-storefront/core.js";
361
- import { kycUpdateDocument } from "ce-storefront/funcs/kycUpdateDocument.js";
362
-
363
- // Use `CeStorefrontCore` for best tree-shaking performance.
364
- // You can create one instance of it to use across an application.
365
- const ceStorefront = new CeStorefrontCore({
366
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
367
- });
368
-
369
- async function run() {
370
- const res = await kycUpdateDocument(ceStorefront, {
371
- id: "<id>",
372
- documentId: "<id>",
373
- });
374
-
375
- if (!res.ok) {
376
- throw res.error;
377
- }
378
-
379
- const { value: result } = res;
380
-
381
- // Handle the result
382
- console.log(result);
383
- }
384
-
385
- run();
386
- ```
387
-
388
- ### Parameters
389
-
390
- | Parameter | Type | Required | Description |
391
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
392
- | `request` | [operations.UpdateDocumentRequest](../../models/operations/updatedocumentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
393
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
394
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
395
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
396
-
397
- ### Response
398
-
399
- **Promise\<[operations.UpdateDocumentResponseBody](../../models/operations/updatedocumentresponsebody.md)\>**
400
-
401
- ### Errors
402
-
403
- | Error Type | Status Code | Content Type |
404
- | ------------------- | ------------------- | ------------------- |
405
- | errors.BadRequest | 400 | application/json |
406
- | errors.Unauthorized | 401 | application/json |
407
- | errors.NotFound | 404 | application/json |
408
- | errors.CeError | 4XX, 5XX | \*/\* |
409
-
410
- ## deleteDocument
411
-
412
- Delete document
413
-
414
- ### Example Usage
415
-
416
- ```typescript
417
- import { CeStorefront } from "ce-storefront";
418
-
419
- const ceStorefront = new CeStorefront({
420
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
421
- });
422
-
423
- async function run() {
424
- const result = await ceStorefront.kyc.deleteDocument({
425
- id: "<id>",
426
- documentId: "<id>",
427
- });
428
-
429
- // Handle the result
430
- console.log(result);
431
- }
432
-
433
- run();
434
- ```
435
-
436
- ### Standalone function
437
-
438
- The standalone function version of this method:
439
-
440
- ```typescript
441
- import { CeStorefrontCore } from "ce-storefront/core.js";
442
- import { kycDeleteDocument } from "ce-storefront/funcs/kycDeleteDocument.js";
443
-
444
- // Use `CeStorefrontCore` for best tree-shaking performance.
445
- // You can create one instance of it to use across an application.
446
- const ceStorefront = new CeStorefrontCore({
447
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
448
- });
449
-
450
- async function run() {
451
- const res = await kycDeleteDocument(ceStorefront, {
452
- id: "<id>",
453
- documentId: "<id>",
454
- });
455
-
456
- if (!res.ok) {
457
- throw res.error;
458
- }
459
-
460
- const { value: result } = res;
461
-
462
- // Handle the result
463
- console.log(result);
464
- }
465
-
466
- run();
467
- ```
468
-
469
- ### Parameters
470
-
471
- | Parameter | Type | Required | Description |
472
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
473
- | `request` | [operations.DeleteDocumentRequest](../../models/operations/deletedocumentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
474
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
475
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
476
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
477
-
478
- ### Response
479
-
480
- **Promise\<[operations.DeleteDocumentResponseBody](../../models/operations/deletedocumentresponsebody.md)\>**
481
-
482
- ### Errors
483
-
484
- | Error Type | Status Code | Content Type |
485
- | ------------------- | ------------------- | ------------------- |
486
- | errors.BadRequest | 400 | application/json |
487
- | errors.Unauthorized | 401 | application/json |
488
- | errors.NotFound | 404 | application/json |
489
- | errors.CeError | 4XX, 5XX | \*/\* |
490
-
491
- ## verifyDocument
492
-
493
- Verify document number before saving.
494
-
495
- ### Example Usage
496
-
497
- ```typescript
498
- import { CeStorefront } from "ce-storefront";
499
-
500
- const ceStorefront = new CeStorefront({
501
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
502
- });
503
-
504
- async function run() {
505
- const result = await ceStorefront.kyc.verifyDocument({
506
- id: "<id>",
507
- });
508
-
509
- // Handle the result
510
- console.log(result);
511
- }
512
-
513
- run();
514
- ```
515
-
516
- ### Standalone function
517
-
518
- The standalone function version of this method:
519
-
520
- ```typescript
521
- import { CeStorefrontCore } from "ce-storefront/core.js";
522
- import { kycVerifyDocument } from "ce-storefront/funcs/kycVerifyDocument.js";
523
-
524
- // Use `CeStorefrontCore` for best tree-shaking performance.
525
- // You can create one instance of it to use across an application.
526
- const ceStorefront = new CeStorefrontCore({
527
- authorization: "<YOUR_BEARER_TOKEN_HERE>",
528
- });
529
-
530
- async function run() {
531
- const res = await kycVerifyDocument(ceStorefront, {
532
- id: "<id>",
533
- });
534
-
535
- if (!res.ok) {
536
- throw res.error;
537
- }
538
-
539
- const { value: result } = res;
540
-
541
- // Handle the result
542
- console.log(result);
543
- }
544
-
545
- run();
546
- ```
547
-
548
- ### Parameters
549
-
550
- | Parameter | Type | Required | Description |
551
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
552
- | `request` | [operations.VerifyDocumentRequest](../../models/operations/verifydocumentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
553
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
554
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
555
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
556
-
557
- ### Response
558
-
559
- **Promise\<[operations.VerifyDocumentResponseBody](../../models/operations/verifydocumentresponsebody.md)\>**
560
-
561
- ### Errors
562
-
563
- | Error Type | Status Code | Content Type |
564
- | ----------------- | ----------------- | ----------------- |
565
- | errors.BadRequest | 400 | application/json |
566
- | errors.CeError | 4XX, 5XX | \*/\* |
@@ -1,16 +0,0 @@
1
- import { CeStorefrontCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import { CeError } from "../models/errors/ceerror.js";
4
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
5
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
6
- import * as operations from "../models/operations/index.js";
7
- import { APIPromise } from "../types/async.js";
8
- import { Result } from "../types/fp.js";
9
- /**
10
- * Retrieve all addresses
11
- *
12
- * @remarks
13
- * Retrieve billing and shipping address of particular customer
14
- */
15
- export declare function customersListAddresses(client: CeStorefrontCore, request: operations.ListAddressesRequest, options?: RequestOptions): APIPromise<Result<operations.ListAddressesResponseBody, CeError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
16
- //# sourceMappingURL=customersListAddresses.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"customersListAddresses.d.ts","sourceRoot":"","sources":["../../src/funcs/customersListAddresses.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAK9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,yBAAyB,EAClC,OAAO,GACP,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAMA"}