@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
@@ -5,16 +5,20 @@ declare class CartModel {
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 CartCheckoutDetailRequest(): any;
21
+ static CartCheckoutDetailV2Request(): any;
18
22
  static CartCheckoutResponse(): any;
19
23
  static CartCurrency(): any;
20
24
  static CartDetailResponse(): any;
@@ -30,15 +34,22 @@ declare class CartModel {
30
34
  static CheckCart(): any;
31
35
  static Coupon(): any;
32
36
  static CouponBreakup(): any;
37
+ static CouponDetails(): any;
33
38
  static CouponValidity(): any;
34
39
  static CurrencyInfo(): any;
40
+ static CustomerDetails(): any;
35
41
  static DeleteAddressResponse(): any;
42
+ static DeleteCartDetailResponse(): any;
43
+ static DiscountRulesApp(): any;
36
44
  static DisplayBreakup(): any;
45
+ static FreeGiftItem(): any;
46
+ static FreeGiftItems(): any;
37
47
  static GeoLocation(): any;
38
48
  static GetAddressesResponse(): any;
39
49
  static GetCouponResponse(): any;
40
50
  static GetShareCartLinkRequest(): any;
41
51
  static GetShareCartLinkResponse(): any;
52
+ static GiftDetail(): any;
42
53
  static LadderOfferItem(): any;
43
54
  static LadderPrice(): any;
44
55
  static LadderPriceOffer(): any;
@@ -51,6 +62,8 @@ declare class CartModel {
51
62
  static Ownership(): any;
52
63
  static PageCoupon(): any;
53
64
  static PaymentCouponValidate(): any;
65
+ static PaymentMeta(): any;
66
+ static PaymentMethod(): any;
54
67
  static PaymentSelectionLock(): any;
55
68
  static ProductAction(): any;
56
69
  static ProductArticle(): any;
@@ -74,6 +87,8 @@ declare class CartModel {
74
87
  static ShipmentPromise(): any;
75
88
  static ShipmentResponse(): any;
76
89
  static StaffCheckout(): any;
90
+ static StoreInfo(): any;
91
+ static Tags(): any;
77
92
  static UpdateAddressResponse(): any;
78
93
  static UpdateCartDetailResponse(): any;
79
94
  static UpdateCartPaymentRequest(): any;
@@ -17,6 +17,7 @@ class CartModel {
17
17
  static AddCartRequest() {
18
18
  return Joi.object({
19
19
  items: Joi.array().items(CartModel.AddProductCart()),
20
+ new_cart: Joi.boolean(),
20
21
  });
21
22
  }
22
23
  static AddProductCart() {
@@ -28,6 +29,7 @@ class CartModel {
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 CartModel {
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 CartModel {
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: CartModel.GeoLocation(),
56
60
  google_map_point: Joi.any(),
@@ -66,14 +70,27 @@ class CartModel {
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: CartModel.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(CartModel.AppliedFreeArticles()),
72
85
  article_quantity: Joi.number(),
86
+ buy_rules: Joi.array().items(CartModel.BuyRules()),
87
+ discount_rules: Joi.array().items(CartModel.DiscountRulesApp()),
73
88
  mrp_promotion: Joi.boolean(),
74
89
  offer_text: Joi.string().allow(""),
75
90
  ownership: CartModel.Ownership(),
76
91
  promo_id: Joi.string().allow(""),
92
+ promotion_group: Joi.string().allow(""),
93
+ promotion_name: Joi.string().allow(""),
77
94
  promotion_type: Joi.string().allow(""),
78
95
  });
79
96
  }
@@ -82,6 +99,11 @@ class CartModel {
82
99
  coupon_code: Joi.string().allow("").required(),
83
100
  });
84
101
  }
102
+ static ArticleGiftDetail() {
103
+ return Joi.object({
104
+ article_id: CartModel.GiftDetail(),
105
+ });
106
+ }
85
107
  static ArticlePriceInfo() {
86
108
  return Joi.object({
87
109
  base: CartModel.BasePrice(),
@@ -113,6 +135,12 @@ class CartModel {
113
135
  data: Joi.array().items(CartModel.BulkPriceOffer()),
114
136
  });
115
137
  }
138
+ static BuyRules() {
139
+ return Joi.object({
140
+ cart_conditions: Joi.any(),
141
+ item_criteria: Joi.any(),
142
+ });
143
+ }
116
144
  static CartBreakup() {
117
145
  return Joi.object({
118
146
  coupon: CartModel.CouponBreakup(),
@@ -135,10 +163,13 @@ class CartModel {
135
163
  billing_address_id: Joi.string().allow(""),
136
164
  callback_url: Joi.string().allow("").allow(null),
137
165
  custom_meta: Joi.array().items(CartModel.CartCheckoutCustomMeta()),
166
+ customer_details: CartModel.CustomerDetails(),
138
167
  delivery_address: Joi.any(),
139
168
  extra_meta: Joi.any(),
169
+ id: Joi.string().allow("").allow(null),
140
170
  merchant_code: Joi.string().allow(""),
141
171
  meta: Joi.any(),
172
+ order_type: Joi.string().allow(""),
142
173
  ordering_store: Joi.number().allow(null),
143
174
  payment_auto_confirm: Joi.boolean(),
144
175
  payment_identifier: Joi.string().allow("").allow(null),
@@ -147,6 +178,31 @@ class CartModel {
147
178
  staff: CartModel.StaffCheckout(),
148
179
  });
149
180
  }
181
+ static CartCheckoutDetailV2Request() {
182
+ return Joi.object({
183
+ address_id: Joi.string().allow(""),
184
+ aggregator: Joi.string().allow(""),
185
+ billing_address: Joi.any(),
186
+ billing_address_id: Joi.string().allow(""),
187
+ callback_url: Joi.string().allow("").allow(null),
188
+ cart_id: Joi.string().allow(""),
189
+ custom_meta: Joi.any(),
190
+ customer_details: CartModel.CustomerDetails(),
191
+ delivery_address: Joi.any(),
192
+ extra_meta: Joi.any(),
193
+ id: Joi.string().allow("").allow(null),
194
+ merchant_code: Joi.string().allow(""),
195
+ meta: Joi.any(),
196
+ order_type: Joi.string().allow(""),
197
+ ordering_store: Joi.number().allow(null),
198
+ payment_auto_confirm: Joi.boolean(),
199
+ payment_identifier: Joi.string().allow("").allow(null),
200
+ payment_methods: Joi.array().items(CartModel.PaymentMethod()).required(),
201
+ payment_mode: Joi.string().allow("").required(),
202
+ payment_params: Joi.any().allow(null),
203
+ staff: CartModel.StaffCheckout(),
204
+ });
205
+ }
150
206
  static CartCheckoutResponse() {
151
207
  return Joi.object({
152
208
  app_intercept_url: Joi.string().allow(""),
@@ -182,6 +238,8 @@ class CartModel {
182
238
  items: Joi.array().items(CartModel.CartProductInfo()),
183
239
  last_modified: Joi.string().allow(""),
184
240
  message: Joi.string().allow(""),
241
+ pan_config: Joi.any(),
242
+ pan_no: Joi.string().allow(""),
185
243
  payment_selection_lock: CartModel.PaymentSelectionLock(),
186
244
  restrict_checkout: Joi.boolean(),
187
245
  });
@@ -200,23 +258,30 @@ class CartModel {
200
258
  return Joi.object({
201
259
  checkout_mode: Joi.string().allow(""),
202
260
  comment: Joi.string().allow(""),
261
+ delivery_slots: Joi.any(),
262
+ gift_details: CartModel.ArticleGiftDetail(),
203
263
  gstin: Joi.string().allow(""),
204
264
  pick_up_customer_details: Joi.any(),
205
265
  });
206
266
  }
207
267
  static CartMetaResponse() {
208
268
  return Joi.object({
269
+ is_valid: Joi.boolean(),
209
270
  message: Joi.string().allow(""),
210
271
  });
211
272
  }
212
273
  static CartProduct() {
213
274
  return Joi.object({
275
+ _custom_json: Joi.any(),
214
276
  action: CartModel.ProductAction(),
215
277
  brand: CartModel.BaseInfo(),
216
278
  categories: Joi.array().items(CartModel.CategoryInfo()),
217
279
  images: Joi.array().items(CartModel.ProductImage()),
280
+ item_code: Joi.string().allow("").allow(null),
218
281
  name: Joi.string().allow(""),
219
282
  slug: Joi.string().allow(""),
283
+ tags: Joi.array().items(Joi.string().allow("")),
284
+ teaser_tag: CartModel.Tags(),
220
285
  type: Joi.string().allow(""),
221
286
  uid: Joi.number(),
222
287
  });
@@ -231,7 +296,9 @@ class CartModel {
231
296
  article: CartModel.ProductArticle(),
232
297
  availability: CartModel.ProductAvailability(),
233
298
  bulk_offer: Joi.any(),
299
+ coupon: CartModel.CouponDetails(),
234
300
  coupon_message: Joi.string().allow(""),
301
+ custom_order: Joi.any(),
235
302
  delivery_promise: CartModel.ShipmentPromise(),
236
303
  discount: Joi.string().allow(""),
237
304
  identifiers: CartModel.CartProductIdentifer().required(),
@@ -313,7 +380,9 @@ class CartModel {
313
380
  static Coupon() {
314
381
  return Joi.object({
315
382
  coupon_code: Joi.string().allow(""),
383
+ coupon_type: Joi.string().allow("").allow(null),
316
384
  coupon_value: Joi.number(),
385
+ description: Joi.string().allow("").allow(null),
317
386
  expires_on: Joi.string().allow(""),
318
387
  is_applicable: Joi.boolean(),
319
388
  is_applied: Joi.boolean(),
@@ -327,18 +396,33 @@ class CartModel {
327
396
  static CouponBreakup() {
328
397
  return Joi.object({
329
398
  code: Joi.string().allow(""),
399
+ coupon_type: Joi.string().allow("").allow(null),
400
+ coupon_value: Joi.number(),
401
+ description: Joi.string().allow("").allow(null),
330
402
  is_applied: Joi.boolean(),
403
+ max_discount_value: Joi.number(),
331
404
  message: Joi.string().allow(""),
405
+ minimum_cart_value: Joi.number(),
406
+ sub_title: Joi.string().allow("").allow(null),
407
+ title: Joi.string().allow("").allow(null),
332
408
  type: Joi.string().allow(""),
333
409
  uid: Joi.string().allow(""),
334
410
  value: Joi.number(),
335
411
  });
336
412
  }
413
+ static CouponDetails() {
414
+ return Joi.object({
415
+ code: Joi.string().allow(""),
416
+ discount_single_quantity: Joi.number(),
417
+ discount_total_quantity: Joi.number(),
418
+ });
419
+ }
337
420
  static CouponValidity() {
338
421
  return Joi.object({
339
422
  code: Joi.string().allow("").allow(null),
340
423
  discount: Joi.number(),
341
424
  display_message_en: Joi.string().allow("").allow(null),
425
+ next_validation_required: Joi.boolean().allow(null),
342
426
  title: Joi.string().allow(""),
343
427
  valid: Joi.boolean(),
344
428
  });
@@ -349,12 +433,33 @@ class CartModel {
349
433
  symbol: Joi.string().allow(""),
350
434
  });
351
435
  }
436
+ static CustomerDetails() {
437
+ return Joi.object({
438
+ email: Joi.string().allow("").allow(null),
439
+ mobile: Joi.string().allow("").required(),
440
+ name: Joi.string().allow(""),
441
+ });
442
+ }
352
443
  static DeleteAddressResponse() {
353
444
  return Joi.object({
354
445
  id: Joi.string().allow(""),
355
446
  is_deleted: Joi.boolean(),
356
447
  });
357
448
  }
449
+ static DeleteCartDetailResponse() {
450
+ return Joi.object({
451
+ message: Joi.string().allow(""),
452
+ success: Joi.boolean(),
453
+ });
454
+ }
455
+ static DiscountRulesApp() {
456
+ return Joi.object({
457
+ item_criteria: Joi.any(),
458
+ matched_buy_rules: Joi.array().items(Joi.string().allow("")),
459
+ offer: Joi.any(),
460
+ raw_offer: Joi.any(),
461
+ });
462
+ }
358
463
  static DisplayBreakup() {
359
464
  return Joi.object({
360
465
  currency_code: Joi.string().allow(""),
@@ -365,6 +470,26 @@ class CartModel {
365
470
  value: Joi.number(),
366
471
  });
367
472
  }
473
+ static FreeGiftItem() {
474
+ return Joi.object({
475
+ item_brand_name: Joi.string().allow(""),
476
+ item_id: Joi.number(),
477
+ item_images_url: Joi.array().items(Joi.string().allow("")),
478
+ item_name: Joi.string().allow(""),
479
+ item_price_details: Joi.any(),
480
+ item_slug: Joi.string().allow(""),
481
+ });
482
+ }
483
+ static FreeGiftItems() {
484
+ return Joi.object({
485
+ item_brand_name: Joi.string().allow(""),
486
+ item_id: Joi.number(),
487
+ item_images_url: Joi.array().items(Joi.string().allow("")),
488
+ item_name: Joi.string().allow(""),
489
+ item_price_details: Joi.any(),
490
+ item_slug: Joi.string().allow(""),
491
+ });
492
+ }
368
493
  static GeoLocation() {
369
494
  return Joi.object({
370
495
  latitude: Joi.number(),
@@ -395,6 +520,12 @@ class CartModel {
395
520
  token: Joi.string().allow(""),
396
521
  });
397
522
  }
523
+ static GiftDetail() {
524
+ return Joi.object({
525
+ gift_message: Joi.string().allow(""),
526
+ is_gift_applied: Joi.boolean(),
527
+ });
528
+ }
398
529
  static LadderOfferItem() {
399
530
  return Joi.object({
400
531
  margin: Joi.number(),
@@ -415,7 +546,11 @@ class CartModel {
415
546
  }
416
547
  static LadderPriceOffer() {
417
548
  return Joi.object({
549
+ buy_rules: Joi.any(),
550
+ calculate_on: Joi.string().allow(""),
418
551
  description: Joi.string().allow(""),
552
+ discount_rules: Joi.array().items(Joi.any()),
553
+ free_gift_items: Joi.array().items(CartModel.FreeGiftItems()),
419
554
  id: Joi.string().allow(""),
420
555
  offer_prices: Joi.array().items(CartModel.LadderOfferItem()),
421
556
  offer_text: Joi.string().allow(""),
@@ -491,6 +626,23 @@ class CartModel {
491
626
  success: Joi.boolean().required(),
492
627
  });
493
628
  }
629
+ static PaymentMeta() {
630
+ return Joi.object({
631
+ merchant_code: Joi.string().allow(""),
632
+ payment_gateway: Joi.string().allow(""),
633
+ payment_identifier: Joi.string().allow("").allow(null),
634
+ type: Joi.string().allow(""),
635
+ });
636
+ }
637
+ static PaymentMethod() {
638
+ return Joi.object({
639
+ amount: Joi.number().allow(null),
640
+ mode: Joi.string().allow("").required(),
641
+ name: Joi.string().allow(""),
642
+ payment: Joi.string().allow(""),
643
+ payment_meta: CartModel.PaymentMeta().required(),
644
+ });
645
+ }
494
646
  static PaymentSelectionLock() {
495
647
  return Joi.object({
496
648
  default_options: Joi.string().allow(""),
@@ -508,14 +660,21 @@ class CartModel {
508
660
  static ProductArticle() {
509
661
  return Joi.object({
510
662
  _custom_json: Joi.any(),
663
+ cart_item_meta: Joi.any(),
511
664
  extra_meta: Joi.any(),
665
+ gift_card: Joi.any(),
666
+ identifier: Joi.any(),
667
+ is_gift_visible: Joi.boolean(),
668
+ meta: Joi.any(),
669
+ mto_quantity: Joi.number(),
512
670
  parent_item_identifiers: Joi.any(),
513
671
  price: CartModel.ArticlePriceInfo(),
514
672
  product_group_tags: Joi.array().items(Joi.string().allow("")),
515
673
  quantity: Joi.number(),
516
674
  seller: CartModel.BaseInfo(),
675
+ seller_identifier: Joi.string().allow(""),
517
676
  size: Joi.string().allow(""),
518
- store: CartModel.BaseInfo(),
677
+ store: CartModel.StoreInfo(),
519
678
  type: Joi.string().allow(""),
520
679
  uid: Joi.string().allow(""),
521
680
  });
@@ -579,7 +738,10 @@ class CartModel {
579
738
  }
580
739
  static PromotionOffer() {
581
740
  return Joi.object({
741
+ buy_rules: Joi.any(),
582
742
  description: Joi.string().allow(""),
743
+ discount_rules: Joi.array().items(Joi.any()),
744
+ free_gift_items: Joi.array().items(CartModel.FreeGiftItems()),
583
745
  id: Joi.string().allow(""),
584
746
  offer_text: Joi.string().allow(""),
585
747
  promotion_group: Joi.string().allow(""),
@@ -599,6 +761,7 @@ class CartModel {
599
761
  delivery_charge: Joi.number(),
600
762
  discount: Joi.number(),
601
763
  fynd_cash: Joi.number(),
764
+ gift_card: Joi.number(),
602
765
  gst_charges: Joi.number(),
603
766
  mrp_total: Joi.number(),
604
767
  subtotal: Joi.number(),
@@ -693,6 +856,18 @@ class CartModel {
693
856
  user: Joi.string().allow("").required(),
694
857
  });
695
858
  }
859
+ static StoreInfo() {
860
+ return Joi.object({
861
+ name: Joi.string().allow(""),
862
+ store_code: Joi.string().allow(""),
863
+ uid: Joi.number(),
864
+ });
865
+ }
866
+ static Tags() {
867
+ return Joi.object({
868
+ tags: Joi.any(),
869
+ });
870
+ }
696
871
  static UpdateAddressResponse() {
697
872
  return Joi.object({
698
873
  id: Joi.string().allow(""),
@@ -733,6 +908,7 @@ class CartModel {
733
908
  item_id: Joi.number(),
734
909
  item_index: Joi.number(),
735
910
  item_size: Joi.string().allow(""),
911
+ meta: Joi.any(),
736
912
  parent_item_identifiers: Joi.any(),
737
913
  quantity: Joi.number(),
738
914
  });
@@ -5,6 +5,8 @@ declare class CartValidator {
5
5
  static applyCoupon(): any;
6
6
  static applyRewardPoints(): any;
7
7
  static checkoutCart(): any;
8
+ static checkoutCartV2(): any;
9
+ static deleteCart(): any;
8
10
  static getAddressById(): any;
9
11
  static getAddresses(): any;
10
12
  static getBulkDiscountOffers(): any;
@@ -14,6 +14,7 @@ class CartValidator {
14
14
  b: Joi.boolean(),
15
15
  areaCode: Joi.string().allow(""),
16
16
  buyNow: Joi.boolean(),
17
+ id: Joi.string().allow(""),
17
18
  body: CartModel.AddCartRequest().required(),
18
19
  }).required();
19
20
  }
@@ -46,6 +47,19 @@ class CartValidator {
46
47
  }).required();
47
48
  }
48
49
 
50
+ static checkoutCartV2() {
51
+ return Joi.object({
52
+ buyNow: Joi.boolean(),
53
+ body: CartModel.CartCheckoutDetailV2Request().required(),
54
+ }).required();
55
+ }
56
+
57
+ static deleteCart() {
58
+ return Joi.object({
59
+ id: Joi.string().allow(""),
60
+ });
61
+ }
62
+
49
63
  static getAddressById() {
50
64
  return Joi.object({
51
65
  id: Joi.string().allow("").required(),
@@ -135,6 +149,7 @@ class CartValidator {
135
149
  slug: Joi.string().allow(""),
136
150
  pageSize: Joi.number(),
137
151
  promotionGroup: Joi.string().allow(""),
152
+ storeId: Joi.number(),
138
153
  });
139
154
  }
140
155
 
@@ -145,6 +160,7 @@ class CartValidator {
145
160
  buyNow: Joi.boolean(),
146
161
  addressId: Joi.string().allow(""),
147
162
  areaCode: Joi.string().allow(""),
163
+ orderType: Joi.string().allow(""),
148
164
  });
149
165
  }
150
166
 
@@ -221,6 +237,10 @@ class CartValidator {
221
237
  paymentIdentifier: Joi.string().allow(""),
222
238
  aggregatorName: Joi.string().allow(""),
223
239
  merchantCode: Joi.string().allow(""),
240
+ iin: Joi.string().allow(""),
241
+ network: Joi.string().allow(""),
242
+ type: Joi.string().allow(""),
243
+ cardId: Joi.string().allow(""),
224
244
  });
225
245
  }
226
246
  }
@@ -139,6 +139,8 @@ declare class Catalog {
139
139
  * will be passed in f parameter as shown in the example below. Double
140
140
  * Pipe (||) denotes the OR condition, whereas Triple-colon (:::)
141
141
  * indicates a new filter paramater applied as an AND condition.
142
+ * @param {string} [arg.q] - The search query for entering partial or full
143
+ * name of product, brand, category, or collection.
142
144
  * @param {boolean} [arg.filters] - This is a boolean value, True for
143
145
  * fetching all filter parameters and False for disabling the filter parameters.
144
146
  * @param {string} [arg.sortOn] - The order in which the list of products
@@ -153,9 +155,10 @@ declare class Catalog {
153
155
  * @summary: Get the items in a collection
154
156
  * @description: Get items in a collection specified by its `slug`.
155
157
  */
156
- getCollectionItemsBySlug({ slug, f, filters, sortOn, pageId, pageSize, pageNo, pageType, }?: {
158
+ getCollectionItemsBySlug({ slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType, }?: {
157
159
  slug: string;
158
160
  f?: string;
161
+ q?: string;
159
162
  filters?: boolean;
160
163
  sortOn?: string;
161
164
  pageId?: string;
@@ -172,6 +175,8 @@ declare class Catalog {
172
175
  * will be passed in f parameter as shown in the example below. Double
173
176
  * Pipe (||) denotes the OR condition, whereas Triple-colon (:::)
174
177
  * indicates a new filter paramater applied as an AND condition.
178
+ * @param {string} [arg.q] - The search query for entering partial or full
179
+ * name of product, brand, category, or collection.
175
180
  * @param {boolean} [arg.filters] - This is a boolean value, True for
176
181
  * fetching all filter parameters and False for disabling the filter parameters.
177
182
  * @param {string} [arg.sortOn] - The order in which the list of products
@@ -181,9 +186,10 @@ declare class Catalog {
181
186
  * @summary: Get the items in a collection
182
187
  * @description: Get items in a collection specified by its `slug`.
183
188
  */
184
- getCollectionItemsBySlugPaginator({ slug, f, filters, sortOn, pageSize, }?: {
189
+ getCollectionItemsBySlugPaginator({ slug, f, q, filters, sortOn, pageSize, }?: {
185
190
  slug: string;
186
191
  f?: string;
192
+ q?: string;
187
193
  filters?: boolean;
188
194
  sortOn?: string;
189
195
  pageSize?: number;
@@ -194,25 +200,29 @@ declare class Catalog {
194
200
  * given set of results.
195
201
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
196
202
  * @param {string[]} [arg.tag] - List of tags to filter collections
203
+ * @param {string} [arg.q] - Name of the collection to filter collection
197
204
  * @returns {Promise<GetCollectionListingResponse>} - Success response
198
205
  * @summary: List all the collections
199
206
  * @description: Collections are a great way to organize your products and can improve the ability for customers to find items quickly and efficiently.
200
207
  */
201
- getCollections({ pageNo, pageSize, tag }?: {
208
+ getCollections({ pageNo, pageSize, tag, q }?: {
202
209
  pageNo?: number;
203
210
  pageSize?: number;
204
211
  tag?: string[];
212
+ q?: string;
205
213
  }): Promise<GetCollectionListingResponse>;
206
214
  /**
207
215
  * @param {Object} arg - Arg object.
208
216
  * @param {number} [arg.pageSize] - The number of items to retrieve in each page.
209
217
  * @param {string[]} [arg.tag] - List of tags to filter collections
218
+ * @param {string} [arg.q] - Name of the collection to filter collection
210
219
  * @summary: List all the collections
211
220
  * @description: Collections are a great way to organize your products and can improve the ability for customers to find items quickly and efficiently.
212
221
  */
213
- getCollectionsPaginator({ pageSize, tag }?: {
222
+ getCollectionsPaginator({ pageSize, tag, q }?: {
214
223
  pageSize?: number;
215
224
  tag?: string[];
225
+ q?: string;
216
226
  }): Paginator;
217
227
  /**
218
228
  * @param {Object} arg - Arg object.