@gofynd/fdk-client-javascript 3.7.0 → 3.9.0

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 (34) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +7 -7
  4. package/sdk/application/Cart/CartApplicationClient.js +8 -8
  5. package/sdk/application/Payment/PaymentApplicationClient.d.ts +50 -0
  6. package/sdk/application/Payment/PaymentApplicationClient.js +210 -0
  7. package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
  8. package/sdk/application/Theme/ThemeApplicationClient.js +3 -1
  9. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +11 -1
  10. package/sdk/platform/Cart/CartPlatformApplicationClient.js +96 -1
  11. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +37 -1
  12. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +24 -0
  13. package/sdk/platform/Cart/CartPlatformModel.d.ts +155 -29
  14. package/sdk/platform/Cart/CartPlatformModel.js +83 -14
  15. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +124 -6
  16. package/sdk/platform/Catalog/CatalogPlatformClient.js +1074 -175
  17. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1072 -45
  18. package/sdk/platform/Catalog/CatalogPlatformModel.js +714 -5
  19. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +193 -19
  20. package/sdk/platform/Catalog/CatalogPlatformValidator.js +167 -14
  21. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +9 -4
  22. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +4 -4
  23. package/sdk/platform/Order/OrderPlatformClient.d.ts +1 -1
  24. package/sdk/platform/Order/OrderPlatformClient.js +1 -1
  25. package/sdk/platform/Order/OrderPlatformModel.d.ts +55 -3
  26. package/sdk/platform/Order/OrderPlatformModel.js +31 -1
  27. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +0 -10
  28. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +0 -4
  29. package/sdk/public/Content/ContentPublicClient.d.ts +2 -2
  30. package/sdk/public/Content/ContentPublicClient.js +4 -3
  31. package/sdk/public/Content/ContentPublicModel.d.ts +5 -0
  32. package/sdk/public/Content/ContentPublicModel.js +2 -0
  33. package/sdk/public/Content/ContentPublicValidator.d.ts +11 -3
  34. package/sdk/public/Content/ContentPublicValidator.js +7 -2
@@ -24,6 +24,16 @@ export = CartPlatformApplicationValidator;
24
24
  * @property {boolean} [buyNow]
25
25
  * @property {CartPlatformModel.ApplyCouponDetails} body
26
26
  */
27
+ /**
28
+ * @typedef ApplyLoyaltyPointsParam
29
+ * @property {CartPlatformModel.OrderingSource} [xOrderingSource] - Ordering
30
+ * source header, to be used to identify source of order creation.
31
+ * @property {string} [id] - The unique identifier of the cart.
32
+ * @property {boolean} [i] - Select `true` to retrieve all the items added in the cart.
33
+ * @property {boolean} [b] - Select `true` to retrieve the price breakup of cart items.
34
+ * @property {boolean} [buyNow] - This is boolean to get buy_now cart.
35
+ * @property {CartPlatformModel.RedeemLoyaltyPoints} body
36
+ */
27
37
  /**
28
38
  * @typedef CheckCartServiceabilityParam
29
39
  * @property {CartPlatformModel.OrderingSource} [xOrderingSource] - Ordering
@@ -444,6 +454,8 @@ declare class CartPlatformApplicationValidator {
444
454
  static addPriceAdjustment(): AddPriceAdjustmentParam;
445
455
  /** @returns {ApplyCouponParam} */
446
456
  static applyCoupon(): ApplyCouponParam;
457
+ /** @returns {ApplyLoyaltyPointsParam} */
458
+ static applyLoyaltyPoints(): ApplyLoyaltyPointsParam;
447
459
  /** @returns {CheckCartServiceabilityParam} */
448
460
  static checkCartServiceability(): CheckCartServiceabilityParam;
449
461
  /** @returns {CheckoutCartParam} */
@@ -562,7 +574,7 @@ declare class CartPlatformApplicationValidator {
562
574
  static validateCouponForPayment(): ValidateCouponForPaymentParam;
563
575
  }
564
576
  declare namespace CartPlatformApplicationValidator {
565
- export { AddAddressParam, AddItemsParam, AddPriceAdjustmentParam, ApplyCouponParam, CheckCartServiceabilityParam, CheckoutCartParam, CreateCartMetaConfigParam, CreateCouponParam, CreatePromotionParam, DeleteCartParam, DeleteCouponParam, DeletePromotionParam, FetchAndvalidateCartItemsParam, FetchCartMetaConfigParam, GetAbandonedCartParam, GetAbandonedCartDetailsParam, GetAddressByIdParam, GetAddressesParam, GetAppCouponsParam, GetAvailableDeliveryModesParam, GetCartParam, GetCartListParam, GetCartShareLinkParam, GetCartSharedItemsParam, GetCouponByIdParam, GetCouponCodeExistsParam, GetCouponOptionValuesParam, GetCouponsParam, GetItemCountParam, GetPriceAdjustmentsParam, GetPromosCouponConfigParam, GetPromotionByIdParam, GetPromotionCodeExistsParam, GetPromotionOffersParam, GetPromotionPaymentOffersParam, GetPromotionsParam, GetShipmentsParam, GetStoreAddressByUidParam, OverrideCartParam, PlatformAddItemsParam, PlatformCheckoutCartParam, PlatformCheckoutCartV2Param, PlatformUpdateCartParam, RemoveAddressParam, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam };
577
+ export { AddAddressParam, AddItemsParam, AddPriceAdjustmentParam, ApplyCouponParam, ApplyLoyaltyPointsParam, CheckCartServiceabilityParam, CheckoutCartParam, CreateCartMetaConfigParam, CreateCouponParam, CreatePromotionParam, DeleteCartParam, DeleteCouponParam, DeletePromotionParam, FetchAndvalidateCartItemsParam, FetchCartMetaConfigParam, GetAbandonedCartParam, GetAbandonedCartDetailsParam, GetAddressByIdParam, GetAddressesParam, GetAppCouponsParam, GetAvailableDeliveryModesParam, GetCartParam, GetCartListParam, GetCartShareLinkParam, GetCartSharedItemsParam, GetCouponByIdParam, GetCouponCodeExistsParam, GetCouponOptionValuesParam, GetCouponsParam, GetItemCountParam, GetPriceAdjustmentsParam, GetPromosCouponConfigParam, GetPromotionByIdParam, GetPromotionCodeExistsParam, GetPromotionOffersParam, GetPromotionPaymentOffersParam, GetPromotionsParam, GetShipmentsParam, GetStoreAddressByUidParam, OverrideCartParam, PlatformAddItemsParam, PlatformCheckoutCartParam, PlatformCheckoutCartV2Param, PlatformUpdateCartParam, RemoveAddressParam, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam };
566
578
  }
