@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
@@ -17,6 +17,7 @@ class PosCartModel {
17
17
  static AddCartRequest() {
18
18
  return Joi.object({
19
19
  items: Joi.array().items(PosCartModel.AddProductCart()),
20
+ new_cart: Joi.boolean(),
20
21
  });
21
22
  }
22
23
  static AddProductCart() {
@@ -28,6 +29,7 @@ class PosCartModel {
28
29
  extra_meta: Joi.any(),
29
30
  item_id: Joi.number(),
30
31
  item_size: Joi.string().allow(""),
32
+ meta: Joi.any(),
31
33
  parent_item_identifiers: Joi.array().items(
32
34
  Joi.object().pattern(/\S/, Joi.string().allow(""))
33
35
  ),
@@ -40,6 +42,7 @@ class PosCartModel {
40
42
  }
41
43
  static Address() {
42
44
  return Joi.object({
45
+ _custom_json: Joi.any(),
43
46
  address: Joi.string().allow(""),
44
47
  address_type: Joi.string().allow(""),
45
48
  area: Joi.string().allow(""),
@@ -51,6 +54,7 @@ class PosCartModel {
51
54
  country_code: Joi.string().allow(""),
52
55
  country_iso_code: Joi.string().allow(""),
53
56
  country_phone_code: Joi.string().allow(""),
57
+ created_by_user_id: Joi.string().allow(""),
54
58
  email: Joi.string().allow(""),
55
59
  geo_location: PosCartModel.GeoLocation(),
56
60
  google_map_point: Joi.any(),
@@ -66,14 +70,29 @@ class PosCartModel {
66
70
  user_id: Joi.string().allow(""),
67
71
  });
68
72
  }
73
+ static AppliedFreeArticles() {
74
+ return Joi.object({
75
+ article_id: Joi.string().allow(""),
76
+ free_gift_item_details: PosCartModel.FreeGiftItem(),
77
+ parent_item_identifier: Joi.string().allow(""),
78
+ quantity: Joi.number(),
79
+ });
80
+ }
69
81
  static AppliedPromotion() {
70
82
  return Joi.object({
71
83
  amount: Joi.number(),
84
+ applied_free_articles: Joi.array().items(
85
+ PosCartModel.AppliedFreeArticles()
86
+ ),
72
87
  article_quantity: Joi.number(),
88
+ buy_rules: Joi.array().items(PosCartModel.BuyRules()),
89
+ discount_rules: Joi.array().items(PosCartModel.DiscountRulesApp()),
73
90
  mrp_promotion: Joi.boolean(),
74
91
  offer_text: Joi.string().allow(""),
75
92
  ownership: PosCartModel.Ownership(),
76
93
  promo_id: Joi.string().allow(""),
94
+ promotion_group: Joi.string().allow(""),
95
+ promotion_name: Joi.string().allow(""),
77
96
  promotion_type: Joi.string().allow(""),
78
97
  });
79
98
  }
@@ -82,6 +101,11 @@ class PosCartModel {
82
101
  coupon_code: Joi.string().allow("").required(),
83
102
  });
84
103
  }
104
+ static ArticleGiftDetail() {
105
+ return Joi.object({
106
+ article_id: PosCartModel.GiftDetail(),
107
+ });
108
+ }
85
109
  static ArticlePriceInfo() {
86
110
  return Joi.object({
87
111
  base: PosCartModel.BasePrice(),
@@ -113,6 +137,12 @@ class PosCartModel {
113
137
  data: Joi.array().items(PosCartModel.BulkPriceOffer()),
114
138
  });
115
139
  }
140
+ static BuyRules() {
141
+ return Joi.object({
142
+ cart_conditions: Joi.any(),
143
+ item_criteria: Joi.any(),
144
+ });
145
+ }
116
146
  static CartBreakup() {
117
147
  return Joi.object({
118
148
  coupon: PosCartModel.CouponBreakup(),
@@ -168,6 +198,8 @@ class PosCartModel {
168
198
  items: Joi.array().items(PosCartModel.CartProductInfo()),
169
199
  last_modified: Joi.string().allow(""),
170
200
  message: Joi.string().allow(""),
201
+ pan_config: Joi.any(),
202
+ pan_no: Joi.string().allow(""),
171
203
  payment_selection_lock: PosCartModel.PaymentSelectionLock(),
172
204
  restrict_checkout: Joi.boolean(),
173
205
  });
@@ -186,12 +218,15 @@ class PosCartModel {
186
218
  return Joi.object({
187
219
  checkout_mode: Joi.string().allow(""),
188
220
  comment: Joi.string().allow(""),
221
+ delivery_slots: Joi.any(),
222
+ gift_details: PosCartModel.ArticleGiftDetail(),
189
223
  gstin: Joi.string().allow(""),
190
224
  pick_up_customer_details: Joi.any(),
191
225
  });
192
226
  }
193
227
  static CartMetaResponse() {
194
228
  return Joi.object({
229
+ is_valid: Joi.boolean(),
195
230
  message: Joi.string().allow(""),
196
231
  });
197
232
  }
@@ -203,9 +238,11 @@ class PosCartModel {
203
238
  billing_address_id: Joi.string().allow(""),
204
239
  callback_url: Joi.string().allow("").allow(null),
205
240
  custom_meta: Joi.array().items(PosCartModel.CartCheckoutCustomMeta()),
241
+ customer_details: PosCartModel.CustomerDetails(),
206
242
  delivery_address: Joi.any(),
207
243
  extra_meta: Joi.any(),
208
244
  files: Joi.array().items(PosCartModel.Files()),
245
+ id: Joi.string().allow("").allow(null),
209
246
  merchant_code: Joi.string().allow(""),
210
247
  meta: Joi.any(),
211
248
  order_type: Joi.string().allow("").required(),
@@ -221,12 +258,16 @@ class PosCartModel {
221
258
  }
222
259
  static CartProduct() {
223
260
  return Joi.object({
261
+ _custom_json: Joi.any(),
224
262
  action: PosCartModel.ProductAction(),
225
263
  brand: PosCartModel.BaseInfo(),
226
264
  categories: Joi.array().items(PosCartModel.CategoryInfo()),
227
265
  images: Joi.array().items(PosCartModel.ProductImage()),
266
+ item_code: Joi.string().allow("").allow(null),
228
267
  name: Joi.string().allow(""),
229
268
  slug: Joi.string().allow(""),
269
+ tags: Joi.array().items(Joi.string().allow("")),
270
+ teaser_tag: PosCartModel.Tags(),
230
271
  type: Joi.string().allow(""),
231
272
  uid: Joi.number(),
232
273
  });
@@ -241,7 +282,9 @@ class PosCartModel {
241
282
  article: PosCartModel.ProductArticle(),
242
283
  availability: PosCartModel.ProductAvailability(),
243
284
  bulk_offer: Joi.any(),
285
+ coupon: PosCartModel.CouponDetails(),
244
286
  coupon_message: Joi.string().allow(""),
287
+ custom_order: Joi.any(),
245
288
  delivery_promise: PosCartModel.ShipmentPromise(),
246
289
  discount: Joi.string().allow(""),
247
290
  identifiers: PosCartModel.CartProductIdentifer().required(),
@@ -323,7 +366,9 @@ class PosCartModel {
323
366
  static Coupon() {
324
367
  return Joi.object({
325
368
  coupon_code: Joi.string().allow(""),
369
+ coupon_type: Joi.string().allow("").allow(null),
326
370
  coupon_value: Joi.number(),
371
+ description: Joi.string().allow("").allow(null),
327
372
  expires_on: Joi.string().allow(""),
328
373
  is_applicable: Joi.boolean(),
329
374
  is_applied: Joi.boolean(),
@@ -337,28 +382,58 @@ class PosCartModel {
337
382
  static CouponBreakup() {
338
383
  return Joi.object({
339
384
  code: Joi.string().allow(""),
385
+ coupon_type: Joi.string().allow("").allow(null),
386
+ coupon_value: Joi.number(),
387
+ description: Joi.string().allow("").allow(null),
340
388
  is_applied: Joi.boolean(),
389
+ max_discount_value: Joi.number(),
341
390
  message: Joi.string().allow(""),
391
+ minimum_cart_value: Joi.number(),
392
+ sub_title: Joi.string().allow("").allow(null),
393
+ title: Joi.string().allow("").allow(null),
342
394
  type: Joi.string().allow(""),
343
395
  uid: Joi.string().allow(""),
344
396
  value: Joi.number(),
345
397
  });
346
398
  }
399
+ static CouponDetails() {
400
+ return Joi.object({
401
+ code: Joi.string().allow(""),
402
+ discount_single_quantity: Joi.number(),
403
+ discount_total_quantity: Joi.number(),
404
+ });
405
+ }
347
406
  static CouponValidity() {
348
407
  return Joi.object({
349
408
  code: Joi.string().allow("").allow(null),
350
409
  discount: Joi.number(),
351
410
  display_message_en: Joi.string().allow("").allow(null),
411
+ next_validation_required: Joi.boolean().allow(null),
352
412
  title: Joi.string().allow(""),
353
413
  valid: Joi.boolean(),
354
414
  });
355
415
  }
416
+ static CustomerDetails() {
417
+ return Joi.object({
418
+ email: Joi.string().allow("").allow(null),
419
+ mobile: Joi.string().allow("").required(),
420
+ name: Joi.string().allow(""),
421
+ });
422
+ }
356
423
  static DeleteAddressResponse() {
357
424
  return Joi.object({
358
425
  id: Joi.string().allow(""),
359
426
  is_deleted: Joi.boolean(),
360
427
  });
361
428
  }
429
+ static DiscountRulesApp() {
430
+ return Joi.object({
431
+ item_criteria: Joi.any(),
432
+ matched_buy_rules: Joi.array().items(Joi.string().allow("")),
433
+ offer: Joi.any(),
434
+ raw_offer: Joi.any(),
435
+ });
436
+ }
362
437
  static DisplayBreakup() {
363
438
  return Joi.object({
364
439
  currency_code: Joi.string().allow(""),
@@ -375,6 +450,16 @@ class PosCartModel {
375
450
  values: Joi.array().items(Joi.string().allow("")).required(),
376
451
  });
377
452
  }
453
+ static FreeGiftItem() {
454
+ return Joi.object({
455
+ item_brand_name: Joi.string().allow(""),
456
+ item_id: Joi.number(),
457
+ item_images_url: Joi.array().items(Joi.string().allow("")),
458
+ item_name: Joi.string().allow(""),
459
+ item_price_details: Joi.any(),
460
+ item_slug: Joi.string().allow(""),
461
+ });
462
+ }
378
463
  static GeoLocation() {
379
464
  return Joi.object({
380
465
  latitude: Joi.number(),
@@ -405,6 +490,12 @@ class PosCartModel {
405
490
  token: Joi.string().allow(""),
406
491
  });
407
492
  }
493
+ static GiftDetail() {
494
+ return Joi.object({
495
+ gift_message: Joi.string().allow(""),
496
+ is_gift_applied: Joi.boolean(),
497
+ });
498
+ }
408
499
  static LoyaltyPoints() {
409
500
  return Joi.object({
410
501
  applicable: Joi.number(),
@@ -498,14 +589,21 @@ class PosCartModel {
498
589
  static ProductArticle() {
499
590
  return Joi.object({
500
591
  _custom_json: Joi.any(),
592
+ cart_item_meta: Joi.any(),
501
593
  extra_meta: Joi.any(),
594
+ gift_card: Joi.any(),
595
+ identifier: Joi.any(),
596
+ is_gift_visible: Joi.boolean(),
597
+ meta: Joi.any(),
598
+ mto_quantity: Joi.number(),
502
599
  parent_item_identifiers: Joi.any(),
503
600
  price: PosCartModel.ArticlePriceInfo(),
504
601
  product_group_tags: Joi.array().items(Joi.string().allow("")),
505
602
  quantity: Joi.number(),
506
603
  seller: PosCartModel.BaseInfo(),
604
+ seller_identifier: Joi.string().allow(""),
507
605
  size: Joi.string().allow(""),
508
- store: PosCartModel.BaseInfo(),
606
+ store: PosCartModel.StoreInfo(),
509
607
  type: Joi.string().allow(""),
510
608
  uid: Joi.string().allow(""),
511
609
  });
@@ -577,6 +675,7 @@ class PosCartModel {
577
675
  delivery_charge: Joi.number(),
578
676
  discount: Joi.number(),
579
677
  fynd_cash: Joi.number(),
678
+ gift_card: Joi.number(),
580
679
  gst_charges: Joi.number(),
581
680
  mrp_total: Joi.number(),
582
681
  subtotal: Joi.number(),
@@ -676,6 +775,18 @@ class PosCartModel {
676
775
  items: Joi.array().items(PosCartModel.PickupStoreDetail()),
677
776
  });
678
777
  }
778
+ static StoreInfo() {
779
+ return Joi.object({
780
+ name: Joi.string().allow(""),
781
+ store_code: Joi.string().allow(""),
782
+ uid: Joi.number(),
783
+ });
784
+ }
785
+ static Tags() {
786
+ return Joi.object({
787
+ tags: Joi.any(),
788
+ });
789
+ }
679
790
  static UpdateAddressResponse() {
680
791
  return Joi.object({
681
792
  id: Joi.string().allow(""),
@@ -730,6 +841,7 @@ class PosCartModel {
730
841
  item_id: Joi.number(),
731
842
  item_index: Joi.number(),
732
843
  item_size: Joi.string().allow(""),
844
+ meta: Joi.any(),
733
845
  parent_item_identifiers: Joi.any(),
734
846
  quantity: Joi.number(),
735
847
  });
@@ -14,6 +14,7 @@ class PosCartValidator {
14
14
  b: Joi.boolean(),
15
15
  areaCode: Joi.string().allow(""),
16
16
  buyNow: Joi.boolean(),
17
+ id: Joi.string().allow(""),
17
18
  body: PosCartModel.AddCartRequest().required(),
18
19
  }).required();
19
20
  }
@@ -216,6 +217,7 @@ class PosCartValidator {
216
217
  p: Joi.boolean(),
217
218
  id: Joi.string().allow(""),
218
219
  addressId: Joi.string().allow(""),
220
+ areaCode: Joi.string().allow(""),
219
221
  orderType: Joi.string().allow(""),
220
222
  body: PosCartModel.UpdateCartShipmentRequest().required(),
221
223
  }).required();
@@ -230,6 +232,10 @@ class PosCartValidator {
230
232
  paymentIdentifier: Joi.string().allow(""),
231
233
  aggregatorName: Joi.string().allow(""),
232
234
  merchantCode: Joi.string().allow(""),
235
+ iin: Joi.string().allow(""),
236
+ network: Joi.string().allow(""),
237
+ type: Joi.string().allow(""),
238
+ cardId: Joi.string().allow(""),
233
239
  });
234
240
  }
235
241
  }
@@ -28,7 +28,7 @@ declare class Rewards {
28
28
  * @param {string} arg.name - The name given to the offer.
29
29
  * @returns {Promise<Offer>} - Success response
30
30
  * @summary: Get offer by name
31
- * @description: Use this API to get the offer details and configuration by entering the name of the offer.
31
+ * @description: Use this API to get fetch the specific offer details and configuration by the name of the offer.
32
32
  */
33
33
  getOfferByName({ name }?: {
34
34
  name: string;
@@ -38,7 +38,7 @@ declare class Rewards {
38
38
  * @param {OrderDiscountRequest} arg.body
39
39
  * @returns {Promise<OrderDiscountResponse>} - Success response
40
40
  * @summary: Calculates the discount on order-amount
41
- * @description: Use this API to calculate the discount on order-amount based on all the amount range configured in order_discount.
41
+ * @description: Use this API to calculate the discount on the order amount, based on all the amount range configured in Order Discount offer.
42
42
  */
43
43
  getOrderDiscount({ body }?: {
44
44
  body: OrderDiscountRequest;
@@ -46,8 +46,8 @@ declare class Rewards {
46
46
  /**
47
47
  * @param {Object} arg - Arg object.
48
48
  * @returns {Promise<PointsResponse>} - Success response
49
- * @summary: Get referral details of a user
50
- * @description: Use this API to retrieve total available points of a user for current application
49
+ * @summary: Get total available points of a user
50
+ * @description: Use this API to retrieve total available points of a user for current application.
51
51
  */
52
52
  getUserPoints({}?: any): Promise<PointsResponse>;
53
53
  /**
@@ -57,7 +57,7 @@ declare class Rewards {
57
57
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
58
58
  * @returns {Promise<PointsHistoryResponse>} - Success response
59
59
  * @summary: Get all transactions of reward points
60
- * @description: Use this API to get a list of points transactions.
60
+ * @description: Use this API to fetch a list of points transactions like giveaway points, signup points, referral points, order earn points, redeem points and expired points.
61
61
  */
62
62
  getUserPointsHistory({ pageId, pageSize }?: {
63
63
  pageId?: string;
@@ -67,7 +67,7 @@ declare class Rewards {
67
67
  * @param {Object} arg - Arg object.
68
68
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
69
69
  * @summary: Get all transactions of reward points
70
- * @description: Use this API to get a list of points transactions.
70
+ * @description: Use this API to fetch a list of points transactions like giveaway points, signup points, referral points, order earn points, redeem points and expired points.
71
71
  */
72
72
  getUserPointsHistoryPaginator({ pageSize }?: {
73
73
  pageSize?: number;
@@ -76,14 +76,14 @@ declare class Rewards {
76
76
  * @param {Object} arg - Arg object.
77
77
  * @returns {Promise<ReferralDetailsResponse>} - Success response
78
78
  * @summary: Get referral details of a user
79
- * @description: Use this API to retrieve the referral details a user has configured in the application.
79
+ * @description: Use this API to retrieve the referral details like referral code of a user.
80
80
  */
81
81
  getUserReferralDetails({}?: any): Promise<ReferralDetailsResponse>;
82
82
  /**
83
83
  * @param {Object} arg - Arg object.
84
84
  * @param {RedeemReferralCodeRequest} arg.body
85
85
  * @returns {Promise<RedeemReferralCodeResponse>} - Success response
86
- * @summary: Redeems a referral code and credits reward points to users
86
+ * @summary: Redeems a referral code and credits reward points to referee and the referrer as per the configuration
87
87
  * @description: Use this API to enter a referral code following which, the configured points would be credited to a user's reward points account.
88
88
  */
89
89
  redeemReferralCode({ body }?: {
@@ -108,7 +108,7 @@ class Rewards {
108
108
  * @param {string} arg.name - The name given to the offer.
109
109
  * @returns {Promise<Offer>} - Success response
110
110
  * @summary: Get offer by name
111
- * @description: Use this API to get the offer details and configuration by entering the name of the offer.
111
+ * @description: Use this API to get fetch the specific offer details and configuration by the name of the offer.
112
112
  */
113
113
  async getOfferByName({ name } = {}) {
114
114
  const { error } = RewardsValidator.getOfferByName().validate(
@@ -169,7 +169,7 @@ class Rewards {
169
169
  * @param {OrderDiscountRequest} arg.body
170
170
  * @returns {Promise<OrderDiscountResponse>} - Success response
171
171
  * @summary: Calculates the discount on order-amount
172
- * @description: Use this API to calculate the discount on order-amount based on all the amount range configured in order_discount.
172
+ * @description: Use this API to calculate the discount on the order amount, based on all the amount range configured in Order Discount offer.
173
173
  */
174
174
  async getOrderDiscount({ body } = {}) {
175
175
  const { error } = RewardsValidator.getOrderDiscount().validate(
@@ -230,8 +230,8 @@ class Rewards {
230
230
  /**
231
231
  * @param {Object} arg - Arg object.
232
232
  * @returns {Promise<PointsResponse>} - Success response
233
- * @summary: Get referral details of a user
234
- * @description: Use this API to retrieve total available points of a user for current application
233
+ * @summary: Get total available points of a user
234
+ * @description: Use this API to retrieve total available points of a user for current application.
235
235
  */
236
236
  async getUserPoints({} = {}) {
237
237
  const { error } = RewardsValidator.getUserPoints().validate(
@@ -296,7 +296,7 @@ class Rewards {
296
296
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
297
297
  * @returns {Promise<PointsHistoryResponse>} - Success response
298
298
  * @summary: Get all transactions of reward points
299
- * @description: Use this API to get a list of points transactions.
299
+ * @description: Use this API to fetch a list of points transactions like giveaway points, signup points, referral points, order earn points, redeem points and expired points.
300
300
  */
301
301
  async getUserPointsHistory({ pageId, pageSize } = {}) {
302
302
  const { error } = RewardsValidator.getUserPointsHistory().validate(
@@ -362,7 +362,7 @@ class Rewards {
362
362
  * @param {Object} arg - Arg object.
363
363
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
364
364
  * @summary: Get all transactions of reward points
365
- * @description: Use this API to get a list of points transactions.
365
+ * @description: Use this API to fetch a list of points transactions like giveaway points, signup points, referral points, order earn points, redeem points and expired points.
366
366
  */
367
367
  getUserPointsHistoryPaginator({ pageSize } = {}) {
368
368
  const paginator = new Paginator();
@@ -388,7 +388,7 @@ class Rewards {
388
388
  * @param {Object} arg - Arg object.
389
389
  * @returns {Promise<ReferralDetailsResponse>} - Success response
390
390
  * @summary: Get referral details of a user
391
- * @description: Use this API to retrieve the referral details a user has configured in the application.
391
+ * @description: Use this API to retrieve the referral details like referral code of a user.
392
392
  */
393
393
  async getUserReferralDetails({} = {}) {
394
394
  const { error } = RewardsValidator.getUserReferralDetails().validate(
@@ -452,7 +452,7 @@ class Rewards {
452
452
  * @param {Object} arg - Arg object.
453
453
  * @param {RedeemReferralCodeRequest} arg.body
454
454
  * @returns {Promise<RedeemReferralCodeResponse>} - Success response
455
- * @summary: Redeems a referral code and credits reward points to users
455
+ * @summary: Redeems a referral code and credits reward points to referee and the referrer as per the configuration
456
456
  * @description: Use this API to enter a referral code following which, the configured points would be credited to a user's reward points account.
457
457
  */
458
458
  async redeemReferralCode({ body } = {}) {
@@ -1,20 +1,20 @@
1
1
  export const ApplicationConfig: typeof import("./ApplicationConfig");
2
2
  export const ApplicationClient: typeof import("./ApplicationClient");
3
3
  export namespace ApplicationModel {
4
- const CatalogApplicationModel: typeof import("./Catalog/CatalogApplicationModel");
5
4
  const CartApplicationModel: typeof import("./Cart/CartApplicationModel");
5
+ const CatalogApplicationModel: typeof import("./Catalog/CatalogApplicationModel");
6
6
  const CommonApplicationModel: typeof import("./Common/CommonApplicationModel");
7
- const LeadApplicationModel: typeof import("./Lead/LeadApplicationModel");
8
- const ThemeApplicationModel: typeof import("./Theme/ThemeApplicationModel");
9
- const UserApplicationModel: typeof import("./User/UserApplicationModel");
10
- const ContentApplicationModel: typeof import("./Content/ContentApplicationModel");
11
7
  const CommunicationApplicationModel: typeof import("./Communication/CommunicationApplicationModel");
12
- const ShareApplicationModel: typeof import("./Share/ShareApplicationModel");
13
- const FileStorageApplicationModel: typeof import("./FileStorage/FileStorageApplicationModel");
14
8
  const ConfigurationApplicationModel: typeof import("./Configuration/ConfigurationApplicationModel");
15
- const PaymentApplicationModel: typeof import("./Payment/PaymentApplicationModel");
9
+ const ContentApplicationModel: typeof import("./Content/ContentApplicationModel");
10
+ const FileStorageApplicationModel: typeof import("./FileStorage/FileStorageApplicationModel");
11
+ const LeadApplicationModel: typeof import("./Lead/LeadApplicationModel");
12
+ const LogisticApplicationModel: typeof import("./Logistic/LogisticApplicationModel");
16
13
  const OrderApplicationModel: typeof import("./Order/OrderApplicationModel");
17
- const RewardsApplicationModel: typeof import("./Rewards/RewardsApplicationModel");
14
+ const PaymentApplicationModel: typeof import("./Payment/PaymentApplicationModel");
18
15
  const PosCartApplicationModel: typeof import("./PosCart/PosCartApplicationModel");
19
- const LogisticApplicationModel: typeof import("./Logistic/LogisticApplicationModel");
16
+ const RewardsApplicationModel: typeof import("./Rewards/RewardsApplicationModel");
17
+ const ShareApplicationModel: typeof import("./Share/ShareApplicationModel");
18
+ const ThemeApplicationModel: typeof import("./Theme/ThemeApplicationModel");
19
+ const UserApplicationModel: typeof import("./User/UserApplicationModel");
20
20
  }
@@ -2,36 +2,36 @@ module.exports = {
2
2
  ApplicationConfig: require("./ApplicationConfig"),
3
3
  ApplicationClient: require("./ApplicationClient"),
4
4
  ApplicationModel: {
5
- CatalogApplicationModel: require("./Catalog/CatalogApplicationModel"),
6
-
7
5
  CartApplicationModel: require("./Cart/CartApplicationModel"),
8
6
 
9
- CommonApplicationModel: require("./Common/CommonApplicationModel"),
7
+ CatalogApplicationModel: require("./Catalog/CatalogApplicationModel"),
10
8
 
11
- LeadApplicationModel: require("./Lead/LeadApplicationModel"),
9
+ CommonApplicationModel: require("./Common/CommonApplicationModel"),
12
10
 
13
- ThemeApplicationModel: require("./Theme/ThemeApplicationModel"),
11
+ CommunicationApplicationModel: require("./Communication/CommunicationApplicationModel"),
14
12
 
15
- UserApplicationModel: require("./User/UserApplicationModel"),
13
+ ConfigurationApplicationModel: require("./Configuration/ConfigurationApplicationModel"),
16
14
 
17
15
  ContentApplicationModel: require("./Content/ContentApplicationModel"),
18
16
 
19
- CommunicationApplicationModel: require("./Communication/CommunicationApplicationModel"),
17
+ FileStorageApplicationModel: require("./FileStorage/FileStorageApplicationModel"),
20
18
 
21
- ShareApplicationModel: require("./Share/ShareApplicationModel"),
19
+ LeadApplicationModel: require("./Lead/LeadApplicationModel"),
22
20
 
23
- FileStorageApplicationModel: require("./FileStorage/FileStorageApplicationModel"),
21
+ LogisticApplicationModel: require("./Logistic/LogisticApplicationModel"),
24
22
 
25
- ConfigurationApplicationModel: require("./Configuration/ConfigurationApplicationModel"),
23
+ OrderApplicationModel: require("./Order/OrderApplicationModel"),
26
24
 
27
25
  PaymentApplicationModel: require("./Payment/PaymentApplicationModel"),
28
26
 
29
- OrderApplicationModel: require("./Order/OrderApplicationModel"),
27
+ PosCartApplicationModel: require("./PosCart/PosCartApplicationModel"),
30
28
 
31
29
  RewardsApplicationModel: require("./Rewards/RewardsApplicationModel"),
32
30
 
33
- PosCartApplicationModel: require("./PosCart/PosCartApplicationModel"),
31
+ ShareApplicationModel: require("./Share/ShareApplicationModel"),
34
32
 
35
- LogisticApplicationModel: require("./Logistic/LogisticApplicationModel"),
33
+ ThemeApplicationModel: require("./Theme/ThemeApplicationModel"),
34
+
35
+ UserApplicationModel: require("./User/UserApplicationModel"),
36
36
  },
37
37
  };
@@ -38,7 +38,7 @@ function requestInterceptorFn() {
38
38
  }
39
39
  const { host, pathname, search } = new URL(url);
40
40
  const { data, headers, method, params } = config;
41
- headers["x-fp-sdk-version"] = "1.1.1";
41
+ headers["x-fp-sdk-version"] = "1.1.2";
42
42
  let querySearchObj = querystring.parse(search);
43
43
  querySearchObj = { ...querySearchObj, ...params };
44
44
  let queryParam = "";
@@ -44,6 +44,7 @@ export namespace AVAILABLE_PAGE_TYPE {
44
44
  const REGISTER: string;
45
45
  const SHIPPING_POLICY: string;
46
46
  const RETURN_POLICY: string;
47
+ const ORDER_STATUS: string;
47
48
  }
48
49
  export const NAVIGATORS: {
49
50
  "about-us": {
@@ -282,4 +283,8 @@ export const NAVIGATORS: {
282
283
  name: string;
283
284
  link: string;
284
285
  };
286
+ "order-status": {
287
+ name: string;
288
+ link: string;
289
+ };
285
290
  };
@@ -44,6 +44,7 @@ const AVAILABLE_PAGE_TYPE = {
44
44
  REGISTER: "register",
45
45
  SHIPPING_POLICY: "shipping-policy",
46
46
  RETURN_POLICY: "return-policy",
47
+ ORDER_STATUS: "order-status",
47
48
  };
48
49
 
49
50
  Object.freeze(AVAILABLE_PAGE_TYPE);
@@ -313,6 +314,10 @@ const NAVIGATORS = {
313
314
  name: "Return policy",
314
315
  link: "/return-policy",
315
316
  },
317
+ "order-status": {
318
+ name: "Order status",
319
+ link: "/cart/order-status",
320
+ },
316
321
  };
317
322
 
318
323
  module.exports = {
@@ -100,6 +100,7 @@ class BillingModel {
100
100
  }
101
101
  static DetailedPlanComponents() {
102
102
  return Joi.object({
103
+ config: Joi.any(),
103
104
  description: Joi.string().allow(""),
104
105
  display_text: Joi.string().allow(""),
105
106
  enabled: Joi.boolean(),
@@ -438,6 +439,7 @@ class BillingModel {
438
439
  return Joi.object({
439
440
  _id: Joi.string().allow(""),
440
441
  cancel_at_period_end: Joi.boolean(),
442
+ channel_type: Joi.string().allow(""),
441
443
  collection_method: Joi.string().allow(""),
442
444
  created_at: Joi.string().allow(""),
443
445
  current_period: BillingModel.SubscriptionCurrentPeriod(),
@@ -593,8 +595,11 @@ class BillingModel {
593
595
  }
594
596
  static SubscriptionStatus() {
595
597
  return Joi.object({
598
+ current_subscriptions: Joi.array().items(BillingModel.Subscription()),
596
599
  is_enabled: Joi.boolean(),
597
- mandate_amount: Joi.number(),
600
+ latest_invoice: BillingModel.InvoicesData(),
601
+ mandate_amount: Joi.string().allow(""),
602
+ next_plan: BillingModel.Plan(),
598
603
  subscription: BillingModel.Subscription(),
599
604
  });
600
605
  }