@gofynd/fdk-client-javascript 1.1.2 → 1.1.4

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 (120) hide show
  1. package/README.md +2 -2
  2. package/index.d.ts +7 -7
  3. package/index.js +12 -12
  4. package/package.json +1 -1
  5. package/sdk/application/ApplicationClient.d.ts +20 -20
  6. package/sdk/application/ApplicationClient.js +26 -26
  7. package/sdk/application/Cart/CartApplicationClient.d.ts +36 -6
  8. package/sdk/application/Cart/CartApplicationClient.js +105 -10
  9. package/sdk/application/Cart/CartApplicationModel.d.ts +9 -0
  10. package/sdk/application/Cart/CartApplicationModel.js +105 -1
  11. package/sdk/application/Cart/CartApplicationValidator.d.ts +1 -0
  12. package/sdk/application/Cart/CartApplicationValidator.js +15 -1
  13. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +1 -0
  14. package/sdk/application/Catalog/CatalogApplicationModel.js +13 -0
  15. package/sdk/application/Common/CommonApplicationModel.js +4 -0
  16. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +14 -10
  17. package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -10
  18. package/sdk/application/Configuration/ConfigurationApplicationModel.js +6 -5
  19. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +1 -0
  20. package/sdk/application/Content/ContentApplicationModel.js +3 -1
  21. package/sdk/application/Lead/LeadApplicationModel.js +4 -1
  22. package/sdk/application/Logistic/LogisticApplicationModel.js +3 -2
  23. package/sdk/application/Order/OrderApplicationClient.d.ts +2 -2
  24. package/sdk/application/Order/OrderApplicationClient.js +2 -2
  25. package/sdk/application/Order/OrderApplicationModel.js +18 -8
  26. package/sdk/application/Payment/PaymentApplicationClient.d.ts +35 -0
  27. package/sdk/application/Payment/PaymentApplicationClient.js +200 -0
  28. package/sdk/application/Payment/PaymentApplicationModel.d.ts +4 -0
  29. package/sdk/application/Payment/PaymentApplicationModel.js +58 -7
  30. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +3 -0
  31. package/sdk/application/Payment/PaymentApplicationValidator.js +19 -0
  32. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +16 -3
  33. package/sdk/application/PosCart/PosCartApplicationClient.js +39 -6
  34. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +6 -0
  35. package/sdk/application/PosCart/PosCartApplicationModel.js +63 -1
  36. package/sdk/application/PosCart/PosCartApplicationValidator.js +6 -0
  37. package/sdk/application/index.d.ts +10 -10
  38. package/sdk/application/index.js +13 -13
  39. package/sdk/common/Constant.d.ts +5 -0
  40. package/sdk/common/Constant.js +5 -0
  41. package/sdk/partner/OAuthClient.js +1 -1
  42. package/sdk/platform/Billing/BillingPlatformModel.js +6 -1
  43. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +491 -2
  44. package/sdk/platform/Cart/CartPlatformApplicationClient.js +2661 -337
  45. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +32 -0
  46. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +269 -0
  47. package/sdk/platform/Cart/CartPlatformModel.d.ts +58 -0
  48. package/sdk/platform/Cart/CartPlatformModel.js +652 -3
  49. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +8 -2
  50. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +10 -0
  51. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -0
  52. package/sdk/platform/Catalog/CatalogPlatformClient.js +2 -2
  53. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1 -0
  54. package/sdk/platform/Catalog/CatalogPlatformModel.js +43 -31
  55. package/sdk/platform/Common/CommonPlatformModel.js +4 -0
  56. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1 -0
  57. package/sdk/platform/Communication/CommunicationPlatformModel.js +9 -0
  58. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +2 -2
  59. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +2 -2
  60. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +5 -4
  61. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +99 -78
  62. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +99 -78
  63. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +87 -71
  64. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +87 -71
  65. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +2 -0
  66. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +34 -7
  67. package/sdk/platform/Content/ContentPlatformModel.js +3 -1
  68. package/sdk/platform/Finance/FinancePlatformClient.d.ts +135 -0
  69. package/sdk/platform/Finance/FinancePlatformClient.js +853 -0
  70. package/sdk/platform/Finance/FinancePlatformModel.d.ts +51 -0
  71. package/sdk/platform/Finance/FinancePlatformModel.js +342 -0
  72. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +16 -0
  73. package/sdk/platform/Finance/FinancePlatformValidator.js +84 -0
  74. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +11 -1
  75. package/sdk/platform/Order/OrderPlatformApplicationClient.js +66 -2
  76. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -0
  77. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -0
  78. package/sdk/platform/Order/OrderPlatformClient.d.ts +161 -79
  79. package/sdk/platform/Order/OrderPlatformClient.js +546 -114
  80. package/sdk/platform/Order/OrderPlatformModel.d.ts +42 -6
  81. package/sdk/platform/Order/OrderPlatformModel.js +569 -159
  82. package/sdk/platform/Order/OrderPlatformValidator.d.ts +6 -0
  83. package/sdk/platform/Order/OrderPlatformValidator.js +52 -9
  84. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +22 -0
  85. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +127 -0
  86. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +2 -0
  87. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +13 -0
  88. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +145 -0
  89. package/sdk/platform/Partner/PartnerPlatformClient.js +799 -0
  90. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +39 -0
  91. package/sdk/platform/Partner/PartnerPlatformModel.js +367 -0
  92. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +14 -0
  93. package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -0
  94. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +221 -0
  95. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1476 -190
  96. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +20 -0
  97. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +126 -0
  98. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +48 -0
  99. package/sdk/platform/Payment/PaymentPlatformModel.js +452 -7
  100. package/sdk/platform/PlatformApplicationClient.d.ts +1249 -937
  101. package/sdk/platform/PlatformApplicationClient.js +1366 -1033
  102. package/sdk/platform/PlatformClient.d.ts +10979 -8771
  103. package/sdk/platform/PlatformClient.js +11874 -9197
  104. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +134 -0
  105. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +852 -0
  106. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +16 -0
  107. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +81 -0
  108. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +223 -0
  109. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +1296 -0
  110. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +97 -0
  111. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +778 -0
  112. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +21 -0
  113. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +130 -0
  114. package/sdk/platform/index.d.ts +16 -14
  115. package/sdk/platform/index.js +22 -18
  116. package/sdk/public/Configuration/ConfigurationPublicModel.js +5 -0
  117. package/sdk/public/PublicClient.d.ts +2 -2
  118. package/sdk/public/PublicClient.js +4 -4
  119. package/sdk/public/index.d.ts +1 -1
  120. package/sdk/public/index.js +2 -2
