@gofynd/fdk-client-javascript 3.17.0 → 3.17.2
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 +40 -0
- package/sdk/application/Cart/CartApplicationClient.js +176 -0
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +18 -4
- package/sdk/application/Catalog/CatalogApplicationClient.js +47 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +11 -1
- package/sdk/application/Content/ContentApplicationClient.js +40 -2
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
- package/sdk/application/Payment/PaymentApplicationClient.js +2 -0
- package/sdk/common/Constant.d.ts +9 -0
- package/sdk/common/Constant.js +11 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +3 -2
- package/sdk/partner/Theme/ThemePartnerModel.js +5 -2
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +72 -10
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +634 -33
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +225 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +147 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +951 -1
- package/sdk/platform/Cart/CartPlatformModel.js +597 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +123 -3
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +829 -39
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +205 -7
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +154 -3
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +5 -5
- package/sdk/platform/Catalog/CatalogPlatformClient.js +8 -5
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1023 -31
- package/sdk/platform/Catalog/CatalogPlatformModel.js +841 -26
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +7 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +3 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +7 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.js +3 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +92 -1
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +54 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +5 -5
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +3 -3
- package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -8
- package/sdk/platform/Content/ContentPlatformModel.js +11 -8
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +21 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +9 -0
- package/sdk/platform/Order/OrderPlatformClient.d.ts +2 -2
- package/sdk/platform/Order/OrderPlatformClient.js +2 -2
- package/sdk/platform/Order/OrderPlatformModel.d.ts +20 -2
- package/sdk/platform/Order/OrderPlatformModel.js +9 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +14 -3
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +88 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +28 -3
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +22 -2
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +356 -1
- package/sdk/platform/Payment/PaymentPlatformModel.js +229 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +3 -2
- package/sdk/platform/Theme/ThemePlatformModel.js +5 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +29 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.js +13 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +29 -0
- package/sdk/public/Webhook/WebhookPublicModel.js +13 -0
|
@@ -1265,6 +1265,25 @@ export = CartPlatformModel;
|
|
|
1265
1265
|
* @property {string} [message] - Loyalty points message denotes how much
|
|
1266
1266
|
* loyalty points and applied and how much left with the user
|
|
1267
1267
|
*/
|
|
1268
|
+
/**
|
|
1269
|
+
* @typedef CurrencyValue
|
|
1270
|
+
* @property {string} [currency] - Currency code.
|
|
1271
|
+
* @property {number} [value] - Numeric amount value.
|
|
1272
|
+
*/
|
|
1273
|
+
/**
|
|
1274
|
+
* @typedef ChargesAmount
|
|
1275
|
+
* @property {CurrencyValue} [base_currency]
|
|
1276
|
+
* @property {CurrencyValue} [ordering_currency]
|
|
1277
|
+
*/
|
|
1278
|
+
/**
|
|
1279
|
+
* @typedef ArticleCharges
|
|
1280
|
+
* @property {Object} [meta] - Meta data realted to charges price adjustment.
|
|
1281
|
+
* @property {ChargesAmount} [amount]
|
|
1282
|
+
* @property {string} [name] - Name of the charge applied.
|
|
1283
|
+
* @property {boolean} [allow_refund] - Whether refund is allowed or not for the charge.
|
|
1284
|
+
* @property {string} [code] - Code of the charge applied.
|
|
1285
|
+
* @property {string} [type] - Type of the charge applied.
|
|
1286
|
+
*/
|
|
1268
1287
|
/**
|
|
1269
1288
|
* @typedef CartProductInfo
|
|
1270
1289
|
* @property {number} [quantity] - Quantity of the product added in cart
|
|
@@ -1297,6 +1316,8 @@ export = CartPlatformModel;
|
|
|
1297
1316
|
* @property {PromoMeta} [promo_meta]
|
|
1298
1317
|
* @property {Object} [custom_order] - Whether MTO (Make to Order) is enabled or not.
|
|
1299
1318
|
* @property {string} [item_type] - Type of the item in cart.
|
|
1319
|
+
* @property {ArticleCharges[]} [charges] - Charges information which denotes
|
|
1320
|
+
* types of charges and amount of charge applied to that product in cart.
|
|
1300
1321
|
*/
|
|
1301
1322
|
/**
|
|
1302
1323
|
* @typedef OpenapiCartDetailsResult
|
|
@@ -2551,10 +2572,282 @@ export = CartPlatformModel;
|
|
|
2551
2572
|
* @property {string} message - A brief description of the error encountered.
|
|
2552
2573
|
* @property {string} field - The field in the request that caused the error.
|
|
2553
2574
|
*/
|
|
2575
|
+
/**
|
|
2576
|
+
* @typedef OfferUser
|
|
2577
|
+
* @property {number[]} [groups] - List of user group on which offer is allowed
|
|
2578
|
+
* @property {string} [type] - User type of the cart user who places the order
|
|
2579
|
+
* @property {boolean} [anonymous] - Set true, if offer is applicable for guest user
|
|
2580
|
+
* @property {string[]} [id] - List of user id on which offer is applicable
|
|
2581
|
+
* @property {UserRegistered} [registered]
|
|
2582
|
+
* @property {string[]} [email_domain] - List of email domain available for offer
|
|
2583
|
+
*/
|
|
2584
|
+
/**
|
|
2585
|
+
* @typedef OfferItemCriteria
|
|
2586
|
+
* @property {number[]} [category_id] - List of category id available for offer
|
|
2587
|
+
* @property {string[]} [collection_id] - List of collection id available for offer
|
|
2588
|
+
* @property {boolean} [all_items] - Boolean flag determining if offer is
|
|
2589
|
+
* applicable on all offers
|
|
2590
|
+
* @property {number[]} [item_brand] - List of all brand ids on which promotion
|
|
2591
|
+
* is applicable
|
|
2592
|
+
* @property {string[]} [article_ids] - List of unique identifier of articles on
|
|
2593
|
+
* which offer will be applicable
|
|
2594
|
+
* @property {string[]} [item_sku] - List of all item sku on which promotion is applicable
|
|
2595
|
+
* @property {number[]} [item_id] - List of all item ids on which offer is applicable
|
|
2596
|
+
* @property {number[]} [item_l1_category] - List of all L1 category on which
|
|
2597
|
+
* offer is applicable
|
|
2598
|
+
* @property {number[]} [item_l2_category] - List of all L2 category on which
|
|
2599
|
+
* offer is applicable
|
|
2600
|
+
* @property {number[]} [item_category] - List of all L3 category on which offer
|
|
2601
|
+
* is applicable
|
|
2602
|
+
* @property {number[]} [item_department] - List of all departments ids on which
|
|
2603
|
+
* offer is applicable
|
|
2604
|
+
* @property {number[]} [item_store] - List of all item store ids on which offer
|
|
2605
|
+
* is applicable
|
|
2606
|
+
* @property {string[]} [item_size] - List of all item sizes on which offer is applicable
|
|
2607
|
+
* @property {number[]} [item_company] - List of all company ids on which offer
|
|
2608
|
+
* is applicable
|
|
2609
|
+
* @property {string[]} [item_tags] - List of all product tags on which offer is
|
|
2610
|
+
* applicable
|
|
2611
|
+
* @property {CompareObject} [cart_quantity]
|
|
2612
|
+
* @property {CompareObject} [cart_total]
|
|
2613
|
+
* @property {number[]} [item_exclude_l1_category] - List of all L1 categories
|
|
2614
|
+
* on which offer is not applicable
|
|
2615
|
+
* @property {number[]} [item_exclude_l2_category] - List of all L2 categories
|
|
2616
|
+
* on which offer is not applicable
|
|
2617
|
+
* @property {number[]} [item_exclude_category] - List of all L3 categories on
|
|
2618
|
+
* which offer is not applicable
|
|
2619
|
+
* @property {CompareObject} [cart_unique_item_quantity]
|
|
2620
|
+
* @property {CompareObject} [cart_unique_item_amount]
|
|
2621
|
+
* @property {number[]} [item_exclude_department] - List of all department ids
|
|
2622
|
+
* on which offer is not applicable
|
|
2623
|
+
* @property {number[]} [item_exclude_store] - List of all item store ids on
|
|
2624
|
+
* which offer is not applicable
|
|
2625
|
+
* @property {number[]} [item_exclude_brand] - List of all brand ids on which
|
|
2626
|
+
* offer is not applicable
|
|
2627
|
+
* @property {string[]} [item_exclude_sku] - List of all item sku on which offer
|
|
2628
|
+
* is not applicable
|
|
2629
|
+
* @property {number[]} [item_exclude_company] - List of all company id on which
|
|
2630
|
+
* offer is not applicable
|
|
2631
|
+
* @property {string[]} [available_zones] - List of all zones on which offer is applicable
|
|
2632
|
+
* @property {number[]} [item_exclude_id] - List of all item ids on which offer
|
|
2633
|
+
* is not applicable
|
|
2634
|
+
* @property {string[]} [buy_rules] - List of buy rules that is applicable for this offer
|
|
2635
|
+
* @property {ItemSizeMapping} [item_size_mapping]
|
|
2636
|
+
*/
|
|
2637
|
+
/**
|
|
2638
|
+
* @typedef DiscountRuleOffer
|
|
2639
|
+
* @property {number} [max_discount_amount] - Maximum discount amount in offer
|
|
2640
|
+
* @property {number} [discount_price] - Discount price in offer
|
|
2641
|
+
* @property {boolean} [apportion_discount] - Flag to distribute discount for each article
|
|
2642
|
+
* @property {boolean} [partial_can_ret] - Flag indicated return the product partially
|
|
2643
|
+
* @property {number} [max_usage_per_transaction] - Maximum usage per transaction in offer
|
|
2644
|
+
* @property {number} [min_offer_quantity] - Minimum quantity of offer in offer
|
|
2645
|
+
* @property {number} [discount_amount] - Discount amount in offer
|
|
2646
|
+
* @property {number} [discount_percentage] - Discount percentage in offer
|
|
2647
|
+
* @property {number} [max_offer_quantity] - Maximum quantity of product in offer
|
|
2648
|
+
*/
|
|
2649
|
+
/**
|
|
2650
|
+
* @typedef OfferDiscountRule
|
|
2651
|
+
* @property {string} [discount_type] - The type of discount in offer
|
|
2652
|
+
* @property {string} [buy_condition] - Points to buy rule in offer. One
|
|
2653
|
+
* discount rule can only point to one buy rule.
|
|
2654
|
+
* @property {OfferItemCriteria} [item_criteria]
|
|
2655
|
+
* @property {DiscountRuleOffer} [offer]
|
|
2656
|
+
* @property {boolean} [is_exact] - Flag is true then use coupon applicable
|
|
2657
|
+
* articles for calculation
|
|
2658
|
+
*/
|
|
2659
|
+
/**
|
|
2660
|
+
* @typedef OfferUsesRemaining
|
|
2661
|
+
* @property {number} [user] - Define total offer count per user
|
|
2662
|
+
* @property {number} [total] - Define total offer count
|
|
2663
|
+
* @property {number} [app] - Define offer count associated with application id
|
|
2664
|
+
*/
|
|
2665
|
+
/**
|
|
2666
|
+
* @typedef OfferUsesRestriction
|
|
2667
|
+
* @property {OfferUsesRemaining} [maximum]
|
|
2668
|
+
* @property {OfferUsesRemaining} [remaining]
|
|
2669
|
+
*/
|
|
2670
|
+
/**
|
|
2671
|
+
* @typedef OfferRestrictionFulfillmentOptions
|
|
2672
|
+
* @property {string} fulfillment_slug - Fulfillment option id
|
|
2673
|
+
* @property {string[]} [zones] - List of zones ids on which offer is applicable.
|
|
2674
|
+
*/
|
|
2675
|
+
/**
|
|
2676
|
+
* @typedef OfferRestrictions
|
|
2677
|
+
* @property {OfferUsesRestriction} [uses]
|
|
2678
|
+
* @property {PostOrder} [post_order]
|
|
2679
|
+
* @property {string[]} [platforms] - List of platform on which offer allowed
|
|
2680
|
+
* like web, android
|
|
2681
|
+
* @property {PaymentModes} [payments]
|
|
2682
|
+
* @property {number[]} [ordering_stores] - List of store id on which offer is allowed
|
|
2683
|
+
* @property {number} [order_quantity] - Prmomotion offer max order count
|
|
2684
|
+
* @property {OfferUser} [user]
|
|
2685
|
+
* @property {boolean} [multi_store_allowed] - Allow offer to be applied on
|
|
2686
|
+
* multiple stores
|
|
2687
|
+
* @property {OfferRestrictionFulfillmentOptions[]} [fulfillment_options] - List
|
|
2688
|
+
* of fulfillment options on which offer is applicable.
|
|
2689
|
+
*/
|
|
2690
|
+
/**
|
|
2691
|
+
* @typedef OfferDisplayMeta
|
|
2692
|
+
* @property {string} description - Detail about the offers
|
|
2693
|
+
* @property {boolean} [is_display] - Coupon offer will be displayed or hidden
|
|
2694
|
+
* on UI based on this flag
|
|
2695
|
+
* @property {boolean} [is_public] - Determines if coupon offer is publicaly
|
|
2696
|
+
* available or not
|
|
2697
|
+
* @property {string} name - Name of offer that needs to display
|
|
2698
|
+
* @property {string} [offer_text] - Promotion offer text used to display
|
|
2699
|
+
* @property {string} [offer_label] - Offer label of promotion that needs to display
|
|
2700
|
+
* @property {string} [reason] - Reason for offer rejection
|
|
2701
|
+
*/
|
|
2702
|
+
/**
|
|
2703
|
+
* @typedef OfferCouponConfiguration
|
|
2704
|
+
* @property {number} [coupon_count] - Total number of coupons to be generated
|
|
2705
|
+
* when coupon type is bulk
|
|
2706
|
+
* @property {string} [coupon_prefix] - Bulk coupon code prefix string. All
|
|
2707
|
+
* coupons will be generated with this prefix.
|
|
2708
|
+
* @property {string} coupon_type - The type of coupon like bulk or single.
|
|
2709
|
+
*/
|
|
2710
|
+
/**
|
|
2711
|
+
* @typedef OfferOwnership
|
|
2712
|
+
* @property {string} payable_category - Promotion amount payable category
|
|
2713
|
+
* @property {string} [payable_by] - Promotion amount bearable party
|
|
2714
|
+
*/
|
|
2715
|
+
/**
|
|
2716
|
+
* @typedef OfferSchema
|
|
2717
|
+
* @property {string} [_id] - Unique identifier of offer. This will be auto
|
|
2718
|
+
* generated upon successful offer creation.
|
|
2719
|
+
* @property {string} mode - Offer mode, like coupon or promotion
|
|
2720
|
+
* @property {boolean} [auto_apply] - Indicates whether the offer is
|
|
2721
|
+
* automatically applied. This flag is false for coupons and true for
|
|
2722
|
+
* promotions. For free-gift promotions, a false value means manual gift
|
|
2723
|
+
* selection is required.
|
|
2724
|
+
* @property {string} [application_id] - Application id through which offer was created.
|
|
2725
|
+
* @property {string} [company_id] - Company id through which offer was created.
|
|
2726
|
+
* @property {OfferDiscountRule[]} [discount_rules] - Discount rules based on
|
|
2727
|
+
* which offer will be applied
|
|
2728
|
+
* @property {Object} [buy_rules] - Contains the individual buy rules associated
|
|
2729
|
+
* with the offer. The keys in this object are dynamic (e.g., 'rule#1',
|
|
2730
|
+
* 'rule#2', etc.), and each key must correspond to a buy condition referenced
|
|
2731
|
+
* within `discount_rules`. For example, if a discount rule includes a
|
|
2732
|
+
* buy_condition '(rule#1)', then 'rule#1' must be defined in this object.
|
|
2733
|
+
* Each rule key value must follow the format of OfferItemCriteria schema.
|
|
2734
|
+
* @property {OfferRestrictions} [restrictions]
|
|
2735
|
+
* @property {OfferDisplayMeta} display_meta
|
|
2736
|
+
* @property {OfferOwnership} [ownership]
|
|
2737
|
+
* @property {OfferAuthor} [author]
|
|
2738
|
+
* @property {OfferDateMeta} [date_meta]
|
|
2739
|
+
* @property {OfferSchedule} [_schedule]
|
|
2740
|
+
* @property {Object} [_custom_json] - Set extra properties in offer
|
|
2741
|
+
* @property {boolean} [stackable] - Boolean value set true to apply other
|
|
2742
|
+
* promotions as well.
|
|
2743
|
+
* @property {string} status - Status of the offer
|
|
2744
|
+
* @property {boolean} published - Determines whether the offer is published to
|
|
2745
|
+
* customers or marked inactive
|
|
2746
|
+
* @property {string} type - Different types of offers available in the system.
|
|
2747
|
+
* This is used to determine the type of offer and the calculation of the
|
|
2748
|
+
* offer. Some types are mode specific, few examples are :> -
|
|
2749
|
+
* free_item_discount_absolute is only applicable for coupon mode -
|
|
2750
|
+
* contract_price, shipping_price, free_gift_items, cashback, free_items,
|
|
2751
|
+
* free_non_sellable_items, external_price_adjustment_discount, custom is only
|
|
2752
|
+
* applicable for promotion mode
|
|
2753
|
+
* @property {number} [priority] - Defines the priority of the offer. Its
|
|
2754
|
+
* behavior varies based on the offer type. For coupons, a higher priority
|
|
2755
|
+
* value means the coupon will appear higher in the listing order. For
|
|
2756
|
+
* promotions, this value determines the sequence in which promotions are
|
|
2757
|
+
* evaluated and applied. Promotions are evaluated in descending order of
|
|
2758
|
+
* their effective priority. In case of conflicting priorities, the offer will
|
|
2759
|
+
* be prioritised on the basis of creation order (desc).
|
|
2760
|
+
* @property {boolean} [is_exclusive_coupon] - Flag to determine if coupon is
|
|
2761
|
+
* exclusive. Exclusive coupon removes other applied offers from the cart. If
|
|
2762
|
+
* both `is_exclusive_coupon` and `apply_exclusive` are set,
|
|
2763
|
+
* `is_exclusive_coupon` takes priority for offer evaluation logic effectively
|
|
2764
|
+
* making the offer exclusive.
|
|
2765
|
+
* @property {string} [apply_exclusive] - Controls how this offer excludes other
|
|
2766
|
+
* offers when it is applied. When this offer is applied at cart level, no
|
|
2767
|
+
* other promotions are evaluated or applied for the same cart (it becomes the
|
|
2768
|
+
* only active promotion for that cart). When this offer is applied on
|
|
2769
|
+
* specific articles, those articles will not be eligible for any other
|
|
2770
|
+
* promotions, but other promotions can still apply to different articles in
|
|
2771
|
+
* the cart. If null, the offer follows the normal stacking rules and does not
|
|
2772
|
+
* enforce additional exclusivity.
|
|
2773
|
+
* @property {string} [calculate_on] - Article Price on which offer is
|
|
2774
|
+
* calculated, like effective price or marked price. Only available for few
|
|
2775
|
+
* supported types lile Contract pricing and Ladder pricing.
|
|
2776
|
+
* @property {string} [promo_group] - The type of promotion group
|
|
2777
|
+
* @property {string} [currency] - ISO 4217 currency code in which the offer's
|
|
2778
|
+
* discount amounts and calculations are specified (e.g., "INR", "USD",
|
|
2779
|
+
* "EUR"). This currency is used as the base currency for discount
|
|
2780
|
+
* calculations and currency conversions when applying the offer. If not
|
|
2781
|
+
* provided, defaults to the seller's default currency code. All discount
|
|
2782
|
+
* values in discount_rules are interpreted in this currency.
|
|
2783
|
+
* @property {string} [code] - Unique identifier code for the offer. For coupons
|
|
2784
|
+
* (i.e mode = "coupon"), this is the coupon code that users enter to apply
|
|
2785
|
+
* the offer (e.g., "SAVE20", "WELCOME50"). For promotions (mode =
|
|
2786
|
+
* "promotion"), this field is typically null or empty as promotions are
|
|
2787
|
+
* auto-applied. This code is used to fetch and identify offers when applying
|
|
2788
|
+
* them to carts. Must be unique within an application_id. For bulk coupons,
|
|
2789
|
+
* this is auto-generated based on coupon_config.coupon_prefix.
|
|
2790
|
+
* @property {OfferCouponConfiguration} [coupon_config]
|
|
2791
|
+
* @property {boolean} [is_processed] - Flag to verify if promotion is ready to
|
|
2792
|
+
* be applied on cart and ready to update promotion
|
|
2793
|
+
* @property {boolean} [is_bank_offer] - Flag to determine if any bank offer is applicable
|
|
2794
|
+
*/
|
|
2795
|
+
/**
|
|
2796
|
+
* @typedef OfferPartialUpdate
|
|
2797
|
+
* @property {PromotionSchedule} [schedule]
|
|
2798
|
+
*/
|
|
2799
|
+
/**
|
|
2800
|
+
* @typedef OfferAuthor
|
|
2801
|
+
* @property {string} [created_by] - The user id of user, who has created the offer
|
|
2802
|
+
* @property {string} [modified_by] - The user id of user, who has modified the offer
|
|
2803
|
+
* @property {string} [approved_by] - The user id of user, who has approved the offer
|
|
2804
|
+
* @property {string} [rejected_by] - The user id of user, who has rejected the offer
|
|
2805
|
+
*/
|
|
2806
|
+
/**
|
|
2807
|
+
* @typedef OfferDateMeta
|
|
2808
|
+
* @property {string} [modified_on] - Date time format when the offer last modified
|
|
2809
|
+
* @property {string} [created_on] - Date time format when the offer created
|
|
2810
|
+
* @property {string} [approved_on] - Date time format when the offer approved
|
|
2811
|
+
* @property {string} [rejected_on] - Date time format when the offer rejected
|
|
2812
|
+
*/
|
|
2813
|
+
/**
|
|
2814
|
+
* @typedef NextScheduleItems
|
|
2815
|
+
* @property {string} [start] - Start date of schedule
|
|
2816
|
+
* @property {string} [end] - End date of schedule
|
|
2817
|
+
*/
|
|
2818
|
+
/**
|
|
2819
|
+
* @typedef OfferSchedule
|
|
2820
|
+
* @property {string} end - The end date and time until which the offer remains valid.
|
|
2821
|
+
* @property {string} start - The start date and time from which the offer becomes valid.
|
|
2822
|
+
* @property {NextScheduleItems[]} [next_schedule] - A auto generated list of
|
|
2823
|
+
* date-time entries based on start, end, cron and duration data on which the
|
|
2824
|
+
* offer is scheduled to activate in the future.
|
|
2825
|
+
* @property {string} [cron] - A cron expression used to schedule the offer to
|
|
2826
|
+
* activate periodically. When cron is null or not provided, duration is optional.
|
|
2827
|
+
* @property {number} [duration] - Duration of the offer activation in seconds.
|
|
2828
|
+
* Mandatory when cron is provided.
|
|
2829
|
+
*/
|
|
2830
|
+
/**
|
|
2831
|
+
* @typedef OfferListItem
|
|
2832
|
+
* @property {string} [mode] - Offer mode, like coupon or promotion
|
|
2833
|
+
* @property {string} [type] - Type of the offer
|
|
2834
|
+
* @property {string} [status] - Status of the offer
|
|
2835
|
+
* @property {boolean} [published] - Determines whether the offer is published
|
|
2836
|
+
* to customers or marked inactive
|
|
2837
|
+
* @property {OfferDisplayMeta} [display_meta]
|
|
2838
|
+
* @property {OfferAuthor} [author]
|
|
2839
|
+
* @property {OfferDateMeta} [date_meta]
|
|
2840
|
+
* @property {OfferSchedule} [schedule]
|
|
2841
|
+
*/
|
|
2842
|
+
/**
|
|
2843
|
+
* @typedef OfferListResult
|
|
2844
|
+
* @property {OfferListItem[]} [items] - List of offers
|
|
2845
|
+
* @property {Page} [page]
|
|
2846
|
+
*/
|
|
2554
2847
|
declare class CartPlatformModel {
|
|
2555
2848
|
}
|
|
2556
2849
|
declare namespace CartPlatformModel {
|
|
2557
|
-
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, DiscountItemCriteria, 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, UpdateCartBreakup, 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, DiscountOfferRule, PromotionOffer, PromotionOffersDetails, PromotionPaymentOffer, PromotionPaymentOffersDetails, ValidationError };
|
|
2850
|
+
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, DiscountItemCriteria, 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, CurrencyValue, ChargesAmount, ArticleCharges, 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, UpdateCartBreakup, 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, DiscountOfferRule, PromotionOffer, PromotionOffersDetails, PromotionPaymentOffer, PromotionPaymentOffersDetails, ValidationError, OfferUser, OfferItemCriteria, DiscountRuleOffer, OfferDiscountRule, OfferUsesRemaining, OfferUsesRestriction, OfferRestrictionFulfillmentOptions, OfferRestrictions, OfferDisplayMeta, OfferCouponConfiguration, OfferOwnership, OfferSchema, OfferPartialUpdate, OfferAuthor, OfferDateMeta, NextScheduleItems, OfferSchedule, OfferListItem, OfferListResult };
|
|
2558
2851
|
}
|
|
2559
2852
|
/** @returns {RedeemLoyaltyPoints} */
|
|
2560
2853
|
declare function RedeemLoyaltyPoints(): RedeemLoyaltyPoints;
|
|
@@ -5647,6 +5940,49 @@ type PromoMeta = {
|
|
|
5647
5940
|
*/
|
|
5648
5941
|
message?: string;
|
|
5649
5942
|
};
|
|
5943
|
+
/** @returns {CurrencyValue} */
|
|
5944
|
+
declare function CurrencyValue(): CurrencyValue;
|
|
5945
|
+
type CurrencyValue = {
|
|
5946
|
+
/**
|
|
5947
|
+
* - Currency code.
|
|
5948
|
+
*/
|
|
5949
|
+
currency?: string;
|
|
5950
|
+
/**
|
|
5951
|
+
* - Numeric amount value.
|
|
5952
|
+
*/
|
|
5953
|
+
value?: number;
|
|
5954
|
+
};
|
|
5955
|
+
/** @returns {ChargesAmount} */
|
|
5956
|
+
declare function ChargesAmount(): ChargesAmount;
|
|
5957
|
+
type ChargesAmount = {
|
|
5958
|
+
base_currency?: CurrencyValue;
|
|
5959
|
+
ordering_currency?: CurrencyValue;
|
|
5960
|
+
};
|
|
5961
|
+
/** @returns {ArticleCharges} */
|
|
5962
|
+
declare function ArticleCharges(): ArticleCharges;
|
|
5963
|
+
type ArticleCharges = {
|
|
5964
|
+
/**
|
|
5965
|
+
* - Meta data realted to charges price adjustment.
|
|
5966
|
+
*/
|
|
5967
|
+
meta?: any;
|
|
5968
|
+
amount?: ChargesAmount;
|
|
5969
|
+
/**
|
|
5970
|
+
* - Name of the charge applied.
|
|
5971
|
+
*/
|
|
5972
|
+
name?: string;
|
|
5973
|
+
/**
|
|
5974
|
+
* - Whether refund is allowed or not for the charge.
|
|
5975
|
+
*/
|
|
5976
|
+
allow_refund?: boolean;
|
|
5977
|
+
/**
|
|
5978
|
+
* - Code of the charge applied.
|
|
5979
|
+
*/
|
|
5980
|
+
code?: string;
|
|
5981
|
+
/**
|
|
5982
|
+
* - Type of the charge applied.
|
|
5983
|
+
*/
|
|
5984
|
+
type?: string;
|
|
5985
|
+
};
|
|
5650
5986
|
/** @returns {CartProductInfo} */
|
|
5651
5987
|
declare function CartProductInfo(): CartProductInfo;
|
|
5652
5988
|
type CartProductInfo = {
|
|
@@ -5719,6 +6055,11 @@ type CartProductInfo = {
|
|
|
5719
6055
|
* - Type of the item in cart.
|
|
5720
6056
|
*/
|
|
5721
6057
|
item_type?: string;
|
|
6058
|
+
/**
|
|
6059
|
+
* - Charges information which denotes
|
|
6060
|
+
* types of charges and amount of charge applied to that product in cart.
|
|
6061
|
+
*/
|
|
6062
|
+
charges?: ArticleCharges[];
|
|
5722
6063
|
};
|
|
5723
6064
|
/** @returns {OpenapiCartDetailsResult} */
|
|
5724
6065
|
declare function OpenapiCartDetailsResult(): OpenapiCartDetailsResult;
|
|
@@ -8946,3 +9287,612 @@ type ValidationError = {
|
|
|
8946
9287
|
*/
|
|
8947
9288
|
field: string;
|
|
8948
9289
|
};
|
|
9290
|
+
/** @returns {OfferUser} */
|
|
9291
|
+
declare function OfferUser(): OfferUser;
|
|
9292
|
+
type OfferUser = {
|
|
9293
|
+
/**
|
|
9294
|
+
* - List of user group on which offer is allowed
|
|
9295
|
+
*/
|
|
9296
|
+
groups?: number[];
|
|
9297
|
+
/**
|
|
9298
|
+
* - User type of the cart user who places the order
|
|
9299
|
+
*/
|
|
9300
|
+
type?: string;
|
|
9301
|
+
/**
|
|
9302
|
+
* - Set true, if offer is applicable for guest user
|
|
9303
|
+
*/
|
|
9304
|
+
anonymous?: boolean;
|
|
9305
|
+
/**
|
|
9306
|
+
* - List of user id on which offer is applicable
|
|
9307
|
+
*/
|
|
9308
|
+
id?: string[];
|
|
9309
|
+
registered?: UserRegistered;
|
|
9310
|
+
/**
|
|
9311
|
+
* - List of email domain available for offer
|
|
9312
|
+
*/
|
|
9313
|
+
email_domain?: string[];
|
|
9314
|
+
};
|
|
9315
|
+
/** @returns {OfferItemCriteria} */
|
|
9316
|
+
declare function OfferItemCriteria(): OfferItemCriteria;
|
|
9317
|
+
type OfferItemCriteria = {
|
|
9318
|
+
/**
|
|
9319
|
+
* - List of category id available for offer
|
|
9320
|
+
*/
|
|
9321
|
+
category_id?: number[];
|
|
9322
|
+
/**
|
|
9323
|
+
* - List of collection id available for offer
|
|
9324
|
+
*/
|
|
9325
|
+
collection_id?: string[];
|
|
9326
|
+
/**
|
|
9327
|
+
* - Boolean flag determining if offer is
|
|
9328
|
+
* applicable on all offers
|
|
9329
|
+
*/
|
|
9330
|
+
all_items?: boolean;
|
|
9331
|
+
/**
|
|
9332
|
+
* - List of all brand ids on which promotion
|
|
9333
|
+
* is applicable
|
|
9334
|
+
*/
|
|
9335
|
+
item_brand?: number[];
|
|
9336
|
+
/**
|
|
9337
|
+
* - List of unique identifier of articles on
|
|
9338
|
+
* which offer will be applicable
|
|
9339
|
+
*/
|
|
9340
|
+
article_ids?: string[];
|
|
9341
|
+
/**
|
|
9342
|
+
* - List of all item sku on which promotion is applicable
|
|
9343
|
+
*/
|
|
9344
|
+
item_sku?: string[];
|
|
9345
|
+
/**
|
|
9346
|
+
* - List of all item ids on which offer is applicable
|
|
9347
|
+
*/
|
|
9348
|
+
item_id?: number[];
|
|
9349
|
+
/**
|
|
9350
|
+
* - List of all L1 category on which
|
|
9351
|
+
* offer is applicable
|
|
9352
|
+
*/
|
|
9353
|
+
item_l1_category?: number[];
|
|
9354
|
+
/**
|
|
9355
|
+
* - List of all L2 category on which
|
|
9356
|
+
* offer is applicable
|
|
9357
|
+
*/
|
|
9358
|
+
item_l2_category?: number[];
|
|
9359
|
+
/**
|
|
9360
|
+
* - List of all L3 category on which offer
|
|
9361
|
+
* is applicable
|
|
9362
|
+
*/
|
|
9363
|
+
item_category?: number[];
|
|
9364
|
+
/**
|
|
9365
|
+
* - List of all departments ids on which
|
|
9366
|
+
* offer is applicable
|
|
9367
|
+
*/
|
|
9368
|
+
item_department?: number[];
|
|
9369
|
+
/**
|
|
9370
|
+
* - List of all item store ids on which offer
|
|
9371
|
+
* is applicable
|
|
9372
|
+
*/
|
|
9373
|
+
item_store?: number[];
|
|
9374
|
+
/**
|
|
9375
|
+
* - List of all item sizes on which offer is applicable
|
|
9376
|
+
*/
|
|
9377
|
+
item_size?: string[];
|
|
9378
|
+
/**
|
|
9379
|
+
* - List of all company ids on which offer
|
|
9380
|
+
* is applicable
|
|
9381
|
+
*/
|
|
9382
|
+
item_company?: number[];
|
|
9383
|
+
/**
|
|
9384
|
+
* - List of all product tags on which offer is
|
|
9385
|
+
* applicable
|
|
9386
|
+
*/
|
|
9387
|
+
item_tags?: string[];
|
|
9388
|
+
cart_quantity?: CompareObject;
|
|
9389
|
+
cart_total?: CompareObject;
|
|
9390
|
+
/**
|
|
9391
|
+
* - List of all L1 categories
|
|
9392
|
+
* on which offer is not applicable
|
|
9393
|
+
*/
|
|
9394
|
+
item_exclude_l1_category?: number[];
|
|
9395
|
+
/**
|
|
9396
|
+
* - List of all L2 categories
|
|
9397
|
+
* on which offer is not applicable
|
|
9398
|
+
*/
|
|
9399
|
+
item_exclude_l2_category?: number[];
|
|
9400
|
+
/**
|
|
9401
|
+
* - List of all L3 categories on
|
|
9402
|
+
* which offer is not applicable
|
|
9403
|
+
*/
|
|
9404
|
+
item_exclude_category?: number[];
|
|
9405
|
+
cart_unique_item_quantity?: CompareObject;
|
|
9406
|
+
cart_unique_item_amount?: CompareObject;
|
|
9407
|
+
/**
|
|
9408
|
+
* - List of all department ids
|
|
9409
|
+
* on which offer is not applicable
|
|
9410
|
+
*/
|
|
9411
|
+
item_exclude_department?: number[];
|
|
9412
|
+
/**
|
|
9413
|
+
* - List of all item store ids on
|
|
9414
|
+
* which offer is not applicable
|
|
9415
|
+
*/
|
|
9416
|
+
item_exclude_store?: number[];
|
|
9417
|
+
/**
|
|
9418
|
+
* - List of all brand ids on which
|
|
9419
|
+
* offer is not applicable
|
|
9420
|
+
*/
|
|
9421
|
+
item_exclude_brand?: number[];
|
|
9422
|
+
/**
|
|
9423
|
+
* - List of all item sku on which offer
|
|
9424
|
+
* is not applicable
|
|
9425
|
+
*/
|
|
9426
|
+
item_exclude_sku?: string[];
|
|
9427
|
+
/**
|
|
9428
|
+
* - List of all company id on which
|
|
9429
|
+
* offer is not applicable
|
|
9430
|
+
*/
|
|
9431
|
+
item_exclude_company?: number[];
|
|
9432
|
+
/**
|
|
9433
|
+
* - List of all zones on which offer is applicable
|
|
9434
|
+
*/
|
|
9435
|
+
available_zones?: string[];
|
|
9436
|
+
/**
|
|
9437
|
+
* - List of all item ids on which offer
|
|
9438
|
+
* is not applicable
|
|
9439
|
+
*/
|
|
9440
|
+
item_exclude_id?: number[];
|
|
9441
|
+
/**
|
|
9442
|
+
* - List of buy rules that is applicable for this offer
|
|
9443
|
+
*/
|
|
9444
|
+
buy_rules?: string[];
|
|
9445
|
+
item_size_mapping?: ItemSizeMapping;
|
|
9446
|
+
};
|
|
9447
|
+
/** @returns {DiscountRuleOffer} */
|
|
9448
|
+
declare function DiscountRuleOffer(): DiscountRuleOffer;
|
|
9449
|
+
type DiscountRuleOffer = {
|
|
9450
|
+
/**
|
|
9451
|
+
* - Maximum discount amount in offer
|
|
9452
|
+
*/
|
|
9453
|
+
max_discount_amount?: number;
|
|
9454
|
+
/**
|
|
9455
|
+
* - Discount price in offer
|
|
9456
|
+
*/
|
|
9457
|
+
discount_price?: number;
|
|
9458
|
+
/**
|
|
9459
|
+
* - Flag to distribute discount for each article
|
|
9460
|
+
*/
|
|
9461
|
+
apportion_discount?: boolean;
|
|
9462
|
+
/**
|
|
9463
|
+
* - Flag indicated return the product partially
|
|
9464
|
+
*/
|
|
9465
|
+
partial_can_ret?: boolean;
|
|
9466
|
+
/**
|
|
9467
|
+
* - Maximum usage per transaction in offer
|
|
9468
|
+
*/
|
|
9469
|
+
max_usage_per_transaction?: number;
|
|
9470
|
+
/**
|
|
9471
|
+
* - Minimum quantity of offer in offer
|
|
9472
|
+
*/
|
|
9473
|
+
min_offer_quantity?: number;
|
|
9474
|
+
/**
|
|
9475
|
+
* - Discount amount in offer
|
|
9476
|
+
*/
|
|
9477
|
+
discount_amount?: number;
|
|
9478
|
+
/**
|
|
9479
|
+
* - Discount percentage in offer
|
|
9480
|
+
*/
|
|
9481
|
+
discount_percentage?: number;
|
|
9482
|
+
/**
|
|
9483
|
+
* - Maximum quantity of product in offer
|
|
9484
|
+
*/
|
|
9485
|
+
max_offer_quantity?: number;
|
|
9486
|
+
};
|
|
9487
|
+
/** @returns {OfferDiscountRule} */
|
|
9488
|
+
declare function OfferDiscountRule(): OfferDiscountRule;
|
|
9489
|
+
type OfferDiscountRule = {
|
|
9490
|
+
/**
|
|
9491
|
+
* - The type of discount in offer
|
|
9492
|
+
*/
|
|
9493
|
+
discount_type?: string;
|
|
9494
|
+
/**
|
|
9495
|
+
* - Points to buy rule in offer. One
|
|
9496
|
+
* discount rule can only point to one buy rule.
|
|
9497
|
+
*/
|
|
9498
|
+
buy_condition?: string;
|
|
9499
|
+
item_criteria?: OfferItemCriteria;
|
|
9500
|
+
offer?: DiscountRuleOffer;
|
|
9501
|
+
/**
|
|
9502
|
+
* - Flag is true then use coupon applicable
|
|
9503
|
+
* articles for calculation
|
|
9504
|
+
*/
|
|
9505
|
+
is_exact?: boolean;
|
|
9506
|
+
};
|
|
9507
|
+
/** @returns {OfferUsesRemaining} */
|
|
9508
|
+
declare function OfferUsesRemaining(): OfferUsesRemaining;
|
|
9509
|
+
type OfferUsesRemaining = {
|
|
9510
|
+
/**
|
|
9511
|
+
* - Define total offer count per user
|
|
9512
|
+
*/
|
|
9513
|
+
user?: number;
|
|
9514
|
+
/**
|
|
9515
|
+
* - Define total offer count
|
|
9516
|
+
*/
|
|
9517
|
+
total?: number;
|
|
9518
|
+
/**
|
|
9519
|
+
* - Define offer count associated with application id
|
|
9520
|
+
*/
|
|
9521
|
+
app?: number;
|
|
9522
|
+
};
|
|
9523
|
+
/** @returns {OfferUsesRestriction} */
|
|
9524
|
+
declare function OfferUsesRestriction(): OfferUsesRestriction;
|
|
9525
|
+
type OfferUsesRestriction = {
|
|
9526
|
+
maximum?: OfferUsesRemaining;
|
|
9527
|
+
remaining?: OfferUsesRemaining;
|
|
9528
|
+
};
|
|
9529
|
+
/** @returns {OfferRestrictionFulfillmentOptions} */
|
|
9530
|
+
declare function OfferRestrictionFulfillmentOptions(): OfferRestrictionFulfillmentOptions;
|
|
9531
|
+
type OfferRestrictionFulfillmentOptions = {
|
|
9532
|
+
/**
|
|
9533
|
+
* - Fulfillment option id
|
|
9534
|
+
*/
|
|
9535
|
+
fulfillment_slug: string;
|
|
9536
|
+
/**
|
|
9537
|
+
* - List of zones ids on which offer is applicable.
|
|
9538
|
+
*/
|
|
9539
|
+
zones?: string[];
|
|
9540
|
+
};
|
|
9541
|
+
/** @returns {OfferRestrictions} */
|
|
9542
|
+
declare function OfferRestrictions(): OfferRestrictions;
|
|
9543
|
+
type OfferRestrictions = {
|
|
9544
|
+
uses?: OfferUsesRestriction;
|
|
9545
|
+
post_order?: PostOrder;
|
|
9546
|
+
/**
|
|
9547
|
+
* - List of platform on which offer allowed
|
|
9548
|
+
* like web, android
|
|
9549
|
+
*/
|
|
9550
|
+
platforms?: string[];
|
|
9551
|
+
payments?: PaymentModes;
|
|
9552
|
+
/**
|
|
9553
|
+
* - List of store id on which offer is allowed
|
|
9554
|
+
*/
|
|
9555
|
+
ordering_stores?: number[];
|
|
9556
|
+
/**
|
|
9557
|
+
* - Prmomotion offer max order count
|
|
9558
|
+
*/
|
|
9559
|
+
order_quantity?: number;
|
|
9560
|
+
user?: OfferUser;
|
|
9561
|
+
/**
|
|
9562
|
+
* - Allow offer to be applied on
|
|
9563
|
+
* multiple stores
|
|
9564
|
+
*/
|
|
9565
|
+
multi_store_allowed?: boolean;
|
|
9566
|
+
/**
|
|
9567
|
+
* - List
|
|
9568
|
+
* of fulfillment options on which offer is applicable.
|
|
9569
|
+
*/
|
|
9570
|
+
fulfillment_options?: OfferRestrictionFulfillmentOptions[];
|
|
9571
|
+
};
|
|
9572
|
+
/** @returns {OfferDisplayMeta} */
|
|
9573
|
+
declare function OfferDisplayMeta(): OfferDisplayMeta;
|
|
9574
|
+
type OfferDisplayMeta = {
|
|
9575
|
+
/**
|
|
9576
|
+
* - Detail about the offers
|
|
9577
|
+
*/
|
|
9578
|
+
description: string;
|
|
9579
|
+
/**
|
|
9580
|
+
* - Coupon offer will be displayed or hidden
|
|
9581
|
+
* on UI based on this flag
|
|
9582
|
+
*/
|
|
9583
|
+
is_display?: boolean;
|
|
9584
|
+
/**
|
|
9585
|
+
* - Determines if coupon offer is publicaly
|
|
9586
|
+
* available or not
|
|
9587
|
+
*/
|
|
9588
|
+
is_public?: boolean;
|
|
9589
|
+
/**
|
|
9590
|
+
* - Name of offer that needs to display
|
|
9591
|
+
*/
|
|
9592
|
+
name: string;
|
|
9593
|
+
/**
|
|
9594
|
+
* - Promotion offer text used to display
|
|
9595
|
+
*/
|
|
9596
|
+
offer_text?: string;
|
|
9597
|
+
/**
|
|
9598
|
+
* - Offer label of promotion that needs to display
|
|
9599
|
+
*/
|
|
9600
|
+
offer_label?: string;
|
|
9601
|
+
/**
|
|
9602
|
+
* - Reason for offer rejection
|
|
9603
|
+
*/
|
|
9604
|
+
reason?: string;
|
|
9605
|
+
};
|
|
9606
|
+
/** @returns {OfferCouponConfiguration} */
|
|
9607
|
+
declare function OfferCouponConfiguration(): OfferCouponConfiguration;
|
|
9608
|
+
type OfferCouponConfiguration = {
|
|
9609
|
+
/**
|
|
9610
|
+
* - Total number of coupons to be generated
|
|
9611
|
+
* when coupon type is bulk
|
|
9612
|
+
*/
|
|
9613
|
+
coupon_count?: number;
|
|
9614
|
+
/**
|
|
9615
|
+
* - Bulk coupon code prefix string. All
|
|
9616
|
+
* coupons will be generated with this prefix.
|
|
9617
|
+
*/
|
|
9618
|
+
coupon_prefix?: string;
|
|
9619
|
+
/**
|
|
9620
|
+
* - The type of coupon like bulk or single.
|
|
9621
|
+
*/
|
|
9622
|
+
coupon_type: string;
|
|
9623
|
+
};
|
|
9624
|
+
/** @returns {OfferOwnership} */
|
|
9625
|
+
declare function OfferOwnership(): OfferOwnership;
|
|
9626
|
+
type OfferOwnership = {
|
|
9627
|
+
/**
|
|
9628
|
+
* - Promotion amount payable category
|
|
9629
|
+
*/
|
|
9630
|
+
payable_category: string;
|
|
9631
|
+
/**
|
|
9632
|
+
* - Promotion amount bearable party
|
|
9633
|
+
*/
|
|
9634
|
+
payable_by?: string;
|
|
9635
|
+
};
|
|
9636
|
+
/** @returns {OfferSchema} */
|
|
9637
|
+
declare function OfferSchema(): OfferSchema;
|
|
9638
|
+
type OfferSchema = {
|
|
9639
|
+
/**
|
|
9640
|
+
* - Unique identifier of offer. This will be auto
|
|
9641
|
+
* generated upon successful offer creation.
|
|
9642
|
+
*/
|
|
9643
|
+
_id?: string;
|
|
9644
|
+
/**
|
|
9645
|
+
* - Offer mode, like coupon or promotion
|
|
9646
|
+
*/
|
|
9647
|
+
mode: string;
|
|
9648
|
+
/**
|
|
9649
|
+
* - Indicates whether the offer is
|
|
9650
|
+
* automatically applied. This flag is false for coupons and true for
|
|
9651
|
+
* promotions. For free-gift promotions, a false value means manual gift
|
|
9652
|
+
* selection is required.
|
|
9653
|
+
*/
|
|
9654
|
+
auto_apply?: boolean;
|
|
9655
|
+
/**
|
|
9656
|
+
* - Application id through which offer was created.
|
|
9657
|
+
*/
|
|
9658
|
+
application_id?: string;
|
|
9659
|
+
/**
|
|
9660
|
+
* - Company id through which offer was created.
|
|
9661
|
+
*/
|
|
9662
|
+
company_id?: string;
|
|
9663
|
+
/**
|
|
9664
|
+
* - Discount rules based on
|
|
9665
|
+
* which offer will be applied
|
|
9666
|
+
*/
|
|
9667
|
+
discount_rules?: OfferDiscountRule[];
|
|
9668
|
+
/**
|
|
9669
|
+
* - Contains the individual buy rules associated
|
|
9670
|
+
* with the offer. The keys in this object are dynamic (e.g., 'rule#1',
|
|
9671
|
+
* 'rule#2', etc.), and each key must correspond to a buy condition referenced
|
|
9672
|
+
* within `discount_rules`. For example, if a discount rule includes a
|
|
9673
|
+
* buy_condition '(rule#1)', then 'rule#1' must be defined in this object.
|
|
9674
|
+
* Each rule key value must follow the format of OfferItemCriteria schema.
|
|
9675
|
+
*/
|
|
9676
|
+
buy_rules?: any;
|
|
9677
|
+
restrictions?: OfferRestrictions;
|
|
9678
|
+
display_meta: OfferDisplayMeta;
|
|
9679
|
+
ownership?: OfferOwnership;
|
|
9680
|
+
author?: OfferAuthor;
|
|
9681
|
+
date_meta?: OfferDateMeta;
|
|
9682
|
+
_schedule?: OfferSchedule;
|
|
9683
|
+
/**
|
|
9684
|
+
* - Set extra properties in offer
|
|
9685
|
+
*/
|
|
9686
|
+
_custom_json?: any;
|
|
9687
|
+
/**
|
|
9688
|
+
* - Boolean value set true to apply other
|
|
9689
|
+
* promotions as well.
|
|
9690
|
+
*/
|
|
9691
|
+
stackable?: boolean;
|
|
9692
|
+
/**
|
|
9693
|
+
* - Status of the offer
|
|
9694
|
+
*/
|
|
9695
|
+
status: string;
|
|
9696
|
+
/**
|
|
9697
|
+
* - Determines whether the offer is published to
|
|
9698
|
+
* customers or marked inactive
|
|
9699
|
+
*/
|
|
9700
|
+
published: boolean;
|
|
9701
|
+
/**
|
|
9702
|
+
* - Different types of offers available in the system.
|
|
9703
|
+
* This is used to determine the type of offer and the calculation of the
|
|
9704
|
+
* offer. Some types are mode specific, few examples are :> -
|
|
9705
|
+
* free_item_discount_absolute is only applicable for coupon mode -
|
|
9706
|
+
* contract_price, shipping_price, free_gift_items, cashback, free_items,
|
|
9707
|
+
* free_non_sellable_items, external_price_adjustment_discount, custom is only
|
|
9708
|
+
* applicable for promotion mode
|
|
9709
|
+
*/
|
|
9710
|
+
type: string;
|
|
9711
|
+
/**
|
|
9712
|
+
* - Defines the priority of the offer. Its
|
|
9713
|
+
* behavior varies based on the offer type. For coupons, a higher priority
|
|
9714
|
+
* value means the coupon will appear higher in the listing order. For
|
|
9715
|
+
* promotions, this value determines the sequence in which promotions are
|
|
9716
|
+
* evaluated and applied. Promotions are evaluated in descending order of
|
|
9717
|
+
* their effective priority. In case of conflicting priorities, the offer will
|
|
9718
|
+
* be prioritised on the basis of creation order (desc).
|
|
9719
|
+
*/
|
|
9720
|
+
priority?: number;
|
|
9721
|
+
/**
|
|
9722
|
+
* - Flag to determine if coupon is
|
|
9723
|
+
* exclusive. Exclusive coupon removes other applied offers from the cart. If
|
|
9724
|
+
* both `is_exclusive_coupon` and `apply_exclusive` are set,
|
|
9725
|
+
* `is_exclusive_coupon` takes priority for offer evaluation logic effectively
|
|
9726
|
+
* making the offer exclusive.
|
|
9727
|
+
*/
|
|
9728
|
+
is_exclusive_coupon?: boolean;
|
|
9729
|
+
/**
|
|
9730
|
+
* - Controls how this offer excludes other
|
|
9731
|
+
* offers when it is applied. When this offer is applied at cart level, no
|
|
9732
|
+
* other promotions are evaluated or applied for the same cart (it becomes the
|
|
9733
|
+
* only active promotion for that cart). When this offer is applied on
|
|
9734
|
+
* specific articles, those articles will not be eligible for any other
|
|
9735
|
+
* promotions, but other promotions can still apply to different articles in
|
|
9736
|
+
* the cart. If null, the offer follows the normal stacking rules and does not
|
|
9737
|
+
* enforce additional exclusivity.
|
|
9738
|
+
*/
|
|
9739
|
+
apply_exclusive?: string;
|
|
9740
|
+
/**
|
|
9741
|
+
* - Article Price on which offer is
|
|
9742
|
+
* calculated, like effective price or marked price. Only available for few
|
|
9743
|
+
* supported types lile Contract pricing and Ladder pricing.
|
|
9744
|
+
*/
|
|
9745
|
+
calculate_on?: string;
|
|
9746
|
+
/**
|
|
9747
|
+
* - The type of promotion group
|
|
9748
|
+
*/
|
|
9749
|
+
promo_group?: string;
|
|
9750
|
+
/**
|
|
9751
|
+
* - ISO 4217 currency code in which the offer's
|
|
9752
|
+
* discount amounts and calculations are specified (e.g., "INR", "USD",
|
|
9753
|
+
* "EUR"). This currency is used as the base currency for discount
|
|
9754
|
+
* calculations and currency conversions when applying the offer. If not
|
|
9755
|
+
* provided, defaults to the seller's default currency code. All discount
|
|
9756
|
+
* values in discount_rules are interpreted in this currency.
|
|
9757
|
+
*/
|
|
9758
|
+
currency?: string;
|
|
9759
|
+
/**
|
|
9760
|
+
* - Unique identifier code for the offer. For coupons
|
|
9761
|
+
* (i.e mode = "coupon"), this is the coupon code that users enter to apply
|
|
9762
|
+
* the offer (e.g., "SAVE20", "WELCOME50"). For promotions (mode =
|
|
9763
|
+
* "promotion"), this field is typically null or empty as promotions are
|
|
9764
|
+
* auto-applied. This code is used to fetch and identify offers when applying
|
|
9765
|
+
* them to carts. Must be unique within an application_id. For bulk coupons,
|
|
9766
|
+
* this is auto-generated based on coupon_config.coupon_prefix.
|
|
9767
|
+
*/
|
|
9768
|
+
code?: string;
|
|
9769
|
+
coupon_config?: OfferCouponConfiguration;
|
|
9770
|
+
/**
|
|
9771
|
+
* - Flag to verify if promotion is ready to
|
|
9772
|
+
* be applied on cart and ready to update promotion
|
|
9773
|
+
*/
|
|
9774
|
+
is_processed?: boolean;
|
|
9775
|
+
/**
|
|
9776
|
+
* - Flag to determine if any bank offer is applicable
|
|
9777
|
+
*/
|
|
9778
|
+
is_bank_offer?: boolean;
|
|
9779
|
+
};
|
|
9780
|
+
/** @returns {OfferPartialUpdate} */
|
|
9781
|
+
declare function OfferPartialUpdate(): OfferPartialUpdate;
|
|
9782
|
+
type OfferPartialUpdate = {
|
|
9783
|
+
schedule?: PromotionSchedule;
|
|
9784
|
+
};
|
|
9785
|
+
/** @returns {OfferAuthor} */
|
|
9786
|
+
declare function OfferAuthor(): OfferAuthor;
|
|
9787
|
+
type OfferAuthor = {
|
|
9788
|
+
/**
|
|
9789
|
+
* - The user id of user, who has created the offer
|
|
9790
|
+
*/
|
|
9791
|
+
created_by?: string;
|
|
9792
|
+
/**
|
|
9793
|
+
* - The user id of user, who has modified the offer
|
|
9794
|
+
*/
|
|
9795
|
+
modified_by?: string;
|
|
9796
|
+
/**
|
|
9797
|
+
* - The user id of user, who has approved the offer
|
|
9798
|
+
*/
|
|
9799
|
+
approved_by?: string;
|
|
9800
|
+
/**
|
|
9801
|
+
* - The user id of user, who has rejected the offer
|
|
9802
|
+
*/
|
|
9803
|
+
rejected_by?: string;
|
|
9804
|
+
};
|
|
9805
|
+
/** @returns {OfferDateMeta} */
|
|
9806
|
+
declare function OfferDateMeta(): OfferDateMeta;
|
|
9807
|
+
type OfferDateMeta = {
|
|
9808
|
+
/**
|
|
9809
|
+
* - Date time format when the offer last modified
|
|
9810
|
+
*/
|
|
9811
|
+
modified_on?: string;
|
|
9812
|
+
/**
|
|
9813
|
+
* - Date time format when the offer created
|
|
9814
|
+
*/
|
|
9815
|
+
created_on?: string;
|
|
9816
|
+
/**
|
|
9817
|
+
* - Date time format when the offer approved
|
|
9818
|
+
*/
|
|
9819
|
+
approved_on?: string;
|
|
9820
|
+
/**
|
|
9821
|
+
* - Date time format when the offer rejected
|
|
9822
|
+
*/
|
|
9823
|
+
rejected_on?: string;
|
|
9824
|
+
};
|
|
9825
|
+
/** @returns {NextScheduleItems} */
|
|
9826
|
+
declare function NextScheduleItems(): NextScheduleItems;
|
|
9827
|
+
type NextScheduleItems = {
|
|
9828
|
+
/**
|
|
9829
|
+
* - Start date of schedule
|
|
9830
|
+
*/
|
|
9831
|
+
start?: string;
|
|
9832
|
+
/**
|
|
9833
|
+
* - End date of schedule
|
|
9834
|
+
*/
|
|
9835
|
+
end?: string;
|
|
9836
|
+
};
|
|
9837
|
+
/** @returns {OfferSchedule} */
|
|
9838
|
+
declare function OfferSchedule(): OfferSchedule;
|
|
9839
|
+
type OfferSchedule = {
|
|
9840
|
+
/**
|
|
9841
|
+
* - The end date and time until which the offer remains valid.
|
|
9842
|
+
*/
|
|
9843
|
+
end: string;
|
|
9844
|
+
/**
|
|
9845
|
+
* - The start date and time from which the offer becomes valid.
|
|
9846
|
+
*/
|
|
9847
|
+
start: string;
|
|
9848
|
+
/**
|
|
9849
|
+
* - A auto generated list of
|
|
9850
|
+
* date-time entries based on start, end, cron and duration data on which the
|
|
9851
|
+
* offer is scheduled to activate in the future.
|
|
9852
|
+
*/
|
|
9853
|
+
next_schedule?: NextScheduleItems[];
|
|
9854
|
+
/**
|
|
9855
|
+
* - A cron expression used to schedule the offer to
|
|
9856
|
+
* activate periodically. When cron is null or not provided, duration is optional.
|
|
9857
|
+
*/
|
|
9858
|
+
cron?: string;
|
|
9859
|
+
/**
|
|
9860
|
+
* - Duration of the offer activation in seconds.
|
|
9861
|
+
* Mandatory when cron is provided.
|
|
9862
|
+
*/
|
|
9863
|
+
duration?: number;
|
|
9864
|
+
};
|
|
9865
|
+
/** @returns {OfferListItem} */
|
|
9866
|
+
declare function OfferListItem(): OfferListItem;
|
|
9867
|
+
type OfferListItem = {
|
|
9868
|
+
/**
|
|
9869
|
+
* - Offer mode, like coupon or promotion
|
|
9870
|
+
*/
|
|
9871
|
+
mode?: string;
|
|
9872
|
+
/**
|
|
9873
|
+
* - Type of the offer
|
|
9874
|
+
*/
|
|
9875
|
+
type?: string;
|
|
9876
|
+
/**
|
|
9877
|
+
* - Status of the offer
|
|
9878
|
+
*/
|
|
9879
|
+
status?: string;
|
|
9880
|
+
/**
|
|
9881
|
+
* - Determines whether the offer is published
|
|
9882
|
+
* to customers or marked inactive
|
|
9883
|
+
*/
|
|
9884
|
+
published?: boolean;
|
|
9885
|
+
display_meta?: OfferDisplayMeta;
|
|
9886
|
+
author?: OfferAuthor;
|
|
9887
|
+
date_meta?: OfferDateMeta;
|
|
9888
|
+
schedule?: OfferSchedule;
|
|
9889
|
+
};
|
|
9890
|
+
/** @returns {OfferListResult} */
|
|
9891
|
+
declare function OfferListResult(): OfferListResult;
|
|
9892
|
+
type OfferListResult = {
|
|
9893
|
+
/**
|
|
9894
|
+
* - List of offers
|
|
9895
|
+
*/
|
|
9896
|
+
items?: OfferListItem[];
|
|
9897
|
+
page?: Page;
|
|
9898
|
+
};
|