@gofynd/fdk-client-javascript 1.1.2 → 1.1.3

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 (117) hide show
  1. package/README.md +1 -2
  2. package/index.d.ts +4 -7
  3. package/index.js +5 -12
  4. package/package.json +1 -1
  5. package/sdk/application/ApplicationClient.d.ts +20 -20
  6. package/sdk/application/ApplicationClient.js +26 -26
  7. package/sdk/application/Cart/CartApplicationClient.d.ts +36 -6
  8. package/sdk/application/Cart/CartApplicationClient.js +105 -10
  9. package/sdk/application/Cart/CartApplicationModel.d.ts +9 -0
  10. package/sdk/application/Cart/CartApplicationModel.js +105 -1
  11. package/sdk/application/Cart/CartApplicationValidator.d.ts +1 -0
  12. package/sdk/application/Cart/CartApplicationValidator.js +15 -1
  13. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1 -0
  14. package/sdk/application/Catalog/CatalogApplicationModel.js +13 -0
  15. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +14 -10
  16. package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
  17. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1 -0
  18. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
  19. package/sdk/application/Content/ContentApplicationModel.js +3 -1
  20. package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
  21. package/sdk/application/Order/OrderApplicationClient.d.ts +2 -2
  22. package/sdk/application/Order/OrderApplicationClient.js +2 -2
  23. package/sdk/application/Order/OrderApplicationModel.js +18 -8
  24. package/sdk/application/Payment/PaymentApplicationClient.d.ts +35 -0
  25. package/sdk/application/Payment/PaymentApplicationClient.js +200 -0
  26. package/sdk/application/Payment/PaymentApplicationModel.d.ts +4 -0
  27. package/sdk/application/Payment/PaymentApplicationModel.js +58 -7
  28. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +3 -0
  29. package/sdk/application/Payment/PaymentApplicationValidator.js +19 -0
  30. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +16 -3
  31. package/sdk/application/PosCart/PosCartApplicationClient.js +39 -6
  32. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +6 -0
  33. package/sdk/application/PosCart/PosCartApplicationModel.js +63 -1
  34. package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
  35. package/sdk/application/index.d.ts +10 -10
  36. package/sdk/application/index.js +13 -13
  37. package/sdk/common/Constant.d.ts +5 -0
  38. package/sdk/common/Constant.js +5 -0
  39. package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
  40. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +459 -2
  41. package/sdk/platform/Cart/CartPlatformApplicationClient.js +2480 -340
  42. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +29 -0
  43. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +250 -0
  44. package/sdk/platform/Cart/CartPlatformModel.d.ts +52 -0
  45. package/sdk/platform/Cart/CartPlatformModel.js +580 -2
  46. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +8 -2
  47. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +10 -0
  48. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
  49. package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -2
  50. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1 -0
  51. package/sdk/platform/Catalog/CatalogPlatformModel.js +41 -29
  52. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1 -0
  53. package/sdk/platform/Communication/CommunicationPlatformModel.js +9 -0
  54. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -2
  55. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +2 -2
  56. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +5 -4
  57. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +99 -78
  58. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +99 -78
  59. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +87 -71
  60. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +87 -71
  61. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2 -0
  62. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +26 -0
  63. package/sdk/platform/Content/ContentPlatformModel.js +3 -1
  64. package/sdk/platform/Finance/FinancePlatformClient.d.ts +135 -0
  65. package/sdk/platform/Finance/FinancePlatformClient.js +853 -0
  66. package/sdk/platform/Finance/FinancePlatformModel.d.ts +51 -0
  67. package/sdk/platform/Finance/FinancePlatformModel.js +342 -0
  68. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +16 -0
  69. package/sdk/platform/Finance/FinancePlatformValidator.js +84 -0
  70. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +11 -1
  71. package/sdk/platform/Order/OrderPlatformApplicationClient.js +66 -2
  72. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -0
  73. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -0
  74. package/sdk/platform/Order/OrderPlatformClient.d.ts +159 -79
  75. package/sdk/platform/Order/OrderPlatformClient.js +541 -114
  76. package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
  77. package/sdk/platform/Order/OrderPlatformModel.js +569 -159
  78. package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
  79. package/sdk/platform/Order/OrderPlatformValidator.js +51 -9
  80. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +22 -0
  81. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +127 -0
  82. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +2 -0
  83. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +13 -0
  84. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +145 -0
  85. package/sdk/platform/Partner/PartnerPlatformClient.js +799 -0
  86. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +39 -0
  87. package/sdk/platform/Partner/PartnerPlatformModel.js +367 -0
  88. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +14 -0
  89. package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -0
  90. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +221 -0
  91. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1476 -190
  92. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +20 -0
  93. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +126 -0
  94. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
  95. package/sdk/platform/Payment/PaymentPlatformModel.js +410 -0
  96. package/sdk/platform/PlatformApplicationClient.d.ts +1149 -938
  97. package/sdk/platform/PlatformApplicationClient.js +1259 -1035
  98. package/sdk/platform/PlatformClient.d.ts +9888 -8286
  99. package/sdk/platform/PlatformClient.js +10960 -9038
  100. package/sdk/platform/index.d.ts +15 -14
  101. package/sdk/platform/index.js +20 -18
  102. package/sdk/public/PublicClient.d.ts +2 -2
  103. package/sdk/public/PublicClient.js +4 -4
  104. package/sdk/public/index.d.ts +1 -1
  105. package/sdk/public/index.js +2 -2
  106. package/partner.d.ts +0 -4
  107. package/partner.js +0 -7
  108. package/sdk/partner/OAuthClient.d.ts +0 -14
  109. package/sdk/partner/OAuthClient.js +0 -112
  110. package/sdk/partner/PartnerAPIClient.d.ts +0 -12
  111. package/sdk/partner/PartnerAPIClient.js +0 -42
  112. package/sdk/partner/PartnerClient.d.ts +0 -6
  113. package/sdk/partner/PartnerClient.js +0 -17
  114. package/sdk/partner/PartnerConfig.d.ts +0 -30
  115. package/sdk/partner/PartnerConfig.js +0 -39
  116. package/sdk/partner/index.d.ts +0 -3
  117. package/sdk/partner/index.js +0 -5
