@gofynd/fdk-client-javascript 3.8.0 → 3.10.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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +7 -7
- package/sdk/application/Cart/CartApplicationClient.js +8 -8
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
- package/sdk/application/Theme/ThemeApplicationClient.js +3 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +11 -1
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +96 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +37 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +24 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +150 -29
- package/sdk/platform/Cart/CartPlatformModel.js +81 -14
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +18 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +6 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformClient.js +1 -1
- package/sdk/platform/Order/OrderPlatformModel.d.ts +66 -3
- package/sdk/platform/Order/OrderPlatformModel.js +42 -3
- package/sdk/public/Content/ContentPublicClient.d.ts +2 -2
- package/sdk/public/Content/ContentPublicClient.js +4 -3
- package/sdk/public/Content/ContentPublicModel.d.ts +5 -0
- package/sdk/public/Content/ContentPublicModel.js +2 -0
- package/sdk/public/Content/ContentPublicValidator.d.ts +11 -3
- package/sdk/public/Content/ContentPublicValidator.js +7 -2
|
@@ -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
|
|
@@ -885,12 +890,26 @@ export = CartPlatformModel;
|
|
|
885
890
|
* @property {number} [applicable] - Whether the loyalty points are applicable
|
|
886
891
|
* for the cart
|
|
887
892
|
* @property {string} [description] - Description for loyalty points
|
|
893
|
+
* @property {number} [total_points] - Total engage points available.
|
|
894
|
+
* @property {number} [points] - Engage points applied on the cart.
|
|
895
|
+
* @property {number} [amount] - Engage points amount applied on the cart.
|
|
896
|
+
* @property {number} [mop_amount] - Engage discount amount applied on the cart
|
|
897
|
+
* as payment mode.
|
|
898
|
+
* @property {number} [earn_points] - Engage points that can be earned on the
|
|
899
|
+
* cart. for ex. (You’ll earn 56 points from this order!)
|
|
900
|
+
* @property {number} [earn_points_amount] - Engage points amount that can be
|
|
901
|
+
* earned on the cart. for ex. or ex. (You’ll earn ₹56 from this order!)
|
|
902
|
+
* @property {string} [earn_title] - Title to show how many earn points are
|
|
903
|
+
* gained for this order.
|
|
904
|
+
* @property {string} [title] - Unique title for loyalty program applicable.
|
|
888
905
|
*/
|
|
889
906
|
/**
|
|
890
907
|
* @typedef RawBreakup
|
|
891
908
|
* @property {number} [coupon] - Coupon amount applied to cart
|
|
892
909
|
* @property {number} [gst_charges] - GST charges applied on cart
|
|
893
910
|
* @property {number} [mrp_total] - Maximum price total amount of all products in cart
|
|
911
|
+
* @property {number} [engage_amount] - Engage points amount applied on the cart.
|
|
912
|
+
* @property {number} [engage_mop_amount] - Engage mop amount applied on the cart.
|
|
894
913
|
* @property {number} [fynd_cash] - Loyalty points applied on cart
|
|
895
914
|
* @property {number} [vog] - Total value of goods after all discount, coupons
|
|
896
915
|
* and promotion applied of all products in cart
|
|
@@ -1636,7 +1655,7 @@ export = CartPlatformModel;
|
|
|
1636
1655
|
* @property {string} promo_id - Promotion id applied on product
|
|
1637
1656
|
* @property {string} promo_amount - Promotion amount applied on product
|
|
1638
1657
|
* @property {string} [promo_desc] - Promotion description applied on product
|
|
1639
|
-
* @property {string} [rwrd_tndr]
|
|
1658
|
+
* @property {string} [rwrd_tndr] _Deprecated_*
|
|
1640
1659
|
* @property {Object[]} [item_list] - List of items
|
|
1641
1660
|
* @property {string} [parent_promo_id] - Parent promotion unique identifier
|
|
1642
1661
|
*/
|
|
@@ -1659,9 +1678,7 @@ export = CartPlatformModel;
|
|
|
1659
1678
|
* @property {string} cart_id - The cart id of user cart
|
|
1660
1679
|
* @property {string} payment_mode - Payment mode from which the payment to be
|
|
1661
1680
|
* done for the order
|
|
1662
|
-
* @property {
|
|
1663
|
-
* customer address, customer phone, customer email, customer pincode,
|
|
1664
|
-
* customer landmark and customer name
|
|
1681
|
+
* @property {ShippingAddress} [billing_address]
|
|
1665
1682
|
* @property {string} merchant_code - Merchant code of the payment mode selected
|
|
1666
1683
|
* to do the payment
|
|
1667
1684
|
* @property {string} payment_identifier - Payment identifier of the payment
|
|
@@ -1676,15 +1693,29 @@ export = CartPlatformModel;
|
|
|
1676
1693
|
* their size, id, discount and promo details
|
|
1677
1694
|
* @property {number} [ordering_store] - Ordering store id of the store from
|
|
1678
1695
|
* which the order is getting placed
|
|
1679
|
-
* @property {
|
|
1680
|
-
*
|
|
1696
|
+
* @property {string} [device_id] - A unique identifier for the EDC (Electronic
|
|
1697
|
+
* Data Capture) machine. This value may be null if the identifier is not available.
|
|
1698
|
+
* @property {ShippingAddress} [shipping_address]
|
|
1699
|
+
*/
|
|
1700
|
+
/**
|
|
1701
|
+
* @typedef OverrideCheckoutData
|
|
1702
|
+
* @property {number} [amount] - Amount for the order in smallest currency unit
|
|
1703
|
+
* (e.g., paise for INR)
|
|
1704
|
+
* @property {string} [order_id] - Order id generated at the payment gateway
|
|
1705
|
+
* @property {string} [email] - Customer email used for the payment
|
|
1706
|
+
* @property {string} [contact] - Customer contact number used for the payment
|
|
1707
|
+
* @property {string} [currency] - Currency code for the transaction
|
|
1708
|
+
* @property {string} [customer_id] - Customer id generated/linked at the payment gateway
|
|
1709
|
+
* @property {string} [callback_url] - Callback URL where the payment status
|
|
1710
|
+
* will be posted
|
|
1711
|
+
* @property {string} [bank] - Bank code used for the payment (if method is netbanking)
|
|
1712
|
+
* @property {string} [method] - Payment method used for the transaction
|
|
1713
|
+
* @property {string} [vpa] - Virtual Payment Address used for UPI transactions
|
|
1681
1714
|
*/
|
|
1682
1715
|
/**
|
|
1683
1716
|
* @typedef OverrideCheckoutResult
|
|
1684
|
-
* @property {
|
|
1685
|
-
*
|
|
1686
|
-
* @property {Object} cart - Cart details in API response which included cart
|
|
1687
|
-
* id, items in cart, promise, order type, breakup values etc.
|
|
1717
|
+
* @property {OverrideCheckoutData} data
|
|
1718
|
+
* @property {CheckCart} cart
|
|
1688
1719
|
* @property {string} success - Success flag of cart override checkout API response
|
|
1689
1720
|
* @property {string} order_id - Order id generated after placing order
|
|
1690
1721
|
* @property {string} message - Message of the cart override checkout API response
|
|
@@ -2464,8 +2495,17 @@ export = CartPlatformModel;
|
|
|
2464
2495
|
declare class CartPlatformModel {
|
|
2465
2496
|
}
|
|
2466
2497
|
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 };
|
|
2498
|
+
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
2499
|
}
|
|
2500
|
+
/** @returns {RedeemLoyaltyPoints} */
|
|
2501
|
+
declare function RedeemLoyaltyPoints(): RedeemLoyaltyPoints;
|
|
2502
|
+
type RedeemLoyaltyPoints = {
|
|
2503
|
+
/**
|
|
2504
|
+
* - Marks if engage points are to be redeemed
|
|
2505
|
+
* for the given cart.
|
|
2506
|
+
*/
|
|
2507
|
+
redeem_points: boolean;
|
|
2508
|
+
};
|
|
2469
2509
|
/** @returns {CouponDateMeta} */
|
|
2470
2510
|
declare function CouponDateMeta(): CouponDateMeta;
|
|
2471
2511
|
type CouponDateMeta = {
|
|
@@ -4635,6 +4675,42 @@ type LoyaltyPoints = {
|
|
|
4635
4675
|
* - Description for loyalty points
|
|
4636
4676
|
*/
|
|
4637
4677
|
description?: string;
|
|
4678
|
+
/**
|
|
4679
|
+
* - Total engage points available.
|
|
4680
|
+
*/
|
|
4681
|
+
total_points?: number;
|
|
4682
|
+
/**
|
|
4683
|
+
* - Engage points applied on the cart.
|
|
4684
|
+
*/
|
|
4685
|
+
points?: number;
|
|
4686
|
+
/**
|
|
4687
|
+
* - Engage points amount applied on the cart.
|
|
4688
|
+
*/
|
|
4689
|
+
amount?: number;
|
|
4690
|
+
/**
|
|
4691
|
+
* - Engage discount amount applied on the cart
|
|
4692
|
+
* as payment mode.
|
|
4693
|
+
*/
|
|
4694
|
+
mop_amount?: number;
|
|
4695
|
+
/**
|
|
4696
|
+
* - Engage points that can be earned on the
|
|
4697
|
+
* cart. for ex. (You’ll earn 56 points from this order!)
|
|
4698
|
+
*/
|
|
4699
|
+
earn_points?: number;
|
|
4700
|
+
/**
|
|
4701
|
+
* - Engage points amount that can be
|
|
4702
|
+
* earned on the cart. for ex. or ex. (You’ll earn ₹56 from this order!)
|
|
4703
|
+
*/
|
|
4704
|
+
earn_points_amount?: number;
|
|
4705
|
+
/**
|
|
4706
|
+
* - Title to show how many earn points are
|
|
4707
|
+
* gained for this order.
|
|
4708
|
+
*/
|
|
4709
|
+
earn_title?: string;
|
|
4710
|
+
/**
|
|
4711
|
+
* - Unique title for loyalty program applicable.
|
|
4712
|
+
*/
|
|
4713
|
+
title?: string;
|
|
4638
4714
|
};
|
|
4639
4715
|
/** @returns {RawBreakup} */
|
|
4640
4716
|
declare function RawBreakup(): RawBreakup;
|
|
@@ -4651,6 +4727,14 @@ type RawBreakup = {
|
|
|
4651
4727
|
* - Maximum price total amount of all products in cart
|
|
4652
4728
|
*/
|
|
4653
4729
|
mrp_total?: number;
|
|
4730
|
+
/**
|
|
4731
|
+
* - Engage points amount applied on the cart.
|
|
4732
|
+
*/
|
|
4733
|
+
engage_amount?: number;
|
|
4734
|
+
/**
|
|
4735
|
+
* - Engage mop amount applied on the cart.
|
|
4736
|
+
*/
|
|
4737
|
+
engage_mop_amount?: number;
|
|
4654
4738
|
/**
|
|
4655
4739
|
* - Loyalty points applied on cart
|
|
4656
4740
|
*/
|
|
@@ -6555,6 +6639,9 @@ type OverrideCartItemPromo = {
|
|
|
6555
6639
|
* - Promotion description applied on product
|
|
6556
6640
|
*/
|
|
6557
6641
|
promo_desc?: string;
|
|
6642
|
+
/**
|
|
6643
|
+
* _Deprecated_*
|
|
6644
|
+
*/
|
|
6558
6645
|
rwrd_tndr?: string;
|
|
6559
6646
|
/**
|
|
6560
6647
|
* - List of items
|
|
@@ -6622,12 +6709,7 @@ type OverrideCheckoutReq = {
|
|
|
6622
6709
|
* done for the order
|
|
6623
6710
|
*/
|
|
6624
6711
|
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;
|
|
6712
|
+
billing_address?: ShippingAddress;
|
|
6631
6713
|
/**
|
|
6632
6714
|
* - Merchant code of the payment mode selected
|
|
6633
6715
|
* to do the payment
|
|
@@ -6667,24 +6749,63 @@ type OverrideCheckoutReq = {
|
|
|
6667
6749
|
*/
|
|
6668
6750
|
ordering_store?: number;
|
|
6669
6751
|
/**
|
|
6670
|
-
* -
|
|
6671
|
-
*
|
|
6752
|
+
* - A unique identifier for the EDC (Electronic
|
|
6753
|
+
* Data Capture) machine. This value may be null if the identifier is not available.
|
|
6672
6754
|
*/
|
|
6673
|
-
|
|
6755
|
+
device_id?: string;
|
|
6756
|
+
shipping_address?: ShippingAddress;
|
|
6674
6757
|
};
|
|
6675
|
-
/** @returns {
|
|
6676
|
-
declare function
|
|
6677
|
-
type
|
|
6758
|
+
/** @returns {OverrideCheckoutData} */
|
|
6759
|
+
declare function OverrideCheckoutData(): OverrideCheckoutData;
|
|
6760
|
+
type OverrideCheckoutData = {
|
|
6761
|
+
/**
|
|
6762
|
+
* - Amount for the order in smallest currency unit
|
|
6763
|
+
* (e.g., paise for INR)
|
|
6764
|
+
*/
|
|
6765
|
+
amount?: number;
|
|
6766
|
+
/**
|
|
6767
|
+
* - Order id generated at the payment gateway
|
|
6768
|
+
*/
|
|
6769
|
+
order_id?: string;
|
|
6770
|
+
/**
|
|
6771
|
+
* - Customer email used for the payment
|
|
6772
|
+
*/
|
|
6773
|
+
email?: string;
|
|
6774
|
+
/**
|
|
6775
|
+
* - Customer contact number used for the payment
|
|
6776
|
+
*/
|
|
6777
|
+
contact?: string;
|
|
6778
|
+
/**
|
|
6779
|
+
* - Currency code for the transaction
|
|
6780
|
+
*/
|
|
6781
|
+
currency?: string;
|
|
6782
|
+
/**
|
|
6783
|
+
* - Customer id generated/linked at the payment gateway
|
|
6784
|
+
*/
|
|
6785
|
+
customer_id?: string;
|
|
6678
6786
|
/**
|
|
6679
|
-
* -
|
|
6680
|
-
*
|
|
6787
|
+
* - Callback URL where the payment status
|
|
6788
|
+
* will be posted
|
|
6681
6789
|
*/
|
|
6682
|
-
|
|
6790
|
+
callback_url?: string;
|
|
6791
|
+
/**
|
|
6792
|
+
* - Bank code used for the payment (if method is netbanking)
|
|
6793
|
+
*/
|
|
6794
|
+
bank?: string;
|
|
6795
|
+
/**
|
|
6796
|
+
* - Payment method used for the transaction
|
|
6797
|
+
*/
|
|
6798
|
+
method?: string;
|
|
6683
6799
|
/**
|
|
6684
|
-
* -
|
|
6685
|
-
* id, items in cart, promise, order type, breakup values etc.
|
|
6800
|
+
* - Virtual Payment Address used for UPI transactions
|
|
6686
6801
|
*/
|
|
6687
|
-
|
|
6802
|
+
vpa?: string;
|
|
6803
|
+
};
|
|
6804
|
+
/** @returns {OverrideCheckoutResult} */
|
|
6805
|
+
declare function OverrideCheckoutResult(): OverrideCheckoutResult;
|
|
6806
|
+
type OverrideCheckoutResult = {
|
|
6807
|
+
data: OverrideCheckoutData;
|
|
6808
|
+
cart: CheckCart;
|
|
6688
6809
|
/**
|
|
6689
6810
|
* - Success flag of cart override checkout API response
|
|
6690
6811
|
*/
|
|
@@ -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
|
|
@@ -962,6 +968,18 @@ const Joi = require("joi");
|
|
|
962
968
|
* @property {number} [applicable] - Whether the loyalty points are applicable
|
|
963
969
|
* for the cart
|
|
964
970
|
* @property {string} [description] - Description for loyalty points
|
|
971
|
+
* @property {number} [total_points] - Total engage points available.
|
|
972
|
+
* @property {number} [points] - Engage points applied on the cart.
|
|
973
|
+
* @property {number} [amount] - Engage points amount applied on the cart.
|
|
974
|
+
* @property {number} [mop_amount] - Engage discount amount applied on the cart
|
|
975
|
+
* as payment mode.
|
|
976
|
+
* @property {number} [earn_points] - Engage points that can be earned on the
|
|
977
|
+
* cart. for ex. (You’ll earn 56 points from this order!)
|
|
978
|
+
* @property {number} [earn_points_amount] - Engage points amount that can be
|
|
979
|
+
* earned on the cart. for ex. or ex. (You’ll earn ₹56 from this order!)
|
|
980
|
+
* @property {string} [earn_title] - Title to show how many earn points are
|
|
981
|
+
* gained for this order.
|
|
982
|
+
* @property {string} [title] - Unique title for loyalty program applicable.
|
|
965
983
|
*/
|
|
966
984
|
|
|
967
985
|
/**
|
|
@@ -969,6 +987,8 @@ const Joi = require("joi");
|
|
|
969
987
|
* @property {number} [coupon] - Coupon amount applied to cart
|
|
970
988
|
* @property {number} [gst_charges] - GST charges applied on cart
|
|
971
989
|
* @property {number} [mrp_total] - Maximum price total amount of all products in cart
|
|
990
|
+
* @property {number} [engage_amount] - Engage points amount applied on the cart.
|
|
991
|
+
* @property {number} [engage_mop_amount] - Engage mop amount applied on the cart.
|
|
972
992
|
* @property {number} [fynd_cash] - Loyalty points applied on cart
|
|
973
993
|
* @property {number} [vog] - Total value of goods after all discount, coupons
|
|
974
994
|
* and promotion applied of all products in cart
|
|
@@ -1781,7 +1801,7 @@ const Joi = require("joi");
|
|
|
1781
1801
|
* @property {string} promo_id - Promotion id applied on product
|
|
1782
1802
|
* @property {string} promo_amount - Promotion amount applied on product
|
|
1783
1803
|
* @property {string} [promo_desc] - Promotion description applied on product
|
|
1784
|
-
* @property {string} [rwrd_tndr]
|
|
1804
|
+
* @property {string} [rwrd_tndr] _Deprecated_*
|
|
1785
1805
|
* @property {Object[]} [item_list] - List of items
|
|
1786
1806
|
* @property {string} [parent_promo_id] - Parent promotion unique identifier
|
|
1787
1807
|
*/
|
|
@@ -1806,9 +1826,7 @@ const Joi = require("joi");
|
|
|
1806
1826
|
* @property {string} cart_id - The cart id of user cart
|
|
1807
1827
|
* @property {string} payment_mode - Payment mode from which the payment to be
|
|
1808
1828
|
* done for the order
|
|
1809
|
-
* @property {
|
|
1810
|
-
* customer address, customer phone, customer email, customer pincode,
|
|
1811
|
-
* customer landmark and customer name
|
|
1829
|
+
* @property {ShippingAddress} [billing_address]
|
|
1812
1830
|
* @property {string} merchant_code - Merchant code of the payment mode selected
|
|
1813
1831
|
* to do the payment
|
|
1814
1832
|
* @property {string} payment_identifier - Payment identifier of the payment
|
|
@@ -1823,16 +1841,31 @@ const Joi = require("joi");
|
|
|
1823
1841
|
* their size, id, discount and promo details
|
|
1824
1842
|
* @property {number} [ordering_store] - Ordering store id of the store from
|
|
1825
1843
|
* which the order is getting placed
|
|
1826
|
-
* @property {
|
|
1827
|
-
*
|
|
1844
|
+
* @property {string} [device_id] - A unique identifier for the EDC (Electronic
|
|
1845
|
+
* Data Capture) machine. This value may be null if the identifier is not available.
|
|
1846
|
+
* @property {ShippingAddress} [shipping_address]
|
|
1847
|
+
*/
|
|
1848
|
+
|
|
1849
|
+
/**
|
|
1850
|
+
* @typedef OverrideCheckoutData
|
|
1851
|
+
* @property {number} [amount] - Amount for the order in smallest currency unit
|
|
1852
|
+
* (e.g., paise for INR)
|
|
1853
|
+
* @property {string} [order_id] - Order id generated at the payment gateway
|
|
1854
|
+
* @property {string} [email] - Customer email used for the payment
|
|
1855
|
+
* @property {string} [contact] - Customer contact number used for the payment
|
|
1856
|
+
* @property {string} [currency] - Currency code for the transaction
|
|
1857
|
+
* @property {string} [customer_id] - Customer id generated/linked at the payment gateway
|
|
1858
|
+
* @property {string} [callback_url] - Callback URL where the payment status
|
|
1859
|
+
* will be posted
|
|
1860
|
+
* @property {string} [bank] - Bank code used for the payment (if method is netbanking)
|
|
1861
|
+
* @property {string} [method] - Payment method used for the transaction
|
|
1862
|
+
* @property {string} [vpa] - Virtual Payment Address used for UPI transactions
|
|
1828
1863
|
*/
|
|
1829
1864
|
|
|
1830
1865
|
/**
|
|
1831
1866
|
* @typedef OverrideCheckoutResult
|
|
1832
|
-
* @property {
|
|
1833
|
-
*
|
|
1834
|
-
* @property {Object} cart - Cart details in API response which included cart
|
|
1835
|
-
* id, items in cart, promise, order type, breakup values etc.
|
|
1867
|
+
* @property {OverrideCheckoutData} data
|
|
1868
|
+
* @property {CheckCart} cart
|
|
1836
1869
|
* @property {string} success - Success flag of cart override checkout API response
|
|
1837
1870
|
* @property {string} order_id - Order id generated after placing order
|
|
1838
1871
|
* @property {string} message - Message of the cart override checkout API response
|
|
@@ -2676,6 +2709,13 @@ const Joi = require("joi");
|
|
|
2676
2709
|
*/
|
|
2677
2710
|
|
|
2678
2711
|
class CartPlatformModel {
|
|
2712
|
+
/** @returns {RedeemLoyaltyPoints} */
|
|
2713
|
+
static RedeemLoyaltyPoints() {
|
|
2714
|
+
return Joi.object({
|
|
2715
|
+
redeem_points: Joi.boolean().required(),
|
|
2716
|
+
});
|
|
2717
|
+
}
|
|
2718
|
+
|
|
2679
2719
|
/** @returns {CouponDateMeta} */
|
|
2680
2720
|
static CouponDateMeta() {
|
|
2681
2721
|
return Joi.object({
|
|
@@ -3659,6 +3699,14 @@ class CartPlatformModel {
|
|
|
3659
3699
|
total: Joi.number(),
|
|
3660
3700
|
applicable: Joi.number(),
|
|
3661
3701
|
description: Joi.string().allow(""),
|
|
3702
|
+
total_points: Joi.number(),
|
|
3703
|
+
points: Joi.number(),
|
|
3704
|
+
amount: Joi.number(),
|
|
3705
|
+
mop_amount: Joi.number(),
|
|
3706
|
+
earn_points: Joi.number(),
|
|
3707
|
+
earn_points_amount: Joi.number(),
|
|
3708
|
+
earn_title: Joi.string().allow(""),
|
|
3709
|
+
title: Joi.string().allow(""),
|
|
3662
3710
|
});
|
|
3663
3711
|
}
|
|
3664
3712
|
|
|
@@ -3668,6 +3716,8 @@ class CartPlatformModel {
|
|
|
3668
3716
|
coupon: Joi.number(),
|
|
3669
3717
|
gst_charges: Joi.number(),
|
|
3670
3718
|
mrp_total: Joi.number(),
|
|
3719
|
+
engage_amount: Joi.number(),
|
|
3720
|
+
engage_mop_amount: Joi.number(),
|
|
3671
3721
|
fynd_cash: Joi.number(),
|
|
3672
3722
|
vog: Joi.number(),
|
|
3673
3723
|
gift_card: Joi.number(),
|
|
@@ -4536,7 +4586,7 @@ class CartPlatformModel {
|
|
|
4536
4586
|
return Joi.object({
|
|
4537
4587
|
cart_id: Joi.string().allow("").required(),
|
|
4538
4588
|
payment_mode: Joi.string().allow("").required(),
|
|
4539
|
-
billing_address:
|
|
4589
|
+
billing_address: CartPlatformModel.ShippingAddress(),
|
|
4540
4590
|
merchant_code: Joi.string().allow("").required(),
|
|
4541
4591
|
payment_identifier: Joi.string().allow("").required(),
|
|
4542
4592
|
currency_code: Joi.string().allow("").required(),
|
|
@@ -4547,15 +4597,32 @@ class CartPlatformModel {
|
|
|
4547
4597
|
.items(CartPlatformModel.OverrideCartItem())
|
|
4548
4598
|
.required(),
|
|
4549
4599
|
ordering_store: Joi.number().allow(null),
|
|
4550
|
-
|
|
4600
|
+
device_id: Joi.string().allow("").allow(null),
|
|
4601
|
+
shipping_address: CartPlatformModel.ShippingAddress(),
|
|
4602
|
+
});
|
|
4603
|
+
}
|
|
4604
|
+
|
|
4605
|
+
/** @returns {OverrideCheckoutData} */
|
|
4606
|
+
static OverrideCheckoutData() {
|
|
4607
|
+
return Joi.object({
|
|
4608
|
+
amount: Joi.number(),
|
|
4609
|
+
order_id: Joi.string().allow(""),
|
|
4610
|
+
email: Joi.string().allow(""),
|
|
4611
|
+
contact: Joi.string().allow(""),
|
|
4612
|
+
currency: Joi.string().allow(""),
|
|
4613
|
+
customer_id: Joi.string().allow(""),
|
|
4614
|
+
callback_url: Joi.string().allow(""),
|
|
4615
|
+
bank: Joi.string().allow(""),
|
|
4616
|
+
method: Joi.string().allow(""),
|
|
4617
|
+
vpa: Joi.string().allow(""),
|
|
4551
4618
|
});
|
|
4552
4619
|
}
|
|
4553
4620
|
|
|
4554
4621
|
/** @returns {OverrideCheckoutResult} */
|
|
4555
4622
|
static OverrideCheckoutResult() {
|
|
4556
4623
|
return Joi.object({
|
|
4557
|
-
data:
|
|
4558
|
-
cart:
|
|
4624
|
+
data: CartPlatformModel.OverrideCheckoutData().required(),
|
|
4625
|
+
cart: CartPlatformModel.CheckCart().required(),
|
|
4559
4626
|
success: Joi.string().allow("").required(),
|
|
4560
4627
|
order_id: Joi.string().allow("").required(),
|
|
4561
4628
|
message: Joi.string().allow("").required(),
|
|
@@ -400,10 +400,12 @@ export = CompanyProfilePlatformModel;
|
|
|
400
400
|
*/
|
|
401
401
|
/**
|
|
402
402
|
* @typedef LocationSchema
|
|
403
|
-
* @property {string} code
|
|
403
|
+
* @property {string} code - A unique identifier for the store location. Must be
|
|
404
|
+
* a non-empty string with a maximum length of 100 characters.
|
|
404
405
|
* @property {InvoiceDetailsSchema} [gst_credentials]
|
|
405
406
|
* @property {SellerPhoneNumber[]} [contact_numbers]
|
|
406
|
-
* @property {string} name
|
|
407
|
+
* @property {string} name - The value of the name. Should be a non-empty string
|
|
408
|
+
* and length should not exceed 300 characters.
|
|
407
409
|
* @property {Object} [_custom_json]
|
|
408
410
|
* @property {Object} [warnings]
|
|
409
411
|
* @property {AddressSchema} address
|
|
@@ -418,7 +420,8 @@ export = CompanyProfilePlatformModel;
|
|
|
418
420
|
* @property {boolean} [credit_note]
|
|
419
421
|
* @property {HolidaySchemaSchema[]} [holiday]
|
|
420
422
|
* @property {ProductReturnConfigSchema} [product_return_config]
|
|
421
|
-
* @property {string} display_name
|
|
423
|
+
* @property {string} display_name - The value of the display_name. Should be a
|
|
424
|
+
* non-empty string and length should not exceed 300 characters.
|
|
422
425
|
* @property {string[]} [notification_emails]
|
|
423
426
|
* @property {string[]} [tags]
|
|
424
427
|
* @property {boolean} [default_order_acceptance_timing] - Flag to set
|
|
@@ -921,9 +924,17 @@ type AddressSchema = {
|
|
|
921
924
|
/** @returns {LocationSchema} */
|
|
922
925
|
declare function LocationSchema(): LocationSchema;
|
|
923
926
|
type LocationSchema = {
|
|
927
|
+
/**
|
|
928
|
+
* - A unique identifier for the store location. Must be
|
|
929
|
+
* a non-empty string with a maximum length of 100 characters.
|
|
930
|
+
*/
|
|
924
931
|
code: string;
|
|
925
932
|
gst_credentials?: InvoiceDetailsSchema;
|
|
926
933
|
contact_numbers?: SellerPhoneNumber[];
|
|
934
|
+
/**
|
|
935
|
+
* - The value of the name. Should be a non-empty string
|
|
936
|
+
* and length should not exceed 300 characters.
|
|
937
|
+
*/
|
|
927
938
|
name: string;
|
|
928
939
|
_custom_json?: any;
|
|
929
940
|
warnings?: any;
|
|
@@ -939,6 +950,10 @@ type LocationSchema = {
|
|
|
939
950
|
credit_note?: boolean;
|
|
940
951
|
holiday?: HolidaySchemaSchema[];
|
|
941
952
|
product_return_config?: ProductReturnConfigSchema;
|
|
953
|
+
/**
|
|
954
|
+
* - The value of the display_name. Should be a
|
|
955
|
+
* non-empty string and length should not exceed 300 characters.
|
|
956
|
+
*/
|
|
942
957
|
display_name: string;
|
|
943
958
|
notification_emails?: string[];
|
|
944
959
|
tags?: string[];
|
|
@@ -442,10 +442,12 @@ const Joi = require("joi");
|
|
|
442
442
|
|
|
443
443
|
/**
|
|
444
444
|
* @typedef LocationSchema
|
|
445
|
-
* @property {string} code
|
|
445
|
+
* @property {string} code - A unique identifier for the store location. Must be
|
|
446
|
+
* a non-empty string with a maximum length of 100 characters.
|
|
446
447
|
* @property {InvoiceDetailsSchema} [gst_credentials]
|
|
447
448
|
* @property {SellerPhoneNumber[]} [contact_numbers]
|
|
448
|
-
* @property {string} name
|
|
449
|
+
* @property {string} name - The value of the name. Should be a non-empty string
|
|
450
|
+
* and length should not exceed 300 characters.
|
|
449
451
|
* @property {Object} [_custom_json]
|
|
450
452
|
* @property {Object} [warnings]
|
|
451
453
|
* @property {AddressSchema} address
|
|
@@ -460,7 +462,8 @@ const Joi = require("joi");
|
|
|
460
462
|
* @property {boolean} [credit_note]
|
|
461
463
|
* @property {HolidaySchemaSchema[]} [holiday]
|
|
462
464
|
* @property {ProductReturnConfigSchema} [product_return_config]
|
|
463
|
-
* @property {string} display_name
|
|
465
|
+
* @property {string} display_name - The value of the display_name. Should be a
|
|
466
|
+
* non-empty string and length should not exceed 300 characters.
|
|
464
467
|
* @property {string[]} [notification_emails]
|
|
465
468
|
* @property {string[]} [tags]
|
|
466
469
|
* @property {boolean} [default_order_acceptance_timing] - Flag to set
|
|
@@ -796,7 +796,7 @@ declare class Order {
|
|
|
796
796
|
*
|
|
797
797
|
* @name updateShipmentStatus
|
|
798
798
|
* @summary: Update a shipment's status
|
|
799
|
-
* @description:
|
|
799
|
+
* @description: It is used for updating the shipment in the following scenarios:\n• Full Confirmation\n• Partial Confirmation\n• Change the status of a shipment\n• Full Cancellation\n• Partial Cancellation\n• Assign the shipment to DP. Click <a href=\"https://docs.fynd.com/partners/commerce/miscellaneous/updateShipmentStatus\">here</a> to get the example payload. Also, refer to the <a href=\"https://docs.fynd.com/partners/commerce/getting-started/oms-states/\">OMS Sates</a> for the complete status list. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updateShipmentStatus/).
|
|
800
800
|
*/
|
|
801
801
|
updateShipmentStatus({ body, requestHeaders }?: OrderPlatformValidator.UpdateShipmentStatusParam, { responseHeaders }?: object): Promise<OrderPlatformModel.UpdateShipmentStatusResponseBody>;
|
|
802
802
|
/**
|
|
@@ -5251,7 +5251,7 @@ class Order {
|
|
|
5251
5251
|
*
|
|
5252
5252
|
* @name updateShipmentStatus
|
|
5253
5253
|
* @summary: Update a shipment's status
|
|
5254
|
-
* @description:
|
|
5254
|
+
* @description: It is used for updating the shipment in the following scenarios:\n• Full Confirmation\n• Partial Confirmation\n• Change the status of a shipment\n• Full Cancellation\n• Partial Cancellation\n• Assign the shipment to DP. Click <a href=\"https://docs.fynd.com/partners/commerce/miscellaneous/updateShipmentStatus\">here</a> to get the example payload. Also, refer to the <a href=\"https://docs.fynd.com/partners/commerce/getting-started/oms-states/\">OMS Sates</a> for the complete status list. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/order/updateShipmentStatus/).
|
|
5255
5255
|
*/
|
|
5256
5256
|
async updateShipmentStatus(
|
|
5257
5257
|
{ body, requestHeaders } = { requestHeaders: {} },
|