@gofynd/fdk-client-javascript 1.1.1 → 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 (140) 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 +45 -4
  8. package/sdk/application/Cart/CartApplicationClient.js +169 -9
  9. package/sdk/application/Cart/CartApplicationModel.d.ts +15 -0
  10. package/sdk/application/Cart/CartApplicationModel.js +177 -1
  11. package/sdk/application/Cart/CartApplicationValidator.d.ts +2 -0
  12. package/sdk/application/Cart/CartApplicationValidator.js +20 -0
  13. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +14 -4
  14. package/sdk/application/Catalog/CatalogApplicationClient.js +18 -6
  15. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1 -0
  16. package/sdk/application/Catalog/CatalogApplicationModel.js +13 -0
  17. package/sdk/application/Catalog/CatalogApplicationValidator.js +2 -0
  18. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +14 -10
  19. package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
  20. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1 -0
  21. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
  22. package/sdk/application/Content/ContentApplicationModel.js +4 -1
  23. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -2
  24. package/sdk/application/FileStorage/FileStorageApplicationClient.js +8 -2
  25. package/sdk/application/FileStorage/FileStorageApplicationModel.js +2 -2
  26. package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
  27. package/sdk/application/Order/OrderApplicationClient.d.ts +17 -2
  28. package/sdk/application/Order/OrderApplicationClient.js +70 -2
  29. package/sdk/application/Order/OrderApplicationModel.d.ts +17 -0
  30. package/sdk/application/Order/OrderApplicationModel.js +129 -8
  31. package/sdk/application/Order/OrderApplicationValidator.d.ts +1 -0
  32. package/sdk/application/Order/OrderApplicationValidator.js +7 -0
  33. package/sdk/application/Payment/PaymentApplicationClient.d.ts +35 -0
  34. package/sdk/application/Payment/PaymentApplicationClient.js +200 -0
  35. package/sdk/application/Payment/PaymentApplicationModel.d.ts +4 -0
  36. package/sdk/application/Payment/PaymentApplicationModel.js +58 -7
  37. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +3 -0
  38. package/sdk/application/Payment/PaymentApplicationValidator.js +19 -0
  39. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +16 -3
  40. package/sdk/application/PosCart/PosCartApplicationClient.js +39 -6
  41. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +10 -0
  42. package/sdk/application/PosCart/PosCartApplicationModel.js +113 -1
  43. package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
  44. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +8 -8
  45. package/sdk/application/Rewards/RewardsApplicationClient.js +8 -8
  46. package/sdk/application/index.d.ts +10 -10
  47. package/sdk/application/index.js +13 -13
  48. package/sdk/common/AxiosHelper.js +1 -1
  49. package/sdk/common/Constant.d.ts +5 -0
  50. package/sdk/common/Constant.js +5 -0
  51. package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
  52. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +479 -0
  53. package/sdk/platform/Cart/CartPlatformApplicationClient.js +2574 -307
  54. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +31 -0
  55. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +263 -0
  56. package/sdk/platform/Cart/CartPlatformModel.d.ts +61 -0
  57. package/sdk/platform/Cart/CartPlatformModel.js +697 -2
  58. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +8 -2
  59. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +10 -0
  60. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
  61. package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -2
  62. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1 -0
  63. package/sdk/platform/Catalog/CatalogPlatformModel.js +41 -29
  64. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1 -0
  65. package/sdk/platform/Communication/CommunicationPlatformModel.js +9 -0
  66. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -2
  67. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +2 -2
  68. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +5 -4
  69. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +99 -78
  70. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +99 -78
  71. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +87 -71
  72. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +87 -71
  73. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2 -0
  74. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +26 -0
  75. package/sdk/platform/Content/ContentPlatformModel.js +4 -1
  76. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +10 -4
  77. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +15 -9
  78. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
  79. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +1 -1
  80. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -2
  81. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -2
  82. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +2 -2
  83. package/sdk/platform/Finance/FinancePlatformClient.d.ts +135 -0
  84. package/sdk/platform/Finance/FinancePlatformClient.js +853 -0
  85. package/sdk/platform/Finance/FinancePlatformModel.d.ts +51 -0
  86. package/sdk/platform/Finance/FinancePlatformModel.js +342 -0
  87. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +16 -0
  88. package/sdk/platform/Finance/FinancePlatformValidator.js +84 -0
  89. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +11 -1
  90. package/sdk/platform/Order/OrderPlatformApplicationClient.js +66 -2
  91. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -0
  92. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -0
  93. package/sdk/platform/Order/OrderPlatformClient.d.ts +161 -81
  94. package/sdk/platform/Order/OrderPlatformClient.js +546 -119
  95. package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
  96. package/sdk/platform/Order/OrderPlatformModel.js +570 -158
  97. package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
  98. package/sdk/platform/Order/OrderPlatformValidator.js +52 -10
  99. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +22 -0
  100. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +127 -0
  101. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +2 -0
  102. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +13 -0
  103. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +145 -0
  104. package/sdk/platform/Partner/PartnerPlatformClient.js +799 -0
  105. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +39 -0
  106. package/sdk/platform/Partner/PartnerPlatformModel.js +367 -0
  107. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +14 -0
  108. package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -0
  109. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +221 -0
  110. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1476 -190
  111. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +20 -0
  112. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +126 -0
  113. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
  114. package/sdk/platform/Payment/PaymentPlatformModel.js +410 -0
  115. package/sdk/platform/PlatformApplicationClient.d.ts +1149 -930
  116. package/sdk/platform/PlatformApplicationClient.js +1260 -1027
  117. package/sdk/platform/PlatformClient.d.ts +10360 -8660
  118. package/sdk/platform/PlatformClient.js +11126 -9093
  119. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +14 -26
  120. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +14 -74
  121. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -1
  122. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -7
  123. package/sdk/platform/index.d.ts +15 -14
  124. package/sdk/platform/index.js +20 -18
  125. package/sdk/public/PublicClient.d.ts +2 -2
  126. package/sdk/public/PublicClient.js +4 -4
  127. package/sdk/public/index.d.ts +1 -1
  128. package/sdk/public/index.js +2 -2
  129. package/partner.d.ts +0 -4
  130. package/partner.js +0 -7
  131. package/sdk/partner/OAuthClient.d.ts +0 -14
  132. package/sdk/partner/OAuthClient.js +0 -112
  133. package/sdk/partner/PartnerAPIClient.d.ts +0 -12
  134. package/sdk/partner/PartnerAPIClient.js +0 -42
  135. package/sdk/partner/PartnerClient.d.ts +0 -6
  136. package/sdk/partner/PartnerClient.js +0 -17
  137. package/sdk/partner/PartnerConfig.d.ts +0 -30
  138. package/sdk/partner/PartnerConfig.js +0 -39
  139. package/sdk/partner/index.d.ts +0 -3
  140. package/sdk/partner/index.js +0 -5
