@gofynd/fdk-client-javascript 1.3.10-beta.2 → 1.3.10-beta.3

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 CHANGED
@@ -214,7 +214,7 @@ console.log("Active Theme: ", response.information.name);
214
214
  The above code will log the curl command in the console
215
215
 
216
216
  ```bash
217
- curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.3.10-beta.2' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
217
+ curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 1.3.10-beta.3' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
218
218
  Active Theme: Emerge
219
219
  ```
220
220
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gofynd/fdk-client-javascript",
3
- "version": "1.3.10-beta.2",
3
+ "version": "1.3.10-beta.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -281,6 +281,7 @@ export = CartApplicationModel;
281
281
  * @typedef CartProduct
282
282
  * @property {Object} [_custom_json]
283
283
  * @property {ProductAction} [action]
284
+ * @property {Object} [attributes]
284
285
  * @property {BaseInfo} [brand]
285
286
  * @property {CategoryInfo[]} [categories]
286
287
  * @property {ProductImage[]} [images]
@@ -316,6 +317,7 @@ export = CartApplicationModel;
316
317
  * @property {ProductPriceInfo} [price]
317
318
  * @property {ProductPricePerUnitInfo} [price_per_unit]
318
319
  * @property {CartProduct} [product]
320
+ * @property {string} [product_ean_id]
319
321
  * @property {PromoMeta} [promo_meta]
320
322
  * @property {AppliedPromotion[]} [promotions_applied]
321
323
  * @property {number} [quantity]
