@gofynd/fdk-client-javascript 3.4.0 → 3.4.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.
Files changed (31) hide show
  1. package/README.md +23 -26
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +3 -2
  4. package/sdk/application/ApplicationClient.js +25 -19
  5. package/sdk/common/utils.js +6 -3
  6. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +111 -43
  7. package/sdk/partner/Logistics/LogisticsPartnerModel.js +65 -33
  8. package/sdk/partner/PartnerClient.d.ts +5 -2
  9. package/sdk/partner/PartnerClient.js +21 -7
  10. package/sdk/platform/Cart/CartPlatformModel.d.ts +181 -10
  11. package/sdk/platform/Cart/CartPlatformModel.js +95 -8
  12. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +40 -1
  13. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +260 -1
  14. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +68 -1
  15. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +49 -0
  16. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +26 -1
  17. package/sdk/platform/Catalog/CatalogPlatformModel.js +27 -0
  18. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +2 -0
  19. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +2 -0
  20. package/sdk/platform/Content/ContentPlatformModel.d.ts +14 -19
  21. package/sdk/platform/Content/ContentPlatformModel.js +6 -20
  22. package/sdk/platform/Order/OrderPlatformModel.d.ts +218 -17
  23. package/sdk/platform/Order/OrderPlatformModel.js +366 -14
  24. package/sdk/platform/Order/OrderPlatformValidator.d.ts +15 -15
  25. package/sdk/platform/Order/OrderPlatformValidator.js +9 -9
  26. package/sdk/platform/PlatformClient.d.ts +5 -2
  27. package/sdk/platform/PlatformClient.js +32 -18
  28. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +50 -4
  29. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +22 -2
  30. package/sdk/public/PublicClient.d.ts +3 -2
  31. package/sdk/public/PublicClient.js +13 -7
@@ -10,6 +10,7 @@ const Webhook = require("./Webhook/WebhookPartnerClient");
10
10
 
11
11
  const { FDKClientValidationError } = require("../common/FDKError");
12
12
  const { execute } = require("./PartnerAPIClient");
13
+ const PartnerConfig = require("./PartnerConfig");
13
14
 
14
15
  /**
15
16
  * Represents the client for the partner APIs.
@@ -23,13 +24,18 @@ class PartnerClient {
23
24
  * @param {import("./PartnerConfig")} config - The configuration for the
24
25
  * partner client.
25
26
  */
