@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,432 @@
1
+ export = Cart;
2
+ declare class Cart {
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
+ checkoutCart: string;
26
+ updateCartMeta: string;
27
+ getCartShareLink: string;
28
+ getCartSharedItems: string;
29
+ updateCartWithSharedItems: string;
30
+ getPromotionOffers: string;
31
+ getLadderOffers: string;
32
+ };
33
+ _urls: {};
34
+ updateUrls(urls: any): void;
35
+ /**
36
+ * @param {Object} arg - Arg object.
37
+ * @param {string} [arg.id] -
38
+ * @param {boolean} [arg.i] -
39
+ * @param {boolean} [arg.b] -
40
+ * @param {number} [arg.assignCardId] -
41
+ * @param {boolean} [arg.buyNow] -
42
+ * @returns {Promise<CartDetailResponse>} - Success response
43
+ * @summary: Fetch all items added to the cart
44
+ * @description: Use this API to get details of all the items added to a cart.
45
+ */
46
+ getCart({ id, i, b, assignCardId, buyNow }?: {
47
+ id?: string;
48
+ i?: boolean;
49
+ b?: boolean;
50
+ assignCardId?: number;
51
+ buyNow?: boolean;
52
+ }): Promise<any>;
53
+ /**
54
+ * @param {Object} arg - Arg object.
55
+ * @param {string} [arg.id] -
56
+ * @returns {Promise<any>} - Success response
57
+ * @summary: Fetch last-modified timestamp
58
+ * @description: Use this API to fetch Last-Modified timestamp in header metadata.
59
+ */
60
+ getCartLastModified({ id }?: {
61
+ id?: string;
62
+ }): Promise<any>;
63
+ /**
64
+ * @param {Object} arg - Arg object.
65
+ * @param {boolean} [arg.i] -
66
+ * @param {boolean} [arg.b] -
67
+ * @param {boolean} [arg.buyNow] -
68
+ * @param {AddCartRequest} arg.body
69
+ * @returns {Promise<AddCartDetailResponse>} - Success response
70
+ * @summary: Add items to cart
71
+ * @description: Use this API to add items to the cart.
72
+ */
73
+ addItems({ body, i, b, buyNow }?: {
74
+ i?: boolean;
75
+ b?: boolean;
76
+ buyNow?: boolean;
77
+ body: any;
78
+ }): Promise<any>;
79
+ /**
80
+ * @param {Object} arg - Arg object.
81
+ * @param {string} [arg.id] -
82
+ * @param {boolean} [arg.i] -
83
+ * @param {boolean} [arg.b] -
84
+ * @param {boolean} [arg.buyNow] -
85
+ * @param {UpdateCartRequest} arg.body
86
+ * @returns {Promise<UpdateCartDetailResponse>} - Success response
87
+ * @summary: Update items in the cart
88
+ * @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>
89
+ */
90
+ updateCart({ body, id, i, b, buyNow }?: {
91
+ id?: string;
92
+ i?: boolean;
93
+ b?: boolean;
94
+ buyNow?: boolean;
95
+ body: any;
96
+ }): Promise<any>;
97
+ /**
98
+ * @param {Object} arg - Arg object.
99
+ * @param {string} [arg.id] - The unique identifier of the cart.
100
+ * @param {boolean} [arg.buyNow] -
101
+ * @returns {Promise<CartItemCountResponse>} - Success response
102
+ * @summary: Count items in the cart
103
+ * @description: Use this API to get the total number of items present in cart.
104
+ */
105
+ getItemCount({ id, buyNow }?: {
106
+ id?: string;
107
+ buyNow?: boolean;
108
+ }): Promise<any>;
109
+ /**
110
+ * @param {Object} arg - Arg object.
111
+ * @param {string} [arg.id] -
112
+ * @param {boolean} [arg.buyNow] -
113
+ * @returns {Promise<GetCouponResponse>} - Success response
114
+ * @summary: Fetch Coupon
115
+ * @description: Use this API to get a list of available coupons along with their details.
116
+ */
117
+ getCoupons({ id, buyNow }?: {
118
+ id?: string;
119
+ buyNow?: boolean;
120
+ }): Promise<any>;
121
+ /**
122
+ * @param {Object} arg - Arg object.
123
+ * @param {boolean} [arg.i] -
124
+ * @param {boolean} [arg.b] -
125
+ * @param {boolean} [arg.p] -
126
+ * @param {string} [arg.id] -
127
+ * @param {boolean} [arg.buyNow] -
128
+ * @param {ApplyCouponRequest} arg.body
129
+ * @returns {Promise<CartDetailResponse>} - Success response
130
+ * @summary: Apply Coupon
131
+ * @description: Use this API to apply coupons on items in the cart.
132
+ */
133
+ applyCoupon({ body, i, b, p, id, buyNow }?: {
134
+ i?: boolean;
135
+ b?: boolean;
136
+ p?: boolean;
137
+ id?: string;
138
+ buyNow?: boolean;
139
+ body: any;
140
+ }): Promise<any>;
141
+ /**
142
+ * @param {Object} arg - Arg object.
143
+ * @param {string} [arg.id] -
144
+ * @param {boolean} [arg.buyNow] -
145
+ * @returns {Promise<CartDetailResponse>} - Success response
146
+ * @summary: Remove Coupon Applied
147
+ * @description: Remove Coupon applied on the cart by passing uid in request body.
148
+ */
149
+ removeCoupon({ id, buyNow }?: {
150
+ id?: string;
151
+ buyNow?: boolean;
152
+ }): Promise<any>;
153
+ /**
154
+ * @param {Object} arg - Arg object.
155
+ * @param {number} [arg.itemId] - The Item ID of the product
156
+ * @param {string} [arg.articleId] - Article Mongo ID
157
+ * @param {number} [arg.uid] - UID of the product
158
+ * @param {string} [arg.slug] - A short, human-readable, URL-friendly
159
+ * identifier of a product. You can get slug value from the endpoint
160
+ * /service/application/catalog/v1.0/products/
161
+ * @returns {Promise<BulkPriceResponse>} - Success response
162
+ * @summary: Get discount offers based on quantity
163
+ * @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.
164
+ */
165
+ getBulkDiscountOffers({ itemId, articleId, uid, slug }?: {
166
+ itemId?: number;
167
+ articleId?: string;
168
+ uid?: number;
169
+ slug?: string;
170
+ }): Promise<any>;
171
+ /**
172
+ * @param {Object} arg - Arg object.
173
+ * @param {string} [arg.id] -
174
+ * @param {boolean} [arg.i] -
175
+ * @param {boolean} [arg.b] -
176
+ * @param {boolean} [arg.buyNow] -
177
+ * @param {RewardPointRequest} arg.body
178
+ * @returns {Promise<CartDetailResponse>} - Success response
179
+ * @summary: Apply reward points at cart
180
+ * @description: Use this API to redeem a fixed no. of reward points by applying it to the cart.
181
+ */
182
+ applyRewardPoints({ body, id, i, b, buyNow }?: {
183
+ id?: string;
184
+ i?: boolean;
185
+ b?: boolean;
186
+ buyNow?: boolean;
187
+ body: any;
188
+ }): Promise<any>;
189
+ /**
190
+ * @param {Object} arg - Arg object.
191
+ * @param {string} [arg.cartId] -
192
+ * @param {boolean} [arg.buyNow] -
193
+ * @param {string} [arg.mobileNo] -
194
+ * @param {string} [arg.checkoutMode] -
195
+ * @param {string} [arg.tags] -
196
+ * @param {boolean} [arg.isDefault] -
197
+ * @returns {Promise<GetAddressesResponse>} - Success response
198
+ * @summary: Fetch address
199
+ * @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>
200
+ */
201
+ getAddresses({ cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, }?: {
202
+ cartId?: string;
203
+ buyNow?: boolean;
204
+ mobileNo?: string;
205
+ checkoutMode?: string;
206
+ tags?: string;
207
+ isDefault?: boolean;
208
+ }): Promise<any>;
209
+ /**
210
+ * @param {Object} arg - Arg object.
211
+ * @param {Address} arg.body
212
+ * @returns {Promise<SaveAddressResponse>} - Success response
213
+ * @summary: Add address to an account
214
+ * @description: Use this API to add an address to an account.
215
+ */
216
+ addAddress({ body }?: {
217
+ body: any;
218
+ }): Promise<any>;
219
+ /**
220
+ * @param {Object} arg - Arg object.
221
+ * @param {string} arg.id -
222
+ * @param {string} [arg.cartId] -
223
+ * @param {boolean} [arg.buyNow] -
224
+ * @param {string} [arg.mobileNo] -
225
+ * @param {string} [arg.checkoutMode] -
226
+ * @param {string} [arg.tags] -
227
+ * @param {boolean} [arg.isDefault] -
228
+ * @returns {Promise<Address>} - Success response
229
+ * @summary: Fetch a single address by its ID
230
+ * @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>
231
+ */
232
+ getAddressById({ id, cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, }?: {
233
+ id: string;
234
+ cartId?: string;
235
+ buyNow?: boolean;
236
+ mobileNo?: string;
237
+ checkoutMode?: string;
238
+ tags?: string;
239
+ isDefault?: boolean;
240
+ }): Promise<any>;
241
+ /**
242
+ * @param {Object} arg - Arg object.
243
+ * @param {string} arg.id - ID allotted to the selected address
244
+ * @param {Address} arg.body
245
+ * @returns {Promise<UpdateAddressResponse>} - Success response
246
+ * @summary: Update address added to an account
247
+ * @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>
248
+ */
249
+ updateAddress({ id, body }?: {
250
+ id: string;
251
+ body: any;
252
+ }): Promise<any>;
253
+ /**
254
+ * @param {Object} arg - Arg object.
255
+ * @param {string} arg.id - ID allotted to the selected address
256
+ * @returns {Promise<DeleteAddressResponse>} - Success response
257
+ * @summary: Remove address associated with an account
258
+ * @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.
259
+ */
260
+ removeAddress({ id }?: {
261
+ id: string;
262
+ }): Promise<any>;
263
+ /**
264
+ * @param {Object} arg - Arg object.
265
+ * @param {string} [arg.cartId] -
266
+ * @param {boolean} [arg.buyNow] -
267
+ * @param {boolean} [arg.i] -
268
+ * @param {boolean} [arg.b] -
269
+ * @param {SelectCartAddressRequest} arg.body
270
+ * @returns {Promise<CartDetailResponse>} - Success response
271
+ * @summary: Select an address from available addresses
272
+ * @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>
273
+ */
274
+ selectAddress({ body, cartId, buyNow, i, b }?: {
275
+ cartId?: string;
276
+ buyNow?: boolean;
277
+ i?: boolean;
278
+ b?: boolean;
279
+ body: any;
280
+ }): Promise<any>;
281
+ /**
282
+ * @param {Object} arg - Arg object.
283
+ * @param {string} [arg.id] -
284
+ * @param {boolean} [arg.buyNow] -
285
+ * @param {UpdateCartPaymentRequest} arg.body
286
+ * @returns {Promise<CartDetailResponse>} - Success response
287
+ * @summary: Update cart payment
288
+ * @description: Use this API to update cart payment.
289
+ */
290
+ selectPaymentMode({ body, id, buyNow }?: {
291
+ id?: string;
292
+ buyNow?: boolean;
293
+ body: any;
294
+ }): Promise<any>;
295
+ /**
296
+ * @param {Object} arg - Arg object.
297
+ * @param {string} [arg.id] -
298
+ * @param {boolean} [arg.buyNow] -
299
+ * @param {string} [arg.addressId] -
300
+ * @param {string} [arg.paymentMode] -
301
+ * @param {string} [arg.paymentIdentifier] -
302
+ * @param {string} [arg.aggregatorName] -
303
+ * @param {string} [arg.merchantCode] -
304
+ * @returns {Promise<PaymentCouponValidate>} - Success response
305
+ * @summary: Verify the coupon eligibility against the payment mode
306
+ * @description: Use this API to validate a coupon against the payment mode such as NetBanking, Wallet, UPI etc.
307
+ */
308
+ validateCouponForPayment({ id, buyNow, addressId, paymentMode, paymentIdentifier, aggregatorName, merchantCode, }?: {
309
+ id?: string;
310
+ buyNow?: boolean;
311
+ addressId?: string;
312
+ paymentMode?: string;
313
+ paymentIdentifier?: string;
314
+ aggregatorName?: string;
315
+ merchantCode?: string;
316
+ }): Promise<any>;
317
+ /**
318
+ * @param {Object} arg - Arg object.
319
+ * @param {boolean} [arg.p] - This is a boolean value. Select `true` for
320
+ * getting a payment option in response.
321
+ * @param {string} [arg.id] - The unique identifier of the cart
322
+ * @param {boolean} [arg.buyNow] -
323
+ * @param {string} [arg.addressId] - ID allotted to the selected address
324
+ * @param {string} [arg.areaCode] - The PIN Code of the destination address,
325
+ * e.g. 400059
326
+ * @returns {Promise<CartShipmentsResponse>} - Success response
327
+ * @summary: Get delivery date and options before checkout
328
+ * @description: Use this API to get shipment details, expected delivery date, items and price breakup of the shipment.
329
+ */
330
+ getShipments({ p, id, buyNow, addressId, areaCode }?: {
331
+ p?: boolean;
332
+ id?: string;
333
+ buyNow?: boolean;
334
+ addressId?: string;
335
+ areaCode?: string;
336
+ }): Promise<any>;
337
+ /**
338
+ * @param {Object} arg - Arg object.
339
+ * @param {boolean} [arg.buyNow] - This indicates the type of cart to checkout
340
+ * @param {CartCheckoutDetailRequest} arg.body
341
+ * @returns {Promise<CartCheckoutResponse>} - Success response
342
+ * @summary: Checkout all items in the cart
343
+ * @description: Use this API to checkout all items in the cart for payment and order generation. For COD, order will be directly generated, whereas for other checkout modes, user will be redirected to a payment gateway.
344
+ */
345
+ checkoutCart({ body, buyNow }?: {
346
+ buyNow?: boolean;
347
+ body: any;
348
+ }): Promise<any>;
349
+ /**
350
+ * @param {Object} arg - Arg object.
351
+ * @param {string} [arg.id] -
352
+ * @param {boolean} [arg.buyNow] -
353
+ * @param {CartMetaRequest} arg.body
354
+ * @returns {Promise<CartMetaResponse>} - Success response
355
+ * @summary: Update the cart meta
356
+ * @description: Use this API to update cart meta like checkout_mode and gstin.
357
+ */
358
+ updateCartMeta({ body, id, buyNow }?: {
359
+ id?: string;
360
+ buyNow?: boolean;
361
+ body: any;
362
+ }): Promise<any>;
363
+ /**
364
+ * @param {Object} arg - Arg object.
365
+ * @param {GetShareCartLinkRequest} arg.body
366
+ * @returns {Promise<GetShareCartLinkResponse>} - Success response
367
+ * @summary: Generate token for sharing the cart
368
+ * @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.
369
+ */
370
+ getCartShareLink({ body }?: {
371
+ body: any;
372
+ }): Promise<any>;
373
+ /**
374
+ * @param {Object} arg - Arg object.
375
+ * @param {string} arg.token - Token of the shared short link
376
+ * @returns {Promise<SharedCartResponse>} - Success response
377
+ * @summary: Get details of a shared cart
378
+ * @description: Use this API to get the shared cart details as per the token generated using the share-cart API.
379
+ */
380
+ getCartSharedItems({ token }?: {
381
+ token: string;
382
+ }): Promise<any>;
383
+ /**
384
+ * @param {Object} arg - Arg object.
385
+ * @param {string} arg.token - Token of the shared short link
386
+ * @param {string} arg.action - Operation to perform on the existing cart
387
+ * merge or replace.
388
+ * @returns {Promise<SharedCartResponse>} - Success response
389
+ * @summary: Merge or replace existing cart
390
+ * @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.
391
+ */
392
+ updateCartWithSharedItems({ token, action }?: {
393
+ token: string;
394
+ action: string;
395
+ }): Promise<any>;
396
+ /**
397
+ * @param {Object} arg - Arg object.
398
+ * @param {string} [arg.slug] - A short, human-readable, URL-friendly
399
+ * identifier of a product. You can get slug value from the endpoint
400
+ * /service/application/catalog/v1.0/products/
401
+ * @param {number} [arg.pageSize] - Number of offers to be fetched to show
402
+ * @param {string} [arg.promotionGroup] - Type of promotion groups
403
+ * @returns {Promise<PromotionOffersResponse>} - Success response
404
+ * @summary: Fetch available promotions
405
+ * @description: Use this API to get top 5 offers available for current product
406
+ */
407
+ getPromotionOffers({ slug, pageSize, promotionGroup }?: {
408
+ slug?: string;
409
+ pageSize?: number;
410
+ promotionGroup?: string;
411
+ }): Promise<any>;
412
+ /**
413
+ * @param {Object} arg - Arg object.
414
+ * @param {string} arg.slug - A short, human-readable, URL-friendly
415
+ * identifier of a product. You can get slug value from the endpoint
416
+ * /service/application/catalog/v1.0/products/
417
+ * @param {string} [arg.storeId] - Store uid of assigned store on PDP page.
418
+ * If not passed default first created ladder will be returned
419
+ * @param {string} [arg.promotionId] - Get ladder information of given
420
+ * promotion id explicitely
421
+ * @param {number} [arg.pageSize] - Number of offers to be fetched to show
422
+ * @returns {Promise<LadderPriceOffers>} - Success response
423
+ * @summary: Fetch ladder price promotion
424
+ * @description: Use this API to get applicable ladder price promotion for current product
425
+ */
426
+ getLadderOffers({ slug, storeId, promotionId, pageSize }?: {
427
+ slug: string;
428
+ storeId?: string;
429
+ promotionId?: string;
430
+ pageSize?: number;
431
+ }): Promise<any>;
432
+ }