@gofynd/fdk-client-javascript 0.1.35

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 (277) hide show
  1. package/.github/workflows/on_create_release.yml +23 -0
  2. package/.github/workflows/on_merge_main.yml +38 -0
  3. package/.github/workflows/on_pull_request.yml +35 -0
  4. package/.prettierrc +5 -0
  5. package/LICENSE +21 -0
  6. package/README.md +118 -0
  7. package/application.d.ts +3 -0
  8. package/application.js +6 -0
  9. package/common.d.ts +4 -0
  10. package/common.js +9 -0
  11. package/documentation/application/CART.md +7290 -0
  12. package/documentation/application/CATALOG.md +9570 -0
  13. package/documentation/application/COMMON.md +448 -0
  14. package/documentation/application/COMMUNICATION.md +463 -0
  15. package/documentation/application/CONFIGURATION.md +2902 -0
  16. package/documentation/application/CONTENT.md +3350 -0
  17. package/documentation/application/FILESTORAGE.md +491 -0
  18. package/documentation/application/LEAD.md +1891 -0
  19. package/documentation/application/LOGISTIC.md +439 -0
  20. package/documentation/application/ORDER.md +3428 -0
  21. package/documentation/application/PAYMENT.md +5035 -0
  22. package/documentation/application/POSCART.md +7889 -0
  23. package/documentation/application/README.md +21 -0
  24. package/documentation/application/REWARDS.md +714 -0
  25. package/documentation/application/SHARE.md +729 -0
  26. package/documentation/application/THEME.md +5796 -0
  27. package/documentation/application/USER.md +4326 -0
  28. package/documentation/platform/ANALYTICS.md +1150 -0
  29. package/documentation/platform/AUDITTRAIL.md +572 -0
  30. package/documentation/platform/BILLING.md +2396 -0
  31. package/documentation/platform/CART.md +5539 -0
  32. package/documentation/platform/CATALOG.md +21624 -0
  33. package/documentation/platform/COMMON.md +448 -0
  34. package/documentation/platform/COMMUNICATION.md +5714 -0
  35. package/documentation/platform/COMPANYPROFILE.md +2141 -0
  36. package/documentation/platform/CONFIGURATION.md +7335 -0
  37. package/documentation/platform/CONTENT.md +8989 -0
  38. package/documentation/platform/DISCOUNT.md +773 -0
  39. package/documentation/platform/FILESTORAGE.md +994 -0
  40. package/documentation/platform/INVENTORY.md +1775 -0
  41. package/documentation/platform/LEAD.md +4736 -0
  42. package/documentation/platform/ORDER.md +3764 -0
  43. package/documentation/platform/PARTNER.md +216 -0
  44. package/documentation/platform/PAYMENT.md +3444 -0
  45. package/documentation/platform/README.md +27 -0
  46. package/documentation/platform/REWARDS.md +871 -0
  47. package/documentation/platform/SHARE.md +602 -0
  48. package/documentation/platform/THEME.md +35725 -0
  49. package/documentation/platform/USER.md +2305 -0
  50. package/documentation/platform/WEBHOOK.md +587 -0
  51. package/documentation/public/CONFIGURATION.md +448 -0
  52. package/documentation/public/INVENTORY.md +686 -0
  53. package/documentation/public/WEBHOOK.md +348 -0
  54. package/index.d.ts +10 -0
  55. package/index.js +18 -0
  56. package/jest.config.d.ts +4 -0
  57. package/jest.config.js +6 -0
  58. package/package.json +35 -0
  59. package/platform.d.ts +3 -0
  60. package/platform.js +6 -0
  61. package/public.d.ts +3 -0
  62. package/public.js +6 -0
  63. package/sdk/application/ApplicationAPIClient.d.ts +11 -0
  64. package/sdk/application/ApplicationAPIClient.js +44 -0
  65. package/sdk/application/ApplicationClient.d.ts +40 -0
  66. package/sdk/application/ApplicationClient.js +84 -0
  67. package/sdk/application/ApplicationConfig.d.ts +19 -0
  68. package/sdk/application/ApplicationConfig.js +55 -0
  69. package/sdk/application/ApplicationModels.d.ts +826 -0
  70. package/sdk/application/ApplicationModels.js +10474 -0
  71. package/sdk/application/client/CartApplicationClient.d.ts +432 -0
  72. package/sdk/application/client/CartApplicationClient.js +1066 -0
  73. package/sdk/application/client/CatalogApplicationClient.d.ts +694 -0
  74. package/sdk/application/client/CatalogApplicationClient.js +1629 -0
  75. package/sdk/application/client/CommonApplicationClient.d.ts +38 -0
  76. package/sdk/application/client/CommonApplicationClient.js +105 -0
  77. package/sdk/application/client/CommunicationApplicationClient.d.ts +39 -0
  78. package/sdk/application/client/CommunicationApplicationClient.js +131 -0
  79. package/sdk/application/client/ConfigurationApplicationClient.d.ts +210 -0
  80. package/sdk/application/client/ConfigurationApplicationClient.js +649 -0
  81. package/sdk/application/client/ContentApplicationClient.d.ts +256 -0
  82. package/sdk/application/client/ContentApplicationClient.js +785 -0
  83. package/sdk/application/client/FileStorageApplicationClient.d.ts +88 -0
  84. package/sdk/application/client/FileStorageApplicationClient.js +214 -0
  85. package/sdk/application/client/LeadApplicationClient.d.ts +90 -0
  86. package/sdk/application/client/LeadApplicationClient.js +264 -0
  87. package/sdk/application/client/LogisticApplicationClient.d.ts +42 -0
  88. package/sdk/application/client/LogisticApplicationClient.js +128 -0
  89. package/sdk/application/client/OrderApplicationClient.d.ts +190 -0
  90. package/sdk/application/client/OrderApplicationClient.js +479 -0
  91. package/sdk/application/client/PaymentApplicationClient.d.ts +454 -0
  92. package/sdk/application/client/PaymentApplicationClient.js +1378 -0
  93. package/sdk/application/client/PosCartApplicationClient.d.ts +449 -0
  94. package/sdk/application/client/PosCartApplicationClient.js +1123 -0
  95. package/sdk/application/client/RewardsApplicationClient.d.ts +93 -0
  96. package/sdk/application/client/RewardsApplicationClient.js +293 -0
  97. package/sdk/application/client/ShareApplicationClient.d.ts +87 -0
  98. package/sdk/application/client/ShareApplicationClient.js +268 -0
  99. package/sdk/application/client/ThemeApplicationClient.d.ts +52 -0
  100. package/sdk/application/client/ThemeApplicationClient.js +161 -0
  101. package/sdk/application/client/UserApplicationClient.d.ts +446 -0
  102. package/sdk/application/client/UserApplicationClient.js +1275 -0
  103. package/sdk/application/constructUrl.d.ts +5 -0
  104. package/sdk/application/constructUrl.js +13 -0
  105. package/sdk/application/index.d.ts +2 -0
  106. package/sdk/application/index.js +4 -0
  107. package/sdk/application/models/CartValidator.d.ts +29 -0
  108. package/sdk/application/models/CartValidator.js +223 -0
  109. package/sdk/application/models/CatalogValidator.d.ts +33 -0
  110. package/sdk/application/models/CatalogValidator.js +233 -0
  111. package/sdk/application/models/CommonValidator.d.ts +5 -0
  112. package/sdk/application/models/CommonValidator.js +18 -0
  113. package/sdk/application/models/CommunicationValidator.d.ts +6 -0
  114. package/sdk/application/models/CommunicationValidator.js +20 -0
  115. package/sdk/application/models/ConfigurationValidator.d.ts +19 -0
  116. package/sdk/application/models/ConfigurationValidator.js +88 -0
  117. package/sdk/application/models/ContentValidator.d.ts +22 -0
  118. package/sdk/application/models/ContentValidator.js +106 -0
  119. package/sdk/application/models/FileStorageValidator.d.ts +6 -0
  120. package/sdk/application/models/FileStorageValidator.js +24 -0
  121. package/sdk/application/models/LeadValidator.d.ts +10 -0
  122. package/sdk/application/models/LeadValidator.js +48 -0
  123. package/sdk/application/models/LogisticValidator.d.ts +6 -0
  124. package/sdk/application/models/LogisticValidator.js +22 -0
  125. package/sdk/application/models/OrderValidator.d.ts +15 -0
  126. package/sdk/application/models/OrderValidator.js +87 -0
  127. package/sdk/application/models/PaymentValidator.d.ts +40 -0
  128. package/sdk/application/models/PaymentValidator.js +235 -0
  129. package/sdk/application/models/PosCartValidator.d.ts +30 -0
  130. package/sdk/application/models/PosCartValidator.js +232 -0
  131. package/sdk/application/models/RewardsValidator.d.ts +10 -0
  132. package/sdk/application/models/RewardsValidator.js +43 -0
  133. package/sdk/application/models/ShareValidator.d.ts +10 -0
  134. package/sdk/application/models/ShareValidator.js +44 -0
  135. package/sdk/application/models/ThemeValidator.d.ts +7 -0
  136. package/sdk/application/models/ThemeValidator.js +27 -0
  137. package/sdk/application/models/UserValidator.d.ts +38 -0
  138. package/sdk/application/models/UserValidator.js +233 -0
  139. package/sdk/common/AxiosHelper.d.ts +1 -0
  140. package/sdk/common/AxiosHelper.js +141 -0
  141. package/sdk/common/Constant.d.ts +294 -0
  142. package/sdk/common/Constant.js +332 -0
  143. package/sdk/common/FDKError.d.ts +26 -0
  144. package/sdk/common/FDKError.js +51 -0
  145. package/sdk/common/Logger.d.ts +2 -0
  146. package/sdk/common/Logger.js +85 -0
  147. package/sdk/common/Paginator.d.ts +16 -0
  148. package/sdk/common/Paginator.js +26 -0
  149. package/sdk/common/RequestSigner.d.ts +1 -0
  150. package/sdk/common/RequestSigner.js +306 -0
  151. package/sdk/common/Utility.d.ts +9 -0
  152. package/sdk/common/Utility.js +86 -0
  153. package/sdk/common/utils.d.ts +14 -0
  154. package/sdk/common/utils.js +165 -0
  155. package/sdk/platform/OAuthClient.d.ts +26 -0
  156. package/sdk/platform/OAuthClient.js +221 -0
  157. package/sdk/platform/PlatformAPIClient.d.ts +12 -0
  158. package/sdk/platform/PlatformAPIClient.js +43 -0
  159. package/sdk/platform/PlatformApplicationClient.d.ts +24398 -0
  160. package/sdk/platform/PlatformApplicationClient.js +23185 -0
  161. package/sdk/platform/PlatformApplicationModels.d.ts +333 -0
  162. package/sdk/platform/PlatformApplicationModels.js +21262 -0
  163. package/sdk/platform/PlatformClient.d.ts +9535 -0
  164. package/sdk/platform/PlatformClient.js +12336 -0
  165. package/sdk/platform/PlatformConfig.d.ts +29 -0
  166. package/sdk/platform/PlatformConfig.js +36 -0
  167. package/sdk/platform/PlatformModels.d.ts +1396 -0
  168. package/sdk/platform/PlatformModels.js +19222 -0
  169. package/sdk/platform/client/AnalyticsPlatformClient.d.ts +84 -0
  170. package/sdk/platform/client/AnalyticsPlatformClient.js +215 -0
  171. package/sdk/platform/client/AuditTrailPlatformClient.d.ts +38 -0
  172. package/sdk/platform/client/AuditTrailPlatformClient.js +133 -0
  173. package/sdk/platform/client/BillingPlatformClient.d.ts +109 -0
  174. package/sdk/platform/client/BillingPlatformClient.js +381 -0
  175. package/sdk/platform/client/CatalogPlatformClient.d.ts +806 -0
  176. package/sdk/platform/client/CatalogPlatformClient.js +2462 -0
  177. package/sdk/platform/client/CommonPlatformClient.d.ts +30 -0
  178. package/sdk/platform/client/CommonPlatformClient.js +84 -0
  179. package/sdk/platform/client/CommunicationPlatformClient.d.ts +26 -0
  180. package/sdk/platform/client/CommunicationPlatformClient.js +72 -0
  181. package/sdk/platform/client/CompanyProfilePlatformClient.d.ts +182 -0
  182. package/sdk/platform/client/CompanyProfilePlatformClient.js +540 -0
  183. package/sdk/platform/client/ConfigurationPlatformClient.d.ts +277 -0
  184. package/sdk/platform/client/ConfigurationPlatformClient.js +806 -0
  185. package/sdk/platform/client/DiscountPlatformClient.d.ts +118 -0
  186. package/sdk/platform/client/DiscountPlatformClient.js +364 -0
  187. package/sdk/platform/client/FileStoragePlatformClient.d.ts +111 -0
  188. package/sdk/platform/client/FileStoragePlatformClient.js +268 -0
  189. package/sdk/platform/client/InventoryPlatformClient.d.ts +125 -0
  190. package/sdk/platform/client/InventoryPlatformClient.js +409 -0
  191. package/sdk/platform/client/LeadPlatformClient.d.ts +150 -0
  192. package/sdk/platform/client/LeadPlatformClient.js +439 -0
  193. package/sdk/platform/client/OrderPlatformClient.d.ts +190 -0
  194. package/sdk/platform/client/OrderPlatformClient.js +521 -0
  195. package/sdk/platform/client/PaymentPlatformClient.d.ts +98 -0
  196. package/sdk/platform/client/PaymentPlatformClient.js +331 -0
  197. package/sdk/platform/client/WebhookPlatformClient.d.ts +64 -0
  198. package/sdk/platform/client/WebhookPlatformClient.js +207 -0
  199. package/sdk/platform/index.d.ts +2 -0
  200. package/sdk/platform/index.js +4 -0
  201. package/sdk/platform/models/AnalyticsValidator.d.ts +7 -0
  202. package/sdk/platform/models/AnalyticsValidator.js +36 -0
  203. package/sdk/platform/models/AuditTrailValidator.d.ts +7 -0
  204. package/sdk/platform/models/AuditTrailValidator.js +26 -0
  205. package/sdk/platform/models/BillingValidator.d.ts +15 -0
  206. package/sdk/platform/models/BillingValidator.js +72 -0
  207. package/sdk/platform/models/CartValidator.d.ts +0 -0
  208. package/sdk/platform/models/CartValidator.js +0 -0
  209. package/sdk/platform/models/CatalogValidator.d.ts +74 -0
  210. package/sdk/platform/models/CatalogValidator.js +484 -0
  211. package/sdk/platform/models/CommonValidator.d.ts +5 -0
  212. package/sdk/platform/models/CommonValidator.js +18 -0
  213. package/sdk/platform/models/CommunicationValidator.d.ts +4 -0
  214. package/sdk/platform/models/CommunicationValidator.js +11 -0
  215. package/sdk/platform/models/CompanyProfileValidator.d.ts +17 -0
  216. package/sdk/platform/models/CompanyProfileValidator.js +93 -0
  217. package/sdk/platform/models/ConfigurationValidator.d.ts +21 -0
  218. package/sdk/platform/models/ConfigurationValidator.js +134 -0
  219. package/sdk/platform/models/ContentValidator.d.ts +0 -0
  220. package/sdk/platform/models/ContentValidator.js +0 -0
  221. package/sdk/platform/models/DiscountValidator.d.ts +13 -0
  222. package/sdk/platform/models/DiscountValidator.js +75 -0
  223. package/sdk/platform/models/FileStorageValidator.d.ts +9 -0
  224. package/sdk/platform/models/FileStorageValidator.js +44 -0
  225. package/sdk/platform/models/InventoryValidator.d.ts +15 -0
  226. package/sdk/platform/models/InventoryValidator.js +81 -0
  227. package/sdk/platform/models/LeadValidator.d.ts +14 -0
  228. package/sdk/platform/models/LeadValidator.js +78 -0
  229. package/sdk/platform/models/OrderValidator.d.ts +14 -0
  230. package/sdk/platform/models/OrderValidator.js +110 -0
  231. package/sdk/platform/models/PartnerValidator.d.ts +0 -0
  232. package/sdk/platform/models/PartnerValidator.js +0 -0
  233. package/sdk/platform/models/PaymentValidator.d.ts +13 -0
  234. package/sdk/platform/models/PaymentValidator.js +65 -0
  235. package/sdk/platform/models/RewardsValidator.d.ts +0 -0
  236. package/sdk/platform/models/RewardsValidator.js +0 -0
  237. package/sdk/platform/models/ShareValidator.d.ts +0 -0
  238. package/sdk/platform/models/ShareValidator.js +0 -0
  239. package/sdk/platform/models/ThemeValidator.d.ts +0 -0
  240. package/sdk/platform/models/ThemeValidator.js +0 -0
  241. package/sdk/platform/models/UserValidator.d.ts +0 -0
  242. package/sdk/platform/models/UserValidator.js +0 -0
  243. package/sdk/platform/models/WebhookValidator.d.ts +9 -0
  244. package/sdk/platform/models/WebhookValidator.js +42 -0
  245. package/sdk/public/PublicAPIClient.d.ts +11 -0
  246. package/sdk/public/PublicAPIClient.js +38 -0
  247. package/sdk/public/PublicClient.d.ts +12 -0
  248. package/sdk/public/PublicClient.js +24 -0
  249. package/sdk/public/PublicConfig.d.ts +10 -0
  250. package/sdk/public/PublicConfig.js +12 -0
  251. package/sdk/public/PublicModels.d.ts +50 -0
  252. package/sdk/public/PublicModels.js +712 -0
  253. package/sdk/public/client/ConfigurationPublicClient.d.ts +38 -0
  254. package/sdk/public/client/ConfigurationPublicClient.js +102 -0
  255. package/sdk/public/client/InventoryPublicClient.d.ts +81 -0
  256. package/sdk/public/client/InventoryPublicClient.js +239 -0
  257. package/sdk/public/client/WebhookPublicClient.d.ts +28 -0
  258. package/sdk/public/client/WebhookPublicClient.js +92 -0
  259. package/sdk/public/constructUrl.d.ts +5 -0
  260. package/sdk/public/constructUrl.js +13 -0
  261. package/sdk/public/index.d.ts +2 -0
  262. package/sdk/public/index.js +4 -0
  263. package/sdk/public/models/ConfigurationValidator.d.ts +5 -0
  264. package/sdk/public/models/ConfigurationValidator.js +18 -0
  265. package/sdk/public/models/InventoryValidator.d.ts +9 -0
  266. package/sdk/public/models/InventoryValidator.js +43 -0
  267. package/sdk/public/models/WebhookValidator.d.ts +5 -0
  268. package/sdk/public/models/WebhookValidator.js +14 -0
  269. package/tests/application/catalog.spec.js +47 -0
  270. package/tests/common/action-url.spec.js +35 -0
  271. package/tests/common/schema/action-url.json +163 -0
  272. package/tests/common/schema/url-action.json +667 -0
  273. package/tests/common/url-action.spec.js +48 -0
  274. package/tests/helpers/cookie.helper.js +31 -0
  275. package/tests/helpers/oauth.helper.js +43 -0
  276. package/tests/platform/catalog.spec.js +49 -0
  277. package/tests/public/location.spec.js +39 -0
