@gofynd/fdk-client-javascript 1.4.15-beta.11 → 1.4.15-beta.13

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
@@ -237,7 +237,7 @@ console.log("Active Theme: ", response.information.name);
237
237
  The above code will log the curl command in the console
238
238
 
239
239
  ```bash
240
- 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.4.15-beta.11' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
240
+ 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.4.15-beta.13' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
241
241
  Active Theme: Emerge
242
242
  ```
243
243
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gofynd/fdk-client-javascript",
3
- "version": "1.4.15-beta.11",
3
+ "version": "1.4.15-beta.13",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -7,6 +7,7 @@ declare class Cart {
7
7
  addItems: string;
8
8
  applyCoupon: string;
9
9
  applyRewardPoints: string;
10
+ checkoutCart: string;
10
11
  checkoutCartV2: string;
11
12
  deleteCart: string;
12
13
  getAddressById: string;
@@ -70,6 +71,15 @@ declare class Cart {
70
71
  * @description: Users can redeem their accumulated reward points and apply them to the items in their cart, thereby availing discounts on their current purchases. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/applyRewardPoints/).
71
72
  */
72
73
  applyRewardPoints({ body, id, i, b, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartDetailResponse>;
74
+ /**
75
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
76
+ * @param {import("../ApplicationAPIClient").Options} - Options
77
+ * @returns {Promise<CartCheckoutResponse>} - Success response
78
+ * @name checkoutCart
79
+ * @summary: Checkout cart
80
+ * @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/checkoutCart/).
81
+ */
82
+ checkoutCart({ body, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise<CartCheckoutResponse>;
73
83
  /**
74
84
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
75
85
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -16,6 +16,7 @@ class Cart {
16
16
  addItems: "/service/application/cart/v1.0/detail",
17
17
  applyCoupon: "/service/application/cart/v1.0/coupon",
18
18
  applyRewardPoints: "/service/application/cart/v1.0/redeem/points/",
19
+ checkoutCart: "/service/application/cart/v1.0/checkout",
19
20
  checkoutCartV2: "/service/application/cart/v2.0/checkout",
20
21
  deleteCart: "/service/application/cart/v1.0/cart_archive",
21
22
  getAddressById: "/service/application/cart/v1.0/address/{id}",
@@ -228,6 +229,45 @@ class Cart {
228
229
  return response;
229
230
  }
230
231
 
232
+ /**
233
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
234
+ * @param {import("../ApplicationAPIClient").Options} - Options
235
+ * @returns {Promise<CartCheckoutResponse>} - Success response
236
+ * @name checkoutCart
237
+ * @summary: Checkout cart
238
+ * @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/checkoutCart/).
239
+ */
240
+ async checkoutCart(
241
+ { body, buyNow, cartType, requestHeaders } = { requestHeaders: {} },
242
+ { responseHeaders } = { responseHeaders: false }
243
+ ) {
244
+ const query_params = {};
245
+ query_params["buy_now"] = buyNow;
246
+ query_params["cart_type"] = cartType;
247
+
248
+ const xHeaders = {};
249
+
250
+ const response = await ApplicationAPIClient.execute(
251
+ this._conf,
252
+ "post",
253
+ constructUrl({
254
+ url: this._urls["checkoutCart"],
255
+ params: {},
256
+ }),
257
+ query_params,
258
+ body,
259
+ { ...xHeaders, ...requestHeaders },
260
+ { responseHeaders }
261
+ );
262
+
263
+ let responseData = response;
264
+ if (responseHeaders) {
265
+ responseData = response[0];
266
+ }
267
+
268
+ return response;
269
+ }
270
+
231
271
  /**
232
272
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
233
273
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -421,6 +421,18 @@ declare class Cart {
421
421
  * @description: Add product items to the customer's existing shopping cart. If there is no existing cart associated with the customer, it creates a new one and adds the items to it. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformAddItems/).
422
422
  */
423
423
  platformAddItems({ body, i, b, buyNow, orderType, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformAddItemsParam, { responseHeaders }?: object): Promise<CartPlatformModel.AddCartDetailResponse>;
424
+ /**
425
+ * @param {CartPlatformApplicationValidator.PlatformCheckoutCartParam} arg
426
+ * - Arg object
427
+ *
428
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
429
+ * @param {import("../PlatformAPIClient").Options} - Options
430
+ * @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
431
+ * @name platformCheckoutCart
432
+ * @summary: Checkout cart
433
+ * @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCart/).
434
+ */
435
+ platformCheckoutCart({ body, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformCheckoutCartParam, { responseHeaders }?: object): Promise<CartPlatformModel.CartCheckoutResponse>;
424
436
  /**
425
437
  * @param {CartPlatformApplicationValidator.PlatformCheckoutCartV2Param} arg
426
438
  * - Arg object
@@ -3384,6 +3384,90 @@ class Cart {
3384
3384
  return response;
3385
3385
  }
3386
3386
 
3387
+ /**
3388
+ * @param {CartPlatformApplicationValidator.PlatformCheckoutCartParam} arg
3389
+ * - Arg object
3390
+ *
3391
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3392
+ * @param {import("../PlatformAPIClient").Options} - Options
3393
+ * @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
3394
+ * @name platformCheckoutCart
3395
+ * @summary: Checkout cart
3396
+ * @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCart/).
3397
+ */
3398
+ async platformCheckoutCart(
3399
+ { body, id, requestHeaders } = { requestHeaders: {} },
3400
+ { responseHeaders } = { responseHeaders: false }
3401
+ ) {
3402
+ const {
3403
+ error,
3404
+ } = CartPlatformApplicationValidator.platformCheckoutCart().validate(
3405
+ {
3406
+ body,
3407
+ id,
3408
+ },
3409
+ { abortEarly: false, allowUnknown: true }
3410
+ );
3411
+ if (error) {
3412
+ return Promise.reject(new FDKClientValidationError(error));
3413
+ }
3414
+
3415
+ // Showing warrnings if extra unknown parameters are found
3416
+ const {
3417
+ error: warrning,
3418
+ } = CartPlatformApplicationValidator.platformCheckoutCart().validate(
3419
+ {
3420
+ body,
3421
+ id,
3422
+ },
3423
+ { abortEarly: false, allowUnknown: false }
3424
+ );
3425
+ if (warrning) {
3426
+ Logger({
3427
+ level: "WARN",
3428
+ message: `Parameter Validation warrnings for platform > Cart > platformCheckoutCart \n ${warrning}`,
3429
+ });
3430
+ }
3431
+
3432
+ const query_params = {};
3433
+ query_params["id"] = id;
3434
+
3435
+ const response = await PlatformAPIClient.execute(
3436
+ this.config,
3437
+ "post",
3438
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/checkout`,
3439
+ query_params,
3440
+ body,
3441
+ requestHeaders,
3442
+ { responseHeaders }
3443
+ );
3444
+
3445
+ let responseData = response;
3446
+ if (responseHeaders) {
3447
+ responseData = response[0];
3448
+ }
3449
+
3450
+ const {
3451
+ error: res_error,
3452
+ } = CartPlatformModel.CartCheckoutResponse().validate(responseData, {
3453
+ abortEarly: false,
3454
+ allowUnknown: true,
3455
+ });
3456
+
3457
+ if (res_error) {
3458
+ if (this.config.options.strictResponseCheck === true) {
3459
+ return Promise.reject(new FDKResponseValidationError(res_error));
3460
+ } else {
3461
+ Logger({
3462
+ level: "WARN",
3463
+ message: `Response Validation Warnings for platform > Cart > platformCheckoutCart \n ${res_error}`,
3464
+ });
3465
+ }
3466
+ }
3467
+
3468
+ return response;
3469
+ }
3470
+
3387
3471
  /**
3388
3472
  * @param {CartPlatformApplicationValidator.PlatformCheckoutCartV2Param} arg
3389
3473
  * - Arg object
@@ -240,6 +240,11 @@ export = CartPlatformApplicationValidator;
240
240
  * @property {string} [id] - The unique identifier of the cart
241
241
  * @property {CartPlatformModel.PlatformAddCartRequest} body
242
242
  */
243
+ /**
244
+ * @typedef PlatformCheckoutCartParam
245
+ * @property {string} [id] - The unique identifier of the cart
246
+ * @property {CartPlatformModel.PlatformCartCheckoutDetailRequest} body
247
+ */
243
248
  /**
244
249
  * @typedef PlatformCheckoutCartV2Param
245
250
  * @property {string} [id] - The unique identifier of the cart
@@ -470,6 +475,8 @@ declare class CartPlatformApplicationValidator {
470
475
  static overrideCart(): OverrideCartParam;
471
476
  /** @returns {PlatformAddItemsParam} */
472
477
  static platformAddItems(): PlatformAddItemsParam;
478
+ /** @returns {PlatformCheckoutCartParam} */
479
+ static platformCheckoutCart(): PlatformCheckoutCartParam;
473
480
  /** @returns {PlatformCheckoutCartV2Param} */
474
481
  static platformCheckoutCartV2(): PlatformCheckoutCartV2Param;
475
482
  /** @returns {PlatformUpdateCartParam} */
@@ -518,7 +525,7 @@ declare class CartPlatformApplicationValidator {
518
525
  static validateCouponForPayment(): ValidateCouponForPaymentParam;
519
526
  }
520
527
  declare namespace CartPlatformApplicationValidator {
521
- export { AddAddressParam, AddBulkPriceAdjustmentParam, AddItemsParam, AddPriceAdjustmentParam, ApplyCouponParam, CheckCartServiceabilityParam, CheckoutCartParam, CreateCartMetaConfigParam, CreateCouponParam, CreatePromotionParam, DeleteCartParam, FetchAndvalidateCartItemsParam, FetchCartMetaConfigParam, GetAbandonedCartParam, GetAbandonedCartDetailsParam, GetAddressByIdParam, GetAddressesParam, GetAppCouponsParam, GetAvailableDeliveryModesParam, GetCartParam, GetCartListParam, GetCartShareLinkParam, GetCartSharedItemsParam, GetCouponByIdParam, GetCouponCodeExistsParam, GetCouponOptionValuesParam, GetCouponsParam, GetItemCountParam, GetPriceAdjustmentsParam, GetPromosCouponConfigParam, GetPromotionByIdParam, GetPromotionCodeExistsParam, GetPromotionOffersParam, GetPromotionPaymentOffersParam, GetPromotionsParam, GetShipmentsParam, GetStoreAddressByUidParam, OverrideCartParam, PlatformAddItemsParam, PlatformCheckoutCartV2Param, PlatformUpdateCartParam, RemoveAddressParam, RemoveBulkPriceAdjustmentParam, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateBulkPriceAdjustmentParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam };
528
+ export { AddAddressParam, AddBulkPriceAdjustmentParam, AddItemsParam, AddPriceAdjustmentParam, ApplyCouponParam, CheckCartServiceabilityParam, CheckoutCartParam, CreateCartMetaConfigParam, CreateCouponParam, CreatePromotionParam, DeleteCartParam, FetchAndvalidateCartItemsParam, FetchCartMetaConfigParam, GetAbandonedCartParam, GetAbandonedCartDetailsParam, GetAddressByIdParam, GetAddressesParam, GetAppCouponsParam, GetAvailableDeliveryModesParam, GetCartParam, GetCartListParam, GetCartShareLinkParam, GetCartSharedItemsParam, GetCouponByIdParam, GetCouponCodeExistsParam, GetCouponOptionValuesParam, GetCouponsParam, GetItemCountParam, GetPriceAdjustmentsParam, GetPromosCouponConfigParam, GetPromotionByIdParam, GetPromotionCodeExistsParam, GetPromotionOffersParam, GetPromotionPaymentOffersParam, GetPromotionsParam, GetShipmentsParam, GetStoreAddressByUidParam, OverrideCartParam, PlatformAddItemsParam, PlatformCheckoutCartParam, PlatformCheckoutCartV2Param, PlatformUpdateCartParam, RemoveAddressParam, RemoveBulkPriceAdjustmentParam, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateBulkPriceAdjustmentParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam };
522
529
  }
523
530
  type AddAddressParam = {
524
531
  body: CartPlatformModel.PlatformAddress;
@@ -821,6 +828,13 @@ type PlatformAddItemsParam = {
821
828
  id?: string;
822
829
  body: CartPlatformModel.PlatformAddCartRequest;
823
830
  };
831
+ type PlatformCheckoutCartParam = {
832
+ /**
833
+ * - The unique identifier of the cart
834
+ */
835
+ id?: string;
836
+ body: CartPlatformModel.PlatformCartCheckoutDetailRequest;
837
+ };
824
838
  type PlatformCheckoutCartV2Param = {
825
839
  /**
826
840
  * - The unique identifier of the cart
@@ -282,6 +282,12 @@ const CartPlatformModel = require("./CartPlatformModel");
282
282
  * @property {CartPlatformModel.PlatformAddCartRequest} body
283
283
  */
284
284
 
285
+ /**
286
+ * @typedef PlatformCheckoutCartParam
287
+ * @property {string} [id] - The unique identifier of the cart
288
+ * @property {CartPlatformModel.PlatformCartCheckoutDetailRequest} body
289
+ */
290
+
285
291
  /**
286
292
  * @typedef PlatformCheckoutCartV2Param
287
293
  * @property {string} [id] - The unique identifier of the cart
@@ -801,6 +807,14 @@ class CartPlatformApplicationValidator {
801
807
  }).required();
802
808
  }
803
809
 
810
+ /** @returns {PlatformCheckoutCartParam} */
811
+ static platformCheckoutCart() {
812
+ return Joi.object({
813
+ id: Joi.string().allow(""),
814
+ body: CartPlatformModel.PlatformCartCheckoutDetailRequest().required(),
815
+ }).required();
816
+ }
817
+
804
818
  /** @returns {PlatformCheckoutCartV2Param} */
805
819
  static platformCheckoutCartV2() {
806
820
  return Joi.object({
@@ -1583,6 +1583,45 @@ export = CartPlatformModel;
1583
1583
  * @property {string} key
1584
1584
  * @property {string[]} values
1585
1585
  */
1586
+ /**
1587
+ * @typedef CartCheckoutCustomMeta
1588
+ * @property {string} key
1589
+ * @property {string} value
1590
+ */
1591
+ /**
1592
+ * @typedef PlatformCartCheckoutDetailRequest
1593
+ * @property {CartCheckoutCustomMeta[]} [custom_meta]
1594
+ * @property {string} [address_id]
1595
+ * @property {string} [payment_identifier]
1596
+ * @property {Object} [payment_params]
1597
+ * @property {boolean} [payment_auto_confirm]
1598
+ * @property {string} id
1599
+ * @property {boolean} [pos]
1600
+ * @property {string} [billing_address_id]
1601
+ * @property {string} [merchant_code]
1602
+ * @property {string} [aggregator]
1603
+ * @property {number} [pick_at_store_uid]
1604
+ * @property {string} [device_id]
1605
+ * @property {Object} [delivery_address]
1606
+ * @property {string} payment_mode
1607
+ * @property {string} [checkout_mode]
1608
+ * @property {CustomerDetails} [customer_details] - Customer details
1609
+ * @property {Object} [meta]
1610
+ * @property {StaffCheckout} [staff]
1611
+ * @property {string} [employee_code]
1612
+ * @property {Object} [billing_address]
1613
+ * @property {string} [callback_url]
1614
+ * @property {string} [user_id]
1615
+ * @property {Object} [extra_meta]
1616
+ * @property {string} order_type
1617
+ * @property {Files[]} [files] - List of file url
1618
+ * @property {number} [ordering_store]
1619
+ * @property {Object} [payment_extra_identifiers]
1620
+ * @property {string} [iin]
1621
+ * @property {string} [network]
1622
+ * @property {string} [type]
1623
+ * @property {string} [card_id]
1624
+ */
1586
1625
  /**
1587
1626
  * @typedef CheckCart
1588
1627
  * @property {string} [coupon_text]
@@ -1815,7 +1854,7 @@ export = CartPlatformModel;
1815
1854
  declare class CartPlatformModel {
1816
1855
  }
1817
1856
  declare namespace CartPlatformModel {
1818
- export { CouponDateMeta, Ownership, CouponAuthor, State, PaymentAllowValue, PaymentModes, PriceRange, PostOrder, BulkBundleRestriction, UsesRemaining, UsesRestriction, Restrictions, Validation, CouponAction, CouponSchedule, Rule, DisplayMetaDict, DisplayMeta, Identifier, Validity, RuleDefinition, CouponAdd, Page, CouponsResponse, SuccessMessage, OperationErrorResponse, CouponUpdate, CouponPartialUpdate, DisplayMeta1, Ownership1, CompareObject, ItemCriteria, DiscountOffer, DiscountRule, PaymentAllowValue1, PromotionPaymentModes, UserRegistered, PostOrder1, UsesRemaining1, UsesRestriction1, Restrictions1, PromotionSchedule, PromotionAction, PromotionAuthor, Visibility, PromotionDateMeta, PromotionListItem, PromotionsResponse, PromotionAdd, PromotionUpdate, PromotionPartialUpdate, ActivePromosResponse, Charges, DeliveryCharges, CartMetaConfigUpdate, CartMetaConfigAdd, Article, PriceAdjustmentRestrictions, Collection, PriceAdjustmentUpdate, BulkPriceAdjustmentUpdate, PriceAdjustment, PriceAdjustmentResponse, GetPriceAdjustmentResponse, PriceAdjustmentAdd, BulkPriceAdjustmentAdd, CartItem, OpenapiCartDetailsRequest, CouponBreakup, DisplayBreakup, LoyaltyPoints, RawBreakup, CartBreakup, ProductImage, Tags, BaseInfo, ActionQuery, ProductAction, CategoryInfo, CartProduct, BasePrice, ArticlePriceInfo, StoreInfo, ProductArticle, Ownership2, DiscountRulesApp, AppliedFreeArticles, BuyRules, AppliedPromotion, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, CouponDetails, ProductPrice, ProductPriceInfo, CartProductIdentifer, ProductAvailabilitySize, ProductAvailability, PromoMeta, CartProductInfo, OpenapiCartDetailsResponse, OpenApiErrorResponse, ShippingAddress, OpenApiCartServiceabilityRequest, OpenApiCartServiceabilityResponse, OpenApiFiles, CartItemMeta, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OpenApiCheckoutResponse, AbandonedCart, AbandonedCartResponse, PaymentSelectionLock, CartCurrency, CartDetailCoupon, ChargesThreshold, DeliveryChargesConfig, CartCommonConfig, CartDetailResponse, AddProductCart, AddCartRequest, AddCartDetailResponse, UpdateProductCart, UpdateCartRequest, UpdateCartDetailResponse, OverrideCartItemPromo, OverrideCartItem, OverrideCheckoutReq, OverrideCheckoutResponse, GetShareCartLinkRequest, GetShareCartLinkResponse, SharedCartDetails, SharedCart, SharedCartResponse, CartList, MultiCartResponse, UpdateUserCartMapping, UserInfo, UserCartMappingResponse, PlatformAddCartRequest, PlatformUpdateCartRequest, DeleteCartRequest, DeleteCartDetailResponse, CartItemCountResponse, Coupon, PageCoupon, GetCouponResponse, ApplyCouponRequest, GeoLocation, PlatformAddress, PlatformGetAddressesResponse, SaveAddressResponse, UpdateAddressResponse, DeleteAddressResponse, PlatformSelectCartAddressRequest, ShipmentArticle, PlatformShipmentResponse, PlatformCartShipmentsResponse, UpdateCartShipmentItem, UpdateCartShipmentRequest, PlatformCartMetaRequest, CartMetaResponse, CartMetaMissingResponse, StaffCheckout, CustomerDetails, Files, CheckCart, CartCheckoutResponse, CartDeliveryModesResponse, PickupStoreDetail, StoreDetailsResponse, UpdateCartPaymentRequest, CouponValidity, PaymentCouponValidate, PaymentMeta, PaymentMethod, PlatformCartCheckoutDetailV2Request, UpdateCartPaymentRequestV2, PriceMinMax, ItemPriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersResponse, PromotionPaymentOffer, PromotionPaymentOffersResponse, BulkPriceAdjustmentUpdateRequest, BulkPriceAdjustmentResponse, BulkPriceAdjustmentAddRequest };
1857
+ export { CouponDateMeta, Ownership, CouponAuthor, State, PaymentAllowValue, PaymentModes, PriceRange, PostOrder, BulkBundleRestriction, UsesRemaining, UsesRestriction, Restrictions, Validation, CouponAction, CouponSchedule, Rule, DisplayMetaDict, DisplayMeta, Identifier, Validity, RuleDefinition, CouponAdd, Page, CouponsResponse, SuccessMessage, OperationErrorResponse, CouponUpdate, CouponPartialUpdate, DisplayMeta1, Ownership1, CompareObject, ItemCriteria, DiscountOffer, DiscountRule, PaymentAllowValue1, PromotionPaymentModes, UserRegistered, PostOrder1, UsesRemaining1, UsesRestriction1, Restrictions1, PromotionSchedule, PromotionAction, PromotionAuthor, Visibility, PromotionDateMeta, PromotionListItem, PromotionsResponse, PromotionAdd, PromotionUpdate, PromotionPartialUpdate, ActivePromosResponse, Charges, DeliveryCharges, CartMetaConfigUpdate, CartMetaConfigAdd, Article, PriceAdjustmentRestrictions, Collection, PriceAdjustmentUpdate, BulkPriceAdjustmentUpdate, PriceAdjustment, PriceAdjustmentResponse, GetPriceAdjustmentResponse, PriceAdjustmentAdd, BulkPriceAdjustmentAdd, CartItem, OpenapiCartDetailsRequest, CouponBreakup, DisplayBreakup, LoyaltyPoints, RawBreakup, CartBreakup, ProductImage, Tags, BaseInfo, ActionQuery, ProductAction, CategoryInfo, CartProduct, BasePrice, ArticlePriceInfo, StoreInfo, ProductArticle, Ownership2, DiscountRulesApp, AppliedFreeArticles, BuyRules, AppliedPromotion, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, CouponDetails, ProductPrice, ProductPriceInfo, CartProductIdentifer, ProductAvailabilitySize, ProductAvailability, PromoMeta, CartProductInfo, OpenapiCartDetailsResponse, OpenApiErrorResponse, ShippingAddress, OpenApiCartServiceabilityRequest, OpenApiCartServiceabilityResponse, OpenApiFiles, CartItemMeta, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OpenApiCheckoutResponse, AbandonedCart, AbandonedCartResponse, PaymentSelectionLock, CartCurrency, CartDetailCoupon, ChargesThreshold, DeliveryChargesConfig, CartCommonConfig, CartDetailResponse, AddProductCart, AddCartRequest, AddCartDetailResponse, UpdateProductCart, UpdateCartRequest, UpdateCartDetailResponse, OverrideCartItemPromo, OverrideCartItem, OverrideCheckoutReq, OverrideCheckoutResponse, GetShareCartLinkRequest, GetShareCartLinkResponse, SharedCartDetails, SharedCart, SharedCartResponse, CartList, MultiCartResponse, UpdateUserCartMapping, UserInfo, UserCartMappingResponse, PlatformAddCartRequest, PlatformUpdateCartRequest, DeleteCartRequest, DeleteCartDetailResponse, CartItemCountResponse, Coupon, PageCoupon, GetCouponResponse, ApplyCouponRequest, GeoLocation, PlatformAddress, PlatformGetAddressesResponse, SaveAddressResponse, UpdateAddressResponse, DeleteAddressResponse, PlatformSelectCartAddressRequest, ShipmentArticle, PlatformShipmentResponse, PlatformCartShipmentsResponse, UpdateCartShipmentItem, UpdateCartShipmentRequest, PlatformCartMetaRequest, CartMetaResponse, CartMetaMissingResponse, StaffCheckout, CustomerDetails, Files, CartCheckoutCustomMeta, PlatformCartCheckoutDetailRequest, CheckCart, CartCheckoutResponse, CartDeliveryModesResponse, PickupStoreDetail, StoreDetailsResponse, UpdateCartPaymentRequest, CouponValidity, PaymentCouponValidate, PaymentMeta, PaymentMethod, PlatformCartCheckoutDetailV2Request, UpdateCartPaymentRequestV2, PriceMinMax, ItemPriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersResponse, PromotionPaymentOffer, PromotionPaymentOffersResponse, BulkPriceAdjustmentUpdateRequest, BulkPriceAdjustmentResponse, BulkPriceAdjustmentAddRequest };
1819
1858
  }
1820
1859
  /** @returns {CouponDateMeta} */
1821
1860
  declare function CouponDateMeta(): CouponDateMeta;
@@ -4035,6 +4074,53 @@ type Files = {
4035
4074
  key: string;
4036
4075
  values: string[];
4037
4076
  };
4077
+ /** @returns {CartCheckoutCustomMeta} */
4078
+ declare function CartCheckoutCustomMeta(): CartCheckoutCustomMeta;
4079
+ type CartCheckoutCustomMeta = {
4080
+ key: string;
4081
+ value: string;
4082
+ };
4083
+ /** @returns {PlatformCartCheckoutDetailRequest} */
4084
+ declare function PlatformCartCheckoutDetailRequest(): PlatformCartCheckoutDetailRequest;
4085
+ type PlatformCartCheckoutDetailRequest = {
4086
+ custom_meta?: CartCheckoutCustomMeta[];
4087
+ address_id?: string;
4088
+ payment_identifier?: string;
4089
+ payment_params?: any;
4090
+ payment_auto_confirm?: boolean;
4091
+ id: string;
4092
+ pos?: boolean;
4093
+ billing_address_id?: string;
4094
+ merchant_code?: string;
4095
+ aggregator?: string;
4096
+ pick_at_store_uid?: number;
4097
+ device_id?: string;
4098
+ delivery_address?: any;
4099
+ payment_mode: string;
4100
+ checkout_mode?: string;
4101
+ /**
4102
+ * - Customer details
4103
+ */
4104
+ customer_details?: CustomerDetails;
4105
+ meta?: any;
4106
+ staff?: StaffCheckout;
4107
+ employee_code?: string;
4108
+ billing_address?: any;
4109
+ callback_url?: string;
4110
+ user_id?: string;
4111
+ extra_meta?: any;
4112
+ order_type: string;
4113
+ /**
4114
+ * - List of file url
4115
+ */
4116
+ files?: Files[];
4117
+ ordering_store?: number;
4118
+ payment_extra_identifiers?: any;
4119
+ iin?: string;
4120
+ network?: string;
4121
+ type?: string;
4122
+ card_id?: string;
4123
+ };
4038
4124
  /** @returns {CheckCart} */
4039
4125
  declare function CheckCart(): CheckCart;
4040
4126
  type CheckCart = {
@@ -1753,6 +1753,47 @@ const Joi = require("joi");
1753
1753
  * @property {string[]} values
1754
1754
  */
1755
1755
 
1756
+ /**
1757
+ * @typedef CartCheckoutCustomMeta
1758
+ * @property {string} key
1759
+ * @property {string} value
1760
+ */
1761
+
1762
+ /**
1763
+ * @typedef PlatformCartCheckoutDetailRequest
1764
+ * @property {CartCheckoutCustomMeta[]} [custom_meta]
1765
+ * @property {string} [address_id]
1766
+ * @property {string} [payment_identifier]
1767
+ * @property {Object} [payment_params]
1768
+ * @property {boolean} [payment_auto_confirm]
1769
+ * @property {string} id
1770
+ * @property {boolean} [pos]
1771
+ * @property {string} [billing_address_id]
1772
+ * @property {string} [merchant_code]
1773
+ * @property {string} [aggregator]
1774
+ * @property {number} [pick_at_store_uid]
1775
+ * @property {string} [device_id]
1776
+ * @property {Object} [delivery_address]
1777
+ * @property {string} payment_mode
1778
+ * @property {string} [checkout_mode]
1779
+ * @property {CustomerDetails} [customer_details] - Customer details
1780
+ * @property {Object} [meta]
1781
+ * @property {StaffCheckout} [staff]
1782
+ * @property {string} [employee_code]
1783
+ * @property {Object} [billing_address]
1784
+ * @property {string} [callback_url]
1785
+ * @property {string} [user_id]
1786
+ * @property {Object} [extra_meta]
1787
+ * @property {string} order_type
1788
+ * @property {Files[]} [files] - List of file url
1789
+ * @property {number} [ordering_store]
1790
+ * @property {Object} [payment_extra_identifiers]
1791
+ * @property {string} [iin]
1792
+ * @property {string} [network]
1793
+ * @property {string} [type]
1794
+ * @property {string} [card_id]
1795
+ */
1796
+
1756
1797
  /**
1757
1798
  * @typedef CheckCart
1758
1799
  * @property {string} [coupon_text]
@@ -4086,6 +4127,53 @@ class CartPlatformModel {
4086
4127
  });
4087
4128
  }
4088
4129
 
4130
+ /** @returns {CartCheckoutCustomMeta} */
4131
+ static CartCheckoutCustomMeta() {
4132
+ return Joi.object({
4133
+ key: Joi.string().allow("").required(),
4134
+ value: Joi.string().allow("").required(),
4135
+ });
4136
+ }
4137
+
4138
+ /** @returns {PlatformCartCheckoutDetailRequest} */
4139
+ static PlatformCartCheckoutDetailRequest() {
4140
+ return Joi.object({
4141
+ custom_meta: Joi.array().items(
4142
+ CartPlatformModel.CartCheckoutCustomMeta()
4143
+ ),
4144
+ address_id: Joi.string().allow(""),
4145
+ payment_identifier: Joi.string().allow("").allow(null),
4146
+ payment_params: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""),
4147
+ payment_auto_confirm: Joi.boolean(),
4148
+ id: Joi.string().allow("").required(),
4149
+ pos: Joi.boolean(),
4150
+ billing_address_id: Joi.string().allow(""),
4151
+ merchant_code: Joi.string().allow(""),
4152
+ aggregator: Joi.string().allow(""),
4153
+ pick_at_store_uid: Joi.number().allow(null),
4154
+ device_id: Joi.string().allow("").allow(null),
4155
+ delivery_address: Joi.object().pattern(/\S/, Joi.any()),
4156
+ payment_mode: Joi.string().allow("").required(),
4157
+ checkout_mode: Joi.string().allow(""),
4158
+ customer_details: CartPlatformModel.CustomerDetails(),
4159
+ meta: Joi.object().pattern(/\S/, Joi.any()),
4160
+ staff: CartPlatformModel.StaffCheckout(),
4161
+ employee_code: Joi.string().allow("").allow(null),
4162
+ billing_address: Joi.object().pattern(/\S/, Joi.any()),
4163
+ callback_url: Joi.string().allow("").allow(null),
4164
+ user_id: Joi.string().allow("").allow(null),
4165
+ extra_meta: Joi.object().pattern(/\S/, Joi.any()),
4166
+ order_type: Joi.string().allow("").required(),
4167
+ files: Joi.array().items(CartPlatformModel.Files()),
4168
+ ordering_store: Joi.number().allow(null),
4169
+ payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()),
4170
+ iin: Joi.string().allow(""),
4171
+ network: Joi.string().allow(""),
4172
+ type: Joi.string().allow(""),
4173
+ card_id: Joi.string().allow(""),
4174
+ });
4175
+ }
4176
+
4089
4177
  /** @returns {CheckCart} */
4090
4178
  static CheckCart() {
4091
4179
  return Joi.object({