@@ -91,9 +91,9 @@ class PaymentModel {
91
91
  }
92
92
  static BalanceDetails() {
93
93
  return Joi.object({
94
- currency: Joi.string().allow("").required(),
95
- formatted_value: Joi.string().allow("").required(),
96
- value: Joi.number().required(),
94
+ currency: Joi.string().allow("").allow(null),
95
+ formatted_value: Joi.string().allow("").allow(null),
96
+ value: Joi.number().allow(null),
97
97
  });
98
98
  }
99
99
  static BankDetailsForOTP() {
@@ -168,6 +168,32 @@ class PaymentModel {
168
168
  nickname: Joi.string().allow("").allow(null),
169
169
  });
170
170
  }
171
+ static CardDetails() {
172
+ return Joi.object({
173
+ bank: Joi.string().allow("").required(),
174
+ bank_code: Joi.string().allow("").allow(null).required(),
175
+ card_brand: Joi.string().allow("").required(),
176
+ card_exp_month: Joi.string().allow(""),
177
+ card_exp_year: Joi.string().allow(""),
178
+ card_object: Joi.string().allow("").required(),
179
+ card_sub_type: Joi.string().allow("").allow(null).required(),
180
+ card_token: Joi.string().allow(""),
181
+ country: Joi.string().allow("").required(),
182
+ extended_card_type: Joi.string().allow("").required(),
183
+ id: Joi.string().allow("").required(),
184
+ is_domestic_card: Joi.boolean().required(),
185
+ name_on_card: Joi.string().allow(""),
186
+ status: Joi.boolean().required(),
187
+ type: Joi.string().allow("").required(),
188
+ user: Joi.string().allow(""),
189
+ });
190
+ }
191
+ static CardDetailsResponse() {
192
+ return Joi.object({
193
+ data: PaymentModel.CardDetails().required(),
194
+ success: Joi.boolean().required(),
195
+ });
196
+ }
171
197
  static CardPaymentGateway() {
172
198
  return Joi.object({
173
199
  aggregator: Joi.string().allow("").required(),
@@ -281,10 +307,13 @@ class PaymentModel {
281
307
  }
282
308
  static CreditSummary() {
283
309
  return Joi.object({
310
+ amount_available: PaymentModel.BalanceDetails(),
284
311
  balance: PaymentModel.BalanceDetails(),
285
- merchant_customer_ref_id: Joi.string().allow("").required(),
286
- status: Joi.string().allow("").required(),
287
- status_message: Joi.string().allow("").required(),
312
+ buyer_status: Joi.string().allow("").allow(null),
313
+ credit_line_id: Joi.string().allow("").allow(null),
314
+ merchant_customer_ref_id: Joi.string().allow("").allow(null),
315
+ status: Joi.string().allow("").allow(null),
316
+ status_message: Joi.string().allow("").allow(null),
288
317
  });
289
318
  }
290
319
  static CustomerCreditSummaryResponse() {
@@ -492,8 +521,25 @@ class PaymentModel {
492
521
  show_beneficiary_details: Joi.boolean(),
493
522
  });
494
523
  }
524
+ static OutstandingOrderDetailsResponse() {
525
+ return Joi.object({
526
+ data: Joi.array().items(Joi.any()),
527
+ message: Joi.string().allow("").allow(null),
528
+ status_code: Joi.number().required(),
529
+ success: Joi.boolean().required(),
530
+ });
531
+ }
532
+ static PaidOrderDetailsResponse() {
533
+ return Joi.object({
534
+ data: Joi.array().items(Joi.any()),
535
+ message: Joi.string().allow("").allow(null),
536
+ status_code: Joi.number().required(),
537
+ success: Joi.boolean().required(),
538
+ });
539
+ }
495
540
  static PaymentFlow() {
496
541
  return Joi.object({
542
+ ajiodhan: PaymentModel.AggregatorRoute(),
497
543
  bqr_razorpay: PaymentModel.AggregatorRoute(),
498
544
  ccavenue: PaymentModel.AggregatorRoute(),
499
545
  epaylater: PaymentModel.AggregatorRoute(),
@@ -516,6 +562,7 @@ class PaymentModel {
516
562
  contact: Joi.string().allow("").required(),
517
563
  currency: Joi.string().allow("").required(),
518
564
  customer_id: Joi.string().allow("").required(),
565
+ device_id: Joi.string().allow("").allow(null),
519
566
  email: Joi.string().allow("").required(),
520
567
  merchant_order_id: Joi.string().allow("").required(),
521
568
  method: Joi.string().allow("").required(),
@@ -533,6 +580,7 @@ class PaymentModel {
533
580
  bqr_image: Joi.string().allow("").allow(null),
534
581
  currency: Joi.string().allow("").allow(null),
535
582
  customer_id: Joi.string().allow("").allow(null),
583
+ device_id: Joi.string().allow("").allow(null),
536
584
  merchant_order_id: Joi.string().allow("").required(),
537
585
  method: Joi.string().allow("").required(),
538
586
  polling_url: Joi.string().allow("").required(),
@@ -618,12 +666,14 @@ class PaymentModel {
618
666
  contact: Joi.string().allow("").required(),
619
667
  currency: Joi.string().allow("").required(),
620
668
  customer_id: Joi.string().allow("").required(),
669
+ device_id: Joi.string().allow("").allow(null),
621
670
  email: Joi.string().allow("").required(),
622
671
  merchant_order_id: Joi.string().allow("").required(),
672
+ merchant_transaction_id: Joi.string().allow("").required(),
623
673
  method: Joi.string().allow("").required(),
624
674
  order_id: Joi.string().allow("").required(),
625
675
  status: Joi.string().allow("").required(),
626
- vpa: Joi.string().allow("").required(),
676
+ vpa: Joi.string().allow(""),
627
677
  });
628
678
  }
629
679
  static PaymentStatusUpdateResponse() {
@@ -682,6 +732,7 @@ class PaymentModel {
682
732
  }
683
733
  static ResendOrCancelPaymentRequest() {
684
734
  return Joi.object({
735
+ device_id: Joi.string().allow("").allow(null),
685
736
  order_id: Joi.string().allow("").required(),
686
737
  request_type: Joi.string().allow("").required(),
687
738
  });
@@ -4,6 +4,7 @@ declare class PaymentValidator {
4
4
  static addRefundBankAccountUsingOTP(): any;
5
5
  static attachCardToCustomer(): any;
6
6
  static cancelPaymentLink(): any;
7
+ static cardDetails(): any;
7
8
  static checkAndUpdatePaymentStatus(): any;
8
9
  static checkAndUpdatePaymentStatusPaymentLink(): any;
9
10
  static checkCredit(): any;
@@ -27,6 +28,8 @@ declare class PaymentValidator {
27
28
  static getUserBeneficiariesDetail(): any;
28
29
  static initialisePayment(): any;
29
30
  static initialisePaymentPaymentLink(): any;
31
+ static outstandingOrderDetails(): any;
32
+ static paidOrderDetails(): any;
30
33
  static pollingPaymentLink(): any;
31
34
  static redirectToAggregator(): any;
32
35
  static renderHTML(): any;
@@ -26,6 +26,13 @@ class PaymentValidator {
26
26
  }).required();
27
27
  }
28
28
 
29
+ static cardDetails() {
30
+ return Joi.object({
31
+ cardInfo: Joi.string().allow("").required(),
32
+ aggregator: Joi.string().allow(""),
33
+ }).required();
34
+ }
35
+
29
36
  static checkAndUpdatePaymentStatus() {
30
37
  return Joi.object({
31
38
  body: PaymentModel.PaymentStatusUpdateRequest().required(),
@@ -172,6 +179,18 @@ class PaymentValidator {
172
179
  }).required();
173
180
  }
174
181
 
182
+ static outstandingOrderDetails() {
183
+ return Joi.object({
184
+ aggregator: Joi.string().allow(""),
185
+ });
186
+ }
187
+
188
+ static paidOrderDetails() {
189
+ return Joi.object({
190
+ aggregator: Joi.string().allow(""),
191
+ });
192
+ }
193
+
175
194
  static pollingPaymentLink() {
176
195
  return Joi.object({
177
196
  paymentLinkId: Joi.string().allow(""),
@@ -49,16 +49,18 @@ declare class PosCart {
49
49
  * @param {boolean} [arg.b] -
50
50
  * @param {string} [arg.areaCode] -
51
51
  * @param {boolean} [arg.buyNow] -
52
+ * @param {string} [arg.id] -
52
53
  * @param {AddCartRequest} arg.body
53
54
  * @returns {Promise<AddCartDetailResponse>} - Success response
54
55
  * @summary: Add items to cart
55
56
  * @description: Use this API to add items to the cart.
56
57
  */
57
- addItems({ body, i, b, areaCode, buyNow }?: {
58
+ addItems({ body, i, b, areaCode, buyNow, id }?: {
58
59
  i?: boolean;
59
60
  b?: boolean;
60
61
  areaCode?: string;
61
62
  buyNow?: boolean;
63
+ id?: string;
62
64
  body: AddCartRequest;
63
65
  }): Promise<AddCartDetailResponse>;
64
66
  /**
@@ -414,6 +416,8 @@ declare class PosCart {
414
416
  * getting a payment option in response.
415
417
  * @param {string} [arg.id] - The unique identifier of the cart
416
418
  * @param {string} [arg.addressId] - ID allotted to an address
419
+ * @param {string} [arg.areaCode] - The PIN Code of the destination address,
420
+ * e.g. 400059
417
421
  * @param {string} [arg.orderType] - The order type of shipment HomeDelivery
418
422
  * - If the customer wants the order home-delivered PickAtStore - If the
419
423
  * customer wants the handover of an order at the store itself.
@@ -422,11 +426,12 @@ declare class PosCart {
422
426
  * @summary: Update shipment delivery type and quantity before checkout
423
427
  * @description: Use this API to update the delivery type and quantity as per customer's preference for either store pick-up or home-delivery.
424
428
  */
425
- updateShipments({ body, i, p, id, addressId, orderType }?: {
429
+ updateShipments({ body, i, p, id, addressId, areaCode, orderType, }?: {
426
430
  i?: boolean;
427
431
  p?: boolean;
428
432
  id?: string;
429
433
  addressId?: string;
434
+ areaCode?: string;
430
435
  orderType?: string;
431
436
  body: UpdateCartShipmentRequest;
432
437
  }): Promise<CartShipmentsResponse>;
@@ -439,11 +444,15 @@ declare class PosCart {
439
444
  * @param {string} [arg.paymentIdentifier] -
440
445
  * @param {string} [arg.aggregatorName] -
441
446
  * @param {string} [arg.merchantCode] -
447
+ * @param {string} [arg.iin] -
448
+ * @param {string} [arg.network] -
449
+ * @param {string} [arg.type] -
450
+ * @param {string} [arg.cardId] -
442
451
  * @returns {Promise<PaymentCouponValidate>} - Success response
443
452
  * @summary: Verify the coupon eligibility against the payment mode
444
453
  * @description: Use this API to validate a coupon against the payment mode such as NetBanking, Wallet, UPI etc.
445
454
  */
446
- validateCouponForPayment({ id, buyNow, addressId, paymentMode, paymentIdentifier, aggregatorName, merchantCode, }?: {
455
+ validateCouponForPayment({ id, buyNow, addressId, paymentMode, paymentIdentifier, aggregatorName, merchantCode, iin, network, type, cardId, }?: {
447
456
  id?: string;
448
457
  buyNow?: boolean;
449
458
  addressId?: string;
@@ -451,5 +460,9 @@ declare class PosCart {
451
460
  paymentIdentifier?: string;
452
461
  aggregatorName?: string;
453
462
  merchantCode?: string;
463
+ iin?: string;
464
+ network?: string;
465
+ type?: string;
466
+ cardId?: string;
454
467
  }): Promise<PaymentCouponValidate>;
455
468
  }
@@ -128,14 +128,15 @@ class PosCart {
128
128
  * @param {boolean} [arg.b] -
129
129
  * @param {string} [arg.areaCode] -
130
130
  * @param {boolean} [arg.buyNow] -
131
+ * @param {string} [arg.id] -
131
132
  * @param {AddCartRequest} arg.body
132
133
  * @returns {Promise<AddCartDetailResponse>} - Success response
133
134
  * @summary: Add items to cart
134
135
  * @description: Use this API to add items to the cart.
135
136
  */
136
- async addItems({ body, i, b, areaCode, buyNow } = {}) {
137
+ async addItems({ body, i, b, areaCode, buyNow, id } = {}) {
137
138
  const { error } = PosCartValidator.addItems().validate(
138
- { body, i, b, areaCode, buyNow },
139
+ { body, i, b, areaCode, buyNow, id },
139
140
  { abortEarly: false, allowUnknown: true }
140
141
  );
141
142
  if (error) {
@@ -144,7 +145,7 @@ class PosCart {
144
145
 
145
146
  // Showing warrnings if extra unknown parameters are found
146
147
  const { error: warrning } = PosCartValidator.addItems().validate(
147
- { body, i, b, areaCode, buyNow },
148
+ { body, i, b, areaCode, buyNow, id },
148
149
  { abortEarly: false, allowUnknown: false }
149
150
  );
150
151
  if (warrning) {
@@ -160,6 +161,7 @@ class PosCart {
160
161
  query_params["b"] = b;
161
162
  query_params["area_code"] = areaCode;
162
163
  query_params["buy_now"] = buyNow;
164
+ query_params["id"] = id;
163
165
 
164
166
  const xHeaders = {};
165
167
 
@@ -1815,6 +1817,8 @@ class PosCart {
1815
1817
  * getting a payment option in response.
1816
1818
  * @param {string} [arg.id] - The unique identifier of the cart
1817
1819
  * @param {string} [arg.addressId] - ID allotted to an address
1820
+ * @param {string} [arg.areaCode] - The PIN Code of the destination address,
1821
+ * e.g. 400059
1818
1822
  * @param {string} [arg.orderType] - The order type of shipment HomeDelivery
1819
1823
  * - If the customer wants the order home-delivered PickAtStore - If the
1820
1824
  * customer wants the handover of an order at the store itself.
@@ -1823,9 +1827,17 @@ class PosCart {
1823
1827
  * @summary: Update shipment delivery type and quantity before checkout
1824
1828
  * @description: Use this API to update the delivery type and quantity as per customer's preference for either store pick-up or home-delivery.
1825
1829
  */
1826
- async updateShipments({ body, i, p, id, addressId, orderType } = {}) {
1830
+ async updateShipments({
1831
+ body,
1832
+ i,
1833
+ p,
1834
+ id,
1835
+ addressId,
1836
+ areaCode,
1837
+ orderType,
1838
+ } = {}) {
1827
1839
  const { error } = PosCartValidator.updateShipments().validate(
1828
- { body, i, p, id, addressId, orderType },
1840
+ { body, i, p, id, addressId, areaCode, orderType },
1829
1841
  { abortEarly: false, allowUnknown: true }
1830
1842
  );
1831
1843
  if (error) {
@@ -1834,7 +1846,7 @@ class PosCart {
1834
1846
 
1835
1847
  // Showing warrnings if extra unknown parameters are found
1836
1848
  const { error: warrning } = PosCartValidator.updateShipments().validate(
1837
- { body, i, p, id, addressId, orderType },
1849
+ { body, i, p, id, addressId, areaCode, orderType },
1838
1850
  { abortEarly: false, allowUnknown: false }
1839
1851
  );
1840
1852
  if (warrning) {
@@ -1850,6 +1862,7 @@ class PosCart {
1850
1862
  query_params["p"] = p;
1851
1863
  query_params["id"] = id;
1852
1864
  query_params["address_id"] = addressId;
1865
+ query_params["area_code"] = areaCode;
1853
1866
  query_params["order_type"] = orderType;
1854
1867
 
1855
1868
  const xHeaders = {};
@@ -1893,6 +1906,10 @@ class PosCart {
1893
1906
  * @param {string} [arg.paymentIdentifier] -
1894
1907
  * @param {string} [arg.aggregatorName] -
1895
1908
  * @param {string} [arg.merchantCode] -
1909
+ * @param {string} [arg.iin] -
1910
+ * @param {string} [arg.network] -
1911
+ * @param {string} [arg.type] -
1912
+ * @param {string} [arg.cardId] -
1896
1913
  * @returns {Promise<PaymentCouponValidate>} - Success response
1897
1914
  * @summary: Verify the coupon eligibility against the payment mode
1898
1915
  * @description: Use this API to validate a coupon against the payment mode such as NetBanking, Wallet, UPI etc.
@@ -1905,6 +1922,10 @@ class PosCart {
1905
1922
  paymentIdentifier,
1906
1923
  aggregatorName,
1907
1924
  merchantCode,
1925
+ iin,
1926
+ network,
1927
+ type,
1928
+ cardId,
1908
1929
  } = {}) {
1909
1930
  const { error } = PosCartValidator.validateCouponForPayment().validate(
1910
1931
  {
@@ -1915,6 +1936,10 @@ class PosCart {
1915
1936
  paymentIdentifier,
1916
1937
  aggregatorName,
1917
1938
  merchantCode,
1939
+ iin,
1940
+ network,
1941
+ type,
1942
+ cardId,
1918
1943
  },
1919
1944
  { abortEarly: false, allowUnknown: true }
1920
1945
  );
@@ -1934,6 +1959,10 @@ class PosCart {
1934
1959
  paymentIdentifier,
1935
1960
  aggregatorName,
1936
1961
  merchantCode,
1962
+ iin,
1963
+ network,
1964
+ type,
1965
+ cardId,
1937
1966
  },
1938
1967
  { abortEarly: false, allowUnknown: false }
1939
1968
  );
@@ -1953,6 +1982,10 @@ class PosCart {
1953
1982
  query_params["payment_identifier"] = paymentIdentifier;
1954
1983
  query_params["aggregator_name"] = aggregatorName;
1955
1984
  query_params["merchant_code"] = merchantCode;
1985
+ query_params["iin"] = iin;
1986
+ query_params["network"] = network;
1987
+ query_params["type"] = type;
1988
+ query_params["card_id"] = cardId;
1956
1989
 
1957
1990
  const xHeaders = {};
1958
1991
 
@@ -5,13 +5,16 @@ declare class PosCartModel {
5
5
  static AddCartRequest(): any;
6
6
  static AddProductCart(): any;
7
7
  static Address(): any;
8
+ static AppliedFreeArticles(): any;
8
9
  static AppliedPromotion(): any;
9
10
  static ApplyCouponRequest(): any;
11
+ static ArticleGiftDetail(): any;
10
12
  static ArticlePriceInfo(): any;
11
13
  static BaseInfo(): any;
12
14
  static BasePrice(): any;
13
15
  static BulkPriceOffer(): any;
14
16
  static BulkPriceResponse(): any;
17
+ static BuyRules(): any;
15
18
  static CartBreakup(): any;
16
19
  static CartCheckoutCustomMeta(): any;
17
20
  static CartCheckoutResponse(): any;
@@ -31,15 +34,20 @@ declare class PosCartModel {
31
34
  static CheckCart(): any;
32
35
  static Coupon(): any;
33
36
  static CouponBreakup(): any;
37
+ static CouponDetails(): any;
34
38
  static CouponValidity(): any;
39
+ static CustomerDetails(): any;
35
40
  static DeleteAddressResponse(): any;
41
+ static DiscountRulesApp(): any;
36
42
  static DisplayBreakup(): any;
37
43
  static Files(): any;
44
+ static FreeGiftItem(): any;
38
45
  static GeoLocation(): any;
39
46
  static GetAddressesResponse(): any;
40
47
  static GetCouponResponse(): any;
41
48
  static GetShareCartLinkRequest(): any;
42
49
  static GetShareCartLinkResponse(): any;
50
+ static GiftDetail(): any;
43
51
  static LoyaltyPoints(): any;
44
52
  static OfferItem(): any;
45
53
  static OfferPrice(): any;
@@ -70,6 +78,8 @@ declare class PosCartModel {
70
78
  static ShipmentResponse(): any;
71
79
  static StaffCheckout(): any;
72
80
  static StoreDetailsResponse(): any;
81
+ static StoreInfo(): any;
82
+ static Tags(): any;
73
83
  static UpdateAddressResponse(): any;
74
84
  static UpdateCartDetailResponse(): any;
75
85
  static UpdateCartPaymentRequest(): any;