567
579
  type AddAddressParam = {
568
580
  body: CartPlatformModel.PlatformAddress;
@@ -591,6 +603,30 @@ type ApplyCouponParam = {
591
603
  buyNow?: boolean;
592
604
  body: CartPlatformModel.ApplyCouponDetails;
593
605
  };
606
+ type ApplyLoyaltyPointsParam = {
607
+ /**
608
+ * - Ordering
609
+ * source header, to be used to identify source of order creation.
610
+ */
611
+ xOrderingSource?: CartPlatformModel.OrderingSource;
612
+ /**
613
+ * - The unique identifier of the cart.
614
+ */
615
+ id?: string;
616
+ /**
617
+ * - Select `true` to retrieve all the items added in the cart.
618
+ */
619
+ i?: boolean;
620
+ /**
621
+ * - Select `true` to retrieve the price breakup of cart items.
622
+ */
623
+ b?: boolean;
624
+ /**
625
+ * - This is boolean to get buy_now cart.
626
+ */
627
+ buyNow?: boolean;
628
+ body: CartPlatformModel.RedeemLoyaltyPoints;
629
+ };
594
630
  type CheckCartServiceabilityParam = {
595
631
  /**
596
632
  * - Ordering
@@ -31,6 +31,17 @@ const CartPlatformModel = require("./CartPlatformModel");
31
31
  * @property {CartPlatformModel.ApplyCouponDetails} body
32
32
  */
33
33
 
34
+ /**
35
+ * @typedef ApplyLoyaltyPointsParam
36
+ * @property {CartPlatformModel.OrderingSource} [xOrderingSource] - Ordering
37
+ * source header, to be used to identify source of order creation.
38
+ * @property {string} [id] - The unique identifier of the cart.
39
+ * @property {boolean} [i] - Select `true` to retrieve all the items added in the cart.
40
+ * @property {boolean} [b] - Select `true` to retrieve the price breakup of cart items.
41
+ * @property {boolean} [buyNow] - This is boolean to get buy_now cart.
42
+ * @property {CartPlatformModel.RedeemLoyaltyPoints} body
43
+ */
44
+
34
45
  /**
35
46
  * @typedef CheckCartServiceabilityParam
36
47
  * @property {CartPlatformModel.OrderingSource} [xOrderingSource] - Ordering
@@ -538,6 +549,19 @@ class CartPlatformApplicationValidator {
538
549
  }).required();
539
550
  }
540
551
 
552
+ /** @returns {ApplyLoyaltyPointsParam} */
553
+ static applyLoyaltyPoints() {
554
+ return Joi.object({
555
+ xOrderingSource: CartPlatformModel.OrderingSource(),
556
+
557
+ id: Joi.string().allow(""),
558
+ i: Joi.boolean(),
559
+ b: Joi.boolean(),
560
+ buyNow: Joi.boolean(),
561
+ body: CartPlatformModel.RedeemLoyaltyPoints().required(),
562
+ }).required();
563
+ }
564
+
541
565
  /** @returns {CheckCartServiceabilityParam} */
542
566
  static checkCartServiceability() {
543
567
  return Joi.object({
@@ -1,4 +1,9 @@
1
1
  export = CartPlatformModel;
2
+ /**
3
+ * @typedef RedeemLoyaltyPoints
4
+ * @property {boolean} redeem_points - Marks if engage points are to be redeemed
5
+ * for the given cart.
6
+ */
2
7
  /**
3
8
  * @typedef CouponDateMeta
4
9
  * @property {string} [modified_on] - Date time format when the coupon last modified
@@ -725,6 +730,7 @@ export = CartPlatformModel;
725
730
  * @property {Object} [meta] - Meta data related to article
726
731
  * @property {boolean} [allowed_refund] - Flag indicating whether refunds are
727
732
  * allowed at article level
733
+ * @property {number} [article_index] - Index of the line item in the cart
728
734
  * @property {number} [min_price_threshold] - Minimum allowed net price for the
729
735
  * article. If the article's price after all discounts and adjustments falls
730
736
  * below this threshold, the price adjustment will be automatically removed.
@@ -885,12 +891,26 @@ export = CartPlatformModel;
885
891
  * @property {number} [applicable] - Whether the loyalty points are applicable
886
892
  * for the cart
887
893
  * @property {string} [description] - Description for loyalty points
894
+ * @property {number} [total_points] - Total engage points available.
895
+ * @property {number} [points] - Engage points applied on the cart.
896
+ * @property {number} [amount] - Engage points amount applied on the cart.
897
+ * @property {number} [mop_amount] - Engage discount amount applied on the cart
898
+ * as payment mode.
899
+ * @property {number} [earn_points] - Engage points that can be earned on the
900
+ * cart. for ex. (You’ll earn 56 points from this order!)
901
+ * @property {number} [earn_points_amount] - Engage points amount that can be
902
+ * earned on the cart. for ex. or ex. (You’ll earn ₹56 from this order!)
903
+ * @property {string} [earn_title] - Title to show how many earn points are
904
+ * gained for this order.
905
+ * @property {string} [title] - Unique title for loyalty program applicable.
888
906
  */
889
907
  /**
890
908
  * @typedef RawBreakup
891
909
  * @property {number} [coupon] - Coupon amount applied to cart
892
910
  * @property {number} [gst_charges] - GST charges applied on cart
893
911
  * @property {number} [mrp_total] - Maximum price total amount of all products in cart
912
+ * @property {number} [engage_amount] - Engage points amount applied on the cart.
913
+ * @property {number} [engage_mop_amount] - Engage mop amount applied on the cart.
894
914
  * @property {number} [fynd_cash] - Loyalty points applied on cart
895
915
  * @property {number} [vog] - Total value of goods after all discount, coupons
896
916
  * and promotion applied of all products in cart
@@ -1636,7 +1656,7 @@ export = CartPlatformModel;
1636
1656
  * @property {string} promo_id - Promotion id applied on product
1637
1657
  * @property {string} promo_amount - Promotion amount applied on product
1638
1658
  * @property {string} [promo_desc] - Promotion description applied on product
1639
- * @property {string} [rwrd_tndr]
1659
+ * @property {string} [rwrd_tndr] _Deprecated_*
1640
1660
  * @property {Object[]} [item_list] - List of items
1641
1661
  * @property {string} [parent_promo_id] - Parent promotion unique identifier
1642
1662
  */
@@ -1659,9 +1679,7 @@ export = CartPlatformModel;
1659
1679
  * @property {string} cart_id - The cart id of user cart
1660
1680
  * @property {string} payment_mode - Payment mode from which the payment to be
1661
1681
  * done for the order
1662
- * @property {Object} [billing_address] - Billing address json which includes
1663
- * customer address, customer phone, customer email, customer pincode,
1664
- * customer landmark and customer name
1682
+ * @property {ShippingAddress} [billing_address]
1665
1683
  * @property {string} merchant_code - Merchant code of the payment mode selected
1666
1684
  * to do the payment
1667
1685
  * @property {string} payment_identifier - Payment identifier of the payment
@@ -1676,15 +1694,29 @@ export = CartPlatformModel;
1676
1694
  * their size, id, discount and promo details
1677
1695
  * @property {number} [ordering_store] - Ordering store id of the store from
1678
1696
  * which the order is getting placed
1679
- * @property {Object} [shipping_address] - Shipping address json which includes
1680
- * name, area, address, phone, area_code, state, country, country code and email
1697
+ * @property {string} [device_id] - A unique identifier for the EDC (Electronic
1698
+ * Data Capture) machine. This value may be null if the identifier is not available.
1699
+ * @property {ShippingAddress} [shipping_address]
1700
+ */
1701
+ /**
1702
+ * @typedef OverrideCheckoutData
1703
+ * @property {number} [amount] - Amount for the order in smallest currency unit
1704
+ * (e.g., paise for INR)
1705
+ * @property {string} [order_id] - Order id generated at the payment gateway
1706
+ * @property {string} [email] - Customer email used for the payment
1707
+ * @property {string} [contact] - Customer contact number used for the payment
1708
+ * @property {string} [currency] - Currency code for the transaction
1709
+ * @property {string} [customer_id] - Customer id generated/linked at the payment gateway
1710
+ * @property {string} [callback_url] - Callback URL where the payment status
1711
+ * will be posted
1712
+ * @property {string} [bank] - Bank code used for the payment (if method is netbanking)
1713
+ * @property {string} [method] - Payment method used for the transaction
1714
+ * @property {string} [vpa] - Virtual Payment Address used for UPI transactions
1681
1715
  */
1682
1716
  /**
1683
1717
  * @typedef OverrideCheckoutResult
1684
- * @property {Object} data - Data of the user cart checkout includes cart data,
1685
- * address, user id, order type etc
1686
- * @property {Object} cart - Cart details in API response which included cart
1687
- * id, items in cart, promise, order type, breakup values etc.
1718
+ * @property {OverrideCheckoutData} data
1719
+ * @property {CheckCart} cart
1688
1720
  * @property {string} success - Success flag of cart override checkout API response
1689
1721
  * @property {string} order_id - Order id generated after placing order
1690
1722
  * @property {string} message - Message of the cart override checkout API response
@@ -2464,8 +2496,17 @@ export = CartPlatformModel;
2464
2496
  declare class CartPlatformModel {
2465
2497
  }
2466
2498
  declare namespace CartPlatformModel {
2467
- export { CouponDateMeta, Ownership, CouponAuthor, State, PaymentAllowValue, PaymentModes, PriceRange, PostOrder, BulkBundleRestriction, UsesRemaining, UsesRestriction, Restrictions, Validation, CouponAction, CouponSchedule, Rule, DisplayMetaDict, DisplayMeta, Identifier, Validity, RuleDefinition, CouponAdd, Page, CouponsResult, SuccessMessage, OperationErrorResult, CouponUpdate, CouponPartialUpdate, CouponCreateResult, DisplayMeta1, Ownership1, CompareObject, ItemSizeMapping, ItemCriteria, BuyRuleItemCriteria, DiscountOffer, DiscountRule, PaymentAllowValue1, PromotionPaymentModes, UserRegistered, PostOrder1, UsesRemaining1, UsesRestriction1, Restrictions1, PromotionSchedule, PromotionAction, PromotionAuthor, Visibility, PromotionDateMeta, PromotionListItem, PromotionsResult, PromotionAdd, PromotionAddResult, PromotionUpdate, PromotionUpdateResult, PromotionPartialUpdate, ActivePromosResult, Charges, DeliveryCharges, CartMetaConfigUpdate, CartMetaConfigAdd, Article, PriceAdjustmentRestrictions, Collection, PriceAdjustmentUpdate, PriceAdjustment, PriceAdjustmentResult, GetPriceAdjustmentResult, PriceAdjustmentAdd, DistributionRule, Distribution, DistributionLogic, CartItem, OpenapiCartDetailsCreation, CouponBreakup, DisplayBreakup, LoyaltyPoints, RawBreakup, CartBreakup, ProductImage, Tags, BaseInfo, ActionQuery, ProductActionParams, ProductActionPage, ProductAction, CategoryInfo, CartProduct, BasePrice, ArticlePriceInfo, StoreInfo, FulfillmentOptionSchema, StoreTimingSchema, StoreHoursSchema, PickupStoreDetailSchema, ProductArticle, Ownership2, DiscountRulesApp, AppliedFreeArticles, BuyRules, AppliedPromotion, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, CouponDetails, ProductPrice, ProductPriceInfo, ProductMaxQuantityInfo, CartProductIdentifer, ProductAvailabilitySize, ProductAvailability, PromoMeta, CartProductInfo, OpenapiCartDetailsResult, OpenApiErrorResult, ShippingAddress, OpenApiCartServiceabilityCreation, OpenApiCartServiceabilityResult, OpenApiFiles, CartItemMeta, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OpenApiCheckoutResult, AbandonedCart, AbandonedCartResult, PaymentSelectionLock, CartCurrency, CartDetailCoupon, ChargesThreshold, DeliveryChargesConfig, CartCommonConfig, PlatformAlternatePickupPerson, CartDetailResult, AddProductCart, AddCartCreation, AddCartDetailResult, CartItemInfo, UpdateProductCart, FreeGiftItemCreation, UpdateCartCreation, UpdateCartDetailResult, OverrideCartItemPromo, OverrideCartItem, OverrideCheckoutReq, OverrideCheckoutResult, GetShareCartLinkCreation, GetShareCartLinkResult, SharedCartDetails, SharedCart, SharedCartResult, CartList, MultiCartResult, UpdateUserCartMapping, UserInfo, UserCartMappingResult, PlatformAddCartDetails, PlatformUpdateCartDetails, DeleteCartDetails, DeleteCartDetailResult, CartItemCountResult, DiscountRules, Coupon, PageCoupon, GetCouponResult, ApplyCouponDetails, GeoLocation, PlatformAddress, ValidationConfig, PlatformGetAddressesDetails, SaveAddressDetails, UpdateAddressDetails, DeleteAddressResult, PlatformSelectCartAddress, ShipmentArticle, PlatformShipmentDetails, PlatformCartShipmentsResult, UpdateCartShipmentItem, UpdateCartShipmentCreation, PlatformCartMetaCreation, CartMetaDetails, CartMetaMissingDetails, StaffCheckout, CustomerDetails, Files, CartCheckoutCustomMeta, OrderTag, PlatformCartCheckoutDetailCreation, CheckCart, CartCheckoutDetails, CartCheckoutResult, CartDeliveryModesDetails, PickupStoreDetail, StoreDetails, CartPaymentUpdate, CouponValidity, PaymentCouponValidate, PaymentMeta, PaymentMethod, PlatformCartCheckoutDetailV2Creation, UpdateCartPaymentRequestV2, PriceMinMax, ItemPriceDetails, ArticlePriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersDetails, PromotionPaymentOffer, PromotionPaymentOffersDetails, ValidationError, OrderingSource };
2499
+ export { RedeemLoyaltyPoints, CouponDateMeta, Ownership, CouponAuthor, State, PaymentAllowValue, PaymentModes, PriceRange, PostOrder, BulkBundleRestriction, UsesRemaining, UsesRestriction, Restrictions, Validation, CouponAction, CouponSchedule, Rule, DisplayMetaDict, DisplayMeta, Identifier, Validity, RuleDefinition, CouponAdd, Page, CouponsResult, SuccessMessage, OperationErrorResult, CouponUpdate, CouponPartialUpdate, CouponCreateResult, DisplayMeta1, Ownership1, CompareObject, ItemSizeMapping, ItemCriteria, BuyRuleItemCriteria, DiscountOffer, DiscountRule, PaymentAllowValue1, PromotionPaymentModes, UserRegistered, PostOrder1, UsesRemaining1, UsesRestriction1, Restrictions1, PromotionSchedule, PromotionAction, PromotionAuthor, Visibility, PromotionDateMeta, PromotionListItem, PromotionsResult, PromotionAdd, PromotionAddResult, PromotionUpdate, PromotionUpdateResult, PromotionPartialUpdate, ActivePromosResult, Charges, DeliveryCharges, CartMetaConfigUpdate, CartMetaConfigAdd, Article, PriceAdjustmentRestrictions, Collection, PriceAdjustmentUpdate, PriceAdjustment, PriceAdjustmentResult, GetPriceAdjustmentResult, PriceAdjustmentAdd, DistributionRule, Distribution, DistributionLogic, CartItem, OpenapiCartDetailsCreation, CouponBreakup, DisplayBreakup, LoyaltyPoints, RawBreakup, CartBreakup, ProductImage, Tags, BaseInfo, ActionQuery, ProductActionParams, ProductActionPage, ProductAction, CategoryInfo, CartProduct, BasePrice, ArticlePriceInfo, StoreInfo, FulfillmentOptionSchema, StoreTimingSchema, StoreHoursSchema, PickupStoreDetailSchema, ProductArticle, Ownership2, DiscountRulesApp, AppliedFreeArticles, BuyRules, AppliedPromotion, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, CouponDetails, ProductPrice, ProductPriceInfo, ProductMaxQuantityInfo, CartProductIdentifer, ProductAvailabilitySize, ProductAvailability, PromoMeta, CartProductInfo, OpenapiCartDetailsResult, OpenApiErrorResult, ShippingAddress, OpenApiCartServiceabilityCreation, OpenApiCartServiceabilityResult, OpenApiFiles, CartItemMeta, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OpenApiCheckoutResult, AbandonedCart, AbandonedCartResult, PaymentSelectionLock, CartCurrency, CartDetailCoupon, ChargesThreshold, DeliveryChargesConfig, CartCommonConfig, PlatformAlternatePickupPerson, CartDetailResult, AddProductCart, AddCartCreation, AddCartDetailResult, CartItemInfo, UpdateProductCart, FreeGiftItemCreation, UpdateCartCreation, UpdateCartDetailResult, OverrideCartItemPromo, OverrideCartItem, OverrideCheckoutReq, OverrideCheckoutData, OverrideCheckoutResult, GetShareCartLinkCreation, GetShareCartLinkResult, SharedCartDetails, SharedCart, SharedCartResult, CartList, MultiCartResult, UpdateUserCartMapping, UserInfo, UserCartMappingResult, PlatformAddCartDetails, PlatformUpdateCartDetails, DeleteCartDetails, DeleteCartDetailResult, CartItemCountResult, DiscountRules, Coupon, PageCoupon, GetCouponResult, ApplyCouponDetails, GeoLocation, PlatformAddress, ValidationConfig, PlatformGetAddressesDetails, SaveAddressDetails, UpdateAddressDetails, DeleteAddressResult, PlatformSelectCartAddress, ShipmentArticle, PlatformShipmentDetails, PlatformCartShipmentsResult, UpdateCartShipmentItem, UpdateCartShipmentCreation, PlatformCartMetaCreation, CartMetaDetails, CartMetaMissingDetails, StaffCheckout, CustomerDetails, Files, CartCheckoutCustomMeta, OrderTag, PlatformCartCheckoutDetailCreation, CheckCart, CartCheckoutDetails, CartCheckoutResult, CartDeliveryModesDetails, PickupStoreDetail, StoreDetails, CartPaymentUpdate, CouponValidity, PaymentCouponValidate, PaymentMeta, PaymentMethod, PlatformCartCheckoutDetailV2Creation, UpdateCartPaymentRequestV2, PriceMinMax, ItemPriceDetails, ArticlePriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersDetails, PromotionPaymentOffer, PromotionPaymentOffersDetails, ValidationError, OrderingSource };
2468
2500
  }
2501
+ /** @returns {RedeemLoyaltyPoints} */
2502
+ declare function RedeemLoyaltyPoints(): RedeemLoyaltyPoints;
2503
+ type RedeemLoyaltyPoints = {
2504
+ /**
2505
+ * - Marks if engage points are to be redeemed
2506
+ * for the given cart.
2507
+ */
2508
+ redeem_points: boolean;
2509
+ };
2469
2510
  /** @returns {CouponDateMeta} */
2470
2511
  declare function CouponDateMeta(): CouponDateMeta;
2471
2512
  type CouponDateMeta = {
@@ -4238,6 +4279,10 @@ type Article = {
4238
4279
  * allowed at article level
4239
4280
  */
4240
4281
  allowed_refund?: boolean;
4282
+ /**
4283
+ * - Index of the line item in the cart
4284
+ */
4285
+ article_index?: number;
4241
4286
  /**
4242
4287
  * - Minimum allowed net price for the
4243
4288
  * article. If the article's price after all discounts and adjustments falls
@@ -4635,6 +4680,42 @@ type LoyaltyPoints = {
4635
4680
  * - Description for loyalty points
4636
4681
  */
4637
4682
  description?: string;
4683
+ /**
4684
+ * - Total engage points available.
4685
+ */
4686
+ total_points?: number;
4687
+ /**
4688
+ * - Engage points applied on the cart.
4689
+ */
4690
+ points?: number;
4691
+ /**
4692
+ * - Engage points amount applied on the cart.
4693
+ */
4694
+ amount?: number;
4695
+ /**
4696
+ * - Engage discount amount applied on the cart
4697
+ * as payment mode.
4698
+ */
4699
+ mop_amount?: number;
4700
+ /**
4701
+ * - Engage points that can be earned on the
4702
+ * cart. for ex. (You’ll earn 56 points from this order!)
4703
+ */
4704
+ earn_points?: number;
4705
+ /**
4706
+ * - Engage points amount that can be
4707
+ * earned on the cart. for ex. or ex. (You’ll earn ₹56 from this order!)
4708
+ */
4709
+ earn_points_amount?: number;
4710
+ /**
4711
+ * - Title to show how many earn points are
4712
+ * gained for this order.
4713
+ */
4714
+ earn_title?: string;
4715
+ /**
4716
+ * - Unique title for loyalty program applicable.
4717
+ */
4718
+ title?: string;
4638
4719
  };
4639
4720
  /** @returns {RawBreakup} */
4640
4721
  declare function RawBreakup(): RawBreakup;
@@ -4651,6 +4732,14 @@ type RawBreakup = {
4651
4732
  * - Maximum price total amount of all products in cart
4652
4733
  */
4653
4734
  mrp_total?: number;
4735
+ /**
4736
+ * - Engage points amount applied on the cart.
4737
+ */
4738
+ engage_amount?: number;
4739
+ /**
4740
+ * - Engage mop amount applied on the cart.
4741
+ */
4742
+ engage_mop_amount?: number;
4654
4743
  /**
4655
4744
  * - Loyalty points applied on cart
4656
4745
  */
@@ -6555,6 +6644,9 @@ type OverrideCartItemPromo = {
6555
6644
  * - Promotion description applied on product
6556
6645
  */
6557
6646
  promo_desc?: string;
6647
+ /**
6648
+ * _Deprecated_*
6649
+ */
6558
6650
  rwrd_tndr?: string;
6559
6651
  /**
6560
6652
  * - List of items
@@ -6622,12 +6714,7 @@ type OverrideCheckoutReq = {
6622
6714
  * done for the order
6623
6715
  */
6624
6716
  payment_mode: string;
6625
- /**
6626
- * - Billing address json which includes
6627
- * customer address, customer phone, customer email, customer pincode,
6628
- * customer landmark and customer name
6629
- */
6630
- billing_address?: any;
6717
+ billing_address?: ShippingAddress;
6631
6718
  /**
6632
6719
  * - Merchant code of the payment mode selected
6633
6720
  * to do the payment
@@ -6667,24 +6754,63 @@ type OverrideCheckoutReq = {
6667
6754
  */
6668
6755
  ordering_store?: number;
6669
6756
  /**
6670
- * - Shipping address json which includes
6671
- * name, area, address, phone, area_code, state, country, country code and email
6757
+ * - A unique identifier for the EDC (Electronic
6758
+ * Data Capture) machine. This value may be null if the identifier is not available.
6672
6759
  */
6673
- shipping_address?: any;
6760
+ device_id?: string;
6761
+ shipping_address?: ShippingAddress;
6674
6762
  };
6675
- /** @returns {OverrideCheckoutResult} */
6676
- declare function OverrideCheckoutResult(): OverrideCheckoutResult;
6677
- type OverrideCheckoutResult = {
6763
+ /** @returns {OverrideCheckoutData} */
6764
+ declare function OverrideCheckoutData(): OverrideCheckoutData;
6765
+ type OverrideCheckoutData = {
6678
6766
  /**
6679
- * - Data of the user cart checkout includes cart data,
6680
- * address, user id, order type etc
6767
+ * - Amount for the order in smallest currency unit
6768
+ * (e.g., paise for INR)
6681
6769
  */
6682
- data: any;
6770
+ amount?: number;
6771
+ /**
6772
+ * - Order id generated at the payment gateway
6773
+ */
6774
+ order_id?: string;
6683
6775
  /**
6684
- * - Cart details in API response which included cart
6685
- * id, items in cart, promise, order type, breakup values etc.
6776
+ * - Customer email used for the payment
6686
6777
  */
6687
- cart: any;
6778
+ email?: string;
6779
+ /**
6780
+ * - Customer contact number used for the payment
6781
+ */
6782
+ contact?: string;
6783
+ /**
6784
+ * - Currency code for the transaction
6785
+ */
6786
+ currency?: string;
6787
+ /**
6788
+ * - Customer id generated/linked at the payment gateway
6789
+ */
6790
+ customer_id?: string;
6791
+ /**
6792
+ * - Callback URL where the payment status
6793
+ * will be posted
6794
+ */
6795
+ callback_url?: string;
6796
+ /**
6797
+ * - Bank code used for the payment (if method is netbanking)
6798
+ */
6799
+ bank?: string;
6800
+ /**
6801
+ * - Payment method used for the transaction
6802
+ */
6803
+ method?: string;
6804
+ /**
6805
+ * - Virtual Payment Address used for UPI transactions
6806
+ */
6807
+ vpa?: string;
6808
+ };
6809
+ /** @returns {OverrideCheckoutResult} */
6810
+ declare function OverrideCheckoutResult(): OverrideCheckoutResult;
6811
+ type OverrideCheckoutResult = {
6812
+ data: OverrideCheckoutData;
6813
+ cart: CheckCart;
6688
6814
  /**
6689
6815
  * - Success flag of cart override checkout API response
6690
6816
  */
@@ -1,5 +1,11 @@
1
1
  const Joi = require("joi");
2
2
 
3
+ /**
4
+ * @typedef RedeemLoyaltyPoints
5
+ * @property {boolean} redeem_points - Marks if engage points are to be redeemed
6
+ * for the given cart.
7
+ */
8
+
3
9
  /**
4
10
  * @typedef CouponDateMeta
5
11
  * @property {string} [modified_on] - Date time format when the coupon last modified
@@ -787,6 +793,7 @@ const Joi = require("joi");
787
793
  * @property {Object} [meta] - Meta data related to article
788
794
  * @property {boolean} [allowed_refund] - Flag indicating whether refunds are
789
795
  * allowed at article level
796
+ * @property {number} [article_index] - Index of the line item in the cart
790
797
  * @property {number} [min_price_threshold] - Minimum allowed net price for the
791
798
  * article. If the article's price after all discounts and adjustments falls
792
799
  * below this threshold, the price adjustment will be automatically removed.
@@ -962,6 +969,18 @@ const Joi = require("joi");
962
969
  * @property {number} [applicable] - Whether the loyalty points are applicable
963
970
  * for the cart
964
971
  * @property {string} [description] - Description for loyalty points
972
+ * @property {number} [total_points] - Total engage points available.
973
+ * @property {number} [points] - Engage points applied on the cart.
974
+ * @property {number} [amount] - Engage points amount applied on the cart.
975
+ * @property {number} [mop_amount] - Engage discount amount applied on the cart
976
+ * as payment mode.
977
+ * @property {number} [earn_points] - Engage points that can be earned on the
978
+ * cart. for ex. (You’ll earn 56 points from this order!)
979
+ * @property {number} [earn_points_amount] - Engage points amount that can be
980
+ * earned on the cart. for ex. or ex. (You’ll earn ₹56 from this order!)
981
+ * @property {string} [earn_title] - Title to show how many earn points are
982
+ * gained for this order.
983
+ * @property {string} [title] - Unique title for loyalty program applicable.
965
984
  */
966
985
 
967
986
  /**
@@ -969,6 +988,8 @@ const Joi = require("joi");
969
988
  * @property {number} [coupon] - Coupon amount applied to cart
970
989
  * @property {number} [gst_charges] - GST charges applied on cart
971
990
  * @property {number} [mrp_total] - Maximum price total amount of all products in cart
991
+ * @property {number} [engage_amount] - Engage points amount applied on the cart.
992
+ * @property {number} [engage_mop_amount] - Engage mop amount applied on the cart.
972
993
  * @property {number} [fynd_cash] - Loyalty points applied on cart
973
994
  * @property {number} [vog] - Total value of goods after all discount, coupons
974
995
  * and promotion applied of all products in cart
@@ -1781,7 +1802,7 @@ const Joi = require("joi");
1781
1802
  * @property {string} promo_id - Promotion id applied on product
1782
1803
  * @property {string} promo_amount - Promotion amount applied on product
1783
1804
  * @property {string} [promo_desc] - Promotion description applied on product
1784
- * @property {string} [rwrd_tndr]
1805
+ * @property {string} [rwrd_tndr] _Deprecated_*
1785
1806
  * @property {Object[]} [item_list] - List of items
1786
1807
  * @property {string} [parent_promo_id] - Parent promotion unique identifier
1787
1808
  */
@@ -1806,9 +1827,7 @@ const Joi = require("joi");
1806
1827
  * @property {string} cart_id - The cart id of user cart
1807
1828
  * @property {string} payment_mode - Payment mode from which the payment to be
1808
1829
  * done for the order
1809
- * @property {Object} [billing_address] - Billing address json which includes
1810
- * customer address, customer phone, customer email, customer pincode,
1811
- * customer landmark and customer name
1830
+ * @property {ShippingAddress} [billing_address]
1812
1831
  * @property {string} merchant_code - Merchant code of the payment mode selected
1813
1832
  * to do the payment
1814
1833
  * @property {string} payment_identifier - Payment identifier of the payment
@@ -1823,16 +1842,31 @@ const Joi = require("joi");
1823
1842
  * their size, id, discount and promo details
1824
1843
  * @property {number} [ordering_store] - Ordering store id of the store from
1825
1844
  * which the order is getting placed
1826
- * @property {Object} [shipping_address] - Shipping address json which includes
1827
- * name, area, address, phone, area_code, state, country, country code and email
1845
+ * @property {string} [device_id] - A unique identifier for the EDC (Electronic
1846
+ * Data Capture) machine. This value may be null if the identifier is not available.
1847
+ * @property {ShippingAddress} [shipping_address]
1848
+ */
1849
+
1850
+ /**
1851
+ * @typedef OverrideCheckoutData
1852
+ * @property {number} [amount] - Amount for the order in smallest currency unit
1853
+ * (e.g., paise for INR)
1854
+ * @property {string} [order_id] - Order id generated at the payment gateway
1855
+ * @property {string} [email] - Customer email used for the payment
1856
+ * @property {string} [contact] - Customer contact number used for the payment
1857
+ * @property {string} [currency] - Currency code for the transaction
1858
+ * @property {string} [customer_id] - Customer id generated/linked at the payment gateway
1859
+ * @property {string} [callback_url] - Callback URL where the payment status
1860
+ * will be posted
1861
+ * @property {string} [bank] - Bank code used for the payment (if method is netbanking)
1862
+ * @property {string} [method] - Payment method used for the transaction
1863
+ * @property {string} [vpa] - Virtual Payment Address used for UPI transactions
1828
1864
  */
1829
1865
 
1830
1866
  /**
1831
1867
  * @typedef OverrideCheckoutResult
1832
- * @property {Object} data - Data of the user cart checkout includes cart data,
1833
- * address, user id, order type etc
1834
- * @property {Object} cart - Cart details in API response which included cart
1835
- * id, items in cart, promise, order type, breakup values etc.
1868
+ * @property {OverrideCheckoutData} data
1869
+ * @property {CheckCart} cart
1836
1870
  * @property {string} success - Success flag of cart override checkout API response
1837
1871
  * @property {string} order_id - Order id generated after placing order
1838
1872
  * @property {string} message - Message of the cart override checkout API response
@@ -2676,6 +2710,13 @@ const Joi = require("joi");
2676
2710
  */
2677
2711
 
2678
2712
  class CartPlatformModel {
2713
+ /** @returns {RedeemLoyaltyPoints} */
2714
+ static RedeemLoyaltyPoints() {
2715
+ return Joi.object({
2716
+ redeem_points: Joi.boolean().required(),
2717
+ });
2718
+ }
2719
+
2679
2720
  /** @returns {CouponDateMeta} */
2680
2721
  static CouponDateMeta() {
2681
2722
  return Joi.object({
@@ -3485,6 +3526,7 @@ class CartPlatformModel {
3485
3526
  quantity: Joi.number(),
3486
3527
  meta: Joi.object().pattern(/\S/, Joi.any()),
3487
3528
  allowed_refund: Joi.boolean(),
3529
+ article_index: Joi.number(),
3488
3530
  min_price_threshold: Joi.number(),
3489
3531
  });
3490
3532
  }
@@ -3659,6 +3701,14 @@ class CartPlatformModel {
3659
3701
  total: Joi.number(),
3660
3702
  applicable: Joi.number(),
3661
3703
  description: Joi.string().allow(""),
3704
+ total_points: Joi.number(),
3705
+ points: Joi.number(),
3706
+ amount: Joi.number(),
3707
+ mop_amount: Joi.number(),
3708
+ earn_points: Joi.number(),
3709
+ earn_points_amount: Joi.number(),
3710
+ earn_title: Joi.string().allow(""),
3711
+ title: Joi.string().allow(""),
3662
3712
  });
3663
3713
  }
3664
3714
 
@@ -3668,6 +3718,8 @@ class CartPlatformModel {
3668
3718
  coupon: Joi.number(),
3669
3719
  gst_charges: Joi.number(),
3670
3720
  mrp_total: Joi.number(),
3721
+ engage_amount: Joi.number(),
3722
+ engage_mop_amount: Joi.number(),
3671
3723
  fynd_cash: Joi.number(),
3672
3724
  vog: Joi.number(),
3673
3725
  gift_card: Joi.number(),
@@ -4536,7 +4588,7 @@ class CartPlatformModel {
4536
4588
  return Joi.object({
4537
4589
  cart_id: Joi.string().allow("").required(),
4538
4590
  payment_mode: Joi.string().allow("").required(),
4539
- billing_address: Joi.object().pattern(/\S/, Joi.any()),
4591
+ billing_address: CartPlatformModel.ShippingAddress(),
4540
4592
  merchant_code: Joi.string().allow("").required(),
4541
4593
  payment_identifier: Joi.string().allow("").required(),
4542
4594
  currency_code: Joi.string().allow("").required(),
@@ -4547,15 +4599,32 @@ class CartPlatformModel {
4547
4599
  .items(CartPlatformModel.OverrideCartItem())
4548
4600
  .required(),
4549
4601
  ordering_store: Joi.number().allow(null),
4550
- shipping_address: Joi.object().pattern(/\S/, Joi.any()),
4602
+ device_id: Joi.string().allow("").allow(null),
4603
+ shipping_address: CartPlatformModel.ShippingAddress(),
4604
+ });
4605
+ }
4606
+
4607
+ /** @returns {OverrideCheckoutData} */
4608
+ static OverrideCheckoutData() {
4609
+ return Joi.object({
4610
+ amount: Joi.number(),
4611
+ order_id: Joi.string().allow(""),
4612
+ email: Joi.string().allow(""),
4613
+ contact: Joi.string().allow(""),
4614
+ currency: Joi.string().allow(""),
4615
+ customer_id: Joi.string().allow(""),
4616
+ callback_url: Joi.string().allow(""),
4617
+ bank: Joi.string().allow(""),
4618
+ method: Joi.string().allow(""),
4619
+ vpa: Joi.string().allow(""),
4551
4620
  });
4552
4621
  }
4553
4622
 
4554
4623
  /** @returns {OverrideCheckoutResult} */
4555
4624
  static OverrideCheckoutResult() {
4556
4625
  return Joi.object({
4557
- data: Joi.object().pattern(/\S/, Joi.any()).required(),
4558
- cart: Joi.object().pattern(/\S/, Joi.any()).required(),
4626
+ data: CartPlatformModel.OverrideCheckoutData().required(),
4627
+ cart: CartPlatformModel.CheckCart().required(),
4559
4628
  success: Joi.string().allow("").required(),
4560
4629
  order_id: Joi.string().allow("").required(),
4561
4630
  message: Joi.string().allow("").required(),