@@ -0,0 +1,449 @@
1
+ export = PosCart;
2
+ declare class PosCart {
3
+ constructor(_conf: any);
4
+ _conf: any;
5
+ _relativeUrls: {
6
+ getCart: string;
7
+ getCartLastModified: string;
8
+ addItems: string;
9
+ updateCart: string;
10
+ getItemCount: string;
11
+ getCoupons: string;
12
+ applyCoupon: string;
13
+ removeCoupon: string;
14
+ getBulkDiscountOffers: string;
15
+ applyRewardPoints: string;
16
+ getAddresses: string;
17
+ addAddress: string;
18
+ getAddressById: string;
19
+ updateAddress: string;
20
+ removeAddress: string;
21
+ selectAddress: string;
22
+ selectPaymentMode: string;
23
+ validateCouponForPayment: string;
24
+ getShipments: string;
25
+ updateShipments: string;
26
+ checkoutCart: string;
27
+ updateCartMeta: string;
28
+ getAvailableDeliveryModes: string;
29
+ getStoreAddressByUid: string;
30
+ getCartShareLink: string;
31
+ getCartSharedItems: string;
32
+ updateCartWithSharedItems: string;
33
+ };
34
+ _urls: {};
35
+ updateUrls(urls: any): void;
36
+ /**
37
+ * @param {Object} arg - Arg object.
38
+ * @param {string} [arg.id] -
39
+ * @param {boolean} [arg.i] -
40
+ * @param {boolean} [arg.b] -
41
+ * @param {number} [arg.assignCardId] -
42
+ * @param {boolean} [arg.buyNow] -
43
+ * @returns {Promise<CartDetailResponse>} - Success response
44
+ * @summary: Fetch all items added to the cart
45
+ * @description: Use this API to get details of all the items added to a cart.
46
+ */
47
+ getCart({ id, i, b, assignCardId, buyNow }?: {
48
+ id?: string;
49
+ i?: boolean;
50
+ b?: boolean;
51
+ assignCardId?: number;
52
+ buyNow?: boolean;
53
+ }): Promise<any>;
54
+ /**
55
+ * @param {Object} arg - Arg object.
56
+ * @param {string} [arg.id] -
57
+ * @returns {Promise<any>} - Success response
58
+ * @summary: Fetch last-modified timestamp
59
+ * @description: Use this API to fetch Last-Modified timestamp in header metadata.
60
+ */
61
+ getCartLastModified({ id }?: {
62
+ id?: string;
63
+ }): Promise<any>;
64
+ /**
65
+ * @param {Object} arg - Arg object.
66
+ * @param {boolean} [arg.i] -
67
+ * @param {boolean} [arg.b] -
68
+ * @param {boolean} [arg.buyNow] -
69
+ * @param {AddCartRequest} arg.body
70
+ * @returns {Promise<AddCartDetailResponse>} - Success response
71
+ * @summary: Add items to cart
72
+ * @description: Use this API to add items to the cart.
73
+ */
74
+ addItems({ body, i, b, buyNow }?: {
75
+ i?: boolean;
76
+ b?: boolean;
77
+ buyNow?: boolean;
78
+ body: any;
79
+ }): Promise<any>;
80
+ /**
81
+ * @param {Object} arg - Arg object.
82
+ * @param {string} [arg.id] -
83
+ * @param {boolean} [arg.i] -
84
+ * @param {boolean} [arg.b] -
85
+ * @param {boolean} [arg.buyNow] -
86
+ * @param {UpdateCartRequest} arg.body
87
+ * @returns {Promise<UpdateCartDetailResponse>} - Success response
88
+ * @summary: Update items in the cart
89
+ * @description: <p>Use this API to update items added to the cart with the help of a request object containing attributes like item_quantity and item_size. These attributes will be fetched from the following APIs</p> <ul> <li><font color="monochrome">operation</font> Operation for current api call. <b>update_item</b> for update items. <b>remove_item</b> for removing items.</li> <li> <font color="monochrome">item_id</font> "/platform/content/v1/products/"</li> <li> <font color="monochrome">item_size</font> "/platform/content/v1/products/:slug/sizes/"</li> <li> <font color="monochrome">quantity</font> item quantity (must be greater than or equal to 1)</li> <li> <font color="monochrome">article_id</font> "/content​/v1​/products​/:identifier​/sizes​/price​/"</li> <li> <font color="monochrome">item_index</font> item position in the cart (must be greater than or equal to 0)</li> </ul>
90
+ */
91
+ updateCart({ body, id, i, b, buyNow }?: {
92
+ id?: string;
93
+ i?: boolean;
94
+ b?: boolean;
95
+ buyNow?: boolean;
96
+ body: any;
97
+ }): Promise<any>;
98
+ /**
99
+ * @param {Object} arg - Arg object.
100
+ * @param {string} [arg.id] - The unique identifier of the cart.
101
+ * @param {boolean} [arg.buyNow] -
102
+ * @returns {Promise<CartItemCountResponse>} - Success response
103
+ * @summary: Count items in the cart
104
+ * @description: Use this API to get the total number of items present in cart.
105
+ */
106
+ getItemCount({ id, buyNow }?: {
107
+ id?: string;
108
+ buyNow?: boolean;
109
+ }): Promise<any>;
110
+ /**
111
+ * @param {Object} arg - Arg object.
112
+ * @param {string} [arg.id] -
113
+ * @param {boolean} [arg.buyNow] -
114
+ * @returns {Promise<GetCouponResponse>} - Success response
115
+ * @summary: Fetch Coupon
116
+ * @description: Use this API to get a list of available coupons along with their details.
117
+ */
118
+ getCoupons({ id, buyNow }?: {
119
+ id?: string;
120
+ buyNow?: boolean;
121
+ }): Promise<any>;
122
+ /**
123
+ * @param {Object} arg - Arg object.
124
+ * @param {boolean} [arg.i] -
125
+ * @param {boolean} [arg.b] -
126
+ * @param {boolean} [arg.p] -
127
+ * @param {string} [arg.id] -
128
+ * @param {boolean} [arg.buyNow] -
129
+ * @param {ApplyCouponRequest} arg.body
130
+ * @returns {Promise<CartDetailResponse>} - Success response
131
+ * @summary: Apply Coupon
132
+ * @description: Use this API to apply coupons on items in the cart.
133
+ */
134
+ applyCoupon({ body, i, b, p, id, buyNow }?: {
135
+ i?: boolean;
136
+ b?: boolean;
137
+ p?: boolean;
138
+ id?: string;
139
+ buyNow?: boolean;
140
+ body: any;
141
+ }): Promise<any>;
142
+ /**
143
+ * @param {Object} arg - Arg object.
144
+ * @param {string} [arg.id] -
145
+ * @param {boolean} [arg.buyNow] -
146
+ * @returns {Promise<CartDetailResponse>} - Success response
147
+ * @summary: Remove Coupon Applied
148
+ * @description: Remove Coupon applied on the cart by passing uid in request body.
149
+ */
150
+ removeCoupon({ id, buyNow }?: {
151
+ id?: string;
152
+ buyNow?: boolean;
153
+ }): Promise<any>;
154
+ /**
155
+ * @param {Object} arg - Arg object.
156
+ * @param {number} [arg.itemId] - The Item ID of the product
157
+ * @param {string} [arg.articleId] - Article Mongo ID
158
+ * @param {number} [arg.uid] - UID of the product
159
+ * @param {string} [arg.slug] - A short, human-readable, URL-friendly
160
+ * identifier of a product. You can get slug value from the endpoint
161
+ * /service/application/catalog/v1.0/products/
162
+ * @returns {Promise<BulkPriceResponse>} - Success response
163
+ * @summary: Get discount offers based on quantity
164
+ * @description: Use this API to get a list of applicable offers along with current, next and best offer for given product. Either one of uid, item_id, slug should be present.
165
+ */
166
+ getBulkDiscountOffers({ itemId, articleId, uid, slug }?: {
167
+ itemId?: number;
168
+ articleId?: string;
169
+ uid?: number;
170
+ slug?: string;
171
+ }): Promise<any>;
172
+ /**
173
+ * @param {Object} arg - Arg object.
174
+ * @param {string} [arg.id] -
175
+ * @param {boolean} [arg.i] -
176
+ * @param {boolean} [arg.b] -
177
+ * @param {boolean} [arg.buyNow] -
178
+ * @param {RewardPointRequest} arg.body
179
+ * @returns {Promise<CartDetailResponse>} - Success response
180
+ * @summary: Apply reward points at cart
181
+ * @description: Use this API to redeem a fixed no. of reward points by applying it to the cart.
182
+ */
183
+ applyRewardPoints({ body, id, i, b, buyNow }?: {
184
+ id?: string;
185
+ i?: boolean;
186
+ b?: boolean;
187
+ buyNow?: boolean;
188
+ body: any;
189
+ }): Promise<any>;
190
+ /**
191
+ * @param {Object} arg - Arg object.
192
+ * @param {string} [arg.cartId] -
193
+ * @param {boolean} [arg.buyNow] -
194
+ * @param {string} [arg.mobileNo] -
195
+ * @param {string} [arg.checkoutMode] -
196
+ * @param {string} [arg.tags] -
197
+ * @param {boolean} [arg.isDefault] -
198
+ * @returns {Promise<GetAddressesResponse>} - Success response
199
+ * @summary: Fetch address
200
+ * @description: Use this API to get all the addresses associated with an account. If successful, returns a Address resource in the response body specified in GetAddressesResponse.attibutes listed below are optional <ul> <li> <font color="monochrome">uid</font></li> <li> <font color="monochrome">address_id</font></li> <li> <font color="monochrome">mobile_no</font></li> <li> <font color="monochrome">checkout_mode</font></li> <li> <font color="monochrome">tags</font></li> <li> <font color="monochrome">default</font></li> </ul>
201
+ */
202
+ getAddresses({ cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, }?: {
203
+ cartId?: string;
204
+ buyNow?: boolean;
205
+ mobileNo?: string;
206
+ checkoutMode?: string;
207
+ tags?: string;
208
+ isDefault?: boolean;
209
+ }): Promise<any>;
210
+ /**
211
+ * @param {Object} arg - Arg object.
212
+ * @param {Address} arg.body
213
+ * @returns {Promise<SaveAddressResponse>} - Success response
214
+ * @summary: Add address to an account
215
+ * @description: Use this API to add an address to an account.
216
+ */
217
+ addAddress({ body }?: {
218
+ body: any;
219
+ }): Promise<any>;
220
+ /**
221
+ * @param {Object} arg - Arg object.
222
+ * @param {string} arg.id -
223
+ * @param {string} [arg.cartId] -
224
+ * @param {boolean} [arg.buyNow] -
225
+ * @param {string} [arg.mobileNo] -
226
+ * @param {string} [arg.checkoutMode] -
227
+ * @param {string} [arg.tags] -
228
+ * @param {boolean} [arg.isDefault] -
229
+ * @returns {Promise<Address>} - Success response
230
+ * @summary: Fetch a single address by its ID
231
+ * @description: Use this API to get an addresses using its ID. If successful, returns a Address resource in the response body specified in `Address`. Attibutes listed below are optional <ul> <li> <font color="monochrome">mobile_no</font></li> <li> <font color="monochrome">checkout_mode</font></li> <li> <font color="monochrome">tags</font></li> <li> <font color="monochrome">default</font></li> </ul>
232
+ */
233
+ getAddressById({ id, cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, }?: {
234
+ id: string;
235
+ cartId?: string;
236
+ buyNow?: boolean;
237
+ mobileNo?: string;
238
+ checkoutMode?: string;
239
+ tags?: string;
240
+ isDefault?: boolean;
241
+ }): Promise<any>;
242
+ /**
243
+ * @param {Object} arg - Arg object.
244
+ * @param {string} arg.id - ID allotted to the selected address
245
+ * @param {Address} arg.body
246
+ * @returns {Promise<UpdateAddressResponse>} - Success response
247
+ * @summary: Update address added to an account
248
+ * @description: <p>Use this API to update an existing address in the account. Request object should contain attributes mentioned in <font color="blue">Address </font> can be updated. These attributes are:</p> <ul> <li> <font color="monochrome">is_default_address</font></li> <li> <font color="monochrome">landmark</font></li> <li> <font color="monochrome">area</font></li> <li> <font color="monochrome">pincode</font></li> <li> <font color="monochrome">email</font></li> <li> <font color="monochrome">address_type</font></li> <li> <font color="monochrome">name</font></li> <li> <font color="monochrome">address_id</font></li> <li> <font color="monochrome">address</font></li> </ul>
249
+ */
250
+ updateAddress({ id, body }?: {
251
+ id: string;
252
+ body: any;
253
+ }): Promise<any>;
254
+ /**
255
+ * @param {Object} arg - Arg object.
256
+ * @param {string} arg.id - ID allotted to the selected address
257
+ * @returns {Promise<DeleteAddressResponse>} - Success response
258
+ * @summary: Remove address associated with an account
259
+ * @description: Use this API to delete an address by its ID. This will returns an object that will indicate whether the address was deleted successfully or not.
260
+ */
261
+ removeAddress({ id }?: {
262
+ id: string;
263
+ }): Promise<any>;
264
+ /**
265
+ * @param {Object} arg - Arg object.
266
+ * @param {string} [arg.cartId] -
267
+ * @param {boolean} [arg.buyNow] -
268
+ * @param {boolean} [arg.i] -
269
+ * @param {boolean} [arg.b] -
270
+ * @param {SelectCartAddressRequest} arg.body
271
+ * @returns {Promise<CartDetailResponse>} - Success response
272
+ * @summary: Select an address from available addresses
273
+ * @description: <p>Select Address from all addresses associated with the account in order to ship the cart items to that address, otherwise default address will be selected implicitly. See `SelectCartAddressRequest` in schema of request body for the list of attributes needed to select Address from account. On successful request, this API returns a Cart object. Below address attributes are required. <ul> <li> <font color="monochrome">address_id</font></li> <li> <font color="monochrome">billing_address_id</font></li> <li> <font color="monochrome">uid</font></li> </ul></p>
274
+ */
275
+ selectAddress({ body, cartId, buyNow, i, b }?: {
276
+ cartId?: string;
277
+ buyNow?: boolean;
278
+ i?: boolean;
279
+ b?: boolean;
280
+ body: any;
281
+ }): Promise<any>;
282
+ /**
283
+ * @param {Object} arg - Arg object.
284
+ * @param {string} [arg.id] -
285
+ * @param {boolean} [arg.buyNow] -
286
+ * @param {UpdateCartPaymentRequest} arg.body
287
+ * @returns {Promise<CartDetailResponse>} - Success response
288
+ * @summary: Update cart payment
289
+ * @description: Use this API to update cart payment.
290
+ */
291
+ selectPaymentMode({ body, id, buyNow }?: {
292
+ id?: string;
293
+ buyNow?: boolean;
294
+ body: any;
295
+ }): Promise<any>;
296
+ /**
297
+ * @param {Object} arg - Arg object.
298
+ * @param {string} [arg.id] -
299
+ * @param {boolean} [arg.buyNow] -
300
+ * @param {string} [arg.addressId] -
301
+ * @param {string} [arg.paymentMode] -
302
+ * @param {string} [arg.paymentIdentifier] -
303
+ * @param {string} [arg.aggregatorName] -
304
+ * @param {string} [arg.merchantCode] -
305
+ * @returns {Promise<PaymentCouponValidate>} - Success response
306
+ * @summary: Verify the coupon eligibility against the payment mode
307
+ * @description: Use this API to validate a coupon against the payment mode such as NetBanking, Wallet, UPI etc.
308
+ */
309
+ validateCouponForPayment({ id, buyNow, addressId, paymentMode, paymentIdentifier, aggregatorName, merchantCode, }?: {
310
+ id?: string;
311
+ buyNow?: boolean;
312
+ addressId?: string;
313
+ paymentMode?: string;
314
+ paymentIdentifier?: string;
315
+ aggregatorName?: string;
316
+ merchantCode?: string;
317
+ }): Promise<any>;
318
+ /**
319
+ * @param {Object} arg - Arg object.
320
+ * @param {number} [arg.pickAtStoreUid] -
321
+ * @param {number} [arg.orderingStoreId] -
322
+ * @param {boolean} [arg.p] - This is a boolean value. Select `true` for
323
+ * getting a payment option in response.
324
+ * @param {string} [arg.id] - The unique identifier of the cart
325
+ * @param {string} [arg.addressId] - ID allotted to the selected address
326
+ * @param {string} [arg.areaCode] - The PIN Code of the destination address,
327
+ * e.g. 400059
328
+ * @param {string} [arg.orderType] - The order type of shipment HomeDelivery
329
+ * - If the customer wants the order home-delivered PickAtStore - If the
330
+ * customer wants the handover of an order at the store itself.
331
+ * @returns {Promise<CartShipmentsResponse>} - Success response
332
+ * @summary: Get delivery date and options before checkout
333
+ * @description: Use this API to get shipment details, expected delivery date, items and price breakup of the shipment.
334
+ */
335
+ getShipments({ pickAtStoreUid, orderingStoreId, p, id, addressId, areaCode, orderType, }?: {
336
+ pickAtStoreUid?: number;
337
+ orderingStoreId?: number;
338
+ p?: boolean;
339
+ id?: string;
340
+ addressId?: string;
341
+ areaCode?: string;
342
+ orderType?: string;
343
+ }): Promise<any>;
344
+ /**
345
+ * @param {Object} arg - Arg object.
346
+ * @param {boolean} [arg.i] - This is a boolean value. Select `true` to
347
+ * retrieve all the items added in the cart.
348
+ * @param {boolean} [arg.p] - This is a boolean value. Select `true` for
349
+ * getting a payment option in response.
350
+ * @param {string} [arg.id] - The unique identifier of the cart
351
+ * @param {string} [arg.addressId] - ID allotted to an address
352
+ * @param {string} [arg.orderType] - The order type of shipment HomeDelivery
353
+ * - If the customer wants the order home-delivered PickAtStore - If the
354
+ * customer wants the handover of an order at the store itself.
355
+ * @param {UpdateCartShipmentRequest} arg.body
356
+ * @returns {Promise<CartShipmentsResponse>} - Success response
357
+ * @summary: Update shipment delivery type and quantity before checkout
358
+ * @description: Use this API to update the delivery type and quantity as per customer's preference for either store pick-up or home-delivery.
359
+ */
360
+ updateShipments({ body, i, p, id, addressId, orderType }?: {
361
+ i?: boolean;
362
+ p?: boolean;
363
+ id?: string;
364
+ addressId?: string;
365
+ orderType?: string;
366
+ body: any;
367
+ }): Promise<any>;
368
+ /**
369
+ * @param {Object} arg - Arg object.
370
+ * @param {string} [arg.id] -
371
+ * @param {CartPosCheckoutDetailRequest} arg.body
372
+ * @returns {Promise<CartCheckoutResponse>} - Success response
373
+ * @summary: Checkout all items in the cart
374
+ * @description: Use this API to checkout all items in the cart for payment and order generation. For COD, order will be generated directly, whereas for other checkout modes, user will be redirected to a payment gateway.
375
+ */
376
+ checkoutCart({ body, id }?: {
377
+ id?: string;
378
+ body: any;
379
+ }): Promise<any>;
380
+ /**
381
+ * @param {Object} arg - Arg object.
382
+ * @param {string} [arg.id] -
383
+ * @param {boolean} [arg.buyNow] -
384
+ * @param {CartMetaRequest} arg.body
385
+ * @returns {Promise<CartMetaResponse>} - Success response
386
+ * @summary: Update the cart meta
387
+ * @description: Use this API to update cart meta like checkout_mode and gstin.
388
+ */
389
+ updateCartMeta({ body, id, buyNow }?: {
390
+ id?: string;
391
+ buyNow?: boolean;
392
+ body: any;
393
+ }): Promise<any>;
394
+ /**
395
+ * @param {Object} arg - Arg object.
396
+ * @param {string} arg.areaCode -
397
+ * @param {string} [arg.id] -
398
+ * @returns {Promise<CartDeliveryModesResponse>} - Success response
399
+ * @summary: Get available delivery modes for cart
400
+ * @description: Use this API to get the delivery modes (home-delivery/store-pickup) along with a list of pickup stores available for a given cart at a given PIN Code. User can then view the address of a pickup store with the help of store-address API.
401
+ */
402
+ getAvailableDeliveryModes({ areaCode, id }?: {
403
+ areaCode: string;
404
+ id?: string;
405
+ }): Promise<any>;
406
+ /**
407
+ * @param {Object} arg - Arg object.
408
+ * @param {number} arg.storeUid -
409
+ * @returns {Promise<StoreDetailsResponse>} - Success response
410
+ * @summary: Get list of stores for give uids
411
+ * @description: Use this API to get the store details by entering the unique identifier of the pickup stores shown in the response of available-delivery-mode API.
412
+ */
413
+ getStoreAddressByUid({ storeUid }?: {
414
+ storeUid: number;
415
+ }): Promise<any>;
416
+ /**
417
+ * @param {Object} arg - Arg object.
418
+ * @param {GetShareCartLinkRequest} arg.body
419
+ * @returns {Promise<GetShareCartLinkResponse>} - Success response
420
+ * @summary: Generate token for sharing the cart
421
+ * @description: Use this API to generate a shared cart snapshot and return a shortlink token. The link can be shared with other users for getting the same items in their cart.
422
+ */
423
+ getCartShareLink({ body }?: {
424
+ body: any;
425
+ }): Promise<any>;
426
+ /**
427
+ * @param {Object} arg - Arg object.
428
+ * @param {string} arg.token - Token of the shared short link
429
+ * @returns {Promise<SharedCartResponse>} - Success response
430
+ * @summary: Get details of a shared cart
431
+ * @description: Use this API to get the shared cart details as per the token generated using the share-cart API.
432
+ */
433
+ getCartSharedItems({ token }?: {
434
+ token: string;
435
+ }): Promise<any>;
436
+ /**
437
+ * @param {Object} arg - Arg object.
438
+ * @param {string} arg.token - Token of the shared short link
439
+ * @param {string} arg.action - Operation to perform on the existing cart
440
+ * merge or replace.
441
+ * @returns {Promise<SharedCartResponse>} - Success response
442
+ * @summary: Merge or replace existing cart
443
+ * @description: Use this API to merge the shared cart with existing cart, or replace the existing cart with the shared cart. The `action` parameter is used to indicate the operation Merge or Replace.
444
+ */
445
+ updateCartWithSharedItems({ token, action }?: {
446
+ token: string;
447
+ action: string;
448
+ }): Promise<any>;
449
+ }