@@ -3,6 +3,16 @@ declare class Cart {
3
3
  constructor(config: any, applicationId: any);
4
4
  config: any;
5
5
  applicationId: any;
6
+ /**
7
+ * @param {Object} arg - Arg object.
8
+ * @param {PlatformAddress} arg.body
9
+ * @returns {Promise<SaveAddressResponse>} - Success response
10
+ * @summary: Add address to an account
11
+ * @description: Use this API to add an address to an account.
12
+ */
13
+ addAddress({ body }?: {
14
+ body: PlatformAddress;
15
+ }): Promise<SaveAddressResponse>;
6
16
  /**
7
17
  * @param {Object} arg - Arg object.
8
18
  * @param {string} arg.cartId - Current Cart _id
@@ -17,6 +27,26 @@ declare class Cart {
17
27
  b?: boolean;
18
28
  body: AddCartRequest;
19
29
  }): Promise<AddCartDetailResponse>;
30
+ /**
31
+ * @param {Object} arg - Arg object.
32
+ * @param {boolean} [arg.i] -
33
+ * @param {boolean} [arg.b] -
34
+ * @param {boolean} [arg.p] -
35
+ * @param {string} [arg.id] -
36
+ * @param {boolean} [arg.buyNow] -
37
+ * @param {ApplyCouponRequest} arg.body
38
+ * @returns {Promise<CartDetailResponse>} - Success response
39
+ * @summary: Apply Coupon for platform pos user
40
+ * @description: Use this API to apply coupons on items in the cart.
41
+ */
42
+ applyCoupon({ body, i, b, p, id, buyNow }?: {
43
+ i?: boolean;
44
+ b?: boolean;
45
+ p?: boolean;
46
+ id?: string;
47
+ buyNow?: boolean;
48
+ body: ApplyCouponRequest;
49
+ }): Promise<CartDetailResponse>;
20
50
  /**
21
51
  * @param {Object} arg - Arg object.
22
52
  * @param {OpenApiCartServiceabilityRequest} arg.body
@@ -67,6 +97,18 @@ declare class Cart {
67
97
  createPromotion({ body }?: {
68
98
  body: PromotionAdd;
69
99
  }): Promise<PromotionAdd>;
100
+ /**
101
+ * @param {Object} arg - Arg object.
102
+ * @param {string} [arg.id] - The unique identifier of the cart.
103
+ * @param {DeleteCartRequest} arg.body
104
+ * @returns {Promise<DeleteCartDetailResponse>} - Success response
105
+ * @summary: Delete cart once user made successful checkout
106
+ * @description: Use this API to delete the cart.
107
+ */
108
+ deleteCart({ body, id }?: {
109
+ id?: string;
110
+ body: DeleteCartRequest;
111
+ }): Promise<DeleteCartDetailResponse>;
70
112
  /**
71
113
  * @param {Object} arg - Arg object.
72
114
  * @param {OpenapiCartDetailsRequest} arg.body
@@ -143,6 +185,130 @@ declare class Cart {
143
185
  i?: boolean;
144
186
  b?: boolean;
145
187
  }): Promise<CartDetailResponse>;
188
+ /**
189
+ * @param {Object} arg - Arg object.
190
+ * @param {string} arg.id -
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
+ * @param {string} [arg.userId] -
198
+ * @returns {Promise<PlatformAddress>} - Success response
199
+ * @summary: Fetch a single address by its ID
200
+ * @description: Use this API to get an addresses using its ID. If successful, returns a Address resource in the response body specified in `PlatformAddress`. 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>
201
+ */
202
+ getAddressById({ id, cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, userId, }?: {
203
+ id: string;
204
+ cartId?: string;
205
+ buyNow?: boolean;
206
+ mobileNo?: string;
207
+ checkoutMode?: string;
208
+ tags?: string;
209
+ isDefault?: boolean;
210
+ userId?: string;
211
+ }): Promise<PlatformAddress>;
212
+ /**
213
+ * @param {Object} arg - Arg object.
214
+ * @param {string} [arg.cartId] -
215
+ * @param {boolean} [arg.buyNow] -
216
+ * @param {string} [arg.mobileNo] -
217
+ * @param {string} [arg.checkoutMode] -
218
+ * @param {string} [arg.tags] -
219
+ * @param {boolean} [arg.isDefault] -
220
+ * @param {string} [arg.userId] -
221
+ * @returns {Promise<PlatformGetAddressesResponse>} - Success response
222
+ * @summary: Fetch address
223
+ * @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>
224
+ */
225
+ getAddresses({ cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, userId, }?: {
226
+ cartId?: string;
227
+ buyNow?: boolean;
228
+ mobileNo?: string;
229
+ checkoutMode?: string;
230
+ tags?: string;
231
+ isDefault?: boolean;
232
+ userId?: string;
233
+ }): Promise<PlatformGetAddressesResponse>;
234
+ /**
235
+ * @param {Object} arg - Arg object.
236
+ * @param {string} [arg.id] -
237
+ * @param {boolean} [arg.buyNow] -
238
+ * @returns {Promise<GetCouponResponse>} - Success response
239
+ * @summary: Fetch Coupon
240
+ * @description: Use this API to get a list of available coupons along with their details.
241
+ */
242
+ getAppCoupons({ id, buyNow }?: {
243
+ id?: string;
244
+ buyNow?: boolean;
245
+ }): Promise<GetCouponResponse>;
246
+ /**
247
+ * @param {Object} arg - Arg object.
248
+ * @param {string} arg.areaCode -
249
+ * @param {string} [arg.id] -
250
+ * @returns {Promise<CartDeliveryModesResponse>} - Success response
251
+ * @summary: Get available delivery modes for cart
252
+ * @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.
253
+ */
254
+ getAvailableDeliveryModes({ areaCode, id }?: {
255
+ areaCode: string;
256
+ id?: string;
257
+ }): Promise<CartDeliveryModesResponse>;
258
+ /**
259
+ * @param {Object} arg - Arg object.
260
+ * @param {string} [arg.id] -
261
+ * @param {string} [arg.userId] -
262
+ * @param {boolean} [arg.i] -
263
+ * @param {boolean} [arg.b] -
264
+ * @param {number} [arg.assignCardId] -
265
+ * @param {boolean} [arg.buyNow] -
266
+ * @returns {Promise<CartDetailResponse>} - Success response
267
+ * @summary: Fetch all items added to the customer cart using cart id
268
+ * @description: Use this API to get details of all the items added to a cart.
269
+ */
270
+ getCart({ id, userId, i, b, assignCardId, buyNow }?: {
271
+ id?: string;
272
+ userId?: string;
273
+ i?: boolean;
274
+ b?: boolean;
275
+ assignCardId?: number;
276
+ buyNow?: boolean;
277
+ }): Promise<CartDetailResponse>;
278
+ /**
279
+ * @param {Object} arg - Arg object.
280
+ * @param {string} [arg.fromDate] -
281
+ * @param {string} [arg.toDate] -
282
+ * @param {string} [arg.filterOn] -
283
+ * @returns {Promise<MultiCartResponse>} - Success response
284
+ * @summary: Get cart list for store os user
285
+ * @description: Get all carts for the store os user which is created for customer
286
+ */
287
+ getCartList({ fromDate, toDate, filterOn }?: {
288
+ fromDate?: string;
289
+ toDate?: string;
290
+ filterOn?: string;
291
+ }): Promise<MultiCartResponse>;
292
+ /**
293
+ * @param {Object} arg - Arg object.
294
+ * @param {GetShareCartLinkRequest} arg.body
295
+ * @returns {Promise<GetShareCartLinkResponse>} - Success response
296
+ * @summary: Generate token for sharing the cart
297
+ * @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.
298
+ */
299
+ getCartShareLink({ body }?: {
300
+ body: GetShareCartLinkRequest;
301
+ }): Promise<GetShareCartLinkResponse>;
302
+ /**
303
+ * @param {Object} arg - Arg object.
304
+ * @param {string} arg.token - Token of the shared short link
305
+ * @returns {Promise<SharedCartResponse>} - Success response
306
+ * @summary: Get details of a shared cart
307
+ * @description: Use this API to get the shared cart details as per the token generated using the share-cart API.
308
+ */
309
+ getCartSharedItems({ token }?: {
310
+ token: string;
311
+ }): Promise<SharedCartResponse>;
146
312
  /**
147
313
  * @param {Object} arg - Arg object.
148
314
  * @param {string} arg.id -
@@ -221,8 +387,20 @@ declare class Cart {
221
387
  }): Paginator;
222
388
  /**
223
389
  * @param {Object} arg - Arg object.
224
- * @param {string} [arg.entityType] - Entity_type as coupon or promotion
225
- * @param {boolean} [arg.isHidden] - Show Promo Coupon Config or not
390
+ * @param {string} [arg.id] - The unique identifier of the cart.
391
+ * @param {boolean} [arg.buyNow] -
392
+ * @returns {Promise<CartItemCountResponse>} - Success response
393
+ * @summary: Count items in the customer's cart
394
+ * @description: Use this API to get the total number of items present in cart.
395
+ */
396
+ getItemCount({ id, buyNow }?: {
397
+ id?: string;
398
+ buyNow?: boolean;
399
+ }): Promise<CartItemCountResponse>;
400
+ /**
401
+ * @param {Object} arg - Arg object.
402
+ * @param {string} [arg.entityType] - Entity_type as promotion or coupon
403
+ * @param {boolean} [arg.isHidden] - Promo-coupon config shown or not
226
404
  * @returns {Promise<ActivePromosResponse>} - Success response
227
405
  * @summary: Fetch all promos that are set as active
228
406
  * @description: Use this API to get list of all the active promos/coupons.
@@ -300,6 +478,45 @@ declare class Cart {
300
478
  fpPanel?: string;
301
479
  promotionId?: string;
302
480
  }): Paginator;
481
+ /**
482
+ * @param {Object} arg - Arg object.
483
+ * @param {number} [arg.pickAtStoreUid] -
484
+ * @param {number} [arg.orderingStoreId] -
485
+ * @param {boolean} [arg.i] - This is a boolean value. Select `true` to
486
+ * retrieve all the items added in the cart.
487
+ * @param {boolean} [arg.p] - This is a boolean value. Select `true` for
488
+ * getting a payment option in response.
489
+ * @param {string} [arg.id] - The unique identifier of the cart
490
+ * @param {string} [arg.addressId] - ID allotted to the selected address
491
+ * @param {string} [arg.areaCode] - The PIN Code of the destination address,
492
+ * e.g. 400059
493
+ * @param {string} [arg.orderType] - The order type of shipment HomeDelivery
494
+ * - If the customer wants the order home-delivered PickAtStore - If the
495
+ * customer wants the handover of an order at the store itself.
496
+ * @returns {Promise<PlatformCartShipmentsResponse>} - Success response
497
+ * @summary: Get delivery date and options before checkout
498
+ * @description: Use this API to get shipment details, expected delivery date, items and price breakup of the shipment.
499
+ */
500
+ getShipments({ pickAtStoreUid, orderingStoreId, i, p, id, addressId, areaCode, orderType, }?: {
501
+ pickAtStoreUid?: number;
502
+ orderingStoreId?: number;
503
+ i?: boolean;
504
+ p?: boolean;
505
+ id?: string;
506
+ addressId?: string;
507
+ areaCode?: string;
508
+ orderType?: string;
509
+ }): Promise<PlatformCartShipmentsResponse>;
510
+ /**
511
+ * @param {Object} arg - Arg object.
512
+ * @param {number} arg.storeUid -
513
+ * @returns {Promise<StoreDetailsResponse>} - Success response
514
+ * @summary: Get list of stores for give uids
515
+ * @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.
516
+ */
517
+ getStoreAddressByUid({ storeUid }?: {
518
+ storeUid: number;
519
+ }): Promise<StoreDetailsResponse>;
303
520
  /**
304
521
  * @param {Object} arg - Arg object.
305
522
  * @param {OverrideCheckoutReq} arg.body
@@ -310,6 +527,156 @@ declare class Cart {
310
527
  overrideCart({ body }?: {
311
528
  body: OverrideCheckoutReq;
312
529
  }): Promise<OverrideCheckoutResponse>;
530
+ /**
531
+ * @param {Object} arg - Arg object.
532
+ * @param {boolean} [arg.i] -
533
+ * @param {boolean} [arg.b] -
534
+ * @param {boolean} [arg.buyNow] -
535
+ * @param {string} [arg.id] -
536
+ * @param {PlatformAddCartRequest} arg.body
537
+ * @returns {Promise<AddCartDetailResponse>} - Success response
538
+ * @summary: Add items to cart
539
+ * @description: Use this API to add items to the cart.
540
+ */
541
+ platformAddItems({ body, i, b, buyNow, id }?: {
542
+ i?: boolean;
543
+ b?: boolean;
544
+ buyNow?: boolean;
545
+ id?: string;
546
+ body: PlatformAddCartRequest;
547
+ }): Promise<AddCartDetailResponse>;
548
+ /**
549
+ * @param {Object} arg - Arg object.
550
+ * @param {string} [arg.id] -
551
+ * @param {PlatformCartCheckoutDetailRequest} arg.body
552
+ * @returns {Promise<CartCheckoutResponse>} - Success response
553
+ * @summary: Checkout all items in the cart
554
+ * @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.
555
+ */
556
+ platformCheckoutCart({ body, id }?: {
557
+ id?: string;
558
+ body: PlatformCartCheckoutDetailRequest;
559
+ }): Promise<CartCheckoutResponse>;
560
+ /**
561
+ * @param {Object} arg - Arg object.
562
+ * @param {string} [arg.id] -
563
+ * @param {PlatformCartCheckoutDetailV2Request} arg.body
564
+ * @returns {Promise<CartCheckoutResponse>} - Success response
565
+ * @summary: Checkout all items in the cart
566
+ * @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.
567
+ */
568
+ platformCheckoutCartV2({ body, id }?: {
569
+ id?: string;
570
+ body: PlatformCartCheckoutDetailV2Request;
571
+ }): Promise<CartCheckoutResponse>;
572
+ /**
573
+ * @param {Object} arg - Arg object.
574
+ * @param {string} [arg.id] -
575
+ * @param {boolean} [arg.i] -
576
+ * @param {boolean} [arg.b] -
577
+ * @param {boolean} [arg.buyNow] -
578
+ * @param {PlatformUpdateCartRequest} arg.body
579
+ * @returns {Promise<UpdateCartDetailResponse>} - Success response
580
+ * @summary: Update items in the customer 's cart using cart id
581
+ * @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>
582
+ */
583
+ platformUpdateCart({ body, id, i, b, buyNow }?: {
584
+ id?: string;
585
+ i?: boolean;
586
+ b?: boolean;
587
+ buyNow?: boolean;
588
+ body: PlatformUpdateCartRequest;
589
+ }): Promise<UpdateCartDetailResponse>;
590
+ /**
591
+ * @param {Object} arg - Arg object.
592
+ * @param {string} arg.id - ID allotted to the selected address
593
+ * @param {string} [arg.userId] - Option to delete address for the provided user_id.
594
+ * @returns {Promise<DeleteAddressResponse>} - Success response
595
+ * @summary: Remove address associated with an account
596
+ * @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.
597
+ */
598
+ removeAddress({ id, userId }?: {
599
+ id: string;
600
+ userId?: string;
601
+ }): Promise<DeleteAddressResponse>;
602
+ /**
603
+ * @param {Object} arg - Arg object.
604
+ * @param {string} [arg.uid] -
605
+ * @param {boolean} [arg.buyNow] -
606
+ * @returns {Promise<CartDetailResponse>} - Success response
607
+ * @summary: Remove Applied Coupon for platform pos user
608
+ * @description: Remove Coupon applied on the cart by passing uid in request body.
609
+ */
610
+ removeCoupon({ uid, buyNow }?: {
611
+ uid?: string;
612
+ buyNow?: boolean;
613
+ }): Promise<CartDetailResponse>;
614
+ /**
615
+ * @param {Object} arg - Arg object.
616
+ * @param {string} [arg.cartId] -
617
+ * @param {boolean} [arg.buyNow] -
618
+ * @param {boolean} [arg.i] -
619
+ * @param {boolean} [arg.b] -
620
+ * @param {PlatformSelectCartAddressRequest} arg.body
621
+ * @returns {Promise<CartDetailResponse>} - Success response
622
+ * @summary: Select an address from available addresses
623
+ * @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 `PlatformSelectCartAddressRequest` 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>
624
+ */
625
+ selectAddress({ body, cartId, buyNow, i, b }?: {
626
+ cartId?: string;
627
+ buyNow?: boolean;
628
+ i?: boolean;
629
+ b?: boolean;
630
+ body: PlatformSelectCartAddressRequest;
631
+ }): Promise<CartDetailResponse>;
632
+ /**
633
+ * @param {Object} arg - Arg object.
634
+ * @param {string} [arg.id] -
635
+ * @param {boolean} [arg.buyNow] -
636
+ * @param {string} [arg.orderType] - The order type of shipment HomeDelivery
637
+ * - If the customer wants the order home-delivered PickAtStore - If the
638
+ * customer wants the handover of an order at the store itself.
639
+ * @param {UpdateCartPaymentRequest} arg.body
640
+ * @returns {Promise<CartDetailResponse>} - Success response
641
+ * @summary: Update cart payment
642
+ * @description: Use this API to update cart payment.
643
+ */
644
+ selectPaymentMode({ body, id, buyNow, orderType }?: {
645
+ id?: string;
646
+ buyNow?: boolean;
647
+ orderType?: string;
648
+ body: UpdateCartPaymentRequest;
649
+ }): Promise<CartDetailResponse>;
650
+ /**
651
+ * @param {Object} arg - Arg object.
652
+ * @param {string} [arg.id] -
653
+ * @param {boolean} [arg.buyNow] -
654
+ * @param {string} [arg.orderType] - The order type of shipment HomeDelivery
655
+ * - If the customer wants the order home-delivered PickAtStore - If the
656
+ * customer wants the handover of an order at the store itself.
657
+ * @param {UpdateCartPaymentRequestV2} arg.body
658
+ * @returns {Promise<CartDetailResponse>} - Success response
659
+ * @summary: Update cart payment
660
+ * @description: Use this API to update cart payment.
661
+ */
662
+ selectPaymentModeV2({ body, id, buyNow, orderType }?: {
663
+ id?: string;
664
+ buyNow?: boolean;
665
+ orderType?: string;
666
+ body: UpdateCartPaymentRequestV2;
667
+ }): Promise<CartDetailResponse>;
668
+ /**
669
+ * @param {Object} arg - Arg object.
670
+ * @param {string} arg.id - ID allotted to the selected address
671
+ * @param {PlatformAddress} arg.body
672
+ * @returns {Promise<UpdateAddressResponse>} - Success response
673
+ * @summary: Update address added to an account
674
+ * @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>
675
+ */
676
+ updateAddress({ id, body }?: {
677
+ id: string;
678
+ body: PlatformAddress;
679
+ }): Promise<UpdateAddressResponse>;
313
680
  /**
314
681
  * @param {Object} arg - Arg object.
315
682
  * @param {string} arg.cartId - Current Cart _id
@@ -324,6 +691,20 @@ declare class Cart {
324
691
  b?: boolean;
325
692
  body: UpdateCartRequest;
326
693
  }): Promise<UpdateCartDetailResponse>;
694
+ /**
695
+ * @param {Object} arg - Arg object.
696
+ * @param {string} [arg.id] -
697
+ * @param {boolean} [arg.buyNow] -
698
+ * @param {PlatformCartMetaRequest} arg.body
699
+ * @returns {Promise<CartMetaResponse>} - Success response
700
+ * @summary: Update the cart meta for platform pos user
701
+ * @description: Use this API to update cart meta like checkout_mode and gstin.
702
+ */
703
+ updateCartMeta({ body, id, buyNow }?: {
704
+ id?: string;
705
+ buyNow?: boolean;
706
+ body: PlatformCartMetaRequest;
707
+ }): Promise<CartMetaResponse>;
327
708
  /**
328
709
  * @param {Object} arg - Arg object.
329
710
  * @param {string} arg.cartMetaId -
@@ -336,6 +717,33 @@ declare class Cart {
336
717
  cartMetaId: string;
337
718
  body: CartMetaConfigUpdate;
338
719
  }): Promise<CartMetaConfigUpdate>;
720
+ /**
721
+ * @param {Object} arg - Arg object.
722
+ * @param {string} [arg.id] -
723
+ * @param {UpdateUserCartMapping} arg.body
724
+ * @returns {Promise<UserCartMappingResponse>} - Success response
725
+ * @summary: Update user id for store os customer
726
+ * @description: Update user id for store os customer after creating customer
727
+ */
728
+ updateCartUser({ body, id }?: {
729
+ id?: string;
730
+ body: UpdateUserCartMapping;
731
+ }): Promise<UserCartMappingResponse>;
732
+ /**
733
+ * @param {Object} arg - Arg object.
734
+ * @param {string} arg.token - Token of the shared short link
735
+ * @param {string} arg.action - Operation to perform on the existing cart
736
+ * merge or replace.
737
+ * @param {string} [arg.cartId] -
738
+ * @returns {Promise<SharedCartResponse>} - Success response
739
+ * @summary: Merge or replace existing cart
740
+ * @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.
741
+ */
742
+ updateCartWithSharedItems({ token, action, cartId }?: {
743
+ token: string;
744
+ action: string;
745
+ cartId?: string;
746
+ }): Promise<SharedCartResponse>;
339
747
  /**
340
748
  * @param {Object} arg - Arg object.
341
749
  * @param {string} arg.id -
@@ -384,5 +792,54 @@ declare class Cart {
384
792
  id: string;
385
793
  body: PromotionPartialUpdate;
386
794
  }): Promise<SuccessMessage>;
795
+ /**
796
+ * @param {Object} arg - Arg object.
797
+ * @param {boolean} [arg.i] - This is a boolean value. Select `true` to
798
+ * retrieve all the items added in the cart.
799
+ * @param {boolean} [arg.p] - This is a boolean value. Select `true` for
800
+ * getting a payment option in response.
801
+ * @param {string} [arg.id] - The unique identifier of the cart
802
+ * @param {string} [arg.addressId] - ID allotted to an address
803
+ * @param {string} [arg.areaCode] - The PIN Code of the destination address,
804
+ * e.g. 400059
805
+ * @param {string} [arg.orderType] - The order type of shipment HomeDelivery
806
+ * - If the customer wants the order home-delivered PickAtStore - If the
807
+ * customer wants the handover of an order at the store itself.
808
+ * @param {UpdateCartShipmentRequest} arg.body
809
+ * @returns {Promise<PlatformCartShipmentsResponse>} - Success response
810
+ * @summary: Update shipment delivery type and quantity before checkout
811
+ * @description: Use this API to update the delivery type and quantity as per customer's preference for either store pick-up or home-delivery.
812
+ */
813
+ updateShipments({ body, i, p, id, addressId, areaCode, orderType, }?: {
814
+ i?: boolean;
815
+ p?: boolean;
816
+ id?: string;
817
+ addressId?: string;
818
+ areaCode?: string;
819
+ orderType?: string;
820
+ body: UpdateCartShipmentRequest;
821
+ }): Promise<PlatformCartShipmentsResponse>;
822
+ /**
823
+ * @param {Object} arg - Arg object.
824
+ * @param {string} [arg.id] -
825
+ * @param {boolean} [arg.buyNow] -
826
+ * @param {string} [arg.addressId] -
827
+ * @param {string} [arg.paymentMode] -
828
+ * @param {string} [arg.paymentIdentifier] -
829
+ * @param {string} [arg.aggregatorName] -
830
+ * @param {string} [arg.merchantCode] -
831
+ * @returns {Promise<PaymentCouponValidate>} - Success response
832
+ * @summary: Verify the coupon eligibility against the payment mode
833
+ * @description: Use this API to validate a coupon against the payment mode such as NetBanking, Wallet, UPI etc.
834
+ */
835
+ validateCouponForPayment({ id, buyNow, addressId, paymentMode, paymentIdentifier, aggregatorName, merchantCode, }?: {
836
+ id?: string;
837
+ buyNow?: boolean;
838
+ addressId?: string;
839
+ paymentMode?: string;
840
+ paymentIdentifier?: string;
841
+ aggregatorName?: string;
842
+ merchantCode?: string;
843
+ }): Promise<PaymentCouponValidate>;
387
844
  }
388
845
  import Paginator = require("../../common/Paginator");