26
- constructor(config) {
27
- this.config = config;
28
- this.fileStorage = new FileStorage(config);
29
- this.lead = new Lead(config);
30
- this.logistics = new Logistics(config);
31
- this.theme = new Theme(config);
32
- this.webhook = new Webhook(config);
27
+ constructor(config, options) {
28
+ if (config instanceof PartnerConfig) {
29
+ this.config = config;
30
+ } else {
31
+ let partnerConfig = new PartnerConfig(config, options);
32
+ this.config = partnerConfig;
33
+ }
34
+ this.fileStorage = new FileStorage(this.config);
35
+ this.lead = new Lead(this.config);
36
+ this.logistics = new Logistics(this.config);
37
+ this.theme = new Theme(this.config);
38
+ this.webhook = new Webhook(this.config);
33
39
  }
34
40
 
35
41
  /**
@@ -58,6 +64,14 @@ class PartnerClient {
58
64
  responseHeaders,
59
65
  });
60
66
  }
67
+
68
+ getAccesstokenObj(options) {
69
+ return this.config.oauthClient.getAccesstokenObj(options);
70
+ }
71
+
72
+ setToken(token) {
73
+ this.config.oauthClient.setToken(token);
74
+ }
61
75
  }
62
76
 
63
77
  module.exports = PartnerClient;
@@ -321,6 +321,57 @@ export = CartPlatformModel;
321
321
  * which promotion is not applicable
322
322
  * @property {string[]} [item_sku] - List of all item sku on which promotion is applicable
323
323
  */
324
+ /**
325
+ * @typedef BuyRuleItemCriteria
326
+ * @property {CompareObject} [cart_quantity]
327
+ * @property {string[]} [available_zones] - List of all zones on which promotion
328
+ * is applicable
329
+ * @property {number[]} [item_exclude_company] - List of all company id on which
330
+ * promotion is not applicable
331
+ * @property {number[]} [item_id] - List of all item ids on which promotion is applicable
332
+ * @property {number[]} [item_l1_category] - List of all L1 category on which
333
+ * promotion is applicable
334
+ * @property {CompareObject} [cart_total]
335
+ * @property {CompareObject} [cart_unique_item_quantity]
336
+ * @property {CompareObject} [cart_unique_item_amount]
337
+ * @property {number[]} [item_exclude_id] - List of all item ids on which
338
+ * promotion is not applicable
339
+ * @property {boolean} [all_items] - Boolean flag set true to applicable the
340
+ * promotion for all products
341
+ * @property {number[]} [item_exclude_l1_category] - List of all item ids on
342
+ * which promotion is not applicable
343
+ * @property {string[]} [item_size] - List of all item sizes on which promotion
344
+ * is applicable
345
+ * @property {number[]} [item_store] - List of all item store ids on which
346
+ * promotion is applicable
347
+ * @property {string[]} [item_exclude_sku] - List of all item sku on which
348
+ * promotion is not applicable
349
+ * @property {number[]} [item_department] - List of all departments ids on which
350
+ * promotion is applicable
351
+ * @property {number[]} [item_exclude_store] - List of all item store ids on
352
+ * which promotion is not applicable
353
+ * @property {number[]} [item_brand] - List of all brand ids on which promotion
354
+ * is applicable
355
+ * @property {number[]} [item_exclude_department] - List of all department ids
356
+ * on which promotion is not applicable
357
+ * @property {number[]} [item_exclude_category] - List of all L3 category on
358
+ * which promotion is not applicable
359
+ * @property {number[]} [item_category] - List of all L3 category on which
360
+ * promotion is applicable
361
+ * @property {string[]} [buy_rules]
362
+ * @property {number[]} [item_exclude_brand] - List of all brand ids on which
363
+ * promotion is not applicable
364
+ * @property {number[]} [item_l2_category] - List of all L2 category on which
365
+ * promotion is applicable
366
+ * @property {number[]} [item_company] - List of all company ids on which
367
+ * promotion is applicable
368
+ * @property {string[]} [item_tags] - List of all product tags on which
369
+ * promotion is applicable
370
+ * @property {number[]} [item_exclude_l2_category] - List of all L2 category on
371
+ * which promotion is not applicable
372
+ * @property {string[]} [item_sku] - List of all item sku on which promotion is applicable
373
+ * @property {ItemSizeMapping} [meta]
374
+ */
324
375
  /**
325
376
  * @typedef DiscountOffer
326
377
  * @property {number} [max_discount_amount] - Maximum discount amount in promotion
@@ -495,7 +546,7 @@ export = CartPlatformModel;
495
546
  * @property {PromotionAuthor} [author]
496
547
  * @property {Visibility} [visiblility]
497
548
  * @property {string} application_id - Current application id of sales channel
498
- * @property {ItemCriteria} [buy_rules]
549
+ * @property {BuyRuleItemCriteria} [buy_rules]
499
550
  * @property {Object} [_custom_json] - Set extra properties in promotion
500
551
  * @property {PromotionDateMeta} [date_meta]
501
552
  * @property {string[]} [tags] - List of tags applicable for promotion
@@ -599,7 +650,7 @@ export = CartPlatformModel;
599
650
  * @property {PromotionAuthor} [author]
600
651
  * @property {Visibility} [visiblility]
601
652
  * @property {string} application_id - Current application id of sales channel
602
- * @property {ItemCriteria} [buy_rules]
653
+ * @property {BuyRuleItemCriteria} [buy_rules]
603
654
  * @property {Object} [_custom_json] - Set extra properties in promotion
604
655
  * @property {PromotionDateMeta} [date_meta]
605
656
  * @property {string[]} [tags] - List of tags applicable for promotion
@@ -1199,7 +1250,7 @@ export = CartPlatformModel;
1199
1250
  * @property {string} [state] - State of the address
1200
1251
  * @property {string} [city] - City of the address
1201
1252
  * @property {number} [phone] - Phone number for address
1202
- * @property {string} area_code - Area code of the address
1253
+ * @property {string} [area_code] - Area code of the address
1203
1254
  * @property {string} [country_iso_code] - Country iso code for address
1204
1255
  * @property {string} [country_phone_code] - Country phone code for address
1205
1256
  * @property {Object} [meta] - Metadata of the address
@@ -1708,7 +1759,8 @@ export = CartPlatformModel;
1708
1759
  */
1709
1760
  /**
1710
1761
  * @typedef UpdateUserCartMapping
1711
- * @property {string} user_id - User Id of user for which we map with the cart
1762
+ * @property {string} [user_id] - Customer user ID to associate with the cart.
1763
+ * Send null to remove existing mapping of customer from cart.
1712
1764
  */
1713
1765
  /**
1714
1766
  * @typedef UserInfo
@@ -2408,7 +2460,7 @@ export = CartPlatformModel;
2408
2460
  declare class CartPlatformModel {
2409
2461
  }
2410
2462
  declare namespace CartPlatformModel {
2411
- 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, 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 };
2463
+ 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 };
2412
2464
  }
2413
2465
  /** @returns {CouponDateMeta} */
2414
2466
  declare function CouponDateMeta(): CouponDateMeta;
@@ -3180,6 +3232,124 @@ type ItemCriteria = {
3180
3232
  */
3181
3233
  item_sku?: string[];
3182
3234
  };
3235
+ /** @returns {BuyRuleItemCriteria} */
3236
+ declare function BuyRuleItemCriteria(): BuyRuleItemCriteria;
3237
+ type BuyRuleItemCriteria = {
3238
+ cart_quantity?: CompareObject;
3239
+ /**
3240
+ * - List of all zones on which promotion
3241
+ * is applicable
3242
+ */
3243
+ available_zones?: string[];
3244
+ /**
3245
+ * - List of all company id on which
3246
+ * promotion is not applicable
3247
+ */
3248
+ item_exclude_company?: number[];
3249
+ /**
3250
+ * - List of all item ids on which promotion is applicable
3251
+ */
3252
+ item_id?: number[];
3253
+ /**
3254
+ * - List of all L1 category on which
3255
+ * promotion is applicable
3256
+ */
3257
+ item_l1_category?: number[];
3258
+ cart_total?: CompareObject;
3259
+ cart_unique_item_quantity?: CompareObject;
3260
+ cart_unique_item_amount?: CompareObject;
3261
+ /**
3262
+ * - List of all item ids on which
3263
+ * promotion is not applicable
3264
+ */
3265
+ item_exclude_id?: number[];
3266
+ /**
3267
+ * - Boolean flag set true to applicable the
3268
+ * promotion for all products
3269
+ */
3270
+ all_items?: boolean;
3271
+ /**
3272
+ * - List of all item ids on
3273
+ * which promotion is not applicable
3274
+ */
3275
+ item_exclude_l1_category?: number[];
3276
+ /**
3277
+ * - List of all item sizes on which promotion
3278
+ * is applicable
3279
+ */
3280
+ item_size?: string[];
3281
+ /**
3282
+ * - List of all item store ids on which
3283
+ * promotion is applicable
3284
+ */
3285
+ item_store?: number[];
3286
+ /**
3287
+ * - List of all item sku on which
3288
+ * promotion is not applicable
3289
+ */
3290
+ item_exclude_sku?: string[];
3291
+ /**
3292
+ * - List of all departments ids on which
3293
+ * promotion is applicable
3294
+ */
3295
+ item_department?: number[];
3296
+ /**
3297
+ * - List of all item store ids on
3298
+ * which promotion is not applicable
3299
+ */
3300
+ item_exclude_store?: number[];
3301
+ /**
3302
+ * - List of all brand ids on which promotion
3303
+ * is applicable
3304
+ */
3305
+ item_brand?: number[];
3306
+ /**
3307
+ * - List of all department ids
3308
+ * on which promotion is not applicable
3309
+ */
3310
+ item_exclude_department?: number[];
3311
+ /**
3312
+ * - List of all L3 category on
3313
+ * which promotion is not applicable
3314
+ */
3315
+ item_exclude_category?: number[];
3316
+ /**
3317
+ * - List of all L3 category on which
3318
+ * promotion is applicable
3319
+ */
3320
+ item_category?: number[];
3321
+ buy_rules?: string[];
3322
+ /**
3323
+ * - List of all brand ids on which
3324
+ * promotion is not applicable
3325
+ */
3326
+ item_exclude_brand?: number[];
3327
+ /**
3328
+ * - List of all L2 category on which
3329
+ * promotion is applicable
3330
+ */
3331
+ item_l2_category?: number[];
3332
+ /**
3333
+ * - List of all company ids on which
3334
+ * promotion is applicable
3335
+ */
3336
+ item_company?: number[];
3337
+ /**
3338
+ * - List of all product tags on which
3339
+ * promotion is applicable
3340
+ */
3341
+ item_tags?: string[];
3342
+ /**
3343
+ * - List of all L2 category on
3344
+ * which promotion is not applicable
3345
+ */
3346
+ item_exclude_l2_category?: number[];
3347
+ /**
3348
+ * - List of all item sku on which promotion is applicable
3349
+ */
3350
+ item_sku?: string[];
3351
+ meta?: ItemSizeMapping;
3352
+ };
3183
3353
  /** @returns {DiscountOffer} */
3184
3354
  declare function DiscountOffer(): DiscountOffer;
3185
3355
  type DiscountOffer = {
@@ -3605,7 +3775,7 @@ type PromotionAdd = {
3605
3775
  * - Current application id of sales channel
3606
3776
  */
3607
3777
  application_id: string;
3608
- buy_rules?: ItemCriteria;
3778
+ buy_rules?: BuyRuleItemCriteria;
3609
3779
  /**
3610
3780
  * - Set extra properties in promotion
3611
3781
  */
@@ -3859,7 +4029,7 @@ type PromotionUpdateResult = {
3859
4029
  * - Current application id of sales channel
3860
4030
  */
3861
4031
  application_id: string;
3862
- buy_rules?: ItemCriteria;
4032
+ buy_rules?: BuyRuleItemCriteria;
3863
4033
  /**
3864
4034
  * - Set extra properties in promotion
3865
4035
  */
@@ -5337,7 +5507,7 @@ type ShippingAddress = {
5337
5507
  /**
5338
5508
  * - Area code of the address
5339
5509
  */
5340
- area_code: string;
5510
+ area_code?: string;
5341
5511
  /**
5342
5512
  * - Country iso code for address
5343
5513
  */
@@ -6702,9 +6872,10 @@ type MultiCartResult = {
6702
6872
  declare function UpdateUserCartMapping(): UpdateUserCartMapping;
6703
6873
  type UpdateUserCartMapping = {
6704
6874
  /**
6705
- * - User Id of user for which we map with the cart
6875
+ * - Customer user ID to associate with the cart.
6876
+ * Send null to remove existing mapping of customer from cart.
6706
6877
  */
6707
- user_id: string;
6878
+ user_id?: string;
6708
6879
  };
6709
6880
  /** @returns {UserInfo} */
6710
6881
  declare function UserInfo(): UserInfo;
@@ -356,6 +356,58 @@ const Joi = require("joi");
356
356
  * @property {string[]} [item_sku] - List of all item sku on which promotion is applicable
357
357
  */
358
358
 
359
+ /**
360
+ * @typedef BuyRuleItemCriteria
361
+ * @property {CompareObject} [cart_quantity]
362
+ * @property {string[]} [available_zones] - List of all zones on which promotion
363
+ * is applicable
364
+ * @property {number[]} [item_exclude_company] - List of all company id on which
365
+ * promotion is not applicable
366
+ * @property {number[]} [item_id] - List of all item ids on which promotion is applicable
367
+ * @property {number[]} [item_l1_category] - List of all L1 category on which
368
+ * promotion is applicable
369
+ * @property {CompareObject} [cart_total]
370
+ * @property {CompareObject} [cart_unique_item_quantity]
371
+ * @property {CompareObject} [cart_unique_item_amount]
372
+ * @property {number[]} [item_exclude_id] - List of all item ids on which
373
+ * promotion is not applicable
374
+ * @property {boolean} [all_items] - Boolean flag set true to applicable the
375
+ * promotion for all products
376
+ * @property {number[]} [item_exclude_l1_category] - List of all item ids on
377
+ * which promotion is not applicable
378
+ * @property {string[]} [item_size] - List of all item sizes on which promotion
379
+ * is applicable
380
+ * @property {number[]} [item_store] - List of all item store ids on which
381
+ * promotion is applicable
382
+ * @property {string[]} [item_exclude_sku] - List of all item sku on which
383
+ * promotion is not applicable
384
+ * @property {number[]} [item_department] - List of all departments ids on which
385
+ * promotion is applicable
386
+ * @property {number[]} [item_exclude_store] - List of all item store ids on
387
+ * which promotion is not applicable
388
+ * @property {number[]} [item_brand] - List of all brand ids on which promotion
389
+ * is applicable
390
+ * @property {number[]} [item_exclude_department] - List of all department ids
391
+ * on which promotion is not applicable
392
+ * @property {number[]} [item_exclude_category] - List of all L3 category on
393
+ * which promotion is not applicable
394
+ * @property {number[]} [item_category] - List of all L3 category on which
395
+ * promotion is applicable
396
+ * @property {string[]} [buy_rules]
397
+ * @property {number[]} [item_exclude_brand] - List of all brand ids on which
398
+ * promotion is not applicable
399
+ * @property {number[]} [item_l2_category] - List of all L2 category on which
400
+ * promotion is applicable
401
+ * @property {number[]} [item_company] - List of all company ids on which
402
+ * promotion is applicable
403
+ * @property {string[]} [item_tags] - List of all product tags on which
404
+ * promotion is applicable
405
+ * @property {number[]} [item_exclude_l2_category] - List of all L2 category on
406
+ * which promotion is not applicable
407
+ * @property {string[]} [item_sku] - List of all item sku on which promotion is applicable
408
+ * @property {ItemSizeMapping} [meta]
409
+ */
410
+
359
411
  /**
360
412
  * @typedef DiscountOffer
361
413
  * @property {number} [max_discount_amount] - Maximum discount amount in promotion
@@ -546,7 +598,7 @@ const Joi = require("joi");
546
598
  * @property {PromotionAuthor} [author]
547
599
  * @property {Visibility} [visiblility]
548
600
  * @property {string} application_id - Current application id of sales channel
549
- * @property {ItemCriteria} [buy_rules]
601
+ * @property {BuyRuleItemCriteria} [buy_rules]
550
602
  * @property {Object} [_custom_json] - Set extra properties in promotion
551
603
  * @property {PromotionDateMeta} [date_meta]
552
604
  * @property {string[]} [tags] - List of tags applicable for promotion
@@ -653,7 +705,7 @@ const Joi = require("joi");
653
705
  * @property {PromotionAuthor} [author]
654
706
  * @property {Visibility} [visiblility]
655
707
  * @property {string} application_id - Current application id of sales channel
656
- * @property {ItemCriteria} [buy_rules]
708
+ * @property {BuyRuleItemCriteria} [buy_rules]
657
709
  * @property {Object} [_custom_json] - Set extra properties in promotion
658
710
  * @property {PromotionDateMeta} [date_meta]
659
711
  * @property {string[]} [tags] - List of tags applicable for promotion
@@ -1315,7 +1367,7 @@ const Joi = require("joi");
1315
1367
  * @property {string} [state] - State of the address
1316
1368
  * @property {string} [city] - City of the address
1317
1369
  * @property {number} [phone] - Phone number for address
1318
- * @property {string} area_code - Area code of the address
1370
+ * @property {string} [area_code] - Area code of the address
1319
1371
  * @property {string} [country_iso_code] - Country iso code for address
1320
1372
  * @property {string} [country_phone_code] - Country phone code for address
1321
1373
  * @property {Object} [meta] - Metadata of the address
@@ -1863,7 +1915,8 @@ const Joi = require("joi");
1863
1915
 
1864
1916
  /**
1865
1917
  * @typedef UpdateUserCartMapping
1866
- * @property {string} user_id - User Id of user for which we map with the cart
1918
+ * @property {string} [user_id] - Customer user ID to associate with the cart.
1919
+ * Send null to remove existing mapping of customer from cart.
1867
1920
  */
1868
1921
 
1869
1922
  /**
@@ -3006,6 +3059,40 @@ class CartPlatformModel {
3006
3059
  });
3007
3060
  }
3008
3061
 
3062
+ /** @returns {BuyRuleItemCriteria} */
3063
+ static BuyRuleItemCriteria() {
3064
+ return Joi.object({
3065
+ cart_quantity: CartPlatformModel.CompareObject(),
3066
+ available_zones: Joi.array().items(Joi.string().allow("")),
3067
+ item_exclude_company: Joi.array().items(Joi.number()),
3068
+ item_id: Joi.array().items(Joi.number()),
3069
+ item_l1_category: Joi.array().items(Joi.number()),
3070
+ cart_total: CartPlatformModel.CompareObject(),
3071
+ cart_unique_item_quantity: CartPlatformModel.CompareObject(),
3072
+ cart_unique_item_amount: CartPlatformModel.CompareObject(),
3073
+ item_exclude_id: Joi.array().items(Joi.number()),
3074
+ all_items: Joi.boolean(),
3075
+ item_exclude_l1_category: Joi.array().items(Joi.number()),
3076
+ item_size: Joi.array().items(Joi.string().allow("")),
3077
+ item_store: Joi.array().items(Joi.number()),
3078
+ item_exclude_sku: Joi.array().items(Joi.string().allow("")),
3079
+ item_department: Joi.array().items(Joi.number()),
3080
+ item_exclude_store: Joi.array().items(Joi.number()),
3081
+ item_brand: Joi.array().items(Joi.number()),
3082
+ item_exclude_department: Joi.array().items(Joi.number()),
3083
+ item_exclude_category: Joi.array().items(Joi.number()),
3084
+ item_category: Joi.array().items(Joi.number()),
3085
+ buy_rules: Joi.array().items(Joi.string().allow("")),
3086
+ item_exclude_brand: Joi.array().items(Joi.number()),
3087
+ item_l2_category: Joi.array().items(Joi.number()),
3088
+ item_company: Joi.array().items(Joi.number()),
3089
+ item_tags: Joi.array().items(Joi.string().allow("")),
3090
+ item_exclude_l2_category: Joi.array().items(Joi.number()),
3091
+ item_sku: Joi.array().items(Joi.string().allow("")),
3092
+ meta: CartPlatformModel.ItemSizeMapping(),
3093
+ });
3094
+ }
3095
+
3009
3096
  /** @returns {DiscountOffer} */
3010
3097
  static DiscountOffer() {
3011
3098
  return Joi.object({
@@ -3212,7 +3299,7 @@ class CartPlatformModel {
3212
3299
  author: CartPlatformModel.PromotionAuthor(),
3213
3300
  visiblility: CartPlatformModel.Visibility(),
3214
3301
  application_id: Joi.string().allow("").required(),
3215
- buy_rules: CartPlatformModel.ItemCriteria(),
3302
+ buy_rules: CartPlatformModel.BuyRuleItemCriteria(),
3216
3303
  _custom_json: Joi.object().pattern(/\S/, Joi.any()),
3217
3304
  date_meta: CartPlatformModel.PromotionDateMeta(),
3218
3305
  tags: Joi.array().items(Joi.string().allow("")),
@@ -3306,7 +3393,7 @@ class CartPlatformModel {
3306
3393
  author: CartPlatformModel.PromotionAuthor(),
3307
3394
  visiblility: CartPlatformModel.Visibility(),
3308
3395
  application_id: Joi.string().allow("").required(),
3309
- buy_rules: CartPlatformModel.ItemCriteria(),
3396
+ buy_rules: CartPlatformModel.BuyRuleItemCriteria(),
3310
3397
  _custom_json: Joi.object().pattern(/\S/, Joi.any()),
3311
3398
  date_meta: CartPlatformModel.PromotionDateMeta(),
3312
3399
  tags: Joi.array().items(Joi.string().allow("")),
@@ -4005,7 +4092,7 @@ class CartPlatformModel {
4005
4092
  state: Joi.string().allow("").allow(null),
4006
4093
  city: Joi.string().allow("").allow(null),
4007
4094
  phone: Joi.number(),
4008
- area_code: Joi.string().allow("").required(),
4095
+ area_code: Joi.string().allow(""),
4009
4096
  country_iso_code: Joi.string().allow(""),
4010
4097
  country_phone_code: Joi.string().allow(""),
4011
4098
  meta: Joi.object().pattern(/\S/, Joi.any()),
@@ -4555,7 +4642,7 @@ class CartPlatformModel {
4555
4642
  /** @returns {UpdateUserCartMapping} */
4556
4643
  static UpdateUserCartMapping() {
4557
4644
  return Joi.object({
4558
- user_id: Joi.string().allow("").required(),
4645
+ user_id: Joi.string().allow("").allow(null),
4559
4646
  });
4560
4647
  }
4561
4648
 
@@ -231,6 +231,19 @@ declare class Catalog {
231
231
  * @description: Delete a search keywords by its id for a specific company and sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/deleteSearchKeywords/).
232
232
  */
233
233
  deleteSearchKeywords({ id, requestHeaders }?: CatalogPlatformApplicationValidator.DeleteSearchKeywordsParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.DeleteResponseSchema>;
234
+ /**
235
+ * @param {CatalogPlatformApplicationValidator.FollowProductByIdParam} arg
236
+ * - Arg object
237
+ *
238
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
239
+ * @param {import("../PlatformAPIClient").Options} - Options
240
+ * @returns {Promise<CatalogPlatformModel.FollowProduct>} - Success response
241
+ * @name followProductById
242
+ * @summary: Follow a Specific Product by ID
243
+ * @description: This endpoint enables a user to follow a specific product identified by its unique item ID for a sales channel.
244
+ * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/followProductById/).
245
+ */
246
+ followProductById({ userId, itemId, requestHeaders }?: CatalogPlatformApplicationValidator.FollowProductByIdParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.FollowProduct>;
234
247
  /**
235
248
  * @param {CatalogPlatformApplicationValidator.GetAllCollectionsParam} arg
236
249
  * - Arg object
@@ -758,7 +771,7 @@ declare class Catalog {
758
771
  * @summary: Get configuration
759
772
  * @description: Retrieve configuration details based on a specific type in the catalog for a company and an sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getConfigurationByType/).
760
773
  */
761
- getConfigurationByType({ type, requestHeaders }?: CatalogPlatformApplicationValidator.GetConfigurationByTypeParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.GetAppCatalogEntityConfiguration>;
774
+ getConfigurationByType({ type, includeInactive, requestHeaders }?: CatalogPlatformApplicationValidator.GetConfigurationByTypeParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.GetAppCatalogEntityConfiguration>;
762
775
  /**
763
776
  * @param {CatalogPlatformApplicationValidator.GetConfigurationMetadataParam} arg
764
777
  * - Arg object
@@ -836,6 +849,19 @@ declare class Catalog {
836
849
  pageSize?: number;
837
850
  locationIds?: number[];
838
851
  }): Paginator<CatalogPlatformModel.ApplicationInventorySellerIdentifierResponsePaginated>;
852
+ /**
853
+ * @param {CatalogPlatformApplicationValidator.GetFollowedProductsParam} arg
854
+ * - Arg object
855
+ *
856
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
857
+ * @param {import("../PlatformAPIClient").Options} - Options
858
+ * @returns {Promise<CatalogPlatformModel.FollowedProducts>} - Success response
859
+ * @name getFollowedProducts
860
+ * @summary: Retrieve followed products by user
861
+ * @description: List all product ids a user has wishlisted or is following for sales channel.
862
+ * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getFollowedProducts/).
863
+ */
864
+ getFollowedProducts({ userId, pageId, pageSize, requestHeaders }?: CatalogPlatformApplicationValidator.GetFollowedProductsParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.FollowedProducts>;
839
865
  /**
840
866
  * @param {CatalogPlatformApplicationValidator.GetGroupConfigurationsParam} arg
841
867
  * - Arg object
@@ -911,6 +937,19 @@ declare class Catalog {
911
937
  * @description: Retrieve a list of a specific list of keywords by its id for a specific company and sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/getSearchKeywords/).
912
938
  */
913
939
  getSearchKeywords({ id, requestHeaders }?: CatalogPlatformApplicationValidator.GetSearchKeywordsParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.GetSearchWordsDetailResponseSchema>;
940
+ /**
941
+ * @param {CatalogPlatformApplicationValidator.UnfollowProductByIdParam} arg
942
+ * - Arg object
943
+ *
944
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
945
+ * @param {import("../PlatformAPIClient").Options} - Options
946
+ * @returns {Promise<CatalogPlatformModel.FollowProduct>} - Success response
947
+ * @name unfollowProductById
948
+ * @summary: Unfollow a Specific Product by ID
949
+ * @description: This endpoint allows a user to unfollow a previously followed product using its unique item ID for a sales channel.
950
+ * - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/unfollowProductById/).
951
+ */
952
+ unfollowProductById({ userId, itemId, requestHeaders }?: CatalogPlatformApplicationValidator.UnfollowProductByIdParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.FollowProduct>;
914
953
  /**
915
954
  * @param {CatalogPlatformApplicationValidator.UpdateAllowSingleParam} arg
916
955
  * - Arg object