@@ -77,6 +77,7 @@ class CartModel {
77
77
  static AddCartRequest() {
78
78
  return Joi.object({
79
79
  items: Joi.array().items(CartModel.AddProductCart()),
80
+ new_cart: Joi.boolean(),
80
81
  });
81
82
  }
82
83
  static AddProductCart() {
@@ -88,6 +89,7 @@ class CartModel {
88
89
  extra_meta: Joi.any(),
89
90
  item_id: Joi.number(),
90
91
  item_size: Joi.string().allow(""),
92
+ meta: Joi.any(),
91
93
  parent_item_identifiers: Joi.array().items(
92
94
  Joi.object().pattern(/\S/, Joi.string().allow(""))
93
95
  ),
@@ -122,6 +124,20 @@ class CartModel {
122
124
  promotion_type: Joi.string().allow(""),
123
125
  });
124
126
  }
127
+ static ApplyCouponRequest() {
128
+ return Joi.object({
129
+ coupon_code: Joi.string().allow("").required(),
130
+ });
131
+ }
132
+ static Article() {
133
+ return Joi.object({
134
+ article_id: Joi.string().allow("").required(),
135
+ code: Joi.string().allow(""),
136
+ meta: Joi.any(),
137
+ type: Joi.string().allow(""),
138
+ value: Joi.number(),
139
+ });
140
+ }
125
141
  static ArticlePriceInfo() {
126
142
  return Joi.object({
127
143
  base: CartModel.BasePrice(),
@@ -161,12 +177,30 @@ class CartModel {
161
177
  raw: CartModel.RawBreakup(),
162
178
  });
163
179
  }
180
+ static CartCheckoutResponse() {
181
+ return Joi.object({
182
+ app_intercept_url: Joi.string().allow(""),
183
+ callback_url: Joi.string().allow(""),
184
+ cart: CartModel.CheckCart(),
185
+ data: Joi.any(),
186
+ message: Joi.string().allow(""),
187
+ order_id: Joi.string().allow(""),
188
+ payment_confirm_url: Joi.string().allow(""),
189
+ success: Joi.boolean(),
190
+ });
191
+ }
164
192
  static CartCurrency() {
165
193
  return Joi.object({
166
194
  code: Joi.string().allow(""),
167
195
  symbol: Joi.string().allow(""),
168
196
  });
169
197
  }
198
+ static CartDeliveryModesResponse() {
199
+ return Joi.object({
200
+ available_modes: Joi.array().items(Joi.string().allow("")),
201
+ pickup_stores: Joi.array().items(Joi.number()),
202
+ });
203
+ }
170
204
  static CartDetailResponse() {
171
205
  return Joi.object({
172
206
  applied_promo_details: Joi.array().items(CartModel.AppliedPromotion()),
@@ -184,6 +218,8 @@ class CartModel {
184
218
  items: Joi.array().items(CartModel.CartProductInfo()),
185
219
  last_modified: Joi.string().allow(""),
186
220
  message: Joi.string().allow(""),
221
+ pan_config: Joi.any(),
222
+ pan_no: Joi.string().allow(""),
187
223
  payment_selection_lock: CartModel.PaymentSelectionLock(),
188
224
  restrict_checkout: Joi.boolean(),
189
225
  });
@@ -195,12 +231,27 @@ class CartModel {
195
231
  size: Joi.string().allow("").required(),
196
232
  });
197
233
  }
234
+ static CartItemCountResponse() {
235
+ return Joi.object({
236
+ user_cart_items_count: Joi.number(),
237
+ });
238
+ }
198
239
  static CartItemMeta() {
199
240
  return Joi.object({
200
241
  group_id: Joi.string().allow(""),
201
242
  primary_item: Joi.boolean(),
202
243
  });
203
244
  }
245
+ static CartList() {
246
+ return Joi.object({
247
+ cart_id: Joi.string().allow(""),
248
+ cart_value: Joi.number(),
249
+ created_on: Joi.string().allow(""),
250
+ item_counts: Joi.number(),
251
+ pick_up_customer_details: Joi.any(),
252
+ user_id: Joi.string().allow(""),
253
+ });
254
+ }
204
255
  static CartMetaConfigAdd() {
205
256
  return Joi.object({
206
257
  bulk_coupons: Joi.boolean(),
@@ -225,14 +276,29 @@ class CartModel {
225
276
  revenue_engine_coupon: Joi.boolean(),
226
277
  });
227
278
  }
279
+ static CartMetaMissingResponse() {
280
+ return Joi.object({
281
+ errors: Joi.array().items(Joi.string().allow("")),
282
+ });
283
+ }
284
+ static CartMetaResponse() {
285
+ return Joi.object({
286
+ is_valid: Joi.boolean(),
287
+ message: Joi.string().allow(""),
288
+ });
289
+ }
228
290
  static CartProduct() {
229
291
  return Joi.object({
292
+ _custom_json: Joi.any(),
230
293
  action: CartModel.ProductAction(),
231
294
  brand: CartModel.BaseInfo(),
232
295
  categories: Joi.array().items(CartModel.CategoryInfo()),
233
296
  images: Joi.array().items(CartModel.ProductImage()),
297
+ item_code: Joi.string().allow("").allow(null),
234
298
  name: Joi.string().allow(""),
235
299
  slug: Joi.string().allow(""),
300
+ tags: Joi.array().items(Joi.string().allow("")),
301
+ teaser_tag: CartModel.Tags(),
236
302
  type: Joi.string().allow(""),
237
303
  uid: Joi.number(),
238
304
  });
@@ -247,7 +313,9 @@ class CartModel {
247
313
  article: CartModel.ProductArticle(),
248
314
  availability: CartModel.ProductAvailability(),
249
315
  bulk_offer: Joi.any(),
316
+ coupon: CartModel.CouponDetails(),
250
317
  coupon_message: Joi.string().allow(""),
318
+ custom_order: Joi.any(),
251
319
  delivery_promise: CartModel.ShipmentPromise(),
252
320
  discount: Joi.string().allow(""),
253
321
  identifiers: CartModel.CartProductIdentifer().required(),
@@ -276,6 +344,45 @@ class CartModel {
276
344
  threshold: Joi.number(),
277
345
  });
278
346
  }
347
+ static CheckCart() {
348
+ return Joi.object({
349
+ breakup_values: CartModel.CartBreakup(),
350
+ buy_now: Joi.boolean(),
351
+ cart_id: Joi.number(),
352
+ checkout_mode: Joi.string().allow(""),
353
+ cod_available: Joi.boolean(),
354
+ cod_charges: Joi.number(),
355
+ cod_message: Joi.string().allow(""),
356
+ comment: Joi.string().allow(""),
357
+ coupon_text: Joi.string().allow(""),
358
+ currency: CartModel.CartCurrency(),
359
+ delivery_charge_info: Joi.string().allow(""),
360
+ delivery_charge_order_value: Joi.number(),
361
+ delivery_charges: Joi.number(),
362
+ delivery_promise: CartModel.ShipmentPromise(),
363
+ error_message: Joi.string().allow(""),
364
+ gstin: Joi.string().allow(""),
365
+ id: Joi.string().allow(""),
366
+ is_valid: Joi.boolean(),
367
+ items: Joi.array().items(CartModel.CartProductInfo()),
368
+ last_modified: Joi.string().allow(""),
369
+ message: Joi.string().allow(""),
370
+ order_id: Joi.string().allow(""),
371
+ payment_selection_lock: CartModel.PaymentSelectionLock(),
372
+ restrict_checkout: Joi.boolean(),
373
+ store_code: Joi.string().allow(""),
374
+ store_emps: Joi.array().items(Joi.any()),
375
+ success: Joi.boolean(),
376
+ uid: Joi.string().allow(""),
377
+ user_type: Joi.string().allow(""),
378
+ });
379
+ }
380
+ static Collection() {
381
+ return Joi.object({
382
+ collected_by: Joi.string().allow("").required(),
383
+ refund_by: Joi.string().allow("").required(),
384
+ });
385
+ }
279
386
  static CompareObject() {
280
387
  return Joi.object({
281
388
  equals: Joi.number(),
@@ -285,6 +392,22 @@ class CartModel {
285
392
  less_than_equals: Joi.number(),
286
393
  });
287
394
  }
395
+ static Coupon() {
396
+ return Joi.object({
397
+ coupon_code: Joi.string().allow(""),
398
+ coupon_type: Joi.string().allow("").allow(null),
399
+ coupon_value: Joi.number(),
400
+ description: Joi.string().allow("").allow(null),
401
+ expires_on: Joi.string().allow(""),
402
+ is_applicable: Joi.boolean(),
403
+ is_applied: Joi.boolean(),
404
+ max_discount_value: Joi.number(),
405
+ message: Joi.string().allow(""),
406
+ minimum_cart_value: Joi.number(),
407
+ sub_title: Joi.string().allow(""),
408
+ title: Joi.string().allow(""),
409
+ });
410
+ }
288
411
  static CouponAction() {
289
412
  return Joi.object({
290
413
  action_date: Joi.string().allow("").allow(null),
@@ -340,6 +463,13 @@ class CartModel {
340
463
  modified_on: Joi.string().allow("").allow(null),
341
464
  });
342
465
  }
466
+ static CouponDetails() {
467
+ return Joi.object({
468
+ code: Joi.string().allow(""),
469
+ discount_single_quantity: Joi.number(),
470
+ discount_total_quantity: Joi.number(),
471
+ });
472
+ }
343
473
  static CouponPartialUpdate() {
344
474
  return Joi.object({
345
475
  archive: Joi.boolean(),
@@ -381,6 +511,33 @@ class CartModel {
381
511
  validity: CartModel.Validity().required(),
382
512
  });
383
513
  }
514
+ static CouponValidity() {
515
+ return Joi.object({
516
+ code: Joi.string().allow("").allow(null),
517
+ discount: Joi.number(),
518
+ display_message_en: Joi.string().allow("").allow(null),
519
+ next_validation_required: Joi.boolean().allow(null),
520
+ title: Joi.string().allow(""),
521
+ valid: Joi.boolean(),
522
+ });
523
+ }
524
+ static DeleteAddressResponse() {
525
+ return Joi.object({
526
+ id: Joi.string().allow(""),
527
+ is_deleted: Joi.boolean(),
528
+ });
529
+ }
530
+ static DeleteCartDetailResponse() {
531
+ return Joi.object({
532
+ message: Joi.string().allow(""),
533
+ success: Joi.boolean(),
534
+ });
535
+ }
536
+ static DeleteCartRequest() {
537
+ return Joi.object({
538
+ cart_id_list: Joi.array().items(Joi.string().allow("")),
539
+ });
540
+ }
384
541
  static DeliveryCharges() {
385
542
  return Joi.object({
386
543
  charges: Joi.array().items(CartModel.Charges()),
@@ -441,6 +598,7 @@ class CartModel {
441
598
  return Joi.object({
442
599
  description: Joi.string().allow(""),
443
600
  name: Joi.string().allow(""),
601
+ offer_label: Joi.string().allow(""),
444
602
  offer_text: Joi.string().allow(""),
445
603
  });
446
604
  }
@@ -450,6 +608,12 @@ class CartModel {
450
608
  title: Joi.string().allow(""),
451
609
  });
452
610
  }
611
+ static Files() {
612
+ return Joi.object({
613
+ key: Joi.string().allow("").required(),
614
+ values: Joi.array().items(Joi.string().allow("")).required(),
615
+ });
616
+ }
453
617
  static FreeGiftItem() {
454
618
  return Joi.object({
455
619
  item_brand_name: Joi.string().allow(""),
@@ -460,6 +624,30 @@ class CartModel {
460
624
  item_slug: Joi.string().allow(""),
461
625
  });
462
626
  }
627
+ static GeoLocation() {
628
+ return Joi.object({
629
+ latitude: Joi.number(),
630
+ longitude: Joi.number(),
631
+ });
632
+ }
633
+ static GetCouponResponse() {
634
+ return Joi.object({
635
+ available_coupon_list: Joi.array().items(CartModel.Coupon()),
636
+ page: CartModel.PageCoupon(),
637
+ });
638
+ }
639
+ static GetShareCartLinkRequest() {
640
+ return Joi.object({
641
+ id: Joi.string().allow(""),
642
+ meta: Joi.any(),
643
+ });
644
+ }
645
+ static GetShareCartLinkResponse() {
646
+ return Joi.object({
647
+ share_url: Joi.string().allow(""),
648
+ token: Joi.string().allow(""),
649
+ });
650
+ }
463
651
  static Identifier() {
464
652
  return Joi.object({
465
653
  article_id: Joi.array().items(Joi.string().allow("")),
@@ -467,6 +655,7 @@ class CartModel {
467
655
  category_id: Joi.array().items(Joi.number()),
468
656
  collection_id: Joi.array().items(Joi.string().allow("")),
469
657
  company_id: Joi.array().items(Joi.number()),
658
+ email_domain: Joi.array().items(Joi.string().allow("")),
470
659
  exclude_brand_id: Joi.array().items(Joi.number()),
471
660
  item_id: Joi.array().items(Joi.number()),
472
661
  store_id: Joi.array().items(Joi.number()),
@@ -485,16 +674,23 @@ class CartModel {
485
674
  item_brand: Joi.array().items(Joi.number()),
486
675
  item_category: Joi.array().items(Joi.number()),
487
676
  item_company: Joi.array().items(Joi.number()),
677
+ item_department: Joi.array().items(Joi.number()),
488
678
  item_exclude_brand: Joi.array().items(Joi.number()),
489
679
  item_exclude_category: Joi.array().items(Joi.number()),
490
680
  item_exclude_company: Joi.array().items(Joi.number()),
681
+ item_exclude_department: Joi.array().items(Joi.number()),
491
682
  item_exclude_id: Joi.array().items(Joi.number()),
683
+ item_exclude_l1_category: Joi.array().items(Joi.number()),
684
+ item_exclude_l2_category: Joi.array().items(Joi.number()),
492
685
  item_exclude_sku: Joi.array().items(Joi.string().allow("")),
493
686
  item_exclude_store: Joi.array().items(Joi.number()),
494
687
  item_id: Joi.array().items(Joi.number()),
688
+ item_l1_category: Joi.array().items(Joi.number()),
689
+ item_l2_category: Joi.array().items(Joi.number()),
495
690
  item_size: Joi.array().items(Joi.string().allow("")),
496
691
  item_sku: Joi.array().items(Joi.string().allow("")),
497
692
  item_store: Joi.array().items(Joi.number()),
693
+ item_tags: Joi.array().items(Joi.string().allow("")),
498
694
  });
499
695
  }
500
696
  static LoyaltyPoints() {
@@ -505,6 +701,12 @@ class CartModel {
505
701
  total: Joi.number(),
506
702
  });
507
703
  }
704
+ static MultiCartResponse() {
705
+ return Joi.object({
706
+ data: Joi.array().items(CartModel.CartList()),
707
+ success: Joi.boolean(),
708
+ });
709
+ }
508
710
  static MultiTenderPaymentMeta() {
509
711
  return Joi.object({
510
712
  current_status: Joi.string().allow("").allow(null),
@@ -702,6 +904,15 @@ class CartModel {
702
904
  type: Joi.string().allow("").required(),
703
905
  });
704
906
  }
907
+ static PageCoupon() {
908
+ return Joi.object({
909
+ current: Joi.number(),
910
+ has_next: Joi.boolean(),
911
+ has_previous: Joi.boolean(),
912
+ total: Joi.number(),
913
+ total_item_count: Joi.number(),
914
+ });
915
+ }
705
916
  static PaymentAllowValue() {
706
917
  return Joi.object({
707
918
  max: Joi.number(),
@@ -712,9 +923,34 @@ class CartModel {
712
923
  max: Joi.number(),
713
924
  });
714
925
  }
926
+ static PaymentCouponValidate() {
927
+ return Joi.object({
928
+ coupon_validity: CartModel.CouponValidity(),
929
+ message: Joi.string().allow(""),
930
+ success: Joi.boolean().required(),
931
+ });
932
+ }
933
+ static PaymentMeta() {
934
+ return Joi.object({
935
+ merchant_code: Joi.string().allow(""),
936
+ payment_gateway: Joi.string().allow(""),
937
+ payment_identifier: Joi.string().allow("").allow(null),
938
+ type: Joi.string().allow(""),
939
+ });
940
+ }
941
+ static PaymentMethod() {
942
+ return Joi.object({
943
+ amount: Joi.number().allow(null),
944
+ mode: Joi.string().allow("").required(),
945
+ name: Joi.string().allow(""),
946
+ payment: Joi.string().allow(""),
947
+ payment_meta: CartModel.PaymentMeta().required(),
948
+ });
949
+ }
715
950
  static PaymentModes() {
716
951
  return Joi.object({
717
952
  codes: Joi.array().items(Joi.string().allow("")),
953
+ iins: Joi.array().items(Joi.string().allow("")),
718
954
  networks: Joi.array().items(Joi.string().allow("")),
719
955
  types: Joi.array().items(Joi.string().allow("")),
720
956
  uses: CartModel.PaymentAllowValue(),
@@ -727,6 +963,192 @@ class CartModel {
727
963
  payment_identifier: Joi.string().allow(""),
728
964
  });
729
965
  }
966
+ static PickupStoreDetail() {
967
+ return Joi.object({
968
+ address: Joi.string().allow(""),
969
+ address_type: Joi.string().allow(""),
970
+ area: Joi.string().allow(""),
971
+ area_code: Joi.string().allow(""),
972
+ area_code_slug: Joi.string().allow(""),
973
+ city: Joi.string().allow(""),
974
+ country: Joi.string().allow(""),
975
+ email: Joi.string().allow(""),
976
+ id: Joi.number(),
977
+ landmark: Joi.string().allow(""),
978
+ name: Joi.string().allow(""),
979
+ phone: Joi.string().allow(""),
980
+ pincode: Joi.number(),
981
+ state: Joi.string().allow(""),
982
+ store_code: Joi.string().allow(""),
983
+ uid: Joi.number(),
984
+ });
985
+ }
986
+ static PlatformAddCartRequest() {
987
+ return Joi.object({
988
+ items: Joi.array().items(CartModel.AddProductCart()),
989
+ new_cart: Joi.boolean(),
990
+ user_id: Joi.string().allow(""),
991
+ });
992
+ }
993
+ static PlatformAddress() {
994
+ return Joi.object({
995
+ address: Joi.string().allow(""),
996
+ address_type: Joi.string().allow(""),
997
+ area: Joi.string().allow(""),
998
+ area_code: Joi.string().allow(""),
999
+ area_code_slug: Joi.string().allow(""),
1000
+ cart_id: Joi.string().allow(""),
1001
+ checkout_mode: Joi.string().allow(""),
1002
+ city: Joi.string().allow(""),
1003
+ country: Joi.string().allow(""),
1004
+ country_code: Joi.string().allow(""),
1005
+ created_by_user_id: Joi.string().allow(""),
1006
+ email: Joi.string().allow(""),
1007
+ geo_location: CartModel.GeoLocation(),
1008
+ google_map_point: Joi.any(),
1009
+ id: Joi.string().allow(""),
1010
+ is_active: Joi.boolean(),
1011
+ is_default_address: Joi.boolean(),
1012
+ landmark: Joi.string().allow(""),
1013
+ meta: Joi.any(),
1014
+ name: Joi.string().allow(""),
1015
+ phone: Joi.string().allow(""),
1016
+ state: Joi.string().allow(""),
1017
+ tags: Joi.array().items(Joi.string().allow("")),
1018
+ user_id: Joi.string().allow(""),
1019
+ });
1020
+ }
1021
+ static PlatformCartCheckoutDetailRequest() {
1022
+ return Joi.object({
1023
+ address_id: Joi.string().allow(""),
1024
+ aggregator: Joi.string().allow(""),
1025
+ billing_address: Joi.any(),
1026
+ billing_address_id: Joi.string().allow(""),
1027
+ callback_url: Joi.string().allow("").allow(null),
1028
+ checkout_mode: Joi.string().allow(""),
1029
+ delivery_address: Joi.any(),
1030
+ device_id: Joi.string().allow("").allow(null),
1031
+ employee_code: Joi.string().allow("").allow(null),
1032
+ extra_meta: Joi.any(),
1033
+ files: Joi.array().items(CartModel.Files()),
1034
+ id: Joi.string().allow("").required(),
1035
+ merchant_code: Joi.string().allow(""),
1036
+ meta: Joi.any(),
1037
+ order_type: Joi.string().allow("").required(),
1038
+ ordering_store: Joi.number().allow(null),
1039
+ payment_auto_confirm: Joi.boolean(),
1040
+ payment_identifier: Joi.string().allow("").allow(null),
1041
+ payment_mode: Joi.string().allow("").required(),
1042
+ payment_params: Joi.any().allow(null),
1043
+ pick_at_store_uid: Joi.number().allow(null),
1044
+ pos: Joi.boolean(),
1045
+ staff: CartModel.StaffCheckout(),
1046
+ user_id: Joi.string().allow("").required(),
1047
+ });
1048
+ }
1049
+ static PlatformCartCheckoutDetailV2Request() {
1050
+ return Joi.object({
1051
+ address_id: Joi.string().allow(""),
1052
+ aggregator: Joi.string().allow(""),
1053
+ billing_address: Joi.any(),
1054
+ billing_address_id: Joi.string().allow(""),
1055
+ callback_url: Joi.string().allow("").allow(null),
1056
+ checkout_mode: Joi.string().allow(""),
1057
+ custom_meta: Joi.any(),
1058
+ delivery_address: Joi.any(),
1059
+ device_id: Joi.string().allow("").allow(null),
1060
+ employee_code: Joi.string().allow("").allow(null),
1061
+ extra_meta: Joi.any(),
1062
+ files: Joi.array().items(CartModel.Files()),
1063
+ id: Joi.string().allow("").required(),
1064
+ merchant_code: Joi.string().allow(""),
1065
+ meta: Joi.any(),
1066
+ order_type: Joi.string().allow("").required(),
1067
+ ordering_store: Joi.number().allow(null),
1068
+ payment_auto_confirm: Joi.boolean(),
1069
+ payment_identifier: Joi.string().allow("").allow(null),
1070
+ payment_methods: Joi.array().items(CartModel.PaymentMethod()).required(),
1071
+ payment_mode: Joi.string().allow(""),
1072
+ payment_params: Joi.any().allow(null),
1073
+ pick_at_store_uid: Joi.number().allow(null),
1074
+ pos: Joi.boolean(),
1075
+ staff: CartModel.StaffCheckout(),
1076
+ user_id: Joi.string().allow("").required(),
1077
+ });
1078
+ }
1079
+ static PlatformCartMetaRequest() {
1080
+ return Joi.object({
1081
+ checkout_mode: Joi.string().allow(""),
1082
+ comment: Joi.string().allow(""),
1083
+ gift_details: Joi.any().allow(null),
1084
+ gstin: Joi.string().allow(""),
1085
+ pan_no: Joi.string().allow(""),
1086
+ pick_up_customer_details: Joi.any(),
1087
+ staff_user_id: Joi.string().allow("").allow(null),
1088
+ });
1089
+ }
1090
+ static PlatformCartShipmentsResponse() {
1091
+ return Joi.object({
1092
+ applied_promo_details: Joi.array().items(CartModel.AppliedPromotion()),
1093
+ breakup_values: CartModel.CartBreakup(),
1094
+ buy_now: Joi.boolean(),
1095
+ checkout_mode: Joi.string().allow(""),
1096
+ comment: Joi.string().allow(""),
1097
+ coupon_text: Joi.string().allow(""),
1098
+ currency: CartModel.CartCurrency(),
1099
+ delivery_charge_info: Joi.string().allow(""),
1100
+ delivery_promise: CartModel.ShipmentPromise(),
1101
+ error: Joi.boolean(),
1102
+ gstin: Joi.string().allow(""),
1103
+ id: Joi.string().allow(""),
1104
+ is_valid: Joi.boolean(),
1105
+ items: Joi.array().items(CartModel.CartProductInfo()),
1106
+ last_modified: Joi.string().allow(""),
1107
+ message: Joi.string().allow(""),
1108
+ pan_config: Joi.any(),
1109
+ pan_no: Joi.string().allow(""),
1110
+ payment_selection_lock: CartModel.PaymentSelectionLock(),
1111
+ restrict_checkout: Joi.boolean(),
1112
+ shipments: Joi.array().items(CartModel.PlatformShipmentResponse()),
1113
+ staff_user_id: Joi.string().allow("").allow(null),
1114
+ });
1115
+ }
1116
+ static PlatformGetAddressesResponse() {
1117
+ return Joi.object({
1118
+ address: Joi.array().items(CartModel.PlatformAddress()),
1119
+ });
1120
+ }
1121
+ static PlatformSelectCartAddressRequest() {
1122
+ return Joi.object({
1123
+ billing_address_id: Joi.string().allow(""),
1124
+ cart_id: Joi.string().allow(""),
1125
+ checkout_mode: Joi.string().allow(""),
1126
+ id: Joi.string().allow(""),
1127
+ user_id: Joi.string().allow(""),
1128
+ });
1129
+ }
1130
+ static PlatformShipmentResponse() {
1131
+ return Joi.object({
1132
+ articles: Joi.array().items(CartModel.ShipmentArticle()),
1133
+ box_type: Joi.string().allow("").allow(null),
1134
+ dp_id: Joi.string().allow("").allow(null),
1135
+ dp_options: Joi.any().allow(null),
1136
+ fulfillment_id: Joi.number(),
1137
+ fulfillment_type: Joi.string().allow(""),
1138
+ items: Joi.array().items(CartModel.CartProductInfo()),
1139
+ order_type: Joi.string().allow(""),
1140
+ promise: CartModel.ShipmentPromise(),
1141
+ shipment_type: Joi.string().allow(""),
1142
+ shipments: Joi.number(),
1143
+ });
1144
+ }
1145
+ static PlatformUpdateCartRequest() {
1146
+ return Joi.object({
1147
+ items: Joi.array().items(CartModel.UpdateProductCart()),
1148
+ operation: Joi.string().allow("").required(),
1149
+ user_id: Joi.string().allow(""),
1150
+ });
1151
+ }
730
1152
  static PostOrder() {
731
1153
  return Joi.object({
732
1154
  cancellation_allowed: Joi.boolean(),
@@ -739,6 +1161,62 @@ class CartModel {
739
1161
  return_allowed: Joi.boolean(),
740
1162
  });
741
1163
  }
1164
+ static PriceAdjustment() {
1165
+ return Joi.object({
1166
+ allowed_refund: Joi.boolean(),
1167
+ apply_expiry: Joi.string().allow(""),
1168
+ article_ids: Joi.array().items(CartModel.Article()).required(),
1169
+ article_level_distribution: Joi.boolean().required(),
1170
+ cart_id: Joi.string().allow("").required(),
1171
+ cart_value: Joi.number(),
1172
+ collection: CartModel.Collection().required(),
1173
+ id: Joi.string().allow(""),
1174
+ is_authenticated: Joi.boolean().required(),
1175
+ message: Joi.string().allow("").required(),
1176
+ meta: Joi.any(),
1177
+ type: Joi.string().allow("").required(),
1178
+ value: Joi.number().required(),
1179
+ });
1180
+ }
1181
+ static PriceAdjustmentAdd() {
1182
+ return Joi.object({
1183
+ allowed_refund: Joi.boolean(),
1184
+ apply_expiry: Joi.string().allow(""),
1185
+ article_ids: Joi.array().items(CartModel.Article()).required(),
1186
+ article_level_distribution: Joi.boolean().required(),
1187
+ cart_id: Joi.string().allow("").required(),
1188
+ cart_value: Joi.number(),
1189
+ collection: CartModel.Collection().required(),
1190
+ created_by: Joi.string().allow(""),
1191
+ is_authenticated: Joi.boolean().required(),
1192
+ message: Joi.string().allow("").required(),
1193
+ meta: Joi.any(),
1194
+ type: Joi.string().allow("").required(),
1195
+ value: Joi.number().required(),
1196
+ });
1197
+ }
1198
+ static PriceAdjustmentResponse() {
1199
+ return Joi.object({
1200
+ data: CartModel.PriceAdjustment(),
1201
+ });
1202
+ }
1203
+ static PriceAdjustmentUpdate() {
1204
+ return Joi.object({
1205
+ allowed_refund: Joi.boolean(),
1206
+ apply_expiry: Joi.string().allow(""),
1207
+ article_ids: Joi.array().items(CartModel.Article()).required(),
1208
+ article_level_distribution: Joi.boolean().required(),
1209
+ cart_id: Joi.string().allow("").required(),
1210
+ cart_value: Joi.number(),
1211
+ collection: CartModel.Collection().required(),
1212
+ is_authenticated: Joi.boolean().required(),
1213
+ message: Joi.string().allow("").required(),
1214
+ meta: Joi.any(),
1215
+ modified_by: Joi.string().allow(""),
1216
+ type: Joi.string().allow("").required(),
1217
+ value: Joi.number().required(),
1218
+ });
1219
+ }
742
1220
  static PriceRange() {
743
1221
  return Joi.object({
744
1222
  max: Joi.number(),
@@ -755,8 +1233,13 @@ class CartModel {
755
1233
  static ProductArticle() {
756
1234
  return Joi.object({
757
1235
  _custom_json: Joi.any(),
1236
+ cart_item_meta: Joi.any(),
758
1237
  extra_meta: Joi.any(),
1238
+ gift_card: Joi.any(),
759
1239
  identifier: Joi.any(),
1240
+ is_gift_visible: Joi.boolean(),
1241
+ meta: Joi.any(),
1242
+ mto_quantity: Joi.number(),
760
1243
  parent_item_identifiers: Joi.any(),
761
1244
  price: CartModel.ArticlePriceInfo(),
762
1245
  product_group_tags: Joi.array().items(Joi.string().allow("")),
@@ -764,7 +1247,7 @@ class CartModel {
764
1247
  seller: CartModel.BaseInfo(),
765
1248
  seller_identifier: Joi.string().allow(""),
766
1249
  size: Joi.string().allow(""),
767
- store: CartModel.BaseInfo(),
1250
+ store: CartModel.StoreInfo(),
768
1251
  type: Joi.string().allow(""),
769
1252
  uid: Joi.string().allow(""),
770
1253
  });
@@ -917,7 +1400,7 @@ class CartModel {
917
1400
  return Joi.object({
918
1401
  cron: Joi.string().allow("").allow(null),
919
1402
  duration: Joi.number().allow(null),
920
- end: Joi.string().allow("").allow(null),
1403
+ end: Joi.string().allow("").required(),
921
1404
  next_schedule: Joi.array().items(Joi.any()),
922
1405
  published: Joi.boolean().required(),
923
1406
  start: Joi.string().allow("").required(),
@@ -925,7 +1408,7 @@ class CartModel {
925
1408
  }
926
1409
  static PromotionsResponse() {
927
1410
  return Joi.object({
928
- items: CartModel.PromotionListItem(),
1411
+ items: Joi.array().items(CartModel.PromotionListItem()),
929
1412
  page: CartModel.Page(),
930
1413
  });
931
1414
  }
@@ -965,6 +1448,7 @@ class CartModel {
965
1448
  delivery_charge: Joi.number(),
966
1449
  discount: Joi.number(),
967
1450
  fynd_cash: Joi.number(),
1451
+ gift_card: Joi.number(),
968
1452
  gst_charges: Joi.number(),
969
1453
  mrp_total: Joi.number(),
970
1454
  subtotal: Joi.number(),
@@ -983,6 +1467,7 @@ class CartModel {
983
1467
  post_order: CartModel.PostOrder(),
984
1468
  price_range: CartModel.PriceRange(),
985
1469
  user_groups: Joi.array().items(Joi.number()),
1470
+ user_type: Joi.string().allow(""),
986
1471
  uses: CartModel.UsesRestriction(),
987
1472
  });
988
1473
  }
@@ -1021,6 +1506,58 @@ class CartModel {
1021
1506
  value_type: Joi.string().allow("").required(),
1022
1507
  });
1023
1508
  }
1509
+ static SaveAddressResponse() {
1510
+ return Joi.object({
1511
+ id: Joi.string().allow(""),
1512
+ is_default_address: Joi.boolean(),
1513
+ success: Joi.boolean(),
1514
+ });
1515
+ }
1516
+ static SharedCart() {
1517
+ return Joi.object({
1518
+ breakup_values: CartModel.CartBreakup(),
1519
+ buy_now: Joi.boolean(),
1520
+ cart_id: Joi.number(),
1521
+ checkout_mode: Joi.string().allow(""),
1522
+ comment: Joi.string().allow(""),
1523
+ coupon_text: Joi.string().allow(""),
1524
+ currency: CartModel.CartCurrency(),
1525
+ delivery_charge_info: Joi.string().allow(""),
1526
+ delivery_promise: CartModel.ShipmentPromise(),
1527
+ gstin: Joi.string().allow(""),
1528
+ id: Joi.string().allow(""),
1529
+ is_valid: Joi.boolean(),
1530
+ items: Joi.array().items(CartModel.CartProductInfo()),
1531
+ last_modified: Joi.string().allow(""),
1532
+ message: Joi.string().allow(""),
1533
+ payment_selection_lock: CartModel.PaymentSelectionLock(),
1534
+ restrict_checkout: Joi.boolean(),
1535
+ shared_cart_details: CartModel.SharedCartDetails(),
1536
+ uid: Joi.string().allow(""),
1537
+ });
1538
+ }
1539
+ static SharedCartDetails() {
1540
+ return Joi.object({
1541
+ created_on: Joi.string().allow(""),
1542
+ meta: Joi.any(),
1543
+ source: Joi.any(),
1544
+ token: Joi.string().allow(""),
1545
+ user: Joi.any(),
1546
+ });
1547
+ }
1548
+ static SharedCartResponse() {
1549
+ return Joi.object({
1550
+ cart: CartModel.SharedCart(),
1551
+ error: Joi.string().allow(""),
1552
+ });
1553
+ }
1554
+ static ShipmentArticle() {
1555
+ return Joi.object({
1556
+ article_id: Joi.string().allow(""),
1557
+ meta: Joi.string().allow(""),
1558
+ quantity: Joi.string().allow(""),
1559
+ });
1560
+ }
1024
1561
  static ShipmentPromise() {
1025
1562
  return Joi.object({
1026
1563
  formatted: CartModel.PromiseFormatted(),
@@ -1048,6 +1585,15 @@ class CartModel {
1048
1585
  state: Joi.string().allow("").allow(null),
1049
1586
  });
1050
1587
  }
1588
+ static StaffCheckout() {
1589
+ return Joi.object({
1590
+ _id: Joi.string().allow("").required(),
1591
+ employee_code: Joi.string().allow(""),
1592
+ first_name: Joi.string().allow("").required(),
1593
+ last_name: Joi.string().allow("").required(),
1594
+ user: Joi.string().allow("").required(),
1595
+ });
1596
+ }
1051
1597
  static State() {
1052
1598
  return Joi.object({
1053
1599
  is_archived: Joi.boolean(),
@@ -1055,12 +1601,37 @@ class CartModel {
1055
1601
  is_public: Joi.boolean(),
1056
1602
  });
1057
1603
  }
1604
+ static StoreDetailsResponse() {
1605
+ return Joi.object({
1606
+ items: Joi.array().items(CartModel.PickupStoreDetail()),
1607
+ });
1608
+ }
1609
+ static StoreInfo() {
1610
+ return Joi.object({
1611
+ name: Joi.string().allow(""),
1612
+ store_code: Joi.string().allow(""),
1613
+ uid: Joi.number(),
1614
+ });
1615
+ }
1058
1616
  static SuccessMessage() {
1059
1617
  return Joi.object({
1060
1618
  message: Joi.string().allow(""),
1061
1619
  success: Joi.boolean(),
1062
1620
  });
1063
1621
  }
1622
+ static Tags() {
1623
+ return Joi.object({
1624
+ tags: Joi.any(),
1625
+ });
1626
+ }
1627
+ static UpdateAddressResponse() {
1628
+ return Joi.object({
1629
+ id: Joi.string().allow(""),
1630
+ is_default_address: Joi.boolean(),
1631
+ is_updated: Joi.boolean(),
1632
+ success: Joi.boolean(),
1633
+ });
1634
+ }
1064
1635
  static UpdateCartDetailResponse() {
1065
1636
  return Joi.object({
1066
1637
  cart: CartModel.CartDetailResponse(),
@@ -1068,12 +1639,47 @@ class CartModel {
1068
1639
  success: Joi.boolean(),
1069
1640
  });
1070
1641
  }
1642
+ static UpdateCartPaymentRequest() {
1643
+ return Joi.object({
1644
+ address_id: Joi.string().allow(""),
1645
+ aggregator_name: Joi.string().allow(""),
1646
+ id: Joi.string().allow(""),
1647
+ merchant_code: Joi.string().allow(""),
1648
+ payment_identifier: Joi.string().allow("").allow(null),
1649
+ payment_mode: Joi.string().allow(""),
1650
+ });
1651
+ }
1652
+ static UpdateCartPaymentRequestV2() {
1653
+ return Joi.object({
1654
+ address_id: Joi.string().allow(""),
1655
+ aggregator_name: Joi.string().allow(""),
1656
+ id: Joi.string().allow(""),
1657
+ merchant_code: Joi.string().allow(""),
1658
+ payment_identifier: Joi.string().allow("").allow(null),
1659
+ payment_methods: Joi.array().items(CartModel.PaymentMethod()),
1660
+ payment_mode: Joi.string().allow(""),
1661
+ });
1662
+ }
1071
1663
  static UpdateCartRequest() {
1072
1664
  return Joi.object({
1073
1665
  items: Joi.array().items(CartModel.UpdateProductCart()),
1074
1666
  operation: Joi.string().allow("").required(),
1075
1667
  });
1076
1668
  }
1669
+ static UpdateCartShipmentItem() {
1670
+ return Joi.object({
1671
+ article_uid: Joi.string().allow("").required(),
1672
+ quantity: Joi.number(),
1673
+ shipment_type: Joi.string().allow("").required(),
1674
+ });
1675
+ }
1676
+ static UpdateCartShipmentRequest() {
1677
+ return Joi.object({
1678
+ shipments: Joi.array()
1679
+ .items(CartModel.UpdateCartShipmentItem())
1680
+ .required(),
1681
+ });
1682
+ }
1077
1683
  static UpdateProductCart() {
1078
1684
  return Joi.object({
1079
1685
  _custom_json: Joi.any(),
@@ -1083,10 +1689,53 @@ class CartModel {
1083
1689
  item_id: Joi.number(),
1084
1690
  item_index: Joi.number(),
1085
1691
  item_size: Joi.string().allow(""),
1692
+ meta: Joi.any(),
1086
1693
  parent_item_identifiers: Joi.any(),
1087
1694
  quantity: Joi.number(),
1088
1695
  });
1089
1696
  }
1697
+ static UpdateUserCartMapping() {
1698
+ return Joi.object({
1699
+ user_id: Joi.string().allow("").required(),
1700
+ });
1701
+ }
1702
+ static UserCartMappingResponse() {
1703
+ return Joi.object({
1704
+ applied_promo_details: Joi.array().items(CartModel.AppliedPromotion()),
1705
+ breakup_values: CartModel.CartBreakup(),
1706
+ buy_now: Joi.boolean(),
1707
+ checkout_mode: Joi.string().allow(""),
1708
+ comment: Joi.string().allow(""),
1709
+ coupon_text: Joi.string().allow(""),
1710
+ currency: CartModel.CartCurrency(),
1711
+ delivery_charge_info: Joi.string().allow(""),
1712
+ delivery_promise: CartModel.ShipmentPromise(),
1713
+ gstin: Joi.string().allow(""),
1714
+ id: Joi.string().allow(""),
1715
+ is_valid: Joi.boolean(),
1716
+ items: Joi.array().items(CartModel.CartProductInfo()),
1717
+ last_modified: Joi.string().allow(""),
1718
+ message: Joi.string().allow(""),
1719
+ pan_config: Joi.any(),
1720
+ pan_no: Joi.string().allow(""),
1721
+ payment_selection_lock: CartModel.PaymentSelectionLock(),
1722
+ restrict_checkout: Joi.boolean(),
1723
+ user: CartModel.UserInfo(),
1724
+ });
1725
+ }
1726
+ static UserInfo() {
1727
+ return Joi.object({
1728
+ _id: Joi.string().allow(""),
1729
+ created_at: Joi.string().allow(""),
1730
+ external_id: Joi.string().allow(""),
1731
+ first_name: Joi.string().allow(""),
1732
+ gender: Joi.string().allow(""),
1733
+ last_name: Joi.string().allow(""),
1734
+ mobile: Joi.string().allow(""),
1735
+ modified_on: Joi.string().allow(""),
1736
+ uid: Joi.string().allow(""),
1737
+ });
1738
+ }
1090
1739
  static UserRegistered() {
1091
1740
  return Joi.object({
1092
1741
  end: Joi.string().allow("").allow(null),