@@ -1288,6 +1290,7 @@ declare function CartProduct(): CartProduct;
1288
1290
  type CartProduct = {
1289
1291
  _custom_json?: any;
1290
1292
  action?: ProductAction;
1293
+ attributes?: any;
1291
1294
  brand?: BaseInfo;
1292
1295
  categories?: CategoryInfo[];
1293
1296
  images?: ProductImage[];
@@ -1331,6 +1334,7 @@ type CartProductInfo = {
1331
1334
  price?: ProductPriceInfo;
1332
1335
  price_per_unit?: ProductPricePerUnitInfo;
1333
1336
  product?: CartProduct;
1337
+ product_ean_id?: string;
1334
1338
  promo_meta?: PromoMeta;
1335
1339
  promotions_applied?: AppliedPromotion[];
1336
1340
  quantity?: number;
@@ -310,6 +310,7 @@ const Joi = require("joi");
310
310
  * @typedef CartProduct
311
311
  * @property {Object} [_custom_json]
312
312
  * @property {ProductAction} [action]
313
+ * @property {Object} [attributes]
313
314
  * @property {BaseInfo} [brand]
314
315
  * @property {CategoryInfo[]} [categories]
315
316
  * @property {ProductImage[]} [images]
@@ -347,6 +348,7 @@ const Joi = require("joi");
347
348
  * @property {ProductPriceInfo} [price]
348
349
  * @property {ProductPricePerUnitInfo} [price_per_unit]
349
350
  * @property {CartProduct} [product]
351
+ * @property {string} [product_ean_id]
350
352
  * @property {PromoMeta} [promo_meta]
351
353
  * @property {AppliedPromotion[]} [promotions_applied]
352
354
  * @property {number} [quantity]
@@ -1363,6 +1365,7 @@ class CartApplicationModel {
1363
1365
  return Joi.object({
1364
1366
  _custom_json: Joi.any(),
1365
1367
  action: CartApplicationModel.ProductAction(),
1368
+ attributes: Joi.any(),
1366
1369
  brand: CartApplicationModel.BaseInfo(),
1367
1370
  categories: Joi.array().items(CartApplicationModel.CategoryInfo()),
1368
1371
  images: Joi.array().items(CartApplicationModel.ProductImage()),
@@ -1403,6 +1406,7 @@ class CartApplicationModel {
1403
1406
  price: CartApplicationModel.ProductPriceInfo(),
1404
1407
  price_per_unit: CartApplicationModel.ProductPricePerUnitInfo(),
1405
1408
  product: CartApplicationModel.CartProduct(),
1409
+ product_ean_id: Joi.string().allow(""),
1406
1410
  promo_meta: CartApplicationModel.PromoMeta(),
1407
1411
  promotions_applied: Joi.array().items(
1408
1412
  CartApplicationModel.AppliedPromotion()
@@ -180,6 +180,10 @@ export = CartPlatformModel;
180
180
  * @property {string} [payment_confirm_url]
181
181
  * @property {boolean} [success]
182
182
  */
183
+ /**
184
+ * @typedef CartCommonConfig
185
+ * @property {DeliveryChargesConfig} [delivery_charges_config]
186
+ */
183
187
  /**
184
188
  * @typedef CartCurrency
185
189
  * @property {string} [code] - Currency code defined by ISO 4217:2015
@@ -190,13 +194,35 @@ export = CartPlatformModel;
190
194
  * @property {string[]} [available_modes] - Available delivery modes
191
195
  * @property {number[]} [pickup_stores] - Store pick up available store uids
192
196
  */
197
+ /**
198
+ * @typedef CartDetailCoupon
199
+ * @property {number} [cashback_amount]
200
+ * @property {string} [cashback_message_primary]
201
+ * @property {string} [cashback_message_secondary]
202
+ * @property {string} [coupon_code]
203
+ * @property {string} [coupon_description]
204
+ * @property {string} [coupon_id]
205
+ * @property {string} [coupon_subtitle]
206
+ * @property {string} [coupon_title]
207
+ * @property {string} [coupon_type]
208
+ * @property {number} [coupon_value]
209
+ * @property {number} [discount]
210
+ * @property {boolean} [is_applied]
211
+ * @property {boolean} [is_valid]
212
+ * @property {number} [maximum_discount_value]
213
+ * @property {string} [message]
214
+ * @property {number} [minimum_cart_value]
215
+ */
193
216
  /**
194
217
  * @typedef CartDetailResponse
195
218
  * @property {AppliedPromotion[]} [applied_promo_details]
196
219
  * @property {CartBreakup} [breakup_values]
197
220
  * @property {boolean} [buy_now]
221
+ * @property {number} [cart_id]
198
222
  * @property {string} [checkout_mode]
199
223
  * @property {string} [comment]
224
+ * @property {CartCommonConfig} [common_config]
225
+ * @property {CartDetailCoupon} [coupon]
200
226
  * @property {string} [coupon_text]
201
227
  * @property {CartCurrency} [currency]
202
228
  * @property {string} [delivery_charge_info]
@@ -207,10 +233,14 @@ export = CartPlatformModel;
207
233
  * @property {CartProductInfo[]} [items]
208
234
  * @property {string} [last_modified]
209
235
  * @property {string} [message]
236
+ * @property {Object} [notification]
210
237
  * @property {Object} [pan_config]
211
238
  * @property {string} [pan_no]
212
239
  * @property {PaymentSelectionLock} [payment_selection_lock]
213
240
  * @property {boolean} [restrict_checkout]
241
+ * @property {string} [staff_user_id]
242
+ * @property {boolean} [success]
243
+ * @property {string} [uid]
214
244
  */
215
245
  /**
216
246
  * @typedef CartItem
@@ -271,6 +301,7 @@ export = CartPlatformModel;
271
301
  * @typedef CartProduct
272
302
  * @property {Object} [_custom_json]
273
303
  * @property {ProductAction} [action]
304
+ * @property {Object} [attributes]
274
305
  * @property {BaseInfo} [brand]
275
306
  * @property {CategoryInfo[]} [categories]
276
307
  * @property {ProductImage[]} [images]
@@ -306,6 +337,7 @@ export = CartPlatformModel;
306
337
  * @property {ProductPriceInfo} [price]
307
338
  * @property {ProductPriceInfo} [price_per_unit]
308
339
  * @property {CartProduct} [product]
340
+ * @property {string} [product_ean_id]
309
341
  * @property {PromoMeta} [promo_meta]
310
342
  * @property {AppliedPromotion[]} [promotions_applied]
311
343
  * @property {number} [quantity]
@@ -320,6 +352,11 @@ export = CartPlatformModel;
320
352
  * @property {number} [charges]
321
353
  * @property {number} [threshold]
322
354
  */
355
+ /**
356
+ * @typedef ChargesThreshold
357
+ * @property {number} [charges]
358
+ * @property {number} [threshold]
359
+ */
323
360
  /**
324
361
  * @typedef CheckCart
325
362
  * @property {CartBreakup} [breakup_values]
@@ -509,6 +546,11 @@ export = CartPlatformModel;
509
546
  * @property {Charges[]} [charges]
510
547
  * @property {boolean} [enabled]
511
548
  */
549
+ /**
550
+ * @typedef DeliveryChargesConfig
551
+ * @property {ChargesThreshold[]} [charges]
552
+ * @property {boolean} [enabled]
553
+ */
512
554
  /**
513
555
  * @typedef DiscountOffer
514
556
  * @property {boolean} [apportion_discount]
@@ -1645,7 +1687,7 @@ export = CartPlatformModel;
1645
1687
  declare class CartPlatformModel {
1646
1688
  }
1647
1689
  declare namespace CartPlatformModel {
1648
- export { AbandonedCart, AbandonedCartResponse, ActionQuery, ActivePromosResponse, AddCartDetailResponse, AddCartRequest, AddProductCart, AppliedFreeArticles, AppliedPromotion, ApplyCouponRequest, Article, ArticlePriceInfo, BaseInfo, BasePrice, BulkBundleRestriction, BuyRules, CartBreakup, CartCheckoutCustomMeta, CartCheckoutResponse, CartCurrency, CartDeliveryModesResponse, CartDetailResponse, CartItem, CartItemCountResponse, CartItemMeta, CartList, CartMetaConfigAdd, CartMetaConfigUpdate, CartMetaMissingResponse, CartMetaResponse, CartProduct, CartProductIdentifer, CartProductInfo, CategoryInfo, Charges, CheckCart, Collection, CompareObject, Coupon, CouponAction, CouponAdd, CouponAuthor, CouponBreakup, CouponDateMeta, CouponDetails, CouponPartialUpdate, CouponSchedule, CouponsResponse, CouponUpdate, CouponValidity, CustomerDetails, DeleteAddressResponse, DeleteCartDetailResponse, DeleteCartRequest, DeliveryCharges, DiscountOffer, DiscountRule, DiscountRulesApp, DisplayBreakup, DisplayMeta, DisplayMeta1, DisplayMetaDict, Files, FreeGiftItem, GeoLocation, GetCouponResponse, GetShareCartLinkRequest, GetShareCartLinkResponse, Identifier, ItemCriteria, LoyaltyPoints, MultiCartResponse, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenapiCartDetailsRequest, OpenapiCartDetailsResponse, OpenApiCartServiceabilityRequest, OpenApiCartServiceabilityResponse, OpenApiCheckoutResponse, OpenApiErrorResponse, OpenApiFiles, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OperationErrorResponse, OverrideCartItem, OverrideCartItemPromo, OverrideCheckoutReq, OverrideCheckoutResponse, Ownership, Ownership1, Ownership2, Page, PageCoupon, PaymentAllowValue, PaymentAllowValue1, PaymentCouponValidate, PaymentMeta, PaymentMethod, PaymentModes, PaymentSelectionLock, PickupStoreDetail, PlatformAddCartRequest, PlatformAddress, PlatformCartCheckoutDetailRequest, PlatformCartCheckoutDetailV2Request, PlatformCartMetaRequest, PlatformCartShipmentsResponse, PlatformGetAddressesResponse, PlatformSelectCartAddressRequest, PlatformShipmentResponse, PlatformUpdateCartRequest, PostOrder, PostOrder1, PriceAdjustment, PriceAdjustmentAdd, PriceAdjustmentResponse, PriceAdjustmentUpdate, PriceRange, ProductAction, ProductArticle, ProductAvailability, ProductAvailabilitySize, ProductImage, ProductPrice, ProductPriceInfo, PromiseFormatted, PromiseTimestamp, PromoMeta, PromotionAction, PromotionAdd, PromotionAuthor, PromotionDateMeta, PromotionListItem, PromotionPartialUpdate, PromotionPaymentModes, PromotionSchedule, PromotionsResponse, PromotionUpdate, RawBreakup, Restrictions, Restrictions1, Rule, RuleDefinition, SaveAddressResponse, SharedCart, SharedCartDetails, SharedCartResponse, ShipmentArticle, ShipmentPromise, ShippingAddress, StaffCheckout, State, StoreDetailsResponse, StoreInfo, SuccessMessage, Tags, UpdateAddressResponse, UpdateCartDetailResponse, UpdateCartPaymentRequest, UpdateCartPaymentRequestV2, UpdateCartRequest, UpdateCartShipmentItem, UpdateCartShipmentRequest, UpdateProductCart, UpdateUserCartMapping, UserCartMappingResponse, UserInfo, UserRegistered, UsesRemaining, UsesRemaining1, UsesRestriction, UsesRestriction1, Validation, Validity, Visibility };
1690
+ export { AbandonedCart, AbandonedCartResponse, ActionQuery, ActivePromosResponse, AddCartDetailResponse, AddCartRequest, AddProductCart, AppliedFreeArticles, AppliedPromotion, ApplyCouponRequest, Article, ArticlePriceInfo, BaseInfo, BasePrice, BulkBundleRestriction, BuyRules, CartBreakup, CartCheckoutCustomMeta, CartCheckoutResponse, CartCommonConfig, CartCurrency, CartDeliveryModesResponse, CartDetailCoupon, CartDetailResponse, CartItem, CartItemCountResponse, CartItemMeta, CartList, CartMetaConfigAdd, CartMetaConfigUpdate, CartMetaMissingResponse, CartMetaResponse, CartProduct, CartProductIdentifer, CartProductInfo, CategoryInfo, Charges, ChargesThreshold, CheckCart, Collection, CompareObject, Coupon, CouponAction, CouponAdd, CouponAuthor, CouponBreakup, CouponDateMeta, CouponDetails, CouponPartialUpdate, CouponSchedule, CouponsResponse, CouponUpdate, CouponValidity, CustomerDetails, DeleteAddressResponse, DeleteCartDetailResponse, DeleteCartRequest, DeliveryCharges, DeliveryChargesConfig, DiscountOffer, DiscountRule, DiscountRulesApp, DisplayBreakup, DisplayMeta, DisplayMeta1, DisplayMetaDict, Files, FreeGiftItem, GeoLocation, GetCouponResponse, GetShareCartLinkRequest, GetShareCartLinkResponse, Identifier, ItemCriteria, LoyaltyPoints, MultiCartResponse, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenapiCartDetailsRequest, OpenapiCartDetailsResponse, OpenApiCartServiceabilityRequest, OpenApiCartServiceabilityResponse, OpenApiCheckoutResponse, OpenApiErrorResponse, OpenApiFiles, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OperationErrorResponse, OverrideCartItem, OverrideCartItemPromo, OverrideCheckoutReq, OverrideCheckoutResponse, Ownership, Ownership1, Ownership2, Page, PageCoupon, PaymentAllowValue, PaymentAllowValue1, PaymentCouponValidate, PaymentMeta, PaymentMethod, PaymentModes, PaymentSelectionLock, PickupStoreDetail, PlatformAddCartRequest, PlatformAddress, PlatformCartCheckoutDetailRequest, PlatformCartCheckoutDetailV2Request, PlatformCartMetaRequest, PlatformCartShipmentsResponse, PlatformGetAddressesResponse, PlatformSelectCartAddressRequest, PlatformShipmentResponse, PlatformUpdateCartRequest, PostOrder, PostOrder1, PriceAdjustment, PriceAdjustmentAdd, PriceAdjustmentResponse, PriceAdjustmentUpdate, PriceRange, ProductAction, ProductArticle, ProductAvailability, ProductAvailabilitySize, ProductImage, ProductPrice, ProductPriceInfo, PromiseFormatted, PromiseTimestamp, PromoMeta, PromotionAction, PromotionAdd, PromotionAuthor, PromotionDateMeta, PromotionListItem, PromotionPartialUpdate, PromotionPaymentModes, PromotionSchedule, PromotionsResponse, PromotionUpdate, RawBreakup, Restrictions, Restrictions1, Rule, RuleDefinition, SaveAddressResponse, SharedCart, SharedCartDetails, SharedCartResponse, ShipmentArticle, ShipmentPromise, ShippingAddress, StaffCheckout, State, StoreDetailsResponse, StoreInfo, SuccessMessage, Tags, UpdateAddressResponse, UpdateCartDetailResponse, UpdateCartPaymentRequest, UpdateCartPaymentRequestV2, UpdateCartRequest, UpdateCartShipmentItem, UpdateCartShipmentRequest, UpdateProductCart, UpdateUserCartMapping, UserCartMappingResponse, UserInfo, UserRegistered, UsesRemaining, UsesRemaining1, UsesRestriction, UsesRestriction1, Validation, Validity, Visibility };
1649
1691
  }
1650
1692
  /** @returns {AbandonedCart} */
1651
1693
  declare function AbandonedCart(): AbandonedCart;
@@ -1964,6 +2006,11 @@ type CartCheckoutResponse = {
1964
2006
  payment_confirm_url?: string;
1965
2007
  success?: boolean;
1966
2008
  };
2009
+ /** @returns {CartCommonConfig} */
2010
+ declare function CartCommonConfig(): CartCommonConfig;
2011
+ type CartCommonConfig = {
2012
+ delivery_charges_config?: DeliveryChargesConfig;
2013
+ };
1967
2014
  /** @returns {CartCurrency} */
1968
2015
  declare function CartCurrency(): CartCurrency;
1969
2016
  type CartCurrency = {
@@ -1985,14 +2032,37 @@ type CartDeliveryModesResponse = {
1985
2032
  */
1986
2033
  pickup_stores?: number[];
1987
2034
  };
2035
+ /** @returns {CartDetailCoupon} */
2036
+ declare function CartDetailCoupon(): CartDetailCoupon;
2037
+ type CartDetailCoupon = {
2038
+ cashback_amount?: number;
2039
+ cashback_message_primary?: string;
2040
+ cashback_message_secondary?: string;
2041
+ coupon_code?: string;
2042
+ coupon_description?: string;
2043
+ coupon_id?: string;
2044
+ coupon_subtitle?: string;
2045
+ coupon_title?: string;
2046
+ coupon_type?: string;
2047
+ coupon_value?: number;
2048
+ discount?: number;
2049
+ is_applied?: boolean;
2050
+ is_valid?: boolean;
2051
+ maximum_discount_value?: number;
2052
+ message?: string;
2053
+ minimum_cart_value?: number;
2054
+ };
1988
2055
  /** @returns {CartDetailResponse} */
1989
2056
  declare function CartDetailResponse(): CartDetailResponse;
1990
2057
  type CartDetailResponse = {
1991
2058
  applied_promo_details?: AppliedPromotion[];
1992
2059
  breakup_values?: CartBreakup;
1993
2060
  buy_now?: boolean;
2061
+ cart_id?: number;
1994
2062
  checkout_mode?: string;
1995
2063
  comment?: string;
2064
+ common_config?: CartCommonConfig;
2065
+ coupon?: CartDetailCoupon;
1996
2066
  coupon_text?: string;
1997
2067
  currency?: CartCurrency;
1998
2068
  delivery_charge_info?: string;
@@ -2003,10 +2073,14 @@ type CartDetailResponse = {
2003
2073
  items?: CartProductInfo[];
2004
2074
  last_modified?: string;
2005
2075
  message?: string;
2076
+ notification?: any;
2006
2077
  pan_config?: any;
2007
2078
  pan_no?: string;
2008
2079
  payment_selection_lock?: PaymentSelectionLock;
2009
2080
  restrict_checkout?: boolean;
2081
+ staff_user_id?: string;
2082
+ success?: boolean;
2083
+ uid?: string;
2010
2084
  };
2011
2085
  /** @returns {CartItem} */
2012
2086
  declare function CartItem(): CartItem;
@@ -2079,6 +2153,7 @@ declare function CartProduct(): CartProduct;
2079
2153
  type CartProduct = {
2080
2154
  _custom_json?: any;
2081
2155
  action?: ProductAction;
2156
+ attributes?: any;
2082
2157
  brand?: BaseInfo;
2083
2158
  categories?: CategoryInfo[];
2084
2159
  images?: ProductImage[];
@@ -2122,6 +2197,7 @@ type CartProductInfo = {
2122
2197
  price?: ProductPriceInfo;
2123
2198
  price_per_unit?: ProductPriceInfo;
2124
2199
  product?: CartProduct;
2200
+ product_ean_id?: string;
2125
2201
  promo_meta?: PromoMeta;
2126
2202
  promotions_applied?: AppliedPromotion[];
2127
2203
  quantity?: number;
@@ -2141,6 +2217,12 @@ type Charges = {
2141
2217
  charges?: number;
2142
2218
  threshold?: number;
2143
2219
  };
2220
+ /** @returns {ChargesThreshold} */
2221
+ declare function ChargesThreshold(): ChargesThreshold;
2222
+ type ChargesThreshold = {
2223
+ charges?: number;
2224
+ threshold?: number;
2225
+ };
2144
2226
  /** @returns {CheckCart} */
2145
2227
  declare function CheckCart(): CheckCart;
2146
2228
  type CheckCart = {
@@ -2359,6 +2441,12 @@ type DeliveryCharges = {
2359
2441
  charges?: Charges[];
2360
2442
  enabled?: boolean;
2361
2443
  };
2444
+ /** @returns {DeliveryChargesConfig} */
2445
+ declare function DeliveryChargesConfig(): DeliveryChargesConfig;
2446
+ type DeliveryChargesConfig = {
2447
+ charges?: ChargesThreshold[];
2448
+ enabled?: boolean;
2449
+ };
2362
2450
  /** @returns {DiscountOffer} */
2363
2451
  declare function DiscountOffer(): DiscountOffer;
2364
2452
  type DiscountOffer = {
@@ -200,6 +200,11 @@ const Joi = require("joi");
200
200
  * @property {boolean} [success]
201
201
  */
202
202
 
203
+ /**
204
+ * @typedef CartCommonConfig
205
+ * @property {DeliveryChargesConfig} [delivery_charges_config]
206
+ */
207
+
203
208
  /**
204
209
  * @typedef CartCurrency
205
210
  * @property {string} [code] - Currency code defined by ISO 4217:2015
@@ -212,13 +217,36 @@ const Joi = require("joi");
212
217
  * @property {number[]} [pickup_stores] - Store pick up available store uids
213
218
  */
214
219
 
220
+ /**
221
+ * @typedef CartDetailCoupon
222
+ * @property {number} [cashback_amount]
223
+ * @property {string} [cashback_message_primary]
224
+ * @property {string} [cashback_message_secondary]
225
+ * @property {string} [coupon_code]
226
+ * @property {string} [coupon_description]
227
+ * @property {string} [coupon_id]
228
+ * @property {string} [coupon_subtitle]
229
+ * @property {string} [coupon_title]
230
+ * @property {string} [coupon_type]
231
+ * @property {number} [coupon_value]
232
+ * @property {number} [discount]
233
+ * @property {boolean} [is_applied]
234
+ * @property {boolean} [is_valid]
235
+ * @property {number} [maximum_discount_value]
236
+ * @property {string} [message]
237
+ * @property {number} [minimum_cart_value]
238
+ */
239
+
215
240
  /**
216
241
  * @typedef CartDetailResponse
217
242
  * @property {AppliedPromotion[]} [applied_promo_details]
218
243
  * @property {CartBreakup} [breakup_values]
219
244
  * @property {boolean} [buy_now]
245
+ * @property {number} [cart_id]
220
246
  * @property {string} [checkout_mode]
221
247
  * @property {string} [comment]
248
+ * @property {CartCommonConfig} [common_config]
249
+ * @property {CartDetailCoupon} [coupon]
222
250
  * @property {string} [coupon_text]
223
251
  * @property {CartCurrency} [currency]
224
252
  * @property {string} [delivery_charge_info]
@@ -229,10 +257,14 @@ const Joi = require("joi");
229
257
  * @property {CartProductInfo[]} [items]
230
258
  * @property {string} [last_modified]
231
259
  * @property {string} [message]
260
+ * @property {Object} [notification]
232
261
  * @property {Object} [pan_config]
233
262
  * @property {string} [pan_no]
234
263
  * @property {PaymentSelectionLock} [payment_selection_lock]
235
264
  * @property {boolean} [restrict_checkout]
265
+ * @property {string} [staff_user_id]
266
+ * @property {boolean} [success]
267
+ * @property {string} [uid]
236
268
  */
237
269
 
238
270
  /**
@@ -302,6 +334,7 @@ const Joi = require("joi");
302
334
  * @typedef CartProduct
303
335
  * @property {Object} [_custom_json]
304
336
  * @property {ProductAction} [action]
337
+ * @property {Object} [attributes]
305
338
  * @property {BaseInfo} [brand]
306
339
  * @property {CategoryInfo[]} [categories]
307
340
  * @property {ProductImage[]} [images]
@@ -339,6 +372,7 @@ const Joi = require("joi");
339
372
  * @property {ProductPriceInfo} [price]
340
373
  * @property {ProductPriceInfo} [price_per_unit]
341
374
  * @property {CartProduct} [product]
375
+ * @property {string} [product_ean_id]
342
376
  * @property {PromoMeta} [promo_meta]
343
377
  * @property {AppliedPromotion[]} [promotions_applied]
344
378
  * @property {number} [quantity]
@@ -356,6 +390,12 @@ const Joi = require("joi");
356
390
  * @property {number} [threshold]
357
391
  */
358
392
 
393
+ /**
394
+ * @typedef ChargesThreshold
395
+ * @property {number} [charges]
396
+ * @property {number} [threshold]
397
+ */
398
+
359
399
  /**
360
400
  * @typedef CheckCart
361
401
  * @property {CartBreakup} [breakup_values]
@@ -565,6 +605,12 @@ const Joi = require("joi");
565
605
  * @property {boolean} [enabled]
566
606
  */
567
607
 
608
+ /**
609
+ * @typedef DeliveryChargesConfig
610
+ * @property {ChargesThreshold[]} [charges]
611
+ * @property {boolean} [enabled]
612
+ */
613
+
568
614
  /**
569
615
  * @typedef DiscountOffer
570
616
  * @property {boolean} [apportion_discount]
@@ -2054,6 +2100,13 @@ class CartPlatformModel {
2054
2100
  });
2055
2101
  }
2056
2102
 
2103
+ /** @returns {CartCommonConfig} */
2104
+ static CartCommonConfig() {
2105
+ return Joi.object({
2106
+ delivery_charges_config: CartPlatformModel.DeliveryChargesConfig(),
2107
+ });
2108
+ }
2109
+
2057
2110
  /** @returns {CartCurrency} */
2058
2111
  static CartCurrency() {
2059
2112
  return Joi.object({
@@ -2070,6 +2123,28 @@ class CartPlatformModel {
2070
2123
  });
2071
2124
  }
2072
2125
 
2126
+ /** @returns {CartDetailCoupon} */
2127
+ static CartDetailCoupon() {
2128
+ return Joi.object({
2129
+ cashback_amount: Joi.number(),
2130
+ cashback_message_primary: Joi.string().allow(""),
2131
+ cashback_message_secondary: Joi.string().allow(""),
2132
+ coupon_code: Joi.string().allow(""),
2133
+ coupon_description: Joi.string().allow(""),
2134
+ coupon_id: Joi.string().allow(""),
2135
+ coupon_subtitle: Joi.string().allow(""),
2136
+ coupon_title: Joi.string().allow(""),
2137
+ coupon_type: Joi.string().allow(""),
2138
+ coupon_value: Joi.number(),
2139
+ discount: Joi.number(),
2140
+ is_applied: Joi.boolean(),
2141
+ is_valid: Joi.boolean(),
2142
+ maximum_discount_value: Joi.number(),
2143
+ message: Joi.string().allow(""),
2144
+ minimum_cart_value: Joi.number(),
2145
+ });
2146
+ }
2147
+
2073
2148
  /** @returns {CartDetailResponse} */
2074
2149
  static CartDetailResponse() {
2075
2150
  return Joi.object({
@@ -2078,8 +2153,11 @@ class CartPlatformModel {
2078
2153
  ),
2079
2154
  breakup_values: CartPlatformModel.CartBreakup(),
2080
2155
  buy_now: Joi.boolean(),
2156
+ cart_id: Joi.number(),
2081
2157
  checkout_mode: Joi.string().allow(""),
2082
2158
  comment: Joi.string().allow(""),
2159
+ common_config: CartPlatformModel.CartCommonConfig(),
2160
+ coupon: CartPlatformModel.CartDetailCoupon(),
2083
2161
  coupon_text: Joi.string().allow(""),
2084
2162
  currency: CartPlatformModel.CartCurrency(),
2085
2163
  delivery_charge_info: Joi.string().allow(""),
@@ -2090,10 +2168,14 @@ class CartPlatformModel {
2090
2168
  items: Joi.array().items(CartPlatformModel.CartProductInfo()),
2091
2169
  last_modified: Joi.string().allow(""),
2092
2170
  message: Joi.string().allow(""),
2171
+ notification: Joi.any(),
2093
2172
  pan_config: Joi.any(),
2094
2173
  pan_no: Joi.string().allow(""),
2095
2174
  payment_selection_lock: CartPlatformModel.PaymentSelectionLock(),
2096
2175
  restrict_checkout: Joi.boolean(),
2176
+ staff_user_id: Joi.string().allow(""),
2177
+ success: Joi.boolean(),
2178
+ uid: Joi.string().allow(""),
2097
2179
  });
2098
2180
  }
2099
2181
 
@@ -2181,6 +2263,7 @@ class CartPlatformModel {
2181
2263
  return Joi.object({
2182
2264
  _custom_json: Joi.any(),
2183
2265
  action: CartPlatformModel.ProductAction(),
2266
+ attributes: Joi.any(),
2184
2267
  brand: CartPlatformModel.BaseInfo(),
2185
2268
  categories: Joi.array().items(CartPlatformModel.CategoryInfo()),
2186
2269
  images: Joi.array().items(CartPlatformModel.ProductImage()),
@@ -2221,6 +2304,7 @@ class CartPlatformModel {
2221
2304
  price: CartPlatformModel.ProductPriceInfo(),
2222
2305
  price_per_unit: CartPlatformModel.ProductPriceInfo(),
2223
2306
  product: CartPlatformModel.CartProduct(),
2307
+ product_ean_id: Joi.string().allow(""),
2224
2308
  promo_meta: CartPlatformModel.PromoMeta(),
2225
2309
  promotions_applied: Joi.array().items(
2226
2310
  CartPlatformModel.AppliedPromotion()
@@ -2245,6 +2329,14 @@ class CartPlatformModel {
2245
2329
  });
2246
2330
  }
2247
2331
 
2332
+ /** @returns {ChargesThreshold} */
2333
+ static ChargesThreshold() {
2334
+ return Joi.object({
2335
+ charges: Joi.number(),
2336
+ threshold: Joi.number(),
2337
+ });
2338
+ }
2339
+
2248
2340
  /** @returns {CheckCart} */
2249
2341
  static CheckCart() {
2250
2342
  return Joi.object({
@@ -2493,6 +2585,14 @@ class CartPlatformModel {
2493
2585
  });
2494
2586
  }
2495
2587
 
2588
+ /** @returns {DeliveryChargesConfig} */
2589
+ static DeliveryChargesConfig() {
2590
+ return Joi.object({
2591
+ charges: Joi.array().items(CartPlatformModel.ChargesThreshold()),
2592
+ enabled: Joi.boolean(),
2593
+ });
2594
+ }
2595
+
2496
2596
  /** @returns {DiscountOffer} */
2497
2597
  static DiscountOffer() {
2498
2598
  return Joi.object({