diff --git a/CHANGELOG.md b/CHANGELOG.md index f9cc7d1f7..53fb391bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ -# CHANGE LOG (1.4.15-beta.3) - 1.9.5 +# CHANGE LOG (1.4.15-beta.4) - 1.9.4 ## Application Client +- [Breaking] [Removed] Finance class from application client ### Cart @@ -14,6 +15,11 @@ - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 +- ##### What's Deprecated + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + #### addItems @@ -21,6 +27,11 @@ - [Added] property cart.applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 +- ##### What's Deprecated + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Breaking] [Deleted] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + #### updateCart @@ -28,6 +39,26 @@ - [Added] property cart.applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 +- ##### What's Deprecated + - [Breaking] [Deleted] property free_gift_items of schema UpdateCartCreation in request body + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Breaking] [Deleted] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### updateCartBreakup + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateCartBreakup + + + +#### getCoupons + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property available_coupon_list[].start_date of schema Coupon in response with status code 200 + - [Deleted] Value format from date-time from property available_coupon_list[].end_date of schema Coupon in response with status code 200 + #### applyCoupon @@ -35,6 +66,11 @@ - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 201 - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 201 +- ##### What's Deprecated + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 201 + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 201 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 201 + #### removeCoupon @@ -42,253 +78,11500 @@ - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 +- ##### What's Deprecated + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### getBulkDiscountOffers + +- ##### What's New + - [Added] Response with status 500 + + +#### applyRewardPoints + +- ##### What's New + - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### getAddresses + +- ##### What's Deprecated + - [Breaking] [Deleted] property validation_config of schema GetAddressesResult in response with status code 200 + + +#### addAddress + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 422 + + +#### selectAddress + +- ##### What's New + - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 201 + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 201 + +- ##### What's Deprecated + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 201 + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 201 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 201 + + +#### selectPaymentMode + +- ##### What's New + - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### validateCouponForPayment + +- ##### What's Deprecated + - [Breaking] [Deleted] property coupon_validity.error_en of schema CouponValidity in response with status code 200 + + +#### getShipments + +- ##### What's New + - [Added] property shipments[].items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Possible values from HomeDelivery,PickAtStore from property shipments[].order_type of schema ShipmentResult in response with status code 200 + - [Breaking] [Deleted] property shipments[].items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property shipments[].items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### checkoutCart + +- ##### What's Deprecated + - [Breaking] [Deleted] method checkoutCart + + + +#### getCartSharedItems + +- ##### What's New + - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 404 + +- ##### What's Deprecated + - [Breaking] [Deleted] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Breaking] [Deleted] property cart.items[].product.action.page of schema ProductAction in response with status code 404 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 404 + + +#### updateCartWithSharedItems + +- ##### What's New + - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### getPromotionOffers + +- ##### What's Deprecated + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property available_promotions[].promotion_type of schema PromotionOffer in response with status code 200 + - [Breaking] [Deleted] property available_promotions[].free_gift_items[].article_price of schema FreeGiftItems in response with status code 200 + - [Breaking] [Deleted] property available_promotions[].free_gift_items[].available_sizes of schema FreeGiftItems in response with status code 200 + - [Breaking] [Deleted] property available_promotions[].free_gift_items[].size of schema FreeGiftItems in response with status code 200 + + +#### getLadderOffers + +- ##### What's Deprecated + - [Breaking] [Deleted] property available_offers[].free_gift_items[].article_price of schema FreeGiftItems in response with status code 200 + - [Breaking] [Deleted] property available_offers[].free_gift_items[].available_sizes of schema FreeGiftItems in response with status code 200 + - [Breaking] [Deleted] property available_offers[].free_gift_items[].size of schema FreeGiftItems in response with status code 200 + + +#### getPromotionPaymentOffers + +- ##### What's Deprecated + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property promotions[].promotion_type of schema PromotionPaymentOffer in response with status code 200 + + +#### checkoutCartV2 + +- ##### What's New + - [Added] Possible nullable value true to property customer_details of schema CartCheckoutDetailV2Request in request body + - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property custom_meta[] of schema CartCheckoutDetailV2Creation in request body + - [Breaking] [Deleted] properties customer_details.email, customer_details.mobile, customer_details.name in request body + - [Deleted] Possible values from HomeDelivery,PickAtStore from property order_type of schema CartCheckoutDetailV2Creation in request body + - [Breaking] [Deleted] property success_callback_url of schema CartCheckoutDetailV2Creation in request body + - [Breaking] [Deleted] property failure_callback_url of schema CartCheckoutDetailV2Creation in request body + - [Breaking] [Deleted] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property custom_meta of schema CartCheckoutDetailV2Creation in request body + - [Changed] customer_details.mobile made optional in request body + + +### Catalog + + + +#### getProductDetailBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] property category_map.l1._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property category_map.l2._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property category_map.l3._custom_json of schema ProductBrand in response with status code 200 + - [Deleted] Possible values from set,standard,composite,digital from property item_type of schema ProductDetail in response with status code 200 + - [Breaking] [Deleted] property categories[]._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property brand._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property promo_meta of schema ProductDetail in response with status code 200 + - [Breaking] [Deleted] property no_of_boxes of schema ProductDetail in response with status code 200 + - [Breaking] [Deleted] property country_of_origin of schema ProductDetail in response with status code 200 + + +#### getProductSizesBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] property moq of schema ProductSizes in response with status code 200 + - [Breaking] [Deleted] property tags of schema ProductSizes in response with status code 200 + - [Breaking] [Deleted] property custom_order of schema ProductSizes in response with status code 200 + - [Breaking] [Deleted] property no_of_boxes of schema ProductSizes in response with status code 200 + - [Breaking] [Deleted] property teaser_tag of schema ProductSizes in response with status code 200 + + +#### getProductComparisonBySlugs + +- ##### What's New + - [Added] property items[].category_map of schema ProductDetail in response with status code 200 + - [Added] property items[].color of schema ProductDetail in response with status code 200 + - [Added] property items[].product_online_date of schema ProductDetail in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].template_tag of schema ProductCompareDetail in response with status code 200 + - [Breaking] [Deleted] property items[].sellable of schema ProductCompareDetail in response with status code 200 + - [Deleted] Possible values from standard,composite,set,digital from property items[].item_type of schema ProductCompareDetail in response with status code 200 + - [Breaking] [Deleted] property items[].categories[]._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].brand._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].country_of_origin of schema ProductCompareDetail in response with status code 200 + + +#### getSimilarComparisonProductBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].category_map.l1._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].category_map.l2._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].category_map.l3._custom_json of schema ProductBrand in response with status code 200 + - [Deleted] Possible values from set,standard,composite,digital from property items[].item_type of schema ProductDetail in response with status code 200 + - [Breaking] [Deleted] property items[].categories[]._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].brand._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].promo_meta of schema ProductDetail in response with status code 200 + - [Breaking] [Deleted] property items[].no_of_boxes of schema ProductDetail in response with status code 200 + - [Breaking] [Deleted] property items[].country_of_origin of schema ProductDetail in response with status code 200 + + +#### getComparedFrequentlyProductBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] property similars.items[].category_map.l1._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property similars.items[].category_map.l2._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property similars.items[].category_map.l3._custom_json of schema ProductBrand in response with status code 200 + - [Deleted] Possible values from set,standard,composite,digital from property similars.items[].item_type of schema ProductDetail in response with status code 200 + - [Breaking] [Deleted] property similars.items[].categories[]._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property similars.items[].brand._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property similars.items[].promo_meta of schema ProductDetail in response with status code 200 + - [Breaking] [Deleted] property similars.items[].no_of_boxes of schema ProductDetail in response with status code 200 + - [Breaking] [Deleted] property similars.items[].country_of_origin of schema ProductDetail in response with status code 200 + + +#### getProductStockByIds + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].seller_identifier of schema ProductStockStatusItem in response with status code 200 + - [Breaking] [Deleted] properties items[].identifier.ean, items[].identifier.alu, items[].identifier.upc, items[].identifier.sku_code in response with status code 200 + - [Breaking] [Deleted] property items[].brand of schema ProductStockStatusItem in response with status code 200 + - [Breaking] [Deleted] property items[].company_id of schema ProductStockStatusItem in response with status code 200 + - [Breaking] [Deleted] property items[].brand_id of schema ProductStockStatusItem in response with status code 200 + - [Breaking] [Deleted] property items[].store_id of schema ProductStockStatusItem in response with status code 200 + - [Breaking] [Deleted] property items[].price_marked of schema ProductStockStatusItem in response with status code 200 + - [Breaking] [Deleted] property items[].price_effective of schema ProductStockStatusItem in response with status code 200 + - [Breaking] [Deleted] property items[].currency of schema ProductStockStatusItem in response with status code 200 + + +#### getProductStockForTimeByIds + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].seller_identifier of schema ProductStockStatusItem in response with status code 200 + - [Breaking] [Deleted] properties items[].identifier.ean, items[].identifier.alu, items[].identifier.upc, items[].identifier.sku_code in response with status code 200 + - [Breaking] [Deleted] property items[].brand of schema ProductStockStatusItem in response with status code 200 + - [Breaking] [Deleted] property items[].company_id of schema ProductStockStatusItem in response with status code 200 + - [Breaking] [Deleted] property items[].brand_id of schema ProductStockStatusItem in response with status code 200 + - [Breaking] [Deleted] property items[].store_id of schema ProductStockStatusItem in response with status code 200 + - [Breaking] [Deleted] property items[].price_marked of schema ProductStockStatusItem in response with status code 200 + - [Breaking] [Deleted] property items[].price_effective of schema ProductStockStatusItem in response with status code 200 + - [Breaking] [Deleted] property items[].currency of schema ProductStockStatusItem in response with status code 200 + + +#### getProducts + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].category_map.l1._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].category_map.l2._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].category_map.l3._custom_json of schema ProductBrand in response with status code 200 + - [Deleted] Possible values from set,standard,composite,digital from property items[].item_type of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property items[].categories[]._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].brand._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].country_of_origin of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property items[].is_tryout of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property items[].channel of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property filters[].values[].logo of schema ProductFiltersValue in response with status code 200 + + +#### getBrandDetailBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] property slug of schema BrandDetailResponseSchema in response with status code 200 + - [Breaking] [Deleted] property _app of schema BrandDetailResponseSchema in response with status code 200 + + +#### getCategories + +- ##### What's Deprecated + - [Breaking] [Deleted] property data[].items[].childs[].childs[].childs[].priority of schema ThirdLevelChild in response with status code 200 + - [Breaking] [Deleted] property data[].items[].childs[].childs[].priority of schema SecondLevelChild in response with status code 200 + - [Breaking] [Deleted] property data[].items[].childs[].priority of schema Child in response with status code 200 + - [Breaking] [Deleted] property data[].items[].priority of schema CategoryItems in response with status code 200 + - [Breaking] [Deleted] property data[].items[]._custom_json of schema CategoryItems in response with status code 200 + + +#### getCategoryDetailBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] property _app of schema CategoryMetaResponseSchema in response with status code 200 + + +#### getHomeProducts + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].category_map.l1._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].category_map.l2._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].category_map.l3._custom_json of schema ProductBrand in response with status code 200 + - [Deleted] Possible values from set,standard,composite,digital from property items[].item_type of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property items[].categories[]._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].brand._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].country_of_origin of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property items[].is_tryout of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property items[].channel of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property sort_on of schema HomeListingResponseSchema in response with status code 200 + + +#### getCollections + +- ##### What's Deprecated + - [Breaking] [Deleted] properties items[]._schedule.cron, items[]._schedule.next_schedule, items[]._schedule.duration, items[]._schedule.start, items[]._schedule.end, items[]._schedule.metadata in response with status code 200 + - [Deleted] Type from string from property items[].query[].value[] of schema CollectionQuery in response with status code 200 + - [Breaking] [Deleted] property items[].published of schema GetCollectionDetailNest in response with status code 200 + - [Breaking] [Deleted] property items[]._id of schema GetCollectionDetailNest in response with status code 200 + - [Breaking] [Deleted] property items[]._locale_language of schema GetCollectionDetailNest in response with status code 200 + - [Breaking] [Deleted] property items[].seo of schema GetCollectionDetailNest in response with status code 200 + - [Breaking] [Deleted] property items[].is_visible of schema GetCollectionDetailNest in response with status code 200 + + +#### getCollectionItemsBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].category_map.l1._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].category_map.l2._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].category_map.l3._custom_json of schema ProductBrand in response with status code 200 + - [Deleted] Possible values from set,standard,composite,digital from property items[].item_type of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property items[].categories[]._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].brand._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].country_of_origin of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property items[].is_tryout of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property items[].channel of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property filters[].values[].logo of schema ProductFiltersValue in response with status code 200 + + +#### getCollectionDetailBySlug + +- ##### What's Deprecated + - [Deleted] Type from string from property query[].value[] of schema CollectionQuery in response with status code 200 + - [Breaking] [Deleted] property uid of schema CollectionDetailResponseSchema in response with status code 200 + - [Breaking] [Deleted] property _id of schema CollectionDetailResponseSchema in response with status code 200 + - [Breaking] [Deleted] property published of schema CollectionDetailResponseSchema in response with status code 200 + - [Breaking] [Deleted] property tags of schema CollectionDetailResponseSchema in response with status code 200 + - [Breaking] [Deleted] property action of schema CollectionDetailResponseSchema in response with status code 200 + - [Breaking] [Deleted] property _locale_language of schema CollectionDetailResponseSchema in response with status code 200 + - [Breaking] [Deleted] property seo of schema CollectionDetailResponseSchema in response with status code 200 + - [Breaking] [Deleted] property is_visible of schema CollectionDetailResponseSchema in response with status code 200 + + +#### getFollowedListing + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].category_map.l1._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].category_map.l2._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].category_map.l3._custom_json of schema ProductBrand in response with status code 200 + - [Deleted] Possible values from set,standard,composite,digital from property items[].item_type of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property items[].categories[]._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].brand._custom_json of schema ProductBrand in response with status code 200 + - [Breaking] [Deleted] property items[].country_of_origin of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property items[].is_tryout of schema ProductListingDetail in response with status code 200 + - [Breaking] [Deleted] property items[].channel of schema ProductListingDetail in response with status code 200 + + +#### getStores + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].manager_contact of schema Store in response with status code 200 + - [Breaking] [Deleted] property items[].contacts of schema Store in response with status code 200 + + +#### getInStockLocations + +- ##### What's Deprecated + - [Breaking] [Deleted] properties filters[].slug, filters[].uid, filters[].is_active, filters[].priority_order, filters[].name, filters[].logo, filters[].modified_by, filters[].modified_on in response with status code 200 + - [Breaking] [Deleted] property items[].departments[].is_active of schema AppStoreDepartment in response with status code 200 + - [Breaking] [Deleted] properties items[].departments[].logo.url, items[].departments[].logo.type, items[].departments[].logo.meta, items[].departments[].logo.alt in response with status code 200 + - [Breaking] [Deleted] property items[].address.lat_long of schema StoreAddressSchema in response with status code 200 + - [Breaking] [Deleted] property items[].address.country_code of schema StoreAddressSchema in response with status code 200 + - [Breaking] [Deleted] property items[].address.address_meta of schema StoreAddressSchema in response with status code 200 + - [Breaking] [Deleted] property items[]._custom_json of schema AppStore in response with status code 200 + - [Breaking] [Deleted] property items[].additional_contacts of schema AppStore in response with status code 200 + - [Breaking] [Deleted] property items[].company_id of schema AppStore in response with status code 200 + - [Breaking] [Deleted] property items[].display_name of schema AppStore in response with status code 200 + - [Breaking] [Deleted] property items[].store_type of schema AppStore in response with status code 200 + - [Breaking] [Deleted] property items[].auto_invoice of schema AppStore in response with status code 200 + - [Breaking] [Deleted] property items[].credit_note of schema AppStore in response with status code 200 + - [Breaking] [Deleted] property items[].stage of schema AppStore in response with status code 200 + - [Breaking] [Deleted] property items[].gst_credentials of schema AppStore in response with status code 200 + - [Breaking] [Deleted] property items[].product_return_config of schema AppStore in response with status code 200 + - [Breaking] [Deleted] property items[].avg_order_processing_time of schema AppStore in response with status code 200 + - [Breaking] [Deleted] property items[].bulk_shipment of schema AppStore in response with status code 200 + - [Breaking] [Deleted] property items[].default_order_acceptance_timing of schema AppStore in response with status code 200 + - [Breaking] [Deleted] property items[].order_acceptance_timing of schema AppStore in response with status code 200 + - [Breaking] [Deleted] property items[].auto_assign_courier_partner of schema AppStore in response with status code 200 + + +#### getLocationDetailsById + +- ##### What's Deprecated + - [Breaking] [Deleted] property address.lat_long of schema StoreAddressSchema in response with status code 200 + - [Breaking] [Deleted] property address.country_code of schema StoreAddressSchema in response with status code 200 + - [Breaking] [Deleted] property address.address_meta of schema StoreAddressSchema in response with status code 200 + - [Breaking] [Deleted] property additional_contacts of schema StoreDetails in response with status code 200 + - [Breaking] [Deleted] property company_id of schema StoreDetails in response with status code 200 + - [Breaking] [Deleted] property display_name of schema StoreDetails in response with status code 200 + - [Breaking] [Deleted] property store_type of schema StoreDetails in response with status code 200 + - [Breaking] [Deleted] property auto_invoice of schema StoreDetails in response with status code 200 + - [Breaking] [Deleted] property credit_note of schema StoreDetails in response with status code 200 + - [Breaking] [Deleted] property stage of schema StoreDetails in response with status code 200 + - [Breaking] [Deleted] property gst_credentials of schema StoreDetails in response with status code 200 + - [Breaking] [Deleted] property product_return_config of schema StoreDetails in response with status code 200 + - [Breaking] [Deleted] property avg_order_processing_time of schema StoreDetails in response with status code 200 + - [Breaking] [Deleted] property bulk_shipment of schema StoreDetails in response with status code 200 + - [Breaking] [Deleted] property default_order_acceptance_timing of schema StoreDetails in response with status code 200 + - [Breaking] [Deleted] property order_acceptance_timing of schema StoreDetails in response with status code 200 + - [Breaking] [Deleted] property auto_assign_courier_partner of schema StoreDetails in response with status code 200 + + +#### getProductPriceBySlug + +- ##### What's Deprecated + - [Deleted] Possible values from set,standard,composite,digital from property item_type of schema ProductSizePriceResponseV3 in response with status code 200 + - [Breaking] [Deleted] property trader of schema ProductSizePriceResponseV3 in response with status code 200 + - [Breaking] [Deleted] property _custom_json of schema ProductSizePriceResponseV3 in response with status code 200 + - [Breaking] [Deleted] property tags of schema ProductSizePriceResponseV3 in response with status code 200 + - [Breaking] [Deleted] property inventory_updated_on of schema ProductSizePriceResponseV3 in response with status code 200 + - [Breaking] [Deleted] property is_serviceable of schema ProductSizePriceResponseV3 in response with status code 200 + + +#### getProductSellersBySlug + +- ##### What's Deprecated + - [Deleted] Possible values from standard,set,composite,digital from property items[].item_type of schema ProductSellersPriceResponseV3 in response with status code 200 + + +### Common + + + +#### searchApplication + +- ##### What's Deprecated + - [Deleted] Possible values from website-and-mobile-apps,store from property application.channel_type of schema Application in response with status code 200 + - [Deleted] Value format from date-time from property application.created_at of schema Application in response with status code 200 + - [Deleted] Value format from date-time from property application.updated_at of schema Application in response with status code 200 + + +### Communication + + + +#### upsertAppPushtoken + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema PushtokenRes in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema PushtokenRes in response with status code 200 + - [Deleted] Value format from date-time from property expired_at of schema PushtokenRes in response with status code 200 + + +### Configuration + + + +#### getApplication + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Application in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema Application in response with status code 200 + - [Deleted] Value format from date-time from property tokens[].created_at of schema TokenSchema in response with status code 200 + + +#### getOwnerInfo + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property application_info.company_info.created_on of schema CompanyInfo in response with status code 200 + - [Deleted] Possible values from home,registered,office from property application_info.company_info.addresses[].address_type of schema CompanyAboutAddress in response with status code 200 + - [Deleted] Value format from date-time from property application_info.created_at of schema ApplicationInfo in response with status code 200 + - [Deleted] Value format from date-time from property application_info.tokens[].created_at of schema TokenSchema in response with status code 200 + + +#### getIntegrationTokens + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema AppTokenResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema AppTokenResponseSchema in response with status code 200 + + +#### getFeatures + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property feature.created_at of schema AppFeature in response with status code 200 + - [Deleted] Value format from date-time from property feature.modified_at of schema AppFeature in response with status code 200 + + +#### getContactInfo + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ApplicationInformation in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema ApplicationInformation in response with status code 200 + + +#### getCurrencies + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema Currency in response with status code 200 + - [Deleted] Value format from date-time from property items[].modified_at of schema Currency in response with status code 200 + + +#### getCurrencyById + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Currency in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema Currency in response with status code 200 + + +#### getAppCurrencies + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property supported_currency[].created_at of schema Currency in response with status code 200 + - [Deleted] Value format from date-time from property supported_currency[].modified_at of schema Currency in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema AppCurrencyResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema AppCurrencyResponseSchema in response with status code 200 + + +#### getAppStaffList + +- ##### What's New + - [Added] Response with status 500 + + +#### getAppStaffs + +- ##### What's New + - [Added] Response with status 500 + + +### Content + + + +#### getAnnouncements + +- ##### What's New + - [Added] Response with status 5XX + + +#### getBlog + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter preview (type: boolean) + + - [Deleted] Value format from date-time from property publish_date of schema BlogSchema in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### getBlogs + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].publish_date of schema BlogSchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].date_meta.modified_on of schema DateMeta in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/application/content/v1.0/blogs To /service/application/content/v1.0/blogs/ + + +#### getDataLoaders + +- ##### What's New + - [Added] Response with status 5XX + + +#### getFaqs + +- ##### What's New + - [Added] Response with status 5XX + + +#### getFaqCategories + +- ##### What's New + - [Added] Response with status 5XX + + +#### getFaqBySlug + +- ##### What's New + - [Added] Response with status 5XX + + +#### getFaqCategoryBySlug + +- ##### What's New + - [Added] Response with status 5XX + + +#### getFaqsByCategorySlug + +- ##### What's New + - [Added] Response with status 5XX + + +#### getLandingPage + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### getLegalInformation + +- ##### What's New + - [Added] Response with status 5XX + + +#### getNavigations + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].date_meta.modified_on of schema DateMeta in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/application/content/v1.0/navigations To /service/application/content/v1.0/navigations/ + + +#### getSEOConfiguration + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property seo.created_at of schema SeoSchema in response with status code 200 + - [Deleted] Value format from date-time from property seo.updated_at of schema SeoSchema in response with status code 200 + + +#### getSEOMarkupSchemas + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Possible values from about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status from property items[].page_type of schema SEOSchemaMarkupTemplate in response with status code 200 + + +#### getSupportInformation + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Support in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Support in response with status code 200 + + +#### getTags + +- ##### What's New + - [Added] Response with status 5XX + + +#### getPage + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### getPages + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].date_meta.modified_on of schema DateMeta in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/application/content/v2.0/pages To /service/application/content/v2.0/pages/ + + +#### getCustomObjectBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomObjectBySlug + + + +#### getCustomFieldsByResourceId + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomFieldsByResourceId + + + +#### getSlideshows + +- ##### What's New + - [Added] method getSlideshows + + + +#### getSlideshow + +- ##### What's New + - [Added] method getSlideshow + + + +#### getCustomObject + +- ##### What's New + - [Added] method getCustomObject + + + +#### getCustomFields + +- ##### What's New + - [Added] method getCustomFields + + + +### FileStorage + + + +#### startUpload + +- ##### What's New + - [Added] cdn made required in response with status code 200 + - [Added] property cdn of schema StartResponse in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/application/assets/v2.0/namespaces/{namespace}/upload/start To /service/application/assets/v1.0/namespaces/{namespace}/upload/start + + +#### completeUpload + +- ##### What's New + - [Added] cdn made required in request body + - [Added] property cdn of schema StartResponse in request body + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_on of schema FileUploadComplete in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema FileUploadComplete in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/application/assets/v2.0/namespaces/{namespace}/upload/complete To /service/application/assets/v1.0/namespaces/{namespace}/upload/complete + + +### Logistic + + + +#### getPincodeCity + +- ##### What's Deprecated + - [Breaking] [Deleted] property data[].meta.deliverables of schema PincodeMetaResult in response with status code 200 + - [Breaking] [Deleted] property data[].meta_code.iso2 of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property data[].meta_code.iso3 of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property data[].meta_code.currency of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property data[].meta_code.phone_code of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property data[].meta_code.parent_id of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property data[].meta_code.zone of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property data[].meta_code.deliverables of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property data[].meta_code.hierarchy of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property data[].meta_code.latitude of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property data[].meta_code.longitude of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property request_uuid of schema PincodeDetails in response with status code 200 + - [Breaking] [Deleted] property stormbreaker_uuid of schema PincodeDetails in response with status code 200 + + +#### getAllCountries + +- ##### What's Deprecated + - [Breaking] [Deleted] property results[].meta.iso2 of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property results[].meta.iso3 of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property results[].meta.currency of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property results[].meta.phone_code of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property results[].meta.parent_id of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property results[].meta.zone of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property results[].meta.deliverables of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property results[].meta.hierarchy of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property results[].meta.latitude of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] property results[].meta.longitude of schema CountryMetaResult in response with status code 200 + - [Breaking] [Deleted] properties results[].logistics.dp.fm_priority, results[].logistics.dp.lm_priority, results[].logistics.dp.rvp_priority, results[].logistics.dp.payment_mode, results[].logistics.dp.operations, results[].logistics.dp.area_code, results[].logistics.dp.assign_dp_from_sb, results[].logistics.dp.internal_account_id, results[].logistics.dp.external_account_id, results[].logistics.dp.transport_mode in response with status code 200 + - [Breaking] [Deleted] property results[].parent_id[] of schema CountryEntityResult in response with status code 200 + - [Breaking] [Deleted] property results[].onboarding_allowed of schema CountryEntityResult in response with status code 200 + - [Breaking] [Deleted] property results[].serviceability of schema CountryEntityResult in response with status code 200 + - [Breaking] [Deleted] property results[].lat_long of schema CountryEntityResult in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] results[].logistics.dp.fm_priority, results[].logistics.dp.lm_priority, results[].logistics.dp.operations, results[].logistics.dp.payment_mode, results[].logistics.dp.rvp_priority made optional in response with status code 200 + - [Breaking] [Changed] Type from array to string of property results[].parent_id of schema CountryEntityResult in response with status code 200 + + +#### getCourierPartners + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCourierPartners + + + +#### getCountries + +- ##### What's New + - [Added] property items[].hierarchy[].name of schema CountryHierarchy in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter hierarchy (type: string) + + - [Breaking] [Deleted] property items[].hierarchy[].display_name of schema CountryHierarchy in response with status code 200 + + +#### getCountry + +- ##### What's New + - [Added] property hierarchy[].name of schema CountryHierarchy in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property hierarchy[].display_name of schema CountryHierarchy in response with status code 200 + + +#### getDeliveryPromise + +- ##### What's Deprecated + - [Breaking] [Deleted] method getDeliveryPromise + + + +#### getLocalities + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter sector (type: string) + + - [Breaking] [Deleted] property items[].meta of schema Localities in response with status code 200 + - [Breaking] [Deleted] property items[].lat_long of schema Localities in response with status code 200 + - [Breaking] [Deleted] property items[].parent_uid of schema Localities in response with status code 200 + - [Breaking] [Deleted] property items[].custom_meta of schema Localities in response with status code 200 + - [Breaking] [Deleted] property items[].serviceability of schema Localities in response with status code 200 + - [Breaking] [Deleted] property items[].localities[].meta of schema LocalityParent in response with status code 200 + - [Breaking] [Deleted] property items[].localities[].parent_uid of schema LocalityParent in response with status code 200 + - [Breaking] [Deleted] property items[].localities[].serviceability of schema LocalityParent in response with status code 200 + - [Breaking] [Deleted] property items[].localities[].code of schema LocalityParent in response with status code 200 + - [Breaking] [Deleted] property items[].localities[].custom_meta of schema LocalityParent in response with status code 200 + + +#### getLocality + +- ##### What's Deprecated + - [Breaking] [Deleted] property meta of schema GetLocality in response with status code 200 + - [Breaking] [Deleted] property parent_uid of schema GetLocality in response with status code 200 + - [Breaking] [Deleted] property serviceability of schema GetLocality in response with status code 200 + - [Breaking] [Deleted] property code of schema GetLocality in response with status code 200 + - [Breaking] [Deleted] property custom_meta of schema GetLocality in response with status code 200 + - [Breaking] [Deleted] property localities[].meta of schema LocalityParent in response with status code 200 + - [Breaking] [Deleted] property localities[].parent_uid of schema LocalityParent in response with status code 200 + - [Breaking] [Deleted] property localities[].serviceability of schema LocalityParent in response with status code 200 + - [Breaking] [Deleted] property localities[].code of schema LocalityParent in response with status code 200 + - [Breaking] [Deleted] property localities[].custom_meta of schema LocalityParent in response with status code 200 + + +### Order + + + +#### getOrders + +- ##### What's Deprecated + - [Deleted] Possible values from HomeDelivery,PickAtStore,Digital from property items[].shipments[].order_type of schema Shipments in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].invoice.updated_date of schema Invoice in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].returnable_date of schema Shipments in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].shipment_created_at of schema Shipments in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].bags[].delivery_date of schema Bags in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items from property items[].shipments[].bags[].applied_promos[].promotion_type of schema AppliedPromos in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].bags[].returnable_date of schema Bags in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].bags[].current_status.updated_at of schema CurrentStatus in response with status code 200 + - [Deleted] Possible values from return,forward from property items[].shipments[].bags[].current_status.journey_type of schema CurrentStatus in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].charges of schema Bags in response with status code 200 + - [Deleted] Possible values from home,office,store from property items[].shipments[].delivery_address.address_type of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].delivery_address.created_at of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property items[].shipments[].delivery_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].delivery_address.updated_at of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,store from property items[].shipments[].billing_address.address_type of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].billing_address.created_at of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property items[].shipments[].billing_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].billing_address.updated_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].delivery_date of schema Shipments in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].charges of schema Shipments in response with status code 200 + - [Breaking] [Deleted] property items[].charges of schema OrderSchema in response with status code 200 + - [Breaking] [Deleted] property items[].currency of schema OrderSchema in response with status code 200 + + +#### getOrderById + +- ##### What's Deprecated + - [Deleted] Possible values from HomeDelivery,PickAtStore,Digital from property order.shipments[].order_type of schema Shipments in response with status code 200 + - [Deleted] Value format from date-time from property order.shipments[].invoice.updated_date of schema Invoice in response with status code 200 + - [Deleted] Value format from date-time from property order.shipments[].returnable_date of schema Shipments in response with status code 200 + - [Deleted] Value format from date-time from property order.shipments[].shipment_created_at of schema Shipments in response with status code 200 + - [Deleted] Value format from date-time from property order.shipments[].bags[].delivery_date of schema Bags in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items from property order.shipments[].bags[].applied_promos[].promotion_type of schema AppliedPromos in response with status code 200 + - [Deleted] Value format from date-time from property order.shipments[].bags[].returnable_date of schema Bags in response with status code 200 + - [Deleted] Value format from date-time from property order.shipments[].bags[].current_status.updated_at of schema CurrentStatus in response with status code 200 + - [Deleted] Possible values from return,forward from property order.shipments[].bags[].current_status.journey_type of schema CurrentStatus in response with status code 200 + - [Breaking] [Deleted] property order.shipments[].bags[].charges of schema Bags in response with status code 200 + - [Deleted] Possible values from home,office,store from property order.shipments[].delivery_address.address_type of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property order.shipments[].delivery_address.created_at of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property order.shipments[].delivery_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property order.shipments[].delivery_address.updated_at of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,store from property order.shipments[].billing_address.address_type of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property order.shipments[].billing_address.created_at of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property order.shipments[].billing_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property order.shipments[].billing_address.updated_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property order.shipments[].delivery_date of schema Shipments in response with status code 200 + - [Breaking] [Deleted] property order.shipments[].charges of schema Shipments in response with status code 200 + - [Breaking] [Deleted] property order.charges of schema OrderSchema in response with status code 200 + - [Breaking] [Deleted] property order.currency of schema OrderSchema in response with status code 200 + + +#### getPosOrderById + +- ##### What's Deprecated + - [Breaking] [Deleted] method getPosOrderById + + + +#### getShipmentById + +- ##### What's Deprecated + - [Deleted] Possible values from HomeDelivery,PickAtStore,Digital from property shipment.order_type of schema Shipments in response with status code 200 + - [Deleted] Value format from date-time from property shipment.invoice.updated_date of schema Invoice in response with status code 200 + - [Deleted] Value format from date-time from property shipment.returnable_date of schema Shipments in response with status code 200 + - [Deleted] Value format from date-time from property shipment.shipment_created_at of schema Shipments in response with status code 200 + - [Deleted] Value format from date-time from property shipment.bags[].delivery_date of schema Bags in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items from property shipment.bags[].applied_promos[].promotion_type of schema AppliedPromos in response with status code 200 + - [Deleted] Value format from date-time from property shipment.bags[].returnable_date of schema Bags in response with status code 200 + - [Deleted] Value format from date-time from property shipment.bags[].current_status.updated_at of schema CurrentStatus in response with status code 200 + - [Deleted] Possible values from return,forward from property shipment.bags[].current_status.journey_type of schema CurrentStatus in response with status code 200 + - [Breaking] [Deleted] property shipment.bags[].charges of schema Bags in response with status code 200 + - [Deleted] Possible values from home,office,store from property shipment.delivery_address.address_type of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipment.delivery_address.created_at of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property shipment.delivery_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipment.delivery_address.updated_at of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,store from property shipment.billing_address.address_type of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipment.billing_address.created_at of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property shipment.billing_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipment.billing_address.updated_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipment.delivery_date of schema Shipments in response with status code 200 + - [Breaking] [Deleted] property shipment.charges of schema Shipments in response with status code 200 + + +#### getInvoiceByShipmentId + +- ##### What's Deprecated + - [Deleted] Possible values from GET,PUT from property presigned_type of schema ResponseGetInvoiceShipment in response with status code 200 + + +#### trackShipment + +- ##### What's Deprecated + - [Deleted] Possible values from forward,reverse,rto from property results[].shipment_type of schema Track in response with status code 200 + - [Deleted] Value format from date-time from property results[].updated_at of schema Track in response with status code 200 + - [Breaking] [Deleted] property results[].meta of schema Track in response with status code 200 + + +#### verifyOtpShipmentCustomer + +- ##### What's Deprecated + - [Breaking] [Deleted] property message of schema VerifyOtpResponseSchema in response with status code 200 + + +#### getShipmentBagReasons + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from property reasons of schema ShipmentBagReasons in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from property success of schema ShipmentBagReasons in response with status code 200 + - [Breaking] [Deleted] property rule_id of schema ShipmentBagReasons in response with status code 200 + + +#### getShipmentReasons + +- ##### What's Deprecated + - [Deleted] Possible values from bag,order from property reasons[].feedback_type of schema ShipmentReason in response with status code 200 + + +#### updateShipmentStatus + +- ##### What's Deprecated + - [Deleted] Value format from int32 from property statuses[].shipments[].data_updates.products[].filters[].line_number of schema ProductsDataUpdatesFilters in request body + - [Breaking] [Deleted] property statuses[].shipments[].data_updates.products[].filters[].quantity of schema ProductsDataUpdatesFilters in request body + + +### Payment + + + +#### getAggregatorsConfig + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Possible values from self,fynd from property razorpay.config_type of schema AggregatorConfigDetail in response with status code 200 + - [Deleted] Possible values from self,fynd from property juspay.config_type of schema AggregatorConfigDetail in response with status code 200 + - [Deleted] Possible values from self,fynd from property simpl.config_type of schema AggregatorConfigDetail in response with status code 200 + - [Deleted] Possible values from self,fynd from property payumoney.config_type of schema AggregatorConfigDetail in response with status code 200 + - [Deleted] Possible values from self,fynd from property rupifi.config_type of schema AggregatorConfigDetail in response with status code 200 + - [Deleted] Possible values from self,fynd from property mswipe.config_type of schema AggregatorConfigDetail in response with status code 200 + - [Deleted] Possible values from self,fynd from property stripe.config_type of schema AggregatorConfigDetail in response with status code 200 + - [Deleted] Possible values from self,fynd from property ccavenue.config_type of schema AggregatorConfigDetail in response with status code 200 + + +#### attachCardToCustomer + +- ##### What's New + - [Added] Possible nullable value true to property card_id of schema AttachCardRequest in request body + - [Added] Response with status 500 + + +#### getActiveCardAggregator + +- ##### What's New + - [Added] Response with status 500 + + +#### getActiveUserCards + +- ##### What's New + - [Added] Response with status 500 + + +#### deleteUserCard + +- ##### What's New + - [Added] Possible nullable value true to property card_id of schema DeletehCardRequest in request body + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Required status to Request body content + + +#### verifyCustomerForPayment + +- ##### What's New + - [Added] Response with status 500 + + +#### verifyAndChargePayment + +- ##### What's New + - [Added] Possible nullable value true to property amount of schema ChargeCustomerRequest in request body + - [Added] Response with status 500 + + +#### initialisePayment + +- ##### What's New + - [Added] Possible nullable value true to property amount of schema PaymentInitializationRequest in request body + - [Breaking] [Added] method made required in request body + - [Breaking] [Added] order_id made required in request body + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property status_code of schema PaymentInitializationDetails in response with status code 200 + + +#### checkAndUpdatePaymentStatus + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property razorpay_payment_id of schema PaymentStatusUpdate in request body + - [Breaking] [Deleted] property merchant_url of schema PaymentStatusUpdate in request body + +- ##### What's Changed + - [Changed] order_id made optional in request body + - [Changed] status made optional in request body + + +#### getPaymentModeRoutes + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property payment_options.payment_option[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + - [Breaking] [Deleted] property advance_payment[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + +- ##### What's Changed + - [Changed] Required status of query parameter cartId + + +#### getPosPaymentModeRoutes + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Required status from query parameter refresh + - [Deleted] Required status from query parameter cardReference + - [Deleted] Required status from query parameter userDetails + - [Breaking] [Deleted] property payment_options.payment_option[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + - [Breaking] [Deleted] property advance_payment[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + +- ##### What's Changed + - [Changed] Required status of query parameter cartId + + +#### getRupifiBannerDetails + +- ##### What's New + - [Added] Response with status 500 + + +#### getEpaylaterBannerDetails + +- ##### What's New + - [Added] Response with status 500 + + +#### resendOrCancelPayment + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Possible values from resend,cancel from property request_type of schema ResendOrCancelPayment in request body + + +#### renderHTML + +- ##### What's New + - [Added] Response with status 500 + + +#### validateVPA + +- ##### What's New + - [Added] Response with status 500 + + +#### cardDetails + +- ##### What's New + - [Added] Possible nullable value true to property data.bank_code of schema CardDetails in response with status code 200 + - [Added] Possible nullable value true to property data.card_sub_type of schema CardDetails in response with status code 200 + - [Added] Response with status 500 + + +#### getActiveRefundTransferModes + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Changed + - [Breaking] [Changed] data[].items made optional in response with status code 200 + + +#### enableOrDisableRefundTransferMode + +- ##### What's New + - [Added] Response with status 500 + + +#### getUserBeneficiariesDetail + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property beneficiaries[].modified_on of schema OrderBeneficiaryDetails in response with status code 200 + - [Deleted] Value format from date-time from property beneficiaries[].created_on of schema OrderBeneficiaryDetails in response with status code 200 + + +#### verifyIfscCode + +- ##### What's New + - [Added] Response with status 500 + + +#### getOrderBeneficiariesDetail + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property beneficiaries[].modified_on of schema OrderBeneficiaryDetails in response with status code 200 + - [Deleted] Value format from date-time from property beneficiaries[].created_on of schema OrderBeneficiaryDetails in response with status code 200 + + +#### verifyOtpAndAddBeneficiaryForBank + +- ##### What's New + - [Added] Response with status 500 + + +#### addBeneficiaryDetails + +- ##### What's New + - [Added] Response with status 500 + + +#### addRefundBankAccountUsingOTP + +- ##### What's New + - [Added] Response with status 500 + + +#### verifyOtpAndAddBeneficiaryForWallet + +- ##### What's New + - [Added] Response with status 500 + + +#### updateDefaultBeneficiary + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property shipment_id of schema SetDefaultBeneficiary in request body + + +#### getPaymentLink + +- ##### What's New + - [Added] Response with status 500 + + +#### createPaymentLink + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property success_redirection_url of schema CreatePaymentLink in request body + - [Breaking] [Deleted] property failure_redirection_url of schema CreatePaymentLink in request body + + +#### resendPaymentLink + +- ##### What's New + - [Added] Response with status 500 + + +#### cancelPaymentLink + +- ##### What's New + - [Added] Response with status 500 + + +#### getPaymentModeRoutesPaymentLink + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property payment_options.payment_option[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + - [Breaking] [Deleted] property advance_payment[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + + +#### pollingPaymentLink + +- ##### What's New + - [Added] Response with status 500 + + +#### createOrderHandlerPaymentLink + +- ##### What's New + - [Added] property failure_callback_url of schema CreateOrderUserRequest in request body + - [Added] property success_callback_url of schema CreateOrderUserRequest in request body + - [Breaking] [Added] payment_methods made required in request body + - [Breaking] [Added] success_callback_url made required in request body + - [Added] success made required in response with status code 200 + - [Added] Response with status 500 + + +#### initialisePaymentPaymentLink + +- ##### What's New + - [Added] Possible nullable value true to property amount of schema PaymentInitializationRequest in request body + - [Breaking] [Added] method made required in request body + - [Breaking] [Added] order_id made required in request body + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property status_code of schema PaymentInitializationDetails in response with status code 200 + + +#### checkAndUpdatePaymentStatusPaymentLink + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property razorpay_payment_id of schema PaymentStatusUpdate in request body + - [Breaking] [Deleted] property merchant_url of schema PaymentStatusUpdate in request body + +- ##### What's Changed + - [Changed] order_id made optional in request body + - [Changed] status made optional in request body + + +#### customerCreditSummary + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property data.due_date of schema CreditSummary in response with status code 200 + + +#### redirectToAggregator + +- ##### What's New + - [Added] property data.signup_url of schema RedirectURL in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Required status from query parameter aggregator + - [Breaking] [Deleted] property data.redirect_url of schema RedirectURL in response with status code 200 + - [Breaking] [Deleted] property data.extra of schema RedirectURL in response with status code 200 + + +#### checkCredit + +- ##### What's New + - [Added] data.status made required in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property data.available_credit of schema CreditDetail in response with status code 200 + + +#### customerOnboard + +- ##### What's New + - [Added] Possible nullable value true to property personal_info.dob of schema UserPersonalInfoInDetails in request body + - [Added] Response with status 500 + + +#### outstandingOrderDetails + +- ##### What's New + - [Added] Response with status 500 + + +#### paidOrderDetails + +- ##### What's New + - [Added] Response with status 500 + + +#### createPaymentOrder + +- ##### What's New + - [Added] Response with status 500 + + +#### validateCustomerAndCreditSummary + +- ##### What's Deprecated + - [Breaking] [Deleted] method validateCustomerAndCreditSummary + + + +### Rewards + + + +#### getOfferByName + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Offer in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Offer in response with status code 200 + + +#### catalogueOrder + +- ##### What's New + - [Added] Response with status 500 + + +#### getUserPointsHistory + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema PointsHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema PointsHistory in response with status code 200 + + +#### getUserPoints + +- ##### What's New + - [Added] Response with status 500 + + +#### getUserReferralDetails + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property referral.created_at of schema Offer in response with status code 200 + - [Deleted] Value format from date-time from property referral.updated_at of schema Offer in response with status code 200 + + +#### getOrderDiscount + +- ##### What's New + - [Added] Response with status 500 + + +#### redeemReferralCode + +- ##### What's New + - [Added] Response with status 500 + + +### Share + + + +#### createShortLink + +- ##### What's New + - [Breaking] [Added] url made required in request body + - [Breaking] [Added] redirects.expiry, redirects.url made required in request body + - [Breaking] [Added] redirects.expiry, redirects.url made required in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property expire_at of schema ShortLinkReq in request body + - [Deleted] Value format from date-time from property expire_at of schema ShortLinkRes in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema ShortLinkRes in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ShortLinkRes in response with status code 200 + + +#### getShortLinkByHash + +- ##### What's New + - [Breaking] [Added] redirects.expiry, redirects.url made required in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property expire_at of schema ShortLinkRes in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema ShortLinkRes in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ShortLinkRes in response with status code 200 + + +#### getOriginalShortLinkByHash + +- ##### What's New + - [Breaking] [Added] redirects.expiry, redirects.url made required in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property expire_at of schema ShortLinkRes in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema ShortLinkRes in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ShortLinkRes in response with status code 200 + + +### Theme + + + +#### getAllPages + +- ##### What's New + - [Added] property pages[].sections[].source of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property pages[].sections[].__source of schema AvailablePageSchemaSections in response with status code 200 + - [Breaking] [Deleted] property pages[].sections[].assets of schema AvailablePageSchemaSections in response with status code 200 + + +#### getPage + +- ##### What's New + - [Added] property sections[].source of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property sections[].__source of schema AvailablePageSchemaSections in response with status code 200 + - [Breaking] [Deleted] property sections[].assets of schema AvailablePageSchemaSections in response with status code 200 + + +#### getAppliedTheme + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter filters (type: boolean) + + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +#### getThemeForPreview + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter filters (type: boolean) + + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +### User + + + +#### loginWithFacebook + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### loginWithGoogle + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### loginWithGoogleAndroid + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### loginWithGoogleIOS + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### loginWithAppleIOS + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### loginWithOTP + +- ##### What's Deprecated + - [Deleted] Value format from ind64 from property resend_timer of schema SendOtp in response with status code 200 + + +#### loginWithEmailAndPassword + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### forgotPassword + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### loginWithToken + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### registerWithForm + +- ##### What's Deprecated + - [Deleted] Value format from int64 from property resend_timer of schema RegisterFormSuccess in response with status code 200 + + +#### sendOTPOnMobile + +- ##### What's Deprecated + - [Deleted] Value format from int64 from property resend_timer of schema SendOtpSuccess in response with status code 200 + + +#### sendForgotOTPOnMobile + +- ##### What's Deprecated + - [Deleted] Value format from int64 from property resend_timer of schema SendOtpSuccess in response with status code 200 + + +#### verifyMobileOTP + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### verifyEmailOTP + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### getLoggedInUser + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### getPlatformConfig + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property updated_at of schema PlatformSchema in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema PlatformSchema in response with status code 200 + + +#### updateProfile + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from int64 from property resend_timer of schema ProfileEditSuccess in response with status code 200 + + +#### addMobileNumber + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### deleteMobileNumber + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### setMobileNumberAsPrimary + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### addEmail + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### deleteEmail + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### setEmailAsPrimary + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +### Webhook + + + +#### saveClickEvent + +- ##### What's Deprecated + - [Breaking] [Deleted] property sent_at of schema ClickEventPayload in request body + + +## Partner Client + + + +### FileStorage + + + +#### getAllNamespaceDetails + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAllNamespaceDetails + + + +#### getNamespaceDetail + +- ##### What's Deprecated + - [Breaking] [Deleted] method getNamespaceDetail + + + +#### completeUpload + +- ##### What's New + - [Breaking] [Added] cdn made required in request body + - [Added] property cdn of schema StartResponse in request body + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_on of schema FileUploadComplete in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema FileUploadComplete in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/partner/assets/v2.0/organization/{organization_id}/namespaces/{namespace}/upload/complete To /service/partner/assets/v1.0/organization/{organization_id}/namespaces/{namespace}/upload/complete + + +#### startUpload + +- ##### What's New + - [Breaking] [Added] cdn made required in response with status code 200 + - [Added] property cdn of schema StartResponse in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/partner/assets/v2.0/organization/{organization_id}/namespaces/{namespace}/upload/start To /service/partner/assets/v1.0/organization/{organization_id}/namespaces/{namespace}/upload/start + + +#### browse + +- ##### What's New + - [Added] property items[].createdAt of schema in response with status code 200 + - [Added] property items[].updatedAt of schema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].created_at of schema in response with status code 200 + - [Breaking] [Deleted] property items[].updated_at of schema in response with status code 200 + + +#### browseFiles + +- ##### What's Deprecated + - [Breaking] [Deleted] method browseFiles + + + +#### organizationLevelFetchProxy + +- ##### What's Deprecated + - [Breaking] [Deleted] method organizationLevelFetchProxy + + + +#### saveOrganizationLevelProxy + +- ##### What's Deprecated + - [Breaking] [Deleted] method saveOrganizationLevelProxy + + + +#### fetchProxy + +- ##### What's Deprecated + - [Breaking] [Deleted] method fetchProxy + + + +#### saveProxyDetails + +- ##### What's Deprecated + - [Breaking] [Deleted] method saveProxyDetails + + + +### Logistics + + + +#### sampleFileServiceability + +- ##### What's Deprecated + - [Deleted] Possible values from completed,failed,partial,processing from property status of schema BulkRegionServiceabilityTatResultItemData in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property file_path of schema BulkRegionServiceabilityTatResultItemData in response with status code 200 + + +#### getSampleFileServiceabilityStatus + +- ##### What's Deprecated + - [Deleted] Possible values from completed,failed,partial,processing from property items[].status of schema BulkRegionServiceabilityTatResultItemData in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].file_path of schema BulkRegionServiceabilityTatResultItemData in response with status code 200 + + +#### bulkTat + +- ##### What's New + - [Added] status made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property file_path of schema BulkRegionJobDetails in request body + - [Deleted] Possible values from import,export from property action of schema BulkRegionResultItemData in response with status code 200 + + +#### getBulkTat + +- ##### What's New + - [Added] items[].status made required in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from import,export from property items[].action of schema BulkRegionResultItemData in response with status code 200 + + +#### createDeliveryTime + +- ##### What's Deprecated + - [Breaking] [Deleted] method createDeliveryTime + + + +#### getDeliveryTimes + +- ##### What's Deprecated + - [Breaking] [Deleted] method getDeliveryTimes + + + +#### getDeliveryTime + +- ##### What's Deprecated + - [Breaking] [Deleted] method getDeliveryTime + + + +#### updateDeliveryTime + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateDeliveryTime + + + +#### deleteDeliveryTime + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteDeliveryTime + + + +#### createServiceability + +- ##### What's Deprecated + - [Breaking] [Deleted] method createServiceability + + + +#### getServiceabilities + +- ##### What's Deprecated + - [Breaking] [Deleted] method getServiceabilities + + + +#### getServiceability + +- ##### What's Deprecated + - [Breaking] [Deleted] method getServiceability + + + +#### updateServiceability + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateServiceability + + + +#### deleteServiceability + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteServiceability + + + +#### bulkServiceability + +- ##### What's New + - [Added] status made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property file_path of schema BulkRegionJobDetails in request body + - [Deleted] Possible values from import,export from property action of schema BulkRegionResultItemData in response with status code 200 + + +#### getBulkServiceability + +- ##### What's New + - [Added] items[].status made required in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from import,export from property items[].action of schema BulkRegionResultItemData in response with status code 200 + + +#### createCourierPartnerAccount + +- ##### What's New + - [Breaking] [Added] is_own_account made required in request body + - [Added] is_own_account made required in response with status code 200 + + +#### getCourierPartnerAccounts + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property items[].scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + + +#### updateCourierPartnerAccount + +- ##### What's New + - [Added] property account_id of schema CourierAccount in request body + - [Breaking] [Added] stage made required in request body + - [Breaking] [Added] is_own_account made required in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] property scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + + +#### getCourierPartnerAccount + +- ##### What's Deprecated + - [Breaking] [Deleted] property scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + + +#### getCountries + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].has_next_hierarchy of schema GetCountriesItems in response with status code 200 + + +#### createCourierPartnerScheme + +- ##### What's New + - [Added] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in request body + - [Added] property feature.status_updates of schema CourierPartnerSchemeFeatures in request body + - [Added] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Added] property feature.status_updates of schema CourierPartnerSchemeFeatures in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property volumetric_weight of schema CourierPartnerSchemeV2DetailsModel in request body + - [Breaking] [Deleted] property status_updates of schema CourierPartnerSchemeV2DetailsModel in request body + - [Breaking] [Deleted] property ndr_attempts of schema CourierPartnerSchemeV2DetailsModel in request body + - [Breaking] [Deleted] property qc_shipment_item_quantity of schema CourierPartnerSchemeV2DetailsModel in request body + - [Breaking] [Deleted] property non_qc_shipment_item_quantity of schema CourierPartnerSchemeV2DetailsModel in request body + - [Breaking] [Deleted] property company_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Breaking] [Deleted] property volumetric_weight of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Breaking] [Deleted] property status_updates of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Breaking] [Deleted] property ndr_attempts of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Breaking] [Deleted] property qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Breaking] [Deleted] property non_qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/partner/logistics/v2.0/organization/{organization_id}/courier-partner/scheme To /service/partner/logistics/v1.0/organization/{organization_id}/courier-partner/scheme/ + + +#### getCourierPartnerSchemes + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCourierPartnerSchemes + + + +#### updateCourierPartnerScheme + +- ##### What's New + - [Added] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in request body + - [Added] property feature.status_updates of schema CourierPartnerSchemeFeatures in request body + - [Added] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Added] property feature.status_updates of schema CourierPartnerSchemeFeatures in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property volumetric_weight of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Breaking] [Deleted] property status_updates of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Breaking] [Deleted] property ndr_attempts of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Breaking] [Deleted] property qc_shipment_item_quantity of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Breaking] [Deleted] property non_qc_shipment_item_quantity of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Breaking] [Deleted] property extension_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Breaking] [Deleted] property scheme_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Breaking] [Deleted] property company_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Breaking] [Deleted] property volumetric_weight of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Breaking] [Deleted] property status_updates of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Breaking] [Deleted] property ndr_attempts of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Breaking] [Deleted] property qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Breaking] [Deleted] property non_qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] extension_id made optional in response with status code 200 + - [Breaking] [Changed] scheme_id made optional in response with status code 200 + - [Changed] Path From /service/partner/logistics/v2.0/organization/{organization_id}/courier-partner/scheme/{scheme_id} To /service/partner/logistics/v1.0/organization/{organization_id}/courier-partner/scheme/{scheme_id} + + +#### getCourierPartnerScheme + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCourierPartnerScheme + + + +### Theme + + + +#### getAllPages + +- ##### What's New + - [Added] property pages[].sections[].source of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property pages[].sections[].__source of schema AvailablePageSchemaSections in response with status code 200 + - [Deleted] Value format from date-time from property pages[].created_at of schema AvailablePageSchema in response with status code 200 + - [Deleted] Value format from date-time from property pages[].updated_at of schema AvailablePageSchema in response with status code 200 + + +#### createPage + +- ##### What's New + - [Added] property sections[].source of schema AvailablePageSchemaSections in request body + - [Added] property sections[].source of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property sections[].__source of schema AvailablePageSchemaSections in request body + - [Deleted] Value format from date-time from property created_at of schema AvailablePageSchema in request body + - [Deleted] Value format from date-time from property updated_at of schema AvailablePageSchema in request body + - [Breaking] [Deleted] property sections[].__source of schema AvailablePageSchemaSections in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema AvailablePageSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema AvailablePageSchema in response with status code 200 + + +#### updateMultiplePages + +- ##### What's New + - [Added] property pages[].sections[].source of schema AvailablePageSchemaSections in request body + - [Added] property pages[].sections[].source of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property pages[].sections[].__source of schema AvailablePageSchemaSections in request body + - [Deleted] Value format from date-time from property pages[].created_at of schema AvailablePageSchema in request body + - [Deleted] Value format from date-time from property pages[].updated_at of schema AvailablePageSchema in request body + - [Breaking] [Deleted] property pages[].sections[].__source of schema AvailablePageSchemaSections in response with status code 200 + - [Deleted] Value format from date-time from property pages[].created_at of schema AvailablePageSchema in response with status code 200 + - [Deleted] Value format from date-time from property pages[].updated_at of schema AvailablePageSchema in response with status code 200 + + +#### getPage + +- ##### What's New + - [Added] property sections[].source of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property sections[].__source of schema AvailablePageSchemaSections in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema AvailablePageSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema AvailablePageSchema in response with status code 200 + + +#### updatePage + +- ##### What's New + - [Added] property sections[].source of schema AvailablePageSchemaSections in request body + - [Added] property sections[].source of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property sections[].__source of schema AvailablePageSchemaSections in request body + - [Deleted] Value format from date-time from property created_at of schema AvailablePageSchema in request body + - [Deleted] Value format from date-time from property updated_at of schema AvailablePageSchema in request body + - [Breaking] [Deleted] property sections[].__source of schema AvailablePageSchemaSections in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema AvailablePageSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema AvailablePageSchema in response with status code 200 + + +#### deletePage + +- ##### What's New + - [Added] property sections[].source of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property sections[].__source of schema AvailablePageSchemaSections in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema AvailablePageSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema AvailablePageSchema in response with status code 200 + + +#### getApplicationThemes + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property [].created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property [].updated_at of schema ThemesSchema in response with status code 200 + + +#### getThemeById + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +#### updateTheme + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +#### deleteTheme + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +#### getThemeRejectionReasons + +- ##### What's Deprecated + - [Breaking] [Deleted] properties rejection_reasons.theme_file, rejection_reasons.theme_details, rejection_reasons.theme_value_proposition, rejection_reasons.theme_attributes, rejection_reasons.theme_variations, rejection_reasons.theme_docs, rejection_reasons.theme_review in response with status code 200 + + +#### createTheme + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +### Webhook + + + +#### responseTimeSummary + +- ##### What's Deprecated + - [Breaking] [Deleted] method responseTimeSummary + + + +#### getDeliveryDetailInsights + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property start_date of schema DeliveryDetailsPayload in request body + - [Deleted] Value format from date-time from property end_date of schema DeliveryDetailsPayload in request body + + +#### getHistoricalReports + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].filters.end_date of schema HistoryFilters in response with status code 200 + - [Deleted] Value format from date-time from property items[].filters.start_date of schema HistoryFilters in response with status code 200 + - [Deleted] Possible values from kafka,rest,sqs,event_bridge,temporal,pub_sub from property items[].filters.webhook_type[] of schema HistoryFilters in response with status code 200 + - [Deleted] Value format from date-time from property items[].created_on of schema HistoryItems in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_on of schema HistoryItems in response with status code 200 + + +#### getInvalidEventList + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property start_date of schema InvalidEventsPayload in request body + - [Deleted] Value format from date-time from property end_date of schema InvalidEventsPayload in request body + + +#### fetchSubscribers + +- ##### What's New + - [Added] property items[].event_configs[].subscriber_event_mapping.topic of schema SubscriberEventMapping in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property items[].custom_headers of schema ItemSchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_on of schema ItemSchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].created_on of schema ItemSchema in response with status code 200 + - [Deleted] Possible values from hmac from property items[].auth_meta.type of schema AuthMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].event_configs[].created_on of schema EventConfigDetails in response with status code 200 + - [Deleted] Value format from date-time from property items[].event_configs[].updated_on of schema EventConfigDetails in response with status code 200 + - [Breaking] [Deleted] property items[].event_configs[].subscriber_event_mapping.broadcaster_config of schema SubscriberEventMapping in response with status code 200 + - [Deleted] Value format from date-time from property items[].event_configs[].subscriber_event_mapping.created_on of schema SubscriberEventMapping in response with status code 200 + + +## Platform Client + +- [Added] Finance class in platform client + + +### Analytics + + + +#### executeJobForProvidedParametersV2 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties rows, page in response with status code 200 + - [Breaking] [Deleted] Security in Request + + +#### startDownloadForQueryV2 + +- ##### What's Deprecated + - [Breaking] [Deleted] Security in Request + + +#### checkJobStatusByNameV2 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties start_date, end_date, status, message, file_metadata in response with status code 200 + - [Breaking] [Deleted] Security in Request + + +### AuditTrail + + + +#### createAuditLog + +- ##### What's New + - [Added] Response with status 400 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property log_meta.sessions of schema LogMetaObj in request body + +- ##### What's Changed + - [Changed] Path From /service/platform/webhook/v1.0/company/{company_id}/audit/logs/create To /service/platform/audit-trail/v1.0/company/{company_id}/logs + + +#### getAuditLogs + +- ##### What's New + - [Added] method getAuditLogs + + + +#### getAuditLog + +- ##### What's New + - [Added] method getAuditLog + + + +#### getEntityTypes + +- ##### What's New + - [Added] method getEntityTypes + + + +### Billing + + + +#### getChargeDetails + +- ##### What's New + - [Added] Possible values day to property recurring.interval of schema ChargeRecurring in response with status code 200 + - [Added] Possible values week to property recurring.interval of schema ChargeRecurring in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Type from integer from property code of schema ResourceNotFound in response with status code 404 + - [Deleted] Type from boolean from property success of schema ResourceNotFound in response with status code 404 + - [Breaking] [Deleted] Security in Request + + +#### getSubscriptionCharge + +- ##### What's Deprecated + - [Deleted] Possible values from extension,theme,subscription from property entity_type of schema SubscriptionChargeRes in response with status code 200 + - [Deleted] Possible values from pending,expired,declined,active,frozen,cancelled,no_renew,success,failed from property status of schema SubscriptionChargeRes in response with status code 200 + - [Deleted] Type from integer from property code of schema ResourceNotFound in response with status code 404 + - [Deleted] Type from boolean from property success of schema ResourceNotFound in response with status code 404 + - [Breaking] [Deleted] Security in Request + + +#### cancelSubscriptionCharge + +- ##### What's Deprecated + - [Deleted] Possible values from extension,theme,subscription from property entity_type of schema SubscriptionChargeRes in response with status code 200 + - [Deleted] Possible values from pending,expired,declined,active,frozen,cancelled,no_renew,success,failed from property status of schema SubscriptionChargeRes in response with status code 200 + - [Deleted] Type from integer from property code of schema ResourceNotFound in response with status code 404 + - [Deleted] Type from boolean from property success of schema ResourceNotFound in response with status code 404 + - [Breaking] [Deleted] Security in Request + + +#### createOneTimeCharge + +- ##### What's Deprecated + - [Deleted] Possible values from subscription,extension,standalone from property charge.final_charge.charge_type of schema OneTimeChargeEntity in response with status code 200 + - [Deleted] Possible values from pending,expired,declined,active,frozen,cancelled,no_renew,success,failed from property charge.final_charge.status of schema OneTimeChargeEntity in response with status code 200 + - [Deleted] Possible values from extension,theme from property charge.final_charge.entity_type of schema OneTimeChargeEntity in response with status code 200 + - [Breaking] [Deleted] Security in Request + + +#### createSubscriptionCharge + +- ##### What's New + - [Breaking] [Added] Value format int32 to property trial_days of schema CreateSubscriptionCharge in request body + - [Breaking] [Added] Value format int32 to property line_items[].trial_days of schema ChargeLineItem in request body + - [Added] Possible values day to property subscription.line_items[].recurring.interval of schema ChargeRecurring in response with status code 200 + - [Added] Possible values week to property subscription.line_items[].recurring.interval of schema ChargeRecurring in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from extension,theme from property subscription.entity_type of schema EntitySubscription in response with status code 200 + - [Deleted] Possible values from pending,expired,declined,active,frozen,cancelled,no_renew,success,failed from property subscription.status of schema EntitySubscription in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to integer of property trial_days of schema CreateSubscriptionCharge in request body + - [Breaking] [Changed] Type from number to integer of property line_items[].trial_days of schema ChargeLineItem in request body + + +### Cart + + + +#### getCoupons + +- ##### What's New + - [Added] items[].ownership.payable_category made required in response with status code 200 + - [Added] items[].rule_definition.applicable_on, items[].rule_definition.calculate_on, items[].rule_definition.type, items[].rule_definition.value_type made required in response with status code 200 + - [Added] items[].identifiers made required in response with status code 200 + - [Added] items[].ownership made required in response with status code 200 + - [Added] items[].rule made required in response with status code 200 + - [Added] items[].rule_definition made required in response with status code 200 + - [Added] items[].type_slug made required in response with status code 200 + - [Added] items[].validity made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter createdBy (type: string) + + - [Breaking] [Deleted] query parameter reviewedBy (type: string) + + - [Breaking] [Deleted] query parameter approvedStartTime (type: string) + + - [Breaking] [Deleted] query parameter approvedEndTime (type: string) + + - [Breaking] [Deleted] query parameter reviewStartTime (type: string) + + - [Breaking] [Deleted] query parameter reviewEndTime (type: string) + + - [Breaking] [Deleted] query parameter status (type: string) + + - [Breaking] [Deleted] property items[].date_meta.approved_on of schema CouponDateMeta in response with status code 200 + - [Breaking] [Deleted] property items[].date_meta.rejected_on of schema CouponDateMeta in response with status code 200 + - [Breaking] [Deleted] property items[].date_meta.reviewed_on of schema CouponDateMeta in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].ownership.payable_by of schema Ownership in response with status code 200 + - [Breaking] [Deleted] property items[].author.approved_by of schema CouponAuthor in response with status code 200 + - [Breaking] [Deleted] property items[].author.rejected_by of schema CouponAuthor in response with status code 200 + - [Breaking] [Deleted] property items[].author.reviewed_by of schema CouponAuthor in response with status code 200 + - [Breaking] [Deleted] properties items[].restrictions.payments.codes, items[].restrictions.payments.iins, items[].restrictions.payments.types, items[].restrictions.payments.networks, items[].restrictions.payments.uses in response with status code 200 + - [Breaking] [Deleted] property items[].coupon_type of schema CouponAdd in response with status code 200 + - [Breaking] [Deleted] property items[].coupon_prefix of schema CouponAdd in response with status code 200 + - [Breaking] [Deleted] property items[].coupon_counts of schema CouponAdd in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[]._schedule.start of schema CouponSchedule in response with status code 200 + - [Breaking] [Deleted] property items[]._schedule.status of schema CouponSchedule in response with status code 200 + + +#### createCoupon + +- ##### What's New + - [Added] ownership.payable_category made required in request body + - [Added] rule_definition.applicable_on, rule_definition.calculate_on, rule_definition.type, rule_definition.value_type made required in request body + - [Added] identifiers made required in request body + - [Added] ownership made required in request body + - [Added] rule made required in request body + - [Added] rule_definition made required in request body + - [Added] type_slug made required in request body + - [Added] validity made required in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] property date_meta.approved_on of schema CouponDateMeta in request body + - [Breaking] [Deleted] property date_meta.rejected_on of schema CouponDateMeta in request body + - [Breaking] [Deleted] property date_meta.reviewed_on of schema CouponDateMeta in request body + - [Breaking] [Deleted] Possible nullable value from true from property ownership.payable_by of schema Ownership in request body + - [Breaking] [Deleted] property author.approved_by of schema CouponAuthor in request body + - [Breaking] [Deleted] property author.rejected_by of schema CouponAuthor in request body + - [Breaking] [Deleted] property author.reviewed_by of schema CouponAuthor in request body + - [Breaking] [Deleted] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in request body + - [Breaking] [Deleted] property coupon_type of schema CouponAdd in request body + - [Breaking] [Deleted] property coupon_prefix of schema CouponAdd in request body + - [Breaking] [Deleted] property coupon_counts of schema CouponAdd in request body + - [Breaking] [Deleted] Possible nullable value from true from property _schedule.start of schema CouponSchedule in request body + - [Breaking] [Deleted] property _schedule.status of schema CouponSchedule in request body + - [Breaking] [Deleted] property _id of schema CouponCreateResult in response with status code 201 + + +#### getCouponById + +- ##### What's New + - [Added] ownership.payable_category made required in response with status code 200 + - [Added] rule_definition.applicable_on, rule_definition.calculate_on, rule_definition.type, rule_definition.value_type made required in response with status code 200 + - [Added] identifiers made required in response with status code 200 + - [Added] ownership made required in response with status code 200 + - [Added] rule made required in response with status code 200 + - [Added] rule_definition made required in response with status code 200 + - [Added] type_slug made required in response with status code 200 + - [Added] validity made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property date_meta.approved_on of schema CouponDateMeta in response with status code 200 + - [Breaking] [Deleted] property date_meta.rejected_on of schema CouponDateMeta in response with status code 200 + - [Breaking] [Deleted] property date_meta.reviewed_on of schema CouponDateMeta in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property ownership.payable_by of schema Ownership in response with status code 200 + - [Breaking] [Deleted] property author.approved_by of schema CouponAuthor in response with status code 200 + - [Breaking] [Deleted] property author.rejected_by of schema CouponAuthor in response with status code 200 + - [Breaking] [Deleted] property author.reviewed_by of schema CouponAuthor in response with status code 200 + - [Breaking] [Deleted] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property _schedule.start of schema CouponSchedule in response with status code 200 + - [Breaking] [Deleted] property _schedule.status of schema CouponSchedule in response with status code 200 + - [Breaking] [Deleted] property coupon_type of schema CouponUpdate in response with status code 200 + - [Breaking] [Deleted] property coupon_prefix of schema CouponUpdate in response with status code 200 + - [Breaking] [Deleted] property coupon_counts of schema CouponUpdate in response with status code 200 + - [Breaking] [Deleted] property reason of schema CouponUpdate in response with status code 200 + + +#### updateCoupon + +- ##### What's New + - [Added] ownership.payable_category made required in request body + - [Added] rule_definition.applicable_on, rule_definition.calculate_on, rule_definition.type, rule_definition.value_type made required in request body + - [Added] identifiers made required in request body + - [Added] ownership made required in request body + - [Added] rule made required in request body + - [Added] rule_definition made required in request body + - [Added] type_slug made required in request body + - [Added] validity made required in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] property date_meta.approved_on of schema CouponDateMeta in request body + - [Breaking] [Deleted] property date_meta.rejected_on of schema CouponDateMeta in request body + - [Breaking] [Deleted] property date_meta.reviewed_on of schema CouponDateMeta in request body + - [Breaking] [Deleted] Possible nullable value from true from property ownership.payable_by of schema Ownership in request body + - [Breaking] [Deleted] property author.approved_by of schema CouponAuthor in request body + - [Breaking] [Deleted] property author.rejected_by of schema CouponAuthor in request body + - [Breaking] [Deleted] property author.reviewed_by of schema CouponAuthor in request body + - [Breaking] [Deleted] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in request body + - [Breaking] [Deleted] Possible nullable value from true from property _schedule.start of schema CouponSchedule in request body + - [Breaking] [Deleted] property _schedule.status of schema CouponSchedule in request body + - [Breaking] [Deleted] property coupon_type of schema CouponUpdate in request body + - [Breaking] [Deleted] property coupon_prefix of schema CouponUpdate in request body + - [Breaking] [Deleted] property coupon_counts of schema CouponUpdate in request body + - [Breaking] [Deleted] property reason of schema CouponUpdate in request body + - [Breaking] [Deleted] property _id of schema CouponCreateResult in response with status code 200 + + +#### updateCouponPartially + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property schedule.start of schema CouponSchedule in request body + - [Breaking] [Deleted] property schedule.status of schema CouponSchedule in request body + + +#### deleteCoupon + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteCoupon + + + +#### getPromotions + +- ##### What's New + - [Added] items[].ownership.payable_by, items[].ownership.payable_category made required in response with status code 200 + - [Added] items[].restrictions.uses made required in response with status code 200 + - [Added] items[]._schedule.end, items[]._schedule.published, items[]._schedule.start made required in response with status code 200 + - [Added] items[].post_order_action.action_date, items[].post_order_action.action_type made required in response with status code 200 + - [Added] items[].visiblility.coupon_list, items[].visiblility.pdp made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter createdBy (type: string) + + - [Breaking] [Deleted] query parameter reviewedBy (type: string) + + - [Breaking] [Deleted] query parameter approvedStartTime (type: string) + + - [Breaking] [Deleted] query parameter approvedEndTime (type: string) + + - [Breaking] [Deleted] query parameter reviewStartTime (type: string) + + - [Breaking] [Deleted] query parameter reviewEndTime (type: string) + + - [Breaking] [Deleted] query parameter status (type: string) + + - [Breaking] [Deleted] Possible nullable value from true from property items[].display_meta.description of schema DisplayMeta1 in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].display_meta.name of schema DisplayMeta1 in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].display_meta.offer_text of schema DisplayMeta1 in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_quantity.equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_quantity.greater_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_quantity.less_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_quantity.less_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_quantity.greater_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_total.equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_total.greater_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_total.less_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_total.less_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_total.greater_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_unique_item_quantity.equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_unique_item_quantity.greater_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_unique_item_quantity.less_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_unique_item_quantity.less_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_unique_item_quantity.greater_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_unique_item_amount.equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_unique_item_amount.greater_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_unique_item_amount.less_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_unique_item_amount.less_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].item_criteria.cart_unique_item_amount.greater_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] property items[].discount_rules[].meta of schema DiscountRule in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].discount_rules[].offer.max_usage_per_transaction of schema DiscountOffer in response with status code 200 + - [Breaking] [Deleted] properties items[].restrictions.payments.codes, items[].restrictions.payments.iins, items[].restrictions.payments.types, items[].restrictions.payments.networks, items[].restrictions.payments.uses in response with status code 200 + - [Breaking] [Deleted] property items[].is_processed of schema PromotionListItem in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[]._schedule.end of schema PromotionSchedule in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[]._schedule.start of schema PromotionSchedule in response with status code 200 + - [Breaking] [Deleted] property items[]._schedule.status of schema PromotionSchedule in response with status code 200 + - [Breaking] [Deleted] property items[].author.approved_by of schema PromotionAuthor in response with status code 200 + - [Breaking] [Deleted] property items[].author.rejected_by of schema PromotionAuthor in response with status code 200 + - [Breaking] [Deleted] property items[].author.reviewed_by of schema PromotionAuthor in response with status code 200 + - [Breaking] [Deleted] properties items[].buy_rules.cart_quantity, items[].buy_rules.available_zones, items[].buy_rules.item_exclude_company, items[].buy_rules.item_id, items[].buy_rules.item_l1_category, items[].buy_rules.cart_total, items[].buy_rules.cart_unique_item_quantity, items[].buy_rules.cart_unique_item_amount, items[].buy_rules.item_exclude_id, items[].buy_rules.all_items, items[].buy_rules.item_exclude_l1_category, items[].buy_rules.item_size, items[].buy_rules.item_store, items[].buy_rules.item_exclude_sku, items[].buy_rules.item_department, items[].buy_rules.item_exclude_store, items[].buy_rules.item_brand, items[].buy_rules.item_exclude_department, items[].buy_rules.item_exclude_category, items[].buy_rules.item_category, items[].buy_rules.buy_rules, items[].buy_rules.item_exclude_brand, items[].buy_rules.item_l2_category, items[].buy_rules.item_company, items[].buy_rules.item_tags, items[].buy_rules.item_exclude_l2_category, items[].buy_rules.item_sku in response with status code 200 + - [Breaking] [Deleted] property items[].date_meta.approved_on of schema PromotionDateMeta in response with status code 200 + - [Breaking] [Deleted] property items[].date_meta.rejected_on of schema PromotionDateMeta in response with status code 200 + - [Breaking] [Deleted] property items[].date_meta.reviewed_on of schema PromotionDateMeta in response with status code 200 + + +#### createPromotion + +- ##### What's New + - [Added] ownership.payable_by, ownership.payable_category made required in request body + - [Added] restrictions.uses made required in request body + - [Added] _schedule.end, _schedule.published, _schedule.start made required in request body + - [Added] post_order_action.action_date, post_order_action.action_type made required in request body + - [Added] visiblility.coupon_list, visiblility.pdp made required in request body + - [Breaking] [Added] mode made required in request body + - [Breaking] [Added] ownership made required in request body + - [Breaking] [Added] promo_group made required in request body + - [Breaking] [Added] promotion_type made required in request body + - [Added] ownership.payable_by, ownership.payable_category made required in response with status code 201 + - [Added] restrictions.uses made required in response with status code 201 + - [Added] _schedule.end, _schedule.published, _schedule.start made required in response with status code 201 + - [Added] post_order_action.action_date, post_order_action.action_type made required in response with status code 201 + - [Added] visiblility.coupon_list, visiblility.pdp made required in response with status code 201 + - [Added] mode made required in response with status code 201 + - [Added] ownership made required in response with status code 201 + - [Added] promo_group made required in response with status code 201 + - [Added] promotion_type made required in response with status code 201 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.description of schema DisplayMeta1 in request body + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.name of schema DisplayMeta1 in request body + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.offer_text of schema DisplayMeta1 in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.greater_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.less_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.less_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.greater_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.greater_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.less_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.less_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.greater_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.greater_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.less_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.less_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.greater_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.greater_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.less_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.less_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.greater_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] property discount_rules[].meta of schema DiscountRule in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].offer.max_usage_per_transaction of schema DiscountOffer in request body + - [Breaking] [Deleted] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in request body + - [Breaking] [Deleted] Possible nullable value from true from property _schedule.end of schema PromotionSchedule in request body + - [Breaking] [Deleted] Possible nullable value from true from property _schedule.start of schema PromotionSchedule in request body + - [Breaking] [Deleted] property _schedule.status of schema PromotionSchedule in request body + - [Breaking] [Deleted] property author.approved_by of schema PromotionAuthor in request body + - [Breaking] [Deleted] property author.rejected_by of schema PromotionAuthor in request body + - [Breaking] [Deleted] property author.reviewed_by of schema PromotionAuthor in request body + - [Breaking] [Deleted] properties buy_rules.cart_quantity, buy_rules.available_zones, buy_rules.item_exclude_company, buy_rules.item_id, buy_rules.item_l1_category, buy_rules.cart_total, buy_rules.cart_unique_item_quantity, buy_rules.cart_unique_item_amount, buy_rules.item_exclude_id, buy_rules.all_items, buy_rules.item_exclude_l1_category, buy_rules.item_size, buy_rules.item_store, buy_rules.item_exclude_sku, buy_rules.item_department, buy_rules.item_exclude_store, buy_rules.item_brand, buy_rules.item_exclude_department, buy_rules.item_exclude_category, buy_rules.item_category, buy_rules.buy_rules, buy_rules.item_exclude_brand, buy_rules.item_l2_category, buy_rules.item_company, buy_rules.item_tags, buy_rules.item_exclude_l2_category, buy_rules.item_sku in request body + - [Breaking] [Deleted] property date_meta.approved_on of schema PromotionDateMeta in request body + - [Breaking] [Deleted] property date_meta.rejected_on of schema PromotionDateMeta in request body + - [Breaking] [Deleted] property date_meta.reviewed_on of schema PromotionDateMeta in request body + - [Breaking] [Deleted] property is_processed of schema PromotionAddResult in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.description of schema DisplayMeta1 in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.name of schema DisplayMeta1 in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.offer_text of schema DisplayMeta1 in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.equals of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.greater_than of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.less_than_equals of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.less_than of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.greater_than_equals of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.equals of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.greater_than of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.less_than_equals of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.less_than of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.greater_than_equals of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.equals of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.greater_than of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.less_than_equals of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.less_than of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.greater_than_equals of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.equals of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.greater_than of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.less_than_equals of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.less_than of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.greater_than_equals of schema CompareObject in response with status code 201 + - [Breaking] [Deleted] property discount_rules[].meta of schema DiscountRule in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].offer.max_usage_per_transaction of schema DiscountOffer in response with status code 201 + - [Breaking] [Deleted] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property _schedule.end of schema PromotionSchedule in response with status code 201 + - [Breaking] [Deleted] Possible nullable value from true from property _schedule.start of schema PromotionSchedule in response with status code 201 + - [Breaking] [Deleted] property _schedule.status of schema PromotionSchedule in response with status code 201 + - [Breaking] [Deleted] property author.approved_by of schema PromotionAuthor in response with status code 201 + - [Breaking] [Deleted] property author.rejected_by of schema PromotionAuthor in response with status code 201 + - [Breaking] [Deleted] property author.reviewed_by of schema PromotionAuthor in response with status code 201 + - [Breaking] [Deleted] properties buy_rules.cart_quantity, buy_rules.available_zones, buy_rules.item_exclude_company, buy_rules.item_id, buy_rules.item_l1_category, buy_rules.cart_total, buy_rules.cart_unique_item_quantity, buy_rules.cart_unique_item_amount, buy_rules.item_exclude_id, buy_rules.all_items, buy_rules.item_exclude_l1_category, buy_rules.item_size, buy_rules.item_store, buy_rules.item_exclude_sku, buy_rules.item_department, buy_rules.item_exclude_store, buy_rules.item_brand, buy_rules.item_exclude_department, buy_rules.item_exclude_category, buy_rules.item_category, buy_rules.buy_rules, buy_rules.item_exclude_brand, buy_rules.item_l2_category, buy_rules.item_company, buy_rules.item_tags, buy_rules.item_exclude_l2_category, buy_rules.item_sku in response with status code 201 + - [Breaking] [Deleted] property date_meta.approved_on of schema PromotionDateMeta in response with status code 201 + - [Breaking] [Deleted] property date_meta.rejected_on of schema PromotionDateMeta in response with status code 201 + - [Breaking] [Deleted] property date_meta.reviewed_on of schema PromotionDateMeta in response with status code 201 + + +#### getPromotionById + +- ##### What's New + - [Added] ownership.payable_by, ownership.payable_category made required in response with status code 200 + - [Added] restrictions.uses made required in response with status code 200 + - [Added] _schedule.end, _schedule.published, _schedule.start made required in response with status code 200 + - [Added] post_order_action.action_date, post_order_action.action_type made required in response with status code 200 + - [Added] visiblility.coupon_list, visiblility.pdp made required in response with status code 200 + - [Added] mode made required in response with status code 200 + - [Added] ownership made required in response with status code 200 + - [Added] promo_group made required in response with status code 200 + - [Added] promotion_type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property reason of schema PromotionUpdateResult in response with status code 200 + - [Breaking] [Deleted] property is_processed of schema PromotionUpdateResult in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.description of schema DisplayMeta1 in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.name of schema DisplayMeta1 in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.offer_text of schema DisplayMeta1 in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.greater_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.less_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.less_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.greater_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.greater_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.less_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.less_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.greater_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.greater_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.less_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.less_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.greater_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.greater_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.less_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.less_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.greater_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] property discount_rules[].meta of schema DiscountRule in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].offer.max_usage_per_transaction of schema DiscountOffer in response with status code 200 + - [Breaking] [Deleted] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property _schedule.end of schema PromotionSchedule in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property _schedule.start of schema PromotionSchedule in response with status code 200 + - [Breaking] [Deleted] property _schedule.status of schema PromotionSchedule in response with status code 200 + - [Breaking] [Deleted] property author.approved_by of schema PromotionAuthor in response with status code 200 + - [Breaking] [Deleted] property author.rejected_by of schema PromotionAuthor in response with status code 200 + - [Breaking] [Deleted] property author.reviewed_by of schema PromotionAuthor in response with status code 200 + - [Breaking] [Deleted] properties buy_rules.cart_quantity, buy_rules.available_zones, buy_rules.item_exclude_company, buy_rules.item_id, buy_rules.item_l1_category, buy_rules.cart_total, buy_rules.cart_unique_item_quantity, buy_rules.cart_unique_item_amount, buy_rules.item_exclude_id, buy_rules.all_items, buy_rules.item_exclude_l1_category, buy_rules.item_size, buy_rules.item_store, buy_rules.item_exclude_sku, buy_rules.item_department, buy_rules.item_exclude_store, buy_rules.item_brand, buy_rules.item_exclude_department, buy_rules.item_exclude_category, buy_rules.item_category, buy_rules.buy_rules, buy_rules.item_exclude_brand, buy_rules.item_l2_category, buy_rules.item_company, buy_rules.item_tags, buy_rules.item_exclude_l2_category, buy_rules.item_sku in response with status code 200 + - [Breaking] [Deleted] property date_meta.approved_on of schema PromotionDateMeta in response with status code 200 + - [Breaking] [Deleted] property date_meta.rejected_on of schema PromotionDateMeta in response with status code 200 + - [Breaking] [Deleted] property date_meta.reviewed_on of schema PromotionDateMeta in response with status code 200 + + +#### updatePromotion + +- ##### What's New + - [Added] ownership.payable_by, ownership.payable_category made required in request body + - [Added] restrictions.uses made required in request body + - [Added] _schedule.end, _schedule.published, _schedule.start made required in request body + - [Added] post_order_action.action_date, post_order_action.action_type made required in request body + - [Added] visiblility.coupon_list, visiblility.pdp made required in request body + - [Breaking] [Added] mode made required in request body + - [Breaking] [Added] ownership made required in request body + - [Breaking] [Added] promo_group made required in request body + - [Breaking] [Added] promotion_type made required in request body + - [Added] ownership.payable_by, ownership.payable_category made required in response with status code 200 + - [Added] restrictions.uses made required in response with status code 200 + - [Added] _schedule.end, _schedule.published, _schedule.start made required in response with status code 200 + - [Added] post_order_action.action_date, post_order_action.action_type made required in response with status code 200 + - [Added] visiblility.coupon_list, visiblility.pdp made required in response with status code 200 + - [Added] mode made required in response with status code 200 + - [Added] ownership made required in response with status code 200 + - [Added] promo_group made required in response with status code 200 + - [Added] promotion_type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property reason of schema PromotionUpdate in request body + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.description of schema DisplayMeta1 in request body + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.name of schema DisplayMeta1 in request body + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.offer_text of schema DisplayMeta1 in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.greater_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.less_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.less_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.greater_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.greater_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.less_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.less_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.greater_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.greater_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.less_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.less_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.greater_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.greater_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.less_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.less_than of schema CompareObject in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.greater_than_equals of schema CompareObject in request body + - [Breaking] [Deleted] property discount_rules[].meta of schema DiscountRule in request body + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].offer.max_usage_per_transaction of schema DiscountOffer in request body + - [Breaking] [Deleted] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in request body + - [Breaking] [Deleted] Possible nullable value from true from property _schedule.end of schema PromotionSchedule in request body + - [Breaking] [Deleted] Possible nullable value from true from property _schedule.start of schema PromotionSchedule in request body + - [Breaking] [Deleted] property _schedule.status of schema PromotionSchedule in request body + - [Breaking] [Deleted] property author.approved_by of schema PromotionAuthor in request body + - [Breaking] [Deleted] property author.rejected_by of schema PromotionAuthor in request body + - [Breaking] [Deleted] property author.reviewed_by of schema PromotionAuthor in request body + - [Breaking] [Deleted] properties buy_rules.cart_quantity, buy_rules.available_zones, buy_rules.item_exclude_company, buy_rules.item_id, buy_rules.item_l1_category, buy_rules.cart_total, buy_rules.cart_unique_item_quantity, buy_rules.cart_unique_item_amount, buy_rules.item_exclude_id, buy_rules.all_items, buy_rules.item_exclude_l1_category, buy_rules.item_size, buy_rules.item_store, buy_rules.item_exclude_sku, buy_rules.item_department, buy_rules.item_exclude_store, buy_rules.item_brand, buy_rules.item_exclude_department, buy_rules.item_exclude_category, buy_rules.item_category, buy_rules.buy_rules, buy_rules.item_exclude_brand, buy_rules.item_l2_category, buy_rules.item_company, buy_rules.item_tags, buy_rules.item_exclude_l2_category, buy_rules.item_sku in request body + - [Breaking] [Deleted] property date_meta.approved_on of schema PromotionDateMeta in request body + - [Breaking] [Deleted] property date_meta.rejected_on of schema PromotionDateMeta in request body + - [Breaking] [Deleted] property date_meta.reviewed_on of schema PromotionDateMeta in request body + - [Breaking] [Deleted] property reason of schema PromotionUpdateResult in response with status code 200 + - [Breaking] [Deleted] property is_processed of schema PromotionUpdateResult in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.description of schema DisplayMeta1 in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.name of schema DisplayMeta1 in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property display_meta.offer_text of schema DisplayMeta1 in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.greater_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.less_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.less_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_quantity.greater_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.greater_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.less_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.less_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_total.greater_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.greater_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.less_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.less_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_quantity.greater_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.greater_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.less_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.less_than of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].item_criteria.cart_unique_item_amount.greater_than_equals of schema CompareObject in response with status code 200 + - [Breaking] [Deleted] property discount_rules[].meta of schema DiscountRule in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property discount_rules[].offer.max_usage_per_transaction of schema DiscountOffer in response with status code 200 + - [Breaking] [Deleted] properties restrictions.payments.codes, restrictions.payments.iins, restrictions.payments.types, restrictions.payments.networks, restrictions.payments.uses in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property _schedule.end of schema PromotionSchedule in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property _schedule.start of schema PromotionSchedule in response with status code 200 + - [Breaking] [Deleted] property _schedule.status of schema PromotionSchedule in response with status code 200 + - [Breaking] [Deleted] property author.approved_by of schema PromotionAuthor in response with status code 200 + - [Breaking] [Deleted] property author.rejected_by of schema PromotionAuthor in response with status code 200 + - [Breaking] [Deleted] property author.reviewed_by of schema PromotionAuthor in response with status code 200 + - [Breaking] [Deleted] properties buy_rules.cart_quantity, buy_rules.available_zones, buy_rules.item_exclude_company, buy_rules.item_id, buy_rules.item_l1_category, buy_rules.cart_total, buy_rules.cart_unique_item_quantity, buy_rules.cart_unique_item_amount, buy_rules.item_exclude_id, buy_rules.all_items, buy_rules.item_exclude_l1_category, buy_rules.item_size, buy_rules.item_store, buy_rules.item_exclude_sku, buy_rules.item_department, buy_rules.item_exclude_store, buy_rules.item_brand, buy_rules.item_exclude_department, buy_rules.item_exclude_category, buy_rules.item_category, buy_rules.buy_rules, buy_rules.item_exclude_brand, buy_rules.item_l2_category, buy_rules.item_company, buy_rules.item_tags, buy_rules.item_exclude_l2_category, buy_rules.item_sku in response with status code 200 + - [Breaking] [Deleted] property date_meta.approved_on of schema PromotionDateMeta in response with status code 200 + - [Breaking] [Deleted] property date_meta.rejected_on of schema PromotionDateMeta in response with status code 200 + - [Breaking] [Deleted] property date_meta.reviewed_on of schema PromotionDateMeta in response with status code 200 + + +#### updatePromotionPartially + +- ##### What's New + - [Added] schedule.end, schedule.published, schedule.start made required in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property schedule.end of schema PromotionSchedule in request body + - [Breaking] [Deleted] Possible nullable value from true from property schedule.start of schema PromotionSchedule in request body + - [Breaking] [Deleted] property schedule.status of schema PromotionSchedule in request body + + +#### deletePromotion + +- ##### What's Deprecated + - [Breaking] [Deleted] method deletePromotion + + + +#### getPromosCouponConfig + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property modified_on of schema ActivePromosResult in response with status code 200 + - [Deleted] Value format from date-time from property created_on of schema ActivePromosResult in response with status code 200 + + +#### getPromotionOffers + +- ##### What's Deprecated + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property available_promotions[].promotion_type of schema PromotionOffer in response with status code 200 + - [Breaking] [Deleted] property available_promotions[].free_gift_items[].article_price of schema FreeGiftItems in response with status code 200 + - [Breaking] [Deleted] property available_promotions[].free_gift_items[].available_sizes of schema FreeGiftItems in response with status code 200 + - [Breaking] [Deleted] property available_promotions[].free_gift_items[].size of schema FreeGiftItems in response with status code 200 + + +#### getPromotionPaymentOffers + +- ##### What's Deprecated + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property promotions[].promotion_type of schema PromotionPaymentOffer in response with status code 200 + + +#### updatePriceAdjustment + +- ##### What's New + - [Added] properties data.value, data.message, data.apply_expiry, data.restrictions, data.article_level_distribution, data.id, data.collection, data.type, data.allowed_refund, data.is_authenticated, data.article_ids, data.auto_remove, data.meta, data.cart_id in response with status code 200 + - [Added] data.article_ids, data.article_level_distribution, data.cart_id, data.collection, data.is_authenticated, data.message, data.type, data.value made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property distribution_logic of schema PriceAdjustmentUpdate in request body + - [Breaking] [Deleted] property data[] of schema GetPriceAdjustmentResult in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property data of schema GetPriceAdjustmentResult in response with status code 200 + + +#### addPriceAdjustment + +- ##### What's New + - [Added] properties data.value, data.message, data.apply_expiry, data.restrictions, data.article_level_distribution, data.id, data.collection, data.type, data.allowed_refund, data.is_authenticated, data.article_ids, data.auto_remove, data.meta, data.cart_id in response with status code 201 + - [Added] data.article_ids, data.article_level_distribution, data.cart_id, data.collection, data.is_authenticated, data.message, data.type, data.value made required in response with status code 201 + +- ##### What's Deprecated + - [Breaking] [Deleted] property distribution_logic of schema PriceAdjustmentAdd in request body + - [Breaking] [Deleted] property data[] of schema GetPriceAdjustmentResult in response with status code 201 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property data of schema GetPriceAdjustmentResult in response with status code 201 + + +#### getPriceAdjustments + +- ##### What's Deprecated + - [Breaking] [Deleted] property data[].distribution_logic of schema PriceAdjustment in response with status code 200 + + +#### fetchAndvalidateCartItems + +- ##### What's New + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### checkCartServiceability + +- ##### What's New + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### getAbandonedCartDetails + +- ##### What's New + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### addItems + +- ##### What's New + - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property cart.applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### updateCart + +- ##### What's New + - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property cart.applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property free_gift_items of schema UpdateCartCreation in request body + - [Breaking] [Deleted] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### overrideCart + +- ##### What's New + - [Added] Possible nullable value true to property payment_identifier of schema OverrideCheckoutReq in request body + +- ##### What's Deprecated + - [Deleted] Possible values from HomeDelivery,PickAtStore,Digital from property order_type of schema OverrideCheckoutReq in request body + + +#### getCartSharedItems + +- ##### What's New + - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 404 + +- ##### What's Deprecated + - [Breaking] [Deleted] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Breaking] [Deleted] property cart.items[].product.action.page of schema ProductAction in response with status code 404 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 404 + + +#### updateCartWithSharedItems + +- ##### What's New + - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### getCartList + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property data[].created_on of schema CartList in response with status code 200 + + +#### updateCartUser + +- ##### What's New + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property user.modified_on of schema UserInfo in response with status code 200 + - [Deleted] Value format from date-time from property user.last_name of schema UserInfo in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserInfo in response with status code 200 + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### getCart + +- ##### What's New + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### platformAddItems + +- ##### What's New + - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property cart.applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### platformUpdateCart + +- ##### What's New + - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property cart.applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property free_gift_items of schema PlatformUpdateCartDetails in request body + - [Breaking] [Deleted] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### getAppCoupons + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property available_coupon_list[].start_date of schema Coupon in response with status code 200 + - [Deleted] Value format from date-time from property available_coupon_list[].end_date of schema Coupon in response with status code 200 + + +#### applyCoupon + +- ##### What's New + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 201 + - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 201 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 201 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 201 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 201 + + +#### removeCoupon + +- ##### What's New + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### getAddresses + +- ##### What's Deprecated + - [Breaking] [Deleted] property validation_config of schema PlatformGetAddressesDetails in response with status code 200 + + +#### addAddress + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 422 + + +#### selectAddress + +- ##### What's New + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 201 + - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 201 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 201 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 201 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 201 + + +#### getShipments + +- ##### What's New + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property shipments[].items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Breaking] [Deleted] property shipments[].items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property shipments[].items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Deleted] Possible values from HomeDelivery,PickAtStore,Digital from property shipments[].order_type of schema PlatformShipmentDetails in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### updateShipments + +- ##### What's New + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property shipments[].items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Breaking] [Deleted] property shipments[].items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property shipments[].items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Deleted] Possible values from HomeDelivery,PickAtStore,Digital from property shipments[].order_type of schema PlatformShipmentDetails in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### platformCheckoutCart + +- ##### What's Deprecated + - [Breaking] [Deleted] method platformCheckoutCart + + + +#### selectPaymentMode + +- ##### What's New + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + + +#### validateCouponForPayment + +- ##### What's Deprecated + - [Breaking] [Deleted] property coupon_validity.error_en of schema CouponValidity in response with status code 200 + + +#### platformCheckoutCartV2 + +- ##### What's New + - [Added] Possible nullable value true to property customer_details of schema PlatformCartCheckoutDetailV2Request in request body + - [Added] Possible nullable value true to property user_id of schema PlatformCartCheckoutDetailV2Request in request body + - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property custom_meta[] of schema PlatformCartCheckoutDetailV2Creation in request body + - [Breaking] [Deleted] properties customer_details.name, customer_details.email, customer_details.mobile in request body + - [Deleted] Possible values from HomeDelivery,PickAtStore,Digital from property order_type of schema PlatformCartCheckoutDetailV2Creation in request body + - [Breaking] [Deleted] property success_callback_url of schema PlatformCartCheckoutDetailV2Creation in request body + - [Breaking] [Deleted] property failure_callback_url of schema PlatformCartCheckoutDetailV2Creation in request body + - [Breaking] [Deleted] property cart.items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property cart.items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property custom_meta of schema PlatformCartCheckoutDetailV2Creation in request body + - [Changed] customer_details.mobile made optional in request body + + +#### selectPaymentModeV2 + +- ##### What's New + - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].product.action.page of schema ProductAction in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property items[].promotions_applied[].promotion_type of schema AppliedPromotion in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items,external_price_adjustment_discount from property applied_promo_details[].promotion_type of schema AppliedPromotion in response with status code 200 + + +### Catalog + + + +#### getCatalogInsights + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getApplicationBrandListing + +- ##### What's Deprecated + - [Deleted] Type from object from property of schema ApplicationBrandListingSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] page made optional in response with status code 200 + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateAppBrand + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getApplicationBrands + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getCategories + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getApplicationCategoryListing + +- ##### What's Deprecated + - [Deleted] Type from object from property items[].created_by of schema CreatedBy in response with status code 200 + - [Deleted] Type from object from property items[].modified_by of schema CreatedBy in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateAppCategory + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getAllCollections + +- ##### What's New + - [Added] property items[].seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].cron of schema GetCollectionDetailNest in response with status code 200 + - [Deleted] Possible values from image,video,3d_model from property items[].logo.type of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].logo.alt of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].logo.thumbnail of schema Media in response with status code 200 + - [Breaking] [Deleted] properties items[].seo.breadcrumbs[].action.page, items[].seo.breadcrumbs[].action.type in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from object to array of property items[].seo.breadcrumbs[].action of schema ApplicationItemSeoAction in response with status code 200 + - [Breaking] [Changed] items[].seo.breadcrumbs[].action.type made optional in response with status code 200 + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createCollection + +- ##### What's New + - [Added] property seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in request body + - [Added] property seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter q (type: string) + + - [Breaking] [Deleted] query parameter scheduleStatus (type: string) + + - [Breaking] [Deleted] query parameter type (type: string) + + - [Breaking] [Deleted] query parameter tags (type: array) + + - [Breaking] [Deleted] query parameter isActive (type: boolean) + + - [Breaking] [Deleted] query parameter pageNo (type: integer) + + - [Breaking] [Deleted] query parameter pageSize (type: integer) + + - [Breaking] [Deleted] properties seo.breadcrumbs[].action.page, seo.breadcrumbs[].action.type in request body + - [Breaking] [Deleted] property cron of schema CollectionCreateResponseSchema in response with status code 200 + - [Breaking] [Deleted] properties seo.breadcrumbs[].action.page, seo.breadcrumbs[].action.type in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from object to array of property seo.breadcrumbs[].action of schema ApplicationItemSeoAction in request body + - [Breaking] [Changed] seo.breadcrumbs[].action.type made optional in request body + - [Breaking] [Changed] Type from object to array of property seo.breadcrumbs[].action of schema ApplicationItemSeoAction in response with status code 200 + - [Breaking] [Changed] seo.breadcrumbs[].action.type made optional in response with status code 200 + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getApplicationFilterValues + +- ##### What's New + - [Added] property values[].currency_code of schema ProductFiltersValue in response with status code 200 + - [Added] property values[].currency_symbol of schema ProductFiltersValue in response with status code 200 + - [Added] property values[].display_format of schema ProductFiltersValue in response with status code 200 + - [Added] property values[].max of schema ProductFiltersValue in response with status code 200 + - [Added] property values[].min of schema ProductFiltersValue in response with status code 200 + - [Added] property values[].query_format of schema ProductFiltersValue in response with status code 200 + - [Added] property values[].selected_max of schema ProductFiltersValue in response with status code 200 + - [Added] property values[].selected_min of schema ProductFiltersValue in response with status code 200 + - [Added] values[].display, values[].is_selected, values[].value made required in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Type from string from property values[].value of schema ProductQueryFiltersValue in response with status code 200 + - [Breaking] [Deleted] property values[].logo of schema ProductQueryFiltersValue in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getApplicationFilterKeys + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getQueryFilters + +- ##### What's New + - [Added] property filters[].values[].currency_code of schema ProductFiltersValue in response with status code 200 + - [Added] property filters[].values[].currency_symbol of schema ProductFiltersValue in response with status code 200 + - [Added] property filters[].values[].display_format of schema ProductFiltersValue in response with status code 200 + - [Added] property filters[].values[].max of schema ProductFiltersValue in response with status code 200 + - [Added] property filters[].values[].min of schema ProductFiltersValue in response with status code 200 + - [Added] property filters[].values[].query_format of schema ProductFiltersValue in response with status code 200 + - [Added] property filters[].values[].selected_max of schema ProductFiltersValue in response with status code 200 + - [Added] property filters[].values[].selected_min of schema ProductFiltersValue in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Type from string from property filters[].values[].value of schema CollectionProductFiltersValue in response with status code 200 + - [Breaking] [Deleted] property filters[].values[].logo of schema CollectionProductFiltersValue in response with status code 200 + - [Breaking] [Deleted] property sort_on[].logo of schema CollectionProductSortOn in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### deleteCollection + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateCollection + +- ##### What's New + - [Added] property seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in request body + - [Added] property seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties seo.sitemap.priority, seo.sitemap.frequency in request body + - [Breaking] [Deleted] properties seo.breadcrumbs[].action.type, seo.breadcrumbs[].action.page in request body + - [Breaking] [Deleted] properties seo.sitemap.priority, seo.sitemap.frequency in response with status code 200 + - [Breaking] [Deleted] properties seo.breadcrumbs[].action.type, seo.breadcrumbs[].action.page in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from object to array of property seo.breadcrumbs[].action of schema ApplicationCollectionItemSeoAction in request body + - [Breaking] [Changed] Type from object to array of property seo.breadcrumbs[].action of schema ApplicationCollectionItemSeoAction in response with status code 200 + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getCollectionItems + +- ##### What's New + - [Breaking] [Added] Type object to property items[].price of schema ProductListingPrice in response with status code 200 + - [Added] property items[].grouped_attributes of schema ProductListingDetail in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter pageNo (type: integer) + + - [Deleted] Type from object from property filters[].values[].value of schema ProductFiltersValue in response with status code 200 + - [Deleted] Possible values from image,video,3d_model from property items[].brand.logo.type of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].brand.logo.alt of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].brand.logo.thumbnail of schema Media in response with status code 200 + - [Deleted] Possible values from default,standard from property items[].image_nature of schema ApplicationProductsSchema in response with status code 200 + - [Deleted] Possible values from composite,digital,packaging,set,standard from property items[].item_type of schema ApplicationProductsSchema in response with status code 200 + - [Deleted] Possible values from image,video,3d_model from property items[].medias[].type of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].medias[].alt of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].medias[].thumbnail of schema Media in response with status code 200 + - [Deleted] Possible values from INR,USD,EUR from property items[].price.effective.currency_code of schema CurrencyCodeEnum in response with status code 200 + - [Deleted] Possible values from INR,USD,EUR from property items[].price.marked.currency_code of schema CurrencyCodeEnum in response with status code 200 + - [Breaking] [Deleted] property items[].price.selling of schema ProductListingPrice in response with status code 200 + - [Breaking] [Deleted] property items[].popularity of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].brand_uid of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].category_uid of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].verification_status of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].channel_identifier of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].category_slug of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].size_guide of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].l3_categories of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].store_ids of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].company_ids of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].departments of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].tags of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].l3_category_names of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].sizes of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].product_group_tag of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].multi_size of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].is_gift of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].is_cod of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].is_dependent of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].is_available of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].moq of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].seo of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].variants of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].variant_media of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].variant_group of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].multi_categories of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].template_tag of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].net_quantity of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].custom_order of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].country_of_origin of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[]._custom_json of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].identifiers of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].item_id of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[]._custom_meta of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].discount_percentage of schema ApplicationProductsSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] items[].name made optional in response with status code 200 + - [Breaking] [Changed] items[].is_dependent made optional in response with status code 200 + - [Breaking] [Changed] items[].uid made optional in response with status code 200 + - [Breaking] [Changed] items[].category_uid made optional in response with status code 200 + - [Breaking] [Changed] items[].item_code made optional in response with status code 200 + - [Breaking] [Changed] items[].multi_size made optional in response with status code 200 + - [Breaking] [Changed] items[].brand_uid made optional in response with status code 200 + - [Breaking] [Changed] items[].country_of_origin made optional in response with status code 200 + - [Breaking] [Changed] items[].item_type made optional in response with status code 200 + - [Breaking] [Changed] items[].departments made optional in response with status code 200 + - [Breaking] [Changed] items[].image_nature made optional in response with status code 200 + - [Breaking] [Changed] items[].moq made optional in response with status code 200 + - [Breaking] [Changed] items[].seo made optional in response with status code 200 + - [Breaking] [Changed] items[].is_cod made optional in response with status code 200 + - [Breaking] [Changed] items[].is_gift made optional in response with status code 200 + - [Breaking] [Changed] items[].is_available made optional in response with status code 200 + - [Breaking] [Changed] items[].l3_categories made optional in response with status code 200 + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### addCollectionItems + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getCollectionDetail + +- ##### What's New + - [Added] property seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from image,video,3d_model from property logo.type of schema Media in response with status code 200 + - [Breaking] [Deleted] property logo.alt of schema Media in response with status code 200 + - [Breaking] [Deleted] property logo.thumbnail of schema Media in response with status code 200 + - [Breaking] [Deleted] properties seo.breadcrumbs[].action.page, seo.breadcrumbs[].action.type in response with status code 200 + - [Breaking] [Deleted] property _id of schema GetCollectionDetailResponseSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from object to array of property seo.breadcrumbs[].action of schema ApplicationItemSeoAction in response with status code 200 + - [Breaking] [Changed] seo.breadcrumbs[].action.type made optional in response with status code 200 + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getApplicationDepartmentListing + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateAppDepartment + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getDepartments + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getAppInventory + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getAppLocations + +- ##### What's New + - [Added] property items[].code of schema GetLocationSerializer in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].store_code of schema GetLocationSchema in response with status code 200 + - [Deleted] Possible values from distributor,franchise,mbo,manufacturer-owner from property items[].company.company_type of schema GetCompanySchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].company.created_on of schema GetCompanySchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].company.modified_on of schema GetCompanySchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].company.verified_on of schema GetCompanySchema in response with status code 200 + - [Deleted] Possible values from high_street,warehouse,mall from property items[].store_type of schema GetLocationSchema in response with status code 200 + - [Breaking] [Deleted] property items[].company_id of schema GetLocationSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getConfigurations + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createConfigurationProductListing + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getCatalogConfiguration + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getConfigurationByType + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createConfigurationByType + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getAppProduct + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateAppProduct + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getApplicationProducts + +- ##### What's Deprecated + - [Deleted] Type from object from property filters[].values[].value of schema ProductFiltersValue in response with status code 200 + - [Deleted] Possible values from image,video,3d_model from property items[].brand.logo.type of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].brand.logo.alt of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].brand.logo.thumbnail of schema Media in response with status code 200 + - [Deleted] Possible values from default,standard from property items[].image_nature of schema ApplicationProductsSchema in response with status code 200 + - [Deleted] Possible values from composite,digital,packaging,set,standard from property items[].item_type of schema ApplicationProductsSchema in response with status code 200 + - [Deleted] Possible values from image,video,3d_model from property items[].medias[].type of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].medias[].alt of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].medias[].thumbnail of schema Media in response with status code 200 + - [Deleted] Possible values from INR,USD,EUR from property items[].price.effective.currency_code of schema CurrencyCodeEnum in response with status code 200 + - [Deleted] Possible values from INR,USD,EUR from property items[].price.marked.currency_code of schema CurrencyCodeEnum in response with status code 200 + - [Breaking] [Deleted] property items[].price.selling of schema ProductListingPrice in response with status code 200 + - [Breaking] [Deleted] property items[].popularity of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].brand_uid of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].category_uid of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].verification_status of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].channel_identifier of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].category_slug of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].size_guide of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].l3_categories of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].store_ids of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].company_ids of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].departments of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].tags of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].l3_category_names of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].sizes of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].product_group_tag of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].multi_size of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].is_gift of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].is_cod of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].is_dependent of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].is_available of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].moq of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].seo of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].variants of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].variant_media of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].variant_group of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].multi_categories of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].template_tag of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].net_quantity of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].custom_order of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].country_of_origin of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[]._custom_json of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].identifiers of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].item_id of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[]._custom_meta of schema ApplicationProductsSchema in response with status code 200 + - [Breaking] [Deleted] property items[].discount_percentage of schema ApplicationProductsSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] operationId from getApplicationProducts to getAppicationProducts + - [Breaking] [Changed] items[].name made optional in response with status code 200 + - [Breaking] [Changed] items[].is_dependent made optional in response with status code 200 + - [Breaking] [Changed] items[].uid made optional in response with status code 200 + - [Breaking] [Changed] items[].category_uid made optional in response with status code 200 + - [Breaking] [Changed] items[].item_code made optional in response with status code 200 + - [Breaking] [Changed] items[].multi_size made optional in response with status code 200 + - [Breaking] [Changed] items[].brand_uid made optional in response with status code 200 + - [Breaking] [Changed] items[].country_of_origin made optional in response with status code 200 + - [Breaking] [Changed] items[].item_type made optional in response with status code 200 + - [Breaking] [Changed] items[].departments made optional in response with status code 200 + - [Breaking] [Changed] items[].image_nature made optional in response with status code 200 + - [Breaking] [Changed] items[].moq made optional in response with status code 200 + - [Breaking] [Changed] items[].seo made optional in response with status code 200 + - [Breaking] [Changed] items[].is_cod made optional in response with status code 200 + - [Breaking] [Changed] items[].is_gift made optional in response with status code 200 + - [Breaking] [Changed] items[].is_available made optional in response with status code 200 + - [Breaking] [Changed] items[].l3_categories made optional in response with status code 200 + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getDiscountedInventoryBySizeIdentifier + +- ##### What's New + - [Added] query parameter q (type: string) + + - [Added] items[].trader[].name made required in response with status code 200 + - [Added] items[].trader[].type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties items[].return_config.returnable, items[].return_config.time, items[].return_config.unit in response with status code 200 + - [Deleted] Type from object from property items[].return_config of schema InventoryReturnConfig in response with status code 200 + - [Breaking] [Deleted] properties items[].tax_identifier.hsn_code, items[].tax_identifier.hsn_code_id, items[].tax_identifier.reporting_hsn in response with status code 200 + - [Deleted] maxLength validator for items[].trader[].name in response with status code 200 + - [Deleted] minLength validator for items[].trader[].name in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getProductDetailBySlug + +- ##### What's New + - [Added] property color of schema ProductDetail in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from image,video,3d_model from property brand.logo.type of schema Media in response with status code 200 + - [Breaking] [Deleted] property brand.logo.alt of schema Media in response with status code 200 + - [Breaking] [Deleted] property brand.logo.thumbnail of schema Media in response with status code 200 + - [Deleted] Possible values from set,standard,composite,digital from property item_type of schema ProductDetail in response with status code 200 + - [Deleted] Possible values from image,video,3d_model from property medias[].type of schema Media in response with status code 200 + - [Breaking] [Deleted] property medias[].alt of schema Media in response with status code 200 + - [Breaking] [Deleted] property medias[].thumbnail of schema Media in response with status code 200 + - [Breaking] [Deleted] property country_of_origin of schema ProductDetail in response with status code 200 + - [Breaking] [Deleted] property categories of schema ProductDetail in response with status code 200 + - [Breaking] [Deleted] property tags of schema ProductDetail in response with status code 200 + - [Breaking] [Deleted] property no_of_boxes of schema ProductDetail in response with status code 200 + - [Breaking] [Deleted] property custom_order of schema ProductDetail in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getAppProducts + +- ##### What's New + - [Added] property items[].color of schema RawProduct in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from set,standard,composite,digital from property items[].item_type of schema RawProduct in response with status code 200 + - [Deleted] Possible values from image,video,3d_model from property items[].media[].type of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].media[].alt of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].media[].thumbnail of schema Media in response with status code 200 + - [Breaking] [Deleted] properties items[].tax_identifier.hsn_code, items[].tax_identifier.hsn_code_id, items[].tax_identifier.reporting_hsn in response with status code 200 + - [Deleted] Value format from date-time from property items[].verified_on of schema RawProduct in response with status code 200 + - [Breaking] [Deleted] property items[].action of schema RawProduct in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getAppReturnConfiguration + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createAppReturnConfiguration + +- ##### What's New + - [Added] property app_id of schema CreateUpdateAppReturnConfig in request body + - [Added] property company_id of schema CreateUpdateAppReturnConfig in request body + - [Breaking] [Added] company_id made required in request body + - [Breaking] [Added] return_config_level made required in request body + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateAppReturnConfiguration + +- ##### What's New + - [Added] property app_id of schema CreateUpdateAppReturnConfig in request body + - [Added] property company_id of schema CreateUpdateAppReturnConfig in request body + - [Breaking] [Added] company_id made required in request body + - [Breaking] [Added] return_config_level made required in request body + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### deleteAppCategoryReturnConfiguration + +- ##### What's New + - [Added] property app_id of schema DeleteAppCategoryReturnConfig in request body + - [Added] property company_id of schema DeleteAppCategoryReturnConfig in request body + - [Breaking] [Added] category_ids made required in request body + - [Breaking] [Added] company_id made required in request body + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getAppCategoryReturnConfig + +- ##### What's Changed + - [Breaking] [Changed] Type from integer to string of property page.current of schema PageResponseSchema in response with status code 200 + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createAppCategoryReturnConfiguration + +- ##### What's New + - [Added] property app_id of schema BaseAppCategoryReturnConfig in request body + - [Added] property company_id of schema BaseAppCategoryReturnConfig in request body + - [Breaking] [Added] company_id made required in request body + - [Breaking] [Added] data made required in request body + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateAppCategoryReturnConfiguration + +- ##### What's New + - [Added] property app_id of schema BaseAppCategoryReturnConfig in request body + - [Added] property company_id of schema BaseAppCategoryReturnConfig in request body + - [Breaking] [Added] company_id made required in request body + - [Breaking] [Added] data made required in request body + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getAutocompleteConfig + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createCustomAutocompleteRule + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### deleteAutocompleteKeyword + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getAutocompleteKeywordDetail + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateAutocompleteKeyword + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### deleteSearchConfiguration + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getSearchConfiguration + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createSearchConfiguration + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateSearchConfiguration + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getAllSearchKeyword + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createCustomKeyword + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### deleteSearchKeywords + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getSearchKeywords + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateSearchKeywords + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateAppLocation + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### listCategories + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getCategoryData + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getSellerInsights + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### listDepartmentsData + +- ##### What's New + - [Added] property items[].page_no of schema GetDepartment in response with status code 200 + - [Added] property items[].page_size of schema GetDepartment in response with status code 200 + - [Added] property items[].search of schema GetDepartment in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from set,standard,composite,digital from property items[].item_type of schema GetDepartment in response with status code 200 + - [Breaking] [Deleted] property items[].id of schema GetDepartment in response with status code 200 + + +#### getDepartmentData + +- ##### What's New + - [Added] property items[].page_no of schema GetDepartment in response with status code 200 + - [Added] property items[].page_size of schema GetDepartment in response with status code 200 + - [Added] property items[].search of schema GetDepartment in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from set,standard,composite,digital from property items[].item_type of schema GetDepartment in response with status code 200 + - [Breaking] [Deleted] property items[].id of schema GetDepartment in response with status code 200 + + +#### bulkHsnCode + +- ##### What's New + - [Breaking] [Added] data[].threshold1 made required in request body + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getHsnCode + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateHsnCode + +- ##### What's New + - [Breaking] [Added] threshold1 made required in request body + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getInventories + +- ##### What's Deprecated + - [Breaking] [Deleted] properties items[].identifier.primary, items[].identifier.gtin_value, items[].identifier.gtin_type in response with status code 200 + - [Deleted] Possible values from high_street,warehouse,mall from property items[].store.store_type of schema ArticleStoreResponseSchema in response with status code 200 + - [Breaking] [Deleted] properties items[].tax_identifier.hsn_code, items[].tax_identifier.hsn_code_id, items[].tax_identifier.reporting_hsn in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getInventoryBulkUploadHistory + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_on of schema BulkInventoryGetItems in response with status code 200 + - [Deleted] Value format from date-time from property items[].modified_on of schema BulkInventoryGetItems in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createBulkInventoryJob + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### deleteBulkInventoryJob + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createBulkInventory + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getInventoryExport + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createInventoryExportJob + +- ##### What's Deprecated + - [Breaking] [Deleted] properties filters.brands, filters.from_date, filters.quantity, filters.stores, filters.to_date in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### exportInventoryConfig + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getOptimalLocations + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getMarketplaceOptinDetail + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_on of schema CompanyOptIn in response with status code 200 + - [Deleted] Value format from date-time from property items[].modified_on of schema CompanyOptIn in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getCompanyBrandDetail + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getCompanyDetail + +- ##### What's Deprecated + - [Deleted] Possible values from distributor,franchise,mbo,manufacturer-owner from property company_type of schema OptinCompanyDetail in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getCompanyMetrics + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getStoreDetail + +- ##### What's Deprecated + - [Deleted] Possible values from high_street,warehouse,mall from property items[].store_type of schema StoreDetail in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getProductAttributes + +- ##### What's Changed + - [Breaking] [Changed] items[].name made optional in response with status code 200 + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getAttribute + +- ##### What's New + - [Added] property departments of schema AttributeDetail in response with status code 200 + - [Added] property id of schema AttributeDetail in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property _id of schema AttributeDetail in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getProductBundle + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter pageNo (type: integer) + + - [Breaking] [Deleted] query parameter pageSize (type: integer) + + - [Breaking] [Deleted] properties items[].created_by.user_id, items[].created_by.username in response with status code 200 + - [Breaking] [Deleted] properties items[].modified_by.user_id, items[].modified_by.username in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createProductBundle + +- ##### What's Deprecated + - [Breaking] [Deleted] properties created_by.user_id, created_by.username in response with status code 200 + - [Breaking] [Deleted] properties modified_by.user_id, modified_by.username in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getProductBundleDetail + +- ##### What's New + - [Added] property products[].product_details.name of schema LimitedProductData in response with status code 200 + - [Added] property products[].product_details.short_description of schema LimitedProductData in response with status code 200 + - [Added] property products[].price of schema GetProducts in response with status code 200 + - [Added] property products[].sizes of schema GetProducts in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties products[].product_details.price.currency, products[].product_details.price.max_effective, products[].product_details.price.max_marked, products[].product_details.price.min_effective, products[].product_details.price.min_marked in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateProductBundle + +- ##### What's New + - [Added] property modified_by of schema ProductBundleUpdateRequest in request body + - [Added] property modified_on of schema ProductBundleUpdateRequest in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] properties created_by.user_id, created_by.username in response with status code 200 + - [Breaking] [Deleted] properties modified_by.user_id, modified_by.username in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getProductAssetsInBulk + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_on of schema Items in response with status code 200 + - [Deleted] Value format from date-time from property items[].modified_on of schema Items in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createProductAssetsInBulk + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getProductBulkUploadHistory + +- ##### What's New + - [Added] Default value to property items[].template.attributes of schema ProductTemplate in response with status code 200 + - [Added] Possible nullable value true to property items[].template.attributes of schema ProductTemplate in response with status code 200 + - [Added] Default value to property items[].template.categories of schema ProductTemplate in response with status code 200 + - [Added] Possible nullable value true to property items[].template.categories of schema ProductTemplate in response with status code 200 + - [Added] Default value to property items[].template.departments of schema ProductTemplate in response with status code 200 + - [Added] Possible nullable value true to property items[].template.departments of schema ProductTemplate in response with status code 200 + - [Breaking] [Added] Type array to property items of schema ProductBulkRequestList in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties items[].template.created_by.user_id, items[].template.created_by.username in response with status code 200 + - [Breaking] [Deleted] properties items[].template.modified_by.user_id, items[].template.modified_by.username in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createBulkProductUploadJob + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### deleteProductBulkJob + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createProductsInBulk + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### listProductTemplateExportDetails + +- ##### What's Deprecated + - [Breaking] [Deleted] properties items[].created_by.email, items[].created_by.uid, items[].created_by.user_id, items[].created_by.username in response with status code 200 + - [Deleted] Type from object from property items[].created_by of schema UserInfo in response with status code 200 + + +#### getProductTags + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### listProductTemplate + +- ##### What's New + - [Added] properties items.attributes, items.categories, items.created_by, items.created_on, items.departments, items.description, items.is_active, items.is_archived, items.is_expirable, items.is_physical, items.logo, items.modified_by, items.modified_on, items.name, items.slug, items.tag in response with status code 200 + - [Added] items.is_expirable, items.is_physical, items.slug made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[] of schema TemplatesResponseSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property items of schema TemplatesResponseSchema in response with status code 200 + + +#### validateProductGlobalTemplate + +- ##### What's Deprecated + - [Breaking] [Deleted] method validateProductGlobalTemplate + + + +#### getProductValidation + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getInventoryBySizeIdentifier + +- ##### What's New + - [Added] items[].trader[].name made required in response with status code 200 + - [Added] items[].trader[].type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties items[].return_config.returnable, items[].return_config.time, items[].return_config.unit in response with status code 200 + - [Deleted] Type from object from property items[].return_config of schema InventoryReturnConfig in response with status code 200 + - [Breaking] [Deleted] properties items[].tax_identifier.hsn_code, items[].tax_identifier.hsn_code_id, items[].tax_identifier.reporting_hsn in response with status code 200 + - [Deleted] maxLength validator for items[].trader[].name in response with status code 200 + - [Deleted] minLength validator for items[].trader[].name in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getProductSize + +- ##### What's New + - [Added] property items[].multi_size of schema Product in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from set,standard,composite,digital from property items[].item_type of schema Product in response with status code 200 + - [Deleted] Possible values from image,video,3d_model from property items[].media[].type of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].media[].alt of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].media[].thumbnail of schema Media in response with status code 200 + - [Breaking] [Deleted] properties items[].tax_identifier.hsn_code, items[].tax_identifier.hsn_code_id, items[].tax_identifier.reporting_hsn in response with status code 200 + - [Deleted] Value format from date-time from property items[].verified_on of schema Product in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### deleteSize + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getInventoryBySize + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].inventory_updated_on of schema InventoryResponseSchema in response with status code 200 + - [Breaking] [Deleted] property items[].created_by of schema InventoryResponseSchema in response with status code 200 + - [Breaking] [Deleted] property items[].modified_by of schema InventoryResponseSchema in response with status code 200 + - [Breaking] [Deleted] property items[].expiration_date of schema InventoryResponseSchema in response with status code 200 + - [Breaking] [Deleted] property items[].tags of schema InventoryResponseSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### addInventory + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getVariantsOfProducts + +- ##### What's Deprecated + - [Deleted] Possible values from image,video,3d_model from property variants[].media[].type of schema Media in response with status code 200 + - [Breaking] [Deleted] property variants[].media[].alt of schema Media in response with status code 200 + - [Breaking] [Deleted] property variants[].media[].thumbnail of schema Media in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getSizeGuides + +- ##### What's Deprecated + - [Breaking] [Deleted] properties items[].active, items[].brand_id, items[].company_id, items[].created_by, items[].created_on, items[].guide, items[].id, items[].modified_by, items[].modified_on, items[].name, items[].subtitle, items[].tag, items[].title, items[].description, items[].image in response with status code 200 + - [Breaking] [Deleted] properties page.current, page.has_next, page.has_previous, page.item_total, page.size in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createSizeGuide + +- ##### What's Changed + - [Breaking] [Changed] Type from string to integer of property company_id of schema ValidateSizeGuide in request body + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getSizeGuide + +- ##### What's Deprecated + - [Breaking] [Deleted] properties created_by.user_id, created_by.username in response with status code 200 + - [Deleted] Value format from date-time from property created_on of schema SizeGuideResponseSchema in response with status code 200 + - [Breaking] [Deleted] property image of schema SizeGuideResponseSchema in response with status code 200 + - [Breaking] [Deleted] properties modified_by.user_id, modified_by.username in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema SizeGuideResponseSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] created_by.user_id, created_by.username made optional in response with status code 200 + - [Breaking] [Changed] modified_by.user_id, modified_by.username made optional in response with status code 200 + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateSizeGuide + +- ##### What's Changed + - [Breaking] [Changed] Type from string to integer of property company_id of schema ValidateSizeGuide in request body + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getListingConfigurations + +- ##### What's Deprecated + - [Breaking] [Deleted] properties data[].app_id, data[].attributes, data[].id, data[].is_active, data[].is_default, data[].name, data[].priority, data[].slug, data[].template_slugs in response with status code 200 + + +#### createListingConfiguration + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getGroupConfigurations + +- ##### What's Deprecated + - [Breaking] [Deleted] properties data[].app_id, data[].attributes, data[].id, data[].is_active, data[].is_default, data[].name, data[].priority, data[].slug, data[].template_slugs in response with status code 200 + + +#### updateListingConfiguration + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getConfigurationMetadata + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getAllProductHsnCodes + +- ##### What's New + - [Breaking] [Added] Type string to property items[].reporting_hsn of schema HSNDataInsertV2 in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties items[].created_by.user_id, items[].created_by.username in response with status code 200 + - [Breaking] [Deleted] properties items[].modified_by.user_id, items[].modified_by.username in response with status code 200 + - [Breaking] [Deleted] property items[].id of schema HSNDataInsertV2 in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] items[].created_by.user_id, items[].created_by.username made optional in response with status code 200 + - [Breaking] [Changed] items[].modified_by.user_id, items[].modified_by.username made optional in response with status code 200 + - [Breaking] [Changed] Type from integer to string of property page.current of schema PageResponseSchema in response with status code 200 + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getSingleProductHSNCode + +- ##### What's New + - [Breaking] [Added] Type string to property reporting_hsn of schema HSNDataInsertV2 in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties created_by.user_id, created_by.username in response with status code 200 + - [Breaking] [Deleted] properties modified_by.user_id, modified_by.username in response with status code 200 + - [Breaking] [Deleted] property id of schema HSNDataInsertV2 in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] created_by.user_id, created_by.username made optional in response with status code 200 + - [Breaking] [Changed] modified_by.user_id, modified_by.username made optional in response with status code 200 + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateInventories + +- ##### What's Deprecated + - [Breaking] [Deleted] property success of schema InventoryUpdateResponseSchema in response with status code 200 + - [Breaking] [Deleted] property success of schema InventoryUpdateResponseSchema in response with status code 400 + + +#### listInventoryExport + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createInventoryExport + +- ##### What's Deprecated + - [Breaking] [Deleted] properties filters.brands, filters.from_date, filters.quantity, filters.stores, filters.to_date in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getProducts + +- ##### What's New + - [Added] property items[].created_on of schema ProductSchemaV2 in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from set,standard,composite,digital from property items[].item_type of schema ProductSchemaV2 in response with status code 200 + - [Deleted] Possible values from image,video,3d_model from property items[].media[].type of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].media[].alt of schema Media in response with status code 200 + - [Breaking] [Deleted] property items[].media[].thumbnail of schema Media in response with status code 200 + - [Breaking] [Deleted] properties items[].sizes[].size, items[].sizes[].store_count, items[].sizes[].sellable_quantity, items[].sizes[].sellable, items[].sizes[].size_priority, items[].sizes[].identifiers, items[].sizes[].price, items[].sizes[].seller_identifier, items[].sizes[].price_transfer, items[].sizes[].track_inventory in response with status code 200 + - [Breaking] [Deleted] properties items[].tax_identifier.hsn_code, items[].tax_identifier.hsn_code_id, items[].tax_identifier.reporting_hsn in response with status code 200 + - [Deleted] Value format from date-time from property items[].verified_on of schema ProductSchemaV2 in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createProduct + +- ##### What's New + - [Breaking] [Added] Possible values days,hours to property custom_order.manufacturing_time_unit of schema CustomOrder in request body + - [Added] Default value to property custom_order.is_custom_order of schema CustomOrder in request body + - [Added] Default value to property custom_order.manufacturing_time of schema CustomOrder in request body + - [Breaking] [Added] minimum validator for custom_order.manufacturing_time in request body + - [Added] Possible nullable value true to property highlights[] of schema ProductCreateUpdateSchemaV2 in request body + +- ##### What's Deprecated + - [Deleted] Possible values from image,video,3d_model from property media[].type of schema Media in request body + - [Breaking] [Deleted] property media[].alt of schema Media in request body + - [Breaking] [Deleted] property media[].thumbnail of schema Media in request body + +- ##### What's Changed + - [Changed] custom_order.is_custom_order made optional in request body + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### uploadBulkProducts + +- ##### What's Deprecated + - [Deleted] Possible values from set,standard,composite,digital from property product_type of schema BulkProductJob in request body + +- ##### What's Changed + - [Breaking] [Changed] Type from string to integer of property company_id of schema BulkProductJob in request body + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### getProductExportJobs + +- ##### What's Deprecated + - [Breaking] [Deleted] properties items[].created_by.email, items[].created_by.uid, items[].created_by.user_id, items[].created_by.username in response with status code 200 + - [Deleted] Type from object from property items[].created_by of schema UserInfo in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createProductExportJob + +- ##### What's Deprecated + - [Breaking] [Deleted] properties items[].created_by.email, items[].created_by.uid, items[].created_by.user_id, items[].created_by.username in response with status code 200 + - [Deleted] Type from object from property items[].created_by of schema UserInfo in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### deleteProduct + +- ##### What's New + - [Added] Response with status 4XX + +- ##### What's Deprecated + - [Breaking] [Deleted] Body content in Request + - [Breaking] [Deleted] Response with status 404 + + +#### getProduct + +- ##### What's New + - [Added] property data.created_on of schema ProductSchemaV2 in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from set,standard,composite,digital from property data.item_type of schema ProductSchemaV2 in response with status code 200 + - [Deleted] Possible values from image,video,3d_model from property data.media[].type of schema Media in response with status code 200 + - [Breaking] [Deleted] property data.media[].alt of schema Media in response with status code 200 + - [Breaking] [Deleted] property data.media[].thumbnail of schema Media in response with status code 200 + - [Breaking] [Deleted] properties data.sizes[].size, data.sizes[].store_count, data.sizes[].sellable_quantity, data.sizes[].sellable, data.sizes[].size_priority, data.sizes[].identifiers, data.sizes[].price, data.sizes[].seller_identifier, data.sizes[].price_transfer, data.sizes[].track_inventory in response with status code 200 + - [Breaking] [Deleted] properties data.tax_identifier.hsn_code, data.tax_identifier.hsn_code_id, data.tax_identifier.reporting_hsn in response with status code 200 + - [Deleted] Value format from date-time from property data.verified_on of schema ProductSchemaV2 in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### editProduct + +- ##### What's New + - [Breaking] [Added] Possible values days,hours to property custom_order.manufacturing_time_unit of schema CustomOrder in request body + - [Added] Default value to property custom_order.is_custom_order of schema CustomOrder in request body + - [Added] Default value to property custom_order.manufacturing_time of schema CustomOrder in request body + - [Breaking] [Added] minimum validator for custom_order.manufacturing_time in request body + - [Added] Possible nullable value true to property highlights[] of schema ProductCreateUpdateSchemaV2 in request body + +- ##### What's Deprecated + - [Deleted] Possible values from image,video,3d_model from property media[].type of schema Media in request body + - [Breaking] [Deleted] property media[].alt of schema Media in request body + - [Breaking] [Deleted] property media[].thumbnail of schema Media in request body + +- ##### What's Changed + - [Changed] custom_order.is_custom_order made optional in request body + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### allSizes + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### deleteRealtimeInventory + +- ##### What's Deprecated + - [Breaking] [Deleted] property success of schema InventoryUpdateResponseSchema in response with status code 200 + - [Breaking] [Deleted] property success of schema InventoryUpdateResponseSchema in response with status code 400 + + +#### updateRealtimeInventory + +- ##### What's Deprecated + - [Breaking] [Deleted] property success of schema InventoryUpdateResponseSchema in response with status code 200 + - [Breaking] [Deleted] property success of schema InventoryUpdateResponseSchema in response with status code 400 + + +#### updateLocationPrice + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateLocationPrice + + + +#### updateLocationQuantity + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateLocationQuantity + + + +#### getMarketplaces + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### updateMarketplaceOptin + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +#### createMarketplaceOptin + +- ##### What's Deprecated + - [Deleted] Type from object from property created_by of schema CreatedBy in response with status code 201 + - [Deleted] Type from object from property modified_by of schema CreatedBy in response with status code 201 + +- ##### What's Changed + - [Breaking] [Changed] Type from number to string of property code of schema ErrorResponseSchema in response with status code 4XX + + +### Common + + + +#### searchApplication + +- ##### What's Deprecated + - [Deleted] Possible values from store,website-and-mobile-apps from property application.channel_type of schema Application in response with status code 200 + - [Deleted] Value format from date-time from property application.created_at of schema Application in response with status code 200 + - [Deleted] Value format from date-time from property application.updated_at of schema Application in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema ApplicationResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ApplicationResponseSchema in response with status code 200 + + +### Communication + + + +#### getAppProviders + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema AppProvider in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema AppProvider in response with status code 200 + + +#### updateAppProviders + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema AppProvider in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema AppProvider in response with status code 200 + + +#### getEmailProviders + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema EmailProvider in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema EmailProvider in response with status code 200 + + +#### createEmailProvider + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema EmailProvider in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema EmailProvider in response with status code 200 + + +#### getEmailProviderById + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema EmailProvider in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema EmailProvider in response with status code 200 + + +#### updateEmailProviderById + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema EmailProvider in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema EmailProvider in response with status code 200 + + +#### deleteEmailProviderById + +- ##### What's New + - [Added] Response with status 500 + + +#### getSmsProviders + +- ##### What's New + - [Added] Response with status 500 + + +#### createSmsProvider + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property tenant_name_1 of schema SmsProviderReq in request body + - [Breaking] [Deleted] property tenant_name_2 of schema SmsProviderReq in request body + + +#### getDefaultSmsProviders + +- ##### What's New + - [Added] Response with status 500 + + +#### getSmsProviderById + +- ##### What's New + - [Added] Response with status 500 + + +#### updateSmsProviderById + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property tenant_name_1 of schema SmsProviderReq in request body + - [Breaking] [Deleted] property tenant_name_2 of schema SmsProviderReq in request body + + +#### deleteSmsProviderById + +- ##### What's New + - [Added] Response with status 500 + + +#### getCampaigns + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema Campaign in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema Campaign in response with status code 200 + + +#### createCampaign + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Campaign in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Campaign in response with status code 200 + + +#### getCampaignById + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Campaign in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Campaign in response with status code 200 + + +#### updateCampaignById + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Campaign in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Campaign in response with status code 200 + + +#### getAudiences + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema Audience in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema Audience in response with status code 200 + + +#### createAudience + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Audience in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Audience in response with status code 200 + + +#### getAudienceById + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Audience in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Audience in response with status code 200 + + +#### updateAudienceById + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Audience in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Audience in response with status code 200 + + +#### deleteAudienceById + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Audience in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Audience in response with status code 200 + + +#### getDummyDatasources + +- ##### What's New + - [Added] Response with status 500 + + +#### getDummyDatasourcesMeta + +- ##### What's New + - [Added] Response with status 500 + + +#### getNSampleRecordsFromCsvByGet + +- ##### What's New + - [Added] Response with status 500 + + +#### getNSampleRecordsFromCsv + +- ##### What's New + - [Added] Response with status 500 + + +#### getEmailTemplates + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema EmailTemplate in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema EmailTemplate in response with status code 200 + + +#### createEmailTemplate + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema EmailTemplate in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema EmailTemplate in response with status code 200 + + +#### getSystemEmailTemplates + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema SystemEmailTemplate in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema SystemEmailTemplate in response with status code 200 + + +#### getEmailTemplateById + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema EmailTemplate in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema EmailTemplate in response with status code 200 + + +#### updateEmailTemplateById + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema EmailTemplate in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema EmailTemplate in response with status code 200 + + +#### deleteEmailTemplateById + +- ##### What's New + - [Added] Response with status 500 + + +#### getSubscribedEmailTemplates + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema EmailTemplate in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema EmailTemplate in response with status code 200 + + +#### getSmsTemplates + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Possible values from static,nunjucks,lodash from property items[].message.template_type of schema SmsTemplateMessage in response with status code 200 + - [Deleted] Value format from date-time from property items[].created_at of schema SmsTemplate in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema SmsTemplate in response with status code 200 + + +#### createSmsTemplate + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Possible values from static,nunjucks,lodash from property message.template_type of schema SmsTemplateMessage in request body + - [Deleted] Possible values from static,nunjucks,lodash from property message.template_type of schema SmsTemplateMessage in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema SmsTemplate in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema SmsTemplate in response with status code 200 + + +#### getSystemSmsTemplates + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Possible values from static,nunjucks,lodash from property [].message.template_type of schema SmsTemplateMessage in response with status code 200 + - [Deleted] Value format from date-time from property [].created_at of schema SystemSmsTemplates in response with status code 200 + - [Deleted] Value format from date-time from property [].updated_at of schema SystemSmsTemplates in response with status code 200 + + +#### getSmsTemplateById + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Possible values from static,nunjucks,lodash from property message.template_type of schema SmsTemplateMessage in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema SmsTemplate in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema SmsTemplate in response with status code 200 + + +#### updateSmsTemplateById + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Possible values from static,nunjucks,lodash from property message.template_type of schema SmsTemplateMessage in request body + - [Deleted] Possible values from static,nunjucks,lodash from property message.template_type of schema SmsTemplateMessage in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema SmsTemplate in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema SmsTemplate in response with status code 200 + + +#### deleteSmsTemplateById + +- ##### What's New + - [Added] Response with status 500 + + +#### getSubscribedSmsTemplates + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Possible values from static,nunjucks,lodash from property items[].message.template_type of schema SmsTemplateMessage in response with status code 200 + - [Deleted] Value format from date-time from property items[].created_at of schema SmsTemplate in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema SmsTemplate in response with status code 200 + + +#### getEventSubscriptions + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema EventSubscription in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema EventSubscription in response with status code 200 + + +#### createEventSubscriptions + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema EventSubscriptionsBulkUpdateResult in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema EventSubscriptionsBulkUpdateResult in response with status code 200 + + +#### getEventSubscriptionsById + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema EventSubscription in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema EventSubscription in response with status code 200 + + +#### editEventSubscriptions + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema EventSubscriptionsBulkUpdateResult in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema EventSubscriptionsBulkUpdateResult in response with status code 200 + + +#### deleteEventSubscriptionsById + +- ##### What's New + - [Added] Response with status 500 + + +#### createEventSubscriptionsByBulk + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property [].created_at of schema EventSubscriptionsBulkUpdateResult in response with status code 200 + - [Deleted] Value format from date-time from property [].updated_at of schema EventSubscriptionsBulkUpdateResult in response with status code 200 + + +#### getGlobalVariables + +- ##### What's New + - [Added] Response with status 500 + + +#### postGlobalVariables + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema CreateGlobalVariablesResult in response with status code 200 + + +#### getJobs + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema Job in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema Job in response with status code 200 + + +#### createJobs + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema CreateJobsRes in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema CreateJobsRes in response with status code 200 + + +#### getJobLogs + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema JobLog in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema JobLog in response with status code 200 + + +#### getCommunicationLogs + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].expire_at of schema Log in response with status code 200 + - [Deleted] Value format from date-time from property items[].created_at of schema Log in response with status code 200 + + +#### getSystemNotifications + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema SystemNotification in response with status code 200 + + +### CompanyProfile + + + +#### cbsOnboardGet + +- ##### What's Deprecated + - [Deleted] Possible values from distributor,franchise,mbo,manufacturer-owner from property company_type of schema GetCompanyProfileSerializerResponseSchema in response with status code 200 + - [Deleted] Possible values from home,registered,office from property addresses[].address_type of schema GetAddressSchema in response with status code 200 + + +#### updateCompany + +- ##### What's Deprecated + - [Deleted] Possible values from distributor,franchise,mbo,manufacturer-owner from property company_type of schema UpdateCompany in request body + + +#### getBrands + +- ##### What's Deprecated + - [Deleted] Possible values from distributor,franchise,mbo,manufacturer-owner from property items[].company.company_type of schema CompanySchema in response with status code 200 + - [Deleted] Possible values from home,registered,office from property items[].company.addresses[].address_type of schema GetAddressSchema in response with status code 200 + + +#### getLocations + +- ##### What's Deprecated + - [Deleted] Possible values from distributor,franchise,mbo,manufacturer-owner from property items[].company.company_type of schema GetCompanySchema in response with status code 200 + - [Deleted] Possible values from home,registered,office from property items[].company.addresses[].address_type of schema GetAddressSchema in response with status code 200 + - [Deleted] Possible values from home,registered,office from property items[].address.address_type of schema GetAddressSchema in response with status code 200 + - [Deleted] Possible values from high_street,warehouse,mall from property items[].store_type of schema GetLocationSchema in response with status code 200 + + +#### createLocation + +- ##### What's Deprecated + - [Deleted] Possible values from high_street,warehouse,mall from property store_type of schema LocationSchema in request body + + +#### getLocationDetail + +- ##### What's Deprecated + - [Deleted] Possible values from distributor,franchise,mbo,manufacturer-owner from property company.company_type of schema GetCompanySchema in response with status code 200 + - [Deleted] Possible values from home,registered,office from property company.addresses[].address_type of schema GetAddressSchema in response with status code 200 + - [Deleted] Possible values from home,registered,office from property address.address_type of schema GetAddressSchema in response with status code 200 + - [Deleted] Possible values from high_street,warehouse,mall from property store_type of schema GetLocationSchema in response with status code 200 + + +#### updateLocation + +- ##### What's Deprecated + - [Deleted] Possible values from high_street,warehouse,mall from property store_type of schema LocationSchema in request body + + +#### createLocationBulk + +- ##### What's Deprecated + - [Deleted] Possible values from high_street,warehouse,mall from property data[].store_type of schema LocationSchema in request body + + +### Configuration + + + +#### getBuildConfig + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema MobileAppConfiguration in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema MobileAppConfiguration in response with status code 200 + + +#### updateBuildConfig + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema MobileAppConfiguration in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema MobileAppConfiguration in response with status code 200 + + +#### getPreviousVersions + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property versions[].created_at of schema BuildVersion in response with status code 200 + - [Deleted] Value format from date-time from property versions[].modified_at of schema BuildVersion in response with status code 200 + + +#### getAppFeatures + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property feature.created_at of schema AppFeature in response with status code 200 + - [Deleted] Value format from date-time from property feature.modified_at of schema AppFeature in response with status code 200 + + +#### updateAppFeatures + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property feature.created_at of schema AppFeature in request body + - [Deleted] Value format from date-time from property feature.modified_at of schema AppFeature in request body + - [Deleted] Value format from date-time from property created_at of schema AppFeature in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema AppFeature in response with status code 200 + + +#### modifyAppFeatures + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property feature.created_at of schema AppFeature in request body + - [Deleted] Value format from date-time from property feature.modified_at of schema AppFeature in request body + - [Deleted] Value format from date-time from property created_at of schema AppFeature in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema AppFeature in response with status code 200 + + +#### getAppContactInfo + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ApplicationInformation in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema ApplicationInformation in response with status code 200 + + +#### updateAppContactInfo + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ApplicationInformation in request body + - [Deleted] Value format from date-time from property modified_at of schema ApplicationInformation in request body + - [Deleted] Value format from date-time from property created_at of schema ApplicationInformation in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema ApplicationInformation in response with status code 200 + + +#### getAppApiTokens + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema TokenResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema TokenResponseSchema in response with status code 200 + + +#### updateAppApiTokens + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema TokenResponseSchema in request body + - [Deleted] Value format from date-time from property modified_at of schema TokenResponseSchema in request body + - [Deleted] Value format from date-time from property created_at of schema TokenResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema TokenResponseSchema in response with status code 200 + + +#### getAppStores + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].modified_on of schema AppInventoryStores in response with status code 200 + - [Deleted] Possible values from high_street,warehouse,mall from property items[].store_type of schema AppInventoryStores in response with status code 200 + + +#### getInventoryConfig + +- ##### What's New + - [Added] property inventory.enable_zone_overlapping of schema AppInventoryConfig in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property search of schema ApplicationInventory in response with status code 200 + - [Deleted] Type from object from property inventory.exclude_category[] of schema AppInventoryConfig in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema ApplicationInventory in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema ApplicationInventory in response with status code 200 + + +#### updateInventoryConfig + +- ##### What's New + - [Added] property inventory.enable_zone_overlapping of schema AppInventoryConfig in request body + - [Added] property inventory.enable_zone_overlapping of schema AppInventoryConfig in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property search of schema ApplicationInventory in request body + - [Deleted] Type from object from property inventory.exclude_category[] of schema AppInventoryConfig in request body + - [Deleted] Value format from date-time from property created_at of schema ApplicationInventory in request body + - [Deleted] Value format from date-time from property modified_at of schema ApplicationInventory in request body + - [Breaking] [Deleted] property search of schema ApplicationInventory in response with status code 200 + - [Deleted] Type from object from property inventory.exclude_category[] of schema AppInventoryConfig in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema ApplicationInventory in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema ApplicationInventory in response with status code 200 + + +#### partiallyUpdateInventoryConfig + +- ##### What's New + - [Added] property inventory.enable_zone_overlapping of schema AppInventoryConfig in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property search of schema AppInventoryPartialUpdate in request body + - [Breaking] [Deleted] property search of schema ApplicationInventory in response with status code 200 + - [Deleted] Type from object from property inventory.exclude_category[] of schema AppInventoryConfig in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema ApplicationInventory in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema ApplicationInventory in response with status code 200 + + +#### getAppCurrencyConfig + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema AppSupportedCurrency in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema AppSupportedCurrency in response with status code 200 + + +#### updateAppCurrencyConfig + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema AppSupportedCurrency in request body + - [Deleted] Value format from date-time from property modified_at of schema AppSupportedCurrency in request body + - [Deleted] Value format from date-time from property created_at of schema AppSupportedCurrency in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema AppSupportedCurrency in response with status code 200 + + +#### getAppSupportedCurrency + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property supported_currency[].created_at of schema Currency in response with status code 200 + - [Deleted] Value format from date-time from property supported_currency[].modified_at of schema Currency in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema AppCurrencyResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema AppCurrencyResponseSchema in response with status code 200 + + +#### createApplication + +- ##### What's New + - [Added] property configuration.inventory.enable_zone_overlapping of schema AppInventoryConfig in request body + - [Added] property configuration.inventory.enable_zone_overlapping of schema AppInventoryConfig in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property configuration.search of schema ApplicationInventory in request body + - [Deleted] Type from object from property configuration.inventory.exclude_category[] of schema AppInventoryConfig in request body + - [Deleted] Value format from date-time from property configuration.created_at of schema ApplicationInventory in request body + - [Deleted] Value format from date-time from property configuration.modified_at of schema ApplicationInventory in request body + - [Deleted] Possible values from website-and-mobile-apps,store from property app.channel_type of schema Application in response with status code 200 + - [Deleted] Value format from date-time from property app.created_at of schema Application in response with status code 200 + - [Deleted] Value format from date-time from property app.modified_at of schema Application in response with status code 200 + - [Deleted] Value format from date-time from property app.tokens[].created_at of schema TokenSchema in response with status code 200 + - [Breaking] [Deleted] property configuration.search of schema ApplicationInventory in response with status code 200 + - [Deleted] Type from object from property configuration.inventory.exclude_category[] of schema AppInventoryConfig in response with status code 200 + - [Deleted] Value format from date-time from property configuration.created_at of schema ApplicationInventory in response with status code 200 + - [Deleted] Value format from date-time from property configuration.modified_at of schema ApplicationInventory in response with status code 200 + + +#### getApplications + +- ##### What's Deprecated + - [Deleted] Possible values from website-and-mobile-apps,store from property items[].channel_type of schema Application in response with status code 200 + - [Deleted] Value format from date-time from property items[].created_at of schema Application in response with status code 200 + - [Deleted] Value format from date-time from property items[].modified_at of schema Application in response with status code 200 + - [Deleted] Value format from date-time from property items[].tokens[].created_at of schema TokenSchema in response with status code 200 + + +#### getApplicationById + +- ##### What's Deprecated + - [Deleted] Possible values from website-and-mobile-apps,store from property channel_type of schema ApplicationById in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema ApplicationById in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema ApplicationById in response with status code 200 + - [Deleted] Value format from date-time from property tokens[].created_at of schema TokenSchemaID in response with status code 200 + + +#### getCurrencies + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema Currency in response with status code 200 + - [Deleted] Value format from date-time from property items[].modified_at of schema Currency in response with status code 200 + + +#### getDomainAvailibility + +- ##### What's New + - [Added] property custom of schema DomainSuggestionsRequest in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] property custom_domain of schema DomainSuggestionsRequestSchema in request body + + +#### getStoreByBrands + +- ##### What's Deprecated + - [Deleted] Possible values from high_street,warehouse,mall from property items[].store_type of schema BrandStoreInfo in response with status code 200 + + +#### getCurrencyExchangeRates + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCurrencyExchangeRates + + + +### Content + + + +#### getAnnouncementsList + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema AdminAnnouncementSchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].modified_at of schema AdminAnnouncementSchema in response with status code 200 + + +#### createAnnouncement + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema AdminAnnouncementSchema in request body + - [Deleted] Value format from date-time from property modified_at of schema AdminAnnouncementSchema in request body + - [Deleted] Value format from date-time from property data.created_at of schema AdminAnnouncementSchema in response with status code 200 + - [Deleted] Value format from date-time from property data.modified_at of schema AdminAnnouncementSchema in response with status code 200 + + +#### getAnnouncementById + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema AdminAnnouncementSchema in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema AdminAnnouncementSchema in response with status code 200 + + +#### updateAnnouncement + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema AdminAnnouncementSchema in request body + - [Deleted] Value format from date-time from property modified_at of schema AdminAnnouncementSchema in request body + - [Deleted] Value format from date-time from property data.created_at of schema AdminAnnouncementSchema in response with status code 200 + - [Deleted] Value format from date-time from property data.modified_at of schema AdminAnnouncementSchema in response with status code 200 + + +#### updateAnnouncementSchedule + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property data.created_at of schema AdminAnnouncementSchema in response with status code 200 + - [Deleted] Value format from date-time from property data.modified_at of schema AdminAnnouncementSchema in response with status code 200 + + +#### deleteAnnouncement + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property data.created_at of schema AdminAnnouncementSchema in response with status code 200 + - [Deleted] Value format from date-time from property data.modified_at of schema AdminAnnouncementSchema in response with status code 200 + + +#### createBlog + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property publish_date of schema BlogSchema in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### getBlogs + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].publish_date of schema BlogSchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### updateBlog + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property publish_date of schema BlogSchema in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### deleteBlog + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property publish_date of schema BlogSchema in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### addDataLoader + +- ##### What's New + - [Added] Response with status 5XX + + +#### getDataLoaders + +- ##### What's New + - [Added] Response with status 5XX + + +#### deleteDataLoader + +- ##### What's New + - [Added] Response with status 5XX + + +#### editDataLoader + +- ##### What's New + - [Added] Response with status 5XX + + +#### getDataLoadersByService + +- ##### What's New + - [Added] Response with status 5XX + + +#### selectDataLoader + +- ##### What's New + - [Added] Response with status 5XX + + +#### resetDataLoader + +- ##### What's New + - [Added] Response with status 5XX + + +#### getFaqCategories + +- ##### What's New + - [Added] Response with status 5XX + + +#### getFaqCategoryBySlugOrId + +- ##### What's New + - [Added] Response with status 5XX + + +#### createFaqCategory + +- ##### What's New + - [Added] Response with status 5XX + + +#### updateFaqCategory + +- ##### What's New + - [Added] Response with status 5XX + + +#### deleteFaqCategory + +- ##### What's New + - [Added] Response with status 5XX + + +#### getFaqsByCategoryIdOrSlug + +- ##### What's New + - [Added] Response with status 5XX + + +#### addFaq + +- ##### What's New + - [Added] Response with status 5XX + + +#### updateFaq + +- ##### What's New + - [Added] Response with status 5XX + + +#### deleteFaq + +- ##### What's New + - [Added] Response with status 5XX + + +#### getFaqByIdOrSlug + +- ##### What's New + - [Added] Response with status 5XX + + +#### generateSEOTitle + +- ##### What's New + - [Added] Response with status 5XX + + +#### getLandingPages + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### createLandingPage + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in request body + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in request body + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### updateLandingPage + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in request body + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in request body + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### deleteLandingPage + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### getLegalInformation + +- ##### What's New + - [Added] Response with status 5XX + + +#### updateLegalInformation + +- ##### What's New + - [Added] Response with status 5XX + + +#### getNavigations + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### createNavigation + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### getDefaultNavigations + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### getNavigationBySlug + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Required status of query parameter devicePlatform + + +#### updateNavigation + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### deleteNavigation + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### getPageMeta + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property system_pages[].date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property system_pages[].date_meta.modified_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property custom_pages[].date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property custom_pages[].date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### getPageSpec + +- ##### What's New + - [Added] Response with status 5XX + + +#### createPagePreview + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### updatePagePreview + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### deletePage + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### addPathRedirectionRules + +- ##### What's New + - [Added] Response with status 5XX + + +#### getPathRedirectionRules + +- ##### What's New + - [Added] Response with status 5XX + + +#### getPathRedirectionRule + +- ##### What's New + - [Added] Response with status 5XX + + +#### updatePathRedirectionRules + +- ##### What's New + - [Added] Response with status 5XX + + +#### deletePathRedirectionRules + +- ##### What's New + - [Added] Response with status 5XX + + +#### getSEOConfiguration + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property seo.created_at of schema SeoSchema in response with status code 200 + - [Deleted] Value format from date-time from property seo.updated_at of schema SeoSchema in response with status code 200 + + +#### updateSEOConfiguration + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property seo.created_at of schema SeoSchema in request body + - [Deleted] Value format from date-time from property seo.updated_at of schema SeoSchema in request body + - [Deleted] Value format from date-time from property created_at of schema SeoSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema SeoSchema in response with status code 200 + + +#### getDefaultSEOMarkupSchema + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Possible values from about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status from property items[].page_type of schema DefaultSEOSchemaMarkupTemplate in response with status code 200 + + +#### getSEOMarkupSchemas + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Possible values from about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status from property items[].page_type of schema SEOSchemaMarkupTemplate in response with status code 200 + + +#### createSEOMarkupSchema + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Possible values from about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status from property page_type of schema SEOSchemaMarkupTemplateRequestBody in request body + - [Deleted] Possible values from about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status from property page_type of schema SEOSchemaMarkupTemplate in response with status code 200 + + +#### getSEOMarkupSchema + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Possible values from about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status from property page_type of schema SEOSchemaMarkupTemplate in response with status code 200 + + +#### editSEOMarkupSchema + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Possible values from about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status from property page_type of schema SEOSchemaMarkupTemplateRequestBody in request body + - [Deleted] Possible values from about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status from property page_type of schema SEOSchemaMarkupTemplate in response with status code 200 + + +#### deleteSEOMarkupSchema + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Possible values from about-us,addresses,blog,brands,cards,cart,categories,brand,category,collection,collections,contact-us,external,faq,freshchat,home,notification-settings,orders,page,policy,product,product-request,products,profile,profile-order-shipment,profile-basic,profile-company,profile-emails,profile-phones,rate-us,refer-earn,settings,shared-cart,tnc,track-order,wishlist,sections,form,cart-delivery,cart-payment,cart-review,login,register,shipping-policy,return-policy,order-status from property page_type of schema SEOSchemaMarkupTemplate in response with status code 200 + + +#### getSupportInformation + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Support in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Support in response with status code 200 + + +#### updateSupportInformation + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Support in request body + - [Deleted] Value format from date-time from property updated_at of schema Support in request body + - [Deleted] Value format from date-time from property created_at of schema Support in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Support in response with status code 200 + + +#### updateInjectableTag + +- ##### What's New + - [Added] Response with status 5XX + + +#### getInjectableTags + +- ##### What's New + - [Added] Response with status 5XX + + +#### addInjectableTag + +- ##### What's New + - [Added] Response with status 5XX + + +#### removeInjectableTag + +- ##### What's New + - [Added] Response with status 5XX + + +#### editInjectableTag + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Possible values from inline,external from property tag.sub_type of schema HandpickedTagSchema in request body + + +#### getBlogBySlug + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property publish_date of schema BlogSchema in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### createPage + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### getPages + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### updatePage + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in request body + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in request body + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### getPageBySlug + +- ##### What's New + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property date_meta.created_on of schema DateMeta in response with status code 200 + - [Deleted] Value format from date-time from property date_meta.modified_on of schema DateMeta in response with status code 200 + + +#### getCustomFieldTypes + +- ##### What's New + - [Added] property _id of schema CustomObjectByIdSchema in response with status code 200 + - [Added] property status of schema CustomObjectByIdSchema in response with status code 200 + - [Added] property display_name of schema CustomObjectByIdSchema in response with status code 200 + - [Added] property definition of schema CustomObjectByIdSchema in response with status code 200 + - [Added] property references of schema CustomObjectByIdSchema in response with status code 200 + - [Added] property fields of schema CustomObjectByIdSchema in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property metafield_types of schema MetafieldTypesSchema in response with status code 200 + + +#### getResources + +- ##### What's New + - [Added] Response with status 5XX + + +#### getCustomFieldDefinitions + +- ##### What's New + - [Added] property items[]._id of schema FieldDefinitionSchema in response with status code 200 + - [Added] property items[].creator of schema FieldDefinitionSchema in response with status code 200 + - [Added] property items[].key of schema FieldDefinitionSchema in response with status code 200 + - [Added] property items[].created_by of schema FieldDefinitionSchema in response with status code 200 + - [Added] property items[].updated_by of schema FieldDefinitionSchema in response with status code 200 + - [Added] property items[].created_at of schema FieldDefinitionSchema in response with status code 200 + - [Added] property items[].updated_at of schema FieldDefinitionSchema in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].id of schema FieldDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property items[].slug of schema FieldDefinitionSchema in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v2.0/company/{company_id}/customfields/definition To /service/platform/content/v1.0/company/{company_id}/metafields/definitions + + +#### getCustomFieldDefinitionByResource + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomFieldDefinitionByResource + + + +#### createCustomFieldDefinition + +- ##### What's New + - [Added] property resource of schema CustomFieldDefinitionRequestSchema in request body + - [Added] property key of schema CustomFieldDefinitionRequestSchema in request body + - [Added] property creator of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] property key of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] property created_by of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] property updated_by of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] property _id of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property slug of schema CustomFieldDefinitionRequestSchema in request body + - [Breaking] [Deleted] property slug of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Breaking] [Deleted] property id of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v2.0/company/{company_id}/customfields/resource/{resource}/definition To /service/platform/content/v1.0/company/{company_id}/metafields/definitions + + +#### getCustomFieldDefinitionBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomFieldDefinitionBySlug + + + +#### updateCustomFieldDefinitionBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateCustomFieldDefinitionBySlug + + + +#### deleteCustomFieldDefinitionBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteCustomFieldDefinitionBySlug + + + +#### getCustomFieldsByResourceSlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomFieldsByResourceSlug + + + +#### updateCustomFieldByResourceSlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateCustomFieldByResourceSlug + + + +#### deleteCustomFieldsByResourceSlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteCustomFieldsByResourceSlug + + + +#### createCustomObjectDefinition + +- ##### What's New + - [Added] property field_definitions[].key of schema CustomObjectCustomFieldDefinitions in request body + - [Breaking] [Added] Type object to property field_definitions[].validations[] of schema FieldValidations in response with status code 200 + - [Added] properties field_definitions[].validations[].name, field_definitions[].validations[].type, field_definitions[].validations[].value in response with status code 200 + - [Added] property field_definitions[].creator of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Added] property field_definitions[].key of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Added] property field_definitions[].created_by of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Added] property field_definitions[].metaobject_definition_id of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Added] property field_definitions[]._id of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Added] property _id of schema CustomObjectDefinitionSchema in response with status code 200 + - [Added] property creator of schema CustomObjectDefinitionSchema in response with status code 200 + - [Added] property created_by of schema CustomObjectDefinitionSchema in response with status code 200 + - [Added] property updated_by of schema CustomObjectDefinitionSchema in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property definition_slug of schema CustomObjectDefinitionRequestSchema in request body + - [Breaking] [Deleted] property field_definitions[].slug of schema CustomObjectCustomFieldDefinitions in request body + - [Breaking] [Deleted] property id of schema CustomObjectDefinitionSlugSchema in response with status code 200 + - [Breaking] [Deleted] property definition_slug of schema CustomObjectDefinitionSlugSchema in response with status code 200 + - [Breaking] [Deleted] property field_definitions[].slug of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Deleted] Value format from integer from property field_definitions[].company_id of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Breaking] [Deleted] property field_definitions[].application_id of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Breaking] [Deleted] property field_definitions[].id of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v2.0/company/{company_id}/customobjects/definition To /service/platform/content/v1.0/company/{company_id}/metaobjects/definitions + + +#### getCustomObjectDefinitions + +- ##### What's New + - [Added] property items[]._id of schema CustomObjectEntry in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].id of schema CustomObjectEntry in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v2.0/company/{company_id}/customobjects/definition To /service/platform/content/v1.0/company/{company_id}/metaobjects/definitions + + +#### getCustomObjectDefinitionBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomObjectDefinitionBySlug + + + +#### updateCustomObjectDefinitionBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateCustomObjectDefinitionBySlug + + + +#### deleteCustomObjectDefinitionBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteCustomObjectDefinitionBySlug + + + +#### getCustomObjectsBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomObjectsBySlug + + + +#### createCustomObjectBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method createCustomObjectBySlug + + + +#### getCustomObjectBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomObjectBySlug + + + +#### deleteCustomObjectBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteCustomObjectBySlug + + + +#### updateCustomObjectBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateCustomObjectBySlug + + + +#### getJobs + +- ##### What's New + - [Added] property items[]._id of schema CustomObjectJobSchema in response with status code 200 + - [Added] property items[].creator of schema CustomObjectJobSchema in response with status code 200 + - [Added] property items[].url of schema CustomObjectJobSchema in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].id of schema JobSchema in response with status code 200 + - [Deleted] Possible values from download,upload from property items[].action_type of schema JobSchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].created_at of schema JobSchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema JobSchema in response with status code 200 + - [Breaking] [Deleted] property items[].application_id of schema JobSchema in response with status code 200 + + +#### importCustomObjectEntriesBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method importCustomObjectEntriesBySlug + + + +#### exportCustomObjectEntriesBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method exportCustomObjectEntriesBySlug + + + +#### sampleCustomObjectBulkEntryBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method sampleCustomObjectBulkEntryBySlug + + + +#### getAppCustomFieldTypes + +- ##### What's New + - [Added] property _id of schema CustomObjectByIdSchema in response with status code 200 + - [Added] property status of schema CustomObjectByIdSchema in response with status code 200 + - [Added] property display_name of schema CustomObjectByIdSchema in response with status code 200 + - [Added] property definition of schema CustomObjectByIdSchema in response with status code 200 + - [Added] property references of schema CustomObjectByIdSchema in response with status code 200 + - [Added] property fields of schema CustomObjectByIdSchema in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property metafield_types of schema MetafieldTypesSchema in response with status code 200 + + +#### getAppResources + +- ##### What's New + - [Added] Response with status 4XX + - [Added] Response with status 5XX + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 400 + + +#### getAppCustomFieldDefinitions + +- ##### What's New + - [Added] property items[]._id of schema FieldDefinitionSchema in response with status code 200 + - [Added] property items[].creator of schema FieldDefinitionSchema in response with status code 200 + - [Added] property items[].key of schema FieldDefinitionSchema in response with status code 200 + - [Added] property items[].created_by of schema FieldDefinitionSchema in response with status code 200 + - [Added] property items[].updated_by of schema FieldDefinitionSchema in response with status code 200 + - [Added] property items[].created_at of schema FieldDefinitionSchema in response with status code 200 + - [Added] property items[].updated_at of schema FieldDefinitionSchema in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].id of schema FieldDefinitionSchema in response with status code 200 + - [Breaking] [Deleted] property items[].slug of schema FieldDefinitionSchema in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v2.0/company/{company_id}/application/{application_id}/customfields/definition To /service/platform/content/v1.0/company/{company_id}/application/{application_id}/metafields/definitions + + +#### getAppCustomFieldDefinitionByResource + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAppCustomFieldDefinitionByResource + + + +#### createAppCustomFieldDefinition + +- ##### What's New + - [Added] property resource of schema CustomFieldDefinitionRequestSchema in request body + - [Added] property key of schema CustomFieldDefinitionRequestSchema in request body + - [Added] property creator of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] property key of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] property created_by of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] property updated_by of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] property _id of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property slug of schema CustomFieldDefinitionRequestSchema in request body + - [Breaking] [Deleted] property slug of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Breaking] [Deleted] property id of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v2.0/company/{company_id}/application/{application_id}/customfields/resource/{resource}/definition To /service/platform/content/v1.0/company/{company_id}/application/{application_id}/metafields/definitions + + +#### getAppCustomFieldDefinitionBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAppCustomFieldDefinitionBySlug + + + +#### updateAppCustomFieldDefinitionBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateAppCustomFieldDefinitionBySlug + + + +#### deleteAppCustomFieldDefinitionBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteAppCustomFieldDefinitionBySlug + + + +#### getAppCustomFieldsByResourceSlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAppCustomFieldsByResourceSlug + + + +#### updateAppCustomFieldByResourceSlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateAppCustomFieldByResourceSlug + + + +#### createAppCustomObjectDefinition + +- ##### What's New + - [Added] property field_definitions[].key of schema CustomObjectCustomFieldDefinitions in request body + - [Breaking] [Added] Type object to property field_definitions[].validations[] of schema FieldValidations in response with status code 200 + - [Added] properties field_definitions[].validations[].name, field_definitions[].validations[].type, field_definitions[].validations[].value in response with status code 200 + - [Added] property field_definitions[].creator of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Added] property field_definitions[].key of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Added] property field_definitions[].created_by of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Added] property field_definitions[].metaobject_definition_id of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Added] property field_definitions[]._id of schema CustomObjectCustomFieldDefinitionResSchema in response with status code 200 + - [Added] property _id of schema CustomObjectDefinitionSchema in response with status code 200 + - [Added] property creator of schema CustomObjectDefinitionSchema in response with status code 200 + - [Added] property created_by of schema CustomObjectDefinitionSchema in response with status code 200 + - [Added] property updated_by of schema CustomObjectDefinitionSchema in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property definition_slug of schema CustomObjectDefinitionRequestSchema in request body + - [Breaking] [Deleted] property field_definitions[].slug of schema CustomObjectCustomFieldDefinitions in request body + - [Breaking] [Deleted] property id of schema CustomObjectDefinitionSlugSchema in response with status code 200 + - [Breaking] [Deleted] property definition_slug of schema CustomObjectDefinitionSlugSchema in response with status code 200 + - [Breaking] [Deleted] property field_definitions[].slug of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Deleted] Value format from integer from property field_definitions[].company_id of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Breaking] [Deleted] property field_definitions[].application_id of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + - [Breaking] [Deleted] property field_definitions[].id of schema CustomFieldDefinitionDetailResSchema in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v2.0/company/{company_id}/application/{application_id}/customobjects/definition To /service/platform/content/v1.0/company/{company_id}/application/{application_id}/metaobjects/definitions + + +#### getAppCustomObjectDefinitions + +- ##### What's New + - [Added] property items[]._id of schema CustomObjectEntry in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].id of schema CustomObjectEntry in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/platform/content/v2.0/company/{company_id}/application/{application_id}/customobjects/definition To /service/platform/content/v1.0/company/{company_id}/application/{application_id}/metaobjects/definitions + + +#### getAppCustomObjectDefinitionBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAppCustomObjectDefinitionBySlug + + + +#### updateAppCustomObjectDefinitionBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateAppCustomObjectDefinitionBySlug + + + +#### deleteAppCustomObjectDefinitionBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteAppCustomObjectDefinitionBySlug + + + +#### getAppCustomObjectsBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAppCustomObjectsBySlug + + + +#### createAppCustomObjectBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method createAppCustomObjectBySlug + + + +#### getAppCustomObjectBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAppCustomObjectBySlug + + + +#### deleteAppCustomObjectBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteAppCustomObjectBySlug + + + +#### updateAppCustomObjectBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateAppCustomObjectBySlug + + + +#### getAppJobs + +- ##### What's New + - [Added] property items[]._id of schema CustomObjectJobSchema in response with status code 200 + - [Added] property items[].creator of schema CustomObjectJobSchema in response with status code 200 + - [Added] property items[].url of schema CustomObjectJobSchema in response with status code 200 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].id of schema JobSchema in response with status code 200 + - [Deleted] Possible values from download,upload from property items[].action_type of schema JobSchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].created_at of schema JobSchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema JobSchema in response with status code 200 + - [Breaking] [Deleted] property items[].application_id of schema JobSchema in response with status code 200 + + +#### importAppCustomObjectEntriesBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method importAppCustomObjectEntriesBySlug + + + +#### exportAppCustomObjectEntriesBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method exportAppCustomObjectEntriesBySlug + + + +#### sampleAppCustomObjectBulkEntryBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method sampleAppCustomObjectBulkEntryBySlug + + + +#### getSlideshows + +- ##### What's New + - [Added] method getSlideshows + + + +#### createSlideshow + +- ##### What's New + - [Added] method createSlideshow + + + +#### getSlideshowBySlug + +- ##### What's New + - [Added] method getSlideshowBySlug + + + +#### updateSlideshow + +- ##### What's New + - [Added] method updateSlideshow + + + +#### deleteSlideshow + +- ##### What's New + - [Added] method deleteSlideshow + + + +#### getCustomFieldDefinition + +- ##### What's New + - [Added] method getCustomFieldDefinition + + + +#### updateCustomFieldDefinition + +- ##### What's New + - [Added] method updateCustomFieldDefinition + + + +#### deleteCustomFieldDefinition + +- ##### What's New + - [Added] method deleteCustomFieldDefinition + + + +#### getCustomFields + +- ##### What's New + - [Added] method getCustomFields + + + +#### getCustomFieldsByResourceId + +- ##### What's New + - [Added] method getCustomFieldsByResourceId + + + +#### createCustomFieldByResourceId + +- ##### What's New + - [Added] method createCustomFieldByResourceId + + + +#### getCustomObjectDefinition + +- ##### What's New + - [Added] method getCustomObjectDefinition + + + +#### updateCustomObjectDefinition + +- ##### What's New + - [Added] method updateCustomObjectDefinition + + + +#### deleteCustomObjectDefinition + +- ##### What's New + - [Added] method deleteCustomObjectDefinition + + + +#### getCustomObjects + +- ##### What's New + - [Added] method getCustomObjects + + + +#### createCustomObject + +- ##### What's New + - [Added] method createCustomObject + + + +#### getCustomObject + +- ##### What's New + - [Added] method getCustomObject + + + +#### deleteCustomObject + +- ##### What's New + - [Added] method deleteCustomObject + + + +#### updateCustomObject + +- ##### What's New + - [Added] method updateCustomObject + + + +#### importCustomObjectEntries + +- ##### What's New + - [Added] method importCustomObjectEntries + + + +#### exportCustomObjectEntries + +- ##### What's New + - [Added] method exportCustomObjectEntries + + + +#### sampleCustomObjectBulkEntry + +- ##### What's New + - [Added] method sampleCustomObjectBulkEntry + + + +#### getAppCustomFieldDefinition + +- ##### What's New + - [Added] method getAppCustomFieldDefinition + + + +#### updateAppCustomFieldDefinition + +- ##### What's New + - [Added] method updateAppCustomFieldDefinition + + + +#### deleteAppCustomFieldDefinition + +- ##### What's New + - [Added] method deleteAppCustomFieldDefinition + + + +#### getAppCustomFields + +- ##### What's New + - [Added] method getAppCustomFields + + + +#### getAppCustomFieldsByResourceId + +- ##### What's New + - [Added] method getAppCustomFieldsByResourceId + + + +#### createAppCustomFieldByResourceId + +- ##### What's New + - [Added] method createAppCustomFieldByResourceId + + + +#### getAppCustomObjectDefinition + +- ##### What's New + - [Added] method getAppCustomObjectDefinition + + + +#### updateAppCustomObjectDefinition + +- ##### What's New + - [Added] method updateAppCustomObjectDefinition + + + +#### deleteAppCustomObjectDefinition + +- ##### What's New + - [Added] method deleteAppCustomObjectDefinition + + + +#### getAppCustomObjects + +- ##### What's New + - [Added] method getAppCustomObjects + + + +#### createAppCustomObject + +- ##### What's New + - [Added] method createAppCustomObject + + + +#### getAppCustomObject + +- ##### What's New + - [Added] method getAppCustomObject + + + +#### deleteAppCustomObject + +- ##### What's New + - [Added] method deleteAppCustomObject + + + +#### updateAppCustomObject + +- ##### What's New + - [Added] method updateAppCustomObject + + + +#### importAppCustomObjectEntries + +- ##### What's New + - [Added] method importAppCustomObjectEntries + + + +#### exportAppCustomObjectEntries + +- ##### What's New + - [Added] method exportAppCustomObjectEntries + + + +#### sampleAppCustomObjectBulkEntry + +- ##### What's New + - [Added] method sampleAppCustomObjectBulkEntry + + + +### Discount + + + +#### getDiscounts + +- ##### What's Deprecated + - [Deleted] Possible values from app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory from property items[].job_type of schema DiscountJob in response with status code 200 + - [Deleted] Possible values from flat,percentage from property items[].discount_type of schema DiscountJob in response with status code 200 + - [Deleted] Value format from date-time from property items[].created_on of schema DiscountJob in response with status code 200 + - [Deleted] Value format from date-time from property items[].modified_on of schema DiscountJob in response with status code 200 + + +#### createDiscount + +- ##### What's Deprecated + - [Deleted] Possible values from app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory from property job_type of schema DiscountJob in response with status code 200 + - [Deleted] Possible values from flat,percentage from property discount_type of schema DiscountJob in response with status code 200 + - [Deleted] Value format from date-time from property created_on of schema DiscountJob in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema DiscountJob in response with status code 200 + + +#### getDiscount + +- ##### What's Deprecated + - [Deleted] Possible values from app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory from property job_type of schema DiscountJob in response with status code 200 + - [Deleted] Possible values from flat,percentage from property discount_type of schema DiscountJob in response with status code 200 + - [Deleted] Value format from date-time from property created_on of schema DiscountJob in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema DiscountJob in response with status code 200 + + +#### updateDiscount + +- ##### What's Deprecated + - [Deleted] Possible values from app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory from property job_type of schema DiscountJob in response with status code 200 + - [Deleted] Possible values from flat,percentage from property discount_type of schema DiscountJob in response with status code 200 + - [Deleted] Value format from date-time from property created_on of schema DiscountJob in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema DiscountJob in response with status code 200 + + +#### validateDiscountFile + +- ##### What's Deprecated + - [Deleted] Possible values from app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory from property job_type of schema FileJobRequestSchema in request body + - [Deleted] Possible values from flat,percentage from property discount_type of schema FileJobRequestSchema in request body + - [Deleted] Possible values from app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory from property body.job_type of schema FileJobBody in response with status code 200 + - [Deleted] Possible values from flat,percentage from property body.discount_type of schema FileJobBody in response with status code 200 + - [Deleted] Value format from date-time from property body.created_on of schema FileJobBody in response with status code 200 + - [Deleted] Value format from date-time from property body.modified_on of schema FileJobBody in response with status code 200 + - [Deleted] Value format from date-time from property created_on of schema FileJobResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema FileJobResponseSchema in response with status code 200 + + +#### downloadDiscountFile + +- ##### What's Deprecated + - [Deleted] Possible values from app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory from property body.job_type of schema FileJobBody in response with status code 200 + - [Deleted] Possible values from flat,percentage from property body.discount_type of schema FileJobBody in response with status code 200 + - [Deleted] Value format from date-time from property body.created_on of schema FileJobBody in response with status code 200 + - [Deleted] Value format from date-time from property body.modified_on of schema FileJobBody in response with status code 200 + - [Deleted] Value format from date-time from property created_on of schema FileJobResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema FileJobResponseSchema in response with status code 200 + + +#### getValidationJob + +- ##### What's Deprecated + - [Deleted] Possible values from app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory from property body.job_type of schema FileJobBody in response with status code 200 + - [Deleted] Possible values from flat,percentage from property body.discount_type of schema FileJobBody in response with status code 200 + - [Deleted] Value format from date-time from property body.created_on of schema FileJobBody in response with status code 200 + - [Deleted] Value format from date-time from property body.modified_on of schema FileJobBody in response with status code 200 + - [Deleted] Value format from date-time from property created_on of schema FileJobResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema FileJobResponseSchema in response with status code 200 + + +#### getDownloadJob + +- ##### What's Deprecated + - [Deleted] Possible values from app,app|brand,app|store,app|brand|store,app|brand|product,app|brand|store|product,app|brand|inventory,app|brand|store|inventory from property body.job_type of schema FileJobBody in response with status code 200 + - [Deleted] Possible values from flat,percentage from property body.discount_type of schema FileJobBody in response with status code 200 + - [Deleted] Value format from date-time from property body.created_on of schema FileJobBody in response with status code 200 + - [Deleted] Value format from date-time from property body.modified_on of schema FileJobBody in response with status code 200 + - [Deleted] Value format from date-time from property created_on of schema FileJobResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema FileJobResponseSchema in response with status code 200 + + +### FileStorage + + + +#### startUpload + +- ##### What's New + - [Added] cdn made required in response with status code 200 + - [Added] property cdn of schema StartResponse in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Security in Request + +- ##### What's Changed + - [Changed] Path From /service/platform/assets/v2.0/company/{company_id}/namespaces/{namespace}/upload/start To /service/platform/assets/v1.0/company/{company_id}/namespaces/{namespace}/upload/start + + +#### completeUpload + +- ##### What's New + - [Added] cdn made required in request body + - [Added] property cdn of schema StartResponse in request body + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_on of schema FileUploadComplete in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema FileUploadComplete in response with status code 200 + - [Breaking] [Deleted] Security in Request + +- ##### What's Changed + - [Changed] Path From /service/platform/assets/v2.0/company/{company_id}/namespaces/{namespace}/upload/complete To /service/platform/assets/v1.0/company/{company_id}/namespaces/{namespace}/upload/complete + + +#### appStartUpload + +- ##### What's New + - [Added] cdn made required in response with status code 200 + - [Added] property cdn of schema StartResponse in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Security in Request + +- ##### What's Changed + - [Changed] Path From /service/platform/assets/v2.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/upload/start To /service/platform/assets/v1.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/upload/start + + +#### appCompleteUpload + +- ##### What's New + - [Added] cdn made required in request body + - [Added] property cdn of schema StartResponse in request body + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_on of schema FileUploadComplete in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema FileUploadComplete in response with status code 200 + - [Breaking] [Deleted] Security in Request + +- ##### What's Changed + - [Changed] Path From /service/platform/assets/v2.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/upload/complete To /service/platform/assets/v1.0/company/{company_id}/application/{application_id}/namespaces/{namespace}/upload/complete + + +#### getSignUrls + +- ##### What's Deprecated + - [Breaking] [Deleted] Security in Request + + +#### copyFiles + +- ##### What's Deprecated + - [Breaking] [Deleted] Security in Request + + +#### appCopyFiles + +- ##### What's Deprecated + - [Breaking] [Deleted] Security in Request + + +#### browse + +- ##### What's New + - [Added] property items[].createdAt of schema in response with status code 200 + - [Added] property items[].updatedAt of schema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].created_at of schema in response with status code 200 + - [Breaking] [Deleted] property items[].updated_at of schema in response with status code 200 + - [Breaking] [Deleted] Security in Request + + +#### appbrowse + +- ##### What's New + - [Added] property items[].createdAt of schema in response with status code 200 + - [Added] property items[].updatedAt of schema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].created_at of schema in response with status code 200 + - [Breaking] [Deleted] property items[].updated_at of schema in response with status code 200 + - [Breaking] [Deleted] Security in Request + + +#### browsefiles + +- ##### What's New + - [Added] property items[].createdAt of schema in response with status code 200 + - [Added] property items[].updatedAt of schema in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].created_at of schema in response with status code 200 + - [Breaking] [Deleted] property items[].updated_at of schema in response with status code 200 + - [Breaking] [Deleted] Security in Request + + +#### getPdfTypes + +- ##### What's Deprecated + - [Breaking] [Deleted] property data[].store_os of schema InvoiceTypesData in response with status code 200 + - [Breaking] [Deleted] Security in Request + +- ##### What's Changed + - [Breaking] [Changed] data[].store_os made optional in response with status code 200 + + +#### fetchPdfTypeById + +- ##### What's Deprecated + - [Breaking] [Deleted] method fetchPdfTypeById + + + +#### getDefaultPdfData + +- ##### What's New + - [Added] property data[].payload.shipment_meta of schema DummyTemplateDataPayload in response with status code 200 + - [Added] property data[].payload.order_meta of schema DummyTemplateDataPayload in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property data[].payload.current_date of schema PdfPayloadDetails in response with status code 200 + - [Deleted] Value format from date-time from property data[].payload.invoice_detail.invoice_date of schema InvoiceDetail in response with status code 200 + - [Breaking] [Deleted] Security in Request + + +#### getPdfPayloadById + +- ##### What's Deprecated + - [Breaking] [Deleted] method getPdfPayloadById + + + +#### getConfigHtmlTemplateById + +- ##### What's Deprecated + - [Breaking] [Deleted] method getConfigHtmlTemplateById + + + +#### updateHtmlTemplate + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property country_code of schema PdfConfig in request body + - [Breaking] [Deleted] property default_template of schema PdfConfig in request body + - [Breaking] [Deleted] Security in Request + + +#### deletePdfGeneratorConfig + +- ##### What's Deprecated + - [Breaking] [Deleted] method deletePdfGeneratorConfig + + + +#### getHtmlTemplateConfig + +- ##### What's Deprecated + - [Breaking] [Deleted] Security in Request + +- ##### What's Changed + - [Breaking] [Changed] operationId from getHtmlTemplateConfig to getDefaultHtmlTemplate + + +#### saveHtmlTemplate + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property country_code of schema PdfConfig in request body + - [Breaking] [Deleted] property default_template of schema PdfConfig in request body + - [Breaking] [Deleted] Security in Request + + +#### getDefaultPdfTemplate + +- ##### What's Deprecated + - [Breaking] [Deleted] Security in Request + + +#### generatePaymentReceipt + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property payload.payments[].txn_date of schema PaymentReceiptPayments in request body + - [Breaking] [Deleted] Security in Request + + +#### fetchPdfDefaultTemplateById + +- ##### What's Deprecated + - [Breaking] [Deleted] method fetchPdfDefaultTemplateById + + + +#### proxy + +- ##### What's Deprecated + - [Breaking] [Deleted] Security in Request + + +### Serviceability + + + +#### createZone + +- ##### What's New + - [Breaking] [Added] store_ids made required in request body + - [Added] zone_id made required in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Possible values from non-pincode to country-state of property region_type of schema CreateZoneData in request body + + +#### updateZoneById + +- ##### What's Changed + - [Breaking] [Changed] Possible values from non-pincode to country-state of property region_type of schema UpdateZoneData in request body + + +#### getZoneById + +- ##### What's Deprecated + - [Breaking] [Deleted] property stores_count of schema GetZoneByIdSchema in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Possible values from non-pincode to country-state of property region_type of schema GetZoneByIdSchema in response with status code 200 + + +#### getAllStores + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_on of schema ItemResult in response with status code 200 + - [Deleted] Value format from date-time from property items[].verified_on of schema ItemResult in response with status code 200 + - [Deleted] Value format from date-time from property items[].modified_on of schema ItemResult in response with status code 200 + + +#### updatePincodeMopView + +- ##### What's Deprecated + - [Deleted] Possible values from activate,deactivate from property action of schema PincodeMopData in request body + - [Deleted] Possible values from activate,deactivate from property action of schema PincodeMOPResult in response with status code 200 + + +#### updatePincodeCoDListing + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter pageNumber (type: integer) + + - [Breaking] [Deleted] query parameter pageSize (type: integer) + + + +#### updatePincodeAuditHistory + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter pageNumber (type: integer) + + - [Breaking] [Deleted] query parameter pageSize (type: integer) + + - [Deleted] Value format from date-time from property data[].updated_at of schema PincodeMopUpdateAuditHistoryResult in response with status code 200 + + +#### createCourierPartnerAccount + +- ##### What's New + - [Breaking] [Added] is_own_account made required in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] property company_id of schema CourierAccount in response with status code 200 + - [Breaking] [Deleted] property scheme_rules of schema CourierAccount in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] scheme_rules made optional in response with status code 200 + + +#### getCourierPartnerAccounts + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].company_id of schema CourierAccountResult in response with status code 200 + - [Breaking] [Deleted] property items[].extension_id of schema CourierAccountResult in response with status code 200 + - [Breaking] [Deleted] property items[].scheme_rules.name of schema CourierPartnerSchemeModel in response with status code 200 + - [Breaking] [Deleted] property items[].scheme_rules.volumetric_weight of schema CourierPartnerSchemeModel in response with status code 200 + - [Breaking] [Deleted] property items[].scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property items[].scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + + +#### updateCourierPartnerAccount + +- ##### What's New + - [Added] property account_id of schema CourierAccount in request body + - [Breaking] [Added] stage made required in request body + - [Breaking] [Added] is_own_account made required in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] property company_id of schema CourierAccountResult in response with status code 200 + - [Breaking] [Deleted] property extension_id of schema CourierAccountResult in response with status code 200 + - [Breaking] [Deleted] property scheme_rules.name of schema CourierPartnerSchemeModel in response with status code 200 + - [Breaking] [Deleted] property scheme_rules.volumetric_weight of schema CourierPartnerSchemeModel in response with status code 200 + - [Breaking] [Deleted] property scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + + +#### getCourierPartnerAccount + +- ##### What's Deprecated + - [Breaking] [Deleted] property company_id of schema CourierAccountResult in response with status code 200 + - [Breaking] [Deleted] property extension_id of schema CourierAccountResult in response with status code 200 + - [Breaking] [Deleted] property scheme_rules.name of schema CourierPartnerSchemeModel in response with status code 200 + - [Breaking] [Deleted] property scheme_rules.volumetric_weight of schema CourierPartnerSchemeModel in response with status code 200 + - [Breaking] [Deleted] property scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + + +#### updateCourierRule + +- ##### What's New + - [Breaking] [Added] type made required in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in request body + - [Breaking] [Deleted] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in request body + - [Breaking] [Deleted] property type of schema CourierPartnerRule in request body + - [Breaking] [Deleted] Default value from true from property is_active of schema CourierPartnerRuleResult in response with status code 200 + - [Breaking] [Deleted] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Breaking] [Deleted] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema CourierPartnerRuleResult in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to string of property conditions.forward.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from array to string of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from array to string of property conditions.forward.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] Type from array to string of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] cp_list[].account_id, cp_list[].extension_id, cp_list[].is_self_ship made optional in response with status code 200 + - [Breaking] [Changed] is_active, sort, company_id, application_id, type, conditions, id, name made optional in response with status code 200 + + +#### getCourierPartnerRule + +- ##### What's Deprecated + - [Breaking] [Deleted] Default value from true from property is_active of schema CourierPartnerRuleResult in response with status code 200 + - [Breaking] [Deleted] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Breaking] [Deleted] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema CourierPartnerRuleResult in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to string of property conditions.forward.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] Type from array to string of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] cp_list[].account_id, cp_list[].extension_id, cp_list[].is_self_ship made optional in response with status code 200 + - [Breaking] [Changed] is_active, sort, company_id, application_id, type, conditions, id, name made optional in response with status code 200 + + +#### createCourierPartnerRule + +- ##### What's New + - [Breaking] [Added] type made required in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in request body + - [Breaking] [Deleted] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in request body + - [Breaking] [Deleted] property type of schema CourierPartnerRule in request body + - [Breaking] [Deleted] Default value from true from property is_active of schema CourierPartnerRuleResult in response with status code 200 + - [Breaking] [Deleted] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Breaking] [Deleted] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Deleted] Value format from date-time from property modified_on of schema CourierPartnerRuleResult in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to string of property conditions.forward.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from array to string of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from array to string of property conditions.forward.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] Type from array to string of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] cp_list[].account_id, cp_list[].extension_id, cp_list[].is_self_ship made optional in response with status code 200 + - [Breaking] [Changed] is_active, sort, company_id, application_id, type, conditions, id, name made optional in response with status code 200 + + +#### getCourierPartnerRules + +- ##### What's Deprecated + - [Breaking] [Deleted] Default value from true from property items[].is_active of schema CourierPartnerRuleResult in response with status code 200 + - [Breaking] [Deleted] property items[].conditions.forward.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Breaking] [Deleted] property items[].conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Deleted] Value format from date-time from property items[].modified_on of schema CourierPartnerRuleResult in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to string of property items[].conditions.forward.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] Type from array to string of property items[].conditions.reverse.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] items[].cp_list[].account_id, items[].cp_list[].extension_id, items[].cp_list[].is_self_ship made optional in response with status code 200 + - [Breaking] [Changed] items[].is_active, items[].sort, items[].company_id, items[].application_id, items[].type, items[].conditions, items[].id, items[].name made optional in response with status code 200 + + +#### getCourierPartners + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCourierPartners + + + +#### updateCompanyConfiguration + +- ##### What's Deprecated + - [Deleted] Possible values from self-ship,seller-controlled,admin-controlled from property logistics_as_actual of schema CompanyConfig in request body + - [Breaking] [Deleted] property company_id of schema CompanyConfig in request body + - [Breaking] [Deleted] property application_id of schema CompanyConfig in request body + - [Deleted] Possible values from self-ship,seller-controlled,admin-controlled from property logistics_as_actual of schema CompanyConfig in response with status code 200 + - [Breaking] [Deleted] property company_id of schema CompanyConfig in response with status code 200 + - [Breaking] [Deleted] property application_id of schema CompanyConfig in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to boolean of property logistics_as_actual of schema CompanyConfig in request body + - [Changed] company_id made optional in request body + - [Breaking] [Changed] Type from string to boolean of property logistics_as_actual of schema CompanyConfig in response with status code 200 + - [Changed] company_id made optional in response with status code 200 + + +#### getCompanyConfiguration + +- ##### What's Deprecated + - [Deleted] Possible values from self-ship,seller-controlled,admin-controlled from property logistics_as_actual of schema CompanyConfig in response with status code 200 + - [Breaking] [Deleted] property company_id of schema CompanyConfig in response with status code 200 + - [Breaking] [Deleted] property application_id of schema CompanyConfig in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to boolean of property logistics_as_actual of schema CompanyConfig in response with status code 200 + - [Changed] company_id made optional in response with status code 200 + + +#### updateApplicationConfiguration + +- ##### What's Deprecated + - [Breaking] [Deleted] property zones.active_count of schema ZoneConfig in request body + - [Breaking] [Deleted] property zones.total_count of schema ZoneConfig in request body + - [Breaking] [Deleted] property zones.active_count of schema ZoneConfig in response with status code 200 + - [Breaking] [Deleted] property zones.total_count of schema ZoneConfig in response with status code 200 + + +#### getApplicationConfiguration + +- ##### What's Deprecated + - [Breaking] [Deleted] property zones.active_count of schema ZoneConfig in response with status code 200 + - [Breaking] [Deleted] property zones.total_count of schema ZoneConfig in response with status code 200 + + +#### bulkTat + +- ##### What's New + - [Added] status made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property file_path of schema BulkRegionJobDetails in request body + - [Deleted] Possible values from import,export from property action of schema BulkRegionResultItemData in response with status code 200 + + +#### getBulkTat + +- ##### What's New + - [Added] items[].status made required in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from import,export from property items[].action of schema BulkRegionResultItemData in response with status code 200 + + +#### patchApplicationServiceabilitySelfShipment + +- ##### What's New + - [Added] Possible nullable value true to property data.self_ship of schema ApplicationSelfShipConfig in response with status code 200 + - [Added] Possible nullable value true to property data.self_ship of schema ApplicationSelfShipConfig in response with status code 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] properties data.self_ship.is_active, data.self_ship.tat in response with status code 200 + - [Breaking] [Deleted] properties data.self_ship.is_active, data.self_ship.tat in response with status code 400 + +- ##### What's Changed + - [Breaking] [Changed] data.self_ship.is_active, data.self_ship.tat made optional in response with status code 200 + - [Breaking] [Changed] data.self_ship.is_active, data.self_ship.tat made optional in response with status code 400 + + +#### getApplicationServiceabilitySelfShipment + +- ##### What's New + - [Added] Possible nullable value true to property data.self_ship of schema ApplicationSelfShipConfig in response with status code 200 + - [Added] Possible nullable value true to property data.self_ship of schema ApplicationSelfShipConfig in response with status code 400 + +- ##### What's Deprecated + - [Deleted] Deprecated status from true + - [Breaking] [Deleted] properties data.self_ship.is_active, data.self_ship.tat in response with status code 200 + - [Breaking] [Deleted] properties data.self_ship.is_active, data.self_ship.tat in response with status code 400 + +- ##### What's Changed + - [Breaking] [Changed] data.self_ship.is_active, data.self_ship.tat made optional in response with status code 200 + - [Breaking] [Changed] data.self_ship.is_active, data.self_ship.tat made optional in response with status code 400 + + +#### getApplicationConfig + +- ##### What's Changed + - [Breaking] [Changed] Type from integer to string of property store_priority[].id of schema StorePrioritySchema in response with status code 200 + + +#### insertApplicationConfig + +- ##### What's Changed + - [Breaking] [Changed] Type from integer to string of property store_priority[].id of schema StorePrioritySchema in request body + - [Breaking] [Changed] Type from integer to string of property store_priority[].id of schema StorePrioritySchema in response with status code 200 + + +#### updateStoreRulesConfig + +- ##### What's Changed + - [Breaking] [Changed] Type from integer to string of property store_priority[].id of schema StorePrioritySchema in request body + - [Breaking] [Changed] Type from integer to string of property store_priority[].id of schema StorePrioritySchema in response with status code 200 + + +#### getStoreRules + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from integer to string of property items[].store_priority[].id of schema StorePrioritySchema in response with status code 200 + - [Breaking] [Changed] Type from array to string of property items[].conditions.to_location.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### createStoreRules + +- ##### What's Deprecated + - [Breaking] [Deleted] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in request body + - [Breaking] [Deleted] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to string of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from integer to string of property store_priority[].id of schema StorePrioritySchema in request body + - [Breaking] [Changed] Type from integer to string of property store_priority[].id of schema StorePrioritySchema in response with status code 200 + - [Breaking] [Changed] Type from array to string of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### getStoreRule + +- ##### What's Deprecated + - [Breaking] [Deleted] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from integer to string of property store_priority[].id of schema StorePrioritySchema in response with status code 200 + - [Breaking] [Changed] Type from array to string of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### updateStoreRules + +- ##### What's Deprecated + - [Breaking] [Deleted] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in request body + - [Breaking] [Deleted] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to string of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from integer to string of property store_priority[].id of schema StorePrioritySchema in request body + - [Breaking] [Changed] Type from integer to string of property store_priority[].id of schema StorePrioritySchema in response with status code 200 + - [Breaking] [Changed] Type from array to string of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### bulkServiceability + +- ##### What's New + - [Added] status made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property file_path of schema BulkRegionJobDetails in request body + - [Deleted] Possible values from import,export from property action of schema BulkRegionResultItemData in response with status code 200 + + +#### getBulkServiceability + +- ##### What's New + - [Added] items[].status made required in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from import,export from property items[].action of schema BulkRegionResultItemData in response with status code 200 + + +#### getServiceability + +- ##### What's New + - [Added] pickup_cutoff made required in response with status code 200 + - [Added] route_code made required in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Deprecated status from true + - [Breaking] [Deleted] property is_reverse_pickup of schema ServiceabilityModel in response with status code 200 + + +#### updateServiceability + +- ##### What's New + - [Added] pickup_cutoff made required in request body + - [Added] route_code made required in request body + - [Added] pickup_cutoff made required in response with status code 200 + - [Added] route_code made required in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Deprecated status from true + - [Breaking] [Deleted] property is_reverse_pickup of schema ServiceabilityModel in request body + - [Breaking] [Deleted] property is_reverse_pickup of schema ServiceabilityModel in response with status code 200 + + +#### createPackageMaterial + +- ##### What's Deprecated + - [Deleted] Possible values from box,paper bag,corrugated box,wooden box from property package_type of schema PackageMaterial in request body + - [Deleted] Possible values from small,medium,large from property size of schema PackageMaterial in request body + - [Breaking] [Deleted] property company_id of schema PackageMaterialResult in response with status code 201 + - [Deleted] Possible values from box,paper bag,corrugated box,wooden box from property package_type of schema PackageMaterialResult in response with status code 201 + - [Deleted] Possible values from small,medium,large from property size of schema PackageMaterialResult in response with status code 201 + + +#### getPackageMaterialList + +- ##### What's Deprecated + - [Breaking] [Deleted] property items.company_id of schema PackageMaterialResult in response with status code 200 + - [Deleted] Possible values from box,paper bag,corrugated box,wooden box from property items.package_type of schema PackageMaterialResult in response with status code 200 + - [Deleted] Possible values from small,medium,large from property items.size of schema PackageMaterialResult in response with status code 200 + + +#### updatePackageMaterials + +- ##### What's Deprecated + - [Deleted] Possible values from box,paper bag,corrugated box,wooden box from property package_type of schema PackageMaterial in request body + - [Deleted] Possible values from small,medium,large from property size of schema PackageMaterial in request body + - [Breaking] [Deleted] property company_id of schema PackageMaterialResult in response with status code 200 + - [Deleted] Possible values from box,paper bag,corrugated box,wooden box from property package_type of schema PackageMaterialResult in response with status code 200 + - [Deleted] Possible values from small,medium,large from property size of schema PackageMaterialResult in response with status code 200 + + +#### getPackageMaterials + +- ##### What's Deprecated + - [Breaking] [Deleted] property company_id of schema PackageMaterialResult in response with status code 200 + - [Deleted] Possible values from box,paper bag,corrugated box,wooden box from property package_type of schema PackageMaterialResult in response with status code 200 + - [Deleted] Possible values from small,medium,large from property size of schema PackageMaterialResult in response with status code 200 + + +#### getOptimalLocations + +- ##### What's New + - [Added] property article of schema OptimlLocationsRequestSchema in request body + - [Breaking] [Added] articles made required in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] property articles of schema OptimlLocationsDetailsSchema in request body + + +#### createCourierPartnerScheme + +- ##### What's Deprecated + - [Breaking] [Deleted] method createCourierPartnerScheme + + + +#### getCourierPartnerSchemes + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCourierPartnerSchemes + + + +#### updateCourierPartnerScheme + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateCourierPartnerScheme + + + +#### getCourierPartnerScheme + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCourierPartnerScheme + + + +#### sampleFileServiceability + +- ##### What's Deprecated + - [Breaking] [Deleted] method sampleFileServiceability + + + +#### getSampleFileServiceabilityStatus + +- ##### What's Deprecated + - [Breaking] [Deleted] method getSampleFileServiceabilityStatus + + + +#### getCountries + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCountries + + + +### Order + + + +#### getAnnouncements + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property announcements[].created_at of schema AnnouncementResponseSchema in response with status code 200 + - [Breaking] [Deleted] property message of schema AnnouncementsResponseSchema in response with status code 200 + + +#### updateAddress + +- ##### What's New + - [Added] query parameter name (type: string) + + - [Added] query parameter address (type: string) + + - [Added] query parameter addressType (type: string) + + - [Added] query parameter pincode (type: string) + + - [Added] query parameter phone (type: string) + + - [Added] query parameter email (type: string) + + - [Added] query parameter landmark (type: string) + + - [Breaking] [Added] Required query parameter addressCategory (type: string) + + - [Added] query parameter city (type: string) + + - [Added] query parameter state (type: string) + + - [Added] query parameter country (type: string) + + +- ##### What's Deprecated + - [Breaking] [Deleted] Body content in Request + +- ##### What's Changed + - [Breaking] [Changed] location from path to query of parameter shipmentId + - [Changed] Security in Request + - [Breaking] [Changed] Security in Request + - [Breaking] [Changed] Security in Request + - [Changed] Path From /service/platform/order-manage/v1.0/company/{company_id}/shipment/{shipment_id}/address To /service/platform/order-manage/v1.0/company/{company_id}/delight/update-address + - [Changed] http method type from put To post + + +#### updateShipmentStatus + +- ##### What's Deprecated + - [Breaking] [Deleted] property statuses[].shipments[].data_updates.products[].filters[].quantity of schema ProductsDataUpdatesFilters in request body + - [Breaking] [Deleted] property statuses[].shipments[].data_updates.order of schema DataUpdates in request body + + +#### getShipmentHistory + +- ##### What's New + - [Added] property activity_history[].type of schema HistoryDict in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property activity_history[].activity_type of schema HistoryDict in response with status code 200 + - [Deleted] Type from object from property activity_history[].meta of schema HistoryMeta in response with status code 200 + - [Breaking] [Deleted] properties activity_history[].meta.store_id, activity_history[].meta.status, activity_history[].meta.status1, activity_history[].meta.call_id, activity_history[].meta.starttime, activity_history[].meta.reason, activity_history[].meta.short_link, activity_history[].meta.endtime, activity_history[].meta.store_name, activity_history[].meta.caller, activity_history[].meta.store_code, activity_history[].meta.billsec, activity_history[].meta.recordpath, activity_history[].meta.status2, activity_history[].meta.callerid, activity_history[].meta.duration, activity_history[].meta.channel_type, activity_history[].meta.activity_comment, activity_history[].meta.activity_type, activity_history[].meta.receiver, activity_history[].meta.recipient, activity_history[].meta.slug, activity_history[].meta.message, activity_history[].meta.prev_store_name, activity_history[].meta.prev_store_code, activity_history[].meta.prev_store_id, activity_history[].meta.refund_to, activity_history[].meta.refund_information in response with status code 200 + + +#### postShipmentHistory + +- ##### What's New + - [Added] property activity_history[].type of schema HistoryDict in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property activity_history[].activity_type of schema HistoryDict in response with status code 200 + - [Deleted] Type from object from property activity_history[].meta of schema HistoryMeta in response with status code 200 + - [Breaking] [Deleted] properties activity_history[].meta.store_id, activity_history[].meta.status, activity_history[].meta.status1, activity_history[].meta.call_id, activity_history[].meta.starttime, activity_history[].meta.reason, activity_history[].meta.short_link, activity_history[].meta.endtime, activity_history[].meta.store_name, activity_history[].meta.caller, activity_history[].meta.store_code, activity_history[].meta.billsec, activity_history[].meta.recordpath, activity_history[].meta.status2, activity_history[].meta.callerid, activity_history[].meta.duration, activity_history[].meta.channel_type, activity_history[].meta.activity_comment, activity_history[].meta.activity_type, activity_history[].meta.receiver, activity_history[].meta.recipient, activity_history[].meta.slug, activity_history[].meta.message, activity_history[].meta.prev_store_name, activity_history[].meta.prev_store_code, activity_history[].meta.prev_store_id, activity_history[].meta.refund_to, activity_history[].meta.refund_information in response with status code 200 + + +#### createOrder + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property shipments[].processing_dates.pack_by_date of schema ProcessingDates in request body + - [Breaking] [Deleted] Possible values from Digital from property shipments[].order_type of schema Shipment in request body + - [Breaking] [Deleted] properties shipments[].tags[].slug, shipments[].tags[].display_text in request body + - [Breaking] [Deleted] property shipments[].system_messages of schema Shipment in request body + - [Breaking] [Deleted] property shipments[].process_after_config of schema Shipment in request body + - [Breaking] [Deleted] property shipments[].billing_address_json.address of schema Address in request body + - [Deleted] Possible values from home,office,other from property shipments[].billing_address_json.address_type of schema Address in request body + - [Deleted] Possible values from store,delivery,billing from property shipments[].billing_address_json.address_category of schema Address in request body + - [Deleted] Value format from date-time from property shipments[].billing_address_json.created_at of schema Address in request body + - [Deleted] Value format from date-time from property shipments[].billing_address_json.updated_at of schema Address in request body + - [Breaking] [Deleted] property shipments[].billing_address_json.area_code_slug of schema Address in request body + - [Breaking] [Deleted] property shipments[].billing_address_json.country_code of schema Address in request body + - [Breaking] [Deleted] property shipments[].billing_address_json.country_iso_code of schema Address in request body + - [Breaking] [Deleted] property shipments[].billing_address_json.country_phone_code of schema Address in request body + - [Breaking] [Deleted] property shipments[].billing_address_json.delivery_address_id of schema Address in request body + - [Breaking] [Deleted] property shipments[].billing_address_json.geo_location of schema Address in request body + - [Breaking] [Deleted] property shipments[].billing_address_json.name of schema Address in request body + - [Breaking] [Deleted] property shipments[].billing_address_json.sector of schema Address in request body + - [Breaking] [Deleted] property shipments[].billing_address_json.state_code of schema Address in request body + - [Breaking] [Deleted] property shipments[].billing_address_json.uid of schema Address in request body + - [Breaking] [Deleted] property shipments[].billing_address_json.user_id of schema Address in request body + - [Breaking] [Deleted] property shipments[].delivery_address_json.address of schema Address in request body + - [Deleted] Possible values from home,office,other from property shipments[].delivery_address_json.address_type of schema Address in request body + - [Deleted] Possible values from store,delivery,billing from property shipments[].delivery_address_json.address_category of schema Address in request body + - [Deleted] Value format from date-time from property shipments[].delivery_address_json.created_at of schema Address in request body + - [Deleted] Value format from date-time from property shipments[].delivery_address_json.updated_at of schema Address in request body + - [Breaking] [Deleted] property shipments[].delivery_address_json.area_code_slug of schema Address in request body + - [Breaking] [Deleted] property shipments[].delivery_address_json.country_code of schema Address in request body + - [Breaking] [Deleted] property shipments[].delivery_address_json.country_iso_code of schema Address in request body + - [Breaking] [Deleted] property shipments[].delivery_address_json.country_phone_code of schema Address in request body + - [Breaking] [Deleted] property shipments[].delivery_address_json.delivery_address_id of schema Address in request body + - [Breaking] [Deleted] property shipments[].delivery_address_json.geo_location of schema Address in request body + - [Breaking] [Deleted] property shipments[].delivery_address_json.name of schema Address in request body + - [Breaking] [Deleted] property shipments[].delivery_address_json.sector of schema Address in request body + - [Breaking] [Deleted] property shipments[].delivery_address_json.state_code of schema Address in request body + - [Breaking] [Deleted] property shipments[].delivery_address_json.uid of schema Address in request body + - [Breaking] [Deleted] property shipments[].delivery_address_json.user_id of schema Address in request body + - [Deleted] Value format from date-time from property shipments[].created_at of schema Shipment in request body + - [Breaking] [Deleted] property shipments[].hand_over_contact_json.address of schema Address in request body + - [Deleted] Possible values from home,office,other from property shipments[].hand_over_contact_json.address_type of schema Address in request body + - [Deleted] Possible values from store,delivery,billing from property shipments[].hand_over_contact_json.address_category of schema Address in request body + - [Deleted] Value format from date-time from property shipments[].hand_over_contact_json.created_at of schema Address in request body + - [Deleted] Value format from date-time from property shipments[].hand_over_contact_json.updated_at of schema Address in request body + - [Breaking] [Deleted] property shipments[].hand_over_contact_json.area_code_slug of schema Address in request body + - [Breaking] [Deleted] property shipments[].hand_over_contact_json.country_code of schema Address in request body + - [Breaking] [Deleted] property shipments[].hand_over_contact_json.country_iso_code of schema Address in request body + - [Breaking] [Deleted] property shipments[].hand_over_contact_json.country_phone_code of schema Address in request body + - [Breaking] [Deleted] property shipments[].hand_over_contact_json.delivery_address_id of schema Address in request body + - [Breaking] [Deleted] property shipments[].hand_over_contact_json.geo_location of schema Address in request body + - [Breaking] [Deleted] property shipments[].hand_over_contact_json.name of schema Address in request body + - [Breaking] [Deleted] property shipments[].hand_over_contact_json.sector of schema Address in request body + - [Breaking] [Deleted] property shipments[].hand_over_contact_json.state_code of schema Address in request body + - [Breaking] [Deleted] property shipments[].hand_over_contact_json.uid of schema Address in request body + - [Breaking] [Deleted] property shipments[].hand_over_contact_json.user_id of schema Address in request body + - [Deleted] Value format from date-time from property shipments[].status.created_at of schema ShipmentStatusData in request body + - [Deleted] Value format from date-time from property shipments[].status.status_created_at of schema ShipmentStatusData in request body + - [Deleted] Value format from date-time from property external_creation_date of schema CreateOrderAPI in request body + - [Breaking] [Deleted] property config.lock_state_messages of schema CreateOrderConfig in request body + - [Breaking] [Deleted] property status of schema CreateOrderAPI in request body + - [Breaking] [Deleted] property system_messages of schema CreateOrderAPI in request body + + +#### getChannelConfig + +- ##### What's Deprecated + - [Breaking] [Deleted] method getChannelConfig + + + +#### createChannelConfig + +- ##### What's Deprecated + - [Breaking] [Deleted] method createChannelConfig + + + +#### checkOrderStatus + +- ##### What's Deprecated + - [Breaking] [Deleted] property start_date of schema OrderStatus in request body + - [Breaking] [Deleted] property end_date of schema OrderStatus in request body + - [Breaking] [Deleted] property mobile of schema OrderStatus in request body + - [Deleted] Value format from date-time from property result[].order_details.created_at of schema OrderDetails in response with status code 200 + - [Deleted] Value format from date-time from property result[].order_details.affiliate_order_date of schema OrderDetails in response with status code 200 + - [Breaking] [Deleted] property result[].order_details.charges of schema OrderDetails in response with status code 200 + +- ##### What's Changed + - [Changed] end_date, mobile, start_date made optional in request body + + +#### downloadLanesReport + +- ##### What's Deprecated + - [Breaking] [Deleted] property filters of schema BulkReportsDownloadRequestSchema in request body + + +#### bulkListing + +- ##### What's Deprecated + - [Deleted] Possible values from a4,a6,pos from property data[].last_selected_invoice_label_type of schema BulkActionListingData in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to boolean of property data[].status of schema BulkActionListingData in response with status code 200 + + +#### generateProcessManifest + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 4XX + - [Breaking] [Deleted] Response with status 5XX + - [Breaking] [Deleted] Security in Request + + +#### eInvoiceRetry + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Possible values from invoice,credit_note from property shipments_data[].einvoice_type of schema EInvoiceRetryShipmentData in request body + - [Deleted] Possible values from invoice,credit_note from property response_data[].einvoice_type of schema EInvoiceResponseData in response with status code 200 + - [Deleted] Possible values from invoice,credit_note from property response_data[].einvoice_type of schema EInvoiceErrorResponseData in response with status code 400 + + +#### trackShipment + +- ##### What's New + - [Added] Possible nullable value true to property page.item_total of schema PageDetails in response with status code 200 + + +#### failedOrderLogs + +- ##### What's New + - [Added] Possible nullable value true to property items.error_message of schema FailedOrdersItem in response with status code 200 + - [Added] Possible nullable value true to property items.display_message of schema FailedOrdersItem in response with status code 200 + - [Added] Possible nullable value true to property items.meta of schema FailedOrdersItem in response with status code 200 + - [Added] Possible nullable value true to property page.item_total of schema PageDetails in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items.created_at of schema FailedOrdersItem in response with status code 200 + + +#### failedOrderLogDetails + +- ##### What's New + - [Added] Possible nullable value true to property error_trace of schema FailedOrderLogDetails in response with status code 200 + - [Added] Possible nullable value true to property exception of schema FailedOrderLogDetails in response with status code 200 + + +#### getRules + +- ##### What's Deprecated + - [Breaking] [Deleted] method getRules + + + +#### updatePaymentInfo + +- ##### What's Deprecated + - [Breaking] [Deleted] method updatePaymentInfo + + + +#### getShipmentBagReasons + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from property reasons of schema ShipmentBagReasons in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from property success of schema ShipmentBagReasons in response with status code 200 + - [Breaking] [Deleted] property rule_id of schema ShipmentBagReasons in response with status code 200 + + +#### getShipments + +- ##### What's New + - [Added] Possible nullable value true to property items[].shipment_status.status of schema ShipmentStatus in response with status code 200 + - [Added] property items[].shipment_status.shipment_status_id of schema ShipmentStatus in response with status code 200 + - [Added] property items[].shipment_status.status_created_ts of schema ShipmentStatus in response with status code 200 + - [Added] property items[].user.uid of schema UserDataInfo in response with status code 200 + - [Added] property items[].user.avis_user_id of schema UserDataInfo in response with status code 200 + - [Added] Possible nullable value true to property items[].bags[].bag_status[].state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property items[].bags[].current_operational_status.state_type of schema BagStatusHistory in response with status code 200 + - [Added] property items[].bags[].article.a_set of schema Article in response with status code 200 + - [Added] Possible nullable value true to property items[].bags[].current_status.state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property items[].total_bags of schema ShipmentItem in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter groupEntity (type: string) + + - [Breaking] [Deleted] query parameter fulfillmentType (type: string) + + - [Deleted] Value format from date-time from property items[].order_date of schema ShipmentItem in response with status code 200 + - [Breaking] [Deleted] property items[].shipment_status.id of schema ShipmentStatus in response with status code 200 + - [Breaking] [Deleted] property items[].shipment_status.display_name of schema ShipmentStatus in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipment_status.created_at of schema ShipmentStatus in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipment_status.status_created_at of schema ShipmentStatus in response with status code 200 + - [Breaking] [Deleted] property items[].shipment_status.updated_ts of schema ShipmentStatus in response with status code 200 + - [Breaking] [Deleted] property items[].user.id of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].user.mongo_user_id of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].user.meta of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].user.country_phone_code of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property items[].delivery_address.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property items[].delivery_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property items[].delivery_address.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property items[].delivery_address.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.user_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].billing_address of schema ShipmentItem in response with status code 200 + - [Breaking] [Deleted] property items[].affiliate_details of schema ShipmentItem in response with status code 200 + - [Breaking] [Deleted] property items[].is_active of schema ShipmentItem in response with status code 200 + - [Breaking] [Deleted] property items[].forward_end_shipment_id of schema ShipmentItem in response with status code 200 + - [Deleted] Value format from date-time from property items[].status_created_at of schema ShipmentItem in response with status code 200 + - [Deleted] Possible values from forward_standard from property items[].bags[].bag_type of schema BagUnit in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].bag_expiry_date of schema BagUnit in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].bags[].bag_status[].state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].bag_status[].created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].bag_status[].updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].bags[].bag_status[].bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property items[].bags[].bag_status[].bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].bags[].current_operational_status.state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].current_operational_status.created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].current_operational_status.updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].bags[].current_operational_status.bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property items[].bags[].current_operational_status.bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Breaking] [Deleted] property items[].bags[].article.set of schema Article in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].brand.created_on of schema ShipmentListingBrand in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].affiliate_bag_details.affiliate_meta.due_date of schema AffiliateMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].item.last_updated_at of schema PlatformItem in response with status code 200 + - [Breaking] [Deleted] property items[].bags[].ordering_currency_prices of schema BagUnit in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].dates.delivery_date of schema Dates in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].bags[].current_status.state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].current_status.created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].current_status.updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].bags[].current_status.bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property items[].bags[].current_status.bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from bag from property items[].bags[].entity_type of schema BagUnit in response with status code 200 + - [Deleted] Possible values from high_street,mall,store,warehouse from property items[].fulfilling_store.location_type of schema ShipmentItemFulFillingStore in response with status code 200 + - [Breaking] [Deleted] property items[].ordering_currency_prices of schema ShipmentItem in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipment_created_at of schema ShipmentItem in response with status code 200 + - [Breaking] [Deleted] property items[].logistics_meta of schema ShipmentItem in response with status code 200 + + +#### getShipmentById + +- ##### What's New + - [Added] property shipments[].user.uid of schema UserDataInfo in response with status code 200 + - [Added] property shipments[].user.avis_user_id of schema UserDataInfo in response with status code 200 + - [Added] properties shipments[].delivery_details.phone, shipments[].delivery_details.pincode, shipments[].delivery_details.address, shipments[].delivery_details.area, shipments[].delivery_details.address_type, shipments[].delivery_details.country, shipments[].delivery_details.email, shipments[].delivery_details.address1, shipments[].delivery_details.landmark, shipments[].delivery_details.state, shipments[].delivery_details.name, shipments[].delivery_details.city, shipments[].delivery_details.state_code, shipments[].delivery_details.country_iso_code, shipments[].delivery_details.country_phone_code, shipments[].delivery_details.display_address in response with status code 200 + - [Added] shipments[].delivery_details.address, shipments[].delivery_details.city, shipments[].delivery_details.country, shipments[].delivery_details.name, shipments[].delivery_details.phone, shipments[].delivery_details.pincode, shipments[].delivery_details.state made required in response with status code 200 + - [Added] properties shipments[].billing_details.phone, shipments[].billing_details.pincode, shipments[].billing_details.address, shipments[].billing_details.area, shipments[].billing_details.address_type, shipments[].billing_details.country, shipments[].billing_details.email, shipments[].billing_details.address1, shipments[].billing_details.landmark, shipments[].billing_details.state, shipments[].billing_details.name, shipments[].billing_details.city, shipments[].billing_details.state_code, shipments[].billing_details.country_iso_code, shipments[].billing_details.country_phone_code, shipments[].billing_details.display_address in response with status code 200 + - [Added] shipments[].billing_details.address, shipments[].billing_details.city, shipments[].billing_details.country, shipments[].billing_details.name, shipments[].billing_details.phone, shipments[].billing_details.pincode, shipments[].billing_details.state made required in response with status code 200 + - [Added] Possible nullable value true to property shipments[].affiliate_details.shipment_meta.b2b_buyer_details.address of schema BuyerDetails in response with status code 200 + - [Added] property shipments[].affiliate_details.ad_id of schema AffiliateDetails in response with status code 200 + - [Added] Possible nullable value true to property shipments[].bag_status_history[].state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property shipments[].bags[].bag_status[].state_type of schema BagStatusHistory in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property shipments[].picked_date of schema PlatformShipment in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].invoice.updated_date of schema InvoiceInfo in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].order_status.order_details.created_at of schema OrderDetails in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].order_status.order_details.affiliate_order_date of schema OrderDetails in response with status code 200 + - [Breaking] [Deleted] property shipments[].order_status.order_details.charges of schema OrderDetails in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].order.order_date of schema OrderDetailsData in response with status code 200 + - [Breaking] [Deleted] property shipments[].user.id of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property shipments[].user.mongo_user_id of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property shipments[].user.meta of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property shipments[].user.country_phone_code of schema UserDataInfo in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].affiliate_details.shipment_meta.estimated_delivery_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].affiliate_details.shipment_meta.due_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].affiliate_details.shipment_meta.store_invoice_updated_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Possible values from bag,shipments from property shipments[].affiliate_details.shipment_meta.shipment_tags[].entity_type of schema ShipmentTags in response with status code 200 + - [Deleted] Possible values from HomeDelivery,PickAtStore,Digital from property shipments[].affiliate_details.shipment_meta.order_type of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].affiliate_details.affiliate_meta.due_date of schema AffiliateMeta in response with status code 200 + - [Deleted] Possible values from fynd,external from property shipments[].affiliate_details.pdf_links.invoice_type of schema PDFLinks in response with status code 200 + - [Deleted] Possible values from fynd,external,parent_child from property shipments[].affiliate_details.pdf_links.label_type of schema PDFLinks in response with status code 200 + - [Breaking] [Deleted] property shipments[].affiliate_details.config.app of schema AffiliateConfig in response with status code 200 + - [Breaking] [Deleted] property shipments[].affiliate_details.config.inventory of schema AffiliateConfig in response with status code 200 + - [Breaking] [Deleted] property shipments[].affiliate_details.id of schema AffiliateDetails in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property shipments[].bag_status_history[].state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bag_status_history[].created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bag_status_history[].updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property shipments[].bag_status_history[].bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property shipments[].bag_status_history[].bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property shipments[].bags[].bag_status[].state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].bag_status[].created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].bag_status[].updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property shipments[].bags[].bag_status[].bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property shipments[].bags[].bag_status[].bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property shipments[].bags[].delivery_address.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property shipments[].bags[].delivery_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].delivery_address.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].delivery_address.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.user_id of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].brand.created_on of schema OrderBrandName in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].brand.modified_on of schema OrderBrandName in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].affiliate_bag_details.affiliate_meta.due_date of schema AffiliateMeta in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].item.last_updated_at of schema PlatformItem in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items from property shipments[].bags[].applied_promos[].promotion_type of schema AppliedPromos in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].applied_promos[].applied_free_articles of schema AppliedPromos in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].charges of schema OrderBags in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].ordering_currency_prices of schema OrderBags in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property shipments[].bags[].current_status.state_type of schema CurrentStatus in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property shipments[].bags[].current_status.bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property shipments[].bags[].current_status.bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from bag,shipments from property shipments[].bags[].entity_type of schema OrderBags in response with status code 200 + - [Deleted] Possible values from return,forward from property shipments[].journey_type of schema PlatformShipment in response with status code 200 + - [Breaking] [Deleted] property shipments[].charges of schema PlatformShipment in response with status code 200 + - [Breaking] [Deleted] property shipments[].ordering_currency_prices of schema PlatformShipment in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].status.created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].status.status_created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].shipment_created_at of schema PlatformShipment in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property shipments[].rto_address.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property shipments[].rto_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].rto_address.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].rto_address.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.user_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].forward_end_shipment_id of schema PlatformShipment in response with status code 200 + - [Breaking] [Deleted] property shipments[].logistics_meta of schema PlatformShipment in response with status code 200 + + +#### getOrderById + +- ##### What's New + - [Added] property shipments[].user.uid of schema UserDataInfo in response with status code 200 + - [Added] property shipments[].user.avis_user_id of schema UserDataInfo in response with status code 200 + - [Added] properties shipments[].delivery_details.phone, shipments[].delivery_details.pincode, shipments[].delivery_details.address, shipments[].delivery_details.area, shipments[].delivery_details.address_type, shipments[].delivery_details.country, shipments[].delivery_details.email, shipments[].delivery_details.address1, shipments[].delivery_details.landmark, shipments[].delivery_details.state, shipments[].delivery_details.name, shipments[].delivery_details.city, shipments[].delivery_details.state_code, shipments[].delivery_details.country_iso_code, shipments[].delivery_details.country_phone_code, shipments[].delivery_details.display_address in response with status code 200 + - [Added] shipments[].delivery_details.address, shipments[].delivery_details.city, shipments[].delivery_details.country, shipments[].delivery_details.name, shipments[].delivery_details.phone, shipments[].delivery_details.pincode, shipments[].delivery_details.state made required in response with status code 200 + - [Added] properties shipments[].billing_details.phone, shipments[].billing_details.pincode, shipments[].billing_details.address, shipments[].billing_details.area, shipments[].billing_details.address_type, shipments[].billing_details.country, shipments[].billing_details.email, shipments[].billing_details.address1, shipments[].billing_details.landmark, shipments[].billing_details.state, shipments[].billing_details.name, shipments[].billing_details.city, shipments[].billing_details.state_code, shipments[].billing_details.country_iso_code, shipments[].billing_details.country_phone_code, shipments[].billing_details.display_address in response with status code 200 + - [Added] shipments[].billing_details.address, shipments[].billing_details.city, shipments[].billing_details.country, shipments[].billing_details.name, shipments[].billing_details.phone, shipments[].billing_details.pincode, shipments[].billing_details.state made required in response with status code 200 + - [Added] Possible nullable value true to property shipments[].affiliate_details.shipment_meta.b2b_buyer_details.address of schema BuyerDetails in response with status code 200 + - [Added] property shipments[].affiliate_details.ad_id of schema AffiliateDetails in response with status code 200 + - [Added] Possible nullable value true to property shipments[].bag_status_history[].state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property shipments[].bags[].bag_status[].state_type of schema BagStatusHistory in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property order.ordering_channel of schema OrderData in response with status code 200 + - [Deleted] Value format from date-time from property order.order_date of schema OrderData in response with status code 200 + - [Breaking] [Deleted] property order.charges of schema OrderData in response with status code 200 + - [Breaking] [Deleted] property order.ordering_currency_prices of schema OrderData in response with status code 200 + - [Breaking] [Deleted] property order.affiliate_order_id of schema OrderData in response with status code 200 + - [Breaking] [Deleted] property order.affiliate_id of schema OrderData in response with status code 200 + - [Breaking] [Deleted] property order.source of schema OrderData in response with status code 200 + - [Breaking] [Deleted] property order.currency of schema OrderData in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].picked_date of schema PlatformShipment in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].invoice.updated_date of schema InvoiceInfo in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].order_status.order_details.created_at of schema OrderDetails in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].order_status.order_details.affiliate_order_date of schema OrderDetails in response with status code 200 + - [Breaking] [Deleted] property shipments[].order_status.order_details.charges of schema OrderDetails in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].order.order_date of schema OrderDetailsData in response with status code 200 + - [Breaking] [Deleted] property shipments[].user.id of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property shipments[].user.mongo_user_id of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property shipments[].user.meta of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property shipments[].user.country_phone_code of schema UserDataInfo in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].affiliate_details.shipment_meta.estimated_delivery_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].affiliate_details.shipment_meta.due_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].affiliate_details.shipment_meta.store_invoice_updated_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Possible values from bag,shipments from property shipments[].affiliate_details.shipment_meta.shipment_tags[].entity_type of schema ShipmentTags in response with status code 200 + - [Deleted] Possible values from HomeDelivery,PickAtStore,Digital from property shipments[].affiliate_details.shipment_meta.order_type of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].affiliate_details.affiliate_meta.due_date of schema AffiliateMeta in response with status code 200 + - [Deleted] Possible values from fynd,external from property shipments[].affiliate_details.pdf_links.invoice_type of schema PDFLinks in response with status code 200 + - [Deleted] Possible values from fynd,external,parent_child from property shipments[].affiliate_details.pdf_links.label_type of schema PDFLinks in response with status code 200 + - [Breaking] [Deleted] property shipments[].affiliate_details.config.app of schema AffiliateConfig in response with status code 200 + - [Breaking] [Deleted] property shipments[].affiliate_details.config.inventory of schema AffiliateConfig in response with status code 200 + - [Breaking] [Deleted] property shipments[].affiliate_details.id of schema AffiliateDetails in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property shipments[].bag_status_history[].state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bag_status_history[].created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bag_status_history[].updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property shipments[].bag_status_history[].bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property shipments[].bag_status_history[].bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property shipments[].bags[].bag_status[].state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].bag_status[].created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].bag_status[].updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property shipments[].bags[].bag_status[].bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property shipments[].bags[].bag_status[].bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property shipments[].bags[].delivery_address.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property shipments[].bags[].delivery_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].delivery_address.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].delivery_address.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].delivery_address.user_id of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].brand.created_on of schema OrderBrandName in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].brand.modified_on of schema OrderBrandName in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].affiliate_bag_details.affiliate_meta.due_date of schema AffiliateMeta in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].bags[].item.last_updated_at of schema PlatformItem in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items from property shipments[].bags[].applied_promos[].promotion_type of schema AppliedPromos in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].applied_promos[].applied_free_articles of schema AppliedPromos in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].charges of schema OrderBags in response with status code 200 + - [Breaking] [Deleted] property shipments[].bags[].ordering_currency_prices of schema OrderBags in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property shipments[].bags[].current_status.state_type of schema CurrentStatus in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property shipments[].bags[].current_status.bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property shipments[].bags[].current_status.bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from bag,shipments from property shipments[].bags[].entity_type of schema OrderBags in response with status code 200 + - [Deleted] Possible values from return,forward from property shipments[].journey_type of schema PlatformShipment in response with status code 200 + - [Breaking] [Deleted] property shipments[].charges of schema PlatformShipment in response with status code 200 + - [Breaking] [Deleted] property shipments[].ordering_currency_prices of schema PlatformShipment in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].status.created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].status.status_created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].shipment_created_at of schema PlatformShipment in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property shipments[].rto_address.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property shipments[].rto_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].rto_address.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property shipments[].rto_address.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].rto_address.user_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property shipments[].forward_end_shipment_id of schema PlatformShipment in response with status code 200 + - [Breaking] [Deleted] property shipments[].logistics_meta of schema PlatformShipment in response with status code 200 + + +#### getOrders + +- ##### What's New + - [Added] property items[].shipments[].user.uid of schema UserDataInfo in response with status code 200 + - [Added] property items[].shipments[].user.avis_user_id of schema UserDataInfo in response with status code 200 + - [Added] properties items[].shipments[].delivery_details.phone, items[].shipments[].delivery_details.pincode, items[].shipments[].delivery_details.address, items[].shipments[].delivery_details.area, items[].shipments[].delivery_details.address_type, items[].shipments[].delivery_details.country, items[].shipments[].delivery_details.email, items[].shipments[].delivery_details.address1, items[].shipments[].delivery_details.landmark, items[].shipments[].delivery_details.state, items[].shipments[].delivery_details.name, items[].shipments[].delivery_details.city, items[].shipments[].delivery_details.state_code, items[].shipments[].delivery_details.country_iso_code, items[].shipments[].delivery_details.country_phone_code, items[].shipments[].delivery_details.display_address in response with status code 200 + - [Added] items[].shipments[].delivery_details.address, items[].shipments[].delivery_details.city, items[].shipments[].delivery_details.country, items[].shipments[].delivery_details.name, items[].shipments[].delivery_details.phone, items[].shipments[].delivery_details.pincode, items[].shipments[].delivery_details.state made required in response with status code 200 + - [Added] properties items[].shipments[].billing_details.phone, items[].shipments[].billing_details.pincode, items[].shipments[].billing_details.address, items[].shipments[].billing_details.area, items[].shipments[].billing_details.address_type, items[].shipments[].billing_details.country, items[].shipments[].billing_details.email, items[].shipments[].billing_details.address1, items[].shipments[].billing_details.landmark, items[].shipments[].billing_details.state, items[].shipments[].billing_details.name, items[].shipments[].billing_details.city, items[].shipments[].billing_details.state_code, items[].shipments[].billing_details.country_iso_code, items[].shipments[].billing_details.country_phone_code, items[].shipments[].billing_details.display_address in response with status code 200 + - [Added] items[].shipments[].billing_details.address, items[].shipments[].billing_details.city, items[].shipments[].billing_details.country, items[].shipments[].billing_details.name, items[].shipments[].billing_details.phone, items[].shipments[].billing_details.pincode, items[].shipments[].billing_details.state made required in response with status code 200 + - [Added] Possible nullable value true to property items[].shipments[].affiliate_details.shipment_meta.b2b_buyer_details.address of schema BuyerDetails in response with status code 200 + - [Added] property items[].shipments[].affiliate_details.ad_id of schema AffiliateDetails in response with status code 200 + - [Added] Possible nullable value true to property items[].shipments[].bag_status_history[].state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property items[].shipments[].bags[].bag_status[].state_type of schema BagStatusHistory in response with status code 200 + - [Added] property items[].user_info.uid of schema UserDataInfo in response with status code 200 + - [Added] property items[].user_info.avis_user_id of schema UserDataInfo in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] query parameter groupEntity (type: string) + + - [Breaking] [Deleted] query parameter fulfillmentType (type: string) + + - [Deleted] Value format from date-time from property items[].shipments[].picked_date of schema PlatformShipment in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].invoice.updated_date of schema InvoiceInfo in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].order_status.order_details.created_at of schema OrderDetails in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].order_status.order_details.affiliate_order_date of schema OrderDetails in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].order_status.order_details.charges of schema OrderDetails in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].order.order_date of schema OrderDetailsData in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].user.id of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].user.mongo_user_id of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].user.meta of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].user.country_phone_code of schema UserDataInfo in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].affiliate_details.shipment_meta.estimated_delivery_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].affiliate_details.shipment_meta.due_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].affiliate_details.shipment_meta.store_invoice_updated_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Possible values from bag,shipments from property items[].shipments[].affiliate_details.shipment_meta.shipment_tags[].entity_type of schema ShipmentTags in response with status code 200 + - [Deleted] Possible values from HomeDelivery,PickAtStore,Digital from property items[].shipments[].affiliate_details.shipment_meta.order_type of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].affiliate_details.affiliate_meta.due_date of schema AffiliateMeta in response with status code 200 + - [Deleted] Possible values from fynd,external from property items[].shipments[].affiliate_details.pdf_links.invoice_type of schema PDFLinks in response with status code 200 + - [Deleted] Possible values from fynd,external,parent_child from property items[].shipments[].affiliate_details.pdf_links.label_type of schema PDFLinks in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].affiliate_details.config.app of schema AffiliateConfig in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].affiliate_details.config.inventory of schema AffiliateConfig in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].affiliate_details.id of schema AffiliateDetails in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].shipments[].bag_status_history[].state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].bag_status_history[].created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].bag_status_history[].updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].shipments[].bag_status_history[].bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property items[].shipments[].bag_status_history[].bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].shipments[].bags[].bag_status[].state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].bags[].bag_status[].created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].bags[].bag_status[].updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].shipments[].bags[].bag_status[].bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property items[].shipments[].bags[].bag_status[].bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].delivery_address.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property items[].shipments[].bags[].delivery_address.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property items[].shipments[].bags[].delivery_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].bags[].delivery_address.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].bags[].delivery_address.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].delivery_address.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].delivery_address.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].delivery_address.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].delivery_address.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].delivery_address.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].delivery_address.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].delivery_address.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].delivery_address.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].delivery_address.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].delivery_address.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].delivery_address.user_id of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].bags[].brand.created_on of schema OrderBrandName in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].bags[].brand.modified_on of schema OrderBrandName in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].bags[].affiliate_bag_details.affiliate_meta.due_date of schema AffiliateMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].bags[].item.last_updated_at of schema PlatformItem in response with status code 200 + - [Deleted] Possible values from percentage,amount,fixed_price,bogo,contract_price,shipping_price,ladder_price,bundle_price_percentage,bundle_price_amount,bundle_amount_percentage,custom,free_gift_items,free_non_sellable_items from property items[].shipments[].bags[].applied_promos[].promotion_type of schema AppliedPromos in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].applied_promos[].applied_free_articles of schema AppliedPromos in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].charges of schema OrderBags in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].bags[].ordering_currency_prices of schema OrderBags in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].shipments[].bags[].current_status.state_type of schema CurrentStatus in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].shipments[].bags[].current_status.bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property items[].shipments[].bags[].current_status.bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from bag,shipments from property items[].shipments[].bags[].entity_type of schema OrderBags in response with status code 200 + - [Deleted] Possible values from return,forward from property items[].shipments[].journey_type of schema PlatformShipment in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].charges of schema PlatformShipment in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].ordering_currency_prices of schema PlatformShipment in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].status.created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].status.status_created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].shipment_created_at of schema PlatformShipment in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].rto_address.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property items[].shipments[].rto_address.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property items[].shipments[].rto_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].rto_address.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipments[].rto_address.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].rto_address.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].rto_address.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].rto_address.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].rto_address.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].rto_address.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].rto_address.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].rto_address.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].rto_address.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].rto_address.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].rto_address.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].rto_address.user_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].forward_end_shipment_id of schema PlatformShipment in response with status code 200 + - [Breaking] [Deleted] property items[].shipments[].logistics_meta of schema PlatformShipment in response with status code 200 + - [Breaking] [Deleted] property items[].user_info.id of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].user_info.mongo_user_id of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].user_info.meta of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].user_info.country_phone_code of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].prices of schema PlatformOrderItems in response with status code 200 + - [Breaking] [Deleted] property items[].ordering_currency_prices of schema PlatformOrderItems in response with status code 200 + + +#### getApplicationShipments + +- ##### What's New + - [Added] Possible nullable value true to property items[].shipment_status.status of schema ShipmentStatus in response with status code 200 + - [Added] property items[].shipment_status.shipment_status_id of schema ShipmentStatus in response with status code 200 + - [Added] property items[].shipment_status.status_created_ts of schema ShipmentStatus in response with status code 200 + - [Added] property items[].user.uid of schema UserDataInfo in response with status code 200 + - [Added] property items[].user.avis_user_id of schema UserDataInfo in response with status code 200 + - [Added] Possible nullable value true to property items[].bags[].bag_status[].state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property items[].bags[].current_operational_status.state_type of schema BagStatusHistory in response with status code 200 + - [Added] property items[].bags[].article.a_set of schema Article in response with status code 200 + - [Added] Possible nullable value true to property items[].bags[].current_status.state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property items[].total_bags of schema ShipmentItem in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].order_date of schema ShipmentItem in response with status code 200 + - [Breaking] [Deleted] property items[].shipment_status.id of schema ShipmentStatus in response with status code 200 + - [Breaking] [Deleted] property items[].shipment_status.display_name of schema ShipmentStatus in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipment_status.created_at of schema ShipmentStatus in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipment_status.status_created_at of schema ShipmentStatus in response with status code 200 + - [Breaking] [Deleted] property items[].shipment_status.updated_ts of schema ShipmentStatus in response with status code 200 + - [Breaking] [Deleted] property items[].user.id of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].user.mongo_user_id of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].user.meta of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].user.country_phone_code of schema UserDataInfo in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property items[].delivery_address.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property items[].delivery_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property items[].delivery_address.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property items[].delivery_address.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].delivery_address.user_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property items[].billing_address of schema ShipmentItem in response with status code 200 + - [Breaking] [Deleted] property items[].affiliate_details of schema ShipmentItem in response with status code 200 + - [Breaking] [Deleted] property items[].is_active of schema ShipmentItem in response with status code 200 + - [Breaking] [Deleted] property items[].forward_end_shipment_id of schema ShipmentItem in response with status code 200 + - [Deleted] Value format from date-time from property items[].status_created_at of schema ShipmentItem in response with status code 200 + - [Deleted] Possible values from forward_standard from property items[].bags[].bag_type of schema BagUnit in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].bag_expiry_date of schema BagUnit in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].bags[].bag_status[].state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].bag_status[].created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].bag_status[].updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].bags[].bag_status[].bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property items[].bags[].bag_status[].bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].bags[].current_operational_status.state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].current_operational_status.created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].current_operational_status.updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].bags[].current_operational_status.bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property items[].bags[].current_operational_status.bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Breaking] [Deleted] property items[].bags[].article.set of schema Article in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].brand.created_on of schema ShipmentListingBrand in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].affiliate_bag_details.affiliate_meta.due_date of schema AffiliateMeta in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].item.last_updated_at of schema PlatformItem in response with status code 200 + - [Breaking] [Deleted] property items[].bags[].ordering_currency_prices of schema BagUnit in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].dates.delivery_date of schema Dates in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].bags[].current_status.state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].current_status.created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].bags[].current_status.updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property items[].bags[].current_status.bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property items[].bags[].current_status.bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from bag from property items[].bags[].entity_type of schema BagUnit in response with status code 200 + - [Deleted] Possible values from high_street,mall,store,warehouse from property items[].fulfilling_store.location_type of schema ShipmentItemFulFillingStore in response with status code 200 + - [Breaking] [Deleted] property items[].ordering_currency_prices of schema ShipmentItem in response with status code 200 + - [Deleted] Value format from date-time from property items[].shipment_created_at of schema ShipmentItem in response with status code 200 + - [Breaking] [Deleted] property items[].logistics_meta of schema ShipmentItem in response with status code 200 + + +#### trackShipmentPlatform + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible nullable value from true from property results[].last_location_recieved_at of schema PlatformTrack in response with status code 200 + - [Deleted] Value format from date-time from property results[].updated_at of schema PlatformTrack in response with status code 200 + - [Deleted] Value format from date-time from property results[].updated_time of schema PlatformTrack in response with status code 200 + - [Deleted] Possible values from forward,return from property results[].shipment_type of schema PlatformTrack in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property results[].reason of schema PlatformTrack in response with status code 200 + + +#### getfilters + +- ##### What's Deprecated + - [Breaking] [Deleted] property advance of schema FiltersResponseSchema in response with status code 200 + - [Breaking] [Deleted] property global_1 of schema FiltersResponseSchema in response with status code 200 + + +#### getShipmentReasons + +- ##### What's Deprecated + - [Breaking] [Deleted] property reasons[].reasons of schema Reason in response with status code 200 + - [Deleted] Possible values from doorstep_qc,pre_qc from property reasons[].qc_type[] of schema Reason in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from property reasons[].question_set[].display_name of schema QuestionSet in response with status code 200 + - [Breaking] [Deleted] property reasons[].meta of schema Reason in response with status code 200 + - [Breaking] [Deleted] property reasons[].is_active of schema Reason in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] reasons[].display_name, reasons[].qc_type, reasons[].question_set, reasons[].meta, reasons[].is_active made optional in response with status code 200 + + +#### getBagById + +- ##### What's New + - [Added] Possible nullable value true to property data.affiliate_details.shipment_meta.b2b_buyer_details.address of schema BuyerDetails in response with status code 200 + - [Added] property data.affiliate_details.ad_id of schema AffiliateDetails in response with status code 200 + - [Added] property data.article.a_set of schema Article in response with status code 200 + - [Added] Possible nullable value true to property data.bag_status[].state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property data.bag_status_history[].state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property data.current_operational_status.state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property data.current_status.state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property data.fulfilling_store.address1 of schema Store in response with status code 200 + - [Added] Possible nullable value true to property data.fulfilling_store.store_address_json.phone of schema StoreAddress in response with status code 200 + - [Added] property data.fulfilling_store.meta.documents.gst.ds_type of schema Document in response with status code 200 + - [Added] Possible nullable value true to property data.ordering_store.address1 of schema Store in response with status code 200 + - [Added] Possible nullable value true to property data.ordering_store.store_address_json.phone of schema StoreAddress in response with status code 200 + - [Added] property data.ordering_store.meta.documents.gst.ds_type of schema Document in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from 200,400,500 from property status_code of schema BagDetailsPlatformResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property data.affiliate_bag_details.affiliate_meta.due_date of schema AffiliateMeta in response with status code 200 + - [Deleted] Value format from date-time from property data.affiliate_details.shipment_meta.estimated_delivery_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property data.affiliate_details.shipment_meta.due_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property data.affiliate_details.shipment_meta.store_invoice_updated_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Possible values from bag,shipments from property data.affiliate_details.shipment_meta.shipment_tags[].entity_type of schema ShipmentTags in response with status code 200 + - [Deleted] Possible values from HomeDelivery,PickAtStore,Digital from property data.affiliate_details.shipment_meta.order_type of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property data.affiliate_details.affiliate_meta.due_date of schema AffiliateMeta in response with status code 200 + - [Deleted] Possible values from fynd,external from property data.affiliate_details.pdf_links.invoice_type of schema PDFLinks in response with status code 200 + - [Deleted] Possible values from fynd,external,parent_child from property data.affiliate_details.pdf_links.label_type of schema PDFLinks in response with status code 200 + - [Breaking] [Deleted] property data.affiliate_details.config.app of schema AffiliateConfig in response with status code 200 + - [Breaking] [Deleted] property data.affiliate_details.config.inventory of schema AffiliateConfig in response with status code 200 + - [Breaking] [Deleted] property data.affiliate_details.id of schema AffiliateDetails in response with status code 200 + - [Breaking] [Deleted] property data.article.set of schema Article in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.bag_status[].state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.bag_status[].created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.bag_status[].updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.bag_status[].bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property data.bag_status[].bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.bag_status_history[].state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.bag_status_history[].created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.bag_status_history[].updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.bag_status_history[].bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property data.bag_status_history[].bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Value format from date-time from property data.brand.start_date of schema Brand in response with status code 200 + - [Deleted] Value format from date-time from property data.brand.created_on of schema Brand in response with status code 200 + - [Deleted] Value format from date-time from property data.brand.modified_on of schema Brand in response with status code 200 + - [Deleted] Value format from date-time from property data.company.created_on of schema Company in response with status code 200 + - [Deleted] Possible values from mbo,distributor,manufacturer-owner,franchise from property data.company.company_type of schema Company in response with status code 200 + - [Deleted] Value format from date-time from property data.company.modified_on of schema Company in response with status code 200 + - [Deleted] Value format from date-time from property data.company.agreement_start_date of schema Company in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.current_operational_status.state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.current_operational_status.created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.current_operational_status.updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.current_operational_status.bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property data.current_operational_status.bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.current_status.state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.current_status.created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.current_status.updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.current_status.bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property data.current_status.bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Value format from date-time from property data.dates.delivery_date of schema Dates in response with status code 200 + - [Breaking] [Deleted] property data.delivery_address.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property data.delivery_address.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property data.delivery_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.delivery_address.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.delivery_address.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.delivery_address.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.delivery_address.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.delivery_address.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.delivery_address.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.delivery_address.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.delivery_address.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.delivery_address.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.delivery_address.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.delivery_address.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.delivery_address.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.delivery_address.user_id of schema Address in response with status code 200 + - [Deleted] Possible values from bag from property data.entity_type of schema BagDetails in response with status code 200 + - [Deleted] Value format from date-time from property data.fulfilling_store.created_at of schema Store in response with status code 200 + - [Deleted] Possible values from high_street,mall,store,warehouse from property data.fulfilling_store.location_type of schema Store in response with status code 200 + - [Deleted] Value format from date-time from property data.fulfilling_store.updated_at of schema Store in response with status code 200 + - [Deleted] Value format from date-time from property data.fulfilling_store.store_address_json.created_at of schema StoreAddress in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property data.fulfilling_store.store_address_json.address_category of schema StoreAddress in response with status code 200 + - [Deleted] Value format from date-time from property data.fulfilling_store.store_address_json.updated_at of schema StoreAddress in response with status code 200 + - [Breaking] [Deleted] property data.fulfilling_store.meta.documents.gst.type of schema Document in response with status code 200 + - [Deleted] Value format from date-time from property data.invoice.updated_date of schema InvoiceDetails in response with status code 200 + - [Deleted] Possible values from return,forward from property data.journey_type of schema BagDetails in response with status code 200 + - [Deleted] Value format from date-time from property data.order.created_at of schema OrderDetails in response with status code 200 + - [Deleted] Value format from date-time from property data.order.affiliate_order_date of schema OrderDetails in response with status code 200 + - [Breaking] [Deleted] property data.order.charges of schema OrderDetails in response with status code 200 + - [Deleted] Possible values from HomeDelivery,PickAtStore,Digital from property data.order_type of schema BagDetails in response with status code 200 + - [Deleted] Value format from date-time from property data.ordering_store.created_at of schema Store in response with status code 200 + - [Deleted] Possible values from high_street,mall,store,warehouse from property data.ordering_store.location_type of schema Store in response with status code 200 + - [Deleted] Value format from date-time from property data.ordering_store.updated_at of schema Store in response with status code 200 + - [Deleted] Value format from date-time from property data.ordering_store.store_address_json.created_at of schema StoreAddress in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property data.ordering_store.store_address_json.address_category of schema StoreAddress in response with status code 200 + - [Deleted] Value format from date-time from property data.ordering_store.store_address_json.updated_at of schema StoreAddress in response with status code 200 + - [Breaking] [Deleted] property data.ordering_store.meta.documents.gst.type of schema Document in response with status code 200 + - [Deleted] Possible values from partner,self,fynd from property data.payment_type of schema BagDetails in response with status code 200 + - [Breaking] [Deleted] property data.charges of schema BagDetails in response with status code 200 + - [Breaking] [Deleted] property data.rto_address.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property data.rto_address.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property data.rto_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.rto_address.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.rto_address.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.rto_address.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.rto_address.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.rto_address.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.rto_address.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.rto_address.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.rto_address.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.rto_address.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.rto_address.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.rto_address.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.rto_address.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.rto_address.user_id of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.shipment.processing_dates.pack_by_date of schema ProcessingDates in response with status code 200 + - [Breaking] [Deleted] Possible values from Digital from property data.shipment.order_type of schema Shipment in response with status code 200 + - [Breaking] [Deleted] properties data.shipment.tags[].slug, data.shipment.tags[].display_text in response with status code 200 + - [Breaking] [Deleted] property data.shipment.system_messages of schema Shipment in response with status code 200 + - [Breaking] [Deleted] property data.shipment.process_after_config of schema Shipment in response with status code 200 + - [Breaking] [Deleted] property data.shipment.billing_address_json.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property data.shipment.billing_address_json.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property data.shipment.billing_address_json.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.shipment.billing_address_json.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.shipment.billing_address_json.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.billing_address_json.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.billing_address_json.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.billing_address_json.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.billing_address_json.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.billing_address_json.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.billing_address_json.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.billing_address_json.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.billing_address_json.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.billing_address_json.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.billing_address_json.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.billing_address_json.user_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.delivery_address_json.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property data.shipment.delivery_address_json.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property data.shipment.delivery_address_json.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.shipment.delivery_address_json.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.shipment.delivery_address_json.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.delivery_address_json.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.delivery_address_json.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.delivery_address_json.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.delivery_address_json.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.delivery_address_json.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.delivery_address_json.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.delivery_address_json.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.delivery_address_json.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.delivery_address_json.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.delivery_address_json.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.delivery_address_json.user_id of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.shipment.created_at of schema Shipment in response with status code 200 + - [Breaking] [Deleted] property data.shipment.hand_over_contact_json.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property data.shipment.hand_over_contact_json.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property data.shipment.hand_over_contact_json.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.shipment.hand_over_contact_json.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.shipment.hand_over_contact_json.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.hand_over_contact_json.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.hand_over_contact_json.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.hand_over_contact_json.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.hand_over_contact_json.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.hand_over_contact_json.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.hand_over_contact_json.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.hand_over_contact_json.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.hand_over_contact_json.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.hand_over_contact_json.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.hand_over_contact_json.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.shipment.hand_over_contact_json.user_id of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.shipment.status.created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Value format from date-time from property data.shipment.status.status_created_at of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Deleted] property data.shipment_details.box_type of schema ShipmentDetails in response with status code 200 + - [Breaking] [Deleted] property data.shipment_details.shipments of schema ShipmentDetails in response with status code 200 + - [Breaking] [Deleted] property data.shipment_details.fulfillment_id of schema ShipmentDetails in response with status code 200 + - [Breaking] [Deleted] property data.shipment_details.articles of schema ShipmentDetails in response with status code 200 + - [Deleted] Value format from int32 from property data.shipment_details.dp_id of schema ShipmentDetails in response with status code 200 + - [Breaking] [Deleted] property data.shipment_details.meta of schema ShipmentDetails in response with status code 200 + - [Breaking] [Deleted] property data.shipment_details.affiliate_shipment_id of schema ShipmentDetails in response with status code 200 + - [Deleted] Value format from date-time from property data.shipment_status.created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Value format from date-time from property data.shipment_status.status_created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Value format from date-time from property data.shipment_status_history[].created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Value format from date-time from property data.shipment_status_history[].status_created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Possible values from shipment from property data.transaction_type of schema BagDetails in response with status code 200 + - [Deleted] Value format from date-time from property data.updated_at of schema BagDetails in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] data.shipment_details.affiliate_shipment_id, data.shipment_details.articles, data.shipment_details.fulfillment_id, data.shipment_details.shipments made optional in response with status code 200 + + +#### getBags + +- ##### What's New + - [Added] Possible nullable value true to property data.items[].affiliate_details.shipment_meta.b2b_buyer_details.address of schema BuyerDetails in response with status code 200 + - [Added] property data.items[].affiliate_details.ad_id of schema AffiliateDetails in response with status code 200 + - [Added] property data.items[].article.a_set of schema Article in response with status code 200 + - [Added] Possible nullable value true to property data.items[].bag_status[].state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property data.items[].bag_status_history[].state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property data.items[].current_operational_status.state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property data.items[].current_status.state_type of schema BagStatusHistory in response with status code 200 + - [Added] Possible nullable value true to property data.items[].fulfilling_store.address1 of schema Store in response with status code 200 + - [Added] Possible nullable value true to property data.items[].fulfilling_store.store_address_json.phone of schema StoreAddress in response with status code 200 + - [Added] property data.items[].fulfilling_store.meta.documents.gst.ds_type of schema Document in response with status code 200 + - [Added] Possible nullable value true to property data.items[].ordering_store.address1 of schema Store in response with status code 200 + - [Added] Possible nullable value true to property data.items[].ordering_store.store_address_json.phone of schema StoreAddress in response with status code 200 + - [Added] property data.items[].ordering_store.meta.documents.gst.ds_type of schema Document in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from 200,400,500 from property status_code of schema GetBagsPlatformResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].affiliate_bag_details.affiliate_meta.due_date of schema AffiliateMeta in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].affiliate_details.shipment_meta.estimated_delivery_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].affiliate_details.shipment_meta.due_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].affiliate_details.shipment_meta.store_invoice_updated_date of schema ShipmentMeta in response with status code 200 + - [Deleted] Possible values from bag,shipments from property data.items[].affiliate_details.shipment_meta.shipment_tags[].entity_type of schema ShipmentTags in response with status code 200 + - [Deleted] Possible values from HomeDelivery,PickAtStore,Digital from property data.items[].affiliate_details.shipment_meta.order_type of schema ShipmentMeta in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].affiliate_details.affiliate_meta.due_date of schema AffiliateMeta in response with status code 200 + - [Deleted] Possible values from fynd,external from property data.items[].affiliate_details.pdf_links.invoice_type of schema PDFLinks in response with status code 200 + - [Deleted] Possible values from fynd,external,parent_child from property data.items[].affiliate_details.pdf_links.label_type of schema PDFLinks in response with status code 200 + - [Breaking] [Deleted] property data.items[].affiliate_details.config.app of schema AffiliateConfig in response with status code 200 + - [Breaking] [Deleted] property data.items[].affiliate_details.config.inventory of schema AffiliateConfig in response with status code 200 + - [Breaking] [Deleted] property data.items[].affiliate_details.id of schema AffiliateDetails in response with status code 200 + - [Breaking] [Deleted] property data.items[].article.set of schema Article in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.items[].bag_status[].state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].bag_status[].created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].bag_status[].updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.items[].bag_status[].bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property data.items[].bag_status[].bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.items[].bag_status_history[].state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].bag_status_history[].created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].bag_status_history[].updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.items[].bag_status_history[].bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property data.items[].bag_status_history[].bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].brand.start_date of schema Brand in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].brand.created_on of schema Brand in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].brand.modified_on of schema Brand in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].company.created_on of schema Company in response with status code 200 + - [Deleted] Possible values from mbo,distributor,manufacturer-owner,franchise from property data.items[].company.company_type of schema Company in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].company.modified_on of schema Company in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].company.agreement_start_date of schema Company in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.items[].current_operational_status.state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].current_operational_status.created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].current_operational_status.updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.items[].current_operational_status.bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property data.items[].current_operational_status.bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.items[].current_status.state_type of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].current_status.created_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].current_status.updated_at of schema BagStatusHistory in response with status code 200 + - [Deleted] Possible values from operational,financial,logistics from property data.items[].current_status.bag_state_mapper.state_type of schema BagStateMapper in response with status code 200 + - [Deleted] Possible values from return,forward from property data.items[].current_status.bag_state_mapper.journey_type of schema BagStateMapper in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].dates.delivery_date of schema Dates in response with status code 200 + - [Breaking] [Deleted] property data.items[].delivery_address.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property data.items[].delivery_address.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property data.items[].delivery_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].delivery_address.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].delivery_address.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].delivery_address.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].delivery_address.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].delivery_address.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].delivery_address.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].delivery_address.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].delivery_address.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].delivery_address.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].delivery_address.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].delivery_address.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].delivery_address.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].delivery_address.user_id of schema Address in response with status code 200 + - [Deleted] Possible values from bag from property data.items[].entity_type of schema BagDetails in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].fulfilling_store.created_at of schema Store in response with status code 200 + - [Deleted] Possible values from high_street,mall,store,warehouse from property data.items[].fulfilling_store.location_type of schema Store in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].fulfilling_store.updated_at of schema Store in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].fulfilling_store.store_address_json.created_at of schema StoreAddress in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property data.items[].fulfilling_store.store_address_json.address_category of schema StoreAddress in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].fulfilling_store.store_address_json.updated_at of schema StoreAddress in response with status code 200 + - [Breaking] [Deleted] property data.items[].fulfilling_store.meta.documents.gst.type of schema Document in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].invoice.updated_date of schema InvoiceDetails in response with status code 200 + - [Deleted] Possible values from return,forward from property data.items[].journey_type of schema BagDetails in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].order.created_at of schema OrderDetails in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].order.affiliate_order_date of schema OrderDetails in response with status code 200 + - [Breaking] [Deleted] property data.items[].order.charges of schema OrderDetails in response with status code 200 + - [Deleted] Possible values from HomeDelivery,PickAtStore,Digital from property data.items[].order_type of schema BagDetails in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].ordering_store.created_at of schema Store in response with status code 200 + - [Deleted] Possible values from high_street,mall,store,warehouse from property data.items[].ordering_store.location_type of schema Store in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].ordering_store.updated_at of schema Store in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].ordering_store.store_address_json.created_at of schema StoreAddress in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property data.items[].ordering_store.store_address_json.address_category of schema StoreAddress in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].ordering_store.store_address_json.updated_at of schema StoreAddress in response with status code 200 + - [Breaking] [Deleted] property data.items[].ordering_store.meta.documents.gst.type of schema Document in response with status code 200 + - [Deleted] Possible values from partner,self,fynd from property data.items[].payment_type of schema BagDetails in response with status code 200 + - [Breaking] [Deleted] property data.items[].charges of schema BagDetails in response with status code 200 + - [Breaking] [Deleted] property data.items[].rto_address.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property data.items[].rto_address.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property data.items[].rto_address.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].rto_address.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].rto_address.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].rto_address.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].rto_address.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].rto_address.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].rto_address.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].rto_address.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].rto_address.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].rto_address.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].rto_address.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].rto_address.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].rto_address.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].rto_address.user_id of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].shipment.processing_dates.pack_by_date of schema ProcessingDates in response with status code 200 + - [Breaking] [Deleted] Possible values from Digital from property data.items[].shipment.order_type of schema Shipment in response with status code 200 + - [Breaking] [Deleted] properties data.items[].shipment.tags[].slug, data.items[].shipment.tags[].display_text in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.system_messages of schema Shipment in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.process_after_config of schema Shipment in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.billing_address_json.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property data.items[].shipment.billing_address_json.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property data.items[].shipment.billing_address_json.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].shipment.billing_address_json.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].shipment.billing_address_json.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.billing_address_json.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.billing_address_json.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.billing_address_json.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.billing_address_json.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.billing_address_json.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.billing_address_json.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.billing_address_json.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.billing_address_json.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.billing_address_json.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.billing_address_json.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.billing_address_json.user_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.delivery_address_json.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property data.items[].shipment.delivery_address_json.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property data.items[].shipment.delivery_address_json.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].shipment.delivery_address_json.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].shipment.delivery_address_json.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.delivery_address_json.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.delivery_address_json.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.delivery_address_json.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.delivery_address_json.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.delivery_address_json.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.delivery_address_json.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.delivery_address_json.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.delivery_address_json.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.delivery_address_json.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.delivery_address_json.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.delivery_address_json.user_id of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].shipment.created_at of schema Shipment in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.hand_over_contact_json.address of schema Address in response with status code 200 + - [Deleted] Possible values from home,office,other from property data.items[].shipment.hand_over_contact_json.address_type of schema Address in response with status code 200 + - [Deleted] Possible values from store,delivery,billing from property data.items[].shipment.hand_over_contact_json.address_category of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].shipment.hand_over_contact_json.created_at of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].shipment.hand_over_contact_json.updated_at of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.hand_over_contact_json.area_code_slug of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.hand_over_contact_json.country_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.hand_over_contact_json.country_iso_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.hand_over_contact_json.country_phone_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.hand_over_contact_json.delivery_address_id of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.hand_over_contact_json.geo_location of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.hand_over_contact_json.name of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.hand_over_contact_json.sector of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.hand_over_contact_json.state_code of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.hand_over_contact_json.uid of schema Address in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment.hand_over_contact_json.user_id of schema Address in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].shipment.status.created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].shipment.status.status_created_at of schema ShipmentStatusData in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment_details.box_type of schema ShipmentDetails in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment_details.shipments of schema ShipmentDetails in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment_details.fulfillment_id of schema ShipmentDetails in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment_details.articles of schema ShipmentDetails in response with status code 200 + - [Deleted] Value format from int32 from property data.items[].shipment_details.dp_id of schema ShipmentDetails in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment_details.meta of schema ShipmentDetails in response with status code 200 + - [Breaking] [Deleted] property data.items[].shipment_details.affiliate_shipment_id of schema ShipmentDetails in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].shipment_status.created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].shipment_status.status_created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].shipment_status_history[].created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].shipment_status_history[].status_created_at of schema ShipmentStatusData in response with status code 200 + - [Deleted] Possible values from shipment from property data.items[].transaction_type of schema BagDetails in response with status code 200 + - [Deleted] Value format from date-time from property data.items[].updated_at of schema BagDetails in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] data.items[].shipment_details.affiliate_shipment_id, data.items[].shipment_details.articles, data.items[].shipment_details.fulfillment_id, data.items[].shipment_details.shipments made optional in response with status code 200 + + +### Partner + + + +#### addProxyPath + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ExtensionProxyPathCreation in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema ExtensionProxyPathCreation in response with status code 200 + + +### Payment + + + +#### getBrandPaymentGatewayConfig + +- ##### What's New + - [Added] Response with status 500 + + +#### saveBrandPaymentGatewayConfig + +- ##### What's New + - [Added] Response with status 500 + + +#### getPaymentModeRoutes + +- ##### What's New + - [Added] Response with status 500 + + +#### getAllPayouts + +- ##### What's New + - [Added] Response with status 500 + + +#### savePayout + +- ##### What's New + - [Added] Response with status 500 + + +#### updatePayout + +- ##### What's New + - [Added] Response with status 500 + + +#### activateAndDectivatePayout + +- ##### What's New + - [Added] Response with status 500 + + +#### deletePayout + +- ##### What's New + - [Added] Response with status 500 + + +#### getSubscriptionPaymentMethod + +- ##### What's New + - [Added] Response with status 500 + + +#### deleteSubscriptionPaymentMethod + +- ##### What's New + - [Added] Response with status 500 + + +#### getSubscriptionConfig + +- ##### What's New + - [Added] Response with status 500 + + +#### saveSubscriptionSetupIntent + +- ##### What's New + - [Added] Response with status 500 + + +#### getBankAccountDetailsOpenAPI + +- ##### What's New + - [Added] Response with status 500 + + +#### addRefundBankAccountUsingOTP + +- ##### What's New + - [Added] Response with status 500 + + +#### verifyIfscCode + +- ##### What's New + - [Added] Response with status 500 + + +#### getUserOrderBeneficiaries + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property beneficiaries[].created_on of schema OrderBeneficiaryDetails in response with status code 200 + - [Deleted] Value format from date-time from property beneficiaries[].modified_on of schema OrderBeneficiaryDetails in response with status code 200 + + +#### getUserBeneficiaries + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property beneficiaries[].created_on of schema OrderBeneficiaryDetails in response with status code 200 + - [Deleted] Value format from date-time from property beneficiaries[].modified_on of schema OrderBeneficiaryDetails in response with status code 200 + + +#### confirmPayment + +- ##### What's New + - [Added] Response with status 500 + + +#### getUserCODlimitRoutes + +- ##### What's New + - [Added] Response with status 500 + + +#### setUserCODlimitRoutes + +- ##### What's New + - [Added] Response with status 500 + + +#### edcAggregatorsAndModelList + +- ##### What's New + - [Added] Response with status 500 + + +#### edcDeviceStats + +- ##### What's New + - [Added] Response with status 500 + + +#### updateEdcDevice + +- ##### What's New + - [Added] Response with status 500 + + +#### getEdcDevice + +- ##### What's New + - [Added] Response with status 500 + + +#### addEdcDevice + +- ##### What's New + - [Added] Response with status 500 + + +#### edcDeviceList + +- ##### What's New + - [Added] Response with status 500 + + +#### getPosPaymentModeRoutes + +- ##### What's New + - [Added] Response with status 500 + + +#### initialisePayment + +- ##### What's New + - [Added] Possible nullable value true to property amount of schema PaymentInitializationRequest in request body + - [Added] Response with status 500 + + +#### checkAndUpdatePaymentStatus + +- ##### What's New + - [Added] Possible nullable value true to property amount of schema PaymentStatusUpdateRequest in request body + - [Added] Response with status 500 + + +#### resendOrCancelPayment + +- ##### What's New + - [Added] Response with status 500 + + +#### paymentStatusBulk + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property data[].payment_object_list[].modified_on of schema PaymentObjectList in response with status code 200 + - [Deleted] Value format from date-time from property data[].payment_object_list[].created_on of schema PaymentObjectList in response with status code 200 + + +#### oauthGetUrl + +- ##### What's New + - [Added] Response with status 500 + + +#### revokeOauthToken + +- ##### What's New + - [Added] Response with status 500 + + +#### repaymentDetails + +- ##### What's New + - [Added] Possible nullable value true to property extension_order_id of schema RepaymentDetailsSerialiserPayAll in request body + - [Added] Response with status 500 + + +#### merchantOnBoarding + +- ##### What's New + - [Added] Response with status 500 + + +#### verifyCustomerForPayment + +- ##### What's New + - [Added] Response with status 500 + + +#### getPaymentLink + +- ##### What's New + - [Added] Response with status 500 + + +#### createPaymentLink + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property success_redirection_url of schema CreatePaymentLinkCreation in request body + - [Breaking] [Deleted] property failure_redirection_url of schema CreatePaymentLinkCreation in request body + + +#### pollingPaymentLink + +- ##### What's New + - [Added] Response with status 500 + + +#### resendPaymentLink + +- ##### What's New + - [Added] Response with status 500 + + +#### cancelPaymentLink + +- ##### What's New + - [Added] Response with status 500 + + +#### getPaymentModeControlRoutes + +- ##### What's New + - [Added] Response with status 500 + + +#### setMerchantModeControlRoutes + +- ##### What's New + - [Added] Response with status 500 + + +#### getPaymentModeCustomConfig + +- ##### What's New + - [Added] Response with status 500 + + +#### setPaymentModeCustomConfig + +- ##### What's New + - [Added] Response with status 500 + + +#### getPaymentCodeOption + +- ##### What's New + - [Added] Response with status 500 + + +#### getPaymentSession + +- ##### What's New + - [Added] Possible nullable value true to property gid of schema PaymentSessionSerializer in response with status code 200 + - [Added] Response with status 500 + + +#### updatePaymentSession + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property payment_details[].reason of schema PaymentSessionDetail in request body + + +#### updateRefundSession + +- ##### What's New + - [Added] Response with status 500 + + +#### getMerchantPaymentOption + +- ##### What's New + - [Added] Response with status 500 + + +#### patchMerchantPaymentOption + +- ##### What's New + - [Added] Response with status 500 + + +#### getMerchantAggregatorPaymentModeDetails + +- ##### What's New + - [Added] Response with status 500 + + +#### patchMerchantAggregatorPaymentModeDetails + +- ##### What's New + - [Added] Response with status 500 + + +#### getPGConfigAggregators + +- ##### What's New + - [Added] Response with status 500 + + +#### getMerchantRefundPriority + +- ##### What's New + - [Added] Response with status 500 + + +#### createMerchantRefundPriority + +- ##### What's New + - [Added] Response with status 500 + + +#### updateMerchantRefundPriority + +- ##### What's New + - [Added] Response with status 500 + + +#### createPaymentOrder + +- ##### What's New + - [Added] Response with status 500 + + +#### getMerchantAggregatorAppVersion + +- ##### What's New + - [Added] Response with status 500 + + +#### patchMerchantPaymentOptionVersion + +- ##### What's New + - [Added] Response with status 500 + + +### Rewards + + + +#### showGiveaways + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema Giveaway in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema Giveaway in response with status code 200 + + +#### saveGiveAway + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Giveaway in request body + - [Deleted] Value format from date-time from property updated_at of schema Giveaway in request body + - [Deleted] Value format from date-time from property created_at of schema Giveaway in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Giveaway in response with status code 200 + + +#### getGiveawayById + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Giveaway in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Giveaway in response with status code 200 + + +#### updateGiveAway + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Giveaway in request body + - [Deleted] Value format from date-time from property updated_at of schema Giveaway in request body + - [Deleted] Value format from date-time from property created_at of schema Giveaway in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Giveaway in response with status code 200 + + +#### showOffers + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property [].created_at of schema Offer in response with status code 200 + - [Deleted] Value format from date-time from property [].updated_at of schema Offer in response with status code 200 + + +#### getOfferByName + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Offer in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Offer in response with status code 200 + + +#### updateOfferByName + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema Offer in request body + - [Deleted] Value format from date-time from property updated_at of schema Offer in request body + - [Deleted] Value format from date-time from property created_at of schema Offer in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema Offer in response with status code 200 + + +#### updateUserStatus + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property updated_at of schema AppUser in request body + - [Deleted] Value format from date-time from property updated_at of schema AppUser in response with status code 200 + + +#### getUserDetails + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property user.created_at of schema RewardUser in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema RewardUser in response with status code 200 + + +#### getUserPointsHistory + +- ##### What's New + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema PointsHistory in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema PointsHistory in response with status code 200 + + +#### getRewardsConfiguration + +- ##### What's New + - [Added] Response with status 500 + + +### Share + + + +#### createShortLink + +- ##### What's New + - [Breaking] [Added] redirects.expiry, redirects.url made required in request body + - [Breaking] [Added] redirects.expiry, redirects.url made required in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property expire_at of schema ShortLinkReq in request body + - [Breaking] [Deleted] property meta of schema ShortLinkReq in request body + - [Breaking] [Deleted] property url.alias of schema UrlInfo in response with status code 200 + - [Deleted] Value format from date-time from property expire_at of schema ShortLinkRes in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema ShortLinkRes in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ShortLinkRes in response with status code 200 + + +#### getShortLinks + +- ##### What's New + - [Breaking] [Added] items[].redirects.expiry, items[].redirects.url made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].url.alias of schema UrlInfo in response with status code 200 + - [Deleted] Value format from date-time from property items[].expire_at of schema ShortLinkRes in response with status code 200 + - [Deleted] Value format from date-time from property items[].created_at of schema ShortLinkRes in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema ShortLinkRes in response with status code 200 + + +#### getShortLinkByHash + +- ##### What's New + - [Breaking] [Added] redirects.expiry, redirects.url made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property url.alias of schema UrlInfo in response with status code 200 + - [Deleted] Value format from date-time from property expire_at of schema ShortLinkRes in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema ShortLinkRes in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ShortLinkRes in response with status code 200 + + +#### updateShortLinkById + +- ##### What's New + - [Breaking] [Added] redirects.expiry, redirects.url made required in request body + - [Breaking] [Added] redirects.expiry, redirects.url made required in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property expire_at of schema ShortLinkReq in request body + - [Breaking] [Deleted] property meta of schema ShortLinkReq in request body + - [Breaking] [Deleted] property url.alias of schema UrlInfo in response with status code 200 + - [Deleted] Value format from date-time from property expire_at of schema ShortLinkRes in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema ShortLinkRes in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ShortLinkRes in response with status code 200 + + +### Theme + + + +#### getAllPages + +- ##### What's New + - [Added] property pages[].sections[].source of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property pages[].sections[].__source of schema AvailablePageSchemaSections in response with status code 200 + - [Deleted] Value format from date-time from property pages[].created_at of schema AvailablePageSchema in response with status code 200 + - [Deleted] Value format from date-time from property pages[].updated_at of schema AvailablePageSchema in response with status code 200 + + +#### createPage + +- ##### What's New + - [Added] property sections[].source of schema AvailablePageSchemaSections in request body + - [Added] property sections[].source of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property sections[].__source of schema AvailablePageSchemaSections in request body + - [Deleted] Value format from date-time from property created_at of schema AvailablePageSchema in request body + - [Deleted] Value format from date-time from property updated_at of schema AvailablePageSchema in request body + - [Breaking] [Deleted] property sections[].__source of schema AvailablePageSchemaSections in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema AvailablePageSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema AvailablePageSchema in response with status code 200 + + +#### updateMultiplePages + +- ##### What's New + - [Added] property pages[].sections[].source of schema AvailablePageSchemaSections in request body + - [Added] property pages[].sections[].source of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property pages[].sections[].__source of schema AvailablePageSchemaSections in request body + - [Deleted] Value format from date-time from property pages[].created_at of schema AvailablePageSchema in request body + - [Deleted] Value format from date-time from property pages[].updated_at of schema AvailablePageSchema in request body + - [Breaking] [Deleted] property pages[].sections[].__source of schema AvailablePageSchemaSections in response with status code 200 + - [Deleted] Value format from date-time from property pages[].created_at of schema AvailablePageSchema in response with status code 200 + - [Deleted] Value format from date-time from property pages[].updated_at of schema AvailablePageSchema in response with status code 200 + + +#### getPage + +- ##### What's New + - [Added] property sections[].source of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property sections[].__source of schema AvailablePageSchemaSections in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema AvailablePageSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema AvailablePageSchema in response with status code 200 + + +#### deletePage + +- ##### What's New + - [Added] property sections[].source of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property sections[].__source of schema AvailablePageSchemaSections in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema AvailablePageSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema AvailablePageSchema in response with status code 200 + + +#### updatePage + +- ##### What's New + - [Added] property sections[].source of schema AvailablePageSchemaSections in request body + - [Added] property sections[].source of schema AvailablePageSchemaSections in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Required path parameter socketId (type: string) + + - [Breaking] [Deleted] property sections[].__source of schema AvailablePageSchemaSections in request body + - [Deleted] Value format from date-time from property created_at of schema AvailablePageSchema in request body + - [Deleted] Value format from date-time from property updated_at of schema AvailablePageSchema in request body + - [Breaking] [Deleted] property sections[].__source of schema AvailablePageSchemaSections in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema AvailablePageSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema AvailablePageSchema in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/platform/theme/v1.0/company/{company_id}/application/{application_id}/{theme_id}/{page_value}/{socket_id} To /service/platform/theme/v1.0/company/{company_id}/application/{application_id}/{theme_id}/{page_value} + + +#### getCompanyLevelThemes + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property [].marketplace_theme_id.created_at of schema MarketplaceThemeId in response with status code 200 + - [Deleted] Value format from date-time from property [].marketplace_theme_id.updated_at of schema MarketplaceThemeId in response with status code 200 + + +#### getCompanyLevelPrivateThemes + +- ##### What's Deprecated + - [Deleted] Possible values from vue2,react from property [].theme_type of schema CompanyPrivateTheme in response with status code 200 + + +#### addMarketplaceThemeToCompany + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property marketplace_theme_id.created_at of schema MarketplaceThemeId in response with status code 200 + - [Deleted] Value format from date-time from property marketplace_theme_id.updated_at of schema MarketplaceThemeId in response with status code 200 + + +#### deleteCompanyTheme + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property marketplace_theme_id.created_at of schema MarketplaceThemeId in response with status code 200 + - [Deleted] Value format from date-time from property marketplace_theme_id.updated_at of schema MarketplaceThemeId in response with status code 200 + + +#### getApplicationThemes + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property [].created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property [].updated_at of schema ThemesSchema in response with status code 200 + + +#### getThemeById + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +#### updateTheme + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +#### deleteTheme + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +#### addThemeToApplication + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +#### updateThemeName + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +#### applyTheme + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +#### duplicateTheme + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +#### getAppliedTheme + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +#### getThemeForPreview + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +#### upgradeTheme + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ThemesSchema in response with status code 200 + - [Deleted] Value format from date-time from property updated_at of schema ThemesSchema in response with status code 200 + + +### User + + + +#### getCustomers + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property items[].account_type of schema UserSearchSchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].created_at of schema UserSearchSchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_at of schema UserSearchSchema in response with status code 200 + + +#### searchUsers + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property users[].account_type of schema UserSearchSchema in response with status code 200 + - [Deleted] Value format from date-time from property users[].created_at of schema UserSearchSchema in response with status code 200 + - [Deleted] Value format from date-time from property users[].updated_at of schema UserSearchSchema in response with status code 200 + + +#### createUser + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### updateUser + +- ##### What's Deprecated + - [Deleted] Possible values from user,programmatic from property user.account_type of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.created_at of schema UserSchema in response with status code 200 + - [Deleted] Value format from date-time from property user.updated_at of schema UserSchema in response with status code 200 + + +#### getPlatformConfig + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property updated_at of schema PlatformSchema in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema PlatformSchema in response with status code 200 + + +#### updatePlatformConfig + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property updated_at of schema PlatformSchema in request body + - [Deleted] Value format from date-time from property created_at of schema PlatformSchema in request body + - [Deleted] Value format from date-time from property updated_at of schema PlatformSchema in response with status code 200 + - [Deleted] Value format from date-time from property created_at of schema PlatformSchema in response with status code 200 + + +#### createUserGroup + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema UserGroupResponseSchema in response with status code 201 + - [Deleted] Value format from date-time from property modified_at of schema UserGroupResponseSchema in response with status code 201 + + +#### getUserGroups + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema UserGroupResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property items[].modified_at of schema UserGroupResponseSchema in response with status code 200 + + +#### updateUserGroup + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema UserGroupResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema UserGroupResponseSchema in response with status code 200 + + +#### getUserGroupById + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema UserGroupResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema UserGroupResponseSchema in response with status code 200 + + +#### updateUserGroupPartially + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema UserGroupResponseSchema in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema UserGroupResponseSchema in response with status code 200 + + +#### getUserAttributeDefinitions + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property items[].created_at of schema UserAttributeDefinition in response with status code 200 + - [Deleted] Value format from date-time from property items[].modified_at of schema UserAttributeDefinition in response with status code 200 + + +#### updateUserAttributeDefinition + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema UserAttributeDefinition in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema UserAttributeDefinition in response with status code 200 + + +#### getUserAttributeDefinitionById + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema UserAttributeDefinition in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema UserAttributeDefinition in response with status code 200 + + +#### updateUserAttribute + +- ##### What's New + - [Added] property customer_overriden of schema CreateUserAttributeRequest in request body + - [Added] property customer_overriden of schema UserAttributeResponse in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property customer_overridden of schema CreateUserAttribute in request body + - [Breaking] [Deleted] property customer_overridden of schema UserAttribute in response with status code 200 + + +#### getUserAttribute + +- ##### What's New + - [Added] property customer_overriden of schema UserAttributeResponse in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property customer_overridden of schema UserAttribute in response with status code 200 + + +#### getUserAttributesForUser + +- ##### What's New + - [Added] property items[].customer_overriden of schema UserAttributeResponse in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].customer_overridden of schema UserAttribute in response with status code 200 + + +#### getUserAttributeById + +- ##### What's New + - [Added] property customer_overriden of schema UserAttributeResponse in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property customer_overridden of schema UserAttribute in response with status code 200 + + +### Webhook + + + +#### fetchAllEventConfigurations + +- ##### What's New + - [Added] property event_configs[].subscriber_event_mapping.topic of schema SubscriberEventMapping in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property event_configs[].type of schema EventConfig in response with status code 200 + - [Breaking] [Deleted] property event_configs[].modified_by of schema EventConfig in response with status code 200 + - [Breaking] [Deleted] property event_configs[].subscriber_event_mapping.broadcaster_config of schema SubscriberEventMapping in response with status code 200 + - [Deleted] Value format from date-time from property event_configs[].subscriber_event_mapping.created_on of schema SubscriberEventMapping in response with status code 200 + - [Deleted] Value format from date-time from property event_configs[].created_on of schema EventConfig in response with status code 200 + - [Deleted] Value format from date-time from property event_configs[].updated_on of schema EventConfig in response with status code 200 + - [Breaking] [Deleted] Security in Request + + +#### registerSubscriberToEventV2 + +- ##### What's Deprecated + - [Breaking] [Deleted] property type of schema SubscriberConfigPostRequestV2 in request body + - [Deleted] Possible values from kafka,sqs,rest,event_bridge,pub_sub,temporal from property provider of schema SubscriberConfigPostRequestV2 in request body + - [Deleted] Type from object from property association of schema Association in request body + - [Deleted] Type from object from property auth_meta of schema AuthMeta in request body + - [Deleted] Possible values from hmac from property auth_meta.type of schema AuthMeta in request body + - [Breaking] [Deleted] property events[].queue of schema Events in request body + - [Breaking] [Deleted] property events[].event_bridge_name of schema Events in request body + - [Breaking] [Deleted] property events[].workflow_name of schema Events in request body + - [Breaking] [Deleted] property events[].detail_type of schema Events in request body + - [Deleted] Type from object from property of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Possible values from kafka,sqs,rest,event_bridge,pub_sub,temporal from property provider of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Type from object from property association of schema AssociationResp in response with status code 200 + - [Deleted] Value format from date-time from property updated_on of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Value format from date-time from property created_on of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Type from object from property auth_meta of schema AuthMeta in response with status code 200 + - [Deleted] Possible values from hmac from property auth_meta.type of schema AuthMeta in response with status code 200 + - [Breaking] [Deleted] Security in Request + + +#### updateSubscriberV2 + +- ##### What's Deprecated + - [Breaking] [Deleted] property type of schema SubscriberConfigUpdateRequestV2 in request body + - [Deleted] Possible values from kafka,sqs,rest,event_bridge,pub_sub,temporal from property provider of schema SubscriberConfigUpdateRequestV2 in request body + - [Deleted] Type from object from property association of schema Association in request body + - [Deleted] Type from object from property auth_meta of schema AuthMeta in request body + - [Deleted] Possible values from hmac from property auth_meta.type of schema AuthMeta in request body + - [Breaking] [Deleted] property events[].queue of schema Events in request body + - [Breaking] [Deleted] property events[].event_bridge_name of schema Events in request body + - [Breaking] [Deleted] property events[].workflow_name of schema Events in request body + - [Breaking] [Deleted] property events[].detail_type of schema Events in request body + - [Deleted] Type from object from property of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Possible values from kafka,sqs,rest,event_bridge,pub_sub,temporal from property provider of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Type from object from property association of schema AssociationResp in response with status code 200 + - [Deleted] Value format from date-time from property updated_on of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Value format from date-time from property created_on of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Type from object from property auth_meta of schema AuthMeta in response with status code 200 + - [Deleted] Possible values from hmac from property auth_meta.type of schema AuthMeta in response with status code 200 + + +#### registerSubscriberToEvent + +- ##### What's Deprecated + - [Breaking] [Deleted] property type of schema SubscriberConfigPost in request body + - [Deleted] Type from object from property association of schema Association in request body + - [Deleted] Type from object from property auth_meta of schema AuthMeta in request body + - [Deleted] Possible values from hmac from property auth_meta.type of schema AuthMeta in request body + - [Deleted] Type from object from property of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Possible values from kafka,sqs,rest,event_bridge,pub_sub,temporal from property provider of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Type from object from property association of schema AssociationResp in response with status code 200 + - [Deleted] Value format from date-time from property updated_on of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Value format from date-time from property created_on of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Type from object from property auth_meta of schema AuthMeta in response with status code 200 + - [Deleted] Possible values from hmac from property auth_meta.type of schema AuthMeta in response with status code 200 + + +#### getSubscribersByCompany + +- ##### What's New + - [Added] property items[].event_configs[].subscriber_event_mapping.topic of schema SubscriberEventMapping in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Type from object from property of schema SubscriberConfigList in response with status code 200 + - [Deleted] Type from object from property items[] of schema SubscriberDetails in response with status code 200 + - [Deleted] Possible values from kafka,sqs,rest,event_bridge,pub_sub,temporal from property items[].provider of schema SubscriberDetails in response with status code 200 + - [Deleted] Type from object from property items[].association of schema AssociationResp in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].custom_headers of schema SubscriberDetails in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_on of schema SubscriberDetails in response with status code 200 + - [Deleted] Value format from date-time from property items[].created_on of schema SubscriberDetails in response with status code 200 + - [Deleted] Type from object from property items[].auth_meta of schema AuthMeta in response with status code 200 + - [Deleted] Possible values from hmac from property items[].auth_meta.type of schema AuthMeta in response with status code 200 + - [Breaking] [Deleted] property items[].event_configs[].type of schema EventConfig in response with status code 200 + - [Breaking] [Deleted] property items[].event_configs[].modified_by of schema EventConfig in response with status code 200 + - [Breaking] [Deleted] property items[].event_configs[].subscriber_event_mapping.broadcaster_config of schema SubscriberEventMapping in response with status code 200 + - [Deleted] Value format from date-time from property items[].event_configs[].subscriber_event_mapping.created_on of schema SubscriberEventMapping in response with status code 200 + - [Deleted] Value format from date-time from property items[].event_configs[].created_on of schema EventConfig in response with status code 200 + - [Deleted] Value format from date-time from property items[].event_configs[].updated_on of schema EventConfig in response with status code 200 + - [Breaking] [Deleted] Security in Request + + +#### updateSubscriberConfig + +- ##### What's Deprecated + - [Breaking] [Deleted] property type of schema SubscriberConfigUpdate in request body + - [Deleted] Type from object from property association of schema Association in request body + - [Deleted] Type from object from property auth_meta of schema AuthMeta in request body + - [Deleted] Possible values from hmac from property auth_meta.type of schema AuthMeta in request body + - [Deleted] Type from object from property of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Possible values from kafka,sqs,rest,event_bridge,pub_sub,temporal from property provider of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Type from object from property association of schema AssociationResp in response with status code 200 + - [Deleted] Value format from date-time from property updated_on of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Value format from date-time from property created_on of schema SubscriberConfigResult in response with status code 200 + - [Deleted] Type from object from property auth_meta of schema AuthMeta in response with status code 200 + - [Deleted] Possible values from hmac from property auth_meta.type of schema AuthMeta in response with status code 200 + + +#### upsertSubscriberEvent + +- ##### What's Deprecated + - [Breaking] [Deleted] method upsertSubscriberEvent + + + +#### getSubscriberById + +- ##### What's New + - [Added] property event_configs[].subscriber_event_mapping.topic of schema SubscriberEventMapping in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Type from object from property of schema SubscriberDetails in response with status code 200 + - [Deleted] Possible values from kafka,sqs,rest,event_bridge,pub_sub,temporal from property provider of schema SubscriberDetails in response with status code 200 + - [Deleted] Type from object from property association of schema AssociationResp in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property custom_headers of schema SubscriberDetails in response with status code 200 + - [Deleted] Value format from date-time from property updated_on of schema SubscriberDetails in response with status code 200 + - [Deleted] Value format from date-time from property created_on of schema SubscriberDetails in response with status code 200 + - [Deleted] Type from object from property auth_meta of schema AuthMeta in response with status code 200 + - [Deleted] Possible values from hmac from property auth_meta.type of schema AuthMeta in response with status code 200 + - [Breaking] [Deleted] property event_configs[].type of schema EventConfig in response with status code 200 + - [Breaking] [Deleted] property event_configs[].modified_by of schema EventConfig in response with status code 200 + - [Breaking] [Deleted] property event_configs[].subscriber_event_mapping.broadcaster_config of schema SubscriberEventMapping in response with status code 200 + - [Deleted] Value format from date-time from property event_configs[].subscriber_event_mapping.created_on of schema SubscriberEventMapping in response with status code 200 + - [Deleted] Value format from date-time from property event_configs[].created_on of schema EventConfig in response with status code 200 + - [Deleted] Value format from date-time from property event_configs[].updated_on of schema EventConfig in response with status code 200 + - [Breaking] [Deleted] Security in Request + + +#### getSubscribersByExtensionId + +- ##### What's New + - [Added] property items[].event_configs[].subscriber_event_mapping.topic of schema SubscriberEventMapping in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Type from object from property of schema SubscriberConfigList in response with status code 200 + - [Deleted] Type from object from property items[] of schema SubscriberDetails in response with status code 200 + - [Deleted] Possible values from kafka,sqs,rest,event_bridge,pub_sub,temporal from property items[].provider of schema SubscriberDetails in response with status code 200 + - [Deleted] Type from object from property items[].association of schema AssociationResp in response with status code 200 + - [Breaking] [Deleted] Possible nullable value from true from property items[].custom_headers of schema SubscriberDetails in response with status code 200 + - [Deleted] Value format from date-time from property items[].updated_on of schema SubscriberDetails in response with status code 200 + - [Deleted] Value format from date-time from property items[].created_on of schema SubscriberDetails in response with status code 200 + - [Deleted] Type from object from property items[].auth_meta of schema AuthMeta in response with status code 200 + - [Deleted] Possible values from hmac from property items[].auth_meta.type of schema AuthMeta in response with status code 200 + - [Breaking] [Deleted] property items[].event_configs[].type of schema EventConfig in response with status code 200 + - [Breaking] [Deleted] property items[].event_configs[].modified_by of schema EventConfig in response with status code 200 + - [Breaking] [Deleted] property items[].event_configs[].subscriber_event_mapping.broadcaster_config of schema SubscriberEventMapping in response with status code 200 + - [Deleted] Value format from date-time from property items[].event_configs[].subscriber_event_mapping.created_on of schema SubscriberEventMapping in response with status code 200 + - [Deleted] Value format from date-time from property items[].event_configs[].created_on of schema EventConfig in response with status code 200 + - [Deleted] Value format from date-time from property items[].event_configs[].updated_on of schema EventConfig in response with status code 200 + - [Breaking] [Deleted] Security in Request + + +#### downloadDeliveryReport + +- ##### What's New + - [Added] method downloadDeliveryReport + + + +#### pingWebhook + +- ##### What's New + - [Added] method pingWebhook + + + +#### getReportFilters + +- ##### What's New + - [Added] method getReportFilters + + + +#### getHistoricalReports + +- ##### What's New + - [Added] method getHistoricalReports + + + +#### cancelJobByName + +- ##### What's New + - [Added] method cancelJobByName + + + +#### getDeliveryReports + +- ##### What's New + - [Added] method getDeliveryReports + + + +## Public Client + +- [Breaking] [Removed] Catalog class from public client + + +### Configuration + + + +#### searchApplication + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property application.created_at of schema Application in response with status code 200 + - [Deleted] Value format from date-time from property application.updated_at of schema Application in response with status code 200 + + +### Content + + + +#### getBasicDetails + +- ##### What's Deprecated + - [Breaking] [Deleted] method getBasicDetails + + + +#### getMenuContent + +- ##### What's Deprecated + - [Breaking] [Deleted] method getMenuContent + + + +#### getMenuContentByType + +- ##### What's Deprecated + - [Breaking] [Deleted] method getMenuContentByType + + + +#### getAnalyticsTags + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAnalyticsTags + + + +#### getCustomPage + +- ##### What's Deprecated + - [Breaking] [Deleted] method getCustomPage + + + +#### getFooterContent + +- ##### What's Deprecated + - [Breaking] [Deleted] method getFooterContent + + + +#### getHomePageContent + +- ##### What's Deprecated + - [Breaking] [Deleted] method getHomePageContent + + + +#### getNavbar + +- ##### What's Deprecated + - [Breaking] [Deleted] method getNavbar + + + +#### getPricingBanner + +- ##### What's Deprecated + - [Breaking] [Deleted] method getPricingBanner + + + +#### getAllTags + +- ##### What's Deprecated + - [Breaking] [Deleted] method getAllTags + + + +#### getCredentialsByEntity + +- ##### What's New + - [Added] Response with status 4XX + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[]._id of schema CredentialSchema in response with status code 200 + - [Breaking] [Deleted] properties items[].configuration.token, items[].configuration.host in response with status code 200 + - [Deleted] Possible values from partner,platform from property items[].entity_type of schema CredentialSchema in response with status code 200 + - [Breaking] [Deleted] property items[].updated_at of schema CredentialSchema in response with status code 200 + - [Breaking] [Deleted] property items[].created_at of schema CredentialSchema in response with status code 200 + - [Breaking] [Deleted] property items[].__v of schema CredentialSchema in response with status code 200 + + +### Partner + + + +#### getPanelExtensionDetails + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property created_at of schema ExtensionUsingSlug in response with status code 200 + - [Deleted] Value format from date-time from property modified_at of schema ExtensionUsingSlug in response with status code 200 + - [Deleted] Possible values from free,one_time,recurring from property plan_type of schema ExtensionUsingSlug in response with status code 200 + - [Deleted] Value format from int64 from property plans[].recurring.recurring_time of schema Recurring in response with status code 200 + + +### Webhook + + + +#### fetchAllWebhookEvents + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property event_configs[].created_on of schema EventConfig in response with status code 200 + - [Deleted] Value format from date-time from property event_configs[].updated_on of schema EventConfig in response with status code 200 + + +#### queryWebhookEventDetails + +- ##### What's Deprecated + - [Deleted] Value format from date-time from property event_configs[].created_on of schema EventConfig in response with status code 200 + - [Deleted] Value format from date-time from property event_configs[].updated_on of schema EventConfig in response with status code 200 + + +# CHANGE LOG (1.5.2) - 2.0.0 + +## Application Client + + + +### Cart + + + +#### checkoutCart + +- ##### What's New + - [Added] property success_callback_url of schema CartCheckoutDetailCreation in request body + - [Added] property failure_callback_url of schema CartCheckoutDetailCreation in request body + + +#### checkoutCartV2 + +- ##### What's New + - [Added] property success_callback_url of schema CartCheckoutDetailV2Creation in request body + - [Added] property failure_callback_url of schema CartCheckoutDetailV2Creation in request body + + +#### updateCartBreakup + +- ##### What's New + - [Added] method updateCartBreakup + + + +### Content + + + +#### getSlideshows + +- ##### What's Deprecated + - [Breaking] [Deleted] method getSlideshows + + + +#### getSlideshow + +- ##### What's Deprecated + - [Breaking] [Deleted] method getSlideshow + + + +### Logistic + + + +#### getAllCountries + +- ##### What's New + - [Added] property results[].parent_id[] of schema CountryEntityResult in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property results[].parent_id of schema CountryEntityResult in response with status code 200 + + +#### getLocalities + +- ##### What's New + - [Added] query parameter sector (type: string) + + + +### Payment + + + +#### getPaymentModeRoutes + +- ##### What's New + - [Added] property payment_options.payment_option[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + - [Added] property advance_payment[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + + +#### getPosPaymentModeRoutes + +- ##### What's New + - [Added] property payment_options.payment_option[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + - [Added] property advance_payment[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + + +#### getPaymentModeRoutesPaymentLink + +- ##### What's New + - [Added] property payment_options.payment_option[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + - [Added] property advance_payment[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + + +#### validateCustomerAndCreditSummary + +- ##### What's New + - [Added] method validateCustomerAndCreditSummary + + + +### Share + + + +#### createShortLink + +- ##### What's Changed + - [Changed] title made optional in request body + + +## Partner Client + + + +### Logistics + + + +#### createServiceability + +- ##### What's New + - [Added] property reverse_pickup of schema RegionServiceabilityDetails in request body + - [Added] property reverse_pickup of schema RegionServiceabilityResult in response with status code 200 + + +#### getServiceabilities + +- ##### What's New + - [Added] property items[].reverse_pickup of schema RegionServiceabilityResult in response with status code 200 + + +#### getServiceability + +- ##### What's New + - [Added] property reverse_pickup of schema RegionServiceabilityResult in response with status code 200 + + +#### updateServiceability + +- ##### What's New + - [Added] property reverse_pickup of schema ServiceabilityDetails in request body + - [Added] property reverse_pickup of schema ServiceabilityDetailsResult in response with status code 200 + + +#### deleteServiceability + +- ##### What's New + - [Added] property reverse_pickup of schema RegionServiceabilityResult in response with status code 200 + + +#### createCourierPartnerScheme + +- ##### What's New + - [Added] property volumetric_weight of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property status_updates of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property ndr_attempts of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property qc_shipment_item_quantity of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property non_qc_shipment_item_quantity of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property company_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property volumetric_weight of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property status_updates of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property ndr_attempts of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property non_qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.status_updates of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.status_updates of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/partner/logistics/v1.0/organization/{organization_id}/courier-partner/scheme/ To /service/partner/logistics/v2.0/organization/{organization_id}/courier-partner/scheme + + +#### updateCourierPartnerScheme + +- ##### What's New + - [Added] property volumetric_weight of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property status_updates of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property ndr_attempts of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property qc_shipment_item_quantity of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property non_qc_shipment_item_quantity of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property extension_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property scheme_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property company_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property volumetric_weight of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property status_updates of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property ndr_attempts of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property non_qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] stage made required in response with status code 200 + - [Added] feature made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.status_updates of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.status_updates of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/partner/logistics/v1.0/organization/{organization_id}/courier-partner/scheme/{scheme_id} To /service/partner/logistics/v2.0/organization/{organization_id}/courier-partner/scheme/{scheme_id} + + +#### getCourierPartnerSchemes + +- ##### What's New + - [Added] method getCourierPartnerSchemes + + + +#### getCourierPartnerScheme + +- ##### What's New + - [Added] method getCourierPartnerScheme + + + +## Platform Client + + + +### Analytics + + + +#### checkJobStatusByNameV2 + +- ##### What's New + - [Added] Possible nullable value true to property end_date of schema JobStatus in response with status code 200 + + +### AuditTrail + + + +#### createAuditLog + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 400 + + +### Cart + + + +#### platformCheckoutCart + +- ##### What's New + - [Added] property success_callback_url of schema PlatformCartCheckoutDetailCreation in request body + - [Added] property failure_callback_url of schema PlatformCartCheckoutDetailCreation in request body + + +#### platformCheckoutCartV2 + +- ##### What's New + - [Added] property success_callback_url of schema PlatformCartCheckoutDetailV2Creation in request body + - [Added] property failure_callback_url of schema PlatformCartCheckoutDetailV2Creation in request body + + +### Catalog + + + +#### getAllCollections + +- ##### What's New + - [Added] properties items[].seo.breadcrumbs[].action.page, items[].seo.breadcrumbs[].action.type in response with status code 200 + - [Added] items[].seo.breadcrumbs[].action.type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property items[].seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + + +#### createCollection + +- ##### What's New + - [Added] properties seo.breadcrumbs[].action.page, seo.breadcrumbs[].action.type in request body + - [Added] seo.breadcrumbs[].action.type made required in request body + - [Added] properties seo.breadcrumbs[].action.page, seo.breadcrumbs[].action.type in response with status code 200 + - [Added] seo.breadcrumbs[].action.type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in request body + - [Breaking] [Deleted] property seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in request body + - [Breaking] [Changed] Type from array to object of property seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + + +#### getCollectionItems + +- ##### What's New + - [Added] properties items[].seo.breadcrumbs[].action.page, items[].seo.breadcrumbs[].action.type in response with status code 200 + - [Added] items[].seo.breadcrumbs[].action.type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property items[].seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + + +#### getCollectionDetail + +- ##### What's New + - [Added] properties seo.breadcrumbs[].action.page, seo.breadcrumbs[].action.type in response with status code 200 + - [Added] seo.breadcrumbs[].action.type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + + +#### getApplicationProducts + +- ##### What's New + - [Added] properties items[].seo.breadcrumbs[].action.page, items[].seo.breadcrumbs[].action.type in response with status code 200 + - [Added] items[].seo.breadcrumbs[].action.type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property items[].seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + + +#### validateProductGlobalTemplate + +- ##### What's New + - [Added] method validateProductGlobalTemplate + + + +#### updateLocationPrice + +- ##### What's New + - [Added] method updateLocationPrice + + + +#### updateLocationQuantity + +- ##### What's New + - [Added] method updateLocationQuantity + + + +### Content + + + +#### getSlideshows + +- ##### What's Deprecated + - [Breaking] [Deleted] method getSlideshows + + + +#### createSlideshow + +- ##### What's Deprecated + - [Breaking] [Deleted] method createSlideshow + + + +#### getSlideshowBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method getSlideshowBySlug + + + +#### updateSlideshow + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateSlideshow + + + +#### deleteSlideshow + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteSlideshow + + + +### Serviceability + + + +#### createCourierPartnerAccount + +- ##### What's New + - [Added] property scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Added] property scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + + +#### getCourierPartnerAccounts + +- ##### What's New + - [Added] property items[].scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Added] property items[].scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + + +#### updateCourierPartnerAccount + +- ##### What's New + - [Added] property scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Added] property scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + + +#### getCourierPartnerAccount + +- ##### What's New + - [Added] property scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Added] property scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + + +#### updateCourierRule + +- ##### What's New + - [Added] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in request body + - [Added] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in request body + - [Added] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Added] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property conditions.forward.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from string to array of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from string to array of property conditions.forward.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] Type from string to array of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### getCourierPartnerRule + +- ##### What's New + - [Added] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Added] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property conditions.forward.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] Type from string to array of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### createCourierPartnerRule + +- ##### What's New + - [Added] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in request body + - [Added] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in request body + - [Added] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Added] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property conditions.forward.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from string to array of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from string to array of property conditions.forward.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] Type from string to array of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### getCourierPartnerRules + +- ##### What's New + - [Added] property items[].conditions.forward.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Added] property items[].conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property items[].conditions.forward.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] Type from string to array of property items[].conditions.reverse.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### getStoreRules + +- ##### What's New + - [Added] property items[].conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property items[].conditions.to_location.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### createStoreRules + +- ##### What's New + - [Added] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in request body + - [Added] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from string to array of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### getStoreRule + +- ##### What's New + - [Added] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### updateStoreRules + +- ##### What's New + - [Added] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in request body + - [Added] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from string to array of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### getServiceability + +- ##### What's New + - [Added] property is_reverse_pickup of schema ServiceabilityModel in response with status code 200 + + +#### updateServiceability + +- ##### What's New + - [Added] property is_reverse_pickup of schema ServiceabilityModel in request body + - [Added] property is_reverse_pickup of schema ServiceabilityModel in response with status code 200 + + +#### createCourierPartnerScheme + +- ##### What's New + - [Added] method createCourierPartnerScheme + + + +#### getCourierPartnerSchemes + +- ##### What's New + - [Added] method getCourierPartnerSchemes + + + +#### updateCourierPartnerScheme + +- ##### What's New + - [Added] method updateCourierPartnerScheme + + + +#### getCourierPartnerScheme + +- ##### What's New + - [Added] method getCourierPartnerScheme + + + +#### sampleFileServiceability + +- ##### What's New + - [Added] method sampleFileServiceability + + + +#### getSampleFileServiceabilityStatus + +- ##### What's New + - [Added] method getSampleFileServiceabilityStatus + + + +#### getCountries + +- ##### What's New + - [Added] method getCountries + + + +### Order + + + +#### downloadLanesReport + +- ##### What's New + - [Added] property filters of schema BulkReportsDownloadRequestSchema in request body + + +#### getShipments + +- ##### What's New + - [Added] query parameter fulfillmentType (type: string) + + + +#### getOrders + +- ##### What's New + - [Added] query parameter fulfillmentType (type: string) + + + +### Payment + + + +#### updatePaymentSession + +- ##### What's New + - [Added] property payment_details[].reason of schema PaymentSessionDetail in request body + + +## Public Client + +- [Added] Catalog class in public client + + +# CHANGE LOG (1.5.1) - 2.0.0 + +## Application Client + + + +### Cart + + + +#### checkoutCart + +- ##### What's New + - [Added] property success_callback_url of schema CartCheckoutDetailCreation in request body + - [Added] property failure_callback_url of schema CartCheckoutDetailCreation in request body + + +#### checkoutCartV2 + +- ##### What's New + - [Added] property success_callback_url of schema CartCheckoutDetailV2Creation in request body + - [Added] property failure_callback_url of schema CartCheckoutDetailV2Creation in request body + + +#### updateCartBreakup + +- ##### What's New + - [Added] method updateCartBreakup + + + +### Content + + + +#### getSlideshows + +- ##### What's Deprecated + - [Breaking] [Deleted] method getSlideshows + + + +#### getSlideshow + +- ##### What's Deprecated + - [Breaking] [Deleted] method getSlideshow + + + +### Logistic + + + +#### getAllCountries + +- ##### What's New + - [Added] property results[].parent_id[] of schema CountryEntityResult in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property results[].parent_id of schema CountryEntityResult in response with status code 200 + + +#### getLocalities + +- ##### What's New + - [Added] query parameter sector (type: string) + + + +### Payment + + + +#### getPaymentModeRoutes + +- ##### What's New + - [Added] property payment_options.payment_option[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + - [Added] property advance_payment[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + + +#### getPosPaymentModeRoutes + +- ##### What's New + - [Added] property payment_options.payment_option[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + - [Added] property advance_payment[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + + +#### getPaymentModeRoutesPaymentLink + +- ##### What's New + - [Added] property payment_options.payment_option[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + - [Added] property advance_payment[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + + +#### validateCustomerAndCreditSummary + +- ##### What's New + - [Added] method validateCustomerAndCreditSummary + + + +### Share + + + +#### createShortLink + +- ##### What's Changed + - [Changed] title made optional in request body + + +## Partner Client + + + +### Logistics + + + +#### createServiceability + +- ##### What's New + - [Added] property reverse_pickup of schema RegionServiceabilityDetails in request body + - [Added] property reverse_pickup of schema RegionServiceabilityResult in response with status code 200 + + +#### getServiceabilities + +- ##### What's New + - [Added] property items[].reverse_pickup of schema RegionServiceabilityResult in response with status code 200 + + +#### getServiceability + +- ##### What's New + - [Added] property reverse_pickup of schema RegionServiceabilityResult in response with status code 200 + + +#### updateServiceability + +- ##### What's New + - [Added] property reverse_pickup of schema ServiceabilityDetails in request body + - [Added] property reverse_pickup of schema ServiceabilityDetailsResult in response with status code 200 + + +#### deleteServiceability + +- ##### What's New + - [Added] property reverse_pickup of schema RegionServiceabilityResult in response with status code 200 + + +#### createCourierPartnerScheme + +- ##### What's New + - [Added] property volumetric_weight of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property status_updates of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property ndr_attempts of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property qc_shipment_item_quantity of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property non_qc_shipment_item_quantity of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property company_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property volumetric_weight of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property status_updates of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property ndr_attempts of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property non_qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.status_updates of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.status_updates of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/partner/logistics/v1.0/organization/{organization_id}/courier-partner/scheme/ To /service/partner/logistics/v2.0/organization/{organization_id}/courier-partner/scheme + + +#### updateCourierPartnerScheme + +- ##### What's New + - [Added] property volumetric_weight of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property status_updates of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property ndr_attempts of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property qc_shipment_item_quantity of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property non_qc_shipment_item_quantity of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property extension_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property scheme_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property company_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property volumetric_weight of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property status_updates of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property ndr_attempts of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property non_qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] stage made required in response with status code 200 + - [Added] feature made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.status_updates of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.status_updates of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/partner/logistics/v1.0/organization/{organization_id}/courier-partner/scheme/{scheme_id} To /service/partner/logistics/v2.0/organization/{organization_id}/courier-partner/scheme/{scheme_id} + + +#### getCourierPartnerSchemes + +- ##### What's New + - [Added] method getCourierPartnerSchemes + + + +#### getCourierPartnerScheme + +- ##### What's New + - [Added] method getCourierPartnerScheme + + + +## Platform Client + + + +### Analytics + + + +#### checkJobStatusByNameV2 + +- ##### What's New + - [Added] Possible nullable value true to property end_date of schema JobStatus in response with status code 200 + + +### AuditTrail + + + +#### createAuditLog + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 400 + + +### Cart + + + +#### platformCheckoutCart + +- ##### What's New + - [Added] property success_callback_url of schema PlatformCartCheckoutDetailCreation in request body + - [Added] property failure_callback_url of schema PlatformCartCheckoutDetailCreation in request body + + +#### platformCheckoutCartV2 + +- ##### What's New + - [Added] property success_callback_url of schema PlatformCartCheckoutDetailV2Creation in request body + - [Added] property failure_callback_url of schema PlatformCartCheckoutDetailV2Creation in request body + + +### Catalog + + + +#### getAllCollections + +- ##### What's New + - [Added] properties items[].seo.breadcrumbs[].action.page, items[].seo.breadcrumbs[].action.type in response with status code 200 + - [Added] items[].seo.breadcrumbs[].action.type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property items[].seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + + +#### createCollection + +- ##### What's New + - [Added] properties seo.breadcrumbs[].action.page, seo.breadcrumbs[].action.type in request body + - [Added] seo.breadcrumbs[].action.type made required in request body + - [Added] properties seo.breadcrumbs[].action.page, seo.breadcrumbs[].action.type in response with status code 200 + - [Added] seo.breadcrumbs[].action.type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in request body + - [Breaking] [Deleted] property seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in request body + - [Breaking] [Changed] Type from array to object of property seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + + +#### getCollectionItems + +- ##### What's New + - [Added] properties items[].seo.breadcrumbs[].action.page, items[].seo.breadcrumbs[].action.type in response with status code 200 + - [Added] items[].seo.breadcrumbs[].action.type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property items[].seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + + +#### getCollectionDetail + +- ##### What's New + - [Added] properties seo.breadcrumbs[].action.page, seo.breadcrumbs[].action.type in response with status code 200 + - [Added] seo.breadcrumbs[].action.type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + + +#### getApplicationProducts + +- ##### What's New + - [Added] properties items[].seo.breadcrumbs[].action.page, items[].seo.breadcrumbs[].action.type in response with status code 200 + - [Added] items[].seo.breadcrumbs[].action.type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property items[].seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + + +#### validateProductGlobalTemplate + +- ##### What's New + - [Added] method validateProductGlobalTemplate + + + +#### updateLocationPrice + +- ##### What's New + - [Added] method updateLocationPrice + + + +#### updateLocationQuantity + +- ##### What's New + - [Added] method updateLocationQuantity + + + +### Content + + + +#### getSlideshows + +- ##### What's Deprecated + - [Breaking] [Deleted] method getSlideshows + + + +#### createSlideshow + +- ##### What's Deprecated + - [Breaking] [Deleted] method createSlideshow + + + +#### getSlideshowBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] method getSlideshowBySlug + + + +#### updateSlideshow + +- ##### What's Deprecated + - [Breaking] [Deleted] method updateSlideshow + + + +#### deleteSlideshow + +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteSlideshow + + + +### Serviceability + + + +#### createCourierPartnerAccount + +- ##### What's New + - [Added] property scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Added] property scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + + +#### getCourierPartnerAccounts + +- ##### What's New + - [Added] property items[].scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Added] property items[].scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + + +#### updateCourierPartnerAccount + +- ##### What's New + - [Added] property scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Added] property scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + + +#### getCourierPartnerAccount + +- ##### What's New + - [Added] property scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Added] property scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + + +#### updateCourierRule + +- ##### What's New + - [Added] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in request body + - [Added] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in request body + - [Added] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Added] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property conditions.forward.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from string to array of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from string to array of property conditions.forward.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] Type from string to array of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### getCourierPartnerRule + +- ##### What's New + - [Added] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Added] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property conditions.forward.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] Type from string to array of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### createCourierPartnerRule + +- ##### What's New + - [Added] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in request body + - [Added] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in request body + - [Added] property conditions.forward.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Added] property conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property conditions.forward.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from string to array of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from string to array of property conditions.forward.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] Type from string to array of property conditions.reverse.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### getCourierPartnerRules + +- ##### What's New + - [Added] property items[].conditions.forward.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + - [Added] property items[].conditions.reverse.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property items[].conditions.forward.includes[].parent_id of schema LocationRuleValues in response with status code 200 + - [Breaking] [Changed] Type from string to array of property items[].conditions.reverse.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### getStoreRules + +- ##### What's New + - [Added] property items[].conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property items[].conditions.to_location.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### createStoreRules + +- ##### What's New + - [Added] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in request body + - [Added] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from string to array of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### getStoreRule + +- ##### What's New + - [Added] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### updateStoreRules + +- ##### What's New + - [Added] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in request body + - [Added] property conditions.to_location.includes[].parent_id[] of schema LocationRuleValues in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in request body + - [Breaking] [Changed] Type from string to array of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in response with status code 200 + + +#### getServiceability + +- ##### What's New + - [Added] property is_reverse_pickup of schema ServiceabilityModel in response with status code 200 + + +#### updateServiceability + +- ##### What's New + - [Added] property is_reverse_pickup of schema ServiceabilityModel in request body + - [Added] property is_reverse_pickup of schema ServiceabilityModel in response with status code 200 + + +#### createCourierPartnerScheme + +- ##### What's New + - [Added] method createCourierPartnerScheme + + + +#### getCourierPartnerSchemes + +- ##### What's New + - [Added] method getCourierPartnerSchemes + + + +#### updateCourierPartnerScheme + +- ##### What's New + - [Added] method updateCourierPartnerScheme + + + +#### getCourierPartnerScheme + +- ##### What's New + - [Added] method getCourierPartnerScheme + + + +#### sampleFileServiceability + +- ##### What's New + - [Added] method sampleFileServiceability + + + +#### getSampleFileServiceabilityStatus + +- ##### What's New + - [Added] method getSampleFileServiceabilityStatus + + + +#### getCountries + +- ##### What's New + - [Added] method getCountries + + + +### Order + + + +#### downloadLanesReport + +- ##### What's New + - [Added] property filters of schema BulkReportsDownloadRequestSchema in request body + + +#### getShipments + +- ##### What's New + - [Added] query parameter fulfillmentType (type: string) + + + +#### getOrders + +- ##### What's New + - [Added] query parameter fulfillmentType (type: string) + + + +# CHANGE LOG (1.5.0) - 2.0.0 + +## Application Client + + + +### Cart + + + +#### checkoutCart + +- ##### What's New + - [Added] property success_callback_url of schema CartCheckoutDetailCreation in request body + - [Added] property failure_callback_url of schema CartCheckoutDetailCreation in request body + + +#### checkoutCartV2 + +- ##### What's New + - [Added] property success_callback_url of schema CartCheckoutDetailV2Creation in request body + - [Added] property failure_callback_url of schema CartCheckoutDetailV2Creation in request body + + +#### updateCartBreakup + +- ##### What's New + - [Added] method updateCartBreakup + + + +### Content + + + +#### getSlideshows + +- ##### What's Deprecated + - [Breaking] [Deleted] method getSlideshows + + + +#### getSlideshow + +- ##### What's Deprecated + - [Breaking] [Deleted] method getSlideshow + + + +### Logistic + + + +#### getAllCountries + +- ##### What's New + - [Added] property results[].parent_id[] of schema CountryEntityResult in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from string to array of property results[].parent_id of schema CountryEntityResult in response with status code 200 + + +#### getLocalities + +- ##### What's New + - [Added] query parameter sector (type: string) + + + +### Payment + + + +#### getPaymentModeRoutes + +- ##### What's New + - [Added] property payment_options.payment_option[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + - [Added] property advance_payment[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + + +#### getPosPaymentModeRoutes + +- ##### What's New + - [Added] property payment_options.payment_option[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + - [Added] property advance_payment[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + + +#### getPaymentModeRoutesPaymentLink + +- ##### What's New + - [Added] property payment_options.payment_option[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + - [Added] property advance_payment[].list[].partial_payment_allowed of schema PaymentModeList in response with status code 200 + + +#### validateCustomerAndCreditSummary + +- ##### What's New + - [Added] method validateCustomerAndCreditSummary + + + +### Share + + + +#### createShortLink + +- ##### What's Changed + - [Changed] title made optional in request body + + +## Partner Client + + + +### Logistics + -#### applyRewardPoints + +#### createServiceability - ##### What's New - - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property reverse_pickup of schema RegionServiceabilityDetails in request body + - [Added] property reverse_pickup of schema RegionServiceabilityResult in response with status code 200 -#### selectAddress +#### getServiceabilities - ##### What's New - - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 201 - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 201 + - [Added] property items[].reverse_pickup of schema RegionServiceabilityResult in response with status code 200 -#### selectPaymentMode +#### getServiceability - ##### What's New - - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property reverse_pickup of schema RegionServiceabilityResult in response with status code 200 -#### getShipments +#### updateServiceability - ##### What's New - - [Added] property shipments[].items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property reverse_pickup of schema ServiceabilityDetails in request body + - [Added] property reverse_pickup of schema ServiceabilityDetailsResult in response with status code 200 -#### checkoutCart +#### deleteServiceability - ##### What's New - - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property reverse_pickup of schema RegionServiceabilityResult in response with status code 200 -#### getCartSharedItems +#### createCourierPartnerScheme - ##### What's New - - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 404 + - [Added] property volumetric_weight of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property status_updates of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property ndr_attempts of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property qc_shipment_item_quantity of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property non_qc_shipment_item_quantity of schema CourierPartnerSchemeV2DetailsModel in request body + - [Added] property company_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property volumetric_weight of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property status_updates of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property ndr_attempts of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property non_qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 +- ##### What's Deprecated + - [Breaking] [Deleted] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.status_updates of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.status_updates of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/partner/logistics/v1.0/organization/{organization_id}/courier-partner/scheme/ To /service/partner/logistics/v2.0/organization/{organization_id}/courier-partner/scheme -#### updateCartWithSharedItems + +#### updateCourierPartnerScheme - ##### What's New - - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property volumetric_weight of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property status_updates of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property ndr_attempts of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property qc_shipment_item_quantity of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property non_qc_shipment_item_quantity of schema CourierPartnerSchemeV2UpdateDetails in request body + - [Added] property extension_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property scheme_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property company_id of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property volumetric_weight of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property status_updates of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property ndr_attempts of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] property non_qc_shipment_item_quantity of schema CourierPartnerV2SchemeModel in response with status code 200 + - [Added] stage made required in response with status code 200 + - [Added] feature made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.status_updates of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in request body + - [Breaking] [Deleted] property feature.ndr_attempts of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.status_updates of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Breaking] [Deleted] property feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + +- ##### What's Changed + - [Changed] Path From /service/partner/logistics/v1.0/organization/{organization_id}/courier-partner/scheme/{scheme_id} To /service/partner/logistics/v2.0/organization/{organization_id}/courier-partner/scheme/{scheme_id} -#### getPromotionOffers +#### getCourierPartnerSchemes - ##### What's New - - [Added] query parameter sortBy (type: string) + - [Added] method getCourierPartnerSchemes - - [Added] property available_promotions[].is_bank_offer of schema PromotionOffer in response with status code 200 -#### checkoutCartV2 +#### getCourierPartnerScheme - ##### What's New - - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] method getCourierPartnerScheme -#### getPromotions -- ##### What's New - - [Added] method getPromotions +## Platform Client -### Logistic +### Analytics -#### getAllCountries +#### checkJobStatusByNameV2 - ##### What's New - - [Added] property results[].parent_id[] of schema CountryEntityResult in response with status code 200 + - [Added] Possible nullable value true to property end_date of schema JobStatus in response with status code 200 -- ##### What's Changed - - [Breaking] [Changed] Type from string to array of property results[].parent_id of schema CountryEntityResult in response with status code 200 +### AuditTrail -## Platform Client +#### createAuditLog + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 400 + ### Cart -#### getPromotionOffers +#### platformCheckoutCart - ##### What's New - - [Added] query parameter sortBy (type: string) - - - [Added] property available_promotions[].is_bank_offer of schema PromotionOffer in response with status code 200 + - [Added] property success_callback_url of schema PlatformCartCheckoutDetailCreation in request body + - [Added] property failure_callback_url of schema PlatformCartCheckoutDetailCreation in request body -#### fetchAndvalidateCartItems +#### platformCheckoutCartV2 - ##### What's New - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property success_callback_url of schema PlatformCartCheckoutDetailV2Creation in request body + - [Added] property failure_callback_url of schema PlatformCartCheckoutDetailV2Creation in request body -#### checkCartServiceability +### Catalog -- ##### What's New - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 -#### getAbandonedCartDetails +#### getAllCollections - ##### What's New - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] properties items[].seo.breadcrumbs[].action.page, items[].seo.breadcrumbs[].action.type in response with status code 200 + - [Added] items[].seo.breadcrumbs[].action.type made required in response with status code 200 +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 -#### addItems +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property items[].seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + + +#### createCollection - ##### What's New - - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property cart.applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] properties seo.breadcrumbs[].action.page, seo.breadcrumbs[].action.type in request body + - [Added] seo.breadcrumbs[].action.type made required in request body + - [Added] properties seo.breadcrumbs[].action.page, seo.breadcrumbs[].action.type in response with status code 200 + - [Added] seo.breadcrumbs[].action.type made required in response with status code 200 +- ##### What's Deprecated + - [Breaking] [Deleted] property seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in request body + - [Breaking] [Deleted] property seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 -#### updateCart +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in request body + - [Breaking] [Changed] Type from array to object of property seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + + +#### getCollectionItems - ##### What's New - - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property cart.applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] properties items[].seo.breadcrumbs[].action.page, items[].seo.breadcrumbs[].action.type in response with status code 200 + - [Added] items[].seo.breadcrumbs[].action.type made required in response with status code 200 +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 -#### getCartSharedItems +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property items[].seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + + +#### getCollectionDetail - ##### What's New - - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 404 + - [Added] properties seo.breadcrumbs[].action.page, seo.breadcrumbs[].action.type in response with status code 200 + - [Added] seo.breadcrumbs[].action.type made required in response with status code 200 +- ##### What's Deprecated + - [Breaking] [Deleted] property seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 -#### updateCartWithSharedItems +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + + +#### getApplicationProducts - ##### What's New - - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] properties items[].seo.breadcrumbs[].action.page, items[].seo.breadcrumbs[].action.type in response with status code 200 + - [Added] items[].seo.breadcrumbs[].action.type made required in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property items[].seo.breadcrumbs[].action[] of schema ApplicationItemSeoBreadcrumbs in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from array to object of property items[].seo.breadcrumbs[].action of schema ApplicationItemSeoBreadcrumbs in response with status code 200 -#### updateCartUser +#### validateProductGlobalTemplate - ##### What's New - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] method validateProductGlobalTemplate -#### getCart + +#### updateLocationPrice - ##### What's New - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] method updateLocationPrice -#### platformAddItems + +#### updateLocationQuantity - ##### What's New - - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property cart.applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] method updateLocationQuantity -#### platformUpdateCart -- ##### What's New - - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property cart.applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 +### Content -#### applyCoupon -- ##### What's New - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 201 - - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 201 +#### getSlideshows +- ##### What's Deprecated + - [Breaking] [Deleted] method getSlideshows -#### removeCoupon -- ##### What's New - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 +#### createSlideshow -#### selectAddress +- ##### What's Deprecated + - [Breaking] [Deleted] method createSlideshow -- ##### What's New - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 201 - - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 201 -#### getShipments +#### getSlideshowBySlug -- ##### What's New - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property shipments[].items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 +- ##### What's Deprecated + - [Breaking] [Deleted] method getSlideshowBySlug -#### updateShipments -- ##### What's New - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property shipments[].items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 +#### updateSlideshow +- ##### What's Deprecated + - [Breaking] [Deleted] method updateSlideshow -#### platformCheckoutCart -- ##### What's New - - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 +#### deleteSlideshow -#### selectPaymentMode +- ##### What's Deprecated + - [Breaking] [Deleted] method deleteSlideshow -- ##### What's New - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 -#### platformCheckoutCartV2 +### Serviceability -- ##### What's New - - [Added] property cart.items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 -#### selectPaymentModeV2 +#### createCourierPartnerAccount - ##### What's New - - [Added] property items[].promotions_applied[].float_amount of schema AppliedPromotion in response with status code 200 - - [Added] property applied_promo_details[].float_amount of schema AppliedPromotion in response with status code 200 + - [Added] property scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Added] property scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 -### Catalog +#### getCourierPartnerAccounts +- ##### What's New + - [Added] property items[].scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Added] property items[].scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 -#### validateProductGlobalTemplate +#### updateCourierPartnerAccount - ##### What's New - - [Added] method validateProductGlobalTemplate - + - [Added] property scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Added] property scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 -### Serviceability +#### getCourierPartnerAccount +- ##### What's New + - [Added] property scheme_rules.feature.qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 + - [Added] property scheme_rules.feature.non_qc_shipment_item_quantity of schema CourierPartnerSchemeFeatures in response with status code 200 #### updateCourierRule @@ -383,6 +11666,92 @@ - [Breaking] [Changed] Type from string to array of property conditions.to_location.includes[].parent_id of schema LocationRuleValues in response with status code 200 +#### getServiceability + +- ##### What's New + - [Added] property is_reverse_pickup of schema ServiceabilityModel in response with status code 200 + + +#### updateServiceability + +- ##### What's New + - [Added] property is_reverse_pickup of schema ServiceabilityModel in request body + - [Added] property is_reverse_pickup of schema ServiceabilityModel in response with status code 200 + + +#### createCourierPartnerScheme + +- ##### What's New + - [Added] method createCourierPartnerScheme + + + +#### getCourierPartnerSchemes + +- ##### What's New + - [Added] method getCourierPartnerSchemes + + + +#### updateCourierPartnerScheme + +- ##### What's New + - [Added] method updateCourierPartnerScheme + + + +#### getCourierPartnerScheme + +- ##### What's New + - [Added] method getCourierPartnerScheme + + + +#### sampleFileServiceability + +- ##### What's New + - [Added] method sampleFileServiceability + + + +#### getSampleFileServiceabilityStatus + +- ##### What's New + - [Added] method getSampleFileServiceabilityStatus + + + +#### getCountries + +- ##### What's New + - [Added] method getCountries + + + +### Order + + + +#### downloadLanesReport + +- ##### What's New + - [Added] property filters of schema BulkReportsDownloadRequestSchema in request body + + +#### getShipments + +- ##### What's New + - [Added] query parameter fulfillmentType (type: string) + + + +#### getOrders + +- ##### What's New + - [Added] query parameter fulfillmentType (type: string) + + + # CHANGE LOG (1.4.14) - 1.9.5 ## Application Client diff --git a/README.md b/README.md index 085c6fa8e..3a7fd168f 100644 --- a/README.md +++ b/README.md @@ -237,7 +237,7 @@ console.log("Active Theme: ", response.information.name); The above code will log the curl command in the console ```bash -curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer ' --header 'x-fp-sdk-version: 1.4.15-beta.3' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8' +curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer ' --header 'x-fp-sdk-version: 1.4.15-beta.4' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8' Active Theme: Emerge ``` diff --git a/dist/application.js b/dist/application.js index 696341eda..db2a8eb16 100644 --- a/dist/application.js +++ b/dist/application.js @@ -1 +1 @@ -(()=>{var e={675:(e,t,s)=>{const{ApplicationConfig:r,ApplicationClient:a}=s(775);e.exports={ApplicationConfig:r,ApplicationClient:a}},331:function(e){var t;"undefined"!=typeof self&&self,t=()=>(()=>{var e={249:function(e,t,s){var r;e.exports=(r=r||function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),"undefined"!=typeof self&&self.crypto&&(t=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(t=globalThis.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&void 0!==s.g&&s.g.crypto&&(t=s.g.crypto),!t)try{t=s(480)}catch(e){}var r=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function e(){}return function(t){var s;return e.prototype=t,s=new e,e.prototype=null,s}}(),n={},o=n.lib={},i=o.Base={extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=o.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,s=e.words,r=this.sigBytes,a=e.sigBytes;if(this.clamp(),r%4)for(var n=0;n>>2]>>>24-n%4*8&255;t[r+n>>>2]|=o<<24-(r+n)%4*8}else for(var i=0;i>>2]=s[i>>>2];return this.sigBytes+=a,this},clamp:function(){var t=this.words,s=this.sigBytes;t[s>>>2]&=4294967295<<32-s%4*8,t.length=e.ceil(s/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],s=0;s>>2]>>>24-a%4*8&255;r.push((n>>>4).toString(16)),r.push((15&n).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,s=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(s,t/2)}},l=u.Latin1={stringify:function(e){for(var t=e.words,s=e.sigBytes,r=[],a=0;a>>2]>>>24-a%4*8&255;r.push(String.fromCharCode(n))}return r.join("")},parse:function(e){for(var t=e.length,s=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new c.init(s,t)}},p=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},g=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var s,r=this._data,a=r.words,n=r.sigBytes,o=this.blockSize,i=n/(4*o),u=(i=t?e.ceil(i):e.max((0|i)-this._minBufferSize,0))*o,d=e.min(4*u,n);if(u){for(var l=0;lr&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),i=a.words,c=o.words,u=0;u>>7)^(h<<14|h>>>18)^h>>>3,m=u[g-2],y=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;u[g]=f+u[g-7]+y+u[g-16]}var H=r&a^r&n^a&n,v=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),_=p+((i<<26|i>>>6)^(i<<21|i>>>11)^(i<<7|i>>>25))+(i&d^~i&l)+c[g]+u[g];p=l,l=d,d=i,i=o+_|0,o=n,n=a,a=r,r=_+(v+H)|0}s[0]=s[0]+r|0,s[1]=s[1]+a|0,s[2]=s[2]+n|0,s[3]=s[3]+o|0,s[4]=s[4]+i|0,s[5]=s[5]+d|0,s[6]=s[6]+l|0,s[7]=s[7]+p|0},_doFinalize:function(){var t=this._data,s=t.words,r=8*this._nDataBytes,a=8*t.sigBytes;return s[a>>>5]|=128<<24-a%32,s[14+(a+64>>>9<<4)]=e.floor(r/4294967296),s[15+(a+64>>>9<<4)]=r,t.sigBytes=4*s.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=n._createHelper(d),t.HmacSHA256=n._createHmacHelper(d)}(Math),r.SHA256)},335:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,a,n){r=r||"&",a=a||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(r);var c=1e3;n&&"number"==typeof n.maxKeys&&(c=n.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var d=0;d=0?(l=f.substr(0,m),p=f.substr(m+1)):(l=f,p=""),g=decodeURIComponent(l),h=decodeURIComponent(p),t(o,g)?s(o[g])?o[g].push(h):o[g]=[o[g],h]:o[g]=h}return o};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},795:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,o,i){return n=n||"&",o=o||"=",null===e&&(e=void 0),"object"==typeof e?r(a(e),(function(a){var i=encodeURIComponent(t(a))+o;return s(e[a])?r(e[a],(function(e){return i+encodeURIComponent(t(e))})).join(n):i+encodeURIComponent(t(e[a]))})).join(n):i?encodeURIComponent(t(i))+o+encodeURIComponent(t(e)):""};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function r(e,t){if(e.map)return e.map(t);for(var s=[],r=0;r{"use strict";t.decode=t.parse=s(335),t.encode=t.stringify=s(795)},832:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(s(735)),n=s(601),o=s(593),i=function(){function e(e,t){if(!t)throw new Error("Signature secrete cannot be null, pass secret parameter in constructor.");this.secret=t,this.request=e;var s=this.request.headers=this.request.headers||{};!this.request.method&&this.request.body&&(this.request.method="POST"),s.Host||s.host||(s.Host=this.request.host,this.request.port&&(s.Host+=":"+this.request.port)),this.request.host||(this.request.host=s.Host||s.host)}return e.prototype.prepareRequest=function(){this.parsePath();var e,t=this.request,s=t.headers;t.signQuery?(this.parsedPath.query=e=this.parsedPath.query||{},e["x-fp-date"]?this.datetime=e["x-fp-date"]:e["x-fp-date"]=this.getDateTime()):(t.doNotModifyHeaders||(s["x-fp-date"]?this.datetime=s["x-fp-date"]||s["x-fp-date"]:s["x-fp-date"]=this.getDateTime()),delete s["x-fp-signature"],delete s["X-Fp-Signature"])},e.prototype.sign=function(){return this.request.signQuery=!1,this.parsedPath||this.prepareRequest(),this.request.headers["x-fp-signature"]=this.signature(),{"x-fp-signature":this.request.headers["x-fp-signature"],"x-fp-date":this.request.headers["x-fp-date"]}},e.prototype.signQuery=function(){return this.request.signQuery=!0,this.parsedPath||this.prepareRequest(),this.parsedPath.query["x-fp-signature"]=this.signature(),this.request.path=this.formatPath(),{"x-fp-signature":this.parsedPath.query["x-fp-signature"],"x-fp-date":this.parsedPath.query["x-fp-date"]}},e.prototype.getDateTime=function(){if(!this.datetime){var e=this.request.headers,t=new Date(e.Date||e.date||new Date);this.datetime=t.toISOString().replace(/[:\-]|\.\d{3}/g,"")}return this.datetime},e.prototype.signature=function(){var e=this.stringToSign();return"v1.1:".concat((0,o.hmac)(this.secret,e,"hex"))},e.prototype.stringToSign=function(){return[this.getDateTime(),(0,o.hash)(this.canonicalString(),"hex")].join("\n")},e.prototype.canonicalString=function(){this.parsedPath||this.prepareRequest();var e=this.parsedPath.path,t=this.parsedPath.query,s=(this.request.headers,""),r=this.request.doNotEncodePath,a=(0,o.hash)(this.request.body||"","hex");if(t){var n=Object.keys(t).reduce((function(e,s){return s?(e[(0,o.encodeRfc3986Full)(s)]=(Array.isArray(t[s]),t[s]),e):e}),{}),i=[];Object.keys(n).sort().forEach((function(e){Array.isArray(n[e])?n[e].map(o.encodeRfc3986Full).sort().forEach((function(t){i.push(e+"="+t)})):i.push(e+"="+(0,o.encodeRfc3986Full)(n[e]))})),s=i.join("&")}return"/"!==e&&"/"!==(e=(e=e.replace(/\/{2,}/g,"/")).split("/").reduce((function(e,t){return".."===t?e.pop():"."!==t&&(r&&(t=decodeURIComponent(t.replace(/\+/g," "))),e.push((0,o.encodeRfc3986Full)(t))),e}),[]).join("/"))[0]&&(e="/"+e),[this.request.method||"GET",e,s,this.canonicalHeaders()+"\n",this.signedHeaders(),a].join("\n")},e.prototype.canonicalHeaders=function(){var e=this.request.headers;return Object.keys(e).filter((function(e){if(null==n.HEADERS_TO_IGNORE[e.toLowerCase()]){var t=!1;for(var s in n.HEADERS_TO_INCLUDE)t=t||new RegExp(n.HEADERS_TO_INCLUDE[s],"ig").test(e);return t}return!1})).sort((function(e,t){return e.toLowerCase()=0&&(delete(s=a.default.parse(e.slice(t+1)))["x-fp-signature"],delete s["X-Fp-Signature"],e=e.slice(0,t)),e=e.split("/").map((function(e){return encodeURIComponent(decodeURIComponent(e))})).join("/"),this.parsedPath={path:e,query:s}},e.prototype.formatPath=function(){var e=this.parsedPath.path,t=this.parsedPath.query;return t?(null!=t[""]&&delete t[""],e+"?"+(0,o.encodeRfc3986)(a.default.stringify(t))):e},e}();t.default=i},601:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HEADERS_TO_INCLUDE=t.HEADERS_TO_IGNORE=void 0,t.HEADERS_TO_IGNORE={authorization:!0,connection:!0,"x-amzn-trace-id":!0,"user-agent":!0,expect:!0,"presigned-expires":!0,range:!0},t.HEADERS_TO_INCLUDE=["x-fp-.*","host"]},607:function(e,t,s){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,s=1,r=arguments.length;s{}},t={};function s(r){var a=t[r];if(void 0!==a)return a.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,s),n.exports}return s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s(607)})(),e.exports=t()},729:e=>{"use strict";const t=/[\p{Lu}]/u,s=/[\p{Ll}]/u,r=/^[\p{Lu}](?![\p{Lu}])/gu,a=/([\p{Alpha}\p{N}_]|$)/u,n=/[_.\- ]+/,o=new RegExp("^"+n.source),i=new RegExp(n.source+a.source,"gu"),c=new RegExp("\\d+"+a.source,"gu"),u=(e,a)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");if(a={pascalCase:!1,preserveConsecutiveUppercase:!1,...a},0===(e=Array.isArray(e)?e.map((e=>e.trim())).filter((e=>e.length)).join("-"):e.trim()).length)return"";const n=!1===a.locale?e=>e.toLowerCase():e=>e.toLocaleLowerCase(a.locale),u=!1===a.locale?e=>e.toUpperCase():e=>e.toLocaleUpperCase(a.locale);return 1===e.length?a.pascalCase?u(e):n(e):(e!==n(e)&&(e=((e,r,a)=>{let n=!1,o=!1,i=!1;for(let c=0;c(r.lastIndex=0,e.replace(r,(e=>t(e)))))(e,n):n(e),a.pascalCase&&(e=u(e.charAt(0))+e.slice(1)),((e,t)=>(i.lastIndex=0,c.lastIndex=0,e.replace(i,((e,s)=>t(s))).replace(c,(e=>t(e)))))(e,u))};e.exports=u,e.exports.default=u},454:e=>{"use strict";var t="%[a-f0-9]{2}",s=new RegExp("("+t+")|([^%]+?)","gi"),r=new RegExp("("+t+")+","gi");function a(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var s=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],a(s),a(r))}function n(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(s)||[],r=1;r{"use strict";e.exports=function(e,t){for(var s={},r=Object.keys(e),a=Array.isArray(t),n=0;n=0&&t<=l.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?p+=":"+e:"symbol"==typeof e&&(p=void 0),l.name=e,l.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},l.methodFactory=s||d,l.getLevel=function(){return null!=u?u:null!=i?i:o},l.setLevel=function(e,s){return u=h(e),!1!==s&&function(e){var s=(r[e]||"silent").toUpperCase();if(typeof window!==t&&p){try{return void(window.localStorage[p]=s)}catch(e){}try{window.document.cookie=encodeURIComponent(p)+"="+s+";"}catch(e){}}}(u),c.call(l)},l.setDefaultLevel=function(e){i=h(e),g()||l.setLevel(e,!1)},l.resetLevel=function(){u=null,function(){if(typeof window!==t&&p){try{window.localStorage.removeItem(p)}catch(e){}try{window.document.cookie=encodeURIComponent(p)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),c.call(l)},l.enableAll=function(e){l.setLevel(l.levels.TRACE,e)},l.disableAll=function(e){l.setLevel(l.levels.SILENT,e)},l.rebuild=function(){if(n!==l&&(o=h(n.getLevel())),c.call(l),n===l)for(var e in a)a[e].rebuild()},o=h(n?n.getLevel():"WARN");var f=g();null!=f&&(u=h(f)),c.call(l)}(n=new l).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=a[e];return t||(t=a[e]=new l(e,n.methodFactory)),t};var p=typeof window!==t?window.log:void 0;return n.noConflict=function(){return typeof window!==t&&window.log===n&&(window.log=p),n},n.getLoggers=function(){return a},n.default=n,n},void 0===(a=r.call(t,s,t,e))||(e.exports=a)}()},663:(e,t,s)=>{"use strict";const r=s(280),a=s(454),n=s(528),o=s(55),i=Symbol("encodeFragmentIdentifier");function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function u(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function d(e,t){return t.decode?a(e):e}function l(e){return Array.isArray(e)?e.sort():"object"==typeof e?l(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function p(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function g(e){const t=(e=p(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function f(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const s=function(e){let t;switch(e.arrayFormat){case"index":return(e,s,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=s):r[e]=s};case"bracket":return(e,s,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],s):r[e]=[s]:r[e]=s};case"colon-list-separator":return(e,s,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],s):r[e]=[s]:r[e]=s};case"comma":case"separator":return(t,s,r)=>{const a="string"==typeof s&&s.includes(e.arrayFormatSeparator),n="string"==typeof s&&!a&&d(s,e).includes(e.arrayFormatSeparator);s=n?d(s,e):s;const o=a||n?s.split(e.arrayFormatSeparator).map((t=>d(t,e))):null===s?s:d(s,e);r[t]=o};case"bracket-separator":return(t,s,r)=>{const a=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!a)return void(r[t]=s?d(s,e):s);const n=null===s?[]:s.split(e.arrayFormatSeparator).map((t=>d(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],n):r[t]=n};default:return(e,t,s)=>{void 0!==s[e]?s[e]=[].concat(s[e],t):s[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const a of e.split("&")){if(""===a)continue;let[e,o]=n(t.decode?a.replace(/\+/g," "):a,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:d(o,t),s(d(e,t),o,r)}for(const e of Object.keys(r)){const s=r[e];if("object"==typeof s&&null!==s)for(const e of Object.keys(s))s[e]=h(s[e],t);else r[e]=h(s,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const s=r[t];return Boolean(s)&&"object"==typeof s&&!Array.isArray(s)?e[t]=l(s):e[t]=s,e}),Object.create(null))}t.extract=g,t.parse=f,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const s=s=>t.skipNull&&null==e[s]||t.skipEmptyString&&""===e[s],r=function(e){switch(e.arrayFormat){case"index":return t=>(s,r)=>{const a=s.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?s:null===r?[...s,[u(t,e),"[",a,"]"].join("")]:[...s,[u(t,e),"[",u(a,e),"]=",u(r,e)].join("")]};case"bracket":return t=>(s,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?s:null===r?[...s,[u(t,e),"[]"].join("")]:[...s,[u(t,e),"[]=",u(r,e)].join("")];case"colon-list-separator":return t=>(s,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?s:null===r?[...s,[u(t,e),":list="].join("")]:[...s,[u(t,e),":list=",u(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return s=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:(a=null===a?"":a,0===r.length?[[u(s,e),t,u(a,e)].join("")]:[[r,u(a,e)].join(e.arrayFormatSeparator)])}default:return t=>(s,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?s:null===r?[...s,u(t,e)]:[...s,[u(t,e),"=",u(r,e)].join("")]}}(t),a={};for(const t of Object.keys(e))s(t)||(a[t]=e[t]);const n=Object.keys(a);return!1!==t.sort&&n.sort(t.sort),n.map((s=>{const a=e[s];return void 0===a?"":null===a?u(s,t):Array.isArray(a)?0===a.length&&"bracket-separator"===t.arrayFormat?u(s,t)+"[]":a.reduce(r(s),[]).join("&"):u(s,t)+"="+u(a,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[s,r]=n(e,"#");return Object.assign({url:s.split("?")[0]||"",query:f(g(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:d(r,t)}:{})},t.stringifyUrl=(e,s)=>{s=Object.assign({encode:!0,strict:!0,[i]:!0},s);const r=p(e.url).split("?")[0]||"",a=t.extract(e.url),n=t.parse(a,{sort:!1}),o=Object.assign(n,e.query);let c=t.stringify(o,s);c&&(c=`?${c}`);let d=function(e){let t="";const s=e.indexOf("#");return-1!==s&&(t=e.slice(s)),t}(e.url);return e.fragmentIdentifier&&(d=`#${s[i]?u(e.fragmentIdentifier,s):e.fragmentIdentifier}`),`${r}${c}${d}`},t.pick=(e,s,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[i]:!1},r);const{url:a,query:n,fragmentIdentifier:c}=t.parseUrl(e,r);return t.stringifyUrl({url:a,query:o(n,s),fragmentIdentifier:c},r)},t.exclude=(e,s,r)=>{const a=Array.isArray(s)?e=>!s.includes(e):(e,t)=>!s(e,t);return t.pick(e,a,r)}},528:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const s=e.indexOf(t);return-1===s?[e]:[e.slice(0,s),e.slice(s+t.length)]}},280:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},534:(e,t,s)=>{const{fdkAxios:r}=s(128),{convertStringToBase64:a}=s(879);e.exports=class{static execute(e,t,s,n,o,i,c){let u={Authorization:"Bearer "+a(`${e.applicationID}:${e.applicationToken}`)};e.cookie&&(u={...u,cookie:e.cookie}),e.locationDetails&&(u={...u,"x-location-detail":JSON.stringify(e.locationDetails)}),e.currencyCode&&(u={...u,"x-currency-code":e.currencyCode});const d=e.extraHeaders.reduce(((e,t)=>({...e,...t})),{});let l={method:t,url:s,params:n,data:o,headers:{...u,...d,...i},responseHeaders:c.responseHeaders};return r.request(l)}}},418:(e,t,s)=>{const r=s(869),a=s(99),n=s(727),o=s(979),i=s(307),c=s(507),u=s(259),d=s(43),l=s(133),p=s(469),g=s(611),h=s(603),f=s(715),m=s(651),y=s(803),H=s(363),v=s(567),{FDKClientValidationError:_}=s(235),{Logger:w}=s(572),{convertStringToBase64:b}=s(879),{execute:q}=s(534);e.exports=class{constructor(e){this.config=e,this.cart=new r(e),this.catalog=new a(e),this.common=new n(e),this.communication=new o(e),this.configuration=new i(e),this.content=new c(e),this.fileStorage=new u(e),this.finance=new d(e),this.lead=new l(e),this.logistic=new p(e),this.order=new g(e),this.payment=new h(e),this.rewards=new f(e),this.share=new m(e),this.theme=new y(e),this.user=new H(e),this.webhook=new v(e)}setCookie(e){this.config.cookie=e}setLocationDetails(e,t=!1){this.config.locationDetails=!0===t?e:{...this.config.locationDetails,...e}}setCurrencyCode(e){if("string"!=typeof e)throw new _("Currency code should be string only");this.config.currencyCode=e}setExtraHeaders(e){if("object"!=typeof e)throw new _("Context value should be an object");this.config.extraHeaders.push(e)}async request({method:e,url:t,query:s,body:r,headers:a,responseHeaders:n=!1}){return await q(this.config,e,t,s,r,a,{responseHeaders:n})}}},163:(e,t,s)=>{const{FDKInvalidCredentialError:r}=s(235),{Logger:a,setLoggerLevel:n}=s(572);e.exports=class{constructor(e,t){this.applicationID=e.applicationID||"",this.applicationToken=e.applicationToken||"",this.options={strictResponseCheck:!1,...t},this.domain=e.domain||"https://api.fynd.com",this.logLevel=e.logLevel||"ERROR",this.setLogLevel(this.logLevel),this.extraHeaders=[],this.locationDetails=e.locationDetails,this.currencyCode=e.currencyCode||"INR",this.validate()}setLogLevel(e){n(e.toUpperCase()),this.logLevel=e.toUpperCase()}setCookie(e){this.cookie=e}validate(){if(!this.applicationID)throw a({level:"ERROR",message:"No Application ID Present"}),new r("No Application ID Present");if(!this.applicationToken)throw a({level:"ERROR",message:"No Application Token Present"}),new r("No Application Token Present");if(this.applicationToken.length<5)throw a({level:"ERROR",message:"Invalid Application Token"}),new r("Invalid Application Token");if("boolean"!=typeof this.options.strictResponseCheck)throw a({level:"ERROR",message:"Invalid Application Token"}),a({level:"ERROR",message:"Invalid Value for options.strictResponseCheck, provide boolean value"}),new r("Invalid Value for options.strictResponseCheck, provide boolean value")}}},869:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={addAddress:"/service/application/cart/v1.0/address",addItems:"/service/application/cart/v1.0/detail",applyCoupon:"/service/application/cart/v1.0/coupon",applyRewardPoints:"/service/application/cart/v1.0/redeem/points/",checkoutCart:"/service/application/cart/v1.0/checkout",checkoutCartV2:"/service/application/cart/v2.0/checkout",deleteCart:"/service/application/cart/v1.0/cart_archive",getAddressById:"/service/application/cart/v1.0/address/{id}",getAddresses:"/service/application/cart/v1.0/address",getBulkDiscountOffers:"/service/application/cart/v1.0/bulk-price",getCart:"/service/application/cart/v1.0/detail",getCartLastModified:"/service/application/cart/v1.0/detail",getCartShareLink:"/service/application/cart/v1.0/share-cart",getCartSharedItems:"/service/application/cart/v1.0/share-cart/{token}",getCoupons:"/service/application/cart/v1.0/coupon",getItemCount:"/service/application/cart/v1.0/basic",getLadderOffers:"/service/application/cart/v1.0/available-ladder-prices",getPromotionOffers:"/service/application/cart/v1.0/available-promotions",getPromotionPaymentOffers:"/service/application/cart/v1.0/available-payment-offers",getPromotions:"/service/application/cart/v1.0/promotion",getShipments:"/service/application/cart/v1.0/shipment",removeAddress:"/service/application/cart/v1.0/address/{id}",removeCoupon:"/service/application/cart/v1.0/coupon",selectAddress:"/service/application/cart/v1.0/select-address",selectPaymentMode:"/service/application/cart/v1.0/payment",updateAddress:"/service/application/cart/v1.0/address/{id}",updateCart:"/service/application/cart/v1.0/detail",updateCartMeta:"/service/application/cart/v1.0/meta",updateCartWithSharedItems:"/service/application/cart/v1.0/share-cart/{token}/{action}",validateCouponForPayment:"/service/application/cart/v1.0/payment/validate/"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async addAddress({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.addAddress,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async addItems({body:e,i:t,b:s,areaCode:n,buyNow:o,id:i,orderType:c,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const l={};l.i=t,l.b=s,l.area_code=n,l.buy_now=o,l.id=i,l.order_type=c;const p=await r.execute(this._conf,"post",a({url:this._urls.addItems,params:{}}),l,e,{...u},{responseHeaders:d});let g=p;return d&&(g=p[0]),p}async applyCoupon({body:e,i:t,b:s,p:n,id:o,buyNow:i,cartType:c,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const l={};l.i=t,l.b=s,l.p=n,l.id=o,l.buy_now=i,l.cart_type=c;const p=await r.execute(this._conf,"post",a({url:this._urls.applyCoupon,params:{}}),l,e,{...u},{responseHeaders:d});let g=p;return d&&(g=p[0]),p}async applyRewardPoints({body:e,id:t,i:s,b:n,buyNow:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.id=t,u.i=s,u.b=n,u.buy_now=o;const d=await r.execute(this._conf,"post",a({url:this._urls.applyRewardPoints,params:{}}),u,e,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}async checkoutCart({body:e,buyNow:t,cartType:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.buy_now=t,i.cart_type=s;const c=await r.execute(this._conf,"post",a({url:this._urls.checkoutCart,params:{}}),i,e,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}async checkoutCartV2({body:e,buyNow:t,cartType:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.buy_now=t,i.cart_type=s;const c=await r.execute(this._conf,"post",a({url:this._urls.checkoutCartV2,params:{}}),i,e,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}async deleteCart({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.id=e;const o=await r.execute(this._conf,"put",a({url:this._urls.deleteCart,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getAddressById({id:e,cartId:t,buyNow:s,mobileNo:n,checkoutMode:o,tags:i,isDefault:c,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const l={};l.cart_id=t,l.buy_now=s,l.mobile_no=n,l.checkout_mode=o,l.tags=i,l.is_default=c;const p=await r.execute(this._conf,"get",a({url:this._urls.getAddressById,params:{id:e}}),l,void 0,{...u},{responseHeaders:d});let g=p;return d&&(g=p[0]),p}async getAddresses({cartId:e,buyNow:t,mobileNo:s,checkoutMode:n,tags:o,isDefault:i,requestHeaders:c}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const d={};d.cart_id=e,d.buy_now=t,d.mobile_no=s,d.checkout_mode=n,d.tags=o,d.is_default=i;const l=await r.execute(this._conf,"get",a({url:this._urls.getAddresses,params:{}}),d,void 0,{...c},{responseHeaders:u});let p=l;return u&&(p=l[0]),l}async getBulkDiscountOffers({itemId:e,articleId:t,uid:s,slug:n,requestHeaders:o}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const c={};c.item_id=e,c.article_id=t,c.uid=s,c.slug=n;const u=await r.execute(this._conf,"get",a({url:this._urls.getBulkDiscountOffers,params:{}}),c,void 0,{...o},{responseHeaders:i});let d=u;return i&&(d=u[0]),u}async getCart({id:e,i:t,b:s,c:n,assignCardId:o,areaCode:i,buyNow:c,orderType:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:l}={responseHeaders:!1}){const p={};p.id=e,p.i=t,p.b=s,p.c=n,p.assign_card_id=o,p.area_code=i,p.buy_now=c,p.order_type=u;const g=await r.execute(this._conf,"get",a({url:this._urls.getCart,params:{}}),p,void 0,{...d},{responseHeaders:l});let h=g;return l&&(h=g[0]),g}async getCartLastModified({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.id=e;const o=await r.execute(this._conf,"head",a({url:this._urls.getCartLastModified,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getCartShareLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getCartShareLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getCartSharedItems({token:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getCartSharedItems,params:{token:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getCoupons({id:e,buyNow:t,slug:s,storeId:n,requestHeaders:o}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const c={};c.id=e,c.buy_now=t,c.slug=s,c.store_id=n;const u=await r.execute(this._conf,"get",a({url:this._urls.getCoupons,params:{}}),c,void 0,{...o},{responseHeaders:i});let d=u;return i&&(d=u[0]),u}async getItemCount({id:e,buyNow:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.id=e,o.buy_now=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getItemCount,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getLadderOffers({slug:e,storeId:t,promotionId:s,pageSize:n,requestHeaders:o}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const c={};c.slug=e,c.store_id=t,c.promotion_id=s,c.page_size=n;const u=await r.execute(this._conf,"get",a({url:this._urls.getLadderOffers,params:{}}),c,void 0,{...o},{responseHeaders:i});let d=u;return i&&(d=u[0]),u}async getPromotionOffers({slug:e,pageSize:t,promotionGroup:s,storeId:n,cartType:o,sortBy:i,requestHeaders:c}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const d={};d.slug=e,d.page_size=t,d.promotion_group=s,d.store_id=n,d.cart_type=o,d.sort_by=i;const l=await r.execute(this._conf,"get",a({url:this._urls.getPromotionOffers,params:{}}),d,void 0,{...c},{responseHeaders:u});let p=l;return u&&(p=l[0]),l}async getPromotionPaymentOffers({id:e,uid:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.id=e,o.uid=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getPromotionPaymentOffers,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getPromotions({pageSize:e,pageNo:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.page_size=e,o.page_no=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getPromotions,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getShipments({p:e,id:t,buyNow:s,addressId:n,areaCode:o,orderType:i,requestHeaders:c}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const d={};d.p=e,d.id=t,d.buy_now=s,d.address_id=n,d.area_code=o,d.order_type=i;const l=await r.execute(this._conf,"get",a({url:this._urls.getShipments,params:{}}),d,void 0,{...c},{responseHeaders:u});let p=l;return u&&(p=l[0]),l}async removeAddress({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"delete",a({url:this._urls.removeAddress,params:{id:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async removeCoupon({id:e,buyNow:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.id=e,o.buy_now=t;const i=await r.execute(this._conf,"delete",a({url:this._urls.removeCoupon,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async selectAddress({body:e,cartId:t,buyNow:s,i:n,b:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.cart_id=t,u.buy_now=s,u.i=n,u.b=o;const d=await r.execute(this._conf,"post",a({url:this._urls.selectAddress,params:{}}),u,e,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}async selectPaymentMode({body:e,id:t,buyNow:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.id=t,i.buy_now=s;const c=await r.execute(this._conf,"put",a({url:this._urls.selectPaymentMode,params:{}}),i,e,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}async updateAddress({id:e,body:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"put",a({url:this._urls.updateAddress,params:{id:e}}),{},t,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async updateCart({body:e,id:t,i:s,b:n,areaCode:o,buyNow:i,cartType:c,orderType:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:l}={responseHeaders:!1}){const p={};p.id=t,p.i=s,p.b=n,p.area_code=o,p.buy_now=i,p.cart_type=c,p.order_type=u;const g=await r.execute(this._conf,"put",a({url:this._urls.updateCart,params:{}}),p,e,{...d},{responseHeaders:l});let h=g;return l&&(h=g[0]),g}async updateCartMeta({body:e,id:t,buyNow:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.id=t,i.buy_now=s;const c=await r.execute(this._conf,"put",a({url:this._urls.updateCartMeta,params:{}}),i,e,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}async updateCartWithSharedItems({token:e,action:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"post",a({url:this._urls.updateCartWithSharedItems,params:{token:e,action:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async validateCouponForPayment({id:e,buyNow:t,addressId:s,paymentMode:n,paymentIdentifier:o,aggregatorName:i,merchantCode:c,iin:u,network:d,type:l,cardId:p,cartType:g,requestHeaders:h}={requestHeaders:{}},{responseHeaders:f}={responseHeaders:!1}){const m={};m.id=e,m.buy_now=t,m.address_id=s,m.payment_mode=n,m.payment_identifier=o,m.aggregator_name=i,m.merchant_code=c,m.iin=u,m.network=d,m.type=l,m.card_id=p,m.cart_type=g;const y=await r.execute(this._conf,"get",a({url:this._urls.validateCouponForPayment,params:{}}),m,void 0,{...h},{responseHeaders:f});let H=y;return f&&(H=y[0]),y}}},99:(e,t,s)=>{const r=s(534),a=s(205),n=s(121);e.exports=class{constructor(e){this._conf=e,this._relativeUrls={followById:"/service/application/catalog/v1.0/follow/{collection_type}/{collection_id}/",getBrandDetailBySlug:"/service/application/catalog/v1.0/brands/{slug}/",getBrands:"/service/application/catalog/v1.0/brands/",getCategories:"/service/application/catalog/v1.0/categories/",getCategoryDetailBySlug:"/service/application/catalog/v1.0/categories/{slug}/",getCollectionDetailBySlug:"/service/application/catalog/v1.0/collections/{slug}/",getCollectionItemsBySlug:"/service/application/catalog/v1.0/collections/{slug}/items/",getCollections:"/service/application/catalog/v1.0/collections/",getComparedFrequentlyProductBySlug:"/service/application/catalog/v1.0/products/{slug}/similar/compared-frequently/",getDepartments:"/service/application/catalog/v1.0/departments/",getFollowIds:"/service/application/catalog/v1.0/follow/ids/",getFollowedListing:"/service/application/catalog/v1.0/follow/{collection_type}/",getFollowerCountById:"/service/application/catalog/v1.0/follow/{collection_type}/{collection_id}/count/",getHomeProducts:"/service/application/catalog/v1.0/home/listing/",getInStockLocations:"/service/application/catalog/v1.0/in-stock/locations/",getLocationDetailsById:"/service/application/catalog/v1.0/locations/{location_id}/",getProductBundlesBySlug:"/service/application/catalog/v1.0/product-grouping/",getProductComparisonBySlugs:"/service/application/catalog/v1.0/products/compare/",getProductDetailBySlug:"/service/application/catalog/v1.0/products/{slug}/",getProductPriceBySlug:"/service/application/catalog/v3.0/products/{slug}/sizes/{size}/price/",getProductSellersBySlug:"/service/application/catalog/v3.0/products/{slug}/sizes/{size}/sellers/",getProductSizesBySlug:"/service/application/catalog/v1.0/products/{slug}/sizes/",getProductStockByIds:"/service/application/catalog/v1.0/products/stock-status/",getProductStockForTimeByIds:"/service/application/catalog/v1.0/products/stock-status/poll/",getProductVariantsBySlug:"/service/application/catalog/v1.0/products/{slug}/variants/",getProducts:"/service/application/catalog/v1.0/products/",getSearchResults:"/service/application/catalog/v1.0/auto-complete/",getSimilarComparisonProductBySlug:"/service/application/catalog/v1.0/products/{slug}/similar/compare/",getStores:"/service/application/catalog/v1.0/locations/",unfollowById:"/service/application/catalog/v1.0/follow/{collection_type}/{collection_id}/"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async followById({collectionType:e,collectionId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"post",a({url:this._urls.followById,params:{collectionType:e,collectionId:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async getBrandDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getBrandDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getBrands({department:e,pageNo:t,pageSize:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.department=e,i.page_no=t,i.page_size=s;const c=await r.execute(this._conf,"get",a({url:this._urls.getBrands,params:{}}),i,void 0,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}getBrandsPaginator({department:e,pageSize:t}={}){const s=new n;return s.setCallback((async()=>{s.nextId;const r=s.pageNo,a=await this.getBrands({department:e,pageNo:r,pageSize:t});return s.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),s}async getCategories({department:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.department=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getCategories,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getCategoryDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getCategoryDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getCollectionDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getCollectionDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getCollectionItemsBySlug({slug:e,f:t,q:s,filters:n,sortOn:o,pageId:i,pageSize:c,pageNo:u,pageType:d,requestHeaders:l}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const g={};g.f=t,g.q=s,g.filters=n,g.sort_on=o,g.page_id=i,g.page_size=c,g.page_no=u,g.page_type=d;const h=await r.execute(this._conf,"get",a({url:this._urls.getCollectionItemsBySlug,params:{slug:e}}),g,void 0,{...l},{responseHeaders:p});let f=h;return p&&(f=h[0]),h}getCollectionItemsBySlugPaginator({slug:e,f:t,q:s,filters:r,sortOn:a,pageSize:o}={}){const i=new n;return i.setCallback((async()=>{const n=i.nextId,c=i.pageNo,u=await this.getCollectionItemsBySlug({slug:e,f:t,q:s,filters:r,sortOn:a,pageId:n,pageSize:o,pageNo:c,pageType:"cursor"});return i.setPaginator({hasNext:!!u.page.has_next,nextId:u.page.next_id}),u}).bind(this)),i}async getCollections({pageNo:e,pageSize:t,tag:s,q:n,requestHeaders:o}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const c={};c.page_no=e,c.page_size=t,c.tag=s,c.q=n;const u=await r.execute(this._conf,"get",a({url:this._urls.getCollections,params:{}}),c,void 0,{...o},{responseHeaders:i});let d=u;return i&&(d=u[0]),u}getCollectionsPaginator({pageSize:e,tag:t,q:s}={}){const r=new n;return r.setCallback((async()=>{r.nextId;const a=r.pageNo,n=await this.getCollections({pageNo:a,pageSize:e,tag:t,q:s});return r.setPaginator({hasNext:!!n.page.has_next,nextId:n.page.next_id}),n}).bind(this)),r}async getComparedFrequentlyProductBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getComparedFrequentlyProductBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getDepartments({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getDepartments,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getFollowIds({collectionType:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.collection_type=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getFollowIds,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getFollowedListing({collectionType:e,pageId:t,pageSize:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.page_id=t,i.page_size=s;const c=await r.execute(this._conf,"get",a({url:this._urls.getFollowedListing,params:{collectionType:e}}),i,void 0,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}getFollowedListingPaginator({collectionType:e,pageSize:t}={}){const s=new n;return s.setCallback((async()=>{const r=s.nextId,a=(s.pageNo,await this.getFollowedListing({collectionType:e,pageId:r,pageSize:t}));return s.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),s}async getFollowerCountById({collectionType:e,collectionId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"get",a({url:this._urls.getFollowerCountById,params:{collectionType:e,collectionId:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async getHomeProducts({sortOn:e,pageId:t,pageSize:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.sort_on=e,i.page_id=t,i.page_size=s;const c=await r.execute(this._conf,"get",a({url:this._urls.getHomeProducts,params:{}}),i,void 0,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}getHomeProductsPaginator({sortOn:e,pageSize:t}={}){const s=new n;return s.setCallback((async()=>{const r=s.nextId,a=(s.pageNo,await this.getHomeProducts({sortOn:e,pageId:r,pageSize:t}));return s.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),s}async getInStockLocations({pageNo:e,pageSize:t,q:s,city:n,range:o,latitude:i,longitude:c,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const l={};l.page_no=e,l.page_size=t,l.q=s,l.city=n,l.range=o,l.latitude=i,l.longitude=c;const p=await r.execute(this._conf,"get",a({url:this._urls.getInStockLocations,params:{}}),l,void 0,{...u},{responseHeaders:d});let g=p;return d&&(g=p[0]),p}getInStockLocationsPaginator({pageSize:e,q:t,city:s,range:r,latitude:a,longitude:o}={}){const i=new n;return i.setCallback((async()=>{i.nextId;const n=i.pageNo,c=await this.getInStockLocations({pageNo:n,pageSize:e,q:t,city:s,range:r,latitude:a,longitude:o});return i.setPaginator({hasNext:!!c.page.has_next,nextId:c.page.next_id}),c}).bind(this)),i}async getLocationDetailsById({locationId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getLocationDetailsById,params:{locationId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getProductBundlesBySlug({slug:e,id:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.slug=e,o.id=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getProductBundlesBySlug,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getProductComparisonBySlugs({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.slug=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getProductComparisonBySlugs,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getProductDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getProductDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getProductPriceBySlug({slug:e,size:t,storeId:s,moq:n,requestHeaders:o}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const c={};c.store_id=s,c.moq=n;const u=await r.execute(this._conf,"get",a({url:this._urls.getProductPriceBySlug,params:{slug:e,size:t}}),c,void 0,{...o},{responseHeaders:i});let d=u;return i&&(d=u[0]),u}async getProductSellersBySlug({slug:e,size:t,strategy:s,pageNo:n,pageSize:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.strategy=s,u.page_no=n,u.page_size=o;const d=await r.execute(this._conf,"get",a({url:this._urls.getProductSellersBySlug,params:{slug:e,size:t}}),u,void 0,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}getProductSellersBySlugPaginator({slug:e,size:t,strategy:s,pageSize:r}={}){const a=new n;return a.setCallback((async()=>{a.nextId;const n=a.pageNo,o=await this.getProductSellersBySlug({slug:e,size:t,strategy:s,pageNo:n,pageSize:r});return a.setPaginator({hasNext:!!o.page.has_next,nextId:o.page.next_id}),o}).bind(this)),a}async getProductSizesBySlug({slug:e,storeId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.store_id=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getProductSizesBySlug,params:{slug:e}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getProductStockByIds({itemId:e,alu:t,skuCode:s,ean:n,upc:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.item_id=e,u.alu=t,u.sku_code=s,u.ean=n,u.upc=o;const d=await r.execute(this._conf,"get",a({url:this._urls.getProductStockByIds,params:{}}),u,void 0,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}async getProductStockForTimeByIds({timestamp:e,pageSize:t,pageId:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.timestamp=e,i.page_size=t,i.page_id=s;const c=await r.execute(this._conf,"get",a({url:this._urls.getProductStockForTimeByIds,params:{}}),i,void 0,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}getProductStockForTimeByIdsPaginator({timestamp:e,pageSize:t}={}){const s=new n;return s.setCallback((async()=>{const r=s.nextId,a=(s.pageNo,await this.getProductStockForTimeByIds({timestamp:e,pageSize:t,pageId:r}));return s.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),s}async getProductVariantsBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getProductVariantsBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getProducts({q:e,f:t,filters:s,sortOn:n,pageId:o,pageSize:i,pageNo:c,pageType:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:l}={responseHeaders:!1}){const p={};p.q=e,p.f=t,p.filters=s,p.sort_on=n,p.page_id=o,p.page_size=i,p.page_no=c,p.page_type=u;const g=await r.execute(this._conf,"get",a({url:this._urls.getProducts,params:{}}),p,void 0,{...d},{responseHeaders:l});let h=g;return l&&(h=g[0]),g}getProductsPaginator({q:e,f:t,filters:s,sortOn:r,pageSize:a}={}){const o=new n;return o.setCallback((async()=>{const n=o.nextId,i=o.pageNo,c=await this.getProducts({q:e,f:t,filters:s,sortOn:r,pageId:n,pageSize:a,pageNo:i,pageType:"cursor"});return o.setPaginator({hasNext:!!c.page.has_next,nextId:c.page.next_id}),c}).bind(this)),o}async getSearchResults({q:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.q=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getSearchResults,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getSimilarComparisonProductBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getSimilarComparisonProductBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getStores({pageNo:e,pageSize:t,q:s,city:n,range:o,latitude:i,longitude:c,tags:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:l}={responseHeaders:!1}){const p={};p.page_no=e,p.page_size=t,p.q=s,p.city=n,p.range=o,p.latitude=i,p.longitude=c,p.tags=u;const g=await r.execute(this._conf,"get",a({url:this._urls.getStores,params:{}}),p,void 0,{...d},{responseHeaders:l});let h=g;return l&&(h=g[0]),g}getStoresPaginator({pageSize:e,q:t,city:s,range:r,latitude:a,longitude:o,tags:i}={}){const c=new n;return c.setCallback((async()=>{c.nextId;const n=c.pageNo,u=await this.getStores({pageNo:n,pageSize:e,q:t,city:s,range:r,latitude:a,longitude:o,tags:i});return c.setPaginator({hasNext:!!u.page.has_next,nextId:u.page.next_id}),u}).bind(this)),c}async unfollowById({collectionType:e,collectionId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"delete",a({url:this._urls.unfollowById,params:{collectionType:e,collectionId:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}}},727:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getLocations:"/service/common/configuration/v1.0/location",searchApplication:"/service/common/configuration/v1.0/application/search-application"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getLocations({locationType:e,id:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.location_type=e,o.id=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getLocations,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async searchApplication({authorization:e,query:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.query=t;const i={};i.authorization=e;const c=await r.execute(this._conf,"get",a({url:this._urls.searchApplication,params:{}}),o,void 0,{...i,...s},{responseHeaders:n});let u=c;return n&&(u=c[0]),c}}},979:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getCommunicationConsent:"/service/application/communication/v1.0/consent",upsertAppPushtoken:"/service/application/communication/v1.0/pn-token",upsertCommunicationConsent:"/service/application/communication/v1.0/consent"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getCommunicationConsent({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getCommunicationConsent,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async upsertAppPushtoken({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.upsertAppPushtoken,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async upsertCommunicationConsent({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.upsertCommunicationConsent,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}}},307:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getAppCurrencies:"/service/application/configuration/v1.0/currency",getAppStaffList:"/service/application/configuration/v1.0/staff/list",getAppStaffs:"/service/application/configuration/v1.0/staff",getApplication:"/service/application/configuration/v1.0/application",getBasicDetails:"/service/application/configuration/v1.0/detail",getContactInfo:"/service/application/configuration/v1.0/information",getCurrencies:"/service/application/configuration/v1.0/currencies",getCurrencyById:"/service/application/configuration/v1.0/currency/{id}",getFeatures:"/service/application/configuration/v1.0/feature",getIntegrationTokens:"/service/application/configuration/v1.0/token",getLanguages:"/service/application/configuration/v1.0/languages",getOrderingStoreCookie:"/service/application/configuration/v1.0/ordering-store/select",getOrderingStores:"/service/application/configuration/v1.0/ordering-store/stores",getOwnerInfo:"/service/application/configuration/v1.0/about",getStoreDetailById:"/service/application/configuration/v1.0/ordering-store/stores/{store_id}",removeOrderingStoreCookie:"/service/application/configuration/v1.0/ordering-store/select"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAppCurrencies({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getAppCurrencies,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getAppStaffList({pageNo:e,pageSize:t,orderIncent:s,orderingStore:n,user:o,userName:i,requestHeaders:c}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const d={};d.page_no=e,d.page_size=t,d.order_incent=s,d.ordering_store=n,d.user=o,d.user_name=i;const l=await r.execute(this._conf,"get",a({url:this._urls.getAppStaffList,params:{}}),d,void 0,{...c},{responseHeaders:u});let p=l;return u&&(p=l[0]),l}async getAppStaffs({orderIncent:e,orderingStore:t,user:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.order_incent=e,i.ordering_store=t,i.user=s;const c=await r.execute(this._conf,"get",a({url:this._urls.getAppStaffs,params:{}}),i,void 0,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}async getApplication({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getApplication,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getBasicDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getBasicDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getContactInfo({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getContactInfo,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getCurrencies({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getCurrencies,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getCurrencyById({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getCurrencyById,params:{id:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getFeatures({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getFeatures,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getIntegrationTokens({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getIntegrationTokens,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getLanguages({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getLanguages,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getOrderingStoreCookie({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getOrderingStoreCookie,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getOrderingStores({pageNo:e,pageSize:t,q:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.page_no=e,i.page_size=t,i.q=s;const c=await r.execute(this._conf,"get",a({url:this._urls.getOrderingStores,params:{}}),i,void 0,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}async getOwnerInfo({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getOwnerInfo,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getStoreDetailById({storeId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getStoreDetailById,params:{storeId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async removeOrderingStoreCookie({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"delete",a({url:this._urls.removeOrderingStoreCookie,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}}},507:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getAnnouncements:"/service/application/content/v1.0/announcements",getBlog:"/service/application/content/v1.0/blogs/{slug}",getBlogs:"/service/application/content/v1.0/blogs",getCustomFieldsByResourceId:"/service/application/content/v2.0/customfields/resource/{resource}/{resource_slug}",getCustomObjectBySlug:"/service/application/content/v2.0/customobjects/definition/{definition_slug}/entries/{slug}",getDataLoaders:"/service/application/content/v1.0/data-loader",getFaqBySlug:"/service/application/content/v1.0/faq/{slug}",getFaqCategories:"/service/application/content/v1.0/faq/categories",getFaqCategoryBySlug:"/service/application/content/v1.0/faq/category/{slug}",getFaqs:"/service/application/content/v1.0/faq",getFaqsByCategorySlug:"/service/application/content/v1.0/faq/category/{slug}/faqs",getLandingPage:"/service/application/content/v1.0/landing-page",getLegalInformation:"/service/application/content/v1.0/legal",getNavigations:"/service/application/content/v1.0/navigations",getPage:"/service/application/content/v2.0/pages/{slug}",getPages:"/service/application/content/v2.0/pages",getSEOConfiguration:"/service/application/content/v1.0/seo",getSEOMarkupSchemas:"/service/application/content/v1.0/seo/schema",getSlideshow:"/service/application/content/v1.0/slideshow/{slug}",getSlideshows:"/service/application/content/v1.0/slideshow",getSupportInformation:"/service/application/content/v1.0/support",getTags:"/service/application/content/v1.0/tags"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAnnouncements({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getAnnouncements,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getBlog({slug:e,rootId:t,preview:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.root_id=t,i.preview=s;const c=await r.execute(this._conf,"get",a({url:this._urls.getBlog,params:{slug:e}}),i,void 0,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}async getBlogs({pageNo:e,pageSize:t,tags:s,search:n,requestHeaders:o}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const c={};c.page_no=e,c.page_size=t,c.tags=s,c.search=n;const u=await r.execute(this._conf,"get",a({url:this._urls.getBlogs,params:{}}),c,void 0,{...o},{responseHeaders:i});let d=u;return i&&(d=u[0]),u}async getCustomFieldsByResourceId({resource:e,resourceSlug:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"get",a({url:this._urls.getCustomFieldsByResourceId,params:{resource:e,resourceSlug:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async getCustomObjectBySlug({definitionSlug:e,slug:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"get",a({url:this._urls.getCustomObjectBySlug,params:{definitionSlug:e,slug:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async getDataLoaders({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getDataLoaders,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getFaqBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getFaqBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getFaqCategories({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getFaqCategories,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getFaqCategoryBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getFaqCategoryBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getFaqs({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getFaqs,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getFaqsByCategorySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getFaqsByCategorySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getLandingPage({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getLandingPage,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getLegalInformation({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getLegalInformation,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getNavigations({pageNo:e,pageSize:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.page_no=e,o.page_size=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getNavigations,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getPage({slug:e,rootId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.root_id=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getPage,params:{slug:e}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getPages({pageNo:e,pageSize:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.page_no=e,o.page_size=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getPages,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getSEOConfiguration({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getSEOConfiguration,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getSEOMarkupSchemas({pageType:e,active:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.page_type=e,o.active=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getSEOMarkupSchemas,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getSlideshow({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getSlideshow,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getSlideshows({pageNo:e,pageSize:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.page_no=e,o.page_size=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getSlideshows,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getSupportInformation({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getSupportInformation,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getTags({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getTags,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}}},259:(e,t,s)=>{const r=s(534),a=s(205),{fdkAxios:n}=(s(121),s(128));class o{constructor(e){this._conf=e,this._relativeUrls={completeUpload:"/service/application/assets/v2.0/namespaces/{namespace}/upload/complete",signUrls:"/service/application/assets/v1.0/sign-urls",startUpload:"/service/application/assets/v2.0/namespaces/{namespace}/upload/start"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async completeUpload({namespace:e,body:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"post",a({url:this._urls.completeUpload,params:{namespace:e}}),{},t,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async signUrls({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.signUrls,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async startUpload({namespace:e,body:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"post",a({url:this._urls.startUpload,params:{namespace:e}}),{},t,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}}o.prototype.upload=function({data:e,file_name:t,content_type:s,namespace:r,size:a,tags:o}={}){return new Promise((async(i,c)=>{try{const u=await this.startUpload({namespace:r,body:{file_name:t,content_type:s,size:a,tags:o}});if(u.upload&&u.upload.url){let t={method:"PUT",url:u.upload.url,data:e,headers:{"Content-Type":s},withCredentials:!1};await n.request(t)}else c({message:"Failed to upload file"});delete u.tags,i(await this.completeUpload({namespace:r,body:u}))}catch(e){c(e)}}))},e.exports=o},43:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={customerCreditBalance:"/service/application/finance/v1.0/customer-credit-balance",lockUnlockCreditNote:"/service/application/finance/v1.0/lock-unlock-credit-note"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async customerCreditBalance({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.customerCreditBalance,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async lockUnlockCreditNote({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.lockUnlockCreditNote,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}}},133:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={createHistory:"/service/application/lead/v1.0/ticket/{id}/history",createTicket:"/service/application/lead/v1.0/ticket/",getCustomForm:"/service/application/lead/v1.0/form/{slug}",getTicket:"/service/application/lead/v1.0/ticket/{id}",submitCustomForm:"/service/application/lead/v1.0/form/{slug}/submit"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async createHistory({id:e,body:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"post",a({url:this._urls.createHistory,params:{id:e}}),{},t,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async createTicket({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.createTicket,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getCustomForm({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getCustomForm,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getTicket({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getTicket,params:{id:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async submitCustomForm({slug:e,body:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"post",a({url:this._urls.submitCustomForm,params:{slug:e}}),{},t,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}}},469:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getAllCountries:"/service/application/logistics/v1.0/country-list",getCountries:"/service/application/logistics/v2.0/countries",getCountry:"/service/application/logistics/v1.0/countries/{country_iso_code}",getCourierPartners:"/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/shipment/courier-partners",getDeliveryPromise:"/service/application/logistics/v1.0/delivery-promise",getLocalities:"/service/application/logistics/v1.0/localities/{locality_type}",getLocality:"/service/application/logistics/v1.0/localities/{locality_type}/{locality_value}",getLocations:"/service/application/logistics/v1.0/locations",getOptimalLocations:"/service/application/logistics/v1.0/reassign_stores",getPincodeCity:"/service/application/logistics/v1.0/pincode/{pincode}",getPincodeZones:"/service/application/logistics/v1.0/pincode/zones",getTatProduct:"/service/application/logistics/v1.0/",validateAddress:"/service/application/logistics/v1.0/country/{country_iso_code}/address/templates/{template_name}/validate"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAllCountries({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getAllCountries,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getCountries({onboarding:e,pageNo:t,pageSize:s,q:n,hierarchy:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.onboarding=e,u.page_no=t,u.page_size=s,u.q=n,u.hierarchy=o;const d=await r.execute(this._conf,"get",a({url:this._urls.getCountries,params:{}}),u,void 0,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}async getCountry({countryIsoCode:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getCountry,params:{countryIsoCode:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getCourierPartners({companyId:e,applicationId:t,body:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i=await r.execute(this._conf,"post",a({url:this._urls.getCourierPartners,params:{companyId:e,applicationId:t}}),{},s,{...n},{responseHeaders:o});let c=i;return o&&(c=i[0]),i}async getDeliveryPromise({pageNo:e,pageSize:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.page_no=e,o.page_size=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getDeliveryPromise,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getLocalities({localityType:e,country:t,state:s,city:n,pageNo:o,pageSize:i,q:c,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const l={};l.country=t,l.state=s,l.city=n,l.page_no=o,l.page_size=i,l.q=c;const p=await r.execute(this._conf,"get",a({url:this._urls.getLocalities,params:{localityType:e}}),l,void 0,{...u},{responseHeaders:d});let g=p;return d&&(g=p[0]),p}async getLocality({localityType:e,localityValue:t,country:s,state:n,city:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.country=s,u.state=n,u.city=o;const d=await r.execute(this._conf,"get",a({url:this._urls.getLocality,params:{localityType:e,localityValue:t}}),u,void 0,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}async getLocations({xApplicationId:e,xApplicationData:t,country:s,state:n,city:o,pincode:i,sector:c,pageNo:u,pageSize:d,requestHeaders:l}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const g={};g["x-application-id"]=e,g["x-application-data"]=t,g.country=s,g.state=n,g.city=o,g.pincode=i,g.sector=c,g.page_no=u,g.page_size=d;const h=await r.execute(this._conf,"get",a({url:this._urls.getLocations,params:{}}),g,void 0,{...l},{responseHeaders:p});let f=h;return p&&(f=h[0]),h}async getOptimalLocations({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getOptimalLocations,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getPincodeCity({pincode:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getPincodeCity,params:{pincode:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getPincodeZones({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getPincodeZones,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getTatProduct({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getTatProduct,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async validateAddress({countryIsoCode:e,templateName:t,body:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i=await r.execute(this._conf,"post",a({url:this._urls.validateAddress,params:{countryIsoCode:e,templateName:t}}),{},s,{...n},{responseHeaders:o});let c=i;return o&&(c=i[0]),i}}},611:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getCustomerDetailsByShipmentId:"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/customer-details",getInvoiceByShipmentId:"/service/application/order/v1.0/orders/shipments/{shipment_id}/invoice",getOrderById:"/service/application/order/v1.0/orders/{order_id}",getOrders:"/service/application/order/v1.0/orders",getPosOrderById:"/service/application/order/v1.0/orders/pos-order/{order_id}",getShipmentBagReasons:"/service/application/order/v1.0/orders/shipments/{shipment_id}/bags/{bag_id}/reasons",getShipmentById:"/service/application/order/v1.0/orders/shipments/{shipment_id}",getShipmentReasons:"/service/application/order/v1.0/orders/shipments/{shipment_id}/reasons",sendOtpToShipmentCustomer:"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/send/",trackShipment:"/service/application/order/v1.0/orders/shipments/{shipment_id}/track",updateShipmentStatus:"/service/application/order/v1.0/orders/shipments/{shipment_id}/status",verifyOtpShipmentCustomer:"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/verify/"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getCustomerDetailsByShipmentId({orderId:e,shipmentId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"get",a({url:this._urls.getCustomerDetailsByShipmentId,params:{orderId:e,shipmentId:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async getInvoiceByShipmentId({shipmentId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getInvoiceByShipmentId,params:{shipmentId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getOrderById({orderId:e,allowInactive:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.allow_inactive=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getOrderById,params:{orderId:e}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getOrders({status:e,pageNo:t,pageSize:s,fromDate:n,toDate:o,startDate:i,endDate:c,customMeta:u,allowInactive:d,requestHeaders:l}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const g={};g.status=e,g.page_no=t,g.page_size=s,g.from_date=n,g.to_date=o,g.start_date=i,g.end_date=c,g.custom_meta=u,g.allow_inactive=d;const h=await r.execute(this._conf,"get",a({url:this._urls.getOrders,params:{}}),g,void 0,{...l},{responseHeaders:p});let f=h;return p&&(f=h[0]),h}async getPosOrderById({orderId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getPosOrderById,params:{orderId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getShipmentBagReasons({shipmentId:e,bagId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"get",a({url:this._urls.getShipmentBagReasons,params:{shipmentId:e,bagId:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async getShipmentById({shipmentId:e,allowInactive:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.allow_inactive=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getShipmentById,params:{shipmentId:e}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getShipmentReasons({shipmentId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getShipmentReasons,params:{shipmentId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async sendOtpToShipmentCustomer({orderId:e,shipmentId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"post",a({url:this._urls.sendOtpToShipmentCustomer,params:{orderId:e,shipmentId:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async trackShipment({shipmentId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.trackShipment,params:{shipmentId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async updateShipmentStatus({shipmentId:e,body:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"put",a({url:this._urls.updateShipmentStatus,params:{shipmentId:e}}),{},t,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async verifyOtpShipmentCustomer({orderId:e,shipmentId:t,body:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i=await r.execute(this._conf,"post",a({url:this._urls.verifyOtpShipmentCustomer,params:{orderId:e,shipmentId:t}}),{},s,{...n},{responseHeaders:o});let c=i;return o&&(c=i[0]),i}}},603:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={addBeneficiaryDetails:"/service/application/payment/v1.0/refund/account",addRefundBankAccountUsingOTP:"/service/application/payment/v1.0/refund/account/otp",attachCardToCustomer:"/service/application/payment/v1.0/card/attach",cancelPaymentLink:"/service/application/payment/v1.0/cancel-payment-link/",cardDetails:"/service/application/payment/v1.0/cards/info/{card_info}",checkAndUpdatePaymentStatus:"/service/application/payment/v1.0/payment/confirm/polling",checkAndUpdatePaymentStatusPaymentLink:"/service/application/payment/v1.0/payment/confirm/polling/link/",checkCredit:"/service/application/payment/v1.0/check-credits/",createOrderHandlerPaymentLink:"/service/application/payment/v1.0/create-order/link/",createPaymentLink:"/service/application/payment/v1.0/create-payment-link/",createPaymentOrder:"/service/application/payment/v1.0/payment-orders/",customerCreditSummary:"/service/application/payment/v1.0/payment/credit-summary/",customerOnboard:"/service/application/payment/v1.0/credit-onboard/",deleteUserCard:"/service/application/payment/v1.0/card/remove",delinkWallet:"/service/application/payment/v1.0/payment/options/wallet/delink",enableOrDisableRefundTransferMode:"/service/application/payment/v1.0/refund/transfer-mode",getActiveCardAggregator:"/service/application/payment/v1.0/card/aggregator",getActiveRefundTransferModes:"/service/application/payment/v1.0/refund/transfer-mode",getActiveUserCards:"/service/application/payment/v1.0/cards",getAggregatorsConfig:"/service/application/payment/v1.0/config/aggregators/key",getEpaylaterBannerDetails:"/service/application/payment/v1.0/epaylater/banner",getOrderBeneficiariesDetail:"/service/application/payment/v1.0/refund/order/beneficiaries",getPaymentLink:"/service/application/payment/v1.0/create-payment-link/",getPaymentModeRoutes:"/service/application/payment/v1.0/payment/options",getPaymentModeRoutesPaymentLink:"/service/application/payment/v1.0/payment/options/link/",getPosPaymentModeRoutes:"/service/application/payment/v1.0/payment/options/pos",getRupifiBannerDetails:"/service/application/payment/v1.0/rupifi/banner",getUserBeneficiariesDetail:"/service/application/payment/v1.0/refund/user/beneficiary",initialisePayment:"/service/application/payment/v1.0/payment/request",initialisePaymentPaymentLink:"/service/application/payment/v1.0/payment/request/link/",linkWallet:"/service/application/payment/v1.0/payment/options/wallet/verify",outstandingOrderDetails:"/service/application/payment/v1.0/payment/outstanding-orders/",paidOrderDetails:"/service/application/payment/v1.0/payment/paid-orders/",pollingPaymentLink:"/service/application/payment/v1.0/polling-payment-link/",redirectToAggregator:"/service/application/payment/v1.0/payment/redirect-to-aggregator/",renderHTML:"/service/application/payment/v1.0/payment/html/render/",resendOrCancelPayment:"/service/application/payment/v1.0/payment/resend_or_cancel",resendPaymentLink:"/service/application/payment/v1.0/resend-payment-link/",updateDefaultBeneficiary:"/service/application/payment/v1.0/refund/beneficiary/default",validateVPA:"/service/application/payment/v1.0/validate-vpa",verifyAndChargePayment:"/service/application/payment/v1.0/payment/confirm/charge",verifyCustomerForPayment:"/service/application/payment/v1.0/payment/customer/validation",verifyIfscCode:"/service/application/payment/v1.0/ifsc-code/verify",verifyOtpAndAddBeneficiaryForBank:"/service/application/payment/v1.0/refund/verification/bank",verifyOtpAndAddBeneficiaryForWallet:"/service/application/payment/v1.0/refund/verification/wallet",walletLinkInitiate:"/service/application/payment/v1.0/payment/options/wallet/link"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async addBeneficiaryDetails({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.addBeneficiaryDetails,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async addRefundBankAccountUsingOTP({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.addRefundBankAccountUsingOTP,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async attachCardToCustomer({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.attachCardToCustomer,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async cancelPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.cancelPaymentLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async cardDetails({cardInfo:e,aggregator:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.aggregator=t;const i=await r.execute(this._conf,"get",a({url:this._urls.cardDetails,params:{cardInfo:e}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async checkAndUpdatePaymentStatus({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.checkAndUpdatePaymentStatus,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async checkAndUpdatePaymentStatusPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.checkAndUpdatePaymentStatusPaymentLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async checkCredit({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.aggregator=e;const o=await r.execute(this._conf,"get",a({url:this._urls.checkCredit,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async createOrderHandlerPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.createOrderHandlerPaymentLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async createPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.createPaymentLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async createPaymentOrder({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.createPaymentOrder,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async customerCreditSummary({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.aggregator=e;const o=await r.execute(this._conf,"get",a({url:this._urls.customerCreditSummary,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async customerOnboard({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.customerOnboard,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async deleteUserCard({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.deleteUserCard,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async delinkWallet({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.delinkWallet,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async enableOrDisableRefundTransferMode({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"put",a({url:this._urls.enableOrDisableRefundTransferMode,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getActiveCardAggregator({refresh:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.refresh=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getActiveCardAggregator,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getActiveRefundTransferModes({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getActiveRefundTransferModes,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getActiveUserCards({forceRefresh:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.force_refresh=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getActiveUserCards,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getAggregatorsConfig({xApiToken:e,refresh:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.refresh=t;const i={};i["x-api-token"]=e;const c=await r.execute(this._conf,"get",a({url:this._urls.getAggregatorsConfig,params:{}}),o,void 0,{...i,...s},{responseHeaders:n});let u=c;return n&&(u=c[0]),c}async getEpaylaterBannerDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getEpaylaterBannerDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getOrderBeneficiariesDetail({orderId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.order_id=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getOrderBeneficiariesDetail,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getPaymentLink({paymentLinkId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.payment_link_id=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getPaymentLink,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getPaymentModeRoutes({amount:e,cartId:t,checkoutMode:s,refresh:n,orderId:o,cardReference:i,userDetails:c,displaySplit:u,advancePayment:d,shipmentId:l,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const h={};h.amount=e,h.cart_id=t,h.checkout_mode=s,h.refresh=n,h.order_id=o,h.card_reference=i,h.user_details=c,h.display_split=u,h.advance_payment=d,h.shipment_id=l;const f=await r.execute(this._conf,"get",a({url:this._urls.getPaymentModeRoutes,params:{}}),h,void 0,{...p},{responseHeaders:g});let m=f;return g&&(m=f[0]),f}async getPaymentModeRoutesPaymentLink({paymentLinkId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.payment_link_id=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getPaymentModeRoutesPaymentLink,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getPosPaymentModeRoutes({amount:e,cartId:t,pincode:s,orderType:n,checkoutMode:o,refresh:i,cardReference:c,userDetails:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:l}={responseHeaders:!1}){const p={};p.amount=e,p.cart_id=t,p.pincode=s,p.checkout_mode=o,p.refresh=i,p.card_reference=c,p.order_type=n,p.user_details=u;const g=await r.execute(this._conf,"get",a({url:this._urls.getPosPaymentModeRoutes,params:{}}),p,void 0,{...d},{responseHeaders:l});let h=g;return l&&(h=g[0]),g}async getRupifiBannerDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getRupifiBannerDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getUserBeneficiariesDetail({orderId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.order_id=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getUserBeneficiariesDetail,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async initialisePayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.initialisePayment,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async initialisePaymentPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.initialisePaymentPaymentLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async linkWallet({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.linkWallet,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async outstandingOrderDetails({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.aggregator=e;const o=await r.execute(this._conf,"get",a({url:this._urls.outstandingOrderDetails,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async paidOrderDetails({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.aggregator=e;const o=await r.execute(this._conf,"get",a({url:this._urls.paidOrderDetails,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async pollingPaymentLink({paymentLinkId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.payment_link_id=e;const o=await r.execute(this._conf,"get",a({url:this._urls.pollingPaymentLink,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async redirectToAggregator({aggregator:e,source:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.source=t,o.aggregator=e;const i=await r.execute(this._conf,"get",a({url:this._urls.redirectToAggregator,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async renderHTML({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.renderHTML,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async resendOrCancelPayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.resendOrCancelPayment,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async resendPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.resendPaymentLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async updateDefaultBeneficiary({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.updateDefaultBeneficiary,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async validateVPA({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.validateVPA,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async verifyAndChargePayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.verifyAndChargePayment,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async verifyCustomerForPayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.verifyCustomerForPayment,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async verifyIfscCode({ifscCode:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.ifsc_code=e;const o=await r.execute(this._conf,"get",a({url:this._urls.verifyIfscCode,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async verifyOtpAndAddBeneficiaryForBank({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.verifyOtpAndAddBeneficiaryForBank,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async verifyOtpAndAddBeneficiaryForWallet({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.verifyOtpAndAddBeneficiaryForWallet,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async walletLinkInitiate({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.walletLinkInitiate,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}}},715:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={catalogueOrder:"/service/application/rewards/v1.0/catalogue/offer/order/",getOfferByName:"/service/application/rewards/v1.0/offers/{name}/",getOrderDiscount:"/service/application/rewards/v1.0/user/offer/order-discount/",getUserPoints:"/service/application/rewards/v1.0/user/points/",getUserPointsHistory:"/service/application/rewards/v1.0/user/points/history/",getUserReferralDetails:"/service/application/rewards/v1.0/user/referral/",redeemReferralCode:"/service/application/rewards/v1.0/user/referral/redeem/"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async catalogueOrder({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.catalogueOrder,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getOfferByName({name:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getOfferByName,params:{name:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getOrderDiscount({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getOrderDiscount,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getUserPoints({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getUserPoints,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getUserPointsHistory({pageId:e,pageSize:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.page_id=e,o.page_size=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getUserPointsHistory,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getUserReferralDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getUserReferralDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async redeemReferralCode({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.redeemReferralCode,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}}},651:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={createShortLink:"/service/application/share/v1.0/links/short-link/",getApplicationQRCode:"/service/application/share/v1.0/qr/",getCollectionQRCodeBySlug:"/service/application/share/v1.0/qr/collection/{slug}/",getOriginalShortLinkByHash:"/service/application/share/v1.0/links/short-link/{hash}/original/",getProductQRCodeBySlug:"/service/application/share/v1.0/qr/products/{slug}/",getShortLinkByHash:"/service/application/share/v1.0/links/short-link/{hash}/",getUrlQRCode:"/service/application/share/v1.0/qr/url/"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async createShortLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.createShortLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getApplicationQRCode({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"post",a({url:this._urls.getApplicationQRCode,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getCollectionQRCodeBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getCollectionQRCodeBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getOriginalShortLinkByHash({hash:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getOriginalShortLinkByHash,params:{hash:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getProductQRCodeBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getProductQRCodeBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getShortLinkByHash({hash:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getShortLinkByHash,params:{hash:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getUrlQRCode({url:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.url=e;const o=await r.execute(this._conf,"post",a({url:this._urls.getUrlQRCode,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}}},803:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getAllPages:"/service/application/theme/v1.0/{theme_id}/page",getAppliedTheme:"/service/application/theme/v2.0/applied-theme",getPage:"/service/application/theme/v1.0/{theme_id}/{page_value}",getThemeForPreview:"/service/application/theme/v2.0/{theme_id}/preview"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAllPages({themeId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getAllPages,params:{themeId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getAppliedTheme({filters:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.filters=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getAppliedTheme,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getPage({themeId:e,pageValue:t,filters:s,sectionPreviewHash:n,company:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.filters=s,u.section_preview_hash=n,u.company=o;const d=await r.execute(this._conf,"get",a({url:this._urls.getPage,params:{themeId:e,pageValue:t}}),u,void 0,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}async getThemeForPreview({themeId:e,filters:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.filters=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getThemeForPreview,params:{themeId:e}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}}},363:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={addEmail:"/service/application/user/profile/v1.0/email",addMobileNumber:"/service/application/user/profile/v1.0/mobile",deleteEmail:"/service/application/user/profile/v1.0/email",deleteMobileNumber:"/service/application/user/profile/v1.0/mobile",deleteUser:"/service/application/user/authentication/v1.0/delete",forgotPassword:"/service/application/user/authentication/v1.0/login/password/reset/forgot",getListOfActiveSessions:"/service/application/user/authentication/v1.0/sessions",getLoggedInUser:"/service/application/user/authentication/v1.0/session",getPlatformConfig:"/service/application/user/platform/v1.0/config",getUserAttributes:"/service/application/user/profile/v1.0/user-attributes",hasPassword:"/service/application/user/authentication/v1.0/has-password",loginWithAppleIOS:"/service/application/user/authentication/v1.0/login/apple-ios",loginWithEmailAndPassword:"/service/application/user/authentication/v1.0/login/password",loginWithFacebook:"/service/application/user/authentication/v1.0/login/facebook-token",loginWithGoogle:"/service/application/user/authentication/v1.0/login/google-token",loginWithGoogleAndroid:"/service/application/user/authentication/v1.0/login/google-android",loginWithGoogleIOS:"/service/application/user/authentication/v1.0/login/google-ios",loginWithOTP:"/service/application/user/authentication/v1.0/login/otp",loginWithToken:"/service/application/user/authentication/v1.0/login/token",logout:"/service/application/user/authentication/v1.0/logout",registerWithForm:"/service/application/user/authentication/v1.0/register/form",resetForgotPassword:"/service/application/user/authentication/v1.0/login/password/forgot",sendForgotOTPOnEmail:"/service/application/user/authentication/v1.0/otp/forgot/email/send",sendForgotOTPOnMobile:"/service/application/user/authentication/v1.0/otp/forgot/mobile/send",sendOTPOnEmail:"/service/application/user/authentication/v1.0/otp/email/send",sendOTPOnMobile:"/service/application/user/authentication/v1.0/otp/mobile/send",sendResetPasswordEmail:"/service/application/user/authentication/v1.0/login/password/reset",sendResetPasswordMobile:"/service/application/user/authentication/v1.0/login/password/mobile/reset",sendResetToken:"/service/application/user/authentication/v1.0/login/password/reset/token",sendVerificationLinkToEmail:"/service/application/user/profile/v1.0/email/link/send",sendVerificationLinkToMobile:"/service/application/user/profile/v1.0/mobile/link/send",setEmailAsPrimary:"/service/application/user/profile/v1.0/email/primary",setMobileNumberAsPrimary:"/service/application/user/profile/v1.0/mobile/primary",updatePassword:"/service/application/user/authentication/v1.0/password",updateProfile:"/service/application/user/profile/v1.0/detail",updateUserAttributes:"/service/application/user/profile/v1.0/user-attributes",userExists:"/service/application/user/authentication/v1.0/user-exists",verifyEmail:"/service/application/user/authentication/v1.0/verify/email",verifyEmailForgotOTP:"/service/application/user/authentication/v1.0/otp/forgot/email/verify",verifyEmailOTP:"/service/application/user/authentication/v1.0/otp/email/verify",verifyMobile:"/service/application/user/authentication/v1.0/verify/mobile",verifyMobileForgotOTP:"/service/application/user/authentication/v1.0/otp/forgot/mobile/verify",verifyMobileOTP:"/service/application/user/authentication/v1.0/otp/mobile/verify"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async addEmail({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"put",a({url:this._urls.addEmail,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async addMobileNumber({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"put",a({url:this._urls.addMobileNumber,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async deleteEmail({active:e,primary:t,verified:s,email:n,platform:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.platform=o,u.active=e,u.primary=t,u.verified=s,u.email=n;const d=await r.execute(this._conf,"delete",a({url:this._urls.deleteEmail,params:{}}),u,void 0,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}async deleteMobileNumber({active:e,primary:t,verified:s,countryCode:n,phone:o,platform:i,requestHeaders:c}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const d={};d.platform=i,d.active=e,d.primary=t,d.verified=s,d.country_code=n,d.phone=o;const l=await r.execute(this._conf,"delete",a({url:this._urls.deleteMobileNumber,params:{}}),d,void 0,{...c},{responseHeaders:u});let p=l;return u&&(p=l[0]),l}async deleteUser({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.deleteUser,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async forgotPassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.forgotPassword,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getListOfActiveSessions({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getListOfActiveSessions,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getLoggedInUser({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getLoggedInUser,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getPlatformConfig({name:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.name=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getPlatformConfig,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getUserAttributes({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.slug=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getUserAttributes,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async hasPassword({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.hasPassword,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async loginWithAppleIOS({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.loginWithAppleIOS,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async loginWithEmailAndPassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.loginWithEmailAndPassword,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async loginWithFacebook({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.loginWithFacebook,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async loginWithGoogle({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.loginWithGoogle,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async loginWithGoogleAndroid({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.loginWithGoogleAndroid,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async loginWithGoogleIOS({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.loginWithGoogleIOS,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async loginWithOTP({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.loginWithOTP,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async loginWithToken({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.loginWithToken,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async logout({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.logout,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async registerWithForm({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.registerWithForm,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async resetForgotPassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.resetForgotPassword,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async sendForgotOTPOnEmail({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendForgotOTPOnEmail,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async sendForgotOTPOnMobile({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendForgotOTPOnMobile,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async sendOTPOnEmail({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendOTPOnEmail,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async sendOTPOnMobile({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendOTPOnMobile,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async sendResetPasswordEmail({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendResetPasswordEmail,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async sendResetPasswordMobile({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendResetPasswordMobile,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async sendResetToken({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.sendResetToken,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async sendVerificationLinkToEmail({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendVerificationLinkToEmail,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async sendVerificationLinkToMobile({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendVerificationLinkToMobile,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async setEmailAsPrimary({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.setEmailAsPrimary,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async setMobileNumberAsPrimary({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.setMobileNumberAsPrimary,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async updatePassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.updatePassword,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async updateProfile({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.updateProfile,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async updateUserAttributes({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"patch",a({url:this._urls.updateUserAttributes,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async userExists({q:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.q=e;const o=await r.execute(this._conf,"get",a({url:this._urls.userExists,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async verifyEmail({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.verifyEmail,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async verifyEmailForgotOTP({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.verifyEmailForgotOTP,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async verifyEmailOTP({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.verifyEmailOTP,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async verifyMobile({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.verifyMobile,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async verifyMobileForgotOTP({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.verifyMobileForgotOTP,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async verifyMobileOTP({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.verifyMobileOTP,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}}},567:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={saveClickEvent:"/service/application/webhook/v1.0/click-analytics/events"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async saveClickEvent({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.saveClickEvent,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}}},205:(e,t,s)=>{const r=s(729);e.exports=({url:e,params:t})=>e.split("/").map((e=>("{"===e[0]&&"}"===e[e.length-1]&&(e=t[r(e.slice(1,e.length-1))]),e))).join("/")},775:(e,t,s)=>{e.exports={ApplicationConfig:s(163),ApplicationClient:s(418)}},128:(e,t,s)=>{const{isAbsoluteURL:r,combineURLs:a}=s(879),n=s(425).default,o=s(663),{sign:i}=s(331),{FDKServerResponseError:c}=s(235),{log:u,Logger:d,getLoggerLevel:l}=s(572),p=s(790),{version:g}=s(330),h=n.create({withCredentials:!0,paramsSerializer:e=>o.stringify(e)});h.interceptors.request.use((function(e){try{if(l()<=u.levels.DEBUG){const t=p(e);u.debug(t)}}catch(e){d({level:"ERROR",message:`Error Generating Curl: ${e}`})}finally{return e}}),(function(e){d({level:"ERROR",message:e.data||e.message,stack:e.data.stack||e.stack})})),h.interceptors.request.use((e=>{if(!e.url)throw new Error("No URL present in request config, unable to sign request");let t=e.url;e.baseURL&&!r(e.url)&&(t=a(e.baseURL,e.url));const{host:s,pathname:n,search:c}=new URL(t),{data:u,headers:d,method:l,params:p}=e;d["x-fp-sdk-version"]=g;let h=o.parse(c);h={...h,...p};let f,m="";if(h&&Object.keys(h).length&&""!==o.stringify(h).trim()&&(m=`?${o.stringify(h)}`),"get"!=l){const t=function(e){const{transformRequest:t}=e;if(t){if("function"==typeof t)return t;if(t.length)return t[0]}throw new Error("Could not get default transformRequest function from Axios defaults")}(e);f=t(u,d)}const{common:y,delete:H,get:v,head:_,post:w,put:b,patch:q,...x}=d,S={method:l&&l.toUpperCase(),host:s,path:n+c+m,body:f,headers:x},C=i(S);return e.headers["x-fp-date"]=C["x-fp-date"],e.headers["x-fp-signature"]=C["x-fp-signature"],e})),h.interceptors.response.use((function(e){return"head"==e.config.method?e.headers:(d({level:"DEBUG",type:"RESPONSE",message:e.data,url:e.config.url}),e.config.responseHeaders?[e.data,e.headers]:e.data)}),(function(e){if(e.response){const t=e.response.data;throw d({level:"ERROR",message:t&&t.message?t.message:e.message,stack:t&&t.stack?t.stack:e.stack,request:{method:e.config&&e.config.url?e.config.url:void 0,url:e.config&&e.config.method?e.config.method:void 0,headers:e.config&&e.config.headers?e.config.headers:void 0}}),new c(t&&t.message?t.message:e.message,"",e.response.statusText,e.response.status,t)}throw e.request?(d({level:"ERROR",message:e.message,stack:e.stack,request:{method:e.config&&e.config.url?e.config.url:void 0,url:e.config&&e.config.method?e.config.method:void 0,headers:e.config&&e.config.headers?e.config.headers:void 0}}),new c(e.message,e.stack,e.code,e.code)):(d({level:"ERROR",message:e.message}),new c(e.message,e.stack))})),e.exports={fdkAxios:h}},235:e=>{class t extends Error{constructor(e,t,s=null,r=null,a=null){super(e),this.name="FDKServerResponseError",this.stackTrace=t,this.status=s,this.code=r,this.details=a}}class s extends Error{constructor(e){super(e.message),this.name="FDKClientValidationError",this.details=e.details}}class r extends Error{constructor(e){super(e.message),this.name="FDKResponseValidationError",this.details=JSON.parse(JSON.stringify(e.details))}}class a extends Error{constructor(e){super(e),this.name="FDKInvalidCredentialError"}}class n extends Error{constructor(e){super(e),this.name="FDKTokenIssueError"}}class o extends Error{constructor(e){super(e),this.name="FDKOAuthCodeError"}}class i extends Error{constructor(e){super(e),this.name="FDKException"}}e.exports={FDKServerResponseError:t,FDKClientValidationError:s,FDKResponseValidationError:r,FDKInvalidCredentialError:a,FDKTokenIssueError:n,FDKOAuthCodeError:o,FDKException:i}},572:(e,t,s)=>{const r=s(65),a=s(330).version;function n(){return(new Date).toString()}e.exports={log:r,Logger:function(e){const{level:t,message:s,...o}=e;"TRACE"===t&&r.trace(JSON.stringify({level:t,detail:s,...o,time:n(),version:a})),"DEBUG"===t&&r.debug(JSON.stringify({level:t,detail:s,...o,time:n(),version:a})),"INFO"===t&&r.info(JSON.stringify({level:t,detail:s,...o,time:n(),version:a})),"WARN"===t&&r.warn(JSON.stringify({level:t,detail:s,...o,time:n(),version:a})),"ERROR"===t&&r.error(JSON.stringify({level:t,detail:s,...o,time:n(),version:a}))},setLoggerLevel:function(e){r.setLevel(e)},getLoggerLevel:function(){return r.getLevel()}}},121:e=>{e.exports=class{constructor(e){this.pageNo=e,this.callback=void 0}setCallback(e){this.callback=e}hasNext(){return this.isNext}setPaginator({hasNext:e,nextId:t,pageNo:s=1}){this.isNext=e,this.nextId=t,this.pageNo=s}next(){return this.callback()}}},790:(e,t,s)=>{const r=s(663),{combineURLs:a,isAbsoluteURL:n}=s(879);let o;e.exports=function(e){return o=e,`curl ${`--request ${o.method.toUpperCase()}`.trim()} "${function(){let e=o.url;o.baseURL&&!n(e)&&(e=a(o.baseURL,e).trim());let{search:t}=new URL(e);queryParamObject={...r.parse(t),...o.params};let s="";return queryParamObject&&Object.keys(queryParamObject).length&&""!==r.stringify(queryParamObject).trim()&&(s=`?${r.stringify(queryParamObject).trim()}`),`${e}${t.trim()}${s}`}()}" ${function(){let e=["common","delete","get","head","post","put","patch"],t={};o.headers[o.method]&&(t=o.headers[o.method]),t=Object.keys(t).reduce(((e,s)=>(e[s.toLowerCase()]=t[s],e)),{});for(let s in o.headers)e.includes(s)||(o.headers[s]instanceof Object?t[s.toLowerCase()]=JSON.stringify(o.headers[s]):t[s.toLowerCase()]=o.headers[s]);let s="";for(let e in t)s+=` --header '${e}: ${t[e]}'`;return s.trim()}()} ${"GET"!==o.method.toUpperCase()&&null!==o.data&&""!==o.data&&o.data?`--data-raw '${JSON.stringify(o.data)}'`.trim():""}`.trim()}},879:(e,t,s)=>{const{FDKException:r}=s(235),a=":::",n=e=>{let t="";for(const s in e)if("object"!=typeof e[s]&&e[s]){const r=encodeURIComponent(e[s]);t+=`${s}=${r}&`}else Array.isArray(e[s])?e[s].forEach((e=>{const r=encodeURIComponent(e);t+=`${s}=${r}&`})):"object"==typeof e[s]&&e[s]&&(t+=n(e[s]));return t?t.slice(0,-1):t},o=(e="",t="/")=>{for(;e.charAt(0)==t;)e=e.substring(1);for(;e.charAt(e.length-1)==t;)e=e.substring(0,e.length-1);return e},i=()=>"undefined"!=typeof window&&void 0!==window.document,c=()=>"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;e.exports={transformRequestOptions:n,getParamsFromItem:e=>{let t="";for(let s in e)if(Array.isArray(e[s])){for(let r=0;r{let t=e.split("?");if(t.length>1){const e=new URLSearchParams(t[1]);let s={};for(let t of e){let e=t[0],r=t[1];s[e]=s[e]?[...s[e],r]:[r]}return s}return{}},trimChar:o,generateUrlWithParams:(e={},t)=>{if(!e||!e.link)return"";if(!t)return`/${o(e.link.split(":")[0])}`;const s={};for(let e in t)if(Array.isArray(t[e])){let r="";for(let s=0;s{let s={value:"",params:{}};t=o(t);for(let r=0;r{if(c())return Buffer.from(e,"utf-8").toString("base64");if(i())return window.btoa(e);throw new r("Base64 conversion error: Unsupported environment")},isBrowser:i,isNode:c,NAV_TYPE:{PAGE:"page",POPUP:"popup"},combineURLs:function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e},isAbsoluteURL:function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}}},425:(e,t,s)=>{"use strict";function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:a}=Object.prototype,{getPrototypeOf:n}=Object,o=(i=Object.create(null),e=>{const t=a.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())});var i;const c=e=>(e=e.toLowerCase(),t=>o(t)===e),u=e=>t=>typeof t===e,{isArray:d}=Array,l=u("undefined"),p=c("ArrayBuffer"),g=u("string"),h=u("function"),f=u("number"),m=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==o(e))return!1;const t=n(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},H=c("Date"),v=c("File"),_=c("Blob"),w=c("FileList"),b=c("URLSearchParams"),[q,x,S,C]=["ReadableStream","Request","Response","Headers"].map(c);function O(e,t,{allOwnKeys:s=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),d(e))for(r=0,a=e.length;r0;)if(r=s[a],t===r.toLowerCase())return r;return null}const k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:s.g,R=e=>!l(e)&&e!==k,E=(I="undefined"!=typeof Uint8Array&&n(Uint8Array),e=>I&&e instanceof I);var I;const A=c("HTMLFormElement"),T=(({hasOwnProperty:e})=>(t,s)=>e.call(t,s))(Object.prototype),B=c("RegExp"),L=(e,t)=>{const s=Object.getOwnPropertyDescriptors(e),r={};O(s,((s,a)=>{let n;!1!==(n=t(s,a,e))&&(r[a]=n||s)})),Object.defineProperties(e,r)},U="abcdefghijklmnopqrstuvwxyz",N="0123456789",F={DIGIT:N,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+N},D=c("AsyncFunction"),j=(z="function"==typeof setImmediate,M=h(k.postMessage),z?setImmediate:M?($=`axios@${Math.random()}`,W=[],k.addEventListener("message",(({source:e,data:t})=>{e===k&&t===$&&W.length&&W.shift()()}),!1),e=>{W.push(e),k.postMessage($,"*")}):e=>setTimeout(e));var z,M,$,W;const V="undefined"!=typeof queueMicrotask?queueMicrotask.bind(k):"undefined"!=typeof process&&process.nextTick||j;var K={isArray:d,isArrayBuffer:p,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||h(e.append)&&("formdata"===(t=o(e))||"object"===t&&h(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&p(e.buffer),t},isString:g,isNumber:f,isBoolean:e=>!0===e||!1===e,isObject:m,isPlainObject:y,isReadableStream:q,isRequest:x,isResponse:S,isHeaders:C,isUndefined:l,isDate:H,isFile:v,isBlob:_,isRegExp:B,isFunction:h,isStream:e=>m(e)&&h(e.pipe),isURLSearchParams:b,isTypedArray:E,isFileList:w,forEach:O,merge:function e(){const{caseless:t}=R(this)&&this||{},s={},r=(r,a)=>{const n=t&&P(s,a)||a;y(s[n])&&y(r)?s[n]=e(s[n],r):y(r)?s[n]=e({},r):d(r)?s[n]=r.slice():s[n]=r};for(let e=0,t=arguments.length;e(O(t,((t,a)=>{s&&h(t)?e[a]=r(t,s):e[a]=t}),{allOwnKeys:a}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,s,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),s&&Object.assign(e.prototype,s)},toFlatObject:(e,t,s,r)=>{let a,o,i;const c={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)i=a[o],r&&!r(i,e,t)||c[i]||(t[i]=e[i],c[i]=!0);e=!1!==s&&n(e)}while(e&&(!s||s(e,t))&&e!==Object.prototype);return t},kindOf:o,kindOfTest:c,endsWith:(e,t,s)=>{e=String(e),(void 0===s||s>e.length)&&(s=e.length),s-=t.length;const r=e.indexOf(t,s);return-1!==r&&r===s},toArray:e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!f(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=e[t];return s},forEachEntry:(e,t)=>{const s=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=s.next())&&!r.done;){const s=r.value;t.call(e,s[0],s[1])}},matchAll:(e,t)=>{let s;const r=[];for(;null!==(s=e.exec(t));)r.push(s);return r},isHTMLForm:A,hasOwnProperty:T,hasOwnProp:T,reduceDescriptors:L,freezeMethods:e=>{L(e,((t,s)=>{if(h(e)&&-1!==["arguments","caller","callee"].indexOf(s))return!1;const r=e[s];h(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")}))}))},toObjectSet:(e,t)=>{const s={},r=e=>{e.forEach((e=>{s[e]=!0}))};return d(e)?r(e):r(String(e).split(t)),s},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,s){return t.toUpperCase()+s})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:P,global:k,isContextDefined:R,ALPHABET:F,generateString:(e=16,t=F.ALPHA_DIGIT)=>{let s="";const{length:r}=t;for(;e--;)s+=t[Math.random()*r|0];return s},isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),s=(e,r)=>{if(m(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const a=d(e)?[]:{};return O(e,((e,t)=>{const n=s(e,r+1);!l(n)&&(a[t]=n)})),t[r]=void 0,a}}return e};return s(e,0)},isAsyncFn:D,isThenable:e=>e&&(m(e)||h(e))&&h(e.then)&&h(e.catch),setImmediate:j,asap:V};function J(e,t,s,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),s&&(this.config=s),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}K.inherits(J,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const G=J.prototype,Q={};function X(e){return K.isPlainObject(e)||K.isArray(e)}function Z(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function Y(e,t,s){return e?e.concat(t).map((function(e,t){return e=Z(e),!s&&t?"["+e+"]":e})).join(s?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Q[e]={value:e}})),Object.defineProperties(J,Q),Object.defineProperty(G,"isAxiosError",{value:!0}),J.from=(e,t,s,r,a,n)=>{const o=Object.create(G);return K.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),J.call(o,e.message,t,s,r,a),o.cause=e,o.name=e.name,n&&Object.assign(o,n),o};const ee=K.toFlatObject(K,{},null,(function(e){return/^is[A-Z]/.test(e)}));function te(e,t,s){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(s=K.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!K.isUndefined(t[e])}))).metaTokens,a=s.visitor||u,n=s.dots,o=s.indexes,i=(s.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(a))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(!i&&K.isBlob(e))throw new J("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,s,a){let i=e;if(e&&!a&&"object"==typeof e)if(K.endsWith(s,"{}"))s=r?s:s.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&function(e){return K.isArray(e)&&!e.some(X)}(e)||(K.isFileList(e)||K.endsWith(s,"[]"))&&(i=K.toArray(e)))return s=Z(s),i.forEach((function(e,r){!K.isUndefined(e)&&null!==e&&t.append(!0===o?Y([s],r,n):null===o?s:s+"[]",c(e))})),!1;return!!X(e)||(t.append(Y(a,s,n),c(e)),!1)}const d=[],l=Object.assign(ee,{defaultVisitor:u,convertValue:c,isVisitable:X});if(!K.isObject(e))throw new TypeError("data must be an object");return function e(s,r){if(!K.isUndefined(s)){if(-1!==d.indexOf(s))throw Error("Circular reference detected in "+r.join("."));d.push(s),K.forEach(s,(function(s,n){!0===(!(K.isUndefined(s)||null===s)&&a.call(t,s,K.isString(n)?n.trim():n,r,l))&&e(s,r?r.concat(n):[n])})),d.pop()}}(e),t}function se(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function re(e,t){this._pairs=[],e&&te(e,this,t)}const ae=re.prototype;function ne(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function oe(e,t,s){if(!t)return e;const r=s&&s.encode||ne,a=s&&s.serialize;let n;if(n=a?a(t,s):K.isURLSearchParams(t)?t.toString():new re(t,s).toString(r),n){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}ae.append=function(e,t){this._pairs.push([e,t])},ae.toString=function(e){const t=e?function(t){return e.call(this,t,se)}:se;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var ie=class{constructor(){this.handlers=[]}use(e,t,s){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!s&&s.synchronous,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){K.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ue={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:re,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const de="undefined"!=typeof window&&"undefined"!=typeof document,le="object"==typeof navigator&&navigator||void 0,pe=de&&(!le||["ReactNative","NativeScript","NS"].indexOf(le.product)<0),ge="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,he=de&&window.location.href||"http://localhost";var fe={...Object.freeze({__proto__:null,hasBrowserEnv:de,hasStandardBrowserWebWorkerEnv:ge,hasStandardBrowserEnv:pe,navigator:le,origin:he}),...ue};function me(e){function t(e,s,r,a){let n=e[a++];if("__proto__"===n)return!0;const o=Number.isFinite(+n),i=a>=e.length;return n=!n&&K.isArray(r)?r.length:n,i?(K.hasOwnProp(r,n)?r[n]=[r[n],s]:r[n]=s,!o):(r[n]&&K.isObject(r[n])||(r[n]=[]),t(e,s,r[n],a)&&K.isArray(r[n])&&(r[n]=function(e){const t={},s=Object.keys(e);let r;const a=s.length;let n;for(r=0;r{t(function(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,s,0)})),s}return null}const ye={transitional:ce,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const s=t.getContentType()||"",r=s.indexOf("application/json")>-1,a=K.isObject(e);if(a&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return r?JSON.stringify(me(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let n;if(a){if(s.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new fe.classes.URLSearchParams,Object.assign({visitor:function(e,t,s,r){return fe.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=K.isFileList(e))||s.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(n?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e){if(K.isString(e))try{return(0,JSON.parse)(e),K.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ye.transitional,s=t&&t.forcedJSONParsing,r="json"===this.responseType;if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.isString(e)&&(s&&!this.responseType||r)){const s=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw J.from(e,J.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],(e=>{ye.headers[e]={}}));var He=ye;const ve=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_e=Symbol("internals");function we(e){return e&&String(e).trim().toLowerCase()}function be(e){return!1===e||null==e?e:K.isArray(e)?e.map(be):String(e)}function qe(e,t,s,r,a){return K.isFunction(r)?r.call(this,t,s):(a&&(t=s),K.isString(t)?K.isString(r)?-1!==t.indexOf(r):K.isRegExp(r)?r.test(t):void 0:void 0)}class xe{constructor(e){e&&this.set(e)}set(e,t,s){const r=this;function a(e,t,s){const a=we(t);if(!a)throw new Error("header name must be a non-empty string");const n=K.findKey(r,a);(!n||void 0===r[n]||!0===s||void 0===s&&!1!==r[n])&&(r[n||t]=be(e))}const n=(e,t)=>K.forEach(e,((e,s)=>a(e,s,t)));if(K.isPlainObject(e)||e instanceof this.constructor)n(e,t);else if(K.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))n((e=>{const t={};let s,r,a;return e&&e.split("\n").forEach((function(e){a=e.indexOf(":"),s=e.substring(0,a).trim().toLowerCase(),r=e.substring(a+1).trim(),!s||t[s]&&ve[s]||("set-cookie"===s?t[s]?t[s].push(r):t[s]=[r]:t[s]=t[s]?t[s]+", "+r:r)})),t})(e),t);else if(K.isHeaders(e))for(const[t,r]of e.entries())a(r,t,s);else null!=e&&a(t,e,s);return this}get(e,t){if(e=we(e)){const s=K.findKey(this,e);if(s){const e=this[s];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=s.exec(e);)t[r[1]]=r[2];return t}(e);if(K.isFunction(t))return t.call(this,e,s);if(K.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=we(e)){const s=K.findKey(this,e);return!(!s||void 0===this[s]||t&&!qe(0,this[s],s,t))}return!1}delete(e,t){const s=this;let r=!1;function a(e){if(e=we(e)){const a=K.findKey(s,e);!a||t&&!qe(0,s[a],a,t)||(delete s[a],r=!0)}}return K.isArray(e)?e.forEach(a):a(e),r}clear(e){const t=Object.keys(this);let s=t.length,r=!1;for(;s--;){const a=t[s];e&&!qe(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,s={};return K.forEach(this,((r,a)=>{const n=K.findKey(s,a);if(n)return t[n]=be(r),void delete t[a];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,s)=>t.toUpperCase()+s))}(a):String(a).trim();o!==a&&delete t[a],t[o]=be(r),s[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return K.forEach(this,((s,r)=>{null!=s&&!1!==s&&(t[r]=e&&K.isArray(s)?s.join(", "):s)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const s=new this(e);return t.forEach((e=>s.set(e))),s}static accessor(e){const t=(this[_e]=this[_e]={accessors:{}}).accessors,s=this.prototype;function r(e){const r=we(e);t[r]||(function(e,t){const s=K.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+s,{value:function(e,s,a){return this[r].call(this,t,e,s,a)},configurable:!0})}))}(s,e),t[r]=!0)}return K.isArray(e)?e.forEach(r):r(e),this}}xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(xe.prototype,(({value:e},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[s]=e}}})),K.freezeMethods(xe);var Se=xe;function Ce(e,t){const s=this||He,r=t||s,a=Se.from(r.headers);let n=r.data;return K.forEach(e,(function(e){n=e.call(s,n,a.normalize(),t?t.status:void 0)})),a.normalize(),n}function Oe(e){return!(!e||!e.__CANCEL__)}function Pe(e,t,s){J.call(this,null==e?"canceled":e,J.ERR_CANCELED,t,s),this.name="CanceledError"}function ke(e,t,s){const r=s.config.validateStatus;s.status&&r&&!r(s.status)?t(new J("Request failed with status code "+s.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s)):e(s)}K.inherits(Pe,J,{__CANCEL__:!0});const Re=(e,t,s=3)=>{let r=0;const a=function(e,t){e=e||10;const s=new Array(e),r=new Array(e);let a,n=0,o=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),u=r[o];a||(a=c),s[n]=i,r[n]=c;let d=o,l=0;for(;d!==n;)l+=s[d++],d%=e;if(n=(n+1)%e,n===o&&(o=(o+1)%e),c-a{a=n,s=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),i=t-a;i>=n?o(e,t):(s=e,r||(r=setTimeout((()=>{r=null,o(s)}),n-i)))},()=>s&&o(s)]}((s=>{const n=s.loaded,o=s.lengthComputable?s.total:void 0,i=n-r,c=a(i);r=n,e({loaded:n,total:o,progress:o?n/o:void 0,bytes:i,rate:c||void 0,estimated:c&&o&&n<=o?(o-n)/c:void 0,event:s,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),s)},Ee=(e,t)=>{const s=null!=e;return[r=>t[0]({lengthComputable:s,total:e,loaded:r}),t[1]]},Ie=e=>(...t)=>K.asap((()=>e(...t)));var Ae=fe.hasStandardBrowserEnv?function(){const e=fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent),t=document.createElement("a");let s;function r(s){let r=s;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return s=r(window.location.href),function(e){const t=K.isString(e)?r(e):e;return t.protocol===s.protocol&&t.host===s.host}}():function(){return!0},Te=fe.hasStandardBrowserEnv?{write(e,t,s,r,a,n){const o=[e+"="+encodeURIComponent(t)];K.isNumber(s)&&o.push("expires="+new Date(s).toGMTString()),K.isString(r)&&o.push("path="+r),K.isString(a)&&o.push("domain="+a),!0===n&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Be(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Le=e=>e instanceof Se?{...e}:e;function Ue(e,t){t=t||{};const s={};function r(e,t,s){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:s},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function a(e,t,s){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e,s):r(e,t,s)}function n(e,t){if(!K.isUndefined(t))return r(void 0,t)}function o(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(s,a,n){return n in t?r(s,a):n in e?r(void 0,s):void 0}const c={url:n,method:n,data:n,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:i,headers:(e,t)=>a(Le(e),Le(t),!0)};return K.forEach(Object.keys(Object.assign({},e,t)),(function(r){const n=c[r]||a,o=n(e[r],t[r],r);K.isUndefined(o)&&n!==i||(s[r]=o)})),s}var Ne=e=>{const t=Ue({},e);let s,{data:r,withXSRFToken:a,xsrfHeaderName:n,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=Se.from(i),t.url=oe(Be(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),K.isFormData(r))if(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(!1!==(s=i.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}if(fe.hasStandardBrowserEnv&&(a&&K.isFunction(a)&&(a=a(t)),a||!1!==a&&Ae(t.url))){const e=n&&o&&Te.read(o);e&&i.set(n,e)}return t},Fe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,s){const r=Ne(e);let a=r.data;const n=Se.from(r.headers).normalize();let o,i,c,u,d,{responseType:l,onUploadProgress:p,onDownloadProgress:g}=r;function h(){u&&u(),d&&d(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function m(){if(!f)return;const r=Se.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());ke((function(e){t(e),h()}),(function(e){s(e),h()}),{data:l&&"text"!==l&&"json"!==l?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(m)},f.onabort=function(){f&&(s(new J("Request aborted",J.ECONNABORTED,e,f)),f=null)},f.onerror=function(){s(new J("Network Error",J.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const a=r.transitional||ce;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),s(new J(t,a.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,f)),f=null},void 0===a&&n.setContentType(null),"setRequestHeader"in f&&K.forEach(n.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),K.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),l&&"json"!==l&&(f.responseType=r.responseType),g&&([c,d]=Re(g,!0),f.addEventListener("progress",c)),p&&f.upload&&([i,u]=Re(p),f.upload.addEventListener("progress",i),f.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(o=t=>{f&&(s(!t||t.type?new Pe(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===fe.protocols.indexOf(y)?s(new J("Unsupported protocol "+y+":",J.ERR_BAD_REQUEST,e)):f.send(a||null)}))},De=(e,t)=>{const{length:s}=e=e?e.filter(Boolean):[];if(t||s){let s,r=new AbortController;const a=function(e){if(!s){s=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof J?t:new Pe(t instanceof Error?t.message:t))}};let n=t&&setTimeout((()=>{n=null,a(new J(`timeout ${t} of ms exceeded`,J.ETIMEDOUT))}),t);const o=()=>{e&&(n&&clearTimeout(n),n=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)})),e=null)};e.forEach((e=>e.addEventListener("abort",a)));const{signal:i}=r;return i.unsubscribe=()=>K.asap(o),i}};const je=function*(e,t){let s=e.byteLength;if(!t||s{const a=async function*(e,t){for await(const s of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:s}=await t.read();if(e)break;yield s}}finally{await t.cancel()}}(e))yield*je(s,t)}(e,t);let n,o=0,i=e=>{n||(n=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await a.next();if(t)return i(),void e.close();let n=r.byteLength;if(s){let e=o+=n;s(e)}e.enqueue(new Uint8Array(r))}catch(e){throw i(e),e}},cancel:e=>(i(e),a.return())},{highWaterMark:2})},Me="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,$e=Me&&"function"==typeof ReadableStream,We=Me&&("function"==typeof TextEncoder?(Ve=new TextEncoder,e=>Ve.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Ve;const Ke=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Je=$e&&Ke((()=>{let e=!1;const t=new Request(fe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ge=$e&&Ke((()=>K.isReadableStream(new Response("").body))),Qe={stream:Ge&&(e=>e.body)};var Xe;Me&&(Xe=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Qe[e]&&(Qe[e]=K.isFunction(Xe[e])?t=>t[e]():(t,s)=>{throw new J(`Response type '${e}' is not supported`,J.ERR_NOT_SUPPORT,s)})})));const Ze={http:null,xhr:Fe,fetch:Me&&(async e=>{let{url:t,method:s,data:r,signal:a,cancelToken:n,timeout:o,onDownloadProgress:i,onUploadProgress:c,responseType:u,headers:d,withCredentials:l="same-origin",fetchOptions:p}=Ne(e);u=u?(u+"").toLowerCase():"text";let g,h=De([a,n&&n.toAbortSignal()],o);const f=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let m;try{if(c&&Je&&"get"!==s&&"head"!==s&&0!==(m=await(async(e,t)=>{const s=K.toFiniteNumber(e.getContentLength());return null==s?(async e=>{if(null==e)return 0;if(K.isBlob(e))return e.size;if(K.isSpecCompliantForm(e)){const t=new Request(fe.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return K.isArrayBufferView(e)||K.isArrayBuffer(e)?e.byteLength:(K.isURLSearchParams(e)&&(e+=""),K.isString(e)?(await We(e)).byteLength:void 0)})(t):s})(d,r))){let e,s=new Request(t,{method:"POST",body:r,duplex:"half"});if(K.isFormData(r)&&(e=s.headers.get("content-type"))&&d.setContentType(e),s.body){const[e,t]=Ee(m,Re(Ie(c)));r=ze(s.body,65536,e,t)}}K.isString(l)||(l=l?"include":"omit");const a="credentials"in Request.prototype;g=new Request(t,{...p,signal:h,method:s.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:a?l:void 0});let n=await fetch(g);const o=Ge&&("stream"===u||"response"===u);if(Ge&&(i||o&&f)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=n[t]}));const t=K.toFiniteNumber(n.headers.get("content-length")),[s,r]=i&&Ee(t,Re(Ie(i),!0))||[];n=new Response(ze(n.body,65536,s,(()=>{r&&r(),f&&f()})),e)}u=u||"text";let y=await Qe[K.findKey(Qe,u)||"text"](n,e);return!o&&f&&f(),await new Promise(((t,s)=>{ke(t,s,{data:y,headers:Se.from(n.headers),status:n.status,statusText:n.statusText,config:e,request:g})}))}catch(t){if(f&&f(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new J("Network Error",J.ERR_NETWORK,e,g),{cause:t.cause||t});throw J.from(t,t&&t.code,e,g)}})};K.forEach(Ze,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ye=e=>`- ${e}`,et=e=>K.isFunction(e)||null===e||!1===e;var tt=e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let s,r;const a={};for(let n=0;n`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new J("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Ye).join("\n"):" "+Ye(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function st(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pe(null,e)}function rt(e){return st(e),e.headers=Se.from(e.headers),e.data=Ce.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tt(e.adapter||He.adapter)(e).then((function(t){return st(e),t.data=Ce.call(e,e.transformResponse,t),t.headers=Se.from(t.headers),t}),(function(t){return Oe(t)||(st(e),t&&t.response&&(t.response.data=Ce.call(e,e.transformResponse,t.response),t.response.headers=Se.from(t.response.headers))),Promise.reject(t)}))}const at={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{at[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}}));const nt={};at.transitional=function(e,t,s){function r(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(s?". "+s:"")}return(s,a,n)=>{if(!1===e)throw new J(r(a," has been removed"+(t?" in "+t:"")),J.ERR_DEPRECATED);return t&&!nt[a]&&(nt[a]=!0,console.warn(r(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(s,a,n)}};var ot={assertOptions:function(e,t,s){if("object"!=typeof e)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const n=r[a],o=t[n];if(o){const t=e[n],s=void 0===t||o(t,n,e);if(!0!==s)throw new J("option "+n+" must be "+s,J.ERR_BAD_OPTION_VALUE)}else if(!0!==s)throw new J("Unknown option "+n,J.ERR_BAD_OPTION)}},validators:at};const it=ot.validators;class ct{constructor(e){this.defaults=e,this.interceptors={request:new ie,response:new ie}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const s=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?s&&!String(e.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+s):e.stack=s}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ue(this.defaults,t);const{transitional:s,paramsSerializer:r,headers:a}=t;void 0!==s&&ot.assertOptions(s,{silentJSONParsing:it.transitional(it.boolean),forcedJSONParsing:it.transitional(it.boolean),clarifyTimeoutError:it.transitional(it.boolean)},!1),null!=r&&(K.isFunction(r)?t.paramsSerializer={serialize:r}:ot.assertOptions(r,{encode:it.function,serialize:it.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let n=a&&K.merge(a.common,a[t.method]);a&&K.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete a[e]})),t.headers=Se.concat(n,a);const o=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let d,l=0;if(!i){const e=[rt.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),d=e.length,u=Promise.resolve(t);l{if(!s._listeners)return;let t=s._listeners.length;for(;t-- >0;)s._listeners[t](e);s._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{s.subscribe(e),t=e})).then(e);return r.cancel=function(){s.unsubscribe(t)},r},e((function(e,r,a){s.reason||(s.reason=new Pe(e,r,a),t(s.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new dt((function(t){e=t})),cancel:e}}}var lt=dt;const pt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(pt).forEach((([e,t])=>{pt[t]=e}));var gt=pt;const ht=function e(t){const s=new ut(t),a=r(ut.prototype.request,s);return K.extend(a,ut.prototype,s,{allOwnKeys:!0}),K.extend(a,s,null,{allOwnKeys:!0}),a.create=function(s){return e(Ue(t,s))},a}(He);ht.Axios=ut,ht.CanceledError=Pe,ht.CancelToken=lt,ht.isCancel=Oe,ht.VERSION="1.7.7",ht.toFormData=te,ht.AxiosError=J,ht.Cancel=ht.CanceledError,ht.all=function(e){return Promise.all(e)},ht.spread=function(e){return function(t){return e.apply(null,t)}},ht.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},ht.mergeConfig=Ue,ht.AxiosHeaders=Se,ht.formToJSON=e=>me(K.isHTMLForm(e)?new FormData(e):e),ht.getAdapter=tt,ht.HttpStatusCode=gt,ht.default=ht,e.exports=ht},330:e=>{"use strict";e.exports=JSON.parse('{"name":"@gofynd/fdk-client-javascript","version":"1.4.15-beta.3","description":"","main":"index.js","scripts":{"test":"jest --coverage","lint":"eslint","test:standalone":"npm run build && npx cypress run","build":"webpack","prettier":"npx prettier -w ./sdk ./tests && npx tsc"},"author":"Jigar Dafda","license":"ISC","dependencies":{"axios":"^1.6.4","camelcase":"^6.3.0","joi":"^17.7.0","loglevel":"^1.8.1","query-string":"^7.1.3","@gofynd/fp-signature":"^1.0.1"},"devDependencies":{"axios-cookiejar-support":"^4.0.6","axios-mock-adapter":"^1.21.2","clean-webpack-plugin":"^4.0.0","coveralls":"^3.1.1","eslint":"^8.57.0","cypress":"^9.2.0","dotenv":"^16.0.3","jest":"^29.5.0","tough-cookie":"^4.1.2","webpack":"^5.81.0","webpack-cli":"^5.0.2"},"files":["sdk/**/*.js","sdk/**/*.d.ts","./*.js","./*.d.ts","!**.config.*","!dist","!cypress"]}')}},t={};function s(r){var a=t[r];if(void 0!==a)return a.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,s),n.exports}s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var r=s(675),a=window;for(var n in r)a[n]=r[n];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})(); \ No newline at end of file +(()=>{var e={675:(e,t,s)=>{const{ApplicationConfig:r,ApplicationClient:a}=s(775);e.exports={ApplicationConfig:r,ApplicationClient:a}},331:function(e){var t;"undefined"!=typeof self&&self,t=()=>(()=>{var e={249:function(e,t,s){var r;e.exports=(r=r||function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),"undefined"!=typeof self&&self.crypto&&(t=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(t=globalThis.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&void 0!==s.g&&s.g.crypto&&(t=s.g.crypto),!t)try{t=s(480)}catch(e){}var r=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function e(){}return function(t){var s;return e.prototype=t,s=new e,e.prototype=null,s}}(),n={},o=n.lib={},i=o.Base={extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=o.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,s=e.words,r=this.sigBytes,a=e.sigBytes;if(this.clamp(),r%4)for(var n=0;n>>2]>>>24-n%4*8&255;t[r+n>>>2]|=o<<24-(r+n)%4*8}else for(var i=0;i>>2]=s[i>>>2];return this.sigBytes+=a,this},clamp:function(){var t=this.words,s=this.sigBytes;t[s>>>2]&=4294967295<<32-s%4*8,t.length=e.ceil(s/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],s=0;s>>2]>>>24-a%4*8&255;r.push((n>>>4).toString(16)),r.push((15&n).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,s=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(s,t/2)}},l=u.Latin1={stringify:function(e){for(var t=e.words,s=e.sigBytes,r=[],a=0;a>>2]>>>24-a%4*8&255;r.push(String.fromCharCode(n))}return r.join("")},parse:function(e){for(var t=e.length,s=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new c.init(s,t)}},p=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},g=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var s,r=this._data,a=r.words,n=r.sigBytes,o=this.blockSize,i=n/(4*o),u=(i=t?e.ceil(i):e.max((0|i)-this._minBufferSize,0))*o,d=e.min(4*u,n);if(u){for(var l=0;lr&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),i=a.words,c=o.words,u=0;u>>7)^(h<<14|h>>>18)^h>>>3,m=u[g-2],y=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;u[g]=f+u[g-7]+y+u[g-16]}var H=r&a^r&n^a&n,v=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),_=p+((i<<26|i>>>6)^(i<<21|i>>>11)^(i<<7|i>>>25))+(i&d^~i&l)+c[g]+u[g];p=l,l=d,d=i,i=o+_|0,o=n,n=a,a=r,r=_+(v+H)|0}s[0]=s[0]+r|0,s[1]=s[1]+a|0,s[2]=s[2]+n|0,s[3]=s[3]+o|0,s[4]=s[4]+i|0,s[5]=s[5]+d|0,s[6]=s[6]+l|0,s[7]=s[7]+p|0},_doFinalize:function(){var t=this._data,s=t.words,r=8*this._nDataBytes,a=8*t.sigBytes;return s[a>>>5]|=128<<24-a%32,s[14+(a+64>>>9<<4)]=e.floor(r/4294967296),s[15+(a+64>>>9<<4)]=r,t.sigBytes=4*s.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=n._createHelper(d),t.HmacSHA256=n._createHmacHelper(d)}(Math),r.SHA256)},335:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,a,n){r=r||"&",a=a||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(r);var c=1e3;n&&"number"==typeof n.maxKeys&&(c=n.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var d=0;d=0?(l=f.substr(0,m),p=f.substr(m+1)):(l=f,p=""),g=decodeURIComponent(l),h=decodeURIComponent(p),t(o,g)?s(o[g])?o[g].push(h):o[g]=[o[g],h]:o[g]=h}return o};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},795:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,o,i){return n=n||"&",o=o||"=",null===e&&(e=void 0),"object"==typeof e?r(a(e),(function(a){var i=encodeURIComponent(t(a))+o;return s(e[a])?r(e[a],(function(e){return i+encodeURIComponent(t(e))})).join(n):i+encodeURIComponent(t(e[a]))})).join(n):i?encodeURIComponent(t(i))+o+encodeURIComponent(t(e)):""};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function r(e,t){if(e.map)return e.map(t);for(var s=[],r=0;r{"use strict";t.decode=t.parse=s(335),t.encode=t.stringify=s(795)},832:function(e,t,s){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(s(735)),n=s(601),o=s(593),i=function(){function e(e,t){if(!t)throw new Error("Signature secrete cannot be null, pass secret parameter in constructor.");this.secret=t,this.request=e;var s=this.request.headers=this.request.headers||{};!this.request.method&&this.request.body&&(this.request.method="POST"),s.Host||s.host||(s.Host=this.request.host,this.request.port&&(s.Host+=":"+this.request.port)),this.request.host||(this.request.host=s.Host||s.host)}return e.prototype.prepareRequest=function(){this.parsePath();var e,t=this.request,s=t.headers;t.signQuery?(this.parsedPath.query=e=this.parsedPath.query||{},e["x-fp-date"]?this.datetime=e["x-fp-date"]:e["x-fp-date"]=this.getDateTime()):(t.doNotModifyHeaders||(s["x-fp-date"]?this.datetime=s["x-fp-date"]||s["x-fp-date"]:s["x-fp-date"]=this.getDateTime()),delete s["x-fp-signature"],delete s["X-Fp-Signature"])},e.prototype.sign=function(){return this.request.signQuery=!1,this.parsedPath||this.prepareRequest(),this.request.headers["x-fp-signature"]=this.signature(),{"x-fp-signature":this.request.headers["x-fp-signature"],"x-fp-date":this.request.headers["x-fp-date"]}},e.prototype.signQuery=function(){return this.request.signQuery=!0,this.parsedPath||this.prepareRequest(),this.parsedPath.query["x-fp-signature"]=this.signature(),this.request.path=this.formatPath(),{"x-fp-signature":this.parsedPath.query["x-fp-signature"],"x-fp-date":this.parsedPath.query["x-fp-date"]}},e.prototype.getDateTime=function(){if(!this.datetime){var e=this.request.headers,t=new Date(e.Date||e.date||new Date);this.datetime=t.toISOString().replace(/[:\-]|\.\d{3}/g,"")}return this.datetime},e.prototype.signature=function(){var e=this.stringToSign();return"v1.1:".concat((0,o.hmac)(this.secret,e,"hex"))},e.prototype.stringToSign=function(){return[this.getDateTime(),(0,o.hash)(this.canonicalString(),"hex")].join("\n")},e.prototype.canonicalString=function(){this.parsedPath||this.prepareRequest();var e=this.parsedPath.path,t=this.parsedPath.query,s=(this.request.headers,""),r=this.request.doNotEncodePath,a=(0,o.hash)(this.request.body||"","hex");if(t){var n=Object.keys(t).reduce((function(e,s){return s?(e[(0,o.encodeRfc3986Full)(s)]=(Array.isArray(t[s]),t[s]),e):e}),{}),i=[];Object.keys(n).sort().forEach((function(e){Array.isArray(n[e])?n[e].map(o.encodeRfc3986Full).sort().forEach((function(t){i.push(e+"="+t)})):i.push(e+"="+(0,o.encodeRfc3986Full)(n[e]))})),s=i.join("&")}return"/"!==e&&"/"!==(e=(e=e.replace(/\/{2,}/g,"/")).split("/").reduce((function(e,t){return".."===t?e.pop():"."!==t&&(r&&(t=decodeURIComponent(t.replace(/\+/g," "))),e.push((0,o.encodeRfc3986Full)(t))),e}),[]).join("/"))[0]&&(e="/"+e),[this.request.method||"GET",e,s,this.canonicalHeaders()+"\n",this.signedHeaders(),a].join("\n")},e.prototype.canonicalHeaders=function(){var e=this.request.headers;return Object.keys(e).filter((function(e){if(null==n.HEADERS_TO_IGNORE[e.toLowerCase()]){var t=!1;for(var s in n.HEADERS_TO_INCLUDE)t=t||new RegExp(n.HEADERS_TO_INCLUDE[s],"ig").test(e);return t}return!1})).sort((function(e,t){return e.toLowerCase()=0&&(delete(s=a.default.parse(e.slice(t+1)))["x-fp-signature"],delete s["X-Fp-Signature"],e=e.slice(0,t)),e=e.split("/").map((function(e){return encodeURIComponent(decodeURIComponent(e))})).join("/"),this.parsedPath={path:e,query:s}},e.prototype.formatPath=function(){var e=this.parsedPath.path,t=this.parsedPath.query;return t?(null!=t[""]&&delete t[""],e+"?"+(0,o.encodeRfc3986)(a.default.stringify(t))):e},e}();t.default=i},601:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HEADERS_TO_INCLUDE=t.HEADERS_TO_IGNORE=void 0,t.HEADERS_TO_IGNORE={authorization:!0,connection:!0,"x-amzn-trace-id":!0,"user-agent":!0,expect:!0,"presigned-expires":!0,range:!0},t.HEADERS_TO_INCLUDE=["x-fp-.*","host"]},607:function(e,t,s){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,s=1,r=arguments.length;s{}},t={};function s(r){var a=t[r];if(void 0!==a)return a.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,s),n.exports}return s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s(607)})(),e.exports=t()},729:e=>{"use strict";const t=/[\p{Lu}]/u,s=/[\p{Ll}]/u,r=/^[\p{Lu}](?![\p{Lu}])/gu,a=/([\p{Alpha}\p{N}_]|$)/u,n=/[_.\- ]+/,o=new RegExp("^"+n.source),i=new RegExp(n.source+a.source,"gu"),c=new RegExp("\\d+"+a.source,"gu"),u=(e,a)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");if(a={pascalCase:!1,preserveConsecutiveUppercase:!1,...a},0===(e=Array.isArray(e)?e.map((e=>e.trim())).filter((e=>e.length)).join("-"):e.trim()).length)return"";const n=!1===a.locale?e=>e.toLowerCase():e=>e.toLocaleLowerCase(a.locale),u=!1===a.locale?e=>e.toUpperCase():e=>e.toLocaleUpperCase(a.locale);return 1===e.length?a.pascalCase?u(e):n(e):(e!==n(e)&&(e=((e,r,a)=>{let n=!1,o=!1,i=!1;for(let c=0;c(r.lastIndex=0,e.replace(r,(e=>t(e)))))(e,n):n(e),a.pascalCase&&(e=u(e.charAt(0))+e.slice(1)),((e,t)=>(i.lastIndex=0,c.lastIndex=0,e.replace(i,((e,s)=>t(s))).replace(c,(e=>t(e)))))(e,u))};e.exports=u,e.exports.default=u},454:e=>{"use strict";var t="%[a-f0-9]{2}",s=new RegExp("("+t+")|([^%]+?)","gi"),r=new RegExp("("+t+")+","gi");function a(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var s=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],a(s),a(r))}function n(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(s)||[],r=1;r{"use strict";e.exports=function(e,t){for(var s={},r=Object.keys(e),a=Array.isArray(t),n=0;n=0&&t<=l.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?p+=":"+e:"symbol"==typeof e&&(p=void 0),l.name=e,l.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},l.methodFactory=s||d,l.getLevel=function(){return null!=u?u:null!=i?i:o},l.setLevel=function(e,s){return u=h(e),!1!==s&&function(e){var s=(r[e]||"silent").toUpperCase();if(typeof window!==t&&p){try{return void(window.localStorage[p]=s)}catch(e){}try{window.document.cookie=encodeURIComponent(p)+"="+s+";"}catch(e){}}}(u),c.call(l)},l.setDefaultLevel=function(e){i=h(e),g()||l.setLevel(e,!1)},l.resetLevel=function(){u=null,function(){if(typeof window!==t&&p){try{window.localStorage.removeItem(p)}catch(e){}try{window.document.cookie=encodeURIComponent(p)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),c.call(l)},l.enableAll=function(e){l.setLevel(l.levels.TRACE,e)},l.disableAll=function(e){l.setLevel(l.levels.SILENT,e)},l.rebuild=function(){if(n!==l&&(o=h(n.getLevel())),c.call(l),n===l)for(var e in a)a[e].rebuild()},o=h(n?n.getLevel():"WARN");var f=g();null!=f&&(u=h(f)),c.call(l)}(n=new l).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=a[e];return t||(t=a[e]=new l(e,n.methodFactory)),t};var p=typeof window!==t?window.log:void 0;return n.noConflict=function(){return typeof window!==t&&window.log===n&&(window.log=p),n},n.getLoggers=function(){return a},n.default=n,n},void 0===(a=r.call(t,s,t,e))||(e.exports=a)}()},663:(e,t,s)=>{"use strict";const r=s(280),a=s(454),n=s(528),o=s(55),i=Symbol("encodeFragmentIdentifier");function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function u(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function d(e,t){return t.decode?a(e):e}function l(e){return Array.isArray(e)?e.sort():"object"==typeof e?l(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function p(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function g(e){const t=(e=p(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function f(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const s=function(e){let t;switch(e.arrayFormat){case"index":return(e,s,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=s):r[e]=s};case"bracket":return(e,s,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],s):r[e]=[s]:r[e]=s};case"colon-list-separator":return(e,s,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],s):r[e]=[s]:r[e]=s};case"comma":case"separator":return(t,s,r)=>{const a="string"==typeof s&&s.includes(e.arrayFormatSeparator),n="string"==typeof s&&!a&&d(s,e).includes(e.arrayFormatSeparator);s=n?d(s,e):s;const o=a||n?s.split(e.arrayFormatSeparator).map((t=>d(t,e))):null===s?s:d(s,e);r[t]=o};case"bracket-separator":return(t,s,r)=>{const a=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!a)return void(r[t]=s?d(s,e):s);const n=null===s?[]:s.split(e.arrayFormatSeparator).map((t=>d(t,e)));void 0!==r[t]?r[t]=[].concat(r[t],n):r[t]=n};default:return(e,t,s)=>{void 0!==s[e]?s[e]=[].concat(s[e],t):s[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const a of e.split("&")){if(""===a)continue;let[e,o]=n(t.decode?a.replace(/\+/g," "):a,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:d(o,t),s(d(e,t),o,r)}for(const e of Object.keys(r)){const s=r[e];if("object"==typeof s&&null!==s)for(const e of Object.keys(s))s[e]=h(s[e],t);else r[e]=h(s,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce(((e,t)=>{const s=r[t];return Boolean(s)&&"object"==typeof s&&!Array.isArray(s)?e[t]=l(s):e[t]=s,e}),Object.create(null))}t.extract=g,t.parse=f,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const s=s=>t.skipNull&&null==e[s]||t.skipEmptyString&&""===e[s],r=function(e){switch(e.arrayFormat){case"index":return t=>(s,r)=>{const a=s.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?s:null===r?[...s,[u(t,e),"[",a,"]"].join("")]:[...s,[u(t,e),"[",u(a,e),"]=",u(r,e)].join("")]};case"bracket":return t=>(s,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?s:null===r?[...s,[u(t,e),"[]"].join("")]:[...s,[u(t,e),"[]=",u(r,e)].join("")];case"colon-list-separator":return t=>(s,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?s:null===r?[...s,[u(t,e),":list="].join("")]:[...s,[u(t,e),":list=",u(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return s=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:(a=null===a?"":a,0===r.length?[[u(s,e),t,u(a,e)].join("")]:[[r,u(a,e)].join(e.arrayFormatSeparator)])}default:return t=>(s,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?s:null===r?[...s,u(t,e)]:[...s,[u(t,e),"=",u(r,e)].join("")]}}(t),a={};for(const t of Object.keys(e))s(t)||(a[t]=e[t]);const n=Object.keys(a);return!1!==t.sort&&n.sort(t.sort),n.map((s=>{const a=e[s];return void 0===a?"":null===a?u(s,t):Array.isArray(a)?0===a.length&&"bracket-separator"===t.arrayFormat?u(s,t)+"[]":a.reduce(r(s),[]).join("&"):u(s,t)+"="+u(a,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[s,r]=n(e,"#");return Object.assign({url:s.split("?")[0]||"",query:f(g(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:d(r,t)}:{})},t.stringifyUrl=(e,s)=>{s=Object.assign({encode:!0,strict:!0,[i]:!0},s);const r=p(e.url).split("?")[0]||"",a=t.extract(e.url),n=t.parse(a,{sort:!1}),o=Object.assign(n,e.query);let c=t.stringify(o,s);c&&(c=`?${c}`);let d=function(e){let t="";const s=e.indexOf("#");return-1!==s&&(t=e.slice(s)),t}(e.url);return e.fragmentIdentifier&&(d=`#${s[i]?u(e.fragmentIdentifier,s):e.fragmentIdentifier}`),`${r}${c}${d}`},t.pick=(e,s,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[i]:!1},r);const{url:a,query:n,fragmentIdentifier:c}=t.parseUrl(e,r);return t.stringifyUrl({url:a,query:o(n,s),fragmentIdentifier:c},r)},t.exclude=(e,s,r)=>{const a=Array.isArray(s)?e=>!s.includes(e):(e,t)=>!s(e,t);return t.pick(e,a,r)}},528:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const s=e.indexOf(t);return-1===s?[e]:[e.slice(0,s),e.slice(s+t.length)]}},280:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},534:(e,t,s)=>{const{fdkAxios:r}=s(128),{convertStringToBase64:a}=s(879);e.exports=class{static execute(e,t,s,n,o,i,c){let u={Authorization:"Bearer "+a(`${e.applicationID}:${e.applicationToken}`)};e.cookie&&(u={...u,cookie:e.cookie}),e.locationDetails&&(u={...u,"x-location-detail":JSON.stringify(e.locationDetails)}),e.currencyCode&&(u={...u,"x-currency-code":e.currencyCode});const d=e.extraHeaders.reduce(((e,t)=>({...e,...t})),{});let l={method:t,url:s,params:n,data:o,headers:{...u,...d,...i},responseHeaders:c.responseHeaders};return r.request(l)}}},418:(e,t,s)=>{const r=s(869),a=s(99),n=s(727),o=s(979),i=s(307),c=s(507),u=s(259),d=s(133),l=s(469),p=s(611),g=s(603),h=s(715),f=s(651),m=s(803),y=s(363),H=s(567),{FDKClientValidationError:v}=s(235),{Logger:_}=s(572),{convertStringToBase64:w}=s(879),{execute:b}=s(534);e.exports=class{constructor(e){this.config=e,this.cart=new r(e),this.catalog=new a(e),this.common=new n(e),this.communication=new o(e),this.configuration=new i(e),this.content=new c(e),this.fileStorage=new u(e),this.lead=new d(e),this.logistic=new l(e),this.order=new p(e),this.payment=new g(e),this.rewards=new h(e),this.share=new f(e),this.theme=new m(e),this.user=new y(e),this.webhook=new H(e)}setCookie(e){this.config.cookie=e}setLocationDetails(e,t=!1){this.config.locationDetails=!0===t?e:{...this.config.locationDetails,...e}}setCurrencyCode(e){if("string"!=typeof e)throw new v("Currency code should be string only");this.config.currencyCode=e}setExtraHeaders(e){if("object"!=typeof e)throw new v("Context value should be an object");this.config.extraHeaders.push(e)}async request({method:e,url:t,query:s,body:r,headers:a,responseHeaders:n=!1}){return await b(this.config,e,t,s,r,a,{responseHeaders:n})}}},163:(e,t,s)=>{const{FDKInvalidCredentialError:r}=s(235),{Logger:a,setLoggerLevel:n}=s(572);e.exports=class{constructor(e,t){this.applicationID=e.applicationID||"",this.applicationToken=e.applicationToken||"",this.options={strictResponseCheck:!1,...t},this.domain=e.domain||"https://api.fynd.com",this.logLevel=e.logLevel||"ERROR",this.setLogLevel(this.logLevel),this.extraHeaders=[],this.locationDetails=e.locationDetails,this.currencyCode=e.currencyCode||"INR",this.validate()}setLogLevel(e){n(e.toUpperCase()),this.logLevel=e.toUpperCase()}setCookie(e){this.cookie=e}validate(){if(!this.applicationID)throw a({level:"ERROR",message:"No Application ID Present"}),new r("No Application ID Present");if(!this.applicationToken)throw a({level:"ERROR",message:"No Application Token Present"}),new r("No Application Token Present");if(this.applicationToken.length<5)throw a({level:"ERROR",message:"Invalid Application Token"}),new r("Invalid Application Token");if("boolean"!=typeof this.options.strictResponseCheck)throw a({level:"ERROR",message:"Invalid Application Token"}),a({level:"ERROR",message:"Invalid Value for options.strictResponseCheck, provide boolean value"}),new r("Invalid Value for options.strictResponseCheck, provide boolean value")}}},869:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={addAddress:"/service/application/cart/v1.0/address",addItems:"/service/application/cart/v1.0/detail",applyCoupon:"/service/application/cart/v1.0/coupon",applyRewardPoints:"/service/application/cart/v1.0/redeem/points/",checkoutCartV2:"/service/application/cart/v2.0/checkout",deleteCart:"/service/application/cart/v1.0/cart_archive",getAddressById:"/service/application/cart/v1.0/address/{id}",getAddresses:"/service/application/cart/v1.0/address",getBulkDiscountOffers:"/service/application/cart/v1.0/bulk-price",getCart:"/service/application/cart/v1.0/detail",getCartLastModified:"/service/application/cart/v1.0/detail",getCartShareLink:"/service/application/cart/v1.0/share-cart",getCartSharedItems:"/service/application/cart/v1.0/share-cart/{token}",getCoupons:"/service/application/cart/v1.0/coupon",getItemCount:"/service/application/cart/v1.0/basic",getLadderOffers:"/service/application/cart/v1.0/available-ladder-prices",getPromotionOffers:"/service/application/cart/v1.0/available-promotions",getPromotionPaymentOffers:"/service/application/cart/v1.0/available-payment-offers",getShipments:"/service/application/cart/v1.0/shipment",removeAddress:"/service/application/cart/v1.0/address/{id}",removeCoupon:"/service/application/cart/v1.0/coupon",selectAddress:"/service/application/cart/v1.0/select-address",selectPaymentMode:"/service/application/cart/v1.0/payment",updateAddress:"/service/application/cart/v1.0/address/{id}",updateCart:"/service/application/cart/v1.0/detail",updateCartMeta:"/service/application/cart/v1.0/meta",updateCartWithSharedItems:"/service/application/cart/v1.0/share-cart/{token}/{action}",validateCouponForPayment:"/service/application/cart/v1.0/payment/validate/"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async addAddress({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.addAddress,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async addItems({body:e,i:t,b:s,areaCode:n,buyNow:o,id:i,orderType:c,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const l={};l.i=t,l.b=s,l.area_code=n,l.buy_now=o,l.id=i,l.order_type=c;const p=await r.execute(this._conf,"post",a({url:this._urls.addItems,params:{}}),l,e,{...u},{responseHeaders:d});let g=p;return d&&(g=p[0]),p}async applyCoupon({body:e,i:t,b:s,p:n,id:o,buyNow:i,cartType:c,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const l={};l.i=t,l.b=s,l.p=n,l.id=o,l.buy_now=i,l.cart_type=c;const p=await r.execute(this._conf,"post",a({url:this._urls.applyCoupon,params:{}}),l,e,{...u},{responseHeaders:d});let g=p;return d&&(g=p[0]),p}async applyRewardPoints({body:e,id:t,i:s,b:n,buyNow:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.id=t,u.i=s,u.b=n,u.buy_now=o;const d=await r.execute(this._conf,"post",a({url:this._urls.applyRewardPoints,params:{}}),u,e,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}async checkoutCartV2({body:e,buyNow:t,cartType:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.buy_now=t,i.cart_type=s;const c=await r.execute(this._conf,"post",a({url:this._urls.checkoutCartV2,params:{}}),i,e,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}async deleteCart({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.id=e;const o=await r.execute(this._conf,"put",a({url:this._urls.deleteCart,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getAddressById({id:e,cartId:t,buyNow:s,mobileNo:n,checkoutMode:o,tags:i,isDefault:c,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const l={};l.cart_id=t,l.buy_now=s,l.mobile_no=n,l.checkout_mode=o,l.tags=i,l.is_default=c;const p=await r.execute(this._conf,"get",a({url:this._urls.getAddressById,params:{id:e}}),l,void 0,{...u},{responseHeaders:d});let g=p;return d&&(g=p[0]),p}async getAddresses({cartId:e,buyNow:t,mobileNo:s,checkoutMode:n,tags:o,isDefault:i,requestHeaders:c}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const d={};d.cart_id=e,d.buy_now=t,d.mobile_no=s,d.checkout_mode=n,d.tags=o,d.is_default=i;const l=await r.execute(this._conf,"get",a({url:this._urls.getAddresses,params:{}}),d,void 0,{...c},{responseHeaders:u});let p=l;return u&&(p=l[0]),l}async getBulkDiscountOffers({itemId:e,articleId:t,uid:s,slug:n,requestHeaders:o}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const c={};c.item_id=e,c.article_id=t,c.uid=s,c.slug=n;const u=await r.execute(this._conf,"get",a({url:this._urls.getBulkDiscountOffers,params:{}}),c,void 0,{...o},{responseHeaders:i});let d=u;return i&&(d=u[0]),u}async getCart({id:e,i:t,b:s,c:n,assignCardId:o,areaCode:i,buyNow:c,orderType:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:l}={responseHeaders:!1}){const p={};p.id=e,p.i=t,p.b=s,p.c=n,p.assign_card_id=o,p.area_code=i,p.buy_now=c,p.order_type=u;const g=await r.execute(this._conf,"get",a({url:this._urls.getCart,params:{}}),p,void 0,{...d},{responseHeaders:l});let h=g;return l&&(h=g[0]),g}async getCartLastModified({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.id=e;const o=await r.execute(this._conf,"head",a({url:this._urls.getCartLastModified,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getCartShareLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getCartShareLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getCartSharedItems({token:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getCartSharedItems,params:{token:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getCoupons({id:e,buyNow:t,slug:s,storeId:n,requestHeaders:o}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const c={};c.id=e,c.buy_now=t,c.slug=s,c.store_id=n;const u=await r.execute(this._conf,"get",a({url:this._urls.getCoupons,params:{}}),c,void 0,{...o},{responseHeaders:i});let d=u;return i&&(d=u[0]),u}async getItemCount({id:e,buyNow:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.id=e,o.buy_now=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getItemCount,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getLadderOffers({slug:e,storeId:t,promotionId:s,pageSize:n,requestHeaders:o}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const c={};c.slug=e,c.store_id=t,c.promotion_id=s,c.page_size=n;const u=await r.execute(this._conf,"get",a({url:this._urls.getLadderOffers,params:{}}),c,void 0,{...o},{responseHeaders:i});let d=u;return i&&(d=u[0]),u}async getPromotionOffers({slug:e,pageSize:t,promotionGroup:s,storeId:n,cartType:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.slug=e,u.page_size=t,u.promotion_group=s,u.store_id=n,u.cart_type=o;const d=await r.execute(this._conf,"get",a({url:this._urls.getPromotionOffers,params:{}}),u,void 0,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}async getPromotionPaymentOffers({id:e,uid:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.id=e,o.uid=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getPromotionPaymentOffers,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getShipments({p:e,id:t,buyNow:s,addressId:n,areaCode:o,orderType:i,requestHeaders:c}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const d={};d.p=e,d.id=t,d.buy_now=s,d.address_id=n,d.area_code=o,d.order_type=i;const l=await r.execute(this._conf,"get",a({url:this._urls.getShipments,params:{}}),d,void 0,{...c},{responseHeaders:u});let p=l;return u&&(p=l[0]),l}async removeAddress({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"delete",a({url:this._urls.removeAddress,params:{id:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async removeCoupon({id:e,buyNow:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.id=e,o.buy_now=t;const i=await r.execute(this._conf,"delete",a({url:this._urls.removeCoupon,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async selectAddress({body:e,cartId:t,buyNow:s,i:n,b:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.cart_id=t,u.buy_now=s,u.i=n,u.b=o;const d=await r.execute(this._conf,"post",a({url:this._urls.selectAddress,params:{}}),u,e,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}async selectPaymentMode({body:e,id:t,buyNow:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.id=t,i.buy_now=s;const c=await r.execute(this._conf,"put",a({url:this._urls.selectPaymentMode,params:{}}),i,e,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}async updateAddress({id:e,body:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"put",a({url:this._urls.updateAddress,params:{id:e}}),{},t,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async updateCart({body:e,id:t,i:s,b:n,areaCode:o,buyNow:i,cartType:c,orderType:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:l}={responseHeaders:!1}){const p={};p.id=t,p.i=s,p.b=n,p.area_code=o,p.buy_now=i,p.cart_type=c,p.order_type=u;const g=await r.execute(this._conf,"put",a({url:this._urls.updateCart,params:{}}),p,e,{...d},{responseHeaders:l});let h=g;return l&&(h=g[0]),g}async updateCartMeta({body:e,id:t,buyNow:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.id=t,i.buy_now=s;const c=await r.execute(this._conf,"put",a({url:this._urls.updateCartMeta,params:{}}),i,e,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}async updateCartWithSharedItems({token:e,action:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"post",a({url:this._urls.updateCartWithSharedItems,params:{token:e,action:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async validateCouponForPayment({id:e,buyNow:t,addressId:s,paymentMode:n,paymentIdentifier:o,aggregatorName:i,merchantCode:c,iin:u,network:d,type:l,cardId:p,cartType:g,requestHeaders:h}={requestHeaders:{}},{responseHeaders:f}={responseHeaders:!1}){const m={};m.id=e,m.buy_now=t,m.address_id=s,m.payment_mode=n,m.payment_identifier=o,m.aggregator_name=i,m.merchant_code=c,m.iin=u,m.network=d,m.type=l,m.card_id=p,m.cart_type=g;const y=await r.execute(this._conf,"get",a({url:this._urls.validateCouponForPayment,params:{}}),m,void 0,{...h},{responseHeaders:f});let H=y;return f&&(H=y[0]),y}}},99:(e,t,s)=>{const r=s(534),a=s(205),n=s(121);e.exports=class{constructor(e){this._conf=e,this._relativeUrls={followById:"/service/application/catalog/v1.0/follow/{collection_type}/{collection_id}/",getBrandDetailBySlug:"/service/application/catalog/v1.0/brands/{slug}/",getBrands:"/service/application/catalog/v1.0/brands/",getCategories:"/service/application/catalog/v1.0/categories/",getCategoryDetailBySlug:"/service/application/catalog/v1.0/categories/{slug}/",getCollectionDetailBySlug:"/service/application/catalog/v1.0/collections/{slug}/",getCollectionItemsBySlug:"/service/application/catalog/v1.0/collections/{slug}/items/",getCollections:"/service/application/catalog/v1.0/collections/",getComparedFrequentlyProductBySlug:"/service/application/catalog/v1.0/products/{slug}/similar/compared-frequently/",getDepartments:"/service/application/catalog/v1.0/departments/",getFollowIds:"/service/application/catalog/v1.0/follow/ids/",getFollowedListing:"/service/application/catalog/v1.0/follow/{collection_type}/",getFollowerCountById:"/service/application/catalog/v1.0/follow/{collection_type}/{collection_id}/count/",getHomeProducts:"/service/application/catalog/v1.0/home/listing/",getInStockLocations:"/service/application/catalog/v1.0/in-stock/locations/",getLocationDetailsById:"/service/application/catalog/v1.0/locations/{location_id}/",getProductBundlesBySlug:"/service/application/catalog/v1.0/product-grouping/",getProductComparisonBySlugs:"/service/application/catalog/v1.0/products/compare/",getProductDetailBySlug:"/service/application/catalog/v1.0/products/{slug}/",getProductPriceBySlug:"/service/application/catalog/v3.0/products/{slug}/sizes/{size}/price/",getProductSellersBySlug:"/service/application/catalog/v3.0/products/{slug}/sizes/{size}/sellers/",getProductSizesBySlug:"/service/application/catalog/v1.0/products/{slug}/sizes/",getProductStockByIds:"/service/application/catalog/v1.0/products/stock-status/",getProductStockForTimeByIds:"/service/application/catalog/v1.0/products/stock-status/poll/",getProductVariantsBySlug:"/service/application/catalog/v1.0/products/{slug}/variants/",getProducts:"/service/application/catalog/v1.0/products/",getSearchResults:"/service/application/catalog/v1.0/auto-complete/",getSimilarComparisonProductBySlug:"/service/application/catalog/v1.0/products/{slug}/similar/compare/",getStores:"/service/application/catalog/v1.0/locations/",unfollowById:"/service/application/catalog/v1.0/follow/{collection_type}/{collection_id}/"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async followById({collectionType:e,collectionId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"post",a({url:this._urls.followById,params:{collectionType:e,collectionId:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async getBrandDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getBrandDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getBrands({department:e,pageNo:t,pageSize:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.department=e,i.page_no=t,i.page_size=s;const c=await r.execute(this._conf,"get",a({url:this._urls.getBrands,params:{}}),i,void 0,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}getBrandsPaginator({department:e,pageSize:t}={}){const s=new n;return s.setCallback((async()=>{s.nextId;const r=s.pageNo,a=await this.getBrands({department:e,pageNo:r,pageSize:t});return s.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),s}async getCategories({department:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.department=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getCategories,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getCategoryDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getCategoryDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getCollectionDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getCollectionDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getCollectionItemsBySlug({slug:e,f:t,q:s,filters:n,sortOn:o,pageId:i,pageSize:c,pageNo:u,pageType:d,requestHeaders:l}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const g={};g.f=t,g.q=s,g.filters=n,g.sort_on=o,g.page_id=i,g.page_size=c,g.page_no=u,g.page_type=d;const h=await r.execute(this._conf,"get",a({url:this._urls.getCollectionItemsBySlug,params:{slug:e}}),g,void 0,{...l},{responseHeaders:p});let f=h;return p&&(f=h[0]),h}getCollectionItemsBySlugPaginator({slug:e,f:t,q:s,filters:r,sortOn:a,pageSize:o}={}){const i=new n;return i.setCallback((async()=>{const n=i.nextId,c=i.pageNo,u=await this.getCollectionItemsBySlug({slug:e,f:t,q:s,filters:r,sortOn:a,pageId:n,pageSize:o,pageNo:c,pageType:"cursor"});return i.setPaginator({hasNext:!!u.page.has_next,nextId:u.page.next_id}),u}).bind(this)),i}async getCollections({pageNo:e,pageSize:t,tag:s,q:n,requestHeaders:o}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const c={};c.page_no=e,c.page_size=t,c.tag=s,c.q=n;const u=await r.execute(this._conf,"get",a({url:this._urls.getCollections,params:{}}),c,void 0,{...o},{responseHeaders:i});let d=u;return i&&(d=u[0]),u}getCollectionsPaginator({pageSize:e,tag:t,q:s}={}){const r=new n;return r.setCallback((async()=>{r.nextId;const a=r.pageNo,n=await this.getCollections({pageNo:a,pageSize:e,tag:t,q:s});return r.setPaginator({hasNext:!!n.page.has_next,nextId:n.page.next_id}),n}).bind(this)),r}async getComparedFrequentlyProductBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getComparedFrequentlyProductBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getDepartments({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getDepartments,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getFollowIds({collectionType:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.collection_type=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getFollowIds,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getFollowedListing({collectionType:e,pageId:t,pageSize:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.page_id=t,i.page_size=s;const c=await r.execute(this._conf,"get",a({url:this._urls.getFollowedListing,params:{collectionType:e}}),i,void 0,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}getFollowedListingPaginator({collectionType:e,pageSize:t}={}){const s=new n;return s.setCallback((async()=>{const r=s.nextId,a=(s.pageNo,await this.getFollowedListing({collectionType:e,pageId:r,pageSize:t}));return s.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),s}async getFollowerCountById({collectionType:e,collectionId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"get",a({url:this._urls.getFollowerCountById,params:{collectionType:e,collectionId:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async getHomeProducts({sortOn:e,pageId:t,pageSize:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.sort_on=e,i.page_id=t,i.page_size=s;const c=await r.execute(this._conf,"get",a({url:this._urls.getHomeProducts,params:{}}),i,void 0,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}getHomeProductsPaginator({sortOn:e,pageSize:t}={}){const s=new n;return s.setCallback((async()=>{const r=s.nextId,a=(s.pageNo,await this.getHomeProducts({sortOn:e,pageId:r,pageSize:t}));return s.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),s}async getInStockLocations({pageNo:e,pageSize:t,q:s,city:n,range:o,latitude:i,longitude:c,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const l={};l.page_no=e,l.page_size=t,l.q=s,l.city=n,l.range=o,l.latitude=i,l.longitude=c;const p=await r.execute(this._conf,"get",a({url:this._urls.getInStockLocations,params:{}}),l,void 0,{...u},{responseHeaders:d});let g=p;return d&&(g=p[0]),p}getInStockLocationsPaginator({pageSize:e,q:t,city:s,range:r,latitude:a,longitude:o}={}){const i=new n;return i.setCallback((async()=>{i.nextId;const n=i.pageNo,c=await this.getInStockLocations({pageNo:n,pageSize:e,q:t,city:s,range:r,latitude:a,longitude:o});return i.setPaginator({hasNext:!!c.page.has_next,nextId:c.page.next_id}),c}).bind(this)),i}async getLocationDetailsById({locationId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getLocationDetailsById,params:{locationId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getProductBundlesBySlug({slug:e,id:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.slug=e,o.id=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getProductBundlesBySlug,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getProductComparisonBySlugs({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.slug=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getProductComparisonBySlugs,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getProductDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getProductDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getProductPriceBySlug({slug:e,size:t,storeId:s,moq:n,requestHeaders:o}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const c={};c.store_id=s,c.moq=n;const u=await r.execute(this._conf,"get",a({url:this._urls.getProductPriceBySlug,params:{slug:e,size:t}}),c,void 0,{...o},{responseHeaders:i});let d=u;return i&&(d=u[0]),u}async getProductSellersBySlug({slug:e,size:t,strategy:s,pageNo:n,pageSize:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.strategy=s,u.page_no=n,u.page_size=o;const d=await r.execute(this._conf,"get",a({url:this._urls.getProductSellersBySlug,params:{slug:e,size:t}}),u,void 0,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}getProductSellersBySlugPaginator({slug:e,size:t,strategy:s,pageSize:r}={}){const a=new n;return a.setCallback((async()=>{a.nextId;const n=a.pageNo,o=await this.getProductSellersBySlug({slug:e,size:t,strategy:s,pageNo:n,pageSize:r});return a.setPaginator({hasNext:!!o.page.has_next,nextId:o.page.next_id}),o}).bind(this)),a}async getProductSizesBySlug({slug:e,storeId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.store_id=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getProductSizesBySlug,params:{slug:e}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getProductStockByIds({itemId:e,alu:t,skuCode:s,ean:n,upc:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.item_id=e,u.alu=t,u.sku_code=s,u.ean=n,u.upc=o;const d=await r.execute(this._conf,"get",a({url:this._urls.getProductStockByIds,params:{}}),u,void 0,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}async getProductStockForTimeByIds({timestamp:e,pageSize:t,pageId:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.timestamp=e,i.page_size=t,i.page_id=s;const c=await r.execute(this._conf,"get",a({url:this._urls.getProductStockForTimeByIds,params:{}}),i,void 0,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}getProductStockForTimeByIdsPaginator({timestamp:e,pageSize:t}={}){const s=new n;return s.setCallback((async()=>{const r=s.nextId,a=(s.pageNo,await this.getProductStockForTimeByIds({timestamp:e,pageSize:t,pageId:r}));return s.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),s}async getProductVariantsBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getProductVariantsBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getProducts({q:e,f:t,filters:s,sortOn:n,pageId:o,pageSize:i,pageNo:c,pageType:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:l}={responseHeaders:!1}){const p={};p.q=e,p.f=t,p.filters=s,p.sort_on=n,p.page_id=o,p.page_size=i,p.page_no=c,p.page_type=u;const g=await r.execute(this._conf,"get",a({url:this._urls.getProducts,params:{}}),p,void 0,{...d},{responseHeaders:l});let h=g;return l&&(h=g[0]),g}getProductsPaginator({q:e,f:t,filters:s,sortOn:r,pageSize:a}={}){const o=new n;return o.setCallback((async()=>{const n=o.nextId,i=o.pageNo,c=await this.getProducts({q:e,f:t,filters:s,sortOn:r,pageId:n,pageSize:a,pageNo:i,pageType:"cursor"});return o.setPaginator({hasNext:!!c.page.has_next,nextId:c.page.next_id}),c}).bind(this)),o}async getSearchResults({q:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.q=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getSearchResults,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getSimilarComparisonProductBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getSimilarComparisonProductBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getStores({pageNo:e,pageSize:t,q:s,city:n,range:o,latitude:i,longitude:c,tags:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:l}={responseHeaders:!1}){const p={};p.page_no=e,p.page_size=t,p.q=s,p.city=n,p.range=o,p.latitude=i,p.longitude=c,p.tags=u;const g=await r.execute(this._conf,"get",a({url:this._urls.getStores,params:{}}),p,void 0,{...d},{responseHeaders:l});let h=g;return l&&(h=g[0]),g}getStoresPaginator({pageSize:e,q:t,city:s,range:r,latitude:a,longitude:o,tags:i}={}){const c=new n;return c.setCallback((async()=>{c.nextId;const n=c.pageNo,u=await this.getStores({pageNo:n,pageSize:e,q:t,city:s,range:r,latitude:a,longitude:o,tags:i});return c.setPaginator({hasNext:!!u.page.has_next,nextId:u.page.next_id}),u}).bind(this)),c}async unfollowById({collectionType:e,collectionId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"delete",a({url:this._urls.unfollowById,params:{collectionType:e,collectionId:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}}},727:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getLocations:"/service/common/configuration/v1.0/location",searchApplication:"/service/common/configuration/v1.0/application/search-application"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getLocations({locationType:e,id:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.location_type=e,o.id=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getLocations,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async searchApplication({authorization:e,query:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.query=t;const i={};i.authorization=e;const c=await r.execute(this._conf,"get",a({url:this._urls.searchApplication,params:{}}),o,void 0,{...i,...s},{responseHeaders:n});let u=c;return n&&(u=c[0]),c}}},979:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getCommunicationConsent:"/service/application/communication/v1.0/consent",upsertAppPushtoken:"/service/application/communication/v1.0/pn-token",upsertCommunicationConsent:"/service/application/communication/v1.0/consent"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getCommunicationConsent({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getCommunicationConsent,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async upsertAppPushtoken({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.upsertAppPushtoken,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async upsertCommunicationConsent({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.upsertCommunicationConsent,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}}},307:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getAppCurrencies:"/service/application/configuration/v1.0/currency",getAppStaffList:"/service/application/configuration/v1.0/staff/list",getAppStaffs:"/service/application/configuration/v1.0/staff",getApplication:"/service/application/configuration/v1.0/application",getBasicDetails:"/service/application/configuration/v1.0/detail",getContactInfo:"/service/application/configuration/v1.0/information",getCurrencies:"/service/application/configuration/v1.0/currencies",getCurrencyById:"/service/application/configuration/v1.0/currency/{id}",getFeatures:"/service/application/configuration/v1.0/feature",getIntegrationTokens:"/service/application/configuration/v1.0/token",getLanguages:"/service/application/configuration/v1.0/languages",getOrderingStoreCookie:"/service/application/configuration/v1.0/ordering-store/select",getOrderingStores:"/service/application/configuration/v1.0/ordering-store/stores",getOwnerInfo:"/service/application/configuration/v1.0/about",getStoreDetailById:"/service/application/configuration/v1.0/ordering-store/stores/{store_id}",removeOrderingStoreCookie:"/service/application/configuration/v1.0/ordering-store/select"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAppCurrencies({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getAppCurrencies,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getAppStaffList({pageNo:e,pageSize:t,orderIncent:s,orderingStore:n,user:o,userName:i,requestHeaders:c}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const d={};d.page_no=e,d.page_size=t,d.order_incent=s,d.ordering_store=n,d.user=o,d.user_name=i;const l=await r.execute(this._conf,"get",a({url:this._urls.getAppStaffList,params:{}}),d,void 0,{...c},{responseHeaders:u});let p=l;return u&&(p=l[0]),l}async getAppStaffs({orderIncent:e,orderingStore:t,user:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.order_incent=e,i.ordering_store=t,i.user=s;const c=await r.execute(this._conf,"get",a({url:this._urls.getAppStaffs,params:{}}),i,void 0,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}async getApplication({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getApplication,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getBasicDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getBasicDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getContactInfo({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getContactInfo,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getCurrencies({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getCurrencies,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getCurrencyById({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getCurrencyById,params:{id:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getFeatures({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getFeatures,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getIntegrationTokens({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getIntegrationTokens,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getLanguages({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getLanguages,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getOrderingStoreCookie({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getOrderingStoreCookie,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getOrderingStores({pageNo:e,pageSize:t,q:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i={};i.page_no=e,i.page_size=t,i.q=s;const c=await r.execute(this._conf,"get",a({url:this._urls.getOrderingStores,params:{}}),i,void 0,{...n},{responseHeaders:o});let u=c;return o&&(u=c[0]),c}async getOwnerInfo({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getOwnerInfo,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getStoreDetailById({storeId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getStoreDetailById,params:{storeId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async removeOrderingStoreCookie({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"delete",a({url:this._urls.removeOrderingStoreCookie,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}}},507:(e,t,s)=>{const r=s(534),a=s(205),n=s(121);e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getAnnouncements:"/service/application/content/v1.0/announcements",getBlog:"/service/application/content/v1.0/blogs/{slug}",getBlogs:"/service/application/content/v1.0/blogs/",getCustomFields:"/service/application/content/v1.0/metafields/{resource}/{resource_id}",getCustomObject:"/service/application/content/v1.0/metaobjects/{metaobject_id}",getDataLoaders:"/service/application/content/v1.0/data-loader",getFaqBySlug:"/service/application/content/v1.0/faq/{slug}",getFaqCategories:"/service/application/content/v1.0/faq/categories",getFaqCategoryBySlug:"/service/application/content/v1.0/faq/category/{slug}",getFaqs:"/service/application/content/v1.0/faq",getFaqsByCategorySlug:"/service/application/content/v1.0/faq/category/{slug}/faqs",getLandingPage:"/service/application/content/v1.0/landing-page",getLegalInformation:"/service/application/content/v1.0/legal",getNavigations:"/service/application/content/v1.0/navigations/",getPage:"/service/application/content/v2.0/pages/{slug}",getPages:"/service/application/content/v2.0/pages/",getSEOConfiguration:"/service/application/content/v1.0/seo",getSEOMarkupSchemas:"/service/application/content/v1.0/seo/schema",getSlideshow:"/service/application/content/v1.0/slideshow/{slug}",getSlideshows:"/service/application/content/v1.0/slideshow/",getSupportInformation:"/service/application/content/v1.0/support",getTags:"/service/application/content/v1.0/tags"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAnnouncements({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getAnnouncements,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getBlog({slug:e,rootId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.root_id=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getBlog,params:{slug:e}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getBlogs({pageNo:e,pageSize:t,tags:s,search:n,requestHeaders:o}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const c={};c.page_no=e,c.page_size=t,c.tags=s,c.search=n;const u=await r.execute(this._conf,"get",a({url:this._urls.getBlogs,params:{}}),c,void 0,{...o},{responseHeaders:i});let d=u;return i&&(d=u[0]),u}async getCustomFields({resource:e,resourceId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"get",a({url:this._urls.getCustomFields,params:{resource:e,resourceId:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async getCustomObject({metaobjectId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getCustomObject,params:{metaobjectId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getDataLoaders({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getDataLoaders,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getFaqBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getFaqBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getFaqCategories({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getFaqCategories,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getFaqCategoryBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getFaqCategoryBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getFaqs({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getFaqs,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getFaqsByCategorySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getFaqsByCategorySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getLandingPage({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getLandingPage,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getLegalInformation({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getLegalInformation,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getNavigations({pageNo:e,pageSize:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.page_no=e,o.page_size=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getNavigations,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getPage({slug:e,rootId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.root_id=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getPage,params:{slug:e}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getPages({pageNo:e,pageSize:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.page_no=e,o.page_size=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getPages,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getSEOConfiguration({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getSEOConfiguration,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getSEOMarkupSchemas({pageType:e,active:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.page_type=e,o.active=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getSEOMarkupSchemas,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getSlideshow({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getSlideshow,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getSlideshows({pageNo:e,pageSize:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.page_no=e,o.page_size=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getSlideshows,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}getSlideshowsPaginator({pageSize:e}={}){const t=new n;return t.setCallback((async()=>{t.nextId;const s=t.pageNo,r=await this.getSlideshows({pageNo:s,pageSize:e});return t.setPaginator({hasNext:!!r.page.has_next,nextId:r.page.next_id}),r}).bind(this)),t}async getSupportInformation({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getSupportInformation,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getTags({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getTags,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}}},259:(e,t,s)=>{const r=s(534),a=s(205),{fdkAxios:n}=(s(121),s(128));class o{constructor(e){this._conf=e,this._relativeUrls={completeUpload:"/service/application/assets/v1.0/namespaces/{namespace}/upload/complete",signUrls:"/service/application/assets/v1.0/sign-urls",startUpload:"/service/application/assets/v1.0/namespaces/{namespace}/upload/start"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async completeUpload({namespace:e,body:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"post",a({url:this._urls.completeUpload,params:{namespace:e}}),{},t,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async signUrls({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.signUrls,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async startUpload({namespace:e,body:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"post",a({url:this._urls.startUpload,params:{namespace:e}}),{},t,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}}o.prototype.upload=function({data:e,file_name:t,content_type:s,namespace:r,size:a,tags:o}={}){return new Promise((async(i,c)=>{try{const u=await this.startUpload({namespace:r,body:{file_name:t,content_type:s,size:a,tags:o}});if(u.upload&&u.upload.url){let t={method:"PUT",url:u.upload.url,data:e,headers:{"Content-Type":s},withCredentials:!1};await n.request(t)}else c({message:"Failed to upload file"});delete u.tags,i(await this.completeUpload({namespace:r,body:u}))}catch(e){c(e)}}))},e.exports=o},133:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={createHistory:"/service/application/lead/v1.0/ticket/{id}/history",createTicket:"/service/application/lead/v1.0/ticket/",getCustomForm:"/service/application/lead/v1.0/form/{slug}",getTicket:"/service/application/lead/v1.0/ticket/{id}",submitCustomForm:"/service/application/lead/v1.0/form/{slug}/submit"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async createHistory({id:e,body:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"post",a({url:this._urls.createHistory,params:{id:e}}),{},t,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async createTicket({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.createTicket,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getCustomForm({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getCustomForm,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getTicket({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getTicket,params:{id:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async submitCustomForm({slug:e,body:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"post",a({url:this._urls.submitCustomForm,params:{slug:e}}),{},t,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}}},469:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getAllCountries:"/service/application/logistics/v1.0/country-list",getCountries:"/service/application/logistics/v2.0/countries",getCountry:"/service/application/logistics/v1.0/countries/{country_iso_code}",getLocalities:"/service/application/logistics/v1.0/localities/{locality_type}",getLocality:"/service/application/logistics/v1.0/localities/{locality_type}/{locality_value}",getLocations:"/service/application/logistics/v1.0/locations",getOptimalLocations:"/service/application/logistics/v1.0/reassign_stores",getPincodeCity:"/service/application/logistics/v1.0/pincode/{pincode}",getPincodeZones:"/service/application/logistics/v1.0/pincode/zones",getTatProduct:"/service/application/logistics/v1.0/",validateAddress:"/service/application/logistics/v1.0/country/{country_iso_code}/address/templates/{template_name}/validate"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAllCountries({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getAllCountries,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getCountries({onboarding:e,pageNo:t,pageSize:s,q:n,requestHeaders:o}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const c={};c.onboarding=e,c.page_no=t,c.page_size=s,c.q=n;const u=await r.execute(this._conf,"get",a({url:this._urls.getCountries,params:{}}),c,void 0,{...o},{responseHeaders:i});let d=u;return i&&(d=u[0]),u}async getCountry({countryIsoCode:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getCountry,params:{countryIsoCode:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getLocalities({localityType:e,country:t,state:s,city:n,pageNo:o,pageSize:i,q:c,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const l={};l.country=t,l.state=s,l.city=n,l.page_no=o,l.page_size=i,l.q=c;const p=await r.execute(this._conf,"get",a({url:this._urls.getLocalities,params:{localityType:e}}),l,void 0,{...u},{responseHeaders:d});let g=p;return d&&(g=p[0]),p}async getLocality({localityType:e,localityValue:t,country:s,state:n,city:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.country=s,u.state=n,u.city=o;const d=await r.execute(this._conf,"get",a({url:this._urls.getLocality,params:{localityType:e,localityValue:t}}),u,void 0,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}async getLocations({xApplicationId:e,xApplicationData:t,country:s,state:n,city:o,pincode:i,sector:c,pageNo:u,pageSize:d,requestHeaders:l}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const g={};g["x-application-id"]=e,g["x-application-data"]=t,g.country=s,g.state=n,g.city=o,g.pincode=i,g.sector=c,g.page_no=u,g.page_size=d;const h=await r.execute(this._conf,"get",a({url:this._urls.getLocations,params:{}}),g,void 0,{...l},{responseHeaders:p});let f=h;return p&&(f=h[0]),h}async getOptimalLocations({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getOptimalLocations,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getPincodeCity({pincode:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getPincodeCity,params:{pincode:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getPincodeZones({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getPincodeZones,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getTatProduct({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getTatProduct,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async validateAddress({countryIsoCode:e,templateName:t,body:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i=await r.execute(this._conf,"post",a({url:this._urls.validateAddress,params:{countryIsoCode:e,templateName:t}}),{},s,{...n},{responseHeaders:o});let c=i;return o&&(c=i[0]),i}}},611:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getCustomerDetailsByShipmentId:"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/customer-details",getInvoiceByShipmentId:"/service/application/order/v1.0/orders/shipments/{shipment_id}/invoice",getOrderById:"/service/application/order/v1.0/orders/{order_id}",getOrders:"/service/application/order/v1.0/orders",getShipmentBagReasons:"/service/application/order/v1.0/orders/shipments/{shipment_id}/bags/{bag_id}/reasons",getShipmentById:"/service/application/order/v1.0/orders/shipments/{shipment_id}",getShipmentReasons:"/service/application/order/v1.0/orders/shipments/{shipment_id}/reasons",sendOtpToShipmentCustomer:"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/send/",trackShipment:"/service/application/order/v1.0/orders/shipments/{shipment_id}/track",updateShipmentStatus:"/service/application/order/v1.0/orders/shipments/{shipment_id}/status",verifyOtpShipmentCustomer:"/service/application/order/v1.0/orders/{order_id}/shipments/{shipment_id}/otp/verify/"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getCustomerDetailsByShipmentId({orderId:e,shipmentId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"get",a({url:this._urls.getCustomerDetailsByShipmentId,params:{orderId:e,shipmentId:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async getInvoiceByShipmentId({shipmentId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getInvoiceByShipmentId,params:{shipmentId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getOrderById({orderId:e,allowInactive:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.allow_inactive=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getOrderById,params:{orderId:e}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getOrders({status:e,pageNo:t,pageSize:s,fromDate:n,toDate:o,startDate:i,endDate:c,customMeta:u,allowInactive:d,requestHeaders:l}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const g={};g.status=e,g.page_no=t,g.page_size=s,g.from_date=n,g.to_date=o,g.start_date=i,g.end_date=c,g.custom_meta=u,g.allow_inactive=d;const h=await r.execute(this._conf,"get",a({url:this._urls.getOrders,params:{}}),g,void 0,{...l},{responseHeaders:p});let f=h;return p&&(f=h[0]),h}async getShipmentBagReasons({shipmentId:e,bagId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"get",a({url:this._urls.getShipmentBagReasons,params:{shipmentId:e,bagId:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async getShipmentById({shipmentId:e,allowInactive:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.allow_inactive=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getShipmentById,params:{shipmentId:e}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getShipmentReasons({shipmentId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getShipmentReasons,params:{shipmentId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async sendOtpToShipmentCustomer({orderId:e,shipmentId:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"post",a({url:this._urls.sendOtpToShipmentCustomer,params:{orderId:e,shipmentId:t}}),{},void 0,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async trackShipment({shipmentId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.trackShipment,params:{shipmentId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async updateShipmentStatus({shipmentId:e,body:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o=await r.execute(this._conf,"put",a({url:this._urls.updateShipmentStatus,params:{shipmentId:e}}),{},t,{...s},{responseHeaders:n});let i=o;return n&&(i=o[0]),o}async verifyOtpShipmentCustomer({orderId:e,shipmentId:t,body:s,requestHeaders:n}={requestHeaders:{}},{responseHeaders:o}={responseHeaders:!1}){const i=await r.execute(this._conf,"post",a({url:this._urls.verifyOtpShipmentCustomer,params:{orderId:e,shipmentId:t}}),{},s,{...n},{responseHeaders:o});let c=i;return o&&(c=i[0]),i}}},603:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={addBeneficiaryDetails:"/service/application/payment/v1.0/refund/account",addRefundBankAccountUsingOTP:"/service/application/payment/v1.0/refund/account/otp",attachCardToCustomer:"/service/application/payment/v1.0/card/attach",cancelPaymentLink:"/service/application/payment/v1.0/cancel-payment-link/",cardDetails:"/service/application/payment/v1.0/cards/info/{card_info}",checkAndUpdatePaymentStatus:"/service/application/payment/v1.0/payment/confirm/polling",checkAndUpdatePaymentStatusPaymentLink:"/service/application/payment/v1.0/payment/confirm/polling/link/",checkCredit:"/service/application/payment/v1.0/check-credits/",createOrderHandlerPaymentLink:"/service/application/payment/v1.0/create-order/link/",createPaymentLink:"/service/application/payment/v1.0/create-payment-link/",createPaymentOrder:"/service/application/payment/v1.0/payment-orders/",customerCreditSummary:"/service/application/payment/v1.0/payment/credit-summary/",customerOnboard:"/service/application/payment/v1.0/credit-onboard/",deleteUserCard:"/service/application/payment/v1.0/card/remove",delinkWallet:"/service/application/payment/v1.0/payment/options/wallet/delink",enableOrDisableRefundTransferMode:"/service/application/payment/v1.0/refund/transfer-mode",getActiveCardAggregator:"/service/application/payment/v1.0/card/aggregator",getActiveRefundTransferModes:"/service/application/payment/v1.0/refund/transfer-mode",getActiveUserCards:"/service/application/payment/v1.0/cards",getAggregatorsConfig:"/service/application/payment/v1.0/config/aggregators/key",getEpaylaterBannerDetails:"/service/application/payment/v1.0/epaylater/banner",getOrderBeneficiariesDetail:"/service/application/payment/v1.0/refund/order/beneficiaries",getPaymentLink:"/service/application/payment/v1.0/create-payment-link/",getPaymentModeRoutes:"/service/application/payment/v1.0/payment/options",getPaymentModeRoutesPaymentLink:"/service/application/payment/v1.0/payment/options/link/",getPosPaymentModeRoutes:"/service/application/payment/v1.0/payment/options/pos",getRupifiBannerDetails:"/service/application/payment/v1.0/rupifi/banner",getUserBeneficiariesDetail:"/service/application/payment/v1.0/refund/user/beneficiary",initialisePayment:"/service/application/payment/v1.0/payment/request",initialisePaymentPaymentLink:"/service/application/payment/v1.0/payment/request/link/",linkWallet:"/service/application/payment/v1.0/payment/options/wallet/verify",outstandingOrderDetails:"/service/application/payment/v1.0/payment/outstanding-orders/",paidOrderDetails:"/service/application/payment/v1.0/payment/paid-orders/",pollingPaymentLink:"/service/application/payment/v1.0/polling-payment-link/",redirectToAggregator:"/service/application/payment/v1.0/payment/redirect-to-aggregator/",renderHTML:"/service/application/payment/v1.0/payment/html/render/",resendOrCancelPayment:"/service/application/payment/v1.0/payment/resend_or_cancel",resendPaymentLink:"/service/application/payment/v1.0/resend-payment-link/",updateDefaultBeneficiary:"/service/application/payment/v1.0/refund/beneficiary/default",validateVPA:"/service/application/payment/v1.0/validate-vpa",verifyAndChargePayment:"/service/application/payment/v1.0/payment/confirm/charge",verifyCustomerForPayment:"/service/application/payment/v1.0/payment/customer/validation",verifyIfscCode:"/service/application/payment/v1.0/ifsc-code/verify",verifyOtpAndAddBeneficiaryForBank:"/service/application/payment/v1.0/refund/verification/bank",verifyOtpAndAddBeneficiaryForWallet:"/service/application/payment/v1.0/refund/verification/wallet",walletLinkInitiate:"/service/application/payment/v1.0/payment/options/wallet/link"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async addBeneficiaryDetails({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.addBeneficiaryDetails,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async addRefundBankAccountUsingOTP({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.addRefundBankAccountUsingOTP,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async attachCardToCustomer({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.attachCardToCustomer,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async cancelPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.cancelPaymentLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async cardDetails({cardInfo:e,aggregator:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.aggregator=t;const i=await r.execute(this._conf,"get",a({url:this._urls.cardDetails,params:{cardInfo:e}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async checkAndUpdatePaymentStatus({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.checkAndUpdatePaymentStatus,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async checkAndUpdatePaymentStatusPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.checkAndUpdatePaymentStatusPaymentLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async checkCredit({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.aggregator=e;const o=await r.execute(this._conf,"get",a({url:this._urls.checkCredit,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async createOrderHandlerPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.createOrderHandlerPaymentLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async createPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.createPaymentLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async createPaymentOrder({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.createPaymentOrder,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async customerCreditSummary({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.aggregator=e;const o=await r.execute(this._conf,"get",a({url:this._urls.customerCreditSummary,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async customerOnboard({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.customerOnboard,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async deleteUserCard({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.deleteUserCard,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async delinkWallet({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.delinkWallet,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async enableOrDisableRefundTransferMode({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"put",a({url:this._urls.enableOrDisableRefundTransferMode,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getActiveCardAggregator({refresh:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.refresh=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getActiveCardAggregator,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getActiveRefundTransferModes({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getActiveRefundTransferModes,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getActiveUserCards({forceRefresh:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.force_refresh=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getActiveUserCards,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getAggregatorsConfig({xApiToken:e,refresh:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.refresh=t;const i={};i["x-api-token"]=e;const c=await r.execute(this._conf,"get",a({url:this._urls.getAggregatorsConfig,params:{}}),o,void 0,{...i,...s},{responseHeaders:n});let u=c;return n&&(u=c[0]),c}async getEpaylaterBannerDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getEpaylaterBannerDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getOrderBeneficiariesDetail({orderId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.order_id=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getOrderBeneficiariesDetail,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getPaymentLink({paymentLinkId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.payment_link_id=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getPaymentLink,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getPaymentModeRoutes({amount:e,cartId:t,checkoutMode:s,refresh:n,orderId:o,cardReference:i,userDetails:c,displaySplit:u,advancePayment:d,shipmentId:l,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const h={};h.amount=e,h.cart_id=t,h.checkout_mode=s,h.refresh=n,h.order_id=o,h.card_reference=i,h.user_details=c,h.display_split=u,h.advance_payment=d,h.shipment_id=l;const f=await r.execute(this._conf,"get",a({url:this._urls.getPaymentModeRoutes,params:{}}),h,void 0,{...p},{responseHeaders:g});let m=f;return g&&(m=f[0]),f}async getPaymentModeRoutesPaymentLink({paymentLinkId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.payment_link_id=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getPaymentModeRoutesPaymentLink,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getPosPaymentModeRoutes({amount:e,pincode:t,orderType:s,cartId:n,checkoutMode:o,refresh:i,cardReference:c,userDetails:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:l}={responseHeaders:!1}){const p={};p.amount=e,p.cart_id=n,p.pincode=t,p.checkout_mode=o,p.refresh=i,p.card_reference=c,p.order_type=s,p.user_details=u;const g=await r.execute(this._conf,"get",a({url:this._urls.getPosPaymentModeRoutes,params:{}}),p,void 0,{...d},{responseHeaders:l});let h=g;return l&&(h=g[0]),g}async getRupifiBannerDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getRupifiBannerDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getUserBeneficiariesDetail({orderId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.order_id=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getUserBeneficiariesDetail,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async initialisePayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.initialisePayment,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async initialisePaymentPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.initialisePaymentPaymentLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async linkWallet({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.linkWallet,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async outstandingOrderDetails({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.aggregator=e;const o=await r.execute(this._conf,"get",a({url:this._urls.outstandingOrderDetails,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async paidOrderDetails({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.aggregator=e;const o=await r.execute(this._conf,"get",a({url:this._urls.paidOrderDetails,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async pollingPaymentLink({paymentLinkId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.payment_link_id=e;const o=await r.execute(this._conf,"get",a({url:this._urls.pollingPaymentLink,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async redirectToAggregator({source:e,aggregator:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.source=e,o.aggregator=t;const i=await r.execute(this._conf,"get",a({url:this._urls.redirectToAggregator,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async renderHTML({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.renderHTML,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async resendOrCancelPayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.resendOrCancelPayment,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async resendPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.resendPaymentLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async updateDefaultBeneficiary({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.updateDefaultBeneficiary,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async validateVPA({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.validateVPA,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async verifyAndChargePayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.verifyAndChargePayment,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async verifyCustomerForPayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.verifyCustomerForPayment,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async verifyIfscCode({ifscCode:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.ifsc_code=e;const o=await r.execute(this._conf,"get",a({url:this._urls.verifyIfscCode,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async verifyOtpAndAddBeneficiaryForBank({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.verifyOtpAndAddBeneficiaryForBank,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async verifyOtpAndAddBeneficiaryForWallet({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.verifyOtpAndAddBeneficiaryForWallet,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async walletLinkInitiate({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.walletLinkInitiate,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}}},715:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={catalogueOrder:"/service/application/rewards/v1.0/catalogue/offer/order/",getOfferByName:"/service/application/rewards/v1.0/offers/{name}/",getOrderDiscount:"/service/application/rewards/v1.0/user/offer/order-discount/",getUserPoints:"/service/application/rewards/v1.0/user/points/",getUserPointsHistory:"/service/application/rewards/v1.0/user/points/history/",getUserReferralDetails:"/service/application/rewards/v1.0/user/referral/",redeemReferralCode:"/service/application/rewards/v1.0/user/referral/redeem/"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async catalogueOrder({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.catalogueOrder,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getOfferByName({name:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getOfferByName,params:{name:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getOrderDiscount({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getOrderDiscount,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getUserPoints({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getUserPoints,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getUserPointsHistory({pageId:e,pageSize:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.page_id=e,o.page_size=t;const i=await r.execute(this._conf,"get",a({url:this._urls.getUserPointsHistory,params:{}}),o,void 0,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async getUserReferralDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getUserReferralDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async redeemReferralCode({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.redeemReferralCode,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}}},651:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={createShortLink:"/service/application/share/v1.0/links/short-link/",getApplicationQRCode:"/service/application/share/v1.0/qr/",getCollectionQRCodeBySlug:"/service/application/share/v1.0/qr/collection/{slug}/",getOriginalShortLinkByHash:"/service/application/share/v1.0/links/short-link/{hash}/original/",getProductQRCodeBySlug:"/service/application/share/v1.0/qr/products/{slug}/",getShortLinkByHash:"/service/application/share/v1.0/links/short-link/{hash}/",getUrlQRCode:"/service/application/share/v1.0/qr/url/"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async createShortLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.createShortLink,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getApplicationQRCode({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"post",a({url:this._urls.getApplicationQRCode,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getCollectionQRCodeBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getCollectionQRCodeBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getOriginalShortLinkByHash({hash:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getOriginalShortLinkByHash,params:{hash:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getProductQRCodeBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.getProductQRCodeBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getShortLinkByHash({hash:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getShortLinkByHash,params:{hash:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getUrlQRCode({url:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.url=e;const o=await r.execute(this._conf,"post",a({url:this._urls.getUrlQRCode,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}}},803:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getAllPages:"/service/application/theme/v1.0/{theme_id}/page",getAppliedTheme:"/service/application/theme/v2.0/applied-theme",getPage:"/service/application/theme/v1.0/{theme_id}/{page_value}",getThemeForPreview:"/service/application/theme/v2.0/{theme_id}/preview"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAllPages({themeId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getAllPages,params:{themeId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getAppliedTheme({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getAppliedTheme,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getPage({themeId:e,pageValue:t,filters:s,sectionPreviewHash:n,company:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.filters=s,u.section_preview_hash=n,u.company=o;const d=await r.execute(this._conf,"get",a({url:this._urls.getPage,params:{themeId:e,pageValue:t}}),u,void 0,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}async getThemeForPreview({themeId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"get",a({url:this._urls.getThemeForPreview,params:{themeId:e}}),{},void 0,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}}},363:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={addEmail:"/service/application/user/profile/v1.0/email",addMobileNumber:"/service/application/user/profile/v1.0/mobile",deleteEmail:"/service/application/user/profile/v1.0/email",deleteMobileNumber:"/service/application/user/profile/v1.0/mobile",deleteUser:"/service/application/user/authentication/v1.0/delete",forgotPassword:"/service/application/user/authentication/v1.0/login/password/reset/forgot",getListOfActiveSessions:"/service/application/user/authentication/v1.0/sessions",getLoggedInUser:"/service/application/user/authentication/v1.0/session",getPlatformConfig:"/service/application/user/platform/v1.0/config",getUserAttributes:"/service/application/user/profile/v1.0/user-attributes",hasPassword:"/service/application/user/authentication/v1.0/has-password",loginWithAppleIOS:"/service/application/user/authentication/v1.0/login/apple-ios",loginWithEmailAndPassword:"/service/application/user/authentication/v1.0/login/password",loginWithFacebook:"/service/application/user/authentication/v1.0/login/facebook-token",loginWithGoogle:"/service/application/user/authentication/v1.0/login/google-token",loginWithGoogleAndroid:"/service/application/user/authentication/v1.0/login/google-android",loginWithGoogleIOS:"/service/application/user/authentication/v1.0/login/google-ios",loginWithOTP:"/service/application/user/authentication/v1.0/login/otp",loginWithToken:"/service/application/user/authentication/v1.0/login/token",logout:"/service/application/user/authentication/v1.0/logout",registerWithForm:"/service/application/user/authentication/v1.0/register/form",resetForgotPassword:"/service/application/user/authentication/v1.0/login/password/forgot",sendForgotOTPOnEmail:"/service/application/user/authentication/v1.0/otp/forgot/email/send",sendForgotOTPOnMobile:"/service/application/user/authentication/v1.0/otp/forgot/mobile/send",sendOTPOnEmail:"/service/application/user/authentication/v1.0/otp/email/send",sendOTPOnMobile:"/service/application/user/authentication/v1.0/otp/mobile/send",sendResetPasswordEmail:"/service/application/user/authentication/v1.0/login/password/reset",sendResetPasswordMobile:"/service/application/user/authentication/v1.0/login/password/mobile/reset",sendResetToken:"/service/application/user/authentication/v1.0/login/password/reset/token",sendVerificationLinkToEmail:"/service/application/user/profile/v1.0/email/link/send",sendVerificationLinkToMobile:"/service/application/user/profile/v1.0/mobile/link/send",setEmailAsPrimary:"/service/application/user/profile/v1.0/email/primary",setMobileNumberAsPrimary:"/service/application/user/profile/v1.0/mobile/primary",updatePassword:"/service/application/user/authentication/v1.0/password",updateProfile:"/service/application/user/profile/v1.0/detail",updateUserAttributes:"/service/application/user/profile/v1.0/user-attributes",userExists:"/service/application/user/authentication/v1.0/user-exists",verifyEmail:"/service/application/user/authentication/v1.0/verify/email",verifyEmailForgotOTP:"/service/application/user/authentication/v1.0/otp/forgot/email/verify",verifyEmailOTP:"/service/application/user/authentication/v1.0/otp/email/verify",verifyMobile:"/service/application/user/authentication/v1.0/verify/mobile",verifyMobileForgotOTP:"/service/application/user/authentication/v1.0/otp/forgot/mobile/verify",verifyMobileOTP:"/service/application/user/authentication/v1.0/otp/mobile/verify"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async addEmail({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"put",a({url:this._urls.addEmail,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async addMobileNumber({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"put",a({url:this._urls.addMobileNumber,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async deleteEmail({active:e,primary:t,verified:s,email:n,platform:o,requestHeaders:i}={requestHeaders:{}},{responseHeaders:c}={responseHeaders:!1}){const u={};u.platform=o,u.active=e,u.primary=t,u.verified=s,u.email=n;const d=await r.execute(this._conf,"delete",a({url:this._urls.deleteEmail,params:{}}),u,void 0,{...i},{responseHeaders:c});let l=d;return c&&(l=d[0]),d}async deleteMobileNumber({active:e,primary:t,verified:s,countryCode:n,phone:o,platform:i,requestHeaders:c}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const d={};d.platform=i,d.active=e,d.primary=t,d.verified=s,d.country_code=n,d.phone=o;const l=await r.execute(this._conf,"delete",a({url:this._urls.deleteMobileNumber,params:{}}),d,void 0,{...c},{responseHeaders:u});let p=l;return u&&(p=l[0]),l}async deleteUser({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.deleteUser,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async forgotPassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.forgotPassword,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async getListOfActiveSessions({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getListOfActiveSessions,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getLoggedInUser({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.getLoggedInUser,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async getPlatformConfig({name:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.name=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getPlatformConfig,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async getUserAttributes({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.slug=e;const o=await r.execute(this._conf,"get",a({url:this._urls.getUserAttributes,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async hasPassword({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.hasPassword,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async loginWithAppleIOS({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.loginWithAppleIOS,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async loginWithEmailAndPassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.loginWithEmailAndPassword,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async loginWithFacebook({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.loginWithFacebook,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async loginWithGoogle({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.loginWithGoogle,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async loginWithGoogleAndroid({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.loginWithGoogleAndroid,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async loginWithGoogleIOS({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.loginWithGoogleIOS,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async loginWithOTP({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.loginWithOTP,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async loginWithToken({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.loginWithToken,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async logout({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const s=await r.execute(this._conf,"get",a({url:this._urls.logout,params:{}}),{},void 0,{...e},{responseHeaders:t});let n=s;return t&&(n=s[0]),s}async registerWithForm({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.registerWithForm,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async resetForgotPassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.resetForgotPassword,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async sendForgotOTPOnEmail({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendForgotOTPOnEmail,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async sendForgotOTPOnMobile({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendForgotOTPOnMobile,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async sendOTPOnEmail({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendOTPOnEmail,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async sendOTPOnMobile({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendOTPOnMobile,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async sendResetPasswordEmail({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendResetPasswordEmail,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async sendResetPasswordMobile({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendResetPasswordMobile,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async sendResetToken({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.sendResetToken,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async sendVerificationLinkToEmail({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendVerificationLinkToEmail,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async sendVerificationLinkToMobile({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.sendVerificationLinkToMobile,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async setEmailAsPrimary({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.setEmailAsPrimary,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async setMobileNumberAsPrimary({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.setMobileNumberAsPrimary,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async updatePassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.updatePassword,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async updateProfile({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.updateProfile,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async updateUserAttributes({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"patch",a({url:this._urls.updateUserAttributes,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async userExists({q:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n={};n.q=e;const o=await r.execute(this._conf,"get",a({url:this._urls.userExists,params:{}}),n,void 0,{...t},{responseHeaders:s});let i=o;return s&&(i=o[0]),o}async verifyEmail({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.verifyEmail,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async verifyEmailForgotOTP({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.verifyEmailForgotOTP,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async verifyEmailOTP({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.verifyEmailOTP,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async verifyMobile({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.verifyMobile,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}async verifyMobileForgotOTP({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.verifyMobileForgotOTP,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}async verifyMobileOTP({body:e,platform:t,requestHeaders:s}={requestHeaders:{}},{responseHeaders:n}={responseHeaders:!1}){const o={};o.platform=t;const i=await r.execute(this._conf,"post",a({url:this._urls.verifyMobileOTP,params:{}}),o,e,{...s},{responseHeaders:n});let c=i;return n&&(c=i[0]),i}}},567:(e,t,s)=>{const r=s(534),a=s(205);s(121),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={saveClickEvent:"/service/application/webhook/v1.0/click-analytics/events"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[s,r])=>(t[s]=`${e.domain}${r}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async saveClickEvent({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:s}={responseHeaders:!1}){const n=await r.execute(this._conf,"post",a({url:this._urls.saveClickEvent,params:{}}),{},e,{...t},{responseHeaders:s});let o=n;return s&&(o=n[0]),n}}},205:(e,t,s)=>{const r=s(729);e.exports=({url:e,params:t})=>e.split("/").map((e=>("{"===e[0]&&"}"===e[e.length-1]&&(e=t[r(e.slice(1,e.length-1))]),e))).join("/")},775:(e,t,s)=>{e.exports={ApplicationConfig:s(163),ApplicationClient:s(418)}},128:(e,t,s)=>{const{isAbsoluteURL:r,combineURLs:a}=s(879),n=s(425).default,o=s(663),{sign:i}=s(331),{FDKServerResponseError:c}=s(235),{log:u,Logger:d,getLoggerLevel:l}=s(572),p=s(790),{version:g}=s(330),h=n.create({withCredentials:!0,paramsSerializer:e=>o.stringify(e)});h.interceptors.request.use((function(e){try{if(l()<=u.levels.DEBUG){const t=p(e);u.debug(t)}}catch(e){d({level:"ERROR",message:`Error Generating Curl: ${e}`})}finally{return e}}),(function(e){d({level:"ERROR",message:e.data||e.message,stack:e.data.stack||e.stack})})),h.interceptors.request.use((e=>{if(!e.url)throw new Error("No URL present in request config, unable to sign request");let t=e.url;e.baseURL&&!r(e.url)&&(t=a(e.baseURL,e.url));const{host:s,pathname:n,search:c}=new URL(t),{data:u,headers:d,method:l,params:p}=e;d["x-fp-sdk-version"]=g;let h=o.parse(c);h={...h,...p};let f,m="";if(h&&Object.keys(h).length&&""!==o.stringify(h).trim()&&(m=`?${o.stringify(h)}`),"get"!=l){const t=function(e){const{transformRequest:t}=e;if(t){if("function"==typeof t)return t;if(t.length)return t[0]}throw new Error("Could not get default transformRequest function from Axios defaults")}(e);f=t(u,d)}const{common:y,delete:H,get:v,head:_,post:w,put:b,patch:q,...x}=d,S={method:l&&l.toUpperCase(),host:s,path:n+c+m,body:f,headers:x},C=i(S);return e.headers["x-fp-date"]=C["x-fp-date"],e.headers["x-fp-signature"]=C["x-fp-signature"],e})),h.interceptors.response.use((function(e){return"head"==e.config.method?e.headers:(d({level:"DEBUG",type:"RESPONSE",message:e.data,url:e.config.url}),e.config.responseHeaders?[e.data,e.headers]:e.data)}),(function(e){if(e.response){const t=e.response.data;throw d({level:"ERROR",message:t&&t.message?t.message:e.message,stack:t&&t.stack?t.stack:e.stack,request:{method:e.config&&e.config.url?e.config.url:void 0,url:e.config&&e.config.method?e.config.method:void 0,headers:e.config&&e.config.headers?e.config.headers:void 0}}),new c(t&&t.message?t.message:e.message,"",e.response.statusText,e.response.status,t)}throw e.request?(d({level:"ERROR",message:e.message,stack:e.stack,request:{method:e.config&&e.config.url?e.config.url:void 0,url:e.config&&e.config.method?e.config.method:void 0,headers:e.config&&e.config.headers?e.config.headers:void 0}}),new c(e.message,e.stack,e.code,e.code)):(d({level:"ERROR",message:e.message}),new c(e.message,e.stack))})),e.exports={fdkAxios:h}},235:e=>{class t extends Error{constructor(e,t,s=null,r=null,a=null){super(e),this.name="FDKServerResponseError",this.stackTrace=t,this.status=s,this.code=r,this.details=a}}class s extends Error{constructor(e){super(e.message),this.name="FDKClientValidationError",this.details=e.details}}class r extends Error{constructor(e){super(e.message),this.name="FDKResponseValidationError",this.details=JSON.parse(JSON.stringify(e.details))}}class a extends Error{constructor(e){super(e),this.name="FDKInvalidCredentialError"}}class n extends Error{constructor(e){super(e),this.name="FDKTokenIssueError"}}class o extends Error{constructor(e){super(e),this.name="FDKOAuthCodeError"}}class i extends Error{constructor(e){super(e),this.name="FDKException"}}e.exports={FDKServerResponseError:t,FDKClientValidationError:s,FDKResponseValidationError:r,FDKInvalidCredentialError:a,FDKTokenIssueError:n,FDKOAuthCodeError:o,FDKException:i}},572:(e,t,s)=>{const r=s(65),a=s(330).version;function n(){return(new Date).toString()}e.exports={log:r,Logger:function(e){const{level:t,message:s,...o}=e;"TRACE"===t&&r.trace(JSON.stringify({level:t,detail:s,...o,time:n(),version:a})),"DEBUG"===t&&r.debug(JSON.stringify({level:t,detail:s,...o,time:n(),version:a})),"INFO"===t&&r.info(JSON.stringify({level:t,detail:s,...o,time:n(),version:a})),"WARN"===t&&r.warn(JSON.stringify({level:t,detail:s,...o,time:n(),version:a})),"ERROR"===t&&r.error(JSON.stringify({level:t,detail:s,...o,time:n(),version:a}))},setLoggerLevel:function(e){r.setLevel(e)},getLoggerLevel:function(){return r.getLevel()}}},121:e=>{e.exports=class{constructor(e){this.pageNo=e,this.callback=void 0}setCallback(e){this.callback=e}hasNext(){return this.isNext}setPaginator({hasNext:e,nextId:t,pageNo:s=1}){this.isNext=e,this.nextId=t,this.pageNo=s}next(){return this.callback()}}},790:(e,t,s)=>{const r=s(663),{combineURLs:a,isAbsoluteURL:n}=s(879);let o;e.exports=function(e){return o=e,`curl ${`--request ${o.method.toUpperCase()}`.trim()} "${function(){let e=o.url;o.baseURL&&!n(e)&&(e=a(o.baseURL,e).trim());let{search:t}=new URL(e);queryParamObject={...r.parse(t),...o.params};let s="";return queryParamObject&&Object.keys(queryParamObject).length&&""!==r.stringify(queryParamObject).trim()&&(s=`?${r.stringify(queryParamObject).trim()}`),`${e}${t.trim()}${s}`}()}" ${function(){let e=["common","delete","get","head","post","put","patch"],t={};o.headers[o.method]&&(t=o.headers[o.method]),t=Object.keys(t).reduce(((e,s)=>(e[s.toLowerCase()]=t[s],e)),{});for(let s in o.headers)e.includes(s)||(o.headers[s]instanceof Object?t[s.toLowerCase()]=JSON.stringify(o.headers[s]):t[s.toLowerCase()]=o.headers[s]);let s="";for(let e in t)s+=` --header '${e}: ${t[e]}'`;return s.trim()}()} ${"GET"!==o.method.toUpperCase()&&null!==o.data&&""!==o.data&&o.data?`--data-raw '${JSON.stringify(o.data)}'`.trim():""}`.trim()}},879:(e,t,s)=>{const{FDKException:r}=s(235),a=":::",n=e=>{let t="";for(const s in e)if("object"!=typeof e[s]&&e[s]){const r=encodeURIComponent(e[s]);t+=`${s}=${r}&`}else Array.isArray(e[s])?e[s].forEach((e=>{const r=encodeURIComponent(e);t+=`${s}=${r}&`})):"object"==typeof e[s]&&e[s]&&(t+=n(e[s]));return t?t.slice(0,-1):t},o=(e="",t="/")=>{for(;e.charAt(0)==t;)e=e.substring(1);for(;e.charAt(e.length-1)==t;)e=e.substring(0,e.length-1);return e},i=()=>"undefined"!=typeof window&&void 0!==window.document,c=()=>"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;e.exports={transformRequestOptions:n,getParamsFromItem:e=>{let t="";for(let s in e)if(Array.isArray(e[s])){for(let r=0;r{let t=e.split("?");if(t.length>1){const e=new URLSearchParams(t[1]);let s={};for(let t of e){let e=t[0],r=t[1];s[e]=s[e]?[...s[e],r]:[r]}return s}return{}},trimChar:o,generateUrlWithParams:(e={},t)=>{if(!e||!e.link)return"";if(!t)return`/${o(e.link.split(":")[0])}`;const s={};for(let e in t)if(Array.isArray(t[e])){let r="";for(let s=0;s{let s={value:"",params:{}};t=o(t);for(let r=0;r{if(c())return Buffer.from(e,"utf-8").toString("base64");if(i())return window.btoa(e);throw new r("Base64 conversion error: Unsupported environment")},isBrowser:i,isNode:c,NAV_TYPE:{PAGE:"page",POPUP:"popup"},combineURLs:function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e},isAbsoluteURL:function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}}},425:(e,t,s)=>{"use strict";function r(e,t){return function(){return e.apply(t,arguments)}}const{toString:a}=Object.prototype,{getPrototypeOf:n}=Object,o=(i=Object.create(null),e=>{const t=a.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())});var i;const c=e=>(e=e.toLowerCase(),t=>o(t)===e),u=e=>t=>typeof t===e,{isArray:d}=Array,l=u("undefined"),p=c("ArrayBuffer"),g=u("string"),h=u("function"),f=u("number"),m=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==o(e))return!1;const t=n(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},H=c("Date"),v=c("File"),_=c("Blob"),w=c("FileList"),b=c("URLSearchParams"),[q,x,S,C]=["ReadableStream","Request","Response","Headers"].map(c);function O(e,t,{allOwnKeys:s=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),d(e))for(r=0,a=e.length;r0;)if(r=s[a],t===r.toLowerCase())return r;return null}const k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:s.g,R=e=>!l(e)&&e!==k,E=(I="undefined"!=typeof Uint8Array&&n(Uint8Array),e=>I&&e instanceof I);var I;const A=c("HTMLFormElement"),T=(({hasOwnProperty:e})=>(t,s)=>e.call(t,s))(Object.prototype),B=c("RegExp"),L=(e,t)=>{const s=Object.getOwnPropertyDescriptors(e),r={};O(s,((s,a)=>{let n;!1!==(n=t(s,a,e))&&(r[a]=n||s)})),Object.defineProperties(e,r)},U="abcdefghijklmnopqrstuvwxyz",N="0123456789",F={DIGIT:N,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+N},D=c("AsyncFunction"),j=(z="function"==typeof setImmediate,M=h(k.postMessage),z?setImmediate:M?($=`axios@${Math.random()}`,W=[],k.addEventListener("message",(({source:e,data:t})=>{e===k&&t===$&&W.length&&W.shift()()}),!1),e=>{W.push(e),k.postMessage($,"*")}):e=>setTimeout(e));var z,M,$,W;const V="undefined"!=typeof queueMicrotask?queueMicrotask.bind(k):"undefined"!=typeof process&&process.nextTick||j;var K={isArray:d,isArrayBuffer:p,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||h(e.append)&&("formdata"===(t=o(e))||"object"===t&&h(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&p(e.buffer),t},isString:g,isNumber:f,isBoolean:e=>!0===e||!1===e,isObject:m,isPlainObject:y,isReadableStream:q,isRequest:x,isResponse:S,isHeaders:C,isUndefined:l,isDate:H,isFile:v,isBlob:_,isRegExp:B,isFunction:h,isStream:e=>m(e)&&h(e.pipe),isURLSearchParams:b,isTypedArray:E,isFileList:w,forEach:O,merge:function e(){const{caseless:t}=R(this)&&this||{},s={},r=(r,a)=>{const n=t&&P(s,a)||a;y(s[n])&&y(r)?s[n]=e(s[n],r):y(r)?s[n]=e({},r):d(r)?s[n]=r.slice():s[n]=r};for(let e=0,t=arguments.length;e(O(t,((t,a)=>{s&&h(t)?e[a]=r(t,s):e[a]=t}),{allOwnKeys:a}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,s,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),s&&Object.assign(e.prototype,s)},toFlatObject:(e,t,s,r)=>{let a,o,i;const c={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)i=a[o],r&&!r(i,e,t)||c[i]||(t[i]=e[i],c[i]=!0);e=!1!==s&&n(e)}while(e&&(!s||s(e,t))&&e!==Object.prototype);return t},kindOf:o,kindOfTest:c,endsWith:(e,t,s)=>{e=String(e),(void 0===s||s>e.length)&&(s=e.length),s-=t.length;const r=e.indexOf(t,s);return-1!==r&&r===s},toArray:e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!f(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=e[t];return s},forEachEntry:(e,t)=>{const s=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=s.next())&&!r.done;){const s=r.value;t.call(e,s[0],s[1])}},matchAll:(e,t)=>{let s;const r=[];for(;null!==(s=e.exec(t));)r.push(s);return r},isHTMLForm:A,hasOwnProperty:T,hasOwnProp:T,reduceDescriptors:L,freezeMethods:e=>{L(e,((t,s)=>{if(h(e)&&-1!==["arguments","caller","callee"].indexOf(s))return!1;const r=e[s];h(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")}))}))},toObjectSet:(e,t)=>{const s={},r=e=>{e.forEach((e=>{s[e]=!0}))};return d(e)?r(e):r(String(e).split(t)),s},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,s){return t.toUpperCase()+s})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:P,global:k,isContextDefined:R,ALPHABET:F,generateString:(e=16,t=F.ALPHA_DIGIT)=>{let s="";const{length:r}=t;for(;e--;)s+=t[Math.random()*r|0];return s},isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),s=(e,r)=>{if(m(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const a=d(e)?[]:{};return O(e,((e,t)=>{const n=s(e,r+1);!l(n)&&(a[t]=n)})),t[r]=void 0,a}}return e};return s(e,0)},isAsyncFn:D,isThenable:e=>e&&(m(e)||h(e))&&h(e.then)&&h(e.catch),setImmediate:j,asap:V};function J(e,t,s,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),s&&(this.config=s),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}K.inherits(J,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.status}}});const G=J.prototype,Q={};function X(e){return K.isPlainObject(e)||K.isArray(e)}function Z(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function Y(e,t,s){return e?e.concat(t).map((function(e,t){return e=Z(e),!s&&t?"["+e+"]":e})).join(s?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Q[e]={value:e}})),Object.defineProperties(J,Q),Object.defineProperty(G,"isAxiosError",{value:!0}),J.from=(e,t,s,r,a,n)=>{const o=Object.create(G);return K.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),J.call(o,e.message,t,s,r,a),o.cause=e,o.name=e.name,n&&Object.assign(o,n),o};const ee=K.toFlatObject(K,{},null,(function(e){return/^is[A-Z]/.test(e)}));function te(e,t,s){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(s=K.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!K.isUndefined(t[e])}))).metaTokens,a=s.visitor||u,n=s.dots,o=s.indexes,i=(s.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(a))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(!i&&K.isBlob(e))throw new J("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,s,a){let i=e;if(e&&!a&&"object"==typeof e)if(K.endsWith(s,"{}"))s=r?s:s.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&function(e){return K.isArray(e)&&!e.some(X)}(e)||(K.isFileList(e)||K.endsWith(s,"[]"))&&(i=K.toArray(e)))return s=Z(s),i.forEach((function(e,r){!K.isUndefined(e)&&null!==e&&t.append(!0===o?Y([s],r,n):null===o?s:s+"[]",c(e))})),!1;return!!X(e)||(t.append(Y(a,s,n),c(e)),!1)}const d=[],l=Object.assign(ee,{defaultVisitor:u,convertValue:c,isVisitable:X});if(!K.isObject(e))throw new TypeError("data must be an object");return function e(s,r){if(!K.isUndefined(s)){if(-1!==d.indexOf(s))throw Error("Circular reference detected in "+r.join("."));d.push(s),K.forEach(s,(function(s,n){!0===(!(K.isUndefined(s)||null===s)&&a.call(t,s,K.isString(n)?n.trim():n,r,l))&&e(s,r?r.concat(n):[n])})),d.pop()}}(e),t}function se(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function re(e,t){this._pairs=[],e&&te(e,this,t)}const ae=re.prototype;function ne(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function oe(e,t,s){if(!t)return e;const r=s&&s.encode||ne;K.isFunction(s)&&(s={serialize:s});const a=s&&s.serialize;let n;if(n=a?a(t,s):K.isURLSearchParams(t)?t.toString():new re(t,s).toString(r),n){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}ae.append=function(e,t){this._pairs.push([e,t])},ae.toString=function(e){const t=e?function(t){return e.call(this,t,se)}:se;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var ie=class{constructor(){this.handlers=[]}use(e,t,s){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!s&&s.synchronous,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){K.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ue={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:re,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const de="undefined"!=typeof window&&"undefined"!=typeof document,le="object"==typeof navigator&&navigator||void 0,pe=de&&(!le||["ReactNative","NativeScript","NS"].indexOf(le.product)<0),ge="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,he=de&&window.location.href||"http://localhost";var fe={...Object.freeze({__proto__:null,hasBrowserEnv:de,hasStandardBrowserWebWorkerEnv:ge,hasStandardBrowserEnv:pe,navigator:le,origin:he}),...ue};function me(e){function t(e,s,r,a){let n=e[a++];if("__proto__"===n)return!0;const o=Number.isFinite(+n),i=a>=e.length;return n=!n&&K.isArray(r)?r.length:n,i?(K.hasOwnProp(r,n)?r[n]=[r[n],s]:r[n]=s,!o):(r[n]&&K.isObject(r[n])||(r[n]=[]),t(e,s,r[n],a)&&K.isArray(r[n])&&(r[n]=function(e){const t={},s=Object.keys(e);let r;const a=s.length;let n;for(r=0;r{t(function(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,s,0)})),s}return null}const ye={transitional:ce,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const s=t.getContentType()||"",r=s.indexOf("application/json")>-1,a=K.isObject(e);if(a&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return r?JSON.stringify(me(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let n;if(a){if(s.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new fe.classes.URLSearchParams,Object.assign({visitor:function(e,t,s,r){return fe.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=K.isFileList(e))||s.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(n?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e){if(K.isString(e))try{return(0,JSON.parse)(e),K.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ye.transitional,s=t&&t.forcedJSONParsing,r="json"===this.responseType;if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.isString(e)&&(s&&!this.responseType||r)){const s=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw J.from(e,J.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],(e=>{ye.headers[e]={}}));var He=ye;const ve=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_e=Symbol("internals");function we(e){return e&&String(e).trim().toLowerCase()}function be(e){return!1===e||null==e?e:K.isArray(e)?e.map(be):String(e)}function qe(e,t,s,r,a){return K.isFunction(r)?r.call(this,t,s):(a&&(t=s),K.isString(t)?K.isString(r)?-1!==t.indexOf(r):K.isRegExp(r)?r.test(t):void 0:void 0)}class xe{constructor(e){e&&this.set(e)}set(e,t,s){const r=this;function a(e,t,s){const a=we(t);if(!a)throw new Error("header name must be a non-empty string");const n=K.findKey(r,a);(!n||void 0===r[n]||!0===s||void 0===s&&!1!==r[n])&&(r[n||t]=be(e))}const n=(e,t)=>K.forEach(e,((e,s)=>a(e,s,t)));if(K.isPlainObject(e)||e instanceof this.constructor)n(e,t);else if(K.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))n((e=>{const t={};let s,r,a;return e&&e.split("\n").forEach((function(e){a=e.indexOf(":"),s=e.substring(0,a).trim().toLowerCase(),r=e.substring(a+1).trim(),!s||t[s]&&ve[s]||("set-cookie"===s?t[s]?t[s].push(r):t[s]=[r]:t[s]=t[s]?t[s]+", "+r:r)})),t})(e),t);else if(K.isHeaders(e))for(const[t,r]of e.entries())a(r,t,s);else null!=e&&a(t,e,s);return this}get(e,t){if(e=we(e)){const s=K.findKey(this,e);if(s){const e=this[s];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=s.exec(e);)t[r[1]]=r[2];return t}(e);if(K.isFunction(t))return t.call(this,e,s);if(K.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=we(e)){const s=K.findKey(this,e);return!(!s||void 0===this[s]||t&&!qe(0,this[s],s,t))}return!1}delete(e,t){const s=this;let r=!1;function a(e){if(e=we(e)){const a=K.findKey(s,e);!a||t&&!qe(0,s[a],a,t)||(delete s[a],r=!0)}}return K.isArray(e)?e.forEach(a):a(e),r}clear(e){const t=Object.keys(this);let s=t.length,r=!1;for(;s--;){const a=t[s];e&&!qe(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,s={};return K.forEach(this,((r,a)=>{const n=K.findKey(s,a);if(n)return t[n]=be(r),void delete t[a];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,s)=>t.toUpperCase()+s))}(a):String(a).trim();o!==a&&delete t[a],t[o]=be(r),s[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return K.forEach(this,((s,r)=>{null!=s&&!1!==s&&(t[r]=e&&K.isArray(s)?s.join(", "):s)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const s=new this(e);return t.forEach((e=>s.set(e))),s}static accessor(e){const t=(this[_e]=this[_e]={accessors:{}}).accessors,s=this.prototype;function r(e){const r=we(e);t[r]||(function(e,t){const s=K.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+s,{value:function(e,s,a){return this[r].call(this,t,e,s,a)},configurable:!0})}))}(s,e),t[r]=!0)}return K.isArray(e)?e.forEach(r):r(e),this}}xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(xe.prototype,(({value:e},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[s]=e}}})),K.freezeMethods(xe);var Se=xe;function Ce(e,t){const s=this||He,r=t||s,a=Se.from(r.headers);let n=r.data;return K.forEach(e,(function(e){n=e.call(s,n,a.normalize(),t?t.status:void 0)})),a.normalize(),n}function Oe(e){return!(!e||!e.__CANCEL__)}function Pe(e,t,s){J.call(this,null==e?"canceled":e,J.ERR_CANCELED,t,s),this.name="CanceledError"}function ke(e,t,s){const r=s.config.validateStatus;s.status&&r&&!r(s.status)?t(new J("Request failed with status code "+s.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s)):e(s)}K.inherits(Pe,J,{__CANCEL__:!0});const Re=(e,t,s=3)=>{let r=0;const a=function(e,t){e=e||10;const s=new Array(e),r=new Array(e);let a,n=0,o=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),u=r[o];a||(a=c),s[n]=i,r[n]=c;let d=o,l=0;for(;d!==n;)l+=s[d++],d%=e;if(n=(n+1)%e,n===o&&(o=(o+1)%e),c-a{a=n,s=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),i=t-a;i>=n?o(e,t):(s=e,r||(r=setTimeout((()=>{r=null,o(s)}),n-i)))},()=>s&&o(s)]}((s=>{const n=s.loaded,o=s.lengthComputable?s.total:void 0,i=n-r,c=a(i);r=n,e({loaded:n,total:o,progress:o?n/o:void 0,bytes:i,rate:c||void 0,estimated:c&&o&&n<=o?(o-n)/c:void 0,event:s,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),s)},Ee=(e,t)=>{const s=null!=e;return[r=>t[0]({lengthComputable:s,total:e,loaded:r}),t[1]]},Ie=e=>(...t)=>K.asap((()=>e(...t)));var Ae=fe.hasStandardBrowserEnv?((e,t)=>s=>(s=new URL(s,fe.origin),e.protocol===s.protocol&&e.host===s.host&&(t||e.port===s.port)))(new URL(fe.origin),fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent)):()=>!0,Te=fe.hasStandardBrowserEnv?{write(e,t,s,r,a,n){const o=[e+"="+encodeURIComponent(t)];K.isNumber(s)&&o.push("expires="+new Date(s).toGMTString()),K.isString(r)&&o.push("path="+r),K.isString(a)&&o.push("domain="+a),!0===n&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Be(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Le=e=>e instanceof Se?{...e}:e;function Ue(e,t){t=t||{};const s={};function r(e,t,s,r){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:r},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function a(e,t,s,a){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e,0,a):r(e,t,0,a)}function n(e,t){if(!K.isUndefined(t))return r(void 0,t)}function o(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(s,a,n){return n in t?r(s,a):n in e?r(void 0,s):void 0}const c={url:n,method:n,data:n,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:i,headers:(e,t,s)=>a(Le(e),Le(t),0,!0)};return K.forEach(Object.keys(Object.assign({},e,t)),(function(r){const n=c[r]||a,o=n(e[r],t[r],r);K.isUndefined(o)&&n!==i||(s[r]=o)})),s}var Ne=e=>{const t=Ue({},e);let s,{data:r,withXSRFToken:a,xsrfHeaderName:n,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=Se.from(i),t.url=oe(Be(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),K.isFormData(r))if(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(!1!==(s=i.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}if(fe.hasStandardBrowserEnv&&(a&&K.isFunction(a)&&(a=a(t)),a||!1!==a&&Ae(t.url))){const e=n&&o&&Te.read(o);e&&i.set(n,e)}return t},Fe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,s){const r=Ne(e);let a=r.data;const n=Se.from(r.headers).normalize();let o,i,c,u,d,{responseType:l,onUploadProgress:p,onDownloadProgress:g}=r;function h(){u&&u(),d&&d(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function m(){if(!f)return;const r=Se.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());ke((function(e){t(e),h()}),(function(e){s(e),h()}),{data:l&&"text"!==l&&"json"!==l?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(m)},f.onabort=function(){f&&(s(new J("Request aborted",J.ECONNABORTED,e,f)),f=null)},f.onerror=function(){s(new J("Network Error",J.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const a=r.transitional||ce;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),s(new J(t,a.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,f)),f=null},void 0===a&&n.setContentType(null),"setRequestHeader"in f&&K.forEach(n.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),K.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),l&&"json"!==l&&(f.responseType=r.responseType),g&&([c,d]=Re(g,!0),f.addEventListener("progress",c)),p&&f.upload&&([i,u]=Re(p),f.upload.addEventListener("progress",i),f.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(o=t=>{f&&(s(!t||t.type?new Pe(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===fe.protocols.indexOf(y)?s(new J("Unsupported protocol "+y+":",J.ERR_BAD_REQUEST,e)):f.send(a||null)}))},De=(e,t)=>{const{length:s}=e=e?e.filter(Boolean):[];if(t||s){let s,r=new AbortController;const a=function(e){if(!s){s=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof J?t:new Pe(t instanceof Error?t.message:t))}};let n=t&&setTimeout((()=>{n=null,a(new J(`timeout ${t} of ms exceeded`,J.ETIMEDOUT))}),t);const o=()=>{e&&(n&&clearTimeout(n),n=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)})),e=null)};e.forEach((e=>e.addEventListener("abort",a)));const{signal:i}=r;return i.unsubscribe=()=>K.asap(o),i}};const je=function*(e,t){let s=e.byteLength;if(!t||s{const a=async function*(e,t){for await(const s of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:s}=await t.read();if(e)break;yield s}}finally{await t.cancel()}}(e))yield*je(s,t)}(e,t);let n,o=0,i=e=>{n||(n=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await a.next();if(t)return i(),void e.close();let n=r.byteLength;if(s){let e=o+=n;s(e)}e.enqueue(new Uint8Array(r))}catch(e){throw i(e),e}},cancel:e=>(i(e),a.return())},{highWaterMark:2})},Me="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,$e=Me&&"function"==typeof ReadableStream,We=Me&&("function"==typeof TextEncoder?(Ve=new TextEncoder,e=>Ve.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Ve;const Ke=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Je=$e&&Ke((()=>{let e=!1;const t=new Request(fe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ge=$e&&Ke((()=>K.isReadableStream(new Response("").body))),Qe={stream:Ge&&(e=>e.body)};var Xe;Me&&(Xe=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Qe[e]&&(Qe[e]=K.isFunction(Xe[e])?t=>t[e]():(t,s)=>{throw new J(`Response type '${e}' is not supported`,J.ERR_NOT_SUPPORT,s)})})));const Ze={http:null,xhr:Fe,fetch:Me&&(async e=>{let{url:t,method:s,data:r,signal:a,cancelToken:n,timeout:o,onDownloadProgress:i,onUploadProgress:c,responseType:u,headers:d,withCredentials:l="same-origin",fetchOptions:p}=Ne(e);u=u?(u+"").toLowerCase():"text";let g,h=De([a,n&&n.toAbortSignal()],o);const f=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let m;try{if(c&&Je&&"get"!==s&&"head"!==s&&0!==(m=await(async(e,t)=>{const s=K.toFiniteNumber(e.getContentLength());return null==s?(async e=>{if(null==e)return 0;if(K.isBlob(e))return e.size;if(K.isSpecCompliantForm(e)){const t=new Request(fe.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return K.isArrayBufferView(e)||K.isArrayBuffer(e)?e.byteLength:(K.isURLSearchParams(e)&&(e+=""),K.isString(e)?(await We(e)).byteLength:void 0)})(t):s})(d,r))){let e,s=new Request(t,{method:"POST",body:r,duplex:"half"});if(K.isFormData(r)&&(e=s.headers.get("content-type"))&&d.setContentType(e),s.body){const[e,t]=Ee(m,Re(Ie(c)));r=ze(s.body,65536,e,t)}}K.isString(l)||(l=l?"include":"omit");const a="credentials"in Request.prototype;g=new Request(t,{...p,signal:h,method:s.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:a?l:void 0});let n=await fetch(g);const o=Ge&&("stream"===u||"response"===u);if(Ge&&(i||o&&f)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=n[t]}));const t=K.toFiniteNumber(n.headers.get("content-length")),[s,r]=i&&Ee(t,Re(Ie(i),!0))||[];n=new Response(ze(n.body,65536,s,(()=>{r&&r(),f&&f()})),e)}u=u||"text";let y=await Qe[K.findKey(Qe,u)||"text"](n,e);return!o&&f&&f(),await new Promise(((t,s)=>{ke(t,s,{data:y,headers:Se.from(n.headers),status:n.status,statusText:n.statusText,config:e,request:g})}))}catch(t){if(f&&f(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new J("Network Error",J.ERR_NETWORK,e,g),{cause:t.cause||t});throw J.from(t,t&&t.code,e,g)}})};K.forEach(Ze,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ye=e=>`- ${e}`,et=e=>K.isFunction(e)||null===e||!1===e;var tt=e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let s,r;const a={};for(let n=0;n`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new J("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Ye).join("\n"):" "+Ye(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function st(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pe(null,e)}function rt(e){return st(e),e.headers=Se.from(e.headers),e.data=Ce.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tt(e.adapter||He.adapter)(e).then((function(t){return st(e),t.data=Ce.call(e,e.transformResponse,t),t.headers=Se.from(t.headers),t}),(function(t){return Oe(t)||(st(e),t&&t.response&&(t.response.data=Ce.call(e,e.transformResponse,t.response),t.response.headers=Se.from(t.response.headers))),Promise.reject(t)}))}const at={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{at[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}}));const nt={};at.transitional=function(e,t,s){function r(e,t){return"[Axios v1.7.9] Transitional option '"+e+"'"+t+(s?". "+s:"")}return(s,a,n)=>{if(!1===e)throw new J(r(a," has been removed"+(t?" in "+t:"")),J.ERR_DEPRECATED);return t&&!nt[a]&&(nt[a]=!0,console.warn(r(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(s,a,n)}},at.spelling=function(e){return(t,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};var ot={assertOptions:function(e,t,s){if("object"!=typeof e)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const n=r[a],o=t[n];if(o){const t=e[n],s=void 0===t||o(t,n,e);if(!0!==s)throw new J("option "+n+" must be "+s,J.ERR_BAD_OPTION_VALUE)}else if(!0!==s)throw new J("Unknown option "+n,J.ERR_BAD_OPTION)}},validators:at};const it=ot.validators;class ct{constructor(e){this.defaults=e,this.interceptors={request:new ie,response:new ie}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const s=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?s&&!String(e.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+s):e.stack=s}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ue(this.defaults,t);const{transitional:s,paramsSerializer:r,headers:a}=t;void 0!==s&&ot.assertOptions(s,{silentJSONParsing:it.transitional(it.boolean),forcedJSONParsing:it.transitional(it.boolean),clarifyTimeoutError:it.transitional(it.boolean)},!1),null!=r&&(K.isFunction(r)?t.paramsSerializer={serialize:r}:ot.assertOptions(r,{encode:it.function,serialize:it.function},!0)),ot.assertOptions(t,{baseUrl:it.spelling("baseURL"),withXsrfToken:it.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let n=a&&K.merge(a.common,a[t.method]);a&&K.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete a[e]})),t.headers=Se.concat(n,a);const o=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let d,l=0;if(!i){const e=[rt.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,c),d=e.length,u=Promise.resolve(t);l{if(!s._listeners)return;let t=s._listeners.length;for(;t-- >0;)s._listeners[t](e);s._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{s.subscribe(e),t=e})).then(e);return r.cancel=function(){s.unsubscribe(t)},r},e((function(e,r,a){s.reason||(s.reason=new Pe(e,r,a),t(s.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new dt((function(t){e=t})),cancel:e}}}var lt=dt;const pt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(pt).forEach((([e,t])=>{pt[t]=e}));var gt=pt;const ht=function e(t){const s=new ut(t),a=r(ut.prototype.request,s);return K.extend(a,ut.prototype,s,{allOwnKeys:!0}),K.extend(a,s,null,{allOwnKeys:!0}),a.create=function(s){return e(Ue(t,s))},a}(He);ht.Axios=ut,ht.CanceledError=Pe,ht.CancelToken=lt,ht.isCancel=Oe,ht.VERSION="1.7.9",ht.toFormData=te,ht.AxiosError=J,ht.Cancel=ht.CanceledError,ht.all=function(e){return Promise.all(e)},ht.spread=function(e){return function(t){return e.apply(null,t)}},ht.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},ht.mergeConfig=Ue,ht.AxiosHeaders=Se,ht.formToJSON=e=>me(K.isHTMLForm(e)?new FormData(e):e),ht.getAdapter=tt,ht.HttpStatusCode=gt,ht.default=ht,e.exports=ht},330:e=>{"use strict";e.exports=JSON.parse('{"name":"@gofynd/fdk-client-javascript","version":"1.4.15-beta.4","description":"","main":"index.js","scripts":{"test":"jest --coverage","lint":"eslint","test:standalone":"npm run build && npx cypress run","build":"webpack","prettier":"npx prettier -w ./sdk ./tests && npx tsc"},"author":"Jigar Dafda","license":"ISC","dependencies":{"axios":"^1.6.4","camelcase":"^6.3.0","joi":"^17.7.0","loglevel":"^1.8.1","query-string":"^7.1.3","@gofynd/fp-signature":"^1.0.1"},"devDependencies":{"axios-cookiejar-support":"^4.0.6","axios-mock-adapter":"^1.21.2","clean-webpack-plugin":"^4.0.0","coveralls":"^3.1.1","eslint":"^8.57.0","cypress":"^9.2.0","dotenv":"^16.0.3","jest":"^29.5.0","tough-cookie":"^4.1.2","webpack":"^5.81.0","webpack-cli":"^5.0.2"},"files":["sdk/**/*.js","sdk/**/*.d.ts","./*.js","./*.d.ts","!**.config.*","!dist","!cypress"]}')}},t={};function s(r){var a=t[r];if(void 0!==a)return a.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,s),n.exports}s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var r=s(675),a=window;for(var n in r)a[n]=r[n];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e0f48b8ba..440aa1e1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gofynd/fdk-client-javascript", - "version": "1.4.15-beta.3", + "version": "1.4.15-beta.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gofynd/fdk-client-javascript", - "version": "1.4.15-beta.3", + "version": "1.4.15-beta.4", "license": "ISC", "dependencies": { "@gofynd/fp-signature": "^1.0.1", @@ -58,9 +58,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.2.tgz", - "integrity": "sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.3.tgz", + "integrity": "sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g==", "dev": true, "engines": { "node": ">=6.9.0" @@ -106,13 +106,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", - "integrity": "sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.3.tgz", + "integrity": "sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ==", "dev": true, "dependencies": { - "@babel/parser": "^7.26.2", - "@babel/types": "^7.26.0", + "@babel/parser": "^7.26.3", + "@babel/types": "^7.26.3", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -226,12 +226,12 @@ } }, "node_modules/@babel/parser": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", - "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.3.tgz", + "integrity": "sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==", "dev": true, "dependencies": { - "@babel/types": "^7.26.0" + "@babel/types": "^7.26.3" }, "bin": { "parser": "bin/babel-parser.js" @@ -477,16 +477,16 @@ } }, "node_modules/@babel/traverse": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", - "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", + "version": "7.26.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.4.tgz", + "integrity": "sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.25.9", - "@babel/generator": "^7.25.9", - "@babel/parser": "^7.25.9", + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.3", + "@babel/parser": "^7.26.3", "@babel/template": "^7.25.9", - "@babel/types": "^7.25.9", + "@babel/types": "^7.26.3", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -504,9 +504,9 @@ } }, "node_modules/@babel/types": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", - "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz", + "integrity": "sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.25.9", @@ -1110,9 +1110,9 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", "dev": true, "dependencies": { "@jridgewell/set-array": "^1.2.1", @@ -1416,9 +1416,9 @@ } }, "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.1.tgz", + "integrity": "sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==", "dev": true }, "node_modules/@webassemblyjs/ast": { @@ -1645,13 +1645,10 @@ } }, "node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", "dev": true, - "dependencies": { - "debug": "^4.3.4" - }, "engines": { "node": ">= 14" } @@ -1880,9 +1877,9 @@ "dev": true }, "node_modules/axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -2199,16 +2196,44 @@ } }, "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "dev": true, "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.2.tgz", + "integrity": "sha512-0lk0PHFe/uz0vl527fG9CgdE9WdafjDbCXvBbs+LUv000TVt2Jjhqbs4Jwm8gz070w8xXyEAxrPOMullsxXeGg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.8", + "get-intrinsic": "^1.2.5" }, "engines": { "node": ">= 0.4" @@ -2238,9 +2263,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001683", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001683.tgz", - "integrity": "sha512-iqmNnThZ0n70mNwvxpEC2nBJ037ZHZUoBI5Gorh1Mw6IlEAZujEoU1tXA628iZfzm7R9FvFzxbfdgml82a3k8Q==", + "version": "1.0.30001688", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001688.tgz", + "integrity": "sha512-Nmqpru91cuABu/DTCXbM2NSRHzM2uVHfPnhJ/1zEAJx/ILBRVmz3pzH4N7DZqbdG0gWClsCC05Oj0mJ/1AWMbA==", "dev": true, "funding": [ { @@ -2662,9 +2687,9 @@ "dev": true }, "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "dependencies": { "ms": "^2.1.3" @@ -2789,9 +2814,9 @@ } }, "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", "dev": true, "engines": { "node": ">=12" @@ -2800,6 +2825,20 @@ "url": "https://dotenvx.com" } }, + "node_modules/dunder-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz", + "integrity": "sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==", + "dev": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -2811,9 +2850,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.64", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.64.tgz", - "integrity": "sha512-IXEuxU+5ClW2IGEYFC2T7szbyVgehupCWQe5GNh+H065CD6U6IFN0s4KeAMFGNmQolRU4IV7zGBWSYMmZ8uuqQ==", + "version": "1.5.73", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.73.tgz", + "integrity": "sha512-8wGNxG9tAG5KhGd3eeA0o6ixhiNdgr0DcHWm85XPCphwZgD1lIEoi6t3VERayWao7SF7AAZTw6oARGJeVjH8Kg==", "dev": true }, "node_modules/emittery": { @@ -2891,13 +2930,10 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.4" - }, "engines": { "node": ">= 0.4" } @@ -2917,6 +2953,18 @@ "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", "dev": true }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -3506,16 +3554,21 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", + "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", "dev": true, "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "dunder-proto": "^1.0.0", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -3661,12 +3714,12 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3728,22 +3781,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "dev": true, "engines": { "node": ">= 0.4" @@ -4851,9 +4892,9 @@ "dev": true }, "node_modules/jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", "dev": true, "bin": { "jsesc": "bin/jsesc" @@ -5213,6 +5254,15 @@ "tmpl": "1.0.5" } }, + "node_modules/math-intrinsics": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.0.0.tgz", + "integrity": "sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -5306,9 +5356,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", "dev": true }, "node_modules/normalize-path": { @@ -5725,12 +5775,15 @@ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, "node_modules/psl": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.13.0.tgz", - "integrity": "sha512-BFwmFXiJoFqlUpZ5Qssolv15DMyc84gTBds1BjsV1BfXEo1UyyD7GsmN67n7J77uRhoSNW1AXtXKPLcBFQn9Aw==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", + "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", "dev": true, "dependencies": { "punycode": "^2.3.1" + }, + "funding": { + "url": "https://github.com/sponsors/lupomontero" } }, "node_modules/pump": { @@ -6033,9 +6086,9 @@ } }, "node_modules/resolve.exports": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", - "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", "dev": true, "engines": { "node": ">=10" @@ -6231,15 +6284,69 @@ } }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "dev": true, "dependencies": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -6476,9 +6583,9 @@ } }, "node_modules/terser": { - "version": "5.36.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", - "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", + "version": "5.37.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.37.0.tgz", + "integrity": "sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -6827,16 +6934,16 @@ } }, "node_modules/webpack": { - "version": "5.96.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.1.tgz", - "integrity": "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==", + "version": "5.97.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.1.tgz", + "integrity": "sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.6", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", "acorn": "^8.14.0", "browserslist": "^4.24.0", "chrome-trace-event": "^1.0.2", diff --git a/package.json b/package.json index d17862af1..d28b9c0b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gofynd/fdk-client-javascript", - "version": "1.4.15-beta.3", + "version": "1.4.15-beta.4", "description": "", "main": "index.js", "scripts": { diff --git a/sdk/application/ApplicationClient.d.ts b/sdk/application/ApplicationClient.d.ts index 3d7f2627a..53a980491 100644 --- a/sdk/application/ApplicationClient.d.ts +++ b/sdk/application/ApplicationClient.d.ts @@ -15,7 +15,6 @@ declare class ApplicationClient { configuration: Configuration; content: Content; fileStorage: FileStorage; - finance: Finance; lead: Lead; logistic: Logistic; order: Order; @@ -72,7 +71,6 @@ import Communication = require("./Communication/CommunicationApplicationClient") import Configuration = require("./Configuration/ConfigurationApplicationClient"); import Content = require("./Content/ContentApplicationClient"); import FileStorage = require("./FileStorage/FileStorageApplicationClient"); -import Finance = require("./Finance/FinanceApplicationClient"); import Lead = require("./Lead/LeadApplicationClient"); import Logistic = require("./Logistic/LogisticApplicationClient"); import Order = require("./Order/OrderApplicationClient"); diff --git a/sdk/application/ApplicationClient.js b/sdk/application/ApplicationClient.js index a0ceb4773..5aa28ab55 100644 --- a/sdk/application/ApplicationClient.js +++ b/sdk/application/ApplicationClient.js @@ -5,7 +5,6 @@ const Communication = require("./Communication/CommunicationApplicationClient"); const Configuration = require("./Configuration/ConfigurationApplicationClient"); const Content = require("./Content/ContentApplicationClient"); const FileStorage = require("./FileStorage/FileStorageApplicationClient"); -const Finance = require("./Finance/FinanceApplicationClient"); const Lead = require("./Lead/LeadApplicationClient"); const Logistic = require("./Logistic/LogisticApplicationClient"); const Order = require("./Order/OrderApplicationClient"); @@ -36,7 +35,6 @@ class ApplicationClient { this.configuration = new Configuration(config); this.content = new Content(config); this.fileStorage = new FileStorage(config); - this.finance = new Finance(config); this.lead = new Lead(config); this.logistic = new Logistic(config); this.order = new Order(config); diff --git a/sdk/application/Cart/CartApplicationClient.d.ts b/sdk/application/Cart/CartApplicationClient.d.ts index 8058d9f4a..bb95e6b6b 100644 --- a/sdk/application/Cart/CartApplicationClient.d.ts +++ b/sdk/application/Cart/CartApplicationClient.d.ts @@ -7,7 +7,6 @@ declare class Cart { addItems: string; applyCoupon: string; applyRewardPoints: string; - checkoutCart: string; checkoutCartV2: string; deleteCart: string; getAddressById: string; @@ -22,7 +21,6 @@ declare class Cart { getLadderOffers: string; getPromotionOffers: string; getPromotionPaymentOffers: string; - getPromotions: string; getShipments: string; removeAddress: string; removeCoupon: string; @@ -39,66 +37,57 @@ declare class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addAddress * @summary: Creates a new address for a customer * @description: Add a new address to their cart to save details such as name, email, contact information, and address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/addAddress/). */ - addAddress({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + addAddress({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addItems * @summary: Add items to a cart * @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/application/cart/addItems/). */ - addItems({ body, i, b, areaCode, buyNow, id, orderType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + addItems({ body, i, b, areaCode, buyNow, id, orderType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name applyCoupon * @summary: Apply coupon * @description: Apply a coupon code to the cart to trigger discounts on eligible items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/applyCoupon/). */ - applyCoupon({ body, i, b, p, id, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + applyCoupon({ body, i, b, p, id, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name applyRewardPoints * @summary: Use reward points * @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/). */ - applyRewardPoints({ body, id, i, b, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + applyRewardPoints({ body, id, i, b, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name checkoutCart - * @summary: Checkout cart - * @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/). - */ - checkoutCart({ body, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; - /** - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name checkoutCartV2 * @summary: Checkout cart * @description: The checkout cart initiates the order creation process based on the items in the user’s cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/checkoutCartV2/). */ - checkoutCartV2({ body, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + checkoutCartV2({ body, buyNow, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteCart * @summary: Delete a cart * @description: Delete all items from the user's cart and resets it to its initial state, providing a clean slate for new selections. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/deleteCart/). */ - deleteCart({ id, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + deleteCart({ id, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -111,30 +100,30 @@ declare class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAddresses * @summary: Get a list of addresses for a customer * @description: List all addresses saved by the customer, simplifying the checkout process by offering pre-saved address options for delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddresses/). */ - getAddresses({ cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getAddresses({ cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBulkDiscountOffers * @summary: List bulk discounts * @description: List offer discounts with information about quantity and seller. One offer is marked with a "best" flag, indicating it as the best offer among the list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getBulkDiscountOffers/). */ - getBulkDiscountOffers({ itemId, articleId, uid, slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getBulkDiscountOffers({ itemId, articleId, uid, slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCart * @summary: Get a cart * @description: Get details of a cart linked to a specific customer using a unique cart ID. It offers an overview of the items, quantities, prices, and other relevant information associated with the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCart/). */ - getCart({ id, i, b, c, assignCardId, areaCode, buyNow, orderType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getCart({ id, i, b, c, assignCardId, areaCode, buyNow, orderType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -147,39 +136,39 @@ declare class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCartShareLink * @summary: Create share cart link * @description: Generate a unique shareable link for the customer's cart for a specific sales channel. This link enables easy sharing of the cart contents with other users, facilitating collaborative shopping experiences. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartShareLink/). */ - getCartShareLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getCartShareLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCartSharedItems * @summary: List shared cart items * @description: Get cart items from the shared cart link based on unique token. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartSharedItems/). */ - getCartSharedItems({ token, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getCartSharedItems({ token, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCoupons * @summary: List available coupons * @description: List all available coupons that customer can apply to their carts. It provides details about each coupon, including its code, discount amount, and applicable conditions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCoupons/). */ - getCoupons({ id, buyNow, slug, storeId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getCoupons({ id, buyNow, slug, storeId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getItemCount * @summary: Get a cart items count * @description: Get total count of items currently present in the customer's cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getItemCount/). */ - getItemCount({ id, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getItemCount({ id, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -192,111 +181,102 @@ declare class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPromotionOffers * @summary: List available promotion offers * @description: List all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotionOffers/). */ - getPromotionOffers({ slug, pageSize, promotionGroup, storeId, cartType, sortBy, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getPromotionOffers({ slug, pageSize, promotionGroup, storeId, cartType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPromotionPaymentOffers * @summary: Fetch available promotions payment offers * @description: Use this API to get top 5 payment offers available for current product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotionPaymentOffers/). */ - getPromotionPaymentOffers({ id, uid, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; - /** - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPromotions - * @summary: List all available promotions of the sales channel - * @description: List all promotional offers available for the sales channel, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotions/). - */ - getPromotions({ pageSize, pageNo, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getPromotionPaymentOffers({ id, uid, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getShipments * @summary: List shipments * @description: Get shipment details for the items in a cart, specific to the selected address. Shipment details include delivery promises, seller information, item details, and other relevant information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getShipments/). */ - getShipments({ p, id, buyNow, addressId, areaCode, orderType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getShipments({ p, id, buyNow, addressId, areaCode, orderType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name removeAddress * @summary: Removes an address from a customer's address list * @description: Delete an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeAddress/). */ - removeAddress({ id, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + removeAddress({ id, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name removeCoupon * @summary: Remove coupon * @description: Remove an applied coupon from the customer's cart, thereby removing the associated discount from the cart total. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeCoupon/). */ - removeCoupon({ id, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + removeCoupon({ id, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name selectAddress * @summary: Select customer address for order processing * @description: Select an address from the saved customer addresses and validates the availability of items in the cart. Additionally, it verifies and updates the delivery promise based on the selected address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectAddress/). */ - selectAddress({ body, cartId, buyNow, i, b, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + selectAddress({ body, cartId, buyNow, i, b, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name selectPaymentMode * @summary: Select payment mode * @description: Select a preferred payment mode from available options during the cart checkout process to securely and efficiently complete their transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectPaymentMode/). */ - selectPaymentMode({ body, id, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + selectPaymentMode({ body, id, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateAddress * @summary: Updates an existing customer address * @description: Customer can modify the details of a previously saved addresses. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateAddress/). */ - updateAddress({ id, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + updateAddress({ id, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCart * @summary: Update cart items * @description: Update cart. Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCart/). */ - updateCart({ body, id, i, b, areaCode, buyNow, cartType, orderType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + updateCart({ body, id, i, b, areaCode, buyNow, cartType, orderType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCartMeta * @summary: Update cart metadata * @description: Update metadata associated with a cart, which includes customer preferences, delivery instructions, or any special requirements related to the cart items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartMeta/). */ - updateCartMeta({ body, id, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + updateCartMeta({ body, id, buyNow, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCartWithSharedItems * @summary: Update with shared items * @description: Merge or replace shared cart items with existing cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartWithSharedItems/). */ - updateCartWithSharedItems({ token, action, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + updateCartWithSharedItems({ token, action, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options diff --git a/sdk/application/Cart/CartApplicationClient.js b/sdk/application/Cart/CartApplicationClient.js index 8ab660b5a..c1a7b950f 100644 --- a/sdk/application/Cart/CartApplicationClient.js +++ b/sdk/application/Cart/CartApplicationClient.js @@ -10,7 +10,6 @@ class Cart { addItems: "/service/application/cart/v1.0/detail", applyCoupon: "/service/application/cart/v1.0/coupon", applyRewardPoints: "/service/application/cart/v1.0/redeem/points/", - checkoutCart: "/service/application/cart/v1.0/checkout", checkoutCartV2: "/service/application/cart/v2.0/checkout", deleteCart: "/service/application/cart/v1.0/cart_archive", getAddressById: "/service/application/cart/v1.0/address/{id}", @@ -26,7 +25,6 @@ class Cart { getPromotionOffers: "/service/application/cart/v1.0/available-promotions", getPromotionPaymentOffers: "/service/application/cart/v1.0/available-payment-offers", - getPromotions: "/service/application/cart/v1.0/promotion", getShipments: "/service/application/cart/v1.0/shipment", removeAddress: "/service/application/cart/v1.0/address/{id}", removeCoupon: "/service/application/cart/v1.0/coupon", @@ -59,7 +57,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addAddress * @summary: Creates a new address for a customer * @description: Add a new address to their cart to save details such as name, email, contact information, and address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/addAddress/). @@ -96,7 +94,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addItems * @summary: Add items to a cart * @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/application/cart/addItems/). @@ -141,7 +139,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name applyCoupon * @summary: Apply coupon * @description: Apply a coupon code to the cart to trigger discounts on eligible items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/applyCoupon/). @@ -186,7 +184,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name applyRewardPoints * @summary: Use reward points * @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/). @@ -227,46 +225,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name checkoutCart - * @summary: Checkout cart - * @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/). - */ - async checkoutCart( - { body, buyNow, cartType, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const query_params = {}; - query_params["buy_now"] = buyNow; - query_params["cart_type"] = cartType; - - const xHeaders = {}; - - const response = await ApplicationAPIClient.execute( - this._conf, - "post", - constructUrl({ - url: this._urls["checkoutCart"], - params: {}, - }), - query_params, - body, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - return response; - } - - /** - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name checkoutCartV2 * @summary: Checkout cart * @description: The checkout cart initiates the order creation process based on the items in the user’s cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/checkoutCartV2/). @@ -305,7 +264,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteCart * @summary: Delete a cart * @description: Delete all items from the user's cart and resets it to its initial state, providing a clean slate for new selections. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/deleteCart/). @@ -395,7 +354,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAddresses * @summary: Get a list of addresses for a customer * @description: List all addresses saved by the customer, simplifying the checkout process by offering pre-saved address options for delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getAddresses/). @@ -446,7 +405,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBulkDiscountOffers * @summary: List bulk discounts * @description: List offer discounts with information about quantity and seller. One offer is marked with a "best" flag, indicating it as the best offer among the list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getBulkDiscountOffers/). @@ -487,7 +446,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCart * @summary: Get a cart * @description: Get details of a cart linked to a specific customer using a unique cart ID. It offers an overview of the items, quantities, prices, and other relevant information associated with the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCart/). @@ -580,7 +539,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCartShareLink * @summary: Create share cart link * @description: Generate a unique shareable link for the customer's cart for a specific sales channel. This link enables easy sharing of the cart contents with other users, facilitating collaborative shopping experiences. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartShareLink/). @@ -617,7 +576,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCartSharedItems * @summary: List shared cart items * @description: Get cart items from the shared cart link based on unique token. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCartSharedItems/). @@ -654,7 +613,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCoupons * @summary: List available coupons * @description: List all available coupons that customer can apply to their carts. It provides details about each coupon, including its code, discount amount, and applicable conditions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCoupons/). @@ -695,7 +654,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getItemCount * @summary: Get a cart items count * @description: Get total count of items currently present in the customer's cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getItemCount/). @@ -777,21 +736,15 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPromotionOffers * @summary: List available promotion offers * @description: List all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotionOffers/). */ async getPromotionOffers( - { - slug, - pageSize, - promotionGroup, - storeId, - cartType, - sortBy, - requestHeaders, - } = { requestHeaders: {} }, + { slug, pageSize, promotionGroup, storeId, cartType, requestHeaders } = { + requestHeaders: {}, + }, { responseHeaders } = { responseHeaders: false } ) { const query_params = {}; @@ -800,7 +753,6 @@ class Cart { query_params["promotion_group"] = promotionGroup; query_params["store_id"] = storeId; query_params["cart_type"] = cartType; - query_params["sort_by"] = sortBy; const xHeaders = {}; @@ -828,7 +780,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPromotionPaymentOffers * @summary: Fetch available promotions payment offers * @description: Use this API to get top 5 payment offers available for current product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotionPaymentOffers/). @@ -867,46 +819,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPromotions - * @summary: List all available promotions of the sales channel - * @description: List all promotional offers available for the sales channel, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getPromotions/). - */ - async getPromotions( - { pageSize, pageNo, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const query_params = {}; - query_params["page_size"] = pageSize; - query_params["page_no"] = pageNo; - - const xHeaders = {}; - - const response = await ApplicationAPIClient.execute( - this._conf, - "get", - constructUrl({ - url: this._urls["getPromotions"], - params: {}, - }), - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - return response; - } - - /** - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getShipments * @summary: List shipments * @description: Get shipment details for the items in a cart, specific to the selected address. Shipment details include delivery promises, seller information, item details, and other relevant information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getShipments/). @@ -951,7 +864,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name removeAddress * @summary: Removes an address from a customer's address list * @description: Delete an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeAddress/). @@ -988,7 +901,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name removeCoupon * @summary: Remove coupon * @description: Remove an applied coupon from the customer's cart, thereby removing the associated discount from the cart total. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/removeCoupon/). @@ -1027,7 +940,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name selectAddress * @summary: Select customer address for order processing * @description: Select an address from the saved customer addresses and validates the availability of items in the cart. Additionally, it verifies and updates the delivery promise based on the selected address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectAddress/). @@ -1068,7 +981,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name selectPaymentMode * @summary: Select payment mode * @description: Select a preferred payment mode from available options during the cart checkout process to securely and efficiently complete their transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/selectPaymentMode/). @@ -1107,7 +1020,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateAddress * @summary: Updates an existing customer address * @description: Customer can modify the details of a previously saved addresses. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateAddress/). @@ -1144,7 +1057,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCart * @summary: Update cart items * @description: Update cart. Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCart/). @@ -1198,7 +1111,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCartMeta * @summary: Update cart metadata * @description: Update metadata associated with a cart, which includes customer preferences, delivery instructions, or any special requirements related to the cart items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartMeta/). @@ -1237,7 +1150,7 @@ class Cart { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCartWithSharedItems * @summary: Update with shared items * @description: Merge or replace shared cart items with existing cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/updateCartWithSharedItems/). diff --git a/sdk/application/Catalog/CatalogApplicationClient.d.ts b/sdk/application/Catalog/CatalogApplicationClient.d.ts index 2d0493486..95300f4a0 100644 --- a/sdk/application/Catalog/CatalogApplicationClient.d.ts +++ b/sdk/application/Catalog/CatalogApplicationClient.d.ts @@ -39,30 +39,30 @@ declare class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name followById * @summary: Create item, brand, product * @description: Add a product, brand, or item to the user's followed list by collection Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/followById/). */ - followById({ collectionType, collectionId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + followById({ collectionType, collectionId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBrandDetailBySlug * @summary: Get a brand * @description: Get metadata of a brand such as name, information, logo, banner, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getBrandDetailBySlug/). */ - getBrandDetailBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getBrandDetailBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBrands * @summary: List brands * @description: Get a list of all the available brands. Filtering can be applied to the department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getBrands/). */ - getBrands({ department, pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getBrands({ department, pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {Object} arg - Arg object. * @param {string} [arg.department] - The name of the department. Use this @@ -70,50 +70,50 @@ declare class Catalog { * of available departments below. Also, you can get available departments * from the endpoint /service/application/catalog/v1.0/departments/. * @param {number} [arg.pageSize] - The number of items to retrieve in each page. - * @returns {Paginator} + * @returns {Paginator} * @summary: List brands * @description: Get a list of all the available brands. Filtering can be applied to the department. */ getBrandsPaginator({ department, pageSize }?: { department?: string; pageSize?: number; - }): Paginator; + }): Paginator; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCategories * @summary: List product categories * @description: List all available product categories. Also, users can filter the categories by department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCategories/). */ - getCategories({ department, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getCategories({ department, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCategoryDetailBySlug * @summary: Get category by slug * @description: Get detailed information about a specific product category using its slug and get metadata of a category such as name, information, logo, banner, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCategoryDetailBySlug/). */ - getCategoryDetailBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getCategoryDetailBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCollectionDetailBySlug * @summary: Get a collection * @description: Get detailed information about a specific collection using its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollectionDetailBySlug/). */ - getCollectionDetailBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getCollectionDetailBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCollectionItemsBySlug * @summary: Lists items of collection * @description: Fetch items within a particular collection identified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollectionItemsBySlug/). */ - getCollectionItemsBySlug({ slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getCollectionItemsBySlug({ slug, f, q, filters, sortOn, pageId, pageSize, pageNo, pageType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {Object} arg - Arg object. * @param {string} arg.slug - A short, human-readable, URL-friendly @@ -131,7 +131,7 @@ declare class Catalog { * should be sorted, e.g. popularity, price, latest and discount, in * either ascending or descending order. See the supported values below. * @param {number} [arg.pageSize] - The number of items to retrieve in each page. - * @returns {Paginator} + * @returns {Paginator} * @summary: Lists items of collection * @description: Fetch items within a particular collection identified by its slug. */ @@ -142,22 +142,22 @@ declare class Catalog { filters?: boolean; sortOn?: string; pageSize?: number; - }): Paginator; + }): Paginator; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCollections * @summary: List collections * @description: List of curated product collections with filtering options based on tags and collection names. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollections/). */ - getCollections({ pageNo, pageSize, tag, q, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getCollections({ pageNo, pageSize, tag, q, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {Object} arg - Arg object. * @param {number} [arg.pageSize] - The number of items to retrieve in each page. * @param {string[]} [arg.tag] - List of tags to filter collections. * @param {string} [arg.q] - Name of the collection to filter collection. - * @returns {Paginator} + * @returns {Paginator} * @summary: List collections * @description: List of curated product collections with filtering options based on tags and collection names. */ @@ -165,89 +165,88 @@ declare class Catalog { pageSize?: number; tag?: string[]; q?: string; - }): Paginator; + }): Paginator; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getComparedFrequentlyProductBySlug * @summary: List frequent products * @description: Get products that are often compared to the product specified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getComparedFrequentlyProductBySlug/). */ - getComparedFrequentlyProductBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getComparedFrequentlyProductBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getDepartments * @summary: List departments * @description: List all departments associated with available products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getDepartments/). */ - getDepartments({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getDepartments({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getFollowIds * @summary: List Ids of followed item, brand, product * @description: Get the IDs of all items the user is currently following, such as Products, Brands, and Collections. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowIds/). */ - getFollowIds({ collectionType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getFollowIds({ collectionType, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getFollowedListing * @summary: List followed products, brands * @description: Get a list of products or brands the user is following. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowedListing/). */ - getFollowedListing({ collectionType, pageId, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getFollowedListing({ collectionType, pageId, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {Object} arg - Arg object. * @param {string} arg.collectionType - Type of collection followed, i.e. * products, brands, or collections. * @param {number} [arg.pageSize] - Page ID to retrieve next set of results. - * @returns {Paginator} + * @returns {Paginator} * @summary: List followed products, brands * @description: Get a list of products or brands the user is following. */ getFollowedListingPaginator({ collectionType, pageSize }?: { collectionType: string; pageSize?: number; - }): Paginator; + }): Paginator; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getFollowerCountById * @summary: Get follower count * @description: Get the total number of followers for a specific item by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowerCountById/). */ - getFollowerCountById({ collectionType, collectionId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getFollowerCountById({ collectionType, collectionId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getHomeProducts * @summary: List homepage-featured products * @description: List all the products associated with a brand, collection or category in a random order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getHomeProducts/). */ - getHomeProducts({ sortOn, pageId, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getHomeProducts({ sortOn, pageId, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {Object} arg - Arg object. * @param {string} [arg.sortOn] - The order in which the list of products * should be sorted, e.g. popularity, price, latest and discount, in * either ascending or descending order. * @param {number} [arg.pageSize] - The number of items to retrieve in each page. - * @returns {Paginator} + * @returns {Paginator} * @summary: List homepage-featured products * @description: List all the products associated with a brand, collection or category in a random order. */ getHomeProductsPaginator({ sortOn, pageSize }?: { sortOn?: string; pageSize?: number; - }): Paginator; + }): Paginator; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -301,12 +300,12 @@ declare class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getProductComparisonBySlugs * @summary: List products for comparison * @description: Get all the products that have the same category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductComparisonBySlugs/). */ - getProductComparisonBySlugs({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getProductComparisonBySlugs({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -367,12 +366,12 @@ declare class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getProductStockByIds * @summary: Get product stocks * @description: Get the current stock status for products identified by their IDs, such as SKU, ALU, EAN, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductStockByIds/). */ - getProductStockByIds({ itemId, alu, skuCode, ean, upc, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getProductStockByIds({ itemId, alu, skuCode, ean, upc, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -397,21 +396,21 @@ declare class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getProductVariantsBySlug * @summary: List product variants * @description: Get all available variants of a specific product identified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductVariantsBySlug/). */ - getProductVariantsBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getProductVariantsBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getProducts * @summary: List products * @description: List all products available in the catalog. It supports filtering based on product name, brand, department, category, collection, and more, while also offering sorting options based on factors like price, ratings, discounts, and other relevant criteria. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProducts/). */ - getProducts({ q, f, filters, sortOn, pageId, pageSize, pageNo, pageType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getProducts({ q, f, filters, sortOn, pageId, pageSize, pageNo, pageType, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {Object} arg - Arg object. * @param {string} [arg.q] - The search query for entering partial or full @@ -426,7 +425,7 @@ declare class Catalog { * should be sorted, e.g. popularity, price, latest and discount, in * either ascending or descending order. See the supported values below. * @param {number} [arg.pageSize] - The number of items to retrieve in each page. - * @returns {Paginator} + * @returns {Paginator} * @summary: List products * @description: List all products available in the catalog. It supports filtering based on product name, brand, department, category, collection, and more, while also offering sorting options based on factors like price, ratings, discounts, and other relevant criteria. */ @@ -436,34 +435,34 @@ declare class Catalog { filters?: boolean; sortOn?: string; pageSize?: number; - }): Paginator; + }): Paginator; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSearchResults * @summary: List product, brand, category * @description: Get products, brands, or categories based on a search query, which can be a partial or full name match. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getSearchResults/). */ - getSearchResults({ q, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getSearchResults({ q, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSimilarComparisonProductBySlug * @summary: List similar products * @description: Get all products within the same category as the one specified by the provided slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getSimilarComparisonProductBySlug/). */ - getSimilarComparisonProductBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getSimilarComparisonProductBySlug({ slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getStores * @summary: List available stores * @description: List all stores associated with the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getStores/). */ - getStores({ pageNo, pageSize, q, city, range, latitude, longitude, tags, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getStores({ pageNo, pageSize, q, city, range, latitude, longitude, tags, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {Object} arg - Arg object. * @param {number} [arg.pageSize] - Number of items to retrieve in each page. @@ -476,7 +475,7 @@ declare class Catalog { * @param {number} [arg.longitude] - Longitude of the location from where * one wants to retrieve the nearest stores, e.g. 19.1174114. * @param {string} [arg.tags] - Search stores based on tags. - * @returns {Paginator} + * @returns {Paginator} * @summary: List available stores * @description: List all stores associated with the sales channel. */ @@ -488,15 +487,15 @@ declare class Catalog { latitude?: number; longitude?: number; tags?: string; - }): Paginator; + }): Paginator; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name unfollowById * @summary: Delete item, brand, product * @description: Remove a followed item, brand, or product using its collection ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/unfollowById/). */ - unfollowById({ collectionType, collectionId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + unfollowById({ collectionType, collectionId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; } import Paginator = require("../../common/Paginator"); diff --git a/sdk/application/Catalog/CatalogApplicationClient.js b/sdk/application/Catalog/CatalogApplicationClient.js index ea5d0f1f5..eefbef41b 100644 --- a/sdk/application/Catalog/CatalogApplicationClient.js +++ b/sdk/application/Catalog/CatalogApplicationClient.js @@ -76,7 +76,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name followById * @summary: Create item, brand, product * @description: Add a product, brand, or item to the user's followed list by collection Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/followById/). @@ -113,7 +113,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBrandDetailBySlug * @summary: Get a brand * @description: Get metadata of a brand such as name, information, logo, banner, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getBrandDetailBySlug/). @@ -150,7 +150,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBrands * @summary: List brands * @description: Get a list of all the available brands. Filtering can be applied to the department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getBrands/). @@ -194,7 +194,7 @@ class Catalog { * of available departments below. Also, you can get available departments * from the endpoint /service/application/catalog/v1.0/departments/. * @param {number} [arg.pageSize] - The number of items to retrieve in each page. - * @returns {Paginator} + * @returns {Paginator} * @summary: List brands * @description: Get a list of all the available brands. Filtering can be applied to the department. */ @@ -222,7 +222,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCategories * @summary: List product categories * @description: List all available product categories. Also, users can filter the categories by department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCategories/). @@ -260,7 +260,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCategoryDetailBySlug * @summary: Get category by slug * @description: Get detailed information about a specific product category using its slug and get metadata of a category such as name, information, logo, banner, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCategoryDetailBySlug/). @@ -297,7 +297,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCollectionDetailBySlug * @summary: Get a collection * @description: Get detailed information about a specific collection using its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollectionDetailBySlug/). @@ -334,7 +334,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCollectionItemsBySlug * @summary: Lists items of collection * @description: Fetch items within a particular collection identified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollectionItemsBySlug/). @@ -404,7 +404,7 @@ class Catalog { * should be sorted, e.g. popularity, price, latest and discount, in * either ascending or descending order. See the supported values below. * @param {number} [arg.pageSize] - The number of items to retrieve in each page. - * @returns {Paginator} + * @returns {Paginator} * @summary: Lists items of collection * @description: Fetch items within a particular collection identified by its slug. */ @@ -445,7 +445,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCollections * @summary: List collections * @description: List of curated product collections with filtering options based on tags and collection names. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getCollections/). @@ -488,7 +488,7 @@ class Catalog { * @param {number} [arg.pageSize] - The number of items to retrieve in each page. * @param {string[]} [arg.tag] - List of tags to filter collections. * @param {string} [arg.q] - Name of the collection to filter collection. - * @returns {Paginator} + * @returns {Paginator} * @summary: List collections * @description: List of curated product collections with filtering options based on tags and collection names. */ @@ -517,8 +517,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getComparedFrequentlyProductBySlug * @summary: List frequent products * @description: Get products that are often compared to the product specified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getComparedFrequentlyProductBySlug/). @@ -555,7 +554,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getDepartments * @summary: List departments * @description: List all departments associated with available products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getDepartments/). @@ -592,7 +591,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getFollowIds * @summary: List Ids of followed item, brand, product * @description: Get the IDs of all items the user is currently following, such as Products, Brands, and Collections. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowIds/). @@ -630,7 +629,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getFollowedListing * @summary: List followed products, brands * @description: Get a list of products or brands the user is following. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowedListing/). @@ -673,7 +672,7 @@ class Catalog { * @param {string} arg.collectionType - Type of collection followed, i.e. * products, brands, or collections. * @param {number} [arg.pageSize] - Page ID to retrieve next set of results. - * @returns {Paginator} + * @returns {Paginator} * @summary: List followed products, brands * @description: Get a list of products or brands the user is following. */ @@ -701,7 +700,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getFollowerCountById * @summary: Get follower count * @description: Get the total number of followers for a specific item by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getFollowerCountById/). @@ -738,7 +737,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getHomeProducts * @summary: List homepage-featured products * @description: List all the products associated with a brand, collection or category in a random order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getHomeProducts/). @@ -781,7 +780,7 @@ class Catalog { * should be sorted, e.g. popularity, price, latest and discount, in * either ascending or descending order. * @param {number} [arg.pageSize] - The number of items to retrieve in each page. - * @returns {Paginator} + * @returns {Paginator} * @summary: List homepage-featured products * @description: List all the products associated with a brand, collection or category in a random order. */ @@ -985,7 +984,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getProductComparisonBySlugs * @summary: List products for comparison * @description: Get all the products that have the same category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductComparisonBySlugs/). @@ -1217,7 +1216,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getProductStockByIds * @summary: Get product stocks * @description: Get the current stock status for products identified by their IDs, such as SKU, ALU, EAN, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductStockByIds/). @@ -1328,7 +1327,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getProductVariantsBySlug * @summary: List product variants * @description: Get all available variants of a specific product identified by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductVariantsBySlug/). @@ -1365,7 +1364,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getProducts * @summary: List products * @description: List all products available in the catalog. It supports filtering based on product name, brand, department, category, collection, and more, while also offering sorting options based on factors like price, ratings, discounts, and other relevant criteria. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProducts/). @@ -1431,7 +1430,7 @@ class Catalog { * should be sorted, e.g. popularity, price, latest and discount, in * either ascending or descending order. See the supported values below. * @param {number} [arg.pageSize] - The number of items to retrieve in each page. - * @returns {Paginator} + * @returns {Paginator} * @summary: List products * @description: List all products available in the catalog. It supports filtering based on product name, brand, department, category, collection, and more, while also offering sorting options based on factors like price, ratings, discounts, and other relevant criteria. */ @@ -1464,7 +1463,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSearchResults * @summary: List product, brand, category * @description: Get products, brands, or categories based on a search query, which can be a partial or full name match. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getSearchResults/). @@ -1502,7 +1501,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSimilarComparisonProductBySlug * @summary: List similar products * @description: Get all products within the same category as the one specified by the provided slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getSimilarComparisonProductBySlug/). @@ -1539,7 +1538,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getStores * @summary: List available stores * @description: List all stores associated with the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getStores/). @@ -1603,7 +1602,7 @@ class Catalog { * @param {number} [arg.longitude] - Longitude of the location from where * one wants to retrieve the nearest stores, e.g. 19.1174114. * @param {string} [arg.tags] - Search stores based on tags. - * @returns {Paginator} + * @returns {Paginator} * @summary: List available stores * @description: List all stores associated with the sales channel. */ @@ -1644,7 +1643,7 @@ class Catalog { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name unfollowById * @summary: Delete item, brand, product * @description: Remove a followed item, brand, or product using its collection ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/unfollowById/). diff --git a/sdk/application/Common/CommonApplicationClient.d.ts b/sdk/application/Common/CommonApplicationClient.d.ts index 4d1d83aba..5c441d9d2 100644 --- a/sdk/application/Common/CommonApplicationClient.d.ts +++ b/sdk/application/Common/CommonApplicationClient.d.ts @@ -20,10 +20,10 @@ declare class Common { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name searchApplication * @summary: Get sales channel * @description: Get an active sales channel based on a provided query. The query can be a valid sales channel ID or a verified domain name. If the sales channel is found, a success response is returned. If not, a 404 error response is returned. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/common/searchApplication/). */ - searchApplication({ authorization, query, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + searchApplication({ authorization, query, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; } diff --git a/sdk/application/Common/CommonApplicationClient.js b/sdk/application/Common/CommonApplicationClient.js index 6ac069ee0..12c25a041 100644 --- a/sdk/application/Common/CommonApplicationClient.js +++ b/sdk/application/Common/CommonApplicationClient.js @@ -68,7 +68,7 @@ class Common { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name searchApplication * @summary: Get sales channel * @description: Get an active sales channel based on a provided query. The query can be a valid sales channel ID or a verified domain name. If the sales channel is found, a success response is returned. If not, a 404 error response is returned. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/common/searchApplication/). diff --git a/sdk/application/Configuration/ConfigurationApplicationClient.d.ts b/sdk/application/Configuration/ConfigurationApplicationClient.d.ts index 51365ab88..125c1a33e 100644 --- a/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +++ b/sdk/application/Configuration/ConfigurationApplicationClient.d.ts @@ -25,30 +25,30 @@ declare class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAppCurrencies * @summary: Get currency configuration * @description: Get currency configuration of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getAppCurrencies/). */ - getAppCurrencies({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getAppCurrencies({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAppStaffList * @summary: List staff members * @description: List all staff members of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getAppStaffList/). */ - getAppStaffList({ pageNo, pageSize, orderIncent, orderingStore, user, userName, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getAppStaffList({ pageNo, pageSize, orderIncent, orderingStore, user, userName, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAppStaffs * @summary: Get staff member * @description: Get a staff user including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getAppStaffs/). */ - getAppStaffs({ orderIncent, orderingStore, user, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getAppStaffs({ orderIncent, orderingStore, user, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -79,12 +79,12 @@ declare class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCurrencies * @summary: List currencies * @description: List available currencies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getCurrencies/). */ - getCurrencies({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getCurrencies({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -97,39 +97,39 @@ declare class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getFeatures * @summary: Get sales channel features * @description: Get configuration of the features of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getFeatures/). */ - getFeatures({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getFeatures({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getIntegrationTokens * @summary: Get API tokens * @description: Get tools integration token of the sales channel. For example, Firebase, MoEngage, Segment, GTM, Freshchat, Safetynet, Google Map, and Facebook. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getIntegrationTokens/). */ - getIntegrationTokens({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getIntegrationTokens({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getLanguages * @summary: List languages * @description: List available languages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getLanguages/). */ - getLanguages({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getLanguages({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getOrderingStoreCookie * @summary: Create cookies * @description: Reset cookie of ordering store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getOrderingStoreCookie/). */ - getOrderingStoreCookie({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getOrderingStoreCookie({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -142,12 +142,12 @@ declare class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getOwnerInfo * @summary: Get sales channel owner * @description: Get details of the sales channel owner. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getOwnerInfo/). */ - getOwnerInfo({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getOwnerInfo({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -160,10 +160,10 @@ declare class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name removeOrderingStoreCookie * @summary: Delete store cookie * @description: Delete store cookie. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/removeOrderingStoreCookie/). */ - removeOrderingStoreCookie({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + removeOrderingStoreCookie({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; } diff --git a/sdk/application/Configuration/ConfigurationApplicationClient.js b/sdk/application/Configuration/ConfigurationApplicationClient.js index 096fe13aa..76a1beeca 100644 --- a/sdk/application/Configuration/ConfigurationApplicationClient.js +++ b/sdk/application/Configuration/ConfigurationApplicationClient.js @@ -46,7 +46,7 @@ class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAppCurrencies * @summary: Get currency configuration * @description: Get currency configuration of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getAppCurrencies/). @@ -83,7 +83,7 @@ class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAppStaffList * @summary: List staff members * @description: List all staff members of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getAppStaffList/). @@ -134,7 +134,7 @@ class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAppStaffs * @summary: Get staff member * @description: Get a staff user including the names, employee code, incentive status, assigned ordering stores, and title of each staff added to the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getAppStaffs/). @@ -287,7 +287,7 @@ class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCurrencies * @summary: List currencies * @description: List available currencies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getCurrencies/). @@ -361,7 +361,7 @@ class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getFeatures * @summary: Get sales channel features * @description: Get configuration of the features of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getFeatures/). @@ -398,7 +398,7 @@ class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getIntegrationTokens * @summary: Get API tokens * @description: Get tools integration token of the sales channel. For example, Firebase, MoEngage, Segment, GTM, Freshchat, Safetynet, Google Map, and Facebook. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getIntegrationTokens/). @@ -435,7 +435,7 @@ class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getLanguages * @summary: List languages * @description: List available languages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getLanguages/). @@ -472,7 +472,7 @@ class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getOrderingStoreCookie * @summary: Create cookies * @description: Reset cookie of ordering store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getOrderingStoreCookie/). @@ -549,7 +549,7 @@ class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getOwnerInfo * @summary: Get sales channel owner * @description: Get details of the sales channel owner. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/getOwnerInfo/). @@ -623,7 +623,7 @@ class Configuration { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name removeOrderingStoreCookie * @summary: Delete store cookie * @description: Delete store cookie. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/configuration/removeOrderingStoreCookie/). diff --git a/sdk/application/Content/ContentApplicationClient.d.ts b/sdk/application/Content/ContentApplicationClient.d.ts index f7910f8c8..9878903cc 100644 --- a/sdk/application/Content/ContentApplicationClient.d.ts +++ b/sdk/application/Content/ContentApplicationClient.d.ts @@ -6,8 +6,8 @@ declare class Content { getAnnouncements: string; getBlog: string; getBlogs: string; - getCustomFieldsByResourceId: string; - getCustomObjectBySlug: string; + getCustomFields: string; + getCustomObject: string; getDataLoaders: string; getFaqBySlug: string; getFaqCategories: string; @@ -45,34 +45,34 @@ declare class Content { * @summary: Get a blog * @description: Get information related to a specific blog such as it's contents, author, publish date, SEO related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getBlog/). */ - getBlog({ slug, rootId, preview, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getBlog({ slug, rootId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBlogs * @summary: List blogs * @description: List all the blogs against an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getBlogs/). */ - getBlogs({ pageNo, pageSize, tags, search, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getBlogs({ pageNo, pageSize, tags, search, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getCustomFieldsByResourceId - * @summary: Get list of custom fields of given resource and resource slug - * @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomFieldsByResourceId/). + * @name getCustomFields + * @summary: Get list of custom fields + * @description: List custom fields attached to a particular resource by using the resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomFields/). */ - getCustomFieldsByResourceId({ resource, resourceSlug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getCustomFields({ resource, resourceId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getCustomObjectBySlug - * @summary: Get custom object details - * @description: Details of a custom object entry can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomObjectBySlug/). + * @name getCustomObject + * @summary: Get custom object + * @description: Get details of custom objects, their field details, definitions, and references can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomObject/). */ - getCustomObjectBySlug({ definitionSlug, slug, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getCustomObject({ metaobjectId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -148,12 +148,12 @@ declare class Content { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getNavigations * @summary: List navigation items * @description: Get the navigation link items which can be powered to generate menus on application's website or equivalent mobile apps. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getNavigations/). */ - getNavigations({ pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getNavigations({ pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -166,12 +166,12 @@ declare class Content { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPages * @summary: Lists pages * @description: Lists all Custom Pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getPages/). */ - getPages({ pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getPages({ pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -202,12 +202,22 @@ declare class Content { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSlideshows * @summary: List Slideshows * @description: List slideshows along with their details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSlideshows/). */ - getSlideshows({ pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getSlideshows({ pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + /** + * @param {Object} arg - Arg object. + * @param {number} [arg.pageSize] - The number of items to retrieve in each page. + * @returns {Paginator} + * @summary: List Slideshows + * @description: List slideshows along with their details. + */ + getSlideshowsPaginator({ pageSize }?: { + pageSize?: number; + }): Paginator; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -227,3 +237,4 @@ declare class Content { */ getTags({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; } +import Paginator = require("../../common/Paginator"); diff --git a/sdk/application/Content/ContentApplicationClient.js b/sdk/application/Content/ContentApplicationClient.js index 715669b44..3b1b86935 100644 --- a/sdk/application/Content/ContentApplicationClient.js +++ b/sdk/application/Content/ContentApplicationClient.js @@ -8,11 +8,11 @@ class Content { this._relativeUrls = { getAnnouncements: "/service/application/content/v1.0/announcements", getBlog: "/service/application/content/v1.0/blogs/{slug}", - getBlogs: "/service/application/content/v1.0/blogs", - getCustomFieldsByResourceId: - "/service/application/content/v2.0/customfields/resource/{resource}/{resource_slug}", - getCustomObjectBySlug: - "/service/application/content/v2.0/customobjects/definition/{definition_slug}/entries/{slug}", + getBlogs: "/service/application/content/v1.0/blogs/", + getCustomFields: + "/service/application/content/v1.0/metafields/{resource}/{resource_id}", + getCustomObject: + "/service/application/content/v1.0/metaobjects/{metaobject_id}", getDataLoaders: "/service/application/content/v1.0/data-loader", getFaqBySlug: "/service/application/content/v1.0/faq/{slug}", getFaqCategories: "/service/application/content/v1.0/faq/categories", @@ -23,13 +23,13 @@ class Content { "/service/application/content/v1.0/faq/category/{slug}/faqs", getLandingPage: "/service/application/content/v1.0/landing-page", getLegalInformation: "/service/application/content/v1.0/legal", - getNavigations: "/service/application/content/v1.0/navigations", + getNavigations: "/service/application/content/v1.0/navigations/", getPage: "/service/application/content/v2.0/pages/{slug}", - getPages: "/service/application/content/v2.0/pages", + getPages: "/service/application/content/v2.0/pages/", getSEOConfiguration: "/service/application/content/v1.0/seo", getSEOMarkupSchemas: "/service/application/content/v1.0/seo/schema", getSlideshow: "/service/application/content/v1.0/slideshow/{slug}", - getSlideshows: "/service/application/content/v1.0/slideshow", + getSlideshows: "/service/application/content/v1.0/slideshow/", getSupportInformation: "/service/application/content/v1.0/support", getTags: "/service/application/content/v1.0/tags", }; @@ -95,12 +95,11 @@ class Content { * @description: Get information related to a specific blog such as it's contents, author, publish date, SEO related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getBlog/). */ async getBlog( - { slug, rootId, preview, requestHeaders } = { requestHeaders: {} }, + { slug, rootId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const query_params = {}; query_params["root_id"] = rootId; - query_params["preview"] = preview; const xHeaders = {}; @@ -128,7 +127,7 @@ class Content { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBlogs * @summary: List blogs * @description: List all the blogs against an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getBlogs/). @@ -170,12 +169,12 @@ class Content { * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getCustomFieldsByResourceId - * @summary: Get list of custom fields of given resource and resource slug - * @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomFieldsByResourceId/). + * @name getCustomFields + * @summary: Get list of custom fields + * @description: List custom fields attached to a particular resource by using the resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomFields/). */ - async getCustomFieldsByResourceId( - { resource, resourceSlug, requestHeaders } = { requestHeaders: {} }, + async getCustomFields( + { resource, resourceId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const query_params = {}; @@ -186,8 +185,8 @@ class Content { this._conf, "get", constructUrl({ - url: this._urls["getCustomFieldsByResourceId"], - params: { resource, resourceSlug }, + url: this._urls["getCustomFields"], + params: { resource, resourceId }, }), query_params, undefined, @@ -207,12 +206,12 @@ class Content { * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getCustomObjectBySlug - * @summary: Get custom object details - * @description: Details of a custom object entry can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomObjectBySlug/). + * @name getCustomObject + * @summary: Get custom object + * @description: Get details of custom objects, their field details, definitions, and references can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomObject/). */ - async getCustomObjectBySlug( - { definitionSlug, slug, requestHeaders } = { requestHeaders: {} }, + async getCustomObject( + { metaobjectId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const query_params = {}; @@ -223,8 +222,8 @@ class Content { this._conf, "get", constructUrl({ - url: this._urls["getCustomObjectBySlug"], - params: { definitionSlug, slug }, + url: this._urls["getCustomObject"], + params: { metaobjectId }, }), query_params, undefined, @@ -539,7 +538,7 @@ class Content { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getNavigations * @summary: List navigation items * @description: Get the navigation link items which can be powered to generate menus on application's website or equivalent mobile apps. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getNavigations/). @@ -616,7 +615,7 @@ class Content { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPages * @summary: Lists pages * @description: Lists all Custom Pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getPages/). @@ -768,7 +767,7 @@ class Content { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSlideshows * @summary: List Slideshows * @description: List slideshows along with their details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSlideshows/). @@ -804,6 +803,33 @@ class Content { return response; } + /** + * @param {Object} arg - Arg object. + * @param {number} [arg.pageSize] - The number of items to retrieve in each page. + * @returns {Paginator} + * @summary: List Slideshows + * @description: List slideshows along with their details. + */ + getSlideshowsPaginator({ pageSize } = {}) { + const paginator = new Paginator(); + const callback = async () => { + const pageId = paginator.nextId; + const pageNo = paginator.pageNo; + const pageType = "number"; + const data = await this.getSlideshows({ + pageNo: pageNo, + pageSize: pageSize, + }); + paginator.setPaginator({ + hasNext: data.page.has_next ? true : false, + nextId: data.page.next_id, + }); + return data; + }; + paginator.setCallback(callback.bind(this)); + return paginator; + } + /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options diff --git a/sdk/application/FileStorage/FileStorageApplicationClient.d.ts b/sdk/application/FileStorage/FileStorageApplicationClient.d.ts index 209d83b42..7b275f86c 100644 --- a/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +++ b/sdk/application/FileStorage/FileStorageApplicationClient.d.ts @@ -12,30 +12,30 @@ declare class FileStorage { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name completeUpload - * @summary: Finalizes upload process. + * @summary: Complete file upload * @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/completeUpload/). */ - completeUpload({ namespace, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + completeUpload({ namespace, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name signUrls - * @summary: Signs file URLs. + * @summary: Get signed URLs * @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/signUrls/). */ - signUrls({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + signUrls({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name startUpload * @summary: Initiates file upload * @description: Starts the process of uploading a file to storage location, and returns a signed url in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/startUpload/). */ - startUpload({ namespace, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + startUpload({ namespace, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param data * @param {string} file_name diff --git a/sdk/application/FileStorage/FileStorageApplicationClient.js b/sdk/application/FileStorage/FileStorageApplicationClient.js index 4d5c4e1f8..78c9c0490 100644 --- a/sdk/application/FileStorage/FileStorageApplicationClient.js +++ b/sdk/application/FileStorage/FileStorageApplicationClient.js @@ -9,10 +9,10 @@ class FileStorage { this._conf = _conf; this._relativeUrls = { completeUpload: - "/service/application/assets/v2.0/namespaces/{namespace}/upload/complete", + "/service/application/assets/v1.0/namespaces/{namespace}/upload/complete", signUrls: "/service/application/assets/v1.0/sign-urls", startUpload: - "/service/application/assets/v2.0/namespaces/{namespace}/upload/start", + "/service/application/assets/v1.0/namespaces/{namespace}/upload/start", }; this._urls = Object.entries(this._relativeUrls).reduce( (urls, [method, relativeUrl]) => { @@ -33,9 +33,9 @@ class FileStorage { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name completeUpload - * @summary: Finalizes upload process. + * @summary: Complete file upload * @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/completeUpload/). */ async completeUpload( @@ -70,9 +70,9 @@ class FileStorage { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name signUrls - * @summary: Signs file URLs. + * @summary: Get signed URLs * @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/signUrls/). */ async signUrls( @@ -107,7 +107,7 @@ class FileStorage { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name startUpload * @summary: Initiates file upload * @description: Starts the process of uploading a file to storage location, and returns a signed url in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/filestorage/startUpload/). diff --git a/sdk/application/Finance/FinanceApplicationClient.d.ts b/sdk/application/Finance/FinanceApplicationClient.d.ts deleted file mode 100644 index f12757303..000000000 --- a/sdk/application/Finance/FinanceApplicationClient.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export = Finance; -declare class Finance { - constructor(_conf: any); - _conf: any; - _relativeUrls: { - customerCreditBalance: string; - lockUnlockCreditNote: string; - }; - _urls: {}; - updateUrls(urls: any): void; - /** - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name customerCreditBalance - * @summary: This API will provide customer's credit balance against phone number or email and seller*affiliate id - * @description: This API will provide customer's credit balance against phone number or email and seller*affiliate id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/finance/customerCreditBalance/). - */ - customerCreditBalance({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; - /** - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name lockUnlockCreditNote - * @summary: Lock or Unlock requested credit note. - * @description: Used to lock or unlock requested credit note. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/finance/lockUnlockCreditNote/). - */ - lockUnlockCreditNote({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; -} diff --git a/sdk/application/Finance/FinanceApplicationClient.js b/sdk/application/Finance/FinanceApplicationClient.js deleted file mode 100644 index 8e82f53a8..000000000 --- a/sdk/application/Finance/FinanceApplicationClient.js +++ /dev/null @@ -1,105 +0,0 @@ -const ApplicationAPIClient = require("../ApplicationAPIClient"); -const constructUrl = require("../constructUrl"); -const Paginator = require("../../common/Paginator"); - -class Finance { - constructor(_conf) { - this._conf = _conf; - this._relativeUrls = { - customerCreditBalance: - "/service/application/finance/v1.0/customer-credit-balance", - lockUnlockCreditNote: - "/service/application/finance/v1.0/lock-unlock-credit-note", - }; - this._urls = Object.entries(this._relativeUrls).reduce( - (urls, [method, relativeUrl]) => { - urls[method] = `${_conf.domain}${relativeUrl}`; - return urls; - }, - {} - ); - } - - updateUrls(urls) { - this._urls = { - ...this._urls, - ...urls, - }; - } - - /** - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name customerCreditBalance - * @summary: This API will provide customer's credit balance against phone number or email and seller*affiliate id - * @description: This API will provide customer's credit balance against phone number or email and seller*affiliate id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/finance/customerCreditBalance/). - */ - async customerCreditBalance( - { body, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const query_params = {}; - - const xHeaders = {}; - - const response = await ApplicationAPIClient.execute( - this._conf, - "post", - constructUrl({ - url: this._urls["customerCreditBalance"], - params: {}, - }), - query_params, - body, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - return response; - } - - /** - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name lockUnlockCreditNote - * @summary: Lock or Unlock requested credit note. - * @description: Used to lock or unlock requested credit note. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/finance/lockUnlockCreditNote/). - */ - async lockUnlockCreditNote( - { body, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const query_params = {}; - - const xHeaders = {}; - - const response = await ApplicationAPIClient.execute( - this._conf, - "post", - constructUrl({ - url: this._urls["lockUnlockCreditNote"], - params: {}, - }), - query_params, - body, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - return response; - } -} - -module.exports = Finance; diff --git a/sdk/application/Lead/LeadApplicationClient.d.ts b/sdk/application/Lead/LeadApplicationClient.d.ts index 259b926b5..62814258d 100644 --- a/sdk/application/Lead/LeadApplicationClient.d.ts +++ b/sdk/application/Lead/LeadApplicationClient.d.ts @@ -50,10 +50,10 @@ declare class Lead { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name submitCustomForm * @summary: Submits form data * @description: Create user-entered data from a custom form for processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/submitCustomForm/). */ - submitCustomForm({ slug, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + submitCustomForm({ slug, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; } diff --git a/sdk/application/Lead/LeadApplicationClient.js b/sdk/application/Lead/LeadApplicationClient.js index 697980623..bdf68db62 100644 --- a/sdk/application/Lead/LeadApplicationClient.js +++ b/sdk/application/Lead/LeadApplicationClient.js @@ -179,7 +179,7 @@ class Lead { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name submitCustomForm * @summary: Submits form data * @description: Create user-entered data from a custom form for processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/lead/submitCustomForm/). diff --git a/sdk/application/Logistic/LogisticApplicationClient.d.ts b/sdk/application/Logistic/LogisticApplicationClient.d.ts index 49c5479b3..0833ce972 100644 --- a/sdk/application/Logistic/LogisticApplicationClient.d.ts +++ b/sdk/application/Logistic/LogisticApplicationClient.d.ts @@ -6,8 +6,6 @@ declare class Logistic { getAllCountries: string; getCountries: string; getCountry: string; - getCourierPartners: string; - getDeliveryPromise: string; getLocalities: string; getLocality: string; getLocations: string; @@ -22,12 +20,12 @@ declare class Logistic { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAllCountries * @summary: Get deliverable countries * @description: Get a list of countries within the specified delivery zones for that application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getAllCountries/). */ - getAllCountries({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getAllCountries({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -36,7 +34,7 @@ declare class Logistic { * @summary: Get countries * @description: List of supported countries. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountries/). */ - getCountries({ onboarding, pageNo, pageSize, q, hierarchy, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getCountries({ onboarding, pageNo, pageSize, q, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -46,24 +44,6 @@ declare class Logistic { * @description: Get details about a particular country and its address format customized for different business scenarios. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountry/). */ getCountry({ countryIsoCode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; - /** - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getCourierPartners - * @summary: Serviceable Courier Partners. - * @description: Get all the serviceable courier partners of a destination and the shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCourierPartners/). - */ - getCourierPartners({ companyId, applicationId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; - /** - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getDeliveryPromise - * @summary: Get delivery promise - * @description: Get delivery promises for both global and store levels based on a specific locality type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getDeliveryPromise/). - */ - getDeliveryPromise({ pageNo, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -85,55 +65,55 @@ declare class Logistic { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getLocations * @summary: Get available selling locations * @description: Get stores available for the application based on Delivery Zones and Order Orchestration rules. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocations/). */ - getLocations({ xApplicationId, xApplicationData, country, state, city, pincode, sector, pageNo, pageSize, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getLocations({ xApplicationId, xApplicationData, country, state, city, pincode, sector, pageNo, pageSize, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getOptimalLocations * @summary: Get selling locations * @description: Get optimal fulfillment centre for customers by analyzing their location, product availability, and inventory levels. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getOptimalLocations/). */ - getOptimalLocations({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getOptimalLocations({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPincodeCity * @summary: Get pincode details * @description: Get details of a specific pincode, such as obtaining its city and state information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getPincodeCity/). */ - getPincodeCity({ pincode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getPincodeCity({ pincode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPincodeZones * @summary: Get zones * @description: Get the delivery zone associated with a given pincode. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getPincodeZones/). */ - getPincodeZones({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getPincodeZones({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getTatProduct * @summary: Get product's turnaround time * @description: Get the estimated delivery time frame for a specific product from a designated store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getTatProduct/). */ - getTatProduct({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getTatProduct({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name validateAddress * @summary: Validate address * @description: Validate addresses using specific templates customized for each country and tailored to various business scenarios. This validation ensures that the data conforms to the information currently stored in the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/validateAddress/). */ - validateAddress({ countryIsoCode, templateName, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + validateAddress({ countryIsoCode, templateName, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; } diff --git a/sdk/application/Logistic/LogisticApplicationClient.js b/sdk/application/Logistic/LogisticApplicationClient.js index d6f8ffb7b..dab7acd44 100644 --- a/sdk/application/Logistic/LogisticApplicationClient.js +++ b/sdk/application/Logistic/LogisticApplicationClient.js @@ -10,10 +10,6 @@ class Logistic { getCountries: "/service/application/logistics/v2.0/countries", getCountry: "/service/application/logistics/v1.0/countries/{country_iso_code}", - getCourierPartners: - "/service/application/logistics/v1.0/company/{company_id}/application/{application_id}/shipment/courier-partners", - getDeliveryPromise: - "/service/application/logistics/v1.0/delivery-promise", getLocalities: "/service/application/logistics/v1.0/localities/{locality_type}", getLocality: @@ -46,7 +42,7 @@ class Logistic { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAllCountries * @summary: Get deliverable countries * @description: Get a list of countries within the specified delivery zones for that application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getAllCountries/). @@ -89,7 +85,7 @@ class Logistic { * @description: List of supported countries. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountries/). */ async getCountries( - { onboarding, pageNo, pageSize, q, hierarchy, requestHeaders } = { + { onboarding, pageNo, pageSize, q, requestHeaders } = { requestHeaders: {}, }, { responseHeaders } = { responseHeaders: false } @@ -99,7 +95,6 @@ class Logistic { query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; query_params["q"] = q; - query_params["hierarchy"] = hierarchy; const xHeaders = {}; @@ -161,82 +156,6 @@ class Logistic { return response; } - /** - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getCourierPartners - * @summary: Serviceable Courier Partners. - * @description: Get all the serviceable courier partners of a destination and the shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCourierPartners/). - */ - async getCourierPartners( - { companyId, applicationId, body, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const query_params = {}; - - const xHeaders = {}; - - const response = await ApplicationAPIClient.execute( - this._conf, - "post", - constructUrl({ - url: this._urls["getCourierPartners"], - params: { companyId, applicationId }, - }), - query_params, - body, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - return response; - } - - /** - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getDeliveryPromise - * @summary: Get delivery promise - * @description: Get delivery promises for both global and store levels based on a specific locality type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getDeliveryPromise/). - */ - async getDeliveryPromise( - { pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const query_params = {}; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; - - const xHeaders = {}; - - const response = await ApplicationAPIClient.execute( - this._conf, - "get", - constructUrl({ - url: this._urls["getDeliveryPromise"], - params: {}, - }), - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - return response; - } - /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -334,7 +253,7 @@ class Logistic { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getLocations * @summary: Get available selling locations * @description: Get stores available for the application based on Delivery Zones and Order Orchestration rules. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocations/). @@ -391,7 +310,7 @@ class Logistic { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getOptimalLocations * @summary: Get selling locations * @description: Get optimal fulfillment centre for customers by analyzing their location, product availability, and inventory levels. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getOptimalLocations/). @@ -428,7 +347,7 @@ class Logistic { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPincodeCity * @summary: Get pincode details * @description: Get details of a specific pincode, such as obtaining its city and state information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getPincodeCity/). @@ -465,7 +384,7 @@ class Logistic { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPincodeZones * @summary: Get zones * @description: Get the delivery zone associated with a given pincode. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getPincodeZones/). @@ -502,7 +421,7 @@ class Logistic { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getTatProduct * @summary: Get product's turnaround time * @description: Get the estimated delivery time frame for a specific product from a designated store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getTatProduct/). @@ -539,7 +458,7 @@ class Logistic { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name validateAddress * @summary: Validate address * @description: Validate addresses using specific templates customized for each country and tailored to various business scenarios. This validation ensures that the data conforms to the information currently stored in the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/validateAddress/). diff --git a/sdk/application/Order/OrderApplicationClient.d.ts b/sdk/application/Order/OrderApplicationClient.d.ts index 6e5d70c49..7f4ac47de 100644 --- a/sdk/application/Order/OrderApplicationClient.d.ts +++ b/sdk/application/Order/OrderApplicationClient.d.ts @@ -7,7 +7,6 @@ declare class Order { getInvoiceByShipmentId: string; getOrderById: string; getOrders: string; - getPosOrderById: string; getShipmentBagReasons: string; getShipmentById: string; getShipmentReasons: string; @@ -21,12 +20,12 @@ declare class Order { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCustomerDetailsByShipmentId * @summary: Get shipment's customer * @description: Get customer details such as mobile number using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getCustomerDetailsByShipmentId/). */ - getCustomerDetailsByShipmentId({ orderId, shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getCustomerDetailsByShipmentId({ orderId, shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -54,22 +53,13 @@ declare class Order { * @description: Get all orders associated with a customer account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrders/). */ getOrders({ status, pageNo, pageSize, fromDate, toDate, startDate, endDate, customMeta, allowInactive, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; - /** - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPosOrderById - * @summary: Retrieves POS order details - * @description: Retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getPosOrderById/). - */ - getPosOrderById({ orderId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options * @returns {Promise} - Success response * @name getShipmentBagReasons - * @summary: Retrieve Reasons for Cancellation and Return journey - * @description: Allows users to retrieve a comprehensive list of reasons for cancellation or returning a shipment. It provides both cancellation and return reasons, with an emphasis on Quality Control (QC) evaluations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentBagReasons/). + * @summary: List bag cancellation reasons + * @description: Get reasons to perform full or partial cancellation of a bag. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentBagReasons/). */ getShipmentBagReasons({ shipmentId, bagId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** @@ -93,12 +83,12 @@ declare class Order { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name sendOtpToShipmentCustomer * @summary: Send OTP to customer * @description: Send OTP to the customer for shipment verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/sendOtpToShipmentCustomer/). */ - sendOtpToShipmentCustomer({ orderId, shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + sendOtpToShipmentCustomer({ orderId, shipmentId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -111,19 +101,19 @@ declare class Order { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateShipmentStatus * @summary: Updates shipment status - * @description: This operation allows for updating the status and properties of a shipment. For example, it allows users to initiate a return by providing reasons and uploading quality check images. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/updateShipmentStatus/). + * @description: Update current status of a specific shipment using its shipment ID. Supports both partial and full transition as per the configured settings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/updateShipmentStatus/). */ - updateShipmentStatus({ shipmentId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + updateShipmentStatus({ shipmentId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyOtpShipmentCustomer * @summary: Verifies OTP - * @description: Verify OTP for getting shipment details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/verifyOtpShipmentCustomer/). + * @description: Verify OTP sent by customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/verifyOtpShipmentCustomer/). */ - verifyOtpShipmentCustomer({ orderId, shipmentId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + verifyOtpShipmentCustomer({ orderId, shipmentId, body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; } diff --git a/sdk/application/Order/OrderApplicationClient.js b/sdk/application/Order/OrderApplicationClient.js index 44ae08ca4..f49f88620 100644 --- a/sdk/application/Order/OrderApplicationClient.js +++ b/sdk/application/Order/OrderApplicationClient.js @@ -12,8 +12,6 @@ class Order { "/service/application/order/v1.0/orders/shipments/{shipment_id}/invoice", getOrderById: "/service/application/order/v1.0/orders/{order_id}", getOrders: "/service/application/order/v1.0/orders", - getPosOrderById: - "/service/application/order/v1.0/orders/pos-order/{order_id}", getShipmentBagReasons: "/service/application/order/v1.0/orders/shipments/{shipment_id}/bags/{bag_id}/reasons", getShipmentById: @@ -48,7 +46,7 @@ class Order { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCustomerDetailsByShipmentId * @summary: Get shipment's customer * @description: Get customer details such as mobile number using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getCustomerDetailsByShipmentId/). @@ -214,50 +212,13 @@ class Order { return response; } - /** - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPosOrderById - * @summary: Retrieves POS order details - * @description: Retrieve a POS order and all its details such as tracking details, shipment, store information using Fynd Order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getPosOrderById/). - */ - async getPosOrderById( - { orderId, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const query_params = {}; - - const xHeaders = {}; - - const response = await ApplicationAPIClient.execute( - this._conf, - "get", - constructUrl({ - url: this._urls["getPosOrderById"], - params: { orderId }, - }), - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - return response; - } - /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options * @returns {Promise} - Success response * @name getShipmentBagReasons - * @summary: Retrieve Reasons for Cancellation and Return journey - * @description: Allows users to retrieve a comprehensive list of reasons for cancellation or returning a shipment. It provides both cancellation and return reasons, with an emphasis on Quality Control (QC) evaluations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentBagReasons/). + * @summary: List bag cancellation reasons + * @description: Get reasons to perform full or partial cancellation of a bag. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentBagReasons/). */ async getShipmentBagReasons( { shipmentId, bagId, requestHeaders } = { requestHeaders: {} }, @@ -366,7 +327,7 @@ class Order { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name sendOtpToShipmentCustomer * @summary: Send OTP to customer * @description: Send OTP to the customer for shipment verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/sendOtpToShipmentCustomer/). @@ -440,10 +401,10 @@ class Order { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateShipmentStatus * @summary: Updates shipment status - * @description: This operation allows for updating the status and properties of a shipment. For example, it allows users to initiate a return by providing reasons and uploading quality check images. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/updateShipmentStatus/). + * @description: Update current status of a specific shipment using its shipment ID. Supports both partial and full transition as per the configured settings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/updateShipmentStatus/). */ async updateShipmentStatus( { shipmentId, body, requestHeaders } = { requestHeaders: {} }, @@ -477,10 +438,10 @@ class Order { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyOtpShipmentCustomer * @summary: Verifies OTP - * @description: Verify OTP for getting shipment details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/verifyOtpShipmentCustomer/). + * @description: Verify OTP sent by customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/verifyOtpShipmentCustomer/). */ async verifyOtpShipmentCustomer( { orderId, shipmentId, body, requestHeaders } = { requestHeaders: {} }, diff --git a/sdk/application/Payment/PaymentApplicationClient.d.ts b/sdk/application/Payment/PaymentApplicationClient.d.ts index 0f530b54b..0e148c254 100644 --- a/sdk/application/Payment/PaymentApplicationClient.d.ts +++ b/sdk/application/Payment/PaymentApplicationClient.d.ts @@ -55,129 +55,129 @@ declare class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addBeneficiaryDetails * @summary: Add beneficiary for refund * @description: Add beneficiary details specifically for refund transactions, including account holder name, account number and bank details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/addBeneficiaryDetails/). */ - addBeneficiaryDetails({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + addBeneficiaryDetails({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addRefundBankAccountUsingOTP * @summary: Add refund account using OTP verification * @description: Add bank account specifically for refunds, employing OTP verification for security. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/addRefundBankAccountUsingOTP/). */ - addRefundBankAccountUsingOTP({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + addRefundBankAccountUsingOTP({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name attachCardToCustomer * @summary: Link payment card to customer * @description: Link payment card to a user account for seamless transactions. Upon successful linking, the card becomes associated with the user's profile, enabling secure and convenient payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/attachCardToCustomer/). */ - attachCardToCustomer({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + attachCardToCustomer({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name cancelPaymentLink * @summary: Cancel payment link * @description: Cancel previously generated payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cancelPaymentLink/). */ - cancelPaymentLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + cancelPaymentLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name cardDetails * @summary: Get card details * @description: Get details of a specified payment card, including information such as the card type, brand, country, and expiration date. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cardDetails/). */ - cardDetails({ cardInfo, aggregator, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + cardDetails({ cardInfo, aggregator, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name checkAndUpdatePaymentStatus * @summary: Update payment status * @description: Polling process to confirm the payment status. It periodically checks and updates the current status of a payment, ensuring timely and accurate confirmation of payment transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkAndUpdatePaymentStatus/). */ - checkAndUpdatePaymentStatus({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + checkAndUpdatePaymentStatus({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name checkAndUpdatePaymentStatusPaymentLink * @summary: Update payment link status * @description: Verify and update status of a payment made through a link.Upon successful verification and update, the response includes details about the aggregator name, payment status, and whether retrying the process is required. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkAndUpdatePaymentStatusPaymentLink/). */ - checkAndUpdatePaymentStatusPaymentLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + checkAndUpdatePaymentStatusPaymentLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name checkCredit * @summary: Verify credit availability and status * @description: Check the availability and status of customer credit, providing the status of payment along with registration information and signup URL if the customer is not registered. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkCredit/). */ - checkCredit({ aggregator, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + checkCredit({ aggregator, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createOrderHandlerPaymentLink * @summary: Create order for payment via link * @description: Initiate the creation of an order handler for processing payments through a link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createOrderHandlerPaymentLink/). */ - createOrderHandlerPaymentLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + createOrderHandlerPaymentLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createPaymentLink * @summary: Create payment link * @description: Create new payment link for transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentLink/). */ - createPaymentLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + createPaymentLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createPaymentOrder * @summary: Create Order * @description: Create an order and payment on the aggregator side. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentOrder/). */ - createPaymentOrder({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + createPaymentOrder({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name customerCreditSummary * @summary: Credit summary * @description: Get summary of the customer's credit information, including details such as merchant customer reference ID, status, balance, limit, due amount, used amount, due date, days overdue, total due amount, and a repayment URL. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/customerCreditSummary/). */ - customerCreditSummary({ aggregator, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + customerCreditSummary({ aggregator, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name customerOnboard * @summary: Onboard customer for payment * @description: Initiate the onboarding process for payment services, providing personal, business, and device information, along with marketplace details, to enable customer registration and credit availability. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/customerOnboard/). */ - customerOnboard({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + customerOnboard({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteUserCard * @summary: Delete customer card * @description: Delete payment card from the user's account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/deleteUserCard/). */ - deleteUserCard({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + deleteUserCard({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -190,138 +190,138 @@ declare class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name enableOrDisableRefundTransferMode * @summary: Toggle refund mode * @description: Enable/Disable a particular refund transfer mode based on the request body parameters, indicating whether the mode should be enabled or disabled. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/enableOrDisableRefundTransferMode/). */ - enableOrDisableRefundTransferMode({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + enableOrDisableRefundTransferMode({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getActiveCardAggregator * @summary: Retrieve active card aggregator * @description: Get details about the active card aggregator used by the user, including the aggregator name.You can refresh the data by setting the 'refresh' parameter to true if needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveCardAggregator/). */ - getActiveCardAggregator({ refresh, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getActiveCardAggregator({ refresh, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getActiveRefundTransferModes * @summary: Get refund transfer modes * @description: Lists available refund modes, such as UPI, providing details like display name, logo, and ID for each mode. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveRefundTransferModes/). */ - getActiveRefundTransferModes({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getActiveRefundTransferModes({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getActiveUserCards * @summary: Get customer cards * @description: List all active cards saved by the user.Includes details such as the card's aggregator name, card ID, token, reference, number, expiration date, type, issuer, brand, nickname, and whether it has expired. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveUserCards/). */ - getActiveUserCards({ forceRefresh, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getActiveUserCards({ forceRefresh, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAggregatorsConfig * @summary: Get payment aggregators * @description: Get aggregator secret key of all payment gateways utilized for payments when using the SDK for the payment gateway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getAggregatorsConfig/). */ - getAggregatorsConfig({ xApiToken, refresh, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getAggregatorsConfig({ xApiToken, refresh, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getEpaylaterBannerDetails * @summary: Epaylater banner info * @description: Get Epaylater payment banner details. It provides information about the banner's display status, along with relevant messages and the user's registration status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getEpaylaterBannerDetails/). */ - getEpaylaterBannerDetails({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getEpaylaterBannerDetails({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getOrderBeneficiariesDetail * @summary: Retrieve beneficiary details * @description: Get beneficiary details like bank name , ifsc code , branch name associated with a specific order for refund processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getOrderBeneficiariesDetail/). */ - getOrderBeneficiariesDetail({ orderId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getOrderBeneficiariesDetail({ orderId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPaymentLink * @summary: Get payment link * @description: Get a generated payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentLink/). */ - getPaymentLink({ paymentLinkId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getPaymentLink({ paymentLinkId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPaymentModeRoutes * @summary: Get payment modes * @description: Get available payment methods on the payment page, specifying the aggregator for each option, such as 'Netbanking powered by Juspay' and 'Card powered by Razorpay'. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentModeRoutes/). */ - getPaymentModeRoutes({ amount, cartId, checkoutMode, refresh, orderId, cardReference, userDetails, displaySplit, advancePayment, shipmentId, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getPaymentModeRoutes({ amount, cartId, checkoutMode, refresh, orderId, cardReference, userDetails, displaySplit, advancePayment, shipmentId, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPaymentModeRoutesPaymentLink * @summary: Payment modes for payment link * @description: List payment modes available for a given payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentModeRoutesPaymentLink/). */ - getPaymentModeRoutesPaymentLink({ paymentLinkId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getPaymentModeRoutesPaymentLink({ paymentLinkId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPosPaymentModeRoutes * @summary: POS payment modes * @description: Get available payment methods on the payment page for POS, specifying the aggregator for each option, such as 'CARD powered by Juspay' and 'QR powered by Razorpay'. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPosPaymentModeRoutes/). */ - getPosPaymentModeRoutes({ amount, cartId, pincode, orderType, checkoutMode, refresh, cardReference, userDetails, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getPosPaymentModeRoutes({ amount, pincode, orderType, cartId, checkoutMode, refresh, cardReference, userDetails, requestHeaders, }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getRupifiBannerDetails * @summary: Rupifi banner info * @description: Get Rupifi payment banner details. It provides information such as the KYC URL and the current status of the Rupifi payment banner. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getRupifiBannerDetails/). */ - getRupifiBannerDetails({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getRupifiBannerDetails({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getUserBeneficiariesDetail * @summary: Retrieve beneficiary details * @description: Get beneficiaries associated with the user for processing refunds, based on the provided order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getUserBeneficiariesDetail/). */ - getUserBeneficiariesDetail({ orderId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getUserBeneficiariesDetail({ orderId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name initialisePayment * @summary: Start payment process * @description: Initiate the payment procedure for an order. Upon successful initiation, it returns a details including the success status, aggregator information, payment method, status, merchant order ID aggregator order , polling URL, timeout, virtual ID, Razorpay payment ID, customer ID, and device ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/initialisePayment/). */ - initialisePayment({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + initialisePayment({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name initialisePaymentPaymentLink * @summary: Initialize payment link * @description: Begin payment process for an order by initializing it through a payment link.Upon successful initialization, the response includes details about the payment status, aggregator details, order IDs, polling URL for status updates, and other relevant information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/initialisePaymentPaymentLink/). */ - initialisePaymentPaymentLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + initialisePaymentPaymentLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -334,129 +334,129 @@ declare class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name outstandingOrderDetails * @summary: Outstanding orders * @description: Get details of orders with outstanding payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/outstandingOrderDetails/). */ - outstandingOrderDetails({ aggregator, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + outstandingOrderDetails({ aggregator, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name paidOrderDetails * @summary: Retrieve details of paid orders * @description: Get details of orders that have been paid for, including shipment ID, order ID, due date, payment date, amount, and transaction ID, based on the aggregator merchant user ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/paidOrderDetails/). */ - paidOrderDetails({ aggregator, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + paidOrderDetails({ aggregator, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name pollingPaymentLink * @summary: Poll status of payment link * @description: Get real-time information about the payment link's current status, such as whether it has been processed, cancelled, or expired. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/pollingPaymentLink/). */ - pollingPaymentLink({ paymentLinkId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + pollingPaymentLink({ paymentLinkId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name redirectToAggregator * @summary: Redirects users to the payment aggregator's interface - * @description: This endpoint is used to redirect users to the payment aggregator's platform where they can complete the payment process. The request may include necessary details for initiating the payment on the aggregator’s side, and the user is transferred seamlessly to their interface. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/redirectToAggregator/). + * @description: Get details about the active card aggregator used by the user, including the aggregator's name. You can refresh the data by setting the 'refresh' parameter to true if needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/redirectToAggregator/). */ - redirectToAggregator({ aggregator, source, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + redirectToAggregator({ source, aggregator, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name renderHTML * @summary: Render HTML * @description: Render HTML for a payment aggregator page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/renderHTML/). */ - renderHTML({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + renderHTML({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name resendOrCancelPayment * @summary: Resend or cancel a pending payment transaction * @description: Resend or cancel payment link that have been initiated but may require modification or cancellation for various reasons, ensuring flexibility and control in payment processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/resendOrCancelPayment/). */ - resendOrCancelPayment({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + resendOrCancelPayment({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name resendPaymentLink * @summary: Resend payment link * @description: Resend an existing payment link to the user to complete the payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/resendPaymentLink/). */ - resendPaymentLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + resendPaymentLink({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateDefaultBeneficiary * @summary: Set default beneficiary for refund * @description: Update default beneficiary for the order refund of the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/updateDefaultBeneficiary/). */ - updateDefaultBeneficiary({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + updateDefaultBeneficiary({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name validateVPA * @summary: Validate VPA * @description: Validate if a Virtual Payment Address (VPA) is valid for processing payments and returns the validation result.is_valid boolean value indicating whether the VPA is valid for payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/validateVPA/). */ - validateVPA({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + validateVPA({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyAndChargePayment * @summary: Verify order confirmation and charge * @description: Verify the payment status and charge from the customer's BNPL (Buy Now, Pay Later) account after order confirmation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyAndChargePayment/). */ - verifyAndChargePayment({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + verifyAndChargePayment({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyCustomerForPayment * @summary: Verify payment customer * @description: Verify if the user is eligible for pay-later payment from the payment aggregator side using the customer's phone number. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyCustomerForPayment/). */ - verifyCustomerForPayment({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + verifyCustomerForPayment({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyIfscCode * @summary: Verify IFSC * @description: Validate IFSC code and returns bank details if valid. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyIfscCode/). */ - verifyIfscCode({ ifscCode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + verifyIfscCode({ ifscCode, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyOtpAndAddBeneficiaryForBank * @summary: Verify OTP for bank and add beneficiary * @description: Verify the OTP provided by the user and adds a bank beneficiary for refund processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyOtpAndAddBeneficiaryForBank/). */ - verifyOtpAndAddBeneficiaryForBank({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + verifyOtpAndAddBeneficiaryForBank({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyOtpAndAddBeneficiaryForWallet * @summary: Verify OTP for wallet * @description: Verify OTP provided by the user and adds a wallet beneficiary. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyOtpAndAddBeneficiaryForWallet/). */ - verifyOtpAndAddBeneficiaryForWallet({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + verifyOtpAndAddBeneficiaryForWallet({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options diff --git a/sdk/application/Payment/PaymentApplicationClient.js b/sdk/application/Payment/PaymentApplicationClient.js index ad10b5836..353b6448b 100644 --- a/sdk/application/Payment/PaymentApplicationClient.js +++ b/sdk/application/Payment/PaymentApplicationClient.js @@ -103,7 +103,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addBeneficiaryDetails * @summary: Add beneficiary for refund * @description: Add beneficiary details specifically for refund transactions, including account holder name, account number and bank details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/addBeneficiaryDetails/). @@ -140,7 +140,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addRefundBankAccountUsingOTP * @summary: Add refund account using OTP verification * @description: Add bank account specifically for refunds, employing OTP verification for security. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/addRefundBankAccountUsingOTP/). @@ -177,7 +177,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name attachCardToCustomer * @summary: Link payment card to customer * @description: Link payment card to a user account for seamless transactions. Upon successful linking, the card becomes associated with the user's profile, enabling secure and convenient payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/attachCardToCustomer/). @@ -214,7 +214,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name cancelPaymentLink * @summary: Cancel payment link * @description: Cancel previously generated payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cancelPaymentLink/). @@ -251,7 +251,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name cardDetails * @summary: Get card details * @description: Get details of a specified payment card, including information such as the card type, brand, country, and expiration date. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cardDetails/). @@ -289,7 +289,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name checkAndUpdatePaymentStatus * @summary: Update payment status * @description: Polling process to confirm the payment status. It periodically checks and updates the current status of a payment, ensuring timely and accurate confirmation of payment transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkAndUpdatePaymentStatus/). @@ -326,7 +326,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name checkAndUpdatePaymentStatusPaymentLink * @summary: Update payment link status * @description: Verify and update status of a payment made through a link.Upon successful verification and update, the response includes details about the aggregator name, payment status, and whether retrying the process is required. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkAndUpdatePaymentStatusPaymentLink/). @@ -363,7 +363,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name checkCredit * @summary: Verify credit availability and status * @description: Check the availability and status of customer credit, providing the status of payment along with registration information and signup URL if the customer is not registered. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkCredit/). @@ -401,7 +401,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createOrderHandlerPaymentLink * @summary: Create order for payment via link * @description: Initiate the creation of an order handler for processing payments through a link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createOrderHandlerPaymentLink/). @@ -438,7 +438,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createPaymentLink * @summary: Create payment link * @description: Create new payment link for transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentLink/). @@ -475,7 +475,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createPaymentOrder * @summary: Create Order * @description: Create an order and payment on the aggregator side. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentOrder/). @@ -512,7 +512,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name customerCreditSummary * @summary: Credit summary * @description: Get summary of the customer's credit information, including details such as merchant customer reference ID, status, balance, limit, due amount, used amount, due date, days overdue, total due amount, and a repayment URL. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/customerCreditSummary/). @@ -550,7 +550,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name customerOnboard * @summary: Onboard customer for payment * @description: Initiate the onboarding process for payment services, providing personal, business, and device information, along with marketplace details, to enable customer registration and credit availability. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/customerOnboard/). @@ -587,7 +587,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteUserCard * @summary: Delete customer card * @description: Delete payment card from the user's account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/deleteUserCard/). @@ -661,7 +661,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name enableOrDisableRefundTransferMode * @summary: Toggle refund mode * @description: Enable/Disable a particular refund transfer mode based on the request body parameters, indicating whether the mode should be enabled or disabled. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/enableOrDisableRefundTransferMode/). @@ -698,7 +698,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getActiveCardAggregator * @summary: Retrieve active card aggregator * @description: Get details about the active card aggregator used by the user, including the aggregator name.You can refresh the data by setting the 'refresh' parameter to true if needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveCardAggregator/). @@ -736,7 +736,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getActiveRefundTransferModes * @summary: Get refund transfer modes * @description: Lists available refund modes, such as UPI, providing details like display name, logo, and ID for each mode. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveRefundTransferModes/). @@ -773,7 +773,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getActiveUserCards * @summary: Get customer cards * @description: List all active cards saved by the user.Includes details such as the card's aggregator name, card ID, token, reference, number, expiration date, type, issuer, brand, nickname, and whether it has expired. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveUserCards/). @@ -811,7 +811,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAggregatorsConfig * @summary: Get payment aggregators * @description: Get aggregator secret key of all payment gateways utilized for payments when using the SDK for the payment gateway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getAggregatorsConfig/). @@ -850,7 +850,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getEpaylaterBannerDetails * @summary: Epaylater banner info * @description: Get Epaylater payment banner details. It provides information about the banner's display status, along with relevant messages and the user's registration status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getEpaylaterBannerDetails/). @@ -887,7 +887,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getOrderBeneficiariesDetail * @summary: Retrieve beneficiary details * @description: Get beneficiary details like bank name , ifsc code , branch name associated with a specific order for refund processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getOrderBeneficiariesDetail/). @@ -925,7 +925,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPaymentLink * @summary: Get payment link * @description: Get a generated payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentLink/). @@ -963,7 +963,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPaymentModeRoutes * @summary: Get payment modes * @description: Get available payment methods on the payment page, specifying the aggregator for each option, such as 'Netbanking powered by Juspay' and 'Card powered by Razorpay'. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentModeRoutes/). @@ -1022,7 +1022,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPaymentModeRoutesPaymentLink * @summary: Payment modes for payment link * @description: List payment modes available for a given payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentModeRoutesPaymentLink/). @@ -1060,7 +1060,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPosPaymentModeRoutes * @summary: POS payment modes * @description: Get available payment methods on the payment page for POS, specifying the aggregator for each option, such as 'CARD powered by Juspay' and 'QR powered by Razorpay'. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPosPaymentModeRoutes/). @@ -1068,9 +1068,9 @@ class Payment { async getPosPaymentModeRoutes( { amount, - cartId, pincode, orderType, + cartId, checkoutMode, refresh, cardReference, @@ -1115,7 +1115,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getRupifiBannerDetails * @summary: Rupifi banner info * @description: Get Rupifi payment banner details. It provides information such as the KYC URL and the current status of the Rupifi payment banner. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getRupifiBannerDetails/). @@ -1152,7 +1152,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getUserBeneficiariesDetail * @summary: Retrieve beneficiary details * @description: Get beneficiaries associated with the user for processing refunds, based on the provided order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getUserBeneficiariesDetail/). @@ -1190,7 +1190,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name initialisePayment * @summary: Start payment process * @description: Initiate the payment procedure for an order. Upon successful initiation, it returns a details including the success status, aggregator information, payment method, status, merchant order ID aggregator order , polling URL, timeout, virtual ID, Razorpay payment ID, customer ID, and device ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/initialisePayment/). @@ -1227,7 +1227,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name initialisePaymentPaymentLink * @summary: Initialize payment link * @description: Begin payment process for an order by initializing it through a payment link.Upon successful initialization, the response includes details about the payment status, aggregator details, order IDs, polling URL for status updates, and other relevant information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/initialisePaymentPaymentLink/). @@ -1301,7 +1301,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name outstandingOrderDetails * @summary: Outstanding orders * @description: Get details of orders with outstanding payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/outstandingOrderDetails/). @@ -1339,7 +1339,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name paidOrderDetails * @summary: Retrieve details of paid orders * @description: Get details of orders that have been paid for, including shipment ID, order ID, due date, payment date, amount, and transaction ID, based on the aggregator merchant user ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/paidOrderDetails/). @@ -1377,7 +1377,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name pollingPaymentLink * @summary: Poll status of payment link * @description: Get real-time information about the payment link's current status, such as whether it has been processed, cancelled, or expired. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/pollingPaymentLink/). @@ -1415,13 +1415,13 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name redirectToAggregator * @summary: Redirects users to the payment aggregator's interface - * @description: This endpoint is used to redirect users to the payment aggregator's platform where they can complete the payment process. The request may include necessary details for initiating the payment on the aggregator’s side, and the user is transferred seamlessly to their interface. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/redirectToAggregator/). + * @description: Get details about the active card aggregator used by the user, including the aggregator's name. You can refresh the data by setting the 'refresh' parameter to true if needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/redirectToAggregator/). */ async redirectToAggregator( - { aggregator, source, requestHeaders } = { requestHeaders: {} }, + { source, aggregator, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const query_params = {}; @@ -1454,7 +1454,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name renderHTML * @summary: Render HTML * @description: Render HTML for a payment aggregator page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/renderHTML/). @@ -1491,7 +1491,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name resendOrCancelPayment * @summary: Resend or cancel a pending payment transaction * @description: Resend or cancel payment link that have been initiated but may require modification or cancellation for various reasons, ensuring flexibility and control in payment processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/resendOrCancelPayment/). @@ -1528,7 +1528,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name resendPaymentLink * @summary: Resend payment link * @description: Resend an existing payment link to the user to complete the payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/resendPaymentLink/). @@ -1565,7 +1565,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateDefaultBeneficiary * @summary: Set default beneficiary for refund * @description: Update default beneficiary for the order refund of the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/updateDefaultBeneficiary/). @@ -1602,7 +1602,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name validateVPA * @summary: Validate VPA * @description: Validate if a Virtual Payment Address (VPA) is valid for processing payments and returns the validation result.is_valid boolean value indicating whether the VPA is valid for payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/validateVPA/). @@ -1639,7 +1639,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyAndChargePayment * @summary: Verify order confirmation and charge * @description: Verify the payment status and charge from the customer's BNPL (Buy Now, Pay Later) account after order confirmation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyAndChargePayment/). @@ -1676,7 +1676,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyCustomerForPayment * @summary: Verify payment customer * @description: Verify if the user is eligible for pay-later payment from the payment aggregator side using the customer's phone number. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyCustomerForPayment/). @@ -1713,7 +1713,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyIfscCode * @summary: Verify IFSC * @description: Validate IFSC code and returns bank details if valid. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyIfscCode/). @@ -1751,7 +1751,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyOtpAndAddBeneficiaryForBank * @summary: Verify OTP for bank and add beneficiary * @description: Verify the OTP provided by the user and adds a bank beneficiary for refund processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyOtpAndAddBeneficiaryForBank/). @@ -1788,7 +1788,7 @@ class Payment { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyOtpAndAddBeneficiaryForWallet * @summary: Verify OTP for wallet * @description: Verify OTP provided by the user and adds a wallet beneficiary. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyOtpAndAddBeneficiaryForWallet/). diff --git a/sdk/application/Rewards/RewardsApplicationClient.d.ts b/sdk/application/Rewards/RewardsApplicationClient.d.ts index ba3318721..ec8029d08 100644 --- a/sdk/application/Rewards/RewardsApplicationClient.d.ts +++ b/sdk/application/Rewards/RewardsApplicationClient.d.ts @@ -16,12 +16,12 @@ declare class Rewards { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name catalogueOrder * @summary: Order from catalogue - * @description: Place a reward on order items available in the catalogue. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/rewards/catalogueOrder/). + * @description: Place an reward on order items available in the catalogue. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/rewards/catalogueOrder/). */ - catalogueOrder({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + catalogueOrder({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -34,46 +34,46 @@ declare class Rewards { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getOrderDiscount * @summary: Order discount * @description: Retrieve the discount applied to a specific order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/rewards/getOrderDiscount/). */ - getOrderDiscount({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getOrderDiscount({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getUserPoints * @summary: Current points * @description: Retrieves the current reward points balance for the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/rewards/getUserPoints/). */ - getUserPoints({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getUserPoints({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getUserPointsHistory * @summary: Points history * @description: Gets the historical data of points earned or spent by the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/rewards/getUserPointsHistory/). */ - getUserPointsHistory({ pageId, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getUserPointsHistory({ pageId, pageSize, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getUserReferralDetails * @summary: Referral details * @description: Gets the details of the user’s referral status and codes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/rewards/getUserReferralDetails/). */ - getUserReferralDetails({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getUserReferralDetails({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name redeemReferralCode * @summary: Redeem code * @description: Applies a referral code to earn or redeem rewards. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/rewards/redeemReferralCode/). */ - redeemReferralCode({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + redeemReferralCode({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; } diff --git a/sdk/application/Rewards/RewardsApplicationClient.js b/sdk/application/Rewards/RewardsApplicationClient.js index e68d52295..d5d10c9a5 100644 --- a/sdk/application/Rewards/RewardsApplicationClient.js +++ b/sdk/application/Rewards/RewardsApplicationClient.js @@ -38,10 +38,10 @@ class Rewards { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name catalogueOrder * @summary: Order from catalogue - * @description: Place a reward on order items available in the catalogue. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/rewards/catalogueOrder/). + * @description: Place an reward on order items available in the catalogue. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/rewards/catalogueOrder/). */ async catalogueOrder( { body, requestHeaders } = { requestHeaders: {} }, @@ -112,7 +112,7 @@ class Rewards { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getOrderDiscount * @summary: Order discount * @description: Retrieve the discount applied to a specific order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/rewards/getOrderDiscount/). @@ -149,7 +149,7 @@ class Rewards { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getUserPoints * @summary: Current points * @description: Retrieves the current reward points balance for the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/rewards/getUserPoints/). @@ -186,7 +186,7 @@ class Rewards { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getUserPointsHistory * @summary: Points history * @description: Gets the historical data of points earned or spent by the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/rewards/getUserPointsHistory/). @@ -225,7 +225,7 @@ class Rewards { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getUserReferralDetails * @summary: Referral details * @description: Gets the details of the user’s referral status and codes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/rewards/getUserReferralDetails/). @@ -262,7 +262,7 @@ class Rewards { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name redeemReferralCode * @summary: Redeem code * @description: Applies a referral code to earn or redeem rewards. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/rewards/redeemReferralCode/). diff --git a/sdk/application/Theme/ThemeApplicationClient.d.ts b/sdk/application/Theme/ThemeApplicationClient.d.ts index 599e99a51..cc54aa372 100644 --- a/sdk/application/Theme/ThemeApplicationClient.d.ts +++ b/sdk/application/Theme/ThemeApplicationClient.d.ts @@ -27,7 +27,7 @@ declare class Theme { * @summary: Get applied theme * @description: Gets the theme configuration and template details of a theme applied to the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/theme/getAppliedTheme/). */ - getAppliedTheme({ filters, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getAppliedTheme({ requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -45,5 +45,5 @@ declare class Theme { * @summary: Get theme for preview * @description: Gets the theme configuration and template details of a theme by theme id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/theme/getThemeForPreview/). */ - getThemeForPreview({ themeId, filters, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + getThemeForPreview({ themeId, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; } diff --git a/sdk/application/Theme/ThemeApplicationClient.js b/sdk/application/Theme/ThemeApplicationClient.js index 716570dda..eba06bc9d 100644 --- a/sdk/application/Theme/ThemeApplicationClient.js +++ b/sdk/application/Theme/ThemeApplicationClient.js @@ -73,11 +73,10 @@ class Theme { * @description: Gets the theme configuration and template details of a theme applied to the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/theme/getAppliedTheme/). */ async getAppliedTheme( - { filters, requestHeaders } = { requestHeaders: {} }, + { requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const query_params = {}; - query_params["filters"] = filters; const xHeaders = {}; @@ -158,11 +157,10 @@ class Theme { * @description: Gets the theme configuration and template details of a theme by theme id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/theme/getThemeForPreview/). */ async getThemeForPreview( - { themeId, filters, requestHeaders } = { requestHeaders: {} }, + { themeId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const query_params = {}; - query_params["filters"] = filters; const xHeaders = {}; diff --git a/sdk/application/User/UserApplicationClient.d.ts b/sdk/application/User/UserApplicationClient.d.ts index f9ac51699..ba0ab3df1 100644 --- a/sdk/application/User/UserApplicationClient.d.ts +++ b/sdk/application/User/UserApplicationClient.d.ts @@ -205,12 +205,12 @@ declare class User { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name loginWithOTP * @summary: Login with Mobile OTP * @description: Allow users to log in using a one-time password sent to their mobile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithOTP/). */ - loginWithOTP({ body, platform, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + loginWithOTP({ body, platform, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -259,12 +259,12 @@ declare class User { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name sendForgotOTPOnMobile * @summary: Send mobile OTP for forgot-password * @description: Send a one-time password to the user's mobile for verification when resetting a forgotten password. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendForgotOTPOnMobile/). */ - sendForgotOTPOnMobile({ body, platform, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + sendForgotOTPOnMobile({ body, platform, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -277,12 +277,12 @@ declare class User { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name sendOTPOnMobile * @summary: Send OTP on Mobile * @description: Send a one-time password to the user's mobile for verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendOTPOnMobile/). */ - sendOTPOnMobile({ body, platform, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + sendOTPOnMobile({ body, platform, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -351,7 +351,7 @@ declare class User { * @param {import("../ApplicationAPIClient").Options} - Options * @returns {Promise} - Success response * @name updatePassword - * @summary: Update password + * @summary: Update Password * @description: Allow user to change their password. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/updatePassword/). */ updatePassword({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; @@ -376,12 +376,12 @@ declare class User { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name userExists * @summary: Chcek User Existence * @description: Check whether user is already registered or not to the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/userExists/). */ - userExists({ q, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + userExists({ q, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options @@ -432,7 +432,7 @@ declare class User { * @param {import("../ApplicationAPIClient").Options} - Options * @returns {Promise} - Success response * @name verifyMobileOTP - * @summary: Verify mobile OTP + * @summary: Verify Mobile OTP * @description: Verify one-time password sent to user's mobile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/verifyMobileOTP/). */ verifyMobileOTP({ body, platform, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; diff --git a/sdk/application/User/UserApplicationClient.js b/sdk/application/User/UserApplicationClient.js index 637e66aa3..60c14ae7c 100644 --- a/sdk/application/User/UserApplicationClient.js +++ b/sdk/application/User/UserApplicationClient.js @@ -756,7 +756,7 @@ class User { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name loginWithOTP * @summary: Login with Mobile OTP * @description: Allow users to log in using a one-time password sent to their mobile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/loginWithOTP/). @@ -981,7 +981,7 @@ class User { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name sendForgotOTPOnMobile * @summary: Send mobile OTP for forgot-password * @description: Send a one-time password to the user's mobile for verification when resetting a forgotten password. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendForgotOTPOnMobile/). @@ -1057,7 +1057,7 @@ class User { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name sendOTPOnMobile * @summary: Send OTP on Mobile * @description: Send a one-time password to the user's mobile for verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/sendOTPOnMobile/). @@ -1360,7 +1360,7 @@ class User { * @param {import("../ApplicationAPIClient").Options} - Options * @returns {Promise} - Success response * @name updatePassword - * @summary: Update password + * @summary: Update Password * @description: Allow user to change their password. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/updatePassword/). */ async updatePassword( @@ -1470,7 +1470,7 @@ class User { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name userExists * @summary: Chcek User Existence * @description: Check whether user is already registered or not to the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/userExists/). @@ -1698,7 +1698,7 @@ class User { * @param {import("../ApplicationAPIClient").Options} - Options * @returns {Promise} - Success response * @name verifyMobileOTP - * @summary: Verify mobile OTP + * @summary: Verify Mobile OTP * @description: Verify one-time password sent to user's mobile. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/verifyMobileOTP/). */ async verifyMobileOTP( diff --git a/sdk/application/Webhook/WebhookApplicationClient.d.ts b/sdk/application/Webhook/WebhookApplicationClient.d.ts index d3d48404b..6f3ffa13c 100644 --- a/sdk/application/Webhook/WebhookApplicationClient.d.ts +++ b/sdk/application/Webhook/WebhookApplicationClient.d.ts @@ -10,10 +10,10 @@ declare class Webhook { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name saveClickEvent - * @summary: Capture and save click events from various sales channels - * @description: Send click events from various sales channels to enable insightful data collection and analysis. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/webhook/saveClickEvent/). + * @summary: Endpoint to capture click events from sales channels and persist them in database. + * @description: Send click events from sales channels. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/webhook/saveClickEvent/). */ - saveClickEvent({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; + saveClickEvent({ body, requestHeaders }?: object, { responseHeaders }?: import("../ApplicationAPIClient").Options): Promise; } diff --git a/sdk/application/Webhook/WebhookApplicationClient.js b/sdk/application/Webhook/WebhookApplicationClient.js index 3a73d9c1b..a575a1a9b 100644 --- a/sdk/application/Webhook/WebhookApplicationClient.js +++ b/sdk/application/Webhook/WebhookApplicationClient.js @@ -28,10 +28,10 @@ class Webhook { /** * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../ApplicationAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name saveClickEvent - * @summary: Capture and save click events from various sales channels - * @description: Send click events from various sales channels to enable insightful data collection and analysis. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/webhook/saveClickEvent/). + * @summary: Endpoint to capture click events from sales channels and persist them in database. + * @description: Send click events from sales channels. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/webhook/saveClickEvent/). */ async saveClickEvent( { body, requestHeaders } = { requestHeaders: {} }, diff --git a/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts b/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts index 424ff7a94..b3375e4d2 100644 --- a/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +++ b/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts @@ -3,32 +3,12 @@ declare class FileStorage { constructor(config: any); config: any; /** - * @param {FileStoragePartnerValidator.GetAllNamespaceDetailsParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getAllNamespaceDetails - * @summary: Get details of all namespaces - * @description: Retrieve information about all available namespaces - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/getAllNamespaceDetails/). - */ - getAllNamespaceDetails({ requestHeaders }?: FileStoragePartnerValidator.GetAllNamespaceDetailsParam, { responseHeaders }?: object): Promise; - /** - * @param {FileStoragePartnerValidator.GetNamespaceDetailParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getNamespaceDetail - * @summary: Get details of a namespace - * @description: Retrieve information about a specific namespace - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/getNamespaceDetail/). - */ - getNamespaceDetail({ namespace, requestHeaders }?: FileStoragePartnerValidator.GetNamespaceDetailParam, { responseHeaders }?: object): Promise; - /** - * @param {FileStoragePartnerValidator.CompleteUploadParam} arg - Arg object. + * @param {FileStoragePartnerValidator.StartUploadParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name completeUpload - * @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process. + * @returns {Promise} - Success response + * @name startUpload + * @summary: This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob * @description: Uploads an arbitrarily sized buffer or blob. * * It has three Major Steps: @@ -47,16 +27,16 @@ declare class FileStorage { * ### Complete * After successfully upload, call `completeUpload` api to complete the upload process. * This operation will return the url for the uploaded file. - * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/completeUpload/). + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/startUpload/). */ - completeUpload({ namespace, body, requestHeaders }?: FileStoragePartnerValidator.CompleteUploadParam, { responseHeaders }?: object): Promise; + startUpload({ namespace, body, requestHeaders }?: FileStoragePartnerValidator.StartUploadParam, { responseHeaders }?: object): Promise; /** - * @param {FileStoragePartnerValidator.StartUploadParam} arg - Arg object. + * @param {FileStoragePartnerValidator.CompleteUploadParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name startUpload - * @summary: This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob. + * @returns {Promise} - Success response + * @name completeUpload + * @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process * @description: Uploads an arbitrarily sized buffer or blob. * * It has three Major Steps: @@ -75,9 +55,9 @@ declare class FileStorage { * ### Complete * After successfully upload, call `completeUpload` api to complete the upload process. * This operation will return the url for the uploaded file. - * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/startUpload/). + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/completeUpload/). */ - startUpload({ namespace, body, requestHeaders }?: FileStoragePartnerValidator.StartUploadParam, { responseHeaders }?: object): Promise; + completeUpload({ namespace, body, requestHeaders }?: FileStoragePartnerValidator.CompleteUploadParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePartnerValidator.BrowseParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -88,59 +68,5 @@ declare class FileStorage { * @description: Browse Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/browse/). */ browse({ namespace, applicationId, companyId, page, limit, requestHeaders }?: FileStoragePartnerValidator.BrowseParam, { responseHeaders }?: object): Promise; - /** - * @param {FileStoragePartnerValidator.BrowseFilesParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name browseFiles - * @summary: Browse Files - * @description: Browse Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/browseFiles/). - */ - browseFiles({ namespace, page, limit, requestHeaders }?: FileStoragePartnerValidator.BrowseFilesParam, { responseHeaders }?: object): Promise; - /** - * @param {FileStoragePartnerValidator.OrganizationLevelFetchProxyParam} arg - * - Arg object. - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name organizationLevelFetchProxy - * @summary: Proxy - * @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/organizationLevelFetchProxy/). - */ - organizationLevelFetchProxy({ applicationId, companyId, url, requestHeaders }?: FileStoragePartnerValidator.OrganizationLevelFetchProxyParam, { responseHeaders }?: object): Promise; - /** - * @param {FileStoragePartnerValidator.SaveOrganizationLevelProxyParam} arg - * - Arg object. - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name saveOrganizationLevelProxy - * @summary: Proxy - * @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/saveOrganizationLevelProxy/). - */ - saveOrganizationLevelProxy({ applicationId, companyId, body, requestHeaders }?: FileStoragePartnerValidator.SaveOrganizationLevelProxyParam, { responseHeaders }?: object): Promise; - /** - * @param {FileStoragePartnerValidator.FetchProxyParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name fetchProxy - * @summary: Proxy - * @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/fetchProxy/). - */ - fetchProxy({ url, requestHeaders }?: FileStoragePartnerValidator.FetchProxyParam, { responseHeaders }?: object): Promise; - /** - * @param {FileStoragePartnerValidator.SaveProxyDetailsParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name saveProxyDetails - * @summary: Proxy - * @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/saveProxyDetails/). - */ - saveProxyDetails({ body, requestHeaders }?: FileStoragePartnerValidator.SaveProxyDetailsParam, { responseHeaders }?: object): Promise; } import FileStoragePartnerModel = require("./FileStoragePartnerModel"); diff --git a/sdk/partner/FileStorage/FileStoragePartnerClient.js b/sdk/partner/FileStorage/FileStoragePartnerClient.js index 0dcceae24..814cdf204 100644 --- a/sdk/partner/FileStorage/FileStoragePartnerClient.js +++ b/sdk/partner/FileStorage/FileStoragePartnerClient.js @@ -15,162 +15,12 @@ class FileStorage { } /** - * @param {FileStoragePartnerValidator.GetAllNamespaceDetailsParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getAllNamespaceDetails - * @summary: Get details of all namespaces - * @description: Retrieve information about all available namespaces - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/getAllNamespaceDetails/). - */ - async getAllNamespaceDetails( - { requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = FileStoragePartnerValidator.getAllNamespaceDetails().validate( - {}, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = FileStoragePartnerValidator.getAllNamespaceDetails().validate( - {}, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > FileStorage > getAllNamespaceDetails \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PartnerAPIClient.execute( - this.config, - "get", - `/service/partner/assets/v1.0/organization/${this.config.organizationId}/namespaces`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = FileStoragePartnerModel.AllNamespaceDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > FileStorage > getAllNamespaceDetails \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {FileStoragePartnerValidator.GetNamespaceDetailParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getNamespaceDetail - * @summary: Get details of a namespace - * @description: Retrieve information about a specific namespace - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/getNamespaceDetail/). - */ - async getNamespaceDetail( - { namespace, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = FileStoragePartnerValidator.getNamespaceDetail().validate( - { - namespace, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = FileStoragePartnerValidator.getNamespaceDetail().validate( - { namespace }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > FileStorage > getNamespaceDetail \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PartnerAPIClient.execute( - this.config, - "get", - `/service/partner/assets/v1.0/organization/${this.config.organizationId}/namespaces/${namespace}`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = FileStoragePartnerModel.NamespaceDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > FileStorage > getNamespaceDetail \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {FileStoragePartnerValidator.CompleteUploadParam} arg - Arg object. + * @param {FileStoragePartnerValidator.StartUploadParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name completeUpload - * @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process. + * @returns {Promise} - Success response + * @name startUpload + * @summary: This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob * @description: Uploads an arbitrarily sized buffer or blob. * * It has three Major Steps: @@ -189,13 +39,13 @@ class FileStorage { * ### Complete * After successfully upload, call `completeUpload` api to complete the upload process. * This operation will return the url for the uploaded file. - * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/completeUpload/). + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/startUpload/). */ - async completeUpload( + async startUpload( { namespace, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = FileStoragePartnerValidator.completeUpload().validate( + const { error } = FileStoragePartnerValidator.startUpload().validate( { namespace, body, @@ -209,7 +59,7 @@ class FileStorage { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = FileStoragePartnerValidator.completeUpload().validate( + } = FileStoragePartnerValidator.startUpload().validate( { namespace, @@ -220,7 +70,7 @@ class FileStorage { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for partner > FileStorage > completeUpload \n ${warrning}`, + message: `Parameter Validation warrnings for partner > FileStorage > startUpload \n ${warrning}`, }); } @@ -229,7 +79,7 @@ class FileStorage { const response = await PartnerAPIClient.execute( this.config, "post", - `/service/partner/assets/v2.0/organization/${this.config.organizationId}/namespaces/${namespace}/upload/complete`, + `/service/partner/assets/v1.0/organization/${this.config.organizationId}/namespaces/${namespace}/upload/start`, query_params, body, requestHeaders, @@ -243,7 +93,7 @@ class FileStorage { const { error: res_error, - } = FileStoragePartnerModel.FileUploadComplete().validate(responseData, { + } = FileStoragePartnerModel.StartResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -254,7 +104,7 @@ class FileStorage { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for partner > FileStorage > completeUpload \n ${res_error}`, + message: `Response Validation Warnings for partner > FileStorage > startUpload \n ${res_error}`, }); } } @@ -263,12 +113,12 @@ class FileStorage { } /** - * @param {FileStoragePartnerValidator.StartUploadParam} arg - Arg object. + * @param {FileStoragePartnerValidator.CompleteUploadParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name startUpload - * @summary: This operation initiates upload and returns storage link which is valid for 30 Minutes. You can use that storage link to make subsequent upload request with file buffer or blob. + * @returns {Promise} - Success response + * @name completeUpload + * @summary: This will complete the upload process. After successfully uploading file, you can call this operation to complete the upload process * @description: Uploads an arbitrarily sized buffer or blob. * * It has three Major Steps: @@ -287,13 +137,13 @@ class FileStorage { * ### Complete * After successfully upload, call `completeUpload` api to complete the upload process. * This operation will return the url for the uploaded file. - * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/startUpload/). + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/completeUpload/). */ - async startUpload( + async completeUpload( { namespace, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = FileStoragePartnerValidator.startUpload().validate( + const { error } = FileStoragePartnerValidator.completeUpload().validate( { namespace, body, @@ -307,7 +157,7 @@ class FileStorage { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = FileStoragePartnerValidator.startUpload().validate( + } = FileStoragePartnerValidator.completeUpload().validate( { namespace, @@ -318,7 +168,7 @@ class FileStorage { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for partner > FileStorage > startUpload \n ${warrning}`, + message: `Parameter Validation warrnings for partner > FileStorage > completeUpload \n ${warrning}`, }); } @@ -327,7 +177,7 @@ class FileStorage { const response = await PartnerAPIClient.execute( this.config, "post", - `/service/partner/assets/v2.0/organization/${this.config.organizationId}/namespaces/${namespace}/upload/start`, + `/service/partner/assets/v1.0/organization/${this.config.organizationId}/namespaces/${namespace}/upload/complete`, query_params, body, requestHeaders, @@ -341,7 +191,7 @@ class FileStorage { const { error: res_error, - } = FileStoragePartnerModel.FileUpload().validate(responseData, { + } = FileStoragePartnerModel.CompleteResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -352,7 +202,7 @@ class FileStorage { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for partner > FileStorage > startUpload \n ${res_error}`, + message: `Response Validation Warnings for partner > FileStorage > completeUpload \n ${res_error}`, }); } } @@ -445,413 +295,5 @@ class FileStorage { return response; } - - /** - * @param {FileStoragePartnerValidator.BrowseFilesParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name browseFiles - * @summary: Browse Files - * @description: Browse Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/browseFiles/). - */ - async browseFiles( - { namespace, page, limit, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = FileStoragePartnerValidator.browseFiles().validate( - { - namespace, - page, - limit, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = FileStoragePartnerValidator.browseFiles().validate( - { - namespace, - - page, - limit, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > FileStorage > browseFiles \n ${warrning}`, - }); - } - - const query_params = {}; - query_params["page"] = page; - query_params["limit"] = limit; - - const response = await PartnerAPIClient.execute( - this.config, - "get", - `/service/partner/assets/v1.0/organization/${this.config.organizationId}/namespaces/${namespace}/browse`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { error: res_error } = Joi.any().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > FileStorage > browseFiles \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {FileStoragePartnerValidator.OrganizationLevelFetchProxyParam} arg - * - Arg object. - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name organizationLevelFetchProxy - * @summary: Proxy - * @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/organizationLevelFetchProxy/). - */ - async organizationLevelFetchProxy( - { applicationId, companyId, url, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = FileStoragePartnerValidator.organizationLevelFetchProxy().validate( - { - applicationId, - companyId, - url, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = FileStoragePartnerValidator.organizationLevelFetchProxy().validate( - { - applicationId, - companyId, - url, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > FileStorage > organizationLevelFetchProxy \n ${warrning}`, - }); - } - - const query_params = {}; - query_params["url"] = url; - - const response = await PartnerAPIClient.execute( - this.config, - "get", - `/service/partner/assets/v1.0/organization/${this.config.organizationId}/company/${companyId}/application/${applicationId}/proxy/fetch`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = FileStoragePartnerModel.FetchProxyDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > FileStorage > organizationLevelFetchProxy \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {FileStoragePartnerValidator.SaveOrganizationLevelProxyParam} arg - * - Arg object. - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name saveOrganizationLevelProxy - * @summary: Proxy - * @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/saveOrganizationLevelProxy/). - */ - async saveOrganizationLevelProxy( - { applicationId, companyId, body, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = FileStoragePartnerValidator.saveOrganizationLevelProxy().validate( - { - applicationId, - companyId, - body, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = FileStoragePartnerValidator.saveOrganizationLevelProxy().validate( - { - applicationId, - companyId, - body, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > FileStorage > saveOrganizationLevelProxy \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PartnerAPIClient.execute( - this.config, - "post", - `/service/partner/assets/v1.0/organization/${this.config.organizationId}/company/${companyId}/application/${applicationId}/proxy/fetch`, - query_params, - body, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = FileStoragePartnerModel.SaveProxy().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > FileStorage > saveOrganizationLevelProxy \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {FileStoragePartnerValidator.FetchProxyParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name fetchProxy - * @summary: Proxy - * @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/fetchProxy/). - */ - async fetchProxy( - { url, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = FileStoragePartnerValidator.fetchProxy().validate( - { - url, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = FileStoragePartnerValidator.fetchProxy().validate( - { - url, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > FileStorage > fetchProxy \n ${warrning}`, - }); - } - - const query_params = {}; - query_params["url"] = url; - - const response = await PartnerAPIClient.execute( - this.config, - "get", - `/service/partner/assets/v1.0/organization/${this.config.organizationId}/proxy/fetch`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = FileStoragePartnerModel.FetchProxyDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > FileStorage > fetchProxy \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {FileStoragePartnerValidator.SaveProxyDetailsParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name saveProxyDetails - * @summary: Proxy - * @description: Proxy - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/filestorage/saveProxyDetails/). - */ - async saveProxyDetails( - { body, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = FileStoragePartnerValidator.saveProxyDetails().validate( - { - body, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = FileStoragePartnerValidator.saveProxyDetails().validate( - { - body, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > FileStorage > saveProxyDetails \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PartnerAPIClient.execute( - this.config, - "post", - `/service/partner/assets/v1.0/organization/${this.config.organizationId}/proxy/fetch`, - query_params, - body, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = FileStoragePartnerModel.SaveProxy().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > FileStorage > saveProxyDetails \n ${res_error}`, - }); - } - } - - return response; - } } module.exports = FileStorage; diff --git a/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts b/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts index 5dc8a408c..0787b7040 100644 --- a/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +++ b/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts @@ -1,44 +1,4 @@ export = FileStoragePartnerModel; -/** - * @typedef SizeConstraints - * @property {number} [max] - Maximum allowed size (in bytes) for files in the namespace - */ -/** - * @typedef SaveProxy - * @property {number} [id] - * @property {string} [token] - */ -/** - * @typedef ProxyFileData - * @property {string} [email] - * @property {string} [password] - */ -/** - * @typedef ProxyFile - * @property {number} [id] - * @property {string} [customer] - * @property {number} [quantity] - * @property {number} [price] - * @property {ProxyFileData} [data] - * @property {string} [url] - */ -/** - * @typedef FetchProxyDetails - * @property {Object} [data] - * @property {Object} [support] - */ -/** - * @typedef NamespaceDetails - * @property {string} [namespace] - The namespace identifier - * @property {string[]} [valid_content_types] - List of valid content types for - * the namespace - * @property {SizeConstraints} [size] - * @property {string} [file_acl] - Access control level for files in the namespace - */ -/** - * @typedef AllNamespaceDetails - * @property {NamespaceDetails[]} [items] - */ /** * @typedef CDN * @property {string} url @@ -51,7 +11,7 @@ export = FileStoragePartnerModel; * @property {string} url */ /** - * @typedef FileUpload + * @typedef StartResponse * @property {string} file_name * @property {string} file_path * @property {string} content_type @@ -60,10 +20,11 @@ export = FileStoragePartnerModel; * @property {string} operation * @property {number} size * @property {Upload} upload + * @property {CDN} cdn * @property {string[]} [tags] */ /** - * @typedef FileUploadStart + * @typedef StartRequest * @property {string} file_name * @property {string} content_type * @property {number} size @@ -75,7 +36,7 @@ export = FileStoragePartnerModel; * @property {string} [username] */ /** - * @typedef FileUploadComplete + * @typedef CompleteResponse * @property {string} _id * @property {string} file_name * @property {string} file_path @@ -92,73 +53,14 @@ export = FileStoragePartnerModel; * @property {CreatedBy} [created_by] */ /** - * @typedef FailedBrowseFilesResult + * @typedef FailedResponse * @property {string} message */ declare class FileStoragePartnerModel { } declare namespace FileStoragePartnerModel { - export { SizeConstraints, SaveProxy, ProxyFileData, ProxyFile, FetchProxyDetails, NamespaceDetails, AllNamespaceDetails, CDN, Upload, FileUpload, FileUploadStart, CreatedBy, FileUploadComplete, FailedBrowseFilesResult }; + export { CDN, Upload, StartResponse, StartRequest, CreatedBy, CompleteResponse, FailedResponse }; } -/** @returns {SizeConstraints} */ -declare function SizeConstraints(): SizeConstraints; -type SizeConstraints = { - /** - * - Maximum allowed size (in bytes) for files in the namespace - */ - max?: number; -}; -/** @returns {SaveProxy} */ -declare function SaveProxy(): SaveProxy; -type SaveProxy = { - id?: number; - token?: string; -}; -/** @returns {ProxyFileData} */ -declare function ProxyFileData(): ProxyFileData; -type ProxyFileData = { - email?: string; - password?: string; -}; -/** @returns {ProxyFile} */ -declare function ProxyFile(): ProxyFile; -type ProxyFile = { - id?: number; - customer?: string; - quantity?: number; - price?: number; - data?: ProxyFileData; - url?: string; -}; -/** @returns {FetchProxyDetails} */ -declare function FetchProxyDetails(): FetchProxyDetails; -type FetchProxyDetails = { - data?: any; - support?: any; -}; -/** @returns {NamespaceDetails} */ -declare function NamespaceDetails(): NamespaceDetails; -type NamespaceDetails = { - /** - * - The namespace identifier - */ - namespace?: string; - /** - * - List of valid content types for - * the namespace - */ - valid_content_types?: string[]; - size?: SizeConstraints; - /** - * - Access control level for files in the namespace - */ - file_acl?: string; -}; -/** @returns {AllNamespaceDetails} */ -declare function AllNamespaceDetails(): AllNamespaceDetails; -type AllNamespaceDetails = { - items?: NamespaceDetails[]; -}; /** @returns {CDN} */ declare function CDN(): CDN; type CDN = { @@ -172,9 +74,9 @@ type Upload = { expiry: number; url: string; }; -/** @returns {FileUpload} */ -declare function FileUpload(): FileUpload; -type FileUpload = { +/** @returns {StartResponse} */ +declare function StartResponse(): StartResponse; +type StartResponse = { file_name: string; file_path: string; content_type: string; @@ -183,11 +85,12 @@ type FileUpload = { operation: string; size: number; upload: Upload; + cdn: CDN; tags?: string[]; }; -/** @returns {FileUploadStart} */ -declare function FileUploadStart(): FileUploadStart; -type FileUploadStart = { +/** @returns {StartRequest} */ +declare function StartRequest(): StartRequest; +type StartRequest = { file_name: string; content_type: string; size: number; @@ -199,9 +102,9 @@ declare function CreatedBy(): CreatedBy; type CreatedBy = { username?: string; }; -/** @returns {FileUploadComplete} */ -declare function FileUploadComplete(): FileUploadComplete; -type FileUploadComplete = { +/** @returns {CompleteResponse} */ +declare function CompleteResponse(): CompleteResponse; +type CompleteResponse = { _id: string; file_name: string; file_path: string; @@ -217,8 +120,8 @@ type FileUploadComplete = { modified_on: string; created_by?: CreatedBy; }; -/** @returns {FailedBrowseFilesResult} */ -declare function FailedBrowseFilesResult(): FailedBrowseFilesResult; -type FailedBrowseFilesResult = { +/** @returns {FailedResponse} */ +declare function FailedResponse(): FailedResponse; +type FailedResponse = { message: string; }; diff --git a/sdk/partner/FileStorage/FileStoragePartnerModel.js b/sdk/partner/FileStorage/FileStoragePartnerModel.js index fd47800e4..90f6fb4e3 100644 --- a/sdk/partner/FileStorage/FileStoragePartnerModel.js +++ b/sdk/partner/FileStorage/FileStoragePartnerModel.js @@ -1,52 +1,5 @@ const Joi = require("joi"); -/** - * @typedef SizeConstraints - * @property {number} [max] - Maximum allowed size (in bytes) for files in the namespace - */ - -/** - * @typedef SaveProxy - * @property {number} [id] - * @property {string} [token] - */ - -/** - * @typedef ProxyFileData - * @property {string} [email] - * @property {string} [password] - */ - -/** - * @typedef ProxyFile - * @property {number} [id] - * @property {string} [customer] - * @property {number} [quantity] - * @property {number} [price] - * @property {ProxyFileData} [data] - * @property {string} [url] - */ - -/** - * @typedef FetchProxyDetails - * @property {Object} [data] - * @property {Object} [support] - */ - -/** - * @typedef NamespaceDetails - * @property {string} [namespace] - The namespace identifier - * @property {string[]} [valid_content_types] - List of valid content types for - * the namespace - * @property {SizeConstraints} [size] - * @property {string} [file_acl] - Access control level for files in the namespace - */ - -/** - * @typedef AllNamespaceDetails - * @property {NamespaceDetails[]} [items] - */ - /** * @typedef CDN * @property {string} url @@ -61,7 +14,7 @@ const Joi = require("joi"); */ /** - * @typedef FileUpload + * @typedef StartResponse * @property {string} file_name * @property {string} file_path * @property {string} content_type @@ -70,11 +23,12 @@ const Joi = require("joi"); * @property {string} operation * @property {number} size * @property {Upload} upload + * @property {CDN} cdn * @property {string[]} [tags] */ /** - * @typedef FileUploadStart + * @typedef StartRequest * @property {string} file_name * @property {string} content_type * @property {number} size @@ -88,7 +42,7 @@ const Joi = require("joi"); */ /** - * @typedef FileUploadComplete + * @typedef CompleteResponse * @property {string} _id * @property {string} file_name * @property {string} file_path @@ -106,73 +60,11 @@ const Joi = require("joi"); */ /** - * @typedef FailedBrowseFilesResult + * @typedef FailedResponse * @property {string} message */ class FileStoragePartnerModel { - /** @returns {SizeConstraints} */ - static SizeConstraints() { - return Joi.object({ - max: Joi.number(), - }); - } - - /** @returns {SaveProxy} */ - static SaveProxy() { - return Joi.object({ - id: Joi.number(), - token: Joi.string().allow(""), - }); - } - - /** @returns {ProxyFileData} */ - static ProxyFileData() { - return Joi.object({ - email: Joi.string().allow(""), - password: Joi.string().allow(""), - }); - } - - /** @returns {ProxyFile} */ - static ProxyFile() { - return Joi.object({ - id: Joi.number(), - customer: Joi.string().allow(""), - quantity: Joi.number(), - price: Joi.number(), - data: FileStoragePartnerModel.ProxyFileData(), - url: Joi.string().allow(""), - }); - } - - /** @returns {FetchProxyDetails} */ - static FetchProxyDetails() { - return Joi.object({ - data: Joi.object().pattern(/\S/, Joi.any()), - support: Joi.object().pattern(/\S/, Joi.any()), - }); - } - - /** @returns {NamespaceDetails} */ - static NamespaceDetails() { - return Joi.object({ - namespace: Joi.string().allow(""), - valid_content_types: Joi.array() - .items(Joi.string().allow("")) - .allow(null, ""), - size: FileStoragePartnerModel.SizeConstraints(), - file_acl: Joi.string().allow(""), - }); - } - - /** @returns {AllNamespaceDetails} */ - static AllNamespaceDetails() { - return Joi.object({ - items: Joi.array().items(FileStoragePartnerModel.NamespaceDetails()), - }); - } - /** @returns {CDN} */ static CDN() { return Joi.object({ @@ -190,8 +82,8 @@ class FileStoragePartnerModel { }); } - /** @returns {FileUpload} */ - static FileUpload() { + /** @returns {StartResponse} */ + static StartResponse() { return Joi.object({ file_name: Joi.string().allow("").required(), file_path: Joi.string().allow("").required(), @@ -201,12 +93,13 @@ class FileStoragePartnerModel { operation: Joi.string().allow("").required(), size: Joi.number().required(), upload: FileStoragePartnerModel.Upload().required(), + cdn: FileStoragePartnerModel.CDN().required(), tags: Joi.array().items(Joi.string().allow("")), }); } - /** @returns {FileUploadStart} */ - static FileUploadStart() { + /** @returns {StartRequest} */ + static StartRequest() { return Joi.object({ file_name: Joi.string().allow("").required(), content_type: Joi.string().allow("").required(), @@ -223,8 +116,8 @@ class FileStoragePartnerModel { }); } - /** @returns {FileUploadComplete} */ - static FileUploadComplete() { + /** @returns {CompleteResponse} */ + static CompleteResponse() { return Joi.object({ _id: Joi.string().allow("").required(), file_name: Joi.string().allow("").required(), @@ -243,8 +136,8 @@ class FileStoragePartnerModel { }); } - /** @returns {FailedBrowseFilesResult} */ - static FailedBrowseFilesResult() { + /** @returns {FailedResponse} */ + static FailedResponse() { return Joi.object({ message: Joi.string().allow("").required(), }); diff --git a/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts b/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts index f4319a907..a27c3530b 100644 --- a/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +++ b/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts @@ -1,13 +1,6 @@ export = FileStorageValidator; declare class FileStorageValidator { - static getAllNamespaceDetails(): any; - static getNamespaceDetail(): any; - static completeUpload(): any; static startUpload(): any; + static completeUpload(): any; static browse(): any; - static browseFiles(): any; - static organizationLevelFetchProxy(): any; - static saveOrganizationLevelProxy(): any; - static fetchProxy(): any; - static saveProxyDetails(): any; } diff --git a/sdk/partner/FileStorage/FileStoragePartnerValidator.js b/sdk/partner/FileStorage/FileStoragePartnerValidator.js index d00c9fce9..f4b2e92bf 100644 --- a/sdk/partner/FileStorage/FileStoragePartnerValidator.js +++ b/sdk/partner/FileStorage/FileStoragePartnerValidator.js @@ -2,29 +2,19 @@ const Joi = require("joi"); const FileStorageModel = require("./FileStoragePartnerModel"); class FileStorageValidator { - static getAllNamespaceDetails() { - return Joi.object({}).required(); - } - - static getNamespaceDetail() { - return Joi.object({ - namespace: Joi.string().allow("").required(), - }).required(); - } - - static completeUpload() { + static startUpload() { return Joi.object({ namespace: Joi.string().allow("").required(), - body: FileStorageModel.FileUpload().required(), + body: FileStorageModel.StartRequest().required(), }).required(); } - static startUpload() { + static completeUpload() { return Joi.object({ namespace: Joi.string().allow("").required(), - body: FileStorageModel.FileUploadStart().required(), + body: FileStorageModel.StartResponse().required(), }).required(); } @@ -38,43 +28,6 @@ class FileStorageValidator { limit: Joi.number(), }).required(); } - - static browseFiles() { - return Joi.object({ - namespace: Joi.string().allow("").required(), - - page: Joi.number(), - limit: Joi.number(), - }).required(); - } - - static organizationLevelFetchProxy() { - return Joi.object({ - applicationId: Joi.string().allow("").required(), - companyId: Joi.number().required(), - url: Joi.string().allow("").required(), - }).required(); - } - - static saveOrganizationLevelProxy() { - return Joi.object({ - applicationId: Joi.string().allow("").required(), - companyId: Joi.number().required(), - body: FileStorageModel.ProxyFile().required(), - }).required(); - } - - static fetchProxy() { - return Joi.object({ - url: Joi.string().allow("").required(), - }).required(); - } - - static saveProxyDetails() { - return Joi.object({ - body: FileStorageModel.ProxyFile().required(), - }).required(); - } } module.exports = FileStorageValidator; diff --git a/sdk/partner/Lead/LeadPartnerClient.d.ts b/sdk/partner/Lead/LeadPartnerClient.d.ts index 92c302a3e..cfd4ac195 100644 --- a/sdk/partner/Lead/LeadPartnerClient.d.ts +++ b/sdk/partner/Lead/LeadPartnerClient.d.ts @@ -91,12 +91,12 @@ declare class Lead { * @param {LeadPartnerValidator.GetGeneralConfigParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getGeneralConfig * @summary: Get general support configuration * @description: Get general support configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/getGeneralConfig/). */ - getGeneralConfig({ requestHeaders }?: LeadPartnerValidator.GetGeneralConfigParam, { responseHeaders }?: object): Promise; + getGeneralConfig({ requestHeaders }?: LeadPartnerValidator.GetGeneralConfigParam, { responseHeaders }?: object): Promise; } import LeadPartnerModel = require("./LeadPartnerModel"); import Paginator = require("../../common/Paginator"); diff --git a/sdk/partner/Lead/LeadPartnerClient.js b/sdk/partner/Lead/LeadPartnerClient.js index 3b9bc3b4b..4851fe8b0 100644 --- a/sdk/partner/Lead/LeadPartnerClient.js +++ b/sdk/partner/Lead/LeadPartnerClient.js @@ -556,7 +556,7 @@ class Lead { * @param {LeadPartnerValidator.GetGeneralConfigParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getGeneralConfig * @summary: Get general support configuration * @description: Get general support configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/getGeneralConfig/). @@ -606,7 +606,7 @@ class Lead { const { error: res_error, - } = LeadPartnerModel.GeneralConfigDetails().validate(responseData, { + } = LeadPartnerModel.GeneralConfigResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/partner/Lead/LeadPartnerModel.d.ts b/sdk/partner/Lead/LeadPartnerModel.d.ts index 8f38746f2..090241e66 100644 --- a/sdk/partner/Lead/LeadPartnerModel.d.ts +++ b/sdk/partner/Lead/LeadPartnerModel.d.ts @@ -37,7 +37,7 @@ export = LeadPartnerModel; * @property {string} agent_id - Agent's unique ID */ /** - * @typedef GeneralConfigDetails + * @typedef GeneralConfigResponse * @property {SupportCommunicationSchema[]} [support_communication] * @property {string} [type] * @property {GeneralConfigIntegrationSchema} [integration] @@ -179,7 +179,7 @@ export = LeadPartnerModel; declare class LeadPartnerModel { } declare namespace LeadPartnerModel { - export { TicketList, Page, TicketHistoryList, EditTicketPayload, AgentChangePayload, GeneralConfigDetails, SupportCommunicationSchema, GeneralConfigIntegrationSchema, Filter, TicketHistoryPayload, TicketContext, CreatedOn, TicketAsset, TicketContent, AddTicketPayload, Priority, SLA, Status, FeedbackForm, TicketCategory, TicketHistory, Ticket, PriorityEnum, HistoryTypeEnum, TicketAssetTypeEnum, TicketSourceEnum }; + export { TicketList, Page, TicketHistoryList, EditTicketPayload, AgentChangePayload, GeneralConfigResponse, SupportCommunicationSchema, GeneralConfigIntegrationSchema, Filter, TicketHistoryPayload, TicketContext, CreatedOn, TicketAsset, TicketContent, AddTicketPayload, Priority, SLA, Status, FeedbackForm, TicketCategory, TicketHistory, Ticket, PriorityEnum, HistoryTypeEnum, TicketAssetTypeEnum, TicketSourceEnum }; } /** @returns {TicketList} */ declare function TicketList(): TicketList; @@ -268,9 +268,9 @@ type AgentChangePayload = { */ agent_id: string; }; -/** @returns {GeneralConfigDetails} */ -declare function GeneralConfigDetails(): GeneralConfigDetails; -type GeneralConfigDetails = { +/** @returns {GeneralConfigResponse} */ +declare function GeneralConfigResponse(): GeneralConfigResponse; +type GeneralConfigResponse = { support_communication?: SupportCommunicationSchema[]; type?: string; integration?: GeneralConfigIntegrationSchema; diff --git a/sdk/partner/Lead/LeadPartnerModel.js b/sdk/partner/Lead/LeadPartnerModel.js index a89894ea3..1381b5d17 100644 --- a/sdk/partner/Lead/LeadPartnerModel.js +++ b/sdk/partner/Lead/LeadPartnerModel.js @@ -43,7 +43,7 @@ const Joi = require("joi"); */ /** - * @typedef GeneralConfigDetails + * @typedef GeneralConfigResponse * @property {SupportCommunicationSchema[]} [support_communication] * @property {string} [type] * @property {GeneralConfigIntegrationSchema} [integration] @@ -255,8 +255,8 @@ class LeadPartnerModel { }); } - /** @returns {GeneralConfigDetails} */ - static GeneralConfigDetails() { + /** @returns {GeneralConfigResponse} */ + static GeneralConfigResponse() { return Joi.object({ support_communication: Joi.array().items( LeadPartnerModel.SupportCommunicationSchema() @@ -272,7 +272,7 @@ class LeadPartnerModel { return Joi.object({ type: Joi.string().allow(""), title: Joi.string().allow(""), - value: Joi.object().pattern(/\S/, Joi.any()), + value: Joi.any(), description: Joi.string().allow(""), enabled: Joi.boolean(), }); @@ -298,7 +298,7 @@ class LeadPartnerModel { /** @returns {TicketHistoryPayload} */ static TicketHistoryPayload() { return Joi.object({ - value: Joi.object().pattern(/\S/, Joi.any()).required(), + value: Joi.any().required(), type: LeadPartnerModel.HistoryTypeEnum().required(), }); } @@ -339,12 +339,12 @@ class LeadPartnerModel { /** @returns {AddTicketPayload} */ static AddTicketPayload() { return Joi.object({ - created_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), status: Joi.string().allow(""), priority: LeadPartnerModel.PriorityEnum(), category: Joi.string().allow("").required(), content: LeadPartnerModel.TicketContent().required(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), }); } @@ -376,9 +376,9 @@ class LeadPartnerModel { /** @returns {FeedbackForm} */ static FeedbackForm() { return Joi.object({ - inputs: Joi.object().pattern(/\S/, Joi.any()), + inputs: Joi.any(), title: Joi.string().allow(""), - timestamps: Joi.object().pattern(/\S/, Joi.any()), + timestamps: Joi.any(), }); } @@ -397,10 +397,10 @@ class LeadPartnerModel { static TicketHistory() { return Joi.object({ type: Joi.string().allow("").required(), - value: Joi.object().pattern(/\S/, Joi.any()).required(), + value: Joi.any().required(), ticket_id: Joi.string().allow("").required(), created_on: LeadPartnerModel.CreatedOn(), - created_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), _id: Joi.string().allow("").required(), updated_at: Joi.string().allow(""), created_at: Joi.string().allow(""), @@ -420,12 +420,12 @@ class LeadPartnerModel { status: LeadPartnerModel.Status().required(), priority: LeadPartnerModel.Priority().required(), sla: LeadPartnerModel.SLA(), - created_by: Joi.object().pattern(/\S/, Joi.any()), - assigned_to: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), + assigned_to: Joi.any(), tags: Joi.array().items(Joi.string().allow("")), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), is_feedback_pending: Joi.boolean(), - integration: Joi.object().pattern(/\S/, Joi.any()), + integration: Joi.any(), _id: Joi.string().allow("").required(), updated_at: Joi.string().allow(""), created_at: Joi.string().allow(""), diff --git a/sdk/partner/Logistics/LogisticsPartnerClient.d.ts b/sdk/partner/Logistics/LogisticsPartnerClient.d.ts index da6698bbf..791a66f18 100644 --- a/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +++ b/sdk/partner/Logistics/LogisticsPartnerClient.d.ts @@ -6,176 +6,70 @@ declare class Logistics { * @param {LogisticsPartnerValidator.SampleFileServiceabilityParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name sampleFileServiceability * @summary: Sample File Download * @description: Sample File Download - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/sampleFileServiceability/). */ - sampleFileServiceability({ body, requestHeaders }?: LogisticsPartnerValidator.SampleFileServiceabilityParam, { responseHeaders }?: object): Promise; + sampleFileServiceability({ body, requestHeaders }?: LogisticsPartnerValidator.SampleFileServiceabilityParam, { responseHeaders }?: object): Promise; /** * @param {LogisticsPartnerValidator.GetSampleFileServiceabilityStatusParam} arg * - Arg object. * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getSampleFileServiceabilityStatus * @summary: Get Serviceability TAT sample files generator status * @description: Get Serviceability TAT sample file generator status - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getSampleFileServiceabilityStatus/). */ - getSampleFileServiceabilityStatus({ pageNo, pageSize, batchId, requestHeaders }?: LogisticsPartnerValidator.GetSampleFileServiceabilityStatusParam, { responseHeaders }?: object): Promise; + getSampleFileServiceabilityStatus({ pageNo, pageSize, batchId, requestHeaders }?: LogisticsPartnerValidator.GetSampleFileServiceabilityStatusParam, { responseHeaders }?: object): Promise; /** * @param {LogisticsPartnerValidator.BulkTatParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name bulkTat * @summary: Region TAT Import or Export * @description: Region TAT Import or Export - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/bulkTat/). */ - bulkTat({ extensionId, schemeId, body, requestHeaders }?: LogisticsPartnerValidator.BulkTatParam, { responseHeaders }?: object): Promise; + bulkTat({ extensionId, schemeId, body, requestHeaders }?: LogisticsPartnerValidator.BulkTatParam, { responseHeaders }?: object): Promise; /** * @param {LogisticsPartnerValidator.GetBulkTatParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBulkTat * @summary: Get region tat bulk history * @description: Get region tat bulk history - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getBulkTat/). */ - getBulkTat({ extensionId, schemeId, pageNo, pageSize, batchId, action, status, country, region, startDate, endDate, requestHeaders, }?: LogisticsPartnerValidator.GetBulkTatParam, { responseHeaders }?: object): Promise; - /** - * @param {LogisticsPartnerValidator.CreateDeliveryTimeParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name createDeliveryTime - * @summary: Region based delivery time insert - * @description: Insert the region based delivery time for a specific region within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/createDeliveryTime/). - */ - createDeliveryTime({ partnerOrgId, courierPartnerExtensionId, schemeId, body, requestHeaders, }?: LogisticsPartnerValidator.CreateDeliveryTimeParam, { responseHeaders }?: object): Promise; - /** - * @param {LogisticsPartnerValidator.GetDeliveryTimesParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getDeliveryTimes - * @summary: Get region based delivery time list - * @description: Retrieve a list of delivery time for specific regions within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getDeliveryTimes/). - */ - getDeliveryTimes({ partnerOrgId, courierPartnerExtensionId, schemeId, pageNo, pageSize, fromCountryCode, fromStateCode, fromCityCode, fromSectorCode, fromPincode, toCountryCode, toStateCode, toCityCode, toSectorCode, toPincode, requestHeaders, }?: LogisticsPartnerValidator.GetDeliveryTimesParam, { responseHeaders }?: object): Promise; - /** - * @param {LogisticsPartnerValidator.GetDeliveryTimeParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getDeliveryTime - * @summary: Get region based delivery time for a given identifier - * @description: Retrieve the delivery time details for a specific region within a courier partner scheme using the unique delivery time record identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getDeliveryTime/). - */ - getDeliveryTime({ partnerOrgId, courierPartnerExtensionId, schemeId, id, requestHeaders, }?: LogisticsPartnerValidator.GetDeliveryTimeParam, { responseHeaders }?: object): Promise; - /** - * @param {LogisticsPartnerValidator.UpdateDeliveryTimeParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name updateDeliveryTime - * @summary: Region based delivery time update - * @description: Update the delivery time details for a specific region within a courier partner scheme using the unique delivery time record identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/updateDeliveryTime/). - */ - updateDeliveryTime({ partnerOrgId, courierPartnerExtensionId, schemeId, id, body, requestHeaders, }?: LogisticsPartnerValidator.UpdateDeliveryTimeParam, { responseHeaders }?: object): Promise; - /** - * @param {LogisticsPartnerValidator.DeleteDeliveryTimeParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deleteDeliveryTime - * @summary: Region based delivery time delete - * @description: Delete the delivery time record for a specific region within a courier partner scheme using the unique delivery time record identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/deleteDeliveryTime/). - */ - deleteDeliveryTime({ partnerOrgId, courierPartnerExtensionId, schemeId, id, requestHeaders, }?: LogisticsPartnerValidator.DeleteDeliveryTimeParam, { responseHeaders }?: object): Promise; - /** - * @param {LogisticsPartnerValidator.CreateServiceabilityParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name createServiceability - * @summary: Serviceability insert - * @description: Insert the serviceability for a specific region within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/createServiceability/). - */ - createServiceability({ partnerOrgId, courierPartnerExtensionId, schemeId, body, requestHeaders, }?: LogisticsPartnerValidator.CreateServiceabilityParam, { responseHeaders }?: object): Promise; - /** - * @param {LogisticsPartnerValidator.GetServiceabilitiesParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getServiceabilities - * @summary: Get region serviceability list - * @description: Retrieve a list of serviceability for specific regions within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getServiceabilities/). - */ - getServiceabilities({ partnerOrgId, courierPartnerExtensionId, schemeId, pageNo, pageSize, countryCode, stateCode, cityCode, sectorCode, pincode, firstMile, lastMile, doorstepReturn, doorstepQc, installation, requestHeaders, }?: LogisticsPartnerValidator.GetServiceabilitiesParam, { responseHeaders }?: object): Promise; - /** - * @param {LogisticsPartnerValidator.GetServiceabilityParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getServiceability - * @summary: Get region serviceability - * @description: Retrieve serviceability for specific region within a courier partner scheme for a given identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getServiceability/). - */ - getServiceability({ partnerOrgId, courierPartnerExtensionId, schemeId, id, requestHeaders, }?: LogisticsPartnerValidator.GetServiceabilityParam, { responseHeaders }?: object): Promise; - /** - * @param {LogisticsPartnerValidator.UpdateServiceabilityParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name updateServiceability - * @summary: Serviceability update - * @description: Update the serviceability for a specific region within a courier partner scheme based on unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/updateServiceability/). - */ - updateServiceability({ partnerOrgId, courierPartnerExtensionId, schemeId, id, body, requestHeaders, }?: LogisticsPartnerValidator.UpdateServiceabilityParam, { responseHeaders }?: object): Promise; - /** - * @param {LogisticsPartnerValidator.DeleteServiceabilityParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name deleteServiceability - * @summary: Serviceability delete - * @description: Delete the serviceability for a specific region within a courier partner scheme based on a unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/deleteServiceability/). - */ - deleteServiceability({ partnerOrgId, courierPartnerExtensionId, schemeId, id, requestHeaders, }?: LogisticsPartnerValidator.DeleteServiceabilityParam, { responseHeaders }?: object): Promise; + getBulkTat({ extensionId, schemeId, pageNo, pageSize, batchId, action, status, country, region, startDate, endDate, requestHeaders, }?: LogisticsPartnerValidator.GetBulkTatParam, { responseHeaders }?: object): Promise; /** * @param {LogisticsPartnerValidator.BulkServiceabilityParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name bulkServiceability * @summary: Serviceability Import or Export * @description: Serviceability Import or Export - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/bulkServiceability/). */ - bulkServiceability({ extensionId, schemeId, body, requestHeaders }?: LogisticsPartnerValidator.BulkServiceabilityParam, { responseHeaders }?: object): Promise; + bulkServiceability({ extensionId, schemeId, body, requestHeaders }?: LogisticsPartnerValidator.BulkServiceabilityParam, { responseHeaders }?: object): Promise; /** * @param {LogisticsPartnerValidator.GetBulkServiceabilityParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBulkServiceability * @summary: Get Region Serviceability Bulk History * @description: Get Region Serviceability Bulk History - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getBulkServiceability/). */ - getBulkServiceability({ extensionId, schemeId, pageNo, pageSize, batchId, action, status, country, region, startDate, endDate, requestHeaders, }?: LogisticsPartnerValidator.GetBulkServiceabilityParam, { responseHeaders }?: object): Promise; + getBulkServiceability({ extensionId, schemeId, pageNo, pageSize, batchId, action, status, country, region, startDate, endDate, requestHeaders, }?: LogisticsPartnerValidator.GetBulkServiceabilityParam, { responseHeaders }?: object): Promise; /** * @param {LogisticsPartnerValidator.CreateCourierPartnerAccountParam} arg * - Arg object. @@ -192,36 +86,36 @@ declare class Logistics { * @param {LogisticsPartnerValidator.GetCourierPartnerAccountsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getCourierPartnerAccounts * @summary: Getting Courier Account list of a company * @description: This API returns Courier Account of a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getCourierPartnerAccounts/). */ - getCourierPartnerAccounts({ companyId, pageNo, pageSize, stage, paymentMode, transportType, requestHeaders, }?: LogisticsPartnerValidator.GetCourierPartnerAccountsParam, { responseHeaders }?: object): Promise; + getCourierPartnerAccounts({ companyId, pageNo, pageSize, stage, paymentMode, transportType, requestHeaders, }?: LogisticsPartnerValidator.GetCourierPartnerAccountsParam, { responseHeaders }?: object): Promise; /** * @param {LogisticsPartnerValidator.UpdateCourierPartnerAccountParam} arg * - Arg object. * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCourierPartnerAccount * @summary: Update Courier Account in database * @description: Updates Courier Account - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/updateCourierPartnerAccount/). */ - updateCourierPartnerAccount({ companyId, accountId, body, requestHeaders }?: LogisticsPartnerValidator.UpdateCourierPartnerAccountParam, { responseHeaders }?: object): Promise; + updateCourierPartnerAccount({ companyId, accountId, body, requestHeaders }?: LogisticsPartnerValidator.UpdateCourierPartnerAccountParam, { responseHeaders }?: object): Promise; /** * @param {LogisticsPartnerValidator.GetCourierPartnerAccountParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCourierPartnerAccount * @summary: Getting Courier Account of a company from database * @description: This API returns response DpAccount of a company from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getCourierPartnerAccount/). */ - getCourierPartnerAccount({ companyId, accountId, requestHeaders }?: LogisticsPartnerValidator.GetCourierPartnerAccountParam, { responseHeaders }?: object): Promise; + getCourierPartnerAccount({ companyId, accountId, requestHeaders }?: LogisticsPartnerValidator.GetCourierPartnerAccountParam, { responseHeaders }?: object): Promise; /** * @param {LogisticsPartnerValidator.CreateCourierPartnerSchemeParam} arg - * Arg object. @@ -239,14 +133,14 @@ declare class Logistics { * Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updateCourierPartnerScheme * @summary: Update Scheme for courier partner extension * @description: Update Scheme for courier partner extension - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/updateCourierPartnerScheme/). */ - updateCourierPartnerScheme({ schemeId, body, requestHeaders }?: LogisticsPartnerValidator.UpdateCourierPartnerSchemeParam, { responseHeaders }?: object): Promise; + updateCourierPartnerScheme({ schemeId, body, requestHeaders }?: LogisticsPartnerValidator.UpdateCourierPartnerSchemeParam, { responseHeaders }?: object): Promise; /** * @param {LogisticsPartnerValidator.GetCountriesParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/partner/Logistics/LogisticsPartnerClient.js b/sdk/partner/Logistics/LogisticsPartnerClient.js index 62fbefb9d..9a14f7890 100644 --- a/sdk/partner/Logistics/LogisticsPartnerClient.js +++ b/sdk/partner/Logistics/LogisticsPartnerClient.js @@ -18,7 +18,7 @@ class Logistics { * @param {LogisticsPartnerValidator.SampleFileServiceabilityParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name sampleFileServiceability @@ -76,7 +76,7 @@ class Logistics { const { error: res_error, - } = LogisticsPartnerModel.BulkRegionServiceabilityTatResultItemData().validate( + } = LogisticsPartnerModel.BulkRegionServiceabilityTatResponseItemData().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -101,7 +101,7 @@ class Logistics { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getSampleFileServiceabilityStatus @@ -166,7 +166,7 @@ class Logistics { const { error: res_error, - } = LogisticsPartnerModel.BulkRegionServiceabilityTatResult().validate( + } = LogisticsPartnerModel.BulkRegionServiceabilityTatResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -189,7 +189,7 @@ class Logistics { * @param {LogisticsPartnerValidator.BulkTatParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name bulkTat * @summary: Region TAT Import or Export @@ -246,7 +246,7 @@ class Logistics { const { error: res_error, - } = LogisticsPartnerModel.BulkRegionResultItemData().validate( + } = LogisticsPartnerModel.BulkRegionResponseItemData().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -269,7 +269,7 @@ class Logistics { * @param {LogisticsPartnerValidator.GetBulkTatParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBulkTat * @summary: Get region tat bulk history * @description: Get region tat bulk history - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getBulkTat/). @@ -363,7 +363,7 @@ class Logistics { const { error: res_error, - } = LogisticsPartnerModel.BulkRegionResult().validate(responseData, { + } = LogisticsPartnerModel.BulkRegionResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -382,961 +382,11 @@ class Logistics { return response; } - /** - * @param {LogisticsPartnerValidator.CreateDeliveryTimeParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name createDeliveryTime - * @summary: Region based delivery time insert - * @description: Insert the region based delivery time for a specific region within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/createDeliveryTime/). - */ - async createDeliveryTime( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - body, - requestHeaders, - } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = LogisticsPartnerValidator.createDeliveryTime().validate( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - body, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = LogisticsPartnerValidator.createDeliveryTime().validate( - { partnerOrgId, courierPartnerExtensionId, schemeId, body }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > Logistics > createDeliveryTime \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PartnerAPIClient.execute( - this.config, - "post", - `/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time`, - query_params, - body, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = LogisticsPartnerModel.RegionTatResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > Logistics > createDeliveryTime \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {LogisticsPartnerValidator.GetDeliveryTimesParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getDeliveryTimes - * @summary: Get region based delivery time list - * @description: Retrieve a list of delivery time for specific regions within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getDeliveryTimes/). - */ - async getDeliveryTimes( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - pageNo, - pageSize, - fromCountryCode, - fromStateCode, - fromCityCode, - fromSectorCode, - fromPincode, - toCountryCode, - toStateCode, - toCityCode, - toSectorCode, - toPincode, - requestHeaders, - } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = LogisticsPartnerValidator.getDeliveryTimes().validate( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - pageNo, - pageSize, - fromCountryCode, - fromStateCode, - fromCityCode, - fromSectorCode, - fromPincode, - toCountryCode, - toStateCode, - toCityCode, - toSectorCode, - toPincode, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = LogisticsPartnerValidator.getDeliveryTimes().validate( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - pageNo, - pageSize, - fromCountryCode, - fromStateCode, - fromCityCode, - fromSectorCode, - fromPincode, - toCountryCode, - toStateCode, - toCityCode, - toSectorCode, - toPincode, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > Logistics > getDeliveryTimes \n ${warrning}`, - }); - } - - const query_params = {}; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; - query_params["from_country_code"] = fromCountryCode; - query_params["from_state_code"] = fromStateCode; - query_params["from_city_code"] = fromCityCode; - query_params["from_sector_code"] = fromSectorCode; - query_params["from_pincode"] = fromPincode; - query_params["to_country_code"] = toCountryCode; - query_params["to_state_code"] = toStateCode; - query_params["to_city_code"] = toCityCode; - query_params["to_sector_code"] = toSectorCode; - query_params["to_pincode"] = toPincode; - - const response = await PartnerAPIClient.execute( - this.config, - "get", - `/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = LogisticsPartnerModel.RegionTatItemResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > Logistics > getDeliveryTimes \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {LogisticsPartnerValidator.GetDeliveryTimeParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getDeliveryTime - * @summary: Get region based delivery time for a given identifier - * @description: Retrieve the delivery time details for a specific region within a courier partner scheme using the unique delivery time record identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getDeliveryTime/). - */ - async getDeliveryTime( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - id, - requestHeaders, - } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = LogisticsPartnerValidator.getDeliveryTime().validate( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - id, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = LogisticsPartnerValidator.getDeliveryTime().validate( - { partnerOrgId, courierPartnerExtensionId, schemeId, id }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > Logistics > getDeliveryTime \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PartnerAPIClient.execute( - this.config, - "get", - `/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time/${id}`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = LogisticsPartnerModel.RegionTatResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > Logistics > getDeliveryTime \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {LogisticsPartnerValidator.UpdateDeliveryTimeParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name updateDeliveryTime - * @summary: Region based delivery time update - * @description: Update the delivery time details for a specific region within a courier partner scheme using the unique delivery time record identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/updateDeliveryTime/). - */ - async updateDeliveryTime( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - id, - body, - requestHeaders, - } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = LogisticsPartnerValidator.updateDeliveryTime().validate( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - id, - body, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = LogisticsPartnerValidator.updateDeliveryTime().validate( - { partnerOrgId, courierPartnerExtensionId, schemeId, id, body }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > Logistics > updateDeliveryTime \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PartnerAPIClient.execute( - this.config, - "put", - `/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time/${id}`, - query_params, - body, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = LogisticsPartnerModel.RegionTatResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > Logistics > updateDeliveryTime \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {LogisticsPartnerValidator.DeleteDeliveryTimeParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deleteDeliveryTime - * @summary: Region based delivery time delete - * @description: Delete the delivery time record for a specific region within a courier partner scheme using the unique delivery time record identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/deleteDeliveryTime/). - */ - async deleteDeliveryTime( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - id, - requestHeaders, - } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = LogisticsPartnerValidator.deleteDeliveryTime().validate( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - id, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = LogisticsPartnerValidator.deleteDeliveryTime().validate( - { partnerOrgId, courierPartnerExtensionId, schemeId, id }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > Logistics > deleteDeliveryTime \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PartnerAPIClient.execute( - this.config, - "delete", - `/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/delivery-time/${id}`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = LogisticsPartnerModel.RegionTatResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > Logistics > deleteDeliveryTime \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {LogisticsPartnerValidator.CreateServiceabilityParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name createServiceability - * @summary: Serviceability insert - * @description: Insert the serviceability for a specific region within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/createServiceability/). - */ - async createServiceability( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - body, - requestHeaders, - } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = LogisticsPartnerValidator.createServiceability().validate( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - body, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = LogisticsPartnerValidator.createServiceability().validate( - { partnerOrgId, courierPartnerExtensionId, schemeId, body }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > Logistics > createServiceability \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PartnerAPIClient.execute( - this.config, - "post", - `/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability`, - query_params, - body, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = LogisticsPartnerModel.RegionServiceabilityResult().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > Logistics > createServiceability \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {LogisticsPartnerValidator.GetServiceabilitiesParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getServiceabilities - * @summary: Get region serviceability list - * @description: Retrieve a list of serviceability for specific regions within a courier partner scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getServiceabilities/). - */ - async getServiceabilities( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - pageNo, - pageSize, - countryCode, - stateCode, - cityCode, - sectorCode, - pincode, - firstMile, - lastMile, - doorstepReturn, - doorstepQc, - installation, - requestHeaders, - } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = LogisticsPartnerValidator.getServiceabilities().validate( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - pageNo, - pageSize, - countryCode, - stateCode, - cityCode, - sectorCode, - pincode, - firstMile, - lastMile, - doorstepReturn, - doorstepQc, - installation, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = LogisticsPartnerValidator.getServiceabilities().validate( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - pageNo, - pageSize, - countryCode, - stateCode, - cityCode, - sectorCode, - pincode, - firstMile, - lastMile, - doorstepReturn, - doorstepQc, - installation, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > Logistics > getServiceabilities \n ${warrning}`, - }); - } - - const query_params = {}; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; - query_params["country_code"] = countryCode; - query_params["state_code"] = stateCode; - query_params["city_code"] = cityCode; - query_params["sector_code"] = sectorCode; - query_params["pincode"] = pincode; - query_params["first_mile"] = firstMile; - query_params["last_mile"] = lastMile; - query_params["doorstep_return"] = doorstepReturn; - query_params["doorstep_qc"] = doorstepQc; - query_params["installation"] = installation; - - const response = await PartnerAPIClient.execute( - this.config, - "get", - `/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = LogisticsPartnerModel.RegionServiceabilityItemResult().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > Logistics > getServiceabilities \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {LogisticsPartnerValidator.GetServiceabilityParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getServiceability - * @summary: Get region serviceability - * @description: Retrieve serviceability for specific region within a courier partner scheme for a given identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getServiceability/). - */ - async getServiceability( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - id, - requestHeaders, - } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = LogisticsPartnerValidator.getServiceability().validate( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - id, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = LogisticsPartnerValidator.getServiceability().validate( - { partnerOrgId, courierPartnerExtensionId, schemeId, id }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > Logistics > getServiceability \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PartnerAPIClient.execute( - this.config, - "get", - `/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability/${id}`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = LogisticsPartnerModel.RegionServiceabilityResult().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > Logistics > getServiceability \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {LogisticsPartnerValidator.UpdateServiceabilityParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name updateServiceability - * @summary: Serviceability update - * @description: Update the serviceability for a specific region within a courier partner scheme based on unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/updateServiceability/). - */ - async updateServiceability( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - id, - body, - requestHeaders, - } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = LogisticsPartnerValidator.updateServiceability().validate( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - id, - body, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = LogisticsPartnerValidator.updateServiceability().validate( - { partnerOrgId, courierPartnerExtensionId, schemeId, id, body }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > Logistics > updateServiceability \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PartnerAPIClient.execute( - this.config, - "put", - `/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability/${id}`, - query_params, - body, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = LogisticsPartnerModel.ServiceabilityDetailsResult().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > Logistics > updateServiceability \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {LogisticsPartnerValidator.DeleteServiceabilityParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name deleteServiceability - * @summary: Serviceability delete - * @description: Delete the serviceability for a specific region within a courier partner scheme based on a unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/deleteServiceability/). - */ - async deleteServiceability( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - id, - requestHeaders, - } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = LogisticsPartnerValidator.deleteServiceability().validate( - { - partnerOrgId, - courierPartnerExtensionId, - schemeId, - id, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = LogisticsPartnerValidator.deleteServiceability().validate( - { partnerOrgId, courierPartnerExtensionId, schemeId, id }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > Logistics > deleteServiceability \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PartnerAPIClient.execute( - this.config, - "delete", - `/service/partner/logistics/v2.0/organization/${partnerOrgId}/courier-partner/${courierPartnerExtensionId}/scheme/${schemeId}/serviceability/${id}`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = LogisticsPartnerModel.RegionServiceabilityResult().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > Logistics > deleteServiceability \n ${res_error}`, - }); - } - } - - return response; - } - /** * @param {LogisticsPartnerValidator.BulkServiceabilityParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name bulkServiceability * @summary: Serviceability Import or Export @@ -1395,7 +445,7 @@ class Logistics { const { error: res_error, - } = LogisticsPartnerModel.BulkRegionResultItemData().validate( + } = LogisticsPartnerModel.BulkRegionResponseItemData().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1418,7 +468,7 @@ class Logistics { * @param {LogisticsPartnerValidator.GetBulkServiceabilityParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBulkServiceability * @summary: Get Region Serviceability Bulk History * @description: Get Region Serviceability Bulk History - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getBulkServiceability/). @@ -1516,7 +566,7 @@ class Logistics { const { error: res_error, - } = LogisticsPartnerModel.BulkRegionResult().validate(responseData, { + } = LogisticsPartnerModel.BulkRegionResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1622,7 +672,7 @@ class Logistics { * @param {LogisticsPartnerValidator.GetCourierPartnerAccountsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getCourierPartnerAccounts @@ -1703,7 +753,7 @@ class Logistics { const { error: res_error, - } = LogisticsPartnerModel.CompanyCourierPartnerAccountListResult().validate( + } = LogisticsPartnerModel.CompanyCourierPartnerAccountListResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1728,7 +778,7 @@ class Logistics { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCourierPartnerAccount * @summary: Update Courier Account in database * @description: Updates Courier Account - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/updateCourierPartnerAccount/). @@ -1788,7 +838,7 @@ class Logistics { const { error: res_error, - } = LogisticsPartnerModel.CourierAccountResult().validate(responseData, { + } = LogisticsPartnerModel.CourierAccountResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1811,7 +861,7 @@ class Logistics { * @param {LogisticsPartnerValidator.GetCourierPartnerAccountParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCourierPartnerAccount * @summary: Getting Courier Account of a company from database * @description: This API returns response DpAccount of a company from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getCourierPartnerAccount/). @@ -1869,7 +919,7 @@ class Logistics { const { error: res_error, - } = LogisticsPartnerModel.CourierAccountResult().validate(responseData, { + } = LogisticsPartnerModel.CourierAccountResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1974,7 +1024,7 @@ class Logistics { * Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updateCourierPartnerScheme @@ -2034,7 +1084,7 @@ class Logistics { const { error: res_error, - } = LogisticsPartnerModel.CourierPartnerSchemeUpdateDetails().validate( + } = LogisticsPartnerModel.CourierPartnerSchemeUpdateRequest().validate( responseData, { abortEarly: false, allowUnknown: true } ); diff --git a/sdk/partner/Logistics/LogisticsPartnerModel.d.ts b/sdk/partner/Logistics/LogisticsPartnerModel.d.ts index 804da3bba..508ec7e9b 100644 --- a/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +++ b/sdk/partner/Logistics/LogisticsPartnerModel.d.ts @@ -1,36 +1,34 @@ export = LogisticsPartnerModel; /** - * @typedef BulkRegionServiceabilityTatDetails - * @property {string} country - Name of the country. - * @property {string} region - Name of the region for which the - * tat/serviceability file needs to be downloaded. - * @property {string} type - Denotes the type of file. + * @typedef BulkRegionServiceabilityTatRequest + * @property {string} country + * @property {string} region + * @property {string} type */ /** - * @typedef BulkRegionServiceabilityTatResultItemData - * @property {string} [country] - Name of the country. - * @property {string} [region] - Name of the region for which the - * tat/serviceability file needs to be downloaded. - * @property {string} [type] - Denotes the type of data. - * @property {string} [batch_id] - Unique identifier identifying the perticular request. - * @property {string} [status] - Current status of the request. - * @property {Object[]} [failed_records] - Information of records which failed - * @property {string} [file_path] - CDN path of the file. + * @typedef BulkRegionServiceabilityTatResponseItemData + * @property {string} [country] + * @property {string} [region] + * @property {string} [type] + * @property {string} [batch_id] + * @property {string} [status] + * @property {Object[]} [failed_records] + * @property {string} [file_path] */ /** - * @typedef ErrorResult - * @property {string} value - Fields containing the error. - * @property {string} message - Description of the error. - * @property {string} type - Type of the error. + * @typedef ErrorResponse + * @property {string} value + * @property {string} message + * @property {string} type */ /** - * @typedef FailureResult - * @property {boolean} success - Denotes if the request was successfully executed. - * @property {ErrorResult[]} error + * @typedef FailureResponse + * @property {boolean} success + * @property {ErrorResponse[]} error */ /** - * @typedef BulkRegionServiceabilityTatResult - * @property {BulkRegionServiceabilityTatResultItemData[]} [items] + * @typedef BulkRegionServiceabilityTatResponse + * @property {BulkRegionServiceabilityTatResponseItemData[]} [items] * @property {Page} [page] */ /** @@ -44,333 +42,114 @@ export = LogisticsPartnerModel; * @property {number} [size] - The number of items per page. */ /** - * @typedef CourierAccountUpdateDetails - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {string} stage - Denotes whether the account is in enabled or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. - */ -/** - * @typedef RegionTatItemResult - * @property {RegionTatResult[]} items - * @property {Page} page - */ -/** - * @typedef RegionServiceabilityItemResult - * @property {RegionServiceabilityResult[]} items - * @property {Page} page - */ -/** - * @typedef ServiceabilityDetailsResult - * @property {boolean} [first_mile] - Boolean value indicating whether - * first-mile service is available or not. - * @property {boolean} [last_mile] - Boolean value indicating whether last-mile - * service is available or not. - * @property {number} [cod_limit] - Limit on the amount of cash on delivery - * (COD) payments allowed in the specified region. - * @property {boolean} [doorstep_return] - Indicates if doorstep return service - * is available. This refers to the ability to return items directly from the - * customer's doorstep. - * @property {boolean} [doorstep_qc] - Indicates if doorstep quality check - * service is available. This refers to the ability to perform quality checks - * on items at the customer's doorstep. - * @property {string} [pickup_cutoff] - Time of day by which pickups must be - * scheduled to be processed on the same day. - * @property {boolean} [installation] - Boolean value indicating whether - * installation services are available in the specified region or not. - * @property {string} [id] - Unique identifier for the serviceability record. - */ -/** - * @typedef ServiceabilityDetails - * @property {boolean} [first_mile] - Boolean value indicating whether - * first-mile service is available or not. - * @property {boolean} [last_mile] - Boolean value indicating whether last-mile - * service is available or not. - * @property {number} [cod_limit] - Limit on the amount of cash on delivery - * (COD) payments allowed in the specified region. - * @property {boolean} [doorstep_return] - Indicates if doorstep return service - * is available. This refers to the ability to return items directly from the - * customer's doorstep. - * @property {boolean} [doorstep_qc] - Indicates if doorstep quality check - * service is available. This refers to the ability to perform quality checks - * on items at the customer's doorstep. - * @property {string} [pickup_cutoff] - Time of day by which pickups must be - * scheduled to be processed on the same day. - * @property {boolean} [installation] - Boolean value indicating whether - * installation services are available in the specified region or not. - */ -/** - * @typedef RegionServiceabilityResult - * @property {string} country_code - ISO2 code representing the country where - * the serviceability is being specified. - * @property {string} [state_code] - Code representing the state or province - * within the country where the serviceability is being specified. - * @property {string} [city_code] - Code representing the city within the state - * where the serviceability is being specified. - * @property {string} [sector_code] - Code representing a specific sector or - * district within the city where the serviceability is being specified. - * @property {string} [pincode] - Postal or ZIP code for the specific area - * within the city where the serviceability is being specified. - * @property {boolean} [first_mile] - Boolean value indicating whether - * first-mile service is available or not. - * @property {boolean} [last_mile] - Boolean value indicating whether last-mile - * service is available or not. - * @property {number} [cod_limit] - Limit on the amount of cash on delivery - * (COD) payments allowed in the specified region. - * @property {boolean} [doorstep_return] - Indicates if doorstep return service - * is available. This refers to the ability to return items directly from the - * customer's doorstep. - * @property {boolean} [doorstep_qc] - Indicates if doorstep quality check - * service is available. This refers to the ability to perform quality checks - * on items at the customer's doorstep. - * @property {string} [pickup_cutoff] - Time of day by which pickups must be - * scheduled to be processed on the same day. - * @property {boolean} [installation] - Boolean value indicating whether - * installation services are available in the specified region or not. - * @property {string} id - Unique identifier for the serviceability record. + * @typedef BulkRegionJobSerializer + * @property {string} [file_path] + * @property {string} country + * @property {string} action + * @property {string} region */ /** - * @typedef RegionServiceabilityDetails - * @property {string} country_code - ISO2 code representing the country where - * the serviceability is being specified. - * @property {string} [state_code] - Code representing the state or province - * within the country where the serviceability is being specified. - * @property {string} [city_code] - Code representing the city within the state - * where the serviceability is being specified. - * @property {string} [sector_code] - Code representing a specific sector or - * district within the city where the serviceability is being specified. - * @property {string} [pincode] - Postal or ZIP code for the specific area - * within the city where the serviceability is being specified. - * @property {boolean} [first_mile] - Boolean value indicating whether - * first-mile service is available or not. - * @property {boolean} [last_mile] - Boolean value indicating whether last-mile - * service is available or not. - * @property {number} [cod_limit] - Limit on the amount of cash on delivery - * (COD) payments allowed in the specified region. - * @property {boolean} [doorstep_return] - Indicates if doorstep return service - * is available. This refers to the ability to return items directly from the - * customer's doorstep. - * @property {boolean} [doorstep_qc] - Indicates if doorstep quality check - * service is available. This refers to the ability to perform quality checks - * on items at the customer's doorstep. - * @property {string} [pickup_cutoff] - Time of day by which pickups must be - * scheduled to be processed on the same day. - * @property {boolean} [installation] - Boolean value indicating whether - * installation services are available in the specified region or not. + * @typedef BulkRegionResponseItemData + * @property {string} file_path + * @property {number} [failed] + * @property {Object[]} [failed_records] + * @property {string} action + * @property {string} batch_id + * @property {string} country + * @property {number} [success] + * @property {string} region + * @property {string} status + * @property {number} [total] + * @property {string} [error_file_path] */ /** - * @typedef RegionTatDetails - * @property {string} from_country_code - ISO2 code representing the country of - * origin for the delivery. - * @property {string} [from_state_code] - Code representing the state or - * province of origin within the country. - * @property {string} [from_city_code] - Code representing the city of origin - * within the state. - * @property {string} [from_sector_code] - Code representing a specific sector - * or district within the city of origin. - * @property {string} [from_pincode] - Postal or ZIP code of the origin area. - * @property {string} to_country_code - ISO2 code representing the destination country. - * @property {string} [to_state_code] - Code representing the state or province - * of the destination within the country. - * @property {string} [to_city_code] - Code representing the city of destination - * within the state. - * @property {string} [to_sector_code] - Code representing a specific sector or - * district within the city of destination. - * @property {string} [to_pincode] - Postal or ZIP code of the destination area. - * @property {number} [max_delivery_time] - Maximum time required for delivery - * from the origin to the destination in seconds. - * @property {number} [min_delivery_time] - Minimum time required for delivery - * from the origin to the destination in seconds. - */ -/** - * @typedef RegionTatUpdateDetails - * @property {number} [max_delivery_time] - Maximum time required for delivery - * from the origin to the destination in seconds. - * @property {number} [min_delivery_time] - Minimum time required for delivery - * from the origin to the destination in seconds. - */ -/** - * @typedef RegionTatResult - * @property {string} from_country_code - ISO2 code representing the country of - * origin for the delivery. - * @property {string} [from_state_code] - Code representing the state or - * province of origin within the country. - * @property {string} [from_city_code] - Code representing the city of origin - * within the state. - * @property {string} [from_sector_code] - Code representing a specific sector - * or district within the city of origin. - * @property {string} [from_pincode] - Postal or ZIP code of the origin area. - * @property {string} to_country_code - ISO2 code representing the destination country. - * @property {string} [to_state_code] - Code representing the state or province - * of the destination within the country. - * @property {string} [to_city_code] - Code representing the city of destination - * within the state. - * @property {string} [to_sector_code] - Code representing a specific sector or - * district within the city of destination. - * @property {string} [to_pincode] - Postal or ZIP code of the destination area. - * @property {number} [max_delivery_time] - Maximum time required for delivery - * from the origin to the destination in seconds. - * @property {number} [min_delivery_time] - Minimum time required for delivery - * from the origin to the destination in seconds. - * @property {string} id - Unique identifier for the delivery time record. - */ -/** - * @typedef BulkRegionJobDetails - * @property {string} [file_path] - CDN path of the uploaded csv file for bulk import. - * @property {string} country - Country for which the tat or serviceability is - * to be imported or exported. - * @property {string} action - Denotes the import or export action to be performed. - * @property {string} region - Region of the country for which import or export - * is triggered. - */ -/** - * @typedef BulkRegionResultItemData - * @property {string} [file_path] - CDN path of the file which was used for bulk import. - * @property {number} [failed] - Count of the failed records. - * @property {Object[]} [failed_records] - Information of records which failed. - * @property {string} action - Denotes the import or export action performed. - * @property {string} batch_id - Unique id to identify the import or export query. - * @property {string} country - Country for which the import or export action is - * performed. - * @property {number} [success] - Denoted if the import or export was successful - * or failure. - * @property {string} region - Region of the country for which import or export - * is triggered. - * @property {string} status - Current status of the import or export action performed. - * @property {number} [total] - Count of total records. - * @property {string} [error_file_path] - Path of the error file. - */ -/** - * @typedef BulkRegionResult - * @property {BulkRegionResultItemData[]} items + * @typedef BulkRegionResponse + * @property {BulkRegionResponseItemData[]} items * @property {Page} page */ /** * @typedef CourierAccount - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} account_id - Unique identifier of courier partner scheme - * and company id combination. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {string} stage - Denotes whether the account is in enabled or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. + * @property {string} extension_id + * @property {string} account_id + * @property {string} scheme_id + * @property {boolean} is_self_ship + * @property {string} stage + * @property {boolean} is_own_account */ /** - * @typedef CourierAccountDetailsBody - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} [account_id] - Unique identifier of courier partner scheme - * and company id combination. - * @property {string} scheme_id - Unique identifier of courier account. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {string} stage - Denotes whether the courier account is in enabled - * or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. + * @typedef CourierAccountRequestBody + * @property {string} extension_id + * @property {string} [account_id] + * @property {string} scheme_id + * @property {boolean} is_self_ship + * @property {string} stage + * @property {boolean} is_own_account */ /** - * @typedef CourierPartnerAccountFailureResult + * @typedef CourierPartnerAccountFailureResponse * @property {boolean} success - * @property {ErrorResult[]} error + * @property {ErrorResponse[]} error */ /** - * @typedef CompanyCourierPartnerAccountListResult - * @property {CourierAccountResult[]} items + * @typedef CompanyCourierPartnerAccountListResponse + * @property {CourierAccountResponse[]} items * @property {Page} page */ /** - * @typedef CourierAccountResult - * @property {string} account_id - Unique identifier of courier partner scheme - * and company id combination. - * @property {string} scheme_id - Unique identifier of courier partner scheme. + * @typedef CourierAccountResponse + * @property {string} account_id + * @property {string} scheme_id * @property {boolean} is_self_ship - * @property {string} stage - Denotes whether the courier account is in enabled - * or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. + * @property {string} stage + * @property {boolean} is_own_account * @property {CourierPartnerSchemeModel} scheme_rules */ /** * @typedef CourierPartnerSchemeModel - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {string} name - Name of the scheme + * @property {string} extension_id + * @property {string} scheme_id + * @property {string} name * @property {ArithmeticOperations} weight - * @property {string} transport_type - Mode of transport associated with the - * courier partner scheme. - * @property {string} region - Serviceable region associated with the courier - * partner scheme. - * @property {string} delivery_type - Type of delivery associated with the - * courier partner scheme. - * @property {string[]} payment_mode - Mode of payment associated with the - * courier partner scheme. - * @property {string} stage - Denotes whether the courier partner scheme is in - * enabled or disabled stage. + * @property {string} transport_type + * @property {string} region + * @property {string} delivery_type + * @property {string[]} payment_mode + * @property {string} stage * @property {CourierPartnerSchemeFeatures} feature */ /** - * @typedef CourierPartnerSchemeDetailsModel - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} [scheme_id] - Unique identifier of courier partner scheme. - * @property {string} name - Name of the courier partner scheme. + * @typedef CourierPartnerSchemeRequestModel + * @property {string} extension_id + * @property {string} [scheme_id] + * @property {string} name * @property {ArithmeticOperations} weight - * @property {string} transport_type - Mode of transport associated with the - * courier partner scheme. - * @property {string} region - Serviceable region associated with the courier - * partner scheme. - * @property {string} delivery_type - Type of delivery associated with the - * courier partner scheme. - * @property {string[]} payment_mode - Mode of payment associated with the - * courier partner scheme. - * @property {string} stage - Denotes whether the courier partner scheme is in - * enabled or disabled stage. + * @property {string} transport_type + * @property {string} region + * @property {string} delivery_type + * @property {string[]} payment_mode + * @property {string} stage * @property {CourierPartnerSchemeFeatures} feature */ /** * @typedef CourierPartnerSchemeFeatures - * @property {boolean} [doorstep_qc] - Indicates if the courier partner offers - * doorstep quality check services. - * @property {boolean} [qr] - Specifies whether the courier partner supports QR - * code-based operations. - * @property {boolean} [mps] - Denotes if the courier partner supports - * multi-part shipment services. - * @property {boolean} [ndr] - Indicates if the Non-Delivery Report (NDR) - * feature is supported by the courier partner. - * @property {number} [ndr_attempts] - Number of attempts allowed for resolving - * Non-Delivery Reports (NDR). - * @property {boolean} [dangerous_goods] - Specifies if the courier partner - * handles the transportation of dangerous goods. - * @property {boolean} [fragile_goods] - Indicates whether the courier partner - * manages the shipment of fragile goods. - * @property {boolean} [restricted_goods] - Indicates if the courier partner - * handles restricted goods, as per regulatory guidelines. - * @property {boolean} [cold_storage_goods] - Denotes if the courier partner - * provides cold storage facilities for goods. - * @property {boolean} [doorstep_exchange] - Indicates if the courier partner - * supports doorstep exchange services. - * @property {boolean} [doorstep_return] - Specifies if the courier partner - * offers doorstep return services. - * @property {boolean} [product_installation] - Indicates if the courier partner - * provides product installation services upon delivery. - * @property {boolean} [openbox_delivery] - Specifies whether the courier - * partner supports open-box delivery, allowing customers to inspect goods - * before accepting. - * @property {string} [status_updates] - Describes the type of status updates - * provided by the courier partner (e.g., real-time, periodic). - * @property {boolean} [multi_pick_single_drop] - Indicates if the courier - * partner supports multiple pickups to a single drop location. - * @property {boolean} [single_pick_multi_drop] - Indicates whether the courier - * partner supports single pickup to multiple drop locations. - * @property {boolean} [multi_pick_multi_drop] - Denotes if the courier partner - * offers services for multiple pickups to multiple drop locations. - * @property {boolean} [ewaybill] - Specifies if the courier partner requires or - * supports the generation of e-waybills for shipments. - * @property {number} [qc_shipment_item_quantity] - Defines the maximum quantity - * of items allowed in a quality check shipment. - * @property {number} [non_qc_shipment_item_quantity] - Defines the maximum - * quantity of items allowed in a non-quality check shipment. + * @property {boolean} [doorstep_qc] + * @property {boolean} [qr] + * @property {boolean} [mps] + * @property {boolean} [ndr] + * @property {number} [ndr_attempts] + * @property {boolean} [dangerous_goods] + * @property {boolean} [fragile_goods] + * @property {boolean} [restricted_goods] + * @property {boolean} [cold_storage_goods] + * @property {boolean} [doorstep_exchange] + * @property {boolean} [doorstep_return] + * @property {boolean} [product_installation] + * @property {boolean} [openbox_delivery] + * @property {string} [status_updates] + * @property {boolean} [multi_pick_single_drop] + * @property {boolean} [single_pick_multi_drop] + * @property {boolean} [multi_pick_multi_drop] + * @property {boolean} [ewaybill] */ /** * @typedef ArithmeticOperations @@ -380,19 +159,14 @@ export = LogisticsPartnerModel; * @property {number} [gte] */ /** - * @typedef CourierPartnerSchemeUpdateDetails - * @property {string} name - Name of the scheme. + * @typedef CourierPartnerSchemeUpdateRequest + * @property {string} name * @property {ArithmeticOperations} weight - * @property {string} transport_type - Mode of transport associated with the - * courier partner scheme. - * @property {string} region - Serviceable region associated with the courier - * partner scheme. - * @property {string} delivery_type - Type of delivery associated with the - * courier partner scheme. - * @property {string[]} payment_mode - Mode of payment associated with the - * courier partner scheme. - * @property {string} stage - Denotes whether the courier partner scheme is in - * enabled or disabled stage. + * @property {string} transport_type + * @property {string} region + * @property {string} delivery_type + * @property {string[]} payment_mode + * @property {string} stage * @property {CourierPartnerSchemeFeatures} feature */ /** @@ -402,127 +176,64 @@ export = LogisticsPartnerModel; */ /** * @typedef GetCountriesItems - * @property {string} [id] - Unique identifier of the country. - * @property {string} [name] - Name of the country. - * @property {string} [iso2] - Two-letter ISO code representing the country. - * @property {string} [iso3] - Three-letter ISO code representing the country. - * @property {string[]} [timezones] - List of time zones used in the country - * (e.g., ["America/New_York", "America/Los_Angeles"]). - * @property {HierarchyItems[]} [hierarchy] - Levels within the country (e.g., - * states, cities) and their slugs (e.g., [{"name": "State", "slug": "state"}, - * {"name": "City", "slug": "city"}]). - * @property {string} [phone_code] - International dialing code for the country - * (e.g., "+1"). - * @property {string} [currency] - Indicates currency for the country (e.g., "INR"). - * @property {string} [type] - Indicates the type of object (e.g., "country"). - * @property {string} [latitude] - Geographical latitude of the country (e.g., "37.0902"). - * @property {string} [longitude] - Geographical longitude of the country (e.g., - * "-95.7129"). - * @property {string} [display_name] - User-friendly version of the geographical - * data, which may be more descriptive or formatted differently. - * @property {boolean} [has_next_hierarchy] - More detailed hierarchical data is - * available, meaning states, cities, or other regions within the country have - * been populated in the system. + * @property {string} [id] + * @property {string} [name] + * @property {string} [iso2] + * @property {string} [iso3] + * @property {string[]} [timezones] + * @property {HierarchyItems[]} [hierarchy] + * @property {string} [phone_code] + * @property {string} [currency] + * @property {string} [type] + * @property {string} [latitude] + * @property {string} [longitude] + * @property {string} [display_name] */ /** * @typedef HierarchyItems - * @property {string} [display_name] - It represent a country display name. - * @property {string} [slug] - A URL-friendly version of the name, often used - * for referencing or querying purposes. - */ -/** - * @typedef ValidationError - * @property {string} message - A brief description of the error encountered. - * @property {string} field - The field in the request that caused the error. - */ -/** - * @typedef StandardError - * @property {string} message - A brief description of the error. + * @property {string} [display_name] + * @property {string} [slug] */ declare class LogisticsPartnerModel { } declare namespace LogisticsPartnerModel { - export { BulkRegionServiceabilityTatDetails, BulkRegionServiceabilityTatResultItemData, ErrorResult, FailureResult, BulkRegionServiceabilityTatResult, Page, CourierAccountUpdateDetails, RegionTatItemResult, RegionServiceabilityItemResult, ServiceabilityDetailsResult, ServiceabilityDetails, RegionServiceabilityResult, RegionServiceabilityDetails, RegionTatDetails, RegionTatUpdateDetails, RegionTatResult, BulkRegionJobDetails, BulkRegionResultItemData, BulkRegionResult, CourierAccount, CourierAccountDetailsBody, CourierPartnerAccountFailureResult, CompanyCourierPartnerAccountListResult, CourierAccountResult, CourierPartnerSchemeModel, CourierPartnerSchemeDetailsModel, CourierPartnerSchemeFeatures, ArithmeticOperations, CourierPartnerSchemeUpdateDetails, GetCountries, GetCountriesItems, HierarchyItems, ValidationError, StandardError }; + export { BulkRegionServiceabilityTatRequest, BulkRegionServiceabilityTatResponseItemData, ErrorResponse, FailureResponse, BulkRegionServiceabilityTatResponse, Page, BulkRegionJobSerializer, BulkRegionResponseItemData, BulkRegionResponse, CourierAccount, CourierAccountRequestBody, CourierPartnerAccountFailureResponse, CompanyCourierPartnerAccountListResponse, CourierAccountResponse, CourierPartnerSchemeModel, CourierPartnerSchemeRequestModel, CourierPartnerSchemeFeatures, ArithmeticOperations, CourierPartnerSchemeUpdateRequest, GetCountries, GetCountriesItems, HierarchyItems }; } -/** @returns {BulkRegionServiceabilityTatDetails} */ -declare function BulkRegionServiceabilityTatDetails(): BulkRegionServiceabilityTatDetails; -type BulkRegionServiceabilityTatDetails = { - /** - * - Name of the country. - */ +/** @returns {BulkRegionServiceabilityTatRequest} */ +declare function BulkRegionServiceabilityTatRequest(): BulkRegionServiceabilityTatRequest; +type BulkRegionServiceabilityTatRequest = { country: string; - /** - * - Name of the region for which the - * tat/serviceability file needs to be downloaded. - */ region: string; - /** - * - Denotes the type of file. - */ type: string; }; -/** @returns {BulkRegionServiceabilityTatResultItemData} */ -declare function BulkRegionServiceabilityTatResultItemData(): BulkRegionServiceabilityTatResultItemData; -type BulkRegionServiceabilityTatResultItemData = { - /** - * - Name of the country. - */ +/** @returns {BulkRegionServiceabilityTatResponseItemData} */ +declare function BulkRegionServiceabilityTatResponseItemData(): BulkRegionServiceabilityTatResponseItemData; +type BulkRegionServiceabilityTatResponseItemData = { country?: string; - /** - * - Name of the region for which the - * tat/serviceability file needs to be downloaded. - */ region?: string; - /** - * - Denotes the type of data. - */ type?: string; - /** - * - Unique identifier identifying the perticular request. - */ batch_id?: string; - /** - * - Current status of the request. - */ status?: string; - /** - * - Information of records which failed - */ failed_records?: any[]; - /** - * - CDN path of the file. - */ file_path?: string; }; -/** @returns {ErrorResult} */ -declare function ErrorResult(): ErrorResult; -type ErrorResult = { - /** - * - Fields containing the error. - */ +/** @returns {ErrorResponse} */ +declare function ErrorResponse(): ErrorResponse; +type ErrorResponse = { value: string; - /** - * - Description of the error. - */ message: string; - /** - * - Type of the error. - */ type: string; }; -/** @returns {FailureResult} */ -declare function FailureResult(): FailureResult; -type FailureResult = { - /** - * - Denotes if the request was successfully executed. - */ +/** @returns {FailureResponse} */ +declare function FailureResponse(): FailureResponse; +type FailureResponse = { success: boolean; - error: ErrorResult[]; + error: ErrorResponse[]; }; -/** @returns {BulkRegionServiceabilityTatResult} */ -declare function BulkRegionServiceabilityTatResult(): BulkRegionServiceabilityTatResult; -type BulkRegionServiceabilityTatResult = { - items?: BulkRegionServiceabilityTatResultItemData[]; +/** @returns {BulkRegionServiceabilityTatResponse} */ +declare function BulkRegionServiceabilityTatResponse(): BulkRegionServiceabilityTatResponse; +type BulkRegionServiceabilityTatResponse = { + items?: BulkRegionServiceabilityTatResponseItemData[]; page?: Page; }; /** @returns {Page} */ @@ -557,772 +268,126 @@ type Page = { */ size?: number; }; -/** @returns {CourierAccountUpdateDetails} */ -declare function CourierAccountUpdateDetails(): CourierAccountUpdateDetails; -type CourierAccountUpdateDetails = { - /** - * - Unique identifier of courier partner extension. - */ - extension_id: string; - /** - * - Unique identifier of courier partner scheme. - */ - scheme_id: string; - /** - * - Denotes if the account is of self delivery type. - */ - is_self_ship: boolean; - /** - * - Denotes whether the account is in enabled or disabled stage. - */ - stage: string; - /** - * - Denotes whether it is the seller's own - * account or not. - */ - is_own_account: boolean; -}; -/** @returns {RegionTatItemResult} */ -declare function RegionTatItemResult(): RegionTatItemResult; -type RegionTatItemResult = { - items: RegionTatResult[]; - page: Page; -}; -/** @returns {RegionServiceabilityItemResult} */ -declare function RegionServiceabilityItemResult(): RegionServiceabilityItemResult; -type RegionServiceabilityItemResult = { - items: RegionServiceabilityResult[]; - page: Page; -}; -/** @returns {ServiceabilityDetailsResult} */ -declare function ServiceabilityDetailsResult(): ServiceabilityDetailsResult; -type ServiceabilityDetailsResult = { - /** - * - Boolean value indicating whether - * first-mile service is available or not. - */ - first_mile?: boolean; - /** - * - Boolean value indicating whether last-mile - * service is available or not. - */ - last_mile?: boolean; - /** - * - Limit on the amount of cash on delivery - * (COD) payments allowed in the specified region. - */ - cod_limit?: number; - /** - * - Indicates if doorstep return service - * is available. This refers to the ability to return items directly from the - * customer's doorstep. - */ - doorstep_return?: boolean; - /** - * - Indicates if doorstep quality check - * service is available. This refers to the ability to perform quality checks - * on items at the customer's doorstep. - */ - doorstep_qc?: boolean; - /** - * - Time of day by which pickups must be - * scheduled to be processed on the same day. - */ - pickup_cutoff?: string; - /** - * - Boolean value indicating whether - * installation services are available in the specified region or not. - */ - installation?: boolean; - /** - * - Unique identifier for the serviceability record. - */ - id?: string; -}; -/** @returns {ServiceabilityDetails} */ -declare function ServiceabilityDetails(): ServiceabilityDetails; -type ServiceabilityDetails = { - /** - * - Boolean value indicating whether - * first-mile service is available or not. - */ - first_mile?: boolean; - /** - * - Boolean value indicating whether last-mile - * service is available or not. - */ - last_mile?: boolean; - /** - * - Limit on the amount of cash on delivery - * (COD) payments allowed in the specified region. - */ - cod_limit?: number; - /** - * - Indicates if doorstep return service - * is available. This refers to the ability to return items directly from the - * customer's doorstep. - */ - doorstep_return?: boolean; - /** - * - Indicates if doorstep quality check - * service is available. This refers to the ability to perform quality checks - * on items at the customer's doorstep. - */ - doorstep_qc?: boolean; - /** - * - Time of day by which pickups must be - * scheduled to be processed on the same day. - */ - pickup_cutoff?: string; - /** - * - Boolean value indicating whether - * installation services are available in the specified region or not. - */ - installation?: boolean; -}; -/** @returns {RegionServiceabilityResult} */ -declare function RegionServiceabilityResult(): RegionServiceabilityResult; -type RegionServiceabilityResult = { - /** - * - ISO2 code representing the country where - * the serviceability is being specified. - */ - country_code: string; - /** - * - Code representing the state or province - * within the country where the serviceability is being specified. - */ - state_code?: string; - /** - * - Code representing the city within the state - * where the serviceability is being specified. - */ - city_code?: string; - /** - * - Code representing a specific sector or - * district within the city where the serviceability is being specified. - */ - sector_code?: string; - /** - * - Postal or ZIP code for the specific area - * within the city where the serviceability is being specified. - */ - pincode?: string; - /** - * - Boolean value indicating whether - * first-mile service is available or not. - */ - first_mile?: boolean; - /** - * - Boolean value indicating whether last-mile - * service is available or not. - */ - last_mile?: boolean; - /** - * - Limit on the amount of cash on delivery - * (COD) payments allowed in the specified region. - */ - cod_limit?: number; - /** - * - Indicates if doorstep return service - * is available. This refers to the ability to return items directly from the - * customer's doorstep. - */ - doorstep_return?: boolean; - /** - * - Indicates if doorstep quality check - * service is available. This refers to the ability to perform quality checks - * on items at the customer's doorstep. - */ - doorstep_qc?: boolean; - /** - * - Time of day by which pickups must be - * scheduled to be processed on the same day. - */ - pickup_cutoff?: string; - /** - * - Boolean value indicating whether - * installation services are available in the specified region or not. - */ - installation?: boolean; - /** - * - Unique identifier for the serviceability record. - */ - id: string; -}; -/** @returns {RegionServiceabilityDetails} */ -declare function RegionServiceabilityDetails(): RegionServiceabilityDetails; -type RegionServiceabilityDetails = { - /** - * - ISO2 code representing the country where - * the serviceability is being specified. - */ - country_code: string; - /** - * - Code representing the state or province - * within the country where the serviceability is being specified. - */ - state_code?: string; - /** - * - Code representing the city within the state - * where the serviceability is being specified. - */ - city_code?: string; - /** - * - Code representing a specific sector or - * district within the city where the serviceability is being specified. - */ - sector_code?: string; - /** - * - Postal or ZIP code for the specific area - * within the city where the serviceability is being specified. - */ - pincode?: string; - /** - * - Boolean value indicating whether - * first-mile service is available or not. - */ - first_mile?: boolean; - /** - * - Boolean value indicating whether last-mile - * service is available or not. - */ - last_mile?: boolean; - /** - * - Limit on the amount of cash on delivery - * (COD) payments allowed in the specified region. - */ - cod_limit?: number; - /** - * - Indicates if doorstep return service - * is available. This refers to the ability to return items directly from the - * customer's doorstep. - */ - doorstep_return?: boolean; - /** - * - Indicates if doorstep quality check - * service is available. This refers to the ability to perform quality checks - * on items at the customer's doorstep. - */ - doorstep_qc?: boolean; - /** - * - Time of day by which pickups must be - * scheduled to be processed on the same day. - */ - pickup_cutoff?: string; - /** - * - Boolean value indicating whether - * installation services are available in the specified region or not. - */ - installation?: boolean; -}; -/** @returns {RegionTatDetails} */ -declare function RegionTatDetails(): RegionTatDetails; -type RegionTatDetails = { - /** - * - ISO2 code representing the country of - * origin for the delivery. - */ - from_country_code: string; - /** - * - Code representing the state or - * province of origin within the country. - */ - from_state_code?: string; - /** - * - Code representing the city of origin - * within the state. - */ - from_city_code?: string; - /** - * - Code representing a specific sector - * or district within the city of origin. - */ - from_sector_code?: string; - /** - * - Postal or ZIP code of the origin area. - */ - from_pincode?: string; - /** - * - ISO2 code representing the destination country. - */ - to_country_code: string; - /** - * - Code representing the state or province - * of the destination within the country. - */ - to_state_code?: string; - /** - * - Code representing the city of destination - * within the state. - */ - to_city_code?: string; - /** - * - Code representing a specific sector or - * district within the city of destination. - */ - to_sector_code?: string; - /** - * - Postal or ZIP code of the destination area. - */ - to_pincode?: string; - /** - * - Maximum time required for delivery - * from the origin to the destination in seconds. - */ - max_delivery_time?: number; - /** - * - Minimum time required for delivery - * from the origin to the destination in seconds. - */ - min_delivery_time?: number; -}; -/** @returns {RegionTatUpdateDetails} */ -declare function RegionTatUpdateDetails(): RegionTatUpdateDetails; -type RegionTatUpdateDetails = { - /** - * - Maximum time required for delivery - * from the origin to the destination in seconds. - */ - max_delivery_time?: number; - /** - * - Minimum time required for delivery - * from the origin to the destination in seconds. - */ - min_delivery_time?: number; -}; -/** @returns {RegionTatResult} */ -declare function RegionTatResult(): RegionTatResult; -type RegionTatResult = { - /** - * - ISO2 code representing the country of - * origin for the delivery. - */ - from_country_code: string; - /** - * - Code representing the state or - * province of origin within the country. - */ - from_state_code?: string; - /** - * - Code representing the city of origin - * within the state. - */ - from_city_code?: string; - /** - * - Code representing a specific sector - * or district within the city of origin. - */ - from_sector_code?: string; - /** - * - Postal or ZIP code of the origin area. - */ - from_pincode?: string; - /** - * - ISO2 code representing the destination country. - */ - to_country_code: string; - /** - * - Code representing the state or province - * of the destination within the country. - */ - to_state_code?: string; - /** - * - Code representing the city of destination - * within the state. - */ - to_city_code?: string; - /** - * - Code representing a specific sector or - * district within the city of destination. - */ - to_sector_code?: string; - /** - * - Postal or ZIP code of the destination area. - */ - to_pincode?: string; - /** - * - Maximum time required for delivery - * from the origin to the destination in seconds. - */ - max_delivery_time?: number; - /** - * - Minimum time required for delivery - * from the origin to the destination in seconds. - */ - min_delivery_time?: number; - /** - * - Unique identifier for the delivery time record. - */ - id: string; -}; -/** @returns {BulkRegionJobDetails} */ -declare function BulkRegionJobDetails(): BulkRegionJobDetails; -type BulkRegionJobDetails = { - /** - * - CDN path of the uploaded csv file for bulk import. - */ +/** @returns {BulkRegionJobSerializer} */ +declare function BulkRegionJobSerializer(): BulkRegionJobSerializer; +type BulkRegionJobSerializer = { file_path?: string; - /** - * - Country for which the tat or serviceability is - * to be imported or exported. - */ country: string; - /** - * - Denotes the import or export action to be performed. - */ action: string; - /** - * - Region of the country for which import or export - * is triggered. - */ region: string; }; -/** @returns {BulkRegionResultItemData} */ -declare function BulkRegionResultItemData(): BulkRegionResultItemData; -type BulkRegionResultItemData = { - /** - * - CDN path of the file which was used for bulk import. - */ - file_path?: string; - /** - * - Count of the failed records. - */ +/** @returns {BulkRegionResponseItemData} */ +declare function BulkRegionResponseItemData(): BulkRegionResponseItemData; +type BulkRegionResponseItemData = { + file_path: string; failed?: number; - /** - * - Information of records which failed. - */ failed_records?: any[]; - /** - * - Denotes the import or export action performed. - */ action: string; - /** - * - Unique id to identify the import or export query. - */ batch_id: string; - /** - * - Country for which the import or export action is - * performed. - */ country: string; - /** - * - Denoted if the import or export was successful - * or failure. - */ success?: number; - /** - * - Region of the country for which import or export - * is triggered. - */ region: string; - /** - * - Current status of the import or export action performed. - */ status: string; - /** - * - Count of total records. - */ total?: number; - /** - * - Path of the error file. - */ error_file_path?: string; }; -/** @returns {BulkRegionResult} */ -declare function BulkRegionResult(): BulkRegionResult; -type BulkRegionResult = { - items: BulkRegionResultItemData[]; +/** @returns {BulkRegionResponse} */ +declare function BulkRegionResponse(): BulkRegionResponse; +type BulkRegionResponse = { + items: BulkRegionResponseItemData[]; page: Page; }; /** @returns {CourierAccount} */ declare function CourierAccount(): CourierAccount; type CourierAccount = { - /** - * - Unique identifier of courier partner extension. - */ extension_id: string; - /** - * - Unique identifier of courier partner scheme - * and company id combination. - */ account_id: string; - /** - * - Unique identifier of courier partner scheme. - */ scheme_id: string; - /** - * - Denotes if the account is of self delivery type. - */ is_self_ship: boolean; - /** - * - Denotes whether the account is in enabled or disabled stage. - */ stage: string; - /** - * - Denotes whether it is the seller's own - * account or not. - */ is_own_account: boolean; }; -/** @returns {CourierAccountDetailsBody} */ -declare function CourierAccountDetailsBody(): CourierAccountDetailsBody; -type CourierAccountDetailsBody = { - /** - * - Unique identifier of courier partner extension. - */ +/** @returns {CourierAccountRequestBody} */ +declare function CourierAccountRequestBody(): CourierAccountRequestBody; +type CourierAccountRequestBody = { extension_id: string; - /** - * - Unique identifier of courier partner scheme - * and company id combination. - */ account_id?: string; - /** - * - Unique identifier of courier account. - */ scheme_id: string; - /** - * - Denotes if the account is of self delivery type. - */ is_self_ship: boolean; - /** - * - Denotes whether the courier account is in enabled - * or disabled stage. - */ stage: string; - /** - * - Denotes whether it is the seller's own - * account or not. - */ is_own_account: boolean; }; -/** @returns {CourierPartnerAccountFailureResult} */ -declare function CourierPartnerAccountFailureResult(): CourierPartnerAccountFailureResult; -type CourierPartnerAccountFailureResult = { +/** @returns {CourierPartnerAccountFailureResponse} */ +declare function CourierPartnerAccountFailureResponse(): CourierPartnerAccountFailureResponse; +type CourierPartnerAccountFailureResponse = { success: boolean; - error: ErrorResult[]; + error: ErrorResponse[]; }; -/** @returns {CompanyCourierPartnerAccountListResult} */ -declare function CompanyCourierPartnerAccountListResult(): CompanyCourierPartnerAccountListResult; -type CompanyCourierPartnerAccountListResult = { - items: CourierAccountResult[]; +/** @returns {CompanyCourierPartnerAccountListResponse} */ +declare function CompanyCourierPartnerAccountListResponse(): CompanyCourierPartnerAccountListResponse; +type CompanyCourierPartnerAccountListResponse = { + items: CourierAccountResponse[]; page: Page; }; -/** @returns {CourierAccountResult} */ -declare function CourierAccountResult(): CourierAccountResult; -type CourierAccountResult = { - /** - * - Unique identifier of courier partner scheme - * and company id combination. - */ +/** @returns {CourierAccountResponse} */ +declare function CourierAccountResponse(): CourierAccountResponse; +type CourierAccountResponse = { account_id: string; - /** - * - Unique identifier of courier partner scheme. - */ scheme_id: string; is_self_ship: boolean; - /** - * - Denotes whether the courier account is in enabled - * or disabled stage. - */ stage: string; - /** - * - Denotes whether it is the seller's own - * account or not. - */ is_own_account: boolean; scheme_rules: CourierPartnerSchemeModel; }; /** @returns {CourierPartnerSchemeModel} */ declare function CourierPartnerSchemeModel(): CourierPartnerSchemeModel; type CourierPartnerSchemeModel = { - /** - * - Unique identifier of courier partner extension. - */ extension_id: string; - /** - * - Unique identifier of courier partner scheme. - */ scheme_id: string; - /** - * - Name of the scheme - */ name: string; weight: ArithmeticOperations; - /** - * - Mode of transport associated with the - * courier partner scheme. - */ transport_type: string; - /** - * - Serviceable region associated with the courier - * partner scheme. - */ region: string; - /** - * - Type of delivery associated with the - * courier partner scheme. - */ delivery_type: string; - /** - * - Mode of payment associated with the - * courier partner scheme. - */ payment_mode: string[]; - /** - * - Denotes whether the courier partner scheme is in - * enabled or disabled stage. - */ stage: string; feature: CourierPartnerSchemeFeatures; }; -/** @returns {CourierPartnerSchemeDetailsModel} */ -declare function CourierPartnerSchemeDetailsModel(): CourierPartnerSchemeDetailsModel; -type CourierPartnerSchemeDetailsModel = { - /** - * - Unique identifier of courier partner extension. - */ +/** @returns {CourierPartnerSchemeRequestModel} */ +declare function CourierPartnerSchemeRequestModel(): CourierPartnerSchemeRequestModel; +type CourierPartnerSchemeRequestModel = { extension_id: string; - /** - * - Unique identifier of courier partner scheme. - */ scheme_id?: string; - /** - * - Name of the courier partner scheme. - */ name: string; weight: ArithmeticOperations; - /** - * - Mode of transport associated with the - * courier partner scheme. - */ transport_type: string; - /** - * - Serviceable region associated with the courier - * partner scheme. - */ region: string; - /** - * - Type of delivery associated with the - * courier partner scheme. - */ delivery_type: string; - /** - * - Mode of payment associated with the - * courier partner scheme. - */ payment_mode: string[]; - /** - * - Denotes whether the courier partner scheme is in - * enabled or disabled stage. - */ stage: string; feature: CourierPartnerSchemeFeatures; }; /** @returns {CourierPartnerSchemeFeatures} */ declare function CourierPartnerSchemeFeatures(): CourierPartnerSchemeFeatures; type CourierPartnerSchemeFeatures = { - /** - * - Indicates if the courier partner offers - * doorstep quality check services. - */ doorstep_qc?: boolean; - /** - * - Specifies whether the courier partner supports QR - * code-based operations. - */ qr?: boolean; - /** - * - Denotes if the courier partner supports - * multi-part shipment services. - */ mps?: boolean; - /** - * - Indicates if the Non-Delivery Report (NDR) - * feature is supported by the courier partner. - */ ndr?: boolean; - /** - * - Number of attempts allowed for resolving - * Non-Delivery Reports (NDR). - */ ndr_attempts?: number; - /** - * - Specifies if the courier partner - * handles the transportation of dangerous goods. - */ dangerous_goods?: boolean; - /** - * - Indicates whether the courier partner - * manages the shipment of fragile goods. - */ fragile_goods?: boolean; - /** - * - Indicates if the courier partner - * handles restricted goods, as per regulatory guidelines. - */ restricted_goods?: boolean; - /** - * - Denotes if the courier partner - * provides cold storage facilities for goods. - */ cold_storage_goods?: boolean; - /** - * - Indicates if the courier partner - * supports doorstep exchange services. - */ doorstep_exchange?: boolean; - /** - * - Specifies if the courier partner - * offers doorstep return services. - */ doorstep_return?: boolean; - /** - * - Indicates if the courier partner - * provides product installation services upon delivery. - */ product_installation?: boolean; - /** - * - Specifies whether the courier - * partner supports open-box delivery, allowing customers to inspect goods - * before accepting. - */ openbox_delivery?: boolean; - /** - * - Describes the type of status updates - * provided by the courier partner (e.g., real-time, periodic). - */ status_updates?: string; - /** - * - Indicates if the courier - * partner supports multiple pickups to a single drop location. - */ multi_pick_single_drop?: boolean; - /** - * - Indicates whether the courier - * partner supports single pickup to multiple drop locations. - */ single_pick_multi_drop?: boolean; - /** - * - Denotes if the courier partner - * offers services for multiple pickups to multiple drop locations. - */ multi_pick_multi_drop?: boolean; - /** - * - Specifies if the courier partner requires or - * supports the generation of e-waybills for shipments. - */ ewaybill?: boolean; - /** - * - Defines the maximum quantity - * of items allowed in a quality check shipment. - */ - qc_shipment_item_quantity?: number; - /** - * - Defines the maximum - * quantity of items allowed in a non-quality check shipment. - */ - non_qc_shipment_item_quantity?: number; }; /** @returns {ArithmeticOperations} */ declare function ArithmeticOperations(): ArithmeticOperations; @@ -1332,38 +397,15 @@ type ArithmeticOperations = { lte?: number; gte?: number; }; -/** @returns {CourierPartnerSchemeUpdateDetails} */ -declare function CourierPartnerSchemeUpdateDetails(): CourierPartnerSchemeUpdateDetails; -type CourierPartnerSchemeUpdateDetails = { - /** - * - Name of the scheme. - */ +/** @returns {CourierPartnerSchemeUpdateRequest} */ +declare function CourierPartnerSchemeUpdateRequest(): CourierPartnerSchemeUpdateRequest; +type CourierPartnerSchemeUpdateRequest = { name: string; weight: ArithmeticOperations; - /** - * - Mode of transport associated with the - * courier partner scheme. - */ transport_type: string; - /** - * - Serviceable region associated with the courier - * partner scheme. - */ region: string; - /** - * - Type of delivery associated with the - * courier partner scheme. - */ delivery_type: string; - /** - * - Mode of payment associated with the - * courier partner scheme. - */ payment_mode: string[]; - /** - * - Denotes whether the courier partner scheme is in - * enabled or disabled stage. - */ stage: string; feature: CourierPartnerSchemeFeatures; }; @@ -1376,97 +418,22 @@ type GetCountries = { /** @returns {GetCountriesItems} */ declare function GetCountriesItems(): GetCountriesItems; type GetCountriesItems = { - /** - * - Unique identifier of the country. - */ id?: string; - /** - * - Name of the country. - */ name?: string; - /** - * - Two-letter ISO code representing the country. - */ iso2?: string; - /** - * - Three-letter ISO code representing the country. - */ iso3?: string; - /** - * - List of time zones used in the country - * (e.g., ["America/New_York", "America/Los_Angeles"]). - */ timezones?: string[]; - /** - * - Levels within the country (e.g., - * states, cities) and their slugs (e.g., [{"name": "State", "slug": "state"}, - * {"name": "City", "slug": "city"}]). - */ hierarchy?: HierarchyItems[]; - /** - * - International dialing code for the country - * (e.g., "+1"). - */ phone_code?: string; - /** - * - Indicates currency for the country (e.g., "INR"). - */ currency?: string; - /** - * - Indicates the type of object (e.g., "country"). - */ type?: string; - /** - * - Geographical latitude of the country (e.g., "37.0902"). - */ latitude?: string; - /** - * - Geographical longitude of the country (e.g., - * "-95.7129"). - */ longitude?: string; - /** - * - User-friendly version of the geographical - * data, which may be more descriptive or formatted differently. - */ display_name?: string; - /** - * - More detailed hierarchical data is - * available, meaning states, cities, or other regions within the country have - * been populated in the system. - */ - has_next_hierarchy?: boolean; }; /** @returns {HierarchyItems} */ declare function HierarchyItems(): HierarchyItems; type HierarchyItems = { - /** - * - It represent a country display name. - */ display_name?: string; - /** - * - A URL-friendly version of the name, often used - * for referencing or querying purposes. - */ slug?: string; }; -/** @returns {ValidationError} */ -declare function ValidationError(): ValidationError; -type ValidationError = { - /** - * - A brief description of the error encountered. - */ - message: string; - /** - * - The field in the request that caused the error. - */ - field: string; -}; -/** @returns {StandardError} */ -declare function StandardError(): StandardError; -type StandardError = { - /** - * - A brief description of the error. - */ - message: string; -}; diff --git a/sdk/partner/Logistics/LogisticsPartnerModel.js b/sdk/partner/Logistics/LogisticsPartnerModel.js index 9c2d098aa..836740053 100644 --- a/sdk/partner/Logistics/LogisticsPartnerModel.js +++ b/sdk/partner/Logistics/LogisticsPartnerModel.js @@ -1,41 +1,39 @@ const Joi = require("joi"); /** - * @typedef BulkRegionServiceabilityTatDetails - * @property {string} country - Name of the country. - * @property {string} region - Name of the region for which the - * tat/serviceability file needs to be downloaded. - * @property {string} type - Denotes the type of file. + * @typedef BulkRegionServiceabilityTatRequest + * @property {string} country + * @property {string} region + * @property {string} type */ /** - * @typedef BulkRegionServiceabilityTatResultItemData - * @property {string} [country] - Name of the country. - * @property {string} [region] - Name of the region for which the - * tat/serviceability file needs to be downloaded. - * @property {string} [type] - Denotes the type of data. - * @property {string} [batch_id] - Unique identifier identifying the perticular request. - * @property {string} [status] - Current status of the request. - * @property {Object[]} [failed_records] - Information of records which failed - * @property {string} [file_path] - CDN path of the file. + * @typedef BulkRegionServiceabilityTatResponseItemData + * @property {string} [country] + * @property {string} [region] + * @property {string} [type] + * @property {string} [batch_id] + * @property {string} [status] + * @property {Object[]} [failed_records] + * @property {string} [file_path] */ /** - * @typedef ErrorResult - * @property {string} value - Fields containing the error. - * @property {string} message - Description of the error. - * @property {string} type - Type of the error. + * @typedef ErrorResponse + * @property {string} value + * @property {string} message + * @property {string} type */ /** - * @typedef FailureResult - * @property {boolean} success - Denotes if the request was successfully executed. - * @property {ErrorResult[]} error + * @typedef FailureResponse + * @property {boolean} success + * @property {ErrorResponse[]} error */ /** - * @typedef BulkRegionServiceabilityTatResult - * @property {BulkRegionServiceabilityTatResultItemData[]} [items] + * @typedef BulkRegionServiceabilityTatResponse + * @property {BulkRegionServiceabilityTatResponseItemData[]} [items] * @property {Page} [page] */ @@ -51,353 +49,124 @@ const Joi = require("joi"); */ /** - * @typedef CourierAccountUpdateDetails - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {string} stage - Denotes whether the account is in enabled or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. - */ - -/** - * @typedef RegionTatItemResult - * @property {RegionTatResult[]} items - * @property {Page} page - */ - -/** - * @typedef RegionServiceabilityItemResult - * @property {RegionServiceabilityResult[]} items - * @property {Page} page - */ - -/** - * @typedef ServiceabilityDetailsResult - * @property {boolean} [first_mile] - Boolean value indicating whether - * first-mile service is available or not. - * @property {boolean} [last_mile] - Boolean value indicating whether last-mile - * service is available or not. - * @property {number} [cod_limit] - Limit on the amount of cash on delivery - * (COD) payments allowed in the specified region. - * @property {boolean} [doorstep_return] - Indicates if doorstep return service - * is available. This refers to the ability to return items directly from the - * customer's doorstep. - * @property {boolean} [doorstep_qc] - Indicates if doorstep quality check - * service is available. This refers to the ability to perform quality checks - * on items at the customer's doorstep. - * @property {string} [pickup_cutoff] - Time of day by which pickups must be - * scheduled to be processed on the same day. - * @property {boolean} [installation] - Boolean value indicating whether - * installation services are available in the specified region or not. - * @property {string} [id] - Unique identifier for the serviceability record. - */ - -/** - * @typedef ServiceabilityDetails - * @property {boolean} [first_mile] - Boolean value indicating whether - * first-mile service is available or not. - * @property {boolean} [last_mile] - Boolean value indicating whether last-mile - * service is available or not. - * @property {number} [cod_limit] - Limit on the amount of cash on delivery - * (COD) payments allowed in the specified region. - * @property {boolean} [doorstep_return] - Indicates if doorstep return service - * is available. This refers to the ability to return items directly from the - * customer's doorstep. - * @property {boolean} [doorstep_qc] - Indicates if doorstep quality check - * service is available. This refers to the ability to perform quality checks - * on items at the customer's doorstep. - * @property {string} [pickup_cutoff] - Time of day by which pickups must be - * scheduled to be processed on the same day. - * @property {boolean} [installation] - Boolean value indicating whether - * installation services are available in the specified region or not. - */ - -/** - * @typedef RegionServiceabilityResult - * @property {string} country_code - ISO2 code representing the country where - * the serviceability is being specified. - * @property {string} [state_code] - Code representing the state or province - * within the country where the serviceability is being specified. - * @property {string} [city_code] - Code representing the city within the state - * where the serviceability is being specified. - * @property {string} [sector_code] - Code representing a specific sector or - * district within the city where the serviceability is being specified. - * @property {string} [pincode] - Postal or ZIP code for the specific area - * within the city where the serviceability is being specified. - * @property {boolean} [first_mile] - Boolean value indicating whether - * first-mile service is available or not. - * @property {boolean} [last_mile] - Boolean value indicating whether last-mile - * service is available or not. - * @property {number} [cod_limit] - Limit on the amount of cash on delivery - * (COD) payments allowed in the specified region. - * @property {boolean} [doorstep_return] - Indicates if doorstep return service - * is available. This refers to the ability to return items directly from the - * customer's doorstep. - * @property {boolean} [doorstep_qc] - Indicates if doorstep quality check - * service is available. This refers to the ability to perform quality checks - * on items at the customer's doorstep. - * @property {string} [pickup_cutoff] - Time of day by which pickups must be - * scheduled to be processed on the same day. - * @property {boolean} [installation] - Boolean value indicating whether - * installation services are available in the specified region or not. - * @property {string} id - Unique identifier for the serviceability record. - */ - -/** - * @typedef RegionServiceabilityDetails - * @property {string} country_code - ISO2 code representing the country where - * the serviceability is being specified. - * @property {string} [state_code] - Code representing the state or province - * within the country where the serviceability is being specified. - * @property {string} [city_code] - Code representing the city within the state - * where the serviceability is being specified. - * @property {string} [sector_code] - Code representing a specific sector or - * district within the city where the serviceability is being specified. - * @property {string} [pincode] - Postal or ZIP code for the specific area - * within the city where the serviceability is being specified. - * @property {boolean} [first_mile] - Boolean value indicating whether - * first-mile service is available or not. - * @property {boolean} [last_mile] - Boolean value indicating whether last-mile - * service is available or not. - * @property {number} [cod_limit] - Limit on the amount of cash on delivery - * (COD) payments allowed in the specified region. - * @property {boolean} [doorstep_return] - Indicates if doorstep return service - * is available. This refers to the ability to return items directly from the - * customer's doorstep. - * @property {boolean} [doorstep_qc] - Indicates if doorstep quality check - * service is available. This refers to the ability to perform quality checks - * on items at the customer's doorstep. - * @property {string} [pickup_cutoff] - Time of day by which pickups must be - * scheduled to be processed on the same day. - * @property {boolean} [installation] - Boolean value indicating whether - * installation services are available in the specified region or not. - */ - -/** - * @typedef RegionTatDetails - * @property {string} from_country_code - ISO2 code representing the country of - * origin for the delivery. - * @property {string} [from_state_code] - Code representing the state or - * province of origin within the country. - * @property {string} [from_city_code] - Code representing the city of origin - * within the state. - * @property {string} [from_sector_code] - Code representing a specific sector - * or district within the city of origin. - * @property {string} [from_pincode] - Postal or ZIP code of the origin area. - * @property {string} to_country_code - ISO2 code representing the destination country. - * @property {string} [to_state_code] - Code representing the state or province - * of the destination within the country. - * @property {string} [to_city_code] - Code representing the city of destination - * within the state. - * @property {string} [to_sector_code] - Code representing a specific sector or - * district within the city of destination. - * @property {string} [to_pincode] - Postal or ZIP code of the destination area. - * @property {number} [max_delivery_time] - Maximum time required for delivery - * from the origin to the destination in seconds. - * @property {number} [min_delivery_time] - Minimum time required for delivery - * from the origin to the destination in seconds. - */ - -/** - * @typedef RegionTatUpdateDetails - * @property {number} [max_delivery_time] - Maximum time required for delivery - * from the origin to the destination in seconds. - * @property {number} [min_delivery_time] - Minimum time required for delivery - * from the origin to the destination in seconds. - */ - -/** - * @typedef RegionTatResult - * @property {string} from_country_code - ISO2 code representing the country of - * origin for the delivery. - * @property {string} [from_state_code] - Code representing the state or - * province of origin within the country. - * @property {string} [from_city_code] - Code representing the city of origin - * within the state. - * @property {string} [from_sector_code] - Code representing a specific sector - * or district within the city of origin. - * @property {string} [from_pincode] - Postal or ZIP code of the origin area. - * @property {string} to_country_code - ISO2 code representing the destination country. - * @property {string} [to_state_code] - Code representing the state or province - * of the destination within the country. - * @property {string} [to_city_code] - Code representing the city of destination - * within the state. - * @property {string} [to_sector_code] - Code representing a specific sector or - * district within the city of destination. - * @property {string} [to_pincode] - Postal or ZIP code of the destination area. - * @property {number} [max_delivery_time] - Maximum time required for delivery - * from the origin to the destination in seconds. - * @property {number} [min_delivery_time] - Minimum time required for delivery - * from the origin to the destination in seconds. - * @property {string} id - Unique identifier for the delivery time record. - */ - -/** - * @typedef BulkRegionJobDetails - * @property {string} [file_path] - CDN path of the uploaded csv file for bulk import. - * @property {string} country - Country for which the tat or serviceability is - * to be imported or exported. - * @property {string} action - Denotes the import or export action to be performed. - * @property {string} region - Region of the country for which import or export - * is triggered. + * @typedef BulkRegionJobSerializer + * @property {string} [file_path] + * @property {string} country + * @property {string} action + * @property {string} region */ /** - * @typedef BulkRegionResultItemData - * @property {string} [file_path] - CDN path of the file which was used for bulk import. - * @property {number} [failed] - Count of the failed records. - * @property {Object[]} [failed_records] - Information of records which failed. - * @property {string} action - Denotes the import or export action performed. - * @property {string} batch_id - Unique id to identify the import or export query. - * @property {string} country - Country for which the import or export action is - * performed. - * @property {number} [success] - Denoted if the import or export was successful - * or failure. - * @property {string} region - Region of the country for which import or export - * is triggered. - * @property {string} status - Current status of the import or export action performed. - * @property {number} [total] - Count of total records. - * @property {string} [error_file_path] - Path of the error file. + * @typedef BulkRegionResponseItemData + * @property {string} file_path + * @property {number} [failed] + * @property {Object[]} [failed_records] + * @property {string} action + * @property {string} batch_id + * @property {string} country + * @property {number} [success] + * @property {string} region + * @property {string} status + * @property {number} [total] + * @property {string} [error_file_path] */ /** - * @typedef BulkRegionResult - * @property {BulkRegionResultItemData[]} items + * @typedef BulkRegionResponse + * @property {BulkRegionResponseItemData[]} items * @property {Page} page */ /** * @typedef CourierAccount - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} account_id - Unique identifier of courier partner scheme - * and company id combination. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {string} stage - Denotes whether the account is in enabled or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. + * @property {string} extension_id + * @property {string} account_id + * @property {string} scheme_id + * @property {boolean} is_self_ship + * @property {string} stage + * @property {boolean} is_own_account */ /** - * @typedef CourierAccountDetailsBody - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} [account_id] - Unique identifier of courier partner scheme - * and company id combination. - * @property {string} scheme_id - Unique identifier of courier account. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {string} stage - Denotes whether the courier account is in enabled - * or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. + * @typedef CourierAccountRequestBody + * @property {string} extension_id + * @property {string} [account_id] + * @property {string} scheme_id + * @property {boolean} is_self_ship + * @property {string} stage + * @property {boolean} is_own_account */ /** - * @typedef CourierPartnerAccountFailureResult + * @typedef CourierPartnerAccountFailureResponse * @property {boolean} success - * @property {ErrorResult[]} error + * @property {ErrorResponse[]} error */ /** - * @typedef CompanyCourierPartnerAccountListResult - * @property {CourierAccountResult[]} items + * @typedef CompanyCourierPartnerAccountListResponse + * @property {CourierAccountResponse[]} items * @property {Page} page */ /** - * @typedef CourierAccountResult - * @property {string} account_id - Unique identifier of courier partner scheme - * and company id combination. - * @property {string} scheme_id - Unique identifier of courier partner scheme. + * @typedef CourierAccountResponse + * @property {string} account_id + * @property {string} scheme_id * @property {boolean} is_self_ship - * @property {string} stage - Denotes whether the courier account is in enabled - * or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. + * @property {string} stage + * @property {boolean} is_own_account * @property {CourierPartnerSchemeModel} scheme_rules */ /** * @typedef CourierPartnerSchemeModel - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {string} name - Name of the scheme + * @property {string} extension_id + * @property {string} scheme_id + * @property {string} name * @property {ArithmeticOperations} weight - * @property {string} transport_type - Mode of transport associated with the - * courier partner scheme. - * @property {string} region - Serviceable region associated with the courier - * partner scheme. - * @property {string} delivery_type - Type of delivery associated with the - * courier partner scheme. - * @property {string[]} payment_mode - Mode of payment associated with the - * courier partner scheme. - * @property {string} stage - Denotes whether the courier partner scheme is in - * enabled or disabled stage. + * @property {string} transport_type + * @property {string} region + * @property {string} delivery_type + * @property {string[]} payment_mode + * @property {string} stage * @property {CourierPartnerSchemeFeatures} feature */ /** - * @typedef CourierPartnerSchemeDetailsModel - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} [scheme_id] - Unique identifier of courier partner scheme. - * @property {string} name - Name of the courier partner scheme. + * @typedef CourierPartnerSchemeRequestModel + * @property {string} extension_id + * @property {string} [scheme_id] + * @property {string} name * @property {ArithmeticOperations} weight - * @property {string} transport_type - Mode of transport associated with the - * courier partner scheme. - * @property {string} region - Serviceable region associated with the courier - * partner scheme. - * @property {string} delivery_type - Type of delivery associated with the - * courier partner scheme. - * @property {string[]} payment_mode - Mode of payment associated with the - * courier partner scheme. - * @property {string} stage - Denotes whether the courier partner scheme is in - * enabled or disabled stage. + * @property {string} transport_type + * @property {string} region + * @property {string} delivery_type + * @property {string[]} payment_mode + * @property {string} stage * @property {CourierPartnerSchemeFeatures} feature */ /** * @typedef CourierPartnerSchemeFeatures - * @property {boolean} [doorstep_qc] - Indicates if the courier partner offers - * doorstep quality check services. - * @property {boolean} [qr] - Specifies whether the courier partner supports QR - * code-based operations. - * @property {boolean} [mps] - Denotes if the courier partner supports - * multi-part shipment services. - * @property {boolean} [ndr] - Indicates if the Non-Delivery Report (NDR) - * feature is supported by the courier partner. - * @property {number} [ndr_attempts] - Number of attempts allowed for resolving - * Non-Delivery Reports (NDR). - * @property {boolean} [dangerous_goods] - Specifies if the courier partner - * handles the transportation of dangerous goods. - * @property {boolean} [fragile_goods] - Indicates whether the courier partner - * manages the shipment of fragile goods. - * @property {boolean} [restricted_goods] - Indicates if the courier partner - * handles restricted goods, as per regulatory guidelines. - * @property {boolean} [cold_storage_goods] - Denotes if the courier partner - * provides cold storage facilities for goods. - * @property {boolean} [doorstep_exchange] - Indicates if the courier partner - * supports doorstep exchange services. - * @property {boolean} [doorstep_return] - Specifies if the courier partner - * offers doorstep return services. - * @property {boolean} [product_installation] - Indicates if the courier partner - * provides product installation services upon delivery. - * @property {boolean} [openbox_delivery] - Specifies whether the courier - * partner supports open-box delivery, allowing customers to inspect goods - * before accepting. - * @property {string} [status_updates] - Describes the type of status updates - * provided by the courier partner (e.g., real-time, periodic). - * @property {boolean} [multi_pick_single_drop] - Indicates if the courier - * partner supports multiple pickups to a single drop location. - * @property {boolean} [single_pick_multi_drop] - Indicates whether the courier - * partner supports single pickup to multiple drop locations. - * @property {boolean} [multi_pick_multi_drop] - Denotes if the courier partner - * offers services for multiple pickups to multiple drop locations. - * @property {boolean} [ewaybill] - Specifies if the courier partner requires or - * supports the generation of e-waybills for shipments. - * @property {number} [qc_shipment_item_quantity] - Defines the maximum quantity - * of items allowed in a quality check shipment. - * @property {number} [non_qc_shipment_item_quantity] - Defines the maximum - * quantity of items allowed in a non-quality check shipment. + * @property {boolean} [doorstep_qc] + * @property {boolean} [qr] + * @property {boolean} [mps] + * @property {boolean} [ndr] + * @property {number} [ndr_attempts] + * @property {boolean} [dangerous_goods] + * @property {boolean} [fragile_goods] + * @property {boolean} [restricted_goods] + * @property {boolean} [cold_storage_goods] + * @property {boolean} [doorstep_exchange] + * @property {boolean} [doorstep_return] + * @property {boolean} [product_installation] + * @property {boolean} [openbox_delivery] + * @property {string} [status_updates] + * @property {boolean} [multi_pick_single_drop] + * @property {boolean} [single_pick_multi_drop] + * @property {boolean} [multi_pick_multi_drop] + * @property {boolean} [ewaybill] */ /** @@ -409,19 +178,14 @@ const Joi = require("joi"); */ /** - * @typedef CourierPartnerSchemeUpdateDetails - * @property {string} name - Name of the scheme. + * @typedef CourierPartnerSchemeUpdateRequest + * @property {string} name * @property {ArithmeticOperations} weight - * @property {string} transport_type - Mode of transport associated with the - * courier partner scheme. - * @property {string} region - Serviceable region associated with the courier - * partner scheme. - * @property {string} delivery_type - Type of delivery associated with the - * courier partner scheme. - * @property {string[]} payment_mode - Mode of payment associated with the - * courier partner scheme. - * @property {string} stage - Denotes whether the courier partner scheme is in - * enabled or disabled stage. + * @property {string} transport_type + * @property {string} region + * @property {string} delivery_type + * @property {string[]} payment_mode + * @property {string} stage * @property {CourierPartnerSchemeFeatures} feature */ @@ -433,50 +197,29 @@ const Joi = require("joi"); /** * @typedef GetCountriesItems - * @property {string} [id] - Unique identifier of the country. - * @property {string} [name] - Name of the country. - * @property {string} [iso2] - Two-letter ISO code representing the country. - * @property {string} [iso3] - Three-letter ISO code representing the country. - * @property {string[]} [timezones] - List of time zones used in the country - * (e.g., ["America/New_York", "America/Los_Angeles"]). - * @property {HierarchyItems[]} [hierarchy] - Levels within the country (e.g., - * states, cities) and their slugs (e.g., [{"name": "State", "slug": "state"}, - * {"name": "City", "slug": "city"}]). - * @property {string} [phone_code] - International dialing code for the country - * (e.g., "+1"). - * @property {string} [currency] - Indicates currency for the country (e.g., "INR"). - * @property {string} [type] - Indicates the type of object (e.g., "country"). - * @property {string} [latitude] - Geographical latitude of the country (e.g., "37.0902"). - * @property {string} [longitude] - Geographical longitude of the country (e.g., - * "-95.7129"). - * @property {string} [display_name] - User-friendly version of the geographical - * data, which may be more descriptive or formatted differently. - * @property {boolean} [has_next_hierarchy] - More detailed hierarchical data is - * available, meaning states, cities, or other regions within the country have - * been populated in the system. + * @property {string} [id] + * @property {string} [name] + * @property {string} [iso2] + * @property {string} [iso3] + * @property {string[]} [timezones] + * @property {HierarchyItems[]} [hierarchy] + * @property {string} [phone_code] + * @property {string} [currency] + * @property {string} [type] + * @property {string} [latitude] + * @property {string} [longitude] + * @property {string} [display_name] */ /** * @typedef HierarchyItems - * @property {string} [display_name] - It represent a country display name. - * @property {string} [slug] - A URL-friendly version of the name, often used - * for referencing or querying purposes. - */ - -/** - * @typedef ValidationError - * @property {string} message - A brief description of the error encountered. - * @property {string} field - The field in the request that caused the error. - */ - -/** - * @typedef StandardError - * @property {string} message - A brief description of the error. + * @property {string} [display_name] + * @property {string} [slug] */ class LogisticsPartnerModel { - /** @returns {BulkRegionServiceabilityTatDetails} */ - static BulkRegionServiceabilityTatDetails() { + /** @returns {BulkRegionServiceabilityTatRequest} */ + static BulkRegionServiceabilityTatRequest() { return Joi.object({ country: Joi.string().allow("").required(), region: Joi.string().allow("").required(), @@ -484,21 +227,21 @@ class LogisticsPartnerModel { }); } - /** @returns {BulkRegionServiceabilityTatResultItemData} */ - static BulkRegionServiceabilityTatResultItemData() { + /** @returns {BulkRegionServiceabilityTatResponseItemData} */ + static BulkRegionServiceabilityTatResponseItemData() { return Joi.object({ country: Joi.string().allow(""), region: Joi.string().allow(""), type: Joi.string().allow(""), batch_id: Joi.string().allow(""), status: Joi.string().allow(""), - failed_records: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), - file_path: Joi.string().allow("").allow(null), + failed_records: Joi.array().items(Joi.any()), + file_path: Joi.string().allow(""), }); } - /** @returns {ErrorResult} */ - static ErrorResult() { + /** @returns {ErrorResponse} */ + static ErrorResponse() { return Joi.object({ value: Joi.string().allow("").required(), message: Joi.string().allow("").required(), @@ -506,19 +249,21 @@ class LogisticsPartnerModel { }); } - /** @returns {FailureResult} */ - static FailureResult() { + /** @returns {FailureResponse} */ + static FailureResponse() { return Joi.object({ success: Joi.boolean().required(), - error: Joi.array().items(LogisticsPartnerModel.ErrorResult()).required(), + error: Joi.array() + .items(LogisticsPartnerModel.ErrorResponse()) + .required(), }); } - /** @returns {BulkRegionServiceabilityTatResult} */ - static BulkRegionServiceabilityTatResult() { + /** @returns {BulkRegionServiceabilityTatResponse} */ + static BulkRegionServiceabilityTatResponse() { return Joi.object({ items: Joi.array().items( - LogisticsPartnerModel.BulkRegionServiceabilityTatResultItemData() + LogisticsPartnerModel.BulkRegionServiceabilityTatResponseItemData() ), page: LogisticsPartnerModel.Page(), }); @@ -537,162 +282,22 @@ class LogisticsPartnerModel { }); } - /** @returns {CourierAccountUpdateDetails} */ - static CourierAccountUpdateDetails() { - return Joi.object({ - extension_id: Joi.string().allow("").required(), - scheme_id: Joi.string().allow("").required(), - is_self_ship: Joi.boolean().required(), - stage: Joi.string().allow("").required(), - is_own_account: Joi.boolean().required(), - }); - } - - /** @returns {RegionTatItemResult} */ - static RegionTatItemResult() { - return Joi.object({ - items: Joi.array() - .items(LogisticsPartnerModel.RegionTatResult()) - .required(), - page: LogisticsPartnerModel.Page().required(), - }); - } - - /** @returns {RegionServiceabilityItemResult} */ - static RegionServiceabilityItemResult() { - return Joi.object({ - items: Joi.array() - .items(LogisticsPartnerModel.RegionServiceabilityResult()) - .required(), - page: LogisticsPartnerModel.Page().required(), - }); - } - - /** @returns {ServiceabilityDetailsResult} */ - static ServiceabilityDetailsResult() { - return Joi.object({ - first_mile: Joi.boolean(), - last_mile: Joi.boolean(), - cod_limit: Joi.number(), - doorstep_return: Joi.boolean(), - doorstep_qc: Joi.boolean(), - pickup_cutoff: Joi.string().allow(""), - installation: Joi.boolean(), - id: Joi.string().allow(""), - }); - } - - /** @returns {ServiceabilityDetails} */ - static ServiceabilityDetails() { - return Joi.object({ - first_mile: Joi.boolean(), - last_mile: Joi.boolean(), - cod_limit: Joi.number(), - doorstep_return: Joi.boolean(), - doorstep_qc: Joi.boolean(), - pickup_cutoff: Joi.string().allow(""), - installation: Joi.boolean(), - }); - } - - /** @returns {RegionServiceabilityResult} */ - static RegionServiceabilityResult() { - return Joi.object({ - country_code: Joi.string().allow("").required(), - state_code: Joi.string().allow(""), - city_code: Joi.string().allow(""), - sector_code: Joi.string().allow(""), - pincode: Joi.string().allow(""), - first_mile: Joi.boolean(), - last_mile: Joi.boolean(), - cod_limit: Joi.number(), - doorstep_return: Joi.boolean(), - doorstep_qc: Joi.boolean(), - pickup_cutoff: Joi.string().allow(""), - installation: Joi.boolean(), - id: Joi.string().allow("").required(), - }); - } - - /** @returns {RegionServiceabilityDetails} */ - static RegionServiceabilityDetails() { - return Joi.object({ - country_code: Joi.string().allow("").required(), - state_code: Joi.string().allow(""), - city_code: Joi.string().allow(""), - sector_code: Joi.string().allow(""), - pincode: Joi.string().allow(""), - first_mile: Joi.boolean(), - last_mile: Joi.boolean(), - cod_limit: Joi.number(), - doorstep_return: Joi.boolean(), - doorstep_qc: Joi.boolean(), - pickup_cutoff: Joi.string().allow(""), - installation: Joi.boolean(), - }); - } - - /** @returns {RegionTatDetails} */ - static RegionTatDetails() { - return Joi.object({ - from_country_code: Joi.string().allow("").required(), - from_state_code: Joi.string().allow(""), - from_city_code: Joi.string().allow(""), - from_sector_code: Joi.string().allow(""), - from_pincode: Joi.string().allow(""), - to_country_code: Joi.string().allow("").required(), - to_state_code: Joi.string().allow(""), - to_city_code: Joi.string().allow(""), - to_sector_code: Joi.string().allow(""), - to_pincode: Joi.string().allow(""), - max_delivery_time: Joi.number(), - min_delivery_time: Joi.number(), - }); - } - - /** @returns {RegionTatUpdateDetails} */ - static RegionTatUpdateDetails() { + /** @returns {BulkRegionJobSerializer} */ + static BulkRegionJobSerializer() { return Joi.object({ - max_delivery_time: Joi.number(), - min_delivery_time: Joi.number(), - }); - } - - /** @returns {RegionTatResult} */ - static RegionTatResult() { - return Joi.object({ - from_country_code: Joi.string().allow("").required(), - from_state_code: Joi.string().allow(""), - from_city_code: Joi.string().allow(""), - from_sector_code: Joi.string().allow(""), - from_pincode: Joi.string().allow(""), - to_country_code: Joi.string().allow("").required(), - to_state_code: Joi.string().allow(""), - to_city_code: Joi.string().allow(""), - to_sector_code: Joi.string().allow(""), - to_pincode: Joi.string().allow(""), - max_delivery_time: Joi.number(), - min_delivery_time: Joi.number(), - id: Joi.string().allow("").required(), - }); - } - - /** @returns {BulkRegionJobDetails} */ - static BulkRegionJobDetails() { - return Joi.object({ - file_path: Joi.string().allow("").allow(null), + file_path: Joi.string().allow(""), country: Joi.string().allow("").required(), action: Joi.string().allow("").required(), region: Joi.string().allow("").required(), }); } - /** @returns {BulkRegionResultItemData} */ - static BulkRegionResultItemData() { + /** @returns {BulkRegionResponseItemData} */ + static BulkRegionResponseItemData() { return Joi.object({ - file_path: Joi.string().allow(""), + file_path: Joi.string().allow("").required(), failed: Joi.number(), - failed_records: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + failed_records: Joi.array().items(Joi.any()), action: Joi.string().allow("").required(), batch_id: Joi.string().allow("").required(), country: Joi.string().allow("").required(), @@ -704,11 +309,11 @@ class LogisticsPartnerModel { }); } - /** @returns {BulkRegionResult} */ - static BulkRegionResult() { + /** @returns {BulkRegionResponse} */ + static BulkRegionResponse() { return Joi.object({ items: Joi.array() - .items(LogisticsPartnerModel.BulkRegionResultItemData()) + .items(LogisticsPartnerModel.BulkRegionResponseItemData()) .required(), page: LogisticsPartnerModel.Page().required(), }); @@ -726,8 +331,8 @@ class LogisticsPartnerModel { }); } - /** @returns {CourierAccountDetailsBody} */ - static CourierAccountDetailsBody() { + /** @returns {CourierAccountRequestBody} */ + static CourierAccountRequestBody() { return Joi.object({ extension_id: Joi.string().allow("").required(), account_id: Joi.string().allow(""), @@ -738,26 +343,28 @@ class LogisticsPartnerModel { }); } - /** @returns {CourierPartnerAccountFailureResult} */ - static CourierPartnerAccountFailureResult() { + /** @returns {CourierPartnerAccountFailureResponse} */ + static CourierPartnerAccountFailureResponse() { return Joi.object({ success: Joi.boolean().required(), - error: Joi.array().items(LogisticsPartnerModel.ErrorResult()).required(), + error: Joi.array() + .items(LogisticsPartnerModel.ErrorResponse()) + .required(), }); } - /** @returns {CompanyCourierPartnerAccountListResult} */ - static CompanyCourierPartnerAccountListResult() { + /** @returns {CompanyCourierPartnerAccountListResponse} */ + static CompanyCourierPartnerAccountListResponse() { return Joi.object({ items: Joi.array() - .items(LogisticsPartnerModel.CourierAccountResult()) + .items(LogisticsPartnerModel.CourierAccountResponse()) .required(), page: LogisticsPartnerModel.Page().required(), }); } - /** @returns {CourierAccountResult} */ - static CourierAccountResult() { + /** @returns {CourierAccountResponse} */ + static CourierAccountResponse() { return Joi.object({ account_id: Joi.string().allow("").required(), scheme_id: Joi.string().allow("").required(), @@ -784,8 +391,8 @@ class LogisticsPartnerModel { }); } - /** @returns {CourierPartnerSchemeDetailsModel} */ - static CourierPartnerSchemeDetailsModel() { + /** @returns {CourierPartnerSchemeRequestModel} */ + static CourierPartnerSchemeRequestModel() { return Joi.object({ extension_id: Joi.string().allow("").required(), scheme_id: Joi.string().allow(""), @@ -821,8 +428,6 @@ class LogisticsPartnerModel { single_pick_multi_drop: Joi.boolean(), multi_pick_multi_drop: Joi.boolean(), ewaybill: Joi.boolean(), - qc_shipment_item_quantity: Joi.number().allow(null), - non_qc_shipment_item_quantity: Joi.number().allow(null), }); } @@ -836,8 +441,8 @@ class LogisticsPartnerModel { }); } - /** @returns {CourierPartnerSchemeUpdateDetails} */ - static CourierPartnerSchemeUpdateDetails() { + /** @returns {CourierPartnerSchemeUpdateRequest} */ + static CourierPartnerSchemeUpdateRequest() { return Joi.object({ name: Joi.string().allow("").required(), weight: LogisticsPartnerModel.ArithmeticOperations().required(), @@ -875,7 +480,6 @@ class LogisticsPartnerModel { latitude: Joi.string().allow(""), longitude: Joi.string().allow(""), display_name: Joi.string().allow(""), - has_next_hierarchy: Joi.boolean(), }); } @@ -886,20 +490,5 @@ class LogisticsPartnerModel { slug: Joi.string().allow(""), }); } - - /** @returns {ValidationError} */ - static ValidationError() { - return Joi.object({ - message: Joi.string().allow("").required(), - field: Joi.string().allow("").required(), - }); - } - - /** @returns {StandardError} */ - static StandardError() { - return Joi.object({ - message: Joi.string().allow("").required(), - }); - } } module.exports = LogisticsPartnerModel; diff --git a/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts b/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts index 1c310cd24..13d7911fb 100644 --- a/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +++ b/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts @@ -4,16 +4,6 @@ declare class LogisticsValidator { static getSampleFileServiceabilityStatus(): any; static bulkTat(): any; static getBulkTat(): any; - static createDeliveryTime(): any; - static getDeliveryTimes(): any; - static getDeliveryTime(): any; - static updateDeliveryTime(): any; - static deleteDeliveryTime(): any; - static createServiceability(): any; - static getServiceabilities(): any; - static getServiceability(): any; - static updateServiceability(): any; - static deleteServiceability(): any; static bulkServiceability(): any; static getBulkServiceability(): any; static createCourierPartnerAccount(): any; diff --git a/sdk/partner/Logistics/LogisticsPartnerValidator.js b/sdk/partner/Logistics/LogisticsPartnerValidator.js index 83d9fd24a..cc0f4e539 100644 --- a/sdk/partner/Logistics/LogisticsPartnerValidator.js +++ b/sdk/partner/Logistics/LogisticsPartnerValidator.js @@ -4,7 +4,7 @@ const LogisticsModel = require("./LogisticsPartnerModel"); class LogisticsValidator { static sampleFileServiceability() { return Joi.object({ - body: LogisticsModel.BulkRegionServiceabilityTatDetails().required(), + body: LogisticsModel.BulkRegionServiceabilityTatRequest().required(), }).required(); } @@ -20,7 +20,7 @@ class LogisticsValidator { return Joi.object({ extensionId: Joi.string().allow("").required(), schemeId: Joi.string().allow("").required(), - body: LogisticsModel.BulkRegionJobDetails().required(), + body: LogisticsModel.BulkRegionJobSerializer().required(), }).required(); } @@ -40,125 +40,11 @@ class LogisticsValidator { }).required(); } - static createDeliveryTime() { - return Joi.object({ - partnerOrgId: Joi.string().allow("").required(), - courierPartnerExtensionId: Joi.string().allow("").required(), - schemeId: Joi.string().allow("").required(), - body: LogisticsModel.RegionTatDetails().required(), - }).required(); - } - - static getDeliveryTimes() { - return Joi.object({ - partnerOrgId: Joi.string().allow("").required(), - courierPartnerExtensionId: Joi.string().allow("").required(), - schemeId: Joi.string().allow("").required(), - pageNo: Joi.number(), - pageSize: Joi.number(), - fromCountryCode: Joi.string().allow(""), - fromStateCode: Joi.string().allow(""), - fromCityCode: Joi.string().allow(""), - fromSectorCode: Joi.string().allow(""), - fromPincode: Joi.string().allow(""), - toCountryCode: Joi.string().allow(""), - toStateCode: Joi.string().allow(""), - toCityCode: Joi.string().allow(""), - toSectorCode: Joi.string().allow(""), - toPincode: Joi.string().allow(""), - }).required(); - } - - static getDeliveryTime() { - return Joi.object({ - partnerOrgId: Joi.string().allow("").required(), - courierPartnerExtensionId: Joi.string().allow("").required(), - schemeId: Joi.string().allow("").required(), - id: Joi.string().allow("").required(), - }).required(); - } - - static updateDeliveryTime() { - return Joi.object({ - partnerOrgId: Joi.string().allow("").required(), - courierPartnerExtensionId: Joi.string().allow("").required(), - schemeId: Joi.string().allow("").required(), - id: Joi.string().allow("").required(), - body: LogisticsModel.RegionTatUpdateDetails().required(), - }).required(); - } - - static deleteDeliveryTime() { - return Joi.object({ - partnerOrgId: Joi.string().allow("").required(), - courierPartnerExtensionId: Joi.string().allow("").required(), - schemeId: Joi.string().allow("").required(), - id: Joi.string().allow("").required(), - }).required(); - } - - static createServiceability() { - return Joi.object({ - partnerOrgId: Joi.string().allow("").required(), - courierPartnerExtensionId: Joi.string().allow("").required(), - schemeId: Joi.string().allow("").required(), - body: LogisticsModel.RegionServiceabilityDetails().required(), - }).required(); - } - - static getServiceabilities() { - return Joi.object({ - partnerOrgId: Joi.string().allow("").required(), - courierPartnerExtensionId: Joi.string().allow("").required(), - schemeId: Joi.string().allow("").required(), - pageNo: Joi.number(), - pageSize: Joi.number(), - countryCode: Joi.string().allow(""), - stateCode: Joi.string().allow(""), - cityCode: Joi.string().allow(""), - sectorCode: Joi.string().allow(""), - pincode: Joi.string().allow(""), - firstMile: Joi.boolean(), - lastMile: Joi.boolean(), - doorstepReturn: Joi.boolean(), - doorstepQc: Joi.boolean(), - installation: Joi.boolean(), - }).required(); - } - - static getServiceability() { - return Joi.object({ - partnerOrgId: Joi.string().allow("").required(), - courierPartnerExtensionId: Joi.string().allow("").required(), - schemeId: Joi.string().allow("").required(), - id: Joi.string().allow("").required(), - }).required(); - } - - static updateServiceability() { - return Joi.object({ - partnerOrgId: Joi.string().allow("").required(), - courierPartnerExtensionId: Joi.string().allow("").required(), - schemeId: Joi.string().allow("").required(), - id: Joi.string().allow("").required(), - body: LogisticsModel.ServiceabilityDetails().required(), - }).required(); - } - - static deleteServiceability() { - return Joi.object({ - partnerOrgId: Joi.string().allow("").required(), - courierPartnerExtensionId: Joi.string().allow("").required(), - schemeId: Joi.string().allow("").required(), - id: Joi.string().allow("").required(), - }).required(); - } - static bulkServiceability() { return Joi.object({ extensionId: Joi.string().allow("").required(), schemeId: Joi.string().allow("").required(), - body: LogisticsModel.BulkRegionJobDetails().required(), + body: LogisticsModel.BulkRegionJobSerializer().required(), }).required(); } @@ -181,7 +67,7 @@ class LogisticsValidator { static createCourierPartnerAccount() { return Joi.object({ companyId: Joi.number().required(), - body: LogisticsModel.CourierAccountDetailsBody().required(), + body: LogisticsModel.CourierAccountRequestBody().required(), }).required(); } @@ -200,7 +86,7 @@ class LogisticsValidator { return Joi.object({ companyId: Joi.number().required(), accountId: Joi.string().allow("").required(), - body: LogisticsModel.CourierAccountUpdateDetails().required(), + body: LogisticsModel.CourierAccount().required(), }).required(); } @@ -213,14 +99,14 @@ class LogisticsValidator { static createCourierPartnerScheme() { return Joi.object({ - body: LogisticsModel.CourierPartnerSchemeDetailsModel().required(), + body: LogisticsModel.CourierPartnerSchemeRequestModel().required(), }).required(); } static updateCourierPartnerScheme() { return Joi.object({ schemeId: Joi.string().allow("").required(), - body: LogisticsModel.CourierPartnerSchemeUpdateDetails().required(), + body: LogisticsModel.CourierPartnerSchemeUpdateRequest().required(), }).required(); } diff --git a/sdk/partner/OAuthClient.js b/sdk/partner/OAuthClient.js index 3204c8d5d..9390a7f6e 100644 --- a/sdk/partner/OAuthClient.js +++ b/sdk/partner/OAuthClient.js @@ -6,6 +6,7 @@ const querystring = require("query-string"); const { sign } = require("@gofynd/fp-signature"); const { convertStringToBase64 } = require("../common/utils"); +const refreshTokenRequestCache = {}; class OAuthClient extends BaseOAuthClient { constructor(config) { super(config); diff --git a/sdk/partner/Theme/ThemePartnerClient.d.ts b/sdk/partner/Theme/ThemePartnerClient.d.ts index 162c938b5..2222a72a1 100644 --- a/sdk/partner/Theme/ThemePartnerClient.d.ts +++ b/sdk/partner/Theme/ThemePartnerClient.d.ts @@ -176,42 +176,44 @@ declare class Theme { * @param {ThemePartnerValidator.CreateExtensionSectionDraftParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name createExtensionSectionDraft * @summary: Draft extension section * @description: Create a new draft for an extension section within the specified organization. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/createExtensionSectionDraft/). */ - createExtensionSectionDraft({ extensionId, body, requestHeaders }?: ThemePartnerValidator.CreateExtensionSectionDraftParam, { responseHeaders }?: object): Promise; + createExtensionSectionDraft({ extensionId, body, requestHeaders }?: ThemePartnerValidator.CreateExtensionSectionDraftParam, { responseHeaders }?: object): Promise; /** * @param {ThemePartnerValidator.PublishExtensionSectionsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name publishExtensionSections * @summary: Publish an extension section * @description: Publish a draft extension section within the specified organization. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/publishExtensionSections/). */ - publishExtensionSections({ extensionId, body, requestHeaders }?: ThemePartnerValidator.PublishExtensionSectionsParam, { responseHeaders }?: object): Promise; + publishExtensionSections({ extensionId, body, requestHeaders }?: ThemePartnerValidator.PublishExtensionSectionsParam, { responseHeaders }?: object): Promise; /** * @param {ThemePartnerValidator.ApplyExtensionPreviewParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name applyExtensionPreview * @summary: Start a Preview of Extension Section * @description: Use this API to start a local session for previewing the extension section binding. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/applyExtensionPreview/). */ - applyExtensionPreview({ extensionSectionId, body, requestHeaders }?: ThemePartnerValidator.ApplyExtensionPreviewParam, { responseHeaders }?: object): Promise; + applyExtensionPreview({ extensionSectionId, body, requestHeaders }?: ThemePartnerValidator.ApplyExtensionPreviewParam, { responseHeaders }?: object): Promise; /** * @param {ThemePartnerValidator.RemoveExtensionPreviewParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name removeExtensionPreview * @summary: Close a Preview of Extension Section * @description: Use this API to close a local session for previewing the extension section binding - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/removeExtensionPreview/). */ - removeExtensionPreview({ extensionSectionId, body, requestHeaders }?: ThemePartnerValidator.RemoveExtensionPreviewParam, { responseHeaders }?: object): Promise; + removeExtensionPreview({ extensionSectionId, body, requestHeaders }?: ThemePartnerValidator.RemoveExtensionPreviewParam, { responseHeaders }?: object): Promise; /** * @param {ThemePartnerValidator.GetThemeRejectionReasonsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/partner/Theme/ThemePartnerClient.js b/sdk/partner/Theme/ThemePartnerClient.js index f7215ae01..a5125987f 100644 --- a/sdk/partner/Theme/ThemePartnerClient.js +++ b/sdk/partner/Theme/ThemePartnerClient.js @@ -1374,7 +1374,8 @@ class Theme { * @param {ThemePartnerValidator.CreateExtensionSectionDraftParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name createExtensionSectionDraft * @summary: Draft extension section * @description: Create a new draft for an extension section within the specified organization. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/createExtensionSectionDraft/). @@ -1432,10 +1433,10 @@ class Theme { const { error: res_error, - } = ThemePartnerModel.ExtensionSectionDraft().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ThemePartnerModel.DraftExtensionSectionResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1455,7 +1456,8 @@ class Theme { * @param {ThemePartnerValidator.PublishExtensionSectionsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name publishExtensionSections * @summary: Publish an extension section * @description: Publish a draft extension section within the specified organization. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/publishExtensionSections/). @@ -1511,10 +1513,10 @@ class Theme { const { error: res_error, - } = ThemePartnerModel.ExtensionSectionPublish().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ThemePartnerModel.PublishExtensionSectionResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1534,7 +1536,7 @@ class Theme { * @param {ThemePartnerValidator.ApplyExtensionPreviewParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name applyExtensionPreview * @summary: Start a Preview of Extension Section * @description: Use this API to start a local session for previewing the extension section binding. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/applyExtensionPreview/). @@ -1590,7 +1592,7 @@ class Theme { const { error: res_error, - } = ThemePartnerModel.ExtensionPreview().validate(responseData, { + } = ThemePartnerModel.ExtensionPreviewResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1613,7 +1615,7 @@ class Theme { * @param {ThemePartnerValidator.RemoveExtensionPreviewParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name removeExtensionPreview * @summary: Close a Preview of Extension Section * @description: Use this API to close a local session for previewing the extension section binding - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/removeExtensionPreview/). @@ -1669,7 +1671,7 @@ class Theme { const { error: res_error, - } = ThemePartnerModel.ExtensionPreview().validate(responseData, { + } = ThemePartnerModel.ExtensionPreviewResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/partner/Theme/ThemePartnerModel.d.ts b/sdk/partner/Theme/ThemePartnerModel.d.ts index e4dcff592..2d32cb09f 100644 --- a/sdk/partner/Theme/ThemePartnerModel.d.ts +++ b/sdk/partner/Theme/ThemePartnerModel.d.ts @@ -15,7 +15,7 @@ export = ThemePartnerModel; * @property {string} [updated_at] - The last update timestamp of the page */ /** - * @typedef DraftExtensionSection + * @typedef DraftExtensionSectionRequest * @property {string} [extension_id] * @property {string} [bundle_name] * @property {string} [organization_id] @@ -25,11 +25,11 @@ export = ThemePartnerModel; * @property {string} [status] */ /** - * @typedef ExtensionSectionDraft - * @property {Sections} [sections] + * @typedef DraftExtensionSectionResponse + * @property {SectionsResponse} [sections] */ /** - * @typedef Sections + * @typedef SectionsResponse * @property {boolean} [acknowledged] * @property {number} [matched_count] * @property {number} [modified_count] @@ -56,7 +56,7 @@ export = ThemePartnerModel; * @property {string} [css] */ /** - * @typedef PublishExtensionSection + * @typedef PublishExtensionSectionRequest * @property {string} [extension_id] * @property {string} [bundle_name] * @property {string} [organization_id] @@ -66,17 +66,17 @@ export = ThemePartnerModel; * @property {string} [status] */ /** - * @typedef PreviewExtension + * @typedef ExtensionPreviewRequest * @property {string} [application_id] - Application ID * @property {string} [section_preview_hash] - Hash for the section preview */ /** - * @typedef ExtensionPreview + * @typedef ExtensionPreviewResponse * @property {string} [message] */ /** - * @typedef ExtensionSectionPublish - * @property {Sections} [sections] + * @typedef PublishExtensionSectionResponse + * @property {SectionsResponse} [sections] */ /** * @typedef AvailablePageSectionMetaAttributes @@ -125,15 +125,7 @@ export = ThemePartnerModel; * @property {Object[]} [blocks] * @property {Object} [preset] * @property {AvailablePagePredicate} [predicate] - * @property {SectionSource} [__source] - */ -/** - * @typedef SectionSource - * @property {string} [id] - The source id specifying the source of the section. - * @property {string} [bundle_name] - This is the extension binding name - * containing this section. - * @property {string} [type] - This is source type. It will either be - * themeBundle or extension. + * @property {string} [source] */ /** * @typedef AvailablePageScreenPredicate @@ -281,26 +273,12 @@ export = ThemePartnerModel; * @property {string} admin_id - The ID of the admin who rejected the theme * @property {string} user_id - The ID of the user who submitted the theme * @property {string} status - The status of the theme (e.g., rejected) - * @property {RejectedMessages} rejection_reasons + * @property {Object} rejection_reasons * @property {string} [created_at] - The date and time when the theme rejection * reasons object was created * @property {string} [updated_at] - The date and time when the theme rejection * reasons object was last updated */ -/** - * @typedef RejectedMessages - * @property {ThemeReviewRequestMessage} [theme_file] - * @property {ThemeReviewRequestMessage} [theme_details] - * @property {ThemeReviewRequestMessage} [theme_value_proposition] - * @property {ThemeReviewRequestMessage} [theme_attributes] - * @property {ThemeReviewRequestMessage} [theme_variations] - * @property {ThemeReviewRequestMessage} [theme_docs] - * @property {ThemeReviewRequestMessage} [theme_review] - */ -/** - * @typedef ThemeReviewRequestMessage - * @property {string} [message] - Message Explaining what the issue is - */ /** * @typedef AllAvailablePageSchema * @property {AvailablePageSchema[]} [pages] @@ -678,7 +656,7 @@ export = ThemePartnerModel; declare class ThemePartnerModel { } declare namespace ThemePartnerModel { - export { AvailablePageSchema, DraftExtensionSection, ExtensionSectionDraft, Sections, ExtensionSection, PropExtension, AssetsExtension, PublishExtensionSection, PreviewExtension, ExtensionPreview, ExtensionSectionPublish, AvailablePageSectionMetaAttributes, AvailablePageSeo, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, Action, AvailablePageSchemaSections, SectionSource, AvailablePageScreenPredicate, AvailablePageUserPredicate, AvailablePageRoutePredicate, AvailablePagePlatformPredicate, AvailablePageSchedulePredicate, AvailablePagePredicate, MarketplaceThemeSchema, MarketplaceTheme, PaymentInfo, ContactInfo, CatalogSize, MarketplaceThemeImages, CarouselItem, ExploreInfo, Feature, FeatureItem, Highlight, Variation, Documentation, Comments, ThemeRejectionReasons, RejectedMessages, ThemeReviewRequestMessage, AllAvailablePageSchema, PaginationSchema, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, ThemesSchema, Font, FontVariants, FontVariant, Config, ThemeConfiguration, OverlayPopup, DividerStrokeHighlight, UserAlerts, OrderTracking, ThemeConfigListPage, ThemeConfigListPageSettingsProps, CustomConfig, CustomProps, ThemeMeta, ThemePayment, Release, Images, Assets, UMDJs, CommonJS, CSS, SectionItem, GlobalSchema, Prop, Preset, Page, SectionProps, SectionPreset, ImagePickerProp, UrlProp, BlockProps, TextProp, CheckboxProp, RangeProp, Section, Block, Predicate, Screen, ThemeUserSchema, Route, UpdateThemeRequestBody, CreateNewTheme, ActionPage, PageType }; + export { AvailablePageSchema, DraftExtensionSectionRequest, DraftExtensionSectionResponse, SectionsResponse, ExtensionSection, PropExtension, AssetsExtension, PublishExtensionSectionRequest, ExtensionPreviewRequest, ExtensionPreviewResponse, PublishExtensionSectionResponse, AvailablePageSectionMetaAttributes, AvailablePageSeo, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, Action, AvailablePageSchemaSections, AvailablePageScreenPredicate, AvailablePageUserPredicate, AvailablePageRoutePredicate, AvailablePagePlatformPredicate, AvailablePageSchedulePredicate, AvailablePagePredicate, MarketplaceThemeSchema, MarketplaceTheme, PaymentInfo, ContactInfo, CatalogSize, MarketplaceThemeImages, CarouselItem, ExploreInfo, Feature, FeatureItem, Highlight, Variation, Documentation, Comments, ThemeRejectionReasons, AllAvailablePageSchema, PaginationSchema, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, ThemesSchema, Font, FontVariants, FontVariant, Config, ThemeConfiguration, OverlayPopup, DividerStrokeHighlight, UserAlerts, OrderTracking, ThemeConfigListPage, ThemeConfigListPageSettingsProps, CustomConfig, CustomProps, ThemeMeta, ThemePayment, Release, Images, Assets, UMDJs, CommonJS, CSS, SectionItem, GlobalSchema, Prop, Preset, Page, SectionProps, SectionPreset, ImagePickerProp, UrlProp, BlockProps, TextProp, CheckboxProp, RangeProp, Section, Block, Predicate, Screen, ThemeUserSchema, Route, UpdateThemeRequestBody, CreateNewTheme, ActionPage, PageType }; } /** @returns {AvailablePageSchema} */ declare function AvailablePageSchema(): AvailablePageSchema; @@ -702,9 +680,9 @@ type AvailablePageSchema = { */ updated_at?: string; }; -/** @returns {DraftExtensionSection} */ -declare function DraftExtensionSection(): DraftExtensionSection; -type DraftExtensionSection = { +/** @returns {DraftExtensionSectionRequest} */ +declare function DraftExtensionSectionRequest(): DraftExtensionSectionRequest; +type DraftExtensionSectionRequest = { extension_id?: string; bundle_name?: string; organization_id?: string; @@ -713,14 +691,14 @@ type DraftExtensionSection = { type?: string; status?: string; }; -/** @returns {ExtensionSectionDraft} */ -declare function ExtensionSectionDraft(): ExtensionSectionDraft; -type ExtensionSectionDraft = { - sections?: Sections; +/** @returns {DraftExtensionSectionResponse} */ +declare function DraftExtensionSectionResponse(): DraftExtensionSectionResponse; +type DraftExtensionSectionResponse = { + sections?: SectionsResponse; }; -/** @returns {Sections} */ -declare function Sections(): Sections; -type Sections = { +/** @returns {SectionsResponse} */ +declare function SectionsResponse(): SectionsResponse; +type SectionsResponse = { acknowledged?: boolean; matched_count?: number; modified_count?: number; @@ -749,9 +727,9 @@ type AssetsExtension = { js?: string; css?: string; }; -/** @returns {PublishExtensionSection} */ -declare function PublishExtensionSection(): PublishExtensionSection; -type PublishExtensionSection = { +/** @returns {PublishExtensionSectionRequest} */ +declare function PublishExtensionSectionRequest(): PublishExtensionSectionRequest; +type PublishExtensionSectionRequest = { extension_id?: string; bundle_name?: string; organization_id?: string; @@ -760,9 +738,9 @@ type PublishExtensionSection = { type?: string; status?: string; }; -/** @returns {PreviewExtension} */ -declare function PreviewExtension(): PreviewExtension; -type PreviewExtension = { +/** @returns {ExtensionPreviewRequest} */ +declare function ExtensionPreviewRequest(): ExtensionPreviewRequest; +type ExtensionPreviewRequest = { /** * - Application ID */ @@ -772,15 +750,15 @@ type PreviewExtension = { */ section_preview_hash?: string; }; -/** @returns {ExtensionPreview} */ -declare function ExtensionPreview(): ExtensionPreview; -type ExtensionPreview = { +/** @returns {ExtensionPreviewResponse} */ +declare function ExtensionPreviewResponse(): ExtensionPreviewResponse; +type ExtensionPreviewResponse = { message?: string; }; -/** @returns {ExtensionSectionPublish} */ -declare function ExtensionSectionPublish(): ExtensionSectionPublish; -type ExtensionSectionPublish = { - sections?: Sections; +/** @returns {PublishExtensionSectionResponse} */ +declare function PublishExtensionSectionResponse(): PublishExtensionSectionResponse; +type PublishExtensionSectionResponse = { + sections?: SectionsResponse; }; /** @returns {AvailablePageSectionMetaAttributes} */ declare function AvailablePageSectionMetaAttributes(): AvailablePageSectionMetaAttributes; @@ -840,25 +818,7 @@ type AvailablePageSchemaSections = { blocks?: any[]; preset?: any; predicate?: AvailablePagePredicate; - __source?: SectionSource; -}; -/** @returns {SectionSource} */ -declare function SectionSource(): SectionSource; -type SectionSource = { - /** - * - The source id specifying the source of the section. - */ - id?: string; - /** - * - This is the extension binding name - * containing this section. - */ - bundle_name?: string; - /** - * - This is source type. It will either be - * themeBundle or extension. - */ - type?: string; + source?: string; }; /** @returns {AvailablePageScreenPredicate} */ declare function AvailablePageScreenPredicate(): AvailablePageScreenPredicate; @@ -1183,7 +1143,7 @@ type ThemeRejectionReasons = { * - The status of the theme (e.g., rejected) */ status: string; - rejection_reasons: RejectedMessages; + rejection_reasons: any; /** * - The date and time when the theme rejection * reasons object was created @@ -1195,25 +1155,6 @@ type ThemeRejectionReasons = { */ updated_at?: string; }; -/** @returns {RejectedMessages} */ -declare function RejectedMessages(): RejectedMessages; -type RejectedMessages = { - theme_file?: ThemeReviewRequestMessage; - theme_details?: ThemeReviewRequestMessage; - theme_value_proposition?: ThemeReviewRequestMessage; - theme_attributes?: ThemeReviewRequestMessage; - theme_variations?: ThemeReviewRequestMessage; - theme_docs?: ThemeReviewRequestMessage; - theme_review?: ThemeReviewRequestMessage; -}; -/** @returns {ThemeReviewRequestMessage} */ -declare function ThemeReviewRequestMessage(): ThemeReviewRequestMessage; -type ThemeReviewRequestMessage = { - /** - * - Message Explaining what the issue is - */ - message?: string; -}; /** @returns {AllAvailablePageSchema} */ declare function AllAvailablePageSchema(): AllAvailablePageSchema; type AllAvailablePageSchema = { diff --git a/sdk/partner/Theme/ThemePartnerModel.js b/sdk/partner/Theme/ThemePartnerModel.js index eb2522816..f0e147a3b 100644 --- a/sdk/partner/Theme/ThemePartnerModel.js +++ b/sdk/partner/Theme/ThemePartnerModel.js @@ -17,7 +17,7 @@ const Joi = require("joi"); */ /** - * @typedef DraftExtensionSection + * @typedef DraftExtensionSectionRequest * @property {string} [extension_id] * @property {string} [bundle_name] * @property {string} [organization_id] @@ -28,12 +28,12 @@ const Joi = require("joi"); */ /** - * @typedef ExtensionSectionDraft - * @property {Sections} [sections] + * @typedef DraftExtensionSectionResponse + * @property {SectionsResponse} [sections] */ /** - * @typedef Sections + * @typedef SectionsResponse * @property {boolean} [acknowledged] * @property {number} [matched_count] * @property {number} [modified_count] @@ -64,7 +64,7 @@ const Joi = require("joi"); */ /** - * @typedef PublishExtensionSection + * @typedef PublishExtensionSectionRequest * @property {string} [extension_id] * @property {string} [bundle_name] * @property {string} [organization_id] @@ -75,19 +75,19 @@ const Joi = require("joi"); */ /** - * @typedef PreviewExtension + * @typedef ExtensionPreviewRequest * @property {string} [application_id] - Application ID * @property {string} [section_preview_hash] - Hash for the section preview */ /** - * @typedef ExtensionPreview + * @typedef ExtensionPreviewResponse * @property {string} [message] */ /** - * @typedef ExtensionSectionPublish - * @property {Sections} [sections] + * @typedef PublishExtensionSectionResponse + * @property {SectionsResponse} [sections] */ /** @@ -144,16 +144,7 @@ const Joi = require("joi"); * @property {Object[]} [blocks] * @property {Object} [preset] * @property {AvailablePagePredicate} [predicate] - * @property {SectionSource} [__source] - */ - -/** - * @typedef SectionSource - * @property {string} [id] - The source id specifying the source of the section. - * @property {string} [bundle_name] - This is the extension binding name - * containing this section. - * @property {string} [type] - This is source type. It will either be - * themeBundle or extension. + * @property {string} [source] */ /** @@ -322,29 +313,13 @@ const Joi = require("joi"); * @property {string} admin_id - The ID of the admin who rejected the theme * @property {string} user_id - The ID of the user who submitted the theme * @property {string} status - The status of the theme (e.g., rejected) - * @property {RejectedMessages} rejection_reasons + * @property {Object} rejection_reasons * @property {string} [created_at] - The date and time when the theme rejection * reasons object was created * @property {string} [updated_at] - The date and time when the theme rejection * reasons object was last updated */ -/** - * @typedef RejectedMessages - * @property {ThemeReviewRequestMessage} [theme_file] - * @property {ThemeReviewRequestMessage} [theme_details] - * @property {ThemeReviewRequestMessage} [theme_value_proposition] - * @property {ThemeReviewRequestMessage} [theme_attributes] - * @property {ThemeReviewRequestMessage} [theme_variations] - * @property {ThemeReviewRequestMessage} [theme_docs] - * @property {ThemeReviewRequestMessage} [theme_review] - */ - -/** - * @typedef ThemeReviewRequestMessage - * @property {string} [message] - Message Explaining what the issue is - */ - /** * @typedef AllAvailablePageSchema * @property {AvailablePageSchema[]} [pages] @@ -791,8 +766,8 @@ class ThemePartnerModel { }); } - /** @returns {DraftExtensionSection} */ - static DraftExtensionSection() { + /** @returns {DraftExtensionSectionRequest} */ + static DraftExtensionSectionRequest() { return Joi.object({ extension_id: Joi.string().allow(""), bundle_name: Joi.string().allow(""), @@ -804,15 +779,15 @@ class ThemePartnerModel { }); } - /** @returns {ExtensionSectionDraft} */ - static ExtensionSectionDraft() { + /** @returns {DraftExtensionSectionResponse} */ + static DraftExtensionSectionResponse() { return Joi.object({ - sections: ThemePartnerModel.Sections(), + sections: ThemePartnerModel.SectionsResponse(), }); } - /** @returns {Sections} */ - static Sections() { + /** @returns {SectionsResponse} */ + static SectionsResponse() { return Joi.object({ acknowledged: Joi.boolean(), matched_count: Joi.number(), @@ -850,8 +825,8 @@ class ThemePartnerModel { }); } - /** @returns {PublishExtensionSection} */ - static PublishExtensionSection() { + /** @returns {PublishExtensionSectionRequest} */ + static PublishExtensionSectionRequest() { return Joi.object({ extension_id: Joi.string().allow(""), bundle_name: Joi.string().allow(""), @@ -863,32 +838,32 @@ class ThemePartnerModel { }); } - /** @returns {PreviewExtension} */ - static PreviewExtension() { + /** @returns {ExtensionPreviewRequest} */ + static ExtensionPreviewRequest() { return Joi.object({ application_id: Joi.string().allow(""), section_preview_hash: Joi.string().allow(""), }); } - /** @returns {ExtensionPreview} */ - static ExtensionPreview() { + /** @returns {ExtensionPreviewResponse} */ + static ExtensionPreviewResponse() { return Joi.object({ message: Joi.string().allow(""), }); } - /** @returns {ExtensionSectionPublish} */ - static ExtensionSectionPublish() { + /** @returns {PublishExtensionSectionResponse} */ + static PublishExtensionSectionResponse() { return Joi.object({ - sections: ThemePartnerModel.Sections(), + sections: ThemePartnerModel.SectionsResponse(), }); } /** @returns {AvailablePageSectionMetaAttributes} */ static AvailablePageSectionMetaAttributes() { return Joi.object({ - attributes: Joi.object().pattern(/\S/, Joi.any()), + attributes: Joi.any(), }); } @@ -950,20 +925,11 @@ class ThemePartnerModel { return Joi.object({ name: Joi.string().allow(""), label: Joi.string().allow(""), - props: Joi.object().pattern(/\S/, Joi.any()), + props: Joi.any(), blocks: Joi.array().items(Joi.any()), - preset: Joi.object().pattern(/\S/, Joi.any()), + preset: Joi.any(), predicate: ThemePartnerModel.AvailablePagePredicate(), - __source: ThemePartnerModel.SectionSource(), - }); - } - - /** @returns {SectionSource} */ - static SectionSource() { - return Joi.object({ - id: Joi.string().allow(""), - bundle_name: Joi.string().allow(""), - type: Joi.string().allow(""), + source: Joi.string().allow(""), }); } @@ -989,7 +955,7 @@ class ThemePartnerModel { return Joi.object({ selected: Joi.string().allow(""), exact_url: Joi.string().allow(""), - query: Joi.object().pattern(/\S/, Joi.any()), + query: Joi.any(), }); } @@ -1174,32 +1140,12 @@ class ThemePartnerModel { admin_id: Joi.string().allow("").required(), user_id: Joi.string().allow("").required(), status: Joi.string().allow("").required(), - rejection_reasons: ThemePartnerModel.RejectedMessages().required(), + rejection_reasons: Joi.object().pattern(/\S/, Joi.any()).required(), created_at: Joi.string().allow(""), updated_at: Joi.string().allow(""), }); } - /** @returns {RejectedMessages} */ - static RejectedMessages() { - return Joi.object({ - theme_file: ThemePartnerModel.ThemeReviewRequestMessage(), - theme_details: ThemePartnerModel.ThemeReviewRequestMessage(), - theme_value_proposition: ThemePartnerModel.ThemeReviewRequestMessage(), - theme_attributes: ThemePartnerModel.ThemeReviewRequestMessage(), - theme_variations: ThemePartnerModel.ThemeReviewRequestMessage(), - theme_docs: ThemePartnerModel.ThemeReviewRequestMessage(), - theme_review: ThemePartnerModel.ThemeReviewRequestMessage(), - }); - } - - /** @returns {ThemeReviewRequestMessage} */ - static ThemeReviewRequestMessage() { - return Joi.object({ - message: Joi.string().allow(""), - }); - } - /** @returns {AllAvailablePageSchema} */ static AllAvailablePageSchema() { return Joi.object({ @@ -1247,7 +1193,7 @@ class ThemePartnerModel { name: Joi.string().allow(""), template_theme_id: Joi.string().allow(""), version: Joi.string().allow(""), - styles: Joi.object().pattern(/\S/, Joi.any()), + styles: Joi.any(), created_at: Joi.string().allow(""), updated_at: Joi.string().allow(""), assets: ThemePartnerModel.Assets(), @@ -1301,7 +1247,7 @@ class ThemePartnerModel { static ThemeConfiguration() { return Joi.object({ name: Joi.string().allow(""), - global_config: Joi.object().pattern(/\S/, Joi.any()), + global_config: Joi.any(), page: Joi.array().items(ThemePartnerModel.ThemeConfigListPage()), }); } @@ -1353,7 +1299,7 @@ class ThemePartnerModel { /** @returns {ThemeConfigListPageSettingsProps} */ static ThemeConfigListPageSettingsProps() { return Joi.object({ - props: Joi.object().pattern(/\S/, Joi.any()), + props: Joi.any(), }); } diff --git a/sdk/partner/Theme/ThemePartnerValidator.js b/sdk/partner/Theme/ThemePartnerValidator.js index bba08e3c1..f57417310 100644 --- a/sdk/partner/Theme/ThemePartnerValidator.js +++ b/sdk/partner/Theme/ThemePartnerValidator.js @@ -142,28 +142,28 @@ class ThemeValidator { static createExtensionSectionDraft() { return Joi.object({ extensionId: Joi.string().allow("").required(), - body: ThemeModel.DraftExtensionSection().required(), + body: ThemeModel.DraftExtensionSectionRequest().required(), }).required(); } static publishExtensionSections() { return Joi.object({ extensionId: Joi.string().allow("").required(), - body: ThemeModel.PublishExtensionSection().required(), + body: ThemeModel.PublishExtensionSectionRequest().required(), }).required(); } static applyExtensionPreview() { return Joi.object({ extensionSectionId: Joi.string().allow("").required(), - body: ThemeModel.PreviewExtension().required(), + body: ThemeModel.ExtensionPreviewRequest().required(), }).required(); } static removeExtensionPreview() { return Joi.object({ extensionSectionId: Joi.string().allow("").required(), - body: ThemeModel.PreviewExtension().required(), + body: ThemeModel.ExtensionPreviewRequest().required(), }).required(); } diff --git a/sdk/partner/Webhook/WebhookPartnerClient.d.ts b/sdk/partner/Webhook/WebhookPartnerClient.d.ts index 4d1cf1fc7..f28d42eb1 100644 --- a/sdk/partner/Webhook/WebhookPartnerClient.d.ts +++ b/sdk/partner/Webhook/WebhookPartnerClient.d.ts @@ -2,108 +2,98 @@ export = Webhook; declare class Webhook { constructor(config: any); config: any; - /** - * @param {WebhookPartnerValidator.ResponseTimeSummaryParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name responseTimeSummary - * @summary: Response time summary - * @description: Response time summary - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/responseTimeSummary/). - */ - responseTimeSummary({ extensionId, startDate, endDate, requestHeaders }?: WebhookPartnerValidator.ResponseTimeSummaryParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPartnerValidator.FetchDeliverySummaryParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name fetchDeliverySummary * @summary: Webhook delivery summary * @description: Webhook delivery summary - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/fetchDeliverySummary/). */ - fetchDeliverySummary({ extensionId, startDate, endDate, requestHeaders }?: WebhookPartnerValidator.FetchDeliverySummaryParam, { responseHeaders }?: object): Promise; + fetchDeliverySummary({ extensionId, startDate, endDate, requestHeaders }?: WebhookPartnerValidator.FetchDeliverySummaryParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPartnerValidator.GetDeliveryDetailInsightsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getDeliveryDetailInsights * @summary: Get the insights of delivery details of the events that was pushed to subscribers * @description: Get the delivery details insights - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/getDeliveryDetailInsights/). */ - getDeliveryDetailInsights({ extensionId, body, requestHeaders }?: WebhookPartnerValidator.GetDeliveryDetailInsightsParam, { responseHeaders }?: object): Promise; + getDeliveryDetailInsights({ extensionId, body, requestHeaders }?: WebhookPartnerValidator.GetDeliveryDetailInsightsParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPartnerValidator.FetchDeliveryTsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name fetchDeliveryTs * @summary: Webhook delivery ts * @description: Webhook delivery ts - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/fetchDeliveryTs/). */ - fetchDeliveryTs({ extensionId, startDate, endDate, requestHeaders }?: WebhookPartnerValidator.FetchDeliveryTsParam, { responseHeaders }?: object): Promise; + fetchDeliveryTs({ extensionId, startDate, endDate, requestHeaders }?: WebhookPartnerValidator.FetchDeliveryTsParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPartnerValidator.FetchReportFiltersParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name fetchReportFilters * @summary: Fetch webhook report filters * @description: Fetch webhook report filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/fetchReportFilters/). */ - fetchReportFilters({ extensionId, startDate, endDate, pageNo, pageSize, requestHeaders }?: WebhookPartnerValidator.FetchReportFiltersParam, { responseHeaders }?: object): Promise; + fetchReportFilters({ extensionId, startDate, endDate, pageNo, pageSize, requestHeaders }?: WebhookPartnerValidator.FetchReportFiltersParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPartnerValidator.CancelReportDownloadParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name cancelReportDownload * @summary: Cancel report download job * @description: Cancel report download job - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/cancelReportDownload/). */ - cancelReportDownload({ extensionId, filename, requestHeaders }?: WebhookPartnerValidator.CancelReportDownloadParam, { responseHeaders }?: object): Promise; + cancelReportDownload({ extensionId, filename, requestHeaders }?: WebhookPartnerValidator.CancelReportDownloadParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPartnerValidator.GetHistoricalReportsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getHistoricalReports * @summary: Get report download history. * @description: Retrieve history reports for a specific company based on the provided filters. * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/getHistoricalReports/). */ - getHistoricalReports({ extensionId, body, requestHeaders }?: WebhookPartnerValidator.GetHistoricalReportsParam, { responseHeaders }?: object): Promise; + getHistoricalReports({ extensionId, body, requestHeaders }?: WebhookPartnerValidator.GetHistoricalReportsParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPartnerValidator.GetInvalidEventListParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getInvalidEventList * @summary: Get invalid event list * @description: Get invalid event list. * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/getInvalidEventList/). */ - getInvalidEventList({ extensionId, body, requestHeaders }?: WebhookPartnerValidator.GetInvalidEventListParam, { responseHeaders }?: object): Promise; + getInvalidEventList({ extensionId, body, requestHeaders }?: WebhookPartnerValidator.GetInvalidEventListParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPartnerValidator.FetchSubscribersParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name fetchSubscribers * @summary: Fetch subscriber by filters * @description: Fetch subscriber by filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/fetchSubscribers/). */ - fetchSubscribers({ extensionId, requestHeaders }?: WebhookPartnerValidator.FetchSubscribersParam, { responseHeaders }?: object): Promise; + fetchSubscribers({ extensionId, requestHeaders }?: WebhookPartnerValidator.FetchSubscribersParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPartnerValidator.UpdateSubscriberParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateSubscriber * @summary: Update subscriber status by id. * @description: Update subscriber status by id. * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/updateSubscriber/). */ - updateSubscriber({ extensionId, subscriberId, body, requestHeaders }?: WebhookPartnerValidator.UpdateSubscriberParam, { responseHeaders }?: object): Promise; + updateSubscriber({ extensionId, subscriberId, body, requestHeaders }?: WebhookPartnerValidator.UpdateSubscriberParam, { responseHeaders }?: object): Promise; } import WebhookPartnerModel = require("./WebhookPartnerModel"); diff --git a/sdk/partner/Webhook/WebhookPartnerClient.js b/sdk/partner/Webhook/WebhookPartnerClient.js index 1e1354dbf..27b49c289 100644 --- a/sdk/partner/Webhook/WebhookPartnerClient.js +++ b/sdk/partner/Webhook/WebhookPartnerClient.js @@ -14,96 +14,11 @@ class Webhook { this.config = config; } - /** - * @param {WebhookPartnerValidator.ResponseTimeSummaryParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name responseTimeSummary - * @summary: Response time summary - * @description: Response time summary - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/responseTimeSummary/). - */ - async responseTimeSummary( - { extensionId, startDate, endDate, requestHeaders } = { - requestHeaders: {}, - }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = WebhookPartnerValidator.responseTimeSummary().validate( - { - extensionId, - startDate, - endDate, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = WebhookPartnerValidator.responseTimeSummary().validate( - { - extensionId, - startDate, - endDate, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for partner > Webhook > responseTimeSummary \n ${warrning}`, - }); - } - - const query_params = {}; - query_params["start_date"] = startDate; - query_params["end_date"] = endDate; - - const response = await PartnerAPIClient.execute( - this.config, - "get", - `/service/partner/webhook/v1.0/organization/${this.config.organizationId}/extension/${extensionId}/report/response_time_ts`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = WebhookPartnerModel.ResponseTimeTs().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for partner > Webhook > responseTimeSummary \n ${res_error}`, - }); - } - } - - return response; - } - /** * @param {WebhookPartnerValidator.FetchDeliverySummaryParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name fetchDeliverySummary * @summary: Webhook delivery summary * @description: Webhook delivery summary - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/fetchDeliverySummary/). @@ -165,7 +80,7 @@ class Webhook { const { error: res_error, - } = WebhookPartnerModel.DeliverySummaryResult().validate(responseData, { + } = WebhookPartnerModel.DeliverySummaryResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -188,7 +103,7 @@ class Webhook { * @param {WebhookPartnerValidator.GetDeliveryDetailInsightsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getDeliveryDetailInsights * @summary: Get the insights of delivery details of the events that was pushed to subscribers * @description: Get the delivery details insights - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/getDeliveryDetailInsights/). @@ -246,7 +161,7 @@ class Webhook { const { error: res_error, - } = WebhookPartnerModel.DeliveryDetailsResult().validate(responseData, { + } = WebhookPartnerModel.DeliveryDetailsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -269,7 +184,7 @@ class Webhook { * @param {WebhookPartnerValidator.FetchDeliveryTsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name fetchDeliveryTs * @summary: Webhook delivery ts * @description: Webhook delivery ts - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/fetchDeliveryTs/). @@ -331,7 +246,7 @@ class Webhook { const { error: res_error, - } = WebhookPartnerModel.DeliveryTsResult().validate(responseData, { + } = WebhookPartnerModel.DeliveryTsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -354,7 +269,7 @@ class Webhook { * @param {WebhookPartnerValidator.FetchReportFiltersParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name fetchReportFilters * @summary: Fetch webhook report filters * @description: Fetch webhook report filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/fetchReportFilters/). @@ -421,7 +336,7 @@ class Webhook { } const { error: res_error } = Joi.array() - .items(WebhookPartnerModel.FilterReportResult()) + .items(WebhookPartnerModel.FilterReportResponse()) .validate(responseData, { abortEarly: false, allowUnknown: true }); if (res_error) { @@ -442,7 +357,7 @@ class Webhook { * @param {WebhookPartnerValidator.CancelReportDownloadParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name cancelReportDownload * @summary: Cancel report download job * @description: Cancel report download job - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/cancelReportDownload/). @@ -498,7 +413,7 @@ class Webhook { const { error: res_error, - } = WebhookPartnerModel.CancelDownloadResult().validate(responseData, { + } = WebhookPartnerModel.CancelDownloadResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -521,7 +436,7 @@ class Webhook { * @param {WebhookPartnerValidator.GetHistoricalReportsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getHistoricalReports * @summary: Get report download history. * @description: Retrieve history reports for a specific company based on the provided filters. @@ -578,7 +493,7 @@ class Webhook { const { error: res_error, - } = WebhookPartnerModel.HistoryResult().validate(responseData, { + } = WebhookPartnerModel.HistoryResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -601,7 +516,7 @@ class Webhook { * @param {WebhookPartnerValidator.GetInvalidEventListParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getInvalidEventList * @summary: Get invalid event list * @description: Get invalid event list. @@ -657,7 +572,7 @@ class Webhook { } const { error: res_error } = Joi.array() - .items(WebhookPartnerModel.InvalidEventsResult()) + .items(WebhookPartnerModel.InvalidEventsResponse()) .validate(responseData, { abortEarly: false, allowUnknown: true }); if (res_error) { @@ -678,7 +593,7 @@ class Webhook { * @param {WebhookPartnerValidator.FetchSubscribersParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name fetchSubscribers * @summary: Fetch subscriber by filters * @description: Fetch subscriber by filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/webhook/fetchSubscribers/). @@ -732,7 +647,7 @@ class Webhook { const { error: res_error, - } = WebhookPartnerModel.SubscriberConfigDetails().validate(responseData, { + } = WebhookPartnerModel.SubscriberConfigResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -755,7 +670,7 @@ class Webhook { * @param {WebhookPartnerValidator.UpdateSubscriberParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PartnerAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateSubscriber * @summary: Update subscriber status by id. * @description: Update subscriber status by id. @@ -816,7 +731,7 @@ class Webhook { const { error: res_error, - } = WebhookPartnerModel.SubscriberUpdateResult().validate(responseData, { + } = WebhookPartnerModel.UpdateSubscriberResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/partner/Webhook/WebhookPartnerModel.d.ts b/sdk/partner/Webhook/WebhookPartnerModel.d.ts index a90e0d58e..f839f7eef 100644 --- a/sdk/partner/Webhook/WebhookPartnerModel.d.ts +++ b/sdk/partner/Webhook/WebhookPartnerModel.d.ts @@ -1,111 +1,79 @@ export = WebhookPartnerModel; /** - * @typedef SubscriberUpdate - * @property {string} [status] - Represents the status of the subscriber update operation. + * @typedef UpdateSubscriberRequest + * @property {string} [status] */ /** - * @typedef SubscriberUpdateResult - * @property {string} [message] - Provides a message describing the result of - * the subscriber update operation. + * @typedef UpdateSubscriberResponse + * @property {string} [message] */ /** * @typedef Association - * @property {number} [company_id] - The identifier for the company associated - * with the configuration. - * @property {string[]} [application_id] - A list of application identifiers - * associated with the configuration. - * @property {string} [extension_id] - The identifier for the extension related - * to the configuration. - * @property {string} [criteria] - Defines the criteria for the association, - * including options for all events, empty criteria, or specific events. + * @property {number} [company_id] + * @property {string[]} [application_id] + * @property {string} [extension_id] + * @property {string} [criteria] */ /** * @typedef AuthMeta - * @property {string} [type] - Specifies the type of authentication used. - * @property {string} [secret] - Contains the secret key or token used for authentication. - */ -/** - * @typedef BroadcasterConfig - * @property {string} [topic] - The topic associated with the broadcaster configuration. - * @property {string} [queue] - The queue name used by the broadcaster. - * @property {string} [event_bridge_name] - The name of the event bridge used in - * the broadcaster configuration. - * @property {string} [workflow_name] - The name of the workflow related to the - * broadcaster. - * @property {string} [account_id] - The account ID associated with the - * broadcaster configuration. - * @property {string} [detail_type] - Specifies the type of detail for the - * broadcaster, allowing for custom or non-enumerated values. + * @property {string} [type] + * @property {string} [secret] */ /** * @typedef SubscriberEventMapping - * @property {number} [id] - The unique identifier for the subscriber event mapping. - * @property {number} [event_id] - The identifier for the event associated with - * the subscriber. - * @property {number} [subscriber_id] - The identifier for the subscriber - * involved in the mapping. - * @property {BroadcasterConfig} [broadcaster_config] - * @property {string} [created_on] - The timestamp indicating when the - * subscriber event mapping was created. - */ -/** - * @typedef EventConfigDetails - * @property {number} [id] - The unique identifier for the event configuration. - * @property {string} [event_name] - The name assigned to the event configuration. - * @property {string} [event_type] - Specifies the type of event, allowing for - * custom or non-enumerated values. - * @property {string} [event_category] - Defines the category of the event, - * allowing for custom or non-enumerated values. - * @property {Object} [event_schema] - Contains the schema details for the - * event, allowing for flexible or dynamic schemas. - * @property {string} [version] - The version number of the event configuration. - * @property {string} [display_name] - The display name for the event configuration. - * @property {string} [description] - A description of the event configuration, - * if provided. - * @property {string} [created_on] - The timestamp indicating when the event - * configuration was created. - * @property {string} [updated_on] - The timestamp indicating when the event - * configuration was last updated. - * @property {string} [group] - The group to which the event configuration - * belongs, if applicable. + * @property {number} [id] + * @property {number} [event_id] + * @property {number} [subscriber_id] + * @property {string} [topic] + * @property {string} [created_on] + */ +/** + * @typedef EventConfigResponse + * @property {number} [id] + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [event_category] + * @property {Object} [event_schema] + * @property {string} [version] + * @property {string} [display_name] + * @property {string} [description] + * @property {string} [created_on] + * @property {string} [updated_on] + * @property {string} [group] * @property {SubscriberEventMapping} [subscriber_event_mapping] */ /** - * @typedef SubscriberConfigDetails - * @property {ItemSchema[]} [items] - A list of items representing subscriber - * configurations. + * @typedef SubscriberConfigResponse + * @property {ItemSchema[]} [items] * @property {Page} [page] */ /** - * @typedef InvalidEventsPayload - * @property {string} [event_name] - The name of the event that is considered invalid. - * @property {string} [version] - The version of the event that is considered invalid. - * @property {string} [category] - The category of the event that is considered invalid. - * @property {string} [start_date] - The start date and time for the period - * during which events were considered invalid. - * @property {string} [end_date] - The end date and time for the period during - * which events were considered invalid. + * @typedef InvalidEventsRequest + * @property {string} [event_name] + * @property {string} [version] + * @property {string} [category] + * @property {string} [start_date] + * @property {string} [end_date] */ /** - * @typedef InvalidEventsResult - * @property {string} [event_name] - The name of the event that was found to be invalid. - * @property {string} [event_type] - The type of the invalid event, allowing for - * custom or non-enumerated values. - * @property {string} [version] - The version of the invalid event. - * @property {string} [category] - The category of the invalid event. - * @property {number} [count] - The number of occurrences of the invalid event. + * @typedef InvalidEventsResponse + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [version] + * @property {string} [category] + * @property {number} [count] */ /** * @typedef HistoryFilters - * @property {string[]} [events] - A list of event types to filter the history report. - * @property {string} [search_text] - Text used for searching within the history report. + * @property {string[]} [events] + * @property {string} [search_text] * @property {string} [status] - The status of the history report (e.g., "FAILED"). * @property {string} [end_date] - The end date and time of the history report. * @property {string} [start_date] - The start date and time of the history report. * @property {number[]} [subscribers] - An array of subscriber IDs associated * with the history report. - * @property {string[]} [webhook_type] - An array of webhook types to identify - * the type of subscriber. + * @property {string[]} [webhook_type] - An array of webhook type to identify + * thetype of subscriber i.e (KAFKA or REST). */ /** * @typedef Url @@ -114,8 +82,7 @@ export = WebhookPartnerModel; */ /** * @typedef CdnObject - * @property {Url[]} [urls] - A list of URLs for CDN objects, including the - * location of the uploaded report files. + * @property {Url[]} [urls] */ /** * @typedef UploadServiceObject @@ -123,108 +90,92 @@ export = WebhookPartnerModel; */ /** * @typedef HistoryAssociation - * @property {number} [company_id] - The identifier for the company associated - * with the history report. - * @property {number[]} [subscriber_ids] - A list of subscriber IDs related to - * the history report. + * @property {number} [company_id] + * @property {number[]} [subscriber_ids] */ /** * @typedef HistoryItems - * @property {number} [id] - The unique identifier for the history report. + * @property {number} [id] - The ID of the history report. * @property {HistoryAssociation} [association] * @property {HistoryFilters} [filters] - * @property {string} [filename] - The name of the file containing the history report. - * @property {string} [status] - The current status of the history report (e.g., - * "COMPLETED"). + * @property {string} [filename] - The filename of the history report. + * @property {string} [status] - The status of the history report (e.g., "COMPLETED"). * @property {UploadServiceObject} [upload_service_response] * @property {string} [created_on] - The date and time when the history report - * was generated. + * was created. * @property {string} [updated_on] - The date and time when the history report * was last updated. * @property {string} [message] - A message related to the history report. */ /** - * @typedef HistoryResult - * @property {HistoryItems[]} [items] - A list of history report items. + * @typedef HistoryResponse + * @property {HistoryItems[]} [items] * @property {Page} [page] */ /** * @typedef HistoryPayload - * @property {number} [company_id] - The identifier for the company requesting - * the history report. - * @property {string} [type] - Specifies the type of history report requested - * (e.g., "platform"). - * @property {number} [page_no] - The page number of the history report results. - * @property {number} [page_size] - The number of records to display per page in - * the history report. + * @property {number} [company_id] + * @property {string} [type] - The type of history report (e.g., "platform"). + * @property {number} [page_no] - The page number of the history report. + * @property {number} [page_size] - The number of records per page. */ /** - * @typedef CancelDownloadResult - * @property {string} [message] - A message indicating the result of the cancel - * download request. - * @property {string} [result] - The outcome of the cancel download operation. + * @typedef CancelDownloadResponse + * @property {string} [message] + * @property {string} [result] */ /** - * @typedef FilterReportResult - * @property {string} [filter_name] - The name of the filter applied in the report. - * @property {Object[]} [values] - A list of values resulting from the applied filter. + * @typedef FilterReportResponse + * @property {string} [filter_name] + * @property {Object[]} [values] */ /** - * @typedef DeliveryTsResult + * @typedef DeliveryTsResponse * @property {DeliveryTsSchema[]} [delivery_ts] */ /** * @typedef DeliveryTsSchema - * @property {string} [timestamp] - The timestamp of the delivery event. - * @property {number} [failed] - The count of failed delivery attempts. - * @property {number} [removed_webhooks] - The count of removed webhooks during delivery. - * @property {number} [success] - The count of successful delivery attempts. + * @property {string} [timestamp] + * @property {number} [failed] + * @property {number} [removed_webhooks] + * @property {number} [success] */ /** - * @typedef DeliveryDetailsPayload - * @property {string} [company_id] - The identifier for the company requesting - * delivery details. - * @property {number} [page_no] - The page number for the delivery details results. - * @property {number} [page_size] - The number of records per page for delivery details. - * @property {string} [start_date] - The start date and time for filtering - * delivery details. - * @property {string} [end_date] - The end date and time for filtering delivery details. - * @property {EventDeliveryDetailSchema[]} [event] - A list of event delivery details. - * @property {string} [status] - The status of the delivery details request. + * @typedef DeliveryDetailsRequest + * @property {string} [company_id] + * @property {number} [page_no] + * @property {number} [page_size] + * @property {string} [start_date] + * @property {string} [end_date] + * @property {EventDeliveryDetailSchema[]} [event] + * @property {string} [status] */ /** * @typedef EventDeliveryDetailSchema - * @property {string} [event_name] - The name of the event related to the - * delivery details. - * @property {string} [event_type] - The type of the event, allowing for custom - * or non-enumerated values. - * @property {string} [event_category] - The category of the event, allowing for - * custom or non-enumerated values. - * @property {string} [version] - The version of the event related to the - * delivery details. + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [event_category] + * @property {string} [version] */ /** - * @typedef DeliveryDetailsResult - * @property {EventProcessReportObject[]} [rows] - A list of processed event - * reports with delivery details. + * @typedef DeliveryDetailsResponse + * @property {EventProcessReportObject[]} [rows] * @property {Page} [page] */ /** * @typedef EventProcessReportObject * @property {string} [event_name] - The name of the processed event. - * @property {number} [response_code] - The response code returned for the - * event, allowing for custom or non-enumerated values. - * @property {string} [response_message] - The response message associated with the event. - * @property {string} [data] - The data payload associated with the event. - * @property {number} [attempt] - The attempt number for processing the event. - * @property {number} [last_attempted_on] - The timestamp of the last attempt to - * process the event. - * @property {string} [status] - The status of the event processing (e.g., "FAILED"). + * @property {number} [response_code] - The response code of the event. + * @property {string} [response_message] - The response message of the event. + * @property {string} [data] - The data associated with the event. + * @property {number} [attempt] - The attempt number of the event. + * @property {number} [last_attempted_on] - The timestamp of the last attempted event. + * @property {string} [status] - The status of the event (e.g., "FAILED"). * @property {string} [name] - The name of the event. - * @property {string} [webhook_url] - The URL of the webhook associated with the event. - * @property {number} [response_time] - The time taken to respond to the event. - * @property {string} [message_id] - The identifier for the event message. - * @property {string} [event_trace_id] - The trace ID associated with the event. + * @property {string} [webhook_url] - The webhook URL associated with the event. + * @property {number} [response_time] - The response time of the event. + * @property {string} [message_id] + * @property {string} [event_trace_id] */ /** * @typedef Page @@ -238,304 +189,126 @@ export = WebhookPartnerModel; */ /** * @typedef DeliveryEventLevelSchema - * @property {string} [event] - The name or identifier of the event. - * @property {number} [success] - The count of successful deliveries for the event. - * @property {number} [failed] - The count of failed deliveries for the event. - * @property {number} [failed_percentage] - The percentage of failed deliveries - * relative to the total. - * @property {number} [removed_webhooks] - The count of webhooks that were - * removed during the delivery. - * @property {number} [total] - The total number of delivery attempts for the event. - * @property {number} [response_time] - The average response time for the event - * deliveries. - */ -/** - * @typedef ResponseTimeTs - * @property {AvgResponseTime[]} [avg_response_time_ts] + * @property {string} [event] + * @property {number} [success] + * @property {number} [failed] + * @property {number} [failed_percentage] + * @property {number} [removed_webhooks] + * @property {number} [total] + * @property {number} [response_time] */ /** - * @typedef AvgResponseTime - * @property {string} [last_attempted_on] - The timestamp of the last attempt, - * formatted as a string. - * @property {number} [response_code] - The response code returned for the - * delivery attempt, allowing for custom or non-enumerated values. - * @property {string} [response_time] - The response time for the delivery - * attempt, formatted as a string. - * @property {number} [attempt] - The attempt number for the delivery. - * @property {number} [total] - The total count of deliveries attempted. - */ -/** - * @typedef DeliverySummaryResult + * @typedef DeliverySummaryResponse * @property {DeliveryEventLevelSchema[]} [delivery_event_level] * @property {DeliverySummarySchema} [delivery_summary] */ /** * @typedef DeliverySummarySchema - * @property {number} [success] - The total count of successful deliveries. - * @property {number} [response_time] - The average response time for deliveries. - * @property {number} [failed_percentage] - The percentage of failed deliveries. - * @property {number} [removed_webhooks] - The count of webhooks removed during delivery. + * @property {number} [success] + * @property {number} [response_time] + * @property {number} [failed_percentage] + * @property {number} [removed_webhooks] */ /** * @typedef ItemSchema - * @property {number} [id] - The unique identifier for the item. - * @property {string} [modified_by] - The user or system that last modified the item. - * @property {string} [name] - The name of the item. - * @property {string} [webhook_url] - The URL of the webhook associated with the item. - * @property {string} [provider] - The provider of the item. + * @property {number} [id] + * @property {string} [modified_by] + * @property {string} [name] + * @property {string} [webhook_url] + * @property {string} [provider] * @property {Association} [association] - * @property {Object} [custom_headers] - Custom headers associated with the item, if any. - * @property {string} [status] - The current status of the item. - * @property {string} [email_id] - The email ID associated with the item, if applicable. - * @property {string} [updated_on] - The date and time when the item was last updated. - * @property {string} [created_on] - The date and time when the item was created. - * @property {string} [type] - The type of the item, if applicable. + * @property {Object} [custom_headers] + * @property {string} [status] + * @property {string} [email_id] + * @property {string} [updated_on] + * @property {string} [created_on] + * @property {string} [type] * @property {AuthMeta} [auth_meta] - * @property {EventConfigDetails[]} [event_configs] - A list of event - * configurations associated with the item. - * @property {number[]} [event_id] - A list of event IDs associated with the item. + * @property {EventConfigResponse[]} [event_configs] + * @property {number[]} [event_id] */ declare class WebhookPartnerModel { } declare namespace WebhookPartnerModel { - export { SubscriberUpdate, SubscriberUpdateResult, Association, AuthMeta, BroadcasterConfig, SubscriberEventMapping, EventConfigDetails, SubscriberConfigDetails, InvalidEventsPayload, InvalidEventsResult, HistoryFilters, Url, CdnObject, UploadServiceObject, HistoryAssociation, HistoryItems, HistoryResult, HistoryPayload, CancelDownloadResult, FilterReportResult, DeliveryTsResult, DeliveryTsSchema, DeliveryDetailsPayload, EventDeliveryDetailSchema, DeliveryDetailsResult, EventProcessReportObject, Page, DeliveryEventLevelSchema, ResponseTimeTs, AvgResponseTime, DeliverySummaryResult, DeliverySummarySchema, ItemSchema }; + export { UpdateSubscriberRequest, UpdateSubscriberResponse, Association, AuthMeta, SubscriberEventMapping, EventConfigResponse, SubscriberConfigResponse, InvalidEventsRequest, InvalidEventsResponse, HistoryFilters, Url, CdnObject, UploadServiceObject, HistoryAssociation, HistoryItems, HistoryResponse, HistoryPayload, CancelDownloadResponse, FilterReportResponse, DeliveryTsResponse, DeliveryTsSchema, DeliveryDetailsRequest, EventDeliveryDetailSchema, DeliveryDetailsResponse, EventProcessReportObject, Page, DeliveryEventLevelSchema, DeliverySummaryResponse, DeliverySummarySchema, ItemSchema }; } -/** @returns {SubscriberUpdate} */ -declare function SubscriberUpdate(): SubscriberUpdate; -type SubscriberUpdate = { - /** - * - Represents the status of the subscriber update operation. - */ +/** @returns {UpdateSubscriberRequest} */ +declare function UpdateSubscriberRequest(): UpdateSubscriberRequest; +type UpdateSubscriberRequest = { status?: string; }; -/** @returns {SubscriberUpdateResult} */ -declare function SubscriberUpdateResult(): SubscriberUpdateResult; -type SubscriberUpdateResult = { - /** - * - Provides a message describing the result of - * the subscriber update operation. - */ +/** @returns {UpdateSubscriberResponse} */ +declare function UpdateSubscriberResponse(): UpdateSubscriberResponse; +type UpdateSubscriberResponse = { message?: string; }; /** @returns {Association} */ declare function Association(): Association; type Association = { - /** - * - The identifier for the company associated - * with the configuration. - */ company_id?: number; - /** - * - A list of application identifiers - * associated with the configuration. - */ application_id?: string[]; - /** - * - The identifier for the extension related - * to the configuration. - */ extension_id?: string; - /** - * - Defines the criteria for the association, - * including options for all events, empty criteria, or specific events. - */ criteria?: string; }; /** @returns {AuthMeta} */ declare function AuthMeta(): AuthMeta; type AuthMeta = { - /** - * - Specifies the type of authentication used. - */ type?: string; - /** - * - Contains the secret key or token used for authentication. - */ secret?: string; }; -/** @returns {BroadcasterConfig} */ -declare function BroadcasterConfig(): BroadcasterConfig; -type BroadcasterConfig = { - /** - * - The topic associated with the broadcaster configuration. - */ - topic?: string; - /** - * - The queue name used by the broadcaster. - */ - queue?: string; - /** - * - The name of the event bridge used in - * the broadcaster configuration. - */ - event_bridge_name?: string; - /** - * - The name of the workflow related to the - * broadcaster. - */ - workflow_name?: string; - /** - * - The account ID associated with the - * broadcaster configuration. - */ - account_id?: string; - /** - * - Specifies the type of detail for the - * broadcaster, allowing for custom or non-enumerated values. - */ - detail_type?: string; -}; /** @returns {SubscriberEventMapping} */ declare function SubscriberEventMapping(): SubscriberEventMapping; type SubscriberEventMapping = { - /** - * - The unique identifier for the subscriber event mapping. - */ id?: number; - /** - * - The identifier for the event associated with - * the subscriber. - */ event_id?: number; - /** - * - The identifier for the subscriber - * involved in the mapping. - */ subscriber_id?: number; - broadcaster_config?: BroadcasterConfig; - /** - * - The timestamp indicating when the - * subscriber event mapping was created. - */ + topic?: string; created_on?: string; }; -/** @returns {EventConfigDetails} */ -declare function EventConfigDetails(): EventConfigDetails; -type EventConfigDetails = { - /** - * - The unique identifier for the event configuration. - */ +/** @returns {EventConfigResponse} */ +declare function EventConfigResponse(): EventConfigResponse; +type EventConfigResponse = { id?: number; - /** - * - The name assigned to the event configuration. - */ event_name?: string; - /** - * - Specifies the type of event, allowing for - * custom or non-enumerated values. - */ event_type?: string; - /** - * - Defines the category of the event, - * allowing for custom or non-enumerated values. - */ event_category?: string; - /** - * - Contains the schema details for the - * event, allowing for flexible or dynamic schemas. - */ event_schema?: any; - /** - * - The version number of the event configuration. - */ version?: string; - /** - * - The display name for the event configuration. - */ display_name?: string; - /** - * - A description of the event configuration, - * if provided. - */ description?: string; - /** - * - The timestamp indicating when the event - * configuration was created. - */ created_on?: string; - /** - * - The timestamp indicating when the event - * configuration was last updated. - */ updated_on?: string; - /** - * - The group to which the event configuration - * belongs, if applicable. - */ group?: string; subscriber_event_mapping?: SubscriberEventMapping; }; -/** @returns {SubscriberConfigDetails} */ -declare function SubscriberConfigDetails(): SubscriberConfigDetails; -type SubscriberConfigDetails = { - /** - * - A list of items representing subscriber - * configurations. - */ +/** @returns {SubscriberConfigResponse} */ +declare function SubscriberConfigResponse(): SubscriberConfigResponse; +type SubscriberConfigResponse = { items?: ItemSchema[]; page?: Page; }; -/** @returns {InvalidEventsPayload} */ -declare function InvalidEventsPayload(): InvalidEventsPayload; -type InvalidEventsPayload = { - /** - * - The name of the event that is considered invalid. - */ +/** @returns {InvalidEventsRequest} */ +declare function InvalidEventsRequest(): InvalidEventsRequest; +type InvalidEventsRequest = { event_name?: string; - /** - * - The version of the event that is considered invalid. - */ version?: string; - /** - * - The category of the event that is considered invalid. - */ category?: string; - /** - * - The start date and time for the period - * during which events were considered invalid. - */ start_date?: string; - /** - * - The end date and time for the period during - * which events were considered invalid. - */ end_date?: string; }; -/** @returns {InvalidEventsResult} */ -declare function InvalidEventsResult(): InvalidEventsResult; -type InvalidEventsResult = { - /** - * - The name of the event that was found to be invalid. - */ +/** @returns {InvalidEventsResponse} */ +declare function InvalidEventsResponse(): InvalidEventsResponse; +type InvalidEventsResponse = { event_name?: string; - /** - * - The type of the invalid event, allowing for - * custom or non-enumerated values. - */ event_type?: string; - /** - * - The version of the invalid event. - */ version?: string; - /** - * - The category of the invalid event. - */ category?: string; - /** - * - The number of occurrences of the invalid event. - */ count?: number; }; /** @returns {HistoryFilters} */ declare function HistoryFilters(): HistoryFilters; type HistoryFilters = { - /** - * - A list of event types to filter the history report. - */ events?: string[]; - /** - * - Text used for searching within the history report. - */ search_text?: string; /** * - The status of the history report (e.g., "FAILED"). @@ -555,8 +328,8 @@ type HistoryFilters = { */ subscribers?: number[]; /** - * - An array of webhook types to identify - * the type of subscriber. + * - An array of webhook type to identify + * thetype of subscriber i.e (KAFKA or REST). */ webhook_type?: string[]; }; @@ -575,10 +348,6 @@ type Url = { /** @returns {CdnObject} */ declare function CdnObject(): CdnObject; type CdnObject = { - /** - * - A list of URLs for CDN objects, including the - * location of the uploaded report files. - */ urls?: Url[]; }; /** @returns {UploadServiceObject} */ @@ -589,39 +358,30 @@ type UploadServiceObject = { /** @returns {HistoryAssociation} */ declare function HistoryAssociation(): HistoryAssociation; type HistoryAssociation = { - /** - * - The identifier for the company associated - * with the history report. - */ company_id?: number; - /** - * - A list of subscriber IDs related to - * the history report. - */ subscriber_ids?: number[]; }; /** @returns {HistoryItems} */ declare function HistoryItems(): HistoryItems; type HistoryItems = { /** - * - The unique identifier for the history report. + * - The ID of the history report. */ id?: number; association?: HistoryAssociation; filters?: HistoryFilters; /** - * - The name of the file containing the history report. + * - The filename of the history report. */ filename?: string; /** - * - The current status of the history report (e.g., - * "COMPLETED"). + * - The status of the history report (e.g., "COMPLETED"). */ status?: string; upload_service_response?: UploadServiceObject; /** * - The date and time when the history report - * was generated. + * was created. */ created_on?: string; /** @@ -634,153 +394,76 @@ type HistoryItems = { */ message?: string; }; -/** @returns {HistoryResult} */ -declare function HistoryResult(): HistoryResult; -type HistoryResult = { - /** - * - A list of history report items. - */ +/** @returns {HistoryResponse} */ +declare function HistoryResponse(): HistoryResponse; +type HistoryResponse = { items?: HistoryItems[]; page?: Page; }; /** @returns {HistoryPayload} */ declare function HistoryPayload(): HistoryPayload; type HistoryPayload = { - /** - * - The identifier for the company requesting - * the history report. - */ company_id?: number; /** - * - Specifies the type of history report requested - * (e.g., "platform"). + * - The type of history report (e.g., "platform"). */ type?: string; /** - * - The page number of the history report results. + * - The page number of the history report. */ page_no?: number; /** - * - The number of records to display per page in - * the history report. + * - The number of records per page. */ page_size?: number; }; -/** @returns {CancelDownloadResult} */ -declare function CancelDownloadResult(): CancelDownloadResult; -type CancelDownloadResult = { - /** - * - A message indicating the result of the cancel - * download request. - */ +/** @returns {CancelDownloadResponse} */ +declare function CancelDownloadResponse(): CancelDownloadResponse; +type CancelDownloadResponse = { message?: string; - /** - * - The outcome of the cancel download operation. - */ result?: string; }; -/** @returns {FilterReportResult} */ -declare function FilterReportResult(): FilterReportResult; -type FilterReportResult = { - /** - * - The name of the filter applied in the report. - */ +/** @returns {FilterReportResponse} */ +declare function FilterReportResponse(): FilterReportResponse; +type FilterReportResponse = { filter_name?: string; - /** - * - A list of values resulting from the applied filter. - */ values?: any[]; }; -/** @returns {DeliveryTsResult} */ -declare function DeliveryTsResult(): DeliveryTsResult; -type DeliveryTsResult = { +/** @returns {DeliveryTsResponse} */ +declare function DeliveryTsResponse(): DeliveryTsResponse; +type DeliveryTsResponse = { delivery_ts?: DeliveryTsSchema[]; }; /** @returns {DeliveryTsSchema} */ declare function DeliveryTsSchema(): DeliveryTsSchema; type DeliveryTsSchema = { - /** - * - The timestamp of the delivery event. - */ timestamp?: string; - /** - * - The count of failed delivery attempts. - */ failed?: number; - /** - * - The count of removed webhooks during delivery. - */ removed_webhooks?: number; - /** - * - The count of successful delivery attempts. - */ success?: number; }; -/** @returns {DeliveryDetailsPayload} */ -declare function DeliveryDetailsPayload(): DeliveryDetailsPayload; -type DeliveryDetailsPayload = { - /** - * - The identifier for the company requesting - * delivery details. - */ +/** @returns {DeliveryDetailsRequest} */ +declare function DeliveryDetailsRequest(): DeliveryDetailsRequest; +type DeliveryDetailsRequest = { company_id?: string; - /** - * - The page number for the delivery details results. - */ page_no?: number; - /** - * - The number of records per page for delivery details. - */ page_size?: number; - /** - * - The start date and time for filtering - * delivery details. - */ start_date?: string; - /** - * - The end date and time for filtering delivery details. - */ end_date?: string; - /** - * - A list of event delivery details. - */ event?: EventDeliveryDetailSchema[]; - /** - * - The status of the delivery details request. - */ status?: string; }; /** @returns {EventDeliveryDetailSchema} */ declare function EventDeliveryDetailSchema(): EventDeliveryDetailSchema; type EventDeliveryDetailSchema = { - /** - * - The name of the event related to the - * delivery details. - */ event_name?: string; - /** - * - The type of the event, allowing for custom - * or non-enumerated values. - */ event_type?: string; - /** - * - The category of the event, allowing for - * custom or non-enumerated values. - */ event_category?: string; - /** - * - The version of the event related to the - * delivery details. - */ version?: string; }; -/** @returns {DeliveryDetailsResult} */ -declare function DeliveryDetailsResult(): DeliveryDetailsResult; -type DeliveryDetailsResult = { - /** - * - A list of processed event - * reports with delivery details. - */ +/** @returns {DeliveryDetailsResponse} */ +declare function DeliveryDetailsResponse(): DeliveryDetailsResponse; +type DeliveryDetailsResponse = { rows?: EventProcessReportObject[]; page?: Page; }; @@ -792,29 +475,27 @@ type EventProcessReportObject = { */ event_name?: string; /** - * - The response code returned for the - * event, allowing for custom or non-enumerated values. + * - The response code of the event. */ response_code?: number; /** - * - The response message associated with the event. + * - The response message of the event. */ response_message?: string; /** - * - The data payload associated with the event. + * - The data associated with the event. */ data?: string; /** - * - The attempt number for processing the event. + * - The attempt number of the event. */ attempt?: number; /** - * - The timestamp of the last attempt to - * process the event. + * - The timestamp of the last attempted event. */ last_attempted_on?: number; /** - * - The status of the event processing (e.g., "FAILED"). + * - The status of the event (e.g., "FAILED"). */ status?: string; /** @@ -822,20 +503,14 @@ type EventProcessReportObject = { */ name?: string; /** - * - The URL of the webhook associated with the event. + * - The webhook URL associated with the event. */ webhook_url?: string; /** - * - The time taken to respond to the event. + * - The response time of the event. */ response_time?: number; - /** - * - The identifier for the event message. - */ message_id?: string; - /** - * - The trace ID associated with the event. - */ event_trace_id?: string; }; /** @returns {Page} */ @@ -873,152 +548,44 @@ type Page = { /** @returns {DeliveryEventLevelSchema} */ declare function DeliveryEventLevelSchema(): DeliveryEventLevelSchema; type DeliveryEventLevelSchema = { - /** - * - The name or identifier of the event. - */ event?: string; - /** - * - The count of successful deliveries for the event. - */ success?: number; - /** - * - The count of failed deliveries for the event. - */ failed?: number; - /** - * - The percentage of failed deliveries - * relative to the total. - */ failed_percentage?: number; - /** - * - The count of webhooks that were - * removed during the delivery. - */ removed_webhooks?: number; - /** - * - The total number of delivery attempts for the event. - */ total?: number; - /** - * - The average response time for the event - * deliveries. - */ response_time?: number; }; -/** @returns {ResponseTimeTs} */ -declare function ResponseTimeTs(): ResponseTimeTs; -type ResponseTimeTs = { - avg_response_time_ts?: AvgResponseTime[]; -}; -/** @returns {AvgResponseTime} */ -declare function AvgResponseTime(): AvgResponseTime; -type AvgResponseTime = { - /** - * - The timestamp of the last attempt, - * formatted as a string. - */ - last_attempted_on?: string; - /** - * - The response code returned for the - * delivery attempt, allowing for custom or non-enumerated values. - */ - response_code?: number; - /** - * - The response time for the delivery - * attempt, formatted as a string. - */ - response_time?: string; - /** - * - The attempt number for the delivery. - */ - attempt?: number; - /** - * - The total count of deliveries attempted. - */ - total?: number; -}; -/** @returns {DeliverySummaryResult} */ -declare function DeliverySummaryResult(): DeliverySummaryResult; -type DeliverySummaryResult = { +/** @returns {DeliverySummaryResponse} */ +declare function DeliverySummaryResponse(): DeliverySummaryResponse; +type DeliverySummaryResponse = { delivery_event_level?: DeliveryEventLevelSchema[]; delivery_summary?: DeliverySummarySchema; }; /** @returns {DeliverySummarySchema} */ declare function DeliverySummarySchema(): DeliverySummarySchema; type DeliverySummarySchema = { - /** - * - The total count of successful deliveries. - */ success?: number; - /** - * - The average response time for deliveries. - */ response_time?: number; - /** - * - The percentage of failed deliveries. - */ failed_percentage?: number; - /** - * - The count of webhooks removed during delivery. - */ removed_webhooks?: number; }; /** @returns {ItemSchema} */ declare function ItemSchema(): ItemSchema; type ItemSchema = { - /** - * - The unique identifier for the item. - */ id?: number; - /** - * - The user or system that last modified the item. - */ modified_by?: string; - /** - * - The name of the item. - */ name?: string; - /** - * - The URL of the webhook associated with the item. - */ webhook_url?: string; - /** - * - The provider of the item. - */ provider?: string; association?: Association; - /** - * - Custom headers associated with the item, if any. - */ custom_headers?: any; - /** - * - The current status of the item. - */ status?: string; - /** - * - The email ID associated with the item, if applicable. - */ email_id?: string; - /** - * - The date and time when the item was last updated. - */ updated_on?: string; - /** - * - The date and time when the item was created. - */ created_on?: string; - /** - * - The type of the item, if applicable. - */ type?: string; auth_meta?: AuthMeta; - /** - * - A list of event - * configurations associated with the item. - */ - event_configs?: EventConfigDetails[]; - /** - * - A list of event IDs associated with the item. - */ + event_configs?: EventConfigResponse[]; event_id?: number[]; }; diff --git a/sdk/partner/Webhook/WebhookPartnerModel.js b/sdk/partner/Webhook/WebhookPartnerModel.js index fcbdbaf77..13adb1257 100644 --- a/sdk/partner/Webhook/WebhookPartnerModel.js +++ b/sdk/partner/Webhook/WebhookPartnerModel.js @@ -1,122 +1,89 @@ const Joi = require("joi"); /** - * @typedef SubscriberUpdate - * @property {string} [status] - Represents the status of the subscriber update operation. + * @typedef UpdateSubscriberRequest + * @property {string} [status] */ /** - * @typedef SubscriberUpdateResult - * @property {string} [message] - Provides a message describing the result of - * the subscriber update operation. + * @typedef UpdateSubscriberResponse + * @property {string} [message] */ /** * @typedef Association - * @property {number} [company_id] - The identifier for the company associated - * with the configuration. - * @property {string[]} [application_id] - A list of application identifiers - * associated with the configuration. - * @property {string} [extension_id] - The identifier for the extension related - * to the configuration. - * @property {string} [criteria] - Defines the criteria for the association, - * including options for all events, empty criteria, or specific events. + * @property {number} [company_id] + * @property {string[]} [application_id] + * @property {string} [extension_id] + * @property {string} [criteria] */ /** * @typedef AuthMeta - * @property {string} [type] - Specifies the type of authentication used. - * @property {string} [secret] - Contains the secret key or token used for authentication. - */ - -/** - * @typedef BroadcasterConfig - * @property {string} [topic] - The topic associated with the broadcaster configuration. - * @property {string} [queue] - The queue name used by the broadcaster. - * @property {string} [event_bridge_name] - The name of the event bridge used in - * the broadcaster configuration. - * @property {string} [workflow_name] - The name of the workflow related to the - * broadcaster. - * @property {string} [account_id] - The account ID associated with the - * broadcaster configuration. - * @property {string} [detail_type] - Specifies the type of detail for the - * broadcaster, allowing for custom or non-enumerated values. + * @property {string} [type] + * @property {string} [secret] */ /** * @typedef SubscriberEventMapping - * @property {number} [id] - The unique identifier for the subscriber event mapping. - * @property {number} [event_id] - The identifier for the event associated with - * the subscriber. - * @property {number} [subscriber_id] - The identifier for the subscriber - * involved in the mapping. - * @property {BroadcasterConfig} [broadcaster_config] - * @property {string} [created_on] - The timestamp indicating when the - * subscriber event mapping was created. - */ - -/** - * @typedef EventConfigDetails - * @property {number} [id] - The unique identifier for the event configuration. - * @property {string} [event_name] - The name assigned to the event configuration. - * @property {string} [event_type] - Specifies the type of event, allowing for - * custom or non-enumerated values. - * @property {string} [event_category] - Defines the category of the event, - * allowing for custom or non-enumerated values. - * @property {Object} [event_schema] - Contains the schema details for the - * event, allowing for flexible or dynamic schemas. - * @property {string} [version] - The version number of the event configuration. - * @property {string} [display_name] - The display name for the event configuration. - * @property {string} [description] - A description of the event configuration, - * if provided. - * @property {string} [created_on] - The timestamp indicating when the event - * configuration was created. - * @property {string} [updated_on] - The timestamp indicating when the event - * configuration was last updated. - * @property {string} [group] - The group to which the event configuration - * belongs, if applicable. + * @property {number} [id] + * @property {number} [event_id] + * @property {number} [subscriber_id] + * @property {string} [topic] + * @property {string} [created_on] + */ + +/** + * @typedef EventConfigResponse + * @property {number} [id] + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [event_category] + * @property {Object} [event_schema] + * @property {string} [version] + * @property {string} [display_name] + * @property {string} [description] + * @property {string} [created_on] + * @property {string} [updated_on] + * @property {string} [group] * @property {SubscriberEventMapping} [subscriber_event_mapping] */ /** - * @typedef SubscriberConfigDetails - * @property {ItemSchema[]} [items] - A list of items representing subscriber - * configurations. + * @typedef SubscriberConfigResponse + * @property {ItemSchema[]} [items] * @property {Page} [page] */ /** - * @typedef InvalidEventsPayload - * @property {string} [event_name] - The name of the event that is considered invalid. - * @property {string} [version] - The version of the event that is considered invalid. - * @property {string} [category] - The category of the event that is considered invalid. - * @property {string} [start_date] - The start date and time for the period - * during which events were considered invalid. - * @property {string} [end_date] - The end date and time for the period during - * which events were considered invalid. + * @typedef InvalidEventsRequest + * @property {string} [event_name] + * @property {string} [version] + * @property {string} [category] + * @property {string} [start_date] + * @property {string} [end_date] */ /** - * @typedef InvalidEventsResult - * @property {string} [event_name] - The name of the event that was found to be invalid. - * @property {string} [event_type] - The type of the invalid event, allowing for - * custom or non-enumerated values. - * @property {string} [version] - The version of the invalid event. - * @property {string} [category] - The category of the invalid event. - * @property {number} [count] - The number of occurrences of the invalid event. + * @typedef InvalidEventsResponse + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [version] + * @property {string} [category] + * @property {number} [count] */ /** * @typedef HistoryFilters - * @property {string[]} [events] - A list of event types to filter the history report. - * @property {string} [search_text] - Text used for searching within the history report. + * @property {string[]} [events] + * @property {string} [search_text] * @property {string} [status] - The status of the history report (e.g., "FAILED"). * @property {string} [end_date] - The end date and time of the history report. * @property {string} [start_date] - The start date and time of the history report. * @property {number[]} [subscribers] - An array of subscriber IDs associated * with the history report. - * @property {string[]} [webhook_type] - An array of webhook types to identify - * the type of subscriber. + * @property {string[]} [webhook_type] - An array of webhook type to identify + * thetype of subscriber i.e (KAFKA or REST). */ /** @@ -127,8 +94,7 @@ const Joi = require("joi"); /** * @typedef CdnObject - * @property {Url[]} [urls] - A list of URLs for CDN objects, including the - * location of the uploaded report files. + * @property {Url[]} [urls] */ /** @@ -138,119 +104,103 @@ const Joi = require("joi"); /** * @typedef HistoryAssociation - * @property {number} [company_id] - The identifier for the company associated - * with the history report. - * @property {number[]} [subscriber_ids] - A list of subscriber IDs related to - * the history report. + * @property {number} [company_id] + * @property {number[]} [subscriber_ids] */ /** * @typedef HistoryItems - * @property {number} [id] - The unique identifier for the history report. + * @property {number} [id] - The ID of the history report. * @property {HistoryAssociation} [association] * @property {HistoryFilters} [filters] - * @property {string} [filename] - The name of the file containing the history report. - * @property {string} [status] - The current status of the history report (e.g., - * "COMPLETED"). + * @property {string} [filename] - The filename of the history report. + * @property {string} [status] - The status of the history report (e.g., "COMPLETED"). * @property {UploadServiceObject} [upload_service_response] * @property {string} [created_on] - The date and time when the history report - * was generated. + * was created. * @property {string} [updated_on] - The date and time when the history report * was last updated. * @property {string} [message] - A message related to the history report. */ /** - * @typedef HistoryResult - * @property {HistoryItems[]} [items] - A list of history report items. + * @typedef HistoryResponse + * @property {HistoryItems[]} [items] * @property {Page} [page] */ /** * @typedef HistoryPayload - * @property {number} [company_id] - The identifier for the company requesting - * the history report. - * @property {string} [type] - Specifies the type of history report requested - * (e.g., "platform"). - * @property {number} [page_no] - The page number of the history report results. - * @property {number} [page_size] - The number of records to display per page in - * the history report. + * @property {number} [company_id] + * @property {string} [type] - The type of history report (e.g., "platform"). + * @property {number} [page_no] - The page number of the history report. + * @property {number} [page_size] - The number of records per page. */ /** - * @typedef CancelDownloadResult - * @property {string} [message] - A message indicating the result of the cancel - * download request. - * @property {string} [result] - The outcome of the cancel download operation. + * @typedef CancelDownloadResponse + * @property {string} [message] + * @property {string} [result] */ /** - * @typedef FilterReportResult - * @property {string} [filter_name] - The name of the filter applied in the report. - * @property {Object[]} [values] - A list of values resulting from the applied filter. + * @typedef FilterReportResponse + * @property {string} [filter_name] + * @property {Object[]} [values] */ /** - * @typedef DeliveryTsResult + * @typedef DeliveryTsResponse * @property {DeliveryTsSchema[]} [delivery_ts] */ /** * @typedef DeliveryTsSchema - * @property {string} [timestamp] - The timestamp of the delivery event. - * @property {number} [failed] - The count of failed delivery attempts. - * @property {number} [removed_webhooks] - The count of removed webhooks during delivery. - * @property {number} [success] - The count of successful delivery attempts. + * @property {string} [timestamp] + * @property {number} [failed] + * @property {number} [removed_webhooks] + * @property {number} [success] */ /** - * @typedef DeliveryDetailsPayload - * @property {string} [company_id] - The identifier for the company requesting - * delivery details. - * @property {number} [page_no] - The page number for the delivery details results. - * @property {number} [page_size] - The number of records per page for delivery details. - * @property {string} [start_date] - The start date and time for filtering - * delivery details. - * @property {string} [end_date] - The end date and time for filtering delivery details. - * @property {EventDeliveryDetailSchema[]} [event] - A list of event delivery details. - * @property {string} [status] - The status of the delivery details request. + * @typedef DeliveryDetailsRequest + * @property {string} [company_id] + * @property {number} [page_no] + * @property {number} [page_size] + * @property {string} [start_date] + * @property {string} [end_date] + * @property {EventDeliveryDetailSchema[]} [event] + * @property {string} [status] */ /** * @typedef EventDeliveryDetailSchema - * @property {string} [event_name] - The name of the event related to the - * delivery details. - * @property {string} [event_type] - The type of the event, allowing for custom - * or non-enumerated values. - * @property {string} [event_category] - The category of the event, allowing for - * custom or non-enumerated values. - * @property {string} [version] - The version of the event related to the - * delivery details. + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [event_category] + * @property {string} [version] */ /** - * @typedef DeliveryDetailsResult - * @property {EventProcessReportObject[]} [rows] - A list of processed event - * reports with delivery details. + * @typedef DeliveryDetailsResponse + * @property {EventProcessReportObject[]} [rows] * @property {Page} [page] */ /** * @typedef EventProcessReportObject * @property {string} [event_name] - The name of the processed event. - * @property {number} [response_code] - The response code returned for the - * event, allowing for custom or non-enumerated values. - * @property {string} [response_message] - The response message associated with the event. - * @property {string} [data] - The data payload associated with the event. - * @property {number} [attempt] - The attempt number for processing the event. - * @property {number} [last_attempted_on] - The timestamp of the last attempt to - * process the event. - * @property {string} [status] - The status of the event processing (e.g., "FAILED"). + * @property {number} [response_code] - The response code of the event. + * @property {string} [response_message] - The response message of the event. + * @property {string} [data] - The data associated with the event. + * @property {number} [attempt] - The attempt number of the event. + * @property {number} [last_attempted_on] - The timestamp of the last attempted event. + * @property {string} [status] - The status of the event (e.g., "FAILED"). * @property {string} [name] - The name of the event. - * @property {string} [webhook_url] - The URL of the webhook associated with the event. - * @property {number} [response_time] - The time taken to respond to the event. - * @property {string} [message_id] - The identifier for the event message. - * @property {string} [event_trace_id] - The trace ID associated with the event. + * @property {string} [webhook_url] - The webhook URL associated with the event. + * @property {number} [response_time] - The response time of the event. + * @property {string} [message_id] + * @property {string} [event_trace_id] */ /** @@ -266,79 +216,58 @@ const Joi = require("joi"); /** * @typedef DeliveryEventLevelSchema - * @property {string} [event] - The name or identifier of the event. - * @property {number} [success] - The count of successful deliveries for the event. - * @property {number} [failed] - The count of failed deliveries for the event. - * @property {number} [failed_percentage] - The percentage of failed deliveries - * relative to the total. - * @property {number} [removed_webhooks] - The count of webhooks that were - * removed during the delivery. - * @property {number} [total] - The total number of delivery attempts for the event. - * @property {number} [response_time] - The average response time for the event - * deliveries. + * @property {string} [event] + * @property {number} [success] + * @property {number} [failed] + * @property {number} [failed_percentage] + * @property {number} [removed_webhooks] + * @property {number} [total] + * @property {number} [response_time] */ /** - * @typedef ResponseTimeTs - * @property {AvgResponseTime[]} [avg_response_time_ts] - */ - -/** - * @typedef AvgResponseTime - * @property {string} [last_attempted_on] - The timestamp of the last attempt, - * formatted as a string. - * @property {number} [response_code] - The response code returned for the - * delivery attempt, allowing for custom or non-enumerated values. - * @property {string} [response_time] - The response time for the delivery - * attempt, formatted as a string. - * @property {number} [attempt] - The attempt number for the delivery. - * @property {number} [total] - The total count of deliveries attempted. - */ - -/** - * @typedef DeliverySummaryResult + * @typedef DeliverySummaryResponse * @property {DeliveryEventLevelSchema[]} [delivery_event_level] * @property {DeliverySummarySchema} [delivery_summary] */ /** * @typedef DeliverySummarySchema - * @property {number} [success] - The total count of successful deliveries. - * @property {number} [response_time] - The average response time for deliveries. - * @property {number} [failed_percentage] - The percentage of failed deliveries. - * @property {number} [removed_webhooks] - The count of webhooks removed during delivery. + * @property {number} [success] + * @property {number} [response_time] + * @property {number} [failed_percentage] + * @property {number} [removed_webhooks] */ /** * @typedef ItemSchema - * @property {number} [id] - The unique identifier for the item. - * @property {string} [modified_by] - The user or system that last modified the item. - * @property {string} [name] - The name of the item. - * @property {string} [webhook_url] - The URL of the webhook associated with the item. - * @property {string} [provider] - The provider of the item. + * @property {number} [id] + * @property {string} [modified_by] + * @property {string} [name] + * @property {string} [webhook_url] + * @property {string} [provider] * @property {Association} [association] - * @property {Object} [custom_headers] - Custom headers associated with the item, if any. - * @property {string} [status] - The current status of the item. - * @property {string} [email_id] - The email ID associated with the item, if applicable. - * @property {string} [updated_on] - The date and time when the item was last updated. - * @property {string} [created_on] - The date and time when the item was created. - * @property {string} [type] - The type of the item, if applicable. + * @property {Object} [custom_headers] + * @property {string} [status] + * @property {string} [email_id] + * @property {string} [updated_on] + * @property {string} [created_on] + * @property {string} [type] * @property {AuthMeta} [auth_meta] - * @property {EventConfigDetails[]} [event_configs] - A list of event - * configurations associated with the item. - * @property {number[]} [event_id] - A list of event IDs associated with the item. + * @property {EventConfigResponse[]} [event_configs] + * @property {number[]} [event_id] */ class WebhookPartnerModel { - /** @returns {SubscriberUpdate} */ - static SubscriberUpdate() { + /** @returns {UpdateSubscriberRequest} */ + static UpdateSubscriberRequest() { return Joi.object({ status: Joi.string().allow(""), }); } - /** @returns {SubscriberUpdateResult} */ - static SubscriberUpdateResult() { + /** @returns {UpdateSubscriberResponse} */ + static UpdateSubscriberResponse() { return Joi.object({ message: Joi.string().allow(""), }); @@ -362,31 +291,19 @@ class WebhookPartnerModel { }); } - /** @returns {BroadcasterConfig} */ - static BroadcasterConfig() { - return Joi.object({ - topic: Joi.string().allow(""), - queue: Joi.string().allow(""), - event_bridge_name: Joi.string().allow(""), - workflow_name: Joi.string().allow(""), - account_id: Joi.string().allow(""), - detail_type: Joi.string().allow(""), - }).allow(null); - } - /** @returns {SubscriberEventMapping} */ static SubscriberEventMapping() { return Joi.object({ id: Joi.number(), event_id: Joi.number(), subscriber_id: Joi.number(), - broadcaster_config: WebhookPartnerModel.BroadcasterConfig(), + topic: Joi.string().allow("").allow(null), created_on: Joi.string().allow(""), }); } - /** @returns {EventConfigDetails} */ - static EventConfigDetails() { + /** @returns {EventConfigResponse} */ + static EventConfigResponse() { return Joi.object({ id: Joi.number(), event_name: Joi.string().allow(""), @@ -403,16 +320,16 @@ class WebhookPartnerModel { }); } - /** @returns {SubscriberConfigDetails} */ - static SubscriberConfigDetails() { + /** @returns {SubscriberConfigResponse} */ + static SubscriberConfigResponse() { return Joi.object({ items: Joi.array().items(WebhookPartnerModel.ItemSchema()), page: WebhookPartnerModel.Page(), }); } - /** @returns {InvalidEventsPayload} */ - static InvalidEventsPayload() { + /** @returns {InvalidEventsRequest} */ + static InvalidEventsRequest() { return Joi.object({ event_name: Joi.string().allow(""), version: Joi.string().allow(""), @@ -422,8 +339,8 @@ class WebhookPartnerModel { }); } - /** @returns {InvalidEventsResult} */ - static InvalidEventsResult() { + /** @returns {InvalidEventsResponse} */ + static InvalidEventsResponse() { return Joi.object({ event_name: Joi.string().allow(""), event_type: Joi.string().allow(""), @@ -491,8 +408,8 @@ class WebhookPartnerModel { }); } - /** @returns {HistoryResult} */ - static HistoryResult() { + /** @returns {HistoryResponse} */ + static HistoryResponse() { return Joi.object({ items: Joi.array().items(WebhookPartnerModel.HistoryItems()), page: WebhookPartnerModel.Page(), @@ -509,24 +426,24 @@ class WebhookPartnerModel { }); } - /** @returns {CancelDownloadResult} */ - static CancelDownloadResult() { + /** @returns {CancelDownloadResponse} */ + static CancelDownloadResponse() { return Joi.object({ message: Joi.string().allow(""), result: Joi.string().allow(""), }); } - /** @returns {FilterReportResult} */ - static FilterReportResult() { + /** @returns {FilterReportResponse} */ + static FilterReportResponse() { return Joi.object({ filter_name: Joi.string().allow(""), values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), }); } - /** @returns {DeliveryTsResult} */ - static DeliveryTsResult() { + /** @returns {DeliveryTsResponse} */ + static DeliveryTsResponse() { return Joi.object({ delivery_ts: Joi.array().items(WebhookPartnerModel.DeliveryTsSchema()), }); @@ -542,8 +459,8 @@ class WebhookPartnerModel { }); } - /** @returns {DeliveryDetailsPayload} */ - static DeliveryDetailsPayload() { + /** @returns {DeliveryDetailsRequest} */ + static DeliveryDetailsRequest() { return Joi.object({ company_id: Joi.string().allow(""), page_no: Joi.number(), @@ -565,8 +482,8 @@ class WebhookPartnerModel { }); } - /** @returns {DeliveryDetailsResult} */ - static DeliveryDetailsResult() { + /** @returns {DeliveryDetailsResponse} */ + static DeliveryDetailsResponse() { return Joi.object({ rows: Joi.array().items(WebhookPartnerModel.EventProcessReportObject()), page: WebhookPartnerModel.Page(), @@ -617,28 +534,8 @@ class WebhookPartnerModel { }); } - /** @returns {ResponseTimeTs} */ - static ResponseTimeTs() { - return Joi.object({ - avg_response_time_ts: Joi.array().items( - WebhookPartnerModel.AvgResponseTime() - ), - }); - } - - /** @returns {AvgResponseTime} */ - static AvgResponseTime() { - return Joi.object({ - last_attempted_on: Joi.string().allow(""), - response_code: Joi.number(), - response_time: Joi.string().allow(""), - attempt: Joi.number(), - total: Joi.number(), - }); - } - - /** @returns {DeliverySummaryResult} */ - static DeliverySummaryResult() { + /** @returns {DeliverySummaryResponse} */ + static DeliverySummaryResponse() { return Joi.object({ delivery_event_level: Joi.array().items( WebhookPartnerModel.DeliveryEventLevelSchema() @@ -666,7 +563,7 @@ class WebhookPartnerModel { webhook_url: Joi.string().allow(""), provider: Joi.string().allow(""), association: WebhookPartnerModel.Association(), - custom_headers: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + custom_headers: Joi.any(), status: Joi.string().allow(""), email_id: Joi.string().allow(""), updated_on: Joi.string().allow(""), @@ -674,7 +571,7 @@ class WebhookPartnerModel { type: Joi.string().allow("").allow(null), auth_meta: WebhookPartnerModel.AuthMeta(), event_configs: Joi.array().items( - WebhookPartnerModel.EventConfigDetails() + WebhookPartnerModel.EventConfigResponse() ), event_id: Joi.array().items(Joi.number()), }); diff --git a/sdk/partner/Webhook/WebhookPartnerValidator.d.ts b/sdk/partner/Webhook/WebhookPartnerValidator.d.ts index f9067939c..df035c22d 100644 --- a/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +++ b/sdk/partner/Webhook/WebhookPartnerValidator.d.ts @@ -1,6 +1,5 @@ export = WebhookValidator; declare class WebhookValidator { - static responseTimeSummary(): any; static fetchDeliverySummary(): any; static getDeliveryDetailInsights(): any; static fetchDeliveryTs(): any; diff --git a/sdk/partner/Webhook/WebhookPartnerValidator.js b/sdk/partner/Webhook/WebhookPartnerValidator.js index b137d6991..70aba7ba0 100644 --- a/sdk/partner/Webhook/WebhookPartnerValidator.js +++ b/sdk/partner/Webhook/WebhookPartnerValidator.js @@ -2,14 +2,6 @@ const Joi = require("joi"); const WebhookModel = require("./WebhookPartnerModel"); class WebhookValidator { - static responseTimeSummary() { - return Joi.object({ - extensionId: Joi.string().allow("").required(), - startDate: Joi.string().allow("").required(), - endDate: Joi.string().allow("").required(), - }).required(); - } - static fetchDeliverySummary() { return Joi.object({ extensionId: Joi.string().allow("").required(), @@ -21,7 +13,7 @@ class WebhookValidator { static getDeliveryDetailInsights() { return Joi.object({ extensionId: Joi.string().allow("").required(), - body: WebhookModel.DeliveryDetailsPayload().required(), + body: WebhookModel.DeliveryDetailsRequest().required(), }).required(); } @@ -60,7 +52,7 @@ class WebhookValidator { static getInvalidEventList() { return Joi.object({ extensionId: Joi.string().allow("").required(), - body: WebhookModel.InvalidEventsPayload().required(), + body: WebhookModel.InvalidEventsRequest().required(), }).required(); } @@ -74,7 +66,7 @@ class WebhookValidator { return Joi.object({ extensionId: Joi.string().allow("").required(), subscriberId: Joi.number().required(), - body: WebhookModel.SubscriberUpdate().required(), + body: WebhookModel.UpdateSubscriberRequest().required(), }).required(); } } diff --git a/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts b/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts index dbfa2b8bd..516d7c968 100644 --- a/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +++ b/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts @@ -9,24 +9,24 @@ declare class Analytics { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name checkJobStatusByNameV2 * @summary: Checks download job status * @description: Takes job name in path param to check the status of job Returns file URL if downloading is done else returns status of job - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/analytics/checkJobStatusByNameV2/). */ - checkJobStatusByNameV2({ fileName, requestHeaders }?: AnalyticsPlatformApplicationValidator.CheckJobStatusByNameV2Param, { responseHeaders }?: object): Promise; + checkJobStatusByNameV2({ fileName, requestHeaders }?: AnalyticsPlatformApplicationValidator.CheckJobStatusByNameV2Param, { responseHeaders }?: object): Promise; /** * @param {AnalyticsPlatformApplicationValidator.ExecuteJobForProvidedParametersV2Param} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name executeJobForProvidedParametersV2 * @summary: Executes given sql(Base64 Encoded) query * @description: Query click events data - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/analytics/executeJobForProvidedParametersV2/). */ - executeJobForProvidedParametersV2({ body, requestHeaders }?: AnalyticsPlatformApplicationValidator.ExecuteJobForProvidedParametersV2Param, { responseHeaders }?: object): Promise; + executeJobForProvidedParametersV2({ body, requestHeaders }?: AnalyticsPlatformApplicationValidator.ExecuteJobForProvidedParametersV2Param, { responseHeaders }?: object): Promise; /** * @param {AnalyticsPlatformApplicationValidator.StartDownloadForQueryV2Param} arg * - Arg object @@ -41,4 +41,3 @@ declare class Analytics { startDownloadForQueryV2({ exportType, body, requestHeaders }?: AnalyticsPlatformApplicationValidator.StartDownloadForQueryV2Param, { responseHeaders }?: object): Promise; } import AnalyticsPlatformApplicationValidator = require("./AnalyticsPlatformApplicationValidator"); -import AnalyticsPlatformModel = require("./AnalyticsPlatformModel"); diff --git a/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js b/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js index cabe3c282..5f170e723 100644 --- a/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +++ b/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js @@ -21,7 +21,7 @@ class Analytics { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name checkJobStatusByNameV2 * @summary: Checks download job status * @description: Takes job name in path param to check the status of job Returns file URL if downloading is done else returns status of job - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/analytics/checkJobStatusByNameV2/). @@ -75,12 +75,9 @@ class Analytics { responseData = response[0]; } - const { - error: res_error, - } = AnalyticsPlatformModel.JobStatus().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + const { error: res_error } = Joi.object() + .pattern(/\S/, Joi.any()) + .validate(responseData, { abortEarly: false, allowUnknown: true }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -102,7 +99,7 @@ class Analytics { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name executeJobForProvidedParametersV2 * @summary: Executes given sql(Base64 Encoded) query * @description: Query click events data - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/analytics/executeJobForProvidedParametersV2/). @@ -156,12 +153,9 @@ class Analytics { responseData = response[0]; } - const { - error: res_error, - } = AnalyticsPlatformModel.JobExecutionResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + const { error: res_error } = Joi.object() + .pattern(/\S/, Joi.any()) + .validate(responseData, { abortEarly: false, allowUnknown: true }); if (res_error) { if (this.config.options.strictResponseCheck === true) { diff --git a/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts b/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts index 76eb62216..feb98ce9c 100644 --- a/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +++ b/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts @@ -11,34 +11,19 @@ export = AnalyticsPlatformModel; */ /** * @typedef FileDownloadRequestBody - * @property {string} query - Base64 encoded SQL query to execute on ClickHouse. - * @property {boolean} [split_files] - Flag indicating whether to split the - * files for larger datasets. + * @property {string} query - Base64 encoded query to execute on clickhouse. + * @property {boolean} [split_files] - Flag to indicate whether to split files + * for larger data. */ /** * @typedef JobExecute - * @property {string} query - Base64 encoded SQL query to execute on ClickHouse. + * @property {string} query - Base64 encoded query to execute on clickhouse. * @property {Page} [page] */ -/** - * @typedef JobExecutionResult - * @property {Object[]} [rows] - Array of rows resulting from the job execution. - * @property {Page} [page] - */ -/** - * @typedef JobStatus - * @property {string} [start_date] - The start date and time of the job. - * @property {string} [end_date] - The end date and time of the job. - * @property {string} [status] - The current status of the job. - * @property {string} [message] - Message providing additional details about the - * job status. - * @property {Object[]} [file_metadata] - Metadata about files associated with - * the job, if any. - */ declare class AnalyticsPlatformModel { } declare namespace AnalyticsPlatformModel { - export { Page, FileDownloadRequestBody, JobExecute, JobExecutionResult, JobStatus }; + export { Page, FileDownloadRequestBody, JobExecute }; } /** @returns {Page} */ declare function Page(): Page; @@ -76,12 +61,12 @@ type Page = { declare function FileDownloadRequestBody(): FileDownloadRequestBody; type FileDownloadRequestBody = { /** - * - Base64 encoded SQL query to execute on ClickHouse. + * - Base64 encoded query to execute on clickhouse. */ query: string; /** - * - Flag indicating whether to split the - * files for larger datasets. + * - Flag to indicate whether to split files + * for larger data. */ split_files?: boolean; }; @@ -89,43 +74,8 @@ type FileDownloadRequestBody = { declare function JobExecute(): JobExecute; type JobExecute = { /** - * - Base64 encoded SQL query to execute on ClickHouse. + * - Base64 encoded query to execute on clickhouse. */ query: string; page?: Page; }; -/** @returns {JobExecutionResult} */ -declare function JobExecutionResult(): JobExecutionResult; -type JobExecutionResult = { - /** - * - Array of rows resulting from the job execution. - */ - rows?: any[]; - page?: Page; -}; -/** @returns {JobStatus} */ -declare function JobStatus(): JobStatus; -type JobStatus = { - /** - * - The start date and time of the job. - */ - start_date?: string; - /** - * - The end date and time of the job. - */ - end_date?: string; - /** - * - The current status of the job. - */ - status?: string; - /** - * - Message providing additional details about the - * job status. - */ - message?: string; - /** - * - Metadata about files associated with - * the job, if any. - */ - file_metadata?: any[]; -}; diff --git a/sdk/platform/Analytics/AnalyticsPlatformModel.js b/sdk/platform/Analytics/AnalyticsPlatformModel.js index 3f19d138b..6c0844c48 100644 --- a/sdk/platform/Analytics/AnalyticsPlatformModel.js +++ b/sdk/platform/Analytics/AnalyticsPlatformModel.js @@ -13,34 +13,17 @@ const Joi = require("joi"); /** * @typedef FileDownloadRequestBody - * @property {string} query - Base64 encoded SQL query to execute on ClickHouse. - * @property {boolean} [split_files] - Flag indicating whether to split the - * files for larger datasets. + * @property {string} query - Base64 encoded query to execute on clickhouse. + * @property {boolean} [split_files] - Flag to indicate whether to split files + * for larger data. */ /** * @typedef JobExecute - * @property {string} query - Base64 encoded SQL query to execute on ClickHouse. + * @property {string} query - Base64 encoded query to execute on clickhouse. * @property {Page} [page] */ -/** - * @typedef JobExecutionResult - * @property {Object[]} [rows] - Array of rows resulting from the job execution. - * @property {Page} [page] - */ - -/** - * @typedef JobStatus - * @property {string} [start_date] - The start date and time of the job. - * @property {string} [end_date] - The end date and time of the job. - * @property {string} [status] - The current status of the job. - * @property {string} [message] - Message providing additional details about the - * job status. - * @property {Object[]} [file_metadata] - Metadata about files associated with - * the job, if any. - */ - class AnalyticsPlatformModel { /** @returns {Page} */ static Page() { @@ -70,24 +53,5 @@ class AnalyticsPlatformModel { page: AnalyticsPlatformModel.Page(), }); } - - /** @returns {JobExecutionResult} */ - static JobExecutionResult() { - return Joi.object({ - rows: Joi.array().items(Joi.any()), - page: AnalyticsPlatformModel.Page(), - }); - } - - /** @returns {JobStatus} */ - static JobStatus() { - return Joi.object({ - start_date: Joi.string().allow(""), - end_date: Joi.string().allow(""), - status: Joi.string().allow(""), - message: Joi.string().allow(""), - file_metadata: Joi.array().items(Joi.any()).allow(null, ""), - }); - } } module.exports = AnalyticsPlatformModel; diff --git a/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts b/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts index 0ad11b4d0..328745bbb 100644 --- a/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +++ b/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts @@ -6,12 +6,42 @@ declare class AuditTrail { * @param {AuditTrailPlatformValidator.CreateAuditLogParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createAuditLog * @summary: Create an audit log * @description: Generate and record an audit log entry for a specific event or action. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/createAuditLog/). */ - createAuditLog({ body, requestHeaders }?: AuditTrailPlatformValidator.CreateAuditLogParam, { responseHeaders }?: object): Promise; + createAuditLog({ body, requestHeaders }?: AuditTrailPlatformValidator.CreateAuditLogParam, { responseHeaders }?: object): Promise; + /** + * @param {AuditTrailPlatformValidator.GetAuditLogParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAuditLog + * @summary: Get an audit log + * @description: Retrieve a specific audit log entry. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLog/). + */ + getAuditLog({ id, requestHeaders }?: AuditTrailPlatformValidator.GetAuditLogParam, { responseHeaders }?: object): Promise; + /** + * @param {AuditTrailPlatformValidator.GetAuditLogsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAuditLogs + * @summary: Get audit logs + * @description: Retrieve audit logs for system events and actions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLogs/). + */ + getAuditLogs({ qs, limit, sort, requestHeaders }?: AuditTrailPlatformValidator.GetAuditLogsParam, { responseHeaders }?: object): Promise; + /** + * @param {AuditTrailPlatformValidator.GetEntityTypesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getEntityTypes + * @summary: List entity types + * @description: List of entity types that can be audited within the platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getEntityTypes/). + */ + getEntityTypes({ requestHeaders }?: any, { responseHeaders }?: object): Promise; } import AuditTrailPlatformValidator = require("./AuditTrailPlatformValidator"); import AuditTrailPlatformModel = require("./AuditTrailPlatformModel"); diff --git a/sdk/platform/AuditTrail/AuditTrailPlatformClient.js b/sdk/platform/AuditTrail/AuditTrailPlatformClient.js index 4fc90dcf6..6eea21c1c 100644 --- a/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +++ b/sdk/platform/AuditTrail/AuditTrailPlatformClient.js @@ -18,7 +18,7 @@ class AuditTrail { * @param {AuditTrailPlatformValidator.CreateAuditLogParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createAuditLog * @summary: Create an audit log * @description: Generate and record an audit log entry for a specific event or action. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/createAuditLog/). @@ -60,7 +60,7 @@ class AuditTrail { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/webhook/v1.0/company/${this.config.companyId}/audit/logs/create`, + `/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -74,7 +74,7 @@ class AuditTrail { const { error: res_error, - } = AuditTrailPlatformModel.CreateLogResp().validate(responseData, { + } = AuditTrailPlatformModel.CreateLogResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -92,6 +92,246 @@ class AuditTrail { return response; } + + /** + * @param {AuditTrailPlatformValidator.GetAuditLogParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAuditLog + * @summary: Get an audit log + * @description: Retrieve a specific audit log entry. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLog/). + */ + async getAuditLog( + { id, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = AuditTrailPlatformValidator.getAuditLog().validate( + { + id, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = AuditTrailPlatformValidator.getAuditLog().validate( + { + id, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > AuditTrail > getAuditLog \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs/${id}`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = AuditTrailPlatformModel.LogSchemaResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > AuditTrail > getAuditLog \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {AuditTrailPlatformValidator.GetAuditLogsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAuditLogs + * @summary: Get audit logs + * @description: Retrieve audit logs for system events and actions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getAuditLogs/). + */ + async getAuditLogs( + { qs, limit, sort, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = AuditTrailPlatformValidator.getAuditLogs().validate( + { + qs, + limit, + sort, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = AuditTrailPlatformValidator.getAuditLogs().validate( + { + qs, + limit, + sort, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > AuditTrail > getAuditLogs \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["qs"] = qs; + query_params["limit"] = limit; + query_params["sort"] = sort; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = AuditTrailPlatformModel.LogSchemaResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > AuditTrail > getAuditLogs \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {AuditTrailPlatformValidator.GetEntityTypesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getEntityTypes + * @summary: List entity types + * @description: List of entity types that can be audited within the platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/audittrail/getEntityTypes/). + */ + async getEntityTypes( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = AuditTrailPlatformValidator.getEntityTypes().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = AuditTrailPlatformValidator.getEntityTypes().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > AuditTrail > getEntityTypes \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/audit-trail/v1.0/company/${this.config.companyId}/entity-types`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = AuditTrailPlatformModel.EntityTypesResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > AuditTrail > getEntityTypes \n ${res_error}`, + }); + } + } + + return response; + } } module.exports = AuditTrail; diff --git a/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts b/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts index dcbfcb3f3..1e8ffcd09 100644 --- a/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +++ b/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts @@ -5,7 +5,7 @@ export = AuditTrailPlatformModel; * @property {Object} log_payload */ /** - * @typedef CreateLogResp + * @typedef CreateLogResponse * @property {string} [message] * @property {string} [internal_message] */ @@ -16,7 +16,6 @@ export = AuditTrailPlatformModel; * @property {EntityObject} [entity] * @property {Object} [device_info] * @property {Object} [location] - * @property {string} [sessions] */ /** * @typedef EntityObject @@ -25,13 +24,66 @@ export = AuditTrailPlatformModel; * @property {string} [action] */ /** - * @typedef BadRequestSchema + * @typedef LogSchemaResponse + * @property {LogDocs[]} [docs] + */ +/** + * @typedef LogDocs + * @property {EntityObj} [entity] + * @property {Modifier} [modifier] + * @property {DeviceInfo} [device_info] + * @property {Location} [location] + * @property {string} [_id] + * @property {string} [company] + * @property {string} [application] + * @property {string} [sessions] + * @property {string} [date] + * @property {Object} [logs] + */ +/** + * @typedef EntityObj + * @property {string} [id] + * @property {string} [type] + * @property {string} [action] + * @property {Object} [entity_details] + */ +/** + * @typedef Modifier + * @property {string} [user_id] + * @property {boolean} [as_administrator] + * @property {Object} [user_details] + */ +/** + * @typedef DeviceInfo + * @property {string} [user_agent] + * @property {Object} [extra_meta] + */ +/** + * @typedef Location + * @property {Object} [extra_meta] + */ +/** + * @typedef BadRequest * @property {string} [message] - Failure message. */ +/** + * @typedef InternalServerError + * @property {string} [message] - Internal server Server error + * @property {string} [code] - Error code + */ +/** + * @typedef EntityTypesResponse + * @property {EntityTypeObj[]} [items] + */ +/** + * @typedef EntityTypeObj + * @property {string} [entity_value] + * @property {string} [display_name] + */ declare class AuditTrailPlatformModel { } declare namespace AuditTrailPlatformModel { - export { RequestBodyAuditLog, CreateLogResp, LogMetaObj, EntityObject, BadRequestSchema }; + export { RequestBodyAuditLog, CreateLogResponse, LogMetaObj, EntityObject, LogSchemaResponse, LogDocs, EntityObj, Modifier, DeviceInfo, Location, BadRequest, InternalServerError, EntityTypesResponse, EntityTypeObj }; } /** @returns {RequestBodyAuditLog} */ declare function RequestBodyAuditLog(): RequestBodyAuditLog; @@ -39,9 +91,9 @@ type RequestBodyAuditLog = { log_meta: LogMetaObj; log_payload: any; }; -/** @returns {CreateLogResp} */ -declare function CreateLogResp(): CreateLogResp; -type CreateLogResp = { +/** @returns {CreateLogResponse} */ +declare function CreateLogResponse(): CreateLogResponse; +type CreateLogResponse = { message?: string; internal_message?: string; }; @@ -53,7 +105,6 @@ type LogMetaObj = { entity?: EntityObject; device_info?: any; location?: any; - sessions?: string; }; /** @returns {EntityObject} */ declare function EntityObject(): EntityObject; @@ -62,11 +113,79 @@ type EntityObject = { type?: string; action?: string; }; -/** @returns {BadRequestSchema} */ -declare function BadRequestSchema(): BadRequestSchema; -type BadRequestSchema = { +/** @returns {LogSchemaResponse} */ +declare function LogSchemaResponse(): LogSchemaResponse; +type LogSchemaResponse = { + docs?: LogDocs[]; +}; +/** @returns {LogDocs} */ +declare function LogDocs(): LogDocs; +type LogDocs = { + entity?: EntityObj; + modifier?: Modifier; + device_info?: DeviceInfo; + location?: Location; + _id?: string; + company?: string; + application?: string; + sessions?: string; + date?: string; + logs?: any; +}; +/** @returns {EntityObj} */ +declare function EntityObj(): EntityObj; +type EntityObj = { + id?: string; + type?: string; + action?: string; + entity_details?: any; +}; +/** @returns {Modifier} */ +declare function Modifier(): Modifier; +type Modifier = { + user_id?: string; + as_administrator?: boolean; + user_details?: any; +}; +/** @returns {DeviceInfo} */ +declare function DeviceInfo(): DeviceInfo; +type DeviceInfo = { + user_agent?: string; + extra_meta?: any; +}; +/** @returns {Location} */ +declare function Location(): Location; +type Location = { + extra_meta?: any; +}; +/** @returns {BadRequest} */ +declare function BadRequest(): BadRequest; +type BadRequest = { /** * - Failure message. */ message?: string; }; +/** @returns {InternalServerError} */ +declare function InternalServerError(): InternalServerError; +type InternalServerError = { + /** + * - Internal server Server error + */ + message?: string; + /** + * - Error code + */ + code?: string; +}; +/** @returns {EntityTypesResponse} */ +declare function EntityTypesResponse(): EntityTypesResponse; +type EntityTypesResponse = { + items?: EntityTypeObj[]; +}; +/** @returns {EntityTypeObj} */ +declare function EntityTypeObj(): EntityTypeObj; +type EntityTypeObj = { + entity_value?: string; + display_name?: string; +}; diff --git a/sdk/platform/AuditTrail/AuditTrailPlatformModel.js b/sdk/platform/AuditTrail/AuditTrailPlatformModel.js index 950c51c60..f2119b62a 100644 --- a/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +++ b/sdk/platform/AuditTrail/AuditTrailPlatformModel.js @@ -7,7 +7,7 @@ const Joi = require("joi"); */ /** - * @typedef CreateLogResp + * @typedef CreateLogResponse * @property {string} [message] * @property {string} [internal_message] */ @@ -19,7 +19,6 @@ const Joi = require("joi"); * @property {EntityObject} [entity] * @property {Object} [device_info] * @property {Object} [location] - * @property {string} [sessions] */ /** @@ -30,21 +29,83 @@ const Joi = require("joi"); */ /** - * @typedef BadRequestSchema + * @typedef LogSchemaResponse + * @property {LogDocs[]} [docs] + */ + +/** + * @typedef LogDocs + * @property {EntityObj} [entity] + * @property {Modifier} [modifier] + * @property {DeviceInfo} [device_info] + * @property {Location} [location] + * @property {string} [_id] + * @property {string} [company] + * @property {string} [application] + * @property {string} [sessions] + * @property {string} [date] + * @property {Object} [logs] + */ + +/** + * @typedef EntityObj + * @property {string} [id] + * @property {string} [type] + * @property {string} [action] + * @property {Object} [entity_details] + */ + +/** + * @typedef Modifier + * @property {string} [user_id] + * @property {boolean} [as_administrator] + * @property {Object} [user_details] + */ + +/** + * @typedef DeviceInfo + * @property {string} [user_agent] + * @property {Object} [extra_meta] + */ + +/** + * @typedef Location + * @property {Object} [extra_meta] + */ + +/** + * @typedef BadRequest * @property {string} [message] - Failure message. */ +/** + * @typedef InternalServerError + * @property {string} [message] - Internal server Server error + * @property {string} [code] - Error code + */ + +/** + * @typedef EntityTypesResponse + * @property {EntityTypeObj[]} [items] + */ + +/** + * @typedef EntityTypeObj + * @property {string} [entity_value] + * @property {string} [display_name] + */ + class AuditTrailPlatformModel { /** @returns {RequestBodyAuditLog} */ static RequestBodyAuditLog() { return Joi.object({ log_meta: AuditTrailPlatformModel.LogMetaObj().required(), - log_payload: Joi.object().pattern(/\S/, Joi.any()).required(), + log_payload: Joi.any().required(), }); } - /** @returns {CreateLogResp} */ - static CreateLogResp() { + /** @returns {CreateLogResponse} */ + static CreateLogResponse() { return Joi.object({ message: Joi.string().allow(""), internal_message: Joi.string().allow(""), @@ -54,12 +115,11 @@ class AuditTrailPlatformModel { /** @returns {LogMetaObj} */ static LogMetaObj() { return Joi.object({ - modifier: Joi.object().pattern(/\S/, Joi.any()), + modifier: Joi.any(), application: Joi.string().allow(""), entity: AuditTrailPlatformModel.EntityObject(), - device_info: Joi.object().pattern(/\S/, Joi.any()), - location: Joi.object().pattern(/\S/, Joi.any()), - sessions: Joi.string().allow(""), + device_info: Joi.any(), + location: Joi.any(), }); } @@ -72,11 +132,91 @@ class AuditTrailPlatformModel { }); } - /** @returns {BadRequestSchema} */ - static BadRequestSchema() { + /** @returns {LogSchemaResponse} */ + static LogSchemaResponse() { + return Joi.object({ + docs: Joi.array().items(AuditTrailPlatformModel.LogDocs()), + }); + } + + /** @returns {LogDocs} */ + static LogDocs() { + return Joi.object({ + entity: AuditTrailPlatformModel.EntityObj(), + modifier: AuditTrailPlatformModel.Modifier(), + device_info: AuditTrailPlatformModel.DeviceInfo(), + location: AuditTrailPlatformModel.Location(), + _id: Joi.string().allow(""), + company: Joi.string().allow(""), + application: Joi.string().allow(""), + sessions: Joi.string().allow(""), + date: Joi.string().allow(""), + logs: Joi.any(), + }); + } + + /** @returns {EntityObj} */ + static EntityObj() { + return Joi.object({ + id: Joi.string().allow(""), + type: Joi.string().allow(""), + action: Joi.string().allow(""), + entity_details: Joi.any(), + }); + } + + /** @returns {Modifier} */ + static Modifier() { + return Joi.object({ + user_id: Joi.string().allow(""), + as_administrator: Joi.boolean(), + user_details: Joi.any(), + }); + } + + /** @returns {DeviceInfo} */ + static DeviceInfo() { + return Joi.object({ + user_agent: Joi.string().allow(""), + extra_meta: Joi.any(), + }); + } + + /** @returns {Location} */ + static Location() { + return Joi.object({ + extra_meta: Joi.any(), + }); + } + + /** @returns {BadRequest} */ + static BadRequest() { return Joi.object({ message: Joi.string().allow(""), }); } + + /** @returns {InternalServerError} */ + static InternalServerError() { + return Joi.object({ + message: Joi.string().allow(""), + code: Joi.string().allow(""), + }); + } + + /** @returns {EntityTypesResponse} */ + static EntityTypesResponse() { + return Joi.object({ + items: Joi.array().items(AuditTrailPlatformModel.EntityTypeObj()), + }); + } + + /** @returns {EntityTypeObj} */ + static EntityTypeObj() { + return Joi.object({ + entity_value: Joi.string().allow(""), + display_name: Joi.string().allow(""), + }); + } } module.exports = AuditTrailPlatformModel; diff --git a/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts b/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts index 7ffca0670..2ed67c5d8 100644 --- a/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +++ b/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts @@ -3,14 +3,52 @@ export = AuditTrailPlatformValidator; * @typedef CreateAuditLogParam * @property {AuditTrailPlatformModel.RequestBodyAuditLog} body */ +/** + * @typedef GetAuditLogParam + * @property {string} id - Log uuid + */ +/** + * @typedef GetAuditLogsParam + * @property {string} qs - Logs Query + * @property {number} [limit] - Current request items count + * @property {Object} [sort] - To sort based on _id + */ +/** @typedef GetEntityTypesParam */ declare class AuditTrailPlatformValidator { /** @returns {CreateAuditLogParam} */ static createAuditLog(): CreateAuditLogParam; + /** @returns {GetAuditLogParam} */ + static getAuditLog(): GetAuditLogParam; + /** @returns {GetAuditLogsParam} */ + static getAuditLogs(): GetAuditLogsParam; + /** @returns {GetEntityTypesParam} */ + static getEntityTypes(): any; } declare namespace AuditTrailPlatformValidator { - export { CreateAuditLogParam }; + export { CreateAuditLogParam, GetAuditLogParam, GetAuditLogsParam, GetEntityTypesParam }; } type CreateAuditLogParam = { body: AuditTrailPlatformModel.RequestBodyAuditLog; }; +type GetAuditLogParam = { + /** + * - Log uuid + */ + id: string; +}; +type GetAuditLogsParam = { + /** + * - Logs Query + */ + qs: string; + /** + * - Current request items count + */ + limit?: number; + /** + * - To sort based on _id + */ + sort?: any; +}; +type GetEntityTypesParam = any; import AuditTrailPlatformModel = require("./AuditTrailPlatformModel"); diff --git a/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js b/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js index 7aff55699..7438e854a 100644 --- a/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +++ b/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js @@ -7,6 +7,20 @@ const AuditTrailPlatformModel = require("./AuditTrailPlatformModel"); * @property {AuditTrailPlatformModel.RequestBodyAuditLog} body */ +/** + * @typedef GetAuditLogParam + * @property {string} id - Log uuid + */ + +/** + * @typedef GetAuditLogsParam + * @property {string} qs - Logs Query + * @property {number} [limit] - Current request items count + * @property {Object} [sort] - To sort based on _id + */ + +/** @typedef GetEntityTypesParam */ + class AuditTrailPlatformValidator { /** @returns {CreateAuditLogParam} */ static createAuditLog() { @@ -14,6 +28,27 @@ class AuditTrailPlatformValidator { body: AuditTrailPlatformModel.RequestBodyAuditLog().required(), }).required(); } + + /** @returns {GetAuditLogParam} */ + static getAuditLog() { + return Joi.object({ + id: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetAuditLogsParam} */ + static getAuditLogs() { + return Joi.object({ + qs: Joi.string().allow("").required(), + limit: Joi.number(), + sort: Joi.any(), + }).required(); + } + + /** @returns {GetEntityTypesParam} */ + static getEntityTypes() { + return Joi.object({}).required(); + } } module.exports = AuditTrailPlatformValidator; diff --git a/sdk/platform/Billing/BillingPlatformClient.d.ts b/sdk/platform/Billing/BillingPlatformClient.d.ts index d253f6bd9..b1f6f233d 100644 --- a/sdk/platform/Billing/BillingPlatformClient.d.ts +++ b/sdk/platform/Billing/BillingPlatformClient.d.ts @@ -8,39 +8,39 @@ declare class Billing { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name cancelSubscriptionCharge - * @summary: Cancel the extension subscription - * @description: Cancel an ongoing extension subscription for the company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/cancelSubscriptionCharge/). + * @summary: Cancel a subscription charge. + * @description: Cancel an ongoing subscription charge for a customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/cancelSubscriptionCharge/). */ cancelSubscriptionCharge({ extensionId, subscriptionId, requestHeaders }?: BillingPlatformValidator.CancelSubscriptionChargeParam, { responseHeaders }?: object): Promise; /** * @param {BillingPlatformValidator.CreateOneTimeChargeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createOneTimeCharge - * @summary: Generate a one-time charge + * @summary: Generate a one-time charge. * @description: Generate a one-time charge for specific services or products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/createOneTimeCharge/). */ - createOneTimeCharge({ extensionId, body, requestHeaders }?: BillingPlatformValidator.CreateOneTimeChargeParam, { responseHeaders }?: object): Promise; + createOneTimeCharge({ extensionId, body, requestHeaders }?: BillingPlatformValidator.CreateOneTimeChargeParam, { responseHeaders }?: object): Promise; /** * @param {BillingPlatformValidator.CreateSubscriptionChargeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name createSubscriptionCharge * @summary: Initiate subscription billing - * @description: Initiates and registers a subscription charge for a specific extension for a given company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/createSubscriptionCharge/). + * @description: Register a subscription charge for a seller using your extension. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/createSubscriptionCharge/). */ - createSubscriptionCharge({ extensionId, body, requestHeaders }?: BillingPlatformValidator.CreateSubscriptionChargeParam, { responseHeaders }?: object): Promise; + createSubscriptionCharge({ extensionId, body, requestHeaders }?: BillingPlatformValidator.CreateSubscriptionChargeParam, { responseHeaders }?: object): Promise; /** * @param {BillingPlatformValidator.GetChargeDetailsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name getChargeDetails - * @summary: Obtain charge details + * @summary: Obtain charge details. * @description: Retrieve comprehensive details about a specific billing charge. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getChargeDetails/). */ getChargeDetails({ extensionId, chargeId, requestHeaders }?: BillingPlatformValidator.GetChargeDetailsParam, { responseHeaders }?: object): Promise; @@ -50,7 +50,7 @@ declare class Billing { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name getSubscriptionCharge - * @summary: Retrieve subscription charge details + * @summary: Retrieve subscription charge details. * @description: Retrieve detailed information about subscription charges using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getSubscriptionCharge/). */ getSubscriptionCharge({ extensionId, subscriptionId, requestHeaders }?: BillingPlatformValidator.GetSubscriptionChargeParam, { responseHeaders }?: object): Promise; diff --git a/sdk/platform/Billing/BillingPlatformClient.js b/sdk/platform/Billing/BillingPlatformClient.js index f04ae304b..b8eba5051 100644 --- a/sdk/platform/Billing/BillingPlatformClient.js +++ b/sdk/platform/Billing/BillingPlatformClient.js @@ -20,8 +20,8 @@ class Billing { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name cancelSubscriptionCharge - * @summary: Cancel the extension subscription - * @description: Cancel an ongoing extension subscription for the company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/cancelSubscriptionCharge/). + * @summary: Cancel a subscription charge. + * @description: Cancel an ongoing subscription charge for a customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/cancelSubscriptionCharge/). */ async cancelSubscriptionCharge( { extensionId, subscriptionId, requestHeaders } = { requestHeaders: {} }, @@ -101,11 +101,10 @@ class Billing { * @param {BillingPlatformValidator.CreateOneTimeChargeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createOneTimeCharge - * @summary: Generate a one-time charge + * @summary: Generate a one-time charge. * @description: Generate a one-time charge for specific services or products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/createOneTimeCharge/). */ async createOneTimeCharge( @@ -161,7 +160,7 @@ class Billing { const { error: res_error, - } = BillingPlatformModel.CreateOneTimeChargeResponseSchemas().validate( + } = BillingPlatformModel.CreateOneTimeChargeResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -184,10 +183,11 @@ class Billing { * @param {BillingPlatformValidator.CreateSubscriptionChargeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name createSubscriptionCharge * @summary: Initiate subscription billing - * @description: Initiates and registers a subscription charge for a specific extension for a given company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/createSubscriptionCharge/). + * @description: Register a subscription charge for a seller using your extension. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/createSubscriptionCharge/). */ async createSubscriptionCharge( { extensionId, body, requestHeaders } = { requestHeaders: {} }, @@ -244,10 +244,10 @@ class Billing { const { error: res_error, - } = BillingPlatformModel.CreateSubscription().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = BillingPlatformModel.CreateSubscriptionResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -269,7 +269,7 @@ class Billing { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name getChargeDetails - * @summary: Obtain charge details + * @summary: Obtain charge details. * @description: Retrieve comprehensive details about a specific billing charge. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getChargeDetails/). */ async getChargeDetails( @@ -350,7 +350,7 @@ class Billing { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name getSubscriptionCharge - * @summary: Retrieve subscription charge details + * @summary: Retrieve subscription charge details. * @description: Retrieve detailed information about subscription charges using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getSubscriptionCharge/). */ async getSubscriptionCharge( diff --git a/sdk/platform/Billing/BillingPlatformModel.d.ts b/sdk/platform/Billing/BillingPlatformModel.d.ts index 6f019f8a3..29a2e11ad 100644 --- a/sdk/platform/Billing/BillingPlatformModel.d.ts +++ b/sdk/platform/Billing/BillingPlatformModel.d.ts @@ -2,44 +2,109 @@ export = BillingPlatformModel; /** * @typedef SubscriptionChargeRes * @property {string} [_id] - Unique identifier for the subscription charge - * @property {string} [product_suit_id] - A unique identifier for a product - * suite, which represents a specific collection or group of products within - * the system. - * @property {string} [entity_id] - Unique identifier for the entity (eg. extension) - * @property {string} [entity_type] - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' - * @property {string} [name] - The name of the extension plan - * @property {string} [status] - Current status of the extension subscription - * @property {number} [trial_days] - The number of days allocated for the trial period + * @property {string} [product_suit_id] - ID of the product suit associated with + * the charge + * @property {string} [entity_id] - Unique identifier for the entity + * @property {string} [entity_type] - Type of entity (e.g., subscription, extension) + * @property {string} [name] - Name of the subscription charge + * @property {string} [status] - Current status of the subscription charge + * @property {number} [trial_days] - Number of trial days provided * @property {string} [activated_on] - Date when the charge was activated * @property {string} [cancelled_on] - Date when the charge was cancelled - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. + * @property {boolean} [is_test] - Indicates if the charge is for testing purposes * @property {string} [created_at] - Timestamp when the charge was created * @property {string} [modified_at] - Timestamp when the charge was last modified - * @property {string} [company_id] - The unique identifier of the company. + * @property {string} [company_id] - Company id * @property {Object[]} [line_items] - List of line items associated with the charge */ /** - * @typedef BadRequestSchema - * @property {string} [message] - Failure message. + * @typedef ChargeDetails + * @property {string} [_id] - Unique identifier for the charge. + * @property {string} [entity_type] - The type of entity associated with the + * charge (e.g., 'extension', 'subscription'). + * @property {string} [entity_id] - Unique identifier for the entity associated + * with the charge. + * @property {string} [name] - The name of the charge. + * @property {string} [term] - Description of the charge term. + * @property {string} [charge_type] - The type of charge (e.g., 'standalone', + * 'recurring'). + * @property {string} [pricing_type] - The pricing model for the charge (e.g., + * 'one_time', 'recurring'). + * @property {EntityChargePrice} [price] + * @property {ChargeRecurring} [recurring] + * @property {string} [status] - Current status of the charge. + * @property {number} [capped_amount] - Maximum amount that can be charged, if applicable. + * @property {string} [activated_on] - Date and time when the charge was activated. + * @property {string} [cancelled_on] - Date and time when the charge was cancelled. + * @property {string} [billing_date] - Date and time when the charge was billed. + * @property {SubscriptionTrialPeriod} [current_period] + * @property {string} [modified_at] - Date and time when the charge details were + * last modified. + * @property {string} [created_at] - Date and time when the charge was created. + * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes. + * @property {string} [company_id] - Company id. + * @property {Object} [meta] - Additional metadata associated with the charge. + * @property {number} [__v] - Internal version key for the charge record. */ /** * @typedef ResourceNotFound * @property {string} [message] - Resource not found with {id} - * @property {number} [code] - The HTTP status code associated with the error - * @property {boolean} [success] - Indicates if the request was successful + * @property {Object} [code] + * @property {Object} [success] */ /** - * @typedef SubscriptionTrialPeriod - * @property {string} [start_date] - The start date and time of the trial period. - * @property {string} [end_date] - The end date and time of the trial period. + * @typedef CreateOneTimeCharge + * @property {string} [name] - The name of the one-time charge to be created. + * @property {OneTimeChargeItem} [charge] + * @property {boolean} [is_test] - Indicates whether the charge creation is for + * testing purposes. + * @property {string} [return_url] - URL to which the user will be redirected + * after creating the charge. + */ +/** + * @typedef CreateOneTimeChargeResponse + * @property {Charge} [charge] + * @property {string} [confirm_url] - URL to which users are redirected to + * confirm or complete the payment or subscription process. + */ +/** + * @typedef BadRequest + * @property {string} [message] - Failure message. + */ +/** + * @typedef CreateSubscriptionCharge + * @property {string} name - The name of the charge. + * @property {number} [trial_days] + * @property {ChargeLineItem[]} line_items + * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes. + * @property {string} return_url - The URL passed in request which extension + * expects in return. + */ +/** + * @typedef CreateSubscriptionResponse + * @property {EntitySubscription} [subscription] + * @property {string} [confirm_url] - URL to which users are redirected to + * confirm or complete the payment or subscription process. */ /** * @typedef EntityChargePrice * @property {number} [amount] - The amount for the price. The minimum value is 1. * @property {string} [currency_code] - The currency code for the price */ +/** + * @typedef ChargeRecurring + * @property {string} [interval] + * @property {number} [interval_time] + */ +/** + * @typedef SubscriptionTrialPeriod + * @property {string} [start_date] - The start date and time of the trial period. + * @property {string} [end_date] - The end date and time of the trial period. + */ +/** + * @typedef Charge + * @property {OneTimeChargeEntity} [final_charge] + */ /** * @typedef OneTimeChargeItem * @property {string} [name] - The name of the one-time charge item. @@ -47,143 +112,92 @@ export = BillingPlatformModel; * @property {string} [pricing_type] - The type of pricing for the charge item. * @property {EntityChargePrice} [price] * @property {number} [capped_amount] - The maximum amount that can be charged - * for a particular service or item - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. + * for this item, if applicable. + * @property {boolean} [is_test] - Indicates whether the charge item is for + * testing purposes. * @property {Object} [metadata] - Additional metadata associated with the charge item. */ /** - * @typedef CreateOneTimeCharge - * @property {string} [name] - The name of the one-time charge to be created. - * @property {OneTimeChargeItem} [charge] - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. - * @property {string} [return_url] - URL to which the user will be redirected - * after creating the charge. - */ -/** - * @typedef ChargeRecurring - * @property {string} [interval] - The interval at which the recurring charge is - * applied. Examples include "month", "year", etc. - * @property {number} [interval_time] + * @typedef ChargeLineItem + * @property {string} name - Its name of the extension plan. + * @property {string} term - It indicates how it will be charged. + * @property {string} pricing_type - It indicates the extension subscription + * will be auto renewed timely. + * @property {EntityChargePrice} price + * @property {EntityChargeRecurring} [recurring] + * @property {number} [capped_amount] + * @property {number} [trial_days] + * @property {boolean} [is_test] + * @property {Object} [metadata] */ /** - * @typedef ChargeDetails - * @property {string} [_id] - Unique identifier for the charge. - * @property {string} [entity_type] - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' - * @property {string} [entity_id] - Unique identifier for the entity (eg. extension) - * @property {string} [name] - The name of the extension plan - * @property {string} [term] - Description of the charge term. - * @property {string} [charge_type] - The type of charge (e.g., 'standalone', - * 'recurring'). - * @property {string} [pricing_type] - The pricing model for the charge (e.g., - * 'one_time', 'recurring'). - * @property {EntityChargePrice} [price] - * @property {ChargeRecurring} [recurring] - * @property {string} [status] - Current status of the charge. - * @property {number} [capped_amount] - The maximum amount that can be charged - * for a particular service or item - * @property {string} [activated_on] - Date and time when the charge was activated. - * @property {string} [cancelled_on] - Date and time when the charge was cancelled. - * @property {string} [billing_date] - The date when the billing occurred. This - * field is optional and may be null if the billing date is not specified. - * @property {SubscriptionTrialPeriod} [current_period] - * @property {string} [modified_at] - Date and time when the charge details were - * last modified. - * @property {string} [created_at] - Date and time when the charge was created. - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. - * @property {string} [company_id] - The unique identifier of the company. - * @property {Object} [meta] - Additional metadata associated with the charge. - * @property {number} [__v] - Internal version key for the charge record. + * @typedef EntitySubscription + * @property {string} [_id] - Unique identifier for the subscription charge + * @property {string} [product_suit_id] - ID of the product suit associated with + * the charge + * @property {string} [entity_id] - Unique identifier for the entity + * @property {string} [entity_type] - Type of entity (e.g., subscription, extension) + * @property {string} [name] - Name of the subscription charge + * @property {string} [status] - Current status of the subscription charge + * @property {number} [trial_days] - Number of trial days provided + * @property {boolean} [is_test] - Indicates if the charge is for testing purposes + * @property {string} [created_at] - Timestamp when the charge was created + * @property {string} [modified_at] - Timestamp when the charge was last modified + * @property {string} [subscriber_id] - Unique Identifier of the company + * @property {EntityChargeDetails[]} [line_items] + * @property {string} [return_url] - The URL passed in request which extension + * expects in return. */ /** * @typedef OneTimeChargeEntity * @property {string} [term] - Description of the charge term or usage. * @property {string} [charge_type] - Type of the charge (e.g., 'subscription', * 'extension'). - * @property {number} [capped_amount] - The maximum amount that can be charged - * for a particular service or item - * @property {string} [billing_date] - The date when the billing occurred. This - * field is optional and may be null if the billing date is not specified. + * @property {number} [capped_amount] - Maximum amount that can be charged. If + * no cap, the value should be 0. + * @property {string} [billing_date] - Date when the charge was billed. Null if + * not yet billed. * @property {string} [created_at] - Date and time when the charge entity was created. * @property {string} [modified_at] - Date and time when the charge entity was * last modified. * @property {number} [__v] - Internal version key for the charge record. * @property {string} [_id] - Unique identifier for the charge entity. * @property {string} [name] - The name of the one-time charge. - * @property {string} [status] - Current status of the charge (e.g., 'pending'). + * @property {string} [status] - Current status of the charge (e.g., 'pending', + * 'completed'). * @property {string} [activated_on] - Date and time when the charge was * activated. Null if not yet activated. * @property {string} [cancelled_on] - Date and time when the charge was * cancelled. Null if not cancelled. * @property {Object} [metadata] - Additional metadata associated with the charge. * @property {string} [return_url] - URL to redirect to after processing the charge. - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. + * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes. * @property {string} [pricing_type] - Pricing model for the charge (e.g., 'one_time'). - * @property {string} [subscriber_id] - The unique identifier for the company in - * the system. - * @property {string} [entity_type] - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' - * @property {string} [entity_id] - Unique identifier for the entity (eg. extension) + * @property {string} [subscriber_id] - Unique identifier for the subscriber + * associated with the charge. + * @property {string} [entity_type] - Type of the entity related to the charge + * (e.g., 'subscription', 'user'). + * @property {string} [entity_id] - Unique identifier for the entity associated + * with the charge. * @property {Object} [meta] - Additional metadata associated with the charge. * @property {EntityChargePrice} [price] */ -/** - * @typedef CreateOneTimeChargeResponseSchemas - * @property {Charge} [charge] - * @property {string} [confirm_url] - URL to which users are redirected to - * confirm or complete the payment or subscription process. - */ -/** - * @typedef Charge - * @property {OneTimeChargeEntity} [final_charge] - */ /** * @typedef EntityChargeRecurring - * @property {string} interval - The interval at which the recurring charge is - * applied. Examples include "month", "year", etc. - */ -/** - * @typedef ChargeLineItem - * @property {string} name - Its name of the extension plan. - * @property {string} term - It indicates how it will be charged. - * @property {string} pricing_type - Specifies the type of pricing for the - * extension subscription. It indicates whether the subscription will be - * automatically renewed, charged once, or based on usage. - * @property {EntityChargePrice} price - * @property {EntityChargeRecurring} [recurring] - * @property {number} [capped_amount] - The maximum amount that can be charged - * for a particular service or item - * @property {number} [trial_days] - The number of days allocated for the trial period - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. - * @property {Object} [metadata] - */ -/** - * @typedef CreateSubscriptionCharge - * @property {string} name - The name of the extension plan - * @property {number} [trial_days] - The number of days allocated for the trial period - * @property {ChargeLineItem[]} line_items - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. - * @property {string} return_url - The URL to which the user will be redirected - * after the subscription process is complete. + * @property {string} interval - The interval of the subscription. */ /** * @typedef EntityChargeDetails - * @property {string} [_id] - The unique identifier for the charge. - * @property {string} [subscription_id] - The unique identifier of the subscription. - * @property {string} [subscriber_id] - The unique identifier for the company in - * the system. - * @property {string} [entity_type] - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' - * @property {string} [entity_id] - Unique identifier for the entity (eg. extension) - * @property {string} [name] - The name of the extension plan - * @property {string} [term] - Detailed description of the terms and conditions - * associated with the charge. + * @property {string} [_id] - Unique identifier for the charge. + * @property {string} [subscription_id] - Unique identifier of the extension subscription. + * @property {string} [subscriber_id] - Unique identifier of the + * subscriber/company who installed extension subscription. + * @property {string} [entity_type] - The type of entity associated with the + * charge (e.g., 'extension', 'subscription'). + * @property {string} [entity_id] - Unique identifier for the entity associated + * with the charge. + * @property {string} [name] - The name of the charge. + * @property {string} [term] - Description of the charge term. * @property {string} [charge_type] - The type of charge (e.g., 'standalone', * 'recurring'). * @property {string} [pricing_type] - The pricing model for the charge (e.g., @@ -191,54 +205,23 @@ export = BillingPlatformModel; * @property {EntityChargePrice} [price] * @property {ChargeRecurring} [recurring] * @property {string} [status] - Current status of the charge. - * @property {number} [capped_amount] - The maximum amount that can be charged - * for a particular service or item + * @property {number} [capped_amount] - Maximum amount that can be charged, if applicable. * @property {string} [activated_on] - Date and time when the charge was activated. * @property {string} [cancelled_on] - Date and time when the charge was cancelled. - * @property {string} [billing_date] - The date when the billing occurred. This - * field is optional and may be null if the billing date is not specified. + * @property {string} [billing_date] - Date and time when the charge was billed. * @property {SubscriptionTrialPeriod} [current_period] * @property {string} [modified_at] - Date and time when the charge details were * last modified. * @property {string} [created_at] - Date and time when the charge was created. - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. - * @property {string} [company_id] - The unique identifier of the company. + * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes. + * @property {string} [company_id] - Company id. * @property {Object} [meta] - Additional metadata associated with the charge. * @property {number} [__v] - Internal version key for the charge record. */ -/** - * @typedef EntitySubscription - * @property {string} [_id] - Unique identifier for the subscription charge - * @property {string} [product_suit_id] - A unique identifier for a product - * suite, which represents a specific collection or group of products within - * the system. - * @property {string} [entity_id] - Unique identifier for the entity (eg. extension) - * @property {string} [entity_type] - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' - * @property {string} [name] - The name of the extension plan - * @property {string} [status] - Current status of the subscription charge - * @property {number} [trial_days] - The number of days allocated for the trial period - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. - * @property {string} [created_at] - Timestamp when the charge was created - * @property {string} [modified_at] - Timestamp when the charge was last modified - * @property {string} [subscriber_id] - The unique identifier for the company in - * the system. - * @property {EntityChargeDetails[]} [line_items] - * @property {string} [return_url] - The URL passed in request which extension - * expects in return. - */ -/** - * @typedef CreateSubscription - * @property {EntitySubscription} [subscription] - * @property {string} [confirm_url] - URL to which users are redirected to post - * initiation of extension installation. - */ declare class BillingPlatformModel { } declare namespace BillingPlatformModel { - export { SubscriptionChargeRes, BadRequestSchema, ResourceNotFound, SubscriptionTrialPeriod, EntityChargePrice, OneTimeChargeItem, CreateOneTimeCharge, ChargeRecurring, ChargeDetails, OneTimeChargeEntity, CreateOneTimeChargeResponseSchemas, Charge, EntityChargeRecurring, ChargeLineItem, CreateSubscriptionCharge, EntityChargeDetails, EntitySubscription, CreateSubscription }; + export { SubscriptionChargeRes, ChargeDetails, ResourceNotFound, CreateOneTimeCharge, CreateOneTimeChargeResponse, BadRequest, CreateSubscriptionCharge, CreateSubscriptionResponse, EntityChargePrice, ChargeRecurring, SubscriptionTrialPeriod, Charge, OneTimeChargeItem, ChargeLineItem, EntitySubscription, OneTimeChargeEntity, EntityChargeRecurring, EntityChargeDetails }; } /** @returns {SubscriptionChargeRes} */ declare function SubscriptionChargeRes(): SubscriptionChargeRes; @@ -248,30 +231,28 @@ type SubscriptionChargeRes = { */ _id?: string; /** - * - A unique identifier for a product - * suite, which represents a specific collection or group of products within - * the system. + * - ID of the product suit associated with + * the charge */ product_suit_id?: string; /** - * - Unique identifier for the entity (eg. extension) + * - Unique identifier for the entity */ entity_id?: string; /** - * - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' + * - Type of entity (e.g., subscription, extension) */ entity_type?: string; /** - * - The name of the extension plan + * - Name of the subscription charge */ name?: string; /** - * - Current status of the extension subscription + * - Current status of the subscription charge */ status?: string; /** - * - The number of days allocated for the trial period + * - Number of trial days provided */ trial_days?: number; /** @@ -283,8 +264,7 @@ type SubscriptionChargeRes = { */ cancelled_on?: string; /** - * - Indicates whether the operation or data is in - * a test mode. + * - Indicates if the charge is for testing purposes */ is_test?: boolean; /** @@ -296,7 +276,7 @@ type SubscriptionChargeRes = { */ modified_at?: string; /** - * - The unique identifier of the company. + * - Company id */ company_id?: string; /** @@ -304,13 +284,89 @@ type SubscriptionChargeRes = { */ line_items?: any[]; }; -/** @returns {BadRequestSchema} */ -declare function BadRequestSchema(): BadRequestSchema; -type BadRequestSchema = { +/** @returns {ChargeDetails} */ +declare function ChargeDetails(): ChargeDetails; +type ChargeDetails = { /** - * - Failure message. + * - Unique identifier for the charge. */ - message?: string; + _id?: string; + /** + * - The type of entity associated with the + * charge (e.g., 'extension', 'subscription'). + */ + entity_type?: string; + /** + * - Unique identifier for the entity associated + * with the charge. + */ + entity_id?: string; + /** + * - The name of the charge. + */ + name?: string; + /** + * - Description of the charge term. + */ + term?: string; + /** + * - The type of charge (e.g., 'standalone', + * 'recurring'). + */ + charge_type?: string; + /** + * - The pricing model for the charge (e.g., + * 'one_time', 'recurring'). + */ + pricing_type?: string; + price?: EntityChargePrice; + recurring?: ChargeRecurring; + /** + * - Current status of the charge. + */ + status?: string; + /** + * - Maximum amount that can be charged, if applicable. + */ + capped_amount?: number; + /** + * - Date and time when the charge was activated. + */ + activated_on?: string; + /** + * - Date and time when the charge was cancelled. + */ + cancelled_on?: string; + /** + * - Date and time when the charge was billed. + */ + billing_date?: string; + current_period?: SubscriptionTrialPeriod; + /** + * - Date and time when the charge details were + * last modified. + */ + modified_at?: string; + /** + * - Date and time when the charge was created. + */ + created_at?: string; + /** + * - Indicates whether the charge is for testing purposes. + */ + is_test?: boolean; + /** + * - Company id. + */ + company_id?: string; + /** + * - Additional metadata associated with the charge. + */ + meta?: any; + /** + * - Internal version key for the charge record. + */ + __v?: number; }; /** @returns {ResourceNotFound} */ declare function ResourceNotFound(): ResourceNotFound; @@ -319,26 +375,74 @@ type ResourceNotFound = { * - Resource not found with {id} */ message?: string; + code?: any; + success?: any; +}; +/** @returns {CreateOneTimeCharge} */ +declare function CreateOneTimeCharge(): CreateOneTimeCharge; +type CreateOneTimeCharge = { /** - * - The HTTP status code associated with the error + * - The name of the one-time charge to be created. + */ + name?: string; + charge?: OneTimeChargeItem; + /** + * - Indicates whether the charge creation is for + * testing purposes. */ - code?: number; + is_test?: boolean; /** - * - Indicates if the request was successful + * - URL to which the user will be redirected + * after creating the charge. */ - success?: boolean; + return_url?: string; }; -/** @returns {SubscriptionTrialPeriod} */ -declare function SubscriptionTrialPeriod(): SubscriptionTrialPeriod; -type SubscriptionTrialPeriod = { +/** @returns {CreateOneTimeChargeResponse} */ +declare function CreateOneTimeChargeResponse(): CreateOneTimeChargeResponse; +type CreateOneTimeChargeResponse = { + charge?: Charge; /** - * - The start date and time of the trial period. + * - URL to which users are redirected to + * confirm or complete the payment or subscription process. */ - start_date?: string; + confirm_url?: string; +}; +/** @returns {BadRequest} */ +declare function BadRequest(): BadRequest; +type BadRequest = { /** - * - The end date and time of the trial period. + * - Failure message. */ - end_date?: string; + message?: string; +}; +/** @returns {CreateSubscriptionCharge} */ +declare function CreateSubscriptionCharge(): CreateSubscriptionCharge; +type CreateSubscriptionCharge = { + /** + * - The name of the charge. + */ + name: string; + trial_days?: number; + line_items: ChargeLineItem[]; + /** + * - Indicates whether the charge is for testing purposes. + */ + is_test?: boolean; + /** + * - The URL passed in request which extension + * expects in return. + */ + return_url: string; +}; +/** @returns {CreateSubscriptionResponse} */ +declare function CreateSubscriptionResponse(): CreateSubscriptionResponse; +type CreateSubscriptionResponse = { + subscription?: EntitySubscription; + /** + * - URL to which users are redirected to + * confirm or complete the payment or subscription process. + */ + confirm_url?: string; }; /** @returns {EntityChargePrice} */ declare function EntityChargePrice(): EntityChargePrice; @@ -352,6 +456,29 @@ type EntityChargePrice = { */ currency_code?: string; }; +/** @returns {ChargeRecurring} */ +declare function ChargeRecurring(): ChargeRecurring; +type ChargeRecurring = { + interval?: string; + interval_time?: number; +}; +/** @returns {SubscriptionTrialPeriod} */ +declare function SubscriptionTrialPeriod(): SubscriptionTrialPeriod; +type SubscriptionTrialPeriod = { + /** + * - The start date and time of the trial period. + */ + start_date?: string; + /** + * - The end date and time of the trial period. + */ + end_date?: string; +}; +/** @returns {Charge} */ +declare function Charge(): Charge; +type Charge = { + final_charge?: OneTimeChargeEntity; +}; /** @returns {OneTimeChargeItem} */ declare function OneTimeChargeItem(): OneTimeChargeItem; type OneTimeChargeItem = { @@ -370,12 +497,12 @@ type OneTimeChargeItem = { price?: EntityChargePrice; /** * - The maximum amount that can be charged - * for a particular service or item + * for this item, if applicable. */ capped_amount?: number; /** - * - Indicates whether the operation or data is in - * a test mode. + * - Indicates whether the charge item is for + * testing purposes. */ is_test?: boolean; /** @@ -383,120 +510,83 @@ type OneTimeChargeItem = { */ metadata?: any; }; -/** @returns {CreateOneTimeCharge} */ -declare function CreateOneTimeCharge(): CreateOneTimeCharge; -type CreateOneTimeCharge = { - /** - * - The name of the one-time charge to be created. - */ - name?: string; - charge?: OneTimeChargeItem; +/** @returns {ChargeLineItem} */ +declare function ChargeLineItem(): ChargeLineItem; +type ChargeLineItem = { /** - * - Indicates whether the operation or data is in - * a test mode. + * - Its name of the extension plan. */ - is_test?: boolean; + name: string; /** - * - URL to which the user will be redirected - * after creating the charge. + * - It indicates how it will be charged. */ - return_url?: string; -}; -/** @returns {ChargeRecurring} */ -declare function ChargeRecurring(): ChargeRecurring; -type ChargeRecurring = { + term: string; /** - * - The interval at which the recurring charge is - * applied. Examples include "month", "year", etc. + * - It indicates the extension subscription + * will be auto renewed timely. */ - interval?: string; - interval_time?: number; + pricing_type: string; + price: EntityChargePrice; + recurring?: EntityChargeRecurring; + capped_amount?: number; + trial_days?: number; + is_test?: boolean; + metadata?: any; }; -/** @returns {ChargeDetails} */ -declare function ChargeDetails(): ChargeDetails; -type ChargeDetails = { +/** @returns {EntitySubscription} */ +declare function EntitySubscription(): EntitySubscription; +type EntitySubscription = { /** - * - Unique identifier for the charge. + * - Unique identifier for the subscription charge */ _id?: string; /** - * - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' + * - ID of the product suit associated with + * the charge */ - entity_type?: string; + product_suit_id?: string; /** - * - Unique identifier for the entity (eg. extension) + * - Unique identifier for the entity */ entity_id?: string; /** - * - The name of the extension plan - */ - name?: string; - /** - * - Description of the charge term. - */ - term?: string; - /** - * - The type of charge (e.g., 'standalone', - * 'recurring'). + * - Type of entity (e.g., subscription, extension) */ - charge_type?: string; + entity_type?: string; /** - * - The pricing model for the charge (e.g., - * 'one_time', 'recurring'). + * - Name of the subscription charge */ - pricing_type?: string; - price?: EntityChargePrice; - recurring?: ChargeRecurring; + name?: string; /** - * - Current status of the charge. + * - Current status of the subscription charge */ status?: string; /** - * - The maximum amount that can be charged - * for a particular service or item - */ - capped_amount?: number; - /** - * - Date and time when the charge was activated. - */ - activated_on?: string; - /** - * - Date and time when the charge was cancelled. + * - Number of trial days provided */ - cancelled_on?: string; - /** - * - The date when the billing occurred. This - * field is optional and may be null if the billing date is not specified. - */ - billing_date?: string; - current_period?: SubscriptionTrialPeriod; + trial_days?: number; /** - * - Date and time when the charge details were - * last modified. + * - Indicates if the charge is for testing purposes */ - modified_at?: string; + is_test?: boolean; /** - * - Date and time when the charge was created. + * - Timestamp when the charge was created */ created_at?: string; /** - * - Indicates whether the operation or data is in - * a test mode. - */ - is_test?: boolean; - /** - * - The unique identifier of the company. + * - Timestamp when the charge was last modified */ - company_id?: string; + modified_at?: string; /** - * - Additional metadata associated with the charge. + * - Unique Identifier of the company */ - meta?: any; + subscriber_id?: string; + line_items?: EntityChargeDetails[]; /** - * - Internal version key for the charge record. + * - The URL passed in request which extension + * expects in return. */ - __v?: number; + return_url?: string; }; /** @returns {OneTimeChargeEntity} */ declare function OneTimeChargeEntity(): OneTimeChargeEntity; @@ -511,13 +601,13 @@ type OneTimeChargeEntity = { */ charge_type?: string; /** - * - The maximum amount that can be charged - * for a particular service or item + * - Maximum amount that can be charged. If + * no cap, the value should be 0. */ capped_amount?: number; /** - * - The date when the billing occurred. This - * field is optional and may be null if the billing date is not specified. + * - Date when the charge was billed. Null if + * not yet billed. */ billing_date?: string; /** @@ -542,7 +632,8 @@ type OneTimeChargeEntity = { */ name?: string; /** - * - Current status of the charge (e.g., 'pending'). + * - Current status of the charge (e.g., 'pending', + * 'completed'). */ status?: string; /** @@ -564,8 +655,7 @@ type OneTimeChargeEntity = { */ return_url?: string; /** - * - Indicates whether the operation or data is in - * a test mode. + * - Indicates whether the charge is for testing purposes. */ is_test?: boolean; /** @@ -573,17 +663,18 @@ type OneTimeChargeEntity = { */ pricing_type?: string; /** - * - The unique identifier for the company in - * the system. + * - Unique identifier for the subscriber + * associated with the charge. */ subscriber_id?: string; /** - * - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' + * - Type of the entity related to the charge + * (e.g., 'subscription', 'user'). */ entity_type?: string; /** - * - Unique identifier for the entity (eg. extension) + * - Unique identifier for the entity associated + * with the charge. */ entity_id?: string; /** @@ -592,120 +683,46 @@ type OneTimeChargeEntity = { meta?: any; price?: EntityChargePrice; }; -/** @returns {CreateOneTimeChargeResponseSchemas} */ -declare function CreateOneTimeChargeResponseSchemas(): CreateOneTimeChargeResponseSchemas; -type CreateOneTimeChargeResponseSchemas = { - charge?: Charge; - /** - * - URL to which users are redirected to - * confirm or complete the payment or subscription process. - */ - confirm_url?: string; -}; -/** @returns {Charge} */ -declare function Charge(): Charge; -type Charge = { - final_charge?: OneTimeChargeEntity; -}; /** @returns {EntityChargeRecurring} */ declare function EntityChargeRecurring(): EntityChargeRecurring; type EntityChargeRecurring = { /** - * - The interval at which the recurring charge is - * applied. Examples include "month", "year", etc. + * - The interval of the subscription. */ interval: string; }; -/** @returns {ChargeLineItem} */ -declare function ChargeLineItem(): ChargeLineItem; -type ChargeLineItem = { - /** - * - Its name of the extension plan. - */ - name: string; - /** - * - It indicates how it will be charged. - */ - term: string; - /** - * - Specifies the type of pricing for the - * extension subscription. It indicates whether the subscription will be - * automatically renewed, charged once, or based on usage. - */ - pricing_type: string; - price: EntityChargePrice; - recurring?: EntityChargeRecurring; - /** - * - The maximum amount that can be charged - * for a particular service or item - */ - capped_amount?: number; - /** - * - The number of days allocated for the trial period - */ - trial_days?: number; - /** - * - Indicates whether the operation or data is in - * a test mode. - */ - is_test?: boolean; - metadata?: any; -}; -/** @returns {CreateSubscriptionCharge} */ -declare function CreateSubscriptionCharge(): CreateSubscriptionCharge; -type CreateSubscriptionCharge = { - /** - * - The name of the extension plan - */ - name: string; - /** - * - The number of days allocated for the trial period - */ - trial_days?: number; - line_items: ChargeLineItem[]; - /** - * - Indicates whether the operation or data is in - * a test mode. - */ - is_test?: boolean; - /** - * - The URL to which the user will be redirected - * after the subscription process is complete. - */ - return_url: string; -}; /** @returns {EntityChargeDetails} */ declare function EntityChargeDetails(): EntityChargeDetails; type EntityChargeDetails = { /** - * - The unique identifier for the charge. + * - Unique identifier for the charge. */ _id?: string; /** - * - The unique identifier of the subscription. + * - Unique identifier of the extension subscription. */ subscription_id?: string; /** - * - The unique identifier for the company in - * the system. + * - Unique identifier of the + * subscriber/company who installed extension subscription. */ subscriber_id?: string; /** - * - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' + * - The type of entity associated with the + * charge (e.g., 'extension', 'subscription'). */ entity_type?: string; /** - * - Unique identifier for the entity (eg. extension) + * - Unique identifier for the entity associated + * with the charge. */ entity_id?: string; /** - * - The name of the extension plan + * - The name of the charge. */ name?: string; /** - * - Detailed description of the terms and conditions - * associated with the charge. + * - Description of the charge term. */ term?: string; /** @@ -725,8 +742,7 @@ type EntityChargeDetails = { */ status?: string; /** - * - The maximum amount that can be charged - * for a particular service or item + * - Maximum amount that can be charged, if applicable. */ capped_amount?: number; /** @@ -738,8 +754,7 @@ type EntityChargeDetails = { */ cancelled_on?: string; /** - * - The date when the billing occurred. This - * field is optional and may be null if the billing date is not specified. + * - Date and time when the charge was billed. */ billing_date?: string; current_period?: SubscriptionTrialPeriod; @@ -753,12 +768,11 @@ type EntityChargeDetails = { */ created_at?: string; /** - * - Indicates whether the operation or data is in - * a test mode. + * - Indicates whether the charge is for testing purposes. */ is_test?: boolean; /** - * - The unique identifier of the company. + * - Company id. */ company_id?: string; /** @@ -770,72 +784,3 @@ type EntityChargeDetails = { */ __v?: number; }; -/** @returns {EntitySubscription} */ -declare function EntitySubscription(): EntitySubscription; -type EntitySubscription = { - /** - * - Unique identifier for the subscription charge - */ - _id?: string; - /** - * - A unique identifier for a product - * suite, which represents a specific collection or group of products within - * the system. - */ - product_suit_id?: string; - /** - * - Unique identifier for the entity (eg. extension) - */ - entity_id?: string; - /** - * - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' - */ - entity_type?: string; - /** - * - The name of the extension plan - */ - name?: string; - /** - * - Current status of the subscription charge - */ - status?: string; - /** - * - The number of days allocated for the trial period - */ - trial_days?: number; - /** - * - Indicates whether the operation or data is in - * a test mode. - */ - is_test?: boolean; - /** - * - Timestamp when the charge was created - */ - created_at?: string; - /** - * - Timestamp when the charge was last modified - */ - modified_at?: string; - /** - * - The unique identifier for the company in - * the system. - */ - subscriber_id?: string; - line_items?: EntityChargeDetails[]; - /** - * - The URL passed in request which extension - * expects in return. - */ - return_url?: string; -}; -/** @returns {CreateSubscription} */ -declare function CreateSubscription(): CreateSubscription; -type CreateSubscription = { - subscription?: EntitySubscription; - /** - * - URL to which users are redirected to post - * initiation of extension installation. - */ - confirm_url?: string; -}; diff --git a/sdk/platform/Billing/BillingPlatformModel.js b/sdk/platform/Billing/BillingPlatformModel.js index 709029c48..825caad5c 100644 --- a/sdk/platform/Billing/BillingPlatformModel.js +++ b/sdk/platform/Billing/BillingPlatformModel.js @@ -3,41 +3,96 @@ const Joi = require("joi"); /** * @typedef SubscriptionChargeRes * @property {string} [_id] - Unique identifier for the subscription charge - * @property {string} [product_suit_id] - A unique identifier for a product - * suite, which represents a specific collection or group of products within - * the system. - * @property {string} [entity_id] - Unique identifier for the entity (eg. extension) - * @property {string} [entity_type] - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' - * @property {string} [name] - The name of the extension plan - * @property {string} [status] - Current status of the extension subscription - * @property {number} [trial_days] - The number of days allocated for the trial period + * @property {string} [product_suit_id] - ID of the product suit associated with + * the charge + * @property {string} [entity_id] - Unique identifier for the entity + * @property {string} [entity_type] - Type of entity (e.g., subscription, extension) + * @property {string} [name] - Name of the subscription charge + * @property {string} [status] - Current status of the subscription charge + * @property {number} [trial_days] - Number of trial days provided * @property {string} [activated_on] - Date when the charge was activated * @property {string} [cancelled_on] - Date when the charge was cancelled - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. + * @property {boolean} [is_test] - Indicates if the charge is for testing purposes * @property {string} [created_at] - Timestamp when the charge was created * @property {string} [modified_at] - Timestamp when the charge was last modified - * @property {string} [company_id] - The unique identifier of the company. + * @property {string} [company_id] - Company id * @property {Object[]} [line_items] - List of line items associated with the charge */ /** - * @typedef BadRequestSchema - * @property {string} [message] - Failure message. + * @typedef ChargeDetails + * @property {string} [_id] - Unique identifier for the charge. + * @property {string} [entity_type] - The type of entity associated with the + * charge (e.g., 'extension', 'subscription'). + * @property {string} [entity_id] - Unique identifier for the entity associated + * with the charge. + * @property {string} [name] - The name of the charge. + * @property {string} [term] - Description of the charge term. + * @property {string} [charge_type] - The type of charge (e.g., 'standalone', + * 'recurring'). + * @property {string} [pricing_type] - The pricing model for the charge (e.g., + * 'one_time', 'recurring'). + * @property {EntityChargePrice} [price] + * @property {ChargeRecurring} [recurring] + * @property {string} [status] - Current status of the charge. + * @property {number} [capped_amount] - Maximum amount that can be charged, if applicable. + * @property {string} [activated_on] - Date and time when the charge was activated. + * @property {string} [cancelled_on] - Date and time when the charge was cancelled. + * @property {string} [billing_date] - Date and time when the charge was billed. + * @property {SubscriptionTrialPeriod} [current_period] + * @property {string} [modified_at] - Date and time when the charge details were + * last modified. + * @property {string} [created_at] - Date and time when the charge was created. + * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes. + * @property {string} [company_id] - Company id. + * @property {Object} [meta] - Additional metadata associated with the charge. + * @property {number} [__v] - Internal version key for the charge record. */ /** * @typedef ResourceNotFound * @property {string} [message] - Resource not found with {id} - * @property {number} [code] - The HTTP status code associated with the error - * @property {boolean} [success] - Indicates if the request was successful + * @property {Object} [code] + * @property {Object} [success] */ /** - * @typedef SubscriptionTrialPeriod - * @property {string} [start_date] - The start date and time of the trial period. - * @property {string} [end_date] - The end date and time of the trial period. + * @typedef CreateOneTimeCharge + * @property {string} [name] - The name of the one-time charge to be created. + * @property {OneTimeChargeItem} [charge] + * @property {boolean} [is_test] - Indicates whether the charge creation is for + * testing purposes. + * @property {string} [return_url] - URL to which the user will be redirected + * after creating the charge. + */ + +/** + * @typedef CreateOneTimeChargeResponse + * @property {Charge} [charge] + * @property {string} [confirm_url] - URL to which users are redirected to + * confirm or complete the payment or subscription process. + */ + +/** + * @typedef BadRequest + * @property {string} [message] - Failure message. + */ + +/** + * @typedef CreateSubscriptionCharge + * @property {string} name - The name of the charge. + * @property {number} [trial_days] + * @property {ChargeLineItem[]} line_items + * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes. + * @property {string} return_url - The URL passed in request which extension + * expects in return. + */ + +/** + * @typedef CreateSubscriptionResponse + * @property {EntitySubscription} [subscription] + * @property {string} [confirm_url] - URL to which users are redirected to + * confirm or complete the payment or subscription process. */ /** @@ -46,6 +101,23 @@ const Joi = require("joi"); * @property {string} [currency_code] - The currency code for the price */ +/** + * @typedef ChargeRecurring + * @property {string} [interval] + * @property {number} [interval_time] + */ + +/** + * @typedef SubscriptionTrialPeriod + * @property {string} [start_date] - The start date and time of the trial period. + * @property {string} [end_date] - The end date and time of the trial period. + */ + +/** + * @typedef Charge + * @property {OneTimeChargeEntity} [final_charge] + */ + /** * @typedef OneTimeChargeItem * @property {string} [name] - The name of the one-time charge item. @@ -53,59 +125,43 @@ const Joi = require("joi"); * @property {string} [pricing_type] - The type of pricing for the charge item. * @property {EntityChargePrice} [price] * @property {number} [capped_amount] - The maximum amount that can be charged - * for a particular service or item - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. + * for this item, if applicable. + * @property {boolean} [is_test] - Indicates whether the charge item is for + * testing purposes. * @property {Object} [metadata] - Additional metadata associated with the charge item. */ /** - * @typedef CreateOneTimeCharge - * @property {string} [name] - The name of the one-time charge to be created. - * @property {OneTimeChargeItem} [charge] - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. - * @property {string} [return_url] - URL to which the user will be redirected - * after creating the charge. - */ - -/** - * @typedef ChargeRecurring - * @property {string} [interval] - The interval at which the recurring charge is - * applied. Examples include "month", "year", etc. - * @property {number} [interval_time] + * @typedef ChargeLineItem + * @property {string} name - Its name of the extension plan. + * @property {string} term - It indicates how it will be charged. + * @property {string} pricing_type - It indicates the extension subscription + * will be auto renewed timely. + * @property {EntityChargePrice} price + * @property {EntityChargeRecurring} [recurring] + * @property {number} [capped_amount] + * @property {number} [trial_days] + * @property {boolean} [is_test] + * @property {Object} [metadata] */ /** - * @typedef ChargeDetails - * @property {string} [_id] - Unique identifier for the charge. - * @property {string} [entity_type] - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' - * @property {string} [entity_id] - Unique identifier for the entity (eg. extension) - * @property {string} [name] - The name of the extension plan - * @property {string} [term] - Description of the charge term. - * @property {string} [charge_type] - The type of charge (e.g., 'standalone', - * 'recurring'). - * @property {string} [pricing_type] - The pricing model for the charge (e.g., - * 'one_time', 'recurring'). - * @property {EntityChargePrice} [price] - * @property {ChargeRecurring} [recurring] - * @property {string} [status] - Current status of the charge. - * @property {number} [capped_amount] - The maximum amount that can be charged - * for a particular service or item - * @property {string} [activated_on] - Date and time when the charge was activated. - * @property {string} [cancelled_on] - Date and time when the charge was cancelled. - * @property {string} [billing_date] - The date when the billing occurred. This - * field is optional and may be null if the billing date is not specified. - * @property {SubscriptionTrialPeriod} [current_period] - * @property {string} [modified_at] - Date and time when the charge details were - * last modified. - * @property {string} [created_at] - Date and time when the charge was created. - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. - * @property {string} [company_id] - The unique identifier of the company. - * @property {Object} [meta] - Additional metadata associated with the charge. - * @property {number} [__v] - Internal version key for the charge record. + * @typedef EntitySubscription + * @property {string} [_id] - Unique identifier for the subscription charge + * @property {string} [product_suit_id] - ID of the product suit associated with + * the charge + * @property {string} [entity_id] - Unique identifier for the entity + * @property {string} [entity_type] - Type of entity (e.g., subscription, extension) + * @property {string} [name] - Name of the subscription charge + * @property {string} [status] - Current status of the subscription charge + * @property {number} [trial_days] - Number of trial days provided + * @property {boolean} [is_test] - Indicates if the charge is for testing purposes + * @property {string} [created_at] - Timestamp when the charge was created + * @property {string} [modified_at] - Timestamp when the charge was last modified + * @property {string} [subscriber_id] - Unique Identifier of the company + * @property {EntityChargeDetails[]} [line_items] + * @property {string} [return_url] - The URL passed in request which extension + * expects in return. */ /** @@ -113,93 +169,53 @@ const Joi = require("joi"); * @property {string} [term] - Description of the charge term or usage. * @property {string} [charge_type] - Type of the charge (e.g., 'subscription', * 'extension'). - * @property {number} [capped_amount] - The maximum amount that can be charged - * for a particular service or item - * @property {string} [billing_date] - The date when the billing occurred. This - * field is optional and may be null if the billing date is not specified. + * @property {number} [capped_amount] - Maximum amount that can be charged. If + * no cap, the value should be 0. + * @property {string} [billing_date] - Date when the charge was billed. Null if + * not yet billed. * @property {string} [created_at] - Date and time when the charge entity was created. * @property {string} [modified_at] - Date and time when the charge entity was * last modified. * @property {number} [__v] - Internal version key for the charge record. * @property {string} [_id] - Unique identifier for the charge entity. * @property {string} [name] - The name of the one-time charge. - * @property {string} [status] - Current status of the charge (e.g., 'pending'). + * @property {string} [status] - Current status of the charge (e.g., 'pending', + * 'completed'). * @property {string} [activated_on] - Date and time when the charge was * activated. Null if not yet activated. * @property {string} [cancelled_on] - Date and time when the charge was * cancelled. Null if not cancelled. * @property {Object} [metadata] - Additional metadata associated with the charge. * @property {string} [return_url] - URL to redirect to after processing the charge. - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. + * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes. * @property {string} [pricing_type] - Pricing model for the charge (e.g., 'one_time'). - * @property {string} [subscriber_id] - The unique identifier for the company in - * the system. - * @property {string} [entity_type] - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' - * @property {string} [entity_id] - Unique identifier for the entity (eg. extension) + * @property {string} [subscriber_id] - Unique identifier for the subscriber + * associated with the charge. + * @property {string} [entity_type] - Type of the entity related to the charge + * (e.g., 'subscription', 'user'). + * @property {string} [entity_id] - Unique identifier for the entity associated + * with the charge. * @property {Object} [meta] - Additional metadata associated with the charge. * @property {EntityChargePrice} [price] */ -/** - * @typedef CreateOneTimeChargeResponseSchemas - * @property {Charge} [charge] - * @property {string} [confirm_url] - URL to which users are redirected to - * confirm or complete the payment or subscription process. - */ - -/** - * @typedef Charge - * @property {OneTimeChargeEntity} [final_charge] - */ - /** * @typedef EntityChargeRecurring - * @property {string} interval - The interval at which the recurring charge is - * applied. Examples include "month", "year", etc. - */ - -/** - * @typedef ChargeLineItem - * @property {string} name - Its name of the extension plan. - * @property {string} term - It indicates how it will be charged. - * @property {string} pricing_type - Specifies the type of pricing for the - * extension subscription. It indicates whether the subscription will be - * automatically renewed, charged once, or based on usage. - * @property {EntityChargePrice} price - * @property {EntityChargeRecurring} [recurring] - * @property {number} [capped_amount] - The maximum amount that can be charged - * for a particular service or item - * @property {number} [trial_days] - The number of days allocated for the trial period - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. - * @property {Object} [metadata] - */ - -/** - * @typedef CreateSubscriptionCharge - * @property {string} name - The name of the extension plan - * @property {number} [trial_days] - The number of days allocated for the trial period - * @property {ChargeLineItem[]} line_items - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. - * @property {string} return_url - The URL to which the user will be redirected - * after the subscription process is complete. + * @property {string} interval - The interval of the subscription. */ /** * @typedef EntityChargeDetails - * @property {string} [_id] - The unique identifier for the charge. - * @property {string} [subscription_id] - The unique identifier of the subscription. - * @property {string} [subscriber_id] - The unique identifier for the company in - * the system. - * @property {string} [entity_type] - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' - * @property {string} [entity_id] - Unique identifier for the entity (eg. extension) - * @property {string} [name] - The name of the extension plan - * @property {string} [term] - Detailed description of the terms and conditions - * associated with the charge. + * @property {string} [_id] - Unique identifier for the charge. + * @property {string} [subscription_id] - Unique identifier of the extension subscription. + * @property {string} [subscriber_id] - Unique identifier of the + * subscriber/company who installed extension subscription. + * @property {string} [entity_type] - The type of entity associated with the + * charge (e.g., 'extension', 'subscription'). + * @property {string} [entity_id] - Unique identifier for the entity associated + * with the charge. + * @property {string} [name] - The name of the charge. + * @property {string} [term] - Description of the charge term. * @property {string} [charge_type] - The type of charge (e.g., 'standalone', * 'recurring'). * @property {string} [pricing_type] - The pricing model for the charge (e.g., @@ -207,53 +223,20 @@ const Joi = require("joi"); * @property {EntityChargePrice} [price] * @property {ChargeRecurring} [recurring] * @property {string} [status] - Current status of the charge. - * @property {number} [capped_amount] - The maximum amount that can be charged - * for a particular service or item + * @property {number} [capped_amount] - Maximum amount that can be charged, if applicable. * @property {string} [activated_on] - Date and time when the charge was activated. * @property {string} [cancelled_on] - Date and time when the charge was cancelled. - * @property {string} [billing_date] - The date when the billing occurred. This - * field is optional and may be null if the billing date is not specified. + * @property {string} [billing_date] - Date and time when the charge was billed. * @property {SubscriptionTrialPeriod} [current_period] * @property {string} [modified_at] - Date and time when the charge details were * last modified. * @property {string} [created_at] - Date and time when the charge was created. - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. - * @property {string} [company_id] - The unique identifier of the company. + * @property {boolean} [is_test] - Indicates whether the charge is for testing purposes. + * @property {string} [company_id] - Company id. * @property {Object} [meta] - Additional metadata associated with the charge. * @property {number} [__v] - Internal version key for the charge record. */ -/** - * @typedef EntitySubscription - * @property {string} [_id] - Unique identifier for the subscription charge - * @property {string} [product_suit_id] - A unique identifier for a product - * suite, which represents a specific collection or group of products within - * the system. - * @property {string} [entity_id] - Unique identifier for the entity (eg. extension) - * @property {string} [entity_type] - Specifies the type of entity related to - * the operation, such as 'extension' or 'subscription' - * @property {string} [name] - The name of the extension plan - * @property {string} [status] - Current status of the subscription charge - * @property {number} [trial_days] - The number of days allocated for the trial period - * @property {boolean} [is_test] - Indicates whether the operation or data is in - * a test mode. - * @property {string} [created_at] - Timestamp when the charge was created - * @property {string} [modified_at] - Timestamp when the charge was last modified - * @property {string} [subscriber_id] - The unique identifier for the company in - * the system. - * @property {EntityChargeDetails[]} [line_items] - * @property {string} [return_url] - The URL passed in request which extension - * expects in return. - */ - -/** - * @typedef CreateSubscription - * @property {EntitySubscription} [subscription] - * @property {string} [confirm_url] - URL to which users are redirected to post - * initiation of extension installation. - */ - class BillingPlatformModel { /** @returns {SubscriptionChargeRes} */ static SubscriptionChargeRes() { @@ -275,10 +258,30 @@ class BillingPlatformModel { }); } - /** @returns {BadRequestSchema} */ - static BadRequestSchema() { + /** @returns {ChargeDetails} */ + static ChargeDetails() { return Joi.object({ - message: Joi.string().allow(""), + _id: Joi.string().allow(""), + entity_type: Joi.string().allow(""), + entity_id: Joi.string().allow(""), + name: Joi.string().allow(""), + term: Joi.string().allow(""), + charge_type: Joi.string().allow(""), + pricing_type: Joi.string().allow(""), + price: BillingPlatformModel.EntityChargePrice(), + recurring: BillingPlatformModel.ChargeRecurring(), + status: Joi.string().allow(""), + capped_amount: Joi.number(), + activated_on: Joi.string().allow(""), + cancelled_on: Joi.string().allow(""), + billing_date: Joi.string().allow(""), + current_period: BillingPlatformModel.SubscriptionTrialPeriod(), + modified_at: Joi.string().allow(""), + created_at: Joi.string().allow(""), + is_test: Joi.boolean(), + company_id: Joi.string().allow(""), + meta: Joi.any(), + __v: Joi.number(), }); } @@ -286,16 +289,54 @@ class BillingPlatformModel { static ResourceNotFound() { return Joi.object({ message: Joi.string().allow(""), - code: Joi.number(), - success: Joi.boolean(), + code: Joi.any(), + success: Joi.any(), }); } - /** @returns {SubscriptionTrialPeriod} */ - static SubscriptionTrialPeriod() { + /** @returns {CreateOneTimeCharge} */ + static CreateOneTimeCharge() { return Joi.object({ - start_date: Joi.string().allow(""), - end_date: Joi.string().allow(""), + name: Joi.string().allow(""), + charge: BillingPlatformModel.OneTimeChargeItem(), + is_test: Joi.boolean(), + return_url: Joi.string().allow(""), + }); + } + + /** @returns {CreateOneTimeChargeResponse} */ + static CreateOneTimeChargeResponse() { + return Joi.object({ + charge: BillingPlatformModel.Charge(), + confirm_url: Joi.string().allow(""), + }); + } + + /** @returns {BadRequest} */ + static BadRequest() { + return Joi.object({ + message: Joi.string().allow(""), + }); + } + + /** @returns {CreateSubscriptionCharge} */ + static CreateSubscriptionCharge() { + return Joi.object({ + name: Joi.string().allow("").required(), + trial_days: Joi.number(), + line_items: Joi.array() + .items(BillingPlatformModel.ChargeLineItem()) + .required(), + is_test: Joi.boolean(), + return_url: Joi.string().allow("").required(), + }); + } + + /** @returns {CreateSubscriptionResponse} */ + static CreateSubscriptionResponse() { + return Joi.object({ + subscription: BillingPlatformModel.EntitySubscription(), + confirm_url: Joi.string().allow(""), }); } @@ -307,6 +348,29 @@ class BillingPlatformModel { }); } + /** @returns {ChargeRecurring} */ + static ChargeRecurring() { + return Joi.object({ + interval: Joi.string().allow(""), + interval_time: Joi.number(), + }); + } + + /** @returns {SubscriptionTrialPeriod} */ + static SubscriptionTrialPeriod() { + return Joi.object({ + start_date: Joi.string().allow(""), + end_date: Joi.string().allow(""), + }); + } + + /** @returns {Charge} */ + static Charge() { + return Joi.object({ + final_charge: BillingPlatformModel.OneTimeChargeEntity(), + }); + } + /** @returns {OneTimeChargeItem} */ static OneTimeChargeItem() { return Joi.object({ @@ -316,52 +380,41 @@ class BillingPlatformModel { price: BillingPlatformModel.EntityChargePrice(), capped_amount: Joi.number(), is_test: Joi.boolean(), - metadata: Joi.object().pattern(/\S/, Joi.any()), + metadata: Joi.any(), }); } - /** @returns {CreateOneTimeCharge} */ - static CreateOneTimeCharge() { + /** @returns {ChargeLineItem} */ + static ChargeLineItem() { return Joi.object({ - name: Joi.string().allow(""), - charge: BillingPlatformModel.OneTimeChargeItem(), + name: Joi.string().allow("").required(), + term: Joi.string().allow("").required(), + pricing_type: Joi.string().allow("").required(), + price: BillingPlatformModel.EntityChargePrice().required(), + recurring: BillingPlatformModel.EntityChargeRecurring(), + capped_amount: Joi.number(), + trial_days: Joi.number(), is_test: Joi.boolean(), - return_url: Joi.string().allow(""), + metadata: Joi.any(), }); } - /** @returns {ChargeRecurring} */ - static ChargeRecurring() { - return Joi.object({ - interval: Joi.string().allow(""), - interval_time: Joi.number(), - }); - } - - /** @returns {ChargeDetails} */ - static ChargeDetails() { + /** @returns {EntitySubscription} */ + static EntitySubscription() { return Joi.object({ _id: Joi.string().allow(""), - entity_type: Joi.string().allow(""), + product_suit_id: Joi.string().allow(""), entity_id: Joi.string().allow(""), + entity_type: Joi.string().allow(""), name: Joi.string().allow(""), - term: Joi.string().allow(""), - charge_type: Joi.string().allow(""), - pricing_type: Joi.string().allow(""), - price: BillingPlatformModel.EntityChargePrice(), - recurring: BillingPlatformModel.ChargeRecurring(), status: Joi.string().allow(""), - capped_amount: Joi.number(), - activated_on: Joi.string().allow(""), - cancelled_on: Joi.string().allow(""), - billing_date: Joi.string().allow(""), - current_period: BillingPlatformModel.SubscriptionTrialPeriod(), - modified_at: Joi.string().allow(""), - created_at: Joi.string().allow(""), + trial_days: Joi.number(), is_test: Joi.boolean(), - company_id: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), - __v: Joi.number(), + created_at: Joi.string().allow(""), + modified_at: Joi.string().allow(""), + subscriber_id: Joi.string().allow(""), + line_items: Joi.array().items(BillingPlatformModel.EntityChargeDetails()), + return_url: Joi.string().allow(""), }); } @@ -380,33 +433,18 @@ class BillingPlatformModel { status: Joi.string().allow(""), activated_on: Joi.string().allow("").allow(null), cancelled_on: Joi.string().allow("").allow(null), - metadata: Joi.object().pattern(/\S/, Joi.any()), + metadata: Joi.any(), return_url: Joi.string().allow(""), is_test: Joi.boolean(), pricing_type: Joi.string().allow(""), subscriber_id: Joi.string().allow(""), entity_type: Joi.string().allow(""), entity_id: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), price: BillingPlatformModel.EntityChargePrice(), }); } - /** @returns {CreateOneTimeChargeResponseSchemas} */ - static CreateOneTimeChargeResponseSchemas() { - return Joi.object({ - charge: BillingPlatformModel.Charge(), - confirm_url: Joi.string().allow(""), - }); - } - - /** @returns {Charge} */ - static Charge() { - return Joi.object({ - final_charge: BillingPlatformModel.OneTimeChargeEntity(), - }); - } - /** @returns {EntityChargeRecurring} */ static EntityChargeRecurring() { return Joi.object({ @@ -414,34 +452,6 @@ class BillingPlatformModel { }); } - /** @returns {ChargeLineItem} */ - static ChargeLineItem() { - return Joi.object({ - name: Joi.string().allow("").required(), - term: Joi.string().allow("").required(), - pricing_type: Joi.string().allow("").required(), - price: BillingPlatformModel.EntityChargePrice().required(), - recurring: BillingPlatformModel.EntityChargeRecurring(), - capped_amount: Joi.number(), - trial_days: Joi.number(), - is_test: Joi.boolean(), - metadata: Joi.object().pattern(/\S/, Joi.any()), - }); - } - - /** @returns {CreateSubscriptionCharge} */ - static CreateSubscriptionCharge() { - return Joi.object({ - name: Joi.string().allow("").required(), - trial_days: Joi.number(), - line_items: Joi.array() - .items(BillingPlatformModel.ChargeLineItem()) - .required(), - is_test: Joi.boolean(), - return_url: Joi.string().allow("").required(), - }); - } - /** @returns {EntityChargeDetails} */ static EntityChargeDetails() { return Joi.object({ @@ -466,36 +476,9 @@ class BillingPlatformModel { created_at: Joi.string().allow(""), is_test: Joi.boolean(), company_id: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), __v: Joi.number(), }); } - - /** @returns {EntitySubscription} */ - static EntitySubscription() { - return Joi.object({ - _id: Joi.string().allow(""), - product_suit_id: Joi.string().allow(""), - entity_id: Joi.string().allow(""), - entity_type: Joi.string().allow(""), - name: Joi.string().allow(""), - status: Joi.string().allow(""), - trial_days: Joi.number(), - is_test: Joi.boolean(), - created_at: Joi.string().allow(""), - modified_at: Joi.string().allow(""), - subscriber_id: Joi.string().allow(""), - line_items: Joi.array().items(BillingPlatformModel.EntityChargeDetails()), - return_url: Joi.string().allow(""), - }); - } - - /** @returns {CreateSubscription} */ - static CreateSubscription() { - return Joi.object({ - subscription: BillingPlatformModel.EntitySubscription(), - confirm_url: Joi.string().allow(""), - }); - } } module.exports = BillingPlatformModel; diff --git a/sdk/platform/Billing/BillingPlatformValidator.d.ts b/sdk/platform/Billing/BillingPlatformValidator.d.ts index d13eefac0..6178afcfd 100644 --- a/sdk/platform/Billing/BillingPlatformValidator.d.ts +++ b/sdk/platform/Billing/BillingPlatformValidator.d.ts @@ -1,28 +1,29 @@ export = BillingPlatformValidator; /** * @typedef CancelSubscriptionChargeParam - * @property {string} extensionId - The unique identifier of the extension - * @property {string} subscriptionId - The unique identifier of the subscription + * @property {string} extensionId - Extension _id + * @property {string} subscriptionId - Subscription charge _id */ /** * @typedef CreateOneTimeChargeParam - * @property {string} extensionId - The unique identifier of the extension + * @property {string} extensionId - Extension _id * @property {BillingPlatformModel.CreateOneTimeCharge} body */ /** * @typedef CreateSubscriptionChargeParam - * @property {string} extensionId - The unique identifier of the extension + * @property {string} extensionId - Extension Id for which we need to crete new + * subscription * @property {BillingPlatformModel.CreateSubscriptionCharge} body */ /** * @typedef GetChargeDetailsParam - * @property {string} extensionId - The unique identifier of the extension - * @property {string} chargeId - The unique identifier of the entity charge in the system. + * @property {string} extensionId - Extension _id + * @property {string} chargeId - Standalone charge _id */ /** * @typedef GetSubscriptionChargeParam - * @property {string} extensionId - The unique identifier of the extension - * @property {string} subscriptionId - The unique identifier of the subscription + * @property {string} extensionId - Extension _id + * @property {string} subscriptionId - Subscription charge _id */ declare class BillingPlatformValidator { /** @returns {CancelSubscriptionChargeParam} */ @@ -41,45 +42,46 @@ declare namespace BillingPlatformValidator { } type CancelSubscriptionChargeParam = { /** - * - The unique identifier of the extension + * - Extension _id */ extensionId: string; /** - * - The unique identifier of the subscription + * - Subscription charge _id */ subscriptionId: string; }; type CreateOneTimeChargeParam = { /** - * - The unique identifier of the extension + * - Extension _id */ extensionId: string; body: BillingPlatformModel.CreateOneTimeCharge; }; type CreateSubscriptionChargeParam = { /** - * - The unique identifier of the extension + * - Extension Id for which we need to crete new + * subscription */ extensionId: string; body: BillingPlatformModel.CreateSubscriptionCharge; }; type GetChargeDetailsParam = { /** - * - The unique identifier of the extension + * - Extension _id */ extensionId: string; /** - * - The unique identifier of the entity charge in the system. + * - Standalone charge _id */ chargeId: string; }; type GetSubscriptionChargeParam = { /** - * - The unique identifier of the extension + * - Extension _id */ extensionId: string; /** - * - The unique identifier of the subscription + * - Subscription charge _id */ subscriptionId: string; }; diff --git a/sdk/platform/Billing/BillingPlatformValidator.js b/sdk/platform/Billing/BillingPlatformValidator.js index d574c9b9f..c34a45a62 100644 --- a/sdk/platform/Billing/BillingPlatformValidator.js +++ b/sdk/platform/Billing/BillingPlatformValidator.js @@ -4,32 +4,33 @@ const BillingPlatformModel = require("./BillingPlatformModel"); /** * @typedef CancelSubscriptionChargeParam - * @property {string} extensionId - The unique identifier of the extension - * @property {string} subscriptionId - The unique identifier of the subscription + * @property {string} extensionId - Extension _id + * @property {string} subscriptionId - Subscription charge _id */ /** * @typedef CreateOneTimeChargeParam - * @property {string} extensionId - The unique identifier of the extension + * @property {string} extensionId - Extension _id * @property {BillingPlatformModel.CreateOneTimeCharge} body */ /** * @typedef CreateSubscriptionChargeParam - * @property {string} extensionId - The unique identifier of the extension + * @property {string} extensionId - Extension Id for which we need to crete new + * subscription * @property {BillingPlatformModel.CreateSubscriptionCharge} body */ /** * @typedef GetChargeDetailsParam - * @property {string} extensionId - The unique identifier of the extension - * @property {string} chargeId - The unique identifier of the entity charge in the system. + * @property {string} extensionId - Extension _id + * @property {string} chargeId - Standalone charge _id */ /** * @typedef GetSubscriptionChargeParam - * @property {string} extensionId - The unique identifier of the extension - * @property {string} subscriptionId - The unique identifier of the subscription + * @property {string} extensionId - Extension _id + * @property {string} subscriptionId - Subscription charge _id */ class BillingPlatformValidator { diff --git a/sdk/platform/Cart/CartPlatformApplicationClient.d.ts b/sdk/platform/Cart/CartPlatformApplicationClient.d.ts index 6e3b544dd..3ba600667 100644 --- a/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +++ b/sdk/platform/Cart/CartPlatformApplicationClient.d.ts @@ -7,65 +7,66 @@ declare class Cart { * @param {CartPlatformApplicationValidator.AddAddressParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addAddress * @summary: Creates a new address for a customer * @description: Customers can add a new address to their cart to save details such as name, email, contact information, and address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addAddress/). */ - addAddress({ body, requestHeaders }?: CartPlatformApplicationValidator.AddAddressParam, { responseHeaders }?: object): Promise; + addAddress({ body, requestHeaders }?: CartPlatformApplicationValidator.AddAddressParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.AddItemsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addItems * @summary: Add items to cart * @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/addItems/). */ - addItems({ cartId, body, b, requestHeaders }?: CartPlatformApplicationValidator.AddItemsParam, { responseHeaders }?: object): Promise; + addItems({ cartId, body, b, requestHeaders }?: CartPlatformApplicationValidator.AddItemsParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.AddPriceAdjustmentParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addPriceAdjustment * @summary: Create price adjustments * @description: Create custom price adjustments for items in the cart, facilitating the application of discounts or promotions. Price adjustments can be tailored based on specific sales channel contexts, enhancing flexibility in pricing strategies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addPriceAdjustment/). */ - addPriceAdjustment({ body, requestHeaders }?: CartPlatformApplicationValidator.AddPriceAdjustmentParam, { responseHeaders }?: object): Promise; + addPriceAdjustment({ body, requestHeaders }?: CartPlatformApplicationValidator.AddPriceAdjustmentParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.ApplyCouponParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name applyCoupon * @summary: Apply coupon * @description: Apply a coupon code to the customer's cart to trigger discounts on eligible items - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/applyCoupon/). */ - applyCoupon({ body, i, b, p, id, buyNow, requestHeaders }?: CartPlatformApplicationValidator.ApplyCouponParam, { responseHeaders }?: object): Promise; + applyCoupon({ body, i, b, p, id, buyNow, requestHeaders }?: CartPlatformApplicationValidator.ApplyCouponParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.CheckCartServiceabilityParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name checkCartServiceability * @summary: Check cart serviceability * @description: Verify the serviceability of items in the cart at a specific pin code and ensure accurate delivery promises. System checks each item's availability and delivery feasibility, providing real-time information on serviceability and estimated delivery times. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/checkCartServiceability/). */ - checkCartServiceability({ body, requestHeaders }?: CartPlatformApplicationValidator.CheckCartServiceabilityParam, { responseHeaders }?: object): Promise; + checkCartServiceability({ body, requestHeaders }?: CartPlatformApplicationValidator.CheckCartServiceabilityParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.CheckoutCartParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name checkoutCart * @summary: Checkout cart * @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/checkoutCart/). */ - checkoutCart({ body, requestHeaders }?: CartPlatformApplicationValidator.CheckoutCartParam, { responseHeaders }?: object): Promise; + checkoutCart({ body, requestHeaders }?: CartPlatformApplicationValidator.CheckoutCartParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.CreateCartMetaConfigParam} arg * - Arg object @@ -82,64 +83,44 @@ declare class Cart { * @param {CartPlatformApplicationValidator.CreateCouponParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createCoupon * @summary: Create a coupon * @description: Creates a new coupon based on the selected coupon type. Sellers can choose from multiple supported coupon types, including percentage value, fixed amount value, bundled discount, buy X get Y items, and more, along with customizable coupon criteria to meet specific business requirements. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/createCoupon/). */ - createCoupon({ body, requestHeaders }?: CartPlatformApplicationValidator.CreateCouponParam, { responseHeaders }?: object): Promise; + createCoupon({ body, requestHeaders }?: CartPlatformApplicationValidator.CreateCouponParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.CreatePromotionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createPromotion * @summary: Create a promotion * @description: Creates a new promotion based on the selected promotion type. Sellers can choose from multiple supported promotion types, including percentage value, fixed amount value, bundled discount, buy X get Y items, and more, along with customizable promotion criteria to meet specific business requirements. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/createPromotion/). */ - createPromotion({ body, requestHeaders }?: CartPlatformApplicationValidator.CreatePromotionParam, { responseHeaders }?: object): Promise; + createPromotion({ body, requestHeaders }?: CartPlatformApplicationValidator.CreatePromotionParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.DeleteCartParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteCart * @summary: Delete a cart * @description: Delete all items from the user's cart and resets it to its initial state, providing a clean slate for new selections. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/deleteCart/). */ - deleteCart({ body, id, requestHeaders }?: CartPlatformApplicationValidator.DeleteCartParam, { responseHeaders }?: object): Promise; - /** - * @param {CartPlatformApplicationValidator.DeleteCouponParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deleteCoupon - * @summary: Delete a coupon which is in draft state - * @description: Delete details of a draft coupon by providing its unique identifier to delete information such as coupon type, rules, validity period and other related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/deleteCoupon/). - */ - deleteCoupon({ id, requestHeaders }?: CartPlatformApplicationValidator.DeleteCouponParam, { responseHeaders }?: object): Promise; - /** - * @param {CartPlatformApplicationValidator.DeletePromotionParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deletePromotion - * @summary: Delete a promotion which is in draft state - * @description: Delete details of a draft promotion by providing its unique identifier to delete information such as promotion type, rules, validity period and other related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/deletePromotion/). - */ - deletePromotion({ id, requestHeaders }?: CartPlatformApplicationValidator.DeletePromotionParam, { responseHeaders }?: object): Promise; + deleteCart({ body, id, requestHeaders }?: CartPlatformApplicationValidator.DeleteCartParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.FetchAndvalidateCartItemsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name fetchAndvalidateCartItems * @summary: Get and validate cart items * @description: Retrieve cart details for a provided list of cart items and validate its contents. This ensures accuracy and completeness in cart information, including item quantities, prices, discounts, and applicable taxes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/fetchAndvalidateCartItems/). */ - fetchAndvalidateCartItems({ body, requestHeaders }?: CartPlatformApplicationValidator.FetchAndvalidateCartItemsParam, { responseHeaders }?: object): Promise; + fetchAndvalidateCartItems({ body, requestHeaders }?: CartPlatformApplicationValidator.FetchAndvalidateCartItemsParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.FetchCartMetaConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -154,24 +135,24 @@ declare class Cart { * @param {CartPlatformApplicationValidator.GetAbandonedCartParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAbandonedCart * @summary: Get abandoned carts * @description: Retrieve the list of abandoned carts that have been active for the specified period of time and have not yet been archived for the specific sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAbandonedCart/). */ - getAbandonedCart({ pageNo, pageSize, fromDate, toDate, anonymousCart, lastId, sortOn, requestHeaders, }?: CartPlatformApplicationValidator.GetAbandonedCartParam, { responseHeaders }?: object): Promise; + getAbandonedCart({ pageNo, pageSize, fromDate, toDate, anonymousCart, lastId, sortOn, requestHeaders, }?: CartPlatformApplicationValidator.GetAbandonedCartParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetAbandonedCartDetailsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAbandonedCartDetails * @summary: Get abandoned cart details * @description: Retrieves abandoned cart details linked to a specific customer using a unique cart ID. It offers an overview of the items, quantities, prices, and other relevant information associated with the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAbandonedCartDetails/). */ - getAbandonedCartDetails({ id, i, b, c, requestHeaders }?: CartPlatformApplicationValidator.GetAbandonedCartDetailsParam, { responseHeaders }?: object): Promise; + getAbandonedCartDetails({ id, i, b, c, requestHeaders }?: CartPlatformApplicationValidator.GetAbandonedCartDetailsParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetAddressByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -186,75 +167,75 @@ declare class Cart { * @param {CartPlatformApplicationValidator.GetAddressesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getAddresses * @summary: Get a list of addresses for a customer * @description: Retrieves a list of all addresses saved by the customer, simplifying the checkout process by offering pre-saved address options for delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAddresses/). */ - getAddresses({ cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, userId, requestHeaders, }?: CartPlatformApplicationValidator.GetAddressesParam, { responseHeaders }?: object): Promise; + getAddresses({ cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, userId, requestHeaders, }?: CartPlatformApplicationValidator.GetAddressesParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetAppCouponsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAppCoupons - * @summary: List of coupons + * @summary: List coupons * @description: Retrieve a list of all available coupons that customer can apply to their carts. It provides details about each coupon, including its code, discount amount, and applicable conditions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAppCoupons/). */ - getAppCoupons({ id, buyNow, slug, storeId, requestHeaders }?: CartPlatformApplicationValidator.GetAppCouponsParam, { responseHeaders }?: object): Promise; + getAppCoupons({ id, buyNow, slug, storeId, requestHeaders }?: CartPlatformApplicationValidator.GetAppCouponsParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetAvailableDeliveryModesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAvailableDeliveryModes * @summary: Get delivery modes * @description: Retrieve a list of delivery modes (home delivery/store pickup) along with a list of available pickup stores for a given cart at a specified PIN Code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAvailableDeliveryModes/). */ - getAvailableDeliveryModes({ areaCode, id, requestHeaders }?: CartPlatformApplicationValidator.GetAvailableDeliveryModesParam, { responseHeaders }?: object): Promise; + getAvailableDeliveryModes({ areaCode, id, requestHeaders }?: CartPlatformApplicationValidator.GetAvailableDeliveryModesParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetCartParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCart * @summary: Get a cart * @description: Retrieve details of a cart linked to a specific customer using either the customer's ID or a unique cart ID. It offers an overview of the items, quantities, prices, and other relevant information associated with the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCart/). */ - getCart({ id, userId, orderType, i, b, assignCardId, buyNow, requestHeaders }?: CartPlatformApplicationValidator.GetCartParam, { responseHeaders }?: object): Promise; + getCart({ id, userId, orderType, i, b, assignCardId, buyNow, requestHeaders }?: CartPlatformApplicationValidator.GetCartParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetCartListParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCartList - * @summary: List of carts - * @description: Retrieve the list of active carts associated with a specific customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartList/). + * @summary: List carts + * @description: Retrieve the list of active carts associated with a specific customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartList/). */ - getCartList({ fromDate, toDate, filterOn, requestHeaders }?: CartPlatformApplicationValidator.GetCartListParam, { responseHeaders }?: object): Promise; + getCartList({ fromDate, toDate, filterOn, requestHeaders }?: CartPlatformApplicationValidator.GetCartListParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetCartShareLinkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCartShareLink * @summary: Share cart link * @description: Generate a unique shareable link for the customer's cart for a specific sales channel. This link enables easy sharing of the cart contents with other users, facilitating collaborative shopping experiences. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartShareLink/). */ - getCartShareLink({ body, requestHeaders }?: CartPlatformApplicationValidator.GetCartShareLinkParam, { responseHeaders }?: object): Promise; + getCartShareLink({ body, requestHeaders }?: CartPlatformApplicationValidator.GetCartShareLinkParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetCartSharedItemsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCartSharedItems * @summary: List shared cart items * @description: Retrieve the cart items from the shared cart link based on unique token. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartSharedItems/). */ - getCartSharedItems({ token, requestHeaders }?: CartPlatformApplicationValidator.GetCartSharedItemsParam, { responseHeaders }?: object): Promise; + getCartSharedItems({ token, requestHeaders }?: CartPlatformApplicationValidator.GetCartSharedItemsParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetCouponByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -291,54 +272,54 @@ declare class Cart { * @param {CartPlatformApplicationValidator.GetCouponsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCoupons - * @summary: List of coupons + * @summary: List coupons * @description: Retrieve a list of all created coupons for specific sales channel. It also supports searching based on text search, pagination and other flags to filter coupons. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCoupons/). */ - getCoupons({ pageNo, pageSize, isArchived, title, isPublic, isDisplay, typeSlug, code, createdBy, reviewedBy, approvedStartTime, approvedEndTime, reviewStartTime, reviewEndTime, status, requestHeaders, }?: CartPlatformApplicationValidator.GetCouponsParam, { responseHeaders }?: object): Promise; + getCoupons({ pageNo, pageSize, isArchived, title, isPublic, isDisplay, typeSlug, code, requestHeaders, }?: CartPlatformApplicationValidator.GetCouponsParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetItemCountParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getItemCount * @summary: Get a cart items count * @description: Retrieve the total count of items currently present in the customer's cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getItemCount/). */ - getItemCount({ id, buyNow, requestHeaders }?: CartPlatformApplicationValidator.GetItemCountParam, { responseHeaders }?: object): Promise; + getItemCount({ id, buyNow, requestHeaders }?: CartPlatformApplicationValidator.GetItemCountParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetPriceAdjustmentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPriceAdjustments * @summary: Get a list of all price adjustments associated with a cart * @description: This API helps to get price adjustments data associated to a particular cart - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPriceAdjustments/). */ - getPriceAdjustments({ cartId, requestHeaders }?: CartPlatformApplicationValidator.GetPriceAdjustmentsParam, { responseHeaders }?: object): Promise; + getPriceAdjustments({ cartId, requestHeaders }?: CartPlatformApplicationValidator.GetPriceAdjustmentsParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetPromosCouponConfigParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPromosCouponConfig * @summary: Get promotion and coupon type * @description: Retrieve the configuration settings related to promotions and coupons for a specific seller. It provides details of the supported types of coupons and promotions along with their descriptions, examples, and related attributes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromosCouponConfig/). */ - getPromosCouponConfig({ entityType, isHidden, requestHeaders }?: CartPlatformApplicationValidator.GetPromosCouponConfigParam, { responseHeaders }?: object): Promise; + getPromosCouponConfig({ entityType, isHidden, requestHeaders }?: CartPlatformApplicationValidator.GetPromosCouponConfigParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetPromotionByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPromotionById - * @summary: Get a specific promotion + * @summary: Get a promotion * @description: Retrieve details of a specific promotion by providing its unique identifier to obtain information such as promotion type, rules, validity period and other related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionById/). */ - getPromotionById({ id, requestHeaders }?: CartPlatformApplicationValidator.GetPromotionByIdParam, { responseHeaders }?: object): Promise; + getPromotionById({ id, requestHeaders }?: CartPlatformApplicationValidator.GetPromotionByIdParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetPromotionCodeExistsParam} arg * - Arg object @@ -355,132 +336,120 @@ declare class Cart { * @param {CartPlatformApplicationValidator.GetPromotionOffersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPromotionOffers - * @summary: List of all available promotion offers + * @summary: List available promotion offers * @description: Retrieve a list of all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionOffers/). */ - getPromotionOffers({ slug, pageSize, promotionGroup, storeId, cartType, sortBy, requestHeaders, }?: CartPlatformApplicationValidator.GetPromotionOffersParam, { responseHeaders }?: object): Promise; + getPromotionOffers({ slug, pageSize, promotionGroup, storeId, cartType, requestHeaders }?: CartPlatformApplicationValidator.GetPromotionOffersParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetPromotionPaymentOffersParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getPromotionPaymentOffers * @summary: Fetch available promotions payment offers * @description: Use this API to get top 5 payment offers available for current product - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionPaymentOffers/). */ - getPromotionPaymentOffers({ id, uid, requestHeaders }?: CartPlatformApplicationValidator.GetPromotionPaymentOffersParam, { responseHeaders }?: object): Promise; + getPromotionPaymentOffers({ id, uid, requestHeaders }?: CartPlatformApplicationValidator.GetPromotionPaymentOffersParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetPromotionsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPromotions - * @summary: List of promotions + * @summary: List promotions * @description: Retrieve a list of all created promotions for specific sales channel. It also supports efficient text search and pagination functionalities, ensuring optimized promotion listing for streamlined navigation and management. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotions/). */ - getPromotions({ pageNo, pageSize, q, isActive, promoGroup, promotionType, fpPanel, promotionId, createdBy, reviewedBy, approvedStartTime, approvedEndTime, reviewStartTime, reviewEndTime, status, requestHeaders, }?: CartPlatformApplicationValidator.GetPromotionsParam, { responseHeaders }?: object): Promise; + getPromotions({ pageNo, pageSize, q, isActive, promoGroup, promotionType, fpPanel, promotionId, requestHeaders, }?: CartPlatformApplicationValidator.GetPromotionsParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetShipmentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getShipments * @summary: Get shipments details * @description: Use this API to get shipment details, expected delivery date, items and price breakup of the shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getShipments/). */ - getShipments({ pickAtStoreUid, orderingStoreId, i, p, id, addressId, areaCode, orderType, requestHeaders, }?: CartPlatformApplicationValidator.GetShipmentsParam, { responseHeaders }?: object): Promise; + getShipments({ pickAtStoreUid, orderingStoreId, i, p, id, addressId, areaCode, orderType, requestHeaders, }?: CartPlatformApplicationValidator.GetShipmentsParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetStoreAddressByUidParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getStoreAddressByUid * @summary: Get Store Address * @description: Retrieve store details by entering the unique identifier of the pickup stores. Store details include the seller's name, contact information such as email address or phone number and business address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getStoreAddressByUid/). */ - getStoreAddressByUid({ storeUid, requestHeaders }?: CartPlatformApplicationValidator.GetStoreAddressByUidParam, { responseHeaders }?: object): Promise; + getStoreAddressByUid({ storeUid, requestHeaders }?: CartPlatformApplicationValidator.GetStoreAddressByUidParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.OverrideCartParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name overrideCart * @summary: Update cart checkout * @description: Overrides the cart's checkout process with a new provided cart items. It provides flexibility in customizing checkout flows to meet specific business requirements, enhancing the user experience and optimizing order processing workflows. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/overrideCart/). */ - overrideCart({ body, requestHeaders }?: CartPlatformApplicationValidator.OverrideCartParam, { responseHeaders }?: object): Promise; + overrideCart({ body, requestHeaders }?: CartPlatformApplicationValidator.OverrideCartParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.PlatformAddItemsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name platformAddItems * @summary: Add items to cart * @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/). */ - platformAddItems({ body, i, b, buyNow, orderType, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformAddItemsParam, { responseHeaders }?: object): Promise; - /** - * @param {CartPlatformApplicationValidator.PlatformCheckoutCartParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name platformCheckoutCart - * @summary: Checkout cart - * @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/). - */ - platformCheckoutCart({ body, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformCheckoutCartParam, { responseHeaders }?: object): Promise; + platformAddItems({ body, i, b, buyNow, orderType, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformAddItemsParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.PlatformCheckoutCartV2Param} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name platformCheckoutCartV2 * @summary: Checkout cart * @description: The checkout cart initiates the order creation process based on the items in the user’s cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCartV2/). */ - platformCheckoutCartV2({ body, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformCheckoutCartV2Param, { responseHeaders }?: object): Promise; + platformCheckoutCartV2({ body, id, requestHeaders }?: CartPlatformApplicationValidator.PlatformCheckoutCartV2Param, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.PlatformUpdateCartParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name platformUpdateCart * @summary: Update cart items * @description: Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformUpdateCart/). */ - platformUpdateCart({ body, id, i, orderType, b, buyNow, requestHeaders }?: CartPlatformApplicationValidator.PlatformUpdateCartParam, { responseHeaders }?: object): Promise; + platformUpdateCart({ body, id, i, orderType, b, buyNow, requestHeaders }?: CartPlatformApplicationValidator.PlatformUpdateCartParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.RemoveAddressParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name removeAddress * @summary: Removes an address from a customer's address list * @description: Remove an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeAddress/). */ - removeAddress({ id, userId, requestHeaders }?: CartPlatformApplicationValidator.RemoveAddressParam, { responseHeaders }?: object): Promise; + removeAddress({ id, userId, requestHeaders }?: CartPlatformApplicationValidator.RemoveAddressParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.RemoveCouponParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name removeCoupon * @summary: Remove coupon * @description: Remove an applied coupon from the customer's cart, thereby removing the associated discount from the cart total. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeCoupon/). */ - removeCoupon({ uid, buyNow, requestHeaders }?: CartPlatformApplicationValidator.RemoveCouponParam, { responseHeaders }?: object): Promise; + removeCoupon({ uid, buyNow, requestHeaders }?: CartPlatformApplicationValidator.RemoveCouponParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.RemovePriceAdjustmentParam} arg * - Arg object @@ -497,62 +466,62 @@ declare class Cart { * @param {CartPlatformApplicationValidator.SelectAddressParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name selectAddress * @summary: Select customer address for order processing * @description: Select an address from the saved customer addresses and validates the availability of items in the cart. Additionally, it verifies and updates the delivery promise based on the selected address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectAddress/). */ - selectAddress({ body, cartId, buyNow, i, b, requestHeaders }?: CartPlatformApplicationValidator.SelectAddressParam, { responseHeaders }?: object): Promise; + selectAddress({ body, cartId, buyNow, i, b, requestHeaders }?: CartPlatformApplicationValidator.SelectAddressParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.SelectPaymentModeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name selectPaymentMode * @summary: Select payment mode * @description: Customers can select a preferred payment mode from available options during the cart checkout process to securely and efficiently complete their transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectPaymentMode/). */ - selectPaymentMode({ body, id, buyNow, orderType, requestHeaders }?: CartPlatformApplicationValidator.SelectPaymentModeParam, { responseHeaders }?: object): Promise; + selectPaymentMode({ body, id, buyNow, orderType, requestHeaders }?: CartPlatformApplicationValidator.SelectPaymentModeParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.SelectPaymentModeV2Param} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name selectPaymentModeV2 * @summary: Select payment mode (latest) * @description: Selection of payment mode that supports multiple MOP(mode of payment). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectPaymentModeV2/). */ - selectPaymentModeV2({ body, id, buyNow, orderType, requestHeaders }?: CartPlatformApplicationValidator.SelectPaymentModeV2Param, { responseHeaders }?: object): Promise; + selectPaymentModeV2({ body, id, buyNow, orderType, requestHeaders }?: CartPlatformApplicationValidator.SelectPaymentModeV2Param, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.UpdateAddressParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateAddress * @summary: Updates an existing customer address * @description: Update the user address - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateAddress/). */ - updateAddress({ id, body, requestHeaders }?: CartPlatformApplicationValidator.UpdateAddressParam, { responseHeaders }?: object): Promise; + updateAddress({ id, body, requestHeaders }?: CartPlatformApplicationValidator.UpdateAddressParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.UpdateCartParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCart * @summary: Update cart items * @description: Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCart/). */ - updateCart({ cartId, body, b, requestHeaders }?: CartPlatformApplicationValidator.UpdateCartParam, { responseHeaders }?: object): Promise; + updateCart({ cartId, body, b, requestHeaders }?: CartPlatformApplicationValidator.UpdateCartParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.UpdateCartMetaParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCartMeta * @summary: Update cart metadata * @description: Add or modify metadata associated with a cart, which includes customer preferences, delivery instructions, or any special requirements related to the cart items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartMeta/). */ - updateCartMeta({ body, id, buyNow, requestHeaders }?: CartPlatformApplicationValidator.UpdateCartMetaParam, { responseHeaders }?: object): Promise; + updateCartMeta({ body, id, buyNow, requestHeaders }?: CartPlatformApplicationValidator.UpdateCartMetaParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.UpdateCartMetaConfigParam} arg * - Arg object @@ -569,34 +538,34 @@ declare class Cart { * @param {CartPlatformApplicationValidator.UpdateCartUserParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCartUser * @summary: Update user of a cart * @description: Modify the cart user to a new valid customer for the provided customer ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartUser/). */ - updateCartUser({ body, id, requestHeaders }?: CartPlatformApplicationValidator.UpdateCartUserParam, { responseHeaders }?: object): Promise; + updateCartUser({ body, id, requestHeaders }?: CartPlatformApplicationValidator.UpdateCartUserParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.UpdateCartWithSharedItemsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCartWithSharedItems * @summary: Update shared cart items * @description: Customer can either merge or replace shared cart items with existing cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartWithSharedItems/). */ - updateCartWithSharedItems({ token, action, cartId, requestHeaders }?: CartPlatformApplicationValidator.UpdateCartWithSharedItemsParam, { responseHeaders }?: object): Promise; + updateCartWithSharedItems({ token, action, cartId, requestHeaders }?: CartPlatformApplicationValidator.UpdateCartWithSharedItemsParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.UpdateCouponParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCoupon * @summary: Update a coupon * @description: Update the details of an existing coupon by specifying its unique identifier. This includes modifying coupon attributes such as discount percentage, validity period, and associated conditions. Leveraging this functionality allows businesses to quickly adapt their promotional strategies to changing market dynamics. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCoupon/). */ - updateCoupon({ id, body, requestHeaders }?: CartPlatformApplicationValidator.UpdateCouponParam, { responseHeaders }?: object): Promise; + updateCoupon({ id, body, requestHeaders }?: CartPlatformApplicationValidator.UpdateCouponParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.UpdateCouponPartiallyParam} arg * - Arg object @@ -615,22 +584,22 @@ declare class Cart { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updatePriceAdjustment * @summary: Update price adjustments * @description: Modify price adjustments for specific items in the cart. By providing the seller ID, sales channel ID, and price adjustment ID, seller can apply discounts or other adjustments to the prices of cart items, facilitating dynamic pricing strategies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updatePriceAdjustment/). */ - updatePriceAdjustment({ id, body, requestHeaders }?: CartPlatformApplicationValidator.UpdatePriceAdjustmentParam, { responseHeaders }?: object): Promise; + updatePriceAdjustment({ id, body, requestHeaders }?: CartPlatformApplicationValidator.UpdatePriceAdjustmentParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.UpdatePromotionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updatePromotion * @summary: Update a promotion * @description: Update the details of an existing promotion by specifying its unique identifier. This includes modifying promotion attributes such as discount percentage, validity period, and associated conditions. Leveraging this functionality allows businesses to quickly adapt their promotional strategies to changing market dynamics. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updatePromotion/). */ - updatePromotion({ id, body, requestHeaders }?: CartPlatformApplicationValidator.UpdatePromotionParam, { responseHeaders }?: object): Promise; + updatePromotion({ id, body, requestHeaders }?: CartPlatformApplicationValidator.UpdatePromotionParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.UpdatePromotionPartiallyParam} arg * - Arg object @@ -647,13 +616,13 @@ declare class Cart { * @param {CartPlatformApplicationValidator.UpdateShipmentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name updateShipments * @summary: Update shipments * @description: Update the quantity or delivery type of the shipments. Customers can switch the order type from Home Delivery to Pick At Store and vice versa. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateShipments/). */ - updateShipments({ body, i, p, id, addressId, areaCode, orderType, requestHeaders }?: CartPlatformApplicationValidator.UpdateShipmentsParam, { responseHeaders }?: object): Promise; + updateShipments({ body, i, p, id, addressId, areaCode, orderType, requestHeaders }?: CartPlatformApplicationValidator.UpdateShipmentsParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.ValidateCouponForPaymentParam} arg * - Arg object diff --git a/sdk/platform/Cart/CartPlatformApplicationClient.js b/sdk/platform/Cart/CartPlatformApplicationClient.js index c01b04033..72c3b8617 100644 --- a/sdk/platform/Cart/CartPlatformApplicationClient.js +++ b/sdk/platform/Cart/CartPlatformApplicationClient.js @@ -19,7 +19,7 @@ class Cart { * @param {CartPlatformApplicationValidator.AddAddressParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addAddress * @summary: Creates a new address for a customer * @description: Customers can add a new address to their cart to save details such as name, email, contact information, and address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addAddress/). @@ -73,7 +73,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.SaveAddressDetails().validate(responseData, { + } = CartPlatformModel.SaveAddressResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -96,7 +96,7 @@ class Cart { * @param {CartPlatformApplicationValidator.AddItemsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addItems * @summary: Add items to cart * @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/addItems/). @@ -155,7 +155,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.AddCartDetailResult().validate(responseData, { + } = CartPlatformModel.AddCartDetailResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -178,7 +178,7 @@ class Cart { * @param {CartPlatformApplicationValidator.AddPriceAdjustmentParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addPriceAdjustment * @summary: Create price adjustments * @description: Create custom price adjustments for items in the cart, facilitating the application of discounts or promotions. Price adjustments can be tailored based on specific sales channel contexts, enhancing flexibility in pricing strategies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addPriceAdjustment/). @@ -234,7 +234,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.GetPriceAdjustmentResult().validate(responseData, { + } = CartPlatformModel.PriceAdjustmentResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -257,7 +257,7 @@ class Cart { * @param {CartPlatformApplicationValidator.ApplyCouponParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name applyCoupon * @summary: Apply coupon * @description: Apply a coupon code to the customer's cart to trigger discounts on eligible items - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/applyCoupon/). @@ -326,7 +326,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.CartDetailResult().validate(responseData, { + } = CartPlatformModel.CartDetailResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -351,8 +351,9 @@ class Cart { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name checkCartServiceability * @summary: Check cart serviceability * @description: Verify the serviceability of items in the cart at a specific pin code and ensure accurate delivery promises. System checks each item's availability and delivery feasibility, providing real-time information on serviceability and estimated delivery times. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/checkCartServiceability/). @@ -408,7 +409,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.OpenApiCartServiceabilityResult().validate( + } = CartPlatformModel.OpenApiCartServiceabilityResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -431,7 +432,7 @@ class Cart { * @param {CartPlatformApplicationValidator.CheckoutCartParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name checkoutCart * @summary: Checkout cart * @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/checkoutCart/). @@ -485,7 +486,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.OpenApiCheckoutResult().validate(responseData, { + } = CartPlatformModel.OpenApiCheckoutResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -589,7 +590,7 @@ class Cart { * @param {CartPlatformApplicationValidator.CreateCouponParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createCoupon * @summary: Create a coupon * @description: Creates a new coupon based on the selected coupon type. Sellers can choose from multiple supported coupon types, including percentage value, fixed amount value, bundled discount, buy X get Y items, and more, along with customizable coupon criteria to meet specific business requirements. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/createCoupon/). @@ -643,7 +644,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.CouponCreateResult().validate(responseData, { + } = CartPlatformModel.SuccessMessage().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -666,7 +667,7 @@ class Cart { * @param {CartPlatformApplicationValidator.CreatePromotionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createPromotion * @summary: Create a promotion * @description: Creates a new promotion based on the selected promotion type. Sellers can choose from multiple supported promotion types, including percentage value, fixed amount value, bundled discount, buy X get Y items, and more, along with customizable promotion criteria to meet specific business requirements. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/createPromotion/). @@ -722,7 +723,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.PromotionAddResult().validate(responseData, { + } = CartPlatformModel.PromotionAdd().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -745,7 +746,7 @@ class Cart { * @param {CartPlatformApplicationValidator.DeleteCartParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteCart * @summary: Delete a cart * @description: Delete all items from the user's cart and resets it to its initial state, providing a clean slate for new selections. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/deleteCart/). @@ -802,7 +803,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.DeleteCartDetailResult().validate(responseData, { + } = CartPlatformModel.DeleteCartDetailResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -821,169 +822,13 @@ class Cart { return response; } - /** - * @param {CartPlatformApplicationValidator.DeleteCouponParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deleteCoupon - * @summary: Delete a coupon which is in draft state - * @description: Delete details of a draft coupon by providing its unique identifier to delete information such as coupon type, rules, validity period and other related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/deleteCoupon/). - */ - async deleteCoupon( - { id, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = CartPlatformApplicationValidator.deleteCoupon().validate( - { - id, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = CartPlatformApplicationValidator.deleteCoupon().validate( - { - id, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > Cart > deleteCoupon \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "delete", - `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon/${id}`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = CartPlatformModel.SuccessMessage().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > Cart > deleteCoupon \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {CartPlatformApplicationValidator.DeletePromotionParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deletePromotion - * @summary: Delete a promotion which is in draft state - * @description: Delete details of a draft promotion by providing its unique identifier to delete information such as promotion type, rules, validity period and other related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/deletePromotion/). - */ - async deletePromotion( - { id, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = CartPlatformApplicationValidator.deletePromotion().validate( - { - id, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = CartPlatformApplicationValidator.deletePromotion().validate( - { - id, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > Cart > deletePromotion \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "delete", - `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/promotion/${id}`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = CartPlatformModel.SuccessMessage().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > Cart > deletePromotion \n ${res_error}`, - }); - } - } - - return response; - } - /** * @param {CartPlatformApplicationValidator.FetchAndvalidateCartItemsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name fetchAndvalidateCartItems * @summary: Get and validate cart items * @description: Retrieve cart details for a provided list of cart items and validate its contents. This ensures accuracy and completeness in cart information, including item quantities, prices, discounts, and applicable taxes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/fetchAndvalidateCartItems/). @@ -1039,7 +884,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.OpenapiCartDetailsResult().validate(responseData, { + } = CartPlatformModel.OpenapiCartDetailsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1137,7 +982,7 @@ class Cart { * @param {CartPlatformApplicationValidator.GetAbandonedCartParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAbandonedCart * @summary: Get abandoned carts * @description: Retrieve the list of abandoned carts that have been active for the specified period of time and have not yet been archived for the specific sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAbandonedCart/). @@ -1221,7 +1066,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.AbandonedCartResult().validate(responseData, { + } = CartPlatformModel.AbandonedCartResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1246,7 +1091,7 @@ class Cart { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAbandonedCartDetails * @summary: Get abandoned cart details * @description: Retrieves abandoned cart details linked to a specific customer using a unique cart ID. It offers an overview of the items, quantities, prices, and other relevant information associated with the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAbandonedCartDetails/). @@ -1312,7 +1157,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.CartDetailResult().validate(responseData, { + } = CartPlatformModel.CartDetailResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1445,7 +1290,7 @@ class Cart { * @param {CartPlatformApplicationValidator.GetAddressesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getAddresses * @summary: Get a list of addresses for a customer @@ -1528,10 +1373,10 @@ class Cart { const { error: res_error, - } = CartPlatformModel.PlatformGetAddressesDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = CartPlatformModel.PlatformGetAddressesResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1551,9 +1396,9 @@ class Cart { * @param {CartPlatformApplicationValidator.GetAppCouponsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAppCoupons - * @summary: List of coupons + * @summary: List coupons * @description: Retrieve a list of all available coupons that customer can apply to their carts. It provides details about each coupon, including its code, discount amount, and applicable conditions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAppCoupons/). */ async getAppCoupons( @@ -1615,7 +1460,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.GetCouponResult().validate(responseData, { + } = CartPlatformModel.GetCouponResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1640,7 +1485,7 @@ class Cart { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAvailableDeliveryModes * @summary: Get delivery modes * @description: Retrieve a list of delivery modes (home delivery/store pickup) along with a list of available pickup stores for a given cart at a specified PIN Code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAvailableDeliveryModes/). @@ -1700,7 +1545,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.CartDeliveryModesDetails().validate(responseData, { + } = CartPlatformModel.CartDeliveryModesResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1723,7 +1568,7 @@ class Cart { * @param {CartPlatformApplicationValidator.GetCartParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCart * @summary: Get a cart * @description: Retrieve details of a cart linked to a specific customer using either the customer's ID or a unique cart ID. It offers an overview of the items, quantities, prices, and other relevant information associated with the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCart/). @@ -1798,7 +1643,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.CartDetailResult().validate(responseData, { + } = CartPlatformModel.CartDetailResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1821,10 +1666,10 @@ class Cart { * @param {CartPlatformApplicationValidator.GetCartListParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCartList - * @summary: List of carts - * @description: Retrieve the list of active carts associated with a specific customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartList/). + * @summary: List carts + * @description: Retrieve the list of active carts associated with a specific customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartList/). */ async getCartList( { fromDate, toDate, filterOn, requestHeaders } = { requestHeaders: {} }, @@ -1882,7 +1727,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.MultiCartResult().validate(responseData, { + } = CartPlatformModel.MultiCartResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1905,7 +1750,7 @@ class Cart { * @param {CartPlatformApplicationValidator.GetCartShareLinkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCartShareLink * @summary: Share cart link * @description: Generate a unique shareable link for the customer's cart for a specific sales channel. This link enables easy sharing of the cart contents with other users, facilitating collaborative shopping experiences. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartShareLink/). @@ -1961,7 +1806,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.GetShareCartLinkResult().validate(responseData, { + } = CartPlatformModel.GetShareCartLinkResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1984,7 +1829,7 @@ class Cart { * @param {CartPlatformApplicationValidator.GetCartSharedItemsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCartSharedItems * @summary: List shared cart items * @description: Retrieve the cart items from the shared cart link based on unique token. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartSharedItems/). @@ -2040,7 +1885,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.SharedCartResult().validate(responseData, { + } = CartPlatformModel.SharedCartResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2293,9 +2138,9 @@ class Cart { * @param {CartPlatformApplicationValidator.GetCouponsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCoupons - * @summary: List of coupons + * @summary: List coupons * @description: Retrieve a list of all created coupons for specific sales channel. It also supports searching based on text search, pagination and other flags to filter coupons. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCoupons/). */ async getCoupons( @@ -2308,13 +2153,6 @@ class Cart { isDisplay, typeSlug, code, - createdBy, - reviewedBy, - approvedStartTime, - approvedEndTime, - reviewStartTime, - reviewEndTime, - status, requestHeaders, } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } @@ -2329,13 +2167,6 @@ class Cart { isDisplay, typeSlug, code, - createdBy, - reviewedBy, - approvedStartTime, - approvedEndTime, - reviewStartTime, - reviewEndTime, - status, }, { abortEarly: false, allowUnknown: true } ); @@ -2356,13 +2187,6 @@ class Cart { isDisplay, typeSlug, code, - createdBy, - reviewedBy, - approvedStartTime, - approvedEndTime, - reviewStartTime, - reviewEndTime, - status, }, { abortEarly: false, allowUnknown: false } ); @@ -2382,13 +2206,6 @@ class Cart { query_params["is_display"] = isDisplay; query_params["type_slug"] = typeSlug; query_params["code"] = code; - query_params["created_by"] = createdBy; - query_params["reviewed_by"] = reviewedBy; - query_params["approved_start_time"] = approvedStartTime; - query_params["approved_end_time"] = approvedEndTime; - query_params["review_start_time"] = reviewStartTime; - query_params["review_end_time"] = reviewEndTime; - query_params["status"] = status; const response = await PlatformAPIClient.execute( this.config, @@ -2407,7 +2224,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.CouponsResult().validate(responseData, { + } = CartPlatformModel.CouponsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2430,7 +2247,7 @@ class Cart { * @param {CartPlatformApplicationValidator.GetItemCountParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getItemCount * @summary: Get a cart items count * @description: Retrieve the total count of items currently present in the customer's cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getItemCount/). @@ -2488,7 +2305,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.CartItemCountResult().validate(responseData, { + } = CartPlatformModel.CartItemCountResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2511,7 +2328,7 @@ class Cart { * @param {CartPlatformApplicationValidator.GetPriceAdjustmentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPriceAdjustments * @summary: Get a list of all price adjustments associated with a cart * @description: This API helps to get price adjustments data associated to a particular cart - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPriceAdjustments/). @@ -2568,7 +2385,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.GetPriceAdjustmentResult().validate(responseData, { + } = CartPlatformModel.GetPriceAdjustmentResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2593,7 +2410,7 @@ class Cart { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPromosCouponConfig * @summary: Get promotion and coupon type * @description: Retrieve the configuration settings related to promotions and coupons for a specific seller. It provides details of the supported types of coupons and promotions along with their descriptions, examples, and related attributes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromosCouponConfig/). @@ -2653,7 +2470,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.ActivePromosResult().validate(responseData, { + } = CartPlatformModel.ActivePromosResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2676,9 +2493,9 @@ class Cart { * @param {CartPlatformApplicationValidator.GetPromotionByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPromotionById - * @summary: Get a specific promotion + * @summary: Get a promotion * @description: Retrieve details of a specific promotion by providing its unique identifier to obtain information such as promotion type, rules, validity period and other related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionById/). */ async getPromotionById( @@ -2732,7 +2549,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.PromotionUpdateResult().validate(responseData, { + } = CartPlatformModel.PromotionUpdate().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2835,21 +2652,15 @@ class Cart { * @param {CartPlatformApplicationValidator.GetPromotionOffersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPromotionOffers - * @summary: List of all available promotion offers + * @summary: List available promotion offers * @description: Retrieve a list of all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionOffers/). */ async getPromotionOffers( - { - slug, - pageSize, - promotionGroup, - storeId, - cartType, - sortBy, - requestHeaders, - } = { requestHeaders: {} }, + { slug, pageSize, promotionGroup, storeId, cartType, requestHeaders } = { + requestHeaders: {}, + }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -2861,7 +2672,6 @@ class Cart { promotionGroup, storeId, cartType, - sortBy, }, { abortEarly: false, allowUnknown: true } ); @@ -2879,7 +2689,6 @@ class Cart { promotionGroup, storeId, cartType, - sortBy, }, { abortEarly: false, allowUnknown: false } ); @@ -2896,7 +2705,6 @@ class Cart { query_params["promotion_group"] = promotionGroup; query_params["store_id"] = storeId; query_params["cart_type"] = cartType; - query_params["sort_by"] = sortBy; const response = await PlatformAPIClient.execute( this.config, @@ -2915,7 +2723,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.PromotionOffersDetails().validate(responseData, { + } = CartPlatformModel.PromotionOffersResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2940,7 +2748,7 @@ class Cart { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getPromotionPaymentOffers * @summary: Fetch available promotions payment offers @@ -3001,7 +2809,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.PromotionPaymentOffersDetails().validate( + } = CartPlatformModel.PromotionPaymentOffersResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3024,9 +2832,9 @@ class Cart { * @param {CartPlatformApplicationValidator.GetPromotionsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPromotions - * @summary: List of promotions + * @summary: List promotions * @description: Retrieve a list of all created promotions for specific sales channel. It also supports efficient text search and pagination functionalities, ensuring optimized promotion listing for streamlined navigation and management. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotions/). */ async getPromotions( @@ -3039,13 +2847,6 @@ class Cart { promotionType, fpPanel, promotionId, - createdBy, - reviewedBy, - approvedStartTime, - approvedEndTime, - reviewStartTime, - reviewEndTime, - status, requestHeaders, } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } @@ -3060,13 +2861,6 @@ class Cart { promotionType, fpPanel, promotionId, - createdBy, - reviewedBy, - approvedStartTime, - approvedEndTime, - reviewStartTime, - reviewEndTime, - status, }, { abortEarly: false, allowUnknown: true } ); @@ -3087,13 +2881,6 @@ class Cart { promotionType, fpPanel, promotionId, - createdBy, - reviewedBy, - approvedStartTime, - approvedEndTime, - reviewStartTime, - reviewEndTime, - status, }, { abortEarly: false, allowUnknown: false } ); @@ -3113,13 +2900,6 @@ class Cart { query_params["promotion_type"] = promotionType; query_params["fp_panel"] = fpPanel; query_params["promotion_id"] = promotionId; - query_params["created_by"] = createdBy; - query_params["reviewed_by"] = reviewedBy; - query_params["approved_start_time"] = approvedStartTime; - query_params["approved_end_time"] = approvedEndTime; - query_params["review_start_time"] = reviewStartTime; - query_params["review_end_time"] = reviewEndTime; - query_params["status"] = status; const response = await PlatformAPIClient.execute( this.config, @@ -3138,7 +2918,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.PromotionsResult().validate(responseData, { + } = CartPlatformModel.PromotionsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3161,7 +2941,7 @@ class Cart { * @param {CartPlatformApplicationValidator.GetShipmentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getShipments * @summary: Get shipments details @@ -3248,10 +3028,10 @@ class Cart { const { error: res_error, - } = CartPlatformModel.PlatformCartShipmentsResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = CartPlatformModel.PlatformCartShipmentsResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -3273,7 +3053,7 @@ class Cart { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getStoreAddressByUid * @summary: Get Store Address * @description: Retrieve store details by entering the unique identifier of the pickup stores. Store details include the seller's name, contact information such as email address or phone number and business address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getStoreAddressByUid/). @@ -3330,7 +3110,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.StoreDetails().validate(responseData, { + } = CartPlatformModel.StoreDetailsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3353,7 +3133,7 @@ class Cart { * @param {CartPlatformApplicationValidator.OverrideCartParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name overrideCart * @summary: Update cart checkout * @description: Overrides the cart's checkout process with a new provided cart items. It provides flexibility in customizing checkout flows to meet specific business requirements, enhancing the user experience and optimizing order processing workflows. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/overrideCart/). @@ -3407,7 +3187,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.OverrideCheckoutResult().validate(responseData, { + } = CartPlatformModel.OverrideCheckoutResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3430,7 +3210,7 @@ class Cart { * @param {CartPlatformApplicationValidator.PlatformAddItemsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name platformAddItems * @summary: Add items to cart * @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/). @@ -3503,7 +3283,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.AddCartDetailResult().validate(responseData, { + } = CartPlatformModel.AddCartDetailResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3522,97 +3302,13 @@ class Cart { return response; } - /** - * @param {CartPlatformApplicationValidator.PlatformCheckoutCartParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name platformCheckoutCart - * @summary: Checkout cart - * @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/). - */ - async platformCheckoutCart( - { body, id, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = CartPlatformApplicationValidator.platformCheckoutCart().validate( - { - body, - id, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = CartPlatformApplicationValidator.platformCheckoutCart().validate( - { - body, - id, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > Cart > platformCheckoutCart \n ${warrning}`, - }); - } - - const query_params = {}; - query_params["id"] = id; - - const response = await PlatformAPIClient.execute( - this.config, - "post", - `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/checkout`, - query_params, - body, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = CartPlatformModel.CartCheckoutResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > Cart > platformCheckoutCart \n ${res_error}`, - }); - } - } - - return response; - } - /** * @param {CartPlatformApplicationValidator.PlatformCheckoutCartV2Param} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name platformCheckoutCartV2 * @summary: Checkout cart * @description: The checkout cart initiates the order creation process based on the items in the user’s cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCartV2/). @@ -3671,7 +3367,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.CartCheckoutDetails().validate(responseData, { + } = CartPlatformModel.CartCheckoutResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3694,7 +3390,7 @@ class Cart { * @param {CartPlatformApplicationValidator.PlatformUpdateCartParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name platformUpdateCart * @summary: Update cart items * @description: Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformUpdateCart/). @@ -3767,7 +3463,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.UpdateCartDetailResult().validate(responseData, { + } = CartPlatformModel.UpdateCartDetailResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3790,7 +3486,7 @@ class Cart { * @param {CartPlatformApplicationValidator.RemoveAddressParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name removeAddress * @summary: Removes an address from a customer's address list * @description: Remove an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeAddress/). @@ -3847,7 +3543,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.DeleteAddressResult().validate(responseData, { + } = CartPlatformModel.DeleteAddressResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3870,7 +3566,7 @@ class Cart { * @param {CartPlatformApplicationValidator.RemoveCouponParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name removeCoupon * @summary: Remove coupon * @description: Remove an applied coupon from the customer's cart, thereby removing the associated discount from the cart total. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeCoupon/). @@ -3928,7 +3624,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.CartDetailResult().validate(responseData, { + } = CartPlatformModel.CartDetailResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4032,7 +3728,7 @@ class Cart { * @param {CartPlatformApplicationValidator.SelectAddressParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name selectAddress * @summary: Select customer address for order processing * @description: Select an address from the saved customer addresses and validates the availability of items in the cart. Additionally, it verifies and updates the delivery promise based on the selected address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectAddress/). @@ -4098,7 +3794,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.CartDetailResult().validate(responseData, { + } = CartPlatformModel.CartDetailResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4121,7 +3817,7 @@ class Cart { * @param {CartPlatformApplicationValidator.SelectPaymentModeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name selectPaymentMode * @summary: Select payment mode * @description: Customers can select a preferred payment mode from available options during the cart checkout process to securely and efficiently complete their transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectPaymentMode/). @@ -4186,7 +3882,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.CartDetailResult().validate(responseData, { + } = CartPlatformModel.CartDetailResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4209,7 +3905,7 @@ class Cart { * @param {CartPlatformApplicationValidator.SelectPaymentModeV2Param} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name selectPaymentModeV2 * @summary: Select payment mode (latest) * @description: Selection of payment mode that supports multiple MOP(mode of payment). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectPaymentModeV2/). @@ -4274,7 +3970,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.CartDetailResult().validate(responseData, { + } = CartPlatformModel.CartDetailResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4297,7 +3993,7 @@ class Cart { * @param {CartPlatformApplicationValidator.UpdateAddressParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateAddress * @summary: Updates an existing customer address * @description: Update the user address - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateAddress/). @@ -4353,7 +4049,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.UpdateAddressDetails().validate(responseData, { + } = CartPlatformModel.UpdateAddressResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4376,7 +4072,7 @@ class Cart { * @param {CartPlatformApplicationValidator.UpdateCartParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCart * @summary: Update cart items * @description: Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCart/). @@ -4435,7 +4131,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.UpdateCartDetailResult().validate(responseData, { + } = CartPlatformModel.UpdateCartDetailResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4458,7 +4154,7 @@ class Cart { * @param {CartPlatformApplicationValidator.UpdateCartMetaParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCartMeta * @summary: Update cart metadata * @description: Add or modify metadata associated with a cart, which includes customer preferences, delivery instructions, or any special requirements related to the cart items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartMeta/). @@ -4520,7 +4216,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.CartMetaDetails().validate(responseData, { + } = CartPlatformModel.CartMetaResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4626,7 +4322,7 @@ class Cart { * @param {CartPlatformApplicationValidator.UpdateCartUserParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCartUser * @summary: Update user of a cart * @description: Modify the cart user to a new valid customer for the provided customer ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartUser/). @@ -4685,7 +4381,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.UserCartMappingResult().validate(responseData, { + } = CartPlatformModel.UserCartMappingResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4710,7 +4406,7 @@ class Cart { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCartWithSharedItems * @summary: Update shared cart items * @description: Customer can either merge or replace shared cart items with existing cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartWithSharedItems/). @@ -4771,7 +4467,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.SharedCartResult().validate(responseData, { + } = CartPlatformModel.SharedCartResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4794,7 +4490,7 @@ class Cart { * @param {CartPlatformApplicationValidator.UpdateCouponParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateCoupon * @summary: Update a coupon * @description: Update the details of an existing coupon by specifying its unique identifier. This includes modifying coupon attributes such as discount percentage, validity period, and associated conditions. Leveraging this functionality allows businesses to quickly adapt their promotional strategies to changing market dynamics. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCoupon/). @@ -4850,7 +4546,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.CouponCreateResult().validate(responseData, { + } = CartPlatformModel.SuccessMessage().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4958,7 +4654,7 @@ class Cart { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updatePriceAdjustment * @summary: Update price adjustments * @description: Modify price adjustments for specific items in the cart. By providing the seller ID, sales channel ID, and price adjustment ID, seller can apply discounts or other adjustments to the prices of cart items, facilitating dynamic pricing strategies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updatePriceAdjustment/). @@ -5016,7 +4712,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.GetPriceAdjustmentResult().validate(responseData, { + } = CartPlatformModel.PriceAdjustmentResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -5039,7 +4735,7 @@ class Cart { * @param {CartPlatformApplicationValidator.UpdatePromotionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updatePromotion * @summary: Update a promotion * @description: Update the details of an existing promotion by specifying its unique identifier. This includes modifying promotion attributes such as discount percentage, validity period, and associated conditions. Leveraging this functionality allows businesses to quickly adapt their promotional strategies to changing market dynamics. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updatePromotion/). @@ -5097,7 +4793,7 @@ class Cart { const { error: res_error, - } = CartPlatformModel.PromotionUpdateResult().validate(responseData, { + } = CartPlatformModel.PromotionUpdate().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -5203,7 +4899,7 @@ class Cart { * @param {CartPlatformApplicationValidator.UpdateShipmentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name updateShipments * @summary: Update shipments @@ -5280,10 +4976,10 @@ class Cart { const { error: res_error, - } = CartPlatformModel.PlatformCartShipmentsResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = CartPlatformModel.PlatformCartShipmentsResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { diff --git a/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts b/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts index a44c71d4b..97fb5cf2f 100644 --- a/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +++ b/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts @@ -5,9 +5,9 @@ export = CartPlatformApplicationValidator; */ /** * @typedef AddItemsParam - * @property {string} cartId - Current Cart id of user cart + * @property {string} cartId - Current Cart _id * @property {boolean} [b] - * @property {CartPlatformModel.AddCartCreation} body + * @property {CartPlatformModel.AddCartRequest} body */ /** * @typedef AddPriceAdjustmentParam @@ -20,11 +20,11 @@ export = CartPlatformApplicationValidator; * @property {boolean} [p] * @property {string} [id] * @property {boolean} [buyNow] - * @property {CartPlatformModel.ApplyCouponDetails} body + * @property {CartPlatformModel.ApplyCouponRequest} body */ /** * @typedef CheckCartServiceabilityParam - * @property {CartPlatformModel.OpenApiCartServiceabilityCreation} body + * @property {CartPlatformModel.OpenApiCartServiceabilityRequest} body */ /** * @typedef CheckoutCartParam @@ -45,19 +45,11 @@ export = CartPlatformApplicationValidator; /** * @typedef DeleteCartParam * @property {string} [id] - The unique identifier of the cart. - * @property {CartPlatformModel.DeleteCartDetails} body - */ -/** - * @typedef DeleteCouponParam - * @property {string} id - */ -/** - * @typedef DeletePromotionParam - * @property {string} id + * @property {CartPlatformModel.DeleteCartRequest} body */ /** * @typedef FetchAndvalidateCartItemsParam - * @property {CartPlatformModel.OpenapiCartDetailsCreation} body + * @property {CartPlatformModel.OpenapiCartDetailsRequest} body */ /** @typedef FetchCartMetaConfigParam */ /** @@ -133,7 +125,7 @@ export = CartPlatformApplicationValidator; */ /** * @typedef GetCartShareLinkParam - * @property {CartPlatformModel.GetShareCartLinkCreation} body + * @property {CartPlatformModel.GetShareCartLinkRequest} body */ /** * @typedef GetCartSharedItemsParam @@ -158,13 +150,6 @@ export = CartPlatformApplicationValidator; * @property {boolean} [isDisplay] * @property {string} [typeSlug] * @property {string} [code] - * @property {string} [createdBy] - * @property {string} [reviewedBy] - * @property {string} [approvedStartTime] - * @property {string} [approvedEndTime] - * @property {string} [reviewStartTime] - * @property {string} [reviewEndTime] - * @property {string} [status] */ /** * @typedef GetItemCountParam @@ -173,12 +158,12 @@ export = CartPlatformApplicationValidator; */ /** * @typedef GetPriceAdjustmentsParam - * @property {string} cartId - Cart id of user cart + * @property {string} cartId - Cart Id */ /** * @typedef GetPromosCouponConfigParam - * @property {string} [entityType] - Entity type as promotion or coupon - * @property {boolean} [isHidden] - Promotion coupon config shown or not + * @property {string} [entityType] - Entity_type as promotion or coupon + * @property {boolean} [isHidden] - Promo-coupon config shown or not */ /** * @typedef GetPromotionByIdParam @@ -195,15 +180,13 @@ export = CartPlatformApplicationValidator; * /service/application/catalog/v1.0/products/ * @property {number} [pageSize] - Number of offers to be fetched to show * @property {string} [promotionGroup] - Type of promotion groups - * @property {number} [storeId] - Unique identifier of a store + * @property {number} [storeId] - Store id * @property {string} [cartType] - The type of cart - * @property {string} [sortBy] - Specifies the sorting criteria for the - * promotions. Sorts promotions in descending order by the value provided. */ /** * @typedef GetPromotionPaymentOffersParam - * @property {string} [id] - Cart id of the user cart - * @property {number} [uid] - Cart uid of the user cart + * @property {string} [id] - Cart id + * @property {number} [uid] - Cart uid */ /** * @typedef GetPromotionsParam @@ -215,13 +198,6 @@ export = CartPlatformApplicationValidator; * @property {string} [promotionType] * @property {string} [fpPanel] * @property {string} [promotionId] - * @property {string} [createdBy] - * @property {string} [reviewedBy] - * @property {string} [approvedStartTime] - * @property {string} [approvedEndTime] - * @property {string} [reviewStartTime] - * @property {string} [reviewEndTime] - * @property {string} [status] */ /** * @typedef GetShipmentsParam @@ -258,17 +234,12 @@ export = CartPlatformApplicationValidator; * the customer wants the order home-delivered PickAtStore - If the customer * wants the handover of an order at the store itself. * @property {string} [id] - The unique identifier of the cart - * @property {CartPlatformModel.PlatformAddCartDetails} body - */ -/** - * @typedef PlatformCheckoutCartParam - * @property {string} [id] - The unique identifier of the cart - * @property {CartPlatformModel.PlatformCartCheckoutDetailCreation} body + * @property {CartPlatformModel.PlatformAddCartRequest} body */ /** * @typedef PlatformCheckoutCartV2Param * @property {string} [id] - The unique identifier of the cart - * @property {CartPlatformModel.PlatformCartCheckoutDetailV2Creation} body + * @property {CartPlatformModel.PlatformCartCheckoutDetailV2Request} body */ /** * @typedef PlatformUpdateCartParam @@ -282,7 +253,7 @@ export = CartPlatformApplicationValidator; * the price breakup of cart items. * @property {boolean} [buyNow] - This is a boolen value. Select `true` to * set/initialize buy now cart - * @property {CartPlatformModel.PlatformUpdateCartDetails} body + * @property {CartPlatformModel.PlatformUpdateCartRequest} body */ /** * @typedef RemoveAddressParam @@ -304,20 +275,24 @@ export = CartPlatformApplicationValidator; * @property {boolean} [buyNow] * @property {boolean} [i] * @property {boolean} [b] - * @property {CartPlatformModel.PlatformSelectCartAddress} body + * @property {CartPlatformModel.PlatformSelectCartAddressRequest} body */ /** * @typedef SelectPaymentModeParam * @property {string} [id] * @property {boolean} [buyNow] - * @property {string} [orderType] - * @property {CartPlatformModel.CartPaymentUpdate} body + * @property {string} [orderType] - The order type of shipment HomeDelivery - If + * the customer wants the order home-delivered PickAtStore - If the customer + * wants the handover of an order at the store itself. + * @property {CartPlatformModel.UpdateCartPaymentRequest} body */ /** * @typedef SelectPaymentModeV2Param * @property {string} [id] * @property {boolean} [buyNow] - * @property {string} [orderType] + * @property {string} [orderType] - The order type of shipment HomeDelivery - If + * the customer wants the order home-delivered PickAtStore - If the customer + * wants the handover of an order at the store itself. * @property {CartPlatformModel.UpdateCartPaymentRequestV2} body */ /** @@ -327,20 +302,20 @@ export = CartPlatformApplicationValidator; */ /** * @typedef UpdateCartParam - * @property {string} cartId - Current Cart id of user cart + * @property {string} cartId - Current Cart _id * @property {boolean} [b] - * @property {CartPlatformModel.UpdateCartCreation} body + * @property {CartPlatformModel.UpdateCartRequest} body */ /** * @typedef UpdateCartMetaParam * @property {string} [id] * @property {boolean} [buyNow] - * @property {CartPlatformModel.PlatformCartMetaCreation} body + * @property {CartPlatformModel.PlatformCartMetaRequest} body */ /** * @typedef UpdateCartMetaConfigParam - * @property {string} cartMetaId - CartMeta id for fetching single cart meta - * data for editing + * @property {string} cartMetaId - CartMeta mongo _id for fetching single cart + * meta data for editing * @property {CartPlatformModel.CartMetaConfigUpdate} body */ /** @@ -391,7 +366,7 @@ export = CartPlatformApplicationValidator; * @property {string} [orderType] - The order type of shipment HomeDelivery - If * the customer wants the order home-delivered PickAtStore - If the customer * wants the handover of an order at the store itself. - * @property {CartPlatformModel.UpdateCartShipmentCreation} body + * @property {CartPlatformModel.UpdateCartShipmentRequest} body */ /** * @typedef ValidateCouponForPaymentParam @@ -424,10 +399,6 @@ declare class CartPlatformApplicationValidator { static createPromotion(): CreatePromotionParam; /** @returns {DeleteCartParam} */ static deleteCart(): DeleteCartParam; - /** @returns {DeleteCouponParam} */ - static deleteCoupon(): DeleteCouponParam; - /** @returns {DeletePromotionParam} */ - static deletePromotion(): DeletePromotionParam; /** @returns {FetchAndvalidateCartItemsParam} */ static fetchAndvalidateCartItems(): FetchAndvalidateCartItemsParam; /** @returns {FetchCartMetaConfigParam} */ @@ -484,8 +455,6 @@ declare class CartPlatformApplicationValidator { static overrideCart(): OverrideCartParam; /** @returns {PlatformAddItemsParam} */ static platformAddItems(): PlatformAddItemsParam; - /** @returns {PlatformCheckoutCartParam} */ - static platformCheckoutCart(): PlatformCheckoutCartParam; /** @returns {PlatformCheckoutCartV2Param} */ static platformCheckoutCartV2(): PlatformCheckoutCartV2Param; /** @returns {PlatformUpdateCartParam} */ @@ -530,18 +499,18 @@ declare class CartPlatformApplicationValidator { static validateCouponForPayment(): ValidateCouponForPaymentParam; } declare namespace CartPlatformApplicationValidator { - export { AddAddressParam, AddItemsParam, AddPriceAdjustmentParam, ApplyCouponParam, CheckCartServiceabilityParam, CheckoutCartParam, CreateCartMetaConfigParam, CreateCouponParam, CreatePromotionParam, DeleteCartParam, DeleteCouponParam, DeletePromotionParam, 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, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam }; + export { AddAddressParam, 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, RemoveCouponParam, RemovePriceAdjustmentParam, SelectAddressParam, SelectPaymentModeParam, SelectPaymentModeV2Param, UpdateAddressParam, UpdateCartParam, UpdateCartMetaParam, UpdateCartMetaConfigParam, UpdateCartUserParam, UpdateCartWithSharedItemsParam, UpdateCouponParam, UpdateCouponPartiallyParam, UpdatePriceAdjustmentParam, UpdatePromotionParam, UpdatePromotionPartiallyParam, UpdateShipmentsParam, ValidateCouponForPaymentParam }; } type AddAddressParam = { body: CartPlatformModel.PlatformAddress; }; type AddItemsParam = { /** - * - Current Cart id of user cart + * - Current Cart _id */ cartId: string; b?: boolean; - body: CartPlatformModel.AddCartCreation; + body: CartPlatformModel.AddCartRequest; }; type AddPriceAdjustmentParam = { body: CartPlatformModel.PriceAdjustmentAdd; @@ -552,10 +521,10 @@ type ApplyCouponParam = { p?: boolean; id?: string; buyNow?: boolean; - body: CartPlatformModel.ApplyCouponDetails; + body: CartPlatformModel.ApplyCouponRequest; }; type CheckCartServiceabilityParam = { - body: CartPlatformModel.OpenApiCartServiceabilityCreation; + body: CartPlatformModel.OpenApiCartServiceabilityRequest; }; type CheckoutCartParam = { body: CartPlatformModel.OpenApiPlatformCheckoutReq; @@ -574,16 +543,10 @@ type DeleteCartParam = { * - The unique identifier of the cart. */ id?: string; - body: CartPlatformModel.DeleteCartDetails; -}; -type DeleteCouponParam = { - id: string; -}; -type DeletePromotionParam = { - id: string; + body: CartPlatformModel.DeleteCartRequest; }; type FetchAndvalidateCartItemsParam = { - body: CartPlatformModel.OpenapiCartDetailsCreation; + body: CartPlatformModel.OpenapiCartDetailsRequest; }; type GetAbandonedCartParam = { pageNo?: number; @@ -670,7 +633,7 @@ type GetCartListParam = { filterOn?: string; }; type GetCartShareLinkParam = { - body: CartPlatformModel.GetShareCartLinkCreation; + body: CartPlatformModel.GetShareCartLinkRequest; }; type GetCartSharedItemsParam = { /** @@ -693,13 +656,6 @@ type GetCouponsParam = { isDisplay?: boolean; typeSlug?: string; code?: string; - createdBy?: string; - reviewedBy?: string; - approvedStartTime?: string; - approvedEndTime?: string; - reviewStartTime?: string; - reviewEndTime?: string; - status?: string; }; type GetItemCountParam = { /** @@ -713,17 +669,17 @@ type GetItemCountParam = { }; type GetPriceAdjustmentsParam = { /** - * - Cart id of user cart + * - Cart Id */ cartId: string; }; type GetPromosCouponConfigParam = { /** - * - Entity type as promotion or coupon + * - Entity_type as promotion or coupon */ entityType?: string; /** - * - Promotion coupon config shown or not + * - Promo-coupon config shown or not */ isHidden?: boolean; }; @@ -749,26 +705,21 @@ type GetPromotionOffersParam = { */ promotionGroup?: string; /** - * - Unique identifier of a store + * - Store id */ storeId?: number; /** * - The type of cart */ cartType?: string; - /** - * - Specifies the sorting criteria for the - * promotions. Sorts promotions in descending order by the value provided. - */ - sortBy?: string; }; type GetPromotionPaymentOffersParam = { /** - * - Cart id of the user cart + * - Cart id */ id?: string; /** - * - Cart uid of the user cart + * - Cart uid */ uid?: number; }; @@ -781,13 +732,6 @@ type GetPromotionsParam = { promotionType?: string; fpPanel?: string; promotionId?: string; - createdBy?: string; - reviewedBy?: string; - approvedStartTime?: string; - approvedEndTime?: string; - reviewStartTime?: string; - reviewEndTime?: string; - status?: string; }; type GetShipmentsParam = { pickAtStoreUid?: number; @@ -853,21 +797,14 @@ type PlatformAddItemsParam = { * - The unique identifier of the cart */ id?: string; - body: CartPlatformModel.PlatformAddCartDetails; -}; -type PlatformCheckoutCartParam = { - /** - * - The unique identifier of the cart - */ - id?: string; - body: CartPlatformModel.PlatformCartCheckoutDetailCreation; + body: CartPlatformModel.PlatformAddCartRequest; }; type PlatformCheckoutCartV2Param = { /** * - The unique identifier of the cart */ id?: string; - body: CartPlatformModel.PlatformCartCheckoutDetailV2Creation; + body: CartPlatformModel.PlatformCartCheckoutDetailV2Request; }; type PlatformUpdateCartParam = { /** @@ -895,7 +832,7 @@ type PlatformUpdateCartParam = { * set/initialize buy now cart */ buyNow?: boolean; - body: CartPlatformModel.PlatformUpdateCartDetails; + body: CartPlatformModel.PlatformUpdateCartRequest; }; type RemoveAddressParam = { /** @@ -919,17 +856,27 @@ type SelectAddressParam = { buyNow?: boolean; i?: boolean; b?: boolean; - body: CartPlatformModel.PlatformSelectCartAddress; + body: CartPlatformModel.PlatformSelectCartAddressRequest; }; type SelectPaymentModeParam = { id?: string; buyNow?: boolean; + /** + * - The order type of shipment HomeDelivery - If + * the customer wants the order home-delivered PickAtStore - If the customer + * wants the handover of an order at the store itself. + */ orderType?: string; - body: CartPlatformModel.CartPaymentUpdate; + body: CartPlatformModel.UpdateCartPaymentRequest; }; type SelectPaymentModeV2Param = { id?: string; buyNow?: boolean; + /** + * - The order type of shipment HomeDelivery - If + * the customer wants the order home-delivered PickAtStore - If the customer + * wants the handover of an order at the store itself. + */ orderType?: string; body: CartPlatformModel.UpdateCartPaymentRequestV2; }; @@ -942,21 +889,21 @@ type UpdateAddressParam = { }; type UpdateCartParam = { /** - * - Current Cart id of user cart + * - Current Cart _id */ cartId: string; b?: boolean; - body: CartPlatformModel.UpdateCartCreation; + body: CartPlatformModel.UpdateCartRequest; }; type UpdateCartMetaParam = { id?: string; buyNow?: boolean; - body: CartPlatformModel.PlatformCartMetaCreation; + body: CartPlatformModel.PlatformCartMetaRequest; }; type UpdateCartMetaConfigParam = { /** - * - CartMeta id for fetching single cart meta - * data for editing + * - CartMeta mongo _id for fetching single cart + * meta data for editing */ cartMetaId: string; body: CartPlatformModel.CartMetaConfigUpdate; @@ -1025,7 +972,7 @@ type UpdateShipmentsParam = { * wants the handover of an order at the store itself. */ orderType?: string; - body: CartPlatformModel.UpdateCartShipmentCreation; + body: CartPlatformModel.UpdateCartShipmentRequest; }; type ValidateCouponForPaymentParam = { id?: string; diff --git a/sdk/platform/Cart/CartPlatformApplicationValidator.js b/sdk/platform/Cart/CartPlatformApplicationValidator.js index ec0ba2515..78725ca55 100644 --- a/sdk/platform/Cart/CartPlatformApplicationValidator.js +++ b/sdk/platform/Cart/CartPlatformApplicationValidator.js @@ -9,9 +9,9 @@ const CartPlatformModel = require("./CartPlatformModel"); /** * @typedef AddItemsParam - * @property {string} cartId - Current Cart id of user cart + * @property {string} cartId - Current Cart _id * @property {boolean} [b] - * @property {CartPlatformModel.AddCartCreation} body + * @property {CartPlatformModel.AddCartRequest} body */ /** @@ -26,12 +26,12 @@ const CartPlatformModel = require("./CartPlatformModel"); * @property {boolean} [p] * @property {string} [id] * @property {boolean} [buyNow] - * @property {CartPlatformModel.ApplyCouponDetails} body + * @property {CartPlatformModel.ApplyCouponRequest} body */ /** * @typedef CheckCartServiceabilityParam - * @property {CartPlatformModel.OpenApiCartServiceabilityCreation} body + * @property {CartPlatformModel.OpenApiCartServiceabilityRequest} body */ /** @@ -57,22 +57,12 @@ const CartPlatformModel = require("./CartPlatformModel"); /** * @typedef DeleteCartParam * @property {string} [id] - The unique identifier of the cart. - * @property {CartPlatformModel.DeleteCartDetails} body - */ - -/** - * @typedef DeleteCouponParam - * @property {string} id - */ - -/** - * @typedef DeletePromotionParam - * @property {string} id + * @property {CartPlatformModel.DeleteCartRequest} body */ /** * @typedef FetchAndvalidateCartItemsParam - * @property {CartPlatformModel.OpenapiCartDetailsCreation} body + * @property {CartPlatformModel.OpenapiCartDetailsRequest} body */ /** @typedef FetchCartMetaConfigParam */ @@ -158,7 +148,7 @@ const CartPlatformModel = require("./CartPlatformModel"); /** * @typedef GetCartShareLinkParam - * @property {CartPlatformModel.GetShareCartLinkCreation} body + * @property {CartPlatformModel.GetShareCartLinkRequest} body */ /** @@ -188,13 +178,6 @@ const CartPlatformModel = require("./CartPlatformModel"); * @property {boolean} [isDisplay] * @property {string} [typeSlug] * @property {string} [code] - * @property {string} [createdBy] - * @property {string} [reviewedBy] - * @property {string} [approvedStartTime] - * @property {string} [approvedEndTime] - * @property {string} [reviewStartTime] - * @property {string} [reviewEndTime] - * @property {string} [status] */ /** @@ -205,13 +188,13 @@ const CartPlatformModel = require("./CartPlatformModel"); /** * @typedef GetPriceAdjustmentsParam - * @property {string} cartId - Cart id of user cart + * @property {string} cartId - Cart Id */ /** * @typedef GetPromosCouponConfigParam - * @property {string} [entityType] - Entity type as promotion or coupon - * @property {boolean} [isHidden] - Promotion coupon config shown or not + * @property {string} [entityType] - Entity_type as promotion or coupon + * @property {boolean} [isHidden] - Promo-coupon config shown or not */ /** @@ -231,16 +214,14 @@ const CartPlatformModel = require("./CartPlatformModel"); * /service/application/catalog/v1.0/products/ * @property {number} [pageSize] - Number of offers to be fetched to show * @property {string} [promotionGroup] - Type of promotion groups - * @property {number} [storeId] - Unique identifier of a store + * @property {number} [storeId] - Store id * @property {string} [cartType] - The type of cart - * @property {string} [sortBy] - Specifies the sorting criteria for the - * promotions. Sorts promotions in descending order by the value provided. */ /** * @typedef GetPromotionPaymentOffersParam - * @property {string} [id] - Cart id of the user cart - * @property {number} [uid] - Cart uid of the user cart + * @property {string} [id] - Cart id + * @property {number} [uid] - Cart uid */ /** @@ -253,13 +234,6 @@ const CartPlatformModel = require("./CartPlatformModel"); * @property {string} [promotionType] * @property {string} [fpPanel] * @property {string} [promotionId] - * @property {string} [createdBy] - * @property {string} [reviewedBy] - * @property {string} [approvedStartTime] - * @property {string} [approvedEndTime] - * @property {string} [reviewStartTime] - * @property {string} [reviewEndTime] - * @property {string} [status] */ /** @@ -300,19 +274,13 @@ const CartPlatformModel = require("./CartPlatformModel"); * the customer wants the order home-delivered PickAtStore - If the customer * wants the handover of an order at the store itself. * @property {string} [id] - The unique identifier of the cart - * @property {CartPlatformModel.PlatformAddCartDetails} body - */ - -/** - * @typedef PlatformCheckoutCartParam - * @property {string} [id] - The unique identifier of the cart - * @property {CartPlatformModel.PlatformCartCheckoutDetailCreation} body + * @property {CartPlatformModel.PlatformAddCartRequest} body */ /** * @typedef PlatformCheckoutCartV2Param * @property {string} [id] - The unique identifier of the cart - * @property {CartPlatformModel.PlatformCartCheckoutDetailV2Creation} body + * @property {CartPlatformModel.PlatformCartCheckoutDetailV2Request} body */ /** @@ -327,7 +295,7 @@ const CartPlatformModel = require("./CartPlatformModel"); * the price breakup of cart items. * @property {boolean} [buyNow] - This is a boolen value. Select `true` to * set/initialize buy now cart - * @property {CartPlatformModel.PlatformUpdateCartDetails} body + * @property {CartPlatformModel.PlatformUpdateCartRequest} body */ /** @@ -353,22 +321,26 @@ const CartPlatformModel = require("./CartPlatformModel"); * @property {boolean} [buyNow] * @property {boolean} [i] * @property {boolean} [b] - * @property {CartPlatformModel.PlatformSelectCartAddress} body + * @property {CartPlatformModel.PlatformSelectCartAddressRequest} body */ /** * @typedef SelectPaymentModeParam * @property {string} [id] * @property {boolean} [buyNow] - * @property {string} [orderType] - * @property {CartPlatformModel.CartPaymentUpdate} body + * @property {string} [orderType] - The order type of shipment HomeDelivery - If + * the customer wants the order home-delivered PickAtStore - If the customer + * wants the handover of an order at the store itself. + * @property {CartPlatformModel.UpdateCartPaymentRequest} body */ /** * @typedef SelectPaymentModeV2Param * @property {string} [id] * @property {boolean} [buyNow] - * @property {string} [orderType] + * @property {string} [orderType] - The order type of shipment HomeDelivery - If + * the customer wants the order home-delivered PickAtStore - If the customer + * wants the handover of an order at the store itself. * @property {CartPlatformModel.UpdateCartPaymentRequestV2} body */ @@ -380,22 +352,22 @@ const CartPlatformModel = require("./CartPlatformModel"); /** * @typedef UpdateCartParam - * @property {string} cartId - Current Cart id of user cart + * @property {string} cartId - Current Cart _id * @property {boolean} [b] - * @property {CartPlatformModel.UpdateCartCreation} body + * @property {CartPlatformModel.UpdateCartRequest} body */ /** * @typedef UpdateCartMetaParam * @property {string} [id] * @property {boolean} [buyNow] - * @property {CartPlatformModel.PlatformCartMetaCreation} body + * @property {CartPlatformModel.PlatformCartMetaRequest} body */ /** * @typedef UpdateCartMetaConfigParam - * @property {string} cartMetaId - CartMeta id for fetching single cart meta - * data for editing + * @property {string} cartMetaId - CartMeta mongo _id for fetching single cart + * meta data for editing * @property {CartPlatformModel.CartMetaConfigUpdate} body */ @@ -454,7 +426,7 @@ const CartPlatformModel = require("./CartPlatformModel"); * @property {string} [orderType] - The order type of shipment HomeDelivery - If * the customer wants the order home-delivered PickAtStore - If the customer * wants the handover of an order at the store itself. - * @property {CartPlatformModel.UpdateCartShipmentCreation} body + * @property {CartPlatformModel.UpdateCartShipmentRequest} body */ /** @@ -481,7 +453,7 @@ class CartPlatformApplicationValidator { return Joi.object({ cartId: Joi.string().allow("").required(), b: Joi.boolean(), - body: CartPlatformModel.AddCartCreation().required(), + body: CartPlatformModel.AddCartRequest().required(), }).required(); } @@ -500,14 +472,14 @@ class CartPlatformApplicationValidator { p: Joi.boolean(), id: Joi.string().allow(""), buyNow: Joi.boolean(), - body: CartPlatformModel.ApplyCouponDetails().required(), + body: CartPlatformModel.ApplyCouponRequest().required(), }).required(); } /** @returns {CheckCartServiceabilityParam} */ static checkCartServiceability() { return Joi.object({ - body: CartPlatformModel.OpenApiCartServiceabilityCreation().required(), + body: CartPlatformModel.OpenApiCartServiceabilityRequest().required(), }).required(); } @@ -543,28 +515,14 @@ class CartPlatformApplicationValidator { static deleteCart() { return Joi.object({ id: Joi.string().allow(""), - body: CartPlatformModel.DeleteCartDetails().required(), - }).required(); - } - - /** @returns {DeleteCouponParam} */ - static deleteCoupon() { - return Joi.object({ - id: Joi.string().allow("").required(), - }).required(); - } - - /** @returns {DeletePromotionParam} */ - static deletePromotion() { - return Joi.object({ - id: Joi.string().allow("").required(), + body: CartPlatformModel.DeleteCartRequest().required(), }).required(); } /** @returns {FetchAndvalidateCartItemsParam} */ static fetchAndvalidateCartItems() { return Joi.object({ - body: CartPlatformModel.OpenapiCartDetailsCreation().required(), + body: CartPlatformModel.OpenapiCartDetailsRequest().required(), }).required(); } @@ -666,7 +624,7 @@ class CartPlatformApplicationValidator { /** @returns {GetCartShareLinkParam} */ static getCartShareLink() { return Joi.object({ - body: CartPlatformModel.GetShareCartLinkCreation().required(), + body: CartPlatformModel.GetShareCartLinkRequest().required(), }).required(); } @@ -707,13 +665,6 @@ class CartPlatformApplicationValidator { isDisplay: Joi.boolean(), typeSlug: Joi.string().allow(""), code: Joi.string().allow(""), - createdBy: Joi.string().allow(""), - reviewedBy: Joi.string().allow(""), - approvedStartTime: Joi.string().allow(""), - approvedEndTime: Joi.string().allow(""), - reviewStartTime: Joi.string().allow(""), - reviewEndTime: Joi.string().allow(""), - status: Joi.string().allow(""), }).required(); } @@ -762,7 +713,6 @@ class CartPlatformApplicationValidator { promotionGroup: Joi.string().allow(""), storeId: Joi.number(), cartType: Joi.string().allow(""), - sortBy: Joi.string().allow(""), }).required(); } @@ -785,13 +735,6 @@ class CartPlatformApplicationValidator { promotionType: Joi.string().allow(""), fpPanel: Joi.string().allow(""), promotionId: Joi.string().allow(""), - createdBy: Joi.string().allow(""), - reviewedBy: Joi.string().allow(""), - approvedStartTime: Joi.string().allow(""), - approvedEndTime: Joi.string().allow(""), - reviewStartTime: Joi.string().allow(""), - reviewEndTime: Joi.string().allow(""), - status: Joi.string().allow(""), }).required(); } @@ -831,15 +774,7 @@ class CartPlatformApplicationValidator { buyNow: Joi.boolean(), orderType: Joi.string().allow(""), id: Joi.string().allow(""), - body: CartPlatformModel.PlatformAddCartDetails().required(), - }).required(); - } - - /** @returns {PlatformCheckoutCartParam} */ - static platformCheckoutCart() { - return Joi.object({ - id: Joi.string().allow(""), - body: CartPlatformModel.PlatformCartCheckoutDetailCreation().required(), + body: CartPlatformModel.PlatformAddCartRequest().required(), }).required(); } @@ -847,7 +782,7 @@ class CartPlatformApplicationValidator { static platformCheckoutCartV2() { return Joi.object({ id: Joi.string().allow(""), - body: CartPlatformModel.PlatformCartCheckoutDetailV2Creation().required(), + body: CartPlatformModel.PlatformCartCheckoutDetailV2Request().required(), }).required(); } @@ -859,7 +794,7 @@ class CartPlatformApplicationValidator { orderType: Joi.string().allow(""), b: Joi.boolean(), buyNow: Joi.boolean(), - body: CartPlatformModel.PlatformUpdateCartDetails().required(), + body: CartPlatformModel.PlatformUpdateCartRequest().required(), }).required(); } @@ -893,7 +828,7 @@ class CartPlatformApplicationValidator { buyNow: Joi.boolean(), i: Joi.boolean(), b: Joi.boolean(), - body: CartPlatformModel.PlatformSelectCartAddress().required(), + body: CartPlatformModel.PlatformSelectCartAddressRequest().required(), }).required(); } @@ -903,7 +838,7 @@ class CartPlatformApplicationValidator { id: Joi.string().allow(""), buyNow: Joi.boolean(), orderType: Joi.string().allow(""), - body: CartPlatformModel.CartPaymentUpdate().required(), + body: CartPlatformModel.UpdateCartPaymentRequest().required(), }).required(); } @@ -930,7 +865,7 @@ class CartPlatformApplicationValidator { return Joi.object({ cartId: Joi.string().allow("").required(), b: Joi.boolean(), - body: CartPlatformModel.UpdateCartCreation().required(), + body: CartPlatformModel.UpdateCartRequest().required(), }).required(); } @@ -939,7 +874,7 @@ class CartPlatformApplicationValidator { return Joi.object({ id: Joi.string().allow(""), buyNow: Joi.boolean(), - body: CartPlatformModel.PlatformCartMetaCreation().required(), + body: CartPlatformModel.PlatformCartMetaRequest().required(), }).required(); } @@ -1017,7 +952,7 @@ class CartPlatformApplicationValidator { addressId: Joi.string().allow(""), areaCode: Joi.string().allow(""), orderType: Joi.string().allow(""), - body: CartPlatformModel.UpdateCartShipmentCreation().required(), + body: CartPlatformModel.UpdateCartShipmentRequest().required(), }).required(); } diff --git a/sdk/platform/Cart/CartPlatformModel.d.ts b/sdk/platform/Cart/CartPlatformModel.d.ts index e374e895b..7138a7a57 100644 --- a/sdk/platform/Cart/CartPlatformModel.d.ts +++ b/sdk/platform/Cart/CartPlatformModel.d.ts @@ -1,65 +1,56 @@ export = CartPlatformModel; /** * @typedef CouponDateMeta - * @property {string} [modified_on] - Date time format when the coupon last modified - * @property {string} [created_on] - Date time format when the coupon created - * @property {string} [approved_on] - Date time format when the coupon approved - * @property {string} [rejected_on] - Date time format when the coupon rejected - * @property {string} [reviewed_on] - Date time format when the coupon reviewed + * @property {string} [modified_on] + * @property {string} [created_on] */ /** * @typedef Ownership - * @property {string} payable_category - Coupon amount payable category - * @property {string} [payable_by] - Coupon amount bearable party + * @property {string} payable_category + * @property {string} payable_by */ /** * @typedef CouponAuthor - * @property {string} [created_by] - The user id of user, who has created the coupon - * @property {string} [modified_by] - The user id of user, who has modified the coupon - * @property {string} [approved_by] - The user id of user, who has approved the coupon - * @property {string} [rejected_by] - The user id of user, who has rejected the coupon - * @property {string} [reviewed_by] - The user id of user, who has reviewed the coupon + * @property {string} [created_by] + * @property {string} [modified_by] */ /** * @typedef State - * @property {boolean} [is_archived] - Publish or unpublish the coupon - * @property {boolean} [is_display] - Coupon needs to display or not - * @property {boolean} [is_public] - Coupon is publicaly available or not + * @property {boolean} [is_archived] + * @property {boolean} [is_display] + * @property {boolean} [is_public] */ /** * @typedef PaymentAllowValue - * @property {number} [max] - Maximum value need to allow for payment + * @property {number} [max] */ /** * @typedef PaymentModes - * @property {string[]} [codes] - Identifier used by payment gateway for a given - * payment mode, e.g. NB_ICIC, PAYTM - * @property {string[]} [iins] - Debit/Credit card prefix (first 6 digit) - * @property {string[]} [types] - Card type, e.g. Credit, Debit - * @property {string[]} [networks] - Credit/Debit card issuer, e.g. VISA, - * MASTERCARD, RUPAY + * @property {string[]} [codes] + * @property {string[]} [iins] + * @property {string[]} [types] + * @property {string[]} [networks] * @property {PaymentAllowValue} [uses] */ /** * @typedef PriceRange - * @property {number} [max] - Max price valid for article in coupon - * @property {number} [min] - Min price valid for article in coupon + * @property {number} [max] + * @property {number} [min] */ /** * @typedef PostOrder - * @property {boolean} [cancellation_allowed] - Cancellation allowed in coupon - * @property {boolean} [return_allowed] - Return allowed in coupon + * @property {boolean} [cancellation_allowed] + * @property {boolean} [return_allowed] */ /** * @typedef BulkBundleRestriction - * @property {boolean} multi_store_allowed - Multi store allowed in bulk bundle - * coupon or not + * @property {boolean} multi_store_allowed */ /** * @typedef UsesRemaining - * @property {number} [user] - Define total coupon count per user - * @property {number} [total] - Define total coupon counts - * @property {number} [app] - Define coupon counts associated with application id + * @property {number} [user] + * @property {number} [total] + * @property {number} [app] */ /** * @typedef UsesRestriction @@ -68,119 +59,105 @@ export = CartPlatformModel; */ /** * @typedef Restrictions - * @property {PaymentModes} [payments] + * @property {Object} [payments] * @property {string} [user_type] * @property {PriceRange} [price_range] - * @property {string[]} [platforms] - List of platform on which coupon allowed - * like web, android + * @property {string[]} [platforms] * @property {PostOrder} [post_order] * @property {BulkBundleRestriction} [bulk_bundle] - * @property {number[]} [user_groups] - List of user group on which coupon allowed - * @property {boolean} [coupon_allowed] - Allow applying normal coupon if bulk - * coupon is applied + * @property {number[]} [user_groups] + * @property {boolean} [coupon_allowed] * @property {UsesRestriction} [uses] - * @property {number[]} [ordering_stores] - List of store id on which coupon allowed + * @property {number[]} [ordering_stores] */ /** * @typedef Validation - * @property {string[]} [app_id] - List of sales channel's application id - * @property {boolean} [anonymous] - Coupon applicable for guest user or not - * @property {string} [user_registered_after] - Coupon applicable for user which - * is registered after Date Format + * @property {string[]} [app_id] + * @property {boolean} [anonymous] + * @property {string} [user_registered_after] */ /** * @typedef CouponAction - * @property {string} [action_date] - Coupon transaction mode's date time format - * @property {string} [txn_mode] - Coupon transaction mode like cash, coupon etc + * @property {string} [action_date] + * @property {string} [txn_mode] */ /** * @typedef CouponSchedule - * @property {string} [end] - The end date of coupon - * @property {string} [start] - The start date of coupon - * @property {Object[]} [next_schedule] - List of date time, which we will - * schedule the promotion - * @property {string} [cron] - Schedule the cron to run your job periodically - * @property {string} [status] - Coupon status like draft, review - * @property {number} [duration] - Time in minutes for execution + * @property {string} [end] + * @property {string} [start] + * @property {Object[]} [next_schedule] + * @property {string} [cron] + * @property {number} [duration] */ /** * @typedef Rule - * @property {number} [key] - Key defines the number of product should be buy - * for applicability of cart - * @property {number} [value] - Value defines discount percentage in coupon - * @property {number} [max] - Max defines maximum number of discount amount in coupon - * @property {number} [discount_qty] - Discount_qty defines free quantity as - * discount in coupon - * @property {number} [min] - Min defines minimum number of discount amount in coupon + * @property {number} [key] + * @property {number} [value] + * @property {number} [max] + * @property {number} [discount_qty] + * @property {number} [min] */ /** * @typedef DisplayMetaDict - * @property {string} [title] - Coupon title which is used to display - * @property {string} [subtitle] - Coupon sub title which is used to display + * @property {string} [title] + * @property {string} [subtitle] */ /** * @typedef DisplayMeta - * @property {string} [title] - Coupon title which is used to display + * @property {string} [title] * @property {DisplayMetaDict} [auto] * @property {DisplayMetaDict} [apply] * @property {DisplayMetaDict} [remove] - * @property {string} [subtitle] - Coupon sub title which is used to display - * @property {string} [description] - Detail about the offers in coupon + * @property {string} [subtitle] + * @property {string} [description] */ /** * @typedef Identifier - * @property {number[]} [brand_id] - List of brand id available for coupon - * @property {string[]} [email_domain] - List of email domain available for coupon - * @property {number[]} [company_id] - List of company id available for coupon - * @property {number[]} [store_id] - List of store id available for coupon - * @property {string[]} [collection_id] - List of collection id available for coupon - * @property {number[]} [item_id] - List of item id available for coupon - * @property {string[]} [user_id] - List of user id available for coupon - * @property {number[]} [category_id] - List of category id available for coupon - * @property {string[]} [article_id] - List of article id available for coupon - * @property {number[]} [exclude_brand_id] - List of brand id should not be - * available for coupon + * @property {number[]} [brand_id] + * @property {string[]} [email_domain] + * @property {number[]} [company_id] + * @property {number[]} [store_id] + * @property {string[]} [collection_id] + * @property {number[]} [item_id] + * @property {string[]} [user_id] + * @property {number[]} [category_id] + * @property {string[]} [article_id] + * @property {number[]} [exclude_brand_id] */ /** * @typedef Validity - * @property {number} [priority] - Priority of coupon to show in list + * @property {number} [priority] */ /** * @typedef RuleDefinition - * @property {string} [currency_code] - Currency code like INR - * @property {boolean} [auto_apply] - Coupon should be auto apply or not - * @property {string} [type] - Type of coupon like absolute, percentage etc. - * @property {boolean} [is_exact] - Flag is true then use coupon applicable - * articles for calculation - * @property {string} [applicable_on] - Coupon will be applicable on either - * amount or quantity - * @property {string} [calculate_on] - Article Price on which coupon calculated - * like effective price or marked price - * @property {string} [value_type] - Define the type of coupon value - * @property {string[]} [scope] - List of item level rule applicable for coupon + * @property {string} [currency_code] + * @property {boolean} [auto_apply] + * @property {string} type + * @property {boolean} [is_exact] + * @property {string} applicable_on + * @property {string} calculate_on + * @property {string} value_type + * @property {string[]} [scope] */ /** * @typedef CouponAdd * @property {CouponDateMeta} [date_meta] - * @property {Ownership} [ownership] + * @property {Ownership} ownership * @property {CouponAuthor} [author] * @property {State} [state] * @property {Restrictions} [restrictions] * @property {Validation} [validation] * @property {CouponAction} [action] - * @property {string} [coupon_type] - The type of coupon like bulk or single - * @property {string} [coupon_prefix] - Bulk coupon code prefix string - * @property {number} [coupon_counts] - Counts of bulk coupon - * @property {string[]} [tags] - List of tags specify to platform + * @property {string[]} [tags] * @property {CouponSchedule} [_schedule] - * @property {Rule[]} [rule] - * @property {DisplayMeta} [display_meta] - * @property {string} code - Unique code of coupon - * @property {string} type_slug - The type slug of coupon discount - * @property {Identifier} [identifiers] - * @property {Validity} [validity] - * @property {RuleDefinition} [rule_definition] - * @property {string} [_id] - Unique identifier of coupon + * @property {Rule[]} rule + * @property {DisplayMeta} display_meta + * @property {string} code + * @property {string} type_slug + * @property {Identifier} identifiers + * @property {Validity} validity + * @property {RuleDefinition} rule_definition + * @property {string} [_id] - Coupon id */ /** * @typedef Page @@ -193,180 +170,139 @@ export = CartPlatformModel; * @property {number} [size] - The number of items per page. */ /** - * @typedef CouponsResult - * @property {CouponAdd[]} [items] - Coupons list for sales channel + * @typedef CouponsResponse + * @property {CouponAdd[]} [items] * @property {Page} [page] */ /** * @typedef SuccessMessage - * @property {boolean} [success] - Whether the request was successful (true/false). - * @property {string} [message] - Response message needs to display + * @property {boolean} [success] + * @property {string} [message] */ /** - * @typedef OperationErrorResult - * @property {boolean} [success] - Whether the request was successful (true/false). - * @property {string} [message] - Response message needs to display - * @property {string} [error] - Response error message in detail + * @typedef OperationErrorResponse + * @property {boolean} [success] + * @property {string} [message] + * @property {string} [error] */ /** * @typedef CouponUpdate * @property {CouponDateMeta} [date_meta] - * @property {Ownership} [ownership] + * @property {Ownership} ownership * @property {CouponAuthor} [author] * @property {State} [state] * @property {Restrictions} [restrictions] * @property {Validation} [validation] * @property {CouponAction} [action] - * @property {string[]} [tags] - List of tags specify to platform + * @property {string[]} [tags] * @property {CouponSchedule} [_schedule] - * @property {Rule[]} [rule] - * @property {DisplayMeta} [display_meta] - * @property {string} code - Unique code that is used to apply coupon - * @property {string} [coupon_type] - The type of coupon like bulk or single - * @property {string} [coupon_prefix] - Bulk coupon code prefix string - * @property {number} [coupon_counts] - Counts of culk coupon - * @property {string} [reason] - Coupon rejection reason added by reviewer - * @property {string} type_slug - The type slug of coupon discount - * @property {Identifier} [identifiers] - * @property {Validity} [validity] - * @property {RuleDefinition} [rule_definition] + * @property {Rule[]} rule + * @property {DisplayMeta} display_meta + * @property {string} code + * @property {string} type_slug + * @property {Identifier} identifiers + * @property {Validity} validity + * @property {RuleDefinition} rule_definition */ /** * @typedef CouponPartialUpdate * @property {boolean} [archive] - Send true to unpublish coupon * @property {CouponSchedule} [schedule] */ -/** - * @typedef CouponCreateResult - * @property {boolean} [success] - Whether the request was successful (true/false) - * @property {string} [message] - Create coupon response message that can shown - * to creator user - * @property {string} [_id] - Unique identifier for coupon created - */ /** * @typedef DisplayMeta1 - * @property {string} [description] - Define details about the offer in promotion - * @property {string} [offer_label] - Offer label of promotion that needs to display - * @property {string} [name] - Name of promotion that needs to display - * @property {string} [offer_text] - Promotion offer text used to display + * @property {string} [description] + * @property {string} [offer_label] + * @property {string} [name] + * @property {string} [offer_text] */ /** * @typedef Ownership1 - * @property {string} [payable_category] - Promotion amount payable category - * @property {string} [payable_by] - Promotion amount bearable party + * @property {string} payable_category + * @property {string} payable_by */ /** * @typedef CompareObject - * @property {number} [equals] - Nummeric value must be equal to cart level rules - * @property {number} [greater_than] - Nummeric value must be greater than cart - * level rules - * @property {number} [less_than_equals] - Nummeric value must be less than or - * equal to cart level rules - * @property {number} [less_than] - Nummeric value must be less than cart level rules - * @property {number} [greater_than_equals] - Nummeric value must be greater - * than or equal to cart level rules - */ -/** - * @typedef ItemSizeMapping - * @property {Object} [item_size_mapping] - Item size mapping in promotion + * @property {number} [equals] + * @property {number} [greater_than] + * @property {number} [less_than_equals] + * @property {number} [less_than] + * @property {number} [greater_than_equals] */ /** * @typedef ItemCriteria * @property {CompareObject} [cart_quantity] - * @property {string[]} [available_zones] - List of all zones on which promotion - * is applicable - * @property {number[]} [item_exclude_company] - List of all company id on which - * promotion is not applicable - * @property {number[]} [item_id] - List of all item ids on which promotion is applicable - * @property {number[]} [item_l1_category] - List of all L1 category on which - * promotion is applicable + * @property {string[]} [available_zones] + * @property {number[]} [item_exclude_company] + * @property {number[]} [item_id] + * @property {number[]} [item_l1_category] * @property {CompareObject} [cart_total] * @property {CompareObject} [cart_unique_item_quantity] * @property {CompareObject} [cart_unique_item_amount] - * @property {number[]} [item_exclude_id] - List of all item ids on which - * promotion is not applicable - * @property {boolean} [all_items] - Boolean flag set true to applicable the - * promotion for all products - * @property {number[]} [item_exclude_l1_category] - List of all item ids on - * which promotion is not applicable - * @property {string[]} [item_size] - List of all item sizes on which promotion - * is applicable - * @property {number[]} [item_store] - List of all item store ids on which - * promotion is applicable - * @property {string[]} [item_exclude_sku] - List of all item sku on which - * promotion is not applicable - * @property {number[]} [item_department] - List of all departments ids on which - * promotion is applicable - * @property {number[]} [item_exclude_store] - List of all item store ids on - * which promotion is not applicable - * @property {number[]} [item_brand] - List of all brand ids on which promotion - * is applicable - * @property {number[]} [item_exclude_department] - List of all department ids - * on which promotion is not applicable - * @property {number[]} [item_exclude_category] - List of all L3 category on - * which promotion is not applicable - * @property {number[]} [item_category] - List of all L3 category on which - * promotion is applicable + * @property {number[]} [item_exclude_id] + * @property {boolean} [all_items] + * @property {number[]} [item_exclude_l1_category] + * @property {string[]} [item_size] + * @property {number[]} [item_store] + * @property {string[]} [item_exclude_sku] + * @property {number[]} [item_department] + * @property {number[]} [item_exclude_store] + * @property {number[]} [item_brand] + * @property {number[]} [item_exclude_department] + * @property {number[]} [item_exclude_category] + * @property {number[]} [item_category] * @property {string[]} [buy_rules] - * @property {number[]} [item_exclude_brand] - List of all brand ids on which - * promotion is not applicable - * @property {number[]} [item_l2_category] - List of all L2 category on which - * promotion is applicable - * @property {number[]} [item_company] - List of all company ids on which - * promotion is applicable - * @property {string[]} [item_tags] - List of all product tags on which - * promotion is applicable - * @property {number[]} [item_exclude_l2_category] - List of all L2 category on - * which promotion is not applicable - * @property {string[]} [item_sku] - List of all item sku on which promotion is applicable + * @property {number[]} [item_exclude_brand] + * @property {number[]} [item_l2_category] + * @property {number[]} [item_company] + * @property {string[]} [item_tags] + * @property {number[]} [item_exclude_l2_category] + * @property {string[]} [item_sku] */ /** * @typedef DiscountOffer - * @property {number} [max_discount_amount] - Maximum discount amount in promotion - * @property {number} [discount_price] - Discount price in promotion - * @property {boolean} [apportion_discount] - Flag to distribute discount for each article - * @property {boolean} [partial_can_ret] - Flag indicated return the product partially - * @property {number} [max_usage_per_transaction] - Maximum usage per - * transaction in promotion - * @property {number} [min_offer_quantity] - Minimum quantity of offer in promotion - * @property {string} [code] - Unique code of promotion - * @property {number} [discount_amount] - Discount amount in promotion - * @property {number} [discount_percentage] - Discount percentage in promotion - * @property {number} [max_offer_quantity] - Maximum quantity of product in promotion + * @property {number} [max_discount_amount] + * @property {number} [discount_price] + * @property {boolean} [apportion_discount] + * @property {boolean} [partial_can_ret] + * @property {number} [max_usage_per_transaction] + * @property {number} [min_offer_quantity] + * @property {string} [code] + * @property {number} [discount_amount] + * @property {number} [discount_percentage] + * @property {number} [max_offer_quantity] */ /** * @typedef DiscountRule - * @property {string} discount_type - The type of discount in promotion - * @property {string} buy_condition - Promotion buy rules in offer level + * @property {string} discount_type + * @property {string} buy_condition * @property {ItemCriteria} item_criteria - * @property {ItemSizeMapping} [meta] * @property {DiscountOffer} offer */ /** * @typedef PaymentAllowValue1 - * @property {number} [max] - Maximum value need to allow for payment in promotion + * @property {number} [max] */ /** * @typedef PromotionPaymentModes - * @property {string} [type] - Define the type of payment + * @property {string} type * @property {PaymentAllowValue1} [uses] - * @property {string[]} [codes] - List of codes associated with payment options + * @property {string[]} [codes] */ /** * @typedef UserRegistered - * @property {string} [end] - End date time format till the user is registerd - * @property {string} [start] - Start date time format when user is registerd + * @property {string} [end] + * @property {string} [start] */ /** * @typedef PostOrder1 - * @property {boolean} [cancellation_allowed] - Cancellation allowed in - * promotion after order - * @property {boolean} [return_allowed] - Return allowed in promotion after order + * @property {boolean} [cancellation_allowed] + * @property {boolean} [return_allowed] */ /** * @typedef UsesRemaining1 - * @property {number} [user] - Define total promotion count per user - * @property {number} [total] - Define total promotions count + * @property {number} [user] + * @property {number} [total] */ /** * @typedef UsesRestriction1 @@ -375,69 +311,56 @@ export = CartPlatformModel; */ /** * @typedef Restrictions1 - * @property {PaymentModes} [payments] + * @property {Object} [payments] * @property {UserRegistered} [user_registered] - * @property {string[]} [platforms] - List of platform on which promotion is - * applicable like android, ios + * @property {string[]} [platforms] * @property {PostOrder1} [post_order] - * @property {number[]} [user_groups] - List of user groups on which promotion - * is applicable - * @property {number} [order_quantity] - Prmomotion max order count - * @property {boolean} [anonymous_users] - Set true, if promotion is applicable - * for guest user - * @property {string[]} [user_id] - List of user id on which promotion is applicable - * @property {UsesRestriction1} [uses] - * @property {number[]} [ordering_stores] - List of store id on which promotion - * is applicable + * @property {number[]} [user_groups] + * @property {number} [order_quantity] + * @property {boolean} [anonymous_users] + * @property {string[]} [user_id] + * @property {UsesRestriction1} uses + * @property {number[]} [ordering_stores] */ /** * @typedef PromotionSchedule - * @property {string} [end] - Then end date of promotion till valid - * @property {string} [start] - Then start date of promotion is valid - * @property {string} [status] - Promotion status like draft, review - * @property {boolean} [published] - The status of promotion is published or not - * @property {Object[]} [next_schedule] - List of date time, which we will - * schedule the promotion - * @property {string} [cron] - Schedule the cron to run your job periodically - * @property {number} [duration] - Time in minutes for execution + * @property {string} end + * @property {string} start + * @property {boolean} published + * @property {Object[]} [next_schedule] + * @property {string} [cron] + * @property {number} [duration] */ /** * @typedef PromotionAction - * @property {string} [action_date] - Date time format in promotion - * @property {string} [action_type] - The action type of promotion + * @property {string} action_date + * @property {string} action_type */ /** * @typedef PromotionAuthor - * @property {string} [created_by] - The user id of user, who has created the promotion - * @property {string} [modified_by] - The user id of user, who has modified the promotion - * @property {string} [approved_by] - The user id of user, who has approved the promotion - * @property {string} [rejected_by] - The user id of user, who has rejected the promotion - * @property {string} [reviewed_by] - The user id of user, who has reviewed the promotion + * @property {string} [created_by] + * @property {string} [modified_by] */ /** * @typedef Visibility - * @property {boolean} [coupon_list] - Flag to show promotion on Coupon list - * @property {boolean} [pdp] - Flag to show promotion on PDP page + * @property {boolean} coupon_list + * @property {boolean} pdp */ /** * @typedef PromotionDateMeta - * @property {string} [modified_on] - Date time format when the promotion last modified - * @property {string} [created_on] - Date time format when the promotion created - * @property {string} [approved_on] - Date time format when the promotion approved - * @property {string} [rejected_on] - Date time format when the promotion rejected - * @property {string} [reviewed_on] - Date time format when the promotion reviewed + * @property {string} [modified_on] + * @property {string} [created_on] */ /** * @typedef PromotionListItem * @property {boolean} [stackable] - Allows more than one promotion to get * combined benefits - * @property {string} [calculate_on] - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type + * @property {string} [calculate_on] - Only available for Contract pricing and + * Ladder pricing promotion type * @property {string} [apply_exclusive] - Doesn't allow other promotion after * current promotion applied on cart or article * @property {string} promo_group - Group into which promotion fall - * @property {string} mode - Promotion mode, like coupon or promotion + * @property {string} mode - Promotion mode * @property {boolean} [apply_all_discount] - Prevents more than one promotion discounts * @property {DisplayMeta1} display_meta * @property {Ownership1} ownership @@ -446,154 +369,78 @@ export = CartPlatformModel; * promotion will be applied * @property {Restrictions1} [restrictions] * @property {string} [currency] - Currency used for promotion - * @property {boolean} [is_processed] - Flag to verify if promotion is ready to - * be applied on cart and ready to update promotion - * @property {string} [code] - Unique code of promotion + * @property {string} [code] - Promotion code * @property {PromotionSchedule} [_schedule] * @property {PromotionAction} [post_order_action] * @property {number} [apply_priority] - Priority based on which promotion are * applied on articles * @property {PromotionAuthor} [author] * @property {Visibility} [visiblility] - * @property {string} application_id - Application id in which promotion will be used - * @property {ItemCriteria} buy_rules + * @property {string} application_id - App id in which promotion will be used + * @property {Object} buy_rules - Buy rules for the promotion * @property {Object} [_custom_json] - Custom data stored in promotion * @property {PromotionDateMeta} [date_meta] - * @property {string} [_id] - Unique identifier of promotion - * @property {string[]} [tags] - List of tags on which promotion is applicable + * @property {string} [_id] - Promotion id + * @property {string[]} [tags] */ /** - * @typedef PromotionsResult - * @property {PromotionListItem[]} [items] - List of promotions + * @typedef PromotionsResponse + * @property {PromotionListItem[]} [items] * @property {Page} [page] */ /** * @typedef PromotionAdd - * @property {boolean} [stackable] - Boolean value set true to apply other promotions also - * @property {string} [calculate_on] - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type - * @property {string} [apply_exclusive] - Promotion should apply on either - * article or cart. - * @property {string} promo_group - The type of promotion group - * @property {string} mode - Promotion mode, like coupon or promotion - * @property {boolean} [apply_all_discount] - True means to apply all discount offers - * @property {DisplayMeta1} [display_meta] - * @property {Ownership1} [ownership] - * @property {string} promotion_type - Type of promotion - * @property {DiscountRule[]} [discount_rules] - List of discount offers and - * their applicable conditions - * @property {Restrictions1} [restrictions] - * @property {string} [currency] - Promotion Currency code like INR - * @property {string} [code] - Promotion unique code - * @property {PromotionSchedule} [_schedule] - * @property {PromotionAction} [post_order_action] - * @property {number} [apply_priority] - Promotion applicable priority - * @property {PromotionAuthor} [author] - * @property {Visibility} [visiblility] - * @property {string} application_id - Current application id of sales channel - * @property {ItemCriteria} [buy_rules] - * @property {Object} [_custom_json] - Set extra properties in promotion - * @property {PromotionDateMeta} [date_meta] - * @property {string[]} [tags] - List of tags applicable for promotion - */ -/** - * @typedef PromotionAddResult - * @property {boolean} [stackable] - Boolean value set true to apply other promotions also - * @property {string} [calculate_on] - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type - * @property {string} [apply_exclusive] - Promotion should apply on either - * article or cart. - * @property {string} promo_group - The type of promotion group - * @property {string} mode - Promotion mode, like coupon or promotion - * @property {boolean} [is_processed] - Flag to verify if promotion is ready to - * be applied on cart and ready to update promotion - * @property {boolean} [apply_all_discount] - True means to apply all discount offers - * @property {DisplayMeta1} [display_meta] - * @property {Ownership1} [ownership] - * @property {string} promotion_type - Type of promotion - * @property {DiscountRule[]} [discount_rules] - List of discount offers and - * their applicable conditions + * @property {boolean} [stackable] + * @property {string} [calculate_on] - Only available for Contract pricing and + * Ladder pricing promotion type + * @property {string} [apply_exclusive] + * @property {string} promo_group + * @property {string} mode + * @property {boolean} [apply_all_discount] + * @property {DisplayMeta1} display_meta + * @property {Ownership1} ownership + * @property {string} promotion_type + * @property {DiscountRule[]} discount_rules * @property {Restrictions1} [restrictions] - * @property {string} [currency] - Promotion Currency code like INR - * @property {string} [code] - Promotion unique code + * @property {string} [currency] + * @property {string} [code] * @property {PromotionSchedule} [_schedule] * @property {PromotionAction} [post_order_action] - * @property {number} [apply_priority] - Promotion applicable priority + * @property {number} [apply_priority] * @property {PromotionAuthor} [author] * @property {Visibility} [visiblility] - * @property {string} application_id - Current application id of sales channel - * @property {ItemCriteria} [buy_rules] - * @property {Object} [_custom_json] - Set extra properties in promotion + * @property {string} application_id + * @property {Object} buy_rules + * @property {Object} [_custom_json] * @property {PromotionDateMeta} [date_meta] - * @property {string[]} [tags] - List of tags applicable for promotion + * @property {string[]} [tags] */ /** * @typedef PromotionUpdate - * @property {boolean} [stackable] - Set true to apply other promotions in cart - * @property {string} [calculate_on] - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type - * @property {string} [apply_exclusive] - Promotion should apply on either - * article or cart. - * @property {string} [reason] - Promotion rejection reason added by reviewer - * @property {string} promo_group - The type of promotion group - * @property {string} mode - Promotion mode - * @property {boolean} [apply_all_discount] - True means to apply all discount offers - * @property {DisplayMeta1} [display_meta] - * @property {Ownership1} [ownership] - * @property {string} promotion_type - The Promotion type like amount, bogo and - * percentage etc. - * @property {DiscountRule[]} [discount_rules] - List of discount offers and - * their applicable conditions - * @property {Restrictions1} [restrictions] - * @property {string} [currency] - Promotion Currency code like INR - * @property {string} [code] - Promotion unique code - * @property {PromotionSchedule} [_schedule] - * @property {PromotionAction} [post_order_action] - * @property {number} [apply_priority] - Promotion applicable priority - * @property {PromotionAuthor} [author] - * @property {Visibility} [visiblility] - * @property {string} application_id - Current application id of sales channel - * @property {ItemCriteria} [buy_rules] - * @property {Object} [_custom_json] - Set extra properties in promotion - * @property {PromotionDateMeta} [date_meta] - * @property {string[]} [tags] - List of tags applicable for promotion - */ -/** - * @typedef PromotionUpdateResult - * @property {boolean} [stackable] - Set true to apply other promotions in cart - * @property {string} [calculate_on] - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type - * @property {string} [apply_exclusive] - Promotion should apply on either - * article or cart. - * @property {string} [reason] - Promotion rejection reason added by reviewer - * @property {boolean} [is_processed] - Flag to verify if promotion is ready to - * be applied on cart and ready to update promotion - * @property {string} promo_group - The type of promotion group - * @property {string} mode - Promotion mode - * @property {boolean} [apply_all_discount] - True means to apply all discount offers - * @property {DisplayMeta1} [display_meta] - * @property {Ownership1} [ownership] - * @property {string} promotion_type - The Promotion type like amount, bogo and - * percentage etc. - * @property {DiscountRule[]} [discount_rules] - List of discount offers and - * their applicable conditions + * @property {boolean} [stackable] + * @property {string} [calculate_on] - Only available for Contract pricing and + * Ladder pricing promotion type + * @property {string} [apply_exclusive] + * @property {string} promo_group + * @property {string} mode + * @property {boolean} [apply_all_discount] + * @property {DisplayMeta1} display_meta + * @property {Ownership1} ownership + * @property {string} promotion_type + * @property {DiscountRule[]} discount_rules * @property {Restrictions1} [restrictions] - * @property {string} [currency] - Promotion Currency code like INR - * @property {string} [code] - Promotion unique code + * @property {string} [currency] + * @property {string} [code] * @property {PromotionSchedule} [_schedule] * @property {PromotionAction} [post_order_action] - * @property {number} [apply_priority] - Promotion applicable priority + * @property {number} [apply_priority] * @property {PromotionAuthor} [author] * @property {Visibility} [visiblility] - * @property {string} application_id - Current application id of sales channel - * @property {ItemCriteria} [buy_rules] - * @property {Object} [_custom_json] - Set extra properties in promotion + * @property {string} application_id + * @property {Object} buy_rules + * @property {Object} [_custom_json] * @property {PromotionDateMeta} [date_meta] - * @property {string[]} [tags] - List of tags applicable for promotion + * @property {string[]} [tags] */ /** * @typedef PromotionPartialUpdate @@ -601,66 +448,62 @@ export = CartPlatformModel; * @property {PromotionSchedule} [schedule] */ /** - * @typedef ActivePromosResult - * @property {string} [entity_slug] - A short, human-readable, URL-friendly - * identifier of Promotion or coupon - * @property {string} [title] - Name of the promotion or coupon - * @property {string} [modified_on] - Coupon or promotion modification date + * @typedef ActivePromosResponse + * @property {string} [entity_slug] + * @property {string} [title] - Name of the promotion + * @property {string} [modified_on] - Coupon modification date * @property {string} [example] - Discount offers examples * @property {string} [entity_type] - Type of entity to be selected from : * ['coupon', 'promotion'] - * @property {string} [created_on] - Coupon or modification creation date + * @property {string} [created_on] - Coupon creation date * @property {boolean} [is_hidden] - If the promo is active or not - * @property {string} [type] - Coupon or promotion type + * @property {string} [type] - Coupon type * @property {string} [subtitle] - Small description of the current offer * @property {string} [description] - The description of the offer in the form of an HTML */ /** * @typedef Charges - * @property {number} [charges] - Delivery chanrges applied on the product of cart - * @property {number} [threshold] - Threshold of cart value on which the charge - * should be applied + * @property {number} [charges] + * @property {number} [threshold] */ /** * @typedef DeliveryCharges - * @property {Charges[]} [charges] - List of delivery changes information of the cart - * @property {boolean} [enabled] - Enable or disable delivery charge on cart + * @property {Charges[]} [charges] + * @property {boolean} [enabled] */ /** * @typedef CartMetaConfigUpdate - * @property {number} [min_cart_value] - Minimum order value to checkout - * @property {number} [max_cart_value] - Maximum order value to checkout - * @property {boolean} [bulk_coupons] - Indicates bulk coupon applicable for cart - * @property {number} [max_cart_items] - Maximum cart items to checkout - * @property {string} [gift_display_text] - Free gift charges text to show + * @property {number} [min_cart_value] + * @property {number} [max_cart_value] + * @property {boolean} [bulk_coupons] + * @property {number} [max_cart_items] + * @property {string} [gift_display_text] * @property {DeliveryCharges} [delivery_charges] - * @property {boolean} [revenue_engine_coupon] - It define credit coupon - * applicable for cart - * @property {number} [gift_pricing] - Free gift charges per product - * @property {boolean} [enabled] - Enabled flag for cart configuration + * @property {boolean} [revenue_engine_coupon] + * @property {number} [gift_pricing] + * @property {boolean} [enabled] */ /** * @typedef CartMetaConfigAdd - * @property {number} [min_cart_value] - Minimum order value to checkout - * @property {number} [max_cart_value] - Maximum order value to checkout - * @property {boolean} [bulk_coupons] - Indicates bulk coupon applicable for cart - * @property {number} [max_cart_items] - Maximum cart items to checkout - * @property {string} [gift_display_text] - Free gift charges text to show + * @property {number} [min_cart_value] + * @property {number} [max_cart_value] + * @property {boolean} [bulk_coupons] + * @property {number} [max_cart_items] + * @property {string} [gift_display_text] * @property {DeliveryCharges} [delivery_charges] - * @property {boolean} [revenue_engine_coupon] - It define credit coupon - * applicable for cart - * @property {number} [gift_pricing] - Free gift charges per product - * @property {boolean} [enabled] - Enabled flag for cart configuration + * @property {boolean} [revenue_engine_coupon] + * @property {number} [gift_pricing] + * @property {boolean} [enabled] */ /** * @typedef Article * @property {number} [value] - Value of price adjustment for article * @property {string} [code] - Code to identify price adjustment on article * @property {string} [type] - Type of price adjusment - * @property {string} article_id - Unique identifier of article + * @property {string} article_id - Id of article * @property {number} [quantity] - Total quantity of the article to be * considered (currently used only in discount type) - * @property {Object} [meta] - Meta data related to article + * @property {Object} [meta] - Meta related to article */ /** * @typedef PriceAdjustmentRestrictions @@ -669,13 +512,13 @@ export = CartPlatformModel; */ /** * @typedef Collection - * @property {string} refund_by - Bearable party who is refunding the amount - * @property {string} collected_by - The party who is collecting the amount + * @property {string} refund_by + * @property {string} collected_by */ /** * @typedef PriceAdjustmentUpdate * @property {string} [modified_by] - The entity that modified the field - * @property {number} value - The amount applied on the cart + * @property {number} value * @property {string} message - The message associated with the price adjustment * @property {string} [apply_expiry] - The date and time when the expiry should be applied * @property {PriceAdjustmentRestrictions} [restrictions] - Restrictions applied @@ -684,7 +527,7 @@ export = CartPlatformModel; * @property {boolean} article_level_distribution - Flag indicating whether the * distribution should is done at the article level * @property {Collection} collection - * @property {string} type - Type of price adjusment like charge, mop, discount etc. + * @property {string} type - Type of price adjusment * @property {boolean} [allowed_refund] - Flag indicating whether refunds are * allowed (default: False) * @property {boolean} is_authenticated - Flag indicating whether the user is @@ -692,45 +535,43 @@ export = CartPlatformModel; * @property {Article[]} article_ids - The list of article object in the price adjustment * @property {boolean} [auto_remove] - This field if set true will remove mop * type price adjustment. - * @property {Object} [meta] - Additional information regarding price adjustment - * @property {string} cart_id - Unique identifier of the cart - * @property {DistributionLogic} [distribution_logic] + * @property {Object} [meta] + * @property {string} cart_id - The ID of the cart */ /** * @typedef PriceAdjustment - * @property {number} value - The amount applied on the cart + * @property {number} value * @property {string} message - The message associated with the price adjustment * @property {string} [apply_expiry] - The date and time when the expiry should be applied - * @property {PriceAdjustmentRestrictions} [restrictions] - This field specifies - * the restrictions for this item or service, such as whether cancellation and - * return are permitted, except for `charge` type. + * @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts + * the restrictions applied to this particular item or service, including + * whether or not cancellation and return are allowed, etc * @property {boolean} article_level_distribution - Flag indicating whether the * distribution should is done at the article level - * @property {string} [id] - Unique identifier of Price adjustment + * @property {string} [id] * @property {Collection} collection - * @property {string} type - Type of price adjusment like charge, discount, mop etc. + * @property {string} type - Type of price adjusment * @property {boolean} [allowed_refund] - Flag indicating whether refunds are - * allowed (default: False) expect for `charge` type + * allowed (default: False) * @property {boolean} is_authenticated - Flag indicating whether the user is * authenticated * @property {Article[]} article_ids - The list of article object in the price adjustment * @property {boolean} [auto_remove] - This field if set true will remove mop * type price adjustment. - * @property {Object} [meta] - Additional information regarding price adjustment - * @property {string} cart_id - Unique identifier of the cart - * @property {DistributionLogic} [distribution_logic] + * @property {Object} [meta] + * @property {string} cart_id - The ID of the cart */ /** - * @typedef PriceAdjustmentResult + * @typedef PriceAdjustmentResponse * @property {PriceAdjustment} [data] */ /** - * @typedef GetPriceAdjustmentResult + * @typedef GetPriceAdjustmentResponse * @property {PriceAdjustment[]} [data] */ /** * @typedef PriceAdjustmentAdd - * @property {number} value - The amount applied on the cart + * @property {number} value * @property {string} message - The message associated with the price adjustment * @property {string} [apply_expiry] - The date and time when the expiry should be applied * @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts @@ -746,177 +587,129 @@ export = CartPlatformModel; * @property {boolean} is_authenticated - Flag indicating whether the user is * authenticated * @property {Article[]} article_ids - The list of article object in the price adjustment - * @property {Object} [meta] - Additional information regarding price adjustment - * @property {string} cart_id - Unique identifier of the cart + * @property {Object} [meta] + * @property {string} cart_id - The ID of the cart * @property {boolean} [auto_remove] - This field if set true will remove mop * type price adjustment. - * @property {DistributionLogic} [distribution_logic] - */ -/** - * @typedef DistributionRule - * @property {Object} [conditions] - This field defines the distribution conditions - */ -/** - * @typedef Distribution - * @property {string} [type] - This field defines the distribution type allowed - * values('multi', 'single') - * @property {string} [logic] - This field defines the distribution logic - * allowed values('apportion', 'weighted', 'equally') - * @property {DistributionRule} [rule] - */ -/** - * @typedef DistributionLogic - * @property {string} [distribution_level] - This field defines the distribution - * level, currently allowed distribution level is (shipment) - * @property {Distribution} [distribution] */ /** * @typedef CartItem - * @property {number} [quantity] - Quantity of product in cart - * @property {string} product_id - Unique identifier of product in cart - * @property {string} size - Size of product in cart + * @property {number} [quantity] + * @property {string} product_id + * @property {string} size */ /** - * @typedef OpenapiCartDetailsCreation - * @property {CartItem[]} cart_items - List of products in cart + * @typedef OpenapiCartDetailsRequest + * @property {CartItem[]} cart_items */ /** * @typedef CouponBreakup - * @property {string} [title] - Coupon Title of the coupon applied denotes name - * of the coupon - * @property {number} [max_discount_value] - Maximum discount value of the - * coupon applied to cart - * @property {number} [value] - Coupon value of the coupon applied to cart - * @property {boolean} [is_applied] - Applied flag which denotes if any coupon - * is applied to cart - * @property {string} [uid] - Unique identifier of the coupon applied to cart - * @property {string} [coupon_type] - Type of the coupon applied to cart - * @property {string} [sub_title] - Coupon subtitle of the coupon applied to - * cart which is used to display - * @property {number} [coupon_value] - Value of the coupon applied to cart - * @property {string} [code] - Coupon code of the coupon applied - * @property {string} [type] - Type of the coupon applied to cart - * @property {number} [minimum_cart_value] - Minimum cart value of the coupon - * applied to cart - * @property {string} [message] - Coupon message of the coupon applied to cart - * @property {string} [description] - Coupon description of the coupon applied to cart. + * @property {string} [title] + * @property {number} [max_discount_value] + * @property {number} [value] + * @property {boolean} [is_applied] + * @property {string} [uid] + * @property {string} [coupon_type] + * @property {string} [sub_title] + * @property {number} [coupon_value] + * @property {string} [code] + * @property {string} [type] + * @property {number} [minimum_cart_value] + * @property {string} [message] + * @property {string} [description] */ /** * @typedef DisplayBreakup - * @property {string} [key] - Key of the price like total_mrp, total, subtotal etc - * @property {number} [value] - Numeric value for the price - * @property {string} [currency_code] - Currency code for the price - * @property {string} [currency_symbol] - Currency symbol for the price - * @property {string} [display] - Display key field that to be shown against the value - * @property {string[]} [message] - List of message at price level to be displayed + * @property {string} [key] + * @property {number} [value] + * @property {string} [currency_code] + * @property {string} [currency_symbol] + * @property {string} [display] + * @property {string[]} [message] */ /** * @typedef LoyaltyPoints - * @property {boolean} [is_applied] - Whether the loyalty points are applied on the cart - * @property {number} [total] - Total loyalty points available with user - * @property {number} [applicable] - Whether the loyalty points are applicable - * for the cart - * @property {string} [description] - Description for loyalty points + * @property {boolean} [is_applied] + * @property {number} [total] + * @property {number} [applicable] + * @property {string} [description] */ /** * @typedef RawBreakup - * @property {number} [coupon] - Coupon amount applied to cart - * @property {number} [gst_charges] - GST charges applied on cart - * @property {number} [mrp_total] - Maximum price total amount of all products in cart - * @property {number} [fynd_cash] - Loyalty points applied on cart - * @property {number} [vog] - Total value of goods after all discount, coupons - * and promotion applied of all products in cart - * @property {number} [gift_card] - Gift cart amount applied on cart - * @property {number} [cod_charge] - Cod charge value applied to cart. This is - * applied when user select payment mode as COD - * @property {number} [total] - Total payable amount by the customer - * @property {number} [discount] - Discount amount recieved on cart - * @property {number} [delivery_charge] - Delivery charge applied to cart - * @property {number} [you_saved] - Total amount will be saved if customer - * places the order - * @property {number} [subtotal] - Selling price amount of all products in cart - * @property {number} [convenience_fee] - Convenience fee amount applied to cart + * @property {number} [coupon] + * @property {number} [gst_charges] + * @property {number} [mrp_total] + * @property {number} [fynd_cash] + * @property {number} [vog] + * @property {number} [gift_card] + * @property {number} [cod_charge] + * @property {number} [total] + * @property {number} [discount] + * @property {number} [delivery_charge] + * @property {number} [you_saved] + * @property {number} [subtotal] + * @property {number} [convenience_fee] */ /** * @typedef CartBreakup * @property {CouponBreakup} [coupon] - * @property {DisplayBreakup[]} [display] - List of breakup data which is used - * to display the breakup to the customer like MRP total, Discount, Sub total, - * coupon value, promotion value and final total + * @property {DisplayBreakup[]} [display] * @property {LoyaltyPoints} [loyalty_points] * @property {RawBreakup} [raw] */ /** * @typedef ProductImage - * @property {string} [secure_url] - Secured url of the product image - * @property {string} [url] - Bucket link url for product image - * @property {string} [aspect_ratio] - Aspect ratio of the product image + * @property {string} [secure_url] + * @property {string} [url] + * @property {string} [aspect_ratio] */ /** * @typedef Tags - * @property {Object} [tags] - Tags is a lable or batch that is attached to a - * product in cart + * @property {Object} [tags] */ /** * @typedef BaseInfo - * @property {number} [uid] - Unique identifier of entities like brand or seller - * @property {string} [name] - Name of entities like brand or seller + * @property {number} [uid] + * @property {string} [name] */ /** * @typedef ActionQuery * @property {string[]} [product_slug] - Contains list of product slug */ -/** - * @typedef ProductActionParams - * @property {string[]} [slug] - Unique product url name generated via product - * name and other meta data. - */ -/** - * @typedef ProductActionPage - * @property {string} [type] - Entity of page to be redirected on click - * @property {ProductActionParams} [params] - */ /** * @typedef ProductAction - * @property {string} [type] - Type of action - * @property {string} [url] - Url of the product to render the product + * @property {string} [type] + * @property {string} [url] * @property {ActionQuery} [query] - * @property {ProductActionPage} [page] */ /** * @typedef CategoryInfo - * @property {number} [uid] - Unique identifier of Product Category - * @property {string} [name] - Category name of the product + * @property {number} [uid] - Product Category Id + * @property {string} [name] */ /** * @typedef CartProduct * @property {string} [slug] - Unique product url name generated via product * name and other meta data - * @property {ProductImage[]} [images] - Product Images urls of different types - * like secure url, aspect ration url and url + * @property {ProductImage[]} [images] * @property {Tags} [teaser_tag] * @property {BaseInfo} [brand] * @property {ProductAction} [action] - * @property {number} [uid] - Unique identifier of the product in cart - * @property {string[]} [tags] - Products tags that are added to each product to - * identify the set of products - * @property {Object} [_custom_json] - Field to add custom json of the product in cart - * @property {string} [type] - Type of product in cart - * @property {string} [name] - Product name of the product in cart which is - * defined on platform - * @property {string} [item_code] - Product code of the product while defining - * product on platform - * @property {CategoryInfo[]} [categories] - Product category information which - * incldes category name and category id - * @property {Object} [attributes] - Product attributes defined on platform + * @property {number} [uid] + * @property {string[]} [tags] + * @property {Object} [_custom_json] + * @property {string} [type] + * @property {string} [name] + * @property {string} [item_code] + * @property {CategoryInfo[]} [categories] + * @property {Object} [attributes] */ /** * @typedef BasePrice - * @property {number} [effective] - Current per unit price of product after - * existing deductions - * @property {string} [currency_code] - Currency code for all amounts - * @property {string} [currency_symbol] - Currency symbol of the currncy used for price - * @property {number} [marked] - Original price of product + * @property {number} [effective] + * @property {string} [currency_code] + * @property {string} [currency_symbol] + * @property {number} [marked] */ /** * @typedef ArticlePriceInfo @@ -925,51 +718,40 @@ export = CartPlatformModel; */ /** * @typedef StoreInfo - * @property {number} [uid] - Unique identifiers of the store from where product - * is fulfileld - * @property {string} [name] - Store name of the store from where the product is fulfiled - * @property {string} [store_code] - A unique code or identifier for the store, - * often used for internal reference + * @property {number} [uid] + * @property {string} [name] + * @property {string} [store_code] */ /** * @typedef ProductArticle - * @property {string} [seller_identifier] - List of identifiers used by sellers - * for the product size. - * @property {number} [quantity] - Quantity of the article added in cart + * @property {string} [seller_identifier] + * @property {number} [quantity] * @property {BaseInfo} [seller] - * @property {Object} [cart_item_meta] - Meta details of the article added from cart - * @property {Object} [parent_item_identifiers] - Fields to determine parent - * product of the product - * @property {boolean} [is_gift_visible] - Whether the product can be purchased - * as a gift. It is true if the product is available for gifting and false otherwise. - * @property {string} [uid] - This unique identifier is assigned to the specific - * article. This represents item x size x location. - * @property {Object} [gift_card] - Gift card detail if gift card applied to the - * product which indicates gift price, gift applicable flag and display - * message for the gift - * @property {string[]} [product_group_tags] - List fot the unique identifier - * for the product grouping. - * @property {Object} [identifier] - Unique identifier of the article - * @property {number} [mto_quantity] - Quantity of the product which will - * specially manufactured as not available in stock - * @property {Object} [extra_meta] - Field to update extra meta of the article in cart - * @property {string} [type] - Type of the data sent in response. Possible value - * is article - * @property {Object} [_custom_json] - Field to update custom json of the article in cart + * @property {Object} [cart_item_meta] + * @property {Object} [parent_item_identifiers] + * @property {boolean} [is_gift_visible] + * @property {string} [uid] + * @property {Object} [gift_card] + * @property {string[]} [product_group_tags] + * @property {Object} [identifier] + * @property {number} [mto_quantity] + * @property {Object} [extra_meta] + * @property {string} [type] + * @property {Object} [_custom_json] * @property {ArticlePriceInfo} [price] - * @property {Object} [meta] - Meta data of article in cart - * @property {string} [size] - Size of the article added in cart + * @property {Object} [meta] + * @property {string} [size] * @property {StoreInfo} [store] * @property {string[]} [tags] - A list of article tags */ /** * @typedef Ownership2 - * @property {string} [payable_category] - Promotion amount payable category - * @property {string} [payable_by] - Promotion amount bearable party + * @property {string} [payable_category] - Promo amount payable category + * @property {string} [payable_by] - Promo amount bearable party */ /** * @typedef DiscountRulesApp - * @property {Object} [offer] - Offer detail for promotion + * @property {Object} [offer] - Offer for promotion * @property {Object} [raw_offer] - Raw offer details for promotion * @property {Object} [item_criteria] - Item criteria of promotion * @property {string[]} [matched_buy_rules] - Matched buy rules for promotion @@ -977,10 +759,9 @@ export = CartPlatformModel; /** * @typedef AppliedFreeArticles * @property {string} [parent_item_identifier] - Parent item identifier for free article - * @property {number} [quantity] - Free article quantity in promotion - * @property {string} [article_id] - Unique identifier of free article + * @property {number} [quantity] - Free article quantity + * @property {string} [article_id] - Free article id * @property {FreeGiftItems} [free_gift_item_details] - Free gift items details - * in promotion */ /** * @typedef BuyRules @@ -1006,14 +787,14 @@ export = CartPlatformModel; * @property {boolean} [mrp_promotion] - If applied promotion is applied on * product MRP or ESP * @property {string} [promotion_group] - Promotion group for the promotion - * @property {string} [promo_id] - Promotion unique identifier + * @property {string} [promo_id] - Promotion id * @property {Object} [meta] - Meta object for extra data - * @property {string} [code] - Promotion unique code + * @property {string} [code] - Promotion code */ /** * @typedef PromiseFormatted - * @property {string} [max] - Maximum Delivery promise formatted timestamp - * @property {string} [min] - Minimum Delivery promise formatted timestamp + * @property {string} [max] + * @property {string} [min] */ /** * @typedef PromiseISOFormat @@ -1022,8 +803,8 @@ export = CartPlatformModel; */ /** * @typedef PromiseTimestamp - * @property {number} [max] - Maximum Promise for the shipment - * @property {number} [min] - Minimum delivery promise time for the shipment + * @property {number} [max] + * @property {number} [min] */ /** * @typedef ShipmentPromise @@ -1033,22 +814,18 @@ export = CartPlatformModel; */ /** * @typedef CouponDetails - * @property {number} [discount_total_quantity] - Total discount earned from - * coupon applied to cart - * @property {number} [discount_single_quantity] - Discout amount applied from - * coupon for single quantity of the product - * @property {string} [code] - Coupon code of the coupon applied + * @property {number} [discount_total_quantity] + * @property {number} [discount_single_quantity] + * @property {string} [code] */ /** * @typedef ProductPrice - * @property {number} [marked] - Maximum price of the product - * @property {number} [add_on] - Price before promotion and coupon amount - * applied for calculation - * @property {string} [currency_code] - Currency code of the price defined for the product - * @property {string} [currency_symbol] - Currency symbol of the price defined - * for the product - * @property {number} [effective] - Selling price of the product - * @property {number} [selling] - Selling price of the product + * @property {number} [marked] + * @property {number} [add_on] + * @property {string} [currency_code] + * @property {string} [currency_symbol] + * @property {number} [effective] + * @property {number} [selling] */ /** * @typedef ProductPriceInfo @@ -1061,972 +838,749 @@ export = CartPlatformModel; */ /** * @typedef ProductAvailabilitySize - * @property {string} [display] - Display size of the product - * @property {string} [value] - Actual value of the size - * @property {boolean} [is_available] - Available flag for the size of the - * product if that is available + * @property {string} [display] + * @property {string} [value] + * @property {boolean} [is_available] */ /** * @typedef ProductAvailability - * @property {boolean} [is_valid] - Valid flag for the product if the product - * added in cart is valid to place the order - * @property {number} [other_store_quantity] - Quantity of the product available - * on other store - * @property {boolean} [deliverable] - Deliverable flag denotes if the product - * is deliverable or not - * @property {ProductAvailabilitySize[]} [available_sizes] - Product sizes availability - * @property {boolean} [out_of_stock] - Denotes if the product is available in stock - * @property {string[]} [sizes] - All sizes of the product + * @property {boolean} [is_valid] + * @property {number} [other_store_quantity] + * @property {boolean} [deliverable] + * @property {ProductAvailabilitySize[]} [available_sizes] + * @property {boolean} [out_of_stock] + * @property {string[]} [sizes] */ /** * @typedef PromoMeta - * @property {string} [message] - Loyalty points message denotes how much - * loyalty points and applied and how much left with the user + * @property {string} [message] */ /** * @typedef CartProductInfo - * @property {number} [quantity] - Quantity of the product added in cart + * @property {number} [quantity] * @property {CartProduct} [product] - * @property {string} [product_ean_id] - European Article Number of the product - * (limited upto 50 EAN identifier in a single request) - * @property {Object} [parent_item_identifiers] - Parent item information of the - * product which identifies the parent of the product in cart - * @property {boolean} [is_set] - Whether or not the product is a set of items + * @property {string} [product_ean_id] + * @property {Object} [parent_item_identifiers] + * @property {boolean} [is_set] * @property {ProductArticle} [article] - * @property {AppliedPromotion[]} [promotions_applied] - List of applicable - * promotion for the product in cart + * @property {AppliedPromotion[]} [promotions_applied] * @property {ShipmentPromise} [delivery_promise] - * @property {string} [key] - The attribute key associated with the size + * @property {string} [key] * @property {CouponDetails} [coupon] - * @property {Object} [bulk_offer] - Bulk offer information for the product - * which denotes if any bulk offer is applied to the product in cart + * @property {Object} [bulk_offer] * @property {ProductPriceInfo} [price] - * @property {string} [coupon_message] - Message for the coupon denotes which - * coupon is applied and empty if not applied + * @property {string} [coupon_message] * @property {CartProductIdentifer} identifiers - * @property {string} [message] - Product level message which denotes error - * information to display over the product in cart - * @property {string} [discount] - Discount amount of the product in cart + * @property {string} [message] + * @property {string} [discount] * @property {ProductAvailability} [availability] - * @property {Object} [moq] - An Integer indication the Minimum Order Quantity - * of a product, e.g. 100. + * @property {Object} [moq] * @property {ProductPriceInfo} [price_per_unit] * @property {PromoMeta} [promo_meta] - * @property {Object} [custom_order] - Whether MTO (Make to Order) is enabled or not. + * @property {Object} [custom_order] */ /** - * @typedef OpenapiCartDetailsResult - * @property {boolean} [is_valid] - Cart validity flag determines the if the - * response is valid or not - * @property {string} [message] - Message of the cart Open API cart detail response + * @typedef OpenapiCartDetailsResponse + * @property {boolean} [is_valid] + * @property {string} [message] * @property {CartBreakup} [breakup_values] - * @property {CartProductInfo[]} [items] - Items details in cart + * @property {CartProductInfo[]} [items] */ /** - * @typedef OpenApiErrorResult - * @property {boolean} [success] - Success flag for cart detail open api response - * @property {string} [message] - Error message of the Open API cart detail response + * @typedef OpenApiErrorResponse + * @property {boolean} [success] + * @property {string} [message] * @property {Object} [errors] - Contains field name which has error as key and * error message as value */ /** * @typedef ShippingAddress - * @property {string} [country] - Country of address - * @property {string} [state] - State of the address - * @property {string} [city] - City of the address - * @property {number} [phone] - Phone number for address - * @property {string} area_code - Area code of the address - * @property {string} [country_iso_code] - Country iso code for address - * @property {string} [country_phone_code] - Country phone code for address - * @property {Object} [meta] - Metadata of the address - * @property {string} [address_type] - Address type of address - * @property {string} [area] - Area description for address - * @property {string} [area_code_slug] - Area code slug for address. example - * pincode is slug for India - * @property {string} [name] - Name of person in address data to whom it belongs to - * @property {string} [landmark] - Landmark of address - * @property {string} [email] - Email address for address data - * @property {string} [country_code] - Country code of address - * @property {number} [pincode] - Pincode for address data - * @property {string} [address] - Address description for address data - */ -/** - * @typedef OpenApiCartServiceabilityCreation - * @property {CartItem[]} cart_items - List of items in open api cart response + * @property {string} [country] + * @property {string} [state] + * @property {string} [city] + * @property {number} [phone] + * @property {string} area_code + * @property {string} [country_iso_code] + * @property {string} [country_phone_code] + * @property {Object} [meta] + * @property {string} [address_type] + * @property {string} [area] + * @property {string} [area_code_slug] + * @property {string} [name] + * @property {string} [landmark] + * @property {string} [email] + * @property {string} [country_code] + * @property {number} [pincode] + * @property {string} [address] + */ +/** + * @typedef OpenApiCartServiceabilityRequest + * @property {CartItem[]} cart_items * @property {ShippingAddress} shipping_address */ /** - * @typedef OpenApiCartServiceabilityResult - * @property {boolean} [is_valid] - Cart validity flag determines the if the - * response is valid or not - * @property {CartProductInfo[]} [items] - Items data list in user cart that - * includes item id, item size, store id, available sizes and rest of the item - * related data + * @typedef OpenApiCartServiceabilityResponse + * @property {boolean} [is_valid] + * @property {CartProductInfo[]} [items] * @property {ShipmentPromise} [delivery_promise] - * @property {string} [message] - Message of the cart detail API response + * @property {string} [message] * @property {CartBreakup} [breakup_values] */ /** * @typedef OpenApiFiles - * @property {string} key - Key represents name of file - * @property {string[]} values - List of urls path + * @property {string} key + * @property {string[]} values */ /** * @typedef CartItemMeta - * @property {boolean} [primary_item] - Flags indicates item is primary or not - * @property {string} [group_id] - Fields to determine group id of the product + * @property {boolean} [primary_item] + * @property {string} [group_id] */ /** * @typedef MultiTenderPaymentMeta - * @property {string} [payment_id] - Payment gateway identifier - * @property {string} [payment_gateway] - Payment gateway used to do the payment - * @property {Object} [extra_meta] - Payment extra meta for the payment mode to - * do the payment - * @property {string} [current_status] - Current status of the payment - * @property {string} [order_id] - Payment gateway order id + * @property {string} [payment_id] + * @property {string} [payment_gateway] + * @property {Object} [extra_meta] + * @property {string} [current_status] + * @property {string} [order_id] */ /** * @typedef MultiTenderPaymentMethod - * @property {string} mode - Payment mode of payment method used to make payment - * @property {number} amount - Amount of the payment mode to be paid + * @property {string} mode + * @property {number} amount - Payment amount * @property {MultiTenderPaymentMeta} [meta] - * @property {string} [name] - Name of the payment mode used to make payment + * @property {string} [name] - Payment mode name */ /** * @typedef OpenApiOrderItem - * @property {number} cashback_applied - Cashback applied on user cart - * @property {number} [quantity] - Article quantity in user cart - * @property {string} size - Size of the article added in cart - * @property {number} coupon_effective_discount - Coupon discount applied on - * article in user cart - * @property {number} amount_paid - Amount needs to paid for article in cart - * @property {number} delivery_charges - Delivery charges applied on article in cart - * @property {number} price_marked - Original price of product - * @property {OpenApiFiles[]} [files] - List of file url + * @property {number} cashback_applied + * @property {number} [quantity] + * @property {string} size + * @property {number} coupon_effective_discount + * @property {number} amount_paid + * @property {number} delivery_charges + * @property {number} price_marked + * @property {OpenApiFiles[]} [files] * @property {CartItemMeta} [meta] - * @property {Object} [extra_meta] - Extra meta of the article in cart - * @property {number} product_id - Product id associated with article in cart - * @property {number} [loyalty_discount] - Loyalty points applied on cart - * @property {number} discount - Discount value applied on article in cart - * @property {number} price_effective - Current per unit price of product after - * existing deductions - * @property {MultiTenderPaymentMethod[]} payment_methods - Payment methods list - * used to make the payment - * @property {number} [employee_discount] - Employee discount value applied on - * article in cart - * @property {number} cod_charges - Cash On Delivery charges applied on article in cart + * @property {Object} [extra_meta] + * @property {number} product_id + * @property {number} [loyalty_discount] + * @property {number} discount + * @property {number} price_effective + * @property {MultiTenderPaymentMethod[]} payment_methods + * @property {number} [employee_discount] + * @property {number} cod_charges */ /** * @typedef OpenApiPlatformCheckoutReq - * @property {string} [payment_mode] - Payment mode from which the payment to be - * done for the order - * @property {number} cart_value - Total amount of user cart - * @property {OpenApiOrderItem[]} cart_items - List of items in user cart + * @property {string} [payment_mode] + * @property {number} cart_value + * @property {OpenApiOrderItem[]} cart_items * @property {ShippingAddress} [shipping_address] - * @property {number} [loyalty_discount] - Loyalty points applied on cart - * @property {string} [comment] - Comment message added in cart after order placed - * @property {MultiTenderPaymentMethod[]} payment_methods - Payment methods list - * used to make the payment - * @property {Object} [employee_discount] - Employee discount value applied on user cart - * @property {string} [coupon] - Coupon text of coupon applied on user cart - * @property {number} cashback_applied - Cashback applied on user cart - * @property {string} [gstin] - GSTIN number added in cart + * @property {number} [loyalty_discount] + * @property {string} [comment] + * @property {MultiTenderPaymentMethod[]} payment_methods + * @property {Object} [employee_discount] + * @property {string} [coupon] + * @property {number} cashback_applied + * @property {string} [gstin] * @property {ShippingAddress} billing_address - * @property {string} coupon_code - Coupon code to be applied to cart - * @property {number} coupon_value - Value of the coupon applied to cart - * @property {number} delivery_charges - Delivery charges of the order placed - * via checkout API - * @property {string} [affiliate_order_id] - Order id generated after placing order - * @property {string} [currency_code] - Currency code for the price - * @property {string} [order_id] - Order id generated after placing order - * @property {OpenApiFiles[]} [files] - List of file url - * @property {number} cod_charges - Cash On Delivery charges of the user cart - */ -/** - * @typedef OpenApiCheckoutResult - * @property {boolean} [success] - The request success is defined - * @property {string} [message] - Message of the api response + * @property {string} coupon_code + * @property {number} coupon_value + * @property {number} delivery_charges + * @property {string} [affiliate_order_id] + * @property {string} [currency_code] + * @property {string} [order_id] + * @property {OpenApiFiles[]} [files] + * @property {number} cod_charges + */ +/** + * @typedef OpenApiCheckoutResponse + * @property {boolean} [success] + * @property {string} [message] * @property {string} [order_ref_id] - Order id sent in request * @property {string} order_id - Fynd order id */ /** * @typedef AbandonedCart - * @property {string} expire_at - Expire details of user cart - * @property {Object} [promotion] - Promotion object details like amount, mode, - * currency and list of promotions in user cart - * @property {boolean} is_default - User cart default status - * @property {string} [comment] - Comment message to be added in user cart - * @property {Object[]} articles - List of articles in user cart - * @property {Object} [coupon] - Coupon data of user cart which denotes if - * coupon is applied, coupon code, coupon amount, coupon title and coupon message - * @property {number} [bulk_coupon_discount] - Total bulk discount amount - * applied in user cart - * @property {string} _id - Unique identifier of the user cart - * @property {Object} [fynd_credits] - Fynd credit points applied in user cart - * @property {number[]} [fc_index_map] - Flat article index in user cart - * @property {string} [order_id] - Order id generated in user cart - * @property {number} [discount] - Discount amount of the product in cart - * @property {Object} [cod_charges] - Cash On Delivery charges of the user cart - * @property {Object} [payments] - Payment object selected in user cart - * @property {string} [payment_mode] - Payment mode of the payment selected to - * do the payment - * @property {Object[]} [shipments] - Shipment details for the items in a cart, - * specific to the selected address. - * @property {Object} [pick_up_customer_details] - Customer contact details for - * customer pickup at store - * @property {number} uid - Unique Identifier of user cart - * @property {string} [checkout_mode] - Checkout mode of user cart - * @property {number} [cart_value] - Total amount of user cart - * @property {boolean} [is_archive] - Flag to indicate cart is archived or not - * @property {string} created_on - Date time format when user cart created - * @property {string} last_modified - Date time format when user cart last modified - * @property {Object} [meta] - Extra meta data of user cart - * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user - * is doing fast checkout for the cart using buy now - * @property {boolean} [is_active] - Flag indicates user cart is active or not - * @property {Object} cashback - Cart level cashback data which denotes cashback - * amount and cashback message - * @property {Object[]} [payment_methods] - Payment methods list used to make the payment - * @property {string} [gstin] - GSTIN added in user cart - * @property {Object} [delivery_charges] - Delivery charges of user cart - * @property {boolean} [merge_qty] - Flag indicates cart has merged article or not - * @property {string} user_id - User Id of user cart - * @property {string} [app_id] - Application id of user cart - */ -/** - * @typedef AbandonedCartResult - * @property {AbandonedCart[]} [items] - List of items in abandon cart - * @property {Object} [result] - Define the list of items with updated status + * @property {string} expire_at + * @property {Object} [promotion] + * @property {boolean} is_default + * @property {string} [comment] + * @property {Object[]} articles + * @property {Object} [coupon] + * @property {number} [bulk_coupon_discount] + * @property {string} _id + * @property {Object} [fynd_credits] + * @property {number[]} [fc_index_map] + * @property {string} [order_id] + * @property {number} [discount] + * @property {Object} [cod_charges] + * @property {Object} [payments] + * @property {string} [payment_mode] + * @property {Object[]} [shipments] + * @property {Object} [pick_up_customer_details] + * @property {number} uid + * @property {string} [checkout_mode] + * @property {number} [cart_value] + * @property {boolean} [is_archive] + * @property {string} created_on + * @property {string} last_modified + * @property {Object} [meta] + * @property {boolean} [buy_now] + * @property {boolean} [is_active] + * @property {Object} cashback + * @property {Object[]} [payment_methods] + * @property {string} [gstin] + * @property {Object} [delivery_charges] + * @property {boolean} [merge_qty] + * @property {string} user_id + * @property {string} [app_id] + */ +/** + * @typedef AbandonedCartResponse + * @property {AbandonedCart[]} [items] + * @property {Object} [result] * @property {Page} [page] * @property {boolean} [success] - The request success is defined * @property {string} [message] - Message of the response */ /** * @typedef PaymentSelectionLock - * @property {string} [payment_identifier] - Identifier for Payment Mode - * @property {string} [default_options] - Default Selection Payment Mode - * @property {boolean} [enabled] - Denotes if default payment selection is enable + * @property {string} [payment_identifier] + * @property {string} [default_options] + * @property {boolean} [enabled] */ /** * @typedef CartCurrency * @property {string} [code] - Currency code defined by ISO 4217:2015 - * @property {string} [symbol] - Currency symbol for currency of user cart prices + * @property {string} [symbol] */ /** * @typedef CartDetailCoupon - * @property {number} [cashback_amount] - Fields denotes cashback amount applied to cart - * @property {string} [cashback_message_primary] - Primary cashback message for - * coupon applied to cart - * @property {string} [cashback_message_secondary] - Secondary cashback message - * for coupon applied to cart - * @property {string} [coupon_code] - Coupon code to be applied to cart - * @property {string} [coupon_description] - Coupon description of the coupon - * applied to cart - * @property {string} [coupon_id] - Unique identifier of the coupon applied to cart - * @property {string} [coupon_subtitle] - Coupon subtitle of the coupon applied to cart - * @property {string} [coupon_title] - Coupon title of the coupon applied - * @property {string} [coupon_type] - Type of the coupon applied to cart - * @property {number} [coupon_value] - Value of the coupon applied to cart - * @property {number} [discount] - Total discount earned from coupon applied to cart - * @property {boolean} [is_applied] - Flag to determine where the coupon is - * applied to cart or not - * @property {boolean} [is_valid] - Determine where the coupon applied to cart is valid - * @property {number} [maximum_discount_value] - Maximum discount value of the - * coupon applied to cart - * @property {string} [message] - Coupon message of the coupon applied to cart - * @property {number} [minimum_cart_value] - Minimum cart value of the coupon - * applied to cart + * @property {number} [cashback_amount] + * @property {string} [cashback_message_primary] + * @property {string} [cashback_message_secondary] + * @property {string} [coupon_code] + * @property {string} [coupon_description] + * @property {string} [coupon_id] + * @property {string} [coupon_subtitle] + * @property {string} [coupon_title] + * @property {string} [coupon_type] + * @property {number} [coupon_value] + * @property {number} [discount] + * @property {boolean} [is_applied] + * @property {boolean} [is_valid] + * @property {number} [maximum_discount_value] + * @property {string} [message] + * @property {number} [minimum_cart_value] */ /** * @typedef ChargesThreshold - * @property {number} [charges] - Charges amount to be applied on cart - * @property {number} [threshold] - Threshold of cart value on which the charge - * should be applied + * @property {number} [charges] + * @property {number} [threshold] */ /** * @typedef DeliveryChargesConfig - * @property {boolean} [enabled] - Delivery charge enabled for the cart or not - * @property {ChargesThreshold[]} [charges] - Charges applicable based on threshold + * @property {boolean} [enabled] + * @property {ChargesThreshold[]} [charges] */ /** * @typedef CartCommonConfig * @property {DeliveryChargesConfig} [delivery_charges_config] */ /** - * @typedef CartDetailResult - * @property {number} [cart_id] - Unique identifier of the user cart - * @property {string} [uid] - Unique identifier of the user cart - * @property {string} [coupon_text] - Coupon text of coupon applied on cart - * @property {string} [id] - Unique identifier of the user cart - * @property {Object} [pan_config] - Pan card config states at what condition - * user should enter the pan card + * @typedef CartDetailResponse + * @property {number} [cart_id] + * @property {string} [uid] + * @property {string} [coupon_text] + * @property {string} [id] + * @property {Object} [pan_config] * @property {ShipmentPromise} [delivery_promise] - * @property {string} [comment] - Comment message to be added in user cart - * @property {CartProductInfo[]} [items] - Items data list in user cart that - * includes item id, item size, store id, available sizes and rest of the item - * related data + * @property {string} [comment] + * @property {CartProductInfo[]} [items] * @property {PaymentSelectionLock} [payment_selection_lock] - * @property {string} [delivery_charge_info] - Delivery charge in information - * message on shipment + * @property {string} [delivery_charge_info] * @property {CartCommonConfig} [common_config] * @property {CartDetailCoupon} [coupon] - * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict - * the checkout process - * @property {string} [message] - Message of the cart detail API response - * @property {Object} [notification] - Notification object which denotes - * notification data for user cart - * @property {string} [staff_user_id] - Staff employee user id if cart is - * created by staff employee for the customer - * @property {boolean} [success] - Success flag of get cart detail API response + * @property {boolean} [restrict_checkout] + * @property {string} [message] + * @property {Object} [notification] + * @property {string} [staff_user_id] + * @property {boolean} [success] * @property {CartBreakup} [breakup_values] - * @property {boolean} [is_valid] - Cart validity flag determines the if the - * response is valid or not + * @property {boolean} [is_valid] * @property {CartCurrency} [currency] - * @property {string} [checkout_mode] - Checkout mode of user cart - * @property {string} [last_modified] - Last modified timestamp of cart - * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user - * is doing fast checkout for the cart using buy now - * @property {string} [gstin] - GSTIN added in user cart - * @property {AppliedPromotion[]} [applied_promo_details] - List of applied - * promotions data to cart which includes promotion id, promotion name, offer - * text, description, buy rules, discount rules and promotion type - * @property {string} [pan_no] - Permanent Account Number of the user - * @property {Object} [custom_cart_meta] - Custom meta details added cart - * checkout API payload + * @property {string} [checkout_mode] + * @property {string} [last_modified] + * @property {boolean} [buy_now] + * @property {string} [gstin] + * @property {AppliedPromotion[]} [applied_promo_details] + * @property {string} [pan_no] + * @property {Object} [custom_cart_meta] */ /** * @typedef AddProductCart - * @property {number} [quantity] - Field to specify the product quantity that - * user wants to buy - * @property {string} [item_size] - Field to determine size of the product - * @property {number} [seller_id] - Unique identifier of the seller selected by - * the user from which user want to buy a product - * @property {Object[]} [parent_item_identifiers] - Fields to determine parent - * product of the product - * @property {string[]} [product_group_tags] - Field to specify the product - * groups of the product that the user is trying to add in cart - * @property {string} [article_id] - Unique identifier of an article - * @property {Object} [article_assignment] - Field to determine how article - * assignment should happen by article assignment level and strategy - * @property {number} [store_id] - Unique identifier of the store selected by - * the user from which user want to buy a product - * @property {string} [display] - Display field at article level - * @property {number} [item_id] - Unique identifier to identify product - * @property {Object} [extra_meta] - Extra meta data to be added at article - * level while add items to cart - * @property {Object} [_custom_json] - Field to add custom json at article level - * while add items to cart - * @property {Object} [meta] - Field to add meta data at article level - * @property {boolean} [pos] - Filed to determine whether user is making request - * from pos or not + * @property {number} [quantity] + * @property {string} [item_size] + * @property {number} [seller_id] + * @property {Object[]} [parent_item_identifiers] + * @property {string[]} [product_group_tags] + * @property {string} [article_id] + * @property {Object} [article_assignment] + * @property {number} [store_id] + * @property {string} [display] + * @property {number} [item_id] + * @property {Object} [extra_meta] + * @property {Object} [_custom_json] + * @property {Object} [meta] + * @property {boolean} [pos] * @property {string} [seller_identifier] - Add items using seller identifier for store os */ /** - * @typedef AddCartCreation - * @property {boolean} [new_cart] - Field to create to new cart whille user adds - * item to cart - * @property {AddProductCart[]} [items] - List of items detail which need to be - * added to cart like item id, item size, and item quantity + * @typedef AddCartRequest + * @property {boolean} [new_cart] + * @property {AddProductCart[]} [items] */ /** - * @typedef AddCartDetailResult + * @typedef AddCartDetailResponse * @property {boolean} [success] - True if all items are added successfully. * False if partially added or not added. - * @property {CartDetailResult} [cart] + * @property {CartDetailResponse} [cart] * @property {boolean} [partial] - When adding multiple items check if all * added. True if only few are added. - * @property {string} [message] - Message of add cart API response + * @property {string} [message] */ /** * @typedef UpdateProductCart - * @property {number} [quantity] - Field to update the quantity of the item in cart - * @property {string} [item_size] - Field to update the size of the product in cart - * @property {Object} [parent_item_identifiers] - Field to update parent product - * of the item in cart - * @property {Object} [meta] - Field to update meta of the item in cart - * @property {Object} [extra_meta] - Field to update extra meta of the product in cart - * @property {Object} [_custom_json] - Field to update custom json of the product in cart - * @property {number} [item_id] - Item id of the product that needs to be updated - * @property {number} [item_index] - Item index determines on which index the - * product falls to be updated + * @property {number} [quantity] + * @property {string} [item_size] + * @property {Object} [parent_item_identifiers] + * @property {Object} [meta] + * @property {Object} [extra_meta] + * @property {Object} [_custom_json] + * @property {number} [item_id] + * @property {number} [item_index] * @property {CartProductIdentifer} identifiers - * @property {string} [article_id] - Article id of the product in cart + * @property {string} [article_id] */ /** - * @typedef FreeGiftItemCreation - * @property {string} promotion_id - Unique identifier of the free gift promotion. - * @property {string} item_id - Unique identifier of the selected free gift item. - * @property {string} item_size - Size of the selected free gift item. - */ -/** - * @typedef UpdateCartCreation + * @typedef UpdateCartRequest * @property {UpdateProductCart[]} [items] - * @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift - * items with updated sizes. - * @property {string} operation - Cart opertaion type + * @property {string} operation */ /** - * @typedef UpdateCartDetailResult + * @typedef UpdateCartDetailResponse * @property {boolean} [success] - True if all items are added successfully. * False if partially added or not added. - * @property {CartDetailResult} [cart] - * @property {string} [message] - Message of update cart API response + * @property {CartDetailResponse} [cart] + * @property {string} [message] */ /** * @typedef OverrideCartItemPromo - * @property {string} promo_id - Promotion id applied on product - * @property {string} promo_amount - Promotion amount applied on product - * @property {string} [promo_desc] - Promotion description applied on product + * @property {string} promo_id + * @property {string} promo_amount + * @property {string} [promo_desc] * @property {string} [rwrd_tndr] - * @property {Object[]} [item_list] - List of items - * @property {string} [parent_promo_id] - Parent promotion unique identifier + * @property {Object[]} [item_list] + * @property {string} [parent_promo_id] */ /** * @typedef OverrideCartItem - * @property {string} [seller_identifier] - Seller identifiers of the product size. - * @property {number} [quantity] - Item quantity, which you have added into cart - * @property {string} size - Item size, which you have added into cart - * @property {number} price_marked - Original price of product - * @property {number} amount_paid - Amount needs to paid for item - * @property {OverrideCartItemPromo[]} [promo_list] - List of promotion applied on item - * @property {Object} [extra_meta] - Extra meta to be added while checkout in order - * @property {number} item_id - Item unique id in user cart - * @property {number} discount - Discount amount applied on item - * @property {number} price_effective - Current per unit price of product after - * existing deductions + * @property {string} [seller_identifier] + * @property {number} [quantity] + * @property {string} size + * @property {number} price_marked + * @property {number} amount_paid + * @property {OverrideCartItemPromo[]} [promo_list] + * @property {Object} [extra_meta] + * @property {number} item_id + * @property {number} discount + * @property {number} price_effective */ /** * @typedef OverrideCheckoutReq - * @property {string} cart_id - The cart id of user cart - * @property {string} payment_mode - Payment mode from which the payment to be - * done for the order - * @property {Object} [billing_address] - Billing address json which includes - * customer address, customer phone, customer email, customer pincode, - * customer landmark and customer name - * @property {string} merchant_code - Merchant code of the payment mode selected - * to do the payment - * @property {string} payment_identifier - Payment identifier of the payment - * mode selected to do the payment - * @property {string} currency_code - Currency code for the price - * @property {string} aggregator - Aggregator name of the payment gateway - * @property {string} order_type - Order type of the order being placed like - * pickAtStore or HomeDelivery - * @property {string} [callback_url] - Callback url to be redirected after - * payment received/failed - * @property {OverrideCartItem[]} cart_items - List of items which includes - * their size, id, discount and promo details - * @property {number} [ordering_store] - Ordering store id of the store from - * which the order is getting placed - * @property {Object} [shipping_address] - Shipping address json which includes - * name, area, address, phone, area_code, state, country, country code and email - */ -/** - * @typedef OverrideCheckoutResult - * @property {Object} data - Data of the user cart checkout includes cart data, - * address, user id, order type etc - * @property {Object} cart - Cart details in API response which included cart - * id, items in cart, promise, order type, breakup values etc. - * @property {string} success - Success flag of cart override checkout API response - * @property {string} order_id - Order id generated after placing order - * @property {string} message - Message of the cart override checkout API response - */ -/** - * @typedef GetShareCartLinkCreation + * @property {string} cart_id + * @property {string} payment_mode + * @property {Object} [billing_address] + * @property {string} merchant_code + * @property {string} payment_identifier + * @property {string} currency_code + * @property {string} aggregator + * @property {string} order_type + * @property {string} [callback_url] + * @property {OverrideCartItem[]} cart_items + * @property {number} [ordering_store] + * @property {Object} [shipping_address] + */ +/** + * @typedef OverrideCheckoutResponse + * @property {Object} data + * @property {Object} cart + * @property {string} success + * @property {string} order_id + * @property {string} message + */ +/** + * @typedef GetShareCartLinkRequest * @property {string} [id] - Cart uid for generating sharing * @property {Object} [meta] - Staff, Ordering store or any other data. This * data will be used to generate link as well as sent as shared details. */ /** - * @typedef GetShareCartLinkResult - * @property {string} [token] - Short url unique id of the cart which is opted - * to share with other user - * @property {string} [share_url] - Short shareable final url which can populate - * shared cart items in one's cart or replaced one's cart with shared cart items + * @typedef GetShareCartLinkResponse + * @property {string} [token] - Short url unique id + * @property {string} [share_url] - Short shareable final url */ /** * @typedef SharedCartDetails * @property {Object} [source] - Share link device and other source information * @property {Object} [user] - User details of who generated share link - * @property {string} [token] - Short link id of the user cart that needs to be shared - * @property {string} [created_on] - Created on timestamp of user cart + * @property {string} [token] - Short link id + * @property {string} [created_on] * @property {Object} [meta] - Meta data sent while generating share cart link */ /** * @typedef SharedCart - * @property {string} [coupon_text] - Coupon text of the applied coupon on user cart - * @property {string} [id] - Cart id of shared cart + * @property {string} [coupon_text] + * @property {string} [id] * @property {ShipmentPromise} [delivery_promise] - * @property {string} [comment] - Comment message added in user cart - * @property {CartProductInfo[]} [items] - Items data list in user cart that - * includes item id, item size, store id, available sizes and rest of the item - * related data + * @property {string} [comment] + * @property {CartProductInfo[]} [items] * @property {SharedCartDetails} [shared_cart_details] * @property {PaymentSelectionLock} [payment_selection_lock] - * @property {string} [delivery_charge_info] - Delivery charge info message of - * the user cart - * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict - * the checkout process - * @property {string} [message] - Message of the get shared cart API response + * @property {string} [delivery_charge_info] + * @property {boolean} [restrict_checkout] + * @property {string} [message] * @property {CartBreakup} [breakup_values] - * @property {boolean} [is_valid] - Valid flag for get shared cart detail API - * @property {string} [uid] - Cart id of the user cart - * @property {string} [checkout_mode] - Checkout mode of address on which - * address to be used for which checkout mode of cart + * @property {boolean} [is_valid] + * @property {string} [uid] + * @property {string} [checkout_mode] * @property {CartCurrency} [currency] - * @property {string} [last_modified] - Last modified timestamp of user cart - * @property {boolean} [buy_now] - Buy now flag of user cart - * @property {number} [cart_id] - Cart id of user cart for generating cart sharing token - * @property {string} [gstin] - GSTIN added in user cart - * @property {Object} [custom_cart_meta] - Custom cart meta of user cart added - * via update cart meta API + * @property {string} [last_modified] + * @property {boolean} [buy_now] + * @property {number} [cart_id] + * @property {string} [gstin] + * @property {Object} [custom_cart_meta] */ /** - * @typedef SharedCartResult + * @typedef SharedCartResponse * @property {SharedCart} [cart] - * @property {string} [error] - Error details if any error occurs which includes - * type of error, error code and error message + * @property {string} [error] */ /** * @typedef CartList - * @property {string} [cart_id] - The cart id of user - * @property {Object} [pick_up_customer_details] - Customer contact details for - * customer pickup at store - * @property {number} [cart_value] - Total amount of cart - * @property {string} [created_on] - Date format when cart created - * @property {string} [user_id] - User id which is associated with cart - * @property {string} [currency_code] - Active cart currency code - * @property {number} [item_counts] - Article total count in cart + * @property {string} [cart_id] + * @property {Object} [pick_up_customer_details] + * @property {number} [cart_value] + * @property {string} [created_on] + * @property {string} [user_id] + * @property {string} [currency_code] + * @property {number} [item_counts] */ /** - * @typedef MultiCartResult - * @property {boolean} [success] - True if get list of cart successfully. - * @property {CartList[]} [data] - List of active carts and their item's count + * @typedef MultiCartResponse + * @property {boolean} [success] + * @property {CartList[]} [data] */ /** * @typedef UpdateUserCartMapping - * @property {string} user_id - User Id of user for which we map with the cart + * @property {string} user_id */ /** * @typedef UserInfo - * @property {string} [gender] - User gender - * @property {string} [modified_on] - Date format of user when user last modified - * @property {string} [_id] - Unique Identifier of user - * @property {string} [uid] - Unique UID of user - * @property {string} [external_id] - Unique external id - * @property {string} [mobile] - 10 digit Mobile number of user - * @property {string} [last_name] - Last name of user - * @property {string} [created_at] - Date format of user when user registered - * @property {string} [first_name] - First name of user - */ -/** - * @typedef UserCartMappingResult - * @property {string} [coupon_text] - Coupon text of coupon applied on cart + * @property {string} [gender] + * @property {string} [modified_on] + * @property {string} [_id] + * @property {string} [uid] + * @property {string} [external_id] + * @property {string} [mobile] + * @property {string} [last_name] + * @property {string} [created_at] + * @property {string} [first_name] + */ +/** + * @typedef UserCartMappingResponse + * @property {string} [coupon_text] * @property {UserInfo} [user] - * @property {string} [id] - Unique identifier of the user cart - * @property {Object} [pan_config] - Pan card config states at what condition - * user should enter the pan card + * @property {string} [id] + * @property {Object} [pan_config] * @property {ShipmentPromise} [delivery_promise] - * @property {string} [comment] - Comment message to be added in user cart - * @property {CartProductInfo[]} [items] - Items data list in user cart that - * includes item id, item size, store id, available sizes and rest of the item - * related data + * @property {string} [comment] + * @property {CartProductInfo[]} [items] * @property {PaymentSelectionLock} [payment_selection_lock] - * @property {string} [delivery_charge_info] - Delivery charge in information - * message on shipment - * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict - * the checkout process - * @property {string} [message] - Message of the get cart detail API response + * @property {string} [delivery_charge_info] + * @property {boolean} [restrict_checkout] + * @property {string} [message] * @property {CartBreakup} [breakup_values] - * @property {boolean} [is_valid] - Cart validity flag determines the if the - * response is valid or not + * @property {boolean} [is_valid] * @property {CartCurrency} [currency] - * @property {string} [checkout_mode] - Checkout mode of user cart - * @property {string} [last_modified] - Last modified timestamp of cart - * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user - * is doing fast checkout for the cart using buy now - * @property {string} [gstin] - GSTIN added in user cart - * @property {Object} [custom_cart_meta] - Custom meta details added cart - * checkout API payload - * @property {AppliedPromotion[]} [applied_promo_details] - List of applied - * promotions data to cart which includes promotion id, promotion name, offer - * text, description, buy rules, discount rules and promotion type - * @property {string} [pan_no] - Permanent Account Number of the user - */ -/** - * @typedef PlatformAddCartDetails - * @property {string} [user_id] - The user id of user, for which we need to add - * item into cart - * @property {boolean} [new_cart] - Field to create to new cart whille user adds - * item to cart - * @property {AddProductCart[]} [items] - List of items detail which need to be - * added to cart like item id, item size, and item quantity - */ -/** - * @typedef PlatformUpdateCartDetails - * @property {string} [user_id] - The user id of user, for which we need to - * update the cart - * @property {UpdateProductCart[]} [items] - List items data that needs to be - * updated in cart - * @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift - * items with updated sizes. - * @property {string} operation - Field to determine if item to be removed from - * cart or it needs to be updated - */ -/** - * @typedef DeleteCartDetails - * @property {string[]} [cart_id_list] - List of all cart ids, which need to delete - */ -/** - * @typedef DeleteCartDetailResult + * @property {string} [checkout_mode] + * @property {string} [last_modified] + * @property {boolean} [buy_now] + * @property {string} [gstin] + * @property {Object} [custom_cart_meta] + * @property {AppliedPromotion[]} [applied_promo_details] + * @property {string} [pan_no] + */ +/** + * @typedef PlatformAddCartRequest + * @property {string} [user_id] + * @property {boolean} [new_cart] + * @property {AddProductCart[]} [items] + */ +/** + * @typedef PlatformUpdateCartRequest + * @property {string} [user_id] + * @property {UpdateProductCart[]} [items] + * @property {string} operation + */ +/** + * @typedef DeleteCartRequest + * @property {string[]} [cart_id_list] + */ +/** + * @typedef DeleteCartDetailResponse * @property {boolean} [success] - True if cart is archived successfully. False * if not archived. - * @property {string} [message] - Message for delete cart response + * @property {string} [message] */ /** - * @typedef CartItemCountResult + * @typedef CartItemCountResponse * @property {number} [user_cart_items_count] - Item count present in cart */ /** * @typedef Coupon - * @property {string} [title] - Coupon Title of the coupon applied denotes name - * of the coupon - * @property {number} [max_discount_value] - Maximum discount value of the - * coupon applied to cart - * @property {string} [coupon_code] - Coupon code of the coupon applied on cart - * @property {boolean} [is_applied] - Flag to determine where the coupon is - * applied to cart or not - * @property {string} [coupon_type] - Type of the coupon applied to cart - * @property {string} [expires_on] - Message to display to user for expiry of the coupon - * @property {number} [coupon_value] - Coupon value of the coupon applied to cart - * @property {string} [sub_title] - Coupon subtitle of the coupon applied to - * cart which is used to display - * @property {number} [minimum_cart_value] - Minimum cart value of the coupon - * applied to cart - * @property {boolean} [is_applicable] - Flag to determine where the coupon is - * applicable to cart or not - * @property {string} [message] - Coupon message of the coupon applied to cart - * @property {string} [description] - Coupon description of the coupon applied to cart - * @property {string} [start_date] - Start date of the coupon when the coupon - * will be live for the users to apply on cart - * @property {string} [end_date] - End date of the coupon on which the coupon expires - * @property {string} [coupon_applicable_message] - Message which is used to - * display to the customer if the coupon is applied successfully + * @property {string} [title] + * @property {number} [max_discount_value] + * @property {string} [coupon_code] + * @property {boolean} [is_applied] + * @property {string} [coupon_type] + * @property {string} [expires_on] + * @property {number} [coupon_value] + * @property {string} [sub_title] + * @property {number} [minimum_cart_value] + * @property {boolean} [is_applicable] + * @property {string} [message] + * @property {string} [description] + * @property {string} [start_date] + * @property {string} [end_date] + * @property {string} [coupon_applicable_message] */ /** * @typedef PageCoupon - * @property {boolean} [has_next] - Denotes if next page of coupon is available - * @property {number} [current] - Current page number - * @property {number} [total] - Total pages of coupon availalbe - * @property {number} [total_item_count] - Total coupons are available for the cart - * @property {boolean} [has_previous] - Denotes if previous page of the coupon - * is available + * @property {boolean} [has_next] + * @property {number} [current] + * @property {number} [total] + * @property {number} [total_item_count] + * @property {boolean} [has_previous] */ /** - * @typedef GetCouponResult - * @property {Coupon[]} [available_coupon_list] - List of available coupon which - * can be applied on cart + * @typedef GetCouponResponse + * @property {Coupon[]} [available_coupon_list] * @property {PageCoupon} [page] */ /** - * @typedef ApplyCouponDetails + * @typedef ApplyCouponRequest * @property {string} coupon_code - Coupon code to be applied */ /** * @typedef GeoLocation - * @property {number} [longitude] - Longitude coordinate for address - * @property {number} [latitude] - Latitude coordinate for address + * @property {number} [longitude] + * @property {number} [latitude] */ /** * @typedef PlatformAddress - * @property {string} [phone] - Phone number for address - * @property {string} [id] - Id of the address - * @property {string} [area_code_slug] - Area code slug for address. example - * pincode is slug for India - * @property {string} [country_code] - Country code of address + * @property {string} [phone] + * @property {string} [id] + * @property {string} [area_code_slug] + * @property {string} [country_code] * @property {GeoLocation} [geo_location] - * @property {string} [country] - Country of address - * @property {string} [state] - State of the address - * @property {boolean} [is_default_address] - Default address flag if no address - * selected then this should be the default address selected - * @property {string[]} [tags] - Tags of address from which it can be identified - * @property {string} [created_by_user_id] - Created by user id of address - * @property {string} [landmark] - Landmark of address - * @property {string} [email] - Email address for address data - * @property {string} [area_code] - Area code of the address - * @property {string} [checkout_mode] - Checkout mode of address on which - * address to be used for which checkout mode of cart - * @property {Object} [meta] - Metadata of the address - * @property {boolean} [is_active] - States whether address is active or not - * @property {string} [name] - Name of person in address data to whom it belongs to - * @property {Object} [google_map_point] - Google map point of the address - * @property {string} [cart_id] - The cart id of user cart - * @property {string} [city] - City of the address - * @property {string} [sector] - Sector of the address + * @property {string} [country] + * @property {string} [state] + * @property {boolean} [is_default_address] + * @property {string[]} [tags] + * @property {string} [created_by_user_id] + * @property {string} [landmark] + * @property {string} [email] + * @property {string} [area_code] + * @property {string} [checkout_mode] + * @property {Object} [meta] + * @property {boolean} [is_active] + * @property {string} [name] + * @property {Object} [google_map_point] + * @property {string} [cart_id] + * @property {string} [city] + * @property {string} [sector] * @property {string} [state_code] - State code for international address - * @property {string} [area] - Area description for address - * @property {string} [user_id] - User id of address for which address is created - * @property {string} [address_type] - Address type of address - * @property {string} [address] - Address description for address data - * @property {string} [country_phone_code] - Country phone code for address - * @property {string} [country_iso_code] - Country iso code for address - * @property {Object} [_custom_json] - Custom json of the address - */ -/** - * @typedef ValidationConfig - * @property {number} address_max_limit - The maximum number of addresses a user can have. - * @property {number} user_address_count - The total number of addresses saved by a user. + * @property {string} [area] + * @property {string} [user_id] + * @property {string} [address_type] + * @property {string} [address] + * @property {string} [country_phone_code] + * @property {string} [country_iso_code] + * @property {Object} [_custom_json] */ /** - * @typedef PlatformGetAddressesDetails - * @property {PlatformAddress[]} [address] - List of all address saved by customer - * @property {ValidationConfig} [validation_config] + * @typedef PlatformGetAddressesResponse + * @property {PlatformAddress[]} [address] */ /** - * @typedef SaveAddressDetails - * @property {string} [id] - Id of the address - * @property {boolean} [success] - Success flag of save address Response - * @property {boolean} [is_default_address] - Default address flag if no address - * selected then this should be the default address selected + * @typedef SaveAddressResponse + * @property {string} [id] + * @property {boolean} [success] + * @property {boolean} [is_default_address] */ /** - * @typedef UpdateAddressDetails - * @property {string} [id] - ID of an address - * @property {boolean} [is_default_address] - Default address flag if no address - * selected then this should be the default address selected - * @property {boolean} [success] - Success flag of update address response - * @property {boolean} [is_updated] - Updated flag for update address operation - * if the address updated or not + * @typedef UpdateAddressResponse + * @property {string} [id] + * @property {boolean} [is_default_address] + * @property {boolean} [success] + * @property {boolean} [is_updated] */ /** - * @typedef DeleteAddressResult - * @property {string} [id] - Id of the address - * @property {boolean} [is_deleted] - Deleted flag in delete address response - * states whether the address was deleted or not + * @typedef DeleteAddressResponse + * @property {string} [id] + * @property {boolean} [is_deleted] */ /** - * @typedef PlatformSelectCartAddress - * @property {string} [cart_id] - Cart id of the user cart for which the select - * address operation performed - * @property {string} [billing_address_id] - Billing address id selected by user - * on which shipment bill to be generated - * @property {string} [checkout_mode] - The checkout mode in cart - * @property {string} [id] - Address is selected by user on which shipment to be delivered - * @property {string} [user_id] - Unique Identifier of user + * @typedef PlatformSelectCartAddressRequest + * @property {string} [cart_id] + * @property {string} [billing_address_id] + * @property {string} [checkout_mode] + * @property {string} [id] + * @property {string} [user_id] */ /** * @typedef ShipmentArticle - * @property {string} [meta] - Article meta data for shipment - * @property {string} [quantity] - Article quantity for shipment - * @property {string} [article_id] - Article unique id for shipment - */ -/** - * @typedef PlatformShipmentDetails - * @property {number} [shipments] - Count of shipments that will be shipped - * @property {number} [fulfillment_id] - Fulfilment id of the shipment - * @property {CartProductInfo[]} [items] - Item details in the shipment - * @property {Object} [dp_options] - Delivery partner options that are available - * to deliver the shipment - * @property {string} [shipment_type] - Shipment type of the shipment returned - * in get shipments API like single_shipment or multiple shipment. Single - * Shipment means 1 item in 1 shipment and vice versa in the other one - * @property {string} [order_type] - Order type of the shipment like pickAtStore - * or HomeDelivery - * @property {string} [box_type] - Box type of the shipment in which the - * shipment will be delivered + * @property {string} [meta] + * @property {string} [quantity] + * @property {string} [article_id] + */ +/** + * @typedef PlatformShipmentResponse + * @property {number} [shipments] + * @property {number} [fulfillment_id] + * @property {CartProductInfo[]} [items] + * @property {Object} [dp_options] + * @property {string} [shipment_type] + * @property {string} [order_type] + * @property {string} [box_type] * @property {ShipmentPromise} [promise] - * @property {string} [dp_id] - Delivery partner id of the shipment - * @property {string} [fulfillment_type] - Fulfilment type of shipment - * @property {ShipmentArticle[]} [articles] - List of articles in shipment + * @property {string} [dp_id] + * @property {string} [fulfillment_type] + * @property {ShipmentArticle[]} [articles] */ /** - * @typedef PlatformCartShipmentsResult - * @property {string} [coupon_text] - Coupon text of coupon applied on cart - * @property {string} [id] - Cart id of the user cart - * @property {Object} [pan_config] - Pan card config states at what condition - * user should enter the pan card + * @typedef PlatformCartShipmentsResponse + * @property {string} [coupon_text] + * @property {string} [id] + * @property {Object} [pan_config] * @property {ShipmentPromise} [delivery_promise] - * @property {string} [comment] - Comment message added in cart - * @property {CartProductInfo[]} [items] - List of items in cart + * @property {string} [comment] + * @property {CartProductInfo[]} [items] * @property {PaymentSelectionLock} [payment_selection_lock] - * @property {string} [delivery_charge_info] - Delivery charge in information - * message on shipment - * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict - * the checkout process - * @property {string} [message] - Response message of get shipments API + * @property {string} [delivery_charge_info] + * @property {boolean} [restrict_checkout] + * @property {string} [message] * @property {CartBreakup} [breakup_values] - * @property {string} [staff_user_id] - Staff employee user id if cart is - * created by staff employee for the customer - * @property {boolean} [is_valid] - Cart validity flag determines the if the - * response is valid or not - * @property {PlatformShipmentDetails[]} [shipments] - List of shipments that - * will be shipped + * @property {string} [staff_user_id] + * @property {boolean} [is_valid] + * @property {PlatformShipmentResponse[]} [shipments] * @property {CartCurrency} [currency] - * @property {string} [checkout_mode] - Checkout mode of cart - * @property {string} [last_modified] - Last modified timestamp of cart - * @property {boolean} [buy_now] - Buy now flag of user cart - * @property {string} [gstin] - GSTIN number added in cart - * @property {AppliedPromotion[]} [applied_promo_details] - List of applied - * promotions data to cart which includes promotion id, promotion name, offer - * text, description, buy rules, discount rules and promotion type - * @property {boolean} [error] - Error details if any error occurs which - * includes type of error, error code and error message - * @property {string} [pan_no] - Permanent Account Number of the user - * @property {Object} [custom_cart_meta] - Custom cart meta details added in cart + * @property {string} [checkout_mode] + * @property {string} [last_modified] + * @property {boolean} [buy_now] + * @property {string} [gstin] + * @property {AppliedPromotion[]} [applied_promo_details] + * @property {boolean} [error] + * @property {string} [pan_no] + * @property {Object} [custom_cart_meta] */ /** * @typedef UpdateCartShipmentItem * @property {number} [quantity] - Quantity of product in shipment * @property {string} shipment_type - Shipment delivery type - * @property {string} article_uid - Article unique id for shipment + * @property {string} article_uid - Article mongo id */ /** - * @typedef UpdateCartShipmentCreation - * @property {UpdateCartShipmentItem[]} shipments - List of Shipments which - * includes shipment data like shipment items, shipment promise, Shipment - * type, shipment order type, shipment dp options etc + * @typedef UpdateCartShipmentRequest + * @property {UpdateCartShipmentItem[]} shipments */ /** - * @typedef PlatformCartMetaCreation - * @property {string} [gstin] - GSTIN number to be added in user cart + * @typedef PlatformCartMetaRequest + * @property {string} [gstin] * @property {Object} [pick_up_customer_details] - Customer contact details for * customer pickup at store - * @property {string} [checkout_mode] - Checkout mode of user cart - * @property {Object} [gift_details] - Gift details is open json which can - * include gift message - * @property {string} [pan_no] - Permanent Account Number of the user - * @property {string} [comment] - Comment message to be added in user cart + * @property {string} [checkout_mode] + * @property {Object} [gift_details] + * @property {string} [pan_no] + * @property {string} [comment] * @property {string} [staff_user_id] - Staff user id */ /** - * @typedef CartMetaDetails - * @property {boolean} [is_valid] - Whether added meta was vaild - * @property {string} [message] - Detailed message that used to display + * @typedef CartMetaResponse + * @property {boolean} [is_valid] + * @property {string} [message] */ /** - * @typedef CartMetaMissingDetails - * @property {string[]} [errors] - Detailed errors for invalid cart meta request + * @typedef CartMetaMissingResponse + * @property {string[]} [errors] */ /** * @typedef StaffCheckout - * @property {string} [employee_code] - Employee code of staff who does checkout - * on behalf of customer - * @property {string} _id - Id of staff who does checkout on behalf of customer - * @property {string} user - User id of the employee who does checkout on behalf - * of customer - * @property {string} last_name - Last name of staff employee who does checkout - * on behalf of customer - * @property {string} first_name - First name of staff emplyee who does checkout - * on behalf of customer + * @property {string} [employee_code] + * @property {string} _id + * @property {string} user + * @property {string} last_name + * @property {string} first_name */ /** * @typedef CustomerDetails - * @property {string} [name] - Name of customer to be added in customer detail - * while checkout - * @property {string} [email] - Email address of the customer to be added in - * customer detail while checkout - * @property {string} mobile - Mobile number of customer to be added in customer - * detail while checkout + * @property {string} [name] + * @property {string} [email] + * @property {string} mobile */ /** * @typedef Files - * @property {string} key - Key represents name of file - * @property {string[]} values - List of urls path - */ -/** - * @typedef CartCheckoutCustomMeta - * @property {string} key - Key name of custom meta - * @property {string} value - Value to be added in key - */ -/** - * @typedef PlatformCartCheckoutDetailCreation - * @property {CartCheckoutCustomMeta[]} [custom_meta] - * @property {string} [address_id] - * @property {string} [payment_identifier] - * @property {Object} [payment_params] - * @property {boolean} [payment_auto_confirm] - * @property {string} id - * @property {boolean} [pos] - * @property {string} [billing_address_id] - * @property {string} [merchant_code] - * @property {string} [aggregator] - * @property {number} [pick_at_store_uid] - * @property {string} [device_id] - * @property {Object} [delivery_address] - * @property {string} payment_mode - * @property {string} [checkout_mode] - * @property {CustomerDetails} [customer_details] - Customer details - * @property {Object} [meta] - * @property {StaffCheckout} [staff] - * @property {string} [employee_code] - * @property {Object} [billing_address] - * @property {string} [callback_url] - * @property {string} [user_id] - * @property {Object} [extra_meta] - * @property {string} order_type - * @property {Files[]} [files] - List of file url - * @property {number} [ordering_store] - * @property {Object} [payment_extra_identifiers] - * @property {string} [iin] - * @property {string} [network] - * @property {string} [type] - * @property {string} [card_id] + * @property {string} key + * @property {string[]} values */ /** * @typedef CheckCart - * @property {string} [coupon_text] - Coupon text of the applied coupon on order placed - * @property {string} [cod_message] - Cash On Delivery message for the order placed - * @property {string} [id] - Cart id of the user cart - * @property {string} [store_code] - Store code from which the order placed + * @property {string} [coupon_text] + * @property {string} [cod_message] + * @property {string} [id] + * @property {string} [store_code] * @property {ShipmentPromise} [delivery_promise] - * @property {string} [comment] - Comment message added in cart after order placed - * @property {string} [user_type] - User type of the cart who places the order - * @property {CartProductInfo[]} [items] - Items details in cart after order placed - * @property {string} [error_message] - Error details if any error occurs which - * includes type of error, error code and error message - * @property {boolean} [success] - Success flag of checkout cart API response + * @property {string} [comment] + * @property {string} [user_type] + * @property {CartProductInfo[]} [items] + * @property {string} [error_message] + * @property {boolean} [success] * @property {PaymentSelectionLock} [payment_selection_lock] - * @property {string} [delivery_charge_info] - Delivery charge in information - * message on shipment - * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict - * the checkout process - * @property {string} [order_id] - Order id generated after placing order - * @property {string} [message] - Message of the cart checkout API response + * @property {string} [delivery_charge_info] + * @property {boolean} [restrict_checkout] + * @property {string} [order_id] + * @property {string} [message] * @property {CartBreakup} [breakup_values] - * @property {number} [cod_charges] - Cash On Delivery charges of the user cart - * @property {boolean} [is_valid] - Valid flag fotr the checkout response if - * order placed was valid - * @property {string} [uid] - Cart id of user cart - * @property {string} [checkout_mode] - Checkout mode of user cart + * @property {number} [cod_charges] + * @property {boolean} [is_valid] + * @property {string} [uid] + * @property {string} [checkout_mode] * @property {CartCurrency} [currency] - * @property {string} [last_modified] - Last modified timestamp of cart - * @property {boolean} [buy_now] - Buy now flag of user cart - * @property {number} [delivery_charge_order_value] - Delivery charge order value - * @property {number} [cart_id] - Cart id of the user cart for which the order placed - * @property {Object[]} [store_emps] - Store employees data - * @property {string} [gstin] - GSTIN number added in cart - * @property {boolean} [cod_available] - Whether Cash On Delivery available - * @property {number} [delivery_charges] - Delivery charges of the order placed - * via checkout API - * @property {Object} [custom_cart_meta] - Custom meta details added cart - * checkout API payload - */ -/** - * @typedef CartCheckoutDetails - * @property {string} [app_intercept_url] - App intercept url which is used to - * redirect on app after payment in confirmed/failed - * @property {Object} [data] - Data of the user cart checkout includes cart - * data, address, user id, order type etc - * @property {CheckCart} [cart] - * @property {boolean} [success] - Success flag of cart checkout API response - * @property {string} [callback_url] - Callback url to be redirected after - * payment received/failed - * @property {string} [payment_confirm_url] - Payment confirm url used to - * redirect after payment is confirmed - * @property {string} [order_id] - Order id generated after placing order - * @property {string} [message] - Message of the cart checkout v2 API response - */ -/** - * @typedef CartCheckoutResult + * @property {string} [last_modified] + * @property {boolean} [buy_now] + * @property {number} [delivery_charge_order_value] + * @property {number} [cart_id] + * @property {Object[]} [store_emps] + * @property {string} [gstin] + * @property {boolean} [cod_available] + * @property {number} [delivery_charges] + * @property {Object} [custom_cart_meta] + */ +/** + * @typedef CartCheckoutResponse * @property {string} [app_intercept_url] * @property {Object} [data] * @property {CheckCart} [cart] @@ -2037,387 +1591,239 @@ export = CartPlatformModel; * @property {string} [message] */ /** - * @typedef CartDeliveryModesDetails + * @typedef CartDeliveryModesResponse * @property {number[]} [pickup_stores] - Store pick up available store uids * @property {string[]} [available_modes] - Available delivery modes */ /** * @typedef PickupStoreDetail - * @property {string} [country] - Country of address - * @property {string} [state] - State of the address - * @property {string} [city] - City of the address - * @property {string} [phone] - Phone number for address - * @property {string} [area_code] - Area code of the address - * @property {number} [uid] - Uid of the address - * @property {string} [area_code_slug] - Area code slug for address. example - * pincode is slug for India - * @property {string} [address_type] - Address type of address - * @property {string} [area] - Area description for address - * @property {number} [id] - Id of the address - * @property {string} [store_manager_name] - Name of store manager - * @property {string} [name] - Name of person in address data to whom it belongs to - * @property {string} [store_code] - Store code from which the order placed - * @property {string} [landmark] - Landmark of address - * @property {string} [email] - Email address for address data - * @property {number} [pincode] - Address pincode - * @property {string} [address] - Address description for address data - */ -/** - * @typedef StoreDetails - * @property {PickupStoreDetail[]} [items] - List of items need to pickup from store - */ -/** - * @typedef CartPaymentUpdate - * @property {string} [address_id] - Address id of the user on which the order - * to be delivered - * @property {string} [payment_mode] - Payment mode from which the payment to be - * done for the order - * @property {string} [aggregator_name] - Aggregator name of the payment gateway - * @property {string} [merchant_code] - Merchant code of the payment mode - * selected to do the payment - * @property {string} [payment_identifier] - Payment identifier of the payment - * mode selected to do the payment - * @property {string} [id] - Cart id of the user cart + * @property {string} [country] + * @property {string} [state] + * @property {string} [city] + * @property {string} [phone] + * @property {string} [area_code] + * @property {number} [uid] + * @property {string} [area_code_slug] + * @property {string} [address_type] + * @property {string} [area] + * @property {number} [id] + * @property {string} [store_manager_name] + * @property {string} [name] + * @property {string} [store_code] + * @property {string} [landmark] + * @property {string} [email] + * @property {number} [pincode] + * @property {string} [address] + */ +/** + * @typedef StoreDetailsResponse + * @property {PickupStoreDetail[]} [items] + */ +/** + * @typedef UpdateCartPaymentRequest + * @property {string} [address_id] + * @property {string} [payment_mode] + * @property {string} [aggregator_name] + * @property {string} [merchant_code] + * @property {string} [payment_identifier] + * @property {string} [id] */ /** * @typedef CouponValidity - * @property {string} [title] - Coupon Title of the coupon applied - * @property {boolean} [next_validation_required] - Flag for coupon validation - * required on next page or not - * @property {boolean} [valid] - Valid flag which denotes if the applied coupon - * is valid or not - * @property {string} [display_message_en] - Display message for coupon validity - * @property {string} [code] - Coupon code of the coupon applied - * @property {number} [discount] - Coupon discount value of the coupon applied - * @property {string} [error_en] - Error message for the selected payment mode. + * @property {string} [title] + * @property {boolean} [next_validation_required] + * @property {boolean} [valid] + * @property {string} [display_message_en] + * @property {string} [code] + * @property {number} [discount] */ /** * @typedef PaymentCouponValidate - * @property {boolean} success - Success flag of coupon payment mode validity API response - * @property {string} [message] - Payment mode valid message for coupon + * @property {boolean} success + * @property {string} [message] * @property {CouponValidity} [coupon_validity] */ /** * @typedef PaymentMeta - * @property {string} [payment_gateway] - Payment gateway used to do the payment - * @property {string} [type] - Type of card if payment mode is card to do the payment - * @property {string} [payment_identifier] - Payment identifier of the payment - * mode selected to do the payment - * @property {string} [merchant_code] - Merchant code of the payment mode - * selected to do the payment + * @property {string} [payment_gateway] + * @property {string} [type] + * @property {string} [payment_identifier] + * @property {string} [merchant_code] */ /** * @typedef PaymentMethod - * @property {string} mode - Payment mode of payment method used to make payment - * @property {string} [payment] - Payment name of payment method used to make payment + * @property {string} mode + * @property {string} [payment] * @property {PaymentMeta} payment_meta - * @property {number} [amount] - Amount of the payment mode to be paid - * @property {string} [name] - Name of the payment mode used to make payment - * @property {Object} [payment_extra_identifiers] - Payment extra identifier for - * the payment mode to do the payment - */ -/** - * @typedef PlatformCartCheckoutDetailV2Creation - * @property {string} [address_id] - Address id of the user on which the order - * to be delivered - * @property {string} [payment_identifier] - Payment identifier of the payment - * mode selected to do the payment - * @property {Object} [payment_params] - Payment params which includes payment - * identifier and merchant code - * @property {CartCheckoutCustomMeta[]} [custom_meta] - Custom meta data to be - * added in order - * @property {boolean} [payment_auto_confirm] - Payment auto confirm flag if - * payment need not to be collected from user - * @property {string} id - Cart id of the user cart - * @property {boolean} [pos] - Filed to determine whether user is making request - * from pos or not - * @property {string} [billing_address_id] - Billing address id of the customer - * on which the invoice to be generated after the order is placed - * @property {string} [merchant_code] - Merchant code of the payment mode - * selected to do the payment - * @property {string} [aggregator] - Aggregator name of the payment gateway - * @property {number} [pick_at_store_uid] - Store id where we have to pick product - * @property {string} [device_id] - Device id - * @property {Object} [delivery_address] - Delivery address data which includes - * customer address, customer phone, customer email, customer pincode, - * customer landmark and customer name - * @property {string} [payment_mode] - Payment mode from which the payment to be - * done for the order - * @property {string} [checkout_mode] - Mode of checkout used in cart - * @property {CustomerDetails} [customer_details] - * @property {Object} [meta] - Meta data to be added in order - * @property {PaymentMethod[]} payment_methods - Payment methods list used to - * make the payment + * @property {number} [amount] + * @property {string} [name] + * @property {Object} [payment_extra_identifiers] + */ +/** + * @typedef PlatformCartCheckoutDetailV2Request + * @property {string} [address_id] + * @property {string} [payment_identifier] + * @property {Object} [payment_params] + * @property {Object} [custom_meta] + * @property {boolean} [payment_auto_confirm] + * @property {string} id + * @property {boolean} [pos] + * @property {string} [billing_address_id] + * @property {string} [merchant_code] + * @property {string} [aggregator] + * @property {number} [pick_at_store_uid] + * @property {string} [device_id] + * @property {Object} [delivery_address] + * @property {string} [payment_mode] + * @property {string} [checkout_mode] + * @property {Object} [customer_details] - Customer details + * @property {Object} [meta] + * @property {PaymentMethod[]} payment_methods * @property {StaffCheckout} [staff] - * @property {string} [employee_code] - Employee code of staff who does checkout - * on behalf of customer - * @property {Object} [billing_address] - Billing address json which includes - * customer address, customer phone, customer email, customer pincode, - * customer landmark and customer name - * @property {string} [callback_url] - Callback url after payment received/failed - * @property {string} user_id - The user id of user cart - * @property {Object} [extra_meta] - Extra meta to be added while checkout in order - * @property {string} order_type - Order type of the order being placed like - * pickAtStore or HomeDelivery + * @property {string} [employee_code] + * @property {Object} [billing_address] + * @property {string} [callback_url] + * @property {string} user_id + * @property {Object} [extra_meta] + * @property {string} order_type * @property {Files[]} [files] - List of file url - * @property {number} [ordering_store] - Ordering store id of the store from - * which the order is getting placed - * @property {string} [iin] - Issuer Identification Number number of card if - * payment mode is card to do the payment - * @property {string} [network] - Network of card if payment mode is card to do - * the payment - * @property {string} [type] - Type of cart if payment mode is card to do the payment - * @property {string} [card_id] - Saved card id if payment mode is card to do the payment + * @property {number} [ordering_store] + * @property {string} [iin] + * @property {string} [network] + * @property {string} [type] + * @property {string} [card_id] */ /** * @typedef UpdateCartPaymentRequestV2 - * @property {string} [address_id] - Address id of the user address selected to - * deliver the shipment - * @property {string} [payment_mode] - Payment mode of the payment selected to - * do the payment - * @property {string} [aggregator_name] - Aggregator name of the payment gateway - * @property {string} [merchant_code] - Merchant code of the payment mode - * selected to do the payment - * @property {string} [payment_identifier] - Payment identifier of the payment - * mode selected to do the payment - * @property {string} [id] - Cart id of the user cart for which the update cart - * payment operation performed + * @property {string} [address_id] + * @property {string} [payment_mode] + * @property {string} [aggregator_name] + * @property {string} [merchant_code] + * @property {string} [payment_identifier] + * @property {string} [id] * @property {PaymentMethod[]} [payment_methods] */ /** * @typedef PriceMinMax - * @property {number} [min] - Min price of article added in user cart - * @property {number} [max] - Max price of article added in user cart + * @property {number} [min] + * @property {number} [max] */ /** * @typedef ItemPriceDetails * @property {PriceMinMax} [marked] * @property {PriceMinMax} [effective] - * @property {string} [currency] - The currency code for price - */ -/** - * @typedef ArticlePriceDetails - * @property {number} [marked] - The Marked Price refers to the initial price of - * the free gift article before product discount. - * @property {number} [effective] - The Effective Price refers to the final - * amount of the free gift article after applying the product discount. + * @property {string} [currency] */ /** * @typedef FreeGiftItems - * @property {string} [item_slug] - Free gift product slug - * @property {string} [item_name] - Free gift product name + * @property {string} [item_slug] - Item slug + * @property {string} [item_name] - Item name * @property {ItemPriceDetails} [item_price_details] - * @property {ArticlePriceDetails} [article_price] - * @property {string} [item_brand_name] - Free gift product brand name - * @property {number} [item_id] - Free gift product id - * @property {string[]} [available_sizes] - Available sizes for the free gift item. - * @property {string} [size] - Selected size for the free gift item. - * @property {string[]} [item_images_url] - List of free gift product images URL + * @property {string} [item_brand_name] - Item brand name + * @property {number} [item_id] - Item id + * @property {string[]} [item_images_url] - Item images URL */ /** * @typedef PromotionOffer - * @property {string} [id] - Promotion unique identifier + * @property {string} [id] - Promotion id * @property {Object} [buy_rules] - Buy rules of promotions - * @property {string} [offer_text] - Offer title of promotion that used to display - * @property {string} [promotion_type] - Type of Promotion like percentage, - * amount, bogo etc. + * @property {string} [offer_text] - Offer title + * @property {string} [promotion_type] - Promotion type * @property {string} [promotion_name] - Name of the promotion * @property {string} [promotion_group] - Group of promotion belongs to * @property {string} [valid_till] - Datetime ISOString for promotion end date * @property {Object[]} [discount_rules] - Discount rules of promotions * @property {FreeGiftItems[]} [free_gift_items] - Details of free gift items * @property {string} [description] - Offer details including T&C - * @property {boolean} [is_bank_offer] - Indicates whether the promotion is - * associated with a bank offer. */ /** - * @typedef PromotionOffersDetails - * @property {PromotionOffer[]} [available_promotions] - List of available - * promotion for product + * @typedef PromotionOffersResponse + * @property {PromotionOffer[]} [available_promotions] */ /** * @typedef PromotionPaymentOffer - * @property {string} [application_id] - Application id of the sales channel + * @property {string} [application_id] - Application id * @property {Object[]} [buy_rules] - Buy rules of promotions * @property {string} [calculate_on] - Price on which promotion calculated * @property {string} [description] - Offer details including T&C * @property {Object[]} [discount_rules] - Discount rules of promotions - * @property {string} [id] - Promotion unique identifier - * @property {string} [offer_text] - Offer title of promotion that used to display + * @property {string} [id] - Promotion id + * @property {string} [offer_text] - Offer title * @property {string} [promotion_group] - Group of promotion belongs to - * @property {string} [promotion_type] - Type of Promotion like bogo, amount, - * percentage etc. + * @property {string} [promotion_type] - Promotion type * @property {string} [promotion_name] - Name of the promotion */ /** - * @typedef PromotionPaymentOffersDetails - * @property {boolean} [success] - Indicates if operation is successful or not. + * @typedef PromotionPaymentOffersResponse + * @property {boolean} [success] * @property {PromotionPaymentOffer[]} [promotions] */ -/** - * @typedef ValidationError - * @property {string} message - A brief description of the error encountered. - * @property {string} field - The field in the request that caused the error. - */ declare class CartPlatformModel { } declare namespace CartPlatformModel { - 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, ProductArticle, Ownership2, DiscountRulesApp, AppliedFreeArticles, BuyRules, AppliedPromotion, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, ShipmentPromise, CouponDetails, ProductPrice, ProductPriceInfo, 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, CartDetailResult, AddProductCart, AddCartCreation, AddCartDetailResult, UpdateProductCart, FreeGiftItemCreation, UpdateCartCreation, UpdateCartDetailResult, OverrideCartItemPromo, OverrideCartItem, OverrideCheckoutReq, OverrideCheckoutResult, GetShareCartLinkCreation, GetShareCartLinkResult, SharedCartDetails, SharedCart, SharedCartResult, CartList, MultiCartResult, UpdateUserCartMapping, UserInfo, UserCartMappingResult, PlatformAddCartDetails, PlatformUpdateCartDetails, DeleteCartDetails, DeleteCartDetailResult, CartItemCountResult, Coupon, PageCoupon, GetCouponResult, ApplyCouponDetails, GeoLocation, PlatformAddress, ValidationConfig, PlatformGetAddressesDetails, SaveAddressDetails, UpdateAddressDetails, DeleteAddressResult, PlatformSelectCartAddress, ShipmentArticle, PlatformShipmentDetails, PlatformCartShipmentsResult, UpdateCartShipmentItem, UpdateCartShipmentCreation, PlatformCartMetaCreation, CartMetaDetails, CartMetaMissingDetails, StaffCheckout, CustomerDetails, Files, CartCheckoutCustomMeta, PlatformCartCheckoutDetailCreation, CheckCart, CartCheckoutDetails, CartCheckoutResult, CartDeliveryModesDetails, PickupStoreDetail, StoreDetails, CartPaymentUpdate, CouponValidity, PaymentCouponValidate, PaymentMeta, PaymentMethod, PlatformCartCheckoutDetailV2Creation, UpdateCartPaymentRequestV2, PriceMinMax, ItemPriceDetails, ArticlePriceDetails, FreeGiftItems, PromotionOffer, PromotionOffersDetails, PromotionPaymentOffer, PromotionPaymentOffersDetails, ValidationError }; + 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, PriceAdjustment, PriceAdjustmentResponse, GetPriceAdjustmentResponse, PriceAdjustmentAdd, 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 }; } /** @returns {CouponDateMeta} */ declare function CouponDateMeta(): CouponDateMeta; type CouponDateMeta = { - /** - * - Date time format when the coupon last modified - */ modified_on?: string; - /** - * - Date time format when the coupon created - */ created_on?: string; - /** - * - Date time format when the coupon approved - */ - approved_on?: string; - /** - * - Date time format when the coupon rejected - */ - rejected_on?: string; - /** - * - Date time format when the coupon reviewed - */ - reviewed_on?: string; }; /** @returns {Ownership} */ declare function Ownership(): Ownership; type Ownership = { - /** - * - Coupon amount payable category - */ payable_category: string; - /** - * - Coupon amount bearable party - */ - payable_by?: string; + payable_by: string; }; /** @returns {CouponAuthor} */ declare function CouponAuthor(): CouponAuthor; type CouponAuthor = { - /** - * - The user id of user, who has created the coupon - */ created_by?: string; - /** - * - The user id of user, who has modified the coupon - */ modified_by?: string; - /** - * - The user id of user, who has approved the coupon - */ - approved_by?: string; - /** - * - The user id of user, who has rejected the coupon - */ - rejected_by?: string; - /** - * - The user id of user, who has reviewed the coupon - */ - reviewed_by?: string; }; /** @returns {State} */ declare function State(): State; type State = { - /** - * - Publish or unpublish the coupon - */ is_archived?: boolean; - /** - * - Coupon needs to display or not - */ is_display?: boolean; - /** - * - Coupon is publicaly available or not - */ is_public?: boolean; }; /** @returns {PaymentAllowValue} */ declare function PaymentAllowValue(): PaymentAllowValue; type PaymentAllowValue = { - /** - * - Maximum value need to allow for payment - */ max?: number; }; /** @returns {PaymentModes} */ declare function PaymentModes(): PaymentModes; type PaymentModes = { - /** - * - Identifier used by payment gateway for a given - * payment mode, e.g. NB_ICIC, PAYTM - */ codes?: string[]; - /** - * - Debit/Credit card prefix (first 6 digit) - */ iins?: string[]; - /** - * - Card type, e.g. Credit, Debit - */ types?: string[]; - /** - * - Credit/Debit card issuer, e.g. VISA, - * MASTERCARD, RUPAY - */ networks?: string[]; uses?: PaymentAllowValue; }; /** @returns {PriceRange} */ declare function PriceRange(): PriceRange; type PriceRange = { - /** - * - Max price valid for article in coupon - */ max?: number; - /** - * - Min price valid for article in coupon - */ min?: number; }; /** @returns {PostOrder} */ declare function PostOrder(): PostOrder; type PostOrder = { - /** - * - Cancellation allowed in coupon - */ cancellation_allowed?: boolean; - /** - * - Return allowed in coupon - */ return_allowed?: boolean; }; /** @returns {BulkBundleRestriction} */ declare function BulkBundleRestriction(): BulkBundleRestriction; type BulkBundleRestriction = { - /** - * - Multi store allowed in bulk bundle - * coupon or not - */ multi_store_allowed: boolean; }; /** @returns {UsesRemaining} */ declare function UsesRemaining(): UsesRemaining; type UsesRemaining = { - /** - * - Define total coupon count per user - */ user?: number; - /** - * - Define total coupon counts - */ total?: number; - /** - * - Define coupon counts associated with application id - */ app?: number; }; /** @returns {UsesRestriction} */ @@ -2429,280 +1835,116 @@ type UsesRestriction = { /** @returns {Restrictions} */ declare function Restrictions(): Restrictions; type Restrictions = { - payments?: PaymentModes; + payments?: any; user_type?: string; price_range?: PriceRange; - /** - * - List of platform on which coupon allowed - * like web, android - */ platforms?: string[]; post_order?: PostOrder; bulk_bundle?: BulkBundleRestriction; - /** - * - List of user group on which coupon allowed - */ user_groups?: number[]; - /** - * - Allow applying normal coupon if bulk - * coupon is applied - */ coupon_allowed?: boolean; uses?: UsesRestriction; - /** - * - List of store id on which coupon allowed - */ ordering_stores?: number[]; }; /** @returns {Validation} */ declare function Validation(): Validation; type Validation = { - /** - * - List of sales channel's application id - */ app_id?: string[]; - /** - * - Coupon applicable for guest user or not - */ anonymous?: boolean; - /** - * - Coupon applicable for user which - * is registered after Date Format - */ user_registered_after?: string; }; /** @returns {CouponAction} */ declare function CouponAction(): CouponAction; type CouponAction = { - /** - * - Coupon transaction mode's date time format - */ action_date?: string; - /** - * - Coupon transaction mode like cash, coupon etc - */ txn_mode?: string; }; /** @returns {CouponSchedule} */ declare function CouponSchedule(): CouponSchedule; type CouponSchedule = { - /** - * - The end date of coupon - */ end?: string; - /** - * - The start date of coupon - */ start?: string; - /** - * - List of date time, which we will - * schedule the promotion - */ next_schedule?: any[]; - /** - * - Schedule the cron to run your job periodically - */ cron?: string; - /** - * - Coupon status like draft, review - */ - status?: string; - /** - * - Time in minutes for execution - */ duration?: number; }; /** @returns {Rule} */ declare function Rule(): Rule; type Rule = { - /** - * - Key defines the number of product should be buy - * for applicability of cart - */ key?: number; - /** - * - Value defines discount percentage in coupon - */ value?: number; - /** - * - Max defines maximum number of discount amount in coupon - */ max?: number; - /** - * - Discount_qty defines free quantity as - * discount in coupon - */ discount_qty?: number; - /** - * - Min defines minimum number of discount amount in coupon - */ min?: number; }; /** @returns {DisplayMetaDict} */ declare function DisplayMetaDict(): DisplayMetaDict; type DisplayMetaDict = { - /** - * - Coupon title which is used to display - */ title?: string; - /** - * - Coupon sub title which is used to display - */ subtitle?: string; }; /** @returns {DisplayMeta} */ declare function DisplayMeta(): DisplayMeta; type DisplayMeta = { - /** - * - Coupon title which is used to display - */ title?: string; auto?: DisplayMetaDict; apply?: DisplayMetaDict; remove?: DisplayMetaDict; - /** - * - Coupon sub title which is used to display - */ subtitle?: string; - /** - * - Detail about the offers in coupon - */ description?: string; }; /** @returns {Identifier} */ declare function Identifier(): Identifier; type Identifier = { - /** - * - List of brand id available for coupon - */ brand_id?: number[]; - /** - * - List of email domain available for coupon - */ email_domain?: string[]; - /** - * - List of company id available for coupon - */ company_id?: number[]; - /** - * - List of store id available for coupon - */ store_id?: number[]; - /** - * - List of collection id available for coupon - */ collection_id?: string[]; - /** - * - List of item id available for coupon - */ item_id?: number[]; - /** - * - List of user id available for coupon - */ user_id?: string[]; - /** - * - List of category id available for coupon - */ category_id?: number[]; - /** - * - List of article id available for coupon - */ article_id?: string[]; - /** - * - List of brand id should not be - * available for coupon - */ exclude_brand_id?: number[]; }; /** @returns {Validity} */ declare function Validity(): Validity; type Validity = { - /** - * - Priority of coupon to show in list - */ priority?: number; }; /** @returns {RuleDefinition} */ declare function RuleDefinition(): RuleDefinition; type RuleDefinition = { - /** - * - Currency code like INR - */ currency_code?: string; - /** - * - Coupon should be auto apply or not - */ auto_apply?: boolean; - /** - * - Type of coupon like absolute, percentage etc. - */ - type?: string; - /** - * - Flag is true then use coupon applicable - * articles for calculation - */ + type: string; is_exact?: boolean; - /** - * - Coupon will be applicable on either - * amount or quantity - */ - applicable_on?: string; - /** - * - Article Price on which coupon calculated - * like effective price or marked price - */ - calculate_on?: string; - /** - * - Define the type of coupon value - */ - value_type?: string; - /** - * - List of item level rule applicable for coupon - */ + applicable_on: string; + calculate_on: string; + value_type: string; scope?: string[]; }; /** @returns {CouponAdd} */ declare function CouponAdd(): CouponAdd; type CouponAdd = { date_meta?: CouponDateMeta; - ownership?: Ownership; + ownership: Ownership; author?: CouponAuthor; state?: State; restrictions?: Restrictions; validation?: Validation; action?: CouponAction; - /** - * - The type of coupon like bulk or single - */ - coupon_type?: string; - /** - * - Bulk coupon code prefix string - */ - coupon_prefix?: string; - /** - * - Counts of bulk coupon - */ - coupon_counts?: number; - /** - * - List of tags specify to platform - */ tags?: string[]; _schedule?: CouponSchedule; - rule?: Rule[]; - display_meta?: DisplayMeta; - /** - * - Unique code of coupon - */ + rule: Rule[]; + display_meta: DisplayMeta; code: string; - /** - * - The type slug of coupon discount - */ type_slug: string; - identifiers?: Identifier; - validity?: Validity; - rule_definition?: RuleDefinition; + identifiers: Identifier; + validity: Validity; + rule_definition: RuleDefinition; /** - * - Unique identifier of coupon + * - Coupon id */ _id?: string; }; @@ -2738,87 +1980,44 @@ type Page = { */ size?: number; }; -/** @returns {CouponsResult} */ -declare function CouponsResult(): CouponsResult; -type CouponsResult = { - /** - * - Coupons list for sales channel - */ +/** @returns {CouponsResponse} */ +declare function CouponsResponse(): CouponsResponse; +type CouponsResponse = { items?: CouponAdd[]; page?: Page; }; /** @returns {SuccessMessage} */ declare function SuccessMessage(): SuccessMessage; type SuccessMessage = { - /** - * - Whether the request was successful (true/false). - */ success?: boolean; - /** - * - Response message needs to display - */ message?: string; }; -/** @returns {OperationErrorResult} */ -declare function OperationErrorResult(): OperationErrorResult; -type OperationErrorResult = { - /** - * - Whether the request was successful (true/false). - */ +/** @returns {OperationErrorResponse} */ +declare function OperationErrorResponse(): OperationErrorResponse; +type OperationErrorResponse = { success?: boolean; - /** - * - Response message needs to display - */ message?: string; - /** - * - Response error message in detail - */ error?: string; }; /** @returns {CouponUpdate} */ declare function CouponUpdate(): CouponUpdate; type CouponUpdate = { date_meta?: CouponDateMeta; - ownership?: Ownership; + ownership: Ownership; author?: CouponAuthor; state?: State; restrictions?: Restrictions; validation?: Validation; action?: CouponAction; - /** - * - List of tags specify to platform - */ tags?: string[]; _schedule?: CouponSchedule; - rule?: Rule[]; - display_meta?: DisplayMeta; - /** - * - Unique code that is used to apply coupon - */ + rule: Rule[]; + display_meta: DisplayMeta; code: string; - /** - * - The type of coupon like bulk or single - */ - coupon_type?: string; - /** - * - Bulk coupon code prefix string - */ - coupon_prefix?: string; - /** - * - Counts of culk coupon - */ - coupon_counts?: number; - /** - * - Coupon rejection reason added by reviewer - */ - reason?: string; - /** - * - The type slug of coupon discount - */ type_slug: string; - identifiers?: Identifier; - validity?: Validity; - rule_definition?: RuleDefinition; + identifiers: Identifier; + validity: Validity; + rule_definition: RuleDefinition; }; /** @returns {CouponPartialUpdate} */ declare function CouponPartialUpdate(): CouponPartialUpdate; @@ -2829,323 +2028,110 @@ type CouponPartialUpdate = { archive?: boolean; schedule?: CouponSchedule; }; -/** @returns {CouponCreateResult} */ -declare function CouponCreateResult(): CouponCreateResult; -type CouponCreateResult = { - /** - * - Whether the request was successful (true/false) - */ - success?: boolean; - /** - * - Create coupon response message that can shown - * to creator user - */ - message?: string; - /** - * - Unique identifier for coupon created - */ - _id?: string; -}; /** @returns {DisplayMeta1} */ declare function DisplayMeta1(): DisplayMeta1; type DisplayMeta1 = { - /** - * - Define details about the offer in promotion - */ description?: string; - /** - * - Offer label of promotion that needs to display - */ offer_label?: string; - /** - * - Name of promotion that needs to display - */ name?: string; - /** - * - Promotion offer text used to display - */ offer_text?: string; }; /** @returns {Ownership1} */ declare function Ownership1(): Ownership1; type Ownership1 = { - /** - * - Promotion amount payable category - */ - payable_category?: string; - /** - * - Promotion amount bearable party - */ - payable_by?: string; + payable_category: string; + payable_by: string; }; /** @returns {CompareObject} */ declare function CompareObject(): CompareObject; type CompareObject = { - /** - * - Nummeric value must be equal to cart level rules - */ equals?: number; - /** - * - Nummeric value must be greater than cart - * level rules - */ greater_than?: number; - /** - * - Nummeric value must be less than or - * equal to cart level rules - */ less_than_equals?: number; - /** - * - Nummeric value must be less than cart level rules - */ less_than?: number; - /** - * - Nummeric value must be greater - * than or equal to cart level rules - */ greater_than_equals?: number; }; -/** @returns {ItemSizeMapping} */ -declare function ItemSizeMapping(): ItemSizeMapping; -type ItemSizeMapping = { - /** - * - Item size mapping in promotion - */ - item_size_mapping?: any; -}; /** @returns {ItemCriteria} */ declare function ItemCriteria(): ItemCriteria; type ItemCriteria = { cart_quantity?: CompareObject; - /** - * - List of all zones on which promotion - * is applicable - */ available_zones?: string[]; - /** - * - List of all company id on which - * promotion is not applicable - */ item_exclude_company?: number[]; - /** - * - List of all item ids on which promotion is applicable - */ item_id?: number[]; - /** - * - List of all L1 category on which - * promotion is applicable - */ item_l1_category?: number[]; cart_total?: CompareObject; cart_unique_item_quantity?: CompareObject; cart_unique_item_amount?: CompareObject; - /** - * - List of all item ids on which - * promotion is not applicable - */ item_exclude_id?: number[]; - /** - * - Boolean flag set true to applicable the - * promotion for all products - */ all_items?: boolean; - /** - * - List of all item ids on - * which promotion is not applicable - */ item_exclude_l1_category?: number[]; - /** - * - List of all item sizes on which promotion - * is applicable - */ item_size?: string[]; - /** - * - List of all item store ids on which - * promotion is applicable - */ item_store?: number[]; - /** - * - List of all item sku on which - * promotion is not applicable - */ item_exclude_sku?: string[]; - /** - * - List of all departments ids on which - * promotion is applicable - */ item_department?: number[]; - /** - * - List of all item store ids on - * which promotion is not applicable - */ item_exclude_store?: number[]; - /** - * - List of all brand ids on which promotion - * is applicable - */ item_brand?: number[]; - /** - * - List of all department ids - * on which promotion is not applicable - */ item_exclude_department?: number[]; - /** - * - List of all L3 category on - * which promotion is not applicable - */ item_exclude_category?: number[]; - /** - * - List of all L3 category on which - * promotion is applicable - */ item_category?: number[]; buy_rules?: string[]; - /** - * - List of all brand ids on which - * promotion is not applicable - */ item_exclude_brand?: number[]; - /** - * - List of all L2 category on which - * promotion is applicable - */ item_l2_category?: number[]; - /** - * - List of all company ids on which - * promotion is applicable - */ item_company?: number[]; - /** - * - List of all product tags on which - * promotion is applicable - */ item_tags?: string[]; - /** - * - List of all L2 category on - * which promotion is not applicable - */ item_exclude_l2_category?: number[]; - /** - * - List of all item sku on which promotion is applicable - */ item_sku?: string[]; }; /** @returns {DiscountOffer} */ declare function DiscountOffer(): DiscountOffer; type DiscountOffer = { - /** - * - Maximum discount amount in promotion - */ max_discount_amount?: number; - /** - * - Discount price in promotion - */ discount_price?: number; - /** - * - Flag to distribute discount for each article - */ apportion_discount?: boolean; - /** - * - Flag indicated return the product partially - */ partial_can_ret?: boolean; - /** - * - Maximum usage per - * transaction in promotion - */ max_usage_per_transaction?: number; - /** - * - Minimum quantity of offer in promotion - */ min_offer_quantity?: number; - /** - * - Unique code of promotion - */ code?: string; - /** - * - Discount amount in promotion - */ discount_amount?: number; - /** - * - Discount percentage in promotion - */ discount_percentage?: number; - /** - * - Maximum quantity of product in promotion - */ max_offer_quantity?: number; }; /** @returns {DiscountRule} */ declare function DiscountRule(): DiscountRule; type DiscountRule = { - /** - * - The type of discount in promotion - */ discount_type: string; - /** - * - Promotion buy rules in offer level - */ buy_condition: string; item_criteria: ItemCriteria; - meta?: ItemSizeMapping; offer: DiscountOffer; }; /** @returns {PaymentAllowValue1} */ declare function PaymentAllowValue1(): PaymentAllowValue1; type PaymentAllowValue1 = { - /** - * - Maximum value need to allow for payment in promotion - */ max?: number; }; /** @returns {PromotionPaymentModes} */ declare function PromotionPaymentModes(): PromotionPaymentModes; type PromotionPaymentModes = { - /** - * - Define the type of payment - */ - type?: string; + type: string; uses?: PaymentAllowValue1; - /** - * - List of codes associated with payment options - */ codes?: string[]; }; /** @returns {UserRegistered} */ declare function UserRegistered(): UserRegistered; type UserRegistered = { - /** - * - End date time format till the user is registerd - */ end?: string; - /** - * - Start date time format when user is registerd - */ start?: string; }; /** @returns {PostOrder1} */ declare function PostOrder1(): PostOrder1; type PostOrder1 = { - /** - * - Cancellation allowed in - * promotion after order - */ cancellation_allowed?: boolean; - /** - * - Return allowed in promotion after order - */ return_allowed?: boolean; }; /** @returns {UsesRemaining1} */ declare function UsesRemaining1(): UsesRemaining1; type UsesRemaining1 = { - /** - * - Define total promotion count per user - */ user?: number; - /** - * - Define total promotions count - */ total?: number; }; /** @returns {UsesRestriction1} */ @@ -3157,143 +2143,50 @@ type UsesRestriction1 = { /** @returns {Restrictions1} */ declare function Restrictions1(): Restrictions1; type Restrictions1 = { - payments?: PaymentModes; + payments?: any; user_registered?: UserRegistered; - /** - * - List of platform on which promotion is - * applicable like android, ios - */ platforms?: string[]; post_order?: PostOrder1; - /** - * - List of user groups on which promotion - * is applicable - */ user_groups?: number[]; - /** - * - Prmomotion max order count - */ order_quantity?: number; - /** - * - Set true, if promotion is applicable - * for guest user - */ anonymous_users?: boolean; - /** - * - List of user id on which promotion is applicable - */ user_id?: string[]; - uses?: UsesRestriction1; - /** - * - List of store id on which promotion - * is applicable - */ + uses: UsesRestriction1; ordering_stores?: number[]; }; /** @returns {PromotionSchedule} */ declare function PromotionSchedule(): PromotionSchedule; type PromotionSchedule = { - /** - * - Then end date of promotion till valid - */ - end?: string; - /** - * - Then start date of promotion is valid - */ - start?: string; - /** - * - Promotion status like draft, review - */ - status?: string; - /** - * - The status of promotion is published or not - */ - published?: boolean; - /** - * - List of date time, which we will - * schedule the promotion - */ + end: string; + start: string; + published: boolean; next_schedule?: any[]; - /** - * - Schedule the cron to run your job periodically - */ cron?: string; - /** - * - Time in minutes for execution - */ duration?: number; }; /** @returns {PromotionAction} */ declare function PromotionAction(): PromotionAction; type PromotionAction = { - /** - * - Date time format in promotion - */ - action_date?: string; - /** - * - The action type of promotion - */ - action_type?: string; + action_date: string; + action_type: string; }; /** @returns {PromotionAuthor} */ declare function PromotionAuthor(): PromotionAuthor; type PromotionAuthor = { - /** - * - The user id of user, who has created the promotion - */ created_by?: string; - /** - * - The user id of user, who has modified the promotion - */ modified_by?: string; - /** - * - The user id of user, who has approved the promotion - */ - approved_by?: string; - /** - * - The user id of user, who has rejected the promotion - */ - rejected_by?: string; - /** - * - The user id of user, who has reviewed the promotion - */ - reviewed_by?: string; }; /** @returns {Visibility} */ declare function Visibility(): Visibility; type Visibility = { - /** - * - Flag to show promotion on Coupon list - */ - coupon_list?: boolean; - /** - * - Flag to show promotion on PDP page - */ - pdp?: boolean; + coupon_list: boolean; + pdp: boolean; }; /** @returns {PromotionDateMeta} */ declare function PromotionDateMeta(): PromotionDateMeta; type PromotionDateMeta = { - /** - * - Date time format when the promotion last modified - */ modified_on?: string; - /** - * - Date time format when the promotion created - */ created_on?: string; - /** - * - Date time format when the promotion approved - */ - approved_on?: string; - /** - * - Date time format when the promotion rejected - */ - rejected_on?: string; - /** - * - Date time format when the promotion reviewed - */ - reviewed_on?: string; }; /** @returns {PromotionListItem} */ declare function PromotionListItem(): PromotionListItem; @@ -3304,9 +2197,8 @@ type PromotionListItem = { */ stackable?: boolean; /** - * - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type + * - Only available for Contract pricing and + * Ladder pricing promotion type */ calculate_on?: string; /** @@ -3319,7 +2211,7 @@ type PromotionListItem = { */ promo_group: string; /** - * - Promotion mode, like coupon or promotion + * - Promotion mode */ mode: string; /** @@ -3343,12 +2235,7 @@ type PromotionListItem = { */ currency?: string; /** - * - Flag to verify if promotion is ready to - * be applied on cart and ready to update promotion - */ - is_processed?: boolean; - /** - * - Unique code of promotion + * - Promotion code */ code?: string; _schedule?: PromotionSchedule; @@ -3361,527 +2248,207 @@ type PromotionListItem = { author?: PromotionAuthor; visiblility?: Visibility; /** - * - Application id in which promotion will be used + * - App id in which promotion will be used */ application_id: string; - buy_rules: ItemCriteria; + /** + * - Buy rules for the promotion + */ + buy_rules: any; /** * - Custom data stored in promotion */ _custom_json?: any; date_meta?: PromotionDateMeta; /** - * - Unique identifier of promotion + * - Promotion id */ _id?: string; - /** - * - List of tags on which promotion is applicable - */ tags?: string[]; }; -/** @returns {PromotionsResult} */ -declare function PromotionsResult(): PromotionsResult; -type PromotionsResult = { - /** - * - List of promotions - */ +/** @returns {PromotionsResponse} */ +declare function PromotionsResponse(): PromotionsResponse; +type PromotionsResponse = { items?: PromotionListItem[]; page?: Page; }; /** @returns {PromotionAdd} */ declare function PromotionAdd(): PromotionAdd; type PromotionAdd = { - /** - * - Boolean value set true to apply other promotions also - */ stackable?: boolean; /** - * - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type + * - Only available for Contract pricing and + * Ladder pricing promotion type */ calculate_on?: string; - /** - * - Promotion should apply on either - * article or cart. - */ apply_exclusive?: string; - /** - * - The type of promotion group - */ promo_group: string; - /** - * - Promotion mode, like coupon or promotion - */ mode: string; - /** - * - True means to apply all discount offers - */ apply_all_discount?: boolean; - display_meta?: DisplayMeta1; - ownership?: Ownership1; - /** - * - Type of promotion - */ + display_meta: DisplayMeta1; + ownership: Ownership1; promotion_type: string; - /** - * - List of discount offers and - * their applicable conditions - */ - discount_rules?: DiscountRule[]; + discount_rules: DiscountRule[]; restrictions?: Restrictions1; - /** - * - Promotion Currency code like INR - */ currency?: string; - /** - * - Promotion unique code - */ code?: string; _schedule?: PromotionSchedule; post_order_action?: PromotionAction; - /** - * - Promotion applicable priority - */ apply_priority?: number; author?: PromotionAuthor; visiblility?: Visibility; - /** - * - Current application id of sales channel - */ application_id: string; - buy_rules?: ItemCriteria; - /** - * - Set extra properties in promotion - */ + buy_rules: any; _custom_json?: any; date_meta?: PromotionDateMeta; - /** - * - List of tags applicable for promotion - */ tags?: string[]; }; -/** @returns {PromotionAddResult} */ -declare function PromotionAddResult(): PromotionAddResult; -type PromotionAddResult = { - /** - * - Boolean value set true to apply other promotions also - */ +/** @returns {PromotionUpdate} */ +declare function PromotionUpdate(): PromotionUpdate; +type PromotionUpdate = { stackable?: boolean; /** - * - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type + * - Only available for Contract pricing and + * Ladder pricing promotion type */ calculate_on?: string; - /** - * - Promotion should apply on either - * article or cart. - */ apply_exclusive?: string; - /** - * - The type of promotion group - */ promo_group: string; - /** - * - Promotion mode, like coupon or promotion - */ mode: string; - /** - * - Flag to verify if promotion is ready to - * be applied on cart and ready to update promotion - */ - is_processed?: boolean; - /** - * - True means to apply all discount offers - */ apply_all_discount?: boolean; - display_meta?: DisplayMeta1; - ownership?: Ownership1; - /** - * - Type of promotion - */ + display_meta: DisplayMeta1; + ownership: Ownership1; promotion_type: string; - /** - * - List of discount offers and - * their applicable conditions - */ - discount_rules?: DiscountRule[]; + discount_rules: DiscountRule[]; restrictions?: Restrictions1; - /** - * - Promotion Currency code like INR - */ currency?: string; - /** - * - Promotion unique code - */ code?: string; _schedule?: PromotionSchedule; post_order_action?: PromotionAction; - /** - * - Promotion applicable priority - */ apply_priority?: number; author?: PromotionAuthor; visiblility?: Visibility; - /** - * - Current application id of sales channel - */ application_id: string; - buy_rules?: ItemCriteria; - /** - * - Set extra properties in promotion - */ + buy_rules: any; _custom_json?: any; date_meta?: PromotionDateMeta; + tags?: string[]; +}; +/** @returns {PromotionPartialUpdate} */ +declare function PromotionPartialUpdate(): PromotionPartialUpdate; +type PromotionPartialUpdate = { /** - * - List of tags applicable for promotion + * - Send true to unpublish promotion */ - tags?: string[]; + archive?: boolean; + schedule?: PromotionSchedule; }; -/** @returns {PromotionUpdate} */ -declare function PromotionUpdate(): PromotionUpdate; -type PromotionUpdate = { +/** @returns {ActivePromosResponse} */ +declare function ActivePromosResponse(): ActivePromosResponse; +type ActivePromosResponse = { + entity_slug?: string; /** - * - Set true to apply other promotions in cart + * - Name of the promotion */ - stackable?: boolean; + title?: string; /** - * - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type + * - Coupon modification date */ - calculate_on?: string; + modified_on?: string; /** - * - Promotion should apply on either - * article or cart. + * - Discount offers examples */ - apply_exclusive?: string; + example?: string; /** - * - Promotion rejection reason added by reviewer + * - Type of entity to be selected from : + * ['coupon', 'promotion'] */ - reason?: string; + entity_type?: string; /** - * - The type of promotion group + * - Coupon creation date */ - promo_group: string; + created_on?: string; /** - * - Promotion mode + * - If the promo is active or not */ - mode: string; + is_hidden?: boolean; /** - * - True means to apply all discount offers + * - Coupon type */ - apply_all_discount?: boolean; - display_meta?: DisplayMeta1; - ownership?: Ownership1; + type?: string; /** - * - The Promotion type like amount, bogo and - * percentage etc. + * - Small description of the current offer */ - promotion_type: string; + subtitle?: string; /** - * - List of discount offers and - * their applicable conditions + * - The description of the offer in the form of an HTML */ - discount_rules?: DiscountRule[]; - restrictions?: Restrictions1; + description?: string; +}; +/** @returns {Charges} */ +declare function Charges(): Charges; +type Charges = { + charges?: number; + threshold?: number; +}; +/** @returns {DeliveryCharges} */ +declare function DeliveryCharges(): DeliveryCharges; +type DeliveryCharges = { + charges?: Charges[]; + enabled?: boolean; +}; +/** @returns {CartMetaConfigUpdate} */ +declare function CartMetaConfigUpdate(): CartMetaConfigUpdate; +type CartMetaConfigUpdate = { + min_cart_value?: number; + max_cart_value?: number; + bulk_coupons?: boolean; + max_cart_items?: number; + gift_display_text?: string; + delivery_charges?: DeliveryCharges; + revenue_engine_coupon?: boolean; + gift_pricing?: number; + enabled?: boolean; +}; +/** @returns {CartMetaConfigAdd} */ +declare function CartMetaConfigAdd(): CartMetaConfigAdd; +type CartMetaConfigAdd = { + min_cart_value?: number; + max_cart_value?: number; + bulk_coupons?: boolean; + max_cart_items?: number; + gift_display_text?: string; + delivery_charges?: DeliveryCharges; + revenue_engine_coupon?: boolean; + gift_pricing?: number; + enabled?: boolean; +}; +/** @returns {Article} */ +declare function Article(): Article; +type Article = { /** - * - Promotion Currency code like INR + * - Value of price adjustment for article */ - currency?: string; + value?: number; /** - * - Promotion unique code + * - Code to identify price adjustment on article */ code?: string; - _schedule?: PromotionSchedule; - post_order_action?: PromotionAction; /** - * - Promotion applicable priority + * - Type of price adjusment */ - apply_priority?: number; - author?: PromotionAuthor; - visiblility?: Visibility; + type?: string; /** - * - Current application id of sales channel + * - Id of article */ - application_id: string; - buy_rules?: ItemCriteria; - /** - * - Set extra properties in promotion - */ - _custom_json?: any; - date_meta?: PromotionDateMeta; - /** - * - List of tags applicable for promotion - */ - tags?: string[]; -}; -/** @returns {PromotionUpdateResult} */ -declare function PromotionUpdateResult(): PromotionUpdateResult; -type PromotionUpdateResult = { - /** - * - Set true to apply other promotions in cart - */ - stackable?: boolean; - /** - * - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type - */ - calculate_on?: string; - /** - * - Promotion should apply on either - * article or cart. - */ - apply_exclusive?: string; - /** - * - Promotion rejection reason added by reviewer - */ - reason?: string; - /** - * - Flag to verify if promotion is ready to - * be applied on cart and ready to update promotion - */ - is_processed?: boolean; - /** - * - The type of promotion group - */ - promo_group: string; - /** - * - Promotion mode - */ - mode: string; - /** - * - True means to apply all discount offers - */ - apply_all_discount?: boolean; - display_meta?: DisplayMeta1; - ownership?: Ownership1; - /** - * - The Promotion type like amount, bogo and - * percentage etc. - */ - promotion_type: string; - /** - * - List of discount offers and - * their applicable conditions - */ - discount_rules?: DiscountRule[]; - restrictions?: Restrictions1; - /** - * - Promotion Currency code like INR - */ - currency?: string; - /** - * - Promotion unique code - */ - code?: string; - _schedule?: PromotionSchedule; - post_order_action?: PromotionAction; - /** - * - Promotion applicable priority - */ - apply_priority?: number; - author?: PromotionAuthor; - visiblility?: Visibility; - /** - * - Current application id of sales channel - */ - application_id: string; - buy_rules?: ItemCriteria; - /** - * - Set extra properties in promotion - */ - _custom_json?: any; - date_meta?: PromotionDateMeta; - /** - * - List of tags applicable for promotion - */ - tags?: string[]; -}; -/** @returns {PromotionPartialUpdate} */ -declare function PromotionPartialUpdate(): PromotionPartialUpdate; -type PromotionPartialUpdate = { - /** - * - Send true to unpublish promotion - */ - archive?: boolean; - schedule?: PromotionSchedule; -}; -/** @returns {ActivePromosResult} */ -declare function ActivePromosResult(): ActivePromosResult; -type ActivePromosResult = { - /** - * - A short, human-readable, URL-friendly - * identifier of Promotion or coupon - */ - entity_slug?: string; - /** - * - Name of the promotion or coupon - */ - title?: string; - /** - * - Coupon or promotion modification date - */ - modified_on?: string; - /** - * - Discount offers examples - */ - example?: string; - /** - * - Type of entity to be selected from : - * ['coupon', 'promotion'] - */ - entity_type?: string; - /** - * - Coupon or modification creation date - */ - created_on?: string; - /** - * - If the promo is active or not - */ - is_hidden?: boolean; - /** - * - Coupon or promotion type - */ - type?: string; - /** - * - Small description of the current offer - */ - subtitle?: string; - /** - * - The description of the offer in the form of an HTML - */ - description?: string; -}; -/** @returns {Charges} */ -declare function Charges(): Charges; -type Charges = { - /** - * - Delivery chanrges applied on the product of cart - */ - charges?: number; - /** - * - Threshold of cart value on which the charge - * should be applied - */ - threshold?: number; -}; -/** @returns {DeliveryCharges} */ -declare function DeliveryCharges(): DeliveryCharges; -type DeliveryCharges = { - /** - * - List of delivery changes information of the cart - */ - charges?: Charges[]; - /** - * - Enable or disable delivery charge on cart - */ - enabled?: boolean; -}; -/** @returns {CartMetaConfigUpdate} */ -declare function CartMetaConfigUpdate(): CartMetaConfigUpdate; -type CartMetaConfigUpdate = { - /** - * - Minimum order value to checkout - */ - min_cart_value?: number; - /** - * - Maximum order value to checkout - */ - max_cart_value?: number; - /** - * - Indicates bulk coupon applicable for cart - */ - bulk_coupons?: boolean; - /** - * - Maximum cart items to checkout - */ - max_cart_items?: number; - /** - * - Free gift charges text to show - */ - gift_display_text?: string; - delivery_charges?: DeliveryCharges; - /** - * - It define credit coupon - * applicable for cart - */ - revenue_engine_coupon?: boolean; - /** - * - Free gift charges per product - */ - gift_pricing?: number; - /** - * - Enabled flag for cart configuration - */ - enabled?: boolean; -}; -/** @returns {CartMetaConfigAdd} */ -declare function CartMetaConfigAdd(): CartMetaConfigAdd; -type CartMetaConfigAdd = { - /** - * - Minimum order value to checkout - */ - min_cart_value?: number; - /** - * - Maximum order value to checkout - */ - max_cart_value?: number; - /** - * - Indicates bulk coupon applicable for cart - */ - bulk_coupons?: boolean; - /** - * - Maximum cart items to checkout - */ - max_cart_items?: number; - /** - * - Free gift charges text to show - */ - gift_display_text?: string; - delivery_charges?: DeliveryCharges; - /** - * - It define credit coupon - * applicable for cart - */ - revenue_engine_coupon?: boolean; - /** - * - Free gift charges per product - */ - gift_pricing?: number; - /** - * - Enabled flag for cart configuration - */ - enabled?: boolean; -}; -/** @returns {Article} */ -declare function Article(): Article; -type Article = { - /** - * - Value of price adjustment for article - */ - value?: number; - /** - * - Code to identify price adjustment on article - */ - code?: string; - /** - * - Type of price adjusment - */ - type?: string; - /** - * - Unique identifier of article - */ - article_id: string; + article_id: string; /** * - Total quantity of the article to be * considered (currently used only in discount type) */ quantity?: number; /** - * - Meta data related to article + * - Meta related to article */ meta?: any; }; @@ -3897,13 +2464,7 @@ type PriceAdjustmentRestrictions = { /** @returns {Collection} */ declare function Collection(): Collection; type Collection = { - /** - * - Bearable party who is refunding the amount - */ refund_by: string; - /** - * - The party who is collecting the amount - */ collected_by: string; }; /** @returns {PriceAdjustmentUpdate} */ @@ -3913,9 +2474,6 @@ type PriceAdjustmentUpdate = { * - The entity that modified the field */ modified_by?: string; - /** - * - The amount applied on the cart - */ value: number; /** * - The message associated with the price adjustment @@ -3938,7 +2496,7 @@ type PriceAdjustmentUpdate = { article_level_distribution: boolean; collection: Collection; /** - * - Type of price adjusment like charge, mop, discount etc. + * - Type of price adjusment */ type: string; /** @@ -3960,22 +2518,15 @@ type PriceAdjustmentUpdate = { * type price adjustment. */ auto_remove?: boolean; - /** - * - Additional information regarding price adjustment - */ meta?: any; /** - * - Unique identifier of the cart + * - The ID of the cart */ cart_id: string; - distribution_logic?: DistributionLogic; }; /** @returns {PriceAdjustment} */ declare function PriceAdjustment(): PriceAdjustment; type PriceAdjustment = { - /** - * - The amount applied on the cart - */ value: number; /** * - The message associated with the price adjustment @@ -3986,9 +2537,9 @@ type PriceAdjustment = { */ apply_expiry?: string; /** - * - This field specifies - * the restrictions for this item or service, such as whether cancellation and - * return are permitted, except for `charge` type. + * - This field accepts + * the restrictions applied to this particular item or service, including + * whether or not cancellation and return are allowed, etc */ restrictions?: PriceAdjustmentRestrictions; /** @@ -3996,18 +2547,15 @@ type PriceAdjustment = { * distribution should is done at the article level */ article_level_distribution: boolean; - /** - * - Unique identifier of Price adjustment - */ id?: string; collection: Collection; /** - * - Type of price adjusment like charge, discount, mop etc. + * - Type of price adjusment */ type: string; /** * - Flag indicating whether refunds are - * allowed (default: False) expect for `charge` type + * allowed (default: False) */ allowed_refund?: boolean; /** @@ -4024,32 +2572,25 @@ type PriceAdjustment = { * type price adjustment. */ auto_remove?: boolean; - /** - * - Additional information regarding price adjustment - */ meta?: any; /** - * - Unique identifier of the cart + * - The ID of the cart */ cart_id: string; - distribution_logic?: DistributionLogic; }; -/** @returns {PriceAdjustmentResult} */ -declare function PriceAdjustmentResult(): PriceAdjustmentResult; -type PriceAdjustmentResult = { +/** @returns {PriceAdjustmentResponse} */ +declare function PriceAdjustmentResponse(): PriceAdjustmentResponse; +type PriceAdjustmentResponse = { data?: PriceAdjustment; }; -/** @returns {GetPriceAdjustmentResult} */ -declare function GetPriceAdjustmentResult(): GetPriceAdjustmentResult; -type GetPriceAdjustmentResult = { +/** @returns {GetPriceAdjustmentResponse} */ +declare function GetPriceAdjustmentResponse(): GetPriceAdjustmentResponse; +type GetPriceAdjustmentResponse = { data?: PriceAdjustment[]; }; /** @returns {PriceAdjustmentAdd} */ declare function PriceAdjustmentAdd(): PriceAdjustmentAdd; type PriceAdjustmentAdd = { - /** - * - The amount applied on the cart - */ value: number; /** * - The message associated with the price adjustment @@ -4093,12 +2634,9 @@ type PriceAdjustmentAdd = { * - The list of article object in the price adjustment */ article_ids: Article[]; - /** - * - Additional information regarding price adjustment - */ meta?: any; /** - * - Unique identifier of the cart + * - The ID of the cart */ cart_id: string; /** @@ -4106,243 +2644,75 @@ type PriceAdjustmentAdd = { * type price adjustment. */ auto_remove?: boolean; - distribution_logic?: DistributionLogic; -}; -/** @returns {DistributionRule} */ -declare function DistributionRule(): DistributionRule; -type DistributionRule = { - /** - * - This field defines the distribution conditions - */ - conditions?: any; -}; -/** @returns {Distribution} */ -declare function Distribution(): Distribution; -type Distribution = { - /** - * - This field defines the distribution type allowed - * values('multi', 'single') - */ - type?: string; - /** - * - This field defines the distribution logic - * allowed values('apportion', 'weighted', 'equally') - */ - logic?: string; - rule?: DistributionRule; -}; -/** @returns {DistributionLogic} */ -declare function DistributionLogic(): DistributionLogic; -type DistributionLogic = { - /** - * - This field defines the distribution - * level, currently allowed distribution level is (shipment) - */ - distribution_level?: string; - distribution?: Distribution; }; /** @returns {CartItem} */ declare function CartItem(): CartItem; type CartItem = { - /** - * - Quantity of product in cart - */ quantity?: number; - /** - * - Unique identifier of product in cart - */ product_id: string; - /** - * - Size of product in cart - */ size: string; }; -/** @returns {OpenapiCartDetailsCreation} */ -declare function OpenapiCartDetailsCreation(): OpenapiCartDetailsCreation; -type OpenapiCartDetailsCreation = { - /** - * - List of products in cart - */ +/** @returns {OpenapiCartDetailsRequest} */ +declare function OpenapiCartDetailsRequest(): OpenapiCartDetailsRequest; +type OpenapiCartDetailsRequest = { cart_items: CartItem[]; }; /** @returns {CouponBreakup} */ declare function CouponBreakup(): CouponBreakup; type CouponBreakup = { - /** - * - Coupon Title of the coupon applied denotes name - * of the coupon - */ title?: string; - /** - * - Maximum discount value of the - * coupon applied to cart - */ max_discount_value?: number; - /** - * - Coupon value of the coupon applied to cart - */ value?: number; - /** - * - Applied flag which denotes if any coupon - * is applied to cart - */ is_applied?: boolean; - /** - * - Unique identifier of the coupon applied to cart - */ uid?: string; - /** - * - Type of the coupon applied to cart - */ coupon_type?: string; - /** - * - Coupon subtitle of the coupon applied to - * cart which is used to display - */ sub_title?: string; - /** - * - Value of the coupon applied to cart - */ coupon_value?: number; - /** - * - Coupon code of the coupon applied - */ code?: string; - /** - * - Type of the coupon applied to cart - */ type?: string; - /** - * - Minimum cart value of the coupon - * applied to cart - */ minimum_cart_value?: number; - /** - * - Coupon message of the coupon applied to cart - */ message?: string; - /** - * - Coupon description of the coupon applied to cart. - */ description?: string; }; /** @returns {DisplayBreakup} */ declare function DisplayBreakup(): DisplayBreakup; type DisplayBreakup = { - /** - * - Key of the price like total_mrp, total, subtotal etc - */ key?: string; - /** - * - Numeric value for the price - */ value?: number; - /** - * - Currency code for the price - */ currency_code?: string; - /** - * - Currency symbol for the price - */ currency_symbol?: string; - /** - * - Display key field that to be shown against the value - */ display?: string; - /** - * - List of message at price level to be displayed - */ message?: string[]; }; /** @returns {LoyaltyPoints} */ declare function LoyaltyPoints(): LoyaltyPoints; type LoyaltyPoints = { - /** - * - Whether the loyalty points are applied on the cart - */ is_applied?: boolean; - /** - * - Total loyalty points available with user - */ total?: number; - /** - * - Whether the loyalty points are applicable - * for the cart - */ applicable?: number; - /** - * - Description for loyalty points - */ description?: string; }; /** @returns {RawBreakup} */ declare function RawBreakup(): RawBreakup; type RawBreakup = { - /** - * - Coupon amount applied to cart - */ coupon?: number; - /** - * - GST charges applied on cart - */ gst_charges?: number; - /** - * - Maximum price total amount of all products in cart - */ mrp_total?: number; - /** - * - Loyalty points applied on cart - */ fynd_cash?: number; - /** - * - Total value of goods after all discount, coupons - * and promotion applied of all products in cart - */ vog?: number; - /** - * - Gift cart amount applied on cart - */ gift_card?: number; - /** - * - Cod charge value applied to cart. This is - * applied when user select payment mode as COD - */ cod_charge?: number; - /** - * - Total payable amount by the customer - */ total?: number; - /** - * - Discount amount recieved on cart - */ discount?: number; - /** - * - Delivery charge applied to cart - */ delivery_charge?: number; - /** - * - Total amount will be saved if customer - * places the order - */ you_saved?: number; - /** - * - Selling price amount of all products in cart - */ subtotal?: number; - /** - * - Convenience fee amount applied to cart - */ convenience_fee?: number; }; /** @returns {CartBreakup} */ declare function CartBreakup(): CartBreakup; type CartBreakup = { coupon?: CouponBreakup; - /** - * - List of breakup data which is used - * to display the breakup to the customer like MRP total, Discount, Sub total, - * coupon value, promotion value and final total - */ display?: DisplayBreakup[]; loyalty_points?: LoyaltyPoints; raw?: RawBreakup; @@ -4350,38 +2720,19 @@ type CartBreakup = { /** @returns {ProductImage} */ declare function ProductImage(): ProductImage; type ProductImage = { - /** - * - Secured url of the product image - */ secure_url?: string; - /** - * - Bucket link url for product image - */ url?: string; - /** - * - Aspect ratio of the product image - */ aspect_ratio?: string; }; /** @returns {Tags} */ declare function Tags(): Tags; type Tags = { - /** - * - Tags is a lable or batch that is attached to a - * product in cart - */ tags?: any; }; /** @returns {BaseInfo} */ declare function BaseInfo(): BaseInfo; type BaseInfo = { - /** - * - Unique identifier of entities like brand or seller - */ uid?: number; - /** - * - Name of entities like brand or seller - */ name?: string; }; /** @returns {ActionQuery} */ @@ -4392,48 +2743,20 @@ type ActionQuery = { */ product_slug?: string[]; }; -/** @returns {ProductActionParams} */ -declare function ProductActionParams(): ProductActionParams; -type ProductActionParams = { - /** - * - Unique product url name generated via product - * name and other meta data. - */ - slug?: string[]; -}; -/** @returns {ProductActionPage} */ -declare function ProductActionPage(): ProductActionPage; -type ProductActionPage = { - /** - * - Entity of page to be redirected on click - */ - type?: string; - params?: ProductActionParams; -}; /** @returns {ProductAction} */ declare function ProductAction(): ProductAction; type ProductAction = { - /** - * - Type of action - */ type?: string; - /** - * - Url of the product to render the product - */ url?: string; query?: ActionQuery; - page?: ProductActionPage; }; /** @returns {CategoryInfo} */ declare function CategoryInfo(): CategoryInfo; type CategoryInfo = { /** - * - Unique identifier of Product Category + * - Product Category Id */ uid?: number; - /** - * - Category name of the product - */ name?: string; }; /** @returns {CartProduct} */ @@ -4444,70 +2767,25 @@ type CartProduct = { * name and other meta data */ slug?: string; - /** - * - Product Images urls of different types - * like secure url, aspect ration url and url - */ images?: ProductImage[]; teaser_tag?: Tags; brand?: BaseInfo; action?: ProductAction; - /** - * - Unique identifier of the product in cart - */ uid?: number; - /** - * - Products tags that are added to each product to - * identify the set of products - */ tags?: string[]; - /** - * - Field to add custom json of the product in cart - */ _custom_json?: any; - /** - * - Type of product in cart - */ type?: string; - /** - * - Product name of the product in cart which is - * defined on platform - */ name?: string; - /** - * - Product code of the product while defining - * product on platform - */ item_code?: string; - /** - * - Product category information which - * incldes category name and category id - */ categories?: CategoryInfo[]; - /** - * - Product attributes defined on platform - */ attributes?: any; }; /** @returns {BasePrice} */ declare function BasePrice(): BasePrice; type BasePrice = { - /** - * - Current per unit price of product after - * existing deductions - */ effective?: number; - /** - * - Currency code for all amounts - */ currency_code?: string; - /** - * - Currency symbol of the currncy used for price - */ currency_symbol?: string; - /** - * - Original price of product - */ marked?: number; }; /** @returns {ArticlePriceInfo} */ @@ -4519,94 +2797,29 @@ type ArticlePriceInfo = { /** @returns {StoreInfo} */ declare function StoreInfo(): StoreInfo; type StoreInfo = { - /** - * - Unique identifiers of the store from where product - * is fulfileld - */ uid?: number; - /** - * - Store name of the store from where the product is fulfiled - */ name?: string; - /** - * - A unique code or identifier for the store, - * often used for internal reference - */ store_code?: string; }; /** @returns {ProductArticle} */ declare function ProductArticle(): ProductArticle; type ProductArticle = { - /** - * - List of identifiers used by sellers - * for the product size. - */ seller_identifier?: string; - /** - * - Quantity of the article added in cart - */ quantity?: number; seller?: BaseInfo; - /** - * - Meta details of the article added from cart - */ cart_item_meta?: any; - /** - * - Fields to determine parent - * product of the product - */ parent_item_identifiers?: any; - /** - * - Whether the product can be purchased - * as a gift. It is true if the product is available for gifting and false otherwise. - */ is_gift_visible?: boolean; - /** - * - This unique identifier is assigned to the specific - * article. This represents item x size x location. - */ uid?: string; - /** - * - Gift card detail if gift card applied to the - * product which indicates gift price, gift applicable flag and display - * message for the gift - */ gift_card?: any; - /** - * - List fot the unique identifier - * for the product grouping. - */ product_group_tags?: string[]; - /** - * - Unique identifier of the article - */ identifier?: any; - /** - * - Quantity of the product which will - * specially manufactured as not available in stock - */ mto_quantity?: number; - /** - * - Field to update extra meta of the article in cart - */ extra_meta?: any; - /** - * - Type of the data sent in response. Possible value - * is article - */ type?: string; - /** - * - Field to update custom json of the article in cart - */ _custom_json?: any; price?: ArticlePriceInfo; - /** - * - Meta data of article in cart - */ meta?: any; - /** - * - Size of the article added in cart - */ size?: string; store?: StoreInfo; /** @@ -4618,11 +2831,11 @@ type ProductArticle = { declare function Ownership2(): Ownership2; type Ownership2 = { /** - * - Promotion amount payable category + * - Promo amount payable category */ payable_category?: string; /** - * - Promotion amount bearable party + * - Promo amount bearable party */ payable_by?: string; }; @@ -4630,7 +2843,7 @@ type Ownership2 = { declare function DiscountRulesApp(): DiscountRulesApp; type DiscountRulesApp = { /** - * - Offer detail for promotion + * - Offer for promotion */ offer?: any; /** @@ -4654,16 +2867,15 @@ type AppliedFreeArticles = { */ parent_item_identifier?: string; /** - * - Free article quantity in promotion + * - Free article quantity */ quantity?: number; /** - * - Unique identifier of free article + * - Free article id */ article_id?: string; /** * - Free gift items details - * in promotion */ free_gift_item_details?: FreeGiftItems; }; @@ -4736,7 +2948,7 @@ type AppliedPromotion = { */ promotion_group?: string; /** - * - Promotion unique identifier + * - Promotion id */ promo_id?: string; /** @@ -4744,20 +2956,14 @@ type AppliedPromotion = { */ meta?: any; /** - * - Promotion unique code + * - Promotion code */ code?: string; }; /** @returns {PromiseFormatted} */ declare function PromiseFormatted(): PromiseFormatted; type PromiseFormatted = { - /** - * - Maximum Delivery promise formatted timestamp - */ max?: string; - /** - * - Minimum Delivery promise formatted timestamp - */ min?: string; }; /** @returns {PromiseISOFormat} */ @@ -4775,13 +2981,7 @@ type PromiseISOFormat = { /** @returns {PromiseTimestamp} */ declare function PromiseTimestamp(): PromiseTimestamp; type PromiseTimestamp = { - /** - * - Maximum Promise for the shipment - */ max?: number; - /** - * - Minimum delivery promise time for the shipment - */ min?: number; }; /** @returns {ShipmentPromise} */ @@ -4794,49 +2994,18 @@ type ShipmentPromise = { /** @returns {CouponDetails} */ declare function CouponDetails(): CouponDetails; type CouponDetails = { - /** - * - Total discount earned from - * coupon applied to cart - */ discount_total_quantity?: number; - /** - * - Discout amount applied from - * coupon for single quantity of the product - */ discount_single_quantity?: number; - /** - * - Coupon code of the coupon applied - */ code?: string; }; /** @returns {ProductPrice} */ declare function ProductPrice(): ProductPrice; type ProductPrice = { - /** - * - Maximum price of the product - */ marked?: number; - /** - * - Price before promotion and coupon amount - * applied for calculation - */ add_on?: number; - /** - * - Currency code of the price defined for the product - */ currency_code?: string; - /** - * - Currency symbol of the price defined - * for the product - */ currency_symbol?: string; - /** - * - Selling price of the product - */ effective?: number; - /** - * - Selling price of the product - */ selling?: number; }; /** @returns {ProductPriceInfo} */ @@ -4856,156 +3025,62 @@ type CartProductIdentifer = { /** @returns {ProductAvailabilitySize} */ declare function ProductAvailabilitySize(): ProductAvailabilitySize; type ProductAvailabilitySize = { - /** - * - Display size of the product - */ display?: string; - /** - * - Actual value of the size - */ value?: string; - /** - * - Available flag for the size of the - * product if that is available - */ is_available?: boolean; }; /** @returns {ProductAvailability} */ declare function ProductAvailability(): ProductAvailability; type ProductAvailability = { - /** - * - Valid flag for the product if the product - * added in cart is valid to place the order - */ is_valid?: boolean; - /** - * - Quantity of the product available - * on other store - */ other_store_quantity?: number; - /** - * - Deliverable flag denotes if the product - * is deliverable or not - */ deliverable?: boolean; - /** - * - Product sizes availability - */ available_sizes?: ProductAvailabilitySize[]; - /** - * - Denotes if the product is available in stock - */ out_of_stock?: boolean; - /** - * - All sizes of the product - */ sizes?: string[]; }; /** @returns {PromoMeta} */ declare function PromoMeta(): PromoMeta; type PromoMeta = { - /** - * - Loyalty points message denotes how much - * loyalty points and applied and how much left with the user - */ message?: string; }; /** @returns {CartProductInfo} */ declare function CartProductInfo(): CartProductInfo; type CartProductInfo = { - /** - * - Quantity of the product added in cart - */ quantity?: number; product?: CartProduct; - /** - * - European Article Number of the product - * (limited upto 50 EAN identifier in a single request) - */ product_ean_id?: string; - /** - * - Parent item information of the - * product which identifies the parent of the product in cart - */ parent_item_identifiers?: any; - /** - * - Whether or not the product is a set of items - */ is_set?: boolean; article?: ProductArticle; - /** - * - List of applicable - * promotion for the product in cart - */ promotions_applied?: AppliedPromotion[]; delivery_promise?: ShipmentPromise; - /** - * - The attribute key associated with the size - */ key?: string; coupon?: CouponDetails; - /** - * - Bulk offer information for the product - * which denotes if any bulk offer is applied to the product in cart - */ bulk_offer?: any; price?: ProductPriceInfo; - /** - * - Message for the coupon denotes which - * coupon is applied and empty if not applied - */ coupon_message?: string; identifiers: CartProductIdentifer; - /** - * - Product level message which denotes error - * information to display over the product in cart - */ message?: string; - /** - * - Discount amount of the product in cart - */ discount?: string; availability?: ProductAvailability; - /** - * - An Integer indication the Minimum Order Quantity - * of a product, e.g. 100. - */ moq?: any; price_per_unit?: ProductPriceInfo; promo_meta?: PromoMeta; - /** - * - Whether MTO (Make to Order) is enabled or not. - */ custom_order?: any; }; -/** @returns {OpenapiCartDetailsResult} */ -declare function OpenapiCartDetailsResult(): OpenapiCartDetailsResult; -type OpenapiCartDetailsResult = { - /** - * - Cart validity flag determines the if the - * response is valid or not - */ +/** @returns {OpenapiCartDetailsResponse} */ +declare function OpenapiCartDetailsResponse(): OpenapiCartDetailsResponse; +type OpenapiCartDetailsResponse = { is_valid?: boolean; - /** - * - Message of the cart Open API cart detail response - */ message?: string; breakup_values?: CartBreakup; - /** - * - Items details in cart - */ items?: CartProductInfo[]; }; -/** @returns {OpenApiErrorResult} */ -declare function OpenApiErrorResult(): OpenApiErrorResult; -type OpenApiErrorResult = { - /** - * - Success flag for cart detail open api response - */ +/** @returns {OpenApiErrorResponse} */ +declare function OpenApiErrorResponse(): OpenApiErrorResponse; +type OpenApiErrorResponse = { success?: boolean; - /** - * - Error message of the Open API cart detail response - */ message?: string; /** * - Contains field name which has error as key and @@ -5016,336 +3091,123 @@ type OpenApiErrorResult = { /** @returns {ShippingAddress} */ declare function ShippingAddress(): ShippingAddress; type ShippingAddress = { - /** - * - Country of address - */ country?: string; - /** - * - State of the address - */ state?: string; - /** - * - City of the address - */ city?: string; - /** - * - Phone number for address - */ phone?: number; - /** - * - Area code of the address - */ area_code: string; - /** - * - Country iso code for address - */ country_iso_code?: string; - /** - * - Country phone code for address - */ country_phone_code?: string; - /** - * - Metadata of the address - */ meta?: any; - /** - * - Address type of address - */ address_type?: string; - /** - * - Area description for address - */ area?: string; - /** - * - Area code slug for address. example - * pincode is slug for India - */ area_code_slug?: string; - /** - * - Name of person in address data to whom it belongs to - */ name?: string; - /** - * - Landmark of address - */ landmark?: string; - /** - * - Email address for address data - */ email?: string; - /** - * - Country code of address - */ country_code?: string; - /** - * - Pincode for address data - */ pincode?: number; - /** - * - Address description for address data - */ address?: string; }; -/** @returns {OpenApiCartServiceabilityCreation} */ -declare function OpenApiCartServiceabilityCreation(): OpenApiCartServiceabilityCreation; -type OpenApiCartServiceabilityCreation = { - /** - * - List of items in open api cart response - */ +/** @returns {OpenApiCartServiceabilityRequest} */ +declare function OpenApiCartServiceabilityRequest(): OpenApiCartServiceabilityRequest; +type OpenApiCartServiceabilityRequest = { cart_items: CartItem[]; shipping_address: ShippingAddress; }; -/** @returns {OpenApiCartServiceabilityResult} */ -declare function OpenApiCartServiceabilityResult(): OpenApiCartServiceabilityResult; -type OpenApiCartServiceabilityResult = { - /** - * - Cart validity flag determines the if the - * response is valid or not - */ +/** @returns {OpenApiCartServiceabilityResponse} */ +declare function OpenApiCartServiceabilityResponse(): OpenApiCartServiceabilityResponse; +type OpenApiCartServiceabilityResponse = { is_valid?: boolean; - /** - * - Items data list in user cart that - * includes item id, item size, store id, available sizes and rest of the item - * related data - */ items?: CartProductInfo[]; delivery_promise?: ShipmentPromise; - /** - * - Message of the cart detail API response - */ message?: string; breakup_values?: CartBreakup; }; /** @returns {OpenApiFiles} */ declare function OpenApiFiles(): OpenApiFiles; type OpenApiFiles = { - /** - * - Key represents name of file - */ key: string; - /** - * - List of urls path - */ values: string[]; }; /** @returns {CartItemMeta} */ declare function CartItemMeta(): CartItemMeta; type CartItemMeta = { - /** - * - Flags indicates item is primary or not - */ primary_item?: boolean; - /** - * - Fields to determine group id of the product - */ group_id?: string; }; /** @returns {MultiTenderPaymentMeta} */ declare function MultiTenderPaymentMeta(): MultiTenderPaymentMeta; type MultiTenderPaymentMeta = { - /** - * - Payment gateway identifier - */ payment_id?: string; - /** - * - Payment gateway used to do the payment - */ payment_gateway?: string; - /** - * - Payment extra meta for the payment mode to - * do the payment - */ extra_meta?: any; - /** - * - Current status of the payment - */ current_status?: string; - /** - * - Payment gateway order id - */ order_id?: string; }; /** @returns {MultiTenderPaymentMethod} */ declare function MultiTenderPaymentMethod(): MultiTenderPaymentMethod; type MultiTenderPaymentMethod = { - /** - * - Payment mode of payment method used to make payment - */ mode: string; /** - * - Amount of the payment mode to be paid + * - Payment amount */ amount: number; meta?: MultiTenderPaymentMeta; /** - * - Name of the payment mode used to make payment + * - Payment mode name */ name?: string; }; /** @returns {OpenApiOrderItem} */ declare function OpenApiOrderItem(): OpenApiOrderItem; type OpenApiOrderItem = { - /** - * - Cashback applied on user cart - */ cashback_applied: number; - /** - * - Article quantity in user cart - */ quantity?: number; - /** - * - Size of the article added in cart - */ size: string; - /** - * - Coupon discount applied on - * article in user cart - */ coupon_effective_discount: number; - /** - * - Amount needs to paid for article in cart - */ amount_paid: number; - /** - * - Delivery charges applied on article in cart - */ delivery_charges: number; - /** - * - Original price of product - */ price_marked: number; - /** - * - List of file url - */ files?: OpenApiFiles[]; meta?: CartItemMeta; - /** - * - Extra meta of the article in cart - */ extra_meta?: any; - /** - * - Product id associated with article in cart - */ product_id: number; - /** - * - Loyalty points applied on cart - */ loyalty_discount?: number; - /** - * - Discount value applied on article in cart - */ discount: number; - /** - * - Current per unit price of product after - * existing deductions - */ price_effective: number; - /** - * - Payment methods list - * used to make the payment - */ payment_methods: MultiTenderPaymentMethod[]; - /** - * - Employee discount value applied on - * article in cart - */ employee_discount?: number; - /** - * - Cash On Delivery charges applied on article in cart - */ cod_charges: number; }; /** @returns {OpenApiPlatformCheckoutReq} */ declare function OpenApiPlatformCheckoutReq(): OpenApiPlatformCheckoutReq; type OpenApiPlatformCheckoutReq = { - /** - * - Payment mode from which the payment to be - * done for the order - */ payment_mode?: string; - /** - * - Total amount of user cart - */ cart_value: number; - /** - * - List of items in user cart - */ cart_items: OpenApiOrderItem[]; shipping_address?: ShippingAddress; - /** - * - Loyalty points applied on cart - */ loyalty_discount?: number; - /** - * - Comment message added in cart after order placed - */ comment?: string; - /** - * - Payment methods list - * used to make the payment - */ payment_methods: MultiTenderPaymentMethod[]; - /** - * - Employee discount value applied on user cart - */ employee_discount?: any; - /** - * - Coupon text of coupon applied on user cart - */ coupon?: string; - /** - * - Cashback applied on user cart - */ cashback_applied: number; - /** - * - GSTIN number added in cart - */ gstin?: string; billing_address: ShippingAddress; - /** - * - Coupon code to be applied to cart - */ coupon_code: string; - /** - * - Value of the coupon applied to cart - */ coupon_value: number; - /** - * - Delivery charges of the order placed - * via checkout API - */ delivery_charges: number; - /** - * - Order id generated after placing order - */ affiliate_order_id?: string; - /** - * - Currency code for the price - */ currency_code?: string; - /** - * - Order id generated after placing order - */ order_id?: string; - /** - * - List of file url - */ files?: OpenApiFiles[]; - /** - * - Cash On Delivery charges of the user cart - */ cod_charges: number; }; -/** @returns {OpenApiCheckoutResult} */ -declare function OpenApiCheckoutResult(): OpenApiCheckoutResult; -type OpenApiCheckoutResult = { - /** - * - The request success is defined - */ +/** @returns {OpenApiCheckoutResponse} */ +declare function OpenApiCheckoutResponse(): OpenApiCheckoutResponse; +type OpenApiCheckoutResponse = { success?: boolean; - /** - * - Message of the api response - */ message?: string; /** * - Order id sent in request @@ -5359,157 +3221,44 @@ type OpenApiCheckoutResult = { /** @returns {AbandonedCart} */ declare function AbandonedCart(): AbandonedCart; type AbandonedCart = { - /** - * - Expire details of user cart - */ expire_at: string; - /** - * - Promotion object details like amount, mode, - * currency and list of promotions in user cart - */ promotion?: any; - /** - * - User cart default status - */ is_default: boolean; - /** - * - Comment message to be added in user cart - */ comment?: string; - /** - * - List of articles in user cart - */ articles: any[]; - /** - * - Coupon data of user cart which denotes if - * coupon is applied, coupon code, coupon amount, coupon title and coupon message - */ coupon?: any; - /** - * - Total bulk discount amount - * applied in user cart - */ bulk_coupon_discount?: number; - /** - * - Unique identifier of the user cart - */ _id: string; - /** - * - Fynd credit points applied in user cart - */ fynd_credits?: any; - /** - * - Flat article index in user cart - */ fc_index_map?: number[]; - /** - * - Order id generated in user cart - */ order_id?: string; - /** - * - Discount amount of the product in cart - */ discount?: number; - /** - * - Cash On Delivery charges of the user cart - */ cod_charges?: any; - /** - * - Payment object selected in user cart - */ payments?: any; - /** - * - Payment mode of the payment selected to - * do the payment - */ payment_mode?: string; - /** - * - Shipment details for the items in a cart, - * specific to the selected address. - */ shipments?: any[]; - /** - * - Customer contact details for - * customer pickup at store - */ pick_up_customer_details?: any; - /** - * - Unique Identifier of user cart - */ uid: number; - /** - * - Checkout mode of user cart - */ checkout_mode?: string; - /** - * - Total amount of user cart - */ cart_value?: number; - /** - * - Flag to indicate cart is archived or not - */ is_archive?: boolean; - /** - * - Date time format when user cart created - */ created_on: string; - /** - * - Date time format when user cart last modified - */ last_modified: string; - /** - * - Extra meta data of user cart - */ meta?: any; - /** - * - Buy now flag for the cart which denotes user - * is doing fast checkout for the cart using buy now - */ buy_now?: boolean; - /** - * - Flag indicates user cart is active or not - */ is_active?: boolean; - /** - * - Cart level cashback data which denotes cashback - * amount and cashback message - */ cashback: any; - /** - * - Payment methods list used to make the payment - */ payment_methods?: any[]; - /** - * - GSTIN added in user cart - */ gstin?: string; - /** - * - Delivery charges of user cart - */ delivery_charges?: any; - /** - * - Flag indicates cart has merged article or not - */ merge_qty?: boolean; - /** - * - User Id of user cart - */ user_id: string; - /** - * - Application id of user cart - */ app_id?: string; }; -/** @returns {AbandonedCartResult} */ -declare function AbandonedCartResult(): AbandonedCartResult; -type AbandonedCartResult = { - /** - * - List of items in abandon cart - */ +/** @returns {AbandonedCartResponse} */ +declare function AbandonedCartResponse(): AbandonedCartResponse; +type AbandonedCartResponse = { items?: AbandonedCart[]; - /** - * - Define the list of items with updated status - */ result?: any; page?: Page; /** @@ -5524,17 +3273,8 @@ type AbandonedCartResult = { /** @returns {PaymentSelectionLock} */ declare function PaymentSelectionLock(): PaymentSelectionLock; type PaymentSelectionLock = { - /** - * - Identifier for Payment Mode - */ payment_identifier?: string; - /** - * - Default Selection Payment Mode - */ default_options?: string; - /** - * - Denotes if default payment selection is enable - */ enabled?: boolean; }; /** @returns {CartCurrency} */ @@ -5544,108 +3284,38 @@ type CartCurrency = { * - Currency code defined by ISO 4217:2015 */ code?: string; - /** - * - Currency symbol for currency of user cart prices - */ symbol?: string; }; /** @returns {CartDetailCoupon} */ declare function CartDetailCoupon(): CartDetailCoupon; type CartDetailCoupon = { - /** - * - Fields denotes cashback amount applied to cart - */ cashback_amount?: number; - /** - * - Primary cashback message for - * coupon applied to cart - */ cashback_message_primary?: string; - /** - * - Secondary cashback message - * for coupon applied to cart - */ cashback_message_secondary?: string; - /** - * - Coupon code to be applied to cart - */ coupon_code?: string; - /** - * - Coupon description of the coupon - * applied to cart - */ coupon_description?: string; - /** - * - Unique identifier of the coupon applied to cart - */ coupon_id?: string; - /** - * - Coupon subtitle of the coupon applied to cart - */ coupon_subtitle?: string; - /** - * - Coupon title of the coupon applied - */ coupon_title?: string; - /** - * - Type of the coupon applied to cart - */ coupon_type?: string; - /** - * - Value of the coupon applied to cart - */ coupon_value?: number; - /** - * - Total discount earned from coupon applied to cart - */ discount?: number; - /** - * - Flag to determine where the coupon is - * applied to cart or not - */ is_applied?: boolean; - /** - * - Determine where the coupon applied to cart is valid - */ is_valid?: boolean; - /** - * - Maximum discount value of the - * coupon applied to cart - */ maximum_discount_value?: number; - /** - * - Coupon message of the coupon applied to cart - */ message?: string; - /** - * - Minimum cart value of the coupon - * applied to cart - */ minimum_cart_value?: number; }; /** @returns {ChargesThreshold} */ declare function ChargesThreshold(): ChargesThreshold; type ChargesThreshold = { - /** - * - Charges amount to be applied on cart - */ charges?: number; - /** - * - Threshold of cart value on which the charge - * should be applied - */ threshold?: number; }; /** @returns {DeliveryChargesConfig} */ declare function DeliveryChargesConfig(): DeliveryChargesConfig; type DeliveryChargesConfig = { - /** - * - Delivery charge enabled for the cart or not - */ enabled?: boolean; - /** - * - Charges applicable based on threshold - */ charges?: ChargesThreshold[]; }; /** @returns {CartCommonConfig} */ @@ -5653,466 +3323,164 @@ declare function CartCommonConfig(): CartCommonConfig; type CartCommonConfig = { delivery_charges_config?: DeliveryChargesConfig; }; -/** @returns {CartDetailResult} */ -declare function CartDetailResult(): CartDetailResult; -type CartDetailResult = { - /** - * - Unique identifier of the user cart - */ +/** @returns {CartDetailResponse} */ +declare function CartDetailResponse(): CartDetailResponse; +type CartDetailResponse = { cart_id?: number; - /** - * - Unique identifier of the user cart - */ uid?: string; - /** - * - Coupon text of coupon applied on cart - */ coupon_text?: string; - /** - * - Unique identifier of the user cart - */ id?: string; - /** - * - Pan card config states at what condition - * user should enter the pan card - */ pan_config?: any; delivery_promise?: ShipmentPromise; - /** - * - Comment message to be added in user cart - */ comment?: string; - /** - * - Items data list in user cart that - * includes item id, item size, store id, available sizes and rest of the item - * related data - */ items?: CartProductInfo[]; payment_selection_lock?: PaymentSelectionLock; - /** - * - Delivery charge in information - * message on shipment - */ delivery_charge_info?: string; common_config?: CartCommonConfig; coupon?: CartDetailCoupon; - /** - * - Restrict checkout flag to restrict - * the checkout process - */ restrict_checkout?: boolean; - /** - * - Message of the cart detail API response - */ message?: string; - /** - * - Notification object which denotes - * notification data for user cart - */ notification?: any; - /** - * - Staff employee user id if cart is - * created by staff employee for the customer - */ staff_user_id?: string; - /** - * - Success flag of get cart detail API response - */ success?: boolean; breakup_values?: CartBreakup; - /** - * - Cart validity flag determines the if the - * response is valid or not - */ is_valid?: boolean; currency?: CartCurrency; - /** - * - Checkout mode of user cart - */ checkout_mode?: string; - /** - * - Last modified timestamp of cart - */ last_modified?: string; - /** - * - Buy now flag for the cart which denotes user - * is doing fast checkout for the cart using buy now - */ buy_now?: boolean; - /** - * - GSTIN added in user cart - */ gstin?: string; - /** - * - List of applied - * promotions data to cart which includes promotion id, promotion name, offer - * text, description, buy rules, discount rules and promotion type - */ applied_promo_details?: AppliedPromotion[]; - /** - * - Permanent Account Number of the user - */ pan_no?: string; - /** - * - Custom meta details added cart - * checkout API payload - */ custom_cart_meta?: any; }; /** @returns {AddProductCart} */ declare function AddProductCart(): AddProductCart; type AddProductCart = { - /** - * - Field to specify the product quantity that - * user wants to buy - */ quantity?: number; - /** - * - Field to determine size of the product - */ item_size?: string; - /** - * - Unique identifier of the seller selected by - * the user from which user want to buy a product - */ seller_id?: number; - /** - * - Fields to determine parent - * product of the product - */ parent_item_identifiers?: any[]; - /** - * - Field to specify the product - * groups of the product that the user is trying to add in cart - */ product_group_tags?: string[]; - /** - * - Unique identifier of an article - */ article_id?: string; - /** - * - Field to determine how article - * assignment should happen by article assignment level and strategy - */ article_assignment?: any; - /** - * - Unique identifier of the store selected by - * the user from which user want to buy a product - */ store_id?: number; - /** - * - Display field at article level - */ display?: string; - /** - * - Unique identifier to identify product - */ item_id?: number; - /** - * - Extra meta data to be added at article - * level while add items to cart - */ extra_meta?: any; - /** - * - Field to add custom json at article level - * while add items to cart - */ _custom_json?: any; - /** - * - Field to add meta data at article level - */ meta?: any; - /** - * - Filed to determine whether user is making request - * from pos or not - */ pos?: boolean; /** * - Add items using seller identifier for store os */ seller_identifier?: string; }; -/** @returns {AddCartCreation} */ -declare function AddCartCreation(): AddCartCreation; -type AddCartCreation = { - /** - * - Field to create to new cart whille user adds - * item to cart - */ +/** @returns {AddCartRequest} */ +declare function AddCartRequest(): AddCartRequest; +type AddCartRequest = { new_cart?: boolean; - /** - * - List of items detail which need to be - * added to cart like item id, item size, and item quantity - */ items?: AddProductCart[]; }; -/** @returns {AddCartDetailResult} */ -declare function AddCartDetailResult(): AddCartDetailResult; -type AddCartDetailResult = { +/** @returns {AddCartDetailResponse} */ +declare function AddCartDetailResponse(): AddCartDetailResponse; +type AddCartDetailResponse = { /** * - True if all items are added successfully. * False if partially added or not added. */ success?: boolean; - cart?: CartDetailResult; + cart?: CartDetailResponse; /** * - When adding multiple items check if all * added. True if only few are added. */ partial?: boolean; - /** - * - Message of add cart API response - */ message?: string; }; /** @returns {UpdateProductCart} */ declare function UpdateProductCart(): UpdateProductCart; type UpdateProductCart = { - /** - * - Field to update the quantity of the item in cart - */ quantity?: number; - /** - * - Field to update the size of the product in cart - */ item_size?: string; - /** - * - Field to update parent product - * of the item in cart - */ parent_item_identifiers?: any; - /** - * - Field to update meta of the item in cart - */ meta?: any; - /** - * - Field to update extra meta of the product in cart - */ extra_meta?: any; - /** - * - Field to update custom json of the product in cart - */ _custom_json?: any; - /** - * - Item id of the product that needs to be updated - */ item_id?: number; - /** - * - Item index determines on which index the - * product falls to be updated - */ item_index?: number; identifiers: CartProductIdentifer; - /** - * - Article id of the product in cart - */ article_id?: string; }; -/** @returns {FreeGiftItemCreation} */ -declare function FreeGiftItemCreation(): FreeGiftItemCreation; -type FreeGiftItemCreation = { - /** - * - Unique identifier of the free gift promotion. - */ - promotion_id: string; - /** - * - Unique identifier of the selected free gift item. - */ - item_id: string; - /** - * - Size of the selected free gift item. - */ - item_size: string; -}; -/** @returns {UpdateCartCreation} */ -declare function UpdateCartCreation(): UpdateCartCreation; -type UpdateCartCreation = { +/** @returns {UpdateCartRequest} */ +declare function UpdateCartRequest(): UpdateCartRequest; +type UpdateCartRequest = { items?: UpdateProductCart[]; - /** - * - List of free gift - * items with updated sizes. - */ - free_gift_items?: FreeGiftItemCreation[]; - /** - * - Cart opertaion type - */ operation: string; }; -/** @returns {UpdateCartDetailResult} */ -declare function UpdateCartDetailResult(): UpdateCartDetailResult; -type UpdateCartDetailResult = { +/** @returns {UpdateCartDetailResponse} */ +declare function UpdateCartDetailResponse(): UpdateCartDetailResponse; +type UpdateCartDetailResponse = { /** * - True if all items are added successfully. * False if partially added or not added. */ success?: boolean; - cart?: CartDetailResult; - /** - * - Message of update cart API response - */ + cart?: CartDetailResponse; message?: string; }; /** @returns {OverrideCartItemPromo} */ declare function OverrideCartItemPromo(): OverrideCartItemPromo; type OverrideCartItemPromo = { - /** - * - Promotion id applied on product - */ promo_id: string; - /** - * - Promotion amount applied on product - */ promo_amount: string; - /** - * - Promotion description applied on product - */ promo_desc?: string; rwrd_tndr?: string; - /** - * - List of items - */ item_list?: any[]; - /** - * - Parent promotion unique identifier - */ parent_promo_id?: string; }; /** @returns {OverrideCartItem} */ declare function OverrideCartItem(): OverrideCartItem; type OverrideCartItem = { - /** - * - Seller identifiers of the product size. - */ seller_identifier?: string; - /** - * - Item quantity, which you have added into cart - */ quantity?: number; - /** - * - Item size, which you have added into cart - */ size: string; - /** - * - Original price of product - */ price_marked: number; - /** - * - Amount needs to paid for item - */ amount_paid: number; - /** - * - List of promotion applied on item - */ promo_list?: OverrideCartItemPromo[]; - /** - * - Extra meta to be added while checkout in order - */ extra_meta?: any; - /** - * - Item unique id in user cart - */ item_id: number; - /** - * - Discount amount applied on item - */ discount: number; - /** - * - Current per unit price of product after - * existing deductions - */ price_effective: number; }; /** @returns {OverrideCheckoutReq} */ declare function OverrideCheckoutReq(): OverrideCheckoutReq; type OverrideCheckoutReq = { - /** - * - The cart id of user cart - */ cart_id: string; - /** - * - Payment mode from which the payment to be - * done for the order - */ payment_mode: string; - /** - * - Billing address json which includes - * customer address, customer phone, customer email, customer pincode, - * customer landmark and customer name - */ billing_address?: any; - /** - * - Merchant code of the payment mode selected - * to do the payment - */ merchant_code: string; - /** - * - Payment identifier of the payment - * mode selected to do the payment - */ payment_identifier: string; - /** - * - Currency code for the price - */ currency_code: string; - /** - * - Aggregator name of the payment gateway - */ aggregator: string; - /** - * - Order type of the order being placed like - * pickAtStore or HomeDelivery - */ order_type: string; - /** - * - Callback url to be redirected after - * payment received/failed - */ callback_url?: string; - /** - * - List of items which includes - * their size, id, discount and promo details - */ cart_items: OverrideCartItem[]; - /** - * - Ordering store id of the store from - * which the order is getting placed - */ ordering_store?: number; - /** - * - Shipping address json which includes - * name, area, address, phone, area_code, state, country, country code and email - */ shipping_address?: any; }; -/** @returns {OverrideCheckoutResult} */ -declare function OverrideCheckoutResult(): OverrideCheckoutResult; -type OverrideCheckoutResult = { - /** - * - Data of the user cart checkout includes cart data, - * address, user id, order type etc - */ +/** @returns {OverrideCheckoutResponse} */ +declare function OverrideCheckoutResponse(): OverrideCheckoutResponse; +type OverrideCheckoutResponse = { data: any; - /** - * - Cart details in API response which included cart - * id, items in cart, promise, order type, breakup values etc. - */ cart: any; - /** - * - Success flag of cart override checkout API response - */ success: string; - /** - * - Order id generated after placing order - */ order_id: string; - /** - * - Message of the cart override checkout API response - */ message: string; }; -/** @returns {GetShareCartLinkCreation} */ -declare function GetShareCartLinkCreation(): GetShareCartLinkCreation; -type GetShareCartLinkCreation = { +/** @returns {GetShareCartLinkRequest} */ +declare function GetShareCartLinkRequest(): GetShareCartLinkRequest; +type GetShareCartLinkRequest = { /** * - Cart uid for generating sharing */ @@ -6123,17 +3491,15 @@ type GetShareCartLinkCreation = { */ meta?: any; }; -/** @returns {GetShareCartLinkResult} */ -declare function GetShareCartLinkResult(): GetShareCartLinkResult; -type GetShareCartLinkResult = { +/** @returns {GetShareCartLinkResponse} */ +declare function GetShareCartLinkResponse(): GetShareCartLinkResponse; +type GetShareCartLinkResponse = { /** - * - Short url unique id of the cart which is opted - * to share with other user + * - Short url unique id */ token?: string; /** - * - Short shareable final url which can populate - * shared cart items in one's cart or replaced one's cart with shared cart items + * - Short shareable final url */ share_url?: string; }; @@ -6149,12 +3515,9 @@ type SharedCartDetails = { */ user?: any; /** - * - Short link id of the user cart that needs to be shared + * - Short link id */ token?: string; - /** - * - Created on timestamp of user cart - */ created_on?: string; /** * - Meta data sent while generating share cart link @@ -6164,331 +3527,125 @@ type SharedCartDetails = { /** @returns {SharedCart} */ declare function SharedCart(): SharedCart; type SharedCart = { - /** - * - Coupon text of the applied coupon on user cart - */ coupon_text?: string; - /** - * - Cart id of shared cart - */ id?: string; delivery_promise?: ShipmentPromise; - /** - * - Comment message added in user cart - */ comment?: string; - /** - * - Items data list in user cart that - * includes item id, item size, store id, available sizes and rest of the item - * related data - */ items?: CartProductInfo[]; shared_cart_details?: SharedCartDetails; payment_selection_lock?: PaymentSelectionLock; - /** - * - Delivery charge info message of - * the user cart - */ delivery_charge_info?: string; - /** - * - Restrict checkout flag to restrict - * the checkout process - */ restrict_checkout?: boolean; - /** - * - Message of the get shared cart API response - */ message?: string; breakup_values?: CartBreakup; - /** - * - Valid flag for get shared cart detail API - */ is_valid?: boolean; - /** - * - Cart id of the user cart - */ uid?: string; - /** - * - Checkout mode of address on which - * address to be used for which checkout mode of cart - */ checkout_mode?: string; currency?: CartCurrency; - /** - * - Last modified timestamp of user cart - */ last_modified?: string; - /** - * - Buy now flag of user cart - */ buy_now?: boolean; - /** - * - Cart id of user cart for generating cart sharing token - */ cart_id?: number; - /** - * - GSTIN added in user cart - */ gstin?: string; - /** - * - Custom cart meta of user cart added - * via update cart meta API - */ custom_cart_meta?: any; }; -/** @returns {SharedCartResult} */ -declare function SharedCartResult(): SharedCartResult; -type SharedCartResult = { +/** @returns {SharedCartResponse} */ +declare function SharedCartResponse(): SharedCartResponse; +type SharedCartResponse = { cart?: SharedCart; - /** - * - Error details if any error occurs which includes - * type of error, error code and error message - */ error?: string; }; /** @returns {CartList} */ declare function CartList(): CartList; type CartList = { - /** - * - The cart id of user - */ cart_id?: string; - /** - * - Customer contact details for - * customer pickup at store - */ pick_up_customer_details?: any; - /** - * - Total amount of cart - */ cart_value?: number; - /** - * - Date format when cart created - */ created_on?: string; - /** - * - User id which is associated with cart - */ user_id?: string; - /** - * - Active cart currency code - */ currency_code?: string; - /** - * - Article total count in cart - */ item_counts?: number; }; -/** @returns {MultiCartResult} */ -declare function MultiCartResult(): MultiCartResult; -type MultiCartResult = { - /** - * - True if get list of cart successfully. - */ +/** @returns {MultiCartResponse} */ +declare function MultiCartResponse(): MultiCartResponse; +type MultiCartResponse = { success?: boolean; - /** - * - List of active carts and their item's count - */ data?: CartList[]; }; /** @returns {UpdateUserCartMapping} */ declare function UpdateUserCartMapping(): UpdateUserCartMapping; type UpdateUserCartMapping = { - /** - * - User Id of user for which we map with the cart - */ user_id: string; }; /** @returns {UserInfo} */ declare function UserInfo(): UserInfo; type UserInfo = { - /** - * - User gender - */ gender?: string; - /** - * - Date format of user when user last modified - */ modified_on?: string; - /** - * - Unique Identifier of user - */ _id?: string; - /** - * - Unique UID of user - */ uid?: string; - /** - * - Unique external id - */ external_id?: string; - /** - * - 10 digit Mobile number of user - */ mobile?: string; - /** - * - Last name of user - */ last_name?: string; - /** - * - Date format of user when user registered - */ created_at?: string; - /** - * - First name of user - */ first_name?: string; }; -/** @returns {UserCartMappingResult} */ -declare function UserCartMappingResult(): UserCartMappingResult; -type UserCartMappingResult = { - /** - * - Coupon text of coupon applied on cart - */ +/** @returns {UserCartMappingResponse} */ +declare function UserCartMappingResponse(): UserCartMappingResponse; +type UserCartMappingResponse = { coupon_text?: string; user?: UserInfo; - /** - * - Unique identifier of the user cart - */ id?: string; - /** - * - Pan card config states at what condition - * user should enter the pan card - */ pan_config?: any; delivery_promise?: ShipmentPromise; - /** - * - Comment message to be added in user cart - */ comment?: string; - /** - * - Items data list in user cart that - * includes item id, item size, store id, available sizes and rest of the item - * related data - */ items?: CartProductInfo[]; payment_selection_lock?: PaymentSelectionLock; - /** - * - Delivery charge in information - * message on shipment - */ delivery_charge_info?: string; - /** - * - Restrict checkout flag to restrict - * the checkout process - */ restrict_checkout?: boolean; - /** - * - Message of the get cart detail API response - */ message?: string; breakup_values?: CartBreakup; - /** - * - Cart validity flag determines the if the - * response is valid or not - */ is_valid?: boolean; currency?: CartCurrency; - /** - * - Checkout mode of user cart - */ checkout_mode?: string; - /** - * - Last modified timestamp of cart - */ last_modified?: string; - /** - * - Buy now flag for the cart which denotes user - * is doing fast checkout for the cart using buy now - */ buy_now?: boolean; - /** - * - GSTIN added in user cart - */ gstin?: string; - /** - * - Custom meta details added cart - * checkout API payload - */ custom_cart_meta?: any; - /** - * - List of applied - * promotions data to cart which includes promotion id, promotion name, offer - * text, description, buy rules, discount rules and promotion type - */ applied_promo_details?: AppliedPromotion[]; - /** - * - Permanent Account Number of the user - */ pan_no?: string; }; -/** @returns {PlatformAddCartDetails} */ -declare function PlatformAddCartDetails(): PlatformAddCartDetails; -type PlatformAddCartDetails = { - /** - * - The user id of user, for which we need to add - * item into cart - */ +/** @returns {PlatformAddCartRequest} */ +declare function PlatformAddCartRequest(): PlatformAddCartRequest; +type PlatformAddCartRequest = { user_id?: string; - /** - * - Field to create to new cart whille user adds - * item to cart - */ new_cart?: boolean; - /** - * - List of items detail which need to be - * added to cart like item id, item size, and item quantity - */ items?: AddProductCart[]; }; -/** @returns {PlatformUpdateCartDetails} */ -declare function PlatformUpdateCartDetails(): PlatformUpdateCartDetails; -type PlatformUpdateCartDetails = { - /** - * - The user id of user, for which we need to - * update the cart - */ +/** @returns {PlatformUpdateCartRequest} */ +declare function PlatformUpdateCartRequest(): PlatformUpdateCartRequest; +type PlatformUpdateCartRequest = { user_id?: string; - /** - * - List items data that needs to be - * updated in cart - */ items?: UpdateProductCart[]; - /** - * - List of free gift - * items with updated sizes. - */ - free_gift_items?: FreeGiftItemCreation[]; - /** - * - Field to determine if item to be removed from - * cart or it needs to be updated - */ operation: string; }; -/** @returns {DeleteCartDetails} */ -declare function DeleteCartDetails(): DeleteCartDetails; -type DeleteCartDetails = { - /** - * - List of all cart ids, which need to delete - */ +/** @returns {DeleteCartRequest} */ +declare function DeleteCartRequest(): DeleteCartRequest; +type DeleteCartRequest = { cart_id_list?: string[]; }; -/** @returns {DeleteCartDetailResult} */ -declare function DeleteCartDetailResult(): DeleteCartDetailResult; -type DeleteCartDetailResult = { +/** @returns {DeleteCartDetailResponse} */ +declare function DeleteCartDetailResponse(): DeleteCartDetailResponse; +type DeleteCartDetailResponse = { /** * - True if cart is archived successfully. False * if not archived. */ success?: boolean; - /** - * - Message for delete cart response - */ message?: string; }; -/** @returns {CartItemCountResult} */ -declare function CartItemCountResult(): CartItemCountResult; -type CartItemCountResult = { +/** @returns {CartItemCountResponse} */ +declare function CartItemCountResponse(): CartItemCountResponse; +type CartItemCountResponse = { /** * - Item count present in cart */ @@ -6497,113 +3654,40 @@ type CartItemCountResult = { /** @returns {Coupon} */ declare function Coupon(): Coupon; type Coupon = { - /** - * - Coupon Title of the coupon applied denotes name - * of the coupon - */ title?: string; - /** - * - Maximum discount value of the - * coupon applied to cart - */ max_discount_value?: number; - /** - * - Coupon code of the coupon applied on cart - */ coupon_code?: string; - /** - * - Flag to determine where the coupon is - * applied to cart or not - */ is_applied?: boolean; - /** - * - Type of the coupon applied to cart - */ coupon_type?: string; - /** - * - Message to display to user for expiry of the coupon - */ expires_on?: string; - /** - * - Coupon value of the coupon applied to cart - */ coupon_value?: number; - /** - * - Coupon subtitle of the coupon applied to - * cart which is used to display - */ sub_title?: string; - /** - * - Minimum cart value of the coupon - * applied to cart - */ minimum_cart_value?: number; - /** - * - Flag to determine where the coupon is - * applicable to cart or not - */ is_applicable?: boolean; - /** - * - Coupon message of the coupon applied to cart - */ message?: string; - /** - * - Coupon description of the coupon applied to cart - */ description?: string; - /** - * - Start date of the coupon when the coupon - * will be live for the users to apply on cart - */ start_date?: string; - /** - * - End date of the coupon on which the coupon expires - */ end_date?: string; - /** - * - Message which is used to - * display to the customer if the coupon is applied successfully - */ coupon_applicable_message?: string; }; /** @returns {PageCoupon} */ declare function PageCoupon(): PageCoupon; type PageCoupon = { - /** - * - Denotes if next page of coupon is available - */ has_next?: boolean; - /** - * - Current page number - */ current?: number; - /** - * - Total pages of coupon availalbe - */ total?: number; - /** - * - Total coupons are available for the cart - */ total_item_count?: number; - /** - * - Denotes if previous page of the coupon - * is available - */ has_previous?: boolean; }; -/** @returns {GetCouponResult} */ -declare function GetCouponResult(): GetCouponResult; -type GetCouponResult = { - /** - * - List of available coupon which - * can be applied on cart - */ +/** @returns {GetCouponResponse} */ +declare function GetCouponResponse(): GetCouponResponse; +type GetCouponResponse = { available_coupon_list?: Coupon[]; page?: PageCoupon; }; -/** @returns {ApplyCouponDetails} */ -declare function ApplyCouponDetails(): ApplyCouponDetails; -type ApplyCouponDetails = { +/** @returns {ApplyCouponRequest} */ +declare function ApplyCouponRequest(): ApplyCouponRequest; +type ApplyCouponRequest = { /** * - Coupon code to be applied */ @@ -6612,391 +3696,127 @@ type ApplyCouponDetails = { /** @returns {GeoLocation} */ declare function GeoLocation(): GeoLocation; type GeoLocation = { - /** - * - Longitude coordinate for address - */ longitude?: number; - /** - * - Latitude coordinate for address - */ latitude?: number; }; /** @returns {PlatformAddress} */ declare function PlatformAddress(): PlatformAddress; type PlatformAddress = { - /** - * - Phone number for address - */ phone?: string; - /** - * - Id of the address - */ id?: string; - /** - * - Area code slug for address. example - * pincode is slug for India - */ area_code_slug?: string; - /** - * - Country code of address - */ country_code?: string; geo_location?: GeoLocation; - /** - * - Country of address - */ country?: string; - /** - * - State of the address - */ state?: string; - /** - * - Default address flag if no address - * selected then this should be the default address selected - */ is_default_address?: boolean; - /** - * - Tags of address from which it can be identified - */ tags?: string[]; - /** - * - Created by user id of address - */ created_by_user_id?: string; - /** - * - Landmark of address - */ landmark?: string; - /** - * - Email address for address data - */ email?: string; - /** - * - Area code of the address - */ area_code?: string; - /** - * - Checkout mode of address on which - * address to be used for which checkout mode of cart - */ checkout_mode?: string; - /** - * - Metadata of the address - */ meta?: any; - /** - * - States whether address is active or not - */ is_active?: boolean; - /** - * - Name of person in address data to whom it belongs to - */ name?: string; - /** - * - Google map point of the address - */ google_map_point?: any; - /** - * - The cart id of user cart - */ cart_id?: string; - /** - * - City of the address - */ city?: string; - /** - * - Sector of the address - */ sector?: string; /** * - State code for international address */ state_code?: string; - /** - * - Area description for address - */ area?: string; - /** - * - User id of address for which address is created - */ user_id?: string; - /** - * - Address type of address - */ address_type?: string; - /** - * - Address description for address data - */ address?: string; - /** - * - Country phone code for address - */ country_phone_code?: string; - /** - * - Country iso code for address - */ country_iso_code?: string; - /** - * - Custom json of the address - */ _custom_json?: any; }; -/** @returns {ValidationConfig} */ -declare function ValidationConfig(): ValidationConfig; -type ValidationConfig = { - /** - * - The maximum number of addresses a user can have. - */ - address_max_limit: number; - /** - * - The total number of addresses saved by a user. - */ - user_address_count: number; -}; -/** @returns {PlatformGetAddressesDetails} */ -declare function PlatformGetAddressesDetails(): PlatformGetAddressesDetails; -type PlatformGetAddressesDetails = { - /** - * - List of all address saved by customer - */ +/** @returns {PlatformGetAddressesResponse} */ +declare function PlatformGetAddressesResponse(): PlatformGetAddressesResponse; +type PlatformGetAddressesResponse = { address?: PlatformAddress[]; - validation_config?: ValidationConfig; }; -/** @returns {SaveAddressDetails} */ -declare function SaveAddressDetails(): SaveAddressDetails; -type SaveAddressDetails = { - /** - * - Id of the address - */ +/** @returns {SaveAddressResponse} */ +declare function SaveAddressResponse(): SaveAddressResponse; +type SaveAddressResponse = { id?: string; - /** - * - Success flag of save address Response - */ success?: boolean; - /** - * - Default address flag if no address - * selected then this should be the default address selected - */ is_default_address?: boolean; }; -/** @returns {UpdateAddressDetails} */ -declare function UpdateAddressDetails(): UpdateAddressDetails; -type UpdateAddressDetails = { - /** - * - ID of an address - */ +/** @returns {UpdateAddressResponse} */ +declare function UpdateAddressResponse(): UpdateAddressResponse; +type UpdateAddressResponse = { id?: string; - /** - * - Default address flag if no address - * selected then this should be the default address selected - */ is_default_address?: boolean; - /** - * - Success flag of update address response - */ success?: boolean; - /** - * - Updated flag for update address operation - * if the address updated or not - */ is_updated?: boolean; }; -/** @returns {DeleteAddressResult} */ -declare function DeleteAddressResult(): DeleteAddressResult; -type DeleteAddressResult = { - /** - * - Id of the address - */ +/** @returns {DeleteAddressResponse} */ +declare function DeleteAddressResponse(): DeleteAddressResponse; +type DeleteAddressResponse = { id?: string; - /** - * - Deleted flag in delete address response - * states whether the address was deleted or not - */ is_deleted?: boolean; }; -/** @returns {PlatformSelectCartAddress} */ -declare function PlatformSelectCartAddress(): PlatformSelectCartAddress; -type PlatformSelectCartAddress = { - /** - * - Cart id of the user cart for which the select - * address operation performed - */ +/** @returns {PlatformSelectCartAddressRequest} */ +declare function PlatformSelectCartAddressRequest(): PlatformSelectCartAddressRequest; +type PlatformSelectCartAddressRequest = { cart_id?: string; - /** - * - Billing address id selected by user - * on which shipment bill to be generated - */ billing_address_id?: string; - /** - * - The checkout mode in cart - */ checkout_mode?: string; - /** - * - Address is selected by user on which shipment to be delivered - */ id?: string; - /** - * - Unique Identifier of user - */ user_id?: string; }; /** @returns {ShipmentArticle} */ declare function ShipmentArticle(): ShipmentArticle; type ShipmentArticle = { - /** - * - Article meta data for shipment - */ meta?: string; - /** - * - Article quantity for shipment - */ quantity?: string; - /** - * - Article unique id for shipment - */ article_id?: string; }; -/** @returns {PlatformShipmentDetails} */ -declare function PlatformShipmentDetails(): PlatformShipmentDetails; -type PlatformShipmentDetails = { - /** - * - Count of shipments that will be shipped - */ +/** @returns {PlatformShipmentResponse} */ +declare function PlatformShipmentResponse(): PlatformShipmentResponse; +type PlatformShipmentResponse = { shipments?: number; - /** - * - Fulfilment id of the shipment - */ fulfillment_id?: number; - /** - * - Item details in the shipment - */ items?: CartProductInfo[]; - /** - * - Delivery partner options that are available - * to deliver the shipment - */ dp_options?: any; - /** - * - Shipment type of the shipment returned - * in get shipments API like single_shipment or multiple shipment. Single - * Shipment means 1 item in 1 shipment and vice versa in the other one - */ shipment_type?: string; - /** - * - Order type of the shipment like pickAtStore - * or HomeDelivery - */ order_type?: string; - /** - * - Box type of the shipment in which the - * shipment will be delivered - */ box_type?: string; promise?: ShipmentPromise; - /** - * - Delivery partner id of the shipment - */ dp_id?: string; - /** - * - Fulfilment type of shipment - */ fulfillment_type?: string; - /** - * - List of articles in shipment - */ articles?: ShipmentArticle[]; }; -/** @returns {PlatformCartShipmentsResult} */ -declare function PlatformCartShipmentsResult(): PlatformCartShipmentsResult; -type PlatformCartShipmentsResult = { - /** - * - Coupon text of coupon applied on cart - */ +/** @returns {PlatformCartShipmentsResponse} */ +declare function PlatformCartShipmentsResponse(): PlatformCartShipmentsResponse; +type PlatformCartShipmentsResponse = { coupon_text?: string; - /** - * - Cart id of the user cart - */ id?: string; - /** - * - Pan card config states at what condition - * user should enter the pan card - */ pan_config?: any; delivery_promise?: ShipmentPromise; - /** - * - Comment message added in cart - */ comment?: string; - /** - * - List of items in cart - */ items?: CartProductInfo[]; payment_selection_lock?: PaymentSelectionLock; - /** - * - Delivery charge in information - * message on shipment - */ delivery_charge_info?: string; - /** - * - Restrict checkout flag to restrict - * the checkout process - */ restrict_checkout?: boolean; - /** - * - Response message of get shipments API - */ message?: string; breakup_values?: CartBreakup; - /** - * - Staff employee user id if cart is - * created by staff employee for the customer - */ staff_user_id?: string; - /** - * - Cart validity flag determines the if the - * response is valid or not - */ is_valid?: boolean; - /** - * - List of shipments that - * will be shipped - */ - shipments?: PlatformShipmentDetails[]; + shipments?: PlatformShipmentResponse[]; currency?: CartCurrency; - /** - * - Checkout mode of cart - */ checkout_mode?: string; - /** - * - Last modified timestamp of cart - */ last_modified?: string; - /** - * - Buy now flag of user cart - */ buy_now?: boolean; - /** - * - GSTIN number added in cart - */ gstin?: string; - /** - * - List of applied - * promotions data to cart which includes promotion id, promotion name, offer - * text, description, buy rules, discount rules and promotion type - */ applied_promo_details?: AppliedPromotion[]; - /** - * - Error details if any error occurs which - * includes type of error, error code and error message - */ error?: boolean; - /** - * - Permanent Account Number of the user - */ pan_no?: string; - /** - * - Custom cart meta details added in cart - */ custom_cart_meta?: any; }; /** @returns {UpdateCartShipmentItem} */ @@ -7011,344 +3831,103 @@ type UpdateCartShipmentItem = { */ shipment_type: string; /** - * - Article unique id for shipment + * - Article mongo id */ article_uid: string; }; -/** @returns {UpdateCartShipmentCreation} */ -declare function UpdateCartShipmentCreation(): UpdateCartShipmentCreation; -type UpdateCartShipmentCreation = { - /** - * - List of Shipments which - * includes shipment data like shipment items, shipment promise, Shipment - * type, shipment order type, shipment dp options etc - */ +/** @returns {UpdateCartShipmentRequest} */ +declare function UpdateCartShipmentRequest(): UpdateCartShipmentRequest; +type UpdateCartShipmentRequest = { shipments: UpdateCartShipmentItem[]; }; -/** @returns {PlatformCartMetaCreation} */ -declare function PlatformCartMetaCreation(): PlatformCartMetaCreation; -type PlatformCartMetaCreation = { - /** - * - GSTIN number to be added in user cart - */ +/** @returns {PlatformCartMetaRequest} */ +declare function PlatformCartMetaRequest(): PlatformCartMetaRequest; +type PlatformCartMetaRequest = { gstin?: string; /** * - Customer contact details for * customer pickup at store */ pick_up_customer_details?: any; - /** - * - Checkout mode of user cart - */ checkout_mode?: string; - /** - * - Gift details is open json which can - * include gift message - */ gift_details?: any; - /** - * - Permanent Account Number of the user - */ pan_no?: string; - /** - * - Comment message to be added in user cart - */ comment?: string; /** * - Staff user id */ staff_user_id?: string; }; -/** @returns {CartMetaDetails} */ -declare function CartMetaDetails(): CartMetaDetails; -type CartMetaDetails = { - /** - * - Whether added meta was vaild - */ +/** @returns {CartMetaResponse} */ +declare function CartMetaResponse(): CartMetaResponse; +type CartMetaResponse = { is_valid?: boolean; - /** - * - Detailed message that used to display - */ message?: string; }; -/** @returns {CartMetaMissingDetails} */ -declare function CartMetaMissingDetails(): CartMetaMissingDetails; -type CartMetaMissingDetails = { - /** - * - Detailed errors for invalid cart meta request - */ +/** @returns {CartMetaMissingResponse} */ +declare function CartMetaMissingResponse(): CartMetaMissingResponse; +type CartMetaMissingResponse = { errors?: string[]; }; /** @returns {StaffCheckout} */ declare function StaffCheckout(): StaffCheckout; type StaffCheckout = { - /** - * - Employee code of staff who does checkout - * on behalf of customer - */ employee_code?: string; - /** - * - Id of staff who does checkout on behalf of customer - */ _id: string; - /** - * - User id of the employee who does checkout on behalf - * of customer - */ user: string; - /** - * - Last name of staff employee who does checkout - * on behalf of customer - */ last_name: string; - /** - * - First name of staff emplyee who does checkout - * on behalf of customer - */ first_name: string; }; /** @returns {CustomerDetails} */ declare function CustomerDetails(): CustomerDetails; type CustomerDetails = { - /** - * - Name of customer to be added in customer detail - * while checkout - */ name?: string; - /** - * - Email address of the customer to be added in - * customer detail while checkout - */ email?: string; - /** - * - Mobile number of customer to be added in customer - * detail while checkout - */ mobile: string; }; /** @returns {Files} */ declare function Files(): Files; type Files = { - /** - * - Key represents name of file - */ key: string; - /** - * - List of urls path - */ values: string[]; }; -/** @returns {CartCheckoutCustomMeta} */ -declare function CartCheckoutCustomMeta(): CartCheckoutCustomMeta; -type CartCheckoutCustomMeta = { - /** - * - Key name of custom meta - */ - key: string; - /** - * - Value to be added in key - */ - value: string; -}; -/** @returns {PlatformCartCheckoutDetailCreation} */ -declare function PlatformCartCheckoutDetailCreation(): PlatformCartCheckoutDetailCreation; -type PlatformCartCheckoutDetailCreation = { - custom_meta?: CartCheckoutCustomMeta[]; - address_id?: string; - payment_identifier?: string; - payment_params?: any; - payment_auto_confirm?: boolean; - id: string; - pos?: boolean; - billing_address_id?: string; - merchant_code?: string; - aggregator?: string; - pick_at_store_uid?: number; - device_id?: string; - delivery_address?: any; - payment_mode: string; - checkout_mode?: string; - /** - * - Customer details - */ - customer_details?: CustomerDetails; - meta?: any; - staff?: StaffCheckout; - employee_code?: string; - billing_address?: any; - callback_url?: string; - user_id?: string; - extra_meta?: any; - order_type: string; - /** - * - List of file url - */ - files?: Files[]; - ordering_store?: number; - payment_extra_identifiers?: any; - iin?: string; - network?: string; - type?: string; - card_id?: string; -}; /** @returns {CheckCart} */ declare function CheckCart(): CheckCart; type CheckCart = { - /** - * - Coupon text of the applied coupon on order placed - */ coupon_text?: string; - /** - * - Cash On Delivery message for the order placed - */ cod_message?: string; - /** - * - Cart id of the user cart - */ id?: string; - /** - * - Store code from which the order placed - */ store_code?: string; delivery_promise?: ShipmentPromise; - /** - * - Comment message added in cart after order placed - */ comment?: string; - /** - * - User type of the cart who places the order - */ user_type?: string; - /** - * - Items details in cart after order placed - */ items?: CartProductInfo[]; - /** - * - Error details if any error occurs which - * includes type of error, error code and error message - */ error_message?: string; - /** - * - Success flag of checkout cart API response - */ success?: boolean; payment_selection_lock?: PaymentSelectionLock; - /** - * - Delivery charge in information - * message on shipment - */ delivery_charge_info?: string; - /** - * - Restrict checkout flag to restrict - * the checkout process - */ restrict_checkout?: boolean; - /** - * - Order id generated after placing order - */ order_id?: string; - /** - * - Message of the cart checkout API response - */ message?: string; breakup_values?: CartBreakup; - /** - * - Cash On Delivery charges of the user cart - */ cod_charges?: number; - /** - * - Valid flag fotr the checkout response if - * order placed was valid - */ is_valid?: boolean; - /** - * - Cart id of user cart - */ uid?: string; - /** - * - Checkout mode of user cart - */ checkout_mode?: string; currency?: CartCurrency; - /** - * - Last modified timestamp of cart - */ last_modified?: string; - /** - * - Buy now flag of user cart - */ buy_now?: boolean; - /** - * - Delivery charge order value - */ delivery_charge_order_value?: number; - /** - * - Cart id of the user cart for which the order placed - */ cart_id?: number; - /** - * - Store employees data - */ store_emps?: any[]; - /** - * - GSTIN number added in cart - */ gstin?: string; - /** - * - Whether Cash On Delivery available - */ cod_available?: boolean; - /** - * - Delivery charges of the order placed - * via checkout API - */ delivery_charges?: number; - /** - * - Custom meta details added cart - * checkout API payload - */ custom_cart_meta?: any; }; -/** @returns {CartCheckoutDetails} */ -declare function CartCheckoutDetails(): CartCheckoutDetails; -type CartCheckoutDetails = { - /** - * - App intercept url which is used to - * redirect on app after payment in confirmed/failed - */ - app_intercept_url?: string; - /** - * - Data of the user cart checkout includes cart - * data, address, user id, order type etc - */ - data?: any; - cart?: CheckCart; - /** - * - Success flag of cart checkout API response - */ - success?: boolean; - /** - * - Callback url to be redirected after - * payment received/failed - */ - callback_url?: string; - /** - * - Payment confirm url used to - * redirect after payment is confirmed - */ - payment_confirm_url?: string; - /** - * - Order id generated after placing order - */ - order_id?: string; - /** - * - Message of the cart checkout v2 API response - */ - message?: string; -}; -/** @returns {CartCheckoutResult} */ -declare function CartCheckoutResult(): CartCheckoutResult; -type CartCheckoutResult = { +/** @returns {CartCheckoutResponse} */ +declare function CartCheckoutResponse(): CartCheckoutResponse; +type CartCheckoutResponse = { app_intercept_url?: string; data?: any; cart?: CheckCart; @@ -7358,9 +3937,9 @@ type CartCheckoutResult = { order_id?: string; message?: string; }; -/** @returns {CartDeliveryModesDetails} */ -declare function CartDeliveryModesDetails(): CartDeliveryModesDetails; -type CartDeliveryModesDetails = { +/** @returns {CartDeliveryModesResponse} */ +declare function CartDeliveryModesResponse(): CartDeliveryModesResponse; +type CartDeliveryModesResponse = { /** * - Store pick up available store uids */ @@ -7373,396 +3952,130 @@ type CartDeliveryModesDetails = { /** @returns {PickupStoreDetail} */ declare function PickupStoreDetail(): PickupStoreDetail; type PickupStoreDetail = { - /** - * - Country of address - */ country?: string; - /** - * - State of the address - */ state?: string; - /** - * - City of the address - */ city?: string; - /** - * - Phone number for address - */ phone?: string; - /** - * - Area code of the address - */ area_code?: string; - /** - * - Uid of the address - */ uid?: number; - /** - * - Area code slug for address. example - * pincode is slug for India - */ area_code_slug?: string; - /** - * - Address type of address - */ address_type?: string; - /** - * - Area description for address - */ area?: string; - /** - * - Id of the address - */ id?: number; - /** - * - Name of store manager - */ store_manager_name?: string; - /** - * - Name of person in address data to whom it belongs to - */ name?: string; - /** - * - Store code from which the order placed - */ store_code?: string; - /** - * - Landmark of address - */ landmark?: string; - /** - * - Email address for address data - */ email?: string; - /** - * - Address pincode - */ pincode?: number; - /** - * - Address description for address data - */ address?: string; }; -/** @returns {StoreDetails} */ -declare function StoreDetails(): StoreDetails; -type StoreDetails = { - /** - * - List of items need to pickup from store - */ +/** @returns {StoreDetailsResponse} */ +declare function StoreDetailsResponse(): StoreDetailsResponse; +type StoreDetailsResponse = { items?: PickupStoreDetail[]; }; -/** @returns {CartPaymentUpdate} */ -declare function CartPaymentUpdate(): CartPaymentUpdate; -type CartPaymentUpdate = { - /** - * - Address id of the user on which the order - * to be delivered - */ +/** @returns {UpdateCartPaymentRequest} */ +declare function UpdateCartPaymentRequest(): UpdateCartPaymentRequest; +type UpdateCartPaymentRequest = { address_id?: string; - /** - * - Payment mode from which the payment to be - * done for the order - */ payment_mode?: string; - /** - * - Aggregator name of the payment gateway - */ aggregator_name?: string; - /** - * - Merchant code of the payment mode - * selected to do the payment - */ merchant_code?: string; - /** - * - Payment identifier of the payment - * mode selected to do the payment - */ payment_identifier?: string; - /** - * - Cart id of the user cart - */ id?: string; }; /** @returns {CouponValidity} */ declare function CouponValidity(): CouponValidity; type CouponValidity = { - /** - * - Coupon Title of the coupon applied - */ title?: string; - /** - * - Flag for coupon validation - * required on next page or not - */ next_validation_required?: boolean; - /** - * - Valid flag which denotes if the applied coupon - * is valid or not - */ valid?: boolean; - /** - * - Display message for coupon validity - */ display_message_en?: string; - /** - * - Coupon code of the coupon applied - */ code?: string; - /** - * - Coupon discount value of the coupon applied - */ discount?: number; - /** - * - Error message for the selected payment mode. - */ - error_en?: string; }; /** @returns {PaymentCouponValidate} */ declare function PaymentCouponValidate(): PaymentCouponValidate; type PaymentCouponValidate = { - /** - * - Success flag of coupon payment mode validity API response - */ success: boolean; - /** - * - Payment mode valid message for coupon - */ message?: string; coupon_validity?: CouponValidity; }; /** @returns {PaymentMeta} */ declare function PaymentMeta(): PaymentMeta; type PaymentMeta = { - /** - * - Payment gateway used to do the payment - */ payment_gateway?: string; - /** - * - Type of card if payment mode is card to do the payment - */ type?: string; - /** - * - Payment identifier of the payment - * mode selected to do the payment - */ payment_identifier?: string; - /** - * - Merchant code of the payment mode - * selected to do the payment - */ merchant_code?: string; }; /** @returns {PaymentMethod} */ declare function PaymentMethod(): PaymentMethod; type PaymentMethod = { - /** - * - Payment mode of payment method used to make payment - */ mode: string; - /** - * - Payment name of payment method used to make payment - */ payment?: string; payment_meta: PaymentMeta; - /** - * - Amount of the payment mode to be paid - */ amount?: number; - /** - * - Name of the payment mode used to make payment - */ name?: string; - /** - * - Payment extra identifier for - * the payment mode to do the payment - */ payment_extra_identifiers?: any; }; -/** @returns {PlatformCartCheckoutDetailV2Creation} */ -declare function PlatformCartCheckoutDetailV2Creation(): PlatformCartCheckoutDetailV2Creation; -type PlatformCartCheckoutDetailV2Creation = { - /** - * - Address id of the user on which the order - * to be delivered - */ +/** @returns {PlatformCartCheckoutDetailV2Request} */ +declare function PlatformCartCheckoutDetailV2Request(): PlatformCartCheckoutDetailV2Request; +type PlatformCartCheckoutDetailV2Request = { address_id?: string; - /** - * - Payment identifier of the payment - * mode selected to do the payment - */ payment_identifier?: string; - /** - * - Payment params which includes payment - * identifier and merchant code - */ payment_params?: any; - /** - * - Custom meta data to be - * added in order - */ - custom_meta?: CartCheckoutCustomMeta[]; - /** - * - Payment auto confirm flag if - * payment need not to be collected from user - */ + custom_meta?: any; payment_auto_confirm?: boolean; - /** - * - Cart id of the user cart - */ id: string; - /** - * - Filed to determine whether user is making request - * from pos or not - */ pos?: boolean; - /** - * - Billing address id of the customer - * on which the invoice to be generated after the order is placed - */ billing_address_id?: string; - /** - * - Merchant code of the payment mode - * selected to do the payment - */ merchant_code?: string; - /** - * - Aggregator name of the payment gateway - */ aggregator?: string; - /** - * - Store id where we have to pick product - */ pick_at_store_uid?: number; - /** - * - Device id - */ device_id?: string; - /** - * - Delivery address data which includes - * customer address, customer phone, customer email, customer pincode, - * customer landmark and customer name - */ delivery_address?: any; - /** - * - Payment mode from which the payment to be - * done for the order - */ payment_mode?: string; - /** - * - Mode of checkout used in cart - */ checkout_mode?: string; - customer_details?: CustomerDetails; /** - * - Meta data to be added in order + * - Customer details */ + customer_details?: any; meta?: any; - /** - * - Payment methods list used to - * make the payment - */ payment_methods: PaymentMethod[]; staff?: StaffCheckout; - /** - * - Employee code of staff who does checkout - * on behalf of customer - */ employee_code?: string; - /** - * - Billing address json which includes - * customer address, customer phone, customer email, customer pincode, - * customer landmark and customer name - */ billing_address?: any; - /** - * - Callback url after payment received/failed - */ callback_url?: string; - /** - * - The user id of user cart - */ user_id: string; - /** - * - Extra meta to be added while checkout in order - */ extra_meta?: any; - /** - * - Order type of the order being placed like - * pickAtStore or HomeDelivery - */ order_type: string; /** * - List of file url */ files?: Files[]; - /** - * - Ordering store id of the store from - * which the order is getting placed - */ ordering_store?: number; - /** - * - Issuer Identification Number number of card if - * payment mode is card to do the payment - */ iin?: string; - /** - * - Network of card if payment mode is card to do - * the payment - */ network?: string; - /** - * - Type of cart if payment mode is card to do the payment - */ type?: string; - /** - * - Saved card id if payment mode is card to do the payment - */ card_id?: string; }; /** @returns {UpdateCartPaymentRequestV2} */ declare function UpdateCartPaymentRequestV2(): UpdateCartPaymentRequestV2; type UpdateCartPaymentRequestV2 = { - /** - * - Address id of the user address selected to - * deliver the shipment - */ address_id?: string; - /** - * - Payment mode of the payment selected to - * do the payment - */ payment_mode?: string; - /** - * - Aggregator name of the payment gateway - */ aggregator_name?: string; - /** - * - Merchant code of the payment mode - * selected to do the payment - */ merchant_code?: string; - /** - * - Payment identifier of the payment - * mode selected to do the payment - */ payment_identifier?: string; - /** - * - Cart id of the user cart for which the update cart - * payment operation performed - */ id?: string; payment_methods?: PaymentMethod[]; }; /** @returns {PriceMinMax} */ declare function PriceMinMax(): PriceMinMax; type PriceMinMax = { - /** - * - Min price of article added in user cart - */ min?: number; - /** - * - Max price of article added in user cart - */ max?: number; }; /** @returns {ItemPriceDetails} */ @@ -7770,56 +4083,30 @@ declare function ItemPriceDetails(): ItemPriceDetails; type ItemPriceDetails = { marked?: PriceMinMax; effective?: PriceMinMax; - /** - * - The currency code for price - */ currency?: string; }; -/** @returns {ArticlePriceDetails} */ -declare function ArticlePriceDetails(): ArticlePriceDetails; -type ArticlePriceDetails = { - /** - * - The Marked Price refers to the initial price of - * the free gift article before product discount. - */ - marked?: number; - /** - * - The Effective Price refers to the final - * amount of the free gift article after applying the product discount. - */ - effective?: number; -}; /** @returns {FreeGiftItems} */ declare function FreeGiftItems(): FreeGiftItems; type FreeGiftItems = { /** - * - Free gift product slug + * - Item slug */ item_slug?: string; /** - * - Free gift product name + * - Item name */ item_name?: string; item_price_details?: ItemPriceDetails; - article_price?: ArticlePriceDetails; /** - * - Free gift product brand name + * - Item brand name */ item_brand_name?: string; /** - * - Free gift product id + * - Item id */ item_id?: number; /** - * - Available sizes for the free gift item. - */ - available_sizes?: string[]; - /** - * - Selected size for the free gift item. - */ - size?: string; - /** - * - List of free gift product images URL + * - Item images URL */ item_images_url?: string[]; }; @@ -7827,7 +4114,7 @@ type FreeGiftItems = { declare function PromotionOffer(): PromotionOffer; type PromotionOffer = { /** - * - Promotion unique identifier + * - Promotion id */ id?: string; /** @@ -7835,12 +4122,11 @@ type PromotionOffer = { */ buy_rules?: any; /** - * - Offer title of promotion that used to display + * - Offer title */ offer_text?: string; /** - * - Type of Promotion like percentage, - * amount, bogo etc. + * - Promotion type */ promotion_type?: string; /** @@ -7867,26 +4153,17 @@ type PromotionOffer = { * - Offer details including T&C */ description?: string; - /** - * - Indicates whether the promotion is - * associated with a bank offer. - */ - is_bank_offer?: boolean; }; -/** @returns {PromotionOffersDetails} */ -declare function PromotionOffersDetails(): PromotionOffersDetails; -type PromotionOffersDetails = { - /** - * - List of available - * promotion for product - */ +/** @returns {PromotionOffersResponse} */ +declare function PromotionOffersResponse(): PromotionOffersResponse; +type PromotionOffersResponse = { available_promotions?: PromotionOffer[]; }; /** @returns {PromotionPaymentOffer} */ declare function PromotionPaymentOffer(): PromotionPaymentOffer; type PromotionPaymentOffer = { /** - * - Application id of the sales channel + * - Application id */ application_id?: string; /** @@ -7906,11 +4183,11 @@ type PromotionPaymentOffer = { */ discount_rules?: any[]; /** - * - Promotion unique identifier + * - Promotion id */ id?: string; /** - * - Offer title of promotion that used to display + * - Offer title */ offer_text?: string; /** @@ -7918,8 +4195,7 @@ type PromotionPaymentOffer = { */ promotion_group?: string; /** - * - Type of Promotion like bogo, amount, - * percentage etc. + * - Promotion type */ promotion_type?: string; /** @@ -7927,24 +4203,9 @@ type PromotionPaymentOffer = { */ promotion_name?: string; }; -/** @returns {PromotionPaymentOffersDetails} */ -declare function PromotionPaymentOffersDetails(): PromotionPaymentOffersDetails; -type PromotionPaymentOffersDetails = { - /** - * - Indicates if operation is successful or not. - */ +/** @returns {PromotionPaymentOffersResponse} */ +declare function PromotionPaymentOffersResponse(): PromotionPaymentOffersResponse; +type PromotionPaymentOffersResponse = { success?: boolean; promotions?: PromotionPaymentOffer[]; }; -/** @returns {ValidationError} */ -declare function ValidationError(): ValidationError; -type ValidationError = { - /** - * - A brief description of the error encountered. - */ - message: string; - /** - * - The field in the request that caused the error. - */ - field: string; -}; diff --git a/sdk/platform/Cart/CartPlatformModel.js b/sdk/platform/Cart/CartPlatformModel.js index d7ac56bcc..5baefc895 100644 --- a/sdk/platform/Cart/CartPlatformModel.js +++ b/sdk/platform/Cart/CartPlatformModel.js @@ -2,74 +2,65 @@ const Joi = require("joi"); /** * @typedef CouponDateMeta - * @property {string} [modified_on] - Date time format when the coupon last modified - * @property {string} [created_on] - Date time format when the coupon created - * @property {string} [approved_on] - Date time format when the coupon approved - * @property {string} [rejected_on] - Date time format when the coupon rejected - * @property {string} [reviewed_on] - Date time format when the coupon reviewed + * @property {string} [modified_on] + * @property {string} [created_on] */ /** * @typedef Ownership - * @property {string} payable_category - Coupon amount payable category - * @property {string} [payable_by] - Coupon amount bearable party + * @property {string} payable_category + * @property {string} payable_by */ /** * @typedef CouponAuthor - * @property {string} [created_by] - The user id of user, who has created the coupon - * @property {string} [modified_by] - The user id of user, who has modified the coupon - * @property {string} [approved_by] - The user id of user, who has approved the coupon - * @property {string} [rejected_by] - The user id of user, who has rejected the coupon - * @property {string} [reviewed_by] - The user id of user, who has reviewed the coupon + * @property {string} [created_by] + * @property {string} [modified_by] */ /** * @typedef State - * @property {boolean} [is_archived] - Publish or unpublish the coupon - * @property {boolean} [is_display] - Coupon needs to display or not - * @property {boolean} [is_public] - Coupon is publicaly available or not + * @property {boolean} [is_archived] + * @property {boolean} [is_display] + * @property {boolean} [is_public] */ /** * @typedef PaymentAllowValue - * @property {number} [max] - Maximum value need to allow for payment + * @property {number} [max] */ /** * @typedef PaymentModes - * @property {string[]} [codes] - Identifier used by payment gateway for a given - * payment mode, e.g. NB_ICIC, PAYTM - * @property {string[]} [iins] - Debit/Credit card prefix (first 6 digit) - * @property {string[]} [types] - Card type, e.g. Credit, Debit - * @property {string[]} [networks] - Credit/Debit card issuer, e.g. VISA, - * MASTERCARD, RUPAY + * @property {string[]} [codes] + * @property {string[]} [iins] + * @property {string[]} [types] + * @property {string[]} [networks] * @property {PaymentAllowValue} [uses] */ /** * @typedef PriceRange - * @property {number} [max] - Max price valid for article in coupon - * @property {number} [min] - Min price valid for article in coupon + * @property {number} [max] + * @property {number} [min] */ /** * @typedef PostOrder - * @property {boolean} [cancellation_allowed] - Cancellation allowed in coupon - * @property {boolean} [return_allowed] - Return allowed in coupon + * @property {boolean} [cancellation_allowed] + * @property {boolean} [return_allowed] */ /** * @typedef BulkBundleRestriction - * @property {boolean} multi_store_allowed - Multi store allowed in bulk bundle - * coupon or not + * @property {boolean} multi_store_allowed */ /** * @typedef UsesRemaining - * @property {number} [user] - Define total coupon count per user - * @property {number} [total] - Define total coupon counts - * @property {number} [app] - Define coupon counts associated with application id + * @property {number} [user] + * @property {number} [total] + * @property {number} [app] */ /** @@ -80,129 +71,115 @@ const Joi = require("joi"); /** * @typedef Restrictions - * @property {PaymentModes} [payments] + * @property {Object} [payments] * @property {string} [user_type] * @property {PriceRange} [price_range] - * @property {string[]} [platforms] - List of platform on which coupon allowed - * like web, android + * @property {string[]} [platforms] * @property {PostOrder} [post_order] * @property {BulkBundleRestriction} [bulk_bundle] - * @property {number[]} [user_groups] - List of user group on which coupon allowed - * @property {boolean} [coupon_allowed] - Allow applying normal coupon if bulk - * coupon is applied + * @property {number[]} [user_groups] + * @property {boolean} [coupon_allowed] * @property {UsesRestriction} [uses] - * @property {number[]} [ordering_stores] - List of store id on which coupon allowed + * @property {number[]} [ordering_stores] */ /** * @typedef Validation - * @property {string[]} [app_id] - List of sales channel's application id - * @property {boolean} [anonymous] - Coupon applicable for guest user or not - * @property {string} [user_registered_after] - Coupon applicable for user which - * is registered after Date Format + * @property {string[]} [app_id] + * @property {boolean} [anonymous] + * @property {string} [user_registered_after] */ /** * @typedef CouponAction - * @property {string} [action_date] - Coupon transaction mode's date time format - * @property {string} [txn_mode] - Coupon transaction mode like cash, coupon etc + * @property {string} [action_date] + * @property {string} [txn_mode] */ /** * @typedef CouponSchedule - * @property {string} [end] - The end date of coupon - * @property {string} [start] - The start date of coupon - * @property {Object[]} [next_schedule] - List of date time, which we will - * schedule the promotion - * @property {string} [cron] - Schedule the cron to run your job periodically - * @property {string} [status] - Coupon status like draft, review - * @property {number} [duration] - Time in minutes for execution + * @property {string} [end] + * @property {string} [start] + * @property {Object[]} [next_schedule] + * @property {string} [cron] + * @property {number} [duration] */ /** * @typedef Rule - * @property {number} [key] - Key defines the number of product should be buy - * for applicability of cart - * @property {number} [value] - Value defines discount percentage in coupon - * @property {number} [max] - Max defines maximum number of discount amount in coupon - * @property {number} [discount_qty] - Discount_qty defines free quantity as - * discount in coupon - * @property {number} [min] - Min defines minimum number of discount amount in coupon + * @property {number} [key] + * @property {number} [value] + * @property {number} [max] + * @property {number} [discount_qty] + * @property {number} [min] */ /** * @typedef DisplayMetaDict - * @property {string} [title] - Coupon title which is used to display - * @property {string} [subtitle] - Coupon sub title which is used to display + * @property {string} [title] + * @property {string} [subtitle] */ /** * @typedef DisplayMeta - * @property {string} [title] - Coupon title which is used to display + * @property {string} [title] * @property {DisplayMetaDict} [auto] * @property {DisplayMetaDict} [apply] * @property {DisplayMetaDict} [remove] - * @property {string} [subtitle] - Coupon sub title which is used to display - * @property {string} [description] - Detail about the offers in coupon + * @property {string} [subtitle] + * @property {string} [description] */ /** * @typedef Identifier - * @property {number[]} [brand_id] - List of brand id available for coupon - * @property {string[]} [email_domain] - List of email domain available for coupon - * @property {number[]} [company_id] - List of company id available for coupon - * @property {number[]} [store_id] - List of store id available for coupon - * @property {string[]} [collection_id] - List of collection id available for coupon - * @property {number[]} [item_id] - List of item id available for coupon - * @property {string[]} [user_id] - List of user id available for coupon - * @property {number[]} [category_id] - List of category id available for coupon - * @property {string[]} [article_id] - List of article id available for coupon - * @property {number[]} [exclude_brand_id] - List of brand id should not be - * available for coupon + * @property {number[]} [brand_id] + * @property {string[]} [email_domain] + * @property {number[]} [company_id] + * @property {number[]} [store_id] + * @property {string[]} [collection_id] + * @property {number[]} [item_id] + * @property {string[]} [user_id] + * @property {number[]} [category_id] + * @property {string[]} [article_id] + * @property {number[]} [exclude_brand_id] */ /** * @typedef Validity - * @property {number} [priority] - Priority of coupon to show in list + * @property {number} [priority] */ /** * @typedef RuleDefinition - * @property {string} [currency_code] - Currency code like INR - * @property {boolean} [auto_apply] - Coupon should be auto apply or not - * @property {string} [type] - Type of coupon like absolute, percentage etc. - * @property {boolean} [is_exact] - Flag is true then use coupon applicable - * articles for calculation - * @property {string} [applicable_on] - Coupon will be applicable on either - * amount or quantity - * @property {string} [calculate_on] - Article Price on which coupon calculated - * like effective price or marked price - * @property {string} [value_type] - Define the type of coupon value - * @property {string[]} [scope] - List of item level rule applicable for coupon + * @property {string} [currency_code] + * @property {boolean} [auto_apply] + * @property {string} type + * @property {boolean} [is_exact] + * @property {string} applicable_on + * @property {string} calculate_on + * @property {string} value_type + * @property {string[]} [scope] */ /** * @typedef CouponAdd * @property {CouponDateMeta} [date_meta] - * @property {Ownership} [ownership] + * @property {Ownership} ownership * @property {CouponAuthor} [author] * @property {State} [state] * @property {Restrictions} [restrictions] * @property {Validation} [validation] * @property {CouponAction} [action] - * @property {string} [coupon_type] - The type of coupon like bulk or single - * @property {string} [coupon_prefix] - Bulk coupon code prefix string - * @property {number} [coupon_counts] - Counts of bulk coupon - * @property {string[]} [tags] - List of tags specify to platform + * @property {string[]} [tags] * @property {CouponSchedule} [_schedule] - * @property {Rule[]} [rule] - * @property {DisplayMeta} [display_meta] - * @property {string} code - Unique code of coupon - * @property {string} type_slug - The type slug of coupon discount - * @property {Identifier} [identifiers] - * @property {Validity} [validity] - * @property {RuleDefinition} [rule_definition] - * @property {string} [_id] - Unique identifier of coupon + * @property {Rule[]} rule + * @property {DisplayMeta} display_meta + * @property {string} code + * @property {string} type_slug + * @property {Identifier} identifiers + * @property {Validity} validity + * @property {RuleDefinition} rule_definition + * @property {string} [_id] - Coupon id */ /** @@ -217,46 +194,42 @@ const Joi = require("joi"); */ /** - * @typedef CouponsResult - * @property {CouponAdd[]} [items] - Coupons list for sales channel + * @typedef CouponsResponse + * @property {CouponAdd[]} [items] * @property {Page} [page] */ /** * @typedef SuccessMessage - * @property {boolean} [success] - Whether the request was successful (true/false). - * @property {string} [message] - Response message needs to display + * @property {boolean} [success] + * @property {string} [message] */ /** - * @typedef OperationErrorResult - * @property {boolean} [success] - Whether the request was successful (true/false). - * @property {string} [message] - Response message needs to display - * @property {string} [error] - Response error message in detail + * @typedef OperationErrorResponse + * @property {boolean} [success] + * @property {string} [message] + * @property {string} [error] */ /** * @typedef CouponUpdate * @property {CouponDateMeta} [date_meta] - * @property {Ownership} [ownership] + * @property {Ownership} ownership * @property {CouponAuthor} [author] * @property {State} [state] * @property {Restrictions} [restrictions] * @property {Validation} [validation] * @property {CouponAction} [action] - * @property {string[]} [tags] - List of tags specify to platform + * @property {string[]} [tags] * @property {CouponSchedule} [_schedule] - * @property {Rule[]} [rule] - * @property {DisplayMeta} [display_meta] - * @property {string} code - Unique code that is used to apply coupon - * @property {string} [coupon_type] - The type of coupon like bulk or single - * @property {string} [coupon_prefix] - Bulk coupon code prefix string - * @property {number} [coupon_counts] - Counts of culk coupon - * @property {string} [reason] - Coupon rejection reason added by reviewer - * @property {string} type_slug - The type slug of coupon discount - * @property {Identifier} [identifiers] - * @property {Validity} [validity] - * @property {RuleDefinition} [rule_definition] + * @property {Rule[]} rule + * @property {DisplayMeta} display_meta + * @property {string} code + * @property {string} type_slug + * @property {Identifier} identifiers + * @property {Validity} validity + * @property {RuleDefinition} rule_definition */ /** @@ -265,149 +238,110 @@ const Joi = require("joi"); * @property {CouponSchedule} [schedule] */ -/** - * @typedef CouponCreateResult - * @property {boolean} [success] - Whether the request was successful (true/false) - * @property {string} [message] - Create coupon response message that can shown - * to creator user - * @property {string} [_id] - Unique identifier for coupon created - */ - /** * @typedef DisplayMeta1 - * @property {string} [description] - Define details about the offer in promotion - * @property {string} [offer_label] - Offer label of promotion that needs to display - * @property {string} [name] - Name of promotion that needs to display - * @property {string} [offer_text] - Promotion offer text used to display + * @property {string} [description] + * @property {string} [offer_label] + * @property {string} [name] + * @property {string} [offer_text] */ /** * @typedef Ownership1 - * @property {string} [payable_category] - Promotion amount payable category - * @property {string} [payable_by] - Promotion amount bearable party + * @property {string} payable_category + * @property {string} payable_by */ /** * @typedef CompareObject - * @property {number} [equals] - Nummeric value must be equal to cart level rules - * @property {number} [greater_than] - Nummeric value must be greater than cart - * level rules - * @property {number} [less_than_equals] - Nummeric value must be less than or - * equal to cart level rules - * @property {number} [less_than] - Nummeric value must be less than cart level rules - * @property {number} [greater_than_equals] - Nummeric value must be greater - * than or equal to cart level rules - */ - -/** - * @typedef ItemSizeMapping - * @property {Object} [item_size_mapping] - Item size mapping in promotion + * @property {number} [equals] + * @property {number} [greater_than] + * @property {number} [less_than_equals] + * @property {number} [less_than] + * @property {number} [greater_than_equals] */ /** * @typedef ItemCriteria * @property {CompareObject} [cart_quantity] - * @property {string[]} [available_zones] - List of all zones on which promotion - * is applicable - * @property {number[]} [item_exclude_company] - List of all company id on which - * promotion is not applicable - * @property {number[]} [item_id] - List of all item ids on which promotion is applicable - * @property {number[]} [item_l1_category] - List of all L1 category on which - * promotion is applicable + * @property {string[]} [available_zones] + * @property {number[]} [item_exclude_company] + * @property {number[]} [item_id] + * @property {number[]} [item_l1_category] * @property {CompareObject} [cart_total] * @property {CompareObject} [cart_unique_item_quantity] * @property {CompareObject} [cart_unique_item_amount] - * @property {number[]} [item_exclude_id] - List of all item ids on which - * promotion is not applicable - * @property {boolean} [all_items] - Boolean flag set true to applicable the - * promotion for all products - * @property {number[]} [item_exclude_l1_category] - List of all item ids on - * which promotion is not applicable - * @property {string[]} [item_size] - List of all item sizes on which promotion - * is applicable - * @property {number[]} [item_store] - List of all item store ids on which - * promotion is applicable - * @property {string[]} [item_exclude_sku] - List of all item sku on which - * promotion is not applicable - * @property {number[]} [item_department] - List of all departments ids on which - * promotion is applicable - * @property {number[]} [item_exclude_store] - List of all item store ids on - * which promotion is not applicable - * @property {number[]} [item_brand] - List of all brand ids on which promotion - * is applicable - * @property {number[]} [item_exclude_department] - List of all department ids - * on which promotion is not applicable - * @property {number[]} [item_exclude_category] - List of all L3 category on - * which promotion is not applicable - * @property {number[]} [item_category] - List of all L3 category on which - * promotion is applicable + * @property {number[]} [item_exclude_id] + * @property {boolean} [all_items] + * @property {number[]} [item_exclude_l1_category] + * @property {string[]} [item_size] + * @property {number[]} [item_store] + * @property {string[]} [item_exclude_sku] + * @property {number[]} [item_department] + * @property {number[]} [item_exclude_store] + * @property {number[]} [item_brand] + * @property {number[]} [item_exclude_department] + * @property {number[]} [item_exclude_category] + * @property {number[]} [item_category] * @property {string[]} [buy_rules] - * @property {number[]} [item_exclude_brand] - List of all brand ids on which - * promotion is not applicable - * @property {number[]} [item_l2_category] - List of all L2 category on which - * promotion is applicable - * @property {number[]} [item_company] - List of all company ids on which - * promotion is applicable - * @property {string[]} [item_tags] - List of all product tags on which - * promotion is applicable - * @property {number[]} [item_exclude_l2_category] - List of all L2 category on - * which promotion is not applicable - * @property {string[]} [item_sku] - List of all item sku on which promotion is applicable + * @property {number[]} [item_exclude_brand] + * @property {number[]} [item_l2_category] + * @property {number[]} [item_company] + * @property {string[]} [item_tags] + * @property {number[]} [item_exclude_l2_category] + * @property {string[]} [item_sku] */ /** * @typedef DiscountOffer - * @property {number} [max_discount_amount] - Maximum discount amount in promotion - * @property {number} [discount_price] - Discount price in promotion - * @property {boolean} [apportion_discount] - Flag to distribute discount for each article - * @property {boolean} [partial_can_ret] - Flag indicated return the product partially - * @property {number} [max_usage_per_transaction] - Maximum usage per - * transaction in promotion - * @property {number} [min_offer_quantity] - Minimum quantity of offer in promotion - * @property {string} [code] - Unique code of promotion - * @property {number} [discount_amount] - Discount amount in promotion - * @property {number} [discount_percentage] - Discount percentage in promotion - * @property {number} [max_offer_quantity] - Maximum quantity of product in promotion + * @property {number} [max_discount_amount] + * @property {number} [discount_price] + * @property {boolean} [apportion_discount] + * @property {boolean} [partial_can_ret] + * @property {number} [max_usage_per_transaction] + * @property {number} [min_offer_quantity] + * @property {string} [code] + * @property {number} [discount_amount] + * @property {number} [discount_percentage] + * @property {number} [max_offer_quantity] */ /** * @typedef DiscountRule - * @property {string} discount_type - The type of discount in promotion - * @property {string} buy_condition - Promotion buy rules in offer level + * @property {string} discount_type + * @property {string} buy_condition * @property {ItemCriteria} item_criteria - * @property {ItemSizeMapping} [meta] * @property {DiscountOffer} offer */ /** * @typedef PaymentAllowValue1 - * @property {number} [max] - Maximum value need to allow for payment in promotion + * @property {number} [max] */ /** * @typedef PromotionPaymentModes - * @property {string} [type] - Define the type of payment + * @property {string} type * @property {PaymentAllowValue1} [uses] - * @property {string[]} [codes] - List of codes associated with payment options + * @property {string[]} [codes] */ /** * @typedef UserRegistered - * @property {string} [end] - End date time format till the user is registerd - * @property {string} [start] - Start date time format when user is registerd + * @property {string} [end] + * @property {string} [start] */ /** * @typedef PostOrder1 - * @property {boolean} [cancellation_allowed] - Cancellation allowed in - * promotion after order - * @property {boolean} [return_allowed] - Return allowed in promotion after order + * @property {boolean} [cancellation_allowed] + * @property {boolean} [return_allowed] */ /** * @typedef UsesRemaining1 - * @property {number} [user] - Define total promotion count per user - * @property {number} [total] - Define total promotions count + * @property {number} [user] + * @property {number} [total] */ /** @@ -418,75 +352,62 @@ const Joi = require("joi"); /** * @typedef Restrictions1 - * @property {PaymentModes} [payments] + * @property {Object} [payments] * @property {UserRegistered} [user_registered] - * @property {string[]} [platforms] - List of platform on which promotion is - * applicable like android, ios + * @property {string[]} [platforms] * @property {PostOrder1} [post_order] - * @property {number[]} [user_groups] - List of user groups on which promotion - * is applicable - * @property {number} [order_quantity] - Prmomotion max order count - * @property {boolean} [anonymous_users] - Set true, if promotion is applicable - * for guest user - * @property {string[]} [user_id] - List of user id on which promotion is applicable - * @property {UsesRestriction1} [uses] - * @property {number[]} [ordering_stores] - List of store id on which promotion - * is applicable + * @property {number[]} [user_groups] + * @property {number} [order_quantity] + * @property {boolean} [anonymous_users] + * @property {string[]} [user_id] + * @property {UsesRestriction1} uses + * @property {number[]} [ordering_stores] */ /** * @typedef PromotionSchedule - * @property {string} [end] - Then end date of promotion till valid - * @property {string} [start] - Then start date of promotion is valid - * @property {string} [status] - Promotion status like draft, review - * @property {boolean} [published] - The status of promotion is published or not - * @property {Object[]} [next_schedule] - List of date time, which we will - * schedule the promotion - * @property {string} [cron] - Schedule the cron to run your job periodically - * @property {number} [duration] - Time in minutes for execution + * @property {string} end + * @property {string} start + * @property {boolean} published + * @property {Object[]} [next_schedule] + * @property {string} [cron] + * @property {number} [duration] */ /** * @typedef PromotionAction - * @property {string} [action_date] - Date time format in promotion - * @property {string} [action_type] - The action type of promotion + * @property {string} action_date + * @property {string} action_type */ /** * @typedef PromotionAuthor - * @property {string} [created_by] - The user id of user, who has created the promotion - * @property {string} [modified_by] - The user id of user, who has modified the promotion - * @property {string} [approved_by] - The user id of user, who has approved the promotion - * @property {string} [rejected_by] - The user id of user, who has rejected the promotion - * @property {string} [reviewed_by] - The user id of user, who has reviewed the promotion + * @property {string} [created_by] + * @property {string} [modified_by] */ /** * @typedef Visibility - * @property {boolean} [coupon_list] - Flag to show promotion on Coupon list - * @property {boolean} [pdp] - Flag to show promotion on PDP page + * @property {boolean} coupon_list + * @property {boolean} pdp */ /** * @typedef PromotionDateMeta - * @property {string} [modified_on] - Date time format when the promotion last modified - * @property {string} [created_on] - Date time format when the promotion created - * @property {string} [approved_on] - Date time format when the promotion approved - * @property {string} [rejected_on] - Date time format when the promotion rejected - * @property {string} [reviewed_on] - Date time format when the promotion reviewed + * @property {string} [modified_on] + * @property {string} [created_on] */ /** * @typedef PromotionListItem * @property {boolean} [stackable] - Allows more than one promotion to get * combined benefits - * @property {string} [calculate_on] - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type + * @property {string} [calculate_on] - Only available for Contract pricing and + * Ladder pricing promotion type * @property {string} [apply_exclusive] - Doesn't allow other promotion after * current promotion applied on cart or article * @property {string} promo_group - Group into which promotion fall - * @property {string} mode - Promotion mode, like coupon or promotion + * @property {string} mode - Promotion mode * @property {boolean} [apply_all_discount] - Prevents more than one promotion discounts * @property {DisplayMeta1} display_meta * @property {Ownership1} ownership @@ -495,159 +416,81 @@ const Joi = require("joi"); * promotion will be applied * @property {Restrictions1} [restrictions] * @property {string} [currency] - Currency used for promotion - * @property {boolean} [is_processed] - Flag to verify if promotion is ready to - * be applied on cart and ready to update promotion - * @property {string} [code] - Unique code of promotion + * @property {string} [code] - Promotion code * @property {PromotionSchedule} [_schedule] * @property {PromotionAction} [post_order_action] * @property {number} [apply_priority] - Priority based on which promotion are * applied on articles * @property {PromotionAuthor} [author] * @property {Visibility} [visiblility] - * @property {string} application_id - Application id in which promotion will be used - * @property {ItemCriteria} buy_rules + * @property {string} application_id - App id in which promotion will be used + * @property {Object} buy_rules - Buy rules for the promotion * @property {Object} [_custom_json] - Custom data stored in promotion * @property {PromotionDateMeta} [date_meta] - * @property {string} [_id] - Unique identifier of promotion - * @property {string[]} [tags] - List of tags on which promotion is applicable + * @property {string} [_id] - Promotion id + * @property {string[]} [tags] */ /** - * @typedef PromotionsResult - * @property {PromotionListItem[]} [items] - List of promotions + * @typedef PromotionsResponse + * @property {PromotionListItem[]} [items] * @property {Page} [page] */ /** * @typedef PromotionAdd - * @property {boolean} [stackable] - Boolean value set true to apply other promotions also - * @property {string} [calculate_on] - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type - * @property {string} [apply_exclusive] - Promotion should apply on either - * article or cart. - * @property {string} promo_group - The type of promotion group - * @property {string} mode - Promotion mode, like coupon or promotion - * @property {boolean} [apply_all_discount] - True means to apply all discount offers - * @property {DisplayMeta1} [display_meta] - * @property {Ownership1} [ownership] - * @property {string} promotion_type - Type of promotion - * @property {DiscountRule[]} [discount_rules] - List of discount offers and - * their applicable conditions - * @property {Restrictions1} [restrictions] - * @property {string} [currency] - Promotion Currency code like INR - * @property {string} [code] - Promotion unique code - * @property {PromotionSchedule} [_schedule] - * @property {PromotionAction} [post_order_action] - * @property {number} [apply_priority] - Promotion applicable priority - * @property {PromotionAuthor} [author] - * @property {Visibility} [visiblility] - * @property {string} application_id - Current application id of sales channel - * @property {ItemCriteria} [buy_rules] - * @property {Object} [_custom_json] - Set extra properties in promotion - * @property {PromotionDateMeta} [date_meta] - * @property {string[]} [tags] - List of tags applicable for promotion - */ - -/** - * @typedef PromotionAddResult - * @property {boolean} [stackable] - Boolean value set true to apply other promotions also - * @property {string} [calculate_on] - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type - * @property {string} [apply_exclusive] - Promotion should apply on either - * article or cart. - * @property {string} promo_group - The type of promotion group - * @property {string} mode - Promotion mode, like coupon or promotion - * @property {boolean} [is_processed] - Flag to verify if promotion is ready to - * be applied on cart and ready to update promotion - * @property {boolean} [apply_all_discount] - True means to apply all discount offers - * @property {DisplayMeta1} [display_meta] - * @property {Ownership1} [ownership] - * @property {string} promotion_type - Type of promotion - * @property {DiscountRule[]} [discount_rules] - List of discount offers and - * their applicable conditions + * @property {boolean} [stackable] + * @property {string} [calculate_on] - Only available for Contract pricing and + * Ladder pricing promotion type + * @property {string} [apply_exclusive] + * @property {string} promo_group + * @property {string} mode + * @property {boolean} [apply_all_discount] + * @property {DisplayMeta1} display_meta + * @property {Ownership1} ownership + * @property {string} promotion_type + * @property {DiscountRule[]} discount_rules * @property {Restrictions1} [restrictions] - * @property {string} [currency] - Promotion Currency code like INR - * @property {string} [code] - Promotion unique code + * @property {string} [currency] + * @property {string} [code] * @property {PromotionSchedule} [_schedule] * @property {PromotionAction} [post_order_action] - * @property {number} [apply_priority] - Promotion applicable priority + * @property {number} [apply_priority] * @property {PromotionAuthor} [author] * @property {Visibility} [visiblility] - * @property {string} application_id - Current application id of sales channel - * @property {ItemCriteria} [buy_rules] - * @property {Object} [_custom_json] - Set extra properties in promotion + * @property {string} application_id + * @property {Object} buy_rules + * @property {Object} [_custom_json] * @property {PromotionDateMeta} [date_meta] - * @property {string[]} [tags] - List of tags applicable for promotion + * @property {string[]} [tags] */ /** * @typedef PromotionUpdate - * @property {boolean} [stackable] - Set true to apply other promotions in cart - * @property {string} [calculate_on] - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type - * @property {string} [apply_exclusive] - Promotion should apply on either - * article or cart. - * @property {string} [reason] - Promotion rejection reason added by reviewer - * @property {string} promo_group - The type of promotion group - * @property {string} mode - Promotion mode - * @property {boolean} [apply_all_discount] - True means to apply all discount offers - * @property {DisplayMeta1} [display_meta] - * @property {Ownership1} [ownership] - * @property {string} promotion_type - The Promotion type like amount, bogo and - * percentage etc. - * @property {DiscountRule[]} [discount_rules] - List of discount offers and - * their applicable conditions - * @property {Restrictions1} [restrictions] - * @property {string} [currency] - Promotion Currency code like INR - * @property {string} [code] - Promotion unique code - * @property {PromotionSchedule} [_schedule] - * @property {PromotionAction} [post_order_action] - * @property {number} [apply_priority] - Promotion applicable priority - * @property {PromotionAuthor} [author] - * @property {Visibility} [visiblility] - * @property {string} application_id - Current application id of sales channel - * @property {ItemCriteria} [buy_rules] - * @property {Object} [_custom_json] - Set extra properties in promotion - * @property {PromotionDateMeta} [date_meta] - * @property {string[]} [tags] - List of tags applicable for promotion - */ - -/** - * @typedef PromotionUpdateResult - * @property {boolean} [stackable] - Set true to apply other promotions in cart - * @property {string} [calculate_on] - Article Price on which promotion - * calculated like effective price or marked price. Only available for - * Contract pricing and Ladder pricing promotion type - * @property {string} [apply_exclusive] - Promotion should apply on either - * article or cart. - * @property {string} [reason] - Promotion rejection reason added by reviewer - * @property {boolean} [is_processed] - Flag to verify if promotion is ready to - * be applied on cart and ready to update promotion - * @property {string} promo_group - The type of promotion group - * @property {string} mode - Promotion mode - * @property {boolean} [apply_all_discount] - True means to apply all discount offers - * @property {DisplayMeta1} [display_meta] - * @property {Ownership1} [ownership] - * @property {string} promotion_type - The Promotion type like amount, bogo and - * percentage etc. - * @property {DiscountRule[]} [discount_rules] - List of discount offers and - * their applicable conditions + * @property {boolean} [stackable] + * @property {string} [calculate_on] - Only available for Contract pricing and + * Ladder pricing promotion type + * @property {string} [apply_exclusive] + * @property {string} promo_group + * @property {string} mode + * @property {boolean} [apply_all_discount] + * @property {DisplayMeta1} display_meta + * @property {Ownership1} ownership + * @property {string} promotion_type + * @property {DiscountRule[]} discount_rules * @property {Restrictions1} [restrictions] - * @property {string} [currency] - Promotion Currency code like INR - * @property {string} [code] - Promotion unique code + * @property {string} [currency] + * @property {string} [code] * @property {PromotionSchedule} [_schedule] * @property {PromotionAction} [post_order_action] - * @property {number} [apply_priority] - Promotion applicable priority + * @property {number} [apply_priority] * @property {PromotionAuthor} [author] * @property {Visibility} [visiblility] - * @property {string} application_id - Current application id of sales channel - * @property {ItemCriteria} [buy_rules] - * @property {Object} [_custom_json] - Set extra properties in promotion + * @property {string} application_id + * @property {Object} buy_rules + * @property {Object} [_custom_json] * @property {PromotionDateMeta} [date_meta] - * @property {string[]} [tags] - List of tags applicable for promotion + * @property {string[]} [tags] */ /** @@ -657,60 +500,56 @@ const Joi = require("joi"); */ /** - * @typedef ActivePromosResult - * @property {string} [entity_slug] - A short, human-readable, URL-friendly - * identifier of Promotion or coupon - * @property {string} [title] - Name of the promotion or coupon - * @property {string} [modified_on] - Coupon or promotion modification date + * @typedef ActivePromosResponse + * @property {string} [entity_slug] + * @property {string} [title] - Name of the promotion + * @property {string} [modified_on] - Coupon modification date * @property {string} [example] - Discount offers examples * @property {string} [entity_type] - Type of entity to be selected from : * ['coupon', 'promotion'] - * @property {string} [created_on] - Coupon or modification creation date + * @property {string} [created_on] - Coupon creation date * @property {boolean} [is_hidden] - If the promo is active or not - * @property {string} [type] - Coupon or promotion type + * @property {string} [type] - Coupon type * @property {string} [subtitle] - Small description of the current offer * @property {string} [description] - The description of the offer in the form of an HTML */ /** * @typedef Charges - * @property {number} [charges] - Delivery chanrges applied on the product of cart - * @property {number} [threshold] - Threshold of cart value on which the charge - * should be applied + * @property {number} [charges] + * @property {number} [threshold] */ /** * @typedef DeliveryCharges - * @property {Charges[]} [charges] - List of delivery changes information of the cart - * @property {boolean} [enabled] - Enable or disable delivery charge on cart + * @property {Charges[]} [charges] + * @property {boolean} [enabled] */ /** * @typedef CartMetaConfigUpdate - * @property {number} [min_cart_value] - Minimum order value to checkout - * @property {number} [max_cart_value] - Maximum order value to checkout - * @property {boolean} [bulk_coupons] - Indicates bulk coupon applicable for cart - * @property {number} [max_cart_items] - Maximum cart items to checkout - * @property {string} [gift_display_text] - Free gift charges text to show + * @property {number} [min_cart_value] + * @property {number} [max_cart_value] + * @property {boolean} [bulk_coupons] + * @property {number} [max_cart_items] + * @property {string} [gift_display_text] * @property {DeliveryCharges} [delivery_charges] - * @property {boolean} [revenue_engine_coupon] - It define credit coupon - * applicable for cart - * @property {number} [gift_pricing] - Free gift charges per product - * @property {boolean} [enabled] - Enabled flag for cart configuration + * @property {boolean} [revenue_engine_coupon] + * @property {number} [gift_pricing] + * @property {boolean} [enabled] */ /** * @typedef CartMetaConfigAdd - * @property {number} [min_cart_value] - Minimum order value to checkout - * @property {number} [max_cart_value] - Maximum order value to checkout - * @property {boolean} [bulk_coupons] - Indicates bulk coupon applicable for cart - * @property {number} [max_cart_items] - Maximum cart items to checkout - * @property {string} [gift_display_text] - Free gift charges text to show + * @property {number} [min_cart_value] + * @property {number} [max_cart_value] + * @property {boolean} [bulk_coupons] + * @property {number} [max_cart_items] + * @property {string} [gift_display_text] * @property {DeliveryCharges} [delivery_charges] - * @property {boolean} [revenue_engine_coupon] - It define credit coupon - * applicable for cart - * @property {number} [gift_pricing] - Free gift charges per product - * @property {boolean} [enabled] - Enabled flag for cart configuration + * @property {boolean} [revenue_engine_coupon] + * @property {number} [gift_pricing] + * @property {boolean} [enabled] */ /** @@ -718,10 +557,10 @@ const Joi = require("joi"); * @property {number} [value] - Value of price adjustment for article * @property {string} [code] - Code to identify price adjustment on article * @property {string} [type] - Type of price adjusment - * @property {string} article_id - Unique identifier of article + * @property {string} article_id - Id of article * @property {number} [quantity] - Total quantity of the article to be * considered (currently used only in discount type) - * @property {Object} [meta] - Meta data related to article + * @property {Object} [meta] - Meta related to article */ /** @@ -732,14 +571,14 @@ const Joi = require("joi"); /** * @typedef Collection - * @property {string} refund_by - Bearable party who is refunding the amount - * @property {string} collected_by - The party who is collecting the amount + * @property {string} refund_by + * @property {string} collected_by */ /** * @typedef PriceAdjustmentUpdate * @property {string} [modified_by] - The entity that modified the field - * @property {number} value - The amount applied on the cart + * @property {number} value * @property {string} message - The message associated with the price adjustment * @property {string} [apply_expiry] - The date and time when the expiry should be applied * @property {PriceAdjustmentRestrictions} [restrictions] - Restrictions applied @@ -748,7 +587,7 @@ const Joi = require("joi"); * @property {boolean} article_level_distribution - Flag indicating whether the * distribution should is done at the article level * @property {Collection} collection - * @property {string} type - Type of price adjusment like charge, mop, discount etc. + * @property {string} type - Type of price adjusment * @property {boolean} [allowed_refund] - Flag indicating whether refunds are * allowed (default: False) * @property {boolean} is_authenticated - Flag indicating whether the user is @@ -756,49 +595,47 @@ const Joi = require("joi"); * @property {Article[]} article_ids - The list of article object in the price adjustment * @property {boolean} [auto_remove] - This field if set true will remove mop * type price adjustment. - * @property {Object} [meta] - Additional information regarding price adjustment - * @property {string} cart_id - Unique identifier of the cart - * @property {DistributionLogic} [distribution_logic] + * @property {Object} [meta] + * @property {string} cart_id - The ID of the cart */ /** * @typedef PriceAdjustment - * @property {number} value - The amount applied on the cart + * @property {number} value * @property {string} message - The message associated with the price adjustment * @property {string} [apply_expiry] - The date and time when the expiry should be applied - * @property {PriceAdjustmentRestrictions} [restrictions] - This field specifies - * the restrictions for this item or service, such as whether cancellation and - * return are permitted, except for `charge` type. + * @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts + * the restrictions applied to this particular item or service, including + * whether or not cancellation and return are allowed, etc * @property {boolean} article_level_distribution - Flag indicating whether the * distribution should is done at the article level - * @property {string} [id] - Unique identifier of Price adjustment + * @property {string} [id] * @property {Collection} collection - * @property {string} type - Type of price adjusment like charge, discount, mop etc. + * @property {string} type - Type of price adjusment * @property {boolean} [allowed_refund] - Flag indicating whether refunds are - * allowed (default: False) expect for `charge` type + * allowed (default: False) * @property {boolean} is_authenticated - Flag indicating whether the user is * authenticated * @property {Article[]} article_ids - The list of article object in the price adjustment * @property {boolean} [auto_remove] - This field if set true will remove mop * type price adjustment. - * @property {Object} [meta] - Additional information regarding price adjustment - * @property {string} cart_id - Unique identifier of the cart - * @property {DistributionLogic} [distribution_logic] + * @property {Object} [meta] + * @property {string} cart_id - The ID of the cart */ /** - * @typedef PriceAdjustmentResult + * @typedef PriceAdjustmentResponse * @property {PriceAdjustment} [data] */ /** - * @typedef GetPriceAdjustmentResult + * @typedef GetPriceAdjustmentResponse * @property {PriceAdjustment[]} [data] */ /** * @typedef PriceAdjustmentAdd - * @property {number} value - The amount applied on the cart + * @property {number} value * @property {string} message - The message associated with the price adjustment * @property {string} [apply_expiry] - The date and time when the expiry should be applied * @property {PriceAdjustmentRestrictions} [restrictions] - This field accepts @@ -814,134 +651,100 @@ const Joi = require("joi"); * @property {boolean} is_authenticated - Flag indicating whether the user is * authenticated * @property {Article[]} article_ids - The list of article object in the price adjustment - * @property {Object} [meta] - Additional information regarding price adjustment - * @property {string} cart_id - Unique identifier of the cart + * @property {Object} [meta] + * @property {string} cart_id - The ID of the cart * @property {boolean} [auto_remove] - This field if set true will remove mop * type price adjustment. - * @property {DistributionLogic} [distribution_logic] - */ - -/** - * @typedef DistributionRule - * @property {Object} [conditions] - This field defines the distribution conditions - */ - -/** - * @typedef Distribution - * @property {string} [type] - This field defines the distribution type allowed - * values('multi', 'single') - * @property {string} [logic] - This field defines the distribution logic - * allowed values('apportion', 'weighted', 'equally') - * @property {DistributionRule} [rule] - */ - -/** - * @typedef DistributionLogic - * @property {string} [distribution_level] - This field defines the distribution - * level, currently allowed distribution level is (shipment) - * @property {Distribution} [distribution] */ /** * @typedef CartItem - * @property {number} [quantity] - Quantity of product in cart - * @property {string} product_id - Unique identifier of product in cart - * @property {string} size - Size of product in cart + * @property {number} [quantity] + * @property {string} product_id + * @property {string} size */ /** - * @typedef OpenapiCartDetailsCreation - * @property {CartItem[]} cart_items - List of products in cart + * @typedef OpenapiCartDetailsRequest + * @property {CartItem[]} cart_items */ /** * @typedef CouponBreakup - * @property {string} [title] - Coupon Title of the coupon applied denotes name - * of the coupon - * @property {number} [max_discount_value] - Maximum discount value of the - * coupon applied to cart - * @property {number} [value] - Coupon value of the coupon applied to cart - * @property {boolean} [is_applied] - Applied flag which denotes if any coupon - * is applied to cart - * @property {string} [uid] - Unique identifier of the coupon applied to cart - * @property {string} [coupon_type] - Type of the coupon applied to cart - * @property {string} [sub_title] - Coupon subtitle of the coupon applied to - * cart which is used to display - * @property {number} [coupon_value] - Value of the coupon applied to cart - * @property {string} [code] - Coupon code of the coupon applied - * @property {string} [type] - Type of the coupon applied to cart - * @property {number} [minimum_cart_value] - Minimum cart value of the coupon - * applied to cart - * @property {string} [message] - Coupon message of the coupon applied to cart - * @property {string} [description] - Coupon description of the coupon applied to cart. + * @property {string} [title] + * @property {number} [max_discount_value] + * @property {number} [value] + * @property {boolean} [is_applied] + * @property {string} [uid] + * @property {string} [coupon_type] + * @property {string} [sub_title] + * @property {number} [coupon_value] + * @property {string} [code] + * @property {string} [type] + * @property {number} [minimum_cart_value] + * @property {string} [message] + * @property {string} [description] */ /** * @typedef DisplayBreakup - * @property {string} [key] - Key of the price like total_mrp, total, subtotal etc - * @property {number} [value] - Numeric value for the price - * @property {string} [currency_code] - Currency code for the price - * @property {string} [currency_symbol] - Currency symbol for the price - * @property {string} [display] - Display key field that to be shown against the value - * @property {string[]} [message] - List of message at price level to be displayed + * @property {string} [key] + * @property {number} [value] + * @property {string} [currency_code] + * @property {string} [currency_symbol] + * @property {string} [display] + * @property {string[]} [message] */ /** * @typedef LoyaltyPoints - * @property {boolean} [is_applied] - Whether the loyalty points are applied on the cart - * @property {number} [total] - Total loyalty points available with user - * @property {number} [applicable] - Whether the loyalty points are applicable - * for the cart - * @property {string} [description] - Description for loyalty points + * @property {boolean} [is_applied] + * @property {number} [total] + * @property {number} [applicable] + * @property {string} [description] */ /** * @typedef RawBreakup - * @property {number} [coupon] - Coupon amount applied to cart - * @property {number} [gst_charges] - GST charges applied on cart - * @property {number} [mrp_total] - Maximum price total amount of all products in cart - * @property {number} [fynd_cash] - Loyalty points applied on cart - * @property {number} [vog] - Total value of goods after all discount, coupons - * and promotion applied of all products in cart - * @property {number} [gift_card] - Gift cart amount applied on cart - * @property {number} [cod_charge] - Cod charge value applied to cart. This is - * applied when user select payment mode as COD - * @property {number} [total] - Total payable amount by the customer - * @property {number} [discount] - Discount amount recieved on cart - * @property {number} [delivery_charge] - Delivery charge applied to cart - * @property {number} [you_saved] - Total amount will be saved if customer - * places the order - * @property {number} [subtotal] - Selling price amount of all products in cart - * @property {number} [convenience_fee] - Convenience fee amount applied to cart + * @property {number} [coupon] + * @property {number} [gst_charges] + * @property {number} [mrp_total] + * @property {number} [fynd_cash] + * @property {number} [vog] + * @property {number} [gift_card] + * @property {number} [cod_charge] + * @property {number} [total] + * @property {number} [discount] + * @property {number} [delivery_charge] + * @property {number} [you_saved] + * @property {number} [subtotal] + * @property {number} [convenience_fee] */ /** * @typedef CartBreakup * @property {CouponBreakup} [coupon] - * @property {DisplayBreakup[]} [display] - List of breakup data which is used - * to display the breakup to the customer like MRP total, Discount, Sub total, - * coupon value, promotion value and final total + * @property {DisplayBreakup[]} [display] * @property {LoyaltyPoints} [loyalty_points] * @property {RawBreakup} [raw] */ /** * @typedef ProductImage - * @property {string} [secure_url] - Secured url of the product image - * @property {string} [url] - Bucket link url for product image - * @property {string} [aspect_ratio] - Aspect ratio of the product image + * @property {string} [secure_url] + * @property {string} [url] + * @property {string} [aspect_ratio] */ /** * @typedef Tags - * @property {Object} [tags] - Tags is a lable or batch that is attached to a - * product in cart + * @property {Object} [tags] */ /** * @typedef BaseInfo - * @property {number} [uid] - Unique identifier of entities like brand or seller - * @property {string} [name] - Name of entities like brand or seller + * @property {number} [uid] + * @property {string} [name] */ /** @@ -949,62 +752,43 @@ const Joi = require("joi"); * @property {string[]} [product_slug] - Contains list of product slug */ -/** - * @typedef ProductActionParams - * @property {string[]} [slug] - Unique product url name generated via product - * name and other meta data. - */ - -/** - * @typedef ProductActionPage - * @property {string} [type] - Entity of page to be redirected on click - * @property {ProductActionParams} [params] - */ - /** * @typedef ProductAction - * @property {string} [type] - Type of action - * @property {string} [url] - Url of the product to render the product + * @property {string} [type] + * @property {string} [url] * @property {ActionQuery} [query] - * @property {ProductActionPage} [page] */ /** * @typedef CategoryInfo - * @property {number} [uid] - Unique identifier of Product Category - * @property {string} [name] - Category name of the product + * @property {number} [uid] - Product Category Id + * @property {string} [name] */ /** * @typedef CartProduct * @property {string} [slug] - Unique product url name generated via product * name and other meta data - * @property {ProductImage[]} [images] - Product Images urls of different types - * like secure url, aspect ration url and url + * @property {ProductImage[]} [images] * @property {Tags} [teaser_tag] * @property {BaseInfo} [brand] * @property {ProductAction} [action] - * @property {number} [uid] - Unique identifier of the product in cart - * @property {string[]} [tags] - Products tags that are added to each product to - * identify the set of products - * @property {Object} [_custom_json] - Field to add custom json of the product in cart - * @property {string} [type] - Type of product in cart - * @property {string} [name] - Product name of the product in cart which is - * defined on platform - * @property {string} [item_code] - Product code of the product while defining - * product on platform - * @property {CategoryInfo[]} [categories] - Product category information which - * incldes category name and category id - * @property {Object} [attributes] - Product attributes defined on platform + * @property {number} [uid] + * @property {string[]} [tags] + * @property {Object} [_custom_json] + * @property {string} [type] + * @property {string} [name] + * @property {string} [item_code] + * @property {CategoryInfo[]} [categories] + * @property {Object} [attributes] */ /** * @typedef BasePrice - * @property {number} [effective] - Current per unit price of product after - * existing deductions - * @property {string} [currency_code] - Currency code for all amounts - * @property {string} [currency_symbol] - Currency symbol of the currncy used for price - * @property {number} [marked] - Original price of product + * @property {number} [effective] + * @property {string} [currency_code] + * @property {string} [currency_symbol] + * @property {number} [marked] */ /** @@ -1015,54 +799,43 @@ const Joi = require("joi"); /** * @typedef StoreInfo - * @property {number} [uid] - Unique identifiers of the store from where product - * is fulfileld - * @property {string} [name] - Store name of the store from where the product is fulfiled - * @property {string} [store_code] - A unique code or identifier for the store, - * often used for internal reference + * @property {number} [uid] + * @property {string} [name] + * @property {string} [store_code] */ /** * @typedef ProductArticle - * @property {string} [seller_identifier] - List of identifiers used by sellers - * for the product size. - * @property {number} [quantity] - Quantity of the article added in cart + * @property {string} [seller_identifier] + * @property {number} [quantity] * @property {BaseInfo} [seller] - * @property {Object} [cart_item_meta] - Meta details of the article added from cart - * @property {Object} [parent_item_identifiers] - Fields to determine parent - * product of the product - * @property {boolean} [is_gift_visible] - Whether the product can be purchased - * as a gift. It is true if the product is available for gifting and false otherwise. - * @property {string} [uid] - This unique identifier is assigned to the specific - * article. This represents item x size x location. - * @property {Object} [gift_card] - Gift card detail if gift card applied to the - * product which indicates gift price, gift applicable flag and display - * message for the gift - * @property {string[]} [product_group_tags] - List fot the unique identifier - * for the product grouping. - * @property {Object} [identifier] - Unique identifier of the article - * @property {number} [mto_quantity] - Quantity of the product which will - * specially manufactured as not available in stock - * @property {Object} [extra_meta] - Field to update extra meta of the article in cart - * @property {string} [type] - Type of the data sent in response. Possible value - * is article - * @property {Object} [_custom_json] - Field to update custom json of the article in cart + * @property {Object} [cart_item_meta] + * @property {Object} [parent_item_identifiers] + * @property {boolean} [is_gift_visible] + * @property {string} [uid] + * @property {Object} [gift_card] + * @property {string[]} [product_group_tags] + * @property {Object} [identifier] + * @property {number} [mto_quantity] + * @property {Object} [extra_meta] + * @property {string} [type] + * @property {Object} [_custom_json] * @property {ArticlePriceInfo} [price] - * @property {Object} [meta] - Meta data of article in cart - * @property {string} [size] - Size of the article added in cart + * @property {Object} [meta] + * @property {string} [size] * @property {StoreInfo} [store] * @property {string[]} [tags] - A list of article tags */ /** * @typedef Ownership2 - * @property {string} [payable_category] - Promotion amount payable category - * @property {string} [payable_by] - Promotion amount bearable party + * @property {string} [payable_category] - Promo amount payable category + * @property {string} [payable_by] - Promo amount bearable party */ /** * @typedef DiscountRulesApp - * @property {Object} [offer] - Offer detail for promotion + * @property {Object} [offer] - Offer for promotion * @property {Object} [raw_offer] - Raw offer details for promotion * @property {Object} [item_criteria] - Item criteria of promotion * @property {string[]} [matched_buy_rules] - Matched buy rules for promotion @@ -1071,10 +844,9 @@ const Joi = require("joi"); /** * @typedef AppliedFreeArticles * @property {string} [parent_item_identifier] - Parent item identifier for free article - * @property {number} [quantity] - Free article quantity in promotion - * @property {string} [article_id] - Unique identifier of free article + * @property {number} [quantity] - Free article quantity + * @property {string} [article_id] - Free article id * @property {FreeGiftItems} [free_gift_item_details] - Free gift items details - * in promotion */ /** @@ -1102,15 +874,15 @@ const Joi = require("joi"); * @property {boolean} [mrp_promotion] - If applied promotion is applied on * product MRP or ESP * @property {string} [promotion_group] - Promotion group for the promotion - * @property {string} [promo_id] - Promotion unique identifier + * @property {string} [promo_id] - Promotion id * @property {Object} [meta] - Meta object for extra data - * @property {string} [code] - Promotion unique code + * @property {string} [code] - Promotion code */ /** * @typedef PromiseFormatted - * @property {string} [max] - Maximum Delivery promise formatted timestamp - * @property {string} [min] - Minimum Delivery promise formatted timestamp + * @property {string} [max] + * @property {string} [min] */ /** @@ -1121,8 +893,8 @@ const Joi = require("joi"); /** * @typedef PromiseTimestamp - * @property {number} [max] - Maximum Promise for the shipment - * @property {number} [min] - Minimum delivery promise time for the shipment + * @property {number} [max] + * @property {number} [min] */ /** @@ -1134,23 +906,19 @@ const Joi = require("joi"); /** * @typedef CouponDetails - * @property {number} [discount_total_quantity] - Total discount earned from - * coupon applied to cart - * @property {number} [discount_single_quantity] - Discout amount applied from - * coupon for single quantity of the product - * @property {string} [code] - Coupon code of the coupon applied + * @property {number} [discount_total_quantity] + * @property {number} [discount_single_quantity] + * @property {string} [code] */ /** * @typedef ProductPrice - * @property {number} [marked] - Maximum price of the product - * @property {number} [add_on] - Price before promotion and coupon amount - * applied for calculation - * @property {string} [currency_code] - Currency code of the price defined for the product - * @property {string} [currency_symbol] - Currency symbol of the price defined - * for the product - * @property {number} [effective] - Selling price of the product - * @property {number} [selling] - Selling price of the product + * @property {number} [marked] + * @property {number} [add_on] + * @property {string} [currency_code] + * @property {string} [currency_symbol] + * @property {number} [effective] + * @property {number} [selling] */ /** @@ -1166,259 +934,226 @@ const Joi = require("joi"); /** * @typedef ProductAvailabilitySize - * @property {string} [display] - Display size of the product - * @property {string} [value] - Actual value of the size - * @property {boolean} [is_available] - Available flag for the size of the - * product if that is available + * @property {string} [display] + * @property {string} [value] + * @property {boolean} [is_available] */ /** * @typedef ProductAvailability - * @property {boolean} [is_valid] - Valid flag for the product if the product - * added in cart is valid to place the order - * @property {number} [other_store_quantity] - Quantity of the product available - * on other store - * @property {boolean} [deliverable] - Deliverable flag denotes if the product - * is deliverable or not - * @property {ProductAvailabilitySize[]} [available_sizes] - Product sizes availability - * @property {boolean} [out_of_stock] - Denotes if the product is available in stock - * @property {string[]} [sizes] - All sizes of the product + * @property {boolean} [is_valid] + * @property {number} [other_store_quantity] + * @property {boolean} [deliverable] + * @property {ProductAvailabilitySize[]} [available_sizes] + * @property {boolean} [out_of_stock] + * @property {string[]} [sizes] */ /** * @typedef PromoMeta - * @property {string} [message] - Loyalty points message denotes how much - * loyalty points and applied and how much left with the user + * @property {string} [message] */ /** * @typedef CartProductInfo - * @property {number} [quantity] - Quantity of the product added in cart + * @property {number} [quantity] * @property {CartProduct} [product] - * @property {string} [product_ean_id] - European Article Number of the product - * (limited upto 50 EAN identifier in a single request) - * @property {Object} [parent_item_identifiers] - Parent item information of the - * product which identifies the parent of the product in cart - * @property {boolean} [is_set] - Whether or not the product is a set of items + * @property {string} [product_ean_id] + * @property {Object} [parent_item_identifiers] + * @property {boolean} [is_set] * @property {ProductArticle} [article] - * @property {AppliedPromotion[]} [promotions_applied] - List of applicable - * promotion for the product in cart + * @property {AppliedPromotion[]} [promotions_applied] * @property {ShipmentPromise} [delivery_promise] - * @property {string} [key] - The attribute key associated with the size + * @property {string} [key] * @property {CouponDetails} [coupon] - * @property {Object} [bulk_offer] - Bulk offer information for the product - * which denotes if any bulk offer is applied to the product in cart + * @property {Object} [bulk_offer] * @property {ProductPriceInfo} [price] - * @property {string} [coupon_message] - Message for the coupon denotes which - * coupon is applied and empty if not applied + * @property {string} [coupon_message] * @property {CartProductIdentifer} identifiers - * @property {string} [message] - Product level message which denotes error - * information to display over the product in cart - * @property {string} [discount] - Discount amount of the product in cart + * @property {string} [message] + * @property {string} [discount] * @property {ProductAvailability} [availability] - * @property {Object} [moq] - An Integer indication the Minimum Order Quantity - * of a product, e.g. 100. + * @property {Object} [moq] * @property {ProductPriceInfo} [price_per_unit] * @property {PromoMeta} [promo_meta] - * @property {Object} [custom_order] - Whether MTO (Make to Order) is enabled or not. + * @property {Object} [custom_order] */ /** - * @typedef OpenapiCartDetailsResult - * @property {boolean} [is_valid] - Cart validity flag determines the if the - * response is valid or not - * @property {string} [message] - Message of the cart Open API cart detail response + * @typedef OpenapiCartDetailsResponse + * @property {boolean} [is_valid] + * @property {string} [message] * @property {CartBreakup} [breakup_values] - * @property {CartProductInfo[]} [items] - Items details in cart + * @property {CartProductInfo[]} [items] */ /** - * @typedef OpenApiErrorResult - * @property {boolean} [success] - Success flag for cart detail open api response - * @property {string} [message] - Error message of the Open API cart detail response + * @typedef OpenApiErrorResponse + * @property {boolean} [success] + * @property {string} [message] * @property {Object} [errors] - Contains field name which has error as key and * error message as value */ /** * @typedef ShippingAddress - * @property {string} [country] - Country of address - * @property {string} [state] - State of the address - * @property {string} [city] - City of the address - * @property {number} [phone] - Phone number for address - * @property {string} area_code - Area code of the address - * @property {string} [country_iso_code] - Country iso code for address - * @property {string} [country_phone_code] - Country phone code for address - * @property {Object} [meta] - Metadata of the address - * @property {string} [address_type] - Address type of address - * @property {string} [area] - Area description for address - * @property {string} [area_code_slug] - Area code slug for address. example - * pincode is slug for India - * @property {string} [name] - Name of person in address data to whom it belongs to - * @property {string} [landmark] - Landmark of address - * @property {string} [email] - Email address for address data - * @property {string} [country_code] - Country code of address - * @property {number} [pincode] - Pincode for address data - * @property {string} [address] - Address description for address data - */ - -/** - * @typedef OpenApiCartServiceabilityCreation - * @property {CartItem[]} cart_items - List of items in open api cart response + * @property {string} [country] + * @property {string} [state] + * @property {string} [city] + * @property {number} [phone] + * @property {string} area_code + * @property {string} [country_iso_code] + * @property {string} [country_phone_code] + * @property {Object} [meta] + * @property {string} [address_type] + * @property {string} [area] + * @property {string} [area_code_slug] + * @property {string} [name] + * @property {string} [landmark] + * @property {string} [email] + * @property {string} [country_code] + * @property {number} [pincode] + * @property {string} [address] + */ + +/** + * @typedef OpenApiCartServiceabilityRequest + * @property {CartItem[]} cart_items * @property {ShippingAddress} shipping_address */ /** - * @typedef OpenApiCartServiceabilityResult - * @property {boolean} [is_valid] - Cart validity flag determines the if the - * response is valid or not - * @property {CartProductInfo[]} [items] - Items data list in user cart that - * includes item id, item size, store id, available sizes and rest of the item - * related data + * @typedef OpenApiCartServiceabilityResponse + * @property {boolean} [is_valid] + * @property {CartProductInfo[]} [items] * @property {ShipmentPromise} [delivery_promise] - * @property {string} [message] - Message of the cart detail API response + * @property {string} [message] * @property {CartBreakup} [breakup_values] */ /** * @typedef OpenApiFiles - * @property {string} key - Key represents name of file - * @property {string[]} values - List of urls path + * @property {string} key + * @property {string[]} values */ /** * @typedef CartItemMeta - * @property {boolean} [primary_item] - Flags indicates item is primary or not - * @property {string} [group_id] - Fields to determine group id of the product + * @property {boolean} [primary_item] + * @property {string} [group_id] */ /** * @typedef MultiTenderPaymentMeta - * @property {string} [payment_id] - Payment gateway identifier - * @property {string} [payment_gateway] - Payment gateway used to do the payment - * @property {Object} [extra_meta] - Payment extra meta for the payment mode to - * do the payment - * @property {string} [current_status] - Current status of the payment - * @property {string} [order_id] - Payment gateway order id + * @property {string} [payment_id] + * @property {string} [payment_gateway] + * @property {Object} [extra_meta] + * @property {string} [current_status] + * @property {string} [order_id] */ /** * @typedef MultiTenderPaymentMethod - * @property {string} mode - Payment mode of payment method used to make payment - * @property {number} amount - Amount of the payment mode to be paid + * @property {string} mode + * @property {number} amount - Payment amount * @property {MultiTenderPaymentMeta} [meta] - * @property {string} [name] - Name of the payment mode used to make payment + * @property {string} [name] - Payment mode name */ /** * @typedef OpenApiOrderItem - * @property {number} cashback_applied - Cashback applied on user cart - * @property {number} [quantity] - Article quantity in user cart - * @property {string} size - Size of the article added in cart - * @property {number} coupon_effective_discount - Coupon discount applied on - * article in user cart - * @property {number} amount_paid - Amount needs to paid for article in cart - * @property {number} delivery_charges - Delivery charges applied on article in cart - * @property {number} price_marked - Original price of product - * @property {OpenApiFiles[]} [files] - List of file url + * @property {number} cashback_applied + * @property {number} [quantity] + * @property {string} size + * @property {number} coupon_effective_discount + * @property {number} amount_paid + * @property {number} delivery_charges + * @property {number} price_marked + * @property {OpenApiFiles[]} [files] * @property {CartItemMeta} [meta] - * @property {Object} [extra_meta] - Extra meta of the article in cart - * @property {number} product_id - Product id associated with article in cart - * @property {number} [loyalty_discount] - Loyalty points applied on cart - * @property {number} discount - Discount value applied on article in cart - * @property {number} price_effective - Current per unit price of product after - * existing deductions - * @property {MultiTenderPaymentMethod[]} payment_methods - Payment methods list - * used to make the payment - * @property {number} [employee_discount] - Employee discount value applied on - * article in cart - * @property {number} cod_charges - Cash On Delivery charges applied on article in cart + * @property {Object} [extra_meta] + * @property {number} product_id + * @property {number} [loyalty_discount] + * @property {number} discount + * @property {number} price_effective + * @property {MultiTenderPaymentMethod[]} payment_methods + * @property {number} [employee_discount] + * @property {number} cod_charges */ /** * @typedef OpenApiPlatformCheckoutReq - * @property {string} [payment_mode] - Payment mode from which the payment to be - * done for the order - * @property {number} cart_value - Total amount of user cart - * @property {OpenApiOrderItem[]} cart_items - List of items in user cart + * @property {string} [payment_mode] + * @property {number} cart_value + * @property {OpenApiOrderItem[]} cart_items * @property {ShippingAddress} [shipping_address] - * @property {number} [loyalty_discount] - Loyalty points applied on cart - * @property {string} [comment] - Comment message added in cart after order placed - * @property {MultiTenderPaymentMethod[]} payment_methods - Payment methods list - * used to make the payment - * @property {Object} [employee_discount] - Employee discount value applied on user cart - * @property {string} [coupon] - Coupon text of coupon applied on user cart - * @property {number} cashback_applied - Cashback applied on user cart - * @property {string} [gstin] - GSTIN number added in cart + * @property {number} [loyalty_discount] + * @property {string} [comment] + * @property {MultiTenderPaymentMethod[]} payment_methods + * @property {Object} [employee_discount] + * @property {string} [coupon] + * @property {number} cashback_applied + * @property {string} [gstin] * @property {ShippingAddress} billing_address - * @property {string} coupon_code - Coupon code to be applied to cart - * @property {number} coupon_value - Value of the coupon applied to cart - * @property {number} delivery_charges - Delivery charges of the order placed - * via checkout API - * @property {string} [affiliate_order_id] - Order id generated after placing order - * @property {string} [currency_code] - Currency code for the price - * @property {string} [order_id] - Order id generated after placing order - * @property {OpenApiFiles[]} [files] - List of file url - * @property {number} cod_charges - Cash On Delivery charges of the user cart + * @property {string} coupon_code + * @property {number} coupon_value + * @property {number} delivery_charges + * @property {string} [affiliate_order_id] + * @property {string} [currency_code] + * @property {string} [order_id] + * @property {OpenApiFiles[]} [files] + * @property {number} cod_charges */ /** - * @typedef OpenApiCheckoutResult - * @property {boolean} [success] - The request success is defined - * @property {string} [message] - Message of the api response + * @typedef OpenApiCheckoutResponse + * @property {boolean} [success] + * @property {string} [message] * @property {string} [order_ref_id] - Order id sent in request * @property {string} order_id - Fynd order id */ /** * @typedef AbandonedCart - * @property {string} expire_at - Expire details of user cart - * @property {Object} [promotion] - Promotion object details like amount, mode, - * currency and list of promotions in user cart - * @property {boolean} is_default - User cart default status - * @property {string} [comment] - Comment message to be added in user cart - * @property {Object[]} articles - List of articles in user cart - * @property {Object} [coupon] - Coupon data of user cart which denotes if - * coupon is applied, coupon code, coupon amount, coupon title and coupon message - * @property {number} [bulk_coupon_discount] - Total bulk discount amount - * applied in user cart - * @property {string} _id - Unique identifier of the user cart - * @property {Object} [fynd_credits] - Fynd credit points applied in user cart - * @property {number[]} [fc_index_map] - Flat article index in user cart - * @property {string} [order_id] - Order id generated in user cart - * @property {number} [discount] - Discount amount of the product in cart - * @property {Object} [cod_charges] - Cash On Delivery charges of the user cart - * @property {Object} [payments] - Payment object selected in user cart - * @property {string} [payment_mode] - Payment mode of the payment selected to - * do the payment - * @property {Object[]} [shipments] - Shipment details for the items in a cart, - * specific to the selected address. - * @property {Object} [pick_up_customer_details] - Customer contact details for - * customer pickup at store - * @property {number} uid - Unique Identifier of user cart - * @property {string} [checkout_mode] - Checkout mode of user cart - * @property {number} [cart_value] - Total amount of user cart - * @property {boolean} [is_archive] - Flag to indicate cart is archived or not - * @property {string} created_on - Date time format when user cart created - * @property {string} last_modified - Date time format when user cart last modified - * @property {Object} [meta] - Extra meta data of user cart - * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user - * is doing fast checkout for the cart using buy now - * @property {boolean} [is_active] - Flag indicates user cart is active or not - * @property {Object} cashback - Cart level cashback data which denotes cashback - * amount and cashback message - * @property {Object[]} [payment_methods] - Payment methods list used to make the payment - * @property {string} [gstin] - GSTIN added in user cart - * @property {Object} [delivery_charges] - Delivery charges of user cart - * @property {boolean} [merge_qty] - Flag indicates cart has merged article or not - * @property {string} user_id - User Id of user cart - * @property {string} [app_id] - Application id of user cart - */ - -/** - * @typedef AbandonedCartResult - * @property {AbandonedCart[]} [items] - List of items in abandon cart - * @property {Object} [result] - Define the list of items with updated status + * @property {string} expire_at + * @property {Object} [promotion] + * @property {boolean} is_default + * @property {string} [comment] + * @property {Object[]} articles + * @property {Object} [coupon] + * @property {number} [bulk_coupon_discount] + * @property {string} _id + * @property {Object} [fynd_credits] + * @property {number[]} [fc_index_map] + * @property {string} [order_id] + * @property {number} [discount] + * @property {Object} [cod_charges] + * @property {Object} [payments] + * @property {string} [payment_mode] + * @property {Object[]} [shipments] + * @property {Object} [pick_up_customer_details] + * @property {number} uid + * @property {string} [checkout_mode] + * @property {number} [cart_value] + * @property {boolean} [is_archive] + * @property {string} created_on + * @property {string} last_modified + * @property {Object} [meta] + * @property {boolean} [buy_now] + * @property {boolean} [is_active] + * @property {Object} cashback + * @property {Object[]} [payment_methods] + * @property {string} [gstin] + * @property {Object} [delivery_charges] + * @property {boolean} [merge_qty] + * @property {string} user_id + * @property {string} [app_id] + */ + +/** + * @typedef AbandonedCartResponse + * @property {AbandonedCart[]} [items] + * @property {Object} [result] * @property {Page} [page] * @property {boolean} [success] - The request success is defined * @property {string} [message] - Message of the response @@ -1426,54 +1161,47 @@ const Joi = require("joi"); /** * @typedef PaymentSelectionLock - * @property {string} [payment_identifier] - Identifier for Payment Mode - * @property {string} [default_options] - Default Selection Payment Mode - * @property {boolean} [enabled] - Denotes if default payment selection is enable + * @property {string} [payment_identifier] + * @property {string} [default_options] + * @property {boolean} [enabled] */ /** * @typedef CartCurrency * @property {string} [code] - Currency code defined by ISO 4217:2015 - * @property {string} [symbol] - Currency symbol for currency of user cart prices + * @property {string} [symbol] */ /** * @typedef CartDetailCoupon - * @property {number} [cashback_amount] - Fields denotes cashback amount applied to cart - * @property {string} [cashback_message_primary] - Primary cashback message for - * coupon applied to cart - * @property {string} [cashback_message_secondary] - Secondary cashback message - * for coupon applied to cart - * @property {string} [coupon_code] - Coupon code to be applied to cart - * @property {string} [coupon_description] - Coupon description of the coupon - * applied to cart - * @property {string} [coupon_id] - Unique identifier of the coupon applied to cart - * @property {string} [coupon_subtitle] - Coupon subtitle of the coupon applied to cart - * @property {string} [coupon_title] - Coupon title of the coupon applied - * @property {string} [coupon_type] - Type of the coupon applied to cart - * @property {number} [coupon_value] - Value of the coupon applied to cart - * @property {number} [discount] - Total discount earned from coupon applied to cart - * @property {boolean} [is_applied] - Flag to determine where the coupon is - * applied to cart or not - * @property {boolean} [is_valid] - Determine where the coupon applied to cart is valid - * @property {number} [maximum_discount_value] - Maximum discount value of the - * coupon applied to cart - * @property {string} [message] - Coupon message of the coupon applied to cart - * @property {number} [minimum_cart_value] - Minimum cart value of the coupon - * applied to cart + * @property {number} [cashback_amount] + * @property {string} [cashback_message_primary] + * @property {string} [cashback_message_secondary] + * @property {string} [coupon_code] + * @property {string} [coupon_description] + * @property {string} [coupon_id] + * @property {string} [coupon_subtitle] + * @property {string} [coupon_title] + * @property {string} [coupon_type] + * @property {number} [coupon_value] + * @property {number} [discount] + * @property {boolean} [is_applied] + * @property {boolean} [is_valid] + * @property {number} [maximum_discount_value] + * @property {string} [message] + * @property {number} [minimum_cart_value] */ /** * @typedef ChargesThreshold - * @property {number} [charges] - Charges amount to be applied on cart - * @property {number} [threshold] - Threshold of cart value on which the charge - * should be applied + * @property {number} [charges] + * @property {number} [threshold] */ /** * @typedef DeliveryChargesConfig - * @property {boolean} [enabled] - Delivery charge enabled for the cart or not - * @property {ChargesThreshold[]} [charges] - Charges applicable based on threshold + * @property {boolean} [enabled] + * @property {ChargesThreshold[]} [charges] */ /** @@ -1482,734 +1210,546 @@ const Joi = require("joi"); */ /** - * @typedef CartDetailResult - * @property {number} [cart_id] - Unique identifier of the user cart - * @property {string} [uid] - Unique identifier of the user cart - * @property {string} [coupon_text] - Coupon text of coupon applied on cart - * @property {string} [id] - Unique identifier of the user cart - * @property {Object} [pan_config] - Pan card config states at what condition - * user should enter the pan card + * @typedef CartDetailResponse + * @property {number} [cart_id] + * @property {string} [uid] + * @property {string} [coupon_text] + * @property {string} [id] + * @property {Object} [pan_config] * @property {ShipmentPromise} [delivery_promise] - * @property {string} [comment] - Comment message to be added in user cart - * @property {CartProductInfo[]} [items] - Items data list in user cart that - * includes item id, item size, store id, available sizes and rest of the item - * related data + * @property {string} [comment] + * @property {CartProductInfo[]} [items] * @property {PaymentSelectionLock} [payment_selection_lock] - * @property {string} [delivery_charge_info] - Delivery charge in information - * message on shipment + * @property {string} [delivery_charge_info] * @property {CartCommonConfig} [common_config] * @property {CartDetailCoupon} [coupon] - * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict - * the checkout process - * @property {string} [message] - Message of the cart detail API response - * @property {Object} [notification] - Notification object which denotes - * notification data for user cart - * @property {string} [staff_user_id] - Staff employee user id if cart is - * created by staff employee for the customer - * @property {boolean} [success] - Success flag of get cart detail API response + * @property {boolean} [restrict_checkout] + * @property {string} [message] + * @property {Object} [notification] + * @property {string} [staff_user_id] + * @property {boolean} [success] * @property {CartBreakup} [breakup_values] - * @property {boolean} [is_valid] - Cart validity flag determines the if the - * response is valid or not + * @property {boolean} [is_valid] * @property {CartCurrency} [currency] - * @property {string} [checkout_mode] - Checkout mode of user cart - * @property {string} [last_modified] - Last modified timestamp of cart - * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user - * is doing fast checkout for the cart using buy now - * @property {string} [gstin] - GSTIN added in user cart - * @property {AppliedPromotion[]} [applied_promo_details] - List of applied - * promotions data to cart which includes promotion id, promotion name, offer - * text, description, buy rules, discount rules and promotion type - * @property {string} [pan_no] - Permanent Account Number of the user - * @property {Object} [custom_cart_meta] - Custom meta details added cart - * checkout API payload + * @property {string} [checkout_mode] + * @property {string} [last_modified] + * @property {boolean} [buy_now] + * @property {string} [gstin] + * @property {AppliedPromotion[]} [applied_promo_details] + * @property {string} [pan_no] + * @property {Object} [custom_cart_meta] */ /** * @typedef AddProductCart - * @property {number} [quantity] - Field to specify the product quantity that - * user wants to buy - * @property {string} [item_size] - Field to determine size of the product - * @property {number} [seller_id] - Unique identifier of the seller selected by - * the user from which user want to buy a product - * @property {Object[]} [parent_item_identifiers] - Fields to determine parent - * product of the product - * @property {string[]} [product_group_tags] - Field to specify the product - * groups of the product that the user is trying to add in cart - * @property {string} [article_id] - Unique identifier of an article - * @property {Object} [article_assignment] - Field to determine how article - * assignment should happen by article assignment level and strategy - * @property {number} [store_id] - Unique identifier of the store selected by - * the user from which user want to buy a product - * @property {string} [display] - Display field at article level - * @property {number} [item_id] - Unique identifier to identify product - * @property {Object} [extra_meta] - Extra meta data to be added at article - * level while add items to cart - * @property {Object} [_custom_json] - Field to add custom json at article level - * while add items to cart - * @property {Object} [meta] - Field to add meta data at article level - * @property {boolean} [pos] - Filed to determine whether user is making request - * from pos or not + * @property {number} [quantity] + * @property {string} [item_size] + * @property {number} [seller_id] + * @property {Object[]} [parent_item_identifiers] + * @property {string[]} [product_group_tags] + * @property {string} [article_id] + * @property {Object} [article_assignment] + * @property {number} [store_id] + * @property {string} [display] + * @property {number} [item_id] + * @property {Object} [extra_meta] + * @property {Object} [_custom_json] + * @property {Object} [meta] + * @property {boolean} [pos] * @property {string} [seller_identifier] - Add items using seller identifier for store os */ /** - * @typedef AddCartCreation - * @property {boolean} [new_cart] - Field to create to new cart whille user adds - * item to cart - * @property {AddProductCart[]} [items] - List of items detail which need to be - * added to cart like item id, item size, and item quantity + * @typedef AddCartRequest + * @property {boolean} [new_cart] + * @property {AddProductCart[]} [items] */ /** - * @typedef AddCartDetailResult + * @typedef AddCartDetailResponse * @property {boolean} [success] - True if all items are added successfully. * False if partially added or not added. - * @property {CartDetailResult} [cart] + * @property {CartDetailResponse} [cart] * @property {boolean} [partial] - When adding multiple items check if all * added. True if only few are added. - * @property {string} [message] - Message of add cart API response + * @property {string} [message] */ /** * @typedef UpdateProductCart - * @property {number} [quantity] - Field to update the quantity of the item in cart - * @property {string} [item_size] - Field to update the size of the product in cart - * @property {Object} [parent_item_identifiers] - Field to update parent product - * of the item in cart - * @property {Object} [meta] - Field to update meta of the item in cart - * @property {Object} [extra_meta] - Field to update extra meta of the product in cart - * @property {Object} [_custom_json] - Field to update custom json of the product in cart - * @property {number} [item_id] - Item id of the product that needs to be updated - * @property {number} [item_index] - Item index determines on which index the - * product falls to be updated + * @property {number} [quantity] + * @property {string} [item_size] + * @property {Object} [parent_item_identifiers] + * @property {Object} [meta] + * @property {Object} [extra_meta] + * @property {Object} [_custom_json] + * @property {number} [item_id] + * @property {number} [item_index] * @property {CartProductIdentifer} identifiers - * @property {string} [article_id] - Article id of the product in cart - */ - -/** - * @typedef FreeGiftItemCreation - * @property {string} promotion_id - Unique identifier of the free gift promotion. - * @property {string} item_id - Unique identifier of the selected free gift item. - * @property {string} item_size - Size of the selected free gift item. + * @property {string} [article_id] */ /** - * @typedef UpdateCartCreation + * @typedef UpdateCartRequest * @property {UpdateProductCart[]} [items] - * @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift - * items with updated sizes. - * @property {string} operation - Cart opertaion type + * @property {string} operation */ /** - * @typedef UpdateCartDetailResult + * @typedef UpdateCartDetailResponse * @property {boolean} [success] - True if all items are added successfully. * False if partially added or not added. - * @property {CartDetailResult} [cart] - * @property {string} [message] - Message of update cart API response + * @property {CartDetailResponse} [cart] + * @property {string} [message] */ /** * @typedef OverrideCartItemPromo - * @property {string} promo_id - Promotion id applied on product - * @property {string} promo_amount - Promotion amount applied on product - * @property {string} [promo_desc] - Promotion description applied on product + * @property {string} promo_id + * @property {string} promo_amount + * @property {string} [promo_desc] * @property {string} [rwrd_tndr] - * @property {Object[]} [item_list] - List of items - * @property {string} [parent_promo_id] - Parent promotion unique identifier + * @property {Object[]} [item_list] + * @property {string} [parent_promo_id] */ /** * @typedef OverrideCartItem - * @property {string} [seller_identifier] - Seller identifiers of the product size. - * @property {number} [quantity] - Item quantity, which you have added into cart - * @property {string} size - Item size, which you have added into cart - * @property {number} price_marked - Original price of product - * @property {number} amount_paid - Amount needs to paid for item - * @property {OverrideCartItemPromo[]} [promo_list] - List of promotion applied on item - * @property {Object} [extra_meta] - Extra meta to be added while checkout in order - * @property {number} item_id - Item unique id in user cart - * @property {number} discount - Discount amount applied on item - * @property {number} price_effective - Current per unit price of product after - * existing deductions + * @property {string} [seller_identifier] + * @property {number} [quantity] + * @property {string} size + * @property {number} price_marked + * @property {number} amount_paid + * @property {OverrideCartItemPromo[]} [promo_list] + * @property {Object} [extra_meta] + * @property {number} item_id + * @property {number} discount + * @property {number} price_effective */ /** * @typedef OverrideCheckoutReq - * @property {string} cart_id - The cart id of user cart - * @property {string} payment_mode - Payment mode from which the payment to be - * done for the order - * @property {Object} [billing_address] - Billing address json which includes - * customer address, customer phone, customer email, customer pincode, - * customer landmark and customer name - * @property {string} merchant_code - Merchant code of the payment mode selected - * to do the payment - * @property {string} payment_identifier - Payment identifier of the payment - * mode selected to do the payment - * @property {string} currency_code - Currency code for the price - * @property {string} aggregator - Aggregator name of the payment gateway - * @property {string} order_type - Order type of the order being placed like - * pickAtStore or HomeDelivery - * @property {string} [callback_url] - Callback url to be redirected after - * payment received/failed - * @property {OverrideCartItem[]} cart_items - List of items which includes - * their size, id, discount and promo details - * @property {number} [ordering_store] - Ordering store id of the store from - * which the order is getting placed - * @property {Object} [shipping_address] - Shipping address json which includes - * name, area, address, phone, area_code, state, country, country code and email - */ - -/** - * @typedef OverrideCheckoutResult - * @property {Object} data - Data of the user cart checkout includes cart data, - * address, user id, order type etc - * @property {Object} cart - Cart details in API response which included cart - * id, items in cart, promise, order type, breakup values etc. - * @property {string} success - Success flag of cart override checkout API response - * @property {string} order_id - Order id generated after placing order - * @property {string} message - Message of the cart override checkout API response - */ - -/** - * @typedef GetShareCartLinkCreation + * @property {string} cart_id + * @property {string} payment_mode + * @property {Object} [billing_address] + * @property {string} merchant_code + * @property {string} payment_identifier + * @property {string} currency_code + * @property {string} aggregator + * @property {string} order_type + * @property {string} [callback_url] + * @property {OverrideCartItem[]} cart_items + * @property {number} [ordering_store] + * @property {Object} [shipping_address] + */ + +/** + * @typedef OverrideCheckoutResponse + * @property {Object} data + * @property {Object} cart + * @property {string} success + * @property {string} order_id + * @property {string} message + */ + +/** + * @typedef GetShareCartLinkRequest * @property {string} [id] - Cart uid for generating sharing * @property {Object} [meta] - Staff, Ordering store or any other data. This * data will be used to generate link as well as sent as shared details. */ /** - * @typedef GetShareCartLinkResult - * @property {string} [token] - Short url unique id of the cart which is opted - * to share with other user - * @property {string} [share_url] - Short shareable final url which can populate - * shared cart items in one's cart or replaced one's cart with shared cart items + * @typedef GetShareCartLinkResponse + * @property {string} [token] - Short url unique id + * @property {string} [share_url] - Short shareable final url */ /** * @typedef SharedCartDetails * @property {Object} [source] - Share link device and other source information * @property {Object} [user] - User details of who generated share link - * @property {string} [token] - Short link id of the user cart that needs to be shared - * @property {string} [created_on] - Created on timestamp of user cart + * @property {string} [token] - Short link id + * @property {string} [created_on] * @property {Object} [meta] - Meta data sent while generating share cart link */ /** * @typedef SharedCart - * @property {string} [coupon_text] - Coupon text of the applied coupon on user cart - * @property {string} [id] - Cart id of shared cart + * @property {string} [coupon_text] + * @property {string} [id] * @property {ShipmentPromise} [delivery_promise] - * @property {string} [comment] - Comment message added in user cart - * @property {CartProductInfo[]} [items] - Items data list in user cart that - * includes item id, item size, store id, available sizes and rest of the item - * related data + * @property {string} [comment] + * @property {CartProductInfo[]} [items] * @property {SharedCartDetails} [shared_cart_details] * @property {PaymentSelectionLock} [payment_selection_lock] - * @property {string} [delivery_charge_info] - Delivery charge info message of - * the user cart - * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict - * the checkout process - * @property {string} [message] - Message of the get shared cart API response + * @property {string} [delivery_charge_info] + * @property {boolean} [restrict_checkout] + * @property {string} [message] * @property {CartBreakup} [breakup_values] - * @property {boolean} [is_valid] - Valid flag for get shared cart detail API - * @property {string} [uid] - Cart id of the user cart - * @property {string} [checkout_mode] - Checkout mode of address on which - * address to be used for which checkout mode of cart + * @property {boolean} [is_valid] + * @property {string} [uid] + * @property {string} [checkout_mode] * @property {CartCurrency} [currency] - * @property {string} [last_modified] - Last modified timestamp of user cart - * @property {boolean} [buy_now] - Buy now flag of user cart - * @property {number} [cart_id] - Cart id of user cart for generating cart sharing token - * @property {string} [gstin] - GSTIN added in user cart - * @property {Object} [custom_cart_meta] - Custom cart meta of user cart added - * via update cart meta API + * @property {string} [last_modified] + * @property {boolean} [buy_now] + * @property {number} [cart_id] + * @property {string} [gstin] + * @property {Object} [custom_cart_meta] */ /** - * @typedef SharedCartResult + * @typedef SharedCartResponse * @property {SharedCart} [cart] - * @property {string} [error] - Error details if any error occurs which includes - * type of error, error code and error message + * @property {string} [error] */ /** * @typedef CartList - * @property {string} [cart_id] - The cart id of user - * @property {Object} [pick_up_customer_details] - Customer contact details for - * customer pickup at store - * @property {number} [cart_value] - Total amount of cart - * @property {string} [created_on] - Date format when cart created - * @property {string} [user_id] - User id which is associated with cart - * @property {string} [currency_code] - Active cart currency code - * @property {number} [item_counts] - Article total count in cart + * @property {string} [cart_id] + * @property {Object} [pick_up_customer_details] + * @property {number} [cart_value] + * @property {string} [created_on] + * @property {string} [user_id] + * @property {string} [currency_code] + * @property {number} [item_counts] */ /** - * @typedef MultiCartResult - * @property {boolean} [success] - True if get list of cart successfully. - * @property {CartList[]} [data] - List of active carts and their item's count + * @typedef MultiCartResponse + * @property {boolean} [success] + * @property {CartList[]} [data] */ /** * @typedef UpdateUserCartMapping - * @property {string} user_id - User Id of user for which we map with the cart + * @property {string} user_id */ /** * @typedef UserInfo - * @property {string} [gender] - User gender - * @property {string} [modified_on] - Date format of user when user last modified - * @property {string} [_id] - Unique Identifier of user - * @property {string} [uid] - Unique UID of user - * @property {string} [external_id] - Unique external id - * @property {string} [mobile] - 10 digit Mobile number of user - * @property {string} [last_name] - Last name of user - * @property {string} [created_at] - Date format of user when user registered - * @property {string} [first_name] - First name of user + * @property {string} [gender] + * @property {string} [modified_on] + * @property {string} [_id] + * @property {string} [uid] + * @property {string} [external_id] + * @property {string} [mobile] + * @property {string} [last_name] + * @property {string} [created_at] + * @property {string} [first_name] */ /** - * @typedef UserCartMappingResult - * @property {string} [coupon_text] - Coupon text of coupon applied on cart + * @typedef UserCartMappingResponse + * @property {string} [coupon_text] * @property {UserInfo} [user] - * @property {string} [id] - Unique identifier of the user cart - * @property {Object} [pan_config] - Pan card config states at what condition - * user should enter the pan card + * @property {string} [id] + * @property {Object} [pan_config] * @property {ShipmentPromise} [delivery_promise] - * @property {string} [comment] - Comment message to be added in user cart - * @property {CartProductInfo[]} [items] - Items data list in user cart that - * includes item id, item size, store id, available sizes and rest of the item - * related data + * @property {string} [comment] + * @property {CartProductInfo[]} [items] * @property {PaymentSelectionLock} [payment_selection_lock] - * @property {string} [delivery_charge_info] - Delivery charge in information - * message on shipment - * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict - * the checkout process - * @property {string} [message] - Message of the get cart detail API response + * @property {string} [delivery_charge_info] + * @property {boolean} [restrict_checkout] + * @property {string} [message] * @property {CartBreakup} [breakup_values] - * @property {boolean} [is_valid] - Cart validity flag determines the if the - * response is valid or not + * @property {boolean} [is_valid] * @property {CartCurrency} [currency] - * @property {string} [checkout_mode] - Checkout mode of user cart - * @property {string} [last_modified] - Last modified timestamp of cart - * @property {boolean} [buy_now] - Buy now flag for the cart which denotes user - * is doing fast checkout for the cart using buy now - * @property {string} [gstin] - GSTIN added in user cart - * @property {Object} [custom_cart_meta] - Custom meta details added cart - * checkout API payload - * @property {AppliedPromotion[]} [applied_promo_details] - List of applied - * promotions data to cart which includes promotion id, promotion name, offer - * text, description, buy rules, discount rules and promotion type - * @property {string} [pan_no] - Permanent Account Number of the user + * @property {string} [checkout_mode] + * @property {string} [last_modified] + * @property {boolean} [buy_now] + * @property {string} [gstin] + * @property {Object} [custom_cart_meta] + * @property {AppliedPromotion[]} [applied_promo_details] + * @property {string} [pan_no] */ /** - * @typedef PlatformAddCartDetails - * @property {string} [user_id] - The user id of user, for which we need to add - * item into cart - * @property {boolean} [new_cart] - Field to create to new cart whille user adds - * item to cart - * @property {AddProductCart[]} [items] - List of items detail which need to be - * added to cart like item id, item size, and item quantity + * @typedef PlatformAddCartRequest + * @property {string} [user_id] + * @property {boolean} [new_cart] + * @property {AddProductCart[]} [items] */ /** - * @typedef PlatformUpdateCartDetails - * @property {string} [user_id] - The user id of user, for which we need to - * update the cart - * @property {UpdateProductCart[]} [items] - List items data that needs to be - * updated in cart - * @property {FreeGiftItemCreation[]} [free_gift_items] - List of free gift - * items with updated sizes. - * @property {string} operation - Field to determine if item to be removed from - * cart or it needs to be updated + * @typedef PlatformUpdateCartRequest + * @property {string} [user_id] + * @property {UpdateProductCart[]} [items] + * @property {string} operation */ /** - * @typedef DeleteCartDetails - * @property {string[]} [cart_id_list] - List of all cart ids, which need to delete + * @typedef DeleteCartRequest + * @property {string[]} [cart_id_list] */ /** - * @typedef DeleteCartDetailResult + * @typedef DeleteCartDetailResponse * @property {boolean} [success] - True if cart is archived successfully. False * if not archived. - * @property {string} [message] - Message for delete cart response + * @property {string} [message] */ /** - * @typedef CartItemCountResult + * @typedef CartItemCountResponse * @property {number} [user_cart_items_count] - Item count present in cart */ /** * @typedef Coupon - * @property {string} [title] - Coupon Title of the coupon applied denotes name - * of the coupon - * @property {number} [max_discount_value] - Maximum discount value of the - * coupon applied to cart - * @property {string} [coupon_code] - Coupon code of the coupon applied on cart - * @property {boolean} [is_applied] - Flag to determine where the coupon is - * applied to cart or not - * @property {string} [coupon_type] - Type of the coupon applied to cart - * @property {string} [expires_on] - Message to display to user for expiry of the coupon - * @property {number} [coupon_value] - Coupon value of the coupon applied to cart - * @property {string} [sub_title] - Coupon subtitle of the coupon applied to - * cart which is used to display - * @property {number} [minimum_cart_value] - Minimum cart value of the coupon - * applied to cart - * @property {boolean} [is_applicable] - Flag to determine where the coupon is - * applicable to cart or not - * @property {string} [message] - Coupon message of the coupon applied to cart - * @property {string} [description] - Coupon description of the coupon applied to cart - * @property {string} [start_date] - Start date of the coupon when the coupon - * will be live for the users to apply on cart - * @property {string} [end_date] - End date of the coupon on which the coupon expires - * @property {string} [coupon_applicable_message] - Message which is used to - * display to the customer if the coupon is applied successfully + * @property {string} [title] + * @property {number} [max_discount_value] + * @property {string} [coupon_code] + * @property {boolean} [is_applied] + * @property {string} [coupon_type] + * @property {string} [expires_on] + * @property {number} [coupon_value] + * @property {string} [sub_title] + * @property {number} [minimum_cart_value] + * @property {boolean} [is_applicable] + * @property {string} [message] + * @property {string} [description] + * @property {string} [start_date] + * @property {string} [end_date] + * @property {string} [coupon_applicable_message] */ /** * @typedef PageCoupon - * @property {boolean} [has_next] - Denotes if next page of coupon is available - * @property {number} [current] - Current page number - * @property {number} [total] - Total pages of coupon availalbe - * @property {number} [total_item_count] - Total coupons are available for the cart - * @property {boolean} [has_previous] - Denotes if previous page of the coupon - * is available + * @property {boolean} [has_next] + * @property {number} [current] + * @property {number} [total] + * @property {number} [total_item_count] + * @property {boolean} [has_previous] */ /** - * @typedef GetCouponResult - * @property {Coupon[]} [available_coupon_list] - List of available coupon which - * can be applied on cart + * @typedef GetCouponResponse + * @property {Coupon[]} [available_coupon_list] * @property {PageCoupon} [page] */ /** - * @typedef ApplyCouponDetails + * @typedef ApplyCouponRequest * @property {string} coupon_code - Coupon code to be applied */ /** * @typedef GeoLocation - * @property {number} [longitude] - Longitude coordinate for address - * @property {number} [latitude] - Latitude coordinate for address + * @property {number} [longitude] + * @property {number} [latitude] */ /** * @typedef PlatformAddress - * @property {string} [phone] - Phone number for address - * @property {string} [id] - Id of the address - * @property {string} [area_code_slug] - Area code slug for address. example - * pincode is slug for India - * @property {string} [country_code] - Country code of address + * @property {string} [phone] + * @property {string} [id] + * @property {string} [area_code_slug] + * @property {string} [country_code] * @property {GeoLocation} [geo_location] - * @property {string} [country] - Country of address - * @property {string} [state] - State of the address - * @property {boolean} [is_default_address] - Default address flag if no address - * selected then this should be the default address selected - * @property {string[]} [tags] - Tags of address from which it can be identified - * @property {string} [created_by_user_id] - Created by user id of address - * @property {string} [landmark] - Landmark of address - * @property {string} [email] - Email address for address data - * @property {string} [area_code] - Area code of the address - * @property {string} [checkout_mode] - Checkout mode of address on which - * address to be used for which checkout mode of cart - * @property {Object} [meta] - Metadata of the address - * @property {boolean} [is_active] - States whether address is active or not - * @property {string} [name] - Name of person in address data to whom it belongs to - * @property {Object} [google_map_point] - Google map point of the address - * @property {string} [cart_id] - The cart id of user cart - * @property {string} [city] - City of the address - * @property {string} [sector] - Sector of the address + * @property {string} [country] + * @property {string} [state] + * @property {boolean} [is_default_address] + * @property {string[]} [tags] + * @property {string} [created_by_user_id] + * @property {string} [landmark] + * @property {string} [email] + * @property {string} [area_code] + * @property {string} [checkout_mode] + * @property {Object} [meta] + * @property {boolean} [is_active] + * @property {string} [name] + * @property {Object} [google_map_point] + * @property {string} [cart_id] + * @property {string} [city] + * @property {string} [sector] * @property {string} [state_code] - State code for international address - * @property {string} [area] - Area description for address - * @property {string} [user_id] - User id of address for which address is created - * @property {string} [address_type] - Address type of address - * @property {string} [address] - Address description for address data - * @property {string} [country_phone_code] - Country phone code for address - * @property {string} [country_iso_code] - Country iso code for address - * @property {Object} [_custom_json] - Custom json of the address + * @property {string} [area] + * @property {string} [user_id] + * @property {string} [address_type] + * @property {string} [address] + * @property {string} [country_phone_code] + * @property {string} [country_iso_code] + * @property {Object} [_custom_json] */ /** - * @typedef ValidationConfig - * @property {number} address_max_limit - The maximum number of addresses a user can have. - * @property {number} user_address_count - The total number of addresses saved by a user. + * @typedef PlatformGetAddressesResponse + * @property {PlatformAddress[]} [address] */ /** - * @typedef PlatformGetAddressesDetails - * @property {PlatformAddress[]} [address] - List of all address saved by customer - * @property {ValidationConfig} [validation_config] + * @typedef SaveAddressResponse + * @property {string} [id] + * @property {boolean} [success] + * @property {boolean} [is_default_address] */ /** - * @typedef SaveAddressDetails - * @property {string} [id] - Id of the address - * @property {boolean} [success] - Success flag of save address Response - * @property {boolean} [is_default_address] - Default address flag if no address - * selected then this should be the default address selected + * @typedef UpdateAddressResponse + * @property {string} [id] + * @property {boolean} [is_default_address] + * @property {boolean} [success] + * @property {boolean} [is_updated] */ /** - * @typedef UpdateAddressDetails - * @property {string} [id] - ID of an address - * @property {boolean} [is_default_address] - Default address flag if no address - * selected then this should be the default address selected - * @property {boolean} [success] - Success flag of update address response - * @property {boolean} [is_updated] - Updated flag for update address operation - * if the address updated or not + * @typedef DeleteAddressResponse + * @property {string} [id] + * @property {boolean} [is_deleted] */ /** - * @typedef DeleteAddressResult - * @property {string} [id] - Id of the address - * @property {boolean} [is_deleted] - Deleted flag in delete address response - * states whether the address was deleted or not + * @typedef PlatformSelectCartAddressRequest + * @property {string} [cart_id] + * @property {string} [billing_address_id] + * @property {string} [checkout_mode] + * @property {string} [id] + * @property {string} [user_id] */ /** - * @typedef PlatformSelectCartAddress - * @property {string} [cart_id] - Cart id of the user cart for which the select - * address operation performed - * @property {string} [billing_address_id] - Billing address id selected by user - * on which shipment bill to be generated - * @property {string} [checkout_mode] - The checkout mode in cart - * @property {string} [id] - Address is selected by user on which shipment to be delivered - * @property {string} [user_id] - Unique Identifier of user + * @typedef ShipmentArticle + * @property {string} [meta] + * @property {string} [quantity] + * @property {string} [article_id] */ /** - * @typedef ShipmentArticle - * @property {string} [meta] - Article meta data for shipment - * @property {string} [quantity] - Article quantity for shipment - * @property {string} [article_id] - Article unique id for shipment - */ - -/** - * @typedef PlatformShipmentDetails - * @property {number} [shipments] - Count of shipments that will be shipped - * @property {number} [fulfillment_id] - Fulfilment id of the shipment - * @property {CartProductInfo[]} [items] - Item details in the shipment - * @property {Object} [dp_options] - Delivery partner options that are available - * to deliver the shipment - * @property {string} [shipment_type] - Shipment type of the shipment returned - * in get shipments API like single_shipment or multiple shipment. Single - * Shipment means 1 item in 1 shipment and vice versa in the other one - * @property {string} [order_type] - Order type of the shipment like pickAtStore - * or HomeDelivery - * @property {string} [box_type] - Box type of the shipment in which the - * shipment will be delivered + * @typedef PlatformShipmentResponse + * @property {number} [shipments] + * @property {number} [fulfillment_id] + * @property {CartProductInfo[]} [items] + * @property {Object} [dp_options] + * @property {string} [shipment_type] + * @property {string} [order_type] + * @property {string} [box_type] * @property {ShipmentPromise} [promise] - * @property {string} [dp_id] - Delivery partner id of the shipment - * @property {string} [fulfillment_type] - Fulfilment type of shipment - * @property {ShipmentArticle[]} [articles] - List of articles in shipment + * @property {string} [dp_id] + * @property {string} [fulfillment_type] + * @property {ShipmentArticle[]} [articles] */ /** - * @typedef PlatformCartShipmentsResult - * @property {string} [coupon_text] - Coupon text of coupon applied on cart - * @property {string} [id] - Cart id of the user cart - * @property {Object} [pan_config] - Pan card config states at what condition - * user should enter the pan card + * @typedef PlatformCartShipmentsResponse + * @property {string} [coupon_text] + * @property {string} [id] + * @property {Object} [pan_config] * @property {ShipmentPromise} [delivery_promise] - * @property {string} [comment] - Comment message added in cart - * @property {CartProductInfo[]} [items] - List of items in cart + * @property {string} [comment] + * @property {CartProductInfo[]} [items] * @property {PaymentSelectionLock} [payment_selection_lock] - * @property {string} [delivery_charge_info] - Delivery charge in information - * message on shipment - * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict - * the checkout process - * @property {string} [message] - Response message of get shipments API + * @property {string} [delivery_charge_info] + * @property {boolean} [restrict_checkout] + * @property {string} [message] * @property {CartBreakup} [breakup_values] - * @property {string} [staff_user_id] - Staff employee user id if cart is - * created by staff employee for the customer - * @property {boolean} [is_valid] - Cart validity flag determines the if the - * response is valid or not - * @property {PlatformShipmentDetails[]} [shipments] - List of shipments that - * will be shipped + * @property {string} [staff_user_id] + * @property {boolean} [is_valid] + * @property {PlatformShipmentResponse[]} [shipments] * @property {CartCurrency} [currency] - * @property {string} [checkout_mode] - Checkout mode of cart - * @property {string} [last_modified] - Last modified timestamp of cart - * @property {boolean} [buy_now] - Buy now flag of user cart - * @property {string} [gstin] - GSTIN number added in cart - * @property {AppliedPromotion[]} [applied_promo_details] - List of applied - * promotions data to cart which includes promotion id, promotion name, offer - * text, description, buy rules, discount rules and promotion type - * @property {boolean} [error] - Error details if any error occurs which - * includes type of error, error code and error message - * @property {string} [pan_no] - Permanent Account Number of the user - * @property {Object} [custom_cart_meta] - Custom cart meta details added in cart + * @property {string} [checkout_mode] + * @property {string} [last_modified] + * @property {boolean} [buy_now] + * @property {string} [gstin] + * @property {AppliedPromotion[]} [applied_promo_details] + * @property {boolean} [error] + * @property {string} [pan_no] + * @property {Object} [custom_cart_meta] */ /** * @typedef UpdateCartShipmentItem * @property {number} [quantity] - Quantity of product in shipment * @property {string} shipment_type - Shipment delivery type - * @property {string} article_uid - Article unique id for shipment + * @property {string} article_uid - Article mongo id */ /** - * @typedef UpdateCartShipmentCreation - * @property {UpdateCartShipmentItem[]} shipments - List of Shipments which - * includes shipment data like shipment items, shipment promise, Shipment - * type, shipment order type, shipment dp options etc + * @typedef UpdateCartShipmentRequest + * @property {UpdateCartShipmentItem[]} shipments */ /** - * @typedef PlatformCartMetaCreation - * @property {string} [gstin] - GSTIN number to be added in user cart + * @typedef PlatformCartMetaRequest + * @property {string} [gstin] * @property {Object} [pick_up_customer_details] - Customer contact details for * customer pickup at store - * @property {string} [checkout_mode] - Checkout mode of user cart - * @property {Object} [gift_details] - Gift details is open json which can - * include gift message - * @property {string} [pan_no] - Permanent Account Number of the user - * @property {string} [comment] - Comment message to be added in user cart + * @property {string} [checkout_mode] + * @property {Object} [gift_details] + * @property {string} [pan_no] + * @property {string} [comment] * @property {string} [staff_user_id] - Staff user id */ /** - * @typedef CartMetaDetails - * @property {boolean} [is_valid] - Whether added meta was vaild - * @property {string} [message] - Detailed message that used to display + * @typedef CartMetaResponse + * @property {boolean} [is_valid] + * @property {string} [message] */ /** - * @typedef CartMetaMissingDetails - * @property {string[]} [errors] - Detailed errors for invalid cart meta request + * @typedef CartMetaMissingResponse + * @property {string[]} [errors] */ /** * @typedef StaffCheckout - * @property {string} [employee_code] - Employee code of staff who does checkout - * on behalf of customer - * @property {string} _id - Id of staff who does checkout on behalf of customer - * @property {string} user - User id of the employee who does checkout on behalf - * of customer - * @property {string} last_name - Last name of staff employee who does checkout - * on behalf of customer - * @property {string} first_name - First name of staff emplyee who does checkout - * on behalf of customer + * @property {string} [employee_code] + * @property {string} _id + * @property {string} user + * @property {string} last_name + * @property {string} first_name */ /** * @typedef CustomerDetails - * @property {string} [name] - Name of customer to be added in customer detail - * while checkout - * @property {string} [email] - Email address of the customer to be added in - * customer detail while checkout - * @property {string} mobile - Mobile number of customer to be added in customer - * detail while checkout + * @property {string} [name] + * @property {string} [email] + * @property {string} mobile */ /** * @typedef Files - * @property {string} key - Key represents name of file - * @property {string[]} values - List of urls path - */ - -/** - * @typedef CartCheckoutCustomMeta - * @property {string} key - Key name of custom meta - * @property {string} value - Value to be added in key - */ - -/** - * @typedef PlatformCartCheckoutDetailCreation - * @property {CartCheckoutCustomMeta[]} [custom_meta] - * @property {string} [address_id] - * @property {string} [payment_identifier] - * @property {Object} [payment_params] - * @property {boolean} [payment_auto_confirm] - * @property {string} id - * @property {boolean} [pos] - * @property {string} [billing_address_id] - * @property {string} [merchant_code] - * @property {string} [aggregator] - * @property {number} [pick_at_store_uid] - * @property {string} [device_id] - * @property {Object} [delivery_address] - * @property {string} payment_mode - * @property {string} [checkout_mode] - * @property {CustomerDetails} [customer_details] - Customer details - * @property {Object} [meta] - * @property {StaffCheckout} [staff] - * @property {string} [employee_code] - * @property {Object} [billing_address] - * @property {string} [callback_url] - * @property {string} [user_id] - * @property {Object} [extra_meta] - * @property {string} order_type - * @property {Files[]} [files] - List of file url - * @property {number} [ordering_store] - * @property {Object} [payment_extra_identifiers] - * @property {string} [iin] - * @property {string} [network] - * @property {string} [type] - * @property {string} [card_id] + * @property {string} key + * @property {string[]} values */ /** * @typedef CheckCart - * @property {string} [coupon_text] - Coupon text of the applied coupon on order placed - * @property {string} [cod_message] - Cash On Delivery message for the order placed - * @property {string} [id] - Cart id of the user cart - * @property {string} [store_code] - Store code from which the order placed + * @property {string} [coupon_text] + * @property {string} [cod_message] + * @property {string} [id] + * @property {string} [store_code] * @property {ShipmentPromise} [delivery_promise] - * @property {string} [comment] - Comment message added in cart after order placed - * @property {string} [user_type] - User type of the cart who places the order - * @property {CartProductInfo[]} [items] - Items details in cart after order placed - * @property {string} [error_message] - Error details if any error occurs which - * includes type of error, error code and error message - * @property {boolean} [success] - Success flag of checkout cart API response + * @property {string} [comment] + * @property {string} [user_type] + * @property {CartProductInfo[]} [items] + * @property {string} [error_message] + * @property {boolean} [success] * @property {PaymentSelectionLock} [payment_selection_lock] - * @property {string} [delivery_charge_info] - Delivery charge in information - * message on shipment - * @property {boolean} [restrict_checkout] - Restrict checkout flag to restrict - * the checkout process - * @property {string} [order_id] - Order id generated after placing order - * @property {string} [message] - Message of the cart checkout API response + * @property {string} [delivery_charge_info] + * @property {boolean} [restrict_checkout] + * @property {string} [order_id] + * @property {string} [message] * @property {CartBreakup} [breakup_values] - * @property {number} [cod_charges] - Cash On Delivery charges of the user cart - * @property {boolean} [is_valid] - Valid flag fotr the checkout response if - * order placed was valid - * @property {string} [uid] - Cart id of user cart - * @property {string} [checkout_mode] - Checkout mode of user cart + * @property {number} [cod_charges] + * @property {boolean} [is_valid] + * @property {string} [uid] + * @property {string} [checkout_mode] * @property {CartCurrency} [currency] - * @property {string} [last_modified] - Last modified timestamp of cart - * @property {boolean} [buy_now] - Buy now flag of user cart - * @property {number} [delivery_charge_order_value] - Delivery charge order value - * @property {number} [cart_id] - Cart id of the user cart for which the order placed - * @property {Object[]} [store_emps] - Store employees data - * @property {string} [gstin] - GSTIN number added in cart - * @property {boolean} [cod_available] - Whether Cash On Delivery available - * @property {number} [delivery_charges] - Delivery charges of the order placed - * via checkout API - * @property {Object} [custom_cart_meta] - Custom meta details added cart - * checkout API payload - */ - -/** - * @typedef CartCheckoutDetails - * @property {string} [app_intercept_url] - App intercept url which is used to - * redirect on app after payment in confirmed/failed - * @property {Object} [data] - Data of the user cart checkout includes cart - * data, address, user id, order type etc - * @property {CheckCart} [cart] - * @property {boolean} [success] - Success flag of cart checkout API response - * @property {string} [callback_url] - Callback url to be redirected after - * payment received/failed - * @property {string} [payment_confirm_url] - Payment confirm url used to - * redirect after payment is confirmed - * @property {string} [order_id] - Order id generated after placing order - * @property {string} [message] - Message of the cart checkout v2 API response + * @property {string} [last_modified] + * @property {boolean} [buy_now] + * @property {number} [delivery_charge_order_value] + * @property {number} [cart_id] + * @property {Object[]} [store_emps] + * @property {string} [gstin] + * @property {boolean} [cod_available] + * @property {number} [delivery_charges] + * @property {Object} [custom_cart_meta] */ /** - * @typedef CartCheckoutResult + * @typedef CartCheckoutResponse * @property {string} [app_intercept_url] * @property {Object} [data] * @property {CheckCart} [cart] @@ -2221,256 +1761,196 @@ const Joi = require("joi"); */ /** - * @typedef CartDeliveryModesDetails + * @typedef CartDeliveryModesResponse * @property {number[]} [pickup_stores] - Store pick up available store uids * @property {string[]} [available_modes] - Available delivery modes */ /** * @typedef PickupStoreDetail - * @property {string} [country] - Country of address - * @property {string} [state] - State of the address - * @property {string} [city] - City of the address - * @property {string} [phone] - Phone number for address - * @property {string} [area_code] - Area code of the address - * @property {number} [uid] - Uid of the address - * @property {string} [area_code_slug] - Area code slug for address. example - * pincode is slug for India - * @property {string} [address_type] - Address type of address - * @property {string} [area] - Area description for address - * @property {number} [id] - Id of the address - * @property {string} [store_manager_name] - Name of store manager - * @property {string} [name] - Name of person in address data to whom it belongs to - * @property {string} [store_code] - Store code from which the order placed - * @property {string} [landmark] - Landmark of address - * @property {string} [email] - Email address for address data - * @property {number} [pincode] - Address pincode - * @property {string} [address] - Address description for address data - */ - -/** - * @typedef StoreDetails - * @property {PickupStoreDetail[]} [items] - List of items need to pickup from store - */ - -/** - * @typedef CartPaymentUpdate - * @property {string} [address_id] - Address id of the user on which the order - * to be delivered - * @property {string} [payment_mode] - Payment mode from which the payment to be - * done for the order - * @property {string} [aggregator_name] - Aggregator name of the payment gateway - * @property {string} [merchant_code] - Merchant code of the payment mode - * selected to do the payment - * @property {string} [payment_identifier] - Payment identifier of the payment - * mode selected to do the payment - * @property {string} [id] - Cart id of the user cart + * @property {string} [country] + * @property {string} [state] + * @property {string} [city] + * @property {string} [phone] + * @property {string} [area_code] + * @property {number} [uid] + * @property {string} [area_code_slug] + * @property {string} [address_type] + * @property {string} [area] + * @property {number} [id] + * @property {string} [store_manager_name] + * @property {string} [name] + * @property {string} [store_code] + * @property {string} [landmark] + * @property {string} [email] + * @property {number} [pincode] + * @property {string} [address] + */ + +/** + * @typedef StoreDetailsResponse + * @property {PickupStoreDetail[]} [items] + */ + +/** + * @typedef UpdateCartPaymentRequest + * @property {string} [address_id] + * @property {string} [payment_mode] + * @property {string} [aggregator_name] + * @property {string} [merchant_code] + * @property {string} [payment_identifier] + * @property {string} [id] */ /** * @typedef CouponValidity - * @property {string} [title] - Coupon Title of the coupon applied - * @property {boolean} [next_validation_required] - Flag for coupon validation - * required on next page or not - * @property {boolean} [valid] - Valid flag which denotes if the applied coupon - * is valid or not - * @property {string} [display_message_en] - Display message for coupon validity - * @property {string} [code] - Coupon code of the coupon applied - * @property {number} [discount] - Coupon discount value of the coupon applied - * @property {string} [error_en] - Error message for the selected payment mode. + * @property {string} [title] + * @property {boolean} [next_validation_required] + * @property {boolean} [valid] + * @property {string} [display_message_en] + * @property {string} [code] + * @property {number} [discount] */ /** * @typedef PaymentCouponValidate - * @property {boolean} success - Success flag of coupon payment mode validity API response - * @property {string} [message] - Payment mode valid message for coupon + * @property {boolean} success + * @property {string} [message] * @property {CouponValidity} [coupon_validity] */ /** * @typedef PaymentMeta - * @property {string} [payment_gateway] - Payment gateway used to do the payment - * @property {string} [type] - Type of card if payment mode is card to do the payment - * @property {string} [payment_identifier] - Payment identifier of the payment - * mode selected to do the payment - * @property {string} [merchant_code] - Merchant code of the payment mode - * selected to do the payment + * @property {string} [payment_gateway] + * @property {string} [type] + * @property {string} [payment_identifier] + * @property {string} [merchant_code] */ /** * @typedef PaymentMethod - * @property {string} mode - Payment mode of payment method used to make payment - * @property {string} [payment] - Payment name of payment method used to make payment + * @property {string} mode + * @property {string} [payment] * @property {PaymentMeta} payment_meta - * @property {number} [amount] - Amount of the payment mode to be paid - * @property {string} [name] - Name of the payment mode used to make payment - * @property {Object} [payment_extra_identifiers] - Payment extra identifier for - * the payment mode to do the payment - */ - -/** - * @typedef PlatformCartCheckoutDetailV2Creation - * @property {string} [address_id] - Address id of the user on which the order - * to be delivered - * @property {string} [payment_identifier] - Payment identifier of the payment - * mode selected to do the payment - * @property {Object} [payment_params] - Payment params which includes payment - * identifier and merchant code - * @property {CartCheckoutCustomMeta[]} [custom_meta] - Custom meta data to be - * added in order - * @property {boolean} [payment_auto_confirm] - Payment auto confirm flag if - * payment need not to be collected from user - * @property {string} id - Cart id of the user cart - * @property {boolean} [pos] - Filed to determine whether user is making request - * from pos or not - * @property {string} [billing_address_id] - Billing address id of the customer - * on which the invoice to be generated after the order is placed - * @property {string} [merchant_code] - Merchant code of the payment mode - * selected to do the payment - * @property {string} [aggregator] - Aggregator name of the payment gateway - * @property {number} [pick_at_store_uid] - Store id where we have to pick product - * @property {string} [device_id] - Device id - * @property {Object} [delivery_address] - Delivery address data which includes - * customer address, customer phone, customer email, customer pincode, - * customer landmark and customer name - * @property {string} [payment_mode] - Payment mode from which the payment to be - * done for the order - * @property {string} [checkout_mode] - Mode of checkout used in cart - * @property {CustomerDetails} [customer_details] - * @property {Object} [meta] - Meta data to be added in order - * @property {PaymentMethod[]} payment_methods - Payment methods list used to - * make the payment + * @property {number} [amount] + * @property {string} [name] + * @property {Object} [payment_extra_identifiers] + */ + +/** + * @typedef PlatformCartCheckoutDetailV2Request + * @property {string} [address_id] + * @property {string} [payment_identifier] + * @property {Object} [payment_params] + * @property {Object} [custom_meta] + * @property {boolean} [payment_auto_confirm] + * @property {string} id + * @property {boolean} [pos] + * @property {string} [billing_address_id] + * @property {string} [merchant_code] + * @property {string} [aggregator] + * @property {number} [pick_at_store_uid] + * @property {string} [device_id] + * @property {Object} [delivery_address] + * @property {string} [payment_mode] + * @property {string} [checkout_mode] + * @property {Object} [customer_details] - Customer details + * @property {Object} [meta] + * @property {PaymentMethod[]} payment_methods * @property {StaffCheckout} [staff] - * @property {string} [employee_code] - Employee code of staff who does checkout - * on behalf of customer - * @property {Object} [billing_address] - Billing address json which includes - * customer address, customer phone, customer email, customer pincode, - * customer landmark and customer name - * @property {string} [callback_url] - Callback url after payment received/failed - * @property {string} user_id - The user id of user cart - * @property {Object} [extra_meta] - Extra meta to be added while checkout in order - * @property {string} order_type - Order type of the order being placed like - * pickAtStore or HomeDelivery + * @property {string} [employee_code] + * @property {Object} [billing_address] + * @property {string} [callback_url] + * @property {string} user_id + * @property {Object} [extra_meta] + * @property {string} order_type * @property {Files[]} [files] - List of file url - * @property {number} [ordering_store] - Ordering store id of the store from - * which the order is getting placed - * @property {string} [iin] - Issuer Identification Number number of card if - * payment mode is card to do the payment - * @property {string} [network] - Network of card if payment mode is card to do - * the payment - * @property {string} [type] - Type of cart if payment mode is card to do the payment - * @property {string} [card_id] - Saved card id if payment mode is card to do the payment + * @property {number} [ordering_store] + * @property {string} [iin] + * @property {string} [network] + * @property {string} [type] + * @property {string} [card_id] */ /** * @typedef UpdateCartPaymentRequestV2 - * @property {string} [address_id] - Address id of the user address selected to - * deliver the shipment - * @property {string} [payment_mode] - Payment mode of the payment selected to - * do the payment - * @property {string} [aggregator_name] - Aggregator name of the payment gateway - * @property {string} [merchant_code] - Merchant code of the payment mode - * selected to do the payment - * @property {string} [payment_identifier] - Payment identifier of the payment - * mode selected to do the payment - * @property {string} [id] - Cart id of the user cart for which the update cart - * payment operation performed + * @property {string} [address_id] + * @property {string} [payment_mode] + * @property {string} [aggregator_name] + * @property {string} [merchant_code] + * @property {string} [payment_identifier] + * @property {string} [id] * @property {PaymentMethod[]} [payment_methods] */ /** * @typedef PriceMinMax - * @property {number} [min] - Min price of article added in user cart - * @property {number} [max] - Max price of article added in user cart + * @property {number} [min] + * @property {number} [max] */ /** * @typedef ItemPriceDetails * @property {PriceMinMax} [marked] * @property {PriceMinMax} [effective] - * @property {string} [currency] - The currency code for price - */ - -/** - * @typedef ArticlePriceDetails - * @property {number} [marked] - The Marked Price refers to the initial price of - * the free gift article before product discount. - * @property {number} [effective] - The Effective Price refers to the final - * amount of the free gift article after applying the product discount. + * @property {string} [currency] */ /** * @typedef FreeGiftItems - * @property {string} [item_slug] - Free gift product slug - * @property {string} [item_name] - Free gift product name + * @property {string} [item_slug] - Item slug + * @property {string} [item_name] - Item name * @property {ItemPriceDetails} [item_price_details] - * @property {ArticlePriceDetails} [article_price] - * @property {string} [item_brand_name] - Free gift product brand name - * @property {number} [item_id] - Free gift product id - * @property {string[]} [available_sizes] - Available sizes for the free gift item. - * @property {string} [size] - Selected size for the free gift item. - * @property {string[]} [item_images_url] - List of free gift product images URL + * @property {string} [item_brand_name] - Item brand name + * @property {number} [item_id] - Item id + * @property {string[]} [item_images_url] - Item images URL */ /** * @typedef PromotionOffer - * @property {string} [id] - Promotion unique identifier + * @property {string} [id] - Promotion id * @property {Object} [buy_rules] - Buy rules of promotions - * @property {string} [offer_text] - Offer title of promotion that used to display - * @property {string} [promotion_type] - Type of Promotion like percentage, - * amount, bogo etc. + * @property {string} [offer_text] - Offer title + * @property {string} [promotion_type] - Promotion type * @property {string} [promotion_name] - Name of the promotion * @property {string} [promotion_group] - Group of promotion belongs to * @property {string} [valid_till] - Datetime ISOString for promotion end date * @property {Object[]} [discount_rules] - Discount rules of promotions * @property {FreeGiftItems[]} [free_gift_items] - Details of free gift items * @property {string} [description] - Offer details including T&C - * @property {boolean} [is_bank_offer] - Indicates whether the promotion is - * associated with a bank offer. */ /** - * @typedef PromotionOffersDetails - * @property {PromotionOffer[]} [available_promotions] - List of available - * promotion for product + * @typedef PromotionOffersResponse + * @property {PromotionOffer[]} [available_promotions] */ /** * @typedef PromotionPaymentOffer - * @property {string} [application_id] - Application id of the sales channel + * @property {string} [application_id] - Application id * @property {Object[]} [buy_rules] - Buy rules of promotions * @property {string} [calculate_on] - Price on which promotion calculated * @property {string} [description] - Offer details including T&C * @property {Object[]} [discount_rules] - Discount rules of promotions - * @property {string} [id] - Promotion unique identifier - * @property {string} [offer_text] - Offer title of promotion that used to display + * @property {string} [id] - Promotion id + * @property {string} [offer_text] - Offer title * @property {string} [promotion_group] - Group of promotion belongs to - * @property {string} [promotion_type] - Type of Promotion like bogo, amount, - * percentage etc. + * @property {string} [promotion_type] - Promotion type * @property {string} [promotion_name] - Name of the promotion */ /** - * @typedef PromotionPaymentOffersDetails - * @property {boolean} [success] - Indicates if operation is successful or not. + * @typedef PromotionPaymentOffersResponse + * @property {boolean} [success] * @property {PromotionPaymentOffer[]} [promotions] */ -/** - * @typedef ValidationError - * @property {string} message - A brief description of the error encountered. - * @property {string} field - The field in the request that caused the error. - */ - class CartPlatformModel { /** @returns {CouponDateMeta} */ static CouponDateMeta() { return Joi.object({ modified_on: Joi.string().allow("").allow(null), created_on: Joi.string().allow("").allow(null), - approved_on: Joi.string().allow("").allow(null), - rejected_on: Joi.string().allow("").allow(null), - reviewed_on: Joi.string().allow("").allow(null), }); } @@ -2478,7 +1958,7 @@ class CartPlatformModel { static Ownership() { return Joi.object({ payable_category: Joi.string().allow("").required(), - payable_by: Joi.string().allow("").allow(null), + payable_by: Joi.string().allow("").required(), }); } @@ -2487,9 +1967,6 @@ class CartPlatformModel { return Joi.object({ created_by: Joi.string().allow("").allow(null), modified_by: Joi.string().allow("").allow(null), - approved_by: Joi.string().allow("").allow(null), - rejected_by: Joi.string().allow("").allow(null), - reviewed_by: Joi.string().allow("").allow(null), }); } @@ -2563,7 +2040,7 @@ class CartPlatformModel { /** @returns {Restrictions} */ static Restrictions() { return Joi.object({ - payments: CartPlatformModel.PaymentModes(), + payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()), user_type: Joi.string().allow(""), price_range: CartPlatformModel.PriceRange(), platforms: Joi.array().items(Joi.string().allow("")), @@ -2597,10 +2074,9 @@ class CartPlatformModel { static CouponSchedule() { return Joi.object({ end: Joi.string().allow("").allow(null), - start: Joi.string().allow("").allow(null), + start: Joi.string().allow(""), next_schedule: Joi.array().items(Joi.any()), cron: Joi.string().allow("").allow(null), - status: Joi.string().allow(""), duration: Joi.number().allow(null), }); } @@ -2664,11 +2140,11 @@ class CartPlatformModel { return Joi.object({ currency_code: Joi.string().allow(""), auto_apply: Joi.boolean(), - type: Joi.string().allow(""), + type: Joi.string().allow("").required(), is_exact: Joi.boolean(), - applicable_on: Joi.string().allow(""), - calculate_on: Joi.string().allow(""), - value_type: Joi.string().allow(""), + applicable_on: Joi.string().allow("").required(), + calculate_on: Joi.string().allow("").required(), + value_type: Joi.string().allow("").required(), scope: Joi.array().items(Joi.string().allow("")), }); } @@ -2677,24 +2153,21 @@ class CartPlatformModel { static CouponAdd() { return Joi.object({ date_meta: CartPlatformModel.CouponDateMeta(), - ownership: CartPlatformModel.Ownership(), + ownership: CartPlatformModel.Ownership().required(), author: CartPlatformModel.CouponAuthor(), state: CartPlatformModel.State(), restrictions: CartPlatformModel.Restrictions(), validation: CartPlatformModel.Validation(), action: CartPlatformModel.CouponAction(), - coupon_type: Joi.string().allow(""), - coupon_prefix: Joi.string().allow("").allow(null), - coupon_counts: Joi.number(), tags: Joi.array().items(Joi.string().allow("")), _schedule: CartPlatformModel.CouponSchedule(), - rule: Joi.array().items(CartPlatformModel.Rule()), - display_meta: CartPlatformModel.DisplayMeta(), + rule: Joi.array().items(CartPlatformModel.Rule()).required(), + display_meta: CartPlatformModel.DisplayMeta().required(), code: Joi.string().allow("").required(), type_slug: Joi.string().allow("").required(), - identifiers: CartPlatformModel.Identifier(), - validity: CartPlatformModel.Validity(), - rule_definition: CartPlatformModel.RuleDefinition(), + identifiers: CartPlatformModel.Identifier().required(), + validity: CartPlatformModel.Validity().required(), + rule_definition: CartPlatformModel.RuleDefinition().required(), _id: Joi.string().allow(""), }); } @@ -2712,8 +2185,8 @@ class CartPlatformModel { }); } - /** @returns {CouponsResult} */ - static CouponsResult() { + /** @returns {CouponsResponse} */ + static CouponsResponse() { return Joi.object({ items: Joi.array().items(CartPlatformModel.CouponAdd()), page: CartPlatformModel.Page(), @@ -2728,8 +2201,8 @@ class CartPlatformModel { }); } - /** @returns {OperationErrorResult} */ - static OperationErrorResult() { + /** @returns {OperationErrorResponse} */ + static OperationErrorResponse() { return Joi.object({ success: Joi.boolean(), message: Joi.string().allow(""), @@ -2741,7 +2214,7 @@ class CartPlatformModel { static CouponUpdate() { return Joi.object({ date_meta: CartPlatformModel.CouponDateMeta(), - ownership: CartPlatformModel.Ownership(), + ownership: CartPlatformModel.Ownership().required(), author: CartPlatformModel.CouponAuthor(), state: CartPlatformModel.State(), restrictions: CartPlatformModel.Restrictions(), @@ -2749,17 +2222,13 @@ class CartPlatformModel { action: CartPlatformModel.CouponAction(), tags: Joi.array().items(Joi.string().allow("")), _schedule: CartPlatformModel.CouponSchedule(), - rule: Joi.array().items(CartPlatformModel.Rule()), - display_meta: CartPlatformModel.DisplayMeta(), + rule: Joi.array().items(CartPlatformModel.Rule()).required(), + display_meta: CartPlatformModel.DisplayMeta().required(), code: Joi.string().allow("").required(), - coupon_type: Joi.string().allow(""), - coupon_prefix: Joi.string().allow("").allow(null), - coupon_counts: Joi.number(), - reason: Joi.string().allow("").allow(null), type_slug: Joi.string().allow("").required(), - identifiers: CartPlatformModel.Identifier(), - validity: CartPlatformModel.Validity(), - rule_definition: CartPlatformModel.RuleDefinition(), + identifiers: CartPlatformModel.Identifier().required(), + validity: CartPlatformModel.Validity().required(), + rule_definition: CartPlatformModel.RuleDefinition().required(), }); } @@ -2771,48 +2240,32 @@ class CartPlatformModel { }); } - /** @returns {CouponCreateResult} */ - static CouponCreateResult() { - return Joi.object({ - success: Joi.boolean(), - message: Joi.string().allow(""), - _id: Joi.string().allow(""), - }); - } - /** @returns {DisplayMeta1} */ static DisplayMeta1() { return Joi.object({ - description: Joi.string().allow("").allow(null), + description: Joi.string().allow(""), offer_label: Joi.string().allow(""), - name: Joi.string().allow("").allow(null), - offer_text: Joi.string().allow("").allow(null), + name: Joi.string().allow(""), + offer_text: Joi.string().allow(""), }); } /** @returns {Ownership1} */ static Ownership1() { return Joi.object({ - payable_category: Joi.string().allow(""), - payable_by: Joi.string().allow(""), + payable_category: Joi.string().allow("").required(), + payable_by: Joi.string().allow("").required(), }); } /** @returns {CompareObject} */ static CompareObject() { return Joi.object({ - equals: Joi.number().allow(null), - greater_than: Joi.number().allow(null), - less_than_equals: Joi.number().allow(null), - less_than: Joi.number().allow(null), - greater_than_equals: Joi.number().allow(null), - }); - } - - /** @returns {ItemSizeMapping} */ - static ItemSizeMapping() { - return Joi.object({ - item_size_mapping: Joi.object().pattern(/\S/, Joi.any()), + equals: Joi.number(), + greater_than: Joi.number(), + less_than_equals: Joi.number(), + less_than: Joi.number(), + greater_than_equals: Joi.number(), }); } @@ -2856,7 +2309,7 @@ class CartPlatformModel { discount_price: Joi.number(), apportion_discount: Joi.boolean(), partial_can_ret: Joi.boolean(), - max_usage_per_transaction: Joi.number().allow(null), + max_usage_per_transaction: Joi.number(), min_offer_quantity: Joi.number(), code: Joi.string().allow(""), discount_amount: Joi.number(), @@ -2871,7 +2324,6 @@ class CartPlatformModel { discount_type: Joi.string().allow("").required(), buy_condition: Joi.string().allow("").required(), item_criteria: CartPlatformModel.ItemCriteria().required(), - meta: CartPlatformModel.ItemSizeMapping(), offer: CartPlatformModel.DiscountOffer().required(), }); } @@ -2886,7 +2338,7 @@ class CartPlatformModel { /** @returns {PromotionPaymentModes} */ static PromotionPaymentModes() { return Joi.object({ - type: Joi.string().allow(""), + type: Joi.string().allow("").required(), uses: CartPlatformModel.PaymentAllowValue1(), codes: Joi.array().items(Joi.string().allow("")), }); @@ -2927,7 +2379,7 @@ class CartPlatformModel { /** @returns {Restrictions1} */ static Restrictions1() { return Joi.object({ - payments: CartPlatformModel.PaymentModes(), + payments: Joi.object().pattern(/\S/, CartPlatformModel.PaymentModes()), user_registered: CartPlatformModel.UserRegistered(), platforms: Joi.array().items(Joi.string().allow("")), post_order: CartPlatformModel.PostOrder1(), @@ -2935,7 +2387,7 @@ class CartPlatformModel { order_quantity: Joi.number(), anonymous_users: Joi.boolean(), user_id: Joi.array().items(Joi.string().allow("")), - uses: CartPlatformModel.UsesRestriction1(), + uses: CartPlatformModel.UsesRestriction1().required(), ordering_stores: Joi.array().items(Joi.number()), }); } @@ -2943,10 +2395,9 @@ class CartPlatformModel { /** @returns {PromotionSchedule} */ static PromotionSchedule() { return Joi.object({ - end: Joi.string().allow("").allow(null), - start: Joi.string().allow("").allow(null), - status: Joi.string().allow(""), - published: Joi.boolean(), + end: Joi.string().allow("").required(), + start: Joi.string().allow("").required(), + published: Joi.boolean().required(), next_schedule: Joi.array().items(Joi.any()), cron: Joi.string().allow("").allow(null), duration: Joi.number().allow(null), @@ -2956,8 +2407,8 @@ class CartPlatformModel { /** @returns {PromotionAction} */ static PromotionAction() { return Joi.object({ - action_date: Joi.string().allow("").allow(null), - action_type: Joi.string().allow(""), + action_date: Joi.string().allow("").allow(null).required(), + action_type: Joi.string().allow("").required(), }); } @@ -2966,17 +2417,14 @@ class CartPlatformModel { return Joi.object({ created_by: Joi.string().allow("").allow(null), modified_by: Joi.string().allow("").allow(null), - approved_by: Joi.string().allow("").allow(null), - rejected_by: Joi.string().allow("").allow(null), - reviewed_by: Joi.string().allow("").allow(null), }); } /** @returns {Visibility} */ static Visibility() { return Joi.object({ - coupon_list: Joi.boolean(), - pdp: Joi.boolean(), + coupon_list: Joi.boolean().required(), + pdp: Joi.boolean().required(), }); } @@ -2985,9 +2433,6 @@ class CartPlatformModel { return Joi.object({ modified_on: Joi.string().allow("").allow(null), created_on: Joi.string().allow("").allow(null), - approved_on: Joi.string().allow("").allow(null), - rejected_on: Joi.string().allow("").allow(null), - reviewed_on: Joi.string().allow("").allow(null), }); } @@ -3008,7 +2453,6 @@ class CartPlatformModel { .required(), restrictions: CartPlatformModel.Restrictions1(), currency: Joi.string().allow(""), - is_processed: Joi.boolean(), code: Joi.string().allow(""), _schedule: CartPlatformModel.PromotionSchedule(), post_order_action: CartPlatformModel.PromotionAction(), @@ -3016,16 +2460,18 @@ class CartPlatformModel { author: CartPlatformModel.PromotionAuthor(), visiblility: CartPlatformModel.Visibility(), application_id: Joi.string().allow("").required(), - buy_rules: CartPlatformModel.ItemCriteria().required(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + buy_rules: Joi.object() + .pattern(/\S/, CartPlatformModel.ItemCriteria()) + .required(), + _custom_json: Joi.any(), date_meta: CartPlatformModel.PromotionDateMeta(), _id: Joi.string().allow(""), tags: Joi.array().items(Joi.string().allow("")), }); } - /** @returns {PromotionsResult} */ - static PromotionsResult() { + /** @returns {PromotionsResponse} */ + static PromotionsResponse() { return Joi.object({ items: Joi.array().items(CartPlatformModel.PromotionListItem()), page: CartPlatformModel.Page(), @@ -3041,40 +2487,12 @@ class CartPlatformModel { promo_group: Joi.string().allow("").required(), mode: Joi.string().allow("").required(), apply_all_discount: Joi.boolean(), - display_meta: CartPlatformModel.DisplayMeta1(), - ownership: CartPlatformModel.Ownership1(), - promotion_type: Joi.string().allow("").required(), - discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()), - restrictions: CartPlatformModel.Restrictions1(), - currency: Joi.string().allow(""), - code: Joi.string().allow(""), - _schedule: CartPlatformModel.PromotionSchedule(), - post_order_action: CartPlatformModel.PromotionAction(), - apply_priority: Joi.number(), - author: CartPlatformModel.PromotionAuthor(), - visiblility: CartPlatformModel.Visibility(), - application_id: Joi.string().allow("").required(), - buy_rules: CartPlatformModel.ItemCriteria(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - date_meta: CartPlatformModel.PromotionDateMeta(), - tags: Joi.array().items(Joi.string().allow("")), - }); - } - - /** @returns {PromotionAddResult} */ - static PromotionAddResult() { - return Joi.object({ - stackable: Joi.boolean(), - calculate_on: Joi.string().allow(""), - apply_exclusive: Joi.string().allow("").allow(null), - promo_group: Joi.string().allow("").required(), - mode: Joi.string().allow("").required(), - is_processed: Joi.boolean(), - apply_all_discount: Joi.boolean(), - display_meta: CartPlatformModel.DisplayMeta1(), - ownership: CartPlatformModel.Ownership1(), + display_meta: CartPlatformModel.DisplayMeta1().required(), + ownership: CartPlatformModel.Ownership1().required(), promotion_type: Joi.string().allow("").required(), - discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()), + discount_rules: Joi.array() + .items(CartPlatformModel.DiscountRule()) + .required(), restrictions: CartPlatformModel.Restrictions1(), currency: Joi.string().allow(""), code: Joi.string().allow(""), @@ -3084,8 +2502,10 @@ class CartPlatformModel { author: CartPlatformModel.PromotionAuthor(), visiblility: CartPlatformModel.Visibility(), application_id: Joi.string().allow("").required(), - buy_rules: CartPlatformModel.ItemCriteria(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + buy_rules: Joi.object() + .pattern(/\S/, CartPlatformModel.ItemCriteria()) + .required(), + _custom_json: Joi.any(), date_meta: CartPlatformModel.PromotionDateMeta(), tags: Joi.array().items(Joi.string().allow("")), }); @@ -3097,45 +2517,15 @@ class CartPlatformModel { stackable: Joi.boolean(), calculate_on: Joi.string().allow(""), apply_exclusive: Joi.string().allow("").allow(null), - reason: Joi.string().allow("").allow(null), promo_group: Joi.string().allow("").required(), mode: Joi.string().allow("").required(), apply_all_discount: Joi.boolean(), - display_meta: CartPlatformModel.DisplayMeta1(), - ownership: CartPlatformModel.Ownership1(), - promotion_type: Joi.string().allow("").required(), - discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()), - restrictions: CartPlatformModel.Restrictions1(), - currency: Joi.string().allow(""), - code: Joi.string().allow(""), - _schedule: CartPlatformModel.PromotionSchedule(), - post_order_action: CartPlatformModel.PromotionAction(), - apply_priority: Joi.number(), - author: CartPlatformModel.PromotionAuthor(), - visiblility: CartPlatformModel.Visibility(), - application_id: Joi.string().allow("").required(), - buy_rules: CartPlatformModel.ItemCriteria(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - date_meta: CartPlatformModel.PromotionDateMeta(), - tags: Joi.array().items(Joi.string().allow("")), - }); - } - - /** @returns {PromotionUpdateResult} */ - static PromotionUpdateResult() { - return Joi.object({ - stackable: Joi.boolean(), - calculate_on: Joi.string().allow(""), - apply_exclusive: Joi.string().allow("").allow(null), - reason: Joi.string().allow("").allow(null), - is_processed: Joi.boolean(), - promo_group: Joi.string().allow("").required(), - mode: Joi.string().allow("").required(), - apply_all_discount: Joi.boolean(), - display_meta: CartPlatformModel.DisplayMeta1(), - ownership: CartPlatformModel.Ownership1(), + display_meta: CartPlatformModel.DisplayMeta1().required(), + ownership: CartPlatformModel.Ownership1().required(), promotion_type: Joi.string().allow("").required(), - discount_rules: Joi.array().items(CartPlatformModel.DiscountRule()), + discount_rules: Joi.array() + .items(CartPlatformModel.DiscountRule()) + .required(), restrictions: CartPlatformModel.Restrictions1(), currency: Joi.string().allow(""), code: Joi.string().allow(""), @@ -3145,8 +2535,10 @@ class CartPlatformModel { author: CartPlatformModel.PromotionAuthor(), visiblility: CartPlatformModel.Visibility(), application_id: Joi.string().allow("").required(), - buy_rules: CartPlatformModel.ItemCriteria(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + buy_rules: Joi.object() + .pattern(/\S/, CartPlatformModel.ItemCriteria()) + .required(), + _custom_json: Joi.any(), date_meta: CartPlatformModel.PromotionDateMeta(), tags: Joi.array().items(Joi.string().allow("")), }); @@ -3160,8 +2552,8 @@ class CartPlatformModel { }); } - /** @returns {ActivePromosResult} */ - static ActivePromosResult() { + /** @returns {ActivePromosResponse} */ + static ActivePromosResponse() { return Joi.object({ entity_slug: Joi.string().allow(""), title: Joi.string().allow(""), @@ -3230,14 +2622,14 @@ class CartPlatformModel { type: Joi.string().allow(""), article_id: Joi.string().allow("").required(), quantity: Joi.number(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), }); } /** @returns {PriceAdjustmentRestrictions} */ static PriceAdjustmentRestrictions() { return Joi.object({ - post_order: Joi.object().pattern(/\S/, Joi.any()), + post_order: Joi.any(), }); } @@ -3264,9 +2656,8 @@ class CartPlatformModel { is_authenticated: Joi.boolean().required(), article_ids: Joi.array().items(CartPlatformModel.Article()).required(), auto_remove: Joi.boolean(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), cart_id: Joi.string().allow("").required(), - distribution_logic: CartPlatformModel.DistributionLogic(), }); } @@ -3285,21 +2676,20 @@ class CartPlatformModel { is_authenticated: Joi.boolean().required(), article_ids: Joi.array().items(CartPlatformModel.Article()).required(), auto_remove: Joi.boolean(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), cart_id: Joi.string().allow("").required(), - distribution_logic: CartPlatformModel.DistributionLogic(), }); } - /** @returns {PriceAdjustmentResult} */ - static PriceAdjustmentResult() { + /** @returns {PriceAdjustmentResponse} */ + static PriceAdjustmentResponse() { return Joi.object({ data: CartPlatformModel.PriceAdjustment(), }); } - /** @returns {GetPriceAdjustmentResult} */ - static GetPriceAdjustmentResult() { + /** @returns {GetPriceAdjustmentResponse} */ + static GetPriceAdjustmentResponse() { return Joi.object({ data: Joi.array().items(CartPlatformModel.PriceAdjustment()), }); @@ -3319,34 +2709,9 @@ class CartPlatformModel { allowed_refund: Joi.boolean(), is_authenticated: Joi.boolean().required(), article_ids: Joi.array().items(CartPlatformModel.Article()).required(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), cart_id: Joi.string().allow("").required(), auto_remove: Joi.boolean(), - distribution_logic: CartPlatformModel.DistributionLogic(), - }); - } - - /** @returns {DistributionRule} */ - static DistributionRule() { - return Joi.object({ - conditions: Joi.object().pattern(/\S/, Joi.any()), - }); - } - - /** @returns {Distribution} */ - static Distribution() { - return Joi.object({ - type: Joi.string().allow(""), - logic: Joi.string().allow(""), - rule: CartPlatformModel.DistributionRule(), - }); - } - - /** @returns {DistributionLogic} */ - static DistributionLogic() { - return Joi.object({ - distribution_level: Joi.string().allow(""), - distribution: CartPlatformModel.Distribution(), }); } @@ -3359,8 +2724,8 @@ class CartPlatformModel { }); } - /** @returns {OpenapiCartDetailsCreation} */ - static OpenapiCartDetailsCreation() { + /** @returns {OpenapiCartDetailsRequest} */ + static OpenapiCartDetailsRequest() { return Joi.object({ cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(), }); @@ -3448,7 +2813,7 @@ class CartPlatformModel { /** @returns {Tags} */ static Tags() { return Joi.object({ - tags: Joi.object().pattern(/\S/, Joi.any()), + tags: Joi.any(), }); } @@ -3467,28 +2832,12 @@ class CartPlatformModel { }); } - /** @returns {ProductActionParams} */ - static ProductActionParams() { - return Joi.object({ - slug: Joi.array().items(Joi.string().allow("")), - }); - } - - /** @returns {ProductActionPage} */ - static ProductActionPage() { - return Joi.object({ - type: Joi.string().allow(""), - params: CartPlatformModel.ProductActionParams(), - }); - } - /** @returns {ProductAction} */ static ProductAction() { return Joi.object({ type: Joi.string().allow(""), url: Joi.string().allow(""), query: CartPlatformModel.ActionQuery(), - page: CartPlatformModel.ProductActionPage(), }); } @@ -3510,12 +2859,12 @@ class CartPlatformModel { action: CartPlatformModel.ProductAction(), uid: Joi.number(), tags: Joi.array().items(Joi.string().allow("")), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), type: Joi.string().allow(""), name: Joi.string().allow(""), item_code: Joi.string().allow("").allow(null), categories: Joi.array().items(CartPlatformModel.CategoryInfo()), - attributes: Joi.object().pattern(/\S/, Joi.any()), + attributes: Joi.any(), }); } @@ -3552,19 +2901,19 @@ class CartPlatformModel { seller_identifier: Joi.string().allow(""), quantity: Joi.number(), seller: CartPlatformModel.BaseInfo(), - cart_item_meta: Joi.object().pattern(/\S/, Joi.any()), - parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()), + cart_item_meta: Joi.any(), + parent_item_identifiers: Joi.any(), is_gift_visible: Joi.boolean(), uid: Joi.string().allow(""), - gift_card: Joi.object().pattern(/\S/, Joi.any()), + gift_card: Joi.any(), product_group_tags: Joi.array().items(Joi.string().allow("")), - identifier: Joi.object().pattern(/\S/, Joi.any()), + identifier: Joi.any(), mto_quantity: Joi.number(), - extra_meta: Joi.object().pattern(/\S/, Joi.any()), + extra_meta: Joi.any(), type: Joi.string().allow(""), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), price: CartPlatformModel.ArticlePriceInfo(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), size: Joi.string().allow(""), store: CartPlatformModel.StoreInfo(), tags: Joi.array().items(Joi.string().allow("")), @@ -3582,9 +2931,9 @@ class CartPlatformModel { /** @returns {DiscountRulesApp} */ static DiscountRulesApp() { return Joi.object({ - offer: Joi.object().pattern(/\S/, Joi.any()), - raw_offer: Joi.object().pattern(/\S/, Joi.any()), - item_criteria: Joi.object().pattern(/\S/, Joi.any()), + offer: Joi.any(), + raw_offer: Joi.any(), + item_criteria: Joi.any(), matched_buy_rules: Joi.array().items(Joi.string().allow("")), }); } @@ -3602,8 +2951,8 @@ class CartPlatformModel { /** @returns {BuyRules} */ static BuyRules() { return Joi.object({ - cart_conditions: Joi.object().pattern(/\S/, Joi.any()), - item_criteria: Joi.object().pattern(/\S/, Joi.any()), + cart_conditions: Joi.any(), + item_criteria: Joi.any(), }); } @@ -3626,7 +2975,7 @@ class CartPlatformModel { mrp_promotion: Joi.boolean(), promotion_group: Joi.string().allow(""), promo_id: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), code: Joi.string().allow("").allow(null), }); } @@ -3736,7 +3085,7 @@ class CartPlatformModel { quantity: Joi.number(), product: CartPlatformModel.CartProduct(), product_ean_id: Joi.string().allow(""), - parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()), + parent_item_identifiers: Joi.any(), is_set: Joi.boolean(), article: CartPlatformModel.ProductArticle(), promotions_applied: Joi.array().items( @@ -3745,22 +3094,22 @@ class CartPlatformModel { delivery_promise: CartPlatformModel.ShipmentPromise(), key: Joi.string().allow(""), coupon: CartPlatformModel.CouponDetails(), - bulk_offer: Joi.object().pattern(/\S/, Joi.any()), + bulk_offer: Joi.any(), price: CartPlatformModel.ProductPriceInfo(), coupon_message: Joi.string().allow(""), identifiers: CartPlatformModel.CartProductIdentifer().required(), message: Joi.string().allow(""), discount: Joi.string().allow(""), availability: CartPlatformModel.ProductAvailability(), - moq: Joi.object().pattern(/\S/, Joi.any()), + moq: Joi.any(), price_per_unit: CartPlatformModel.ProductPriceInfo(), promo_meta: CartPlatformModel.PromoMeta(), - custom_order: Joi.object().pattern(/\S/, Joi.any()), + custom_order: Joi.any(), }); } - /** @returns {OpenapiCartDetailsResult} */ - static OpenapiCartDetailsResult() { + /** @returns {OpenapiCartDetailsResponse} */ + static OpenapiCartDetailsResponse() { return Joi.object({ is_valid: Joi.boolean(), message: Joi.string().allow(""), @@ -3769,12 +3118,12 @@ class CartPlatformModel { }); } - /** @returns {OpenApiErrorResult} */ - static OpenApiErrorResult() { + /** @returns {OpenApiErrorResponse} */ + static OpenApiErrorResponse() { return Joi.object({ success: Joi.boolean(), message: Joi.string().allow(""), - errors: Joi.object().pattern(/\S/, Joi.any()), + errors: Joi.any(), }); } @@ -3788,7 +3137,7 @@ class CartPlatformModel { area_code: Joi.string().allow("").required(), country_iso_code: Joi.string().allow(""), country_phone_code: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), address_type: Joi.string().allow(""), area: Joi.string().allow(""), area_code_slug: Joi.string().allow(""), @@ -3801,16 +3150,16 @@ class CartPlatformModel { }); } - /** @returns {OpenApiCartServiceabilityCreation} */ - static OpenApiCartServiceabilityCreation() { + /** @returns {OpenApiCartServiceabilityRequest} */ + static OpenApiCartServiceabilityRequest() { return Joi.object({ cart_items: Joi.array().items(CartPlatformModel.CartItem()).required(), shipping_address: CartPlatformModel.ShippingAddress().required(), }); } - /** @returns {OpenApiCartServiceabilityResult} */ - static OpenApiCartServiceabilityResult() { + /** @returns {OpenApiCartServiceabilityResponse} */ + static OpenApiCartServiceabilityResponse() { return Joi.object({ is_valid: Joi.boolean(), items: Joi.array().items(CartPlatformModel.CartProductInfo()), @@ -3841,7 +3190,7 @@ class CartPlatformModel { return Joi.object({ payment_id: Joi.string().allow("").allow(null), payment_gateway: Joi.string().allow("").allow(null), - extra_meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + extra_meta: Joi.any().allow(null), current_status: Joi.string().allow("").allow(null), order_id: Joi.string().allow("").allow(null), }); @@ -3869,7 +3218,7 @@ class CartPlatformModel { price_marked: Joi.number().required(), files: Joi.array().items(CartPlatformModel.OpenApiFiles()), meta: CartPlatformModel.CartItemMeta(), - extra_meta: Joi.object().pattern(/\S/, Joi.any()), + extra_meta: Joi.any(), product_id: Joi.number().required(), loyalty_discount: Joi.number(), discount: Joi.number().required(), @@ -3896,7 +3245,7 @@ class CartPlatformModel { payment_methods: Joi.array() .items(CartPlatformModel.MultiTenderPaymentMethod()) .required(), - employee_discount: Joi.object().pattern(/\S/, Joi.any()), + employee_discount: Joi.any(), coupon: Joi.string().allow(""), cashback_applied: Joi.number().required(), gstin: Joi.string().allow("").allow(null), @@ -3912,8 +3261,8 @@ class CartPlatformModel { }); } - /** @returns {OpenApiCheckoutResult} */ - static OpenApiCheckoutResult() { + /** @returns {OpenApiCheckoutResponse} */ + static OpenApiCheckoutResponse() { return Joi.object({ success: Joi.boolean(), message: Joi.string().allow(""), @@ -3926,48 +3275,46 @@ class CartPlatformModel { static AbandonedCart() { return Joi.object({ expire_at: Joi.string().allow("").required(), - promotion: Joi.object().pattern(/\S/, Joi.any()), + promotion: Joi.any(), is_default: Joi.boolean().required(), comment: Joi.string().allow("").allow(null), articles: Joi.array().items(Joi.any()).required(), - coupon: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + coupon: Joi.any().allow(null), bulk_coupon_discount: Joi.number().allow(null), _id: Joi.string().allow("").required(), - fynd_credits: Joi.object().pattern(/\S/, Joi.any()), + fynd_credits: Joi.any(), fc_index_map: Joi.array().items(Joi.number()), order_id: Joi.string().allow(""), discount: Joi.number(), - cod_charges: Joi.object().pattern(/\S/, Joi.any()), - payments: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + cod_charges: Joi.any(), + payments: Joi.any().allow(null), payment_mode: Joi.string().allow("").allow(null), shipments: Joi.array().items(Joi.any()), - pick_up_customer_details: Joi.object() - .pattern(/\S/, Joi.any()) - .allow(null, ""), + pick_up_customer_details: Joi.any().allow(null), uid: Joi.number().required(), checkout_mode: Joi.string().allow(""), cart_value: Joi.number(), is_archive: Joi.boolean(), created_on: Joi.string().allow("").required(), last_modified: Joi.string().allow("").required(), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + meta: Joi.any().allow(null), buy_now: Joi.boolean(), is_active: Joi.boolean(), - cashback: Joi.object().pattern(/\S/, Joi.any()).required(), + cashback: Joi.any().required(), payment_methods: Joi.array().items(Joi.any()), gstin: Joi.string().allow("").allow(null), - delivery_charges: Joi.object().pattern(/\S/, Joi.any()), + delivery_charges: Joi.any(), merge_qty: Joi.boolean().allow(null), user_id: Joi.string().allow("").required(), app_id: Joi.string().allow(""), }); } - /** @returns {AbandonedCartResult} */ - static AbandonedCartResult() { + /** @returns {AbandonedCartResponse} */ + static AbandonedCartResponse() { return Joi.object({ items: Joi.array().items(CartPlatformModel.AbandonedCart()), - result: Joi.object().pattern(/\S/, Joi.any()), + result: Joi.any(), page: CartPlatformModel.Page(), success: Joi.boolean(), message: Joi.string().allow(""), @@ -4036,14 +3383,14 @@ class CartPlatformModel { }); } - /** @returns {CartDetailResult} */ - static CartDetailResult() { + /** @returns {CartDetailResponse} */ + static CartDetailResponse() { return Joi.object({ cart_id: Joi.number(), uid: Joi.string().allow(""), coupon_text: Joi.string().allow(""), id: Joi.string().allow(""), - pan_config: Joi.object().pattern(/\S/, Joi.any()), + pan_config: Joi.any(), delivery_promise: CartPlatformModel.ShipmentPromise(), comment: Joi.string().allow(""), items: Joi.array().items(CartPlatformModel.CartProductInfo()), @@ -4053,7 +3400,7 @@ class CartPlatformModel { coupon: CartPlatformModel.CartDetailCoupon(), restrict_checkout: Joi.boolean(), message: Joi.string().allow(""), - notification: Joi.object().pattern(/\S/, Joi.any()), + notification: Joi.any(), staff_user_id: Joi.string().allow(""), success: Joi.boolean(), breakup_values: CartPlatformModel.CartBreakup(), @@ -4067,7 +3414,7 @@ class CartPlatformModel { CartPlatformModel.AppliedPromotion() ), pan_no: Joi.string().allow(""), - custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()), + custom_cart_meta: Joi.any(), }); } @@ -4082,31 +3429,31 @@ class CartPlatformModel { ), product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)), article_id: Joi.string().allow(""), - article_assignment: Joi.object().pattern(/\S/, Joi.any()), + article_assignment: Joi.any(), store_id: Joi.number(), display: Joi.string().allow(""), item_id: Joi.number(), - extra_meta: Joi.object().pattern(/\S/, Joi.any()), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - meta: Joi.object().pattern(/\S/, Joi.any()), + extra_meta: Joi.any(), + _custom_json: Joi.any(), + meta: Joi.any(), pos: Joi.boolean(), seller_identifier: Joi.string().allow(""), }); } - /** @returns {AddCartCreation} */ - static AddCartCreation() { + /** @returns {AddCartRequest} */ + static AddCartRequest() { return Joi.object({ new_cart: Joi.boolean(), items: Joi.array().items(CartPlatformModel.AddProductCart()), }); } - /** @returns {AddCartDetailResult} */ - static AddCartDetailResult() { + /** @returns {AddCartDetailResponse} */ + static AddCartDetailResponse() { return Joi.object({ success: Joi.boolean(), - cart: CartPlatformModel.CartDetailResult(), + cart: CartPlatformModel.CartDetailResponse(), partial: Joi.boolean(), message: Joi.string().allow(""), }); @@ -4117,10 +3464,10 @@ class CartPlatformModel { return Joi.object({ quantity: Joi.number(), item_size: Joi.string().allow(""), - parent_item_identifiers: Joi.object().pattern(/\S/, Joi.any()), - meta: Joi.object().pattern(/\S/, Joi.any()), - extra_meta: Joi.object().pattern(/\S/, Joi.any()), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + parent_item_identifiers: Joi.any(), + meta: Joi.any(), + extra_meta: Joi.any(), + _custom_json: Joi.any(), item_id: Joi.number(), item_index: Joi.number(), identifiers: CartPlatformModel.CartProductIdentifer().required(), @@ -4128,31 +3475,19 @@ class CartPlatformModel { }); } - /** @returns {FreeGiftItemCreation} */ - static FreeGiftItemCreation() { - return Joi.object({ - promotion_id: Joi.string().allow("").required(), - item_id: Joi.string().allow("").required(), - item_size: Joi.string().allow("").required(), - }); - } - - /** @returns {UpdateCartCreation} */ - static UpdateCartCreation() { + /** @returns {UpdateCartRequest} */ + static UpdateCartRequest() { return Joi.object({ items: Joi.array().items(CartPlatformModel.UpdateProductCart()), - free_gift_items: Joi.array().items( - CartPlatformModel.FreeGiftItemCreation() - ), operation: Joi.string().allow("").required(), }); } - /** @returns {UpdateCartDetailResult} */ - static UpdateCartDetailResult() { + /** @returns {UpdateCartDetailResponse} */ + static UpdateCartDetailResponse() { return Joi.object({ success: Joi.boolean(), - cart: CartPlatformModel.CartDetailResult(), + cart: CartPlatformModel.CartDetailResponse(), message: Joi.string().allow(""), }); } @@ -4178,7 +3513,7 @@ class CartPlatformModel { price_marked: Joi.number().required(), amount_paid: Joi.number().required(), promo_list: Joi.array().items(CartPlatformModel.OverrideCartItemPromo()), - extra_meta: Joi.object().pattern(/\S/, Joi.any()), + extra_meta: Joi.any(), item_id: Joi.number().required(), discount: Joi.number().required(), price_effective: Joi.number().required(), @@ -4190,9 +3525,9 @@ class CartPlatformModel { return Joi.object({ cart_id: Joi.string().allow("").required(), payment_mode: Joi.string().allow("").required(), - billing_address: Joi.object().pattern(/\S/, Joi.any()), + billing_address: Joi.any(), merchant_code: Joi.string().allow("").required(), - payment_identifier: Joi.string().allow("").required(), + payment_identifier: Joi.string().allow("").allow(null).required(), currency_code: Joi.string().allow("").required(), aggregator: Joi.string().allow("").required(), order_type: Joi.string().allow("").required(), @@ -4201,31 +3536,31 @@ class CartPlatformModel { .items(CartPlatformModel.OverrideCartItem()) .required(), ordering_store: Joi.number().allow(null), - shipping_address: Joi.object().pattern(/\S/, Joi.any()), + shipping_address: Joi.any(), }); } - /** @returns {OverrideCheckoutResult} */ - static OverrideCheckoutResult() { + /** @returns {OverrideCheckoutResponse} */ + static OverrideCheckoutResponse() { return Joi.object({ - data: Joi.object().pattern(/\S/, Joi.any()).required(), - cart: Joi.object().pattern(/\S/, Joi.any()).required(), + data: Joi.any().required(), + cart: Joi.any().required(), success: Joi.string().allow("").required(), order_id: Joi.string().allow("").required(), message: Joi.string().allow("").required(), }); } - /** @returns {GetShareCartLinkCreation} */ - static GetShareCartLinkCreation() { + /** @returns {GetShareCartLinkRequest} */ + static GetShareCartLinkRequest() { return Joi.object({ id: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), }); } - /** @returns {GetShareCartLinkResult} */ - static GetShareCartLinkResult() { + /** @returns {GetShareCartLinkResponse} */ + static GetShareCartLinkResponse() { return Joi.object({ token: Joi.string().allow(""), share_url: Joi.string().allow(""), @@ -4235,11 +3570,11 @@ class CartPlatformModel { /** @returns {SharedCartDetails} */ static SharedCartDetails() { return Joi.object({ - source: Joi.object().pattern(/\S/, Joi.any()), - user: Joi.object().pattern(/\S/, Joi.any()), + source: Joi.any(), + user: Joi.any(), token: Joi.string().allow(""), created_on: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), }); } @@ -4265,12 +3600,12 @@ class CartPlatformModel { buy_now: Joi.boolean(), cart_id: Joi.number(), gstin: Joi.string().allow(""), - custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()), + custom_cart_meta: Joi.any(), }); } - /** @returns {SharedCartResult} */ - static SharedCartResult() { + /** @returns {SharedCartResponse} */ + static SharedCartResponse() { return Joi.object({ cart: CartPlatformModel.SharedCart(), error: Joi.string().allow(""), @@ -4281,7 +3616,7 @@ class CartPlatformModel { static CartList() { return Joi.object({ cart_id: Joi.string().allow(""), - pick_up_customer_details: Joi.object().pattern(/\S/, Joi.any()), + pick_up_customer_details: Joi.any(), cart_value: Joi.number(), created_on: Joi.string().allow(""), user_id: Joi.string().allow(""), @@ -4290,8 +3625,8 @@ class CartPlatformModel { }); } - /** @returns {MultiCartResult} */ - static MultiCartResult() { + /** @returns {MultiCartResponse} */ + static MultiCartResponse() { return Joi.object({ success: Joi.boolean(), data: Joi.array().items(CartPlatformModel.CartList()), @@ -4320,13 +3655,13 @@ class CartPlatformModel { }); } - /** @returns {UserCartMappingResult} */ - static UserCartMappingResult() { + /** @returns {UserCartMappingResponse} */ + static UserCartMappingResponse() { return Joi.object({ coupon_text: Joi.string().allow(""), user: CartPlatformModel.UserInfo(), id: Joi.string().allow(""), - pan_config: Joi.object().pattern(/\S/, Joi.any()), + pan_config: Joi.any(), delivery_promise: CartPlatformModel.ShipmentPromise(), comment: Joi.string().allow(""), items: Joi.array().items(CartPlatformModel.CartProductInfo()), @@ -4341,7 +3676,7 @@ class CartPlatformModel { last_modified: Joi.string().allow(""), buy_now: Joi.boolean(), gstin: Joi.string().allow(""), - custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()), + custom_cart_meta: Joi.any(), applied_promo_details: Joi.array().items( CartPlatformModel.AppliedPromotion() ), @@ -4349,8 +3684,8 @@ class CartPlatformModel { }); } - /** @returns {PlatformAddCartDetails} */ - static PlatformAddCartDetails() { + /** @returns {PlatformAddCartRequest} */ + static PlatformAddCartRequest() { return Joi.object({ user_id: Joi.string().allow(""), new_cart: Joi.boolean(), @@ -4358,35 +3693,32 @@ class CartPlatformModel { }); } - /** @returns {PlatformUpdateCartDetails} */ - static PlatformUpdateCartDetails() { + /** @returns {PlatformUpdateCartRequest} */ + static PlatformUpdateCartRequest() { return Joi.object({ user_id: Joi.string().allow(""), items: Joi.array().items(CartPlatformModel.UpdateProductCart()), - free_gift_items: Joi.array().items( - CartPlatformModel.FreeGiftItemCreation() - ), operation: Joi.string().allow("").required(), }); } - /** @returns {DeleteCartDetails} */ - static DeleteCartDetails() { + /** @returns {DeleteCartRequest} */ + static DeleteCartRequest() { return Joi.object({ cart_id_list: Joi.array().items(Joi.string().allow("")), }); } - /** @returns {DeleteCartDetailResult} */ - static DeleteCartDetailResult() { + /** @returns {DeleteCartDetailResponse} */ + static DeleteCartDetailResponse() { return Joi.object({ success: Joi.boolean(), message: Joi.string().allow(""), }); } - /** @returns {CartItemCountResult} */ - static CartItemCountResult() { + /** @returns {CartItemCountResponse} */ + static CartItemCountResponse() { return Joi.object({ user_cart_items_count: Joi.number(), }); @@ -4424,16 +3756,16 @@ class CartPlatformModel { }); } - /** @returns {GetCouponResult} */ - static GetCouponResult() { + /** @returns {GetCouponResponse} */ + static GetCouponResponse() { return Joi.object({ available_coupon_list: Joi.array().items(CartPlatformModel.Coupon()), page: CartPlatformModel.PageCoupon(), }); } - /** @returns {ApplyCouponDetails} */ - static ApplyCouponDetails() { + /** @returns {ApplyCouponRequest} */ + static ApplyCouponRequest() { return Joi.object({ coupon_code: Joi.string().allow("").required(), }); @@ -4464,10 +3796,10 @@ class CartPlatformModel { email: Joi.string().allow(""), area_code: Joi.string().allow(""), checkout_mode: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), is_active: Joi.boolean(), name: Joi.string().allow(""), - google_map_point: Joi.object().pattern(/\S/, Joi.any()), + google_map_point: Joi.any(), cart_id: Joi.string().allow(""), city: Joi.string().allow(""), sector: Joi.string().allow(""), @@ -4478,28 +3810,19 @@ class CartPlatformModel { address: Joi.string().allow(""), country_phone_code: Joi.string().allow(""), country_iso_code: Joi.string().allow(""), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - }); - } - - /** @returns {ValidationConfig} */ - static ValidationConfig() { - return Joi.object({ - address_max_limit: Joi.number().required(), - user_address_count: Joi.number().required(), + _custom_json: Joi.any(), }); } - /** @returns {PlatformGetAddressesDetails} */ - static PlatformGetAddressesDetails() { + /** @returns {PlatformGetAddressesResponse} */ + static PlatformGetAddressesResponse() { return Joi.object({ address: Joi.array().items(CartPlatformModel.PlatformAddress()), - validation_config: CartPlatformModel.ValidationConfig(), }); } - /** @returns {SaveAddressDetails} */ - static SaveAddressDetails() { + /** @returns {SaveAddressResponse} */ + static SaveAddressResponse() { return Joi.object({ id: Joi.string().allow(""), success: Joi.boolean(), @@ -4507,8 +3830,8 @@ class CartPlatformModel { }); } - /** @returns {UpdateAddressDetails} */ - static UpdateAddressDetails() { + /** @returns {UpdateAddressResponse} */ + static UpdateAddressResponse() { return Joi.object({ id: Joi.string().allow(""), is_default_address: Joi.boolean(), @@ -4517,16 +3840,16 @@ class CartPlatformModel { }); } - /** @returns {DeleteAddressResult} */ - static DeleteAddressResult() { + /** @returns {DeleteAddressResponse} */ + static DeleteAddressResponse() { return Joi.object({ id: Joi.string().allow(""), is_deleted: Joi.boolean(), }); } - /** @returns {PlatformSelectCartAddress} */ - static PlatformSelectCartAddress() { + /** @returns {PlatformSelectCartAddressRequest} */ + static PlatformSelectCartAddressRequest() { return Joi.object({ cart_id: Joi.string().allow(""), billing_address_id: Joi.string().allow(""), @@ -4545,13 +3868,13 @@ class CartPlatformModel { }); } - /** @returns {PlatformShipmentDetails} */ - static PlatformShipmentDetails() { + /** @returns {PlatformShipmentResponse} */ + static PlatformShipmentResponse() { return Joi.object({ shipments: Joi.number(), fulfillment_id: Joi.number(), items: Joi.array().items(CartPlatformModel.CartProductInfo()), - dp_options: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + dp_options: Joi.any().allow(null), shipment_type: Joi.string().allow(""), order_type: Joi.string().allow(""), box_type: Joi.string().allow("").allow(null), @@ -4562,12 +3885,12 @@ class CartPlatformModel { }); } - /** @returns {PlatformCartShipmentsResult} */ - static PlatformCartShipmentsResult() { + /** @returns {PlatformCartShipmentsResponse} */ + static PlatformCartShipmentsResponse() { return Joi.object({ coupon_text: Joi.string().allow(""), id: Joi.string().allow(""), - pan_config: Joi.object().pattern(/\S/, Joi.any()), + pan_config: Joi.any(), delivery_promise: CartPlatformModel.ShipmentPromise(), comment: Joi.string().allow(""), items: Joi.array().items(CartPlatformModel.CartProductInfo()), @@ -4578,7 +3901,9 @@ class CartPlatformModel { breakup_values: CartPlatformModel.CartBreakup(), staff_user_id: Joi.string().allow("").allow(null), is_valid: Joi.boolean(), - shipments: Joi.array().items(CartPlatformModel.PlatformShipmentDetails()), + shipments: Joi.array().items( + CartPlatformModel.PlatformShipmentResponse() + ), currency: CartPlatformModel.CartCurrency(), checkout_mode: Joi.string().allow(""), last_modified: Joi.string().allow(""), @@ -4589,7 +3914,7 @@ class CartPlatformModel { ), error: Joi.boolean(), pan_no: Joi.string().allow(""), - custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()), + custom_cart_meta: Joi.any(), }); } @@ -4602,8 +3927,8 @@ class CartPlatformModel { }); } - /** @returns {UpdateCartShipmentCreation} */ - static UpdateCartShipmentCreation() { + /** @returns {UpdateCartShipmentRequest} */ + static UpdateCartShipmentRequest() { return Joi.object({ shipments: Joi.array() .items(CartPlatformModel.UpdateCartShipmentItem()) @@ -4611,29 +3936,29 @@ class CartPlatformModel { }); } - /** @returns {PlatformCartMetaCreation} */ - static PlatformCartMetaCreation() { + /** @returns {PlatformCartMetaRequest} */ + static PlatformCartMetaRequest() { return Joi.object({ gstin: Joi.string().allow(""), - pick_up_customer_details: Joi.object().pattern(/\S/, Joi.any()), + pick_up_customer_details: Joi.any(), checkout_mode: Joi.string().allow(""), - gift_details: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + gift_details: Joi.any().allow(null), pan_no: Joi.string().allow(""), comment: Joi.string().allow(""), staff_user_id: Joi.string().allow("").allow(null), }); } - /** @returns {CartMetaDetails} */ - static CartMetaDetails() { + /** @returns {CartMetaResponse} */ + static CartMetaResponse() { return Joi.object({ is_valid: Joi.boolean(), message: Joi.string().allow(""), }); } - /** @returns {CartMetaMissingDetails} */ - static CartMetaMissingDetails() { + /** @returns {CartMetaMissingResponse} */ + static CartMetaMissingResponse() { return Joi.object({ errors: Joi.array().items(Joi.string().allow("")), }); @@ -4667,53 +3992,6 @@ class CartPlatformModel { }); } - /** @returns {CartCheckoutCustomMeta} */ - static CartCheckoutCustomMeta() { - return Joi.object({ - key: Joi.string().allow("").required(), - value: Joi.string().allow("").required(), - }); - } - - /** @returns {PlatformCartCheckoutDetailCreation} */ - static PlatformCartCheckoutDetailCreation() { - return Joi.object({ - custom_meta: Joi.array().items( - CartPlatformModel.CartCheckoutCustomMeta() - ), - address_id: Joi.string().allow(""), - payment_identifier: Joi.string().allow("").allow(null), - payment_params: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - payment_auto_confirm: Joi.boolean(), - id: Joi.string().allow("").required(), - pos: Joi.boolean(), - billing_address_id: Joi.string().allow(""), - merchant_code: Joi.string().allow(""), - aggregator: Joi.string().allow(""), - pick_at_store_uid: Joi.number().allow(null), - device_id: Joi.string().allow("").allow(null), - delivery_address: Joi.object().pattern(/\S/, Joi.any()), - payment_mode: Joi.string().allow("").required(), - checkout_mode: Joi.string().allow(""), - customer_details: CartPlatformModel.CustomerDetails(), - meta: Joi.object().pattern(/\S/, Joi.any()), - staff: CartPlatformModel.StaffCheckout(), - employee_code: Joi.string().allow("").allow(null), - billing_address: Joi.object().pattern(/\S/, Joi.any()), - callback_url: Joi.string().allow("").allow(null), - user_id: Joi.string().allow("").allow(null), - extra_meta: Joi.object().pattern(/\S/, Joi.any()), - order_type: Joi.string().allow("").required(), - files: Joi.array().items(CartPlatformModel.Files()), - ordering_store: Joi.number().allow(null), - payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()), - iin: Joi.string().allow(""), - network: Joi.string().allow(""), - type: Joi.string().allow(""), - card_id: Joi.string().allow(""), - }); - } - /** @returns {CheckCart} */ static CheckCart() { return Joi.object({ @@ -4746,15 +4024,15 @@ class CartPlatformModel { gstin: Joi.string().allow(""), cod_available: Joi.boolean(), delivery_charges: Joi.number(), - custom_cart_meta: Joi.object().pattern(/\S/, Joi.any()), + custom_cart_meta: Joi.any(), }); } - /** @returns {CartCheckoutDetails} */ - static CartCheckoutDetails() { + /** @returns {CartCheckoutResponse} */ + static CartCheckoutResponse() { return Joi.object({ app_intercept_url: Joi.string().allow(""), - data: Joi.object().pattern(/\S/, Joi.any()), + data: Joi.any(), cart: CartPlatformModel.CheckCart(), success: Joi.boolean(), callback_url: Joi.string().allow(""), @@ -4764,22 +4042,8 @@ class CartPlatformModel { }); } - /** @returns {CartCheckoutResult} */ - static CartCheckoutResult() { - return Joi.object({ - app_intercept_url: Joi.string().allow(""), - data: Joi.object().pattern(/\S/, Joi.any()), - cart: CartPlatformModel.CheckCart(), - success: Joi.boolean(), - callback_url: Joi.string().allow(""), - payment_confirm_url: Joi.string().allow(""), - order_id: Joi.string().allow(""), - message: Joi.string().allow(""), - }); - } - - /** @returns {CartDeliveryModesDetails} */ - static CartDeliveryModesDetails() { + /** @returns {CartDeliveryModesResponse} */ + static CartDeliveryModesResponse() { return Joi.object({ pickup_stores: Joi.array().items(Joi.number()), available_modes: Joi.array().items(Joi.string().allow("")), @@ -4809,15 +4073,15 @@ class CartPlatformModel { }); } - /** @returns {StoreDetails} */ - static StoreDetails() { + /** @returns {StoreDetailsResponse} */ + static StoreDetailsResponse() { return Joi.object({ items: Joi.array().items(CartPlatformModel.PickupStoreDetail()), }); } - /** @returns {CartPaymentUpdate} */ - static CartPaymentUpdate() { + /** @returns {UpdateCartPaymentRequest} */ + static UpdateCartPaymentRequest() { return Joi.object({ address_id: Joi.string().allow(""), payment_mode: Joi.string().allow(""), @@ -4837,7 +4101,6 @@ class CartPlatformModel { display_message_en: Joi.string().allow("").allow(null), code: Joi.string().allow("").allow(null), discount: Joi.number(), - error_en: Joi.string().allow("").allow(null), }); } @@ -4868,19 +4131,17 @@ class CartPlatformModel { payment_meta: CartPlatformModel.PaymentMeta().required(), amount: Joi.number().allow(null), name: Joi.string().allow(""), - payment_extra_identifiers: Joi.object().pattern(/\S/, Joi.any()), + payment_extra_identifiers: Joi.any(), }); } - /** @returns {PlatformCartCheckoutDetailV2Creation} */ - static PlatformCartCheckoutDetailV2Creation() { + /** @returns {PlatformCartCheckoutDetailV2Request} */ + static PlatformCartCheckoutDetailV2Request() { return Joi.object({ address_id: Joi.string().allow(""), payment_identifier: Joi.string().allow("").allow(null), - payment_params: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - custom_meta: Joi.array().items( - CartPlatformModel.CartCheckoutCustomMeta() - ), + payment_params: Joi.any().allow(null), + custom_meta: Joi.any(), payment_auto_confirm: Joi.boolean(), id: Joi.string().allow("").required(), pos: Joi.boolean(), @@ -4889,20 +4150,20 @@ class CartPlatformModel { aggregator: Joi.string().allow(""), pick_at_store_uid: Joi.number().allow(null), device_id: Joi.string().allow("").allow(null), - delivery_address: Joi.object().pattern(/\S/, Joi.any()), + delivery_address: Joi.any(), payment_mode: Joi.string().allow(""), checkout_mode: Joi.string().allow(""), - customer_details: CartPlatformModel.CustomerDetails(), - meta: Joi.object().pattern(/\S/, Joi.any()), + customer_details: Joi.any().allow(null), + meta: Joi.any(), payment_methods: Joi.array() .items(CartPlatformModel.PaymentMethod()) .required(), staff: CartPlatformModel.StaffCheckout(), employee_code: Joi.string().allow("").allow(null), - billing_address: Joi.object().pattern(/\S/, Joi.any()), + billing_address: Joi.any(), callback_url: Joi.string().allow("").allow(null), - user_id: Joi.string().allow("").required(), - extra_meta: Joi.object().pattern(/\S/, Joi.any()), + user_id: Joi.string().allow("").allow(null).required(), + extra_meta: Joi.any(), order_type: Joi.string().allow("").required(), files: Joi.array().items(CartPlatformModel.Files()), ordering_store: Joi.number().allow(null), @@ -4943,25 +4204,14 @@ class CartPlatformModel { }); } - /** @returns {ArticlePriceDetails} */ - static ArticlePriceDetails() { - return Joi.object({ - marked: Joi.number(), - effective: Joi.number(), - }); - } - /** @returns {FreeGiftItems} */ static FreeGiftItems() { return Joi.object({ item_slug: Joi.string().allow(""), item_name: Joi.string().allow(""), item_price_details: CartPlatformModel.ItemPriceDetails(), - article_price: CartPlatformModel.ArticlePriceDetails(), item_brand_name: Joi.string().allow(""), item_id: Joi.number(), - available_sizes: Joi.array().items(Joi.string().allow("")), - size: Joi.string().allow(""), item_images_url: Joi.array().items(Joi.string().allow("")), }); } @@ -4970,7 +4220,7 @@ class CartPlatformModel { static PromotionOffer() { return Joi.object({ id: Joi.string().allow(""), - buy_rules: Joi.object().pattern(/\S/, Joi.any()), + buy_rules: Joi.any(), offer_text: Joi.string().allow(""), promotion_type: Joi.string().allow(""), promotion_name: Joi.string().allow(""), @@ -4979,12 +4229,11 @@ class CartPlatformModel { discount_rules: Joi.array().items(Joi.any()), free_gift_items: Joi.array().items(CartPlatformModel.FreeGiftItems()), description: Joi.string().allow(""), - is_bank_offer: Joi.boolean(), }); } - /** @returns {PromotionOffersDetails} */ - static PromotionOffersDetails() { + /** @returns {PromotionOffersResponse} */ + static PromotionOffersResponse() { return Joi.object({ available_promotions: Joi.array().items( CartPlatformModel.PromotionOffer() @@ -5008,20 +4257,12 @@ class CartPlatformModel { }); } - /** @returns {PromotionPaymentOffersDetails} */ - static PromotionPaymentOffersDetails() { + /** @returns {PromotionPaymentOffersResponse} */ + static PromotionPaymentOffersResponse() { return Joi.object({ success: Joi.boolean(), promotions: Joi.array().items(CartPlatformModel.PromotionPaymentOffer()), }); } - - /** @returns {ValidationError} */ - static ValidationError() { - return Joi.object({ - message: Joi.string().allow("").required(), - field: Joi.string().allow("").required(), - }); - } } module.exports = CartPlatformModel; diff --git a/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts b/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts index 5ae0a80d4..7f02e5d53 100644 --- a/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +++ b/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts @@ -45,14 +45,13 @@ declare class Catalog { * @param {CatalogPlatformApplicationValidator.CreateCollectionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createCollection * @summary: Create a collection * @description: Create a collection for a sales channel linked to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createCollection/). */ - createCollection({ body, q, scheduleStatus, type, tags, isActive, pageNo, pageSize, requestHeaders, }?: CatalogPlatformApplicationValidator.CreateCollectionParam, { responseHeaders }?: object): Promise; + createCollection({ body, requestHeaders }?: CatalogPlatformApplicationValidator.CreateCollectionParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.CreateConfigurationByTypeParam} arg * - Arg object @@ -85,14 +84,14 @@ declare class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name createCustomAutocompleteRule * @summary: Create autocomplete configurations * @description: Create custom autocomplete keyword configurations for a specific sales channel to map any endpoint with these keywords. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createCustomAutocompleteRule/). */ - createCustomAutocompleteRule({ body, requestHeaders }?: CatalogPlatformApplicationValidator.CreateCustomAutocompleteRuleParam, { responseHeaders }?: object): Promise; + createCustomAutocompleteRule({ body, requestHeaders }?: CatalogPlatformApplicationValidator.CreateCustomAutocompleteRuleParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.CreateCustomKeywordParam} arg * - Arg object @@ -135,38 +134,38 @@ declare class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name createSearchConfiguration * @summary: Create search configuration * @description: Create search configuration for the catalog for a specific company and sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createSearchConfiguration/). */ - createSearchConfiguration({ body, requestHeaders }?: CatalogPlatformApplicationValidator.CreateSearchConfigurationParam, { responseHeaders }?: object): Promise; + createSearchConfiguration({ body, requestHeaders }?: CatalogPlatformApplicationValidator.CreateSearchConfigurationParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.DeleteAppCategoryReturnConfigurationParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteAppCategoryReturnConfiguration * @summary: Delete product return configuration * @description: Delete Category level sales channel Return Configuration setttings - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteAppCategoryReturnConfiguration/). */ - deleteAppCategoryReturnConfiguration({ body, requestHeaders }?: CatalogPlatformApplicationValidator.DeleteAppCategoryReturnConfigurationParam, { responseHeaders }?: object): Promise; + deleteAppCategoryReturnConfiguration({ body, requestHeaders }?: CatalogPlatformApplicationValidator.DeleteAppCategoryReturnConfigurationParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.DeleteAutocompleteKeywordParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteAutocompleteKeyword * @summary: Delete autocomplete keyword * @description: Delete custom autocomplete keyword configurations for a specific sales channel by its id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteAutocompleteKeyword/). */ - deleteAutocompleteKeyword({ id, requestHeaders }?: CatalogPlatformApplicationValidator.DeleteAutocompleteKeywordParam, { responseHeaders }?: object): Promise; + deleteAutocompleteKeyword({ id, requestHeaders }?: CatalogPlatformApplicationValidator.DeleteAutocompleteKeywordParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.DeleteCollectionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -185,66 +184,63 @@ declare class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name deleteGroupConfiguration * @summary: Delete group configuration * @description: Delete group configurations by its slug for a specific config_type for a company and an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteGroupConfiguration/). */ - deleteGroupConfiguration({ configType, groupSlug, requestHeaders }?: CatalogPlatformApplicationValidator.DeleteGroupConfigurationParam, { responseHeaders }?: object): Promise; + deleteGroupConfiguration({ configType, groupSlug, requestHeaders }?: CatalogPlatformApplicationValidator.DeleteGroupConfigurationParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.DeleteListingConfigurationParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name deleteListingConfiguration * @summary: Delete listing configuration * @description: Remove a specific product listing configuration by its config_id for a specific config_type for a company and an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteListingConfiguration/). */ - deleteListingConfiguration({ configType, configId, requestHeaders }?: CatalogPlatformApplicationValidator.DeleteListingConfigurationParam, { responseHeaders }?: object): Promise; + deleteListingConfiguration({ configType, configId, requestHeaders }?: CatalogPlatformApplicationValidator.DeleteListingConfigurationParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.DeleteSearchConfigurationParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name deleteSearchConfiguration * @summary: Delete search configuration * @description: Delete Search Configuration for a specific sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteSearchConfiguration/). */ - deleteSearchConfiguration({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + deleteSearchConfiguration({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.DeleteSearchKeywordsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteSearchKeywords * @summary: Delete search keywords * @description: Delete a search keywords by its id for a specific company and sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteSearchKeywords/). */ - deleteSearchKeywords({ id, requestHeaders }?: CatalogPlatformApplicationValidator.DeleteSearchKeywordsParam, { responseHeaders }?: object): Promise; + deleteSearchKeywords({ id, requestHeaders }?: CatalogPlatformApplicationValidator.DeleteSearchKeywordsParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetAllCollectionsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getAllCollections * @summary: List collections * @description: Retrieve all collections based on criteria such as collection name, schedule status, and active status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAllCollections/). */ - getAllCollections({ q, scheduleStatus, type, tags, isActive, pageNo, pageSize, requestHeaders, }?: CatalogPlatformApplicationValidator.GetAllCollectionsParam, { responseHeaders }?: object): Promise; + getAllCollections({ q, scheduleStatus, type, tags, isActive, pageNo, pageSize, requestHeaders, }?: CatalogPlatformApplicationValidator.GetAllCollectionsParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} arg.companyId - A `company_id` is a unique identifier for @@ -260,7 +256,7 @@ declare class Catalog { * @param {boolean} [arg.isActive] - Get collections filtered by active status. * @param {number} [arg.pageSize] - Number of items to retrieve in each * page. Default is 12. - * @returns {Paginator} + * @returns {Paginator} * @summary: List collections * @description: Retrieve all collections based on criteria such as collection name, schedule status, and active status. */ @@ -273,61 +269,58 @@ declare class Catalog { tags?: string[]; isActive?: boolean; pageSize?: number; - }): Paginator; + }): Paginator; /** * @param {CatalogPlatformApplicationValidator.GetAllSearchKeywordParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAllSearchKeyword * @summary: List search keywords * @description: Get all custom search keywords for a specific company and sales channel allows you to map certain conditions with the keywords to give you ultimate results. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAllSearchKeyword/). */ - getAllSearchKeyword({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getAllSearchKeyword({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetAppCategoryReturnConfigParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getAppCategoryReturnConfig * @summary: Get category return configuration * @description: Get all category level configuration level set for an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppCategoryReturnConfig/). */ - getAppCategoryReturnConfig({ q, pageNo, pageSize, requestHeaders }?: CatalogPlatformApplicationValidator.GetAppCategoryReturnConfigParam, { responseHeaders }?: object): Promise; + getAppCategoryReturnConfig({ q, pageNo, pageSize, requestHeaders }?: CatalogPlatformApplicationValidator.GetAppCategoryReturnConfigParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetAppInventoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAppInventory * @summary: List sales channel inventory - * @description: Retrieve inventory data related to the sales channel. this can be used to get the Inventory status of products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppInventory/). + * @description: Retrieve inventory data related to the sales channel. this can be used to get the Inventory status of products with the filters of timestamp, store_ids, brand_ids, item_id, Items, Pagination. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppInventory/). */ - getAppInventory({ itemIds, storeIds, brandIds, sellerIdentifiers, timestamp, pageSize, pageId, qtyGt, qtyLt, qtyType, fromDate, toDate, requestHeaders, }?: CatalogPlatformApplicationValidator.GetAppInventoryParam, { responseHeaders }?: object): Promise; + getAppInventory({ itemIds, storeIds, brandIds, sellerIdentifiers, timestamp, pageSize, pageId, qtyGt, qtyLt, qtyType, fromDate, toDate, requestHeaders, }?: CatalogPlatformApplicationValidator.GetAppInventoryParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetAppLocationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAppLocations * @summary: List sales channels - * @description: Retrieve all stores associated with a sales channel, with support for searching by store name and filtering by store type and status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppLocations/). + * @description: Retrieve all stores associated with an sales channel, with support for searching by store name and filtering by store type and status (verified/unverified) - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppLocations/). */ - getAppLocations({ storeType, uid, q, stage, pageNo, pageSize, tags, storeTypes, requestHeaders, }?: CatalogPlatformApplicationValidator.GetAppLocationsParam, { responseHeaders }?: object): Promise; + getAppLocations({ storeType, uid, q, stage, pageNo, pageSize, tags, storeTypes, requestHeaders, }?: CatalogPlatformApplicationValidator.GetAppLocationsParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. - * @param {number} arg.companyId - A `company_id` is a unique identifier for - * a particular seller account. - * @param {string} arg.applicationId - A `application_id` is a unique - * identifier for a particular sale channel. + * @param {string} arg.companyId - Id of the company whose locations are to fetched + * @param {string} arg.applicationId - Id of the application whose locations + * are to fetched * @param {string} [arg.storeType] - Helps to sort the location list on the * basis of location type. * @param {number[]} [arg.uid] - Helps to sort the location list on the @@ -339,12 +332,12 @@ declare class Catalog { * page. Default is 20. * @param {string[]} [arg.tags] - Get locations filtered by tags. * @param {string[]} [arg.storeTypes] - Get locations filtered by store types. - * @returns {Paginator} + * @returns {Paginator} * @summary: List sales channels - * @description: Retrieve all stores associated with a sales channel, with support for searching by store name and filtering by store type and status. + * @description: Retrieve all stores associated with an sales channel, with support for searching by store name and filtering by store type and status (verified/unverified) */ getAppLocationsPaginator({ companyId, applicationId, storeType, uid, q, stage, pageSize, tags, storeTypes, }?: { - companyId: number; + companyId: string; applicationId: string; storeType?: string; uid?: number[]; @@ -353,33 +346,31 @@ declare class Catalog { pageSize?: number; tags?: string[]; storeTypes?: string[]; - }): Paginator; + }): Paginator; /** * @param {CatalogPlatformApplicationValidator.GetAppProductParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAppProduct * @summary: Get sales channel product * @description: Retrieve sales channel product details by its item_id and depending upon filters sent in request. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppProduct/). */ - getAppProduct({ itemId, requestHeaders }?: CatalogPlatformApplicationValidator.GetAppProductParam, { responseHeaders }?: object): Promise; + getAppProduct({ itemId, requestHeaders }?: CatalogPlatformApplicationValidator.GetAppProductParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetAppProductsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getAppProducts * @summary: List sales channel products * @description: Retrieve products specific to the sales channel, with filtering options available for brand, category, department, tags, item IDs, product name, and pagination support - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppProducts/). */ - getAppProducts({ brandIds, categoryIds, departmentIds, tags, itemIds, pageNo, pageSize, q, requestHeaders, }?: CatalogPlatformApplicationValidator.GetAppProductsParam, { responseHeaders }?: object): Promise; + getAppProducts({ brandIds, categoryIds, departmentIds, tags, itemIds, pageNo, pageSize, q, requestHeaders, }?: CatalogPlatformApplicationValidator.GetAppProductsParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. - * @param {number} arg.companyId - A `company_id` is a unique identifier for + * @param {string} arg.companyId - A `company_id` is a unique identifier for * a particular seller account. * @param {string} arg.applicationId - A `application_id` is a unique * identifier for a particular sale channel. @@ -393,12 +384,12 @@ declare class Catalog { * @param {number} [arg.pageSize] - Number of items to retrieve in each * page. Default is 10. * @param {string} [arg.q] - Search with Item Code, Name, Slug or Identifier. - * @returns {Paginator} + * @returns {Paginator} * @summary: List sales channel products * @description: Retrieve products specific to the sales channel, with filtering options available for brand, category, department, tags, item IDs, product name, and pagination support */ getAppProductsPaginator({ companyId, applicationId, brandIds, categoryIds, departmentIds, tags, itemIds, pageSize, q, }?: { - companyId: number; + companyId: string; applicationId: string; brandIds?: number[]; categoryIds?: number[]; @@ -407,20 +398,75 @@ declare class Catalog { itemIds?: number[]; pageSize?: number; q?: string; - }): Paginator; + }): Paginator; /** * @param {CatalogPlatformApplicationValidator.GetAppReturnConfigurationParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAppReturnConfiguration - * @summary: Get product-return configuration + * @summary: get product-return configuration * @description: Get Product Return configuration set at an sales channel level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppReturnConfiguration/). */ - getAppReturnConfiguration({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getAppReturnConfiguration({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {CatalogPlatformApplicationValidator.GetAppicationProductsParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getAppicationProducts + * @summary: List sales channel products + * @description: Retrieve products associated with the sales channel. List all the products associated with a brand, collection or category in a requested sort order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppicationProducts/). + */ + getAppicationProducts({ q, f, c, filters, isDependent, sortOn, pageId, pageSize, pageNo, pageType, itemIds, requestHeaders, }?: CatalogPlatformApplicationValidator.GetAppicationProductsParam, { responseHeaders }?: object): Promise; + /** + * @param {Object} arg - Arg object. + * @param {string} arg.companyId - A `company_id` is a unique identifier for + * a particular seller account. + * @param {string} arg.applicationId - A `application_id` is a unique + * identifier for a particular sale channel. + * @param {string} [arg.q] - The search query. This can be a partial or + * complete name of a either a product, brand or category + * @param {string} [arg.f] - The search filter parameters. All the parameter + * filtered from filter parameters will be passed in **f** parameter in + * this format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts** + * @param {string} [arg.c] - The search filter parameters for collection + * items. All the parameter filtered from filter parameters will be passed + * in **c** parameter in this format. + * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** + * @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the + * filter details. This flag is used to fetch all filters + * @param {boolean} [arg.isDependent] - This query parameter is used to get + * the dependent products in the listing. + * @param {string} [arg.sortOn] - The order to sort the list of products on. + * The supported sort parameters are popularity, price, redemption and + * discount in either ascending or descending order. See the supported + * values below. + * @param {number} [arg.pageSize] - Number of items to retrieve in each + * page. Default is 12. + * @param {number[]} [arg.itemIds] - Item Ids of product + * @returns {Paginator} + * @summary: List sales channel products + * @description: Retrieve products associated with the sales channel. List all the products associated with a brand, collection or category in a requested sort order. + */ + getAppicationProductsPaginator({ companyId, applicationId, q, f, c, filters, isDependent, sortOn, pageSize, itemIds, }?: { + companyId: string; + applicationId: string; + q?: string; + f?: string; + c?: string; + filters?: boolean; + isDependent?: boolean; + sortOn?: string; + pageSize?: number; + itemIds?: number[]; + }): Paginator; /** * @param {CatalogPlatformApplicationValidator.GetApplicationBrandListingParam} arg * - Arg object @@ -460,13 +506,12 @@ declare class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getApplicationBrands * @summary: List brands * @description: List all the brands. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationBrands/). */ - getApplicationBrands({ department, pageNo, pageSize, q, brandId, requestHeaders }?: CatalogPlatformApplicationValidator.GetApplicationBrandsParam, { responseHeaders }?: object): Promise; + getApplicationBrands({ department, pageNo, pageSize, q, brandId, requestHeaders }?: CatalogPlatformApplicationValidator.GetApplicationBrandsParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} arg.companyId - A `company_id` is a unique identifier for @@ -483,7 +528,7 @@ declare class Catalog { * parameter to search brands by brand name. * @param {number[]} [arg.brandId] - Helps to sort the brands list on the * basis of uid list. - * @returns {Paginator} + * @returns {Paginator} * @summary: List brands * @description: List all the brands. */ @@ -494,7 +539,7 @@ declare class Catalog { pageSize?: number; q?: string; brandId?: number[]; - }): Paginator; + }): Paginator; /** * @param {CatalogPlatformApplicationValidator.GetApplicationCategoryListingParam} arg * - Arg object @@ -538,17 +583,17 @@ declare class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getApplicationDepartmentListing * @summary: List sales channel departments * @description: Retrieve department listings related to the sales channel. Departments are used to categorize similar products, and you can filter the results based on department names - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationDepartmentListing/). */ - getApplicationDepartmentListing({ pageNo, pageSize, q, requestHeaders }?: CatalogPlatformApplicationValidator.GetApplicationDepartmentListingParam, { responseHeaders }?: object): Promise; + getApplicationDepartmentListing({ pageNo, pageSize, q, requestHeaders }?: CatalogPlatformApplicationValidator.GetApplicationDepartmentListingParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. - * @param {number} arg.companyId - A `company_id` is a unique identifier for + * @param {string} arg.companyId - A `company_id` is a unique identifier for * a particular seller account. * @param {string} arg.applicationId - A `application_id` is a unique * identifier for a particular sale channel. @@ -556,129 +601,69 @@ declare class Catalog { * page. Default is 12. * @param {string} [arg.q] - A search query string. Use this parameter to * filter results based on a keyword or specific value. - * @returns {Paginator} + * @returns {Paginator} * @summary: List sales channel departments * @description: Retrieve department listings related to the sales channel. Departments are used to categorize similar products, and you can filter the results based on department names */ getApplicationDepartmentListingPaginator({ companyId, applicationId, pageSize, q, }?: { - companyId: number; + companyId: string; applicationId: string; pageSize?: number; q?: string; - }): Paginator; + }): Paginator; /** * @param {CatalogPlatformApplicationValidator.GetApplicationFilterKeysParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getApplicationFilterKeys * @summary: List filter keys * @description: Retrieve the details of all applicable product filters, such as Color, Brand, and Category, indicating the criteria keys where filters can be applied. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationFilterKeys/). */ - getApplicationFilterKeys({ c, requestHeaders }?: CatalogPlatformApplicationValidator.GetApplicationFilterKeysParam, { responseHeaders }?: object): Promise; + getApplicationFilterKeys({ c, requestHeaders }?: CatalogPlatformApplicationValidator.GetApplicationFilterKeysParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetApplicationFilterValuesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getApplicationFilterValues * @summary: List product filters * @description: This API is designed to retrieve the filter values for all available options within the selected filter, such as "red" for color. * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationFilterValues/). */ - getApplicationFilterValues({ filterKey, c, collectionId, pageNo, pageSize, q, requestHeaders }?: CatalogPlatformApplicationValidator.GetApplicationFilterValuesParam, { responseHeaders }?: object): Promise; - /** - * @param {CatalogPlatformApplicationValidator.GetApplicationProductsParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getApplicationProducts - * @summary: List sales channel products - * @description: Retrieve products associated with the sales channel. List all the products associated with a brand, collection or category in a requested sort order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationProducts/). - */ - getApplicationProducts({ q, f, c, filters, isDependent, sortOn, pageId, pageSize, pageNo, pageType, itemIds, requestHeaders, }?: CatalogPlatformApplicationValidator.GetApplicationProductsParam, { responseHeaders }?: object): Promise; - /** - * @param {Object} arg - Arg object. - * @param {number} arg.companyId - A `company_id` is a unique identifier for - * a particular seller account. - * @param {string} arg.applicationId - A `application_id` is a unique - * identifier for a particular sale channel. - * @param {string} [arg.q] - The search query. This can be a partial or - * complete name of a either a product, brand or category - * @param {string} [arg.f] - The search filter parameters. All the parameter - * filtered from filter parameters will be passed in **f** parameter in - * this format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts** - * @param {string} [arg.c] - The search filter parameters for collection - * items. All the parameter filtered from filter parameters will be passed - * in **c** parameter in this format. - * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** - * @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the - * filter details. This flag is used to fetch all filters - * @param {boolean} [arg.isDependent] - This query parameter is used to get - * the dependent products in the listing. - * @param {string} [arg.sortOn] - The order to sort the list of products on. - * The supported sort parameters are popularity, price, redemption and - * discount in either ascending or descending order. See the supported - * values below. - * @param {number} [arg.pageSize] - Number of items to retrieve in each - * page. Default is 12. - * @param {string[]} [arg.itemIds] - Item Ids of product - * @returns {Paginator} - * @summary: List sales channel products - * @description: Retrieve products associated with the sales channel. List all the products associated with a brand, collection or category in a requested sort order. - */ - getApplicationProductsPaginator({ companyId, applicationId, q, f, c, filters, isDependent, sortOn, pageSize, itemIds, }?: { - companyId: number; - applicationId: string; - q?: string; - f?: string; - c?: string; - filters?: boolean; - isDependent?: boolean; - sortOn?: string; - pageSize?: number; - itemIds?: string[]; - }): Paginator; + getApplicationFilterValues({ filterKey, c, collectionId, pageNo, pageSize, q, requestHeaders }?: CatalogPlatformApplicationValidator.GetApplicationFilterValuesParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetAutocompleteConfigParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getAutocompleteConfig * @summary: Get autocomplete configuration * @description: Get custom autocomplete keyword configuration for a specific sales channel which allows you to map any endpoint with these keywords to give you the ultimate suggestion results. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAutocompleteConfig/). */ - getAutocompleteConfig({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getAutocompleteConfig({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetAutocompleteKeywordDetailParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getAutocompleteKeywordDetail * @summary: Get autocomplete keyword * @description: Retrieve detailed information about a specific autocomplete keyword for a specific sales channel by its id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAutocompleteKeywordDetail/). */ - getAutocompleteKeywordDetail({ id, requestHeaders }?: CatalogPlatformApplicationValidator.GetAutocompleteKeywordDetailParam, { responseHeaders }?: object): Promise; + getAutocompleteKeywordDetail({ id, requestHeaders }?: CatalogPlatformApplicationValidator.GetAutocompleteKeywordDetailParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetCatalogConfigurationParam} arg * - Arg object @@ -699,52 +684,48 @@ declare class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getCatalogInsights * @summary: Get catalog counts * @description: Retrieve the count of catalog related data like products, brands, departments and categories that have been made live as per configuration of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCatalogInsights/). */ - getCatalogInsights({ brand, requestHeaders }?: CatalogPlatformApplicationValidator.GetCatalogInsightsParam, { responseHeaders }?: object): Promise; + getCatalogInsights({ brand, requestHeaders }?: CatalogPlatformApplicationValidator.GetCatalogInsightsParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetCategoriesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getCategories * @summary: List categories * @description: Retrieve a list of categories associated to company and sales channel. user can filter on departments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCategories/). */ - getCategories({ department, requestHeaders }?: CatalogPlatformApplicationValidator.GetCategoriesParam, { responseHeaders }?: object): Promise; + getCategories({ department, requestHeaders }?: CatalogPlatformApplicationValidator.GetCategoriesParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetCollectionDetailParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getCollectionDetail * @summary: Get a collection * @description: Get the details of a collection by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCollectionDetail/). */ - getCollectionDetail({ slug, requestHeaders }?: CatalogPlatformApplicationValidator.GetCollectionDetailParam, { responseHeaders }?: object): Promise; + getCollectionDetail({ slug, requestHeaders }?: CatalogPlatformApplicationValidator.GetCollectionDetailParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetCollectionItemsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getCollectionItems * @summary: List items of collection * @description: Get items from a collection specified by its id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCollectionItems/). */ - getCollectionItems({ id, sortOn, pageId, pageSize, pageNo, requestHeaders }?: CatalogPlatformApplicationValidator.GetCollectionItemsParam, { responseHeaders }?: object): Promise; + getCollectionItems({ id, sortOn, pageId, pageSize, requestHeaders }?: CatalogPlatformApplicationValidator.GetCollectionItemsParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetConfigurationByTypeParam} arg * - Arg object @@ -765,14 +746,13 @@ declare class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getConfigurationMetadata * @summary: Get configuration metadata * @description: Retrieve the configuraion metadata details for specific config_type for a company and an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getConfigurationMetadata/). */ - getConfigurationMetadata({ configType, templateSlug, pageNo, pageSize, q, requestHeaders }?: CatalogPlatformApplicationValidator.GetConfigurationMetadataParam, { responseHeaders }?: object): Promise; + getConfigurationMetadata({ configType, templateSlug, pageNo, pageSize, q, requestHeaders }?: CatalogPlatformApplicationValidator.GetConfigurationMetadataParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetConfigurationsParam} arg * - Arg object @@ -790,76 +770,75 @@ declare class Catalog { * @param {CatalogPlatformApplicationValidator.GetDepartmentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getDepartments * @summary: List departments * @description: Retrieve a list of departments associated with a comapny and sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getDepartments/). */ - getDepartments({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getDepartments({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetDiscountedInventoryBySizeIdentifierParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getDiscountedInventoryBySizeIdentifier * @summary: Get discounted inventory * @description: Allows to retrieve Inventory data for particular company grouped by size and store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getDiscountedInventoryBySizeIdentifier/). */ - getDiscountedInventoryBySizeIdentifier({ itemId, sizeIdentifier, pageNo, pageSize, locationIds, requestHeaders, }?: CatalogPlatformApplicationValidator.GetDiscountedInventoryBySizeIdentifierParam, { responseHeaders }?: object): Promise; + getDiscountedInventoryBySizeIdentifier({ itemId, sizeIdentifier, pageNo, pageSize, q, locationIds, requestHeaders, }?: CatalogPlatformApplicationValidator.GetDiscountedInventoryBySizeIdentifierParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. - * @param {number} arg.companyId - A `company_id` is a unique identifier for - * a particular seller account. - * @param {string} arg.applicationId - A `application_id` is a unique - * identifier for a particular sale channel. - * @param {number} arg.itemId - A `item_id` is a unique identifier for a - * specific product. - * @param {number} arg.sizeIdentifier - Size Identifier (Seller Identifier - * or Primary Identifier). + * @param {number} arg.companyId - Id of the company associated to product + * that is to be viewed. + * @param {string} arg.applicationId - Uniquer Application ID. + * @param {number} arg.itemId - Item code of the product of which size is to be get. + * @param {string} arg.sizeIdentifier - Size Identifier (Seller Identifier + * or Primary Identifier) of which inventory is to get. * @param {number} [arg.pageSize] - Number of items to retrieve in each * page. Default is 12. + * @param {string} [arg.q] - Search with help of store code. * @param {number[]} [arg.locationIds] - Search by store ids. - * @returns {Paginator} + * @returns {Paginator} * @summary: Get discounted inventory * @description: Allows to retrieve Inventory data for particular company grouped by size and store. */ - getDiscountedInventoryBySizeIdentifierPaginator({ companyId, applicationId, itemId, sizeIdentifier, pageSize, locationIds, }?: { + getDiscountedInventoryBySizeIdentifierPaginator({ companyId, applicationId, itemId, sizeIdentifier, pageSize, q, locationIds, }?: { companyId: number; applicationId: string; itemId: number; - sizeIdentifier: number; + sizeIdentifier: string; pageSize?: number; + q?: string; locationIds?: number[]; - }): Paginator; + }): Paginator; /** * @param {CatalogPlatformApplicationValidator.GetGroupConfigurationsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getGroupConfigurations * @summary: Get group configurations * @description: Retrieve the details of product group configurations based on config types for a company and an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getGroupConfigurations/). */ - getGroupConfigurations({ configType, pageNo, pageSize, search, templateSlug, requestHeaders }?: CatalogPlatformApplicationValidator.GetGroupConfigurationsParam, { responseHeaders }?: object): Promise; + getGroupConfigurations({ configType, pageNo, pageSize, search, templateSlug, requestHeaders }?: CatalogPlatformApplicationValidator.GetGroupConfigurationsParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetListingConfigurationsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getListingConfigurations * @summary: Get listing configurations * @description: Retrieve product listing configurations based on specific config_type for a company and an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getListingConfigurations/). */ - getListingConfigurations({ configType, pageNo, pageSize, search, requestHeaders }?: CatalogPlatformApplicationValidator.GetListingConfigurationsParam, { responseHeaders }?: object): Promise; + getListingConfigurations({ configType, pageNo, pageSize, search, requestHeaders }?: CatalogPlatformApplicationValidator.GetListingConfigurationsParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetProductDetailBySlugParam} arg * - Arg object @@ -876,54 +855,51 @@ declare class Catalog { * @param {CatalogPlatformApplicationValidator.GetQueryFiltersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getQueryFilters * @summary: Get collection query filters * @description: Retrieve query filters to configure a collection for a company and a sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getQueryFilters/). */ - getQueryFilters({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getQueryFilters({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetSearchConfigurationParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getSearchConfiguration * @summary: Get Search configuration * @description: Get search configuration for a specific company and sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSearchConfiguration/). */ - getSearchConfiguration({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getSearchConfiguration({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetSearchKeywordsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getSearchKeywords * @summary: Get search keywords * @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://partners.fynd.com/help/docs/sdk/platform/catalog/getSearchKeywords/). */ - getSearchKeywords({ id, requestHeaders }?: CatalogPlatformApplicationValidator.GetSearchKeywordsParam, { responseHeaders }?: object): Promise; + getSearchKeywords({ id, requestHeaders }?: CatalogPlatformApplicationValidator.GetSearchKeywordsParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.UpdateAllowSingleParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name updateAllowSingle * @summary: Update 'Allow Single' setting * @description: Modify allow single flag for filters of the sales channel for a company and an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAllowSingle/). */ - updateAllowSingle({ body, requestHeaders }?: CatalogPlatformApplicationValidator.UpdateAllowSingleParam, { responseHeaders }?: object): Promise; + updateAllowSingle({ body, requestHeaders }?: CatalogPlatformApplicationValidator.UpdateAllowSingleParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.UpdateAppBrandParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -952,12 +928,12 @@ declare class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateAppCategoryReturnConfiguration * @summary: Update return Configuration * @description: Update Category level sales channel Return Configuration setttings - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAppCategoryReturnConfiguration/). */ - updateAppCategoryReturnConfiguration({ body, requestHeaders }?: CatalogPlatformApplicationValidator.UpdateAppCategoryReturnConfigurationParam, { responseHeaders }?: object): Promise; + updateAppCategoryReturnConfiguration({ body, requestHeaders }?: CatalogPlatformApplicationValidator.UpdateAppCategoryReturnConfigurationParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.UpdateAppDepartmentParam} arg * - Arg object @@ -989,7 +965,7 @@ declare class Catalog { * @returns {Promise} - Success response * @name updateAppProduct * @summary: Update sales channel product - * @description: Allows to update data associated to a item by its item_id for a sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAppProduct/). + * @description: Allows to update data associated to a item by its item_id for an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAppProduct/). */ updateAppProduct({ itemId, body, requestHeaders }?: CatalogPlatformApplicationValidator.UpdateAppProductParam, { responseHeaders }?: object): Promise; /** @@ -1010,14 +986,13 @@ declare class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name updateAutocompleteKeyword * @summary: Update autocomplete keyword * @description: Update a specific autocomplete keyword configuration by its id for a specific sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAutocompleteKeyword/). */ - updateAutocompleteKeyword({ id, body, requestHeaders }?: CatalogPlatformApplicationValidator.UpdateAutocompleteKeywordParam, { responseHeaders }?: object): Promise; + updateAutocompleteKeyword({ id, body, requestHeaders }?: CatalogPlatformApplicationValidator.UpdateAutocompleteKeywordParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.UpdateCollectionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -1034,13 +1009,12 @@ declare class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name updateDefaultSort * @summary: Update default sorting * @description: Modify the default sort key configuration for a company and an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateDefaultSort/). */ - updateDefaultSort({ body, requestHeaders }?: CatalogPlatformApplicationValidator.UpdateDefaultSortParam, { responseHeaders }?: object): Promise; + updateDefaultSort({ body, requestHeaders }?: CatalogPlatformApplicationValidator.UpdateDefaultSortParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.UpdateGroupConfigurationParam} arg * - Arg object @@ -1071,14 +1045,14 @@ declare class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updateSearchConfiguration * @summary: Update search configuration * @description: Allows you to modify searchable attributes for an sales channel. searchable attributes are the fields on which the products are searched. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateSearchConfiguration/). */ - updateSearchConfiguration({ body, requestHeaders }?: CatalogPlatformApplicationValidator.UpdateSearchConfigurationParam, { responseHeaders }?: object): Promise; + updateSearchConfiguration({ body, requestHeaders }?: CatalogPlatformApplicationValidator.UpdateSearchConfigurationParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.UpdateSearchKeywordsParam} arg * - Arg object diff --git a/sdk/platform/Catalog/CatalogPlatformApplicationClient.js b/sdk/platform/Catalog/CatalogPlatformApplicationClient.js index 74559f0dd..7fe35317f 100644 --- a/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +++ b/sdk/platform/Catalog/CatalogPlatformApplicationClient.js @@ -266,25 +266,14 @@ class Catalog { * @param {CatalogPlatformApplicationValidator.CreateCollectionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createCollection * @summary: Create a collection * @description: Create a collection for a sales channel linked to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createCollection/). */ async createCollection( - { - body, - q, - scheduleStatus, - type, - tags, - isActive, - pageNo, - pageSize, - requestHeaders, - } = { requestHeaders: {} }, + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -292,13 +281,6 @@ class Catalog { } = CatalogPlatformApplicationValidator.createCollection().validate( { body, - q, - scheduleStatus, - type, - tags, - isActive, - pageNo, - pageSize, }, { abortEarly: false, allowUnknown: true } ); @@ -312,13 +294,6 @@ class Catalog { } = CatalogPlatformApplicationValidator.createCollection().validate( { body, - q, - scheduleStatus, - type, - tags, - isActive, - pageNo, - pageSize, }, { abortEarly: false, allowUnknown: false } ); @@ -330,13 +305,6 @@ class Catalog { } const query_params = {}; - query_params["q"] = q; - query_params["schedule_status"] = scheduleStatus; - query_params["type"] = type; - query_params["tags"] = tags; - query_params["is_active"] = isActive; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; const response = await PlatformAPIClient.execute( this.config, @@ -355,10 +323,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.CollectionCreateResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.CollectionCreateResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -546,7 +514,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name createCustomAutocompleteRule @@ -604,7 +572,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.CreateAutocompleteWordsResponseSchema().validate( + } = CatalogPlatformModel.CreateAutocompleteWordsResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -876,7 +844,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name createSearchConfiguration @@ -934,7 +902,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.CreateSearchConfigurationResponseSchema().validate( + } = CatalogPlatformModel.CreateSearchConfigurationResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -959,7 +927,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteAppCategoryReturnConfiguration * @summary: Delete product return configuration * @description: Delete Category level sales channel Return Configuration setttings - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteAppCategoryReturnConfiguration/). @@ -1015,7 +983,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, { + } = CatalogPlatformModel.SuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1040,7 +1008,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteAutocompleteKeyword * @summary: Delete autocomplete keyword * @description: Delete custom autocomplete keyword configurations for a specific sales channel by its id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteAutocompleteKeyword/). @@ -1096,7 +1064,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.DeleteResponseSchema().validate(responseData, { + } = CatalogPlatformModel.DeleteResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1202,8 +1170,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name deleteGroupConfiguration * @summary: Delete group configuration * @description: Delete group configurations by its slug for a specific config_type for a company and an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteGroupConfiguration/). @@ -1261,10 +1228,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ConfigSuccessResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.ConfigSuccessResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1286,8 +1253,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name deleteListingConfiguration * @summary: Delete listing configuration * @description: Remove a specific product listing configuration by its config_id for a specific config_type for a company and an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteListingConfiguration/). @@ -1345,10 +1311,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ConfigSuccessResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.ConfigSuccessResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1370,7 +1336,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name deleteSearchConfiguration @@ -1424,7 +1390,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.DeleteSearchConfigurationResponseSchema().validate( + } = CatalogPlatformModel.DeleteSearchConfigurationResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1449,7 +1415,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteSearchKeywords * @summary: Delete search keywords * @description: Delete a search keywords by its id for a specific company and sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteSearchKeywords/). @@ -1505,7 +1471,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.DeleteResponseSchema().validate(responseData, { + } = CatalogPlatformModel.DeleteResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1530,9 +1496,8 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getAllCollections * @summary: List collections * @description: Retrieve all collections based on criteria such as collection name, schedule status, and active status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAllCollections/). @@ -1616,7 +1581,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetCollectionListingResponseSchema().validate( + } = CatalogPlatformModel.GetCollectionListingResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1650,7 +1615,7 @@ class Catalog { * @param {boolean} [arg.isActive] - Get collections filtered by active status. * @param {number} [arg.pageSize] - Number of items to retrieve in each * page. Default is 12. - * @returns {Paginator} + * @returns {Paginator} * @summary: List collections * @description: Retrieve all collections based on criteria such as collection name, schedule status, and active status. */ @@ -1696,8 +1661,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAllSearchKeyword * @summary: List search keywords * @description: Get all custom search keywords for a specific company and sales channel allows you to map certain conditions with the keywords to give you ultimate results. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAllSearchKeyword/). @@ -1749,10 +1713,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetSearchWordsResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.GetSearchWordsResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1774,7 +1738,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getAppCategoryReturnConfig @@ -1839,7 +1803,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.BaseAppCategoryReturnConfigResponseSchema().validate( + } = CatalogPlatformModel.BaseAppCategoryReturnConfigResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1862,11 +1826,10 @@ class Catalog { * @param {CatalogPlatformApplicationValidator.GetAppInventoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAppInventory * @summary: List sales channel inventory - * @description: Retrieve inventory data related to the sales channel. this can be used to get the Inventory status of products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppInventory/). + * @description: Retrieve inventory data related to the sales channel. this can be used to get the Inventory status of products with the filters of timestamp, store_ids, brand_ids, item_id, Items, Pagination. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppInventory/). */ async getAppInventory( { @@ -1967,10 +1930,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.InventoryStockResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.InventoryStockResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1990,10 +1953,10 @@ class Catalog { * @param {CatalogPlatformApplicationValidator.GetAppLocationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAppLocations * @summary: List sales channels - * @description: Retrieve all stores associated with a sales channel, with support for searching by store name and filtering by store type and status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppLocations/). + * @description: Retrieve all stores associated with an sales channel, with support for searching by store name and filtering by store type and status (verified/unverified) - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppLocations/). */ async getAppLocations( { @@ -2078,7 +2041,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.LocationListSchema().validate(responseData, { + } = CatalogPlatformModel.LocationListSerializer().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2099,10 +2062,9 @@ class Catalog { /** * @param {Object} arg - Arg object. - * @param {number} arg.companyId - A `company_id` is a unique identifier for - * a particular seller account. - * @param {string} arg.applicationId - A `application_id` is a unique - * identifier for a particular sale channel. + * @param {string} arg.companyId - Id of the company whose locations are to fetched + * @param {string} arg.applicationId - Id of the application whose locations + * are to fetched * @param {string} [arg.storeType] - Helps to sort the location list on the * basis of location type. * @param {number[]} [arg.uid] - Helps to sort the location list on the @@ -2114,9 +2076,9 @@ class Catalog { * page. Default is 20. * @param {string[]} [arg.tags] - Get locations filtered by tags. * @param {string[]} [arg.storeTypes] - Get locations filtered by store types. - * @returns {Paginator} + * @returns {Paginator} * @summary: List sales channels - * @description: Retrieve all stores associated with a sales channel, with support for searching by store name and filtering by store type and status. + * @description: Retrieve all stores associated with an sales channel, with support for searching by store name and filtering by store type and status (verified/unverified) */ getAppLocationsPaginator({ companyId, @@ -2160,8 +2122,7 @@ class Catalog { * @param {CatalogPlatformApplicationValidator.GetAppProductParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAppProduct * @summary: Get sales channel product * @description: Retrieve sales channel product details by its item_id and depending upon filters sent in request. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppProduct/). @@ -2217,10 +2178,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.OwnerAppItemResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.OwnerAppItemResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2240,9 +2201,8 @@ class Catalog { * @param {CatalogPlatformApplicationValidator.GetAppProductsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getAppProducts * @summary: List sales channel products * @description: Retrieve products specific to the sales channel, with filtering options available for brand, category, department, tags, item IDs, product name, and pagination support - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppProducts/). @@ -2330,7 +2290,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.RawProductListingResponseSchema().validate( + } = CatalogPlatformModel.RawProductListingResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -2351,7 +2311,7 @@ class Catalog { /** * @param {Object} arg - Arg object. - * @param {number} arg.companyId - A `company_id` is a unique identifier for + * @param {string} arg.companyId - A `company_id` is a unique identifier for * a particular seller account. * @param {string} arg.applicationId - A `application_id` is a unique * identifier for a particular sale channel. @@ -2365,7 +2325,7 @@ class Catalog { * @param {number} [arg.pageSize] - Number of items to retrieve in each * page. Default is 10. * @param {string} [arg.q] - Search with Item Code, Name, Slug or Identifier. - * @returns {Paginator} + * @returns {Paginator} * @summary: List sales channel products * @description: Retrieve products specific to the sales channel, with filtering options available for brand, category, department, tags, item IDs, product name, and pagination support */ @@ -2413,10 +2373,9 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAppReturnConfiguration - * @summary: Get product-return configuration + * @summary: get product-return configuration * @description: Get Product Return configuration set at an sales channel level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppReturnConfiguration/). */ async getAppReturnConfiguration( @@ -2466,7 +2425,134 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.AppReturnConfigResponseSchema().validate( + } = CatalogPlatformModel.AppReturnConfigResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Catalog > getAppReturnConfiguration \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {CatalogPlatformApplicationValidator.GetAppicationProductsParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getAppicationProducts + * @summary: List sales channel products + * @description: Retrieve products associated with the sales channel. List all the products associated with a brand, collection or category in a requested sort order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppicationProducts/). + */ + async getAppicationProducts( + { + q, + f, + c, + filters, + isDependent, + sortOn, + pageId, + pageSize, + pageNo, + pageType, + itemIds, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = CatalogPlatformApplicationValidator.getAppicationProducts().validate( + { + q, + f, + c, + filters, + isDependent, + sortOn, + pageId, + pageSize, + pageNo, + pageType, + itemIds, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = CatalogPlatformApplicationValidator.getAppicationProducts().validate( + { + q, + f, + c, + filters, + isDependent, + sortOn, + pageId, + pageSize, + pageNo, + pageType, + itemIds, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Catalog > getAppicationProducts \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["q"] = q; + query_params["f"] = f; + query_params["c"] = c; + query_params["filters"] = filters; + query_params["is_dependent"] = isDependent; + query_params["sort_on"] = sortOn; + query_params["page_id"] = pageId; + query_params["page_size"] = pageSize; + query_params["page_no"] = pageNo; + query_params["page_type"] = pageType; + query_params["item_ids"] = itemIds; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/products`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = CatalogPlatformModel.ApplicationProductListingResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -2477,7 +2563,7 @@ class Catalog { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Catalog > getAppReturnConfiguration \n ${res_error}`, + message: `Response Validation Warnings for platform > Catalog > getAppicationProducts \n ${res_error}`, }); } } @@ -2485,6 +2571,78 @@ class Catalog { return response; } + /** + * @param {Object} arg - Arg object. + * @param {string} arg.companyId - A `company_id` is a unique identifier for + * a particular seller account. + * @param {string} arg.applicationId - A `application_id` is a unique + * identifier for a particular sale channel. + * @param {string} [arg.q] - The search query. This can be a partial or + * complete name of a either a product, brand or category + * @param {string} [arg.f] - The search filter parameters. All the parameter + * filtered from filter parameters will be passed in **f** parameter in + * this format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts** + * @param {string} [arg.c] - The search filter parameters for collection + * items. All the parameter filtered from filter parameters will be passed + * in **c** parameter in this format. + * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** + * @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the + * filter details. This flag is used to fetch all filters + * @param {boolean} [arg.isDependent] - This query parameter is used to get + * the dependent products in the listing. + * @param {string} [arg.sortOn] - The order to sort the list of products on. + * The supported sort parameters are popularity, price, redemption and + * discount in either ascending or descending order. See the supported + * values below. + * @param {number} [arg.pageSize] - Number of items to retrieve in each + * page. Default is 12. + * @param {number[]} [arg.itemIds] - Item Ids of product + * @returns {Paginator} + * @summary: List sales channel products + * @description: Retrieve products associated with the sales channel. List all the products associated with a brand, collection or category in a requested sort order. + */ + getAppicationProductsPaginator({ + companyId, + applicationId, + q, + f, + c, + filters, + isDependent, + sortOn, + pageSize, + itemIds, + } = {}) { + const paginator = new Paginator(); + const callback = async () => { + const pageId = paginator.nextId; + const pageNo = paginator.pageNo; + const pageType = "cursor"; + const data = await this.getAppicationProducts({ + companyId: companyId, + applicationId: applicationId, + q: q, + f: f, + c: c, + filters: filters, + isDependent: isDependent, + sortOn: sortOn, + pageId: pageId, + pageSize: pageSize, + pageNo: pageNo, + pageType: pageType, + itemIds: itemIds, + }); + paginator.setPaginator({ + hasNext: data.page.has_next ? true : false, + nextId: data.page.next_id, + }); + return data; + }; + paginator.setCallback(callback.bind(this)); + return paginator; + } + /** * @param {CatalogPlatformApplicationValidator.GetApplicationBrandListingParam} arg * - Arg object @@ -2622,8 +2780,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getApplicationBrands * @summary: List brands * @description: List all the brands. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationBrands/). @@ -2694,10 +2851,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.BrandListingResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.BrandListingResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2729,7 +2886,7 @@ class Catalog { * parameter to search brands by brand name. * @param {number[]} [arg.brandId] - Helps to sort the brands list on the * basis of uid list. - * @returns {Paginator} + * @returns {Paginator} * @summary: List brands * @description: List all the brands. */ @@ -2912,7 +3069,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getApplicationDepartmentListing @@ -2977,7 +3134,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ApplicationDepartmentListingResponseSchema().validate( + } = CatalogPlatformModel.ApplicationDepartmentListingResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -2998,7 +3155,7 @@ class Catalog { /** * @param {Object} arg - Arg object. - * @param {number} arg.companyId - A `company_id` is a unique identifier for + * @param {string} arg.companyId - A `company_id` is a unique identifier for * a particular seller account. * @param {string} arg.applicationId - A `application_id` is a unique * identifier for a particular sale channel. @@ -3006,7 +3163,7 @@ class Catalog { * page. Default is 12. * @param {string} [arg.q] - A search query string. Use this parameter to * filter results based on a keyword or specific value. - * @returns {Paginator} + * @returns {Paginator} * @summary: List sales channel departments * @description: Retrieve department listings related to the sales channel. Departments are used to categorize similar products, and you can filter the results based on department names */ @@ -3031,127 +3188,34 @@ class Catalog { paginator.setPaginator({ hasNext: data.page.has_next ? true : false, nextId: data.page.next_id, - }); - return data; - }; - paginator.setCallback(callback.bind(this)); - return paginator; - } - - /** - * @param {CatalogPlatformApplicationValidator.GetApplicationFilterKeysParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getApplicationFilterKeys - * @summary: List filter keys - * @description: Retrieve the details of all applicable product filters, such as Color, Brand, and Category, indicating the criteria keys where filters can be applied. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationFilterKeys/). - */ - async getApplicationFilterKeys( - { c, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = CatalogPlatformApplicationValidator.getApplicationFilterKeys().validate( - { - c, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = CatalogPlatformApplicationValidator.getApplicationFilterKeys().validate( - { - c, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > Catalog > getApplicationFilterKeys \n ${warrning}`, - }); - } - - const query_params = {}; - query_params["c"] = c; - - const response = await PlatformAPIClient.execute( - this.config, - "get", - `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/filter-options/keys`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = CatalogPlatformModel.GetQueryFiltersKeysResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > Catalog > getApplicationFilterKeys \n ${res_error}`, - }); - } - } - - return response; + }); + return data; + }; + paginator.setCallback(callback.bind(this)); + return paginator; } /** - * @param {CatalogPlatformApplicationValidator.GetApplicationFilterValuesParam} arg + * @param {CatalogPlatformApplicationValidator.GetApplicationFilterKeysParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getApplicationFilterValues - * @summary: List product filters - * @description: This API is designed to retrieve the filter values for all available options within the selected filter, such as "red" for color. - * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationFilterValues/). + * @returns {Promise} - + * Success response + * @name getApplicationFilterKeys + * @summary: List filter keys + * @description: Retrieve the details of all applicable product filters, such as Color, Brand, and Category, indicating the criteria keys where filters can be applied. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationFilterKeys/). */ - async getApplicationFilterValues( - { filterKey, c, collectionId, pageNo, pageSize, q, requestHeaders } = { - requestHeaders: {}, - }, + async getApplicationFilterKeys( + { c, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = CatalogPlatformApplicationValidator.getApplicationFilterValues().validate( + } = CatalogPlatformApplicationValidator.getApplicationFilterKeys().validate( { - filterKey, c, - collectionId, - pageNo, - pageSize, - q, }, { abortEarly: false, allowUnknown: true } ); @@ -3162,35 +3226,26 @@ class Catalog { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = CatalogPlatformApplicationValidator.getApplicationFilterValues().validate( + } = CatalogPlatformApplicationValidator.getApplicationFilterKeys().validate( { - filterKey, c, - collectionId, - pageNo, - pageSize, - q, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Catalog > getApplicationFilterValues \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Catalog > getApplicationFilterKeys \n ${warrning}`, }); } const query_params = {}; query_params["c"] = c; - query_params["collection_id"] = collectionId; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; - query_params["q"] = q; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/filter-options/${filterKey}/values`, + `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/filter-options/keys`, query_params, undefined, requestHeaders, @@ -3204,7 +3259,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetQueryFiltersValuesResponseSchema().validate( + } = CatalogPlatformModel.GetQueryFiltersKeysResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3215,7 +3270,7 @@ class Catalog { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Catalog > getApplicationFilterValues \n ${res_error}`, + message: `Response Validation Warnings for platform > Catalog > getApplicationFilterKeys \n ${res_error}`, }); } } @@ -3224,50 +3279,34 @@ class Catalog { } /** - * @param {CatalogPlatformApplicationValidator.GetApplicationProductsParam} arg + * @param {CatalogPlatformApplicationValidator.GetApplicationFilterValuesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getApplicationProducts - * @summary: List sales channel products - * @description: Retrieve products associated with the sales channel. List all the products associated with a brand, collection or category in a requested sort order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationProducts/). + * @returns {Promise} - + * Success response + * @name getApplicationFilterValues + * @summary: List product filters + * @description: This API is designed to retrieve the filter values for all available options within the selected filter, such as "red" for color. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getApplicationFilterValues/). */ - async getApplicationProducts( - { - q, - f, - c, - filters, - isDependent, - sortOn, - pageId, - pageSize, - pageNo, - pageType, - itemIds, - requestHeaders, - } = { requestHeaders: {} }, + async getApplicationFilterValues( + { filterKey, c, collectionId, pageNo, pageSize, q, requestHeaders } = { + requestHeaders: {}, + }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = CatalogPlatformApplicationValidator.getApplicationProducts().validate( + } = CatalogPlatformApplicationValidator.getApplicationFilterValues().validate( { - q, - f, + filterKey, c, - filters, - isDependent, - sortOn, - pageId, - pageSize, + collectionId, pageNo, - pageType, - itemIds, + pageSize, + q, }, { abortEarly: false, allowUnknown: true } ); @@ -3278,46 +3317,35 @@ class Catalog { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = CatalogPlatformApplicationValidator.getApplicationProducts().validate( + } = CatalogPlatformApplicationValidator.getApplicationFilterValues().validate( { - q, - f, + filterKey, c, - filters, - isDependent, - sortOn, - pageId, - pageSize, + collectionId, pageNo, - pageType, - itemIds, + pageSize, + q, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Catalog > getApplicationProducts \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Catalog > getApplicationFilterValues \n ${warrning}`, }); } const query_params = {}; - query_params["q"] = q; - query_params["f"] = f; query_params["c"] = c; - query_params["filters"] = filters; - query_params["is_dependent"] = isDependent; - query_params["sort_on"] = sortOn; - query_params["page_id"] = pageId; - query_params["page_size"] = pageSize; + query_params["collection_id"] = collectionId; query_params["page_no"] = pageNo; - query_params["page_type"] = pageType; - query_params["item_ids"] = itemIds; + query_params["page_size"] = pageSize; + query_params["q"] = q; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/products`, + `/service/platform/catalog/v1.0/company/${this.config.companyId}/application/${this.applicationId}/filter-options/${filterKey}/values`, query_params, undefined, requestHeaders, @@ -3331,7 +3359,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ApplicationProductListingResponseSchema().validate( + } = CatalogPlatformModel.GetQueryFiltersValuesResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3342,7 +3370,7 @@ class Catalog { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Catalog > getApplicationProducts \n ${res_error}`, + message: `Response Validation Warnings for platform > Catalog > getApplicationFilterValues \n ${res_error}`, }); } } @@ -3350,87 +3378,14 @@ class Catalog { return response; } - /** - * @param {Object} arg - Arg object. - * @param {number} arg.companyId - A `company_id` is a unique identifier for - * a particular seller account. - * @param {string} arg.applicationId - A `application_id` is a unique - * identifier for a particular sale channel. - * @param {string} [arg.q] - The search query. This can be a partial or - * complete name of a either a product, brand or category - * @param {string} [arg.f] - The search filter parameters. All the parameter - * filtered from filter parameters will be passed in **f** parameter in - * this format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts** - * @param {string} [arg.c] - The search filter parameters for collection - * items. All the parameter filtered from filter parameters will be passed - * in **c** parameter in this format. - * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** - * @param {boolean} [arg.filters] - Pass `filters` parameter to fetch the - * filter details. This flag is used to fetch all filters - * @param {boolean} [arg.isDependent] - This query parameter is used to get - * the dependent products in the listing. - * @param {string} [arg.sortOn] - The order to sort the list of products on. - * The supported sort parameters are popularity, price, redemption and - * discount in either ascending or descending order. See the supported - * values below. - * @param {number} [arg.pageSize] - Number of items to retrieve in each - * page. Default is 12. - * @param {string[]} [arg.itemIds] - Item Ids of product - * @returns {Paginator} - * @summary: List sales channel products - * @description: Retrieve products associated with the sales channel. List all the products associated with a brand, collection or category in a requested sort order. - */ - getApplicationProductsPaginator({ - companyId, - applicationId, - q, - f, - c, - filters, - isDependent, - sortOn, - pageSize, - itemIds, - } = {}) { - const paginator = new Paginator(); - const callback = async () => { - const pageId = paginator.nextId; - const pageNo = paginator.pageNo; - const pageType = "cursor"; - const data = await this.getApplicationProducts({ - companyId: companyId, - applicationId: applicationId, - q: q, - f: f, - c: c, - filters: filters, - isDependent: isDependent, - sortOn: sortOn, - pageId: pageId, - pageSize: pageSize, - pageNo: pageNo, - pageType: pageType, - itemIds: itemIds, - }); - paginator.setPaginator({ - hasNext: data.page.has_next ? true : false, - nextId: data.page.next_id, - }); - return data; - }; - paginator.setCallback(callback.bind(this)); - return paginator; - } - /** * @param {CatalogPlatformApplicationValidator.GetAutocompleteConfigParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getAutocompleteConfig * @summary: Get autocomplete configuration * @description: Get custom autocomplete keyword configuration for a specific sales channel which allows you to map any endpoint with these keywords to give you the ultimate suggestion results. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAutocompleteConfig/). @@ -3482,7 +3437,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetAutocompleteWordsResponseSchema().validate( + } = CatalogPlatformModel.GetAutocompleteWordsResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3507,9 +3462,8 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getAutocompleteKeywordDetail * @summary: Get autocomplete keyword * @description: Retrieve detailed information about a specific autocomplete keyword for a specific sales channel by its id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAutocompleteKeywordDetail/). @@ -3565,7 +3519,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetAutocompleteWordsResponseSchema().validate( + } = CatalogPlatformModel.GetAutocompleteWordsResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3669,8 +3623,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getCatalogInsights * @summary: Get catalog counts * @description: Retrieve the count of catalog related data like products, brands, departments and categories that have been made live as per configuration of the sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCatalogInsights/). @@ -3727,10 +3680,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.CatalogInsightResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.CatalogInsightResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -3750,8 +3703,7 @@ class Catalog { * @param {CatalogPlatformApplicationValidator.GetCategoriesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getCategories * @summary: List categories * @description: Retrieve a list of categories associated to company and sales channel. user can filter on departments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCategories/). @@ -3808,10 +3760,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.CategoryListingResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.CategoryListingResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -3833,9 +3785,8 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getCollectionDetail * @summary: Get a collection * @description: Get the details of a collection by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCollectionDetail/). @@ -3891,7 +3842,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetCollectionDetailResponseSchema().validate( + } = CatalogPlatformModel.GetCollectionDetailResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3916,17 +3867,14 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getCollectionItems * @summary: List items of collection * @description: Get items from a collection specified by its id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCollectionItems/). */ async getCollectionItems( - { id, sortOn, pageId, pageSize, pageNo, requestHeaders } = { - requestHeaders: {}, - }, + { id, sortOn, pageId, pageSize, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -3937,7 +3885,6 @@ class Catalog { sortOn, pageId, pageSize, - pageNo, }, { abortEarly: false, allowUnknown: true } ); @@ -3954,7 +3901,6 @@ class Catalog { sortOn, pageId, pageSize, - pageNo, }, { abortEarly: false, allowUnknown: false } ); @@ -3969,7 +3915,6 @@ class Catalog { query_params["sort_on"] = sortOn; query_params["page_id"] = pageId; query_params["page_size"] = pageSize; - query_params["page_no"] = pageNo; const response = await PlatformAPIClient.execute( this.config, @@ -3988,7 +3933,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetCollectionItemsResponseSchema().validate( + } = CatalogPlatformModel.GetCollectionItemsResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -4096,9 +4041,8 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getConfigurationMetadata * @summary: Get configuration metadata * @description: Retrieve the configuraion metadata details for specific config_type for a company and an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getConfigurationMetadata/). @@ -4168,7 +4112,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetConfigMetadataResponseSchema().validate( + } = CatalogPlatformModel.GetConfigMetadataResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -4269,8 +4213,7 @@ class Catalog { * @param {CatalogPlatformApplicationValidator.GetDepartmentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getDepartments * @summary: List departments * @description: Retrieve a list of departments associated with a comapny and sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getDepartments/). @@ -4322,7 +4265,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.DepartmentResponseSchema().validate(responseData, { + } = CatalogPlatformModel.DepartmentResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4347,7 +4290,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getDiscountedInventoryBySizeIdentifier @@ -4360,6 +4303,7 @@ class Catalog { sizeIdentifier, pageNo, pageSize, + q, locationIds, requestHeaders, } = { requestHeaders: {} }, @@ -4373,6 +4317,7 @@ class Catalog { sizeIdentifier, pageNo, pageSize, + q, locationIds, }, { abortEarly: false, allowUnknown: true } @@ -4390,6 +4335,7 @@ class Catalog { sizeIdentifier, pageNo, pageSize, + q, locationIds, }, { abortEarly: false, allowUnknown: false } @@ -4404,6 +4350,7 @@ class Catalog { const query_params = {}; query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; + query_params["q"] = q; query_params["location_ids"] = locationIds; const response = await PlatformAPIClient.execute( @@ -4423,7 +4370,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ApplicationInventorySellerIdentifierResponsePaginated().validate( + } = CatalogPlatformModel.InventorySellerIdentifierResponsePaginated().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -4444,18 +4391,17 @@ class Catalog { /** * @param {Object} arg - Arg object. - * @param {number} arg.companyId - A `company_id` is a unique identifier for - * a particular seller account. - * @param {string} arg.applicationId - A `application_id` is a unique - * identifier for a particular sale channel. - * @param {number} arg.itemId - A `item_id` is a unique identifier for a - * specific product. - * @param {number} arg.sizeIdentifier - Size Identifier (Seller Identifier - * or Primary Identifier). + * @param {number} arg.companyId - Id of the company associated to product + * that is to be viewed. + * @param {string} arg.applicationId - Uniquer Application ID. + * @param {number} arg.itemId - Item code of the product of which size is to be get. + * @param {string} arg.sizeIdentifier - Size Identifier (Seller Identifier + * or Primary Identifier) of which inventory is to get. * @param {number} [arg.pageSize] - Number of items to retrieve in each * page. Default is 12. + * @param {string} [arg.q] - Search with help of store code. * @param {number[]} [arg.locationIds] - Search by store ids. - * @returns {Paginator} + * @returns {Paginator} * @summary: Get discounted inventory * @description: Allows to retrieve Inventory data for particular company grouped by size and store. */ @@ -4465,6 +4411,7 @@ class Catalog { itemId, sizeIdentifier, pageSize, + q, locationIds, } = {}) { const paginator = new Paginator(); @@ -4479,6 +4426,7 @@ class Catalog { sizeIdentifier: sizeIdentifier, pageNo: pageNo, pageSize: pageSize, + q: q, locationIds: locationIds, }); paginator.setPaginator({ @@ -4497,7 +4445,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getGroupConfigurations * @summary: Get group configurations * @description: Retrieve the details of product group configurations based on config types for a company and an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getGroupConfigurations/). @@ -4567,7 +4515,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetConfigResponseSchema().validate(responseData, { + } = CatalogPlatformModel.GetConfigResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4592,7 +4540,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getListingConfigurations * @summary: Get listing configurations * @description: Retrieve product listing configurations based on specific config_type for a company and an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getListingConfigurations/). @@ -4659,7 +4607,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetConfigResponseSchema().validate(responseData, { + } = CatalogPlatformModel.GetConfigResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4763,8 +4711,7 @@ class Catalog { * @param {CatalogPlatformApplicationValidator.GetQueryFiltersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getQueryFilters * @summary: Get collection query filters * @description: Retrieve query filters to configure a collection for a company and a sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getQueryFilters/). @@ -4816,10 +4763,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetQueryFiltersResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.GetQueryFiltersResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4841,7 +4788,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getSearchConfiguration @@ -4895,7 +4842,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetSearchConfigurationResponseSchema().validate( + } = CatalogPlatformModel.GetSearchConfigurationResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -4920,9 +4867,8 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getSearchKeywords * @summary: Get search keywords * @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://partners.fynd.com/help/docs/sdk/platform/catalog/getSearchKeywords/). @@ -4978,7 +4924,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetSearchWordsDetailResponseSchema().validate( + } = CatalogPlatformModel.GetSearchWordsDetailResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -5003,8 +4949,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name updateAllowSingle * @summary: Update 'Allow Single' setting * @description: Modify allow single flag for filters of the sales channel for a company and an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAllowSingle/). @@ -5060,10 +5005,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ConfigSuccessResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.ConfigSuccessResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -5249,7 +5194,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateAppCategoryReturnConfiguration * @summary: Update return Configuration * @description: Update Category level sales channel Return Configuration setttings - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAppCategoryReturnConfiguration/). @@ -5305,7 +5250,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, { + } = CatalogPlatformModel.SuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -5497,7 +5442,7 @@ class Catalog { * @returns {Promise} - Success response * @name updateAppProduct * @summary: Update sales channel product - * @description: Allows to update data associated to a item by its item_id for a sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAppProduct/). + * @description: Allows to update data associated to a item by its item_id for an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAppProduct/). */ async updateAppProduct( { itemId, body, requestHeaders } = { requestHeaders: {} }, @@ -5658,9 +5603,8 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name updateAutocompleteKeyword * @summary: Update autocomplete keyword * @description: Update a specific autocomplete keyword configuration by its id for a specific sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateAutocompleteKeyword/). @@ -5718,7 +5662,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetAutocompleteWordsResponseSchema().validate( + } = CatalogPlatformModel.GetAutocompleteWordsResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -5824,8 +5768,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name updateDefaultSort * @summary: Update default sorting * @description: Modify the default sort key configuration for a company and an sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateDefaultSort/). @@ -5881,10 +5824,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ConfigSuccessResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.ConfigSuccessResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -6076,7 +6019,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updateSearchConfiguration @@ -6134,7 +6077,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.UpdateSearchConfigurationResponseSchema().validate( + } = CatalogPlatformModel.UpdateSearchConfigurationResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); diff --git a/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts b/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts index c76e4ae58..6734d84fe 100644 --- a/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +++ b/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts @@ -14,16 +14,6 @@ export = CatalogPlatformApplicationValidator; */ /** * @typedef CreateCollectionParam - * @property {string} [q] - Get collection list filtered by q string, - * @property {string} [scheduleStatus] - Get collection list filtered by scheduled status, - * @property {string} [type] - Type of the collections - * @property {string[]} [tags] - Each response will contain next_id param, which - * should be sent back to make pagination work. - * @property {boolean} [isActive] - Get collections filtered by active status. - * @property {number} [pageNo] - The page number to navigate through the given - * set of results. - * @property {number} [pageSize] - Number of items to retrieve in each page. - * Default is 12. * @property {CatalogPlatformModel.CreateCollection} body */ /** @@ -57,7 +47,7 @@ export = CatalogPlatformApplicationValidator; */ /** * @typedef CreateSearchConfigurationParam - * @property {CatalogPlatformModel.CreateSearchConfigurationRequestSchema} body + * @property {CatalogPlatformModel.CreateSearchConfigurationRequest} body */ /** * @typedef DeleteAppCategoryReturnConfigurationParam @@ -169,6 +159,34 @@ export = CatalogPlatformApplicationValidator; * @property {string} [q] - Search with Item Code, Name, Slug or Identifier. */ /** @typedef GetAppReturnConfigurationParam */ +/** + * @typedef GetAppicationProductsParam + * @property {string} [q] - The search query. This can be a partial or complete + * name of a either a product, brand or category + * @property {string} [f] - The search filter parameters. All the parameter + * filtered from filter parameters will be passed in **f** parameter in this + * format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts** + * @property {string} [c] - The search filter parameters for collection items. + * All the parameter filtered from filter parameters will be passed in **c** + * parameter in this format. + * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** + * @property {boolean} [filters] - Pass `filters` parameter to fetch the filter + * details. This flag is used to fetch all filters + * @property {boolean} [isDependent] - This query parameter is used to get the + * dependent products in the listing. + * @property {string} [sortOn] - The order to sort the list of products on. The + * supported sort parameters are popularity, price, redemption and discount in + * either ascending or descending order. See the supported values below. + * @property {string} [pageId] - Each response will contain **page_id** param, + * which should be sent back to make pagination work. + * @property {number} [pageSize] - Number of items to retrieve in each page. + * Default is 12. + * @property {number} [pageNo] - If page_type is number then pass it to fetch + * page items. Default is 1. + * @property {string} [pageType] - For pagination type should be cursor or + * number. Default is cursor. + * @property {number[]} [itemIds] - Item Ids of product + */ /** * @typedef GetApplicationBrandListingParam * @property {number} [pageNo] - The page number to navigate through the given @@ -216,54 +234,25 @@ export = CatalogPlatformApplicationValidator; /** * @typedef GetApplicationFilterKeysParam * @property {string} [c] - The search filter parameters for collection items. - * All the parameter filtered from filter parameters will be passed in "c" - * parameter in this format. "?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts" + * All the parameter filtered from filter parameters will be passed in **c** + * parameter in this format. + * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** */ /** * @typedef GetApplicationFilterValuesParam - * @property {string} filterKey - A `filter_key` is a filter key which returns - * all the available filter values. + * @property {string} filterKey - A `filter_key` is a filter key for a for which + * all the available filter values will returned. channel. * @property {string} [c] - The search filter parameters for collection items. - * All the parameter filtered from filter parameters will be passed in "c" - * parameter in this format. "?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts" + * All the parameter filtered from filter parameters will be passed in **c** + * parameter in this format. + * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** * @property {string} [collectionId] - A `collection_id` is a unique identifier - * for a particular collection. + * for a particular collection. channel. * @property {number} [pageNo] - The page number to navigate through the given * set of results * @property {number} [pageSize] - Number of items to retrieve in each page. * Default is 10. - * @property {string} [q] - The `q` parameter allows you to search and filter - * specific data within the filter options. It acts as a query keyword that - * can refine the results by matching relevant filter values, such as a - * category name or any other applicable filter criteria. - */ -/** - * @typedef GetApplicationProductsParam - * @property {string} [q] - The search query. This can be a partial or complete - * name of a either a product, brand or category - * @property {string} [f] - The search filter parameters. All the parameter - * filtered from filter parameters will be passed in **f** parameter in this - * format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts** - * @property {string} [c] - The search filter parameters for collection items. - * All the parameter filtered from filter parameters will be passed in **c** - * parameter in this format. - * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** - * @property {boolean} [filters] - Pass `filters` parameter to fetch the filter - * details. This flag is used to fetch all filters - * @property {boolean} [isDependent] - This query parameter is used to get the - * dependent products in the listing. - * @property {string} [sortOn] - The order to sort the list of products on. The - * supported sort parameters are popularity, price, redemption and discount in - * either ascending or descending order. See the supported values below. - * @property {string} [pageId] - Each response will contain **page_id** param, - * which should be sent back to make pagination work. - * @property {number} [pageSize] - Number of items to retrieve in each page. - * Default is 12. - * @property {number} [pageNo] - If page_type is number then pass it to fetch - * page items. Default is 1. - * @property {string} [pageType] - For pagination type should be cursor or - * number. Default is cursor. - * @property {string[]} [itemIds] - Item Ids of product + * @property {string} [q] - Get Values filtered by q string */ /** @typedef GetAutocompleteConfigParam */ /** @@ -298,7 +287,6 @@ export = CatalogPlatformApplicationValidator; * should be sent back to make pagination work. * @property {number} [pageSize] - Number of items to retrieve in each page. * Default is 12. - * @property {number} [pageNo] - Identifies the specific page of results being requested. */ /** * @typedef GetConfigurationByTypeParam @@ -319,13 +307,14 @@ export = CatalogPlatformApplicationValidator; /** @typedef GetDepartmentsParam */ /** * @typedef GetDiscountedInventoryBySizeIdentifierParam - * @property {number} itemId - A `item_id` is a unique identifier for a specific product. - * @property {number} sizeIdentifier - Size Identifier (Seller Identifier or - * Primary Identifier). + * @property {number} itemId - Item code of the product of which size is to be get. + * @property {string} sizeIdentifier - Size Identifier (Seller Identifier or + * Primary Identifier) of which inventory is to get. * @property {number} [pageNo] - The page number to navigate through the given * set of results * @property {number} [pageSize] - Number of items to retrieve in each page. * Default is 12. + * @property {string} [q] - Search with help of store code. * @property {number[]} [locationIds] - Search by store ids. */ /** @@ -354,7 +343,7 @@ export = CatalogPlatformApplicationValidator; * @typedef GetProductDetailBySlugParam * @property {string} slug - The unique identifier of a product. i.e; `slug` of * a product. You can retrieve these from the APIs that list products like - * "v1.0/products/" + * **v1.0/products/** */ /** @typedef GetQueryFiltersParam */ /** @typedef GetSearchConfigurationParam */ @@ -365,7 +354,7 @@ export = CatalogPlatformApplicationValidator; */ /** * @typedef UpdateAllowSingleParam - * @property {CatalogPlatformModel.AllowSingleRequestSchema} body + * @property {CatalogPlatformModel.AllowSingleRequest} body */ /** * @typedef UpdateAppBrandParam @@ -385,18 +374,18 @@ export = CatalogPlatformApplicationValidator; */ /** * @typedef UpdateAppDepartmentParam - * @property {number} departmentUid - A `department id` is a unique identifier - * for a particular department. + * @property {string} departmentUid - Department id for which the custom_json is + * associated. * @property {CatalogPlatformModel.ApplicationDepartmentJson} body */ /** * @typedef UpdateAppLocationParam - * @property {number} storeUid - Store id for which the custom_json is associated. + * @property {string} storeUid - Store id for which the custom_json is associated. * @property {CatalogPlatformModel.ApplicationStoreJson} body */ /** * @typedef UpdateAppProductParam - * @property {number} itemId - A `item_id` is a unique identifier for a particular item. + * @property {string} itemId - Product id for which the custom_meta is associated. * @property {CatalogPlatformModel.ApplicationItemMeta} body */ /** @@ -416,7 +405,7 @@ export = CatalogPlatformApplicationValidator; */ /** * @typedef UpdateDefaultSortParam - * @property {CatalogPlatformModel.DefaultKeyRequestSchema} body + * @property {CatalogPlatformModel.DefaultKeyRequest} body */ /** * @typedef UpdateGroupConfigurationParam @@ -436,7 +425,7 @@ export = CatalogPlatformApplicationValidator; */ /** * @typedef UpdateSearchConfigurationParam - * @property {CatalogPlatformModel.UpdateSearchConfigurationRequestSchema} body + * @property {CatalogPlatformModel.UpdateSearchConfigurationRequest} body */ /** * @typedef UpdateSearchKeywordsParam @@ -497,6 +486,8 @@ declare class CatalogPlatformApplicationValidator { static getAppProducts(): GetAppProductsParam; /** @returns {GetAppReturnConfigurationParam} */ static getAppReturnConfiguration(): any; + /** @returns {GetAppicationProductsParam} */ + static getAppicationProducts(): GetAppicationProductsParam; /** @returns {GetApplicationBrandListingParam} */ static getApplicationBrandListing(): GetApplicationBrandListingParam; /** @returns {GetApplicationBrandsParam} */ @@ -509,8 +500,6 @@ declare class CatalogPlatformApplicationValidator { static getApplicationFilterKeys(): GetApplicationFilterKeysParam; /** @returns {GetApplicationFilterValuesParam} */ static getApplicationFilterValues(): GetApplicationFilterValuesParam; - /** @returns {GetApplicationProductsParam} */ - static getApplicationProducts(): GetApplicationProductsParam; /** @returns {GetAutocompleteConfigParam} */ static getAutocompleteConfig(): any; /** @returns {GetAutocompleteKeywordDetailParam} */ @@ -579,7 +568,7 @@ declare class CatalogPlatformApplicationValidator { static updateSearchKeywords(): UpdateSearchKeywordsParam; } declare namespace CatalogPlatformApplicationValidator { - export { AddCollectionItemsParam, CreateAppCategoryReturnConfigurationParam, CreateAppReturnConfigurationParam, CreateCollectionParam, CreateConfigurationByTypeParam, CreateConfigurationProductListingParam, CreateCustomAutocompleteRuleParam, CreateCustomKeywordParam, CreateGroupConfigurationParam, CreateListingConfigurationParam, CreateSearchConfigurationParam, DeleteAppCategoryReturnConfigurationParam, DeleteAutocompleteKeywordParam, DeleteCollectionParam, DeleteGroupConfigurationParam, DeleteListingConfigurationParam, DeleteSearchConfigurationParam, DeleteSearchKeywordsParam, GetAllCollectionsParam, GetAllSearchKeywordParam, GetAppCategoryReturnConfigParam, GetAppInventoryParam, GetAppLocationsParam, GetAppProductParam, GetAppProductsParam, GetAppReturnConfigurationParam, GetApplicationBrandListingParam, GetApplicationBrandsParam, GetApplicationCategoryListingParam, GetApplicationDepartmentListingParam, GetApplicationFilterKeysParam, GetApplicationFilterValuesParam, GetApplicationProductsParam, GetAutocompleteConfigParam, GetAutocompleteKeywordDetailParam, GetCatalogConfigurationParam, GetCatalogInsightsParam, GetCategoriesParam, GetCollectionDetailParam, GetCollectionItemsParam, GetConfigurationByTypeParam, GetConfigurationMetadataParam, GetConfigurationsParam, GetDepartmentsParam, GetDiscountedInventoryBySizeIdentifierParam, GetGroupConfigurationsParam, GetListingConfigurationsParam, GetProductDetailBySlugParam, GetQueryFiltersParam, GetSearchConfigurationParam, GetSearchKeywordsParam, UpdateAllowSingleParam, UpdateAppBrandParam, UpdateAppCategoryParam, UpdateAppCategoryReturnConfigurationParam, UpdateAppDepartmentParam, UpdateAppLocationParam, UpdateAppProductParam, UpdateAppReturnConfigurationParam, UpdateAutocompleteKeywordParam, UpdateCollectionParam, UpdateDefaultSortParam, UpdateGroupConfigurationParam, UpdateListingConfigurationParam, UpdateSearchConfigurationParam, UpdateSearchKeywordsParam }; + export { AddCollectionItemsParam, CreateAppCategoryReturnConfigurationParam, CreateAppReturnConfigurationParam, CreateCollectionParam, CreateConfigurationByTypeParam, CreateConfigurationProductListingParam, CreateCustomAutocompleteRuleParam, CreateCustomKeywordParam, CreateGroupConfigurationParam, CreateListingConfigurationParam, CreateSearchConfigurationParam, DeleteAppCategoryReturnConfigurationParam, DeleteAutocompleteKeywordParam, DeleteCollectionParam, DeleteGroupConfigurationParam, DeleteListingConfigurationParam, DeleteSearchConfigurationParam, DeleteSearchKeywordsParam, GetAllCollectionsParam, GetAllSearchKeywordParam, GetAppCategoryReturnConfigParam, GetAppInventoryParam, GetAppLocationsParam, GetAppProductParam, GetAppProductsParam, GetAppReturnConfigurationParam, GetAppicationProductsParam, GetApplicationBrandListingParam, GetApplicationBrandsParam, GetApplicationCategoryListingParam, GetApplicationDepartmentListingParam, GetApplicationFilterKeysParam, GetApplicationFilterValuesParam, GetAutocompleteConfigParam, GetAutocompleteKeywordDetailParam, GetCatalogConfigurationParam, GetCatalogInsightsParam, GetCategoriesParam, GetCollectionDetailParam, GetCollectionItemsParam, GetConfigurationByTypeParam, GetConfigurationMetadataParam, GetConfigurationsParam, GetDepartmentsParam, GetDiscountedInventoryBySizeIdentifierParam, GetGroupConfigurationsParam, GetListingConfigurationsParam, GetProductDetailBySlugParam, GetQueryFiltersParam, GetSearchConfigurationParam, GetSearchKeywordsParam, UpdateAllowSingleParam, UpdateAppBrandParam, UpdateAppCategoryParam, UpdateAppCategoryReturnConfigurationParam, UpdateAppDepartmentParam, UpdateAppLocationParam, UpdateAppProductParam, UpdateAppReturnConfigurationParam, UpdateAutocompleteKeywordParam, UpdateCollectionParam, UpdateDefaultSortParam, UpdateGroupConfigurationParam, UpdateListingConfigurationParam, UpdateSearchConfigurationParam, UpdateSearchKeywordsParam }; } type AddCollectionItemsParam = { /** @@ -595,37 +584,6 @@ type CreateAppReturnConfigurationParam = { body: CatalogPlatformModel.CreateUpdateAppReturnConfig; }; type CreateCollectionParam = { - /** - * - Get collection list filtered by q string, - */ - q?: string; - /** - * - Get collection list filtered by scheduled status, - */ - scheduleStatus?: string; - /** - * - Type of the collections - */ - type?: string; - /** - * - Each response will contain next_id param, which - * should be sent back to make pagination work. - */ - tags?: string[]; - /** - * - Get collections filtered by active status. - */ - isActive?: boolean; - /** - * - The page number to navigate through the given - * set of results. - */ - pageNo?: number; - /** - * - Number of items to retrieve in each page. - * Default is 12. - */ - pageSize?: number; body: CatalogPlatformModel.CreateCollection; }; type CreateConfigurationByTypeParam = { @@ -661,7 +619,7 @@ type CreateListingConfigurationParam = { body: CatalogPlatformModel.AppConfigurationsSort; }; type CreateSearchConfigurationParam = { - body: CatalogPlatformModel.CreateSearchConfigurationRequestSchema; + body: CatalogPlatformModel.CreateSearchConfigurationRequest; }; type DeleteAppCategoryReturnConfigurationParam = { body: CatalogPlatformModel.DeleteAppCategoryReturnConfig; @@ -896,6 +854,66 @@ type GetAppProductsParam = { */ q?: string; }; +type GetAppicationProductsParam = { + /** + * - The search query. This can be a partial or complete + * name of a either a product, brand or category + */ + q?: string; + /** + * - The search filter parameters. All the parameter + * filtered from filter parameters will be passed in **f** parameter in this + * format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts** + */ + f?: string; + /** + * - The search filter parameters for collection items. + * All the parameter filtered from filter parameters will be passed in **c** + * parameter in this format. + * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** + */ + c?: string; + /** + * - Pass `filters` parameter to fetch the filter + * details. This flag is used to fetch all filters + */ + filters?: boolean; + /** + * - This query parameter is used to get the + * dependent products in the listing. + */ + isDependent?: boolean; + /** + * - The order to sort the list of products on. The + * supported sort parameters are popularity, price, redemption and discount in + * either ascending or descending order. See the supported values below. + */ + sortOn?: string; + /** + * - Each response will contain **page_id** param, + * which should be sent back to make pagination work. + */ + pageId?: string; + /** + * - Number of items to retrieve in each page. + * Default is 12. + */ + pageSize?: number; + /** + * - If page_type is number then pass it to fetch + * page items. Default is 1. + */ + pageNo?: number; + /** + * - For pagination type should be cursor or + * number. Default is cursor. + */ + pageType?: string; + /** + * - Item Ids of product + */ + itemIds?: number[]; +}; type GetApplicationBrandListingParam = { /** * - The page number to navigate through the given @@ -984,26 +1002,28 @@ type GetApplicationDepartmentListingParam = { type GetApplicationFilterKeysParam = { /** * - The search filter parameters for collection items. - * All the parameter filtered from filter parameters will be passed in "c" - * parameter in this format. "?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts" + * All the parameter filtered from filter parameters will be passed in **c** + * parameter in this format. + * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** */ c?: string; }; type GetApplicationFilterValuesParam = { /** - * - A `filter_key` is a filter key which returns - * all the available filter values. + * - A `filter_key` is a filter key for a for which + * all the available filter values will returned. channel. */ filterKey: string; /** * - The search filter parameters for collection items. - * All the parameter filtered from filter parameters will be passed in "c" - * parameter in this format. "?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts" + * All the parameter filtered from filter parameters will be passed in **c** + * parameter in this format. + * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** */ c?: string; /** * - A `collection_id` is a unique identifier - * for a particular collection. + * for a particular collection. channel. */ collectionId?: string; /** @@ -1017,72 +1037,9 @@ type GetApplicationFilterValuesParam = { */ pageSize?: number; /** - * - The `q` parameter allows you to search and filter - * specific data within the filter options. It acts as a query keyword that - * can refine the results by matching relevant filter values, such as a - * category name or any other applicable filter criteria. - */ - q?: string; -}; -type GetApplicationProductsParam = { - /** - * - The search query. This can be a partial or complete - * name of a either a product, brand or category + * - Get Values filtered by q string */ q?: string; - /** - * - The search filter parameters. All the parameter - * filtered from filter parameters will be passed in **f** parameter in this - * format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts** - */ - f?: string; - /** - * - The search filter parameters for collection items. - * All the parameter filtered from filter parameters will be passed in **c** - * parameter in this format. - * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** - */ - c?: string; - /** - * - Pass `filters` parameter to fetch the filter - * details. This flag is used to fetch all filters - */ - filters?: boolean; - /** - * - This query parameter is used to get the - * dependent products in the listing. - */ - isDependent?: boolean; - /** - * - The order to sort the list of products on. The - * supported sort parameters are popularity, price, redemption and discount in - * either ascending or descending order. See the supported values below. - */ - sortOn?: string; - /** - * - Each response will contain **page_id** param, - * which should be sent back to make pagination work. - */ - pageId?: string; - /** - * - Number of items to retrieve in each page. - * Default is 12. - */ - pageSize?: number; - /** - * - If page_type is number then pass it to fetch - * page items. Default is 1. - */ - pageNo?: number; - /** - * - For pagination type should be cursor or - * number. Default is cursor. - */ - pageType?: string; - /** - * - Item Ids of product - */ - itemIds?: string[]; }; type GetAutocompleteKeywordDetailParam = { /** @@ -1134,10 +1091,6 @@ type GetCollectionItemsParam = { * Default is 12. */ pageSize?: number; - /** - * - Identifies the specific page of results being requested. - */ - pageNo?: number; }; type GetConfigurationByTypeParam = { /** @@ -1172,14 +1125,14 @@ type GetConfigurationMetadataParam = { }; type GetDiscountedInventoryBySizeIdentifierParam = { /** - * - A `item_id` is a unique identifier for a specific product. + * - Item code of the product of which size is to be get. */ itemId: number; /** * - Size Identifier (Seller Identifier or - * Primary Identifier). + * Primary Identifier) of which inventory is to get. */ - sizeIdentifier: number; + sizeIdentifier: string; /** * - The page number to navigate through the given * set of results @@ -1190,6 +1143,10 @@ type GetDiscountedInventoryBySizeIdentifierParam = { * Default is 12. */ pageSize?: number; + /** + * - Search with help of store code. + */ + q?: string; /** * - Search by store ids. */ @@ -1246,7 +1203,7 @@ type GetProductDetailBySlugParam = { /** * - The unique identifier of a product. i.e; `slug` of * a product. You can retrieve these from the APIs that list products like - * "v1.0/products/" + * **v1.0/products/** */ slug: string; }; @@ -1258,7 +1215,7 @@ type GetSearchKeywordsParam = { id: string; }; type UpdateAllowSingleParam = { - body: CatalogPlatformModel.AllowSingleRequestSchema; + body: CatalogPlatformModel.AllowSingleRequest; }; type UpdateAppBrandParam = { /** @@ -1281,24 +1238,24 @@ type UpdateAppCategoryReturnConfigurationParam = { }; type UpdateAppDepartmentParam = { /** - * - A `department id` is a unique identifier - * for a particular department. + * - Department id for which the custom_json is + * associated. */ - departmentUid: number; + departmentUid: string; body: CatalogPlatformModel.ApplicationDepartmentJson; }; type UpdateAppLocationParam = { /** * - Store id for which the custom_json is associated. */ - storeUid: number; + storeUid: string; body: CatalogPlatformModel.ApplicationStoreJson; }; type UpdateAppProductParam = { /** - * - A `item_id` is a unique identifier for a particular item. + * - Product id for which the custom_meta is associated. */ - itemId: number; + itemId: string; body: CatalogPlatformModel.ApplicationItemMeta; }; type UpdateAppReturnConfigurationParam = { @@ -1320,7 +1277,7 @@ type UpdateCollectionParam = { body: CatalogPlatformModel.UpdateCollection; }; type UpdateDefaultSortParam = { - body: CatalogPlatformModel.DefaultKeyRequestSchema; + body: CatalogPlatformModel.DefaultKeyRequest; }; type UpdateGroupConfigurationParam = { /** @@ -1349,7 +1306,7 @@ type UpdateListingConfigurationParam = { body: CatalogPlatformModel.AppConfigurationsSort; }; type UpdateSearchConfigurationParam = { - body: CatalogPlatformModel.UpdateSearchConfigurationRequestSchema; + body: CatalogPlatformModel.UpdateSearchConfigurationRequest; }; type UpdateSearchKeywordsParam = { /** diff --git a/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js b/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js index e1fe2d5e5..a70b49526 100644 --- a/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +++ b/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js @@ -20,16 +20,6 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef CreateCollectionParam - * @property {string} [q] - Get collection list filtered by q string, - * @property {string} [scheduleStatus] - Get collection list filtered by scheduled status, - * @property {string} [type] - Type of the collections - * @property {string[]} [tags] - Each response will contain next_id param, which - * should be sent back to make pagination work. - * @property {boolean} [isActive] - Get collections filtered by active status. - * @property {number} [pageNo] - The page number to navigate through the given - * set of results. - * @property {number} [pageSize] - Number of items to retrieve in each page. - * Default is 12. * @property {CatalogPlatformModel.CreateCollection} body */ @@ -70,7 +60,7 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef CreateSearchConfigurationParam - * @property {CatalogPlatformModel.CreateSearchConfigurationRequestSchema} body + * @property {CatalogPlatformModel.CreateSearchConfigurationRequest} body */ /** @@ -198,6 +188,35 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** @typedef GetAppReturnConfigurationParam */ +/** + * @typedef GetAppicationProductsParam + * @property {string} [q] - The search query. This can be a partial or complete + * name of a either a product, brand or category + * @property {string} [f] - The search filter parameters. All the parameter + * filtered from filter parameters will be passed in **f** parameter in this + * format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts** + * @property {string} [c] - The search filter parameters for collection items. + * All the parameter filtered from filter parameters will be passed in **c** + * parameter in this format. + * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** + * @property {boolean} [filters] - Pass `filters` parameter to fetch the filter + * details. This flag is used to fetch all filters + * @property {boolean} [isDependent] - This query parameter is used to get the + * dependent products in the listing. + * @property {string} [sortOn] - The order to sort the list of products on. The + * supported sort parameters are popularity, price, redemption and discount in + * either ascending or descending order. See the supported values below. + * @property {string} [pageId] - Each response will contain **page_id** param, + * which should be sent back to make pagination work. + * @property {number} [pageSize] - Number of items to retrieve in each page. + * Default is 12. + * @property {number} [pageNo] - If page_type is number then pass it to fetch + * page items. Default is 1. + * @property {string} [pageType] - For pagination type should be cursor or + * number. Default is cursor. + * @property {number[]} [itemIds] - Item Ids of product + */ + /** * @typedef GetApplicationBrandListingParam * @property {number} [pageNo] - The page number to navigate through the given @@ -249,56 +268,26 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef GetApplicationFilterKeysParam * @property {string} [c] - The search filter parameters for collection items. - * All the parameter filtered from filter parameters will be passed in "c" - * parameter in this format. "?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts" + * All the parameter filtered from filter parameters will be passed in **c** + * parameter in this format. + * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** */ /** * @typedef GetApplicationFilterValuesParam - * @property {string} filterKey - A `filter_key` is a filter key which returns - * all the available filter values. + * @property {string} filterKey - A `filter_key` is a filter key for a for which + * all the available filter values will returned. channel. * @property {string} [c] - The search filter parameters for collection items. - * All the parameter filtered from filter parameters will be passed in "c" - * parameter in this format. "?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts" + * All the parameter filtered from filter parameters will be passed in **c** + * parameter in this format. + * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** * @property {string} [collectionId] - A `collection_id` is a unique identifier - * for a particular collection. + * for a particular collection. channel. * @property {number} [pageNo] - The page number to navigate through the given * set of results * @property {number} [pageSize] - Number of items to retrieve in each page. * Default is 10. - * @property {string} [q] - The `q` parameter allows you to search and filter - * specific data within the filter options. It acts as a query keyword that - * can refine the results by matching relevant filter values, such as a - * category name or any other applicable filter criteria. - */ - -/** - * @typedef GetApplicationProductsParam - * @property {string} [q] - The search query. This can be a partial or complete - * name of a either a product, brand or category - * @property {string} [f] - The search filter parameters. All the parameter - * filtered from filter parameters will be passed in **f** parameter in this - * format. **?f=brand:voi-jeans||and:::category:t-shirts||shirts** - * @property {string} [c] - The search filter parameters for collection items. - * All the parameter filtered from filter parameters will be passed in **c** - * parameter in this format. - * **?c=brand:in:voi-jeans|and:::category:nin:t-shirts|shirts** - * @property {boolean} [filters] - Pass `filters` parameter to fetch the filter - * details. This flag is used to fetch all filters - * @property {boolean} [isDependent] - This query parameter is used to get the - * dependent products in the listing. - * @property {string} [sortOn] - The order to sort the list of products on. The - * supported sort parameters are popularity, price, redemption and discount in - * either ascending or descending order. See the supported values below. - * @property {string} [pageId] - Each response will contain **page_id** param, - * which should be sent back to make pagination work. - * @property {number} [pageSize] - Number of items to retrieve in each page. - * Default is 12. - * @property {number} [pageNo] - If page_type is number then pass it to fetch - * page items. Default is 1. - * @property {string} [pageType] - For pagination type should be cursor or - * number. Default is cursor. - * @property {string[]} [itemIds] - Item Ids of product + * @property {string} [q] - Get Values filtered by q string */ /** @typedef GetAutocompleteConfigParam */ @@ -340,7 +329,6 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); * should be sent back to make pagination work. * @property {number} [pageSize] - Number of items to retrieve in each page. * Default is 12. - * @property {number} [pageNo] - Identifies the specific page of results being requested. */ /** @@ -366,13 +354,14 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef GetDiscountedInventoryBySizeIdentifierParam - * @property {number} itemId - A `item_id` is a unique identifier for a specific product. - * @property {number} sizeIdentifier - Size Identifier (Seller Identifier or - * Primary Identifier). + * @property {number} itemId - Item code of the product of which size is to be get. + * @property {string} sizeIdentifier - Size Identifier (Seller Identifier or + * Primary Identifier) of which inventory is to get. * @property {number} [pageNo] - The page number to navigate through the given * set of results * @property {number} [pageSize] - Number of items to retrieve in each page. * Default is 12. + * @property {string} [q] - Search with help of store code. * @property {number[]} [locationIds] - Search by store ids. */ @@ -404,7 +393,7 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); * @typedef GetProductDetailBySlugParam * @property {string} slug - The unique identifier of a product. i.e; `slug` of * a product. You can retrieve these from the APIs that list products like - * "v1.0/products/" + * **v1.0/products/** */ /** @typedef GetQueryFiltersParam */ @@ -419,7 +408,7 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef UpdateAllowSingleParam - * @property {CatalogPlatformModel.AllowSingleRequestSchema} body + * @property {CatalogPlatformModel.AllowSingleRequest} body */ /** @@ -443,20 +432,20 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef UpdateAppDepartmentParam - * @property {number} departmentUid - A `department id` is a unique identifier - * for a particular department. + * @property {string} departmentUid - Department id for which the custom_json is + * associated. * @property {CatalogPlatformModel.ApplicationDepartmentJson} body */ /** * @typedef UpdateAppLocationParam - * @property {number} storeUid - Store id for which the custom_json is associated. + * @property {string} storeUid - Store id for which the custom_json is associated. * @property {CatalogPlatformModel.ApplicationStoreJson} body */ /** * @typedef UpdateAppProductParam - * @property {number} itemId - A `item_id` is a unique identifier for a particular item. + * @property {string} itemId - Product id for which the custom_meta is associated. * @property {CatalogPlatformModel.ApplicationItemMeta} body */ @@ -480,7 +469,7 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef UpdateDefaultSortParam - * @property {CatalogPlatformModel.DefaultKeyRequestSchema} body + * @property {CatalogPlatformModel.DefaultKeyRequest} body */ /** @@ -503,7 +492,7 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef UpdateSearchConfigurationParam - * @property {CatalogPlatformModel.UpdateSearchConfigurationRequestSchema} body + * @property {CatalogPlatformModel.UpdateSearchConfigurationRequest} body */ /** @@ -539,13 +528,6 @@ class CatalogPlatformApplicationValidator { /** @returns {CreateCollectionParam} */ static createCollection() { return Joi.object({ - q: Joi.string().allow(""), - scheduleStatus: Joi.string().allow(""), - type: Joi.string().allow(""), - tags: Joi.array().items(Joi.string().allow("")), - isActive: Joi.boolean(), - pageNo: Joi.number(), - pageSize: Joi.number(), body: CatalogPlatformModel.CreateCollection().required(), }).required(); } @@ -598,7 +580,7 @@ class CatalogPlatformApplicationValidator { /** @returns {CreateSearchConfigurationParam} */ static createSearchConfiguration() { return Joi.object({ - body: CatalogPlatformModel.CreateSearchConfigurationRequestSchema().required(), + body: CatalogPlatformModel.CreateSearchConfigurationRequest().required(), }).required(); } @@ -736,6 +718,23 @@ class CatalogPlatformApplicationValidator { return Joi.object({}).required(); } + /** @returns {GetAppicationProductsParam} */ + static getAppicationProducts() { + return Joi.object({ + q: Joi.string().allow(""), + f: Joi.string().allow(""), + c: Joi.string().allow(""), + filters: Joi.boolean(), + isDependent: Joi.boolean(), + sortOn: Joi.string().allow(""), + pageId: Joi.string().allow(""), + pageSize: Joi.number(), + pageNo: Joi.number(), + pageType: Joi.string().allow(""), + itemIds: Joi.array().items(Joi.number()), + }).required(); + } + /** @returns {GetApplicationBrandListingParam} */ static getApplicationBrandListing() { return Joi.object({ @@ -794,23 +793,6 @@ class CatalogPlatformApplicationValidator { }).required(); } - /** @returns {GetApplicationProductsParam} */ - static getApplicationProducts() { - return Joi.object({ - q: Joi.string().allow(""), - f: Joi.string().allow(""), - c: Joi.string().allow(""), - filters: Joi.boolean(), - isDependent: Joi.boolean(), - sortOn: Joi.string().allow(""), - pageId: Joi.string().allow(""), - pageSize: Joi.number(), - pageNo: Joi.number(), - pageType: Joi.string().allow(""), - itemIds: Joi.array().items(Joi.string().allow("")), - }).required(); - } - /** @returns {GetAutocompleteConfigParam} */ static getAutocompleteConfig() { return Joi.object({}).required(); @@ -856,7 +838,6 @@ class CatalogPlatformApplicationValidator { sortOn: Joi.string().allow(""), pageId: Joi.string().allow(""), pageSize: Joi.number(), - pageNo: Joi.number(), }).required(); } @@ -892,9 +873,10 @@ class CatalogPlatformApplicationValidator { static getDiscountedInventoryBySizeIdentifier() { return Joi.object({ itemId: Joi.number().required(), - sizeIdentifier: Joi.number().required(), + sizeIdentifier: Joi.string().allow("").required(), pageNo: Joi.number(), pageSize: Joi.number(), + q: Joi.string().allow(""), locationIds: Joi.array().items(Joi.number()), }).required(); } @@ -947,7 +929,7 @@ class CatalogPlatformApplicationValidator { /** @returns {UpdateAllowSingleParam} */ static updateAllowSingle() { return Joi.object({ - body: CatalogPlatformModel.AllowSingleRequestSchema().required(), + body: CatalogPlatformModel.AllowSingleRequest().required(), }).required(); } @@ -977,7 +959,7 @@ class CatalogPlatformApplicationValidator { /** @returns {UpdateAppDepartmentParam} */ static updateAppDepartment() { return Joi.object({ - departmentUid: Joi.number().required(), + departmentUid: Joi.string().allow("").required(), body: CatalogPlatformModel.ApplicationDepartmentJson().required(), }).required(); } @@ -985,7 +967,7 @@ class CatalogPlatformApplicationValidator { /** @returns {UpdateAppLocationParam} */ static updateAppLocation() { return Joi.object({ - storeUid: Joi.number().required(), + storeUid: Joi.string().allow("").required(), body: CatalogPlatformModel.ApplicationStoreJson().required(), }).required(); } @@ -993,7 +975,7 @@ class CatalogPlatformApplicationValidator { /** @returns {UpdateAppProductParam} */ static updateAppProduct() { return Joi.object({ - itemId: Joi.number().required(), + itemId: Joi.string().allow("").required(), body: CatalogPlatformModel.ApplicationItemMeta().required(), }).required(); } @@ -1024,7 +1006,7 @@ class CatalogPlatformApplicationValidator { /** @returns {UpdateDefaultSortParam} */ static updateDefaultSort() { return Joi.object({ - body: CatalogPlatformModel.DefaultKeyRequestSchema().required(), + body: CatalogPlatformModel.DefaultKeyRequest().required(), }).required(); } @@ -1049,7 +1031,7 @@ class CatalogPlatformApplicationValidator { /** @returns {UpdateSearchConfigurationParam} */ static updateSearchConfiguration() { return Joi.object({ - body: CatalogPlatformModel.UpdateSearchConfigurationRequestSchema().required(), + body: CatalogPlatformModel.UpdateSearchConfigurationRequest().required(), }).required(); } diff --git a/sdk/platform/Catalog/CatalogPlatformClient.d.ts b/sdk/platform/Catalog/CatalogPlatformClient.d.ts index 82a75d610..23c8466f3 100644 --- a/sdk/platform/Catalog/CatalogPlatformClient.d.ts +++ b/sdk/platform/Catalog/CatalogPlatformClient.d.ts @@ -6,12 +6,12 @@ declare class Catalog { * @param {CatalogPlatformValidator.AddInventoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addInventory * @summary: Create Inventory * @description: Allows add Inventory for particular size and selling location. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/addInventory/). */ - addInventory({ itemId, size, body, requestHeaders }?: CatalogPlatformValidator.AddInventoryParam, { responseHeaders }?: object): Promise; + addInventory({ itemId, size, body, requestHeaders }?: CatalogPlatformValidator.AddInventoryParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.AllSizesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -26,76 +26,74 @@ declare class Catalog { * @param {CatalogPlatformValidator.BulkHsnCodeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name bulkHsnCode * @summary: Create Bulk update HSN * @description: Execute bulk updates for HSN codes across multiple products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/bulkHsnCode/). */ - bulkHsnCode({ body, requestHeaders }?: CatalogPlatformValidator.BulkHsnCodeParam, { responseHeaders }?: object): Promise; + bulkHsnCode({ body, requestHeaders }?: CatalogPlatformValidator.BulkHsnCodeParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.CreateBulkInventoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createBulkInventory * @summary: Create bulk inventory * @description: Helps to create products in bulk push to kafka for approval/creation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createBulkInventory/). */ - createBulkInventory({ batchId, body, requestHeaders }?: CatalogPlatformValidator.CreateBulkInventoryParam, { responseHeaders }?: object): Promise; + createBulkInventory({ batchId, body, requestHeaders }?: CatalogPlatformValidator.CreateBulkInventoryParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.CreateBulkInventoryJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createBulkInventoryJob * @summary: Create bulk inventory upload job * @description: Helps to create a bulk Inventory upload job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createBulkInventoryJob/). */ - createBulkInventoryJob({ body, requestHeaders }?: CatalogPlatformValidator.CreateBulkInventoryJobParam, { responseHeaders }?: object): Promise; + createBulkInventoryJob({ body, requestHeaders }?: CatalogPlatformValidator.CreateBulkInventoryJobParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.CreateBulkProductUploadJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createBulkProductUploadJob * @summary: Create products bulk upload * @description: This API helps to create a bulk products upload job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createBulkProductUploadJob/). */ - createBulkProductUploadJob({ body, requestHeaders }?: CatalogPlatformValidator.CreateBulkProductUploadJobParam, { responseHeaders }?: object): Promise; + createBulkProductUploadJob({ body, requestHeaders }?: CatalogPlatformValidator.CreateBulkProductUploadJobParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.CreateInventoryExportParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name createInventoryExport * @summary: Create inventory export * @description: creates export job for inventory data associated with a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createInventoryExport/). */ - createInventoryExport({ body, requestHeaders }?: CatalogPlatformValidator.CreateInventoryExportParam, { responseHeaders }?: object): Promise; + createInventoryExport({ body, requestHeaders }?: CatalogPlatformValidator.CreateInventoryExportParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.CreateInventoryExportJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name createInventoryExportJob * @summary: Create inventory export job * @description: Helps to create a Inventory export job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createInventoryExportJob/). */ - createInventoryExportJob({ body, requestHeaders }?: CatalogPlatformValidator.CreateInventoryExportJobParam, { responseHeaders }?: object): Promise; + createInventoryExportJob({ body, requestHeaders }?: CatalogPlatformValidator.CreateInventoryExportJobParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.CreateMarketplaceOptinParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name createMarketplaceOptin * @summary: Create or Update opt-in infomation * @description: Allows to create opt-in information for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createMarketplaceOptin/). */ - createMarketplaceOptin({ marketplaceSlug, body, requestHeaders }?: CatalogPlatformValidator.CreateMarketplaceOptinParam, { responseHeaders }?: object): Promise; + createMarketplaceOptin({ marketplaceSlug, body, requestHeaders }?: CatalogPlatformValidator.CreateMarketplaceOptinParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.CreateProductParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -110,109 +108,106 @@ declare class Catalog { * @param {CatalogPlatformValidator.CreateProductAssetsInBulkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createProductAssetsInBulk * @summary: Create product assets in bulk * @description: Helps to create a bulk asset upload job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductAssetsInBulk/). */ - createProductAssetsInBulk({ body, requestHeaders }?: CatalogPlatformValidator.CreateProductAssetsInBulkParam, { responseHeaders }?: object): Promise; + createProductAssetsInBulk({ body, requestHeaders }?: CatalogPlatformValidator.CreateProductAssetsInBulkParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.CreateProductBundleParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name createProductBundle * @summary: Create product bundle * @description: Create product bundle in the catalog associated to a specific company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductBundle/). */ - createProductBundle({ body, requestHeaders }?: CatalogPlatformValidator.CreateProductBundleParam, { responseHeaders }?: object): Promise; + createProductBundle({ body, requestHeaders }?: CatalogPlatformValidator.CreateProductBundleParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.CreateProductExportJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createProductExportJob * @summary: Create product export job * @description: Allows to create a product export job for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductExportJob/). */ - createProductExportJob({ body, requestHeaders }?: CatalogPlatformValidator.CreateProductExportJobParam, { responseHeaders }?: object): Promise; + createProductExportJob({ body, requestHeaders }?: CatalogPlatformValidator.CreateProductExportJobParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.CreateProductsInBulkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createProductsInBulk * @summary: Create products in bulk * @description: Helps to create products in bulk push to kafka for approval/creation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductsInBulk/). */ - createProductsInBulk({ batchId, body, requestHeaders }?: CatalogPlatformValidator.CreateProductsInBulkParam, { responseHeaders }?: object): Promise; + createProductsInBulk({ batchId, body, requestHeaders }?: CatalogPlatformValidator.CreateProductsInBulkParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.CreateSizeGuideParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createSizeGuide * @summary: Create size guide * @description: Allows to create a size guide associated to a seller - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createSizeGuide/). */ - createSizeGuide({ body, requestHeaders }?: CatalogPlatformValidator.CreateSizeGuideParam, { responseHeaders }?: object): Promise; + createSizeGuide({ body, requestHeaders }?: CatalogPlatformValidator.CreateSizeGuideParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.DeleteBulkInventoryJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteBulkInventoryJob * @summary: Delete inventory bulk upload job * @description: Allows to delete bulk Inventory job associated with company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteBulkInventoryJob/). */ - deleteBulkInventoryJob({ batchId, requestHeaders }?: CatalogPlatformValidator.DeleteBulkInventoryJobParam, { responseHeaders }?: object): Promise; + deleteBulkInventoryJob({ batchId, requestHeaders }?: CatalogPlatformValidator.DeleteBulkInventoryJobParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.DeleteProductParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteProduct * @summary: Delete product - * @description: Users can delete a product by providing the item_id and company_id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteProduct/). + * @description: Users can delete a product using this by providing the itemid. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteProduct/). */ - deleteProduct({ itemId, body, requestHeaders }?: CatalogPlatformValidator.DeleteProductParam, { responseHeaders }?: object): Promise; + deleteProduct({ itemId, requestHeaders }?: CatalogPlatformValidator.DeleteProductParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.DeleteProductBulkJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteProductBulkJob * @summary: Delete product bulk-upload job * @description: Allows to delete bulk product job associated with company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteProductBulkJob/). */ - deleteProductBulkJob({ batchId, requestHeaders }?: CatalogPlatformValidator.DeleteProductBulkJobParam, { responseHeaders }?: object): Promise; + deleteProductBulkJob({ batchId, requestHeaders }?: CatalogPlatformValidator.DeleteProductBulkJobParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.DeleteRealtimeInventoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name deleteRealtimeInventory * @summary: Delete an inventory * @description: You can use this API to delete inventory linked to a particular product size. When you make the API call, the inventory associated with that size will be removed as part of api process. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteRealtimeInventory/). */ - deleteRealtimeInventory({ itemId, sellerIdentifier, body, requestHeaders }?: CatalogPlatformValidator.DeleteRealtimeInventoryParam, { responseHeaders }?: object): Promise; + deleteRealtimeInventory({ itemId, sellerIdentifier, body, requestHeaders }?: CatalogPlatformValidator.DeleteRealtimeInventoryParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.DeleteSizeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name deleteSize * @summary: Delete product size * @description: Allows to delete size associated with product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteSize/). */ - deleteSize({ itemId, size, requestHeaders }?: CatalogPlatformValidator.DeleteSizeParam, { responseHeaders }?: object): Promise; + deleteSize({ itemId, size, requestHeaders }?: CatalogPlatformValidator.DeleteSizeParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.DownloadInventoryTemplateViewParam} arg * - Arg object @@ -241,12 +236,12 @@ declare class Catalog { * @param {CatalogPlatformValidator.EditProductParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name editProduct * @summary: Update a product * @description: Modify the details and settings of an existing product in the catalog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/editProduct/). */ - editProduct({ itemId, body, requestHeaders }?: CatalogPlatformValidator.EditProductParam, { responseHeaders }?: object): Promise; + editProduct({ itemId, body, requestHeaders }?: CatalogPlatformValidator.EditProductParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.ExportInventoryConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -283,13 +278,12 @@ declare class Catalog { * @param {CatalogPlatformValidator.GetCategoryDataParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getCategoryData * @summary: Get category by uid * @description: Retrieve detailed information about a specific category by its uid for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCategoryData/). */ - getCategoryData({ uid, requestHeaders }?: CatalogPlatformValidator.GetCategoryDataParam, { responseHeaders }?: object): Promise; + getCategoryData({ uid, requestHeaders }?: CatalogPlatformValidator.GetCategoryDataParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.GetCompanyBrandDetailParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -325,13 +319,12 @@ declare class Catalog { * @param {CatalogPlatformValidator.GetDepartmentDataParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getDepartmentData * @summary: Get department by uid * @description: Retrieve detailed information about a specific department for a specific company by uid. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getDepartmentData/). */ - getDepartmentData({ uid, requestHeaders }?: CatalogPlatformValidator.GetDepartmentDataParam, { responseHeaders }?: object): Promise; + getDepartmentData({ uid, requestHeaders }?: CatalogPlatformValidator.GetDepartmentDataParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.GetHsnCodeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -346,13 +339,12 @@ declare class Catalog { * @param {CatalogPlatformValidator.GetInventoriesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getInventories * @summary: List Inventory * @description: Allows to get Inventories data for particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventories/). */ - getInventories({ itemId, size, pageNo, pageSize, pageId, pageType, q, sellable, storeIds, brandIds, sellerIdentifiers, qtyGt, qtyLt, qtyType, fromDate, toDate, sizeIdentifier, requestHeaders, }?: CatalogPlatformValidator.GetInventoriesParam, { responseHeaders }?: object): Promise; + getInventories({ itemId, size, pageNo, pageSize, pageId, pageType, q, sellable, storeIds, brandIds, sellerIdentifiers, qtyGt, qtyLt, qtyType, fromDate, toDate, sizeIdentifier, requestHeaders, }?: CatalogPlatformValidator.GetInventoriesParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} [arg.itemId] - Item code of the product of which size is to be get. @@ -380,7 +372,7 @@ declare class Catalog { * inventories less then or equal to provided date based on qty_type value. * @param {string} [arg.sizeIdentifier] - Size Identifier (Seller Identifier * or Primary Identifier) of which inventory is to get. - * @returns {Paginator} + * @returns {Paginator} * @summary: List Inventory * @description: Allows to get Inventories data for particular company. */ @@ -399,7 +391,7 @@ declare class Catalog { fromDate?: string; toDate?: string; sizeIdentifier?: string; - }): Paginator; + }): Paginator; /** * @param {CatalogPlatformValidator.GetInventoryBulkUploadHistoryParam} arg * - Arg object @@ -523,57 +515,54 @@ declare class Catalog { * @param {CatalogPlatformValidator.GetOptimalLocationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getOptimalLocations * @summary: Get optimal locations * @description: This API returns the optimal locations where inventory is available for the given articles. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getOptimalLocations/). */ - getOptimalLocations({ body, requestHeaders }?: CatalogPlatformValidator.GetOptimalLocationsParam, { responseHeaders }?: object): Promise; + getOptimalLocations({ body, requestHeaders }?: CatalogPlatformValidator.GetOptimalLocationsParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.GetProductParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getProduct * @summary: Get a product * @description: Retrieve data associated to a particular product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProduct/). */ - getProduct({ itemId, brandUid, itemCode, requestHeaders }?: CatalogPlatformValidator.GetProductParam, { responseHeaders }?: object): Promise; + getProduct({ itemId, brandUid, itemCode, requestHeaders }?: CatalogPlatformValidator.GetProductParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.GetProductAssetsInBulkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getProductAssetsInBulk * @summary: Get product assets * @description: Helps to retrieve bulk asset jobs data associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductAssetsInBulk/). */ - getProductAssetsInBulk({ pageNo, pageSize, requestHeaders }?: CatalogPlatformValidator.GetProductAssetsInBulkParam, { responseHeaders }?: object): Promise; + getProductAssetsInBulk({ pageNo, pageSize, requestHeaders }?: CatalogPlatformValidator.GetProductAssetsInBulkParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {number} [arg.pageSize] - Number of items to retrieve in each * page. Default is 12. - * @returns {Paginator} + * @returns {Paginator} * @summary: Get product assets * @description: Helps to retrieve bulk asset jobs data associated to a particular company. */ getProductAssetsInBulkPaginator({ pageSize }?: { pageSize?: number; - }): Paginator; + }): Paginator; /** * @param {CatalogPlatformValidator.GetProductAttributesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getProductAttributes * @summary: List product attributes * @description: Retrieve attributes attached to products based on their L3 category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductAttributes/). */ - getProductAttributes({ category, filter, requestHeaders }?: CatalogPlatformValidator.GetProductAttributesParam, { responseHeaders }?: object): Promise; + getProductAttributes({ category, filter, requestHeaders }?: CatalogPlatformValidator.GetProductAttributesParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.GetProductBulkUploadHistoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -601,60 +590,56 @@ declare class Catalog { * @param {CatalogPlatformValidator.GetProductBundleParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getProductBundle * @summary: List product bundles * @description: Retrieve a list of product bundles available in the catalog associated to a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductBundle/). */ - getProductBundle({ q, slug, pageNo, pageSize, requestHeaders }?: CatalogPlatformValidator.GetProductBundleParam, { responseHeaders }?: object): Promise; + getProductBundle({ q, slug, requestHeaders }?: CatalogPlatformValidator.GetProductBundleParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.GetProductBundleDetailParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getProductBundleDetail * @summary: Get product bundle * @description: Retrieve detailed information about a specific product bundle associated to a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductBundleDetail/). */ - getProductBundleDetail({ id, requestHeaders }?: CatalogPlatformValidator.GetProductBundleDetailParam, { responseHeaders }?: object): Promise; + getProductBundleDetail({ id, requestHeaders }?: CatalogPlatformValidator.GetProductBundleDetailParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.GetProductExportJobsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getProductExportJobs * @summary: Get product export jobs * @description: Get product export jobs specific to a company based on queries like query param, date range and status. View details including trigger data, task id , etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductExportJobs/). */ - getProductExportJobs({ status, fromDate, toDate, q, pageNo, pageSize, requestHeaders }?: CatalogPlatformValidator.GetProductExportJobsParam, { responseHeaders }?: object): Promise; + getProductExportJobs({ status, fromDate, toDate, q, pageNo, pageSize, requestHeaders }?: CatalogPlatformValidator.GetProductExportJobsParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.GetProductSizeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getProductSize * @summary: List product size * @description: Retrieve data associated to a particular product size. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductSize/). */ - getProductSize({ itemId, itemCode, brandUid, uid, requestHeaders }?: CatalogPlatformValidator.GetProductSizeParam, { responseHeaders }?: object): Promise; + getProductSize({ itemId, itemCode, brandUid, uid, requestHeaders }?: CatalogPlatformValidator.GetProductSizeParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.GetProductTagsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getProductTags * @summary: List product tags * @description: Retrieve tags data associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductTags/). */ - getProductTags({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getProductTags({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.GetProductValidationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -717,13 +702,12 @@ declare class Catalog { * @param {CatalogPlatformValidator.GetSellerInsightsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getSellerInsights * @summary: Get seller catalog counts * @description: Retrieve the count of catalog related data for sellers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSellerInsights/). */ - getSellerInsights({ sellerAppId, requestHeaders }?: CatalogPlatformValidator.GetSellerInsightsParam, { responseHeaders }?: object): Promise; + getSellerInsights({ sellerAppId, requestHeaders }?: CatalogPlatformValidator.GetSellerInsightsParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.GetSingleProductHSNCodeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -738,12 +722,12 @@ declare class Catalog { * @param {CatalogPlatformValidator.GetSizeGuideParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSizeGuide * @summary: Get size guide * @description: Retrieve data associated about a specific size guide. It contains meta deta like header values like for shoulder, head, etc. and measurement unit like cm and values contains sizes for the same. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSizeGuide/). */ - getSizeGuide({ id, requestHeaders }?: CatalogPlatformValidator.GetSizeGuideParam, { responseHeaders }?: object): Promise; + getSizeGuide({ id, requestHeaders }?: CatalogPlatformValidator.GetSizeGuideParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.GetSizeGuidesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -781,20 +765,19 @@ declare class Catalog { * @param {CatalogPlatformValidator.GetVariantsOfProductsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getVariantsOfProducts * @summary: Get variants * @description: Retrieve variants of a specific product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getVariantsOfProducts/). */ - getVariantsOfProducts({ itemId, variantType, pageNo, pageSize, requestHeaders }?: CatalogPlatformValidator.GetVariantsOfProductsParam, { responseHeaders }?: object): Promise; + getVariantsOfProducts({ itemId, variantType, pageNo, pageSize, requestHeaders }?: CatalogPlatformValidator.GetVariantsOfProductsParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {number} arg.itemId - Get list of variants of item Id * @param {string} arg.variantType - Get multiple products filtered by variant type * @param {number} [arg.pageSize] - Number of items to retrieve in each * page. Default is 10. - * @returns {Paginator} + * @returns {Paginator} * @summary: Get variants * @description: Retrieve variants of a specific product. */ @@ -802,17 +785,17 @@ declare class Catalog { itemId: number; variantType: string; pageSize?: number; - }): Paginator; + }): Paginator; /** * @param {CatalogPlatformValidator.ListCategoriesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name listCategories * @summary: List categories * @description: Retrieve a list of categories data associated to a specific company and queries passed in the request. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listCategories/). */ - listCategories({ level, department, q, pageNo, pageSize, uids, slug, requestHeaders }?: CatalogPlatformValidator.ListCategoriesParam, { responseHeaders }?: object): Promise; + listCategories({ level, department, q, pageNo, pageSize, uids, slug, requestHeaders }?: CatalogPlatformValidator.ListCategoriesParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} [arg.level] - Get category for multiple levels @@ -822,7 +805,7 @@ declare class Catalog { * page. Default is 10. * @param {number[]} [arg.uids] - Get multiple categories filtered by category uids. * @param {string} [arg.slug] - Get category by slug - * @returns {Paginator} + * @returns {Paginator} * @summary: List categories * @description: Retrieve a list of categories data associated to a specific company and queries passed in the request. */ @@ -833,18 +816,17 @@ declare class Catalog { pageSize?: number; uids?: number[]; slug?: string; - }): Paginator; + }): Paginator; /** * @param {CatalogPlatformValidator.ListDepartmentsDataParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name listDepartmentsData * @summary: List company department * @description: Allows you to list all departments data for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listDepartmentsData/). */ - listDepartmentsData({ pageNo, itemType, pageSize, name, search, isActive, slug, requestHeaders, }?: CatalogPlatformValidator.ListDepartmentsDataParam, { responseHeaders }?: object): Promise; + listDepartmentsData({ pageNo, itemType, pageSize, name, search, isActive, slug, requestHeaders, }?: CatalogPlatformValidator.ListDepartmentsDataParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} [arg.itemType] - A `item_type` is a type of product eg. @@ -857,7 +839,7 @@ declare class Catalog { * @param {boolean} [arg.isActive] - Can query for departments based on * whether they are active or inactive. * @param {string} [arg.slug] - Can filter by slug - * @returns {Paginator} + * @returns {Paginator} * @summary: List company department * @description: Allows you to list all departments data for a specific company. */ @@ -868,67 +850,66 @@ declare class Catalog { search?: string; isActive?: boolean; slug?: string; - }): Paginator; + }): Paginator; /** * @param {CatalogPlatformValidator.ListHSNCodesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name listHSNCodes * @summary: List HSN codes * @description: Retrieve a list of Harmonized System Nomenclature (HSN) codes for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listHSNCodes/). */ - listHSNCodes({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + listHSNCodes({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.ListInventoryExportParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name listInventoryExport * @summary: List inventory export jobs * @description: Retrieve the history of inventory export jobs associated with the company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listInventoryExport/). */ - listInventoryExport({ status, fromDate, toDate, q, pageNo, pageSize, requestHeaders }?: CatalogPlatformValidator.ListInventoryExportParam, { responseHeaders }?: object): Promise; + listInventoryExport({ status, fromDate, toDate, q, pageNo, pageSize, requestHeaders }?: CatalogPlatformValidator.ListInventoryExportParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.ListProductTemplateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name listProductTemplate * @summary: List product templates * @description: Allows you to list all product templates for a specific company. also can filter by department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listProductTemplate/). */ - listProductTemplate({ department, requestHeaders }?: CatalogPlatformValidator.ListProductTemplateParam, { responseHeaders }?: object): Promise; + listProductTemplate({ department, requestHeaders }?: CatalogPlatformValidator.ListProductTemplateParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.ListProductTemplateCategoriesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name listProductTemplateCategories * @summary: List product template categories * @description: Allows you to list all product template categories values for the departments specified for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listProductTemplateCategories/). */ - listProductTemplateCategories({ departments, itemType, requestHeaders }?: CatalogPlatformValidator.ListProductTemplateCategoriesParam, { responseHeaders }?: object): Promise; + listProductTemplateCategories({ departments, itemType, requestHeaders }?: CatalogPlatformValidator.ListProductTemplateCategoriesParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.ListProductTemplateExportDetailsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name listProductTemplateExportDetails * @summary: List export product templates * @description: Retrieve export details related to product templates for a specific company. Can view details including trigger data, task id , etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listProductTemplateExportDetails/). */ - listProductTemplateExportDetails({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + listProductTemplateExportDetails({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.ListTemplateBrandTypeValuesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -954,108 +935,90 @@ declare class Catalog { * @param {CatalogPlatformValidator.UpdateInventoriesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name updateInventories * @summary: Update inventories * @description: Allows to add Inventory for particular size and selling location. for associated companies - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateInventories/). */ - updateInventories({ body, requestHeaders }?: CatalogPlatformValidator.UpdateInventoriesParam, { responseHeaders }?: object): Promise; + updateInventories({ body, requestHeaders }?: CatalogPlatformValidator.UpdateInventoriesParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.UpdateMarketplaceOptinParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updateMarketplaceOptin * @summary: Update marketplace optin * @description: Allows to update marketplace optin for a company by marketplace_slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateMarketplaceOptin/). */ - updateMarketplaceOptin({ marketplaceSlug, body, requestHeaders }?: CatalogPlatformValidator.UpdateMarketplaceOptinParam, { responseHeaders }?: object): Promise; + updateMarketplaceOptin({ marketplaceSlug, body, requestHeaders }?: CatalogPlatformValidator.UpdateMarketplaceOptinParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.UpdateProductBundleParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updateProductBundle * @summary: Update product bundle * @description: Modify the details of an existing product bundle in the catalog associated to a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateProductBundle/). */ - updateProductBundle({ id, body, requestHeaders }?: CatalogPlatformValidator.UpdateProductBundleParam, { responseHeaders }?: object): Promise; + updateProductBundle({ id, body, requestHeaders }?: CatalogPlatformValidator.UpdateProductBundleParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.UpdateRealtimeInventoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name updateRealtimeInventory * @summary: Update an inventory * @description: enables you to add inventory for a specific size and selling location (store). The inventory updates will be reflected instantly after the API call. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateRealtimeInventory/). */ - updateRealtimeInventory({ itemId, sellerIdentifier, body, requestHeaders }?: CatalogPlatformValidator.UpdateRealtimeInventoryParam, { responseHeaders }?: object): Promise; + updateRealtimeInventory({ itemId, sellerIdentifier, body, requestHeaders }?: CatalogPlatformValidator.UpdateRealtimeInventoryParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.UpdateSizeGuideParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateSizeGuide * @summary: Update size guide * @description: Allows to edit a specific size guide. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateSizeGuide/). */ - updateSizeGuide({ id, body, requestHeaders }?: CatalogPlatformValidator.UpdateSizeGuideParam, { responseHeaders }?: object): Promise; + updateSizeGuide({ id, body, requestHeaders }?: CatalogPlatformValidator.UpdateSizeGuideParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.UploadBulkProductsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name uploadBulkProducts * @summary: Upload bulk products * @description: Users can create multiple products by providing the required information needed for product creation in a CSV or Excel file format. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/uploadBulkProducts/). */ - uploadBulkProducts({ department, productType, body, requestHeaders }?: CatalogPlatformValidator.UploadBulkProductsParam, { responseHeaders }?: object): Promise; - /** - * @param {CatalogPlatformValidator.ValidateProductGlobalTemplateParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name validateProductGlobalTemplate - * @summary: Validate product template - * @description: Allows you to list all product templates global validation values for all the fields present in the database for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/validateProductGlobalTemplate/). - */ - validateProductGlobalTemplate({ itemType, bulk, requestHeaders }?: CatalogPlatformValidator.ValidateProductGlobalTemplateParam, { responseHeaders }?: object): Promise; + uploadBulkProducts({ department, productType, body, requestHeaders }?: CatalogPlatformValidator.UploadBulkProductsParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.ValidateProductTemplateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name validateProductTemplate * @summary: Validate product template * @description: Allows you to list all product templates validation values by its slug for all the fields present in the database for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/validateProductTemplate/). */ - validateProductTemplate({ slug, itemType, bulk, requestHeaders }?: CatalogPlatformValidator.ValidateProductTemplateParam, { responseHeaders }?: object): Promise; + validateProductTemplate({ slug, itemType, bulk, requestHeaders }?: CatalogPlatformValidator.ValidateProductTemplateParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.ValidateProductTemplateSchemaParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name validateProductTemplateSchema * @summary: Validate product template schema * @description: Allows you to list all product templates validation values for all the fields present in the database for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/validateProductTemplateSchema/). */ - validateProductTemplateSchema({ itemType, requestHeaders }?: CatalogPlatformValidator.ValidateProductTemplateSchemaParam, { responseHeaders }?: object): Promise; + validateProductTemplateSchema({ itemType, requestHeaders }?: CatalogPlatformValidator.ValidateProductTemplateSchemaParam, { responseHeaders }?: object): Promise; } import CatalogPlatformValidator = require("./CatalogPlatformValidator"); import CatalogPlatformModel = require("./CatalogPlatformModel"); diff --git a/sdk/platform/Catalog/CatalogPlatformClient.js b/sdk/platform/Catalog/CatalogPlatformClient.js index ef1bde757..b3bfe230f 100644 --- a/sdk/platform/Catalog/CatalogPlatformClient.js +++ b/sdk/platform/Catalog/CatalogPlatformClient.js @@ -18,7 +18,7 @@ class Catalog { * @param {CatalogPlatformValidator.AddInventoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addInventory * @summary: Create Inventory * @description: Allows add Inventory for particular size and selling location. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/addInventory/). @@ -78,7 +78,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, { + } = CatalogPlatformModel.SuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -178,7 +178,7 @@ class Catalog { * @param {CatalogPlatformValidator.BulkHsnCodeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name bulkHsnCode * @summary: Create Bulk update HSN * @description: Execute bulk updates for HSN codes across multiple products. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/bulkHsnCode/). @@ -232,7 +232,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.BulkHsnResponseSchema().validate(responseData, { + } = CatalogPlatformModel.BulkHsnResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -255,7 +255,7 @@ class Catalog { * @param {CatalogPlatformValidator.CreateBulkInventoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createBulkInventory * @summary: Create bulk inventory * @description: Helps to create products in bulk push to kafka for approval/creation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createBulkInventory/). @@ -313,7 +313,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, { + } = CatalogPlatformModel.SuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -336,7 +336,7 @@ class Catalog { * @param {CatalogPlatformValidator.CreateBulkInventoryJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createBulkInventoryJob * @summary: Create bulk inventory upload job * @description: Helps to create a bulk Inventory upload job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createBulkInventoryJob/). @@ -394,7 +394,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.BulkResponseSchema().validate(responseData, { + } = CatalogPlatformModel.BulkResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -417,7 +417,7 @@ class Catalog { * @param {CatalogPlatformValidator.CreateBulkProductUploadJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createBulkProductUploadJob * @summary: Create products bulk upload * @description: This API helps to create a bulk products upload job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createBulkProductUploadJob/). @@ -475,7 +475,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.BulkResponseSchema().validate(responseData, { + } = CatalogPlatformModel.BulkResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -498,8 +498,7 @@ class Catalog { * @param {CatalogPlatformValidator.CreateInventoryExportParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name createInventoryExport * @summary: Create inventory export * @description: creates export job for inventory data associated with a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createInventoryExport/). @@ -555,10 +554,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.InventoryExportResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.InventoryExportResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -578,8 +577,7 @@ class Catalog { * @param {CatalogPlatformValidator.CreateInventoryExportJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name createInventoryExportJob * @summary: Create inventory export job * @description: Helps to create a Inventory export job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createInventoryExportJob/). @@ -637,10 +635,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.InventoryExportResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.InventoryExportResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -660,7 +658,7 @@ class Catalog { * @param {CatalogPlatformValidator.CreateMarketplaceOptinParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name createMarketplaceOptin @@ -722,7 +720,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.CreateMarketplaceOptinResponseSchema().validate( + } = CatalogPlatformModel.CreateMarketplaceOptinResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -824,7 +822,7 @@ class Catalog { * @param {CatalogPlatformValidator.CreateProductAssetsInBulkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createProductAssetsInBulk * @summary: Create product assets in bulk * @description: Helps to create a bulk asset upload job. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductAssetsInBulk/). @@ -882,7 +880,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, { + } = CatalogPlatformModel.SuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -905,7 +903,7 @@ class Catalog { * @param {CatalogPlatformValidator.CreateProductBundleParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name createProductBundle @@ -963,7 +961,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetProductBundleCreateResponseSchema().validate( + } = CatalogPlatformModel.GetProductBundleCreateResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -986,9 +984,8 @@ class Catalog { * @param {CatalogPlatformValidator.CreateProductExportJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createProductExportJob * @summary: Create product export job * @description: Allows to create a product export job for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductExportJob/). @@ -1046,10 +1043,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ProductDownloadsResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.ProductDownloadsResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1069,7 +1066,7 @@ class Catalog { * @param {CatalogPlatformValidator.CreateProductsInBulkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createProductsInBulk * @summary: Create products in bulk * @description: Helps to create products in bulk push to kafka for approval/creation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProductsInBulk/). @@ -1127,7 +1124,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, { + } = CatalogPlatformModel.SuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1150,7 +1147,7 @@ class Catalog { * @param {CatalogPlatformValidator.CreateSizeGuideParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createSizeGuide * @summary: Create size guide * @description: Allows to create a size guide associated to a seller - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createSizeGuide/). @@ -1206,7 +1203,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, { + } = CatalogPlatformModel.SuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1229,7 +1226,7 @@ class Catalog { * @param {CatalogPlatformValidator.DeleteBulkInventoryJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteBulkInventoryJob * @summary: Delete inventory bulk upload job * @description: Allows to delete bulk Inventory job associated with company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteBulkInventoryJob/). @@ -1287,7 +1284,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, { + } = CatalogPlatformModel.SuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1310,19 +1307,18 @@ class Catalog { * @param {CatalogPlatformValidator.DeleteProductParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteProduct * @summary: Delete product - * @description: Users can delete a product by providing the item_id and company_id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteProduct/). + * @description: Users can delete a product using this by providing the itemid. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteProduct/). */ async deleteProduct( - { itemId, body, requestHeaders } = { requestHeaders: {} }, + { itemId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error } = CatalogPlatformValidator.deleteProduct().validate( { itemId, - body, }, { abortEarly: false, allowUnknown: true } ); @@ -1336,7 +1332,6 @@ class Catalog { } = CatalogPlatformValidator.deleteProduct().validate( { itemId, - body, }, { abortEarly: false, allowUnknown: false } ); @@ -1356,7 +1351,7 @@ class Catalog { "delete", `/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/`, query_params, - body, + undefined, { ...xHeaders, ...requestHeaders }, { responseHeaders } ); @@ -1368,7 +1363,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, { + } = CatalogPlatformModel.SuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1391,7 +1386,7 @@ class Catalog { * @param {CatalogPlatformValidator.DeleteProductBulkJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteProductBulkJob * @summary: Delete product bulk-upload job * @description: Allows to delete bulk product job associated with company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteProductBulkJob/). @@ -1447,7 +1442,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, { + } = CatalogPlatformModel.SuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1470,8 +1465,7 @@ class Catalog { * @param {CatalogPlatformValidator.DeleteRealtimeInventoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name deleteRealtimeInventory * @summary: Delete an inventory * @description: You can use this API to delete inventory linked to a particular product size. When you make the API call, the inventory associated with that size will be removed as part of api process. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteRealtimeInventory/). @@ -1533,10 +1527,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.InventoryUpdateResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.InventoryUpdateResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1556,9 +1550,8 @@ class Catalog { * @param {CatalogPlatformValidator.DeleteSizeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name deleteSize * @summary: Delete product size * @description: Allows to delete size associated with product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteSize/). @@ -1614,7 +1607,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ProductSizeDeleteResponseSchema().validate( + } = CatalogPlatformModel.ProductSizeDeleteResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1804,7 +1797,7 @@ class Catalog { * @param {CatalogPlatformValidator.EditProductParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name editProduct * @summary: Update a product * @description: Modify the details and settings of an existing product in the catalog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/editProduct/). @@ -1860,7 +1853,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, { + } = CatalogPlatformModel.SuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2133,8 +2126,7 @@ class Catalog { * @param {CatalogPlatformValidator.GetCategoryDataParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getCategoryData * @summary: Get category by uid * @description: Retrieve detailed information about a specific category by its uid for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getCategoryData/). @@ -2190,10 +2182,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SingleCategoryResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.SingleCategoryResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2458,8 +2450,7 @@ class Catalog { * @param {CatalogPlatformValidator.GetDepartmentDataParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getDepartmentData * @summary: Get department by uid * @description: Retrieve detailed information about a specific department for a specific company by uid. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getDepartmentData/). @@ -2515,10 +2506,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.DepartmentsResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.DepartmentsResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2615,8 +2606,7 @@ class Catalog { * @param {CatalogPlatformValidator.GetInventoriesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getInventories * @summary: List Inventory * @description: Allows to get Inventories data for particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getInventories/). @@ -2740,10 +2730,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetInventoriesResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.GetInventoriesResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2786,7 +2776,7 @@ class Catalog { * inventories less then or equal to provided date based on qty_type value. * @param {string} [arg.sizeIdentifier] - Size Identifier (Seller Identifier * or Primary Identifier) of which inventory is to get. - * @returns {Paginator} + * @returns {Paginator} * @summary: List Inventory * @description: Allows to get Inventories data for particular company. */ @@ -3473,8 +3463,7 @@ class Catalog { * @param {CatalogPlatformValidator.GetOptimalLocationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getOptimalLocations * @summary: Get optimal locations * @description: This API returns the optimal locations where inventory is available for the given articles. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getOptimalLocations/). @@ -3530,10 +3519,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.StoreAssignResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.StoreAssignResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -3553,8 +3542,7 @@ class Catalog { * @param {CatalogPlatformValidator.GetProductParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getProduct * @summary: Get a product * @description: Retrieve data associated to a particular product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProduct/). @@ -3614,10 +3602,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SingleProductResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.SingleProductResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -3637,7 +3625,7 @@ class Catalog { * @param {CatalogPlatformValidator.GetProductAssetsInBulkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getProductAssetsInBulk * @summary: Get product assets * @description: Helps to retrieve bulk asset jobs data associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductAssetsInBulk/). @@ -3699,7 +3687,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.BulkAssetResponseSchema().validate(responseData, { + } = CatalogPlatformModel.BulkAssetResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3722,7 +3710,7 @@ class Catalog { * @param {Object} arg - Arg object. * @param {number} [arg.pageSize] - Number of items to retrieve in each * page. Default is 12. - * @returns {Paginator} + * @returns {Paginator} * @summary: Get product assets * @description: Helps to retrieve bulk asset jobs data associated to a particular company. */ @@ -3750,9 +3738,8 @@ class Catalog { * @param {CatalogPlatformValidator.GetProductAttributesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getProductAttributes * @summary: List product attributes * @description: Retrieve attributes attached to products based on their L3 category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductAttributes/). @@ -3812,7 +3799,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ProductAttributesResponseSchema().validate( + } = CatalogPlatformModel.ProductAttributesResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3953,7 +3940,7 @@ class Catalog { * @param {CatalogPlatformValidator.GetProductBundleParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getProductBundle @@ -3961,15 +3948,13 @@ class Catalog { * @description: Retrieve a list of product bundles available in the catalog associated to a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductBundle/). */ async getProductBundle( - { q, slug, pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, + { q, slug, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error } = CatalogPlatformValidator.getProductBundle().validate( { q, slug, - pageNo, - pageSize, }, { abortEarly: false, allowUnknown: true } ); @@ -3984,8 +3969,6 @@ class Catalog { { q, slug, - pageNo, - pageSize, }, { abortEarly: false, allowUnknown: false } ); @@ -3999,8 +3982,6 @@ class Catalog { const query_params = {}; query_params["q"] = q; query_params["slug"] = slug; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; const xHeaders = {}; @@ -4021,7 +4002,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetProductBundleListingResponseSchema().validate( + } = CatalogPlatformModel.GetProductBundleListingResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -4044,9 +4025,8 @@ class Catalog { * @param {CatalogPlatformValidator.GetProductBundleDetailParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getProductBundleDetail * @summary: Get product bundle * @description: Retrieve detailed information about a specific product bundle associated to a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductBundleDetail/). @@ -4104,10 +4084,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetProductBundleResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.GetProductBundleResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4127,9 +4107,8 @@ class Catalog { * @param {CatalogPlatformValidator.GetProductExportJobsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getProductExportJobs * @summary: Get product export jobs * @description: Get product export jobs specific to a company based on queries like query param, date range and status. View details including trigger data, task id , etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductExportJobs/). @@ -4203,10 +4182,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ProductDownloadsResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.ProductDownloadsResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4226,8 +4205,7 @@ class Catalog { * @param {CatalogPlatformValidator.GetProductSizeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getProductSize * @summary: List product size * @description: Retrieve data associated to a particular product size. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductSize/). @@ -4294,10 +4272,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ProductListingResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.ProductListingResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4317,8 +4295,7 @@ class Catalog { * @param {CatalogPlatformValidator.GetProductTagsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getProductTags * @summary: List product tags * @description: Retrieve tags data associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getProductTags/). @@ -4370,10 +4347,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ProductTagsViewResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.ProductTagsViewResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4675,8 +4652,7 @@ class Catalog { * @param {CatalogPlatformValidator.GetSellerInsightsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getSellerInsights * @summary: Get seller catalog counts * @description: Retrieve the count of catalog related data for sellers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSellerInsights/). @@ -4732,10 +4708,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.CrossSellingResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.CrossSellingResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4832,7 +4808,7 @@ class Catalog { * @param {CatalogPlatformValidator.GetSizeGuideParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSizeGuide * @summary: Get size guide * @description: Retrieve data associated about a specific size guide. It contains meta deta like header values like for shoulder, head, etc. and measurement unit like cm and values contains sizes for the same. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSizeGuide/). @@ -4888,7 +4864,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SizeGuideResponseSchema().validate(responseData, { + } = CatalogPlatformModel.SizeGuideResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -5124,8 +5100,7 @@ class Catalog { * @param {CatalogPlatformValidator.GetVariantsOfProductsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getVariantsOfProducts * @summary: Get variants * @description: Retrieve variants of a specific product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getVariantsOfProducts/). @@ -5191,10 +5166,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ProductVariantsResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.ProductVariantsResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -5216,7 +5191,7 @@ class Catalog { * @param {string} arg.variantType - Get multiple products filtered by variant type * @param {number} [arg.pageSize] - Number of items to retrieve in each * page. Default is 10. - * @returns {Paginator} + * @returns {Paginator} * @summary: Get variants * @description: Retrieve variants of a specific product. */ @@ -5246,7 +5221,7 @@ class Catalog { * @param {CatalogPlatformValidator.ListCategoriesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name listCategories * @summary: List categories * @description: Retrieve a list of categories data associated to a specific company and queries passed in the request. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listCategories/). @@ -5323,7 +5298,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.CategoryResponseSchema().validate(responseData, { + } = CatalogPlatformModel.CategoryResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -5351,7 +5326,7 @@ class Catalog { * page. Default is 10. * @param {number[]} [arg.uids] - Get multiple categories filtered by category uids. * @param {string} [arg.slug] - Get category by slug - * @returns {Paginator} + * @returns {Paginator} * @summary: List categories * @description: Retrieve a list of categories data associated to a specific company and queries passed in the request. */ @@ -5384,8 +5359,7 @@ class Catalog { * @param {CatalogPlatformValidator.ListDepartmentsDataParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name listDepartmentsData * @summary: List company department * @description: Allows you to list all departments data for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listDepartmentsData/). @@ -5469,10 +5443,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.DepartmentsResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.DepartmentsResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -5500,7 +5474,7 @@ class Catalog { * @param {boolean} [arg.isActive] - Can query for departments based on * whether they are active or inactive. * @param {string} [arg.slug] - Can filter by slug - * @returns {Paginator} + * @returns {Paginator} * @summary: List company department * @description: Allows you to list all departments data for a specific company. */ @@ -5540,7 +5514,7 @@ class Catalog { * @param {CatalogPlatformValidator.ListHSNCodesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name listHSNCodes * @summary: List HSN codes * @description: Retrieve a list of Harmonized System Nomenclature (HSN) codes for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listHSNCodes/). @@ -5592,7 +5566,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.HSNCodesResponseSchema().validate(responseData, { + } = CatalogPlatformModel.HSNCodesResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -5615,7 +5589,7 @@ class Catalog { * @param {CatalogPlatformValidator.ListInventoryExportParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name listInventoryExport @@ -5691,7 +5665,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.InventoryExportJobListResponseSchema().validate( + } = CatalogPlatformModel.InventoryExportJobListResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -5714,7 +5688,7 @@ class Catalog { * @param {CatalogPlatformValidator.ListProductTemplateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name listProductTemplate * @summary: List product templates * @description: Allows you to list all product templates for a specific company. also can filter by department. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listProductTemplate/). @@ -5771,7 +5745,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.TemplatesResponseSchema().validate(responseData, { + } = CatalogPlatformModel.TemplatesResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -5796,7 +5770,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name listProductTemplateCategories @@ -5860,7 +5834,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ProdcutTemplateCategoriesResponseSchema().validate( + } = CatalogPlatformModel.ProdcutTemplateCategoriesResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -5885,9 +5859,8 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name listProductTemplateExportDetails * @summary: List export product templates * @description: Retrieve export details related to product templates for a specific company. Can view details including trigger data, task id , etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listProductTemplateExportDetails/). @@ -5941,10 +5914,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.ProductDownloadsResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.ProductDownloadsResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -6134,8 +6107,7 @@ class Catalog { * @param {CatalogPlatformValidator.UpdateInventoriesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name updateInventories * @summary: Update inventories * @description: Allows to add Inventory for particular size and selling location. for associated companies - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateInventories/). @@ -6191,10 +6163,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.InventoryUpdateResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.InventoryUpdateResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -6214,7 +6186,7 @@ class Catalog { * @param {CatalogPlatformValidator.UpdateMarketplaceOptinParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updateMarketplaceOptin @@ -6276,7 +6248,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.UpdateMarketplaceOptinResponseSchema().validate( + } = CatalogPlatformModel.UpdateMarketplaceOptinResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -6299,7 +6271,7 @@ class Catalog { * @param {CatalogPlatformValidator.UpdateProductBundleParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updateProductBundle @@ -6359,7 +6331,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetProductBundleCreateResponseSchema().validate( + } = CatalogPlatformModel.GetProductBundleCreateResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -6382,8 +6354,7 @@ class Catalog { * @param {CatalogPlatformValidator.UpdateRealtimeInventoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name updateRealtimeInventory * @summary: Update an inventory * @description: enables you to add inventory for a specific size and selling location (store). The inventory updates will be reflected instantly after the API call. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateRealtimeInventory/). @@ -6445,10 +6416,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.InventoryUpdateResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.InventoryUpdateResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -6468,7 +6439,7 @@ class Catalog { * @param {CatalogPlatformValidator.UpdateSizeGuideParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateSizeGuide * @summary: Update size guide * @description: Allows to edit a specific size guide. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateSizeGuide/). @@ -6526,7 +6497,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SuccessResponseSchema().validate(responseData, { + } = CatalogPlatformModel.SuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -6549,7 +6520,7 @@ class Catalog { * @param {CatalogPlatformValidator.UploadBulkProductsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name uploadBulkProducts * @summary: Upload bulk products * @description: Users can create multiple products by providing the required information needed for product creation in a CSV or Excel file format. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/uploadBulkProducts/). @@ -6611,7 +6582,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.BulkResponseSchema().validate(responseData, { + } = CatalogPlatformModel.BulkResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -6630,102 +6601,12 @@ class Catalog { return response; } - /** - * @param {CatalogPlatformValidator.ValidateProductGlobalTemplateParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name validateProductGlobalTemplate - * @summary: Validate product template - * @description: Allows you to list all product templates global validation values for all the fields present in the database for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/validateProductGlobalTemplate/). - */ - async validateProductGlobalTemplate( - { itemType, bulk, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = CatalogPlatformValidator.validateProductGlobalTemplate().validate( - { - itemType, - bulk, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = CatalogPlatformValidator.validateProductGlobalTemplate().validate( - { - itemType, - bulk, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > Catalog > validateProductGlobalTemplate \n ${warrning}`, - }); - } - - const query_params = {}; - query_params["item_type"] = itemType; - query_params["bulk"] = bulk; - - const xHeaders = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "get", - `/service/platform/catalog/v1.0/company/${this.config.companyId}/products/templates/validation/schema/`, - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = CatalogPlatformModel.TemplatesGlobalValidationResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > Catalog > validateProductGlobalTemplate \n ${res_error}`, - }); - } - } - - return response; - } - /** * @param {CatalogPlatformValidator.ValidateProductTemplateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name validateProductTemplate * @summary: Validate product template * @description: Allows you to list all product templates validation values by its slug for all the fields present in the database for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/validateProductTemplate/). @@ -6789,7 +6670,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.TemplatesValidationResponseSchema().validate( + } = CatalogPlatformModel.TemplatesValidationResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -6814,9 +6695,8 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name validateProductTemplateSchema * @summary: Validate product template schema * @description: Allows you to list all product templates validation values for all the fields present in the database for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/validateProductTemplateSchema/). @@ -6875,7 +6755,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.InventoryValidationResponseSchema().validate( + } = CatalogPlatformModel.InventoryValidationResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); diff --git a/sdk/platform/Catalog/CatalogPlatformModel.d.ts b/sdk/platform/Catalog/CatalogPlatformModel.d.ts index 4e58f658f..fbc693f82 100644 --- a/sdk/platform/Catalog/CatalogPlatformModel.d.ts +++ b/sdk/platform/Catalog/CatalogPlatformModel.d.ts @@ -7,25 +7,17 @@ export = CatalogPlatformModel; */ /** * @typedef AllSizes - * @property {ValidateIdentifier[]} [identifiers] - A collection of identifiers - * (e.g., GTIN, UPC) associated with the size. Each identifier follows the - * structure defined in the ValidateIdentifier schema. - * @property {string} item_dimensions_unit_of_measure - The unit of measurement - * used for the item's dimensions (e.g., centimeters, inches). - * @property {number} item_height - The height of the item in the specified unit - * of measure. - * @property {number} item_length - The length of the item in the specified unit - * of measure. - * @property {number} item_weight - The weight of the item in the specified unit - * of measure. - * @property {string} item_weight_unit_of_measure - The unit of measurement for - * the item's weight (e.g., kilograms, pounds). - * @property {number} item_width - The width of the item in the specified unit of measure. - * @property {string} size - The label or designation for the item's size (e.g., - * S, M, L, or numerical values). - */ -/** - * @typedef AllowSingleRequestSchema + * @property {ValidateIdentifier[]} [identifiers] + * @property {string} item_dimensions_unit_of_measure + * @property {number} item_height + * @property {number} item_length + * @property {number} item_weight + * @property {string} item_weight_unit_of_measure + * @property {number} item_width + * @property {string} size + */ +/** + * @typedef AllowSingleRequest * @property {boolean} allow_single */ /** @@ -45,15 +37,16 @@ export = CatalogPlatformModel; /** * @typedef AppCategoryReturnConfig * @property {number} category_id - Unique identifier for L3 category - * @property {ProductReturnConfigBaseSchema} return_config - Return configuration details + * @property {ProductReturnConfigBaseSerializer} return_config - Return + * configuration details */ /** - * @typedef AppCategoryReturnConfigResponseSchema + * @typedef AppCategoryReturnConfigResponse * @property {string} [app_id] - Channel identifier * @property {number} [category_id] - Unique identifer of L3 category * @property {string} [logo] * @property {string} [name] - Name of L3 category - * @property {ProductReturnConfigBaseSchema} [return_config] + * @property {ProductReturnConfigBaseSerializer} [return_config] */ /** * @typedef AppConfiguration @@ -70,38 +63,26 @@ export = CatalogPlatformModel; */ /** * @typedef AppConfigurationDetail - * @property {string} app_id - Unique identifier for the application to which - * this configuration belongs. - * @property {AttributeDetailsGroup[]} [attributes] - A list of attribute groups - * associated with the app configuration. Each attribute group defines a set - * of attributes relevant to the app. - * @property {boolean} is_active - Indicates whether this configuration is - * currently active for the application. - * @property {boolean} is_default - Specifies if this configuration is the - * default setting for the application. - * @property {string} [logo] - URL of the logo image associated with the - * application configuration. - * @property {string} [name] - The name of the application configuration. - * @property {number} priority - The priority of this configuration compared to - * others. Higher priority configurations are given precedence. + * @property {string} app_id + * @property {AttributeDetailsGroup[]} [attributes] + * @property {boolean} is_active + * @property {boolean} is_default + * @property {string} [logo] + * @property {string} [name] + * @property {number} priority * @property {string} slug - * @property {string[]} [template_slugs] - A list of template slugs associated - * with this configuration, representing different templates that the - * configuration might use. + * @property {string[]} [template_slugs] */ /** * @typedef AppConfigurationsSort - * @property {string} app_id - Unique identifier for the application. - * @property {string} default_key - The default configuration key for the app. - * @property {boolean} is_active - Indicates whether the app configuration is - * currently active. - * @property {boolean} is_default - Specifies if this is the default - * configuration for the app. - * @property {string} key - The specific configuration key for the app. - * @property {string} [logo] - URL of the app's logo. - * @property {string} [name] - Name of the application. - * @property {number} priority - Defines the priority level for this - * configuration, with 1 being the highest. + * @property {string} app_id + * @property {string} default_key + * @property {boolean} is_active + * @property {boolean} is_default + * @property {string} key + * @property {string} [logo] + * @property {string} [name] + * @property {number} priority */ /** * @typedef ApplicationBrandJson @@ -116,23 +97,19 @@ export = CatalogPlatformModel; */ /** * @typedef ApplicationDepartment - * @property {Object} [_custom_json] - Custom JSON data specific to the - * department, used to store additional attributes or configurations. - * @property {string} app_id - Unique identifier for the application to which - * the department belongs. - * @property {boolean} [is_active] - Indicates whether the department is - * currently active within the application. - * @property {string} [logo] - URL or path to the logo representing the department. - * @property {string} [name] - Name of the department within the application. - * @property {number} uid - Unique identifier for the department. + * @property {Object} [_custom_json] + * @property {string} app_id + * @property {boolean} [is_active] + * @property {string} [logo] + * @property {string} [name] + * @property {number} uid */ /** * @typedef ApplicationDepartmentJson - * @property {Object} _custom_json - A custom JSON object containing additional - * details or configurations specific to the application department. + * @property {Object} _custom_json */ /** - * @typedef ApplicationDepartmentListingResponseSchema + * @typedef ApplicationDepartmentListingResponse * @property {ApplicationDepartment[]} [items] * @property {Page} page */ @@ -172,113 +149,19 @@ export = CatalogPlatformModel; * @property {string} [canonical_url] */ /** - * @typedef ApplicationProductsSchema - * @property {Object} [attributes] - Additional attributes of the product, such - * as custom properties or features. - * @property {ProductBrand} [brand] - * @property {string} [color] - * @property {string} [description] - A detailed description of the product. - * @property {string} [discount] - The discount applied to the product. - * @property {boolean} [has_variant] - Indicates whether the product has - * variants, such as different sizes or colors. - * @property {string[]} [highlights] - Key highlights of the product. - * @property {string} image_nature - The nature of the product image, indicating - * if it's the default or a standard image. - * @property {string} item_code - A unique code assigned to the product item at - * company and brand level. - * @property {string} item_type - The type of the product, defining its nature. - * @property {Media[]} [medias] - A list of media items associated with the - * product, such as images or videos. - * @property {string} name - The name of the product. - * @property {ProductListingPrice} [price] - * @property {string} [product_online_date] - The date and time when the product - * becomes available online. - * @property {Object} [promo_meta] - Metadata related to any promotions - * associated with the product. - * @property {number} [rating] - The average rating of the product, typically - * based on customer reviews. - * @property {number} [rating_count] - The total number of ratings the product - * has received. - * @property {boolean} [sellable] - Indicates whether the product is available for sale. - * @property {string} [short_description] - A brief description of the product. - * @property {string[]} [similars] - A list of similar products. - * @property {string} slug - A URL-friendly string representing the product. - * @property {Object} [teaser_tag] - A teaser tag object providing short - * promotional information about the product. - * @property {string[]} [tryouts] - A list of tryout options or samples - * available for the product. - * @property {string} [type] - The type or category of the product. - * @property {number} uid - A unique identifier for the product. - * @property {number} [popularity] - A numerical value indicating the popularity - * of the product. - * @property {number} brand_uid - The unique identifier for the brand associated - * with the product. - * @property {number} category_uid - The unique identifier for the category to - * which the product belongs. - * @property {number} [verification_status] - The verification status of the - * product, typically represented as an integer. - * @property {string} [channel_identifier] - The identifier for the sales - * channel through which the product is sold. - * @property {string} [category_slug] - A URL-friendly string representing the - * product's category. - * @property {string} [size_guide] - A guide or chart providing size information - * for the product. - * @property {number[]} l3_categories - A list of L3 category IDs of the product. - * @property {number[]} [store_ids] - A list of store IDs where the product is available. - * @property {number[]} [company_ids] - A list of company IDs associated with the product. - * @property {number[]} departments - A list of department IDs where the product - * is categorized. - * @property {string[]} [tags] - A list of tags or keywords associated with the product. - * @property {string[]} [l3_category_names] - A list of names of L3 categories - * of the product. - * @property {string[]} [sizes] - A list of available sizes for the product. - * @property {string[]} [product_group_tag] - Tags that group the product with - * other similar products. - * @property {boolean} multi_size - Indicates whether the product is available - * in multiple sizes. - * @property {boolean} is_gift - Indicates whether the product can be considered - * as a gift. - * @property {boolean} is_cod - Indicates whether the product is eligible for - * cash on delivery (COD). - * @property {boolean} is_dependent - Indicates whether the product depends on - * another product. - * @property {boolean} is_available - Indicates whether the product is currently - * available for purchase. - * @property {ApplicationItemMOQ} moq - * @property {ApplicationItemSEO} seo - * @property {Object} [variants] - An object containing details about the - * product variants. - * @property {Object} [variant_media] - Media items specific to the product variants. - * @property {Object} [variant_group] - A group identifier for products that are - * variants of one another. - * @property {MultiCategoriesSchema[]} [multi_categories] - * @property {string} [template_tag] - Tag used for categorizing or templating purposes. - * @property {Object} [net_quantity] - Net quantity details for the product. - * @property {CustomOrder} [custom_order] - * @property {string} country_of_origin - Country where the product is - * manufactured or sourced from. - * @property {Object} [_custom_json] - Custom JSON data associated with the product. - * @property {string[]} [identifiers] - Identifiers associated with the product. - * @property {number} [item_id] - Unique identifier for the item. - * @property {CustomMeta[]} [_custom_meta] - Custom meta associated with the product. - * @property {number} [discount_percentage] - The discount applied to the - * product in percentage. - */ -/** - * @typedef ApplicationProductListingResponseSchema + * @typedef ApplicationProductListingResponse * @property {ProductFilters[]} [filters] - * @property {ApplicationProductsSchema[]} [items] + * @property {ProductListingDetail[]} [items] * @property {Object} [operators] * @property {Page} page * @property {ProductSortOn[]} [sort_on] */ /** * @typedef ApplicationStoreJson - * @property {Object} _custom_json - Custom JSON data for the store. It can - * contain any additional data specific to the store configuration. + * @property {Object} _custom_json */ /** - * @typedef AppReturnConfigResponseSchema + * @typedef AppReturnConfigResponse * @property {string} [app_id] - Channel identifier * @property {number} [category_count] - Count of L3 category return config set * for application @@ -306,7 +189,7 @@ export = CatalogPlatformModel; * @property {string} size */ /** - * @typedef ArticleStoreResponseSchema + * @typedef ArticleStoreResponse * @property {string} [name] * @property {string} [store_code] * @property {string} [store_type] @@ -332,87 +215,70 @@ export = CatalogPlatformModel; */ /** * @typedef AttributeDetailsGroup - * @property {string} display_type - The type of display used for the attribute, - * such as text, dropdown, or image. - * @property {boolean} is_active - Indicates if this attribute group is currently active. - * @property {string} [key] - A unique key or identifier for the attribute group. - * @property {string} [logo] - URL of the logo image associated with this attribute group. - * @property {string} name - The name of the attribute group. - * @property {number} priority - The priority of the attribute group, - * determining the order in which it is displayed or processed. - * @property {string} [slug] - A URL-friendly identifier for the attribute - * group, often used in APIs for identification. - * @property {string} [unit] - The unit of measurement associated with the - * attribute, if applicable (e.g., cm, kg). + * @property {string} display_type + * @property {boolean} is_active + * @property {string} [key] + * @property {string} [logo] + * @property {string} name + * @property {number} priority + * @property {string} [slug] + * @property {string} [unit] */ /** * @typedef AttributeMaster - * @property {string[]} [allowed_values] - List of allowed values for the - * attribute, if applicable. - * @property {string} [format] - Format of the attribute, such as case formatting. - * @property {boolean} [mandatory] - Whether the attribute is mandatory. - * @property {boolean} [multi] - Indicates if the attribute allows multiple values. + * @property {string[]} [allowed_values] + * @property {string} [format] + * @property {boolean} [mandatory] + * @property {boolean} [multi] * @property {AttributeSchemaRange} [range] - * @property {string} type - Data type of the attribute. + * @property {string} type */ /** * @typedef AttributeMasterDetails - * @property {string} display_type - Type of display used for the attribute - * (e.g., text, dropdown). + * @property {string} display_type */ /** * @typedef AttributeMasterFilter * @property {string[]} [depends_on] - * @property {boolean} indexing - Whether the attribute should be indexed for search. - * @property {number} [priority] - Priority of the attribute in filtering (optional). + * @property {boolean} indexing + * @property {number} [priority] */ /** * @typedef AttributeMasterMandatoryDetails - * @property {string[]} [l3_keys] - A list of Level 3 (L3) keys associated with - * the attribute, typically used for advanced categorization or attribute grouping. + * @property {string[]} [l3_keys] */ /** * @typedef AttributeMasterMeta - * @property {boolean} [enriched] - Indicates if the attribute has been enriched - * with additional details or data beyond the basic schema. + * @property {boolean} [enriched] * @property {AttributeMasterMandatoryDetails} mandatory_details */ /** - * @typedef AttributeMasterSchema - * @property {Object} [created_by] - Information about the user who created the attribute. - * @property {string} [created_on] - The timestamp when the attribute was created. - * @property {string[]} departments - Departments or categories to which the - * attribute applies. - * @property {string} [description] - A description of the attribute. + * @typedef AttributeMasterSerializer + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {string[]} departments + * @property {string} [description] * @property {AttributeMasterDetails} details - * @property {boolean} [enabled_for_end_consumer] - Indicates if the attribute - * is enabled for end consumers. + * @property {boolean} [enabled_for_end_consumer] * @property {AttributeMasterFilter} filters - * @property {boolean} [is_nested] - Indicates if the attribute can be nested - * under other attributes. - * @property {string} [logo] - URL of the logo associated with the attribute. - * @property {Object} [modified_by] - Information about the user who last - * modified the attribute. - * @property {string} [modified_on] - The timestamp when the attribute was last modified. - * @property {string} name - Name of the attribute. - * @property {string} [raw_key] - Name of the attribute. + * @property {boolean} [is_nested] + * @property {string} [logo] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} [name] + * @property {string} [raw_key] * @property {AttributeMaster} schema - * @property {string} [suggestion] - Suggested or recommended value for the - * attribute, if applicable. - * @property {Object} [synonyms] - Synonyms or alternative names for the - * attribute, used for search and indexing. - * @property {string[]} [tags] - Tags or keywords associated with the attribute, - * often used for categorization. - * @property {string} [unit] - The unit of measurement for the attribute, if - * applicable (e.g., cm, kg). - * @property {string} slug - Unique slug or identifier for the attribute. - * @property {boolean} [variant] - Indicates if the attribute is a variant of - * another attribute. + * @property {string} slug + * @property {string} [suggestion] + * @property {Object} [synonyms] + * @property {string[]} [tags] + * @property {string} [unit] + * @property {boolean} [variant] */ /** * @typedef AttributeSchemaRange - * @property {number} [min] - Minimum allowed value for the attribute. - * @property {number} [max] - Maximum allowed value for the attribute. + * @property {number} [max] + * @property {number} [min] */ /** * @typedef AutoCompleteMedia @@ -450,18 +316,20 @@ export = CatalogPlatformModel; */ /** * @typedef BaseAppCategoryReturnConfig + * @property {string} app_id - Channel identifier + * @property {number} company_id - Unique identifer of company * @property {AppCategoryReturnConfig[]} data - Category level return config details */ /** - * @typedef BaseAppCategoryReturnConfigResponseSchema - * @property {AppCategoryReturnConfigResponseSchema[]} [data] - * @property {PageResponseSchema} [page] + * @typedef BaseAppCategoryReturnConfigResponse + * @property {AppCategoryReturnConfigResponse[]} [data] + * @property {PageResponse} [page] */ /** * @typedef Brand * @property {Logo} [logo] - * @property {string} [name] - The name of the brand. - * @property {number} [uid] - Unique identifier for the brand. + * @property {string} [name] + * @property {number} [uid] */ /** * @typedef BrandItem @@ -479,7 +347,7 @@ export = CatalogPlatformModel; * for internal reference. */ /** - * @typedef BrandListingResponseSchema + * @typedef BrandListingResponse * @property {BrandItem[]} [items] - An array of brand items, each containing * detailed information about the brand, such as action, banners, departments, * discount, logo, and other related fields. @@ -507,7 +375,7 @@ export = CatalogPlatformModel; /** * @typedef ApplicationBrandListingSchema * @property {ApplicationBrandListingItemSchema[]} [items] - * @property {Page} page + * @property {Page} [page] */ /** * @typedef ApplicationCategoryListingSchema @@ -534,21 +402,21 @@ export = CatalogPlatformModel; */ /** * @typedef BrandMeta - * @property {number} id - Unique identifier for the brand. - * @property {string} name - Name of the brand. + * @property {number} id + * @property {string} name */ /** * @typedef InventoryBrandMeta - * @property {number} [id] - Unique identifier for the brand in the inventory. - * @property {string} [name] - Name of the brand in the inventory. + * @property {number} [id] + * @property {string} [name] */ /** - * @typedef BulkAssetResponseSchema + * @typedef BulkAssetResponse * @property {Items[]} [items] * @property {Page} [page] */ /** - * @typedef BulkHsnResponseSchema + * @typedef BulkHsnResponse * @property {boolean} [success] - Flag indicating the success status of the * bulk HSN operation. */ @@ -586,23 +454,18 @@ export = CatalogPlatformModel; */ /** * @typedef BulkProductJob - * @property {string} [company_id] - The unique identifier of the company - * associated with the bulk product job. - * @property {string} [template_tag] - The template tag used to classify the - * products in the bulk job. - * @property {string} [product_type] - The type of products being processed in - * the bulk job (e.g., standard, digital, composite). - * @property {string} [department] - The department under which the products in - * the bulk job are categorized. - * @property {string} [file_path] - The file path of the uploaded file - * containing the bulk product data. + * @property {number} [company_id] + * @property {string} [template_tag] + * @property {string} [product_type] + * @property {string} [department] + * @property {string} [file_path] */ /** * @typedef BulkJob * @property {number} [cancelled] * @property {Object[]} [cancelled_records] * @property {number} company_id - * @property {UserInfo} [created_by] - The user who created the item. + * @property {UserInfo1} [created_by] - The user who created the item. * @property {string} created_on - The date and time when the item was created. * @property {string} [custom_template_tag] * @property {number} [failed] @@ -618,16 +481,16 @@ export = CatalogPlatformModel; * @property {string} [tracking_url] */ /** - * @typedef BulkProductRequestSchema + * @typedef BulkProductRequest * @property {string} batch_id * @property {number} company_id * @property {Object[]} data * @property {string} template_tag */ /** - * @typedef BulkResponseSchema + * @typedef BulkResponse * @property {string} batch_id - * @property {UserInfo} [created_by] - The user who created the item. + * @property {UserInfo1} [created_by] - The user who created the item. * @property {string} created_on - The date and time when the item was created. * @property {boolean} [is_active] - Whether the item is active or not. * @property {string} [modified_by] - The user who last modified the item. @@ -656,19 +519,17 @@ export = CatalogPlatformModel; * sellable (in stock). */ /** - * @typedef CatalogInsightResponseSchema + * @typedef CatalogInsightResponse * @property {CatalogInsightBrand} [brand_distribution] * @property {CatalogInsightItem} [item] */ /** - * @typedef CategoriesResponseSchema - * @property {string} [name] - The name of the category. - * @property {string} [slug] - A URL-friendly unique identifier for the category. - * @property {string} [slug_key] - A key used for internal identification of the - * category slug. - * @property {string} [template_slug] - The slug of the template associated with - * the category. - * @property {number} [uid] - A unique identifier for the category. + * @typedef CategoriesResponse + * @property {string} [name] + * @property {string} [slug] + * @property {string} [slug_key] + * @property {string} [template_slug] + * @property {number} [uid] */ /** * @typedef Category @@ -707,7 +568,7 @@ export = CatalogPlatformModel; * @property {number} [uid] */ /** - * @typedef CategoryListingResponseSchema + * @typedef CategoryListingResponse * @property {DepartmentCategoryTree[]} [data] - An array containing the * department category trees, which provide hierarchical information about * categories and their associated departments. @@ -731,8 +592,8 @@ export = CatalogPlatformModel; * @property {string} name - It is the name of the Category in the respective platform. */ /** - * @typedef CategoryResponseSchema - * @property {Category[]} [items] - The list of categories. + * @typedef CategoryResponse + * @property {Category[]} [items] * @property {Page} [page] */ /** @@ -760,7 +621,7 @@ export = CatalogPlatformModel; * @property {CollectionImage} portrait */ /** - * @typedef CollectionCreateResponseSchema + * @typedef CollectionCreateResponse * @property {string} [uid] - Unique identifier for the collection. * @property {CollectionSchedule} [_schedule] * @property {boolean} [allow_facets] - Indicates whether facet-based filtering @@ -770,7 +631,6 @@ export = CatalogPlatformModel; * @property {string} [app_id] - The application ID associated with the collection. * @property {Object} [badge] - Details of the badge associated with the collection. * @property {ImageUrls} [banners] - * @property {Object} [cron] * @property {string} [description] - A description of the collection. * @property {boolean} [is_active] - Indicates whether the collection is currently active. * @property {BannerImage} [logo] @@ -799,7 +659,7 @@ export = CatalogPlatformModel; * @property {string} [id] - Unique identifier for the collection. */ /** - * @typedef CollectionDetailResponseSchema + * @typedef CollectionDetailResponse * @property {Object} [_schedule] * @property {boolean} [allow_facets] * @property {boolean} [allow_sort] @@ -892,7 +752,7 @@ export = CatalogPlatformModel; */ /** * @typedef CompanyMeta - * @property {number} id - Unique identifier for the company. + * @property {number} id */ /** * @typedef InventoryCompanyMeta @@ -912,14 +772,12 @@ export = CatalogPlatformModel; * @property {number[]} store_ids */ /** - * @typedef ConfigErrorResponseSchema - * @property {string} message - A human-readable error message providing details - * about the configuration failure. + * @typedef ConfigErrorResponse + * @property {string} message */ /** - * @typedef ConfigSuccessResponseSchema - * @property {string} message - A message confirming the successful completion - * of the configuration operation. + * @typedef ConfigSuccessResponse + * @property {string} message */ /** * @typedef ConfigurationBucketPoints @@ -1013,7 +871,7 @@ export = CatalogPlatformModel; * @property {string[]} [words] */ /** - * @typedef CreateAutocompleteWordsResponseSchema + * @typedef CreateAutocompleteWordsResponse * @property {Object} [_custom_json] * @property {string} [app_id] * @property {Object[]} [results] @@ -1062,16 +920,18 @@ export = CatalogPlatformModel; * visible and can be used for filtering the collection. */ /** - * @typedef CreateSearchConfigurationRequestSchema + * @typedef CreateSearchConfigurationRequest * @property {string} application_id - The application id where custom search * configuration is set * @property {number} company_id - The company id where custom search configuration is set - * @property {UserSchema} [created_by] - The user who created the search configuration. + * @property {UserSerializer} [created_by] - The user who created the search + * configuration. * @property {string} [created_on] - The date and time when the search * configuration was created. * @property {boolean} [is_proximity_enabled] - Flag indicating if proximity * search is enabled for this attribute. - * @property {UserSchema} [modified_by] - The user who modified the search configuration. + * @property {UserSerializer} [modified_by] - The user who modified the search + * configuration. * @property {string} [modified_on] - The date and time when the search * configuration was last modified. * @property {number} [proximity] - Proximity distance configuration @@ -1079,7 +939,7 @@ export = CatalogPlatformModel; * attributes defined on the application. */ /** - * @typedef CreateSearchConfigurationResponseSchema + * @typedef CreateSearchConfigurationResponse * @property {boolean} [success] */ /** @@ -1092,6 +952,8 @@ export = CatalogPlatformModel; */ /** * @typedef CreateUpdateAppReturnConfig + * @property {string} app_id - Channel identifier + * @property {number} company_id - Unique identifer of company * @property {string} return_config_level - Return configurtion Level * category|product|no-return */ @@ -1101,18 +963,15 @@ export = CatalogPlatformModel; * @property {number} [products] */ /** - * @typedef CrossSellingResponseSchema + * @typedef CrossSellingResponse * @property {CatalogInsightBrand} [brand_distribution] * @property {CrossSellingData} [data] */ /** * @typedef CustomOrder - * @property {string} [manufacturing_time_unit] - Unit of time for manufacturing - * (e.g., days, weeks). - * @property {boolean} is_custom_order - Indicates if the product is available - * for custom orders. - * @property {number} [manufacturing_time] - Time required for manufacturing in - * the specified unit. + * @property {boolean} [is_custom_order] + * @property {number} [manufacturing_time] + * @property {string} [manufacturing_time_unit] */ /** * @typedef DateMeta @@ -1122,39 +981,30 @@ export = CatalogPlatformModel; * @property {string} [modified_on] */ /** - * @typedef DefaultKeyRequestSchema - * @property {string} default_key - The default key used for the requested operation. + * @typedef DefaultKeyRequest + * @property {string} default_key */ /** * @typedef DeleteAppCategoryReturnConfig + * @property {string} app_id - Channel identifier * @property {number[]} category_ids - List of category_ids to be deleted. + * @property {number} company_id - Unique identifer of company */ /** - * @typedef DeleteProductRequestBody - * @property {number} [brand_uid] - The brand identifier for the product. - * @property {string} [item_code] - The code of the item to be deleted. - * @property {string} [company_id] - The ID of the company. (Optional if already - * provided in the path) - * @property {number} [item_id] - The ID of the product. - */ -/** - * @typedef DeleteResponseSchema + * @typedef DeleteResponse * @property {string} [message] */ /** - * @typedef DeleteSearchConfigurationResponseSchema + * @typedef DeleteSearchConfigurationResponse * @property {boolean} [success] */ /** * @typedef Department - * @property {DepartmentMedia} [logo] - * @property {string} [name] - The name of the department, used to identify it - * within the application. - * @property {number} [priority_order] - Defines the priority or order in which - * the department should appear in listings. - * @property {string} [slug] - A URL-friendly string used to uniquely identify - * the department. - * @property {number} [uid] - A unique identifier for the department. + * @property {Media2} [logo] + * @property {string} [name] + * @property {number} [priority_order] + * @property {string} [slug] + * @property {number} [uid] */ /** * @typedef DepartmentCategoryTree @@ -1164,17 +1014,12 @@ export = CatalogPlatformModel; * the specified department, each containing details about category items. */ /** - * @typedef DepartmentErrorResponseSchema - * @property {string} [code] - Error code representing the type of error encountered. - * @property {Object} [errors] - Detailed information about the errors - * encountered in the request, typically containing specific field validation - * errors or related data. - * @property {string} [message] - A human-readable message that explains the - * reason for the error. - * @property {Object} [meta] - Additional metadata about the error, such as - * contextual or debugging information. - * @property {number} [status] - HTTP status code associated with the error, - * e.g., 400 for a bad request or 500 for a server error. + * @typedef DepartmentErrorResponse + * @property {string} [code] + * @property {Object} [errors] + * @property {string} [message] + * @property {Object} [meta] + * @property {number} [status] */ /** * @typedef DepartmentIdentifier @@ -1186,16 +1031,16 @@ export = CatalogPlatformModel; * distinguish it from other departments in the system. */ /** - * @typedef DepartmentResponseSchema + * @typedef DepartmentResponse * @property {Department[]} [items] */ /** - * @typedef DepartmentsResponseSchema - * @property {GetDepartment[]} [items] - List of department objects. + * @typedef DepartmentsResponse + * @property {GetDepartment[]} [items] * @property {Page} [page] */ /** - * @typedef DimensionResponseSchema + * @typedef DimensionResponse * @property {number} height - The height dimension. * @property {boolean} is_default - Indicates if it is the default dimension. * @property {number} length - The length dimension. @@ -1203,7 +1048,7 @@ export = CatalogPlatformModel; * @property {number} width - The width dimension. */ /** - * @typedef InventoryDimensionResponseSchema + * @typedef InventoryDimensionResponse * @property {number} [height] * @property {number} [length] * @property {string} [unit] @@ -1211,14 +1056,11 @@ export = CatalogPlatformModel; */ /** * @typedef Document - * @property {string} [legal_name] - The official legal name associated with the document. - * @property {string} type - The type of document. - * @property {string} [url] - A URL link to the document, typically pointing to - * where the document is stored. - * @property {string} value - The actual value or identifier associated with the - * document, such as a GST number or PAN number. - * @property {boolean} [verified] - Indicates whether the document has been - * verified as valid. + * @property {string} [legal_name] + * @property {string} type + * @property {string} [url] + * @property {string} value + * @property {boolean} [verified] */ /** * @typedef EntityConfiguration @@ -1230,8 +1072,8 @@ export = CatalogPlatformModel; * @property {GetCatalogConfigurationDetailsProduct} [product] */ /** - * @typedef ErrorResponseSchema - * @property {number} [code] - A string representing the specific error code. + * @typedef ErrorResponse + * @property {string} [code] - A string representing the specific error code. * @property {string} [error] - A brief description of the error type. * @property {string} [message] - A detailed message explaining the error. * @property {Object} [meta] - Additional metadata or context about the error, @@ -1245,81 +1087,73 @@ export = CatalogPlatformModel; */ /** * @typedef RawProduct - * @property {Object} [_custom_json] - Custom JSON data for the product. - * @property {number[]} [all_company_ids] - List of company IDs associated with - * the product. - * @property {string[]} [all_identifiers] - List of all identifiers associated - * with the product. - * @property {Object[]} [all_sizes] - List of sizes available for the product. - * @property {Object} [attributes] - Additional attributes for the product. + * @property {Object} [_custom_json] + * @property {number[]} [all_company_ids] + * @property {string[]} [all_identifiers] + * @property {Object[]} [all_sizes] + * @property {Object} [attributes] * @property {Brand} [brand] - * @property {number} [brand_uid] - Unique identifier of the brand. - * @property {Object} [category] - Category details of the product. - * @property {string} [category_slug] - Slug representing the category of the product. - * @property {number} [category_uid] - Unique identifier for the product category. - * @property {number} [company_id] - Unique identifier of the company associated - * with the product. - * @property {string} [country_of_origin] - Country where the product is manufactured. - * @property {Object} [created_by] - Details of the user who created the product. - * @property {string} [created_on] - Timestamp when the product was created. - * @property {string} [currency] - Currency in which the product is priced. - * @property {Object} [custom_order] - Custom order details for the product. - * @property {number[]} [departments] - List of department IDs associated with - * the product. - * @property {string} [description] - Detailed description of the product. - * @property {string[]} [highlights] - List of highlights for the product. - * @property {string} [hsn_code] - HSN code associated with the product for tax purposes. - * @property {string} [id] - Unique identifier of the product. - * @property {string} [image_nature] - Nature or type of product images. - * @property {string[]} [images] - List of image URLs for the product. - * @property {boolean} [is_active] - Indicates whether the product is active. - * @property {boolean} [is_dependent] - Indicates if the product is dependent on - * another product. - * @property {boolean} [is_expirable] - Indicates if the product has an expiration date. - * @property {boolean} [is_image_less_product] - Indicates if the product does - * not have associated images. - * @property {boolean} [is_physical] - Indicates if the product is a physical item. - * @property {boolean} [is_set] - Indicates if the product is part of a set. - * @property {string} [item_code] - Unique code representing the item. - * @property {string} [item_type] - Type of the item, such as 'standard'. - * @property {string[]} [l3_mapping] - L3 category mapping for the product. - * @property {Media[]} [media] - Media associated with the product, such as - * images or videos. - * @property {Object} [modified_by] - Details of the user who last modified the product. - * @property {string} [modified_on] - Timestamp when the product was last modified. - * @property {Object} [moq] - Minimum order quantity details for the product. - * @property {boolean} [multi_size] - Indicates if the product supports multiple sizes. - * @property {string} [name] - Name of the product. - * @property {NetQuantityResponseSchema} [net_quantity] - * @property {number} [no_of_boxes] - Number of boxes required for packaging the product. - * @property {string} [pending] - Pending state of the product, such as pending approval. - * @property {string} [primary_color] - Primary color of the product. - * @property {string[]} [product_group_tag] - Tags associated with the product group. + * @property {number} [brand_uid] + * @property {Object} [category] + * @property {string} [category_slug] + * @property {number} [category_uid] + * @property {string} [color] + * @property {number} [company_id] + * @property {string} [country_of_origin] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {string} [currency] + * @property {Object} [custom_order] + * @property {number[]} [departments] + * @property {string} [description] + * @property {string[]} [highlights] + * @property {string} [hsn_code] + * @property {string} [id] + * @property {string} [image_nature] + * @property {string[]} [images] + * @property {boolean} [is_active] + * @property {boolean} [is_dependent] + * @property {boolean} [is_expirable] + * @property {boolean} [is_image_less_product] + * @property {boolean} [is_physical] + * @property {boolean} [is_set] + * @property {string} [item_code] + * @property {string} [item_type] + * @property {string[]} [l3_mapping] + * @property {Media[]} [media] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {Object} [moq] + * @property {boolean} [multi_size] + * @property {string} [name] + * @property {NetQuantityResponse} [net_quantity] + * @property {number} [no_of_boxes] + * @property {string} [pending] + * @property {string} [primary_color] + * @property {string[]} [product_group_tag] * @property {ProductPublished} [product_publish] - * @property {ReturnConfigResponseSchema} [return_config] - * @property {string} [short_description] - Short description of the product. - * @property {string} [size_guide] - Size guide for the product. - * @property {Object[]} [sizes] - List of available sizes for the product. - * @property {string} [slug] - Unique slug identifier for the product. - * @property {string} [stage] - Current stage of the product (e.g., pending, verified). - * @property {string[]} [tags] - List of tags associated with the product. - * @property {TaxIdentifier} [tax_identifier] - * @property {Object} [teaser_tag] - Teaser tags for the product. - * @property {string} [template_tag] - Template tag associated with the product. - * @property {Trader[]} [trader] - List of traders associated with the product. - * @property {number} [uid] - Unique identifier for the product. - * @property {Object} [variant_group] - Variant group details for the product. - * @property {Object} [variant_media] - Media related to product variants. - * @property {Object} [variants] - Product variants information. + * @property {ReturnConfigResponse} [return_config] + * @property {string} [short_description] + * @property {string} [size_guide] + * @property {Object[]} [sizes] + * @property {string} [slug] + * @property {string} [stage] + * @property {string[]} [tags] + * @property {Object} [tax_identifier] + * @property {Object} [teaser_tag] + * @property {string} [template_tag] + * @property {Trader[]} [trader] + * @property {number} [uid] + * @property {Object} [variant_group] + * @property {Object} [variant_media] + * @property {Object} [variants] * @property {VerifiedBy} [verified_by] - * @property {string} [verified_on] - Timestamp when the product was verified. - * @property {string[]} [store_id_list] - List of store IDs where the product is - * available. - * @property {string} [action] - Action to be performed on the product. + * @property {string} [verified_on] + * @property {string[]} [store_id_list] */ /** - * @typedef RawProductListingResponseSchema - * @property {RawProduct[]} [items] - A list of raw product items. + * @typedef RawProductListingResponse + * @property {RawProduct[]} [items] * @property {Page} [page] */ /** @@ -1330,11 +1164,12 @@ export = CatalogPlatformModel; */ /** * @typedef AttributeDetail - * @property {string[]} [_id] + * @property {string[]} [departments] * @property {string} [description] * @property {AttributeMasterDetails} [details] * @property {boolean} [enabled_for_end_consumer] * @property {AttributeMasterFilter} [filters] + * @property {string} [id] * @property {boolean} [is_nested] * @property {string} [logo] * @property {AttributeMasterMeta} [meta] @@ -1343,41 +1178,18 @@ export = CatalogPlatformModel; * @property {string} [slug] */ /** - * @typedef LatLong - * @property {string} type - Type of coordinate data. - * @property {number[]} coordinates - Array containing longitude and latitude coordinates. - */ -/** - * @typedef ApplicationLocationAddressSchema - * @property {string} [address1] - Primary address line. - * @property {string} [address2] - Secondary address line. - * @property {number} [pincode] - Pincode of the store's location. - * @property {string} [city] - City where the store is located. - * @property {string} [country] - Country where the store is located. - * @property {string} [state] - State where the store is located. - * @property {LatLong} [lat_long] - * @property {string} [country_code] - Country code for the store's location. - * @property {Object} [address_meta] - Schema for address metadata. - */ -/** - * @typedef GetAddressSchema - * @property {string} [address1] - Primary address line, typically including - * street name, building number, or apartment details. - * @property {string} [address2] - Secondary address line, used for additional - * location details such as locality, neighborhood, or landmark. - * @property {string} [address_type] - The type of address. - * @property {string} [city] - The city where the address is located. - * @property {string} [country] - The country where the address is located. - * @property {string} [country_code] - The country code representing the - * country, such as 'IN' for India. - * @property {string} [landmark] - A nearby landmark that helps identify the - * address location. - * @property {number} [latitude] - The latitude coordinate of the address, used - * for geolocation purposes. - * @property {number} [longitude] - The longitude coordinate of the address, - * used for geolocation purposes. - * @property {number} [pincode] - The postal code or ZIP code associated with the address. - * @property {string} [state] - The state or region where the address is located. + * @typedef GetAddressSerializer + * @property {string} [address1] + * @property {string} [address2] + * @property {string} [address_type] + * @property {string} [city] + * @property {string} [country] + * @property {string} [country_code] + * @property {string} [landmark] + * @property {number} [latitude] + * @property {number} [longitude] + * @property {number} [pincode] + * @property {string} [state] */ /** * @typedef GetAllSizes @@ -1402,7 +1214,7 @@ export = CatalogPlatformModel; * @property {string[]} [words] */ /** - * @typedef GetAutocompleteWordsResponseSchema + * @typedef GetAutocompleteWordsResponse * @property {GetAutocompleteWordsData[]} [items] * @property {Page} [page] */ @@ -1420,7 +1232,7 @@ export = CatalogPlatformModel; */ /** * @typedef GetCatalogConfigurationMetaData - * @property {MetaDataListingResponseSchema} [listing] + * @property {MetaDataListingResponse} [listing] * @property {GetCatalogConfigurationDetailsProduct} [product] */ /** @@ -1434,7 +1246,6 @@ export = CatalogPlatformModel; * @property {string} [app_id] - The application ID associated with the collection. * @property {CollectionBadge} [badge] * @property {ImageUrls} [banners] - * @property {Object} [cron] * @property {string} [description] - A description of the collection. * @property {boolean} [is_active] - Indicates whether the collection is currently active. * @property {Media} [logo] @@ -1460,50 +1271,41 @@ export = CatalogPlatformModel; * @property {boolean} [is_visible] - Indicates if the collection is visible. */ /** - * @typedef GetCollectionItemsResponseSchema + * @typedef GetCollectionItemsResponse * @property {ProductFilters[]} [filters] - An array of filters applicable to * the products in the collection. - * @property {ApplicationProductsSchema[]} [items] - An array of products that - * belong to the collection. + * @property {ProductListingDetail[]} [items] - List of product details in the collection. * @property {Page} [page] * @property {ProductSortOn[]} [sort_on] - Sorting options available for the * products in the collection. */ /** - * @typedef GetCollectionListingResponseSchema + * @typedef GetCollectionListingResponse * @property {CollectionListingFilter} [filters] * @property {GetCollectionDetailNest[]} [items] - Array of nested collection details. * @property {Page} [page] */ /** - * @typedef GetCollectionQueryOptionResponseSchema + * @typedef GetCollectionQueryOptionResponse * @property {ProductFilters[]} [filters] * @property {Object} operators * @property {ProductSortOn[]} [sort_on] */ /** - * @typedef GetCompanySchema - * @property {GetAddressSchema[]} [addresses] - List of addresses associated - * with the company. - * @property {string} [business_type] - Specifies the business model or legal - * structure of the company, such as 'LLC', 'Corporation', or 'Proprietorship'. - * @property {string} [company_type] - Indicates the type of company, such as - * 'manufacturer-owner', 'retailer', or 'wholesaler'. - * @property {UserSchema} [created_by] - * @property {string} [created_on] - The date and time when the company record - * was created. - * @property {UserSchema} [modified_by] - * @property {string} [modified_on] - The date and time when the company record - * was last updated. - * @property {string} [name] - The registered name of the company. - * @property {string} [reject_reason] - If applicable, the reason why the - * company's application or status was rejected. - * @property {string} [stage] - Current operational stage of the company, such - * as 'active', 'pending', or 'rejected'. - * @property {number} [uid] - Unique identifier for the company within the system. - * @property {UserSchema} [verified_by] - * @property {string} [verified_on] - The date and time when the company's - * details were verified. + * @typedef GetCompanySerializer + * @property {GetAddressSerializer[]} [addresses] + * @property {string} [business_type] + * @property {string} [company_type] + * @property {UserSerializer2} [created_by] + * @property {string} [created_on] + * @property {UserSerializer2} [modified_by] + * @property {string} [modified_on] + * @property {string} [name] + * @property {string} [reject_reason] + * @property {string} [stage] + * @property {number} [uid] + * @property {UserSerializer2} [verified_by] + * @property {string} [verified_on] */ /** * @typedef ConditionItem @@ -1528,7 +1330,7 @@ export = CatalogPlatformModel; * @property {string} [display] */ /** - * @typedef GetConfigMetadataResponseSchema + * @typedef GetConfigMetadataResponse * @property {ConditionItem[]} [condition] * @property {DataItem[]} data * @property {Page} [page] @@ -1540,127 +1342,93 @@ export = CatalogPlatformModel; * @property {SortTypeItem[]} [sort] */ /** - * @typedef GetConfigResponseSchema - * @property {ConfigItem[]} data + * @typedef GetConfigResponse + * @property {Object[]} data * @property {PageResponseType} page */ -/** - * @typedef ConfigItem - * @property {string} [app_id] - Unique identifier for the application to which - * this configuration belongs. - * @property {AttributeConfig[]} [attributes] - * @property {string} [id] - Unique identifier for the configuration. - * @property {boolean} [is_active] - Indicates if this configuration is - * currently active for the application. - * @property {boolean} [is_default] - Specifies whether this is the default - * configuration for the application. - * @property {string} [name] - The name of the configuration group. - * @property {number} [priority] - The priority of this configuration group. - * @property {string} [slug] - A URL-friendly identifier for the configuration group. - * @property {string[]} [template_slugs] - A list of template slugs associated - * with this configuration. - */ -/** - * @typedef AttributeConfig - * @property {string} [display_type] - The type of display used for the - * attribute (e.g., text, dropdown). - * @property {boolean} [is_active] - Indicates whether the attribute is currently active. - * @property {string} [key] - A unique key or identifier for the attribute. - * @property {string} [name] - The name of the attribute. - * @property {number} [priority] - The priority of the attribute. - * @property {string} [slug] - A URL-friendly identifier for the attribute. - */ /** * @typedef GetDepartment - * @property {RequestUserSchema} [created_by] - * @property {string} [created_on] - Timestamp of when the department was created. - * @property {boolean} [is_active] - Indicates whether the department is currently active. + * @property {RequestUserSerializer} [created_by] + * @property {string} [created_on] + * @property {boolean} [is_active] * @property {string} [item_type] - * @property {string} [logo] - URL of the department's logo. - * @property {RequestUserSchema} [modified_by] - * @property {string} [modified_on] - Timestamp of when the department was last modified. - * @property {string} [id] - Alternate unique identifier for the department. - * @property {string} [name] - Name of the department. - * @property {string} [slug] - URL-friendly slug for the department. - * @property {string[]} [synonyms] - List of alternative names for the department. - * @property {number} [priority_order] - The priority order of the department - * for display purposes. - * @property {number} [uid] - Unique identifier for the department within the system. + * @property {string} [logo] + * @property {RequestUserSerializer} [modified_by] + * @property {string} [modified_on] + * @property {string} [name] + * @property {number} [page_no] + * @property {number} [page_size] + * @property {number} [priority_order] + * @property {string} [search] + * @property {string} [slug] + * @property {string[]} [synonyms] + * @property {number} [uid] */ /** * @typedef GetInventories * @property {InventoryBrandMeta} [brand] * @property {InventoryCompanyMeta} [company] - * @property {string} [country_of_origin] - Country where the product was manufactured. - * @property {RequestUserSchema} [created_by] + * @property {string} [country_of_origin] + * @property {RequestUserSerializer} [created_by] * @property {DateMeta} [date_meta] - * @property {InventoryDimensionResponseSchema} [dimension] - * @property {string} [expiration_date] - Expiration date of the product. - * @property {string} [id] - Unique identifier of the product. - * @property {Identifier} [identifier] - * @property {string} [inventory_updated_on] - The last date when inventory - * information was updated. - * @property {boolean} [is_set] - Indicates if the product is sold as a set. - * @property {number} [item_id] - Unique item ID for the product. - * @property {InventoryManufacturerResponseSchema} [manufacturer] - * @property {RequestUserSchema} [modified_by] - * @property {Object} [platforms] - Indicates platform availability status for - * the product. + * @property {InventoryDimensionResponse} [dimension] + * @property {string} [expiration_date] + * @property {string} [id] + * @property {Object} [identifier] + * @property {string} [inventory_updated_on] + * @property {boolean} [is_set] + * @property {number} [item_id] + * @property {InventoryManufacturerResponse} [manufacturer] + * @property {RequestUserSerializer} [modified_by] + * @property {Object} [platforms] * @property {PriceArticle} [price] * @property {QuantitiesArticle} [quantities] * @property {ReturnConfig} [return_config] - * @property {string} [seller_identifier] - Seller’s identifier for the product. - * @property {string} [size] - Size of the product. - * @property {string} [stage] - Current stage of the product, such as verified or pending. - * @property {ArticleStoreResponseSchema} [store] - * @property {string[]} [tags] - Tags associated with the product. - * @property {TaxIdentifier} [tax_identifier] - * @property {number} [total_quantity] - Total available quantity of the product. - * @property {string} [trace_id] - Trace ID for inventory management. - * @property {boolean} [track_inventory] - Indicates if the inventory is being tracked. - * @property {TraderResponseSchema[]} [trader] - Information about traders, such - * as manufacturers or importers. - * @property {string} [uid] - Unique identifier for the product. - * @property {InventoryWeightResponseSchema} [weight] - */ -/** - * @typedef GetInventoriesResponseSchema - * @property {GetInventories[]} [items] - List of product inventories. + * @property {string} [seller_identifier] + * @property {string} [size] + * @property {string} [stage] + * @property {ArticleStoreResponse} [store] + * @property {string[]} [tags] + * @property {Object} [tax_identifier] + * @property {number} [total_quantity] + * @property {string} [trace_id] + * @property {boolean} [track_inventory] + * @property {TraderResponse[]} [trader] + * @property {string} [uid] + * @property {InventoryWeightResponse} [weight] + */ +/** + * @typedef GetInventoriesResponse + * @property {GetInventories[]} [items] * @property {Page} [page] */ /** - * @typedef GetLocationSchema - * @property {Object} [_custom_json] - Custom JSON data specific to the location. - * @property {GetAddressSchema} address - * @property {string} store_code - Unique identifier code for the store. - * @property {GetCompanySchema} [company] - * @property {SellerPhoneNumber[]} [contact_numbers] - List of contact numbers - * associated with the store. - * @property {UserSchema} [created_by] - * @property {string} [created_on] - Timestamp indicating when the location was created. - * @property {string} display_name - Display name of the location for easier - * identification. - * @property {Document[]} [documents] - Documents related to the store location. - * @property {InvoiceDetailsSchema} [gst_credentials] + * @typedef GetLocationSerializer + * @property {Object} [_custom_json] + * @property {GetAddressSerializer} address + * @property {string} code + * @property {GetCompanySerializer} [company] + * @property {SellerPhoneNumber[]} [contact_numbers] + * @property {UserSerializer3} [created_by] + * @property {string} [created_on] + * @property {string} display_name + * @property {Document[]} [documents] + * @property {InvoiceDetailsSerializer} [gst_credentials] * @property {LocationIntegrationType} [integration_type] - * @property {LocationManagerSchema} [manager] - * @property {UserSchema} [modified_by] - * @property {string} [modified_on] - Timestamp indicating when the location - * details were last modified. - * @property {string} name - Name of the store location. - * @property {string[]} [notification_emails] - Email addresses for sending - * notifications related to this store. - * @property {string} phone_number - Primary phone number for contacting the store. - * @property {ProductReturnConfigSchema} [product_return_config] - * @property {string} [stage] - Current operational stage of the store. - * @property {string} [store_type] - Type of store. - * @property {LocationDayWiseSchema[]} [timing] - The daily operational timings - * for the store. - * @property {number} [uid] - Unique identifier for the store. - * @property {UserSchema} [verified_by] - * @property {string} [verified_on] - Timestamp when the store location was verified. - * @property {Object} [warnings] - Warnings or issues associated with the store, if any. - * @property {number} [company_id] - ID of the company to which this store belongs. + * @property {LocationManagerSerializer} [manager] + * @property {UserSerializer3} [modified_by] + * @property {string} [modified_on] + * @property {string} name + * @property {string[]} [notification_emails] + * @property {string} phone_number + * @property {ProductReturnConfigSerializer} [product_return_config] + * @property {string} [stage] + * @property {string} [store_type] + * @property {LocationDayWiseSerializer[]} [timing] + * @property {number} [uid] + * @property {UserSerializer3} [verified_by] + * @property {string} [verified_on] + * @property {Object} [warnings] */ /** * @typedef GetOptInPlatform @@ -1668,139 +1436,96 @@ export = CatalogPlatformModel; * @property {Page} page */ /** - * @typedef GetProductBundleCreateResponseSchema - * @property {string} choice - Specifies the type of bundle, e.g., single or multi. - * @property {number} [company_id] - Unique identifier for the company that owns - * the product bundle. - * @property {CreatedBy} [created_by] - * @property {string} [created_on] - Timestamp when the product bundle was created. - * @property {string} [id] - Unique identifier for the product bundle. - * @property {boolean} is_active - Indicates if the product bundle is active or not. - * @property {string} [logo] - URL of the product bundle's logo, or null if not available. - * @property {Object} [meta] - Additional metadata about the product bundle. - * @property {ModifiedBy} [modified_by] - * @property {string} [modified_on] - Timestamp when the product bundle was last modified. - * @property {string} name - Name of the product bundle. - * @property {string[]} [page_visibility] - Visibility settings for the product - * bundle across different pages. - * @property {ProductBundleItem[]} products - List of products that are part of - * the product bundle. - * @property {boolean} [same_store_assignment] - Indicates whether all products - * in the bundle belong to the same store. - * @property {string} slug - Unique slug used to identify the product bundle in URLs. - */ -/** - * @typedef GetProductBundleListingResponseSchema - * @property {GetProductBundleCreateResponseSchema[]} [items] - List of product - * bundles that are returned in the response. + * @typedef GetProductBundleCreateResponse + * @property {string} choice + * @property {number} [company_id] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {string} [id] + * @property {boolean} is_active + * @property {string} [logo] + * @property {Object} [meta] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} name + * @property {string[]} [page_visibility] + * @property {ProductBundleItem[]} products + * @property {boolean} [same_store_assignment] + * @property {string} slug + */ +/** + * @typedef GetProductBundleListingResponse + * @property {GetProductBundleCreateResponse[]} [items] * @property {Page} [page] */ /** - * @typedef GetProductBundleResponseSchema - * @property {string} [choice] - Specifies the type of product bundle, e.g., - * 'single' or 'multi'. - * @property {number} [company_id] - The unique identifier of the company that - * owns the product bundle. - * @property {boolean} [is_active] - Indicates whether the product bundle is active. - * @property {string} [logo] - URL of the logo associated with the product bundle. - * @property {Object} [meta] - Additional metadata for the product bundle. - * @property {string} [name] - The name of the product bundle. - * @property {string[]} [page_visibility] - List of pages where the product - * bundle is visible, e.g., 'pdp'. - * @property {GetProducts[]} [products] - A list of products included in the bundle. - * @property {boolean} [same_store_assignment] - Indicates whether all products - * in the bundle are assigned to the same store. - * @property {string} [slug] - Unique URL-friendly identifier for the product bundle. + * @typedef GetProductBundleResponse + * @property {string} [choice] + * @property {number} [company_id] + * @property {boolean} [is_active] + * @property {string} [logo] + * @property {Object} [meta] + * @property {string} [name] + * @property {string[]} [page_visibility] + * @property {GetProducts[]} [products] + * @property {boolean} [same_store_assignment] + * @property {string} [slug] */ /** * @typedef GetProducts - * @property {boolean} [allow_remove] - Indicates whether the product can be - * removed from the bundle. - * @property {boolean} [auto_add_to_cart] - Specifies if the product is - * automatically added to the cart. - * @property {boolean} [auto_select] - Indicates if the product is automatically - * selected in the bundle. - * @property {number} [max_quantity] - The maximum quantity of the product that - * can be added to the bundle. - * @property {number} [min_quantity] - The minimum quantity of the product that - * must be added to the bundle. - * @property {number} [product_uid] - Unique identifier for the product. - * @property {ProductDetails} [product_details] - */ -/** - * @typedef ProductDetails - * @property {string} [slug] - Unique URL-friendly identifier for the product. - * @property {number} [quantity] - The quantity of the product available. - * @property {Object} [attributes] - A set of key-value pairs representing the - * attributes of the product, such as pattern, gender, etc. + * @property {boolean} [allow_remove] + * @property {boolean} [auto_add_to_cart] + * @property {boolean} [auto_select] + * @property {number} [max_quantity] + * @property {number} [min_quantity] * @property {Price} [price] - * @property {string[]} [images] - List of URLs pointing to images of the product. - * @property {number} [uid] - Unique identifier for the product. - * @property {string} [item_code] - Code assigned to the product for inventory purposes. - * @property {Object} [identifier] - Identification details for the product, - * including EANs (European Article Numbers). - * @property {string[]} [sizes] - List of available sizes for the product. - * @property {string} [country_of_origin] - Country where the product was manufactured. - */ -/** - * @typedef GetCollectionDetailResponseSchema - * @property {Object} [_custom_json] - Custom JSON data associated with the collection. - * @property {Object} [_locale_language] - Locale-specific language details. + * @property {LimitedProductData} [product_details] + * @property {number} [product_uid] + * @property {Size[]} [sizes] + */ +/** + * @typedef GetCollectionDetailResponse + * @property {Object} [_custom_json] + * @property {Object} [_locale_language] * @property {CollectionSchedule} [_schedule] - * @property {Object} [action] - Action details, including navigation or page - * redirection information. - * @property {boolean} [allow_facets] - Indicates whether facets are allowed for - * filtering the collection. - * @property {boolean} [allow_sort] - Indicates whether sorting is enabled for - * the collection. - * @property {string} [app_id] - The unique identifier of the application to - * which the collection belongs. + * @property {Object} [action] + * @property {boolean} [allow_facets] + * @property {boolean} [allow_sort] + * @property {string} [app_id] * @property {CollectionBadge} [badge] * @property {ImageUrls} [banners] - * @property {string} [description] - A textual description of the collection. - * @property {boolean} [is_active] - Indicates whether the collection is currently active. - * @property {boolean} [is_visible] - Indicates whether the collection is - * visible on the platform. + * @property {string} [description] + * @property {boolean} [is_active] + * @property {boolean} [is_visible] * @property {Media} [logo] - * @property {Object} [meta] - Metadata associated with the collection. - * @property {string} [name] - The name of the collection. - * @property {number} [priority] - The priority level assigned to the collection. - * @property {boolean} [published] - Indicates whether the collection is - * published and visible to customers. - * @property {CollectionQuery[]} [query] - Query details that define how items - * in the collection are filtered. + * @property {Object} [meta] + * @property {string} [name] + * @property {number} [priority] + * @property {boolean} [published] + * @property {CollectionQuery[]} [query] * @property {SeoDetail} [seo] - * @property {string} [slug] - The URL-friendly slug for the collection. - * @property {string} [sort_on] - The sorting criteria applied to the collection - * (e.g., by latest, discount). - * @property {string[]} [tags] - Tags associated with the collection. - * @property {string} [type] - The type of the collection (e.g., query-based). - * @property {string} [uid] - A unique identifier for the collection. - * @property {string} [_id] - A unique identifier for the collection, matching `uid`. - * @property {string[]} [visible_facets_keys] - Keys representing visible facets - * for filtering. + * @property {string} [slug] + * @property {string} [sort_on] + * @property {string[]} [tags] + * @property {string} [type] + * @property {string} [uid] + * @property {string[]} [visible_facets_keys] */ /** * @typedef CommonResponseSchemaCollection - * @property {string} [message] - A message providing details about the response. + * @property {string} [message] */ /** - * @typedef GetQueryFiltersKeysResponseSchema - * @property {ProductFiltersKeysOnly[]} [filters] - An array of available filter - * keys for querying products. - * @property {Object} operators - A map of available operators that can be used - * for querying, where the key is the operator type and the value is a string. - * @property {ProductSortOn[]} [sort_on] - An array of sorting options available - * for the products. + * @typedef GetQueryFiltersKeysResponse + * @property {ProductFiltersKeysOnly[]} [filters] + * @property {Object} operators + * @property {ProductSortOn[]} [sort_on] */ /** - * @typedef GetQueryFiltersResponseSchema - * @property {CollectionProductFilters[]} [filters] - An array of filters to be - * applied on products while querying. - * @property {Object} operators - A map of operators available for product - * queries, where the key is the operator type and the value is a string. - * @property {CollectionProductSortOn[]} [sort_on] - An array of sorting options - * to be applied to product queries. + * @typedef GetQueryFiltersResponse + * @property {ProductFilters[]} [filters] + * @property {Object} operators + * @property {ProductSortOn[]} [sort_on] */ /** * @typedef GetCollectionItemsResponseSchemaV2 @@ -1821,24 +1546,18 @@ export = CatalogPlatformModel; */ /** * @typedef CollectionItemSchemaV2 - * @property {string} action - Specifies whether the item should be added or - * removed from the collection. - * @property {number} item_id - The unique identifier of the item in the collection. - * @property {number} [priority] - The priority level of the item in the - * collection, with higher values representing higher priority. + * @property {string} action + * @property {number} item_id + * @property {number} [priority] */ /** * @typedef CollectionItemUpdateSchema - * @property {boolean} [allow_facets] - Indicates whether facets are allowed for - * filtering the collection items. - * @property {boolean} [allow_sort] - Indicates whether sorting is enabled for - * the collection items. - * @property {CollectionItemSchemaV2[]} [items] - A list of items in the collection. - * @property {CollectionQuerySchemaV2[]} [query] - A list of query conditions to - * filter the collection items. - * @property {string} type - The type of the collection item, defining its classification. - * @property {string[]} [visible_facets_keys] - A list of keys representing - * visible facets for the collection, used for filtering. + * @property {boolean} [allow_facets] + * @property {boolean} [allow_sort] + * @property {CollectionItemSchemaV2[]} [items] + * @property {CollectionQuerySchemaV2[]} [query] + * @property {string} type + * @property {string[]} [visible_facets_keys] */ /** * @typedef CollectionQuerySchemaV2 @@ -1862,16 +1581,18 @@ export = CatalogPlatformModel; * @property {number} [uid] */ /** - * @typedef GetSearchConfigurationResponseSchema + * @typedef GetSearchConfigurationResponse * @property {string} application_id - The application id where custom search * configuration is set * @property {number} company_id - The company id where custom search configuration is set - * @property {UserSchema} [created_by] - The user who created the search configuration. + * @property {UserSerializer} [created_by] - The user who created the search + * configuration. * @property {string} [created_on] - The date and time when the search * configuration was created. * @property {boolean} [is_proximity_enabled] - Flag indicating if proximity * search is enabled for this attribute. - * @property {UserSchema} [modified_by] - The user who modified the search configuration. + * @property {UserSerializer} [modified_by] - The user who modified the search + * configuration. * @property {string} [modified_on] - The date and time when the search * configuration was last modified. * @property {number} [proximity] - Proximity distance configuration @@ -1888,12 +1609,12 @@ export = CatalogPlatformModel; * @property {string[]} [words] */ /** - * @typedef GetSearchWordsDetailResponseSchema + * @typedef GetSearchWordsDetailResponse * @property {GetSearchWordsData} [items] * @property {Page} [page] */ /** - * @typedef GetSearchWordsResponseSchema + * @typedef GetSearchWordsResponse * @property {GetSearchWordsData[]} [items] * @property {Page} [page] */ @@ -1911,7 +1632,7 @@ export = CatalogPlatformModel; * @property {Meta} [meta] */ /** - * @typedef HSNCodesResponseSchema + * @typedef HSNCodesResponse * @property {HSNData} [data] * @property {string} [message] */ @@ -1920,31 +1641,18 @@ export = CatalogPlatformModel; * @property {string[]} [country_of_origin] * @property {string[]} [hsn_code] */ -/** - * @typedef CreatedBySchema - * @property {string} user_id - The unique identifier for the user who created - * the resource. - * @property {string} username - The username of the user who created the resource. - */ -/** - * @typedef ModifiedBySchema - * @property {string} user_id - The unique identifier for the user who last - * modified the resource. - * @property {string} username - The username of the user who last modified the resource. - */ /** * @typedef HSNDataInsertV2 * @property {string} country_code - Country code. - * @property {CreatedBySchema} [created_by] - * @property {ModifiedBySchema} [modified_by] + * @property {Object} [created_by] - Details of the user who created the HSN data. * @property {string} [created_on] - Date and time when the HSN data was created. * @property {string} description - Description of the HSN data. - * @property {string} hsn_code + * @property {string} hsn_code - HSN code. * @property {string} [hsn_code_id] - Unique identifier of the HSN code. + * @property {Object} [modified_by] - Details of the user who last modified the HSN data. * @property {string} [modified_on] - Date and time when the HSN data was last modified. - * @property {Object} reporting_hsn - HSN code. - * @property {string} [id] - Internal database identifier for the HSN data. - * @property {TaxSlab[]} taxes - List of applicable tax slabs for the HSN data. + * @property {string} reporting_hsn - HSN code. + * @property {TaxSlab[]} taxes - List of tax slabs. * @property {string} type - Type of HSN data (goods or services). */ /** @@ -1963,7 +1671,7 @@ export = CatalogPlatformModel; /** * @typedef HsnCodesListingResponseSchemaV2 * @property {HSNDataInsertV2[]} [items] - * @property {PageResponseSchema} [page] + * @property {PageResponse} [page] */ /** * @typedef HsnCodesObject @@ -1983,7 +1691,7 @@ export = CatalogPlatformModel; /** * @typedef HsnUpsert * @property {number} company_id - The ID of the company. - * @property {string} [hs2_code] - The HS2 code. + * @property {string} hs2_code - The HS2 code. * @property {string} hsn_code - The HSN code. * @property {boolean} [is_active] - Flag indicating whether the entry is active. * @property {number} tax1 - The first tax rate. @@ -2029,7 +1737,7 @@ export = CatalogPlatformModel; * @property {string} store_code */ /** - * @typedef InventoryBulkRequestSchema + * @typedef InventoryBulkRequest * @property {string} batch_id * @property {number} company_id * @property {InventoryJobPayload[]} sizes @@ -2041,7 +1749,7 @@ export = CatalogPlatformModel; * @property {boolean} [multivalues] */ /** - * @typedef InventoryCreateRequestSchema + * @typedef InventoryCreateRequest * @property {string[]} [data] - The list of attributes that you want to extract * in the export job. * @property {InventoryExportFilter} filters - This filters that are applied for @@ -2082,9 +1790,9 @@ export = CatalogPlatformModel; * @property {string} [url] - URL odf the exported file. */ /** - * @typedef InventoryExportJobListResponseSchema - * @property {InventoryJobDetailResponseSchema} items - This is the list/history - * of all the jobs. + * @typedef InventoryExportJobListResponse + * @property {InventoryJobDetailResponse} items - This is the list/history of + * all the jobs. * @property {Page} [page] */ /** @@ -2094,16 +1802,16 @@ export = CatalogPlatformModel; * @property {string} operators - Condition for the quantity that needs to be exported. */ /** - * @typedef InventoryExportRequestSchema + * @typedef InventoryExportRequest * @property {number[]} [brand] * @property {number[]} [store] * @property {string} [type] */ /** - * @typedef InventoryExportResponseSchema + * @typedef InventoryExportResponse * @property {string} [created_by] - The user that created the job. * @property {string} [created_on] - Creation datetime of the job - * @property {Filters} [filters] + * @property {Object} [filters] - The filters that needs to be exported. * @property {string} [modified_on] - Modification date of the job * @property {string[]} [notification_emails] - The notification emails for the job. * @property {number} seller_id - The seller id that needs to be exported. @@ -2117,7 +1825,7 @@ export = CatalogPlatformModel; * @property {string} message - It is the message of the activity performed. */ /** - * @typedef InventoryJobDetailResponseSchema + * @typedef InventoryJobDetailResponse * @property {UserDetail} [cancelled_by] - This is the user detail of the user * who cancelled the job. * @property {string} [cancelled_on] - This is the timestamp of the cacellation @@ -2136,7 +1844,6 @@ export = CatalogPlatformModel; * post completion of the job. * @property {number} seller_id - This ID of the company. * @property {string} [status] - This tells you the current status of the export job. - * @property {Object} [stats] - Provides count of total/success/failed * @property {string} task_id - This is the task id of the jobs that is used for search. * @property {string} [type] - This is the file type of the export. * @property {string} url - This is the url to download the export. @@ -2172,18 +1879,11 @@ export = CatalogPlatformModel; */ /** * @typedef InventoryPage - * @property {boolean} [has_next] - Indicates whether there is a next page of results. - * @property {boolean} [has_previous] - Indicates whether there is a previous - * page of results. - * @property {number} item_total - The total number of items available in the inventory. - * @property {string} [next_id] - The identifier for fetching the next set of - * results. If null, there are no more results. - * @property {string} type - The type of pagination being used, often indicating - * the method or strategy for paginating the results. - */ -/** - * @typedef AddInventoryRequestPayload - * @property {InventoryResponseSchema[]} [sizes] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} item_total + * @property {string} [next_id] + * @property {string} type */ /** * @typedef InventoryPayload @@ -2197,7 +1897,7 @@ export = CatalogPlatformModel; * @property {string} [trace_id] - The trace ID of the inventory payload. */ /** - * @typedef InventoryRequestSchema + * @typedef InventoryRequest * @property {number} company_id * @property {ItemQuery} item * @property {InvSize[]} sizes @@ -2209,37 +1909,20 @@ export = CatalogPlatformModel; * @property {InventoryPayload[]} [payload] - The list of inventory payloads. */ /** - * @typedef InventoryResponseSchema - * @property {string} [currency] - The currency in which the item is priced, e.g., 'INR'. - * @property {Object} [identifiers] - Object containing identifier details such - * as GTIN or SKU codes. - * @property {string} [inventory_updated_on] - The date and time when the - * inventory was last updated, in ISO 8601 format. - * @property {number} [item_id] - The unique identifier for the item in the - * inventory system. - * @property {number} [price] - The original price of the item. - * @property {number} [price_effective] - The effective price of the item after - * any discounts. - * @property {number} [price_transfer] - The transfer price for the item (if applicable). - * @property {number} [quantity] - The total quantity of the item available in - * the inventory. - * @property {number} [sellable_quantity] - The quantity of the item that is - * available for sale. - * @property {string} [seller_identifier] - An identifier for the seller, - * typically an SKU or unique code. - * @property {string} [size] - The size of the item, if applicable. - * @property {Object} [store] - Object containing details about the store where - * the item is stocked. - * @property {string} [uid] - A unique identifier combining store ID and seller - * identifier. - * @property {Object} [created_by] - Details of the user or entity that created - * the item record, including 'username' and 'user_id'. - * @property {Object} [modified_by] - Details of the user or entity that last - * modified the item record, including 'username' and 'user_id'. - * @property {string} [expiration_date] - The expiration date of the item, if - * applicable, in ISO 8601 format. - * @property {string[]} [tags] - An array of tags or labels associated with the - * item for categorization or search purposes. + * @typedef InventoryResponse + * @property {string} [currency] + * @property {Object} [identifiers] + * @property {string} [inventory_updated_on] + * @property {number} [item_id] + * @property {number} [price] + * @property {number} [price_effective] + * @property {number} [price_transfer] + * @property {number} [quantity] + * @property {number} [sellable_quantity] + * @property {string} [seller_identifier] + * @property {string} [size] + * @property {Object} [store] + * @property {string} [uid] */ /** * @typedef InventoryResponseItem @@ -2248,21 +1931,16 @@ export = CatalogPlatformModel; */ /** * @typedef InventoryResponsePaginated - * @property {InventoryResponseSchema[]} [items] + * @property {InventoryResponse[]} [items] * @property {Page} [page] */ /** * @typedef InventorySellerIdentifierResponsePaginated - * @property {InventorySellerResponseSchema[]} [items] - * @property {Page} [page] - */ -/** - * @typedef ApplicationInventorySellerIdentifierResponsePaginated - * @property {InventorySellerResponseSchema[]} [items] + * @property {InventorySellerResponse[]} [items] * @property {Page} [page] */ /** - * @typedef InventorySellerResponseSchema + * @typedef InventorySellerResponse * @property {Object} [_custom_json] - Custom JSON data for the article. * @property {string} [added_on_store] - The date and time when the article was * added to the store. @@ -2270,7 +1948,7 @@ export = CatalogPlatformModel; * @property {CompanyMeta} company - The metadata of the company. * @property {string} country_of_origin - The country of origin of the article. * @property {string} [created_by] - The user who created the article. - * @property {DimensionResponseSchema} dimension - The dimensions of the article. + * @property {DimensionResponse} dimension - The dimensions of the article. * @property {string} [expiration_date] - The expiration date of the article. * @property {boolean} fragile - Indicates if the article is fragile. * @property {string} fynd_article_code - The Fynd article code. @@ -2280,112 +1958,59 @@ export = CatalogPlatformModel; * @property {boolean} [is_active] - Indicates if the article is active. * @property {boolean} [is_set] * @property {number} item_id - The ID of the item. - * @property {ManufacturerResponseSchema} manufacturer - The manufacturer of the article. + * @property {ManufacturerResponse} manufacturer - The manufacturer of the article. * @property {Object} [meta] - Additional metadata for the article. * @property {string} [modified_by] - The user who modified the article. * @property {PriceMeta} price - The price metadata of the article. * @property {Quantities} [quantities] * @property {Object} [raw_meta] - The raw metadata of the article. - * @property {InventoryReturnConfig} [return_config] + * @property {ReturnConfig1} [return_config] - The return configuration of the article. * @property {string} seller_identifier - The seller identifier of the article. * @property {InventorySet} [set] * @property {string} size - The size of the article. * @property {string} [stage] - The stage of the article. * @property {StoreMeta} store - The metadata of the store. * @property {string[]} [tags] - The tags associated with the article. - * @property {TaxIdentifier} [tax_identifier] + * @property {Object} [tax_identifier] - The tax identifier of the article. * @property {number} total_quantity - The total quantity of the article. * @property {string} [trace_id] - The trace ID of the article. * @property {boolean} [track_inventory] - Indicates if the inventory is tracked * for the article. - * @property {Trader[]} [trader] - The traders associated with the article. + * @property {Trader1[]} [trader] - The traders associated with the article. * @property {string} uid - The unique identifier of the article. - * @property {WeightResponseSchema} weight - The weight of the article. - */ -/** - * @typedef ApplicationInventorySellerResponseSchema - * @property {Object} [_custom_json] - Custom JSON data for the article. - * @property {string} [added_on_store] - The date and time when the article was - * added to the store. - * @property {BrandMeta} brand - The metadata of the brand. - * @property {CompanyMeta} company - The metadata of the company. - * @property {string} country_of_origin - The country of origin of the article. - * @property {string} [created_by] - The user who created the article. - * @property {DimensionResponseSchema} dimension - The dimensions of the article. - * @property {string} [expiration_date] - The expiration date of the article. - * @property {boolean} fragile - Indicates if the article is fragile. - * @property {string} fynd_article_code - The Fynd article code. - * @property {string} fynd_item_code - The Fynd item code. - * @property {Object} [fynd_meta] - The Fynd metadata of the article. - * @property {Object} identifier - The identifier of the article. - * @property {boolean} [is_active] - Indicates if the article is active. - * @property {boolean} [is_set] - * @property {number} item_id - The ID of the item. - * @property {ManufacturerResponseSchema} manufacturer - The manufacturer of the article. - * @property {Object} [meta] - Additional metadata for the article. - * @property {string} [modified_by] - The user who modified the article. - * @property {PriceMeta} price - The price metadata of the article. - * @property {Quantities} [quantities] - * @property {Object} [raw_meta] - The raw metadata of the article. - * @property {InventoryReturnConfig} [return_config] - * @property {string} seller_identifier - The seller identifier of the article. - * @property {InventorySet} [set] - * @property {string} size - The size of the article. - * @property {string} [stage] - The stage of the article. - * @property {StoreMeta} store - The metadata of the store. - * @property {string[]} [tags] - The tags associated with the article. - * @property {TaxIdentifier} [tax_identifier] - * @property {number} total_quantity - The total quantity of the article. - * @property {string} [trace_id] - The trace ID of the article. - * @property {boolean} [track_inventory] - Indicates if the inventory is tracked - * for the article. - * @property {Trader[]} [trader] - The traders associated with the article. - * @property {string} uid - The unique identifier of the article. - * @property {WeightResponseSchema} weight - The weight of the article. - * @property {DateMeta} [date_meta] - * @property {Object} [platforms] - Platform-specific availability information. - * @property {number} [price_marked] - Marked price of the item. - * @property {number} [price_effective] - Effective price of the item after discount. - * @property {string} [currency] - Currency in which the prices are listed. - * @property {number} [price_selling] - Selling price of the item. - * @property {Object} [discount_meta] - Discount metadata for the item. - * @property {Object} [discount_applied] - Discounts applied to the item, if any. + * @property {WeightResponse} weight - The weight of the article. */ /** * @typedef InventorySet - * @property {string} [name] - The name of the inventory set. - * @property {number} [quantity] - The quantity of items available in the inventory set. + * @property {string} [name] + * @property {number} [quantity] * @property {SizeDistribution} size_distribution */ /** - * @typedef InventoryStockResponseSchema - * @property {Object[]} [items] - An array of inventory stock items. Each item - * represents a stock entry for a specific product or SKU. + * @typedef InventoryStockResponse + * @property {Object[]} [items] * @property {InventoryPage} page */ /** - * @typedef InventoryUpdateResponseSchema + * @typedef InventoryUpdateResponse * @property {InventoryResponseItem[]} [items] * @property {string} message - It is the success message of the inventory update. - * @property {boolean} [success] - It is the success status of the inventory update. */ /** - * @typedef InventoryValidationResponseSchema + * @typedef InventoryValidationResponse * @property {Object} [data] * @property {string} [message] */ /** - * @typedef InvoiceCredSchema - * @property {boolean} [enabled] - Indicates whether the invoice credentials are - * enabled for use. - * @property {string} [password] - The password associated with the invoice credentials. - * @property {string} [username] - The username or identifier used for the - * invoice credentials. + * @typedef InvoiceCredSerializer + * @property {boolean} [enabled] + * @property {string} [password] + * @property {string} [username] */ /** - * @typedef InvoiceDetailsSchema - * @property {InvoiceCredSchema} [e_invoice] - * @property {InvoiceCredSchema} [e_waybill] + * @typedef InvoiceDetailsSerializer + * @property {InvoiceCredSerializer} [e_invoice] + * @property {InvoiceCredSerializer} [e_waybill] */ /** * @typedef ItemQuery @@ -2428,106 +2053,69 @@ export = CatalogPlatformModel; * @property {string} [slug] * @property {number} [uid] */ -/** - * @typedef SizeGuideItem - * @property {boolean} [active] - Indicates if the size guide is active or not. - * @property {number} [brand_id] - The identifier for the brand associated with - * the size guide. - * @property {number} [company_id] - The identifier for the company that owns - * the size guide. - * @property {CreatedBySchema} [created_by] - * @property {string} [created_on] - The timestamp when the size guide was created. - * @property {Guide} [guide] - * @property {string} [id] - The unique identifier for the size guide. - * @property {ModifiedBySchema} [modified_by] - * @property {string} [modified_on] - The timestamp when the size guide was last modified. - * @property {string} [name] - The name of the size guide. - * @property {string} [subtitle] - A short description or subtitle for the size guide. - * @property {string} [tag] - A tag or identifier used to classify the size guide. - * @property {string} [title] - The title of the size guide. - * @property {string} [description] - A detailed description or HTML content - * providing more information about the size guide. - * @property {string} [image] - A URL to an image associated with the size guide. - */ /** * @typedef ListSizeGuide - * @property {SizeGuideItem[]} [items] - A list of size guides, each containing - * detailed information about a product's dimensions, creation, and modification data. - * @property {PageResponseSchema} [page] + * @property {Object[]} [items] + * @property {Object} [page] */ /** - * @typedef LocationDayWiseSchema - * @property {LocationTimingSchema} [closing] - * @property {boolean} open - Indicates whether the store or location is open on - * the specified day. - * @property {LocationTimingSchema} [opening] - * @property {string} weekday - The day of the week for which the store timings - * are defined. + * @typedef LocationDayWiseSerializer + * @property {LocationTimingSerializer} [closing] + * @property {boolean} open + * @property {LocationTimingSerializer} [opening] + * @property {string} weekday */ /** * @typedef LocationIntegrationType - * @property {string} [inventory] - The system used to manage inventory - * integration for the location. - * @property {string} [order] - The system used to manage order integration for - * the location. + * @property {string} [inventory] + * @property {string} [order] */ /** - * @typedef LocationListSchema - * @property {GetLocationSchema[]} [items] + * @typedef LocationListSerializer + * @property {GetLocationSerializer[]} [items] * @property {Page} [page] */ /** - * @typedef LocationManagerSchema - * @property {string} [email] - Email address of the location manager. + * @typedef LocationManagerSerializer + * @property {string} [email] * @property {SellerPhoneNumber} mobile_no - * @property {string} [name] - Full name of the location manager. + * @property {string} [name] */ /** - * @typedef LocationTimingSchema - * @property {number} [hour] - The hour component of the time, represented in - * 24-hour format. - * @property {number} [minute] - The minute component of the time. + * @typedef LocationTimingSerializer + * @property {number} [hour] + * @property {number} [minute] */ /** * @typedef Logo - * @property {string} [aspect_ratio] - Aspect ratio of the logo image, typically - * expressed as a string (e.g., '16:9'). - * @property {number} [aspect_ratio_f] - Numeric representation of the aspect - * ratio for scaling purposes. - * @property {string} [secure_url] - Secure URL to the logo image. - * @property {string} [url] - URL to the logo image. + * @property {string} [aspect_ratio] + * @property {number} [aspect_ratio_f] + * @property {string} [secure_url] + * @property {string} [url] */ /** * @typedef MOQData - * @property {number} [increment_unit] - The unit by which the quantity can be - * incremented after the minimum order quantity. - * @property {number} [maximum] - The maximum number of units that can be - * ordered for the item. - * @property {number} [minimum] - The minimum number of units required to place - * an order for the item. + * @property {number} [increment_unit] + * @property {number} [maximum] + * @property {number} [minimum] */ /** - * @typedef ManufacturerResponseSchema + * @typedef ManufacturerResponse * @property {string} address - The address of the manufacturer. * @property {boolean} is_default - Indicates if it is the default manufacturer. * @property {string} name - The name of the manufacturer. */ /** - * @typedef InventoryManufacturerResponseSchema + * @typedef InventoryManufacturerResponse * @property {string} [address] * @property {boolean} [is_default] * @property {string} [name] */ /** * @typedef Media - * @property {Object} [meta] - A metadata object containing additional - * information about the media, such as dimensions, format, or other relevant details. - * @property {string} [type] - The type of media. - * @property {string} url - The URL where the media can be accessed. - * @property {string} [alt] - The alternative text for the media, used for - * accessibility and as a fallback when the media cannot be displayed. - * @property {string} [thumbnail] - The URL of the thumbnail image, typically a - * smaller or lower-resolution version of the main media. + * @property {Object} [meta] + * @property {string} [type] + * @property {string} url */ /** * @typedef Media1 @@ -2536,13 +2124,10 @@ export = CatalogPlatformModel; * @property {string} portrait - It is the portrait cdn url for the category. */ /** - * @typedef DepartmentMedia - * @property {string} [aspect_ratio] - The aspect ratio of the media, typically - * represented as width:height (e.g., '16:9'). - * @property {string} [type] - The type of media, such as 'image', 'video', or - * other supported media formats. - * @property {string} [url] - The URL where the media resource is hosted and can - * be accessed. + * @typedef Media2 + * @property {string} [aspect_ratio] + * @property {string} [type] + * @property {string} [url] */ /** * @typedef BrandMedia @@ -2560,29 +2145,29 @@ export = CatalogPlatformModel; * @property {Object[]} [values] */ /** - * @typedef MetaDataListingFilterMetaResponseSchema + * @typedef MetaDataListingFilterMetaResponse * @property {string} [display] * @property {string[]} [filter_types] * @property {string} [key] * @property {Object[]} [units] */ /** - * @typedef MetaDataListingFilterResponseSchema - * @property {MetaDataListingFilterMetaResponseSchema[]} [data] + * @typedef MetaDataListingFilterResponse + * @property {MetaDataListingFilterMetaResponse[]} [data] */ /** - * @typedef MetaDataListingResponseSchema - * @property {MetaDataListingFilterResponseSchema} filter - * @property {MetaDataListingSortResponseSchema} sort + * @typedef MetaDataListingResponse + * @property {MetaDataListingFilterResponse} filter + * @property {MetaDataListingSortResponse} sort */ /** - * @typedef MetaDataListingSortMetaResponseSchema + * @typedef MetaDataListingSortMetaResponse * @property {string} [display] * @property {string} [key] */ /** - * @typedef MetaDataListingSortResponseSchema - * @property {MetaDataListingSortMetaResponseSchema[]} [data] + * @typedef MetaDataListingSortResponse + * @property {MetaDataListingSortMetaResponse[]} [data] */ /** * @typedef MetaFields @@ -2598,9 +2183,9 @@ export = CatalogPlatformModel; * @property {number} [value] - The value of the net quantity of the product. */ /** - * @typedef NetQuantityResponseSchema - * @property {string} [unit] - The unit of measurement for the net quantity. - * @property {number} [value] - The actual quantity of the product in the specified unit. + * @typedef NetQuantityResponse + * @property {string} [unit] + * @property {number} [value] */ /** * @typedef NextSchedule @@ -2608,7 +2193,7 @@ export = CatalogPlatformModel; * @property {string} [start] - The start time of the schedule. */ /** - * @typedef OptInPostRequestSchema + * @typedef OptInPostRequest * @property {number[]} [brand_ids] * @property {number} [company_id] * @property {boolean} [enabled] @@ -2640,23 +2225,17 @@ export = CatalogPlatformModel; * @property {Page} [page] */ /** - * @typedef OwnerAppItemResponseSchema - * @property {Object} [alt_text] - Alternate text associated with the item, - * typically for accessibility purposes. - * @property {boolean} [is_cod] - Indicates whether Cash on Delivery (COD) is - * available for this item. - * @property {boolean} [is_gift] - Indicates whether the item is marked as a gift. - * @property {MOQData} [moq] - Minimum order quantity (MOQ) details for the - * item, including minimum units and increment units. - * @property {SEOData} [seo] - Search Engine Optimization (SEO) related - * information, including title, description, sitemap details, and meta tags. - * @property {Object} [_custom_json] - Custom JSON data for the item, allowing - * flexibility for additional item-specific information. - * @property {MetaFields[]} [_custom_meta] - An array of custom meta fields - * associated with the item for extended metadata. + * @typedef OwnerAppItemResponse + * @property {Object} [alt_text] + * @property {boolean} [is_cod] + * @property {boolean} [is_gift] + * @property {MOQData} [moq] + * @property {SEOData} [seo] + * @property {Object} [_custom_json] - Custom JSON data for the item + * @property {MetaFields[]} [_custom_meta] - Custom meta fields for the item */ /** - * @typedef PTErrorResponseSchema + * @typedef PTErrorResponse * @property {string} [code] * @property {Object} [errors] * @property {string} [message] @@ -2674,8 +2253,8 @@ export = CatalogPlatformModel; * @property {number} [size] - The number of items per page. */ /** - * @typedef PageResponseSchema - * @property {number} [current] - It is the current page of the page response schema. + * @typedef PageResponse + * @property {string} [current] - It is the current page of the page response schema. * @property {boolean} [has_next] - It is the bool indicates if there is a next page. * @property {boolean} [has_previous] - It is the bool indicates if there is a * previous page. @@ -2699,13 +2278,11 @@ export = CatalogPlatformModel; * @property {number} [min_marked] */ /** - * @typedef ProductListingDetailPrice - * @property {string} [currency_code] - The ISO code of the currency in which - * the price is displayed. - * @property {string} [currency_symbol] - The symbol of the currency - * corresponding to the currency code. - * @property {number} [max] - The maximum price for the product. - * @property {number} [min] - The minimum price for the product. + * @typedef Price1 + * @property {string} [currency_code] + * @property {string} [currency_symbol] + * @property {number} [max] + * @property {number} [min] */ /** * @typedef PriceArticle @@ -2725,99 +2302,78 @@ export = CatalogPlatformModel; * @property {string} [updated_at] - The date and time of the last update. */ /** - * @typedef ProdcutTemplateCategoriesResponseSchema - * @property {CategoriesResponseSchema[]} [items] + * @typedef ProdcutTemplateCategoriesResponse + * @property {CategoriesResponse[]} [items] * @property {Page} [page] */ /** * @typedef Product - * @property {Object} [_custom_json] - A custom JSON object that can hold any - * additional key-value pairs specific to the product. - * @property {number[]} [all_company_ids] - List of company IDs associated with - * the product. - * @property {string[]} [all_identifiers] - List of identifiers such as SKU, barcode, etc. - * @property {Object[]} [all_sizes] - List of available sizes for the product. - * @property {Object} [attributes] - Additional attributes of the product such - * as material, color, pattern, etc. + * @property {Object} [_custom_json] + * @property {number[]} [all_company_ids] + * @property {string[]} [all_identifiers] + * @property {Object[]} [all_sizes] + * @property {Object} [attributes] * @property {Brand} [brand] - * @property {number} [brand_uid] - Unique ID of the brand associated with the product. - * @property {Object} [category] - Details about the category the product belongs to. - * @property {string} [category_slug] - Unique slug representing the category. - * @property {number} [category_uid] - Unique ID of the product category. - * @property {string} [color] - Primary color of the product. - * @property {number} [company_id] - ID of the company managing the product. - * @property {string} [country_of_origin] - The country where the product was - * manufactured. - * @property {Object} [created_by] - Details of the user or entity that created - * the product. - * @property {string} [created_on] - Timestamp indicating when the product was created. - * @property {string} [currency] - The currency used for pricing the product. - * @property {Object} [custom_order] - Information related to custom orders, - * including lead time and production details. - * @property {number[]} [departments] - List of department IDs related to the product. - * @property {string} [description] - Full description of the product. - * @property {string[]} [highlights] - List of key highlights of the product. - * @property {string} [hsn_code] - HSN (Harmonized System Nomenclature) code for - * tax classification. - * @property {string} [id] - Unique identifier for the product in the system. - * @property {string} [image_nature] - Nature of the product image, for example, - * 'standard' or 'custom'. - * @property {Image[]} [images] - List of images associated with the product. - * @property {boolean} [is_active] - Indicates whether the product is currently - * active or not. - * @property {boolean} [is_dependent] - Indicates whether the product depends on - * other products for its availability or configuration. - * @property {boolean} [is_expirable] - Indicates if the product has an expiration date. - * @property {boolean} [is_image_less_product] - Indicates if the product does - * not have an image associated. - * @property {boolean} [is_physical] - Specifies if the product is a physical item. - * @property {boolean} [is_set] - Indicates if the product is part of a set. + * @property {number} [brand_uid] + * @property {Object} [category] + * @property {string} [category_slug] + * @property {number} [category_uid] + * @property {string} [color] + * @property {number} [company_id] + * @property {string} [country_of_origin] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {string} [currency] + * @property {Object} [custom_order] + * @property {number[]} [departments] + * @property {string} [description] + * @property {string[]} [highlights] + * @property {string} [hsn_code] + * @property {string} [id] + * @property {string} [image_nature] + * @property {Image[]} [images] + * @property {boolean} [is_active] + * @property {boolean} [is_dependent] + * @property {boolean} [is_expirable] + * @property {boolean} [is_image_less_product] + * @property {boolean} [is_physical] + * @property {boolean} [is_set] * @property {string} [item_code] * @property {string} [item_type] - * @property {string[]} [l3_mapping] - List of category mappings for the product - * (level 3 categories). - * @property {Media[]} [media] - Media objects associated with the product, such - * as videos or additional images. - * @property {Object} [modified_by] - Details of the user or entity that last - * modified the product. - * @property {string} [modified_on] - Timestamp indicating the last time the - * product was modified. - * @property {Object} [moq] - Minimum Order Quantity (MOQ) details for the product. - * @property {string} [name] - Name of the product. - * @property {NetQuantityResponseSchema} [net_quantity] - * @property {number} [no_of_boxes] - Number of boxes required to pack the product. - * @property {string} [pending] - Status indicating if there are pending actions - * or updates required for the product. - * @property {string} [primary_color] - Primary color of the product. - * @property {string[]} [product_group_tag] - Tags for grouping the product in categories. + * @property {string[]} [l3_mapping] + * @property {Media[]} [media] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {Object} [moq] + * @property {boolean} [multi_size] + * @property {string} [name] + * @property {NetQuantityResponse} [net_quantity] + * @property {number} [no_of_boxes] + * @property {string} [pending] + * @property {string} [primary_color] + * @property {string[]} [product_group_tag] * @property {ProductPublished} [product_publish] - * @property {ReturnConfigResponseSchema} [return_config] - * @property {string} [short_description] - A brief description of the product. - * @property {string} [size_guide] - Link or identifier for the product's size guide. - * @property {Object[]} [sizes] - List of available sizes for the product along - * with pricing and identifier information. - * @property {string} [slug] - URL slug for the product page. - * @property {string} [stage] - The current stage of the product in the system - * workflow (e.g., pending, verified). - * @property {string[]} [tags] - Tags or keywords associated with the product - * for search and categorization. - * @property {TaxIdentifier} [tax_identifier] - * @property {Object} [teaser_tag] - A short promotional tag or label for the product. - * @property {string} [template_tag] - Tag representing the template used for - * the product listing. - * @property {Trader[]} [trader] - List of traders or sellers associated with the product. - * @property {number} [uid] - Unique identifier for the product. - * @property {Object} [variant_group] - Details about the product's variant - * grouping (e.g., color or size variants). - * @property {Object} [variant_media] - Media associated with specific variants - * of the product. - * @property {Object} [variants] - Details about the product's available variants. + * @property {ReturnConfigResponse} [return_config] + * @property {string} [short_description] + * @property {string} [size_guide] + * @property {Object[]} [sizes] + * @property {string} [slug] + * @property {string} [stage] + * @property {string[]} [tags] + * @property {Object} [tax_identifier] + * @property {Object} [teaser_tag] + * @property {string} [template_tag] + * @property {Trader[]} [trader] + * @property {number} [uid] + * @property {Object} [variant_group] + * @property {Object} [variant_media] + * @property {Object} [variants] * @property {VerifiedBy} [verified_by] - * @property {string} [verified_on] - Timestamp indicating when the product was verified. + * @property {string} [verified_on] */ /** - * @typedef ProductAttributesResponseSchema - * @property {AttributeMasterSchema[]} items + * @typedef ProductAttributesResponse + * @property {AttributeMasterSerializer[]} items */ /** * @typedef ProductBrand @@ -2834,7 +2390,7 @@ export = CatalogPlatformModel; * @property {Object} user */ /** - * @typedef ProductBulkRequestSchema + * @typedef ProductBulkRequest * @property {number} [cancelled] * @property {Object[]} [cancelled_records] * @property {number} [company_id] @@ -2854,69 +2410,49 @@ export = CatalogPlatformModel; */ /** * @typedef ProductBulkRequestList - * @property {Object} [items] + * @property {ProductBulkRequest[]} [items] * @property {Page} [page] */ /** * @typedef ProductBundleItem - * @property {boolean} [allow_remove] - Indicates whether the product can be - * removed from the bundle. - * @property {boolean} [auto_add_to_cart] - Specifies if the product is - * automatically added to the cart. - * @property {boolean} [auto_select] - Indicates if the product is automatically - * selected in the bundle. - * @property {number} max_quantity - Maximum quantity of the product that can be - * added to the bundle. - * @property {number} min_quantity - Minimum quantity of the product that must - * be added to the bundle. - * @property {number} product_uid - Unique identifier for the product. - */ -/** - * @typedef ProductBundleRequestSchema - * @property {string} choice - Specifies the type of product bundle (e.g., - * 'single' or 'multi'). - * @property {number} [company_id] - The unique identifier of the company to - * which the product bundle belongs. - * @property {Object} [created_by] - Information about the user who created the - * product bundle, including user ID and username. - * @property {string} [created_on] - The timestamp when the product bundle was created. - * @property {boolean} is_active - Indicates whether the product bundle is - * currently active. - * @property {string} [logo] - URL of the logo associated with the product - * bundle, if available. Can be null. - * @property {Object} [meta] - Additional metadata for the product bundle. - * @property {Object} [modified_by] - Information about the user who last - * modified the product bundle, including user ID and username. - * @property {string} [modified_on] - The timestamp when the product bundle was - * last modified. - * @property {string} name - The name of the product bundle. - * @property {string[]} [page_visibility] - Pages where the product bundle is - * visible (e.g., 'pdp' for product display page). - * @property {ProductBundleItem[]} products - A list of products included in the - * bundle. A maximum of 10 products can be added. - * @property {boolean} [same_store_assignment] - Indicates whether all products - * in the bundle are assigned to the same store. - * @property {string} slug - A URL-friendly unique identifier for the product bundle. - */ -/** - * @typedef ProductBundleUpdateRequestSchema - * @property {string} choice - Specifies the type of product bundle (e.g., - * 'single' or 'multi'). - * @property {number} [company_id] - The unique identifier of the company to - * which the product bundle belongs. - * @property {boolean} is_active - Indicates whether the product bundle is - * currently active. - * @property {string} [logo] - URL of the logo associated with the product - * bundle, if available. Can be null. - * @property {Object} [meta] - Additional metadata for the product bundle. - * @property {string} name - The name of the product bundle. - * @property {string[]} [page_visibility] - Pages where the product bundle is - * visible (e.g., 'pdp' for product display page). - * @property {ProductBundleItem[]} products - A list of products included in the - * bundle. A maximum of 10 products can be added. - * @property {boolean} [same_store_assignment] - Indicates whether all products - * in the bundle are assigned to the same store. - * @property {string} slug - A URL-friendly unique identifier for the product bundle. + * @property {boolean} [allow_remove] + * @property {boolean} [auto_add_to_cart] + * @property {boolean} [auto_select] + * @property {number} max_quantity + * @property {number} min_quantity + * @property {number} product_uid + */ +/** + * @typedef ProductBundleRequest + * @property {string} choice + * @property {number} [company_id] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {boolean} is_active + * @property {string} [logo] + * @property {Object} [meta] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} name + * @property {string[]} [page_visibility] + * @property {ProductBundleItem[]} products + * @property {boolean} [same_store_assignment] + * @property {string} slug + */ +/** + * @typedef ProductBundleUpdateRequest + * @property {string} choice + * @property {number} [company_id] + * @property {boolean} is_active + * @property {string} [logo] + * @property {Object} [meta] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} name + * @property {string[]} [page_visibility] + * @property {ProductBundleItem[]} products + * @property {boolean} [same_store_assignment] + * @property {string} slug */ /** * @typedef ProductConfigurationDownloads @@ -2925,131 +2461,99 @@ export = CatalogPlatformModel; */ /** * @typedef ProductCreateUpdateSchemaV2 - * @property {Object} [_custom_json] - Custom JSON data that can be used for - * additional product properties. - * @property {string} [action] - The action to perform wrt to the product (e.g., - * upsert, update, delete). - * @property {Object} [attributes] - Additional attributes related to the product. - * @property {number} brand_uid - Unique identifier for the product's brand. - * @property {string} [bulk_job_id] - Job ID associated with bulk operations. - * @property {string} category_slug - The category to which the product belongs. - * @property {string} [change_request_id] - Change request identifier for product updates. - * @property {number} company_id - Unique identifier for the company associated - * with the product. - * @property {string} country_of_origin - The country where the product was - * manufactured or sourced. - * @property {string} currency - The currency in which the product's price is listed. + * @property {Object} [_custom_json] + * @property {string} [action] + * @property {Object} [attributes] + * @property {number} brand_uid + * @property {string} [bulk_job_id] + * @property {string} category_slug + * @property {string} [change_request_id] + * @property {number} company_id + * @property {string} country_of_origin + * @property {string} currency * @property {CustomOrder} [custom_order] - * @property {number[]} departments - List of department IDs associated with the product. - * @property {string} [description] - A detailed description of the product. - * @property {string[]} [highlights] - Product highlights or key features. - * @property {boolean} [is_active] - Flag to indicate if the product is active. - * @property {boolean} [is_dependent] - Flag to indicate if the product is - * dependent on other products. - * @property {boolean} [is_image_less_product] - Flag to indicate if the product - * does not have associated images. - * @property {boolean} [is_set] - Flag to indicate if the product is part of a set. - * @property {string} item_code - Unique item code or SKU of the product. - * @property {string} item_type - Type of the product (e.g., standard, set, - * composite, digital). - * @property {Media[]} [media] - List of media URLs (images, videos) associated - * with the product. - * @property {boolean} [multi_size] - Indicates if the product supports multiple sizes. - * @property {string} name - The name of the product. + * @property {number[]} departments + * @property {string} [description] + * @property {string[]} [highlights] + * @property {boolean} [is_active] + * @property {boolean} [is_dependent] + * @property {boolean} [is_image_less_product] + * @property {boolean} [is_set] + * @property {string} item_code + * @property {string} item_type + * @property {Media[]} [media] + * @property {boolean} [multi_size] + * @property {string} name * @property {NetQuantity} [net_quantity] - * @property {number} [no_of_boxes] - Number of boxes required to package the product. - * @property {string[]} [product_group_tag] - Tags to group products together - * for classification. - * @property {ProductPublish} [product_publish] - * @property {string} [requester] - The role requesting the product operation - * (admin or user). + * @property {number} [no_of_boxes] + * @property {string[]} [product_group_tag] + * @property {ProductPublish1} [product_publish] + * @property {string} [requester] * @property {ReturnConfig} return_config - * @property {string} [short_description] - A short description of the product, - * up to 50 characters. - * @property {string} [size_guide] - Identifier for the product's size guide. - * @property {Object[]} sizes - List of sizes available for the product. - * @property {string} slug - URL-friendly identifier for the product. - * @property {string[]} [tags] - List of tags associated with the product. + * @property {string} [short_description] + * @property {string} [size_guide] + * @property {Object[]} sizes + * @property {string} slug + * @property {string[]} [tags] * @property {TaxIdentifier} tax_identifier * @property {TeaserTag} [teaser_tag] - * @property {string} template_tag - Template tag for the product, used for - * classification. - * @property {Trader[]} trader - List of traders associated with the product. - * @property {number} [uid] - Unique identifier for the product. - * @property {Object} [variant_group] - Variant group information for the product. - * @property {Object} [variant_media] - Media related to product variants. - * @property {Object} [variants] - Variants information for the product. + * @property {string} template_tag + * @property {Trader[]} trader + * @property {number} [uid] + * @property {Object} [variant_group] + * @property {Object} [variant_media] + * @property {Object} [variants] */ /** * @typedef ProductDetail - * @property {Object} [attributes] - Key-value pairs representing various - * product attributes. + * @property {Object} [attributes] * @property {ProductBrand} [brand] - * @property {string} [description] - Detailed description of the product. - * @property {ProductDetailGroupedAttribute[]} [grouped_attributes] - Grouped - * attributes of the product, such as product details and specifications. - * @property {boolean} [has_variant] - Indicates whether the product has variants. - * @property {string[]} [highlights] - Array of highlight features for the product. - * @property {string} [image_nature] - The nature of the product's images. - * @property {string} [item_code] - Unique item code for the product. - * @property {string} [item_type] - Type of the item. - * @property {Media[]} [medias] - Array of media objects such as images and - * videos for the product. - * @property {string} [name] - Name of the product. - * @property {string} [product_online_date] - Date when the product was made - * available online. - * @property {Object} [promo_meta] - Promotional metadata associated with the product. - * @property {number} [rating] - Average rating of the product. - * @property {number} [rating_count] - Total number of ratings for the product. - * @property {string} [short_description] - A brief description of the product. - * @property {string[]} [similars] - Array of similar products. - * @property {string} slug - Unique slug for the product, used in URLs. - * @property {Object} [teaser_tag] - Teaser tag information related to the product. - * @property {string[]} [tryouts] - Array of product tryout options. - * @property {string} [type] - The type of item. - * @property {number} [uid] - Unique identifier for the product. - * @property {string} [country_of_origin] - Country where the product was manufactured. - * @property {ApplicationProductCategoryItem[]} [categories] - Array of - * categories the product belongs to. - * @property {string[]} [tags] - Array of tags associated with the product. - * @property {number} [no_of_boxes] - Number of boxes required for packaging the product. - * @property {CustomOrder} [custom_order] + * @property {string} [color] + * @property {string} [description] + * @property {ProductDetailGroupedAttribute[]} [grouped_attributes] + * @property {boolean} [has_variant] + * @property {string[]} [highlights] + * @property {string} [image_nature] + * @property {string} [item_code] + * @property {string} [item_type] + * @property {Media[]} [medias] + * @property {string} [name] + * @property {string} [product_online_date] + * @property {Object} [promo_meta] + * @property {number} [rating] + * @property {number} [rating_count] + * @property {string} [short_description] + * @property {string[]} [similars] + * @property {string} slug + * @property {Object} [teaser_tag] + * @property {string[]} [tryouts] + * @property {string} [type] + * @property {number} [uid] */ /** * @typedef ProductDetailAttribute - * @property {string} [key] - The name or key of the attribute. - * @property {string} [type] - The type of the attribute. - * @property {string} [value] - The value of the attribute corresponding to the key. + * @property {string} [key] + * @property {string} [type] + * @property {string} [value] */ /** * @typedef ProductDetailGroupedAttribute - * @property {ProductDetailAttribute[]} [details] - An array of individual - * product attributes belonging to this group. - * @property {string} [title] - The title or category name for the grouped attributes. + * @property {ProductDetailAttribute[]} [details] + * @property {string} [title] */ /** - * @typedef ProductDownloadsResponseSchema - * @property {ProductTemplateExportResponseSchema[]} [items] - The items of the job. + * @typedef ProductDownloadsResponse + * @property {ProductTemplateExportResponse[]} [items] - The items of the job. * @property {Page} [page] */ -/** - * @typedef CollectionProductFilters - * @property {ProductFiltersKey} key - * @property {CollectionProductFiltersValue[]} values - A list of possible - * values corresponding to the filter key. These values can be selected for - * filtering products. - */ /** * @typedef ProductFilters * @property {ProductFiltersKey} key - * @property {ProductFiltersValue[]} values - A list of possible values - * corresponding to the filter key. These values can be selected for filtering - * products. + * @property {ProductFiltersValue[]} values */ /** - * @typedef GetQueryFiltersValuesResponseSchema - * @property {ProductQueryFiltersValue[]} values - A list of filter values that - * can be used for querying products. + * @typedef GetQueryFiltersValuesResponse + * @property {ProductFiltersValue[]} values * @property {Page} page */ /** @@ -3058,255 +2562,63 @@ export = CatalogPlatformModel; */ /** * @typedef ProductFiltersKey - * @property {string} display - The display name of the filter key, used for - * showing on the UI. - * @property {string} [kind] - The kind or type of filter, defining the category - * of the filter. - * @property {string} [logo] - A URL to the logo associated with the filter key. - * @property {string} name - The name of the filter key, used in the query. - * @property {string[]} [operators] - A list of supported operators for this filter key. - */ -/** - * @typedef ProductQueryFiltersValue - * @property {string} [display] - The human-readable name of the category to be displayed. - * @property {number} [count] - The number of items or products associated with - * this category. - * @property {boolean} [is_selected] - Indicates whether this category is - * currently selected by the user. - * @property {string} [value] - The internal value or identifier representing - * this category. - * @property {string} [logo] - URL of the logo image associated with the category. - */ -/** - * @typedef CollectionProductFiltersValue - * @property {string} display - Display name of the filter value. - * @property {number} [count] - The number of products that match this filter value. - * @property {boolean} is_selected - Indicates whether the filter value is - * currently selected by the user. - * @property {string} value - The actual value for the filter, used in filtering queries. - * @property {Object} [logo] + * @property {string} display + * @property {string} [kind] + * @property {string} [logo] + * @property {string} name + * @property {string[]} [operators] */ /** * @typedef ProductFiltersValue - * @property {number} [count] - The number of products that match this filter value. - * @property {string} [currency_code] - The currency code used if the filter is - * related to price. - * @property {string} [currency_symbol] - The symbol of the currency used in - * price-related filters. - * @property {string} display - The human-readable label for this filter value. - * @property {string} [display_format] - A format string that controls how the - * value is displayed, commonly used for numeric or price ranges. - * @property {boolean} is_selected - Indicates whether this filter value is - * currently selected by the user. - * @property {number} [max] - The maximum value for a range filter (e.g., price range). - * @property {number} [min] - The minimum value for a range filter (e.g., price range). - * @property {string} [query_format] - The format string used in the query for - * filtering by this value. - * @property {number} [selected_max] - The maximum value selected by the user in - * a range filter. - * @property {number} [selected_min] - The minimum value selected by the user in - * a range filter. - * @property {Object} value - The actual value of the filter. - */ -/** - * @typedef CollectionProductListingDetail - * @property {Object} [attributes] - Additional attributes for the product. - * @property {ProductBrand} [brand] - * @property {string} [color] - Color of the product. - * @property {string} [description] - Detailed description of the product. - * @property {string} [discount] - Discount information for the product. - * @property {ProductDetailGroupedAttribute[]} [grouped_attributes] - Grouped - * attributes of the product. - * @property {boolean} [has_variant] - Indicates if the product has variants. - * @property {string[]} [highlights] - List of key highlights for the product. - * @property {string} [image_nature] - Nature or type of image associated with - * the product. - * @property {string} [item_code] - Unique code for the product item. - * @property {string} [item_type] - Type of the product item, e.g., 'standard' - * or 'custom'. - * @property {Media[]} [medias] - List of media files (e.g., images) associated - * with the product. - * @property {string} [name] - Name of the product. - * @property {ProductListingPrice} [price] - * @property {string} [product_online_date] - The date when the product became - * available online. - * @property {Object} [promo_meta] - Promotional metadata for the product. - * @property {number} [rating] - Average rating for the product. - * @property {number} [rating_count] - Number of users who have rated the product. - * @property {boolean} [sellable] - Indicates if the product is sellable. - * @property {string} [short_description] - Short description of the product. - * @property {string[]} [similars] - List of similar products. - * @property {string} slug - Slug or URL-friendly identifier for the product. - * @property {Object} [teaser_tag] - Teaser tag for the product. - * @property {string[]} [tryouts] - List of tryouts or tests associated with the product. - * @property {string} [type] - Type of the product, e.g., 'product' or 'variant'. - * @property {number} [uid] - Unique identifier for the product. - * @property {ProductCategory[]} [categories] - List of categories associated - * with the product. - * @property {Object[]} [_custom_meta] - Custom metadata related to the product. - * @property {Action} [action] - * @property {number} [discount_percentage] - Discount percentage on the product. - * @property {boolean} [is_tryout] - Indicates if the product is available for tryout. - * @property {number[]} [all_company_ids] - List of company IDs associated with - * the product. - * @property {boolean} [is_custom_order] - Indicates if the product is a custom order. - * @property {string[]} [collections] - List of collection IDs the product belongs to. - * @property {number} [popularity] - Popularity score of the product. - * @property {number} [brand_uid] - Unique identifier of the brand. - * @property {number} [category_uid] - Unique identifier of the category. - * @property {string} [verification_status] - Verification status of the product. - * @property {string} [channel_identifier] - Identifier for the sales channel. - * @property {string} [category_slug] - Slug identifier for the category. - * @property {string} [size_guide] - Size guide information for the product. - * @property {string} [created_on] - Timestamp when the product was created. - * @property {string} [modified_on] - Timestamp when the product was last modified. - * @property {number[]} [l3_categories] - List of L3 categories associated with - * the product. - * @property {number[]} [store_ids] - List of store IDs where the product is available. - * @property {number[]} [company_ids] - List of company IDs associated with the product. - * @property {number[]} [departments] - List of departments associated with the product. - * @property {string[]} [tags] - List of tags associated with the product. - * @property {string[]} [l3_category_names] - List of L3 category names. - * @property {string[]} [sizes] - List of available sizes for the product. - * @property {string[]} [product_group_tag] - Tags related to the product group. - * @property {boolean} [multi_size] - Indicates if the product is available in - * multiple sizes. - * @property {boolean} [is_gift] - Indicates if the product is giftable. - * @property {boolean} [is_cod] - Indicates if the product is eligible for cash - * on delivery. - * @property {boolean} [is_dependent] - Indicates if the product is dependent on - * other products. - * @property {boolean} [is_available] - Indicates if the product is currently available. - * @property {NetQuantity} [net_quantity] - * @property {ApplicationItemSEO} [seo] - * @property {ApplicationItemMOQ} [moq] - * @property {CustomOrder} [custom_order] - * @property {string} [country_of_origin] - Country of origin of the product. - * @property {Object} [_custom_json] - Custom JSON data for additional configurations. - * @property {Object[]} [multi_categories] - Details of multiple categories - * associated with the product. - * @property {Object} [variant_media] - Variant-specific media associated with - * the product. - * @property {Object} [variant_group] - Group of variant-specific attributes. - * @property {string[]} [identifiers] - Identifiers associated with the product. - * @property {number} [no_of_boxes] - Number of boxes required for the product. - * @property {string} [template_tag] - Template tag associated with the product. - */ -/** - * @typedef ProductCategory - * @property {number} [id] - Unique identifier of the category. - * @property {number} [uid] - Unique identifier of the category UID. - * @property {string} [name] - Name of the category. - * @property {string} [slug] - Slug identifier for the category. - * @property {Logo} [logo] - * @property {Action} [action] - * @property {Object} [_custom_json] - Custom JSON data for the category. - */ -/** - * @typedef ApplicationCategoryAction - * @property {CategoryPageAction} [page] - * @property {string} [type] - The type of action to be performed, such as - * navigation to a category or product. - */ -/** - * @typedef ApplicationCategoryItem - * @property {Object} [_custom_json] - Custom JSON data related to the category. - * @property {ApplicationCategoryAction} [action] - * @property {number} [id] - The unique identifier for the category item. - * @property {CategoryImage} [logo] - * @property {string} [name] - The name of the category. - * @property {number} [uid] - A unique identifier for the category item. - */ -/** - * @typedef ApplicationProductMedia - * @property {string} [type] - Type of the media (e.g., image, video). - * @property {string} [url] - URL of the media item. - */ -/** - * @typedef ApplicationProductCategoryItem - * @property {number} [id] - Unique identifier of the category. - * @property {number} [uid] - Unique identifier of the category (UID). - * @property {string} [name] - Name of the category. - * @property {string} [slug] - Slug or unique key for the category. - * @property {ApplicationProductMedia} [logo] - * @property {PageAction} [action] - */ -/** - * @typedef CategoryPageAction - * @property {CategoryQuery} [query] - * @property {string} [type] - The type of page action, defining what should - * happen when a category is selected. - */ -/** - * @typedef CategoryQuery - * @property {string[]} [category] - */ -/** - * @typedef CategoryImage - * @property {string} [type] - The type of image, typically 'image'. - * @property {string} [url] - The URL of the category image. + * @property {number} [count] + * @property {string} [currency_code] + * @property {string} [currency_symbol] + * @property {string} display + * @property {string} [display_format] + * @property {boolean} is_selected + * @property {number} [max] + * @property {number} [min] + * @property {string} [query_format] + * @property {number} [selected_max] + * @property {number} [selected_min] + * @property {Object} value */ /** * @typedef ProductListingDetail - * @property {Object} [attributes] - Additional product attributes, which vary by product. + * @property {Object} [attributes] * @property {ProductBrand} [brand] - * @property {string} [description] - A detailed description of the product. - * @property {string} [discount] - Any discount information applicable to the product. - * @property {ProductDetailGroupedAttribute[]} [grouped_attributes] - A list of - * grouped product attributes. - * @property {boolean} [has_variant] - Indicates whether the product has - * variants such as different sizes or colors. - * @property {string[]} [highlights] - Key highlights of the product. - * @property {string} [image_nature] - The type of product image, such as - * 'lifestyle' or 'catalog'. - * @property {string} [item_code] - The unique code or identifier for the product. - * @property {string} [item_type] - The type of item'. - * @property {Media[]} [medias] - A list of media (images or videos) associated - * with the product. - * @property {string} [name] - The name of the product. + * @property {string} [color] + * @property {string} [description] + * @property {string} [discount] + * @property {ProductDetailGroupedAttribute[]} [grouped_attributes] + * @property {boolean} [has_variant] + * @property {string[]} [highlights] + * @property {string} [image_nature] + * @property {string} [item_code] + * @property {string} [item_type] + * @property {Media[]} [medias] + * @property {string} [name] * @property {ProductListingPrice} [price] - * @property {string} [product_online_date] - The date and time when the product - * was made available online. - * @property {Object} [promo_meta] - Promotional metadata associated with the product. - * @property {number} [rating] - The average rating of the product. - * @property {number} [rating_count] - The number of ratings received for the product. - * @property {boolean} [sellable] - Indicates if the product is currently sellable. - * @property {string} [short_description] - A brief description of the product. - * @property {string[]} [similars] - A list of similar products. - * @property {string} [slug] - The unique URL-friendly identifier for the product. - * @property {Object} [teaser_tag] - Teaser tags for the product, if any. - * @property {string[]} [tryouts] - A list of tryout options for the product. - * @property {string} [type] - The type of product. - * @property {number} [uid] - The unique identifier for the product. - * @property {ApplicationCategoryItem[]} [categories] - A list of categories - * associated with the product. - * @property {string[]} [_custom_meta] - Custom metadata for the product. - * @property {PageAction} [action] - * @property {boolean} [is_tryout] - Indicates if the product is available for tryout. - * @property {number[]} [all_company_ids] - A list of company IDs that sell this product. - * @property {boolean} [is_custom_order] - Indicates if the product is - * custom-made or requires a custom order. - * @property {string[]} [collections] - A list of collections the product belongs to. - */ -/** - * @typedef ActionObject - * @property {string} [type] - The type of action to be performed, such as - * navigating to a product or category. - * @property {Object} [query] - The query parameters associated with the action. - */ -/** - * @typedef PageAction - * @property {ActionObject} [page] - * @property {string} [type] - The type of page action to be performed. + * @property {string} [product_online_date] + * @property {Object} [promo_meta] + * @property {number} [rating] + * @property {number} [rating_count] + * @property {boolean} [sellable] + * @property {string} [short_description] + * @property {string[]} [similars] + * @property {string} slug + * @property {Object} [teaser_tag] + * @property {string[]} [tryouts] + * @property {string} [type] + * @property {number} [uid] */ /** * @typedef ProductListingPrice * @property {Price1} [effective] * @property {Price1} [marked] - * @property {Price1} [selling] */ /** - * @typedef ProductListingResponseSchema + * @typedef ProductListingResponse * @property {Product[]} [items] * @property {Page} [page] */ @@ -3320,143 +2632,91 @@ export = CatalogPlatformModel; * @property {boolean} [is_set] * @property {string} [product_online_date] */ +/** + * @typedef ProductPublish1 + * @property {boolean} [is_set] + * @property {string} [product_online_date] + */ /** * @typedef ProductPublished - * @property {boolean} [is_set] - Indicates whether the product is part of a set. - * @property {number} [product_online_date] - Timestamp when the product is - * scheduled to go live online. + * @property {boolean} [is_set] + * @property {number} [product_online_date] */ /** - * @typedef ProductReturnConfigSchema - * @property {boolean} [on_same_store] - Indicates if the product return is - * allowed only at the same store where it was purchased. - * @property {number} [store_uid] - Unique identifier for the store where the - * product can be returned. + * @typedef ProductReturnConfigSerializer + * @property {boolean} [on_same_store] + * @property {number} [store_uid] */ /** - * @typedef ProductReturnConfigBaseSchema + * @typedef ProductReturnConfigBaseSerializer * @property {boolean} returnable - Boolean Flag for item returnable * @property {number} time - Valid return time for an item * @property {string} unit - Unit of return config days|hours */ -/** - * @typedef Identifier - * @property {boolean} [primary] - Indicates if this is the primary identifier - * for the size. - * @property {string} [gtin_value] - The GTIN (Global Trade Item Number) value - * for the size. - * @property {string} [gtin_type] - The type of GTIN (e.g., SKU code, UPC, EAN). - */ -/** - * @typedef SizeDetails - * @property {string} [size] - Size identifier for the product (e.g., "S", "M", "L"). - * @property {number} [store_count] - The number of stores that have this size available. - * @property {number} [sellable_quantity] - Quantity of the product that is - * sellable in this size. - * @property {boolean} [sellable] - Indicates if this size is currently sellable. - * @property {number} [size_priority] - The priority of the size for display purposes. - * @property {Identifier[]} [identifiers] - List of identifiers (e.g., SKU - * codes, GTINs) associated with the size. - * @property {Object} [price] - * @property {string} [seller_identifier] - Seller-specific identifier for this size. - * @property {number} [price_transfer] - Price transfer value for this size, - * typically used in business transactions. - * @property {boolean} [track_inventory] - Indicates if inventory is being - * tracked for this size. - */ /** * @typedef ProductSchemaV2 - * @property {Object} [_custom_json] - Custom JSON data specific to the product, - * used for storing additional information. - * @property {number[]} [all_company_ids] - List of company IDs associated with - * the product. - * @property {string[]} [all_identifiers] - List of unique product identifiers - * such as SKU codes or GTINs. - * @property {Object[]} [all_sizes] - Details of all available sizes for the - * product, including pricing and inventory information. - * @property {Object} [attributes] - Additional attributes specific to the product. + * @property {Object} [_custom_json] + * @property {number[]} [all_company_ids] + * @property {string[]} [all_identifiers] + * @property {Object[]} [all_sizes] + * @property {Object} [attributes] * @property {Brand} [brand] - * @property {number} [brand_uid] - Unique identifier for the brand. - * @property {Object} [category] - Object representing the category to which the - * product belongs. - * @property {string} [category_slug] - Slug representation of the product - * category for SEO purposes. - * @property {number} [category_uid] - Unique identifier for the product category. - * @property {string} [color] - Primary color of the product. - * @property {number} [company_id] - Identifier for the company managing the product. - * @property {string} [country_of_origin] - Country where the product was - * manufactured or sourced. - * @property {Object} [created_by] - Object containing details about the user - * who created the product. - * @property {string} [currency] - The currency in which the product is priced - * (e.g., "INR"). - * @property {Object} [custom_order] - Information about custom order options - * for the product, including manufacturing time. - * @property {number[]} [departments] - List of department IDs associated with - * the product. - * @property {string} [description] - Long description of the product. - * @property {string[]} [highlights] - Key features or highlights of the product. - * @property {string} [hsn_code] - Harmonized System Nomenclature (HSN) code for - * taxation purposes. - * @property {string} [id] - Unique identifier of the product in the database. - * @property {string} [image_nature] - Describes the nature of the product - * images (e.g., "standard"). - * @property {Image[]} [images] - List of image URLs associated with the product. - * @property {boolean} [is_active] - Indicates whether the product is currently - * active or not. - * @property {boolean} [is_dependent] - Indicates if the product depends on - * other products (e.g., part of a set). - * @property {boolean} [is_expirable] - Indicates whether the product has an expiry date. - * @property {boolean} [is_image_less_product] - Indicates if the product does - * not have associated images. - * @property {boolean} [is_physical] - Indicates if the product is a physical - * item (as opposed to a digital product). - * @property {boolean} [is_set] - Indicates if the product is a set of items - * rather than a single item. - * @property {string} [item_code] - Unique code used to identify the product, - * often used internally or by sellers. - * @property {string} [item_type] - Describes the type of product (e.g., - * "standard" or "set"). - * @property {string[]} [l3_mapping] - Hierarchical mapping of the product to - * categories (e.g., "electronics>qled_television"). - * @property {Media[]} [media] - Media assets associated with the product, such - * as images or videos. - * @property {Object} [modified_by] - Object containing details about the user - * who last modified the product. - * @property {string} [modified_on] - The timestamp when the product was last modified. - * @property {Object} [moq] - Minimum order quantity details for the product. - * @property {boolean} [multi_size] - Indicates if the product is available in - * multiple sizes. - * @property {string} [name] - Name of the product. - * @property {NetQuantityResponseSchema} [net_quantity] - * @property {number} [no_of_boxes] - Number of boxes required to pack the product. - * @property {string} [pending] - Pending status related to product availability - * or verification. - * @property {string} [primary_color] - The primary color of the product. - * @property {string[]} [product_group_tag] - Tags associated with the product grouping. + * @property {number} [brand_uid] + * @property {Object} [category] + * @property {string} [category_slug] + * @property {number} [category_uid] + * @property {string} [color] + * @property {number} [company_id] + * @property {string} [country_of_origin] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {string} [currency] + * @property {Object} [custom_order] + * @property {number[]} [departments] + * @property {string} [description] + * @property {string[]} [highlights] + * @property {string} [hsn_code] + * @property {string} [id] + * @property {string} [image_nature] + * @property {Image[]} [images] + * @property {boolean} [is_active] + * @property {boolean} [is_dependent] + * @property {boolean} [is_expirable] + * @property {boolean} [is_image_less_product] + * @property {boolean} [is_physical] + * @property {boolean} [is_set] + * @property {string} [item_code] + * @property {string} [item_type] + * @property {string[]} [l3_mapping] + * @property {Media[]} [media] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {Object} [moq] + * @property {boolean} [multi_size] + * @property {string} [name] + * @property {NetQuantityResponse} [net_quantity] + * @property {number} [no_of_boxes] + * @property {string} [pending] + * @property {string} [primary_color] + * @property {string[]} [product_group_tag] * @property {ProductPublish} [product_publish] - * @property {ReturnConfigResponseSchema} [return_config] - * @property {string} [short_description] - Short description of the product, - * typically used in product listings. - * @property {string} [size_guide] - Reference to the size guide for the - * product, if applicable. - * @property {SizeDetails[]} [sizes] - List of size details for the product. - * @property {string} [slug] - URL-friendly version of the product name for SEO purposes. - * @property {string} [stage] - Current stage of the product (e.g., "pending", - * "verified"). - * @property {string[]} [tags] - Tags associated with the product for - * categorization and search purposes. - * @property {TaxIdentifier} [tax_identifier] - * @property {Object} [teaser_tag] - Teaser tags used for marketing the product - * (e.g., "new arrival"). - * @property {string} [template_tag] - Product template tag (e.g., "television"). - * @property {Trader[]} [trader] - List of traders or sellers associated with the product. - * @property {number} [uid] - Unique identifier of the product. - * @property {Object} [variant_group] - Grouping of product variants. - * @property {Object} [variant_media] - Media information for product variants. - * @property {Object} [variants] - List of product variants. + * @property {ReturnConfigResponse} [return_config] + * @property {string} [short_description] + * @property {string} [size_guide] + * @property {Object[]} [sizes] + * @property {string} [slug] + * @property {string} [stage] + * @property {string[]} [tags] + * @property {Object} [tax_identifier] + * @property {Object} [teaser_tag] + * @property {string} [template_tag] + * @property {Trader[]} [trader] + * @property {number} [uid] + * @property {Object} [variant_group] + * @property {Object} [variant_media] + * @property {Object} [variants] * @property {VerifiedBy} [verified_by] - * @property {string} [verified_on] - Timestamp when the product was verified. + * @property {string} [verified_on] */ /** * @typedef ProductSize @@ -3464,84 +2724,55 @@ export = CatalogPlatformModel; * @property {number} min */ /** - * @typedef ProductSizeDeleteDataResponseSchema - * @property {number} [company_id] - The unique identifier for the company that - * manages the product. - * @property {number} [item_id] - The unique identifier for the specific item - * from which the size is being deleted. - * @property {string} [size] - The size being deleted from the product. - */ -/** - * @typedef ProductSizeDeleteResponseSchema - * @property {ProductSizeDeleteDataResponseSchema} [data] - * @property {boolean} [success] - Indicates whether the size deletion operation - * was successful. + * @typedef ProductSizeDeleteDataResponse + * @property {number} [company_id] + * @property {number} [item_id] + * @property {string} [size] */ /** - * @typedef CollectionProductSortOn - * @property {boolean} [is_selected] - Indicates whether this sorting option is - * currently applied. - * @property {string} [name] - Display name of the sorting option. - * @property {string} [value] - Technical value of the sorting option used in queries. - * @property {string} [logo] - URL to the logo image representing the sorting option. + * @typedef ProductSizeDeleteResponse + * @property {ProductSizeDeleteDataResponse} [data] + * @property {boolean} [success] */ /** * @typedef ProductSortOn - * @property {boolean} [is_selected] - Indicates whether this sorting option is - * currently selected. - * @property {string} [name] - The display name of the sorting option, used to - * show on the UI. - * @property {string} [value] - The value representing the sorting option. - */ -/** - * @typedef ProductTagsViewResponseSchema - * @property {string[]} [items] - An array of product tag strings representing - * various tags associated with the products. - */ -/** - * @typedef CreatedBy - * @property {string} [user_id] - Unique identifier for the user. - * @property {string} [username] - Username of the user who created the product. + * @property {boolean} [is_selected] + * @property {string} [name] + * @property {string} [value] */ /** - * @typedef ModifiedBy - * @property {string} [user_id] - Unique identifier for the user who modified the entity. - * @property {string} [username] - Username of the user who last modified the entity. + * @typedef ProductTagsViewResponse + * @property {string[]} [items] */ /** * @typedef ProductTemplate - * @property {string[]} [attributes] - List of attributes associated with the - * product template. - * @property {string[]} [categories] - List of categories the product template belongs to. - * @property {CreatedBy} [created_by] - * @property {string} [created_on] - Timestamp of when the product template was created. - * @property {string[]} [departments] - List of departments the product template - * is associated with. - * @property {string} [description] - Detailed description of the product template. - * @property {boolean} [is_active] - Indicates if the product template is - * currently active. - * @property {boolean} [is_archived] - Indicates if the product template is archived. - * @property {boolean} is_expirable - Indicates if the product template is expirable. - * @property {boolean} is_physical - Indicates if the product template - * represents a physical product. - * @property {string} [logo] - URL of the product template logo. - * @property {ModifiedBy} [modified_by] - * @property {string} [modified_on] - Timestamp of when the product template was - * last modified. - * @property {string} [name] - The name of the product template. - * @property {string} slug - Unique URL-friendly identifier for the product template. + * @property {string[]} [attributes] + * @property {string[]} [categories] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {string[]} [departments] + * @property {string} [description] + * @property {boolean} [is_active] + * @property {boolean} [is_archived] + * @property {boolean} is_expirable + * @property {boolean} is_physical + * @property {string} [logo] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} [name] + * @property {string} slug * @property {string} [tag] */ /** * @typedef ProductTemplateDownloadsExport - * @property {ProductTemplateExportFilterRequestSchema} [filters] - This is the + * @property {ProductTemplateExportFilterRequest} [filters] - This is the * filters of the file for the export. * @property {string[]} [notification_emails] - The list of the emails to be * notified after the completion of the job. * @property {string} [type] - This is the type of the file for the export. */ /** - * @typedef ProductTemplateExportFilterRequestSchema + * @typedef ProductTemplateExportFilterRequest * @property {string[]} [brands] - The list of the brands that needs to be exported. * @property {string[]} catalogue_types - The list of the type of the catalog * such as set, standard and composite. @@ -3552,9 +2783,9 @@ export = CatalogPlatformModel; * to be exported. */ /** - * @typedef ProductTemplateExportResponseSchema + * @typedef ProductTemplateExportResponse * @property {string} [completed_on] - Completion datetime of the job - * @property {UserInfo} [created_by] + * @property {UserInfo1} [created_by] - The user that created the job. * @property {Object} [filters] - The filters that needs to be exported. * @property {string} [modified_on] - Modification date of the job * @property {string[]} [notification_emails] - The notification emails for the job. @@ -3566,22 +2797,17 @@ export = CatalogPlatformModel; */ /** * @typedef ProductVariants - * @property {number} [brand_uid] - Unique identifier for the brand associated - * with the product variant. - * @property {number} [category_uid] - Unique identifier for the category to - * which the product variant belongs. - * @property {string} [item_code] - Code that uniquely identifies the specific - * product variant. - * @property {Media[]} [media] - Array of media objects representing images, - * videos, or other media associated with the product variant. - * @property {string} [name] - Name of the product variant. - * @property {number} [uid] - Unique identifier for the product variant. - */ -/** - * @typedef ProductVariantsResponseSchema + * @property {number} [brand_uid] + * @property {number} [category_uid] + * @property {string} [item_code] + * @property {Media[]} [media] + * @property {string} [name] + * @property {number} [uid] + */ +/** + * @typedef ProductVariantsResponse * @property {Page} [page] - * @property {ProductVariants[]} [variants] - A list of product variants - * returned in the response. + * @property {ProductVariants[]} [variants] */ /** * @typedef Properties @@ -3646,7 +2872,7 @@ export = CatalogPlatformModel; * @property {string} unit */ /** - * @typedef InventoryReturnConfig + * @typedef ReturnConfig1 * @property {boolean} [returnable] - Indicates if the item is returnable. * @property {number} [time] - The return time in days or hours. * @property {string} [unit] - The unit of return time. @@ -3658,11 +2884,10 @@ export = CatalogPlatformModel; * @property {string} [unit] */ /** - * @typedef ReturnConfigResponseSchema - * @property {boolean} [returnable] - Indicates if the product is eligible for return. - * @property {number} [time] - The duration within which the product can be returned. - * @property {string} [unit] - The time unit for the return duration, e.g., - * 'days' or 'hours'. + * @typedef ReturnConfigResponse + * @property {boolean} [returnable] + * @property {number} [time] + * @property {string} [unit] */ /** * @typedef Sitemap @@ -3672,46 +2897,27 @@ export = CatalogPlatformModel; * @property {string} [frequency] - How frequently the content at the URL is * likely to change. */ -/** - * @typedef PageQuery - * @property {string[]} [brand] - List of brands being filtered by the query. - */ -/** - * @typedef ApplicationCollectionItemSeoPage - * @property {Object} [params] - Any parameters associated with the page. - * @property {PageQuery} [query] - * @property {string} [type] - The type of page. - * @property {string} [url] - The URL for the page. - */ -/** - * @typedef ApplicationCollectionItemSeoAction - * @property {string} [type] - The type of action, typically 'page'. - * @property {ApplicationCollectionItemSeoPage} [page] - */ /** * @typedef ApplicationItemSeoAction - * @property {Object} [page] - * @property {string} type + * @property {Object} [page] - Details of the page associated with this SEO action. + * @property {string} type - Type of action, such as navigation or redirection. */ /** * @typedef ApplicationItemSeoBreadcrumbs - * @property {string} [url] - * @property {ApplicationItemSeoAction[]} [action] - */ -/** - * @typedef ApplicationCollectionItemSeoBreadcrumbs * @property {string} [url] - The URL that this breadcrumb points to. - * @property {ApplicationCollectionItemSeoAction} [action] + * @property {ApplicationItemSeoAction[]} [action] - The actions available for + * this breadcrumb, defining what happens when it's clicked or interacted with. */ /** * @typedef ApplicationItemSeoMetaTagItem - * @property {string} key - * @property {string} value + * @property {string} key - The name of the meta tag. + * @property {string} value - The value associated with the meta tag. */ /** * @typedef ApplicationItemSeoMetaTags - * @property {string} title - * @property {ApplicationItemSeoMetaTagItem[]} [items] + * @property {string} title - The title for this set of meta tags. + * @property {ApplicationItemSeoMetaTagItem[]} [items] - A list of meta tag + * items, each defined by key-value pairs. */ /** * @typedef Metatags @@ -3721,24 +2927,17 @@ export = CatalogPlatformModel; */ /** * @typedef SizePromotionThreshold - * @property {string} [threshold_type] - The type of threshold that applies to - * the size promotion, such as 'quantity' or 'value'. - * @property {number} [threshold_value] - The value of the threshold required to - * trigger the promotion, such as a minimum number of units. + * @property {string} [threshold_type] + * @property {number} [threshold_value] */ /** * @typedef SEOData - * @property {string} [description] - A brief description of the item, primarily - * used for SEO purposes. - * @property {string} [title] - The title of the item, primarily used for SEO - * and displayed in search engine results. + * @property {string} [description] + * @property {string} [title] * @property {Sitemap} [sitemap] - * @property {ApplicationItemSeoBreadcrumbs[]} [breadcrumbs] - An ordered list - * of links showing the hierarchy of the page, aiding navigation and SEO. - * @property {Metatags[]} [meta_tags] - A list of meta tags for the item, used - * for SEO optimization. - * @property {string} [canonical_url] - The canonical URL for the item, - * indicating the preferred URL for search engines to avoid duplicate content. + * @property {ApplicationItemSeoBreadcrumbs[]} [breadcrumbs] + * @property {Metatags[]} [meta_tags] + * @property {string} [canonical_url] */ /** * @typedef SearchKeywordResult @@ -3769,29 +2968,11 @@ export = CatalogPlatformModel; */ /** * @typedef SellerPhoneNumber - * @property {number} country_code - The country code for the phone number, - * typically represented as an integer (e.g., 91 for India). - * @property {string} number - The phone number associated with the seller, - * without the country code. + * @property {number} country_code + * @property {string} number */ /** - * @typedef CollectionSeoDetail - * @property {string} [description] - SEO meta description for the item or - * collection. This is used to describe the content for search engines. - * @property {string} [title] - SEO meta title for the item or collection. It is - * used as the title that appears in search results. - * @property {Sitemap} [sitemap] - * @property {ApplicationCollectionItemSeoBreadcrumbs[]} [breadcrumbs] - List of - * breadcrumbs for navigation, showing the hierarchy of pages leading to the - * current page. - * @property {Metatags[]} [meta_tags] - An array of meta tags, each containing - * key-value pairs for various SEO meta tags used to enhance search visibility. - * @property {string} [canonical_url] - The canonical URL for the item or - * collection, which tells search engines the preferred version of the URL to - * avoid duplicate content issues. - */ -/** - * @typedef SeoDetail + * @typedef SeoDetail * @property {string} [description] - SEO meta description for the item or * collection. This is used to describe the content for search engines. * @property {string} [title] - SEO meta title for the item or collection. It is @@ -3809,15 +2990,15 @@ export = CatalogPlatformModel; */ /** * @typedef SetSize - * @property {number} pieces - Number of pieces in the set. - * @property {string} size - Size of the item in the set. + * @property {number} pieces + * @property {string} size */ /** - * @typedef SingleCategoryResponseSchema + * @typedef SingleCategoryResponse * @property {Category} [data] */ /** - * @typedef SingleProductResponseSchema + * @typedef SingleProductResponse * @property {ProductSchemaV2} [data] */ /** @@ -3832,30 +3013,23 @@ export = CatalogPlatformModel; * @property {SetSize[]} sizes */ /** - * @typedef SizeGuideResponseSchema - * @property {boolean} [active] - Indicates whether the size guide is currently active. - * @property {number} [brand_id] - The unique identifier for the brand - * associated with the size guide. - * @property {number} [company_id] - The unique identifier for the company that - * owns the size guide. - * @property {CreatedBySchema} [created_by] - * @property {string} [created_on] - The timestamp when the size guide was - * created, in ISO 8601 format. - * @property {Object} [guide] - The main content of the size guide, containing - * details such as the size measurements, headers, and units. - * @property {string} [id] - The public identifier of the size guide. - * @property {string} [image] - A URL pointing to an image associated with the size guide. - * @property {ModifiedBySchema} [modified_by] - * @property {string} [modified_on] - The timestamp when the size guide was last - * modified, in ISO 8601 format. - * @property {string} [name] - The name or title of the size guide. - * @property {string} [subtitle] - A short description or subtitle of the size guide. - * @property {string} [tag] - A tag or label associated with the size guide, - * used for categorization or reference. - * @property {string} [title] - The main title of the size guide. - */ -/** - * @typedef StoreAssignResponseSchema + * @typedef SizeGuideResponse + * @property {boolean} [active] + * @property {number} [brand_id] + * @property {number} [company_id] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {Object} [guide] + * @property {string} [id] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} [name] + * @property {string} [subtitle] + * @property {string} [tag] + * @property {string} [title] + */ +/** + * @typedef StoreAssignResponse * @property {string} [_id] * @property {ArticleAssignment1} article_assignment * @property {number} [company_id] @@ -3892,10 +3066,10 @@ export = CatalogPlatformModel; */ /** * @typedef StoreMeta - * @property {number} id - The unique identifier of the store. + * @property {number} id */ /** - * @typedef SuccessResponseSchema + * @typedef SuccessResponse * @property {boolean} [success] */ /** @@ -3912,10 +3086,10 @@ export = CatalogPlatformModel; */ /** * @typedef TaxSlab - * @property {number} [cess] - Cess rate applicable for the tax slab. - * @property {string} effective_date - The date from which the tax slab becomes effective. - * @property {number} rate - Applicable tax rate. - * @property {number} threshold - Threshold value above which the tax slab applies. + * @property {number} [cess] + * @property {string} effective_date + * @property {number} rate + * @property {number} threshold */ /** * @typedef TeaserTag @@ -3938,26 +3112,18 @@ export = CatalogPlatformModel; * @property {string} slug * @property {string} [tag] */ -/** - * @typedef TemplateGlobalValidationData - * @property {GlobalValidation} [global_validation] - */ /** * @typedef TemplateValidationData * @property {GlobalValidation} [global_validation] * @property {Object} [template_validation] */ /** - * @typedef TemplatesResponseSchema - * @property {ProductTemplate[]} [items] - List of product templates. + * @typedef TemplatesResponse + * @property {ProductTemplate} [items] * @property {Page} [page] */ /** - * @typedef TemplatesGlobalValidationResponseSchema - * @property {TemplateGlobalValidationData} [data] - */ -/** - * @typedef TemplatesValidationResponseSchema + * @typedef TemplatesValidationResponse * @property {TemplateValidationData} [data] * @property {TemplateDetails} [template_details] */ @@ -3976,9 +3142,9 @@ export = CatalogPlatformModel; */ /** * @typedef Trader - * @property {string[]} [address] - List of addresses associated with the trader. - * @property {string} name - The name of the trader. - * @property {string} [type] - The role or type of the trader. + * @property {string[]} [address] + * @property {string} name + * @property {string} [type] */ /** * @typedef Trader1 @@ -3987,60 +3153,50 @@ export = CatalogPlatformModel; * @property {string} type */ /** - * @typedef TraderResponseSchema + * @typedef TraderResponse * @property {string[]} [address] * @property {string} [name] * @property {string} [type] */ /** * @typedef UpdateCollection - * @property {Object} [_custom_json] - Custom JSON object containing additional - * metadata specific to the collection. - * @property {Object} [_locale_language] - Locale-based language settings for - * the collection. + * @property {Object} [_custom_json] + * @property {Object} [_locale_language] * @property {CollectionSchedule} [_schedule] - * @property {boolean} [allow_facets] - Indicates whether facets are allowed for - * filtering items in the collection. - * @property {boolean} [allow_sort] - Specifies whether sorting is allowed for - * items within the collection. + * @property {boolean} [allow_facets] + * @property {boolean} [allow_sort] * @property {CollectionBadge} [badge] * @property {CollectionBanner} [banners] - * @property {string} [description] - A brief description of the collection. - * @property {boolean} [is_active] - Indicates if the collection is active and - * visible to users. - * @property {boolean} [is_visible] - Specifies whether the collection is - * visible to users on the platform. + * @property {string} [description] + * @property {boolean} [is_active] + * @property {boolean} [is_visible] * @property {CollectionImage} [logo] - * @property {Object} [meta] - Additional metadata related to the collection. + * @property {Object} [meta] * @property {UserInfo} [modified_by] - * @property {string} [name] - The name of the collection. - * @property {number} [priority] - Priority level of the collection, determining - * its order in listings. - * @property {boolean} [published] - Indicates whether the collection is - * published and accessible to the public. - * @property {CollectionQuery[]} [query] - List of query filters that define - * which items are included in the collection. - * @property {CollectionSeoDetail} [seo] - * @property {string} [slug] - A unique identifier used to reference the - * collection in URLs. - * @property {string} [sort_on] - The field by which items in the collection are - * sorted (e.g., popular, latest). - * @property {string[]} [tags] - List of tags associated with the collection. - * @property {string} [type] - The type of collection, either 'items' or 'query'. - * @property {string[]} [visible_facets_keys] - Keys for facets that are visible - * to users for filtering items in the collection. + * @property {string} [name] + * @property {number} [priority] + * @property {boolean} [published] + * @property {CollectionQuery[]} [query] + * @property {SeoDetail} [seo] + * @property {string} [slug] + * @property {string} [sort_on] + * @property {string[]} [tags] + * @property {string} [type] + * @property {string[]} [visible_facets_keys] */ /** - * @typedef UpdateSearchConfigurationRequestSchema + * @typedef UpdateSearchConfigurationRequest * @property {string} application_id - The application id where custom search * configuration is set * @property {number} company_id - The company id where custom search configuration is set - * @property {UserSchema} [created_by] - The user who created the search configuration. + * @property {UserSerializer} [created_by] - The user who created the search + * configuration. * @property {string} [created_on] - The date and time when the search * configuration was created. * @property {boolean} [is_proximity_enabled] - Flag indicating if proximity * search is enabled for this attribute. - * @property {UserSchema} [modified_by] - The user who modified the search configuration. + * @property {UserSerializer} [modified_by] - The user who modified the search + * configuration. * @property {string} [modified_on] - The date and time when the search * configuration was last modified. * @property {number} [proximity] - Proximity distance configuration @@ -4048,11 +3204,11 @@ export = CatalogPlatformModel; * attributes defined on the application. */ /** - * @typedef UpdateSearchConfigurationResponseSchema + * @typedef UpdateSearchConfigurationResponse * @property {boolean} [success] */ /** - * @typedef CreateMarketplaceOptinResponseSchema + * @typedef CreateMarketplaceOptinResponse * @property {number[]} [store_ids] * @property {number[]} [brand_ids] * @property {number} [company_id] @@ -4084,33 +3240,49 @@ export = CatalogPlatformModel; */ /** * @typedef UserInfo + * @property {string} [email] + * @property {string} [uid] + * @property {string} [user_id] + * @property {string} [username] + */ +/** + * @typedef UserInfo1 * @property {string} [email] - The email address of the user. * @property {string} [uid] - The unique ID of the user. * @property {string} [user_id] - The ID of the user. * @property {string} [username] - The username of the user. */ /** - * @typedef UserSchema + * @typedef UserSerializer * @property {string} [contact] - The contact information of the user. * @property {string} [user_id] - The unique ID of the user. * @property {string} [username] - The username of the user. */ /** - * @typedef RequestUserSchema + * @typedef RequestUserSerializer * @property {string} [_id] * @property {string} [contact] * @property {string} [uid] * @property {string} [user_id] * @property {string} [username] */ +/** + * @typedef UserSerializer2 + * @property {string} [contact] + * @property {string} [user_id] + * @property {string} [username] + */ +/** + * @typedef UserSerializer3 + * @property {string} [contact] + * @property {string} [user_id] + * @property {string} [username] + */ /** * @typedef ValidateIdentifier - * @property {string} gtin_type - The type of the identifier (e.g., GTIN-12, - * GTIN-13, UPC) used to categorize the format of the identifier. - * @property {string} gtin_value - The actual value of the identifier (e.g., the - * numeric or alphanumeric code representing the product). - * @property {boolean} [primary] - A flag indicating whether this identifier is - * the primary one for the product. + * @property {string} gtin_type + * @property {string} gtin_value + * @property {boolean} [primary] */ /** * @typedef ValidateProduct @@ -4118,46 +3290,43 @@ export = CatalogPlatformModel; */ /** * @typedef ValidateSizeGuide - * @property {boolean} [active] - Indicates whether the size guide is currently active. - * @property {number} [brand_id] - The unique identifier for the brand - * associated with the size guide. - * @property {string} [company_id] - The unique identifier for the company that - * owns the size guide. - * @property {Object} [created_by] - Information about the user who created the - * size guide. - * @property {string} [created_on] - The timestamp when the size guide was - * created, in ISO 8601 format. - * @property {string} [description] - A detailed HTML description of the size guide. + * @property {boolean} [active] + * @property {number} [brand_id] + * @property {number} [company_id] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {string} [description] * @property {Guide} [guide] - * @property {string} [id] - The public identifier of the size guide. - * @property {string} [image] - A URL pointing to an image associated with the size guide. - * @property {Object} [modified_by] - Information about the user who last - * modified the size guide. - * @property {string} [modified_on] - The timestamp when the size guide was last - * modified, in ISO 8601 format. - * @property {string} name - The name of the size guide. - * @property {string} [subtitle] - A short description or subtitle of the size guide. - * @property {string} [tag] - A tag or label associated with the size guide, - * used for categorization or reference. - * @property {string} title - The main title of the size guide. + * @property {string} [id] + * @property {string} [image] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} name + * @property {string} [subtitle] + * @property {string} [tag] + * @property {string} title */ /** * @typedef VerifiedBy - * @property {string} [user_id] - The unique identifier of the user who verified - * the product. - * @property {string} [username] - The username of the user who verified the product. + * @property {string} [user_id] + * @property {string} [username] */ /** - * @typedef WeightResponseSchema + * @typedef WeightResponse * @property {boolean} is_default - Indicates if it is the default weight. * @property {number} shipping - The shipping weight. * @property {string} unit - The unit of weight. */ /** - * @typedef InventoryWeightResponseSchema + * @typedef InventoryWeightResponse * @property {number} [shipping] * @property {string} [unit] */ +/** + * @typedef CreatedBy + * @property {string} [username] + * @property {string} [user_id] + */ /** * @typedef Marketplaces * @property {number[]} [brand_ids] @@ -4179,7 +3348,7 @@ export = CatalogPlatformModel; * @property {Page} [page] */ /** - * @typedef UpdateMarketplaceOptinRequestSchema + * @typedef UpdateMarketplaceOptinRequest * @property {number[]} [brand_ids] * @property {number} [company_id] * @property {boolean} [enabled] @@ -4188,7 +3357,7 @@ export = CatalogPlatformModel; * @property {number[]} [store_ids] */ /** - * @typedef UpdateMarketplaceOptinResponseSchema + * @typedef UpdateMarketplaceOptinResponse * @property {number[]} [brand_ids] * @property {number} [company_id] * @property {string} [app_id] @@ -4199,17 +3368,6 @@ export = CatalogPlatformModel; * @property {CreatedBy} [created_by] * @property {CreatedBy} [modified_by] */ -/** - * @typedef Filters - * @property {string[]} [brands] - The list of all the brands selected. - * @property {string} [from_date] - The modified-on date from which the data - * needs to be exported. - * @property {InventoryExportQuantityFilter} [quantity] - The quantity range - * that needs to be exported. - * @property {string[]} [stores] - The list of all the stores selected. - * @property {string} [to_date] - The modified-on date till when the data needs - * to be exported. - */ /** * @typedef ActionPage * @property {Object} [params] - Parameters that should be considered in path. @@ -4217,39 +3375,6 @@ export = CatalogPlatformModel; * @property {string} [url] - The URL for the action. * @property {PageType} type */ -/** - * @typedef Price1 - * @property {CurrencyCodeEnum} [currency_code] - * @property {string} [currency_symbol] - * @property {number} [max] - * @property {number} [min] - */ -/** - * @typedef MultiCategoriesSchema - * @property {number} [l1] - The ID of the Level 1 (L1) category of the product. - * @property {number} [l2] - The ID of the Level 2 (L2) category of the product. - * @property {number} [l3] - The ID of the Level 3 (L3) category of the product. - * @property {boolean} [is_active] - Indicates whether the L3 category of the - * product is currently active. - * @property {number} [department] - The department associated with the L3 - * category of the product. - */ -/** - * @typedef CustomMeta - * @property {string} key - The key of the metadata. Should be a non-empty - * string and length should not exceed 30 characters. - * @property {string} value - The value of the metadata. Should be a non-empty - * string and length should not exceed 100 characters. - */ -/** - * @typedef ValidationErrors - * @property {ValidationError[]} errors - */ -/** - * @typedef ValidationError - * @property {string} message - A brief description of the error encountered. - * @property {string} field - The field in the request that caused the error. - */ /** * @typedef {| "about-us" * | "addresses" @@ -4300,11 +3425,10 @@ export = CatalogPlatformModel; * | "order-status" * | "locate-us"} PageType */ -/** @typedef {"INR" | "USD" | "EUR"} CurrencyCodeEnum */ declare class CatalogPlatformModel { } declare namespace CatalogPlatformModel { - export { Action, AllSizes, AllowSingleRequestSchema, AppCatalogConfiguration, AppCategoryReturnConfig, AppCategoryReturnConfigResponseSchema, AppConfiguration, AppConfigurationDetail, AppConfigurationsSort, ApplicationBrandJson, ApplicationCategoryJson, ApplicationDepartment, ApplicationDepartmentJson, ApplicationDepartmentListingResponseSchema, ApplicationItemMOQ, ApplicationItemMeta, ApplicationItemSeoSitemap, ApplicationItemSEO, ApplicationProductsSchema, ApplicationProductListingResponseSchema, ApplicationStoreJson, AppReturnConfigResponseSchema, ArticleAssignment, ArticleAssignment1, ArticleQuery, ArticleStoreResponseSchema, AssignStore, AssignStoreArticle, AttributeDetailsGroup, AttributeMaster, AttributeMasterDetails, AttributeMasterFilter, AttributeMasterMandatoryDetails, AttributeMasterMeta, AttributeMasterSchema, AttributeSchemaRange, AutoCompleteMedia, AutocompleteAction, AutocompletePageAction, AutocompleteResult, BannerImage, BaseAppCategoryReturnConfig, BaseAppCategoryReturnConfigResponseSchema, Brand, BrandItem, BrandListingResponseSchema, ApplicationBrandListingItemSchema, ApplicationBrandListingSchema, ApplicationCategoryListingSchema, ApplicationCategoryListingItemSchema, BrandMeta, InventoryBrandMeta, BulkAssetResponseSchema, BulkHsnResponseSchema, BulkHsnUpsert, BulkInventoryGet, FailedRecord, BulkInventoryGetItems, BulkProductJob, BulkJob, BulkProductRequestSchema, BulkResponseSchema, CatalogInsightBrand, CatalogInsightItem, CatalogInsightResponseSchema, CategoriesResponseSchema, Category, CategoryItems, CategoryListingResponseSchema, CategoryMapping, CategoryMappingValues, CategoryResponseSchema, Child, CollectionBadge, CollectionBanner, CollectionCreateResponseSchema, CollectionDetailResponseSchema, CollectionImage, CollectionItem, CollectionItemUpdate, CollectionListingFilter, CollectionListingFilterTag, CollectionListingFilterType, CollectionQuery, CollectionSchedule, CompanyBrandDetail, CompanyMeta, InventoryCompanyMeta, CompanyOptIn, ConfigErrorResponseSchema, ConfigSuccessResponseSchema, ConfigurationBucketPoints, ConfigurationListing, ConfigurationListingFilter, ConfigurationListingFilterConfig, ConfigurationListingFilterValue, ConfigurationListingSort, ConfigurationListingSortConfig, ConfigurationProduct, ConfigurationProductConfig, ConfigurationProductSimilar, ConfigurationProductVariant, ConfigurationProductVariantConfig, CreateAutocompleteKeyword, CreateAutocompleteWordsResponseSchema, CreateCollection, CreateSearchConfigurationRequestSchema, CreateSearchConfigurationResponseSchema, CreateSearchKeyword, CreateUpdateAppReturnConfig, CrossSellingData, CrossSellingResponseSchema, CustomOrder, DateMeta, DefaultKeyRequestSchema, DeleteAppCategoryReturnConfig, DeleteProductRequestBody, DeleteResponseSchema, DeleteSearchConfigurationResponseSchema, Department, DepartmentCategoryTree, DepartmentErrorResponseSchema, DepartmentIdentifier, DepartmentResponseSchema, DepartmentsResponseSchema, DimensionResponseSchema, InventoryDimensionResponseSchema, Document, EntityConfiguration, ErrorResponseSchema, FilerList, RawProduct, RawProductListingResponseSchema, GTIN, AttributeDetail, LatLong, ApplicationLocationAddressSchema, GetAddressSchema, GetAllSizes, GetAppCatalogConfiguration, GetAppCatalogEntityConfiguration, GetAutocompleteWordsData, GetAutocompleteWordsResponseSchema, GetCatalogConfigurationDetailsProduct, GetCatalogConfigurationDetailsSchemaListing, GetCatalogConfigurationMetaData, GetCollectionDetailNest, GetCollectionItemsResponseSchema, GetCollectionListingResponseSchema, GetCollectionQueryOptionResponseSchema, GetCompanySchema, ConditionItem, DataItem, ValueTypeItem, SortTypeItem, GetConfigMetadataResponseSchema, GetConfigMetadataValues, GetConfigResponseSchema, ConfigItem, AttributeConfig, GetDepartment, GetInventories, GetInventoriesResponseSchema, GetLocationSchema, GetOptInPlatform, GetProductBundleCreateResponseSchema, GetProductBundleListingResponseSchema, GetProductBundleResponseSchema, GetProducts, ProductDetails, GetCollectionDetailResponseSchema, CommonResponseSchemaCollection, GetQueryFiltersKeysResponseSchema, GetQueryFiltersResponseSchema, GetCollectionItemsResponseSchemaV2, Page1, CollectionItemSchemaV2, CollectionItemUpdateSchema, CollectionQuerySchemaV2, ProductDetailV2, GetSearchConfigurationResponseSchema, GetSearchWordsData, GetSearchWordsDetailResponseSchema, GetSearchWordsResponseSchema, GlobalValidation, Guide, HSNCodesResponseSchema, HSNData, CreatedBySchema, ModifiedBySchema, HSNDataInsertV2, Hierarchy, HsnCode, HsnCodesListingResponseSchemaV2, HsnCodesObject, HsnUpsert, Image, ImageUrls, InvSize, InventoryBulkRequestSchema, InventoryConfig, InventoryCreateRequestSchema, InventoryExportAdvanceOption, InventoryExportFilter, InventoryExportJob, InventoryExportJobListResponseSchema, InventoryExportQuantityFilter, InventoryExportRequestSchema, InventoryExportResponseSchema, InventoryFailedReason, InventoryJobDetailResponseSchema, InventoryJobFilters, InventoryJobPayload, InventoryPage, AddInventoryRequestPayload, InventoryPayload, InventoryRequestSchema, InventoryRequestSchemaV2, InventoryResponseSchema, InventoryResponseItem, InventoryResponsePaginated, InventorySellerIdentifierResponsePaginated, ApplicationInventorySellerIdentifierResponsePaginated, InventorySellerResponseSchema, ApplicationInventorySellerResponseSchema, InventorySet, InventoryStockResponseSchema, InventoryUpdateResponseSchema, InventoryValidationResponseSchema, InvoiceCredSchema, InvoiceDetailsSchema, ItemQuery, Items, LimitedProductData, SizeGuideItem, ListSizeGuide, LocationDayWiseSchema, LocationIntegrationType, LocationListSchema, LocationManagerSchema, LocationTimingSchema, Logo, MOQData, ManufacturerResponseSchema, InventoryManufacturerResponseSchema, Media, Media1, DepartmentMedia, BrandMedia, Meta, MetaDataListingFilterMetaResponseSchema, MetaDataListingFilterResponseSchema, MetaDataListingResponseSchema, MetaDataListingSortMetaResponseSchema, MetaDataListingSortResponseSchema, MetaFields, NetQuantity, NetQuantityResponseSchema, NextSchedule, OptInPostRequestSchema, OptinCompanyBrandDetailsView, OptinCompanyDetail, OptinCompanyMetrics, OptinStoreDetails, OwnerAppItemResponseSchema, PTErrorResponseSchema, Page, PageResponseSchema, PageResponseType, Price, ProductListingDetailPrice, PriceArticle, PriceMeta, ProdcutTemplateCategoriesResponseSchema, Product, ProductAttributesResponseSchema, ProductBrand, ProductBulkAssets, ProductBulkRequestSchema, ProductBulkRequestList, ProductBundleItem, ProductBundleRequestSchema, ProductBundleUpdateRequestSchema, ProductConfigurationDownloads, ProductCreateUpdateSchemaV2, ProductDetail, ProductDetailAttribute, ProductDetailGroupedAttribute, ProductDownloadsResponseSchema, CollectionProductFilters, ProductFilters, GetQueryFiltersValuesResponseSchema, ProductFiltersKeysOnly, ProductFiltersKey, ProductQueryFiltersValue, CollectionProductFiltersValue, ProductFiltersValue, CollectionProductListingDetail, ProductCategory, ApplicationCategoryAction, ApplicationCategoryItem, ApplicationProductMedia, ApplicationProductCategoryItem, CategoryPageAction, CategoryQuery, CategoryImage, ProductListingDetail, ActionObject, PageAction, ProductListingPrice, ProductListingResponseSchema, ProductListingResponseV2, ProductPublish, ProductPublished, ProductReturnConfigSchema, ProductReturnConfigBaseSchema, Identifier, SizeDetails, ProductSchemaV2, ProductSize, ProductSizeDeleteDataResponseSchema, ProductSizeDeleteResponseSchema, CollectionProductSortOn, ProductSortOn, ProductTagsViewResponseSchema, CreatedBy, ModifiedBy, ProductTemplate, ProductTemplateDownloadsExport, ProductTemplateExportFilterRequestSchema, ProductTemplateExportResponseSchema, ProductVariants, ProductVariantsResponseSchema, Properties, Quantities, QuantitiesArticle, Quantity, QuantityBase, ReturnConfig, InventoryReturnConfig, ReturnConfig2, ReturnConfigResponseSchema, Sitemap, PageQuery, ApplicationCollectionItemSeoPage, ApplicationCollectionItemSeoAction, ApplicationItemSeoAction, ApplicationItemSeoBreadcrumbs, ApplicationCollectionItemSeoBreadcrumbs, ApplicationItemSeoMetaTagItem, ApplicationItemSeoMetaTags, Metatags, SizePromotionThreshold, SEOData, SearchKeywordResult, SearchableAttribute, SecondLevelChild, SellerPhoneNumber, CollectionSeoDetail, SeoDetail, SetSize, SingleCategoryResponseSchema, SingleProductResponseSchema, Size, SizeDistribution, SizeGuideResponseSchema, StoreAssignResponseSchema, StoreDetail, StoreMeta, SuccessResponseSchema, SuccessResponseObject, TaxIdentifier, TaxSlab, TeaserTag, TemplateDetails, TemplateGlobalValidationData, TemplateValidationData, TemplatesResponseSchema, TemplatesGlobalValidationResponseSchema, TemplatesValidationResponseSchema, ThirdLevelChild, Trader, Trader1, TraderResponseSchema, UpdateCollection, UpdateSearchConfigurationRequestSchema, UpdateSearchConfigurationResponseSchema, CreateMarketplaceOptinResponseSchema, UserCommon, UserDetail, UserDetail1, UserInfo, UserSchema, RequestUserSchema, ValidateIdentifier, ValidateProduct, ValidateSizeGuide, VerifiedBy, WeightResponseSchema, InventoryWeightResponseSchema, Marketplaces, GetAllMarketplaces, UpdateMarketplaceOptinRequestSchema, UpdateMarketplaceOptinResponseSchema, Filters, ActionPage, Price1, MultiCategoriesSchema, CustomMeta, ValidationErrors, ValidationError, PageType, CurrencyCodeEnum }; + export { Action, AllSizes, AllowSingleRequest, AppCatalogConfiguration, AppCategoryReturnConfig, AppCategoryReturnConfigResponse, AppConfiguration, AppConfigurationDetail, AppConfigurationsSort, ApplicationBrandJson, ApplicationCategoryJson, ApplicationDepartment, ApplicationDepartmentJson, ApplicationDepartmentListingResponse, ApplicationItemMOQ, ApplicationItemMeta, ApplicationItemSeoSitemap, ApplicationItemSEO, ApplicationProductListingResponse, ApplicationStoreJson, AppReturnConfigResponse, ArticleAssignment, ArticleAssignment1, ArticleQuery, ArticleStoreResponse, AssignStore, AssignStoreArticle, AttributeDetailsGroup, AttributeMaster, AttributeMasterDetails, AttributeMasterFilter, AttributeMasterMandatoryDetails, AttributeMasterMeta, AttributeMasterSerializer, AttributeSchemaRange, AutoCompleteMedia, AutocompleteAction, AutocompletePageAction, AutocompleteResult, BannerImage, BaseAppCategoryReturnConfig, BaseAppCategoryReturnConfigResponse, Brand, BrandItem, BrandListingResponse, ApplicationBrandListingItemSchema, ApplicationBrandListingSchema, ApplicationCategoryListingSchema, ApplicationCategoryListingItemSchema, BrandMeta, InventoryBrandMeta, BulkAssetResponse, BulkHsnResponse, BulkHsnUpsert, BulkInventoryGet, FailedRecord, BulkInventoryGetItems, BulkProductJob, BulkJob, BulkProductRequest, BulkResponse, CatalogInsightBrand, CatalogInsightItem, CatalogInsightResponse, CategoriesResponse, Category, CategoryItems, CategoryListingResponse, CategoryMapping, CategoryMappingValues, CategoryResponse, Child, CollectionBadge, CollectionBanner, CollectionCreateResponse, CollectionDetailResponse, CollectionImage, CollectionItem, CollectionItemUpdate, CollectionListingFilter, CollectionListingFilterTag, CollectionListingFilterType, CollectionQuery, CollectionSchedule, CompanyBrandDetail, CompanyMeta, InventoryCompanyMeta, CompanyOptIn, ConfigErrorResponse, ConfigSuccessResponse, ConfigurationBucketPoints, ConfigurationListing, ConfigurationListingFilter, ConfigurationListingFilterConfig, ConfigurationListingFilterValue, ConfigurationListingSort, ConfigurationListingSortConfig, ConfigurationProduct, ConfigurationProductConfig, ConfigurationProductSimilar, ConfigurationProductVariant, ConfigurationProductVariantConfig, CreateAutocompleteKeyword, CreateAutocompleteWordsResponse, CreateCollection, CreateSearchConfigurationRequest, CreateSearchConfigurationResponse, CreateSearchKeyword, CreateUpdateAppReturnConfig, CrossSellingData, CrossSellingResponse, CustomOrder, DateMeta, DefaultKeyRequest, DeleteAppCategoryReturnConfig, DeleteResponse, DeleteSearchConfigurationResponse, Department, DepartmentCategoryTree, DepartmentErrorResponse, DepartmentIdentifier, DepartmentResponse, DepartmentsResponse, DimensionResponse, InventoryDimensionResponse, Document, EntityConfiguration, ErrorResponse, FilerList, RawProduct, RawProductListingResponse, GTIN, AttributeDetail, GetAddressSerializer, GetAllSizes, GetAppCatalogConfiguration, GetAppCatalogEntityConfiguration, GetAutocompleteWordsData, GetAutocompleteWordsResponse, GetCatalogConfigurationDetailsProduct, GetCatalogConfigurationDetailsSchemaListing, GetCatalogConfigurationMetaData, GetCollectionDetailNest, GetCollectionItemsResponse, GetCollectionListingResponse, GetCollectionQueryOptionResponse, GetCompanySerializer, ConditionItem, DataItem, ValueTypeItem, SortTypeItem, GetConfigMetadataResponse, GetConfigMetadataValues, GetConfigResponse, GetDepartment, GetInventories, GetInventoriesResponse, GetLocationSerializer, GetOptInPlatform, GetProductBundleCreateResponse, GetProductBundleListingResponse, GetProductBundleResponse, GetProducts, GetCollectionDetailResponse, CommonResponseSchemaCollection, GetQueryFiltersKeysResponse, GetQueryFiltersResponse, GetCollectionItemsResponseSchemaV2, Page1, CollectionItemSchemaV2, CollectionItemUpdateSchema, CollectionQuerySchemaV2, ProductDetailV2, GetSearchConfigurationResponse, GetSearchWordsData, GetSearchWordsDetailResponse, GetSearchWordsResponse, GlobalValidation, Guide, HSNCodesResponse, HSNData, HSNDataInsertV2, Hierarchy, HsnCode, HsnCodesListingResponseSchemaV2, HsnCodesObject, HsnUpsert, Image, ImageUrls, InvSize, InventoryBulkRequest, InventoryConfig, InventoryCreateRequest, InventoryExportAdvanceOption, InventoryExportFilter, InventoryExportJob, InventoryExportJobListResponse, InventoryExportQuantityFilter, InventoryExportRequest, InventoryExportResponse, InventoryFailedReason, InventoryJobDetailResponse, InventoryJobFilters, InventoryJobPayload, InventoryPage, InventoryPayload, InventoryRequest, InventoryRequestSchemaV2, InventoryResponse, InventoryResponseItem, InventoryResponsePaginated, InventorySellerIdentifierResponsePaginated, InventorySellerResponse, InventorySet, InventoryStockResponse, InventoryUpdateResponse, InventoryValidationResponse, InvoiceCredSerializer, InvoiceDetailsSerializer, ItemQuery, Items, LimitedProductData, ListSizeGuide, LocationDayWiseSerializer, LocationIntegrationType, LocationListSerializer, LocationManagerSerializer, LocationTimingSerializer, Logo, MOQData, ManufacturerResponse, InventoryManufacturerResponse, Media, Media1, Media2, BrandMedia, Meta, MetaDataListingFilterMetaResponse, MetaDataListingFilterResponse, MetaDataListingResponse, MetaDataListingSortMetaResponse, MetaDataListingSortResponse, MetaFields, NetQuantity, NetQuantityResponse, NextSchedule, OptInPostRequest, OptinCompanyBrandDetailsView, OptinCompanyDetail, OptinCompanyMetrics, OptinStoreDetails, OwnerAppItemResponse, PTErrorResponse, Page, PageResponse, PageResponseType, Price, Price1, PriceArticle, PriceMeta, ProdcutTemplateCategoriesResponse, Product, ProductAttributesResponse, ProductBrand, ProductBulkAssets, ProductBulkRequest, ProductBulkRequestList, ProductBundleItem, ProductBundleRequest, ProductBundleUpdateRequest, ProductConfigurationDownloads, ProductCreateUpdateSchemaV2, ProductDetail, ProductDetailAttribute, ProductDetailGroupedAttribute, ProductDownloadsResponse, ProductFilters, GetQueryFiltersValuesResponse, ProductFiltersKeysOnly, ProductFiltersKey, ProductFiltersValue, ProductListingDetail, ProductListingPrice, ProductListingResponse, ProductListingResponseV2, ProductPublish, ProductPublish1, ProductPublished, ProductReturnConfigSerializer, ProductReturnConfigBaseSerializer, ProductSchemaV2, ProductSize, ProductSizeDeleteDataResponse, ProductSizeDeleteResponse, ProductSortOn, ProductTagsViewResponse, ProductTemplate, ProductTemplateDownloadsExport, ProductTemplateExportFilterRequest, ProductTemplateExportResponse, ProductVariants, ProductVariantsResponse, Properties, Quantities, QuantitiesArticle, Quantity, QuantityBase, ReturnConfig, ReturnConfig1, ReturnConfig2, ReturnConfigResponse, Sitemap, ApplicationItemSeoAction, ApplicationItemSeoBreadcrumbs, ApplicationItemSeoMetaTagItem, ApplicationItemSeoMetaTags, Metatags, SizePromotionThreshold, SEOData, SearchKeywordResult, SearchableAttribute, SecondLevelChild, SellerPhoneNumber, SeoDetail, SetSize, SingleCategoryResponse, SingleProductResponse, Size, SizeDistribution, SizeGuideResponse, StoreAssignResponse, StoreDetail, StoreMeta, SuccessResponse, SuccessResponseObject, TaxIdentifier, TaxSlab, TeaserTag, TemplateDetails, TemplateValidationData, TemplatesResponse, TemplatesValidationResponse, ThirdLevelChild, Trader, Trader1, TraderResponse, UpdateCollection, UpdateSearchConfigurationRequest, UpdateSearchConfigurationResponse, CreateMarketplaceOptinResponse, UserCommon, UserDetail, UserDetail1, UserInfo, UserInfo1, UserSerializer, RequestUserSerializer, UserSerializer2, UserSerializer3, ValidateIdentifier, ValidateProduct, ValidateSizeGuide, VerifiedBy, WeightResponse, InventoryWeightResponse, CreatedBy, Marketplaces, GetAllMarketplaces, UpdateMarketplaceOptinRequest, UpdateMarketplaceOptinResponse, ActionPage, PageType }; } /** @returns {Action} */ declare function Action(): Action; @@ -4319,50 +3443,18 @@ type Action = { /** @returns {AllSizes} */ declare function AllSizes(): AllSizes; type AllSizes = { - /** - * - A collection of identifiers - * (e.g., GTIN, UPC) associated with the size. Each identifier follows the - * structure defined in the ValidateIdentifier schema. - */ identifiers?: ValidateIdentifier[]; - /** - * - The unit of measurement - * used for the item's dimensions (e.g., centimeters, inches). - */ item_dimensions_unit_of_measure: string; - /** - * - The height of the item in the specified unit - * of measure. - */ item_height: number; - /** - * - The length of the item in the specified unit - * of measure. - */ item_length: number; - /** - * - The weight of the item in the specified unit - * of measure. - */ item_weight: number; - /** - * - The unit of measurement for - * the item's weight (e.g., kilograms, pounds). - */ item_weight_unit_of_measure: string; - /** - * - The width of the item in the specified unit of measure. - */ item_width: number; - /** - * - The label or designation for the item's size (e.g., - * S, M, L, or numerical values). - */ size: string; }; -/** @returns {AllowSingleRequestSchema} */ -declare function AllowSingleRequestSchema(): AllowSingleRequestSchema; -type AllowSingleRequestSchema = { +/** @returns {AllowSingleRequest} */ +declare function AllowSingleRequest(): AllowSingleRequest; +type AllowSingleRequest = { allow_single: boolean; }; /** @returns {AppCatalogConfiguration} */ @@ -4388,13 +3480,14 @@ type AppCategoryReturnConfig = { */ category_id: number; /** - * - Return configuration details + * - Return + * configuration details */ - return_config: ProductReturnConfigBaseSchema; + return_config: ProductReturnConfigBaseSerializer; }; -/** @returns {AppCategoryReturnConfigResponseSchema} */ -declare function AppCategoryReturnConfigResponseSchema(): AppCategoryReturnConfigResponseSchema; -type AppCategoryReturnConfigResponseSchema = { +/** @returns {AppCategoryReturnConfigResponse} */ +declare function AppCategoryReturnConfigResponse(): AppCategoryReturnConfigResponse; +type AppCategoryReturnConfigResponse = { /** * - Channel identifier */ @@ -4408,7 +3501,7 @@ type AppCategoryReturnConfigResponseSchema = { * - Name of L3 category */ name?: string; - return_config?: ProductReturnConfigBaseSchema; + return_config?: ProductReturnConfigBaseSerializer; }; /** @returns {AppConfiguration} */ declare function AppConfiguration(): AppConfiguration; @@ -4427,86 +3520,26 @@ type AppConfiguration = { /** @returns {AppConfigurationDetail} */ declare function AppConfigurationDetail(): AppConfigurationDetail; type AppConfigurationDetail = { - /** - * - Unique identifier for the application to which - * this configuration belongs. - */ app_id: string; - /** - * - A list of attribute groups - * associated with the app configuration. Each attribute group defines a set - * of attributes relevant to the app. - */ attributes?: AttributeDetailsGroup[]; - /** - * - Indicates whether this configuration is - * currently active for the application. - */ is_active: boolean; - /** - * - Specifies if this configuration is the - * default setting for the application. - */ is_default: boolean; - /** - * - URL of the logo image associated with the - * application configuration. - */ logo?: string; - /** - * - The name of the application configuration. - */ name?: string; - /** - * - The priority of this configuration compared to - * others. Higher priority configurations are given precedence. - */ priority: number; slug: string; - /** - * - A list of template slugs associated - * with this configuration, representing different templates that the - * configuration might use. - */ template_slugs?: string[]; }; /** @returns {AppConfigurationsSort} */ declare function AppConfigurationsSort(): AppConfigurationsSort; type AppConfigurationsSort = { - /** - * - Unique identifier for the application. - */ app_id: string; - /** - * - The default configuration key for the app. - */ default_key: string; - /** - * - Indicates whether the app configuration is - * currently active. - */ is_active: boolean; - /** - * - Specifies if this is the default - * configuration for the app. - */ is_default: boolean; - /** - * - The specific configuration key for the app. - */ key: string; - /** - * - URL of the app's logo. - */ logo?: string; - /** - * - Name of the application. - */ name?: string; - /** - * - Defines the priority level for this - * configuration, with 1 being the highest. - */ priority: number; }; /** @returns {ApplicationBrandJson} */ @@ -4531,46 +3564,21 @@ type ApplicationCategoryJson = { /** @returns {ApplicationDepartment} */ declare function ApplicationDepartment(): ApplicationDepartment; type ApplicationDepartment = { - /** - * - Custom JSON data specific to the - * department, used to store additional attributes or configurations. - */ _custom_json?: any; - /** - * - Unique identifier for the application to which - * the department belongs. - */ app_id: string; - /** - * - Indicates whether the department is - * currently active within the application. - */ is_active?: boolean; - /** - * - URL or path to the logo representing the department. - */ logo?: string; - /** - * - Name of the department within the application. - */ name?: string; - /** - * - Unique identifier for the department. - */ uid: number; }; /** @returns {ApplicationDepartmentJson} */ declare function ApplicationDepartmentJson(): ApplicationDepartmentJson; type ApplicationDepartmentJson = { - /** - * - A custom JSON object containing additional - * details or configurations specific to the application department. - */ _custom_json: any; }; -/** @returns {ApplicationDepartmentListingResponseSchema} */ -declare function ApplicationDepartmentListingResponseSchema(): ApplicationDepartmentListingResponseSchema; -type ApplicationDepartmentListingResponseSchema = { +/** @returns {ApplicationDepartmentListingResponse} */ +declare function ApplicationDepartmentListingResponse(): ApplicationDepartmentListingResponse; +type ApplicationDepartmentListingResponse = { items?: ApplicationDepartment[]; page: Page; }; @@ -4658,308 +3666,51 @@ type ApplicationItemSEO = { meta_tags?: ApplicationItemSeoMetaTags[]; canonical_url?: string; }; -/** @returns {ApplicationProductsSchema} */ -declare function ApplicationProductsSchema(): ApplicationProductsSchema; -type ApplicationProductsSchema = { - /** - * - Additional attributes of the product, such - * as custom properties or features. - */ - attributes?: any; - brand?: ProductBrand; - color?: string; - /** - * - A detailed description of the product. - */ - description?: string; - /** - * - The discount applied to the product. - */ - discount?: string; - /** - * - Indicates whether the product has - * variants, such as different sizes or colors. - */ - has_variant?: boolean; - /** - * - Key highlights of the product. - */ - highlights?: string[]; - /** - * - The nature of the product image, indicating - * if it's the default or a standard image. - */ - image_nature: string; - /** - * - A unique code assigned to the product item at - * company and brand level. - */ - item_code: string; - /** - * - The type of the product, defining its nature. - */ - item_type: string; - /** - * - A list of media items associated with the - * product, such as images or videos. - */ - medias?: Media[]; - /** - * - The name of the product. - */ - name: string; - price?: ProductListingPrice; - /** - * - The date and time when the product - * becomes available online. - */ - product_online_date?: string; - /** - * - Metadata related to any promotions - * associated with the product. - */ - promo_meta?: any; - /** - * - The average rating of the product, typically - * based on customer reviews. - */ - rating?: number; - /** - * - The total number of ratings the product - * has received. - */ - rating_count?: number; +/** @returns {ApplicationProductListingResponse} */ +declare function ApplicationProductListingResponse(): ApplicationProductListingResponse; +type ApplicationProductListingResponse = { + filters?: ProductFilters[]; + items?: ProductListingDetail[]; + operators?: any; + page: Page; + sort_on?: ProductSortOn[]; +}; +/** @returns {ApplicationStoreJson} */ +declare function ApplicationStoreJson(): ApplicationStoreJson; +type ApplicationStoreJson = { + _custom_json: any; +}; +/** @returns {AppReturnConfigResponse} */ +declare function AppReturnConfigResponse(): AppReturnConfigResponse; +type AppReturnConfigResponse = { /** - * - Indicates whether the product is available for sale. + * - Channel identifier */ - sellable?: boolean; + app_id?: string; /** - * - A brief description of the product. + * - Count of L3 category return config set + * for application */ - short_description?: string; + category_count?: number; /** - * - A list of similar products. + * - Unique identifer of company */ - similars?: string[]; + company_id?: number; /** - * - A URL-friendly string representing the product. + * - User details */ - slug: string; + created_by?: any; /** - * - A teaser tag object providing short - * promotional information about the product. + * - User details */ - teaser_tag?: any; + modified_by?: any; /** - * - A list of tryout options or samples - * available for the product. + * - Modification date */ - tryouts?: string[]; + modified_on?: string; /** - * - The type or category of the product. - */ - type?: string; - /** - * - A unique identifier for the product. - */ - uid: number; - /** - * - A numerical value indicating the popularity - * of the product. - */ - popularity?: number; - /** - * - The unique identifier for the brand associated - * with the product. - */ - brand_uid: number; - /** - * - The unique identifier for the category to - * which the product belongs. - */ - category_uid: number; - /** - * - The verification status of the - * product, typically represented as an integer. - */ - verification_status?: number; - /** - * - The identifier for the sales - * channel through which the product is sold. - */ - channel_identifier?: string; - /** - * - A URL-friendly string representing the - * product's category. - */ - category_slug?: string; - /** - * - A guide or chart providing size information - * for the product. - */ - size_guide?: string; - /** - * - A list of L3 category IDs of the product. - */ - l3_categories: number[]; - /** - * - A list of store IDs where the product is available. - */ - store_ids?: number[]; - /** - * - A list of company IDs associated with the product. - */ - company_ids?: number[]; - /** - * - A list of department IDs where the product - * is categorized. - */ - departments: number[]; - /** - * - A list of tags or keywords associated with the product. - */ - tags?: string[]; - /** - * - A list of names of L3 categories - * of the product. - */ - l3_category_names?: string[]; - /** - * - A list of available sizes for the product. - */ - sizes?: string[]; - /** - * - Tags that group the product with - * other similar products. - */ - product_group_tag?: string[]; - /** - * - Indicates whether the product is available - * in multiple sizes. - */ - multi_size: boolean; - /** - * - Indicates whether the product can be considered - * as a gift. - */ - is_gift: boolean; - /** - * - Indicates whether the product is eligible for - * cash on delivery (COD). - */ - is_cod: boolean; - /** - * - Indicates whether the product depends on - * another product. - */ - is_dependent: boolean; - /** - * - Indicates whether the product is currently - * available for purchase. - */ - is_available: boolean; - moq: ApplicationItemMOQ; - seo: ApplicationItemSEO; - /** - * - An object containing details about the - * product variants. - */ - variants?: any; - /** - * - Media items specific to the product variants. - */ - variant_media?: any; - /** - * - A group identifier for products that are - * variants of one another. - */ - variant_group?: any; - multi_categories?: MultiCategoriesSchema[]; - /** - * - Tag used for categorizing or templating purposes. - */ - template_tag?: string; - /** - * - Net quantity details for the product. - */ - net_quantity?: any; - custom_order?: CustomOrder; - /** - * - Country where the product is - * manufactured or sourced from. - */ - country_of_origin: string; - /** - * - Custom JSON data associated with the product. - */ - _custom_json?: any; - /** - * - Identifiers associated with the product. - */ - identifiers?: string[]; - /** - * - Unique identifier for the item. - */ - item_id?: number; - /** - * - Custom meta associated with the product. - */ - _custom_meta?: CustomMeta[]; - /** - * - The discount applied to the - * product in percentage. - */ - discount_percentage?: number; -}; -/** @returns {ApplicationProductListingResponseSchema} */ -declare function ApplicationProductListingResponseSchema(): ApplicationProductListingResponseSchema; -type ApplicationProductListingResponseSchema = { - filters?: ProductFilters[]; - items?: ApplicationProductsSchema[]; - operators?: any; - page: Page; - sort_on?: ProductSortOn[]; -}; -/** @returns {ApplicationStoreJson} */ -declare function ApplicationStoreJson(): ApplicationStoreJson; -type ApplicationStoreJson = { - /** - * - Custom JSON data for the store. It can - * contain any additional data specific to the store configuration. - */ - _custom_json: any; -}; -/** @returns {AppReturnConfigResponseSchema} */ -declare function AppReturnConfigResponseSchema(): AppReturnConfigResponseSchema; -type AppReturnConfigResponseSchema = { - /** - * - Channel identifier - */ - app_id?: string; - /** - * - Count of L3 category return config set - * for application - */ - category_count?: number; - /** - * - Unique identifer of company - */ - company_id?: number; - /** - * - User details - */ - created_by?: any; - /** - * - User details - */ - modified_by?: any; - /** - * - Modification date - */ - modified_on?: string; - /** - * - Configuration level of return - * window category|product|no-return + * - Configuration level of return + * window category|product|no-return */ return_config_level?: string; }; @@ -4982,9 +3733,9 @@ type ArticleQuery = { item_id: number; size: string; }; -/** @returns {ArticleStoreResponseSchema} */ -declare function ArticleStoreResponseSchema(): ArticleStoreResponseSchema; -type ArticleStoreResponseSchema = { +/** @returns {ArticleStoreResponse} */ +declare function ArticleStoreResponse(): ArticleStoreResponse; +type ArticleStoreResponse = { name?: string; store_code?: string; store_type?: string; @@ -5013,205 +3764,77 @@ type AssignStoreArticle = { /** @returns {AttributeDetailsGroup} */ declare function AttributeDetailsGroup(): AttributeDetailsGroup; type AttributeDetailsGroup = { - /** - * - The type of display used for the attribute, - * such as text, dropdown, or image. - */ display_type: string; - /** - * - Indicates if this attribute group is currently active. - */ is_active: boolean; - /** - * - A unique key or identifier for the attribute group. - */ key?: string; - /** - * - URL of the logo image associated with this attribute group. - */ logo?: string; - /** - * - The name of the attribute group. - */ name: string; - /** - * - The priority of the attribute group, - * determining the order in which it is displayed or processed. - */ priority: number; - /** - * - A URL-friendly identifier for the attribute - * group, often used in APIs for identification. - */ slug?: string; - /** - * - The unit of measurement associated with the - * attribute, if applicable (e.g., cm, kg). - */ unit?: string; }; /** @returns {AttributeMaster} */ declare function AttributeMaster(): AttributeMaster; type AttributeMaster = { - /** - * - List of allowed values for the - * attribute, if applicable. - */ allowed_values?: string[]; - /** - * - Format of the attribute, such as case formatting. - */ format?: string; - /** - * - Whether the attribute is mandatory. - */ mandatory?: boolean; - /** - * - Indicates if the attribute allows multiple values. - */ multi?: boolean; range?: AttributeSchemaRange; - /** - * - Data type of the attribute. - */ type: string; }; /** @returns {AttributeMasterDetails} */ declare function AttributeMasterDetails(): AttributeMasterDetails; type AttributeMasterDetails = { - /** - * - Type of display used for the attribute - * (e.g., text, dropdown). - */ display_type: string; }; /** @returns {AttributeMasterFilter} */ declare function AttributeMasterFilter(): AttributeMasterFilter; type AttributeMasterFilter = { depends_on?: string[]; - /** - * - Whether the attribute should be indexed for search. - */ indexing: boolean; - /** - * - Priority of the attribute in filtering (optional). - */ priority?: number; }; /** @returns {AttributeMasterMandatoryDetails} */ declare function AttributeMasterMandatoryDetails(): AttributeMasterMandatoryDetails; type AttributeMasterMandatoryDetails = { - /** - * - A list of Level 3 (L3) keys associated with - * the attribute, typically used for advanced categorization or attribute grouping. - */ l3_keys?: string[]; }; /** @returns {AttributeMasterMeta} */ declare function AttributeMasterMeta(): AttributeMasterMeta; type AttributeMasterMeta = { - /** - * - Indicates if the attribute has been enriched - * with additional details or data beyond the basic schema. - */ enriched?: boolean; mandatory_details: AttributeMasterMandatoryDetails; }; -/** @returns {AttributeMasterSchema} */ -declare function AttributeMasterSchema(): AttributeMasterSchema; -type AttributeMasterSchema = { - /** - * - Information about the user who created the attribute. - */ +/** @returns {AttributeMasterSerializer} */ +declare function AttributeMasterSerializer(): AttributeMasterSerializer; +type AttributeMasterSerializer = { created_by?: any; - /** - * - The timestamp when the attribute was created. - */ created_on?: string; - /** - * - Departments or categories to which the - * attribute applies. - */ departments: string[]; - /** - * - A description of the attribute. - */ description?: string; details: AttributeMasterDetails; - /** - * - Indicates if the attribute - * is enabled for end consumers. - */ enabled_for_end_consumer?: boolean; filters: AttributeMasterFilter; - /** - * - Indicates if the attribute can be nested - * under other attributes. - */ is_nested?: boolean; - /** - * - URL of the logo associated with the attribute. - */ logo?: string; - /** - * - Information about the user who last - * modified the attribute. - */ modified_by?: any; - /** - * - The timestamp when the attribute was last modified. - */ modified_on?: string; - /** - * - Name of the attribute. - */ - name: string; - /** - * - Name of the attribute. - */ + name?: string; raw_key?: string; schema: AttributeMaster; - /** - * - Suggested or recommended value for the - * attribute, if applicable. - */ + slug: string; suggestion?: string; - /** - * - Synonyms or alternative names for the - * attribute, used for search and indexing. - */ synonyms?: any; - /** - * - Tags or keywords associated with the attribute, - * often used for categorization. - */ tags?: string[]; - /** - * - The unit of measurement for the attribute, if - * applicable (e.g., cm, kg). - */ unit?: string; - /** - * - Unique slug or identifier for the attribute. - */ - slug: string; - /** - * - Indicates if the attribute is a variant of - * another attribute. - */ variant?: boolean; }; /** @returns {AttributeSchemaRange} */ declare function AttributeSchemaRange(): AttributeSchemaRange; type AttributeSchemaRange = { - /** - * - Minimum allowed value for the attribute. - */ - min?: number; - /** - * - Maximum allowed value for the attribute. - */ max?: number; + min?: number; }; /** @returns {AutoCompleteMedia} */ declare function AutoCompleteMedia(): AutoCompleteMedia; @@ -5264,28 +3887,30 @@ type BannerImage = { /** @returns {BaseAppCategoryReturnConfig} */ declare function BaseAppCategoryReturnConfig(): BaseAppCategoryReturnConfig; type BaseAppCategoryReturnConfig = { + /** + * - Channel identifier + */ + app_id: string; + /** + * - Unique identifer of company + */ + company_id: number; /** * - Category level return config details */ data: AppCategoryReturnConfig[]; }; -/** @returns {BaseAppCategoryReturnConfigResponseSchema} */ -declare function BaseAppCategoryReturnConfigResponseSchema(): BaseAppCategoryReturnConfigResponseSchema; -type BaseAppCategoryReturnConfigResponseSchema = { - data?: AppCategoryReturnConfigResponseSchema[]; - page?: PageResponseSchema; +/** @returns {BaseAppCategoryReturnConfigResponse} */ +declare function BaseAppCategoryReturnConfigResponse(): BaseAppCategoryReturnConfigResponse; +type BaseAppCategoryReturnConfigResponse = { + data?: AppCategoryReturnConfigResponse[]; + page?: PageResponse; }; /** @returns {Brand} */ declare function Brand(): Brand; type Brand = { logo?: Logo; - /** - * - The name of the brand. - */ name?: string; - /** - * - Unique identifier for the brand. - */ uid?: number; }; /** @returns {BrandItem} */ @@ -5319,9 +3944,9 @@ type BrandItem = { */ uid?: number; }; -/** @returns {BrandListingResponseSchema} */ -declare function BrandListingResponseSchema(): BrandListingResponseSchema; -type BrandListingResponseSchema = { +/** @returns {BrandListingResponse} */ +declare function BrandListingResponse(): BrandListingResponse; +type BrandListingResponse = { /** * - An array of brand items, each containing * detailed information about the brand, such as action, banners, departments, @@ -5399,7 +4024,7 @@ type ApplicationBrandListingItemSchema = { declare function ApplicationBrandListingSchema(): ApplicationBrandListingSchema; type ApplicationBrandListingSchema = { items?: ApplicationBrandListingItemSchema[]; - page: Page; + page?: Page; }; /** @returns {ApplicationCategoryListingSchema} */ declare function ApplicationCategoryListingSchema(): ApplicationCategoryListingSchema; @@ -5468,36 +4093,24 @@ type ApplicationCategoryListingItemSchema = { /** @returns {BrandMeta} */ declare function BrandMeta(): BrandMeta; type BrandMeta = { - /** - * - Unique identifier for the brand. - */ id: number; - /** - * - Name of the brand. - */ name: string; }; /** @returns {InventoryBrandMeta} */ declare function InventoryBrandMeta(): InventoryBrandMeta; type InventoryBrandMeta = { - /** - * - Unique identifier for the brand in the inventory. - */ id?: number; - /** - * - Name of the brand in the inventory. - */ name?: string; }; -/** @returns {BulkAssetResponseSchema} */ -declare function BulkAssetResponseSchema(): BulkAssetResponseSchema; -type BulkAssetResponseSchema = { +/** @returns {BulkAssetResponse} */ +declare function BulkAssetResponse(): BulkAssetResponse; +type BulkAssetResponse = { items?: Items[]; page?: Page; }; -/** @returns {BulkHsnResponseSchema} */ -declare function BulkHsnResponseSchema(): BulkHsnResponseSchema; -type BulkHsnResponseSchema = { +/** @returns {BulkHsnResponse} */ +declare function BulkHsnResponse(): BulkHsnResponse; +type BulkHsnResponse = { /** * - Flag indicating the success status of the * bulk HSN operation. @@ -5543,30 +4156,10 @@ type BulkInventoryGetItems = { /** @returns {BulkProductJob} */ declare function BulkProductJob(): BulkProductJob; type BulkProductJob = { - /** - * - The unique identifier of the company - * associated with the bulk product job. - */ - company_id?: string; - /** - * - The template tag used to classify the - * products in the bulk job. - */ + company_id?: number; template_tag?: string; - /** - * - The type of products being processed in - * the bulk job (e.g., standard, digital, composite). - */ product_type?: string; - /** - * - The department under which the products in - * the bulk job are categorized. - */ department?: string; - /** - * - The file path of the uploaded file - * containing the bulk product data. - */ file_path?: string; }; /** @returns {BulkJob} */ @@ -5578,7 +4171,7 @@ type BulkJob = { /** * - The user who created the item. */ - created_by?: UserInfo; + created_by?: UserInfo1; /** * - The date and time when the item was created. */ @@ -5605,22 +4198,22 @@ type BulkJob = { total?: number; tracking_url?: string; }; -/** @returns {BulkProductRequestSchema} */ -declare function BulkProductRequestSchema(): BulkProductRequestSchema; -type BulkProductRequestSchema = { +/** @returns {BulkProductRequest} */ +declare function BulkProductRequest(): BulkProductRequest; +type BulkProductRequest = { batch_id: string; company_id: number; data: any[]; template_tag: string; }; -/** @returns {BulkResponseSchema} */ -declare function BulkResponseSchema(): BulkResponseSchema; -type BulkResponseSchema = { +/** @returns {BulkResponse} */ +declare function BulkResponse(): BulkResponse; +type BulkResponse = { batch_id: string; /** * - The user who created the item. */ - created_by?: UserInfo; + created_by?: UserInfo1; /** * - The date and time when the item was created. */ @@ -5689,36 +4282,19 @@ type CatalogInsightItem = { */ sellable_count?: number; }; -/** @returns {CatalogInsightResponseSchema} */ -declare function CatalogInsightResponseSchema(): CatalogInsightResponseSchema; -type CatalogInsightResponseSchema = { +/** @returns {CatalogInsightResponse} */ +declare function CatalogInsightResponse(): CatalogInsightResponse; +type CatalogInsightResponse = { brand_distribution?: CatalogInsightBrand; item?: CatalogInsightItem; }; -/** @returns {CategoriesResponseSchema} */ -declare function CategoriesResponseSchema(): CategoriesResponseSchema; -type CategoriesResponseSchema = { - /** - * - The name of the category. - */ +/** @returns {CategoriesResponse} */ +declare function CategoriesResponse(): CategoriesResponse; +type CategoriesResponse = { name?: string; - /** - * - A URL-friendly unique identifier for the category. - */ slug?: string; - /** - * - A key used for internal identification of the - * category slug. - */ slug_key?: string; - /** - * - The slug of the template associated with - * the category. - */ template_slug?: string; - /** - * - A unique identifier for the category. - */ uid?: number; }; /** @returns {Category} */ @@ -5810,9 +4386,9 @@ type CategoryItems = { slug?: string; uid?: number; }; -/** @returns {CategoryListingResponseSchema} */ -declare function CategoryListingResponseSchema(): CategoryListingResponseSchema; -type CategoryListingResponseSchema = { +/** @returns {CategoryListingResponse} */ +declare function CategoryListingResponse(): CategoryListingResponse; +type CategoryListingResponse = { /** * - An array containing the * department category trees, which provide hierarchical information about @@ -5858,12 +4434,9 @@ type CategoryMappingValues = { */ name: string; }; -/** @returns {CategoryResponseSchema} */ -declare function CategoryResponseSchema(): CategoryResponseSchema; -type CategoryResponseSchema = { - /** - * - The list of categories. - */ +/** @returns {CategoryResponse} */ +declare function CategoryResponse(): CategoryResponse; +type CategoryResponse = { items?: Category[]; page?: Page; }; @@ -5915,9 +4488,9 @@ type CollectionBanner = { landscape: CollectionImage; portrait: CollectionImage; }; -/** @returns {CollectionCreateResponseSchema} */ -declare function CollectionCreateResponseSchema(): CollectionCreateResponseSchema; -type CollectionCreateResponseSchema = { +/** @returns {CollectionCreateResponse} */ +declare function CollectionCreateResponse(): CollectionCreateResponse; +type CollectionCreateResponse = { /** * - Unique identifier for the collection. */ @@ -5942,7 +4515,6 @@ type CollectionCreateResponseSchema = { */ badge?: any; banners?: ImageUrls; - cron?: any; /** * - A description of the collection. */ @@ -6021,9 +4593,9 @@ type CollectionCreateResponseSchema = { */ id?: string; }; -/** @returns {CollectionDetailResponseSchema} */ -declare function CollectionDetailResponseSchema(): CollectionDetailResponseSchema; -type CollectionDetailResponseSchema = { +/** @returns {CollectionDetailResponse} */ +declare function CollectionDetailResponse(): CollectionDetailResponse; +type CollectionDetailResponse = { _schedule?: any; allow_facets?: boolean; allow_sort?: boolean; @@ -6180,9 +4752,6 @@ type CompanyBrandDetail = { /** @returns {CompanyMeta} */ declare function CompanyMeta(): CompanyMeta; type CompanyMeta = { - /** - * - Unique identifier for the company. - */ id: number; }; /** @returns {InventoryCompanyMeta} */ @@ -6204,22 +4773,14 @@ type CompanyOptIn = { platform: string; store_ids: number[]; }; -/** @returns {ConfigErrorResponseSchema} */ -declare function ConfigErrorResponseSchema(): ConfigErrorResponseSchema; -type ConfigErrorResponseSchema = { - /** - * - A human-readable error message providing details - * about the configuration failure. - */ +/** @returns {ConfigErrorResponse} */ +declare function ConfigErrorResponse(): ConfigErrorResponse; +type ConfigErrorResponse = { message: string; }; -/** @returns {ConfigSuccessResponseSchema} */ -declare function ConfigSuccessResponseSchema(): ConfigSuccessResponseSchema; -type ConfigSuccessResponseSchema = { - /** - * - A message confirming the successful completion - * of the configuration operation. - */ +/** @returns {ConfigSuccessResponse} */ +declare function ConfigSuccessResponse(): ConfigSuccessResponse; +type ConfigSuccessResponse = { message: string; }; /** @returns {ConfigurationBucketPoints} */ @@ -6326,9 +4887,9 @@ type CreateAutocompleteKeyword = { results?: AutocompleteResult[]; words?: string[]; }; -/** @returns {CreateAutocompleteWordsResponseSchema} */ -declare function CreateAutocompleteWordsResponseSchema(): CreateAutocompleteWordsResponseSchema; -type CreateAutocompleteWordsResponseSchema = { +/** @returns {CreateAutocompleteWordsResponse} */ +declare function CreateAutocompleteWordsResponse(): CreateAutocompleteWordsResponse; +type CreateAutocompleteWordsResponse = { _custom_json?: any; app_id?: string; results?: any[]; @@ -6437,9 +4998,9 @@ type CreateCollection = { */ visible_facets_keys?: string[]; }; -/** @returns {CreateSearchConfigurationRequestSchema} */ -declare function CreateSearchConfigurationRequestSchema(): CreateSearchConfigurationRequestSchema; -type CreateSearchConfigurationRequestSchema = { +/** @returns {CreateSearchConfigurationRequest} */ +declare function CreateSearchConfigurationRequest(): CreateSearchConfigurationRequest; +type CreateSearchConfigurationRequest = { /** * - The application id where custom search * configuration is set @@ -6450,9 +5011,10 @@ type CreateSearchConfigurationRequestSchema = { */ company_id: number; /** - * - The user who created the search configuration. + * - The user who created the search + * configuration. */ - created_by?: UserSchema; + created_by?: UserSerializer; /** * - The date and time when the search * configuration was created. @@ -6464,9 +5026,10 @@ type CreateSearchConfigurationRequestSchema = { */ is_proximity_enabled?: boolean; /** - * - The user who modified the search configuration. + * - The user who modified the search + * configuration. */ - modified_by?: UserSchema; + modified_by?: UserSerializer; /** * - The date and time when the search * configuration was last modified. @@ -6482,9 +5045,9 @@ type CreateSearchConfigurationRequestSchema = { */ searchable_attributes?: SearchableAttribute[]; }; -/** @returns {CreateSearchConfigurationResponseSchema} */ -declare function CreateSearchConfigurationResponseSchema(): CreateSearchConfigurationResponseSchema; -type CreateSearchConfigurationResponseSchema = { +/** @returns {CreateSearchConfigurationResponse} */ +declare function CreateSearchConfigurationResponse(): CreateSearchConfigurationResponse; +type CreateSearchConfigurationResponse = { success?: boolean; }; /** @returns {CreateSearchKeyword} */ @@ -6499,6 +5062,14 @@ type CreateSearchKeyword = { /** @returns {CreateUpdateAppReturnConfig} */ declare function CreateUpdateAppReturnConfig(): CreateUpdateAppReturnConfig; type CreateUpdateAppReturnConfig = { + /** + * - Channel identifier + */ + app_id: string; + /** + * - Unique identifer of company + */ + company_id: number; /** * - Return configurtion Level * category|product|no-return @@ -6511,30 +5082,18 @@ type CrossSellingData = { articles?: number; products?: number; }; -/** @returns {CrossSellingResponseSchema} */ -declare function CrossSellingResponseSchema(): CrossSellingResponseSchema; -type CrossSellingResponseSchema = { +/** @returns {CrossSellingResponse} */ +declare function CrossSellingResponse(): CrossSellingResponse; +type CrossSellingResponse = { brand_distribution?: CatalogInsightBrand; data?: CrossSellingData; }; /** @returns {CustomOrder} */ declare function CustomOrder(): CustomOrder; type CustomOrder = { - /** - * - Unit of time for manufacturing - * (e.g., days, weeks). - */ - manufacturing_time_unit?: string; - /** - * - Indicates if the product is available - * for custom orders. - */ - is_custom_order: boolean; - /** - * - Time required for manufacturing in - * the specified unit. - */ + is_custom_order?: boolean; manufacturing_time?: number; + manufacturing_time_unit?: string; }; /** @returns {DateMeta} */ declare function DateMeta(): DateMeta; @@ -6544,75 +5103,44 @@ type DateMeta = { inventory_updated_on?: string; modified_on?: string; }; -/** @returns {DefaultKeyRequestSchema} */ -declare function DefaultKeyRequestSchema(): DefaultKeyRequestSchema; -type DefaultKeyRequestSchema = { - /** - * - The default key used for the requested operation. - */ +/** @returns {DefaultKeyRequest} */ +declare function DefaultKeyRequest(): DefaultKeyRequest; +type DefaultKeyRequest = { default_key: string; }; /** @returns {DeleteAppCategoryReturnConfig} */ declare function DeleteAppCategoryReturnConfig(): DeleteAppCategoryReturnConfig; type DeleteAppCategoryReturnConfig = { /** - * - List of category_ids to be deleted. - */ - category_ids: number[]; -}; -/** @returns {DeleteProductRequestBody} */ -declare function DeleteProductRequestBody(): DeleteProductRequestBody; -type DeleteProductRequestBody = { - /** - * - The brand identifier for the product. - */ - brand_uid?: number; - /** - * - The code of the item to be deleted. + * - Channel identifier */ - item_code?: string; + app_id: string; /** - * - The ID of the company. (Optional if already - * provided in the path) + * - List of category_ids to be deleted. */ - company_id?: string; + category_ids: number[]; /** - * - The ID of the product. + * - Unique identifer of company */ - item_id?: number; + company_id: number; }; -/** @returns {DeleteResponseSchema} */ -declare function DeleteResponseSchema(): DeleteResponseSchema; -type DeleteResponseSchema = { +/** @returns {DeleteResponse} */ +declare function DeleteResponse(): DeleteResponse; +type DeleteResponse = { message?: string; }; -/** @returns {DeleteSearchConfigurationResponseSchema} */ -declare function DeleteSearchConfigurationResponseSchema(): DeleteSearchConfigurationResponseSchema; -type DeleteSearchConfigurationResponseSchema = { +/** @returns {DeleteSearchConfigurationResponse} */ +declare function DeleteSearchConfigurationResponse(): DeleteSearchConfigurationResponse; +type DeleteSearchConfigurationResponse = { success?: boolean; }; /** @returns {Department} */ declare function Department(): Department; type Department = { - logo?: DepartmentMedia; - /** - * - The name of the department, used to identify it - * within the application. - */ + logo?: Media2; name?: string; - /** - * - Defines the priority or order in which - * the department should appear in listings. - */ priority_order?: number; - /** - * - A URL-friendly string used to uniquely identify - * the department. - */ slug?: string; - /** - * - A unique identifier for the department. - */ uid?: number; }; /** @returns {DepartmentCategoryTree} */ @@ -6629,33 +5157,13 @@ type DepartmentCategoryTree = { */ items?: CategoryItems[]; }; -/** @returns {DepartmentErrorResponseSchema} */ -declare function DepartmentErrorResponseSchema(): DepartmentErrorResponseSchema; -type DepartmentErrorResponseSchema = { - /** - * - Error code representing the type of error encountered. - */ +/** @returns {DepartmentErrorResponse} */ +declare function DepartmentErrorResponse(): DepartmentErrorResponse; +type DepartmentErrorResponse = { code?: string; - /** - * - Detailed information about the errors - * encountered in the request, typically containing specific field validation - * errors or related data. - */ errors?: any; - /** - * - A human-readable message that explains the - * reason for the error. - */ message?: string; - /** - * - Additional metadata about the error, such as - * contextual or debugging information. - */ meta?: any; - /** - * - HTTP status code associated with the error, - * e.g., 400 for a bad request or 500 for a server error. - */ status?: number; }; /** @returns {DepartmentIdentifier} */ @@ -6677,23 +5185,20 @@ type DepartmentIdentifier = { */ uid?: number; }; -/** @returns {DepartmentResponseSchema} */ -declare function DepartmentResponseSchema(): DepartmentResponseSchema; -type DepartmentResponseSchema = { +/** @returns {DepartmentResponse} */ +declare function DepartmentResponse(): DepartmentResponse; +type DepartmentResponse = { items?: Department[]; }; -/** @returns {DepartmentsResponseSchema} */ -declare function DepartmentsResponseSchema(): DepartmentsResponseSchema; -type DepartmentsResponseSchema = { - /** - * - List of department objects. - */ +/** @returns {DepartmentsResponse} */ +declare function DepartmentsResponse(): DepartmentsResponse; +type DepartmentsResponse = { items?: GetDepartment[]; page?: Page; }; -/** @returns {DimensionResponseSchema} */ -declare function DimensionResponseSchema(): DimensionResponseSchema; -type DimensionResponseSchema = { +/** @returns {DimensionResponse} */ +declare function DimensionResponse(): DimensionResponse; +type DimensionResponse = { /** * - The height dimension. */ @@ -6715,9 +5220,9 @@ type DimensionResponseSchema = { */ width: number; }; -/** @returns {InventoryDimensionResponseSchema} */ -declare function InventoryDimensionResponseSchema(): InventoryDimensionResponseSchema; -type InventoryDimensionResponseSchema = { +/** @returns {InventoryDimensionResponse} */ +declare function InventoryDimensionResponse(): InventoryDimensionResponse; +type InventoryDimensionResponse = { height?: number; length?: number; unit?: string; @@ -6726,28 +5231,10 @@ type InventoryDimensionResponseSchema = { /** @returns {Document} */ declare function Document(): Document; type Document = { - /** - * - The official legal name associated with the document. - */ legal_name?: string; - /** - * - The type of document. - */ type: string; - /** - * - A URL link to the document, typically pointing to - * where the document is stored. - */ url?: string; - /** - * - The actual value or identifier associated with the - * document, such as a GST number or PAN number. - */ value: string; - /** - * - Indicates whether the document has been - * verified as valid. - */ verified?: boolean; }; /** @returns {EntityConfiguration} */ @@ -6760,13 +5247,13 @@ type EntityConfiguration = { listing?: GetCatalogConfigurationDetailsSchemaListing; product?: GetCatalogConfigurationDetailsProduct; }; -/** @returns {ErrorResponseSchema} */ -declare function ErrorResponseSchema(): ErrorResponseSchema; -type ErrorResponseSchema = { +/** @returns {ErrorResponse} */ +declare function ErrorResponse(): ErrorResponse; +type ErrorResponse = { /** * - A string representing the specific error code. */ - code?: number; + code?: string; /** * - A brief description of the error type. */ @@ -6794,255 +5281,73 @@ type FilerList = { /** @returns {RawProduct} */ declare function RawProduct(): RawProduct; type RawProduct = { - /** - * - Custom JSON data for the product. - */ _custom_json?: any; - /** - * - List of company IDs associated with - * the product. - */ all_company_ids?: number[]; - /** - * - List of all identifiers associated - * with the product. - */ all_identifiers?: string[]; - /** - * - List of sizes available for the product. - */ all_sizes?: any[]; - /** - * - Additional attributes for the product. - */ attributes?: any; brand?: Brand; - /** - * - Unique identifier of the brand. - */ brand_uid?: number; - /** - * - Category details of the product. - */ category?: any; - /** - * - Slug representing the category of the product. - */ category_slug?: string; - /** - * - Unique identifier for the product category. - */ category_uid?: number; - /** - * - Unique identifier of the company associated - * with the product. - */ + color?: string; company_id?: number; - /** - * - Country where the product is manufactured. - */ country_of_origin?: string; - /** - * - Details of the user who created the product. - */ created_by?: any; - /** - * - Timestamp when the product was created. - */ created_on?: string; - /** - * - Currency in which the product is priced. - */ currency?: string; - /** - * - Custom order details for the product. - */ custom_order?: any; - /** - * - List of department IDs associated with - * the product. - */ departments?: number[]; - /** - * - Detailed description of the product. - */ description?: string; - /** - * - List of highlights for the product. - */ highlights?: string[]; - /** - * - HSN code associated with the product for tax purposes. - */ hsn_code?: string; - /** - * - Unique identifier of the product. - */ id?: string; - /** - * - Nature or type of product images. - */ image_nature?: string; - /** - * - List of image URLs for the product. - */ images?: string[]; - /** - * - Indicates whether the product is active. - */ is_active?: boolean; - /** - * - Indicates if the product is dependent on - * another product. - */ is_dependent?: boolean; - /** - * - Indicates if the product has an expiration date. - */ is_expirable?: boolean; - /** - * - Indicates if the product does - * not have associated images. - */ is_image_less_product?: boolean; - /** - * - Indicates if the product is a physical item. - */ is_physical?: boolean; - /** - * - Indicates if the product is part of a set. - */ is_set?: boolean; - /** - * - Unique code representing the item. - */ item_code?: string; - /** - * - Type of the item, such as 'standard'. - */ item_type?: string; - /** - * - L3 category mapping for the product. - */ l3_mapping?: string[]; - /** - * - Media associated with the product, such as - * images or videos. - */ media?: Media[]; - /** - * - Details of the user who last modified the product. - */ modified_by?: any; - /** - * - Timestamp when the product was last modified. - */ modified_on?: string; - /** - * - Minimum order quantity details for the product. - */ moq?: any; - /** - * - Indicates if the product supports multiple sizes. - */ multi_size?: boolean; - /** - * - Name of the product. - */ name?: string; - net_quantity?: NetQuantityResponseSchema; - /** - * - Number of boxes required for packaging the product. - */ + net_quantity?: NetQuantityResponse; no_of_boxes?: number; - /** - * - Pending state of the product, such as pending approval. - */ pending?: string; - /** - * - Primary color of the product. - */ primary_color?: string; - /** - * - Tags associated with the product group. - */ product_group_tag?: string[]; product_publish?: ProductPublished; - return_config?: ReturnConfigResponseSchema; - /** - * - Short description of the product. - */ + return_config?: ReturnConfigResponse; short_description?: string; - /** - * - Size guide for the product. - */ size_guide?: string; - /** - * - List of available sizes for the product. - */ sizes?: any[]; - /** - * - Unique slug identifier for the product. - */ slug?: string; - /** - * - Current stage of the product (e.g., pending, verified). - */ stage?: string; - /** - * - List of tags associated with the product. - */ tags?: string[]; - tax_identifier?: TaxIdentifier; - /** - * - Teaser tags for the product. - */ + tax_identifier?: any; teaser_tag?: any; - /** - * - Template tag associated with the product. - */ template_tag?: string; - /** - * - List of traders associated with the product. - */ trader?: Trader[]; - /** - * - Unique identifier for the product. - */ uid?: number; - /** - * - Variant group details for the product. - */ variant_group?: any; - /** - * - Media related to product variants. - */ variant_media?: any; - /** - * - Product variants information. - */ variants?: any; verified_by?: VerifiedBy; - /** - * - Timestamp when the product was verified. - */ verified_on?: string; - /** - * - List of store IDs where the product is - * available. - */ store_id_list?: string[]; - /** - * - Action to be performed on the product. - */ - action?: string; }; -/** @returns {RawProductListingResponseSchema} */ -declare function RawProductListingResponseSchema(): RawProductListingResponseSchema; -type RawProductListingResponseSchema = { - /** - * - A list of raw product items. - */ +/** @returns {RawProductListingResponse} */ +declare function RawProductListingResponse(): RawProductListingResponse; +type RawProductListingResponse = { items?: RawProduct[]; page?: Page; }; @@ -7056,11 +5361,12 @@ type GTIN = { /** @returns {AttributeDetail} */ declare function AttributeDetail(): AttributeDetail; type AttributeDetail = { - _id?: string[]; + departments?: string[]; description?: string; details?: AttributeMasterDetails; enabled_for_end_consumer?: boolean; filters?: AttributeMasterFilter; + id?: string; is_nested?: boolean; logo?: string; meta?: AttributeMasterMeta; @@ -7068,107 +5374,19 @@ type AttributeDetail = { schema?: AttributeMaster; slug?: string; }; -/** @returns {LatLong} */ -declare function LatLong(): LatLong; -type LatLong = { - /** - * - Type of coordinate data. - */ - type: string; - /** - * - Array containing longitude and latitude coordinates. - */ - coordinates: number[]; -}; -/** @returns {ApplicationLocationAddressSchema} */ -declare function ApplicationLocationAddressSchema(): ApplicationLocationAddressSchema; -type ApplicationLocationAddressSchema = { - /** - * - Primary address line. - */ - address1?: string; - /** - * - Secondary address line. - */ - address2?: string; - /** - * - Pincode of the store's location. - */ - pincode?: number; - /** - * - City where the store is located. - */ - city?: string; - /** - * - Country where the store is located. - */ - country?: string; - /** - * - State where the store is located. - */ - state?: string; - lat_long?: LatLong; - /** - * - Country code for the store's location. - */ - country_code?: string; - /** - * - Schema for address metadata. - */ - address_meta?: any; -}; -/** @returns {GetAddressSchema} */ -declare function GetAddressSchema(): GetAddressSchema; -type GetAddressSchema = { - /** - * - Primary address line, typically including - * street name, building number, or apartment details. - */ +/** @returns {GetAddressSerializer} */ +declare function GetAddressSerializer(): GetAddressSerializer; +type GetAddressSerializer = { address1?: string; - /** - * - Secondary address line, used for additional - * location details such as locality, neighborhood, or landmark. - */ address2?: string; - /** - * - The type of address. - */ address_type?: string; - /** - * - The city where the address is located. - */ city?: string; - /** - * - The country where the address is located. - */ country?: string; - /** - * - The country code representing the - * country, such as 'IN' for India. - */ country_code?: string; - /** - * - A nearby landmark that helps identify the - * address location. - */ landmark?: string; - /** - * - The latitude coordinate of the address, used - * for geolocation purposes. - */ latitude?: number; - /** - * - The longitude coordinate of the address, - * used for geolocation purposes. - */ longitude?: number; - /** - * - The postal code or ZIP code associated with the address. - */ pincode?: number; - /** - * - The state or region where the address is located. - */ state?: string; }; /** @returns {GetAllSizes} */ @@ -7197,9 +5415,9 @@ type GetAutocompleteWordsData = { uid?: string; words?: string[]; }; -/** @returns {GetAutocompleteWordsResponseSchema} */ -declare function GetAutocompleteWordsResponseSchema(): GetAutocompleteWordsResponseSchema; -type GetAutocompleteWordsResponseSchema = { +/** @returns {GetAutocompleteWordsResponse} */ +declare function GetAutocompleteWordsResponse(): GetAutocompleteWordsResponse; +type GetAutocompleteWordsResponse = { items?: GetAutocompleteWordsData[]; page?: Page; }; @@ -7220,7 +5438,7 @@ type GetCatalogConfigurationDetailsSchemaListing = { /** @returns {GetCatalogConfigurationMetaData} */ declare function GetCatalogConfigurationMetaData(): GetCatalogConfigurationMetaData; type GetCatalogConfigurationMetaData = { - listing?: MetaDataListingResponseSchema; + listing?: MetaDataListingResponse; product?: GetCatalogConfigurationDetailsProduct; }; /** @returns {GetCollectionDetailNest} */ @@ -7244,7 +5462,6 @@ type GetCollectionDetailNest = { app_id?: string; badge?: CollectionBadge; banners?: ImageUrls; - cron?: any; /** * - A description of the collection. */ @@ -7323,19 +5540,18 @@ type GetCollectionDetailNest = { */ is_visible?: boolean; }; -/** @returns {GetCollectionItemsResponseSchema} */ -declare function GetCollectionItemsResponseSchema(): GetCollectionItemsResponseSchema; -type GetCollectionItemsResponseSchema = { +/** @returns {GetCollectionItemsResponse} */ +declare function GetCollectionItemsResponse(): GetCollectionItemsResponse; +type GetCollectionItemsResponse = { /** * - An array of filters applicable to * the products in the collection. */ filters?: ProductFilters[]; /** - * - An array of products that - * belong to the collection. + * - List of product details in the collection. */ - items?: ApplicationProductsSchema[]; + items?: ProductListingDetail[]; page?: Page; /** * - Sorting options available for the @@ -7343,9 +5559,9 @@ type GetCollectionItemsResponseSchema = { */ sort_on?: ProductSortOn[]; }; -/** @returns {GetCollectionListingResponseSchema} */ -declare function GetCollectionListingResponseSchema(): GetCollectionListingResponseSchema; -type GetCollectionListingResponseSchema = { +/** @returns {GetCollectionListingResponse} */ +declare function GetCollectionListingResponse(): GetCollectionListingResponse; +type GetCollectionListingResponse = { filters?: CollectionListingFilter; /** * - Array of nested collection details. @@ -7353,66 +5569,28 @@ type GetCollectionListingResponseSchema = { items?: GetCollectionDetailNest[]; page?: Page; }; -/** @returns {GetCollectionQueryOptionResponseSchema} */ -declare function GetCollectionQueryOptionResponseSchema(): GetCollectionQueryOptionResponseSchema; -type GetCollectionQueryOptionResponseSchema = { +/** @returns {GetCollectionQueryOptionResponse} */ +declare function GetCollectionQueryOptionResponse(): GetCollectionQueryOptionResponse; +type GetCollectionQueryOptionResponse = { filters?: ProductFilters[]; operators: any; sort_on?: ProductSortOn[]; }; -/** @returns {GetCompanySchema} */ -declare function GetCompanySchema(): GetCompanySchema; -type GetCompanySchema = { - /** - * - List of addresses associated - * with the company. - */ - addresses?: GetAddressSchema[]; - /** - * - Specifies the business model or legal - * structure of the company, such as 'LLC', 'Corporation', or 'Proprietorship'. - */ +/** @returns {GetCompanySerializer} */ +declare function GetCompanySerializer(): GetCompanySerializer; +type GetCompanySerializer = { + addresses?: GetAddressSerializer[]; business_type?: string; - /** - * - Indicates the type of company, such as - * 'manufacturer-owner', 'retailer', or 'wholesaler'. - */ company_type?: string; - created_by?: UserSchema; - /** - * - The date and time when the company record - * was created. - */ + created_by?: UserSerializer2; created_on?: string; - modified_by?: UserSchema; - /** - * - The date and time when the company record - * was last updated. - */ + modified_by?: UserSerializer2; modified_on?: string; - /** - * - The registered name of the company. - */ name?: string; - /** - * - If applicable, the reason why the - * company's application or status was rejected. - */ reject_reason?: string; - /** - * - Current operational stage of the company, such - * as 'active', 'pending', or 'rejected'. - */ stage?: string; - /** - * - Unique identifier for the company within the system. - */ uid?: number; - verified_by?: UserSchema; - /** - * - The date and time when the company's - * details were verified. - */ + verified_by?: UserSerializer2; verified_on?: string; }; /** @returns {ConditionItem} */ @@ -7441,9 +5619,9 @@ type SortTypeItem = { key?: string; display?: string; }; -/** @returns {GetConfigMetadataResponseSchema} */ -declare function GetConfigMetadataResponseSchema(): GetConfigMetadataResponseSchema; -type GetConfigMetadataResponseSchema = { +/** @returns {GetConfigMetadataResponse} */ +declare function GetConfigMetadataResponse(): GetConfigMetadataResponse; +type GetConfigMetadataResponse = { condition?: ConditionItem[]; data: DataItem[]; page?: Page; @@ -7455,128 +5633,29 @@ type GetConfigMetadataValues = { type?: ValueTypeItem[]; sort?: SortTypeItem[]; }; -/** @returns {GetConfigResponseSchema} */ -declare function GetConfigResponseSchema(): GetConfigResponseSchema; -type GetConfigResponseSchema = { - data: ConfigItem[]; +/** @returns {GetConfigResponse} */ +declare function GetConfigResponse(): GetConfigResponse; +type GetConfigResponse = { + data: any[]; page: PageResponseType; }; -/** @returns {ConfigItem} */ -declare function ConfigItem(): ConfigItem; -type ConfigItem = { - /** - * - Unique identifier for the application to which - * this configuration belongs. - */ - app_id?: string; - attributes?: AttributeConfig[]; - /** - * - Unique identifier for the configuration. - */ - id?: string; - /** - * - Indicates if this configuration is - * currently active for the application. - */ - is_active?: boolean; - /** - * - Specifies whether this is the default - * configuration for the application. - */ - is_default?: boolean; - /** - * - The name of the configuration group. - */ - name?: string; - /** - * - The priority of this configuration group. - */ - priority?: number; - /** - * - A URL-friendly identifier for the configuration group. - */ - slug?: string; - /** - * - A list of template slugs associated - * with this configuration. - */ - template_slugs?: string[]; -}; -/** @returns {AttributeConfig} */ -declare function AttributeConfig(): AttributeConfig; -type AttributeConfig = { - /** - * - The type of display used for the - * attribute (e.g., text, dropdown). - */ - display_type?: string; - /** - * - Indicates whether the attribute is currently active. - */ - is_active?: boolean; - /** - * - A unique key or identifier for the attribute. - */ - key?: string; - /** - * - The name of the attribute. - */ - name?: string; - /** - * - The priority of the attribute. - */ - priority?: number; - /** - * - A URL-friendly identifier for the attribute. - */ - slug?: string; -}; /** @returns {GetDepartment} */ declare function GetDepartment(): GetDepartment; type GetDepartment = { - created_by?: RequestUserSchema; - /** - * - Timestamp of when the department was created. - */ + created_by?: RequestUserSerializer; created_on?: string; - /** - * - Indicates whether the department is currently active. - */ is_active?: boolean; item_type?: string; - /** - * - URL of the department's logo. - */ logo?: string; - modified_by?: RequestUserSchema; - /** - * - Timestamp of when the department was last modified. - */ + modified_by?: RequestUserSerializer; modified_on?: string; - /** - * - Alternate unique identifier for the department. - */ - id?: string; - /** - * - Name of the department. - */ name?: string; - /** - * - URL-friendly slug for the department. - */ + page_no?: number; + page_size?: number; + priority_order?: number; + search?: string; slug?: string; - /** - * - List of alternative names for the department. - */ synonyms?: string[]; - /** - * - The priority order of the department - * for display purposes. - */ - priority_order?: number; - /** - * - Unique identifier for the department within the system. - */ uid?: number; }; /** @returns {GetInventories} */ @@ -7584,180 +5663,69 @@ declare function GetInventories(): GetInventories; type GetInventories = { brand?: InventoryBrandMeta; company?: InventoryCompanyMeta; - /** - * - Country where the product was manufactured. - */ country_of_origin?: string; - created_by?: RequestUserSchema; + created_by?: RequestUserSerializer; date_meta?: DateMeta; - dimension?: InventoryDimensionResponseSchema; - /** - * - Expiration date of the product. - */ + dimension?: InventoryDimensionResponse; expiration_date?: string; - /** - * - Unique identifier of the product. - */ id?: string; - identifier?: Identifier; - /** - * - The last date when inventory - * information was updated. - */ + identifier?: any; inventory_updated_on?: string; - /** - * - Indicates if the product is sold as a set. - */ is_set?: boolean; - /** - * - Unique item ID for the product. - */ item_id?: number; - manufacturer?: InventoryManufacturerResponseSchema; - modified_by?: RequestUserSchema; - /** - * - Indicates platform availability status for - * the product. - */ + manufacturer?: InventoryManufacturerResponse; + modified_by?: RequestUserSerializer; platforms?: any; price?: PriceArticle; quantities?: QuantitiesArticle; return_config?: ReturnConfig; - /** - * - Seller’s identifier for the product. - */ seller_identifier?: string; - /** - * - Size of the product. - */ size?: string; - /** - * - Current stage of the product, such as verified or pending. - */ stage?: string; - store?: ArticleStoreResponseSchema; - /** - * - Tags associated with the product. - */ + store?: ArticleStoreResponse; tags?: string[]; - tax_identifier?: TaxIdentifier; - /** - * - Total available quantity of the product. - */ + tax_identifier?: any; total_quantity?: number; - /** - * - Trace ID for inventory management. - */ trace_id?: string; - /** - * - Indicates if the inventory is being tracked. - */ track_inventory?: boolean; - /** - * - Information about traders, such - * as manufacturers or importers. - */ - trader?: TraderResponseSchema[]; - /** - * - Unique identifier for the product. - */ + trader?: TraderResponse[]; uid?: string; - weight?: InventoryWeightResponseSchema; + weight?: InventoryWeightResponse; }; -/** @returns {GetInventoriesResponseSchema} */ -declare function GetInventoriesResponseSchema(): GetInventoriesResponseSchema; -type GetInventoriesResponseSchema = { - /** - * - List of product inventories. - */ +/** @returns {GetInventoriesResponse} */ +declare function GetInventoriesResponse(): GetInventoriesResponse; +type GetInventoriesResponse = { items?: GetInventories[]; page?: Page; }; -/** @returns {GetLocationSchema} */ -declare function GetLocationSchema(): GetLocationSchema; -type GetLocationSchema = { - /** - * - Custom JSON data specific to the location. - */ +/** @returns {GetLocationSerializer} */ +declare function GetLocationSerializer(): GetLocationSerializer; +type GetLocationSerializer = { _custom_json?: any; - address: GetAddressSchema; - /** - * - Unique identifier code for the store. - */ - store_code: string; - company?: GetCompanySchema; - /** - * - List of contact numbers - * associated with the store. - */ + address: GetAddressSerializer; + code: string; + company?: GetCompanySerializer; contact_numbers?: SellerPhoneNumber[]; - created_by?: UserSchema; - /** - * - Timestamp indicating when the location was created. - */ + created_by?: UserSerializer3; created_on?: string; - /** - * - Display name of the location for easier - * identification. - */ display_name: string; - /** - * - Documents related to the store location. - */ documents?: Document[]; - gst_credentials?: InvoiceDetailsSchema; + gst_credentials?: InvoiceDetailsSerializer; integration_type?: LocationIntegrationType; - manager?: LocationManagerSchema; - modified_by?: UserSchema; - /** - * - Timestamp indicating when the location - * details were last modified. - */ + manager?: LocationManagerSerializer; + modified_by?: UserSerializer3; modified_on?: string; - /** - * - Name of the store location. - */ name: string; - /** - * - Email addresses for sending - * notifications related to this store. - */ notification_emails?: string[]; - /** - * - Primary phone number for contacting the store. - */ phone_number: string; - product_return_config?: ProductReturnConfigSchema; - /** - * - Current operational stage of the store. - */ + product_return_config?: ProductReturnConfigSerializer; stage?: string; - /** - * - Type of store. - */ store_type?: string; - /** - * - The daily operational timings - * for the store. - */ - timing?: LocationDayWiseSchema[]; - /** - * - Unique identifier for the store. - */ + timing?: LocationDayWiseSerializer[]; uid?: number; - verified_by?: UserSchema; - /** - * - Timestamp when the store location was verified. - */ + verified_by?: UserSerializer3; verified_on?: string; - /** - * - Warnings or issues associated with the store, if any. - */ warnings?: any; - /** - * - ID of the company to which this store belongs. - */ - company_id?: number; }; /** @returns {GetOptInPlatform} */ declare function GetOptInPlatform(): GetOptInPlatform; @@ -7765,350 +5733,105 @@ type GetOptInPlatform = { items: CompanyOptIn[]; page: Page; }; -/** @returns {GetProductBundleCreateResponseSchema} */ -declare function GetProductBundleCreateResponseSchema(): GetProductBundleCreateResponseSchema; -type GetProductBundleCreateResponseSchema = { - /** - * - Specifies the type of bundle, e.g., single or multi. - */ +/** @returns {GetProductBundleCreateResponse} */ +declare function GetProductBundleCreateResponse(): GetProductBundleCreateResponse; +type GetProductBundleCreateResponse = { choice: string; - /** - * - Unique identifier for the company that owns - * the product bundle. - */ company_id?: number; - created_by?: CreatedBy; - /** - * - Timestamp when the product bundle was created. - */ + created_by?: any; created_on?: string; - /** - * - Unique identifier for the product bundle. - */ id?: string; - /** - * - Indicates if the product bundle is active or not. - */ is_active: boolean; - /** - * - URL of the product bundle's logo, or null if not available. - */ logo?: string; - /** - * - Additional metadata about the product bundle. - */ meta?: any; - modified_by?: ModifiedBy; - /** - * - Timestamp when the product bundle was last modified. - */ + modified_by?: any; modified_on?: string; - /** - * - Name of the product bundle. - */ name: string; - /** - * - Visibility settings for the product - * bundle across different pages. - */ page_visibility?: string[]; - /** - * - List of products that are part of - * the product bundle. - */ products: ProductBundleItem[]; - /** - * - Indicates whether all products - * in the bundle belong to the same store. - */ same_store_assignment?: boolean; - /** - * - Unique slug used to identify the product bundle in URLs. - */ slug: string; }; -/** @returns {GetProductBundleListingResponseSchema} */ -declare function GetProductBundleListingResponseSchema(): GetProductBundleListingResponseSchema; -type GetProductBundleListingResponseSchema = { - /** - * - List of product - * bundles that are returned in the response. - */ - items?: GetProductBundleCreateResponseSchema[]; +/** @returns {GetProductBundleListingResponse} */ +declare function GetProductBundleListingResponse(): GetProductBundleListingResponse; +type GetProductBundleListingResponse = { + items?: GetProductBundleCreateResponse[]; page?: Page; }; -/** @returns {GetProductBundleResponseSchema} */ -declare function GetProductBundleResponseSchema(): GetProductBundleResponseSchema; -type GetProductBundleResponseSchema = { - /** - * - Specifies the type of product bundle, e.g., - * 'single' or 'multi'. - */ +/** @returns {GetProductBundleResponse} */ +declare function GetProductBundleResponse(): GetProductBundleResponse; +type GetProductBundleResponse = { choice?: string; - /** - * - The unique identifier of the company that - * owns the product bundle. - */ company_id?: number; - /** - * - Indicates whether the product bundle is active. - */ is_active?: boolean; - /** - * - URL of the logo associated with the product bundle. - */ logo?: string; - /** - * - Additional metadata for the product bundle. - */ meta?: any; - /** - * - The name of the product bundle. - */ name?: string; - /** - * - List of pages where the product - * bundle is visible, e.g., 'pdp'. - */ page_visibility?: string[]; - /** - * - A list of products included in the bundle. - */ products?: GetProducts[]; - /** - * - Indicates whether all products - * in the bundle are assigned to the same store. - */ same_store_assignment?: boolean; - /** - * - Unique URL-friendly identifier for the product bundle. - */ slug?: string; }; /** @returns {GetProducts} */ declare function GetProducts(): GetProducts; type GetProducts = { - /** - * - Indicates whether the product can be - * removed from the bundle. - */ allow_remove?: boolean; - /** - * - Specifies if the product is - * automatically added to the cart. - */ auto_add_to_cart?: boolean; - /** - * - Indicates if the product is automatically - * selected in the bundle. - */ auto_select?: boolean; - /** - * - The maximum quantity of the product that - * can be added to the bundle. - */ max_quantity?: number; - /** - * - The minimum quantity of the product that - * must be added to the bundle. - */ min_quantity?: number; - /** - * - Unique identifier for the product. - */ - product_uid?: number; - product_details?: ProductDetails; -}; -/** @returns {ProductDetails} */ -declare function ProductDetails(): ProductDetails; -type ProductDetails = { - /** - * - Unique URL-friendly identifier for the product. - */ - slug?: string; - /** - * - The quantity of the product available. - */ - quantity?: number; - /** - * - A set of key-value pairs representing the - * attributes of the product, such as pattern, gender, etc. - */ - attributes?: any; price?: Price; - /** - * - List of URLs pointing to images of the product. - */ - images?: string[]; - /** - * - Unique identifier for the product. - */ - uid?: number; - /** - * - Code assigned to the product for inventory purposes. - */ - item_code?: string; - /** - * - Identification details for the product, - * including EANs (European Article Numbers). - */ - identifier?: any; - /** - * - List of available sizes for the product. - */ - sizes?: string[]; - /** - * - Country where the product was manufactured. - */ - country_of_origin?: string; + product_details?: LimitedProductData; + product_uid?: number; + sizes?: Size[]; }; -/** @returns {GetCollectionDetailResponseSchema} */ -declare function GetCollectionDetailResponseSchema(): GetCollectionDetailResponseSchema; -type GetCollectionDetailResponseSchema = { - /** - * - Custom JSON data associated with the collection. - */ +/** @returns {GetCollectionDetailResponse} */ +declare function GetCollectionDetailResponse(): GetCollectionDetailResponse; +type GetCollectionDetailResponse = { _custom_json?: any; - /** - * - Locale-specific language details. - */ _locale_language?: any; _schedule?: CollectionSchedule; - /** - * - Action details, including navigation or page - * redirection information. - */ action?: any; - /** - * - Indicates whether facets are allowed for - * filtering the collection. - */ allow_facets?: boolean; - /** - * - Indicates whether sorting is enabled for - * the collection. - */ allow_sort?: boolean; - /** - * - The unique identifier of the application to - * which the collection belongs. - */ app_id?: string; badge?: CollectionBadge; banners?: ImageUrls; - /** - * - A textual description of the collection. - */ description?: string; - /** - * - Indicates whether the collection is currently active. - */ is_active?: boolean; - /** - * - Indicates whether the collection is - * visible on the platform. - */ is_visible?: boolean; logo?: Media; - /** - * - Metadata associated with the collection. - */ meta?: any; - /** - * - The name of the collection. - */ name?: string; - /** - * - The priority level assigned to the collection. - */ priority?: number; - /** - * - Indicates whether the collection is - * published and visible to customers. - */ published?: boolean; - /** - * - Query details that define how items - * in the collection are filtered. - */ query?: CollectionQuery[]; seo?: SeoDetail; - /** - * - The URL-friendly slug for the collection. - */ slug?: string; - /** - * - The sorting criteria applied to the collection - * (e.g., by latest, discount). - */ sort_on?: string; - /** - * - Tags associated with the collection. - */ tags?: string[]; - /** - * - The type of the collection (e.g., query-based). - */ type?: string; - /** - * - A unique identifier for the collection. - */ uid?: string; - /** - * - A unique identifier for the collection, matching `uid`. - */ - _id?: string; - /** - * - Keys representing visible facets - * for filtering. - */ visible_facets_keys?: string[]; }; /** @returns {CommonResponseSchemaCollection} */ declare function CommonResponseSchemaCollection(): CommonResponseSchemaCollection; type CommonResponseSchemaCollection = { - /** - * - A message providing details about the response. - */ message?: string; }; -/** @returns {GetQueryFiltersKeysResponseSchema} */ -declare function GetQueryFiltersKeysResponseSchema(): GetQueryFiltersKeysResponseSchema; -type GetQueryFiltersKeysResponseSchema = { - /** - * - An array of available filter - * keys for querying products. - */ +/** @returns {GetQueryFiltersKeysResponse} */ +declare function GetQueryFiltersKeysResponse(): GetQueryFiltersKeysResponse; +type GetQueryFiltersKeysResponse = { filters?: ProductFiltersKeysOnly[]; - /** - * - A map of available operators that can be used - * for querying, where the key is the operator type and the value is a string. - */ operators: any; - /** - * - An array of sorting options available - * for the products. - */ sort_on?: ProductSortOn[]; }; -/** @returns {GetQueryFiltersResponseSchema} */ -declare function GetQueryFiltersResponseSchema(): GetQueryFiltersResponseSchema; -type GetQueryFiltersResponseSchema = { - /** - * - An array of filters to be - * applied on products while querying. - */ - filters?: CollectionProductFilters[]; - /** - * - A map of operators available for product - * queries, where the key is the operator type and the value is a string. - */ +/** @returns {GetQueryFiltersResponse} */ +declare function GetQueryFiltersResponse(): GetQueryFiltersResponse; +type GetQueryFiltersResponse = { + filters?: ProductFilters[]; operators: any; - /** - * - An array of sorting options - * to be applied to product queries. - */ - sort_on?: CollectionProductSortOn[]; + sort_on?: ProductSortOn[]; }; /** @returns {GetCollectionItemsResponseSchemaV2} */ declare function GetCollectionItemsResponseSchemaV2(): GetCollectionItemsResponseSchemaV2; @@ -8132,51 +5855,18 @@ type Page1 = { /** @returns {CollectionItemSchemaV2} */ declare function CollectionItemSchemaV2(): CollectionItemSchemaV2; type CollectionItemSchemaV2 = { - /** - * - Specifies whether the item should be added or - * removed from the collection. - */ action: string; - /** - * - The unique identifier of the item in the collection. - */ item_id: number; - /** - * - The priority level of the item in the - * collection, with higher values representing higher priority. - */ priority?: number; }; /** @returns {CollectionItemUpdateSchema} */ declare function CollectionItemUpdateSchema(): CollectionItemUpdateSchema; type CollectionItemUpdateSchema = { - /** - * - Indicates whether facets are allowed for - * filtering the collection items. - */ allow_facets?: boolean; - /** - * - Indicates whether sorting is enabled for - * the collection items. - */ allow_sort?: boolean; - /** - * - A list of items in the collection. - */ items?: CollectionItemSchemaV2[]; - /** - * - A list of query conditions to - * filter the collection items. - */ query?: CollectionQuerySchemaV2[]; - /** - * - The type of the collection item, defining its classification. - */ type: string; - /** - * - A list of keys representing - * visible facets for the collection, used for filtering. - */ visible_facets_keys?: string[]; }; /** @returns {CollectionQuerySchemaV2} */ @@ -8211,9 +5901,9 @@ type ProductDetailV2 = { slug: string; uid?: number; }; -/** @returns {GetSearchConfigurationResponseSchema} */ -declare function GetSearchConfigurationResponseSchema(): GetSearchConfigurationResponseSchema; -type GetSearchConfigurationResponseSchema = { +/** @returns {GetSearchConfigurationResponse} */ +declare function GetSearchConfigurationResponse(): GetSearchConfigurationResponse; +type GetSearchConfigurationResponse = { /** * - The application id where custom search * configuration is set @@ -8224,9 +5914,10 @@ type GetSearchConfigurationResponseSchema = { */ company_id: number; /** - * - The user who created the search configuration. + * - The user who created the search + * configuration. */ - created_by?: UserSchema; + created_by?: UserSerializer; /** * - The date and time when the search * configuration was created. @@ -8238,9 +5929,10 @@ type GetSearchConfigurationResponseSchema = { */ is_proximity_enabled?: boolean; /** - * - The user who modified the search configuration. + * - The user who modified the search + * configuration. */ - modified_by?: UserSchema; + modified_by?: UserSerializer; /** * - The date and time when the search * configuration was last modified. @@ -8266,15 +5958,15 @@ type GetSearchWordsData = { uid?: string; words?: string[]; }; -/** @returns {GetSearchWordsDetailResponseSchema} */ -declare function GetSearchWordsDetailResponseSchema(): GetSearchWordsDetailResponseSchema; -type GetSearchWordsDetailResponseSchema = { +/** @returns {GetSearchWordsDetailResponse} */ +declare function GetSearchWordsDetailResponse(): GetSearchWordsDetailResponse; +type GetSearchWordsDetailResponse = { items?: GetSearchWordsData; page?: Page; }; -/** @returns {GetSearchWordsResponseSchema} */ -declare function GetSearchWordsResponseSchema(): GetSearchWordsResponseSchema; -type GetSearchWordsResponseSchema = { +/** @returns {GetSearchWordsResponse} */ +declare function GetSearchWordsResponse(): GetSearchWordsResponse; +type GetSearchWordsResponse = { items?: GetSearchWordsData[]; page?: Page; }; @@ -8293,9 +5985,9 @@ declare function Guide(): Guide; type Guide = { meta?: Meta; }; -/** @returns {HSNCodesResponseSchema} */ -declare function HSNCodesResponseSchema(): HSNCodesResponseSchema; -type HSNCodesResponseSchema = { +/** @returns {HSNCodesResponse} */ +declare function HSNCodesResponse(): HSNCodesResponse; +type HSNCodesResponse = { data?: HSNData; message?: string; }; @@ -8305,32 +5997,6 @@ type HSNData = { country_of_origin?: string[]; hsn_code?: string[]; }; -/** @returns {CreatedBySchema} */ -declare function CreatedBySchema(): CreatedBySchema; -type CreatedBySchema = { - /** - * - The unique identifier for the user who created - * the resource. - */ - user_id: string; - /** - * - The username of the user who created the resource. - */ - username: string; -}; -/** @returns {ModifiedBySchema} */ -declare function ModifiedBySchema(): ModifiedBySchema; -type ModifiedBySchema = { - /** - * - The unique identifier for the user who last - * modified the resource. - */ - user_id: string; - /** - * - The username of the user who last modified the resource. - */ - username: string; -}; /** @returns {HSNDataInsertV2} */ declare function HSNDataInsertV2(): HSNDataInsertV2; type HSNDataInsertV2 = { @@ -8338,8 +6004,10 @@ type HSNDataInsertV2 = { * - Country code. */ country_code: string; - created_by?: CreatedBySchema; - modified_by?: ModifiedBySchema; + /** + * - Details of the user who created the HSN data. + */ + created_by?: any; /** * - Date and time when the HSN data was created. */ @@ -8348,11 +6016,18 @@ type HSNDataInsertV2 = { * - Description of the HSN data. */ description: string; + /** + * - HSN code. + */ hsn_code: string; /** * - Unique identifier of the HSN code. */ hsn_code_id?: string; + /** + * - Details of the user who last modified the HSN data. + */ + modified_by?: any; /** * - Date and time when the HSN data was last modified. */ @@ -8360,13 +6035,9 @@ type HSNDataInsertV2 = { /** * - HSN code. */ - reporting_hsn: any; - /** - * - Internal database identifier for the HSN data. - */ - id?: string; + reporting_hsn: string; /** - * - List of applicable tax slabs for the HSN data. + * - List of tax slabs. */ taxes: TaxSlab[]; /** @@ -8405,7 +6076,7 @@ type HsnCode = { declare function HsnCodesListingResponseSchemaV2(): HsnCodesListingResponseSchemaV2; type HsnCodesListingResponseSchemaV2 = { items?: HSNDataInsertV2[]; - page?: PageResponseSchema; + page?: PageResponse; }; /** @returns {HsnCodesObject} */ declare function HsnCodesObject(): HsnCodesObject; @@ -8466,7 +6137,7 @@ type HsnUpsert = { /** * - The HS2 code. */ - hs2_code?: string; + hs2_code: string; /** * - The HSN code. */ @@ -8562,9 +6233,9 @@ type InvSize = { size: string; store_code: string; }; -/** @returns {InventoryBulkRequestSchema} */ -declare function InventoryBulkRequestSchema(): InventoryBulkRequestSchema; -type InventoryBulkRequestSchema = { +/** @returns {InventoryBulkRequest} */ +declare function InventoryBulkRequest(): InventoryBulkRequest; +type InventoryBulkRequest = { batch_id: string; company_id: number; sizes: InventoryJobPayload[]; @@ -8576,9 +6247,9 @@ type InventoryConfig = { data?: FilerList[]; multivalues?: boolean; }; -/** @returns {InventoryCreateRequestSchema} */ -declare function InventoryCreateRequestSchema(): InventoryCreateRequestSchema; -type InventoryCreateRequestSchema = { +/** @returns {InventoryCreateRequest} */ +declare function InventoryCreateRequest(): InventoryCreateRequest; +type InventoryCreateRequest = { /** * - The list of attributes that you want to extract * in the export job. @@ -8672,14 +6343,14 @@ type InventoryExportJob = { */ url?: string; }; -/** @returns {InventoryExportJobListResponseSchema} */ -declare function InventoryExportJobListResponseSchema(): InventoryExportJobListResponseSchema; -type InventoryExportJobListResponseSchema = { +/** @returns {InventoryExportJobListResponse} */ +declare function InventoryExportJobListResponse(): InventoryExportJobListResponse; +type InventoryExportJobListResponse = { /** - * - This is the list/history - * of all the jobs. + * - This is the list/history of + * all the jobs. */ - items: InventoryJobDetailResponseSchema; + items: InventoryJobDetailResponse; page?: Page; }; /** @returns {InventoryExportQuantityFilter} */ @@ -8698,16 +6369,16 @@ type InventoryExportQuantityFilter = { */ operators: string; }; -/** @returns {InventoryExportRequestSchema} */ -declare function InventoryExportRequestSchema(): InventoryExportRequestSchema; -type InventoryExportRequestSchema = { +/** @returns {InventoryExportRequest} */ +declare function InventoryExportRequest(): InventoryExportRequest; +type InventoryExportRequest = { brand?: number[]; store?: number[]; type?: string; }; -/** @returns {InventoryExportResponseSchema} */ -declare function InventoryExportResponseSchema(): InventoryExportResponseSchema; -type InventoryExportResponseSchema = { +/** @returns {InventoryExportResponse} */ +declare function InventoryExportResponse(): InventoryExportResponse; +type InventoryExportResponse = { /** * - The user that created the job. */ @@ -8716,7 +6387,10 @@ type InventoryExportResponseSchema = { * - Creation datetime of the job */ created_on?: string; - filters?: Filters; + /** + * - The filters that needs to be exported. + */ + filters?: any; /** * - Modification date of the job */ @@ -8754,9 +6428,9 @@ type InventoryFailedReason = { */ message: string; }; -/** @returns {InventoryJobDetailResponseSchema} */ -declare function InventoryJobDetailResponseSchema(): InventoryJobDetailResponseSchema; -type InventoryJobDetailResponseSchema = { +/** @returns {InventoryJobDetailResponse} */ +declare function InventoryJobDetailResponse(): InventoryJobDetailResponse; +type InventoryJobDetailResponse = { /** * - This is the user detail of the user * who cancelled the job. @@ -8808,10 +6482,6 @@ type InventoryJobDetailResponseSchema = { * - This tells you the current status of the export job. */ status?: string; - /** - * - Provides count of total/success/failed - */ - stats?: any; /** * - This is the task id of the jobs that is used for search. */ @@ -8913,35 +6583,12 @@ type InventoryJobPayload = { /** @returns {InventoryPage} */ declare function InventoryPage(): InventoryPage; type InventoryPage = { - /** - * - Indicates whether there is a next page of results. - */ has_next?: boolean; - /** - * - Indicates whether there is a previous - * page of results. - */ has_previous?: boolean; - /** - * - The total number of items available in the inventory. - */ item_total: number; - /** - * - The identifier for fetching the next set of - * results. If null, there are no more results. - */ next_id?: string; - /** - * - The type of pagination being used, often indicating - * the method or strategy for paginating the results. - */ type: string; }; -/** @returns {AddInventoryRequestPayload} */ -declare function AddInventoryRequestPayload(): AddInventoryRequestPayload; -type AddInventoryRequestPayload = { - sizes?: InventoryResponseSchema[]; -}; /** @returns {InventoryPayload} */ declare function InventoryPayload(): InventoryPayload; type InventoryPayload = { @@ -8978,9 +6625,9 @@ type InventoryPayload = { */ trace_id?: string; }; -/** @returns {InventoryRequestSchema} */ -declare function InventoryRequestSchema(): InventoryRequestSchema; -type InventoryRequestSchema = { +/** @returns {InventoryRequest} */ +declare function InventoryRequest(): InventoryRequest; +type InventoryRequest = { company_id: number; item: ItemQuery; sizes: InvSize[]; @@ -9001,90 +6648,22 @@ type InventoryRequestSchemaV2 = { */ payload?: InventoryPayload[]; }; -/** @returns {InventoryResponseSchema} */ -declare function InventoryResponseSchema(): InventoryResponseSchema; -type InventoryResponseSchema = { - /** - * - The currency in which the item is priced, e.g., 'INR'. - */ +/** @returns {InventoryResponse} */ +declare function InventoryResponse(): InventoryResponse; +type InventoryResponse = { currency?: string; - /** - * - Object containing identifier details such - * as GTIN or SKU codes. - */ identifiers?: any; - /** - * - The date and time when the - * inventory was last updated, in ISO 8601 format. - */ inventory_updated_on?: string; - /** - * - The unique identifier for the item in the - * inventory system. - */ item_id?: number; - /** - * - The original price of the item. - */ price?: number; - /** - * - The effective price of the item after - * any discounts. - */ price_effective?: number; - /** - * - The transfer price for the item (if applicable). - */ price_transfer?: number; - /** - * - The total quantity of the item available in - * the inventory. - */ quantity?: number; - /** - * - The quantity of the item that is - * available for sale. - */ sellable_quantity?: number; - /** - * - An identifier for the seller, - * typically an SKU or unique code. - */ seller_identifier?: string; - /** - * - The size of the item, if applicable. - */ size?: string; - /** - * - Object containing details about the store where - * the item is stocked. - */ store?: any; - /** - * - A unique identifier combining store ID and seller - * identifier. - */ uid?: string; - /** - * - Details of the user or entity that created - * the item record, including 'username' and 'user_id'. - */ - created_by?: any; - /** - * - Details of the user or entity that last - * modified the item record, including 'username' and 'user_id'. - */ - modified_by?: any; - /** - * - The expiration date of the item, if - * applicable, in ISO 8601 format. - */ - expiration_date?: string; - /** - * - An array of tags or labels associated with the - * item for categorization or search purposes. - */ - tags?: string[]; }; /** @returns {InventoryResponseItem} */ declare function InventoryResponseItem(): InventoryResponseItem; @@ -9095,24 +6674,18 @@ type InventoryResponseItem = { /** @returns {InventoryResponsePaginated} */ declare function InventoryResponsePaginated(): InventoryResponsePaginated; type InventoryResponsePaginated = { - items?: InventoryResponseSchema[]; + items?: InventoryResponse[]; page?: Page; }; /** @returns {InventorySellerIdentifierResponsePaginated} */ declare function InventorySellerIdentifierResponsePaginated(): InventorySellerIdentifierResponsePaginated; type InventorySellerIdentifierResponsePaginated = { - items?: InventorySellerResponseSchema[]; - page?: Page; -}; -/** @returns {ApplicationInventorySellerIdentifierResponsePaginated} */ -declare function ApplicationInventorySellerIdentifierResponsePaginated(): ApplicationInventorySellerIdentifierResponsePaginated; -type ApplicationInventorySellerIdentifierResponsePaginated = { - items?: InventorySellerResponseSchema[]; + items?: InventorySellerResponse[]; page?: Page; }; -/** @returns {InventorySellerResponseSchema} */ -declare function InventorySellerResponseSchema(): InventorySellerResponseSchema; -type InventorySellerResponseSchema = { +/** @returns {InventorySellerResponse} */ +declare function InventorySellerResponse(): InventorySellerResponse; +type InventorySellerResponse = { /** * - Custom JSON data for the article. */ @@ -9141,7 +6714,7 @@ type InventorySellerResponseSchema = { /** * - The dimensions of the article. */ - dimension: DimensionResponseSchema; + dimension: DimensionResponse; /** * - The expiration date of the article. */ @@ -9178,7 +6751,7 @@ type InventorySellerResponseSchema = { /** * - The manufacturer of the article. */ - manufacturer: ManufacturerResponseSchema; + manufacturer: ManufacturerResponse; /** * - Additional metadata for the article. */ @@ -9196,7 +6769,10 @@ type InventorySellerResponseSchema = { * - The raw metadata of the article. */ raw_meta?: any; - return_config?: InventoryReturnConfig; + /** + * - The return configuration of the article. + */ + return_config?: ReturnConfig1; /** * - The seller identifier of the article. */ @@ -9218,7 +6794,10 @@ type InventorySellerResponseSchema = { * - The tags associated with the article. */ tags?: string[]; - tax_identifier?: TaxIdentifier; + /** + * - The tax identifier of the article. + */ + tax_identifier?: any; /** * - The total quantity of the article. */ @@ -9235,7 +6814,7 @@ type InventorySellerResponseSchema = { /** * - The traders associated with the article. */ - trader?: Trader[]; + trader?: Trader1[]; /** * - The unique identifier of the article. */ @@ -9243,237 +6822,48 @@ type InventorySellerResponseSchema = { /** * - The weight of the article. */ - weight: WeightResponseSchema; + weight: WeightResponse; }; -/** @returns {ApplicationInventorySellerResponseSchema} */ -declare function ApplicationInventorySellerResponseSchema(): ApplicationInventorySellerResponseSchema; -type ApplicationInventorySellerResponseSchema = { - /** - * - Custom JSON data for the article. - */ - _custom_json?: any; - /** - * - The date and time when the article was - * added to the store. - */ - added_on_store?: string; - /** - * - The metadata of the brand. - */ - brand: BrandMeta; - /** - * - The metadata of the company. - */ - company: CompanyMeta; - /** - * - The country of origin of the article. - */ - country_of_origin: string; - /** - * - The user who created the article. - */ - created_by?: string; - /** - * - The dimensions of the article. - */ - dimension: DimensionResponseSchema; - /** - * - The expiration date of the article. - */ - expiration_date?: string; - /** - * - Indicates if the article is fragile. - */ - fragile: boolean; - /** - * - The Fynd article code. - */ - fynd_article_code: string; - /** - * - The Fynd item code. - */ - fynd_item_code: string; - /** - * - The Fynd metadata of the article. - */ - fynd_meta?: any; - /** - * - The identifier of the article. - */ - identifier: any; - /** - * - Indicates if the article is active. - */ - is_active?: boolean; - is_set?: boolean; - /** - * - The ID of the item. - */ - item_id: number; - /** - * - The manufacturer of the article. - */ - manufacturer: ManufacturerResponseSchema; - /** - * - Additional metadata for the article. - */ - meta?: any; - /** - * - The user who modified the article. - */ - modified_by?: string; - /** - * - The price metadata of the article. - */ - price: PriceMeta; - quantities?: Quantities; +/** @returns {InventorySet} */ +declare function InventorySet(): InventorySet; +type InventorySet = { + name?: string; + quantity?: number; + size_distribution: SizeDistribution; +}; +/** @returns {InventoryStockResponse} */ +declare function InventoryStockResponse(): InventoryStockResponse; +type InventoryStockResponse = { + items?: any[]; + page: InventoryPage; +}; +/** @returns {InventoryUpdateResponse} */ +declare function InventoryUpdateResponse(): InventoryUpdateResponse; +type InventoryUpdateResponse = { + items?: InventoryResponseItem[]; /** - * - The raw metadata of the article. - */ - raw_meta?: any; - return_config?: InventoryReturnConfig; - /** - * - The seller identifier of the article. - */ - seller_identifier: string; - set?: InventorySet; - /** - * - The size of the article. - */ - size: string; - /** - * - The stage of the article. - */ - stage?: string; - /** - * - The metadata of the store. - */ - store: StoreMeta; - /** - * - The tags associated with the article. - */ - tags?: string[]; - tax_identifier?: TaxIdentifier; - /** - * - The total quantity of the article. - */ - total_quantity: number; - /** - * - The trace ID of the article. - */ - trace_id?: string; - /** - * - Indicates if the inventory is tracked - * for the article. - */ - track_inventory?: boolean; - /** - * - The traders associated with the article. - */ - trader?: Trader[]; - /** - * - The unique identifier of the article. - */ - uid: string; - /** - * - The weight of the article. - */ - weight: WeightResponseSchema; - date_meta?: DateMeta; - /** - * - Platform-specific availability information. - */ - platforms?: any; - /** - * - Marked price of the item. - */ - price_marked?: number; - /** - * - Effective price of the item after discount. - */ - price_effective?: number; - /** - * - Currency in which the prices are listed. - */ - currency?: string; - /** - * - Selling price of the item. - */ - price_selling?: number; - /** - * - Discount metadata for the item. - */ - discount_meta?: any; - /** - * - Discounts applied to the item, if any. - */ - discount_applied?: any; -}; -/** @returns {InventorySet} */ -declare function InventorySet(): InventorySet; -type InventorySet = { - /** - * - The name of the inventory set. - */ - name?: string; - /** - * - The quantity of items available in the inventory set. - */ - quantity?: number; - size_distribution: SizeDistribution; -}; -/** @returns {InventoryStockResponseSchema} */ -declare function InventoryStockResponseSchema(): InventoryStockResponseSchema; -type InventoryStockResponseSchema = { - /** - * - An array of inventory stock items. Each item - * represents a stock entry for a specific product or SKU. - */ - items?: any[]; - page: InventoryPage; -}; -/** @returns {InventoryUpdateResponseSchema} */ -declare function InventoryUpdateResponseSchema(): InventoryUpdateResponseSchema; -type InventoryUpdateResponseSchema = { - items?: InventoryResponseItem[]; - /** - * - It is the success message of the inventory update. + * - It is the success message of the inventory update. */ message: string; - /** - * - It is the success status of the inventory update. - */ - success?: boolean; }; -/** @returns {InventoryValidationResponseSchema} */ -declare function InventoryValidationResponseSchema(): InventoryValidationResponseSchema; -type InventoryValidationResponseSchema = { +/** @returns {InventoryValidationResponse} */ +declare function InventoryValidationResponse(): InventoryValidationResponse; +type InventoryValidationResponse = { data?: any; message?: string; }; -/** @returns {InvoiceCredSchema} */ -declare function InvoiceCredSchema(): InvoiceCredSchema; -type InvoiceCredSchema = { - /** - * - Indicates whether the invoice credentials are - * enabled for use. - */ +/** @returns {InvoiceCredSerializer} */ +declare function InvoiceCredSerializer(): InvoiceCredSerializer; +type InvoiceCredSerializer = { enabled?: boolean; - /** - * - The password associated with the invoice credentials. - */ password?: string; - /** - * - The username or identifier used for the - * invoice credentials. - */ username?: string; }; -/** @returns {InvoiceDetailsSchema} */ -declare function InvoiceDetailsSchema(): InvoiceDetailsSchema; -type InvoiceDetailsSchema = { - e_invoice?: InvoiceCredSchema; - e_waybill?: InvoiceCredSchema; +/** @returns {InvoiceDetailsSerializer} */ +declare function InvoiceDetailsSerializer(): InvoiceDetailsSerializer; +type InvoiceDetailsSerializer = { + e_invoice?: InvoiceCredSerializer; + e_waybill?: InvoiceCredSerializer; }; /** @returns {ItemQuery} */ declare function ItemQuery(): ItemQuery; @@ -9519,180 +6909,63 @@ type LimitedProductData = { slug?: string; uid?: number; }; -/** @returns {SizeGuideItem} */ -declare function SizeGuideItem(): SizeGuideItem; -type SizeGuideItem = { - /** - * - Indicates if the size guide is active or not. - */ - active?: boolean; - /** - * - The identifier for the brand associated with - * the size guide. - */ - brand_id?: number; - /** - * - The identifier for the company that owns - * the size guide. - */ - company_id?: number; - created_by?: CreatedBySchema; - /** - * - The timestamp when the size guide was created. - */ - created_on?: string; - guide?: Guide; - /** - * - The unique identifier for the size guide. - */ - id?: string; - modified_by?: ModifiedBySchema; - /** - * - The timestamp when the size guide was last modified. - */ - modified_on?: string; - /** - * - The name of the size guide. - */ - name?: string; - /** - * - A short description or subtitle for the size guide. - */ - subtitle?: string; - /** - * - A tag or identifier used to classify the size guide. - */ - tag?: string; - /** - * - The title of the size guide. - */ - title?: string; - /** - * - A detailed description or HTML content - * providing more information about the size guide. - */ - description?: string; - /** - * - A URL to an image associated with the size guide. - */ - image?: string; -}; /** @returns {ListSizeGuide} */ declare function ListSizeGuide(): ListSizeGuide; type ListSizeGuide = { - /** - * - A list of size guides, each containing - * detailed information about a product's dimensions, creation, and modification data. - */ - items?: SizeGuideItem[]; - page?: PageResponseSchema; + items?: any[]; + page?: any; }; -/** @returns {LocationDayWiseSchema} */ -declare function LocationDayWiseSchema(): LocationDayWiseSchema; -type LocationDayWiseSchema = { - closing?: LocationTimingSchema; - /** - * - Indicates whether the store or location is open on - * the specified day. - */ +/** @returns {LocationDayWiseSerializer} */ +declare function LocationDayWiseSerializer(): LocationDayWiseSerializer; +type LocationDayWiseSerializer = { + closing?: LocationTimingSerializer; open: boolean; - opening?: LocationTimingSchema; - /** - * - The day of the week for which the store timings - * are defined. - */ + opening?: LocationTimingSerializer; weekday: string; }; /** @returns {LocationIntegrationType} */ declare function LocationIntegrationType(): LocationIntegrationType; type LocationIntegrationType = { - /** - * - The system used to manage inventory - * integration for the location. - */ inventory?: string; - /** - * - The system used to manage order integration for - * the location. - */ order?: string; }; -/** @returns {LocationListSchema} */ -declare function LocationListSchema(): LocationListSchema; -type LocationListSchema = { - items?: GetLocationSchema[]; +/** @returns {LocationListSerializer} */ +declare function LocationListSerializer(): LocationListSerializer; +type LocationListSerializer = { + items?: GetLocationSerializer[]; page?: Page; }; -/** @returns {LocationManagerSchema} */ -declare function LocationManagerSchema(): LocationManagerSchema; -type LocationManagerSchema = { - /** - * - Email address of the location manager. - */ +/** @returns {LocationManagerSerializer} */ +declare function LocationManagerSerializer(): LocationManagerSerializer; +type LocationManagerSerializer = { email?: string; mobile_no: SellerPhoneNumber; - /** - * - Full name of the location manager. - */ name?: string; }; -/** @returns {LocationTimingSchema} */ -declare function LocationTimingSchema(): LocationTimingSchema; -type LocationTimingSchema = { - /** - * - The hour component of the time, represented in - * 24-hour format. - */ +/** @returns {LocationTimingSerializer} */ +declare function LocationTimingSerializer(): LocationTimingSerializer; +type LocationTimingSerializer = { hour?: number; - /** - * - The minute component of the time. - */ minute?: number; }; /** @returns {Logo} */ declare function Logo(): Logo; type Logo = { - /** - * - Aspect ratio of the logo image, typically - * expressed as a string (e.g., '16:9'). - */ aspect_ratio?: string; - /** - * - Numeric representation of the aspect - * ratio for scaling purposes. - */ aspect_ratio_f?: number; - /** - * - Secure URL to the logo image. - */ secure_url?: string; - /** - * - URL to the logo image. - */ url?: string; }; /** @returns {MOQData} */ declare function MOQData(): MOQData; type MOQData = { - /** - * - The unit by which the quantity can be - * incremented after the minimum order quantity. - */ increment_unit?: number; - /** - * - The maximum number of units that can be - * ordered for the item. - */ maximum?: number; - /** - * - The minimum number of units required to place - * an order for the item. - */ minimum?: number; }; -/** @returns {ManufacturerResponseSchema} */ -declare function ManufacturerResponseSchema(): ManufacturerResponseSchema; -type ManufacturerResponseSchema = { +/** @returns {ManufacturerResponse} */ +declare function ManufacturerResponse(): ManufacturerResponse; +type ManufacturerResponse = { /** * - The address of the manufacturer. */ @@ -9706,9 +6979,9 @@ type ManufacturerResponseSchema = { */ name: string; }; -/** @returns {InventoryManufacturerResponseSchema} */ -declare function InventoryManufacturerResponseSchema(): InventoryManufacturerResponseSchema; -type InventoryManufacturerResponseSchema = { +/** @returns {InventoryManufacturerResponse} */ +declare function InventoryManufacturerResponse(): InventoryManufacturerResponse; +type InventoryManufacturerResponse = { address?: string; is_default?: boolean; name?: string; @@ -9716,29 +6989,9 @@ type InventoryManufacturerResponseSchema = { /** @returns {Media} */ declare function Media(): Media; type Media = { - /** - * - A metadata object containing additional - * information about the media, such as dimensions, format, or other relevant details. - */ meta?: any; - /** - * - The type of media. - */ type?: string; - /** - * - The URL where the media can be accessed. - */ url: string; - /** - * - The alternative text for the media, used for - * accessibility and as a fallback when the media cannot be displayed. - */ - alt?: string; - /** - * - The URL of the thumbnail image, typically a - * smaller or lower-resolution version of the main media. - */ - thumbnail?: string; }; /** @returns {Media1} */ declare function Media1(): Media1; @@ -9756,23 +7009,11 @@ type Media1 = { */ portrait: string; }; -/** @returns {DepartmentMedia} */ -declare function DepartmentMedia(): DepartmentMedia; -type DepartmentMedia = { - /** - * - The aspect ratio of the media, typically - * represented as width:height (e.g., '16:9'). - */ +/** @returns {Media2} */ +declare function Media2(): Media2; +type Media2 = { aspect_ratio?: string; - /** - * - The type of media, such as 'image', 'video', or - * other supported media formats. - */ type?: string; - /** - * - The URL where the media resource is hosted and can - * be accessed. - */ url?: string; }; /** @returns {BrandMedia} */ @@ -9801,35 +7042,35 @@ type Meta = { unit?: string; values?: any[]; }; -/** @returns {MetaDataListingFilterMetaResponseSchema} */ -declare function MetaDataListingFilterMetaResponseSchema(): MetaDataListingFilterMetaResponseSchema; -type MetaDataListingFilterMetaResponseSchema = { +/** @returns {MetaDataListingFilterMetaResponse} */ +declare function MetaDataListingFilterMetaResponse(): MetaDataListingFilterMetaResponse; +type MetaDataListingFilterMetaResponse = { display?: string; filter_types?: string[]; key?: string; units?: any[]; }; -/** @returns {MetaDataListingFilterResponseSchema} */ -declare function MetaDataListingFilterResponseSchema(): MetaDataListingFilterResponseSchema; -type MetaDataListingFilterResponseSchema = { - data?: MetaDataListingFilterMetaResponseSchema[]; +/** @returns {MetaDataListingFilterResponse} */ +declare function MetaDataListingFilterResponse(): MetaDataListingFilterResponse; +type MetaDataListingFilterResponse = { + data?: MetaDataListingFilterMetaResponse[]; }; -/** @returns {MetaDataListingResponseSchema} */ -declare function MetaDataListingResponseSchema(): MetaDataListingResponseSchema; -type MetaDataListingResponseSchema = { - filter: MetaDataListingFilterResponseSchema; - sort: MetaDataListingSortResponseSchema; +/** @returns {MetaDataListingResponse} */ +declare function MetaDataListingResponse(): MetaDataListingResponse; +type MetaDataListingResponse = { + filter: MetaDataListingFilterResponse; + sort: MetaDataListingSortResponse; }; -/** @returns {MetaDataListingSortMetaResponseSchema} */ -declare function MetaDataListingSortMetaResponseSchema(): MetaDataListingSortMetaResponseSchema; -type MetaDataListingSortMetaResponseSchema = { +/** @returns {MetaDataListingSortMetaResponse} */ +declare function MetaDataListingSortMetaResponse(): MetaDataListingSortMetaResponse; +type MetaDataListingSortMetaResponse = { display?: string; key?: string; }; -/** @returns {MetaDataListingSortResponseSchema} */ -declare function MetaDataListingSortResponseSchema(): MetaDataListingSortResponseSchema; -type MetaDataListingSortResponseSchema = { - data?: MetaDataListingSortMetaResponseSchema[]; +/** @returns {MetaDataListingSortResponse} */ +declare function MetaDataListingSortResponse(): MetaDataListingSortResponse; +type MetaDataListingSortResponse = { + data?: MetaDataListingSortMetaResponse[]; }; /** @returns {MetaFields} */ declare function MetaFields(): MetaFields; @@ -9858,16 +7099,10 @@ type NetQuantity = { */ value?: number; }; -/** @returns {NetQuantityResponseSchema} */ -declare function NetQuantityResponseSchema(): NetQuantityResponseSchema; -type NetQuantityResponseSchema = { - /** - * - The unit of measurement for the net quantity. - */ +/** @returns {NetQuantityResponse} */ +declare function NetQuantityResponse(): NetQuantityResponse; +type NetQuantityResponse = { unit?: string; - /** - * - The actual quantity of the product in the specified unit. - */ value?: number; }; /** @returns {NextSchedule} */ @@ -9882,9 +7117,9 @@ type NextSchedule = { */ start?: string; }; -/** @returns {OptInPostRequestSchema} */ -declare function OptInPostRequestSchema(): OptInPostRequestSchema; -type OptInPostRequestSchema = { +/** @returns {OptInPostRequest} */ +declare function OptInPostRequest(): OptInPostRequest; +type OptInPostRequest = { brand_ids?: number[]; company_id?: number; enabled?: boolean; @@ -9919,47 +7154,26 @@ type OptinStoreDetails = { items?: StoreDetail[]; page?: Page; }; -/** @returns {OwnerAppItemResponseSchema} */ -declare function OwnerAppItemResponseSchema(): OwnerAppItemResponseSchema; -type OwnerAppItemResponseSchema = { - /** - * - Alternate text associated with the item, - * typically for accessibility purposes. - */ +/** @returns {OwnerAppItemResponse} */ +declare function OwnerAppItemResponse(): OwnerAppItemResponse; +type OwnerAppItemResponse = { alt_text?: any; - /** - * - Indicates whether Cash on Delivery (COD) is - * available for this item. - */ is_cod?: boolean; - /** - * - Indicates whether the item is marked as a gift. - */ is_gift?: boolean; - /** - * - Minimum order quantity (MOQ) details for the - * item, including minimum units and increment units. - */ moq?: MOQData; - /** - * - Search Engine Optimization (SEO) related - * information, including title, description, sitemap details, and meta tags. - */ seo?: SEOData; /** - * - Custom JSON data for the item, allowing - * flexibility for additional item-specific information. + * - Custom JSON data for the item */ _custom_json?: any; /** - * - An array of custom meta fields - * associated with the item for extended metadata. + * - Custom meta fields for the item */ _custom_meta?: MetaFields[]; }; -/** @returns {PTErrorResponseSchema} */ -declare function PTErrorResponseSchema(): PTErrorResponseSchema; -type PTErrorResponseSchema = { +/** @returns {PTErrorResponse} */ +declare function PTErrorResponse(): PTErrorResponse; +type PTErrorResponse = { code?: string; errors?: any; message?: string; @@ -9998,13 +7212,13 @@ type Page = { */ size?: number; }; -/** @returns {PageResponseSchema} */ -declare function PageResponseSchema(): PageResponseSchema; -type PageResponseSchema = { +/** @returns {PageResponse} */ +declare function PageResponse(): PageResponse; +type PageResponse = { /** * - It is the current page of the page response schema. */ - current?: number; + current?: string; /** * - It is the bool indicates if there is a next page. */ @@ -10041,26 +7255,12 @@ type Price = { min_effective?: number; min_marked?: number; }; -/** @returns {ProductListingDetailPrice} */ -declare function ProductListingDetailPrice(): ProductListingDetailPrice; -type ProductListingDetailPrice = { - /** - * - The ISO code of the currency in which - * the price is displayed. - */ +/** @returns {Price1} */ +declare function Price1(): Price1; +type Price1 = { currency_code?: string; - /** - * - The symbol of the currency - * corresponding to the currency code. - */ currency_symbol?: string; - /** - * - The maximum price for the product. - */ max?: number; - /** - * - The minimum price for the product. - */ min?: number; }; /** @returns {PriceArticle} */ @@ -10100,262 +7300,82 @@ type PriceMeta = { */ updated_at?: string; }; -/** @returns {ProdcutTemplateCategoriesResponseSchema} */ -declare function ProdcutTemplateCategoriesResponseSchema(): ProdcutTemplateCategoriesResponseSchema; -type ProdcutTemplateCategoriesResponseSchema = { - items?: CategoriesResponseSchema[]; +/** @returns {ProdcutTemplateCategoriesResponse} */ +declare function ProdcutTemplateCategoriesResponse(): ProdcutTemplateCategoriesResponse; +type ProdcutTemplateCategoriesResponse = { + items?: CategoriesResponse[]; page?: Page; }; /** @returns {Product} */ declare function Product(): Product; type Product = { - /** - * - A custom JSON object that can hold any - * additional key-value pairs specific to the product. - */ _custom_json?: any; - /** - * - List of company IDs associated with - * the product. - */ all_company_ids?: number[]; - /** - * - List of identifiers such as SKU, barcode, etc. - */ all_identifiers?: string[]; - /** - * - List of available sizes for the product. - */ all_sizes?: any[]; - /** - * - Additional attributes of the product such - * as material, color, pattern, etc. - */ attributes?: any; brand?: Brand; - /** - * - Unique ID of the brand associated with the product. - */ brand_uid?: number; - /** - * - Details about the category the product belongs to. - */ category?: any; - /** - * - Unique slug representing the category. - */ category_slug?: string; - /** - * - Unique ID of the product category. - */ category_uid?: number; - /** - * - Primary color of the product. - */ color?: string; - /** - * - ID of the company managing the product. - */ company_id?: number; - /** - * - The country where the product was - * manufactured. - */ country_of_origin?: string; - /** - * - Details of the user or entity that created - * the product. - */ created_by?: any; - /** - * - Timestamp indicating when the product was created. - */ created_on?: string; - /** - * - The currency used for pricing the product. - */ currency?: string; - /** - * - Information related to custom orders, - * including lead time and production details. - */ custom_order?: any; - /** - * - List of department IDs related to the product. - */ departments?: number[]; - /** - * - Full description of the product. - */ description?: string; - /** - * - List of key highlights of the product. - */ highlights?: string[]; - /** - * - HSN (Harmonized System Nomenclature) code for - * tax classification. - */ hsn_code?: string; - /** - * - Unique identifier for the product in the system. - */ id?: string; - /** - * - Nature of the product image, for example, - * 'standard' or 'custom'. - */ image_nature?: string; - /** - * - List of images associated with the product. - */ images?: Image[]; - /** - * - Indicates whether the product is currently - * active or not. - */ is_active?: boolean; - /** - * - Indicates whether the product depends on - * other products for its availability or configuration. - */ is_dependent?: boolean; - /** - * - Indicates if the product has an expiration date. - */ is_expirable?: boolean; - /** - * - Indicates if the product does - * not have an image associated. - */ is_image_less_product?: boolean; - /** - * - Specifies if the product is a physical item. - */ is_physical?: boolean; - /** - * - Indicates if the product is part of a set. - */ is_set?: boolean; item_code?: string; item_type?: string; - /** - * - List of category mappings for the product - * (level 3 categories). - */ l3_mapping?: string[]; - /** - * - Media objects associated with the product, such - * as videos or additional images. - */ media?: Media[]; - /** - * - Details of the user or entity that last - * modified the product. - */ modified_by?: any; - /** - * - Timestamp indicating the last time the - * product was modified. - */ modified_on?: string; - /** - * - Minimum Order Quantity (MOQ) details for the product. - */ moq?: any; - /** - * - Name of the product. - */ + multi_size?: boolean; name?: string; - net_quantity?: NetQuantityResponseSchema; - /** - * - Number of boxes required to pack the product. - */ + net_quantity?: NetQuantityResponse; no_of_boxes?: number; - /** - * - Status indicating if there are pending actions - * or updates required for the product. - */ pending?: string; - /** - * - Primary color of the product. - */ primary_color?: string; - /** - * - Tags for grouping the product in categories. - */ product_group_tag?: string[]; product_publish?: ProductPublished; - return_config?: ReturnConfigResponseSchema; - /** - * - A brief description of the product. - */ + return_config?: ReturnConfigResponse; short_description?: string; - /** - * - Link or identifier for the product's size guide. - */ size_guide?: string; - /** - * - List of available sizes for the product along - * with pricing and identifier information. - */ sizes?: any[]; - /** - * - URL slug for the product page. - */ slug?: string; - /** - * - The current stage of the product in the system - * workflow (e.g., pending, verified). - */ stage?: string; - /** - * - Tags or keywords associated with the product - * for search and categorization. - */ tags?: string[]; - tax_identifier?: TaxIdentifier; - /** - * - A short promotional tag or label for the product. - */ + tax_identifier?: any; teaser_tag?: any; - /** - * - Tag representing the template used for - * the product listing. - */ template_tag?: string; - /** - * - List of traders or sellers associated with the product. - */ trader?: Trader[]; - /** - * - Unique identifier for the product. - */ uid?: number; - /** - * - Details about the product's variant - * grouping (e.g., color or size variants). - */ variant_group?: any; - /** - * - Media associated with specific variants - * of the product. - */ variant_media?: any; - /** - * - Details about the product's available variants. - */ variants?: any; verified_by?: VerifiedBy; - /** - * - Timestamp indicating when the product was verified. - */ verified_on?: string; }; -/** @returns {ProductAttributesResponseSchema} */ -declare function ProductAttributesResponseSchema(): ProductAttributesResponseSchema; -type ProductAttributesResponseSchema = { - items: AttributeMasterSchema[]; +/** @returns {ProductAttributesResponse} */ +declare function ProductAttributesResponse(): ProductAttributesResponse; +type ProductAttributesResponse = { + items: AttributeMasterSerializer[]; }; /** @returns {ProductBrand} */ declare function ProductBrand(): ProductBrand; @@ -10373,9 +7393,9 @@ type ProductBulkAssets = { url: string; user: any; }; -/** @returns {ProductBulkRequestSchema} */ -declare function ProductBulkRequestSchema(): ProductBulkRequestSchema; -type ProductBulkRequestSchema = { +/** @returns {ProductBulkRequest} */ +declare function ProductBulkRequest(): ProductBulkRequest; +type ProductBulkRequest = { cancelled?: number; cancelled_records?: any[]; company_id?: number; @@ -10396,161 +7416,51 @@ type ProductBulkRequestSchema = { /** @returns {ProductBulkRequestList} */ declare function ProductBulkRequestList(): ProductBulkRequestList; type ProductBulkRequestList = { - items?: any; + items?: ProductBulkRequest[]; page?: Page; }; /** @returns {ProductBundleItem} */ declare function ProductBundleItem(): ProductBundleItem; type ProductBundleItem = { - /** - * - Indicates whether the product can be - * removed from the bundle. - */ allow_remove?: boolean; - /** - * - Specifies if the product is - * automatically added to the cart. - */ auto_add_to_cart?: boolean; - /** - * - Indicates if the product is automatically - * selected in the bundle. - */ auto_select?: boolean; - /** - * - Maximum quantity of the product that can be - * added to the bundle. - */ max_quantity: number; - /** - * - Minimum quantity of the product that must - * be added to the bundle. - */ min_quantity: number; - /** - * - Unique identifier for the product. - */ product_uid: number; }; -/** @returns {ProductBundleRequestSchema} */ -declare function ProductBundleRequestSchema(): ProductBundleRequestSchema; -type ProductBundleRequestSchema = { - /** - * - Specifies the type of product bundle (e.g., - * 'single' or 'multi'). - */ +/** @returns {ProductBundleRequest} */ +declare function ProductBundleRequest(): ProductBundleRequest; +type ProductBundleRequest = { choice: string; - /** - * - The unique identifier of the company to - * which the product bundle belongs. - */ company_id?: number; - /** - * - Information about the user who created the - * product bundle, including user ID and username. - */ created_by?: any; - /** - * - The timestamp when the product bundle was created. - */ created_on?: string; - /** - * - Indicates whether the product bundle is - * currently active. - */ is_active: boolean; - /** - * - URL of the logo associated with the product - * bundle, if available. Can be null. - */ logo?: string; - /** - * - Additional metadata for the product bundle. - */ meta?: any; - /** - * - Information about the user who last - * modified the product bundle, including user ID and username. - */ modified_by?: any; - /** - * - The timestamp when the product bundle was - * last modified. - */ modified_on?: string; - /** - * - The name of the product bundle. - */ name: string; - /** - * - Pages where the product bundle is - * visible (e.g., 'pdp' for product display page). - */ page_visibility?: string[]; - /** - * - A list of products included in the - * bundle. A maximum of 10 products can be added. - */ products: ProductBundleItem[]; - /** - * - Indicates whether all products - * in the bundle are assigned to the same store. - */ same_store_assignment?: boolean; - /** - * - A URL-friendly unique identifier for the product bundle. - */ slug: string; }; -/** @returns {ProductBundleUpdateRequestSchema} */ -declare function ProductBundleUpdateRequestSchema(): ProductBundleUpdateRequestSchema; -type ProductBundleUpdateRequestSchema = { - /** - * - Specifies the type of product bundle (e.g., - * 'single' or 'multi'). - */ +/** @returns {ProductBundleUpdateRequest} */ +declare function ProductBundleUpdateRequest(): ProductBundleUpdateRequest; +type ProductBundleUpdateRequest = { choice: string; - /** - * - The unique identifier of the company to - * which the product bundle belongs. - */ company_id?: number; - /** - * - Indicates whether the product bundle is - * currently active. - */ is_active: boolean; - /** - * - URL of the logo associated with the product - * bundle, if available. Can be null. - */ logo?: string; - /** - * - Additional metadata for the product bundle. - */ meta?: any; - /** - * - The name of the product bundle. - */ + modified_by?: any; + modified_on?: string; name: string; - /** - * - Pages where the product bundle is - * visible (e.g., 'pdp' for product display page). - */ page_visibility?: string[]; - /** - * - A list of products included in the - * bundle. A maximum of 10 products can be added. - */ products: ProductBundleItem[]; - /** - * - Indicates whether all products - * in the bundle are assigned to the same store. - */ same_store_assignment?: boolean; - /** - * - A URL-friendly unique identifier for the product bundle. - */ slug: string; }; /** @returns {ProductConfigurationDownloads} */ @@ -10562,348 +7472,108 @@ type ProductConfigurationDownloads = { /** @returns {ProductCreateUpdateSchemaV2} */ declare function ProductCreateUpdateSchemaV2(): ProductCreateUpdateSchemaV2; type ProductCreateUpdateSchemaV2 = { - /** - * - Custom JSON data that can be used for - * additional product properties. - */ _custom_json?: any; - /** - * - The action to perform wrt to the product (e.g., - * upsert, update, delete). - */ action?: string; - /** - * - Additional attributes related to the product. - */ attributes?: any; - /** - * - Unique identifier for the product's brand. - */ brand_uid: number; - /** - * - Job ID associated with bulk operations. - */ bulk_job_id?: string; - /** - * - The category to which the product belongs. - */ category_slug: string; - /** - * - Change request identifier for product updates. - */ change_request_id?: string; - /** - * - Unique identifier for the company associated - * with the product. - */ company_id: number; - /** - * - The country where the product was - * manufactured or sourced. - */ country_of_origin: string; - /** - * - The currency in which the product's price is listed. - */ currency: string; custom_order?: CustomOrder; - /** - * - List of department IDs associated with the product. - */ departments: number[]; - /** - * - A detailed description of the product. - */ description?: string; - /** - * - Product highlights or key features. - */ highlights?: string[]; - /** - * - Flag to indicate if the product is active. - */ is_active?: boolean; - /** - * - Flag to indicate if the product is - * dependent on other products. - */ is_dependent?: boolean; - /** - * - Flag to indicate if the product - * does not have associated images. - */ is_image_less_product?: boolean; - /** - * - Flag to indicate if the product is part of a set. - */ is_set?: boolean; - /** - * - Unique item code or SKU of the product. - */ item_code: string; - /** - * - Type of the product (e.g., standard, set, - * composite, digital). - */ item_type: string; - /** - * - List of media URLs (images, videos) associated - * with the product. - */ media?: Media[]; - /** - * - Indicates if the product supports multiple sizes. - */ multi_size?: boolean; - /** - * - The name of the product. - */ name: string; net_quantity?: NetQuantity; - /** - * - Number of boxes required to package the product. - */ no_of_boxes?: number; - /** - * - Tags to group products together - * for classification. - */ product_group_tag?: string[]; - product_publish?: ProductPublish; - /** - * - The role requesting the product operation - * (admin or user). - */ + product_publish?: ProductPublish1; requester?: string; return_config: ReturnConfig; - /** - * - A short description of the product, - * up to 50 characters. - */ short_description?: string; - /** - * - Identifier for the product's size guide. - */ size_guide?: string; - /** - * - List of sizes available for the product. - */ sizes: any[]; - /** - * - URL-friendly identifier for the product. - */ slug: string; - /** - * - List of tags associated with the product. - */ tags?: string[]; tax_identifier: TaxIdentifier; teaser_tag?: TeaserTag; - /** - * - Template tag for the product, used for - * classification. - */ template_tag: string; - /** - * - List of traders associated with the product. - */ trader: Trader[]; - /** - * - Unique identifier for the product. - */ uid?: number; - /** - * - Variant group information for the product. - */ variant_group?: any; - /** - * - Media related to product variants. - */ variant_media?: any; - /** - * - Variants information for the product. - */ variants?: any; }; /** @returns {ProductDetail} */ declare function ProductDetail(): ProductDetail; type ProductDetail = { - /** - * - Key-value pairs representing various - * product attributes. - */ attributes?: any; brand?: ProductBrand; - /** - * - Detailed description of the product. - */ + color?: string; description?: string; - /** - * - Grouped - * attributes of the product, such as product details and specifications. - */ grouped_attributes?: ProductDetailGroupedAttribute[]; - /** - * - Indicates whether the product has variants. - */ has_variant?: boolean; - /** - * - Array of highlight features for the product. - */ highlights?: string[]; - /** - * - The nature of the product's images. - */ image_nature?: string; - /** - * - Unique item code for the product. - */ item_code?: string; - /** - * - Type of the item. - */ item_type?: string; - /** - * - Array of media objects such as images and - * videos for the product. - */ medias?: Media[]; - /** - * - Name of the product. - */ name?: string; - /** - * - Date when the product was made - * available online. - */ product_online_date?: string; - /** - * - Promotional metadata associated with the product. - */ promo_meta?: any; - /** - * - Average rating of the product. - */ rating?: number; - /** - * - Total number of ratings for the product. - */ rating_count?: number; - /** - * - A brief description of the product. - */ short_description?: string; - /** - * - Array of similar products. - */ similars?: string[]; - /** - * - Unique slug for the product, used in URLs. - */ slug: string; - /** - * - Teaser tag information related to the product. - */ teaser_tag?: any; - /** - * - Array of product tryout options. - */ tryouts?: string[]; - /** - * - The type of item. - */ type?: string; - /** - * - Unique identifier for the product. - */ uid?: number; - /** - * - Country where the product was manufactured. - */ - country_of_origin?: string; - /** - * - Array of - * categories the product belongs to. - */ - categories?: ApplicationProductCategoryItem[]; - /** - * - Array of tags associated with the product. - */ - tags?: string[]; - /** - * - Number of boxes required for packaging the product. - */ - no_of_boxes?: number; - custom_order?: CustomOrder; }; /** @returns {ProductDetailAttribute} */ declare function ProductDetailAttribute(): ProductDetailAttribute; type ProductDetailAttribute = { - /** - * - The name or key of the attribute. - */ key?: string; - /** - * - The type of the attribute. - */ type?: string; - /** - * - The value of the attribute corresponding to the key. - */ value?: string; }; /** @returns {ProductDetailGroupedAttribute} */ declare function ProductDetailGroupedAttribute(): ProductDetailGroupedAttribute; type ProductDetailGroupedAttribute = { - /** - * - An array of individual - * product attributes belonging to this group. - */ details?: ProductDetailAttribute[]; - /** - * - The title or category name for the grouped attributes. - */ title?: string; }; -/** @returns {ProductDownloadsResponseSchema} */ -declare function ProductDownloadsResponseSchema(): ProductDownloadsResponseSchema; -type ProductDownloadsResponseSchema = { +/** @returns {ProductDownloadsResponse} */ +declare function ProductDownloadsResponse(): ProductDownloadsResponse; +type ProductDownloadsResponse = { /** * - The items of the job. */ - items?: ProductTemplateExportResponseSchema[]; + items?: ProductTemplateExportResponse[]; page?: Page; }; -/** @returns {CollectionProductFilters} */ -declare function CollectionProductFilters(): CollectionProductFilters; -type CollectionProductFilters = { - key: ProductFiltersKey; - /** - * - A list of possible - * values corresponding to the filter key. These values can be selected for - * filtering products. - */ - values: CollectionProductFiltersValue[]; -}; /** @returns {ProductFilters} */ declare function ProductFilters(): ProductFilters; type ProductFilters = { key: ProductFiltersKey; - /** - * - A list of possible values - * corresponding to the filter key. These values can be selected for filtering - * products. - */ values: ProductFiltersValue[]; }; -/** @returns {GetQueryFiltersValuesResponseSchema} */ -declare function GetQueryFiltersValuesResponseSchema(): GetQueryFiltersValuesResponseSchema; -type GetQueryFiltersValuesResponseSchema = { - /** - * - A list of filter values that - * can be used for querying products. - */ - values: ProductQueryFiltersValue[]; +/** @returns {GetQueryFiltersValuesResponse} */ +declare function GetQueryFiltersValuesResponse(): GetQueryFiltersValuesResponse; +type GetQueryFiltersValuesResponse = { + values: ProductFiltersValue[]; page: Page; }; /** @returns {ProductFiltersKeysOnly} */ @@ -10914,686 +7584,67 @@ type ProductFiltersKeysOnly = { /** @returns {ProductFiltersKey} */ declare function ProductFiltersKey(): ProductFiltersKey; type ProductFiltersKey = { - /** - * - The display name of the filter key, used for - * showing on the UI. - */ display: string; - /** - * - The kind or type of filter, defining the category - * of the filter. - */ kind?: string; - /** - * - A URL to the logo associated with the filter key. - */ logo?: string; - /** - * - The name of the filter key, used in the query. - */ name: string; - /** - * - A list of supported operators for this filter key. - */ operators?: string[]; }; -/** @returns {ProductQueryFiltersValue} */ -declare function ProductQueryFiltersValue(): ProductQueryFiltersValue; -type ProductQueryFiltersValue = { - /** - * - The human-readable name of the category to be displayed. - */ - display?: string; - /** - * - The number of items or products associated with - * this category. - */ - count?: number; - /** - * - Indicates whether this category is - * currently selected by the user. - */ - is_selected?: boolean; - /** - * - The internal value or identifier representing - * this category. - */ - value?: string; - /** - * - URL of the logo image associated with the category. - */ - logo?: string; -}; -/** @returns {CollectionProductFiltersValue} */ -declare function CollectionProductFiltersValue(): CollectionProductFiltersValue; -type CollectionProductFiltersValue = { - /** - * - Display name of the filter value. - */ - display: string; - /** - * - The number of products that match this filter value. - */ - count?: number; - /** - * - Indicates whether the filter value is - * currently selected by the user. - */ - is_selected: boolean; - /** - * - The actual value for the filter, used in filtering queries. - */ - value: string; - logo?: any; -}; /** @returns {ProductFiltersValue} */ declare function ProductFiltersValue(): ProductFiltersValue; type ProductFiltersValue = { - /** - * - The number of products that match this filter value. - */ count?: number; - /** - * - The currency code used if the filter is - * related to price. - */ currency_code?: string; - /** - * - The symbol of the currency used in - * price-related filters. - */ currency_symbol?: string; - /** - * - The human-readable label for this filter value. - */ display: string; - /** - * - A format string that controls how the - * value is displayed, commonly used for numeric or price ranges. - */ display_format?: string; - /** - * - Indicates whether this filter value is - * currently selected by the user. - */ is_selected: boolean; - /** - * - The maximum value for a range filter (e.g., price range). - */ max?: number; - /** - * - The minimum value for a range filter (e.g., price range). - */ min?: number; - /** - * - The format string used in the query for - * filtering by this value. - */ query_format?: string; - /** - * - The maximum value selected by the user in - * a range filter. - */ selected_max?: number; - /** - * - The minimum value selected by the user in - * a range filter. - */ selected_min?: number; - /** - * - The actual value of the filter. - */ value: any; }; -/** @returns {CollectionProductListingDetail} */ -declare function CollectionProductListingDetail(): CollectionProductListingDetail; -type CollectionProductListingDetail = { - /** - * - Additional attributes for the product. - */ - attributes?: any; - brand?: ProductBrand; - /** - * - Color of the product. - */ - color?: string; - /** - * - Detailed description of the product. - */ - description?: string; - /** - * - Discount information for the product. - */ - discount?: string; - /** - * - Grouped - * attributes of the product. - */ - grouped_attributes?: ProductDetailGroupedAttribute[]; - /** - * - Indicates if the product has variants. - */ - has_variant?: boolean; - /** - * - List of key highlights for the product. - */ - highlights?: string[]; - /** - * - Nature or type of image associated with - * the product. - */ - image_nature?: string; - /** - * - Unique code for the product item. - */ - item_code?: string; - /** - * - Type of the product item, e.g., 'standard' - * or 'custom'. - */ - item_type?: string; - /** - * - List of media files (e.g., images) associated - * with the product. - */ - medias?: Media[]; - /** - * - Name of the product. - */ - name?: string; - price?: ProductListingPrice; - /** - * - The date when the product became - * available online. - */ - product_online_date?: string; - /** - * - Promotional metadata for the product. - */ - promo_meta?: any; - /** - * - Average rating for the product. - */ - rating?: number; - /** - * - Number of users who have rated the product. - */ - rating_count?: number; - /** - * - Indicates if the product is sellable. - */ - sellable?: boolean; - /** - * - Short description of the product. - */ - short_description?: string; - /** - * - List of similar products. - */ - similars?: string[]; - /** - * - Slug or URL-friendly identifier for the product. - */ - slug: string; - /** - * - Teaser tag for the product. - */ - teaser_tag?: any; - /** - * - List of tryouts or tests associated with the product. - */ - tryouts?: string[]; - /** - * - Type of the product, e.g., 'product' or 'variant'. - */ - type?: string; - /** - * - Unique identifier for the product. - */ - uid?: number; - /** - * - List of categories associated - * with the product. - */ - categories?: ProductCategory[]; - /** - * - Custom metadata related to the product. - */ - _custom_meta?: any[]; - action?: Action; - /** - * - Discount percentage on the product. - */ - discount_percentage?: number; - /** - * - Indicates if the product is available for tryout. - */ - is_tryout?: boolean; - /** - * - List of company IDs associated with - * the product. - */ - all_company_ids?: number[]; - /** - * - Indicates if the product is a custom order. - */ - is_custom_order?: boolean; - /** - * - List of collection IDs the product belongs to. - */ - collections?: string[]; - /** - * - Popularity score of the product. - */ - popularity?: number; - /** - * - Unique identifier of the brand. - */ - brand_uid?: number; - /** - * - Unique identifier of the category. - */ - category_uid?: number; - /** - * - Verification status of the product. - */ - verification_status?: string; - /** - * - Identifier for the sales channel. - */ - channel_identifier?: string; - /** - * - Slug identifier for the category. - */ - category_slug?: string; - /** - * - Size guide information for the product. - */ - size_guide?: string; - /** - * - Timestamp when the product was created. - */ - created_on?: string; - /** - * - Timestamp when the product was last modified. - */ - modified_on?: string; - /** - * - List of L3 categories associated with - * the product. - */ - l3_categories?: number[]; - /** - * - List of store IDs where the product is available. - */ - store_ids?: number[]; - /** - * - List of company IDs associated with the product. - */ - company_ids?: number[]; - /** - * - List of departments associated with the product. - */ - departments?: number[]; - /** - * - List of tags associated with the product. - */ - tags?: string[]; - /** - * - List of L3 category names. - */ - l3_category_names?: string[]; - /** - * - List of available sizes for the product. - */ - sizes?: string[]; - /** - * - Tags related to the product group. - */ - product_group_tag?: string[]; - /** - * - Indicates if the product is available in - * multiple sizes. - */ - multi_size?: boolean; - /** - * - Indicates if the product is giftable. - */ - is_gift?: boolean; - /** - * - Indicates if the product is eligible for cash - * on delivery. - */ - is_cod?: boolean; - /** - * - Indicates if the product is dependent on - * other products. - */ - is_dependent?: boolean; - /** - * - Indicates if the product is currently available. - */ - is_available?: boolean; - net_quantity?: NetQuantity; - seo?: ApplicationItemSEO; - moq?: ApplicationItemMOQ; - custom_order?: CustomOrder; - /** - * - Country of origin of the product. - */ - country_of_origin?: string; - /** - * - Custom JSON data for additional configurations. - */ - _custom_json?: any; - /** - * - Details of multiple categories - * associated with the product. - */ - multi_categories?: any[]; - /** - * - Variant-specific media associated with - * the product. - */ - variant_media?: any; - /** - * - Group of variant-specific attributes. - */ - variant_group?: any; - /** - * - Identifiers associated with the product. - */ - identifiers?: string[]; - /** - * - Number of boxes required for the product. - */ - no_of_boxes?: number; - /** - * - Template tag associated with the product. - */ - template_tag?: string; -}; -/** @returns {ProductCategory} */ -declare function ProductCategory(): ProductCategory; -type ProductCategory = { - /** - * - Unique identifier of the category. - */ - id?: number; - /** - * - Unique identifier of the category UID. - */ - uid?: number; - /** - * - Name of the category. - */ - name?: string; - /** - * - Slug identifier for the category. - */ - slug?: string; - logo?: Logo; - action?: Action; - /** - * - Custom JSON data for the category. - */ - _custom_json?: any; -}; -/** @returns {ApplicationCategoryAction} */ -declare function ApplicationCategoryAction(): ApplicationCategoryAction; -type ApplicationCategoryAction = { - page?: CategoryPageAction; - /** - * - The type of action to be performed, such as - * navigation to a category or product. - */ - type?: string; -}; -/** @returns {ApplicationCategoryItem} */ -declare function ApplicationCategoryItem(): ApplicationCategoryItem; -type ApplicationCategoryItem = { - /** - * - Custom JSON data related to the category. - */ - _custom_json?: any; - action?: ApplicationCategoryAction; - /** - * - The unique identifier for the category item. - */ - id?: number; - logo?: CategoryImage; - /** - * - The name of the category. - */ - name?: string; - /** - * - A unique identifier for the category item. - */ - uid?: number; -}; -/** @returns {ApplicationProductMedia} */ -declare function ApplicationProductMedia(): ApplicationProductMedia; -type ApplicationProductMedia = { - /** - * - Type of the media (e.g., image, video). - */ - type?: string; - /** - * - URL of the media item. - */ - url?: string; -}; -/** @returns {ApplicationProductCategoryItem} */ -declare function ApplicationProductCategoryItem(): ApplicationProductCategoryItem; -type ApplicationProductCategoryItem = { - /** - * - Unique identifier of the category. - */ - id?: number; - /** - * - Unique identifier of the category (UID). - */ - uid?: number; - /** - * - Name of the category. - */ - name?: string; - /** - * - Slug or unique key for the category. - */ - slug?: string; - logo?: ApplicationProductMedia; - action?: PageAction; -}; -/** @returns {CategoryPageAction} */ -declare function CategoryPageAction(): CategoryPageAction; -type CategoryPageAction = { - query?: CategoryQuery; - /** - * - The type of page action, defining what should - * happen when a category is selected. - */ - type?: string; -}; -/** @returns {CategoryQuery} */ -declare function CategoryQuery(): CategoryQuery; -type CategoryQuery = { - category?: string[]; -}; -/** @returns {CategoryImage} */ -declare function CategoryImage(): CategoryImage; -type CategoryImage = { - /** - * - The type of image, typically 'image'. - */ - type?: string; - /** - * - The URL of the category image. - */ - url?: string; -}; /** @returns {ProductListingDetail} */ declare function ProductListingDetail(): ProductListingDetail; type ProductListingDetail = { - /** - * - Additional product attributes, which vary by product. - */ attributes?: any; brand?: ProductBrand; - /** - * - A detailed description of the product. - */ + color?: string; description?: string; - /** - * - Any discount information applicable to the product. - */ discount?: string; - /** - * - A list of - * grouped product attributes. - */ grouped_attributes?: ProductDetailGroupedAttribute[]; - /** - * - Indicates whether the product has - * variants such as different sizes or colors. - */ has_variant?: boolean; - /** - * - Key highlights of the product. - */ highlights?: string[]; - /** - * - The type of product image, such as - * 'lifestyle' or 'catalog'. - */ image_nature?: string; - /** - * - The unique code or identifier for the product. - */ item_code?: string; - /** - * - The type of item'. - */ item_type?: string; - /** - * - A list of media (images or videos) associated - * with the product. - */ medias?: Media[]; - /** - * - The name of the product. - */ name?: string; price?: ProductListingPrice; - /** - * - The date and time when the product - * was made available online. - */ product_online_date?: string; - /** - * - Promotional metadata associated with the product. - */ promo_meta?: any; - /** - * - The average rating of the product. - */ rating?: number; - /** - * - The number of ratings received for the product. - */ rating_count?: number; - /** - * - Indicates if the product is currently sellable. - */ sellable?: boolean; - /** - * - A brief description of the product. - */ short_description?: string; - /** - * - A list of similar products. - */ similars?: string[]; - /** - * - The unique URL-friendly identifier for the product. - */ - slug?: string; - /** - * - Teaser tags for the product, if any. - */ + slug: string; teaser_tag?: any; - /** - * - A list of tryout options for the product. - */ tryouts?: string[]; - /** - * - The type of product. - */ type?: string; - /** - * - The unique identifier for the product. - */ uid?: number; - /** - * - A list of categories - * associated with the product. - */ - categories?: ApplicationCategoryItem[]; - /** - * - Custom metadata for the product. - */ - _custom_meta?: string[]; - action?: PageAction; - /** - * - Indicates if the product is available for tryout. - */ - is_tryout?: boolean; - /** - * - A list of company IDs that sell this product. - */ - all_company_ids?: number[]; - /** - * - Indicates if the product is - * custom-made or requires a custom order. - */ - is_custom_order?: boolean; - /** - * - A list of collections the product belongs to. - */ - collections?: string[]; -}; -/** @returns {ActionObject} */ -declare function ActionObject(): ActionObject; -type ActionObject = { - /** - * - The type of action to be performed, such as - * navigating to a product or category. - */ - type?: string; - /** - * - The query parameters associated with the action. - */ - query?: any; -}; -/** @returns {PageAction} */ -declare function PageAction(): PageAction; -type PageAction = { - page?: ActionObject; - /** - * - The type of page action to be performed. - */ - type?: string; }; /** @returns {ProductListingPrice} */ declare function ProductListingPrice(): ProductListingPrice; type ProductListingPrice = { effective?: Price1; marked?: Price1; - selling?: Price1; }; -/** @returns {ProductListingResponseSchema} */ -declare function ProductListingResponseSchema(): ProductListingResponseSchema; -type ProductListingResponseSchema = { +/** @returns {ProductListingResponse} */ +declare function ProductListingResponse(): ProductListingResponse; +type ProductListingResponse = { items?: Product[]; page?: Page; }; @@ -11609,36 +7660,27 @@ type ProductPublish = { is_set?: boolean; product_online_date?: string; }; +/** @returns {ProductPublish1} */ +declare function ProductPublish1(): ProductPublish1; +type ProductPublish1 = { + is_set?: boolean; + product_online_date?: string; +}; /** @returns {ProductPublished} */ declare function ProductPublished(): ProductPublished; type ProductPublished = { - /** - * - Indicates whether the product is part of a set. - */ is_set?: boolean; - /** - * - Timestamp when the product is - * scheduled to go live online. - */ product_online_date?: number; }; -/** @returns {ProductReturnConfigSchema} */ -declare function ProductReturnConfigSchema(): ProductReturnConfigSchema; -type ProductReturnConfigSchema = { - /** - * - Indicates if the product return is - * allowed only at the same store where it was purchased. - */ +/** @returns {ProductReturnConfigSerializer} */ +declare function ProductReturnConfigSerializer(): ProductReturnConfigSerializer; +type ProductReturnConfigSerializer = { on_same_store?: boolean; - /** - * - Unique identifier for the store where the - * product can be returned. - */ store_uid?: number; }; -/** @returns {ProductReturnConfigBaseSchema} */ -declare function ProductReturnConfigBaseSchema(): ProductReturnConfigBaseSchema; -type ProductReturnConfigBaseSchema = { +/** @returns {ProductReturnConfigBaseSerializer} */ +declare function ProductReturnConfigBaseSerializer(): ProductReturnConfigBaseSerializer; +type ProductReturnConfigBaseSerializer = { /** * - Boolean Flag for item returnable */ @@ -11646,333 +7688,76 @@ type ProductReturnConfigBaseSchema = { /** * - Valid return time for an item */ - time: number; - /** - * - Unit of return config days|hours - */ - unit: string; -}; -/** @returns {Identifier} */ -declare function Identifier(): Identifier; -type Identifier = { - /** - * - Indicates if this is the primary identifier - * for the size. - */ - primary?: boolean; - /** - * - The GTIN (Global Trade Item Number) value - * for the size. - */ - gtin_value?: string; - /** - * - The type of GTIN (e.g., SKU code, UPC, EAN). - */ - gtin_type?: string; -}; -/** @returns {SizeDetails} */ -declare function SizeDetails(): SizeDetails; -type SizeDetails = { - /** - * - Size identifier for the product (e.g., "S", "M", "L"). - */ - size?: string; - /** - * - The number of stores that have this size available. - */ - store_count?: number; - /** - * - Quantity of the product that is - * sellable in this size. - */ - sellable_quantity?: number; - /** - * - Indicates if this size is currently sellable. - */ - sellable?: boolean; - /** - * - The priority of the size for display purposes. - */ - size_priority?: number; - /** - * - List of identifiers (e.g., SKU - * codes, GTINs) associated with the size. - */ - identifiers?: Identifier[]; - price?: any; - /** - * - Seller-specific identifier for this size. - */ - seller_identifier?: string; - /** - * - Price transfer value for this size, - * typically used in business transactions. - */ - price_transfer?: number; + time: number; /** - * - Indicates if inventory is being - * tracked for this size. + * - Unit of return config days|hours */ - track_inventory?: boolean; + unit: string; }; /** @returns {ProductSchemaV2} */ declare function ProductSchemaV2(): ProductSchemaV2; type ProductSchemaV2 = { - /** - * - Custom JSON data specific to the product, - * used for storing additional information. - */ _custom_json?: any; - /** - * - List of company IDs associated with - * the product. - */ all_company_ids?: number[]; - /** - * - List of unique product identifiers - * such as SKU codes or GTINs. - */ all_identifiers?: string[]; - /** - * - Details of all available sizes for the - * product, including pricing and inventory information. - */ all_sizes?: any[]; - /** - * - Additional attributes specific to the product. - */ attributes?: any; brand?: Brand; - /** - * - Unique identifier for the brand. - */ brand_uid?: number; - /** - * - Object representing the category to which the - * product belongs. - */ category?: any; - /** - * - Slug representation of the product - * category for SEO purposes. - */ category_slug?: string; - /** - * - Unique identifier for the product category. - */ category_uid?: number; - /** - * - Primary color of the product. - */ color?: string; - /** - * - Identifier for the company managing the product. - */ company_id?: number; - /** - * - Country where the product was - * manufactured or sourced. - */ country_of_origin?: string; - /** - * - Object containing details about the user - * who created the product. - */ created_by?: any; - /** - * - The currency in which the product is priced - * (e.g., "INR"). - */ + created_on?: string; currency?: string; - /** - * - Information about custom order options - * for the product, including manufacturing time. - */ custom_order?: any; - /** - * - List of department IDs associated with - * the product. - */ departments?: number[]; - /** - * - Long description of the product. - */ description?: string; - /** - * - Key features or highlights of the product. - */ highlights?: string[]; - /** - * - Harmonized System Nomenclature (HSN) code for - * taxation purposes. - */ hsn_code?: string; - /** - * - Unique identifier of the product in the database. - */ id?: string; - /** - * - Describes the nature of the product - * images (e.g., "standard"). - */ image_nature?: string; - /** - * - List of image URLs associated with the product. - */ images?: Image[]; - /** - * - Indicates whether the product is currently - * active or not. - */ is_active?: boolean; - /** - * - Indicates if the product depends on - * other products (e.g., part of a set). - */ is_dependent?: boolean; - /** - * - Indicates whether the product has an expiry date. - */ is_expirable?: boolean; - /** - * - Indicates if the product does - * not have associated images. - */ is_image_less_product?: boolean; - /** - * - Indicates if the product is a physical - * item (as opposed to a digital product). - */ is_physical?: boolean; - /** - * - Indicates if the product is a set of items - * rather than a single item. - */ is_set?: boolean; - /** - * - Unique code used to identify the product, - * often used internally or by sellers. - */ item_code?: string; - /** - * - Describes the type of product (e.g., - * "standard" or "set"). - */ item_type?: string; - /** - * - Hierarchical mapping of the product to - * categories (e.g., "electronics>qled_television"). - */ l3_mapping?: string[]; - /** - * - Media assets associated with the product, such - * as images or videos. - */ media?: Media[]; - /** - * - Object containing details about the user - * who last modified the product. - */ modified_by?: any; - /** - * - The timestamp when the product was last modified. - */ modified_on?: string; - /** - * - Minimum order quantity details for the product. - */ moq?: any; - /** - * - Indicates if the product is available in - * multiple sizes. - */ multi_size?: boolean; - /** - * - Name of the product. - */ name?: string; - net_quantity?: NetQuantityResponseSchema; - /** - * - Number of boxes required to pack the product. - */ + net_quantity?: NetQuantityResponse; no_of_boxes?: number; - /** - * - Pending status related to product availability - * or verification. - */ pending?: string; - /** - * - The primary color of the product. - */ primary_color?: string; - /** - * - Tags associated with the product grouping. - */ product_group_tag?: string[]; product_publish?: ProductPublish; - return_config?: ReturnConfigResponseSchema; - /** - * - Short description of the product, - * typically used in product listings. - */ + return_config?: ReturnConfigResponse; short_description?: string; - /** - * - Reference to the size guide for the - * product, if applicable. - */ size_guide?: string; - /** - * - List of size details for the product. - */ - sizes?: SizeDetails[]; - /** - * - URL-friendly version of the product name for SEO purposes. - */ + sizes?: any[]; slug?: string; - /** - * - Current stage of the product (e.g., "pending", - * "verified"). - */ stage?: string; - /** - * - Tags associated with the product for - * categorization and search purposes. - */ tags?: string[]; - tax_identifier?: TaxIdentifier; - /** - * - Teaser tags used for marketing the product - * (e.g., "new arrival"). - */ + tax_identifier?: any; teaser_tag?: any; - /** - * - Product template tag (e.g., "television"). - */ template_tag?: string; - /** - * - List of traders or sellers associated with the product. - */ trader?: Trader[]; - /** - * - Unique identifier of the product. - */ uid?: number; - /** - * - Grouping of product variants. - */ variant_group?: any; - /** - * - Media information for product variants. - */ variant_media?: any; - /** - * - List of product variants. - */ variants?: any; verified_by?: VerifiedBy; - /** - * - Timestamp when the product was verified. - */ verified_on?: string; }; /** @returns {ProductSize} */ @@ -11981,167 +7766,48 @@ type ProductSize = { max: number; min: number; }; -/** @returns {ProductSizeDeleteDataResponseSchema} */ -declare function ProductSizeDeleteDataResponseSchema(): ProductSizeDeleteDataResponseSchema; -type ProductSizeDeleteDataResponseSchema = { - /** - * - The unique identifier for the company that - * manages the product. - */ +/** @returns {ProductSizeDeleteDataResponse} */ +declare function ProductSizeDeleteDataResponse(): ProductSizeDeleteDataResponse; +type ProductSizeDeleteDataResponse = { company_id?: number; - /** - * - The unique identifier for the specific item - * from which the size is being deleted. - */ item_id?: number; - /** - * - The size being deleted from the product. - */ size?: string; }; -/** @returns {ProductSizeDeleteResponseSchema} */ -declare function ProductSizeDeleteResponseSchema(): ProductSizeDeleteResponseSchema; -type ProductSizeDeleteResponseSchema = { - data?: ProductSizeDeleteDataResponseSchema; - /** - * - Indicates whether the size deletion operation - * was successful. - */ +/** @returns {ProductSizeDeleteResponse} */ +declare function ProductSizeDeleteResponse(): ProductSizeDeleteResponse; +type ProductSizeDeleteResponse = { + data?: ProductSizeDeleteDataResponse; success?: boolean; }; -/** @returns {CollectionProductSortOn} */ -declare function CollectionProductSortOn(): CollectionProductSortOn; -type CollectionProductSortOn = { - /** - * - Indicates whether this sorting option is - * currently applied. - */ - is_selected?: boolean; - /** - * - Display name of the sorting option. - */ - name?: string; - /** - * - Technical value of the sorting option used in queries. - */ - value?: string; - /** - * - URL to the logo image representing the sorting option. - */ - logo?: string; -}; /** @returns {ProductSortOn} */ declare function ProductSortOn(): ProductSortOn; type ProductSortOn = { - /** - * - Indicates whether this sorting option is - * currently selected. - */ is_selected?: boolean; - /** - * - The display name of the sorting option, used to - * show on the UI. - */ name?: string; - /** - * - The value representing the sorting option. - */ value?: string; }; -/** @returns {ProductTagsViewResponseSchema} */ -declare function ProductTagsViewResponseSchema(): ProductTagsViewResponseSchema; -type ProductTagsViewResponseSchema = { - /** - * - An array of product tag strings representing - * various tags associated with the products. - */ +/** @returns {ProductTagsViewResponse} */ +declare function ProductTagsViewResponse(): ProductTagsViewResponse; +type ProductTagsViewResponse = { items?: string[]; }; -/** @returns {CreatedBy} */ -declare function CreatedBy(): CreatedBy; -type CreatedBy = { - /** - * - Unique identifier for the user. - */ - user_id?: string; - /** - * - Username of the user who created the product. - */ - username?: string; -}; -/** @returns {ModifiedBy} */ -declare function ModifiedBy(): ModifiedBy; -type ModifiedBy = { - /** - * - Unique identifier for the user who modified the entity. - */ - user_id?: string; - /** - * - Username of the user who last modified the entity. - */ - username?: string; -}; /** @returns {ProductTemplate} */ declare function ProductTemplate(): ProductTemplate; type ProductTemplate = { - /** - * - List of attributes associated with the - * product template. - */ attributes?: string[]; - /** - * - List of categories the product template belongs to. - */ categories?: string[]; - created_by?: CreatedBy; - /** - * - Timestamp of when the product template was created. - */ + created_by?: any; created_on?: string; - /** - * - List of departments the product template - * is associated with. - */ departments?: string[]; - /** - * - Detailed description of the product template. - */ description?: string; - /** - * - Indicates if the product template is - * currently active. - */ is_active?: boolean; - /** - * - Indicates if the product template is archived. - */ is_archived?: boolean; - /** - * - Indicates if the product template is expirable. - */ is_expirable: boolean; - /** - * - Indicates if the product template - * represents a physical product. - */ is_physical: boolean; - /** - * - URL of the product template logo. - */ logo?: string; - modified_by?: ModifiedBy; - /** - * - Timestamp of when the product template was - * last modified. - */ + modified_by?: any; modified_on?: string; - /** - * - The name of the product template. - */ name?: string; - /** - * - Unique URL-friendly identifier for the product template. - */ slug: string; tag?: string; }; @@ -12152,7 +7818,7 @@ type ProductTemplateDownloadsExport = { * - This is the * filters of the file for the export. */ - filters?: ProductTemplateExportFilterRequestSchema; + filters?: ProductTemplateExportFilterRequest; /** * - The list of the emails to be * notified after the completion of the job. @@ -12163,9 +7829,9 @@ type ProductTemplateDownloadsExport = { */ type?: string; }; -/** @returns {ProductTemplateExportFilterRequestSchema} */ -declare function ProductTemplateExportFilterRequestSchema(): ProductTemplateExportFilterRequestSchema; -type ProductTemplateExportFilterRequestSchema = { +/** @returns {ProductTemplateExportFilterRequest} */ +declare function ProductTemplateExportFilterRequest(): ProductTemplateExportFilterRequest; +type ProductTemplateExportFilterRequest = { /** * - The list of the brands that needs to be exported. */ @@ -12190,14 +7856,17 @@ type ProductTemplateExportFilterRequestSchema = { */ to_date?: string; }; -/** @returns {ProductTemplateExportResponseSchema} */ -declare function ProductTemplateExportResponseSchema(): ProductTemplateExportResponseSchema; -type ProductTemplateExportResponseSchema = { +/** @returns {ProductTemplateExportResponse} */ +declare function ProductTemplateExportResponse(): ProductTemplateExportResponse; +type ProductTemplateExportResponse = { /** * - Completion datetime of the job */ completed_on?: string; - created_by?: UserInfo; + /** + * - The user that created the job. + */ + created_by?: UserInfo1; /** * - The filters that needs to be exported. */ @@ -12234,43 +7903,17 @@ type ProductTemplateExportResponseSchema = { /** @returns {ProductVariants} */ declare function ProductVariants(): ProductVariants; type ProductVariants = { - /** - * - Unique identifier for the brand associated - * with the product variant. - */ brand_uid?: number; - /** - * - Unique identifier for the category to - * which the product variant belongs. - */ category_uid?: number; - /** - * - Code that uniquely identifies the specific - * product variant. - */ item_code?: string; - /** - * - Array of media objects representing images, - * videos, or other media associated with the product variant. - */ media?: Media[]; - /** - * - Name of the product variant. - */ name?: string; - /** - * - Unique identifier for the product variant. - */ uid?: number; }; -/** @returns {ProductVariantsResponseSchema} */ -declare function ProductVariantsResponseSchema(): ProductVariantsResponseSchema; -type ProductVariantsResponseSchema = { +/** @returns {ProductVariantsResponse} */ +declare function ProductVariantsResponse(): ProductVariantsResponse; +type ProductVariantsResponse = { page?: Page; - /** - * - A list of product variants - * returned in the response. - */ variants?: ProductVariants[]; }; /** @returns {Properties} */ @@ -12341,9 +7984,9 @@ type ReturnConfig = { time: number; unit: string; }; -/** @returns {InventoryReturnConfig} */ -declare function InventoryReturnConfig(): InventoryReturnConfig; -type InventoryReturnConfig = { +/** @returns {ReturnConfig1} */ +declare function ReturnConfig1(): ReturnConfig1; +type ReturnConfig1 = { /** * - Indicates if the item is returnable. */ @@ -12364,21 +8007,11 @@ type ReturnConfig2 = { time?: number; unit?: string; }; -/** @returns {ReturnConfigResponseSchema} */ -declare function ReturnConfigResponseSchema(): ReturnConfigResponseSchema; -type ReturnConfigResponseSchema = { - /** - * - Indicates if the product is eligible for return. - */ +/** @returns {ReturnConfigResponse} */ +declare function ReturnConfigResponse(): ReturnConfigResponse; +type ReturnConfigResponse = { returnable?: boolean; - /** - * - The duration within which the product can be returned. - */ time?: number; - /** - * - The time unit for the return duration, e.g., - * 'days' or 'hours'. - */ unit?: string; }; /** @returns {Sitemap} */ @@ -12396,71 +8029,54 @@ type Sitemap = { */ frequency?: string; }; -/** @returns {PageQuery} */ -declare function PageQuery(): PageQuery; -type PageQuery = { - /** - * - List of brands being filtered by the query. - */ - brand?: string[]; -}; -/** @returns {ApplicationCollectionItemSeoPage} */ -declare function ApplicationCollectionItemSeoPage(): ApplicationCollectionItemSeoPage; -type ApplicationCollectionItemSeoPage = { - /** - * - Any parameters associated with the page. - */ - params?: any; - query?: PageQuery; - /** - * - The type of page. - */ - type?: string; - /** - * - The URL for the page. - */ - url?: string; -}; -/** @returns {ApplicationCollectionItemSeoAction} */ -declare function ApplicationCollectionItemSeoAction(): ApplicationCollectionItemSeoAction; -type ApplicationCollectionItemSeoAction = { - /** - * - The type of action, typically 'page'. - */ - type?: string; - page?: ApplicationCollectionItemSeoPage; -}; /** @returns {ApplicationItemSeoAction} */ declare function ApplicationItemSeoAction(): ApplicationItemSeoAction; type ApplicationItemSeoAction = { + /** + * - Details of the page associated with this SEO action. + */ page?: any; + /** + * - Type of action, such as navigation or redirection. + */ type: string; }; /** @returns {ApplicationItemSeoBreadcrumbs} */ declare function ApplicationItemSeoBreadcrumbs(): ApplicationItemSeoBreadcrumbs; type ApplicationItemSeoBreadcrumbs = { - url?: string; - action?: ApplicationItemSeoAction[]; -}; -/** @returns {ApplicationCollectionItemSeoBreadcrumbs} */ -declare function ApplicationCollectionItemSeoBreadcrumbs(): ApplicationCollectionItemSeoBreadcrumbs; -type ApplicationCollectionItemSeoBreadcrumbs = { /** * - The URL that this breadcrumb points to. */ url?: string; - action?: ApplicationCollectionItemSeoAction; + /** + * - The actions available for + * this breadcrumb, defining what happens when it's clicked or interacted with. + */ + action?: ApplicationItemSeoAction[]; }; /** @returns {ApplicationItemSeoMetaTagItem} */ declare function ApplicationItemSeoMetaTagItem(): ApplicationItemSeoMetaTagItem; type ApplicationItemSeoMetaTagItem = { + /** + * - The name of the meta tag. + */ key: string; + /** + * - The value associated with the meta tag. + */ value: string; }; /** @returns {ApplicationItemSeoMetaTags} */ declare function ApplicationItemSeoMetaTags(): ApplicationItemSeoMetaTags; type ApplicationItemSeoMetaTags = { + /** + * - The title for this set of meta tags. + */ title: string; + /** + * - A list of meta tag + * items, each defined by key-value pairs. + */ items?: ApplicationItemSeoMetaTagItem[]; }; /** @returns {Metatags} */ @@ -12479,45 +8095,17 @@ type Metatags = { /** @returns {SizePromotionThreshold} */ declare function SizePromotionThreshold(): SizePromotionThreshold; type SizePromotionThreshold = { - /** - * - The type of threshold that applies to - * the size promotion, such as 'quantity' or 'value'. - */ threshold_type?: string; - /** - * - The value of the threshold required to - * trigger the promotion, such as a minimum number of units. - */ threshold_value?: number; }; /** @returns {SEOData} */ declare function SEOData(): SEOData; type SEOData = { - /** - * - A brief description of the item, primarily - * used for SEO purposes. - */ description?: string; - /** - * - The title of the item, primarily used for SEO - * and displayed in search engine results. - */ title?: string; sitemap?: Sitemap; - /** - * - An ordered list - * of links showing the hierarchy of the page, aiding navigation and SEO. - */ breadcrumbs?: ApplicationItemSeoBreadcrumbs[]; - /** - * - A list of meta tags for the item, used - * for SEO optimization. - */ meta_tags?: Metatags[]; - /** - * - The canonical URL for the item, - * indicating the preferred URL for search engines to avoid duplicate content. - */ canonical_url?: string; }; /** @returns {SearchKeywordResult} */ @@ -12577,49 +8165,9 @@ type SecondLevelChild = { /** @returns {SellerPhoneNumber} */ declare function SellerPhoneNumber(): SellerPhoneNumber; type SellerPhoneNumber = { - /** - * - The country code for the phone number, - * typically represented as an integer (e.g., 91 for India). - */ country_code: number; - /** - * - The phone number associated with the seller, - * without the country code. - */ number: string; }; -/** @returns {CollectionSeoDetail} */ -declare function CollectionSeoDetail(): CollectionSeoDetail; -type CollectionSeoDetail = { - /** - * - SEO meta description for the item or - * collection. This is used to describe the content for search engines. - */ - description?: string; - /** - * - SEO meta title for the item or collection. It is - * used as the title that appears in search results. - */ - title?: string; - sitemap?: Sitemap; - /** - * - List of - * breadcrumbs for navigation, showing the hierarchy of pages leading to the - * current page. - */ - breadcrumbs?: ApplicationCollectionItemSeoBreadcrumbs[]; - /** - * - An array of meta tags, each containing - * key-value pairs for various SEO meta tags used to enhance search visibility. - */ - meta_tags?: Metatags[]; - /** - * - The canonical URL for the item or - * collection, which tells search engines the preferred version of the URL to - * avoid duplicate content issues. - */ - canonical_url?: string; -}; /** @returns {SeoDetail} */ declare function SeoDetail(): SeoDetail; type SeoDetail = { @@ -12659,23 +8207,17 @@ type SeoDetail = { /** @returns {SetSize} */ declare function SetSize(): SetSize; type SetSize = { - /** - * - Number of pieces in the set. - */ pieces: number; - /** - * - Size of the item in the set. - */ size: string; }; -/** @returns {SingleCategoryResponseSchema} */ -declare function SingleCategoryResponseSchema(): SingleCategoryResponseSchema; -type SingleCategoryResponseSchema = { +/** @returns {SingleCategoryResponse} */ +declare function SingleCategoryResponse(): SingleCategoryResponse; +type SingleCategoryResponse = { data?: Category; }; -/** @returns {SingleProductResponseSchema} */ -declare function SingleProductResponseSchema(): SingleProductResponseSchema; -type SingleProductResponseSchema = { +/** @returns {SingleProductResponse} */ +declare function SingleProductResponse(): SingleProductResponse; +type SingleProductResponse = { data?: ProductSchemaV2; }; /** @returns {Size} */ @@ -12691,69 +8233,26 @@ declare function SizeDistribution(): SizeDistribution; type SizeDistribution = { sizes: SetSize[]; }; -/** @returns {SizeGuideResponseSchema} */ -declare function SizeGuideResponseSchema(): SizeGuideResponseSchema; -type SizeGuideResponseSchema = { - /** - * - Indicates whether the size guide is currently active. - */ +/** @returns {SizeGuideResponse} */ +declare function SizeGuideResponse(): SizeGuideResponse; +type SizeGuideResponse = { active?: boolean; - /** - * - The unique identifier for the brand - * associated with the size guide. - */ brand_id?: number; - /** - * - The unique identifier for the company that - * owns the size guide. - */ company_id?: number; - created_by?: CreatedBySchema; - /** - * - The timestamp when the size guide was - * created, in ISO 8601 format. - */ + created_by?: any; created_on?: string; - /** - * - The main content of the size guide, containing - * details such as the size measurements, headers, and units. - */ guide?: any; - /** - * - The public identifier of the size guide. - */ id?: string; - /** - * - A URL pointing to an image associated with the size guide. - */ - image?: string; - modified_by?: ModifiedBySchema; - /** - * - The timestamp when the size guide was last - * modified, in ISO 8601 format. - */ + modified_by?: any; modified_on?: string; - /** - * - The name or title of the size guide. - */ name?: string; - /** - * - A short description or subtitle of the size guide. - */ subtitle?: string; - /** - * - A tag or label associated with the size guide, - * used for categorization or reference. - */ tag?: string; - /** - * - The main title of the size guide. - */ title?: string; }; -/** @returns {StoreAssignResponseSchema} */ -declare function StoreAssignResponseSchema(): StoreAssignResponseSchema; -type StoreAssignResponseSchema = { +/** @returns {StoreAssignResponse} */ +declare function StoreAssignResponse(): StoreAssignResponse; +type StoreAssignResponse = { _id?: string; article_assignment: ArticleAssignment1; company_id?: number; @@ -12792,14 +8291,11 @@ type StoreDetail = { /** @returns {StoreMeta} */ declare function StoreMeta(): StoreMeta; type StoreMeta = { - /** - * - The unique identifier of the store. - */ id: number; }; -/** @returns {SuccessResponseSchema} */ -declare function SuccessResponseSchema(): SuccessResponseSchema; -type SuccessResponseSchema = { +/** @returns {SuccessResponse} */ +declare function SuccessResponse(): SuccessResponse; +type SuccessResponse = { success?: boolean; }; /** @returns {SuccessResponseObject} */ @@ -12825,21 +8321,9 @@ type TaxIdentifier = { /** @returns {TaxSlab} */ declare function TaxSlab(): TaxSlab; type TaxSlab = { - /** - * - Cess rate applicable for the tax slab. - */ cess?: number; - /** - * - The date from which the tax slab becomes effective. - */ effective_date: string; - /** - * - Applicable tax rate. - */ rate: number; - /** - * - Threshold value above which the tax slab applies. - */ threshold: number; }; /** @returns {TeaserTag} */ @@ -12865,34 +8349,21 @@ type TemplateDetails = { slug: string; tag?: string; }; -/** @returns {TemplateGlobalValidationData} */ -declare function TemplateGlobalValidationData(): TemplateGlobalValidationData; -type TemplateGlobalValidationData = { - global_validation?: GlobalValidation; -}; /** @returns {TemplateValidationData} */ declare function TemplateValidationData(): TemplateValidationData; type TemplateValidationData = { global_validation?: GlobalValidation; template_validation?: any; }; -/** @returns {TemplatesResponseSchema} */ -declare function TemplatesResponseSchema(): TemplatesResponseSchema; -type TemplatesResponseSchema = { - /** - * - List of product templates. - */ - items?: ProductTemplate[]; +/** @returns {TemplatesResponse} */ +declare function TemplatesResponse(): TemplatesResponse; +type TemplatesResponse = { + items?: ProductTemplate; page?: Page; }; -/** @returns {TemplatesGlobalValidationResponseSchema} */ -declare function TemplatesGlobalValidationResponseSchema(): TemplatesGlobalValidationResponseSchema; -type TemplatesGlobalValidationResponseSchema = { - data?: TemplateGlobalValidationData; -}; -/** @returns {TemplatesValidationResponseSchema} */ -declare function TemplatesValidationResponseSchema(): TemplatesValidationResponseSchema; -type TemplatesValidationResponseSchema = { +/** @returns {TemplatesValidationResponse} */ +declare function TemplatesValidationResponse(): TemplatesValidationResponse; +type TemplatesValidationResponse = { data?: TemplateValidationData; template_details?: TemplateDetails; }; @@ -12928,17 +8399,8 @@ type ThirdLevelChild = { /** @returns {Trader} */ declare function Trader(): Trader; type Trader = { - /** - * - List of addresses associated with the trader. - */ address?: string[]; - /** - * - The name of the trader. - */ name: string; - /** - * - The role or type of the trader. - */ type?: string; }; /** @returns {Trader1} */ @@ -12948,9 +8410,9 @@ type Trader1 = { name: string; type: string; }; -/** @returns {TraderResponseSchema} */ -declare function TraderResponseSchema(): TraderResponseSchema; -type TraderResponseSchema = { +/** @returns {TraderResponse} */ +declare function TraderResponse(): TraderResponse; +type TraderResponse = { address?: string[]; name?: string; type?: string; @@ -12958,96 +8420,33 @@ type TraderResponseSchema = { /** @returns {UpdateCollection} */ declare function UpdateCollection(): UpdateCollection; type UpdateCollection = { - /** - * - Custom JSON object containing additional - * metadata specific to the collection. - */ _custom_json?: any; - /** - * - Locale-based language settings for - * the collection. - */ _locale_language?: any; _schedule?: CollectionSchedule; - /** - * - Indicates whether facets are allowed for - * filtering items in the collection. - */ allow_facets?: boolean; - /** - * - Specifies whether sorting is allowed for - * items within the collection. - */ allow_sort?: boolean; badge?: CollectionBadge; banners?: CollectionBanner; - /** - * - A brief description of the collection. - */ description?: string; - /** - * - Indicates if the collection is active and - * visible to users. - */ is_active?: boolean; - /** - * - Specifies whether the collection is - * visible to users on the platform. - */ is_visible?: boolean; logo?: CollectionImage; - /** - * - Additional metadata related to the collection. - */ meta?: any; modified_by?: UserInfo; - /** - * - The name of the collection. - */ name?: string; - /** - * - Priority level of the collection, determining - * its order in listings. - */ priority?: number; - /** - * - Indicates whether the collection is - * published and accessible to the public. - */ published?: boolean; - /** - * - List of query filters that define - * which items are included in the collection. - */ query?: CollectionQuery[]; - seo?: CollectionSeoDetail; - /** - * - A unique identifier used to reference the - * collection in URLs. - */ + seo?: SeoDetail; slug?: string; - /** - * - The field by which items in the collection are - * sorted (e.g., popular, latest). - */ sort_on?: string; - /** - * - List of tags associated with the collection. - */ tags?: string[]; - /** - * - The type of collection, either 'items' or 'query'. - */ type?: string; - /** - * - Keys for facets that are visible - * to users for filtering items in the collection. - */ visible_facets_keys?: string[]; }; -/** @returns {UpdateSearchConfigurationRequestSchema} */ -declare function UpdateSearchConfigurationRequestSchema(): UpdateSearchConfigurationRequestSchema; -type UpdateSearchConfigurationRequestSchema = { +/** @returns {UpdateSearchConfigurationRequest} */ +declare function UpdateSearchConfigurationRequest(): UpdateSearchConfigurationRequest; +type UpdateSearchConfigurationRequest = { /** * - The application id where custom search * configuration is set @@ -13058,9 +8457,10 @@ type UpdateSearchConfigurationRequestSchema = { */ company_id: number; /** - * - The user who created the search configuration. + * - The user who created the search + * configuration. */ - created_by?: UserSchema; + created_by?: UserSerializer; /** * - The date and time when the search * configuration was created. @@ -13072,9 +8472,10 @@ type UpdateSearchConfigurationRequestSchema = { */ is_proximity_enabled?: boolean; /** - * - The user who modified the search configuration. + * - The user who modified the search + * configuration. */ - modified_by?: UserSchema; + modified_by?: UserSerializer; /** * - The date and time when the search * configuration was last modified. @@ -13090,14 +8491,14 @@ type UpdateSearchConfigurationRequestSchema = { */ searchable_attributes?: SearchableAttribute[]; }; -/** @returns {UpdateSearchConfigurationResponseSchema} */ -declare function UpdateSearchConfigurationResponseSchema(): UpdateSearchConfigurationResponseSchema; -type UpdateSearchConfigurationResponseSchema = { +/** @returns {UpdateSearchConfigurationResponse} */ +declare function UpdateSearchConfigurationResponse(): UpdateSearchConfigurationResponse; +type UpdateSearchConfigurationResponse = { success?: boolean; }; -/** @returns {CreateMarketplaceOptinResponseSchema} */ -declare function CreateMarketplaceOptinResponseSchema(): CreateMarketplaceOptinResponseSchema; -type CreateMarketplaceOptinResponseSchema = { +/** @returns {CreateMarketplaceOptinResponse} */ +declare function CreateMarketplaceOptinResponse(): CreateMarketplaceOptinResponse; +type CreateMarketplaceOptinResponse = { store_ids?: number[]; brand_ids?: number[]; company_id?: number; @@ -13145,6 +8546,14 @@ type UserDetail1 = { /** @returns {UserInfo} */ declare function UserInfo(): UserInfo; type UserInfo = { + email?: string; + uid?: string; + user_id?: string; + username?: string; +}; +/** @returns {UserInfo1} */ +declare function UserInfo1(): UserInfo1; +type UserInfo1 = { /** * - The email address of the user. */ @@ -13162,9 +8571,9 @@ type UserInfo = { */ username?: string; }; -/** @returns {UserSchema} */ -declare function UserSchema(): UserSchema; -type UserSchema = { +/** @returns {UserSerializer} */ +declare function UserSerializer(): UserSerializer; +type UserSerializer = { /** * - The contact information of the user. */ @@ -13178,32 +8587,34 @@ type UserSchema = { */ username?: string; }; -/** @returns {RequestUserSchema} */ -declare function RequestUserSchema(): RequestUserSchema; -type RequestUserSchema = { +/** @returns {RequestUserSerializer} */ +declare function RequestUserSerializer(): RequestUserSerializer; +type RequestUserSerializer = { _id?: string; contact?: string; uid?: string; user_id?: string; username?: string; }; +/** @returns {UserSerializer2} */ +declare function UserSerializer2(): UserSerializer2; +type UserSerializer2 = { + contact?: string; + user_id?: string; + username?: string; +}; +/** @returns {UserSerializer3} */ +declare function UserSerializer3(): UserSerializer3; +type UserSerializer3 = { + contact?: string; + user_id?: string; + username?: string; +}; /** @returns {ValidateIdentifier} */ declare function ValidateIdentifier(): ValidateIdentifier; type ValidateIdentifier = { - /** - * - The type of the identifier (e.g., GTIN-12, - * GTIN-13, UPC) used to categorize the format of the identifier. - */ gtin_type: string; - /** - * - The actual value of the identifier (e.g., the - * numeric or alphanumeric code representing the product). - */ gtin_value: string; - /** - * - A flag indicating whether this identifier is - * the primary one for the product. - */ primary?: boolean; }; /** @returns {ValidateProduct} */ @@ -13214,87 +8625,31 @@ type ValidateProduct = { /** @returns {ValidateSizeGuide} */ declare function ValidateSizeGuide(): ValidateSizeGuide; type ValidateSizeGuide = { - /** - * - Indicates whether the size guide is currently active. - */ active?: boolean; - /** - * - The unique identifier for the brand - * associated with the size guide. - */ brand_id?: number; - /** - * - The unique identifier for the company that - * owns the size guide. - */ - company_id?: string; - /** - * - Information about the user who created the - * size guide. - */ + company_id?: number; created_by?: any; - /** - * - The timestamp when the size guide was - * created, in ISO 8601 format. - */ created_on?: string; - /** - * - A detailed HTML description of the size guide. - */ description?: string; guide?: Guide; - /** - * - The public identifier of the size guide. - */ id?: string; - /** - * - A URL pointing to an image associated with the size guide. - */ image?: string; - /** - * - Information about the user who last - * modified the size guide. - */ modified_by?: any; - /** - * - The timestamp when the size guide was last - * modified, in ISO 8601 format. - */ modified_on?: string; - /** - * - The name of the size guide. - */ name: string; - /** - * - A short description or subtitle of the size guide. - */ subtitle?: string; - /** - * - A tag or label associated with the size guide, - * used for categorization or reference. - */ tag?: string; - /** - * - The main title of the size guide. - */ title: string; }; /** @returns {VerifiedBy} */ declare function VerifiedBy(): VerifiedBy; type VerifiedBy = { - /** - * - The unique identifier of the user who verified - * the product. - */ user_id?: string; - /** - * - The username of the user who verified the product. - */ username?: string; }; -/** @returns {WeightResponseSchema} */ -declare function WeightResponseSchema(): WeightResponseSchema; -type WeightResponseSchema = { +/** @returns {WeightResponse} */ +declare function WeightResponse(): WeightResponse; +type WeightResponse = { /** * - Indicates if it is the default weight. */ @@ -13308,12 +8663,18 @@ type WeightResponseSchema = { */ unit: string; }; -/** @returns {InventoryWeightResponseSchema} */ -declare function InventoryWeightResponseSchema(): InventoryWeightResponseSchema; -type InventoryWeightResponseSchema = { +/** @returns {InventoryWeightResponse} */ +declare function InventoryWeightResponse(): InventoryWeightResponse; +type InventoryWeightResponse = { shipping?: number; unit?: string; }; +/** @returns {CreatedBy} */ +declare function CreatedBy(): CreatedBy; +type CreatedBy = { + username?: string; + user_id?: string; +}; /** @returns {Marketplaces} */ declare function Marketplaces(): Marketplaces; type Marketplaces = { @@ -13336,9 +8697,9 @@ type GetAllMarketplaces = { items?: Marketplaces[]; page?: Page; }; -/** @returns {UpdateMarketplaceOptinRequestSchema} */ -declare function UpdateMarketplaceOptinRequestSchema(): UpdateMarketplaceOptinRequestSchema; -type UpdateMarketplaceOptinRequestSchema = { +/** @returns {UpdateMarketplaceOptinRequest} */ +declare function UpdateMarketplaceOptinRequest(): UpdateMarketplaceOptinRequest; +type UpdateMarketplaceOptinRequest = { brand_ids?: number[]; company_id?: number; enabled?: boolean; @@ -13346,9 +8707,9 @@ type UpdateMarketplaceOptinRequestSchema = { platform?: string; store_ids?: number[]; }; -/** @returns {UpdateMarketplaceOptinResponseSchema} */ -declare function UpdateMarketplaceOptinResponseSchema(): UpdateMarketplaceOptinResponseSchema; -type UpdateMarketplaceOptinResponseSchema = { +/** @returns {UpdateMarketplaceOptinResponse} */ +declare function UpdateMarketplaceOptinResponse(): UpdateMarketplaceOptinResponse; +type UpdateMarketplaceOptinResponse = { brand_ids?: number[]; company_id?: number; app_id?: string; @@ -13359,33 +8720,6 @@ type UpdateMarketplaceOptinResponseSchema = { created_by?: CreatedBy; modified_by?: CreatedBy; }; -/** @returns {Filters} */ -declare function Filters(): Filters; -type Filters = { - /** - * - The list of all the brands selected. - */ - brands?: string[]; - /** - * - The modified-on date from which the data - * needs to be exported. - */ - from_date?: string; - /** - * - The quantity range - * that needs to be exported. - */ - quantity?: InventoryExportQuantityFilter; - /** - * - The list of all the stores selected. - */ - stores?: string[]; - /** - * - The modified-on date till when the data needs - * to be exported. - */ - to_date?: string; -}; /** @returns {ActionPage} */ declare function ActionPage(): ActionPage; type ActionPage = { @@ -13403,71 +8737,6 @@ type ActionPage = { url?: string; type: PageType; }; -/** @returns {Price1} */ -declare function Price1(): Price1; -type Price1 = { - currency_code?: CurrencyCodeEnum; - currency_symbol?: string; - max?: number; - min?: number; -}; -/** @returns {MultiCategoriesSchema} */ -declare function MultiCategoriesSchema(): MultiCategoriesSchema; -type MultiCategoriesSchema = { - /** - * - The ID of the Level 1 (L1) category of the product. - */ - l1?: number; - /** - * - The ID of the Level 2 (L2) category of the product. - */ - l2?: number; - /** - * - The ID of the Level 3 (L3) category of the product. - */ - l3?: number; - /** - * - Indicates whether the L3 category of the - * product is currently active. - */ - is_active?: boolean; - /** - * - The department associated with the L3 - * category of the product. - */ - department?: number; -}; -/** @returns {CustomMeta} */ -declare function CustomMeta(): CustomMeta; -type CustomMeta = { - /** - * - The key of the metadata. Should be a non-empty - * string and length should not exceed 30 characters. - */ - key: string; - /** - * - The value of the metadata. Should be a non-empty - * string and length should not exceed 100 characters. - */ - value: string; -}; -/** @returns {ValidationErrors} */ -declare function ValidationErrors(): ValidationErrors; -type ValidationErrors = { - errors: ValidationError[]; -}; -/** @returns {ValidationError} */ -declare function ValidationError(): ValidationError; -type ValidationError = { - /** - * - A brief description of the error encountered. - */ - message: string; - /** - * - The field in the request that caused the error. - */ - field: string; -}; /** * Enum: PageType Used By: Catalog * @@ -13475,10 +8744,3 @@ type ValidationError = { */ declare function PageType(): PageType; type PageType = "about-us" | "addresses" | "blog" | "brands" | "cards" | "cart" | "categories" | "brand" | "category" | "collection" | "collections" | "custom" | "contact-us" | "external" | "faq" | "freshchat" | "home" | "notification-settings" | "orders" | "page" | "policy" | "product" | "product-request" | "products" | "profile" | "profile-order-shipment" | "profile-basic" | "profile-company" | "profile-emails" | "profile-phones" | "rate-us" | "refer-earn" | "settings" | "shared-cart" | "tnc" | "track-order" | "wishlist" | "sections" | "form" | "cart-delivery" | "cart-payment" | "cart-review" | "login" | "register" | "shipping-policy" | "return-policy" | "order-status" | "locate-us"; -/** - * Enum: CurrencyCodeEnum Used By: Catalog - * - * @returns {CurrencyCodeEnum} - */ -declare function CurrencyCodeEnum(): CurrencyCodeEnum; -type CurrencyCodeEnum = "INR" | "USD" | "EUR"; diff --git a/sdk/platform/Catalog/CatalogPlatformModel.js b/sdk/platform/Catalog/CatalogPlatformModel.js index e7c746942..747fdbce3 100644 --- a/sdk/platform/Catalog/CatalogPlatformModel.js +++ b/sdk/platform/Catalog/CatalogPlatformModel.js @@ -9,26 +9,18 @@ const Joi = require("joi"); /** * @typedef AllSizes - * @property {ValidateIdentifier[]} [identifiers] - A collection of identifiers - * (e.g., GTIN, UPC) associated with the size. Each identifier follows the - * structure defined in the ValidateIdentifier schema. - * @property {string} item_dimensions_unit_of_measure - The unit of measurement - * used for the item's dimensions (e.g., centimeters, inches). - * @property {number} item_height - The height of the item in the specified unit - * of measure. - * @property {number} item_length - The length of the item in the specified unit - * of measure. - * @property {number} item_weight - The weight of the item in the specified unit - * of measure. - * @property {string} item_weight_unit_of_measure - The unit of measurement for - * the item's weight (e.g., kilograms, pounds). - * @property {number} item_width - The width of the item in the specified unit of measure. - * @property {string} size - The label or designation for the item's size (e.g., - * S, M, L, or numerical values). - */ - -/** - * @typedef AllowSingleRequestSchema + * @property {ValidateIdentifier[]} [identifiers] + * @property {string} item_dimensions_unit_of_measure + * @property {number} item_height + * @property {number} item_length + * @property {number} item_weight + * @property {string} item_weight_unit_of_measure + * @property {number} item_width + * @property {string} size + */ + +/** + * @typedef AllowSingleRequest * @property {boolean} allow_single */ @@ -50,16 +42,17 @@ const Joi = require("joi"); /** * @typedef AppCategoryReturnConfig * @property {number} category_id - Unique identifier for L3 category - * @property {ProductReturnConfigBaseSchema} return_config - Return configuration details + * @property {ProductReturnConfigBaseSerializer} return_config - Return + * configuration details */ /** - * @typedef AppCategoryReturnConfigResponseSchema + * @typedef AppCategoryReturnConfigResponse * @property {string} [app_id] - Channel identifier * @property {number} [category_id] - Unique identifer of L3 category * @property {string} [logo] * @property {string} [name] - Name of L3 category - * @property {ProductReturnConfigBaseSchema} [return_config] + * @property {ProductReturnConfigBaseSerializer} [return_config] */ /** @@ -78,39 +71,27 @@ const Joi = require("joi"); /** * @typedef AppConfigurationDetail - * @property {string} app_id - Unique identifier for the application to which - * this configuration belongs. - * @property {AttributeDetailsGroup[]} [attributes] - A list of attribute groups - * associated with the app configuration. Each attribute group defines a set - * of attributes relevant to the app. - * @property {boolean} is_active - Indicates whether this configuration is - * currently active for the application. - * @property {boolean} is_default - Specifies if this configuration is the - * default setting for the application. - * @property {string} [logo] - URL of the logo image associated with the - * application configuration. - * @property {string} [name] - The name of the application configuration. - * @property {number} priority - The priority of this configuration compared to - * others. Higher priority configurations are given precedence. + * @property {string} app_id + * @property {AttributeDetailsGroup[]} [attributes] + * @property {boolean} is_active + * @property {boolean} is_default + * @property {string} [logo] + * @property {string} [name] + * @property {number} priority * @property {string} slug - * @property {string[]} [template_slugs] - A list of template slugs associated - * with this configuration, representing different templates that the - * configuration might use. + * @property {string[]} [template_slugs] */ /** * @typedef AppConfigurationsSort - * @property {string} app_id - Unique identifier for the application. - * @property {string} default_key - The default configuration key for the app. - * @property {boolean} is_active - Indicates whether the app configuration is - * currently active. - * @property {boolean} is_default - Specifies if this is the default - * configuration for the app. - * @property {string} key - The specific configuration key for the app. - * @property {string} [logo] - URL of the app's logo. - * @property {string} [name] - Name of the application. - * @property {number} priority - Defines the priority level for this - * configuration, with 1 being the highest. + * @property {string} app_id + * @property {string} default_key + * @property {boolean} is_active + * @property {boolean} is_default + * @property {string} key + * @property {string} [logo] + * @property {string} [name] + * @property {number} priority */ /** @@ -128,25 +109,21 @@ const Joi = require("joi"); /** * @typedef ApplicationDepartment - * @property {Object} [_custom_json] - Custom JSON data specific to the - * department, used to store additional attributes or configurations. - * @property {string} app_id - Unique identifier for the application to which - * the department belongs. - * @property {boolean} [is_active] - Indicates whether the department is - * currently active within the application. - * @property {string} [logo] - URL or path to the logo representing the department. - * @property {string} [name] - Name of the department within the application. - * @property {number} uid - Unique identifier for the department. + * @property {Object} [_custom_json] + * @property {string} app_id + * @property {boolean} [is_active] + * @property {string} [logo] + * @property {string} [name] + * @property {number} uid */ /** * @typedef ApplicationDepartmentJson - * @property {Object} _custom_json - A custom JSON object containing additional - * details or configurations specific to the application department. + * @property {Object} _custom_json */ /** - * @typedef ApplicationDepartmentListingResponseSchema + * @typedef ApplicationDepartmentListingResponse * @property {ApplicationDepartment[]} [items] * @property {Page} page */ @@ -191,103 +168,9 @@ const Joi = require("joi"); */ /** - * @typedef ApplicationProductsSchema - * @property {Object} [attributes] - Additional attributes of the product, such - * as custom properties or features. - * @property {ProductBrand} [brand] - * @property {string} [color] - * @property {string} [description] - A detailed description of the product. - * @property {string} [discount] - The discount applied to the product. - * @property {boolean} [has_variant] - Indicates whether the product has - * variants, such as different sizes or colors. - * @property {string[]} [highlights] - Key highlights of the product. - * @property {string} image_nature - The nature of the product image, indicating - * if it's the default or a standard image. - * @property {string} item_code - A unique code assigned to the product item at - * company and brand level. - * @property {string} item_type - The type of the product, defining its nature. - * @property {Media[]} [medias] - A list of media items associated with the - * product, such as images or videos. - * @property {string} name - The name of the product. - * @property {ProductListingPrice} [price] - * @property {string} [product_online_date] - The date and time when the product - * becomes available online. - * @property {Object} [promo_meta] - Metadata related to any promotions - * associated with the product. - * @property {number} [rating] - The average rating of the product, typically - * based on customer reviews. - * @property {number} [rating_count] - The total number of ratings the product - * has received. - * @property {boolean} [sellable] - Indicates whether the product is available for sale. - * @property {string} [short_description] - A brief description of the product. - * @property {string[]} [similars] - A list of similar products. - * @property {string} slug - A URL-friendly string representing the product. - * @property {Object} [teaser_tag] - A teaser tag object providing short - * promotional information about the product. - * @property {string[]} [tryouts] - A list of tryout options or samples - * available for the product. - * @property {string} [type] - The type or category of the product. - * @property {number} uid - A unique identifier for the product. - * @property {number} [popularity] - A numerical value indicating the popularity - * of the product. - * @property {number} brand_uid - The unique identifier for the brand associated - * with the product. - * @property {number} category_uid - The unique identifier for the category to - * which the product belongs. - * @property {number} [verification_status] - The verification status of the - * product, typically represented as an integer. - * @property {string} [channel_identifier] - The identifier for the sales - * channel through which the product is sold. - * @property {string} [category_slug] - A URL-friendly string representing the - * product's category. - * @property {string} [size_guide] - A guide or chart providing size information - * for the product. - * @property {number[]} l3_categories - A list of L3 category IDs of the product. - * @property {number[]} [store_ids] - A list of store IDs where the product is available. - * @property {number[]} [company_ids] - A list of company IDs associated with the product. - * @property {number[]} departments - A list of department IDs where the product - * is categorized. - * @property {string[]} [tags] - A list of tags or keywords associated with the product. - * @property {string[]} [l3_category_names] - A list of names of L3 categories - * of the product. - * @property {string[]} [sizes] - A list of available sizes for the product. - * @property {string[]} [product_group_tag] - Tags that group the product with - * other similar products. - * @property {boolean} multi_size - Indicates whether the product is available - * in multiple sizes. - * @property {boolean} is_gift - Indicates whether the product can be considered - * as a gift. - * @property {boolean} is_cod - Indicates whether the product is eligible for - * cash on delivery (COD). - * @property {boolean} is_dependent - Indicates whether the product depends on - * another product. - * @property {boolean} is_available - Indicates whether the product is currently - * available for purchase. - * @property {ApplicationItemMOQ} moq - * @property {ApplicationItemSEO} seo - * @property {Object} [variants] - An object containing details about the - * product variants. - * @property {Object} [variant_media] - Media items specific to the product variants. - * @property {Object} [variant_group] - A group identifier for products that are - * variants of one another. - * @property {MultiCategoriesSchema[]} [multi_categories] - * @property {string} [template_tag] - Tag used for categorizing or templating purposes. - * @property {Object} [net_quantity] - Net quantity details for the product. - * @property {CustomOrder} [custom_order] - * @property {string} country_of_origin - Country where the product is - * manufactured or sourced from. - * @property {Object} [_custom_json] - Custom JSON data associated with the product. - * @property {string[]} [identifiers] - Identifiers associated with the product. - * @property {number} [item_id] - Unique identifier for the item. - * @property {CustomMeta[]} [_custom_meta] - Custom meta associated with the product. - * @property {number} [discount_percentage] - The discount applied to the - * product in percentage. - */ - -/** - * @typedef ApplicationProductListingResponseSchema + * @typedef ApplicationProductListingResponse * @property {ProductFilters[]} [filters] - * @property {ApplicationProductsSchema[]} [items] + * @property {ProductListingDetail[]} [items] * @property {Object} [operators] * @property {Page} page * @property {ProductSortOn[]} [sort_on] @@ -295,12 +178,11 @@ const Joi = require("joi"); /** * @typedef ApplicationStoreJson - * @property {Object} _custom_json - Custom JSON data for the store. It can - * contain any additional data specific to the store configuration. + * @property {Object} _custom_json */ /** - * @typedef AppReturnConfigResponseSchema + * @typedef AppReturnConfigResponse * @property {string} [app_id] - Channel identifier * @property {number} [category_count] - Count of L3 category return config set * for application @@ -332,7 +214,7 @@ const Joi = require("joi"); */ /** - * @typedef ArticleStoreResponseSchema + * @typedef ArticleStoreResponse * @property {string} [name] * @property {string} [store_code] * @property {string} [store_type] @@ -361,94 +243,77 @@ const Joi = require("joi"); /** * @typedef AttributeDetailsGroup - * @property {string} display_type - The type of display used for the attribute, - * such as text, dropdown, or image. - * @property {boolean} is_active - Indicates if this attribute group is currently active. - * @property {string} [key] - A unique key or identifier for the attribute group. - * @property {string} [logo] - URL of the logo image associated with this attribute group. - * @property {string} name - The name of the attribute group. - * @property {number} priority - The priority of the attribute group, - * determining the order in which it is displayed or processed. - * @property {string} [slug] - A URL-friendly identifier for the attribute - * group, often used in APIs for identification. - * @property {string} [unit] - The unit of measurement associated with the - * attribute, if applicable (e.g., cm, kg). + * @property {string} display_type + * @property {boolean} is_active + * @property {string} [key] + * @property {string} [logo] + * @property {string} name + * @property {number} priority + * @property {string} [slug] + * @property {string} [unit] */ /** * @typedef AttributeMaster - * @property {string[]} [allowed_values] - List of allowed values for the - * attribute, if applicable. - * @property {string} [format] - Format of the attribute, such as case formatting. - * @property {boolean} [mandatory] - Whether the attribute is mandatory. - * @property {boolean} [multi] - Indicates if the attribute allows multiple values. + * @property {string[]} [allowed_values] + * @property {string} [format] + * @property {boolean} [mandatory] + * @property {boolean} [multi] * @property {AttributeSchemaRange} [range] - * @property {string} type - Data type of the attribute. + * @property {string} type */ /** * @typedef AttributeMasterDetails - * @property {string} display_type - Type of display used for the attribute - * (e.g., text, dropdown). + * @property {string} display_type */ /** * @typedef AttributeMasterFilter * @property {string[]} [depends_on] - * @property {boolean} indexing - Whether the attribute should be indexed for search. - * @property {number} [priority] - Priority of the attribute in filtering (optional). + * @property {boolean} indexing + * @property {number} [priority] */ /** * @typedef AttributeMasterMandatoryDetails - * @property {string[]} [l3_keys] - A list of Level 3 (L3) keys associated with - * the attribute, typically used for advanced categorization or attribute grouping. + * @property {string[]} [l3_keys] */ /** * @typedef AttributeMasterMeta - * @property {boolean} [enriched] - Indicates if the attribute has been enriched - * with additional details or data beyond the basic schema. + * @property {boolean} [enriched] * @property {AttributeMasterMandatoryDetails} mandatory_details */ /** - * @typedef AttributeMasterSchema - * @property {Object} [created_by] - Information about the user who created the attribute. - * @property {string} [created_on] - The timestamp when the attribute was created. - * @property {string[]} departments - Departments or categories to which the - * attribute applies. - * @property {string} [description] - A description of the attribute. + * @typedef AttributeMasterSerializer + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {string[]} departments + * @property {string} [description] * @property {AttributeMasterDetails} details - * @property {boolean} [enabled_for_end_consumer] - Indicates if the attribute - * is enabled for end consumers. + * @property {boolean} [enabled_for_end_consumer] * @property {AttributeMasterFilter} filters - * @property {boolean} [is_nested] - Indicates if the attribute can be nested - * under other attributes. - * @property {string} [logo] - URL of the logo associated with the attribute. - * @property {Object} [modified_by] - Information about the user who last - * modified the attribute. - * @property {string} [modified_on] - The timestamp when the attribute was last modified. - * @property {string} name - Name of the attribute. - * @property {string} [raw_key] - Name of the attribute. + * @property {boolean} [is_nested] + * @property {string} [logo] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} [name] + * @property {string} [raw_key] * @property {AttributeMaster} schema - * @property {string} [suggestion] - Suggested or recommended value for the - * attribute, if applicable. - * @property {Object} [synonyms] - Synonyms or alternative names for the - * attribute, used for search and indexing. - * @property {string[]} [tags] - Tags or keywords associated with the attribute, - * often used for categorization. - * @property {string} [unit] - The unit of measurement for the attribute, if - * applicable (e.g., cm, kg). - * @property {string} slug - Unique slug or identifier for the attribute. - * @property {boolean} [variant] - Indicates if the attribute is a variant of - * another attribute. + * @property {string} slug + * @property {string} [suggestion] + * @property {Object} [synonyms] + * @property {string[]} [tags] + * @property {string} [unit] + * @property {boolean} [variant] */ /** * @typedef AttributeSchemaRange - * @property {number} [min] - Minimum allowed value for the attribute. - * @property {number} [max] - Maximum allowed value for the attribute. + * @property {number} [max] + * @property {number} [min] */ /** @@ -492,20 +357,22 @@ const Joi = require("joi"); /** * @typedef BaseAppCategoryReturnConfig + * @property {string} app_id - Channel identifier + * @property {number} company_id - Unique identifer of company * @property {AppCategoryReturnConfig[]} data - Category level return config details */ /** - * @typedef BaseAppCategoryReturnConfigResponseSchema - * @property {AppCategoryReturnConfigResponseSchema[]} [data] - * @property {PageResponseSchema} [page] + * @typedef BaseAppCategoryReturnConfigResponse + * @property {AppCategoryReturnConfigResponse[]} [data] + * @property {PageResponse} [page] */ /** * @typedef Brand * @property {Logo} [logo] - * @property {string} [name] - The name of the brand. - * @property {number} [uid] - Unique identifier for the brand. + * @property {string} [name] + * @property {number} [uid] */ /** @@ -525,7 +392,7 @@ const Joi = require("joi"); */ /** - * @typedef BrandListingResponseSchema + * @typedef BrandListingResponse * @property {BrandItem[]} [items] - An array of brand items, each containing * detailed information about the brand, such as action, banners, departments, * discount, logo, and other related fields. @@ -555,7 +422,7 @@ const Joi = require("joi"); /** * @typedef ApplicationBrandListingSchema * @property {ApplicationBrandListingItemSchema[]} [items] - * @property {Page} page + * @property {Page} [page] */ /** @@ -585,24 +452,24 @@ const Joi = require("joi"); /** * @typedef BrandMeta - * @property {number} id - Unique identifier for the brand. - * @property {string} name - Name of the brand. + * @property {number} id + * @property {string} name */ /** * @typedef InventoryBrandMeta - * @property {number} [id] - Unique identifier for the brand in the inventory. - * @property {string} [name] - Name of the brand in the inventory. + * @property {number} [id] + * @property {string} [name] */ /** - * @typedef BulkAssetResponseSchema + * @typedef BulkAssetResponse * @property {Items[]} [items] * @property {Page} [page] */ /** - * @typedef BulkHsnResponseSchema + * @typedef BulkHsnResponse * @property {boolean} [success] - Flag indicating the success status of the * bulk HSN operation. */ @@ -645,16 +512,11 @@ const Joi = require("joi"); /** * @typedef BulkProductJob - * @property {string} [company_id] - The unique identifier of the company - * associated with the bulk product job. - * @property {string} [template_tag] - The template tag used to classify the - * products in the bulk job. - * @property {string} [product_type] - The type of products being processed in - * the bulk job (e.g., standard, digital, composite). - * @property {string} [department] - The department under which the products in - * the bulk job are categorized. - * @property {string} [file_path] - The file path of the uploaded file - * containing the bulk product data. + * @property {number} [company_id] + * @property {string} [template_tag] + * @property {string} [product_type] + * @property {string} [department] + * @property {string} [file_path] */ /** @@ -662,7 +524,7 @@ const Joi = require("joi"); * @property {number} [cancelled] * @property {Object[]} [cancelled_records] * @property {number} company_id - * @property {UserInfo} [created_by] - The user who created the item. + * @property {UserInfo1} [created_by] - The user who created the item. * @property {string} created_on - The date and time when the item was created. * @property {string} [custom_template_tag] * @property {number} [failed] @@ -679,7 +541,7 @@ const Joi = require("joi"); */ /** - * @typedef BulkProductRequestSchema + * @typedef BulkProductRequest * @property {string} batch_id * @property {number} company_id * @property {Object[]} data @@ -687,9 +549,9 @@ const Joi = require("joi"); */ /** - * @typedef BulkResponseSchema + * @typedef BulkResponse * @property {string} batch_id - * @property {UserInfo} [created_by] - The user who created the item. + * @property {UserInfo1} [created_by] - The user who created the item. * @property {string} created_on - The date and time when the item was created. * @property {boolean} [is_active] - Whether the item is active or not. * @property {string} [modified_by] - The user who last modified the item. @@ -721,20 +583,18 @@ const Joi = require("joi"); */ /** - * @typedef CatalogInsightResponseSchema + * @typedef CatalogInsightResponse * @property {CatalogInsightBrand} [brand_distribution] * @property {CatalogInsightItem} [item] */ /** - * @typedef CategoriesResponseSchema - * @property {string} [name] - The name of the category. - * @property {string} [slug] - A URL-friendly unique identifier for the category. - * @property {string} [slug_key] - A key used for internal identification of the - * category slug. - * @property {string} [template_slug] - The slug of the template associated with - * the category. - * @property {number} [uid] - A unique identifier for the category. + * @typedef CategoriesResponse + * @property {string} [name] + * @property {string} [slug] + * @property {string} [slug_key] + * @property {string} [template_slug] + * @property {number} [uid] */ /** @@ -776,7 +636,7 @@ const Joi = require("joi"); */ /** - * @typedef CategoryListingResponseSchema + * @typedef CategoryListingResponse * @property {DepartmentCategoryTree[]} [data] - An array containing the * department category trees, which provide hierarchical information about * categories and their associated departments. @@ -803,8 +663,8 @@ const Joi = require("joi"); */ /** - * @typedef CategoryResponseSchema - * @property {Category[]} [items] - The list of categories. + * @typedef CategoryResponse + * @property {Category[]} [items] * @property {Page} [page] */ @@ -836,7 +696,7 @@ const Joi = require("joi"); */ /** - * @typedef CollectionCreateResponseSchema + * @typedef CollectionCreateResponse * @property {string} [uid] - Unique identifier for the collection. * @property {CollectionSchedule} [_schedule] * @property {boolean} [allow_facets] - Indicates whether facet-based filtering @@ -846,7 +706,6 @@ const Joi = require("joi"); * @property {string} [app_id] - The application ID associated with the collection. * @property {Object} [badge] - Details of the badge associated with the collection. * @property {ImageUrls} [banners] - * @property {Object} [cron] * @property {string} [description] - A description of the collection. * @property {boolean} [is_active] - Indicates whether the collection is currently active. * @property {BannerImage} [logo] @@ -876,7 +735,7 @@ const Joi = require("joi"); */ /** - * @typedef CollectionDetailResponseSchema + * @typedef CollectionDetailResponse * @property {Object} [_schedule] * @property {boolean} [allow_facets] * @property {boolean} [allow_sort] @@ -979,7 +838,7 @@ const Joi = require("joi"); /** * @typedef CompanyMeta - * @property {number} id - Unique identifier for the company. + * @property {number} id */ /** @@ -1002,15 +861,13 @@ const Joi = require("joi"); */ /** - * @typedef ConfigErrorResponseSchema - * @property {string} message - A human-readable error message providing details - * about the configuration failure. + * @typedef ConfigErrorResponse + * @property {string} message */ /** - * @typedef ConfigSuccessResponseSchema - * @property {string} message - A message confirming the successful completion - * of the configuration operation. + * @typedef ConfigSuccessResponse + * @property {string} message */ /** @@ -1118,7 +975,7 @@ const Joi = require("joi"); */ /** - * @typedef CreateAutocompleteWordsResponseSchema + * @typedef CreateAutocompleteWordsResponse * @property {Object} [_custom_json] * @property {string} [app_id] * @property {Object[]} [results] @@ -1169,16 +1026,18 @@ const Joi = require("joi"); */ /** - * @typedef CreateSearchConfigurationRequestSchema + * @typedef CreateSearchConfigurationRequest * @property {string} application_id - The application id where custom search * configuration is set * @property {number} company_id - The company id where custom search configuration is set - * @property {UserSchema} [created_by] - The user who created the search configuration. + * @property {UserSerializer} [created_by] - The user who created the search + * configuration. * @property {string} [created_on] - The date and time when the search * configuration was created. * @property {boolean} [is_proximity_enabled] - Flag indicating if proximity * search is enabled for this attribute. - * @property {UserSchema} [modified_by] - The user who modified the search configuration. + * @property {UserSerializer} [modified_by] - The user who modified the search + * configuration. * @property {string} [modified_on] - The date and time when the search * configuration was last modified. * @property {number} [proximity] - Proximity distance configuration @@ -1187,7 +1046,7 @@ const Joi = require("joi"); */ /** - * @typedef CreateSearchConfigurationResponseSchema + * @typedef CreateSearchConfigurationResponse * @property {boolean} [success] */ @@ -1202,6 +1061,8 @@ const Joi = require("joi"); /** * @typedef CreateUpdateAppReturnConfig + * @property {string} app_id - Channel identifier + * @property {number} company_id - Unique identifer of company * @property {string} return_config_level - Return configurtion Level * category|product|no-return */ @@ -1213,19 +1074,16 @@ const Joi = require("joi"); */ /** - * @typedef CrossSellingResponseSchema + * @typedef CrossSellingResponse * @property {CatalogInsightBrand} [brand_distribution] * @property {CrossSellingData} [data] */ /** * @typedef CustomOrder - * @property {string} [manufacturing_time_unit] - Unit of time for manufacturing - * (e.g., days, weeks). - * @property {boolean} is_custom_order - Indicates if the product is available - * for custom orders. - * @property {number} [manufacturing_time] - Time required for manufacturing in - * the specified unit. + * @property {boolean} [is_custom_order] + * @property {number} [manufacturing_time] + * @property {string} [manufacturing_time_unit] */ /** @@ -1237,44 +1095,34 @@ const Joi = require("joi"); */ /** - * @typedef DefaultKeyRequestSchema - * @property {string} default_key - The default key used for the requested operation. + * @typedef DefaultKeyRequest + * @property {string} default_key */ /** * @typedef DeleteAppCategoryReturnConfig + * @property {string} app_id - Channel identifier * @property {number[]} category_ids - List of category_ids to be deleted. + * @property {number} company_id - Unique identifer of company */ /** - * @typedef DeleteProductRequestBody - * @property {number} [brand_uid] - The brand identifier for the product. - * @property {string} [item_code] - The code of the item to be deleted. - * @property {string} [company_id] - The ID of the company. (Optional if already - * provided in the path) - * @property {number} [item_id] - The ID of the product. - */ - -/** - * @typedef DeleteResponseSchema + * @typedef DeleteResponse * @property {string} [message] */ /** - * @typedef DeleteSearchConfigurationResponseSchema + * @typedef DeleteSearchConfigurationResponse * @property {boolean} [success] */ /** * @typedef Department - * @property {DepartmentMedia} [logo] - * @property {string} [name] - The name of the department, used to identify it - * within the application. - * @property {number} [priority_order] - Defines the priority or order in which - * the department should appear in listings. - * @property {string} [slug] - A URL-friendly string used to uniquely identify - * the department. - * @property {number} [uid] - A unique identifier for the department. + * @property {Media2} [logo] + * @property {string} [name] + * @property {number} [priority_order] + * @property {string} [slug] + * @property {number} [uid] */ /** @@ -1286,17 +1134,12 @@ const Joi = require("joi"); */ /** - * @typedef DepartmentErrorResponseSchema - * @property {string} [code] - Error code representing the type of error encountered. - * @property {Object} [errors] - Detailed information about the errors - * encountered in the request, typically containing specific field validation - * errors or related data. - * @property {string} [message] - A human-readable message that explains the - * reason for the error. - * @property {Object} [meta] - Additional metadata about the error, such as - * contextual or debugging information. - * @property {number} [status] - HTTP status code associated with the error, - * e.g., 400 for a bad request or 500 for a server error. + * @typedef DepartmentErrorResponse + * @property {string} [code] + * @property {Object} [errors] + * @property {string} [message] + * @property {Object} [meta] + * @property {number} [status] */ /** @@ -1310,18 +1153,18 @@ const Joi = require("joi"); */ /** - * @typedef DepartmentResponseSchema + * @typedef DepartmentResponse * @property {Department[]} [items] */ /** - * @typedef DepartmentsResponseSchema - * @property {GetDepartment[]} [items] - List of department objects. + * @typedef DepartmentsResponse + * @property {GetDepartment[]} [items] * @property {Page} [page] */ /** - * @typedef DimensionResponseSchema + * @typedef DimensionResponse * @property {number} height - The height dimension. * @property {boolean} is_default - Indicates if it is the default dimension. * @property {number} length - The length dimension. @@ -1330,7 +1173,7 @@ const Joi = require("joi"); */ /** - * @typedef InventoryDimensionResponseSchema + * @typedef InventoryDimensionResponse * @property {number} [height] * @property {number} [length] * @property {string} [unit] @@ -1339,14 +1182,11 @@ const Joi = require("joi"); /** * @typedef Document - * @property {string} [legal_name] - The official legal name associated with the document. - * @property {string} type - The type of document. - * @property {string} [url] - A URL link to the document, typically pointing to - * where the document is stored. - * @property {string} value - The actual value or identifier associated with the - * document, such as a GST number or PAN number. - * @property {boolean} [verified] - Indicates whether the document has been - * verified as valid. + * @property {string} [legal_name] + * @property {string} type + * @property {string} [url] + * @property {string} value + * @property {boolean} [verified] */ /** @@ -1360,8 +1200,8 @@ const Joi = require("joi"); */ /** - * @typedef ErrorResponseSchema - * @property {number} [code] - A string representing the specific error code. + * @typedef ErrorResponse + * @property {string} [code] - A string representing the specific error code. * @property {string} [error] - A brief description of the error type. * @property {string} [message] - A detailed message explaining the error. * @property {Object} [meta] - Additional metadata or context about the error, @@ -1377,82 +1217,74 @@ const Joi = require("joi"); /** * @typedef RawProduct - * @property {Object} [_custom_json] - Custom JSON data for the product. - * @property {number[]} [all_company_ids] - List of company IDs associated with - * the product. - * @property {string[]} [all_identifiers] - List of all identifiers associated - * with the product. - * @property {Object[]} [all_sizes] - List of sizes available for the product. - * @property {Object} [attributes] - Additional attributes for the product. + * @property {Object} [_custom_json] + * @property {number[]} [all_company_ids] + * @property {string[]} [all_identifiers] + * @property {Object[]} [all_sizes] + * @property {Object} [attributes] * @property {Brand} [brand] - * @property {number} [brand_uid] - Unique identifier of the brand. - * @property {Object} [category] - Category details of the product. - * @property {string} [category_slug] - Slug representing the category of the product. - * @property {number} [category_uid] - Unique identifier for the product category. - * @property {number} [company_id] - Unique identifier of the company associated - * with the product. - * @property {string} [country_of_origin] - Country where the product is manufactured. - * @property {Object} [created_by] - Details of the user who created the product. - * @property {string} [created_on] - Timestamp when the product was created. - * @property {string} [currency] - Currency in which the product is priced. - * @property {Object} [custom_order] - Custom order details for the product. - * @property {number[]} [departments] - List of department IDs associated with - * the product. - * @property {string} [description] - Detailed description of the product. - * @property {string[]} [highlights] - List of highlights for the product. - * @property {string} [hsn_code] - HSN code associated with the product for tax purposes. - * @property {string} [id] - Unique identifier of the product. - * @property {string} [image_nature] - Nature or type of product images. - * @property {string[]} [images] - List of image URLs for the product. - * @property {boolean} [is_active] - Indicates whether the product is active. - * @property {boolean} [is_dependent] - Indicates if the product is dependent on - * another product. - * @property {boolean} [is_expirable] - Indicates if the product has an expiration date. - * @property {boolean} [is_image_less_product] - Indicates if the product does - * not have associated images. - * @property {boolean} [is_physical] - Indicates if the product is a physical item. - * @property {boolean} [is_set] - Indicates if the product is part of a set. - * @property {string} [item_code] - Unique code representing the item. - * @property {string} [item_type] - Type of the item, such as 'standard'. - * @property {string[]} [l3_mapping] - L3 category mapping for the product. - * @property {Media[]} [media] - Media associated with the product, such as - * images or videos. - * @property {Object} [modified_by] - Details of the user who last modified the product. - * @property {string} [modified_on] - Timestamp when the product was last modified. - * @property {Object} [moq] - Minimum order quantity details for the product. - * @property {boolean} [multi_size] - Indicates if the product supports multiple sizes. - * @property {string} [name] - Name of the product. - * @property {NetQuantityResponseSchema} [net_quantity] - * @property {number} [no_of_boxes] - Number of boxes required for packaging the product. - * @property {string} [pending] - Pending state of the product, such as pending approval. - * @property {string} [primary_color] - Primary color of the product. - * @property {string[]} [product_group_tag] - Tags associated with the product group. + * @property {number} [brand_uid] + * @property {Object} [category] + * @property {string} [category_slug] + * @property {number} [category_uid] + * @property {string} [color] + * @property {number} [company_id] + * @property {string} [country_of_origin] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {string} [currency] + * @property {Object} [custom_order] + * @property {number[]} [departments] + * @property {string} [description] + * @property {string[]} [highlights] + * @property {string} [hsn_code] + * @property {string} [id] + * @property {string} [image_nature] + * @property {string[]} [images] + * @property {boolean} [is_active] + * @property {boolean} [is_dependent] + * @property {boolean} [is_expirable] + * @property {boolean} [is_image_less_product] + * @property {boolean} [is_physical] + * @property {boolean} [is_set] + * @property {string} [item_code] + * @property {string} [item_type] + * @property {string[]} [l3_mapping] + * @property {Media[]} [media] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {Object} [moq] + * @property {boolean} [multi_size] + * @property {string} [name] + * @property {NetQuantityResponse} [net_quantity] + * @property {number} [no_of_boxes] + * @property {string} [pending] + * @property {string} [primary_color] + * @property {string[]} [product_group_tag] * @property {ProductPublished} [product_publish] - * @property {ReturnConfigResponseSchema} [return_config] - * @property {string} [short_description] - Short description of the product. - * @property {string} [size_guide] - Size guide for the product. - * @property {Object[]} [sizes] - List of available sizes for the product. - * @property {string} [slug] - Unique slug identifier for the product. - * @property {string} [stage] - Current stage of the product (e.g., pending, verified). - * @property {string[]} [tags] - List of tags associated with the product. - * @property {TaxIdentifier} [tax_identifier] - * @property {Object} [teaser_tag] - Teaser tags for the product. - * @property {string} [template_tag] - Template tag associated with the product. - * @property {Trader[]} [trader] - List of traders associated with the product. - * @property {number} [uid] - Unique identifier for the product. - * @property {Object} [variant_group] - Variant group details for the product. - * @property {Object} [variant_media] - Media related to product variants. - * @property {Object} [variants] - Product variants information. + * @property {ReturnConfigResponse} [return_config] + * @property {string} [short_description] + * @property {string} [size_guide] + * @property {Object[]} [sizes] + * @property {string} [slug] + * @property {string} [stage] + * @property {string[]} [tags] + * @property {Object} [tax_identifier] + * @property {Object} [teaser_tag] + * @property {string} [template_tag] + * @property {Trader[]} [trader] + * @property {number} [uid] + * @property {Object} [variant_group] + * @property {Object} [variant_media] + * @property {Object} [variants] * @property {VerifiedBy} [verified_by] - * @property {string} [verified_on] - Timestamp when the product was verified. - * @property {string[]} [store_id_list] - List of store IDs where the product is - * available. - * @property {string} [action] - Action to be performed on the product. + * @property {string} [verified_on] + * @property {string[]} [store_id_list] */ /** - * @typedef RawProductListingResponseSchema - * @property {RawProduct[]} [items] - A list of raw product items. + * @typedef RawProductListingResponse + * @property {RawProduct[]} [items] * @property {Page} [page] */ @@ -1465,11 +1297,12 @@ const Joi = require("joi"); /** * @typedef AttributeDetail - * @property {string[]} [_id] + * @property {string[]} [departments] * @property {string} [description] * @property {AttributeMasterDetails} [details] * @property {boolean} [enabled_for_end_consumer] * @property {AttributeMasterFilter} [filters] + * @property {string} [id] * @property {boolean} [is_nested] * @property {string} [logo] * @property {AttributeMasterMeta} [meta] @@ -1479,43 +1312,18 @@ const Joi = require("joi"); */ /** - * @typedef LatLong - * @property {string} type - Type of coordinate data. - * @property {number[]} coordinates - Array containing longitude and latitude coordinates. - */ - -/** - * @typedef ApplicationLocationAddressSchema - * @property {string} [address1] - Primary address line. - * @property {string} [address2] - Secondary address line. - * @property {number} [pincode] - Pincode of the store's location. - * @property {string} [city] - City where the store is located. - * @property {string} [country] - Country where the store is located. - * @property {string} [state] - State where the store is located. - * @property {LatLong} [lat_long] - * @property {string} [country_code] - Country code for the store's location. - * @property {Object} [address_meta] - Schema for address metadata. - */ - -/** - * @typedef GetAddressSchema - * @property {string} [address1] - Primary address line, typically including - * street name, building number, or apartment details. - * @property {string} [address2] - Secondary address line, used for additional - * location details such as locality, neighborhood, or landmark. - * @property {string} [address_type] - The type of address. - * @property {string} [city] - The city where the address is located. - * @property {string} [country] - The country where the address is located. - * @property {string} [country_code] - The country code representing the - * country, such as 'IN' for India. - * @property {string} [landmark] - A nearby landmark that helps identify the - * address location. - * @property {number} [latitude] - The latitude coordinate of the address, used - * for geolocation purposes. - * @property {number} [longitude] - The longitude coordinate of the address, - * used for geolocation purposes. - * @property {number} [pincode] - The postal code or ZIP code associated with the address. - * @property {string} [state] - The state or region where the address is located. + * @typedef GetAddressSerializer + * @property {string} [address1] + * @property {string} [address2] + * @property {string} [address_type] + * @property {string} [city] + * @property {string} [country] + * @property {string} [country_code] + * @property {string} [landmark] + * @property {number} [latitude] + * @property {number} [longitude] + * @property {number} [pincode] + * @property {string} [state] */ /** @@ -1545,7 +1353,7 @@ const Joi = require("joi"); */ /** - * @typedef GetAutocompleteWordsResponseSchema + * @typedef GetAutocompleteWordsResponse * @property {GetAutocompleteWordsData[]} [items] * @property {Page} [page] */ @@ -1566,7 +1374,7 @@ const Joi = require("joi"); /** * @typedef GetCatalogConfigurationMetaData - * @property {MetaDataListingResponseSchema} [listing] + * @property {MetaDataListingResponse} [listing] * @property {GetCatalogConfigurationDetailsProduct} [product] */ @@ -1581,7 +1389,6 @@ const Joi = require("joi"); * @property {string} [app_id] - The application ID associated with the collection. * @property {CollectionBadge} [badge] * @property {ImageUrls} [banners] - * @property {Object} [cron] * @property {string} [description] - A description of the collection. * @property {boolean} [is_active] - Indicates whether the collection is currently active. * @property {Media} [logo] @@ -1608,53 +1415,44 @@ const Joi = require("joi"); */ /** - * @typedef GetCollectionItemsResponseSchema + * @typedef GetCollectionItemsResponse * @property {ProductFilters[]} [filters] - An array of filters applicable to * the products in the collection. - * @property {ApplicationProductsSchema[]} [items] - An array of products that - * belong to the collection. + * @property {ProductListingDetail[]} [items] - List of product details in the collection. * @property {Page} [page] * @property {ProductSortOn[]} [sort_on] - Sorting options available for the * products in the collection. */ /** - * @typedef GetCollectionListingResponseSchema + * @typedef GetCollectionListingResponse * @property {CollectionListingFilter} [filters] * @property {GetCollectionDetailNest[]} [items] - Array of nested collection details. * @property {Page} [page] */ /** - * @typedef GetCollectionQueryOptionResponseSchema + * @typedef GetCollectionQueryOptionResponse * @property {ProductFilters[]} [filters] * @property {Object} operators * @property {ProductSortOn[]} [sort_on] */ /** - * @typedef GetCompanySchema - * @property {GetAddressSchema[]} [addresses] - List of addresses associated - * with the company. - * @property {string} [business_type] - Specifies the business model or legal - * structure of the company, such as 'LLC', 'Corporation', or 'Proprietorship'. - * @property {string} [company_type] - Indicates the type of company, such as - * 'manufacturer-owner', 'retailer', or 'wholesaler'. - * @property {UserSchema} [created_by] - * @property {string} [created_on] - The date and time when the company record - * was created. - * @property {UserSchema} [modified_by] - * @property {string} [modified_on] - The date and time when the company record - * was last updated. - * @property {string} [name] - The registered name of the company. - * @property {string} [reject_reason] - If applicable, the reason why the - * company's application or status was rejected. - * @property {string} [stage] - Current operational stage of the company, such - * as 'active', 'pending', or 'rejected'. - * @property {number} [uid] - Unique identifier for the company within the system. - * @property {UserSchema} [verified_by] - * @property {string} [verified_on] - The date and time when the company's - * details were verified. + * @typedef GetCompanySerializer + * @property {GetAddressSerializer[]} [addresses] + * @property {string} [business_type] + * @property {string} [company_type] + * @property {UserSerializer2} [created_by] + * @property {string} [created_on] + * @property {UserSerializer2} [modified_by] + * @property {string} [modified_on] + * @property {string} [name] + * @property {string} [reject_reason] + * @property {string} [stage] + * @property {number} [uid] + * @property {UserSerializer2} [verified_by] + * @property {string} [verified_on] */ /** @@ -1684,7 +1482,7 @@ const Joi = require("joi"); */ /** - * @typedef GetConfigMetadataResponseSchema + * @typedef GetConfigMetadataResponse * @property {ConditionItem[]} [condition] * @property {DataItem[]} data * @property {Page} [page] @@ -1698,133 +1496,97 @@ const Joi = require("joi"); */ /** - * @typedef GetConfigResponseSchema - * @property {ConfigItem[]} data + * @typedef GetConfigResponse + * @property {Object[]} data * @property {PageResponseType} page */ -/** - * @typedef ConfigItem - * @property {string} [app_id] - Unique identifier for the application to which - * this configuration belongs. - * @property {AttributeConfig[]} [attributes] - * @property {string} [id] - Unique identifier for the configuration. - * @property {boolean} [is_active] - Indicates if this configuration is - * currently active for the application. - * @property {boolean} [is_default] - Specifies whether this is the default - * configuration for the application. - * @property {string} [name] - The name of the configuration group. - * @property {number} [priority] - The priority of this configuration group. - * @property {string} [slug] - A URL-friendly identifier for the configuration group. - * @property {string[]} [template_slugs] - A list of template slugs associated - * with this configuration. - */ - -/** - * @typedef AttributeConfig - * @property {string} [display_type] - The type of display used for the - * attribute (e.g., text, dropdown). - * @property {boolean} [is_active] - Indicates whether the attribute is currently active. - * @property {string} [key] - A unique key or identifier for the attribute. - * @property {string} [name] - The name of the attribute. - * @property {number} [priority] - The priority of the attribute. - * @property {string} [slug] - A URL-friendly identifier for the attribute. - */ - /** * @typedef GetDepartment - * @property {RequestUserSchema} [created_by] - * @property {string} [created_on] - Timestamp of when the department was created. - * @property {boolean} [is_active] - Indicates whether the department is currently active. + * @property {RequestUserSerializer} [created_by] + * @property {string} [created_on] + * @property {boolean} [is_active] * @property {string} [item_type] - * @property {string} [logo] - URL of the department's logo. - * @property {RequestUserSchema} [modified_by] - * @property {string} [modified_on] - Timestamp of when the department was last modified. - * @property {string} [id] - Alternate unique identifier for the department. - * @property {string} [name] - Name of the department. - * @property {string} [slug] - URL-friendly slug for the department. - * @property {string[]} [synonyms] - List of alternative names for the department. - * @property {number} [priority_order] - The priority order of the department - * for display purposes. - * @property {number} [uid] - Unique identifier for the department within the system. + * @property {string} [logo] + * @property {RequestUserSerializer} [modified_by] + * @property {string} [modified_on] + * @property {string} [name] + * @property {number} [page_no] + * @property {number} [page_size] + * @property {number} [priority_order] + * @property {string} [search] + * @property {string} [slug] + * @property {string[]} [synonyms] + * @property {number} [uid] */ /** * @typedef GetInventories * @property {InventoryBrandMeta} [brand] * @property {InventoryCompanyMeta} [company] - * @property {string} [country_of_origin] - Country where the product was manufactured. - * @property {RequestUserSchema} [created_by] + * @property {string} [country_of_origin] + * @property {RequestUserSerializer} [created_by] * @property {DateMeta} [date_meta] - * @property {InventoryDimensionResponseSchema} [dimension] - * @property {string} [expiration_date] - Expiration date of the product. - * @property {string} [id] - Unique identifier of the product. - * @property {Identifier} [identifier] - * @property {string} [inventory_updated_on] - The last date when inventory - * information was updated. - * @property {boolean} [is_set] - Indicates if the product is sold as a set. - * @property {number} [item_id] - Unique item ID for the product. - * @property {InventoryManufacturerResponseSchema} [manufacturer] - * @property {RequestUserSchema} [modified_by] - * @property {Object} [platforms] - Indicates platform availability status for - * the product. + * @property {InventoryDimensionResponse} [dimension] + * @property {string} [expiration_date] + * @property {string} [id] + * @property {Object} [identifier] + * @property {string} [inventory_updated_on] + * @property {boolean} [is_set] + * @property {number} [item_id] + * @property {InventoryManufacturerResponse} [manufacturer] + * @property {RequestUserSerializer} [modified_by] + * @property {Object} [platforms] * @property {PriceArticle} [price] * @property {QuantitiesArticle} [quantities] * @property {ReturnConfig} [return_config] - * @property {string} [seller_identifier] - Seller’s identifier for the product. - * @property {string} [size] - Size of the product. - * @property {string} [stage] - Current stage of the product, such as verified or pending. - * @property {ArticleStoreResponseSchema} [store] - * @property {string[]} [tags] - Tags associated with the product. - * @property {TaxIdentifier} [tax_identifier] - * @property {number} [total_quantity] - Total available quantity of the product. - * @property {string} [trace_id] - Trace ID for inventory management. - * @property {boolean} [track_inventory] - Indicates if the inventory is being tracked. - * @property {TraderResponseSchema[]} [trader] - Information about traders, such - * as manufacturers or importers. - * @property {string} [uid] - Unique identifier for the product. - * @property {InventoryWeightResponseSchema} [weight] - */ - -/** - * @typedef GetInventoriesResponseSchema - * @property {GetInventories[]} [items] - List of product inventories. + * @property {string} [seller_identifier] + * @property {string} [size] + * @property {string} [stage] + * @property {ArticleStoreResponse} [store] + * @property {string[]} [tags] + * @property {Object} [tax_identifier] + * @property {number} [total_quantity] + * @property {string} [trace_id] + * @property {boolean} [track_inventory] + * @property {TraderResponse[]} [trader] + * @property {string} [uid] + * @property {InventoryWeightResponse} [weight] + */ + +/** + * @typedef GetInventoriesResponse + * @property {GetInventories[]} [items] * @property {Page} [page] */ /** - * @typedef GetLocationSchema - * @property {Object} [_custom_json] - Custom JSON data specific to the location. - * @property {GetAddressSchema} address - * @property {string} store_code - Unique identifier code for the store. - * @property {GetCompanySchema} [company] - * @property {SellerPhoneNumber[]} [contact_numbers] - List of contact numbers - * associated with the store. - * @property {UserSchema} [created_by] - * @property {string} [created_on] - Timestamp indicating when the location was created. - * @property {string} display_name - Display name of the location for easier - * identification. - * @property {Document[]} [documents] - Documents related to the store location. - * @property {InvoiceDetailsSchema} [gst_credentials] + * @typedef GetLocationSerializer + * @property {Object} [_custom_json] + * @property {GetAddressSerializer} address + * @property {string} code + * @property {GetCompanySerializer} [company] + * @property {SellerPhoneNumber[]} [contact_numbers] + * @property {UserSerializer3} [created_by] + * @property {string} [created_on] + * @property {string} display_name + * @property {Document[]} [documents] + * @property {InvoiceDetailsSerializer} [gst_credentials] * @property {LocationIntegrationType} [integration_type] - * @property {LocationManagerSchema} [manager] - * @property {UserSchema} [modified_by] - * @property {string} [modified_on] - Timestamp indicating when the location - * details were last modified. - * @property {string} name - Name of the store location. - * @property {string[]} [notification_emails] - Email addresses for sending - * notifications related to this store. - * @property {string} phone_number - Primary phone number for contacting the store. - * @property {ProductReturnConfigSchema} [product_return_config] - * @property {string} [stage] - Current operational stage of the store. - * @property {string} [store_type] - Type of store. - * @property {LocationDayWiseSchema[]} [timing] - The daily operational timings - * for the store. - * @property {number} [uid] - Unique identifier for the store. - * @property {UserSchema} [verified_by] - * @property {string} [verified_on] - Timestamp when the store location was verified. - * @property {Object} [warnings] - Warnings or issues associated with the store, if any. - * @property {number} [company_id] - ID of the company to which this store belongs. + * @property {LocationManagerSerializer} [manager] + * @property {UserSerializer3} [modified_by] + * @property {string} [modified_on] + * @property {string} name + * @property {string[]} [notification_emails] + * @property {string} phone_number + * @property {ProductReturnConfigSerializer} [product_return_config] + * @property {string} [stage] + * @property {string} [store_type] + * @property {LocationDayWiseSerializer[]} [timing] + * @property {number} [uid] + * @property {UserSerializer3} [verified_by] + * @property {string} [verified_on] + * @property {Object} [warnings] */ /** @@ -1834,147 +1596,103 @@ const Joi = require("joi"); */ /** - * @typedef GetProductBundleCreateResponseSchema - * @property {string} choice - Specifies the type of bundle, e.g., single or multi. - * @property {number} [company_id] - Unique identifier for the company that owns - * the product bundle. - * @property {CreatedBy} [created_by] - * @property {string} [created_on] - Timestamp when the product bundle was created. - * @property {string} [id] - Unique identifier for the product bundle. - * @property {boolean} is_active - Indicates if the product bundle is active or not. - * @property {string} [logo] - URL of the product bundle's logo, or null if not available. - * @property {Object} [meta] - Additional metadata about the product bundle. - * @property {ModifiedBy} [modified_by] - * @property {string} [modified_on] - Timestamp when the product bundle was last modified. - * @property {string} name - Name of the product bundle. - * @property {string[]} [page_visibility] - Visibility settings for the product - * bundle across different pages. - * @property {ProductBundleItem[]} products - List of products that are part of - * the product bundle. - * @property {boolean} [same_store_assignment] - Indicates whether all products - * in the bundle belong to the same store. - * @property {string} slug - Unique slug used to identify the product bundle in URLs. - */ - -/** - * @typedef GetProductBundleListingResponseSchema - * @property {GetProductBundleCreateResponseSchema[]} [items] - List of product - * bundles that are returned in the response. + * @typedef GetProductBundleCreateResponse + * @property {string} choice + * @property {number} [company_id] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {string} [id] + * @property {boolean} is_active + * @property {string} [logo] + * @property {Object} [meta] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} name + * @property {string[]} [page_visibility] + * @property {ProductBundleItem[]} products + * @property {boolean} [same_store_assignment] + * @property {string} slug + */ + +/** + * @typedef GetProductBundleListingResponse + * @property {GetProductBundleCreateResponse[]} [items] * @property {Page} [page] */ /** - * @typedef GetProductBundleResponseSchema - * @property {string} [choice] - Specifies the type of product bundle, e.g., - * 'single' or 'multi'. - * @property {number} [company_id] - The unique identifier of the company that - * owns the product bundle. - * @property {boolean} [is_active] - Indicates whether the product bundle is active. - * @property {string} [logo] - URL of the logo associated with the product bundle. - * @property {Object} [meta] - Additional metadata for the product bundle. - * @property {string} [name] - The name of the product bundle. - * @property {string[]} [page_visibility] - List of pages where the product - * bundle is visible, e.g., 'pdp'. - * @property {GetProducts[]} [products] - A list of products included in the bundle. - * @property {boolean} [same_store_assignment] - Indicates whether all products - * in the bundle are assigned to the same store. - * @property {string} [slug] - Unique URL-friendly identifier for the product bundle. + * @typedef GetProductBundleResponse + * @property {string} [choice] + * @property {number} [company_id] + * @property {boolean} [is_active] + * @property {string} [logo] + * @property {Object} [meta] + * @property {string} [name] + * @property {string[]} [page_visibility] + * @property {GetProducts[]} [products] + * @property {boolean} [same_store_assignment] + * @property {string} [slug] */ /** * @typedef GetProducts - * @property {boolean} [allow_remove] - Indicates whether the product can be - * removed from the bundle. - * @property {boolean} [auto_add_to_cart] - Specifies if the product is - * automatically added to the cart. - * @property {boolean} [auto_select] - Indicates if the product is automatically - * selected in the bundle. - * @property {number} [max_quantity] - The maximum quantity of the product that - * can be added to the bundle. - * @property {number} [min_quantity] - The minimum quantity of the product that - * must be added to the bundle. - * @property {number} [product_uid] - Unique identifier for the product. - * @property {ProductDetails} [product_details] - */ - -/** - * @typedef ProductDetails - * @property {string} [slug] - Unique URL-friendly identifier for the product. - * @property {number} [quantity] - The quantity of the product available. - * @property {Object} [attributes] - A set of key-value pairs representing the - * attributes of the product, such as pattern, gender, etc. + * @property {boolean} [allow_remove] + * @property {boolean} [auto_add_to_cart] + * @property {boolean} [auto_select] + * @property {number} [max_quantity] + * @property {number} [min_quantity] * @property {Price} [price] - * @property {string[]} [images] - List of URLs pointing to images of the product. - * @property {number} [uid] - Unique identifier for the product. - * @property {string} [item_code] - Code assigned to the product for inventory purposes. - * @property {Object} [identifier] - Identification details for the product, - * including EANs (European Article Numbers). - * @property {string[]} [sizes] - List of available sizes for the product. - * @property {string} [country_of_origin] - Country where the product was manufactured. + * @property {LimitedProductData} [product_details] + * @property {number} [product_uid] + * @property {Size[]} [sizes] */ /** - * @typedef GetCollectionDetailResponseSchema - * @property {Object} [_custom_json] - Custom JSON data associated with the collection. - * @property {Object} [_locale_language] - Locale-specific language details. + * @typedef GetCollectionDetailResponse + * @property {Object} [_custom_json] + * @property {Object} [_locale_language] * @property {CollectionSchedule} [_schedule] - * @property {Object} [action] - Action details, including navigation or page - * redirection information. - * @property {boolean} [allow_facets] - Indicates whether facets are allowed for - * filtering the collection. - * @property {boolean} [allow_sort] - Indicates whether sorting is enabled for - * the collection. - * @property {string} [app_id] - The unique identifier of the application to - * which the collection belongs. + * @property {Object} [action] + * @property {boolean} [allow_facets] + * @property {boolean} [allow_sort] + * @property {string} [app_id] * @property {CollectionBadge} [badge] * @property {ImageUrls} [banners] - * @property {string} [description] - A textual description of the collection. - * @property {boolean} [is_active] - Indicates whether the collection is currently active. - * @property {boolean} [is_visible] - Indicates whether the collection is - * visible on the platform. + * @property {string} [description] + * @property {boolean} [is_active] + * @property {boolean} [is_visible] * @property {Media} [logo] - * @property {Object} [meta] - Metadata associated with the collection. - * @property {string} [name] - The name of the collection. - * @property {number} [priority] - The priority level assigned to the collection. - * @property {boolean} [published] - Indicates whether the collection is - * published and visible to customers. - * @property {CollectionQuery[]} [query] - Query details that define how items - * in the collection are filtered. + * @property {Object} [meta] + * @property {string} [name] + * @property {number} [priority] + * @property {boolean} [published] + * @property {CollectionQuery[]} [query] * @property {SeoDetail} [seo] - * @property {string} [slug] - The URL-friendly slug for the collection. - * @property {string} [sort_on] - The sorting criteria applied to the collection - * (e.g., by latest, discount). - * @property {string[]} [tags] - Tags associated with the collection. - * @property {string} [type] - The type of the collection (e.g., query-based). - * @property {string} [uid] - A unique identifier for the collection. - * @property {string} [_id] - A unique identifier for the collection, matching `uid`. - * @property {string[]} [visible_facets_keys] - Keys representing visible facets - * for filtering. + * @property {string} [slug] + * @property {string} [sort_on] + * @property {string[]} [tags] + * @property {string} [type] + * @property {string} [uid] + * @property {string[]} [visible_facets_keys] */ /** * @typedef CommonResponseSchemaCollection - * @property {string} [message] - A message providing details about the response. + * @property {string} [message] */ /** - * @typedef GetQueryFiltersKeysResponseSchema - * @property {ProductFiltersKeysOnly[]} [filters] - An array of available filter - * keys for querying products. - * @property {Object} operators - A map of available operators that can be used - * for querying, where the key is the operator type and the value is a string. - * @property {ProductSortOn[]} [sort_on] - An array of sorting options available - * for the products. + * @typedef GetQueryFiltersKeysResponse + * @property {ProductFiltersKeysOnly[]} [filters] + * @property {Object} operators + * @property {ProductSortOn[]} [sort_on] */ /** - * @typedef GetQueryFiltersResponseSchema - * @property {CollectionProductFilters[]} [filters] - An array of filters to be - * applied on products while querying. - * @property {Object} operators - A map of operators available for product - * queries, where the key is the operator type and the value is a string. - * @property {CollectionProductSortOn[]} [sort_on] - An array of sorting options - * to be applied to product queries. + * @typedef GetQueryFiltersResponse + * @property {ProductFilters[]} [filters] + * @property {Object} operators + * @property {ProductSortOn[]} [sort_on] */ /** @@ -1998,25 +1716,19 @@ const Joi = require("joi"); /** * @typedef CollectionItemSchemaV2 - * @property {string} action - Specifies whether the item should be added or - * removed from the collection. - * @property {number} item_id - The unique identifier of the item in the collection. - * @property {number} [priority] - The priority level of the item in the - * collection, with higher values representing higher priority. + * @property {string} action + * @property {number} item_id + * @property {number} [priority] */ /** * @typedef CollectionItemUpdateSchema - * @property {boolean} [allow_facets] - Indicates whether facets are allowed for - * filtering the collection items. - * @property {boolean} [allow_sort] - Indicates whether sorting is enabled for - * the collection items. - * @property {CollectionItemSchemaV2[]} [items] - A list of items in the collection. - * @property {CollectionQuerySchemaV2[]} [query] - A list of query conditions to - * filter the collection items. - * @property {string} type - The type of the collection item, defining its classification. - * @property {string[]} [visible_facets_keys] - A list of keys representing - * visible facets for the collection, used for filtering. + * @property {boolean} [allow_facets] + * @property {boolean} [allow_sort] + * @property {CollectionItemSchemaV2[]} [items] + * @property {CollectionQuerySchemaV2[]} [query] + * @property {string} type + * @property {string[]} [visible_facets_keys] */ /** @@ -2043,16 +1755,18 @@ const Joi = require("joi"); */ /** - * @typedef GetSearchConfigurationResponseSchema + * @typedef GetSearchConfigurationResponse * @property {string} application_id - The application id where custom search * configuration is set * @property {number} company_id - The company id where custom search configuration is set - * @property {UserSchema} [created_by] - The user who created the search configuration. + * @property {UserSerializer} [created_by] - The user who created the search + * configuration. * @property {string} [created_on] - The date and time when the search * configuration was created. * @property {boolean} [is_proximity_enabled] - Flag indicating if proximity * search is enabled for this attribute. - * @property {UserSchema} [modified_by] - The user who modified the search configuration. + * @property {UserSerializer} [modified_by] - The user who modified the search + * configuration. * @property {string} [modified_on] - The date and time when the search * configuration was last modified. * @property {number} [proximity] - Proximity distance configuration @@ -2071,13 +1785,13 @@ const Joi = require("joi"); */ /** - * @typedef GetSearchWordsDetailResponseSchema + * @typedef GetSearchWordsDetailResponse * @property {GetSearchWordsData} [items] * @property {Page} [page] */ /** - * @typedef GetSearchWordsResponseSchema + * @typedef GetSearchWordsResponse * @property {GetSearchWordsData[]} [items] * @property {Page} [page] */ @@ -2098,7 +1812,7 @@ const Joi = require("joi"); */ /** - * @typedef HSNCodesResponseSchema + * @typedef HSNCodesResponse * @property {HSNData} [data] * @property {string} [message] */ @@ -2109,33 +1823,18 @@ const Joi = require("joi"); * @property {string[]} [hsn_code] */ -/** - * @typedef CreatedBySchema - * @property {string} user_id - The unique identifier for the user who created - * the resource. - * @property {string} username - The username of the user who created the resource. - */ - -/** - * @typedef ModifiedBySchema - * @property {string} user_id - The unique identifier for the user who last - * modified the resource. - * @property {string} username - The username of the user who last modified the resource. - */ - /** * @typedef HSNDataInsertV2 * @property {string} country_code - Country code. - * @property {CreatedBySchema} [created_by] - * @property {ModifiedBySchema} [modified_by] + * @property {Object} [created_by] - Details of the user who created the HSN data. * @property {string} [created_on] - Date and time when the HSN data was created. * @property {string} description - Description of the HSN data. - * @property {string} hsn_code + * @property {string} hsn_code - HSN code. * @property {string} [hsn_code_id] - Unique identifier of the HSN code. + * @property {Object} [modified_by] - Details of the user who last modified the HSN data. * @property {string} [modified_on] - Date and time when the HSN data was last modified. - * @property {Object} reporting_hsn - HSN code. - * @property {string} [id] - Internal database identifier for the HSN data. - * @property {TaxSlab[]} taxes - List of applicable tax slabs for the HSN data. + * @property {string} reporting_hsn - HSN code. + * @property {TaxSlab[]} taxes - List of tax slabs. * @property {string} type - Type of HSN data (goods or services). */ @@ -2157,7 +1856,7 @@ const Joi = require("joi"); /** * @typedef HsnCodesListingResponseSchemaV2 * @property {HSNDataInsertV2[]} [items] - * @property {PageResponseSchema} [page] + * @property {PageResponse} [page] */ /** @@ -2179,7 +1878,7 @@ const Joi = require("joi"); /** * @typedef HsnUpsert * @property {number} company_id - The ID of the company. - * @property {string} [hs2_code] - The HS2 code. + * @property {string} hs2_code - The HS2 code. * @property {string} hsn_code - The HSN code. * @property {boolean} [is_active] - Flag indicating whether the entry is active. * @property {number} tax1 - The first tax rate. @@ -2229,7 +1928,7 @@ const Joi = require("joi"); */ /** - * @typedef InventoryBulkRequestSchema + * @typedef InventoryBulkRequest * @property {string} batch_id * @property {number} company_id * @property {InventoryJobPayload[]} sizes @@ -2243,7 +1942,7 @@ const Joi = require("joi"); */ /** - * @typedef InventoryCreateRequestSchema + * @typedef InventoryCreateRequest * @property {string[]} [data] - The list of attributes that you want to extract * in the export job. * @property {InventoryExportFilter} filters - This filters that are applied for @@ -2288,9 +1987,9 @@ const Joi = require("joi"); */ /** - * @typedef InventoryExportJobListResponseSchema - * @property {InventoryJobDetailResponseSchema} items - This is the list/history - * of all the jobs. + * @typedef InventoryExportJobListResponse + * @property {InventoryJobDetailResponse} items - This is the list/history of + * all the jobs. * @property {Page} [page] */ @@ -2302,17 +2001,17 @@ const Joi = require("joi"); */ /** - * @typedef InventoryExportRequestSchema + * @typedef InventoryExportRequest * @property {number[]} [brand] * @property {number[]} [store] * @property {string} [type] */ /** - * @typedef InventoryExportResponseSchema + * @typedef InventoryExportResponse * @property {string} [created_by] - The user that created the job. * @property {string} [created_on] - Creation datetime of the job - * @property {Filters} [filters] + * @property {Object} [filters] - The filters that needs to be exported. * @property {string} [modified_on] - Modification date of the job * @property {string[]} [notification_emails] - The notification emails for the job. * @property {number} seller_id - The seller id that needs to be exported. @@ -2328,7 +2027,7 @@ const Joi = require("joi"); */ /** - * @typedef InventoryJobDetailResponseSchema + * @typedef InventoryJobDetailResponse * @property {UserDetail} [cancelled_by] - This is the user detail of the user * who cancelled the job. * @property {string} [cancelled_on] - This is the timestamp of the cacellation @@ -2347,7 +2046,6 @@ const Joi = require("joi"); * post completion of the job. * @property {number} seller_id - This ID of the company. * @property {string} [status] - This tells you the current status of the export job. - * @property {Object} [stats] - Provides count of total/success/failed * @property {string} task_id - This is the task id of the jobs that is used for search. * @property {string} [type] - This is the file type of the export. * @property {string} url - This is the url to download the export. @@ -2386,19 +2084,11 @@ const Joi = require("joi"); /** * @typedef InventoryPage - * @property {boolean} [has_next] - Indicates whether there is a next page of results. - * @property {boolean} [has_previous] - Indicates whether there is a previous - * page of results. - * @property {number} item_total - The total number of items available in the inventory. - * @property {string} [next_id] - The identifier for fetching the next set of - * results. If null, there are no more results. - * @property {string} type - The type of pagination being used, often indicating - * the method or strategy for paginating the results. - */ - -/** - * @typedef AddInventoryRequestPayload - * @property {InventoryResponseSchema[]} [sizes] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} item_total + * @property {string} [next_id] + * @property {string} type */ /** @@ -2414,7 +2104,7 @@ const Joi = require("joi"); */ /** - * @typedef InventoryRequestSchema + * @typedef InventoryRequest * @property {number} company_id * @property {ItemQuery} item * @property {InvSize[]} sizes @@ -2428,37 +2118,20 @@ const Joi = require("joi"); */ /** - * @typedef InventoryResponseSchema - * @property {string} [currency] - The currency in which the item is priced, e.g., 'INR'. - * @property {Object} [identifiers] - Object containing identifier details such - * as GTIN or SKU codes. - * @property {string} [inventory_updated_on] - The date and time when the - * inventory was last updated, in ISO 8601 format. - * @property {number} [item_id] - The unique identifier for the item in the - * inventory system. - * @property {number} [price] - The original price of the item. - * @property {number} [price_effective] - The effective price of the item after - * any discounts. - * @property {number} [price_transfer] - The transfer price for the item (if applicable). - * @property {number} [quantity] - The total quantity of the item available in - * the inventory. - * @property {number} [sellable_quantity] - The quantity of the item that is - * available for sale. - * @property {string} [seller_identifier] - An identifier for the seller, - * typically an SKU or unique code. - * @property {string} [size] - The size of the item, if applicable. - * @property {Object} [store] - Object containing details about the store where - * the item is stocked. - * @property {string} [uid] - A unique identifier combining store ID and seller - * identifier. - * @property {Object} [created_by] - Details of the user or entity that created - * the item record, including 'username' and 'user_id'. - * @property {Object} [modified_by] - Details of the user or entity that last - * modified the item record, including 'username' and 'user_id'. - * @property {string} [expiration_date] - The expiration date of the item, if - * applicable, in ISO 8601 format. - * @property {string[]} [tags] - An array of tags or labels associated with the - * item for categorization or search purposes. + * @typedef InventoryResponse + * @property {string} [currency] + * @property {Object} [identifiers] + * @property {string} [inventory_updated_on] + * @property {number} [item_id] + * @property {number} [price] + * @property {number} [price_effective] + * @property {number} [price_transfer] + * @property {number} [quantity] + * @property {number} [sellable_quantity] + * @property {string} [seller_identifier] + * @property {string} [size] + * @property {Object} [store] + * @property {string} [uid] */ /** @@ -2469,24 +2142,18 @@ const Joi = require("joi"); /** * @typedef InventoryResponsePaginated - * @property {InventoryResponseSchema[]} [items] + * @property {InventoryResponse[]} [items] * @property {Page} [page] */ /** * @typedef InventorySellerIdentifierResponsePaginated - * @property {InventorySellerResponseSchema[]} [items] - * @property {Page} [page] - */ - -/** - * @typedef ApplicationInventorySellerIdentifierResponsePaginated - * @property {InventorySellerResponseSchema[]} [items] + * @property {InventorySellerResponse[]} [items] * @property {Page} [page] */ /** - * @typedef InventorySellerResponseSchema + * @typedef InventorySellerResponse * @property {Object} [_custom_json] - Custom JSON data for the article. * @property {string} [added_on_store] - The date and time when the article was * added to the store. @@ -2494,7 +2161,7 @@ const Joi = require("joi"); * @property {CompanyMeta} company - The metadata of the company. * @property {string} country_of_origin - The country of origin of the article. * @property {string} [created_by] - The user who created the article. - * @property {DimensionResponseSchema} dimension - The dimensions of the article. + * @property {DimensionResponse} dimension - The dimensions of the article. * @property {string} [expiration_date] - The expiration date of the article. * @property {boolean} fragile - Indicates if the article is fragile. * @property {string} fynd_article_code - The Fynd article code. @@ -2504,119 +2171,65 @@ const Joi = require("joi"); * @property {boolean} [is_active] - Indicates if the article is active. * @property {boolean} [is_set] * @property {number} item_id - The ID of the item. - * @property {ManufacturerResponseSchema} manufacturer - The manufacturer of the article. + * @property {ManufacturerResponse} manufacturer - The manufacturer of the article. * @property {Object} [meta] - Additional metadata for the article. * @property {string} [modified_by] - The user who modified the article. * @property {PriceMeta} price - The price metadata of the article. * @property {Quantities} [quantities] * @property {Object} [raw_meta] - The raw metadata of the article. - * @property {InventoryReturnConfig} [return_config] + * @property {ReturnConfig1} [return_config] - The return configuration of the article. * @property {string} seller_identifier - The seller identifier of the article. * @property {InventorySet} [set] * @property {string} size - The size of the article. * @property {string} [stage] - The stage of the article. * @property {StoreMeta} store - The metadata of the store. * @property {string[]} [tags] - The tags associated with the article. - * @property {TaxIdentifier} [tax_identifier] + * @property {Object} [tax_identifier] - The tax identifier of the article. * @property {number} total_quantity - The total quantity of the article. * @property {string} [trace_id] - The trace ID of the article. * @property {boolean} [track_inventory] - Indicates if the inventory is tracked * for the article. - * @property {Trader[]} [trader] - The traders associated with the article. + * @property {Trader1[]} [trader] - The traders associated with the article. * @property {string} uid - The unique identifier of the article. - * @property {WeightResponseSchema} weight - The weight of the article. - */ - -/** - * @typedef ApplicationInventorySellerResponseSchema - * @property {Object} [_custom_json] - Custom JSON data for the article. - * @property {string} [added_on_store] - The date and time when the article was - * added to the store. - * @property {BrandMeta} brand - The metadata of the brand. - * @property {CompanyMeta} company - The metadata of the company. - * @property {string} country_of_origin - The country of origin of the article. - * @property {string} [created_by] - The user who created the article. - * @property {DimensionResponseSchema} dimension - The dimensions of the article. - * @property {string} [expiration_date] - The expiration date of the article. - * @property {boolean} fragile - Indicates if the article is fragile. - * @property {string} fynd_article_code - The Fynd article code. - * @property {string} fynd_item_code - The Fynd item code. - * @property {Object} [fynd_meta] - The Fynd metadata of the article. - * @property {Object} identifier - The identifier of the article. - * @property {boolean} [is_active] - Indicates if the article is active. - * @property {boolean} [is_set] - * @property {number} item_id - The ID of the item. - * @property {ManufacturerResponseSchema} manufacturer - The manufacturer of the article. - * @property {Object} [meta] - Additional metadata for the article. - * @property {string} [modified_by] - The user who modified the article. - * @property {PriceMeta} price - The price metadata of the article. - * @property {Quantities} [quantities] - * @property {Object} [raw_meta] - The raw metadata of the article. - * @property {InventoryReturnConfig} [return_config] - * @property {string} seller_identifier - The seller identifier of the article. - * @property {InventorySet} [set] - * @property {string} size - The size of the article. - * @property {string} [stage] - The stage of the article. - * @property {StoreMeta} store - The metadata of the store. - * @property {string[]} [tags] - The tags associated with the article. - * @property {TaxIdentifier} [tax_identifier] - * @property {number} total_quantity - The total quantity of the article. - * @property {string} [trace_id] - The trace ID of the article. - * @property {boolean} [track_inventory] - Indicates if the inventory is tracked - * for the article. - * @property {Trader[]} [trader] - The traders associated with the article. - * @property {string} uid - The unique identifier of the article. - * @property {WeightResponseSchema} weight - The weight of the article. - * @property {DateMeta} [date_meta] - * @property {Object} [platforms] - Platform-specific availability information. - * @property {number} [price_marked] - Marked price of the item. - * @property {number} [price_effective] - Effective price of the item after discount. - * @property {string} [currency] - Currency in which the prices are listed. - * @property {number} [price_selling] - Selling price of the item. - * @property {Object} [discount_meta] - Discount metadata for the item. - * @property {Object} [discount_applied] - Discounts applied to the item, if any. + * @property {WeightResponse} weight - The weight of the article. */ /** * @typedef InventorySet - * @property {string} [name] - The name of the inventory set. - * @property {number} [quantity] - The quantity of items available in the inventory set. + * @property {string} [name] + * @property {number} [quantity] * @property {SizeDistribution} size_distribution */ /** - * @typedef InventoryStockResponseSchema - * @property {Object[]} [items] - An array of inventory stock items. Each item - * represents a stock entry for a specific product or SKU. + * @typedef InventoryStockResponse + * @property {Object[]} [items] * @property {InventoryPage} page */ /** - * @typedef InventoryUpdateResponseSchema + * @typedef InventoryUpdateResponse * @property {InventoryResponseItem[]} [items] * @property {string} message - It is the success message of the inventory update. - * @property {boolean} [success] - It is the success status of the inventory update. */ /** - * @typedef InventoryValidationResponseSchema + * @typedef InventoryValidationResponse * @property {Object} [data] * @property {string} [message] */ /** - * @typedef InvoiceCredSchema - * @property {boolean} [enabled] - Indicates whether the invoice credentials are - * enabled for use. - * @property {string} [password] - The password associated with the invoice credentials. - * @property {string} [username] - The username or identifier used for the - * invoice credentials. + * @typedef InvoiceCredSerializer + * @property {boolean} [enabled] + * @property {string} [password] + * @property {string} [username] */ /** - * @typedef InvoiceDetailsSchema - * @property {InvoiceCredSchema} [e_invoice] - * @property {InvoiceCredSchema} [e_waybill] + * @typedef InvoiceDetailsSerializer + * @property {InvoiceCredSerializer} [e_invoice] + * @property {InvoiceCredSerializer} [e_waybill] */ /** @@ -2663,102 +2276,69 @@ const Joi = require("joi"); * @property {number} [uid] */ -/** - * @typedef SizeGuideItem - * @property {boolean} [active] - Indicates if the size guide is active or not. - * @property {number} [brand_id] - The identifier for the brand associated with - * the size guide. - * @property {number} [company_id] - The identifier for the company that owns - * the size guide. - * @property {CreatedBySchema} [created_by] - * @property {string} [created_on] - The timestamp when the size guide was created. - * @property {Guide} [guide] - * @property {string} [id] - The unique identifier for the size guide. - * @property {ModifiedBySchema} [modified_by] - * @property {string} [modified_on] - The timestamp when the size guide was last modified. - * @property {string} [name] - The name of the size guide. - * @property {string} [subtitle] - A short description or subtitle for the size guide. - * @property {string} [tag] - A tag or identifier used to classify the size guide. - * @property {string} [title] - The title of the size guide. - * @property {string} [description] - A detailed description or HTML content - * providing more information about the size guide. - * @property {string} [image] - A URL to an image associated with the size guide. - */ - /** * @typedef ListSizeGuide - * @property {SizeGuideItem[]} [items] - A list of size guides, each containing - * detailed information about a product's dimensions, creation, and modification data. - * @property {PageResponseSchema} [page] + * @property {Object[]} [items] + * @property {Object} [page] */ /** - * @typedef LocationDayWiseSchema - * @property {LocationTimingSchema} [closing] - * @property {boolean} open - Indicates whether the store or location is open on - * the specified day. - * @property {LocationTimingSchema} [opening] - * @property {string} weekday - The day of the week for which the store timings - * are defined. + * @typedef LocationDayWiseSerializer + * @property {LocationTimingSerializer} [closing] + * @property {boolean} open + * @property {LocationTimingSerializer} [opening] + * @property {string} weekday */ /** * @typedef LocationIntegrationType - * @property {string} [inventory] - The system used to manage inventory - * integration for the location. - * @property {string} [order] - The system used to manage order integration for - * the location. + * @property {string} [inventory] + * @property {string} [order] */ /** - * @typedef LocationListSchema - * @property {GetLocationSchema[]} [items] + * @typedef LocationListSerializer + * @property {GetLocationSerializer[]} [items] * @property {Page} [page] */ /** - * @typedef LocationManagerSchema - * @property {string} [email] - Email address of the location manager. + * @typedef LocationManagerSerializer + * @property {string} [email] * @property {SellerPhoneNumber} mobile_no - * @property {string} [name] - Full name of the location manager. + * @property {string} [name] */ /** - * @typedef LocationTimingSchema - * @property {number} [hour] - The hour component of the time, represented in - * 24-hour format. - * @property {number} [minute] - The minute component of the time. + * @typedef LocationTimingSerializer + * @property {number} [hour] + * @property {number} [minute] */ /** * @typedef Logo - * @property {string} [aspect_ratio] - Aspect ratio of the logo image, typically - * expressed as a string (e.g., '16:9'). - * @property {number} [aspect_ratio_f] - Numeric representation of the aspect - * ratio for scaling purposes. - * @property {string} [secure_url] - Secure URL to the logo image. - * @property {string} [url] - URL to the logo image. + * @property {string} [aspect_ratio] + * @property {number} [aspect_ratio_f] + * @property {string} [secure_url] + * @property {string} [url] */ /** * @typedef MOQData - * @property {number} [increment_unit] - The unit by which the quantity can be - * incremented after the minimum order quantity. - * @property {number} [maximum] - The maximum number of units that can be - * ordered for the item. - * @property {number} [minimum] - The minimum number of units required to place - * an order for the item. + * @property {number} [increment_unit] + * @property {number} [maximum] + * @property {number} [minimum] */ /** - * @typedef ManufacturerResponseSchema + * @typedef ManufacturerResponse * @property {string} address - The address of the manufacturer. * @property {boolean} is_default - Indicates if it is the default manufacturer. * @property {string} name - The name of the manufacturer. */ /** - * @typedef InventoryManufacturerResponseSchema + * @typedef InventoryManufacturerResponse * @property {string} [address] * @property {boolean} [is_default] * @property {string} [name] @@ -2766,14 +2346,9 @@ const Joi = require("joi"); /** * @typedef Media - * @property {Object} [meta] - A metadata object containing additional - * information about the media, such as dimensions, format, or other relevant details. - * @property {string} [type] - The type of media. - * @property {string} url - The URL where the media can be accessed. - * @property {string} [alt] - The alternative text for the media, used for - * accessibility and as a fallback when the media cannot be displayed. - * @property {string} [thumbnail] - The URL of the thumbnail image, typically a - * smaller or lower-resolution version of the main media. + * @property {Object} [meta] + * @property {string} [type] + * @property {string} url */ /** @@ -2784,13 +2359,10 @@ const Joi = require("joi"); */ /** - * @typedef DepartmentMedia - * @property {string} [aspect_ratio] - The aspect ratio of the media, typically - * represented as width:height (e.g., '16:9'). - * @property {string} [type] - The type of media, such as 'image', 'video', or - * other supported media formats. - * @property {string} [url] - The URL where the media resource is hosted and can - * be accessed. + * @typedef Media2 + * @property {string} [aspect_ratio] + * @property {string} [type] + * @property {string} [url] */ /** @@ -2811,7 +2383,7 @@ const Joi = require("joi"); */ /** - * @typedef MetaDataListingFilterMetaResponseSchema + * @typedef MetaDataListingFilterMetaResponse * @property {string} [display] * @property {string[]} [filter_types] * @property {string} [key] @@ -2819,25 +2391,25 @@ const Joi = require("joi"); */ /** - * @typedef MetaDataListingFilterResponseSchema - * @property {MetaDataListingFilterMetaResponseSchema[]} [data] + * @typedef MetaDataListingFilterResponse + * @property {MetaDataListingFilterMetaResponse[]} [data] */ /** - * @typedef MetaDataListingResponseSchema - * @property {MetaDataListingFilterResponseSchema} filter - * @property {MetaDataListingSortResponseSchema} sort + * @typedef MetaDataListingResponse + * @property {MetaDataListingFilterResponse} filter + * @property {MetaDataListingSortResponse} sort */ /** - * @typedef MetaDataListingSortMetaResponseSchema + * @typedef MetaDataListingSortMetaResponse * @property {string} [display] * @property {string} [key] */ /** - * @typedef MetaDataListingSortResponseSchema - * @property {MetaDataListingSortMetaResponseSchema[]} [data] + * @typedef MetaDataListingSortResponse + * @property {MetaDataListingSortMetaResponse[]} [data] */ /** @@ -2856,9 +2428,9 @@ const Joi = require("joi"); */ /** - * @typedef NetQuantityResponseSchema - * @property {string} [unit] - The unit of measurement for the net quantity. - * @property {number} [value] - The actual quantity of the product in the specified unit. + * @typedef NetQuantityResponse + * @property {string} [unit] + * @property {number} [value] */ /** @@ -2868,7 +2440,7 @@ const Joi = require("joi"); */ /** - * @typedef OptInPostRequestSchema + * @typedef OptInPostRequest * @property {number[]} [brand_ids] * @property {number} [company_id] * @property {boolean} [enabled] @@ -2905,24 +2477,18 @@ const Joi = require("joi"); */ /** - * @typedef OwnerAppItemResponseSchema - * @property {Object} [alt_text] - Alternate text associated with the item, - * typically for accessibility purposes. - * @property {boolean} [is_cod] - Indicates whether Cash on Delivery (COD) is - * available for this item. - * @property {boolean} [is_gift] - Indicates whether the item is marked as a gift. - * @property {MOQData} [moq] - Minimum order quantity (MOQ) details for the - * item, including minimum units and increment units. - * @property {SEOData} [seo] - Search Engine Optimization (SEO) related - * information, including title, description, sitemap details, and meta tags. - * @property {Object} [_custom_json] - Custom JSON data for the item, allowing - * flexibility for additional item-specific information. - * @property {MetaFields[]} [_custom_meta] - An array of custom meta fields - * associated with the item for extended metadata. + * @typedef OwnerAppItemResponse + * @property {Object} [alt_text] + * @property {boolean} [is_cod] + * @property {boolean} [is_gift] + * @property {MOQData} [moq] + * @property {SEOData} [seo] + * @property {Object} [_custom_json] - Custom JSON data for the item + * @property {MetaFields[]} [_custom_meta] - Custom meta fields for the item */ /** - * @typedef PTErrorResponseSchema + * @typedef PTErrorResponse * @property {string} [code] * @property {Object} [errors] * @property {string} [message] @@ -2942,8 +2508,8 @@ const Joi = require("joi"); */ /** - * @typedef PageResponseSchema - * @property {number} [current] - It is the current page of the page response schema. + * @typedef PageResponse + * @property {string} [current] - It is the current page of the page response schema. * @property {boolean} [has_next] - It is the bool indicates if there is a next page. * @property {boolean} [has_previous] - It is the bool indicates if there is a * previous page. @@ -2970,13 +2536,11 @@ const Joi = require("joi"); */ /** - * @typedef ProductListingDetailPrice - * @property {string} [currency_code] - The ISO code of the currency in which - * the price is displayed. - * @property {string} [currency_symbol] - The symbol of the currency - * corresponding to the currency code. - * @property {number} [max] - The maximum price for the product. - * @property {number} [min] - The minimum price for the product. + * @typedef Price1 + * @property {string} [currency_code] + * @property {string} [currency_symbol] + * @property {number} [max] + * @property {number} [min] */ /** @@ -2999,101 +2563,80 @@ const Joi = require("joi"); */ /** - * @typedef ProdcutTemplateCategoriesResponseSchema - * @property {CategoriesResponseSchema[]} [items] + * @typedef ProdcutTemplateCategoriesResponse + * @property {CategoriesResponse[]} [items] * @property {Page} [page] */ /** * @typedef Product - * @property {Object} [_custom_json] - A custom JSON object that can hold any - * additional key-value pairs specific to the product. - * @property {number[]} [all_company_ids] - List of company IDs associated with - * the product. - * @property {string[]} [all_identifiers] - List of identifiers such as SKU, barcode, etc. - * @property {Object[]} [all_sizes] - List of available sizes for the product. - * @property {Object} [attributes] - Additional attributes of the product such - * as material, color, pattern, etc. + * @property {Object} [_custom_json] + * @property {number[]} [all_company_ids] + * @property {string[]} [all_identifiers] + * @property {Object[]} [all_sizes] + * @property {Object} [attributes] * @property {Brand} [brand] - * @property {number} [brand_uid] - Unique ID of the brand associated with the product. - * @property {Object} [category] - Details about the category the product belongs to. - * @property {string} [category_slug] - Unique slug representing the category. - * @property {number} [category_uid] - Unique ID of the product category. - * @property {string} [color] - Primary color of the product. - * @property {number} [company_id] - ID of the company managing the product. - * @property {string} [country_of_origin] - The country where the product was - * manufactured. - * @property {Object} [created_by] - Details of the user or entity that created - * the product. - * @property {string} [created_on] - Timestamp indicating when the product was created. - * @property {string} [currency] - The currency used for pricing the product. - * @property {Object} [custom_order] - Information related to custom orders, - * including lead time and production details. - * @property {number[]} [departments] - List of department IDs related to the product. - * @property {string} [description] - Full description of the product. - * @property {string[]} [highlights] - List of key highlights of the product. - * @property {string} [hsn_code] - HSN (Harmonized System Nomenclature) code for - * tax classification. - * @property {string} [id] - Unique identifier for the product in the system. - * @property {string} [image_nature] - Nature of the product image, for example, - * 'standard' or 'custom'. - * @property {Image[]} [images] - List of images associated with the product. - * @property {boolean} [is_active] - Indicates whether the product is currently - * active or not. - * @property {boolean} [is_dependent] - Indicates whether the product depends on - * other products for its availability or configuration. - * @property {boolean} [is_expirable] - Indicates if the product has an expiration date. - * @property {boolean} [is_image_less_product] - Indicates if the product does - * not have an image associated. - * @property {boolean} [is_physical] - Specifies if the product is a physical item. - * @property {boolean} [is_set] - Indicates if the product is part of a set. + * @property {number} [brand_uid] + * @property {Object} [category] + * @property {string} [category_slug] + * @property {number} [category_uid] + * @property {string} [color] + * @property {number} [company_id] + * @property {string} [country_of_origin] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {string} [currency] + * @property {Object} [custom_order] + * @property {number[]} [departments] + * @property {string} [description] + * @property {string[]} [highlights] + * @property {string} [hsn_code] + * @property {string} [id] + * @property {string} [image_nature] + * @property {Image[]} [images] + * @property {boolean} [is_active] + * @property {boolean} [is_dependent] + * @property {boolean} [is_expirable] + * @property {boolean} [is_image_less_product] + * @property {boolean} [is_physical] + * @property {boolean} [is_set] * @property {string} [item_code] * @property {string} [item_type] - * @property {string[]} [l3_mapping] - List of category mappings for the product - * (level 3 categories). - * @property {Media[]} [media] - Media objects associated with the product, such - * as videos or additional images. - * @property {Object} [modified_by] - Details of the user or entity that last - * modified the product. - * @property {string} [modified_on] - Timestamp indicating the last time the - * product was modified. - * @property {Object} [moq] - Minimum Order Quantity (MOQ) details for the product. - * @property {string} [name] - Name of the product. - * @property {NetQuantityResponseSchema} [net_quantity] - * @property {number} [no_of_boxes] - Number of boxes required to pack the product. - * @property {string} [pending] - Status indicating if there are pending actions - * or updates required for the product. - * @property {string} [primary_color] - Primary color of the product. - * @property {string[]} [product_group_tag] - Tags for grouping the product in categories. + * @property {string[]} [l3_mapping] + * @property {Media[]} [media] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {Object} [moq] + * @property {boolean} [multi_size] + * @property {string} [name] + * @property {NetQuantityResponse} [net_quantity] + * @property {number} [no_of_boxes] + * @property {string} [pending] + * @property {string} [primary_color] + * @property {string[]} [product_group_tag] * @property {ProductPublished} [product_publish] - * @property {ReturnConfigResponseSchema} [return_config] - * @property {string} [short_description] - A brief description of the product. - * @property {string} [size_guide] - Link or identifier for the product's size guide. - * @property {Object[]} [sizes] - List of available sizes for the product along - * with pricing and identifier information. - * @property {string} [slug] - URL slug for the product page. - * @property {string} [stage] - The current stage of the product in the system - * workflow (e.g., pending, verified). - * @property {string[]} [tags] - Tags or keywords associated with the product - * for search and categorization. - * @property {TaxIdentifier} [tax_identifier] - * @property {Object} [teaser_tag] - A short promotional tag or label for the product. - * @property {string} [template_tag] - Tag representing the template used for - * the product listing. - * @property {Trader[]} [trader] - List of traders or sellers associated with the product. - * @property {number} [uid] - Unique identifier for the product. - * @property {Object} [variant_group] - Details about the product's variant - * grouping (e.g., color or size variants). - * @property {Object} [variant_media] - Media associated with specific variants - * of the product. - * @property {Object} [variants] - Details about the product's available variants. + * @property {ReturnConfigResponse} [return_config] + * @property {string} [short_description] + * @property {string} [size_guide] + * @property {Object[]} [sizes] + * @property {string} [slug] + * @property {string} [stage] + * @property {string[]} [tags] + * @property {Object} [tax_identifier] + * @property {Object} [teaser_tag] + * @property {string} [template_tag] + * @property {Trader[]} [trader] + * @property {number} [uid] + * @property {Object} [variant_group] + * @property {Object} [variant_media] + * @property {Object} [variants] * @property {VerifiedBy} [verified_by] - * @property {string} [verified_on] - Timestamp indicating when the product was verified. + * @property {string} [verified_on] */ /** - * @typedef ProductAttributesResponseSchema - * @property {AttributeMasterSchema[]} items + * @typedef ProductAttributesResponse + * @property {AttributeMasterSerializer[]} items */ /** @@ -3113,7 +2656,7 @@ const Joi = require("joi"); */ /** - * @typedef ProductBulkRequestSchema + * @typedef ProductBulkRequest * @property {number} [cancelled] * @property {Object[]} [cancelled_records] * @property {number} [company_id] @@ -3134,72 +2677,52 @@ const Joi = require("joi"); /** * @typedef ProductBulkRequestList - * @property {Object} [items] + * @property {ProductBulkRequest[]} [items] * @property {Page} [page] */ /** * @typedef ProductBundleItem - * @property {boolean} [allow_remove] - Indicates whether the product can be - * removed from the bundle. - * @property {boolean} [auto_add_to_cart] - Specifies if the product is - * automatically added to the cart. - * @property {boolean} [auto_select] - Indicates if the product is automatically - * selected in the bundle. - * @property {number} max_quantity - Maximum quantity of the product that can be - * added to the bundle. - * @property {number} min_quantity - Minimum quantity of the product that must - * be added to the bundle. - * @property {number} product_uid - Unique identifier for the product. - */ - -/** - * @typedef ProductBundleRequestSchema - * @property {string} choice - Specifies the type of product bundle (e.g., - * 'single' or 'multi'). - * @property {number} [company_id] - The unique identifier of the company to - * which the product bundle belongs. - * @property {Object} [created_by] - Information about the user who created the - * product bundle, including user ID and username. - * @property {string} [created_on] - The timestamp when the product bundle was created. - * @property {boolean} is_active - Indicates whether the product bundle is - * currently active. - * @property {string} [logo] - URL of the logo associated with the product - * bundle, if available. Can be null. - * @property {Object} [meta] - Additional metadata for the product bundle. - * @property {Object} [modified_by] - Information about the user who last - * modified the product bundle, including user ID and username. - * @property {string} [modified_on] - The timestamp when the product bundle was - * last modified. - * @property {string} name - The name of the product bundle. - * @property {string[]} [page_visibility] - Pages where the product bundle is - * visible (e.g., 'pdp' for product display page). - * @property {ProductBundleItem[]} products - A list of products included in the - * bundle. A maximum of 10 products can be added. - * @property {boolean} [same_store_assignment] - Indicates whether all products - * in the bundle are assigned to the same store. - * @property {string} slug - A URL-friendly unique identifier for the product bundle. - */ - -/** - * @typedef ProductBundleUpdateRequestSchema - * @property {string} choice - Specifies the type of product bundle (e.g., - * 'single' or 'multi'). - * @property {number} [company_id] - The unique identifier of the company to - * which the product bundle belongs. - * @property {boolean} is_active - Indicates whether the product bundle is - * currently active. - * @property {string} [logo] - URL of the logo associated with the product - * bundle, if available. Can be null. - * @property {Object} [meta] - Additional metadata for the product bundle. - * @property {string} name - The name of the product bundle. - * @property {string[]} [page_visibility] - Pages where the product bundle is - * visible (e.g., 'pdp' for product display page). - * @property {ProductBundleItem[]} products - A list of products included in the - * bundle. A maximum of 10 products can be added. - * @property {boolean} [same_store_assignment] - Indicates whether all products - * in the bundle are assigned to the same store. - * @property {string} slug - A URL-friendly unique identifier for the product bundle. + * @property {boolean} [allow_remove] + * @property {boolean} [auto_add_to_cart] + * @property {boolean} [auto_select] + * @property {number} max_quantity + * @property {number} min_quantity + * @property {number} product_uid + */ + +/** + * @typedef ProductBundleRequest + * @property {string} choice + * @property {number} [company_id] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {boolean} is_active + * @property {string} [logo] + * @property {Object} [meta] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} name + * @property {string[]} [page_visibility] + * @property {ProductBundleItem[]} products + * @property {boolean} [same_store_assignment] + * @property {string} slug + */ + +/** + * @typedef ProductBundleUpdateRequest + * @property {string} choice + * @property {number} [company_id] + * @property {boolean} is_active + * @property {string} [logo] + * @property {Object} [meta] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} name + * @property {string[]} [page_visibility] + * @property {ProductBundleItem[]} products + * @property {boolean} [same_store_assignment] + * @property {string} slug */ /** @@ -3210,138 +2733,105 @@ const Joi = require("joi"); /** * @typedef ProductCreateUpdateSchemaV2 - * @property {Object} [_custom_json] - Custom JSON data that can be used for - * additional product properties. - * @property {string} [action] - The action to perform wrt to the product (e.g., - * upsert, update, delete). - * @property {Object} [attributes] - Additional attributes related to the product. - * @property {number} brand_uid - Unique identifier for the product's brand. - * @property {string} [bulk_job_id] - Job ID associated with bulk operations. - * @property {string} category_slug - The category to which the product belongs. - * @property {string} [change_request_id] - Change request identifier for product updates. - * @property {number} company_id - Unique identifier for the company associated - * with the product. - * @property {string} country_of_origin - The country where the product was - * manufactured or sourced. - * @property {string} currency - The currency in which the product's price is listed. + * @property {Object} [_custom_json] + * @property {string} [action] + * @property {Object} [attributes] + * @property {number} brand_uid + * @property {string} [bulk_job_id] + * @property {string} category_slug + * @property {string} [change_request_id] + * @property {number} company_id + * @property {string} country_of_origin + * @property {string} currency * @property {CustomOrder} [custom_order] - * @property {number[]} departments - List of department IDs associated with the product. - * @property {string} [description] - A detailed description of the product. - * @property {string[]} [highlights] - Product highlights or key features. - * @property {boolean} [is_active] - Flag to indicate if the product is active. - * @property {boolean} [is_dependent] - Flag to indicate if the product is - * dependent on other products. - * @property {boolean} [is_image_less_product] - Flag to indicate if the product - * does not have associated images. - * @property {boolean} [is_set] - Flag to indicate if the product is part of a set. - * @property {string} item_code - Unique item code or SKU of the product. - * @property {string} item_type - Type of the product (e.g., standard, set, - * composite, digital). - * @property {Media[]} [media] - List of media URLs (images, videos) associated - * with the product. - * @property {boolean} [multi_size] - Indicates if the product supports multiple sizes. - * @property {string} name - The name of the product. + * @property {number[]} departments + * @property {string} [description] + * @property {string[]} [highlights] + * @property {boolean} [is_active] + * @property {boolean} [is_dependent] + * @property {boolean} [is_image_less_product] + * @property {boolean} [is_set] + * @property {string} item_code + * @property {string} item_type + * @property {Media[]} [media] + * @property {boolean} [multi_size] + * @property {string} name * @property {NetQuantity} [net_quantity] - * @property {number} [no_of_boxes] - Number of boxes required to package the product. - * @property {string[]} [product_group_tag] - Tags to group products together - * for classification. - * @property {ProductPublish} [product_publish] - * @property {string} [requester] - The role requesting the product operation - * (admin or user). + * @property {number} [no_of_boxes] + * @property {string[]} [product_group_tag] + * @property {ProductPublish1} [product_publish] + * @property {string} [requester] * @property {ReturnConfig} return_config - * @property {string} [short_description] - A short description of the product, - * up to 50 characters. - * @property {string} [size_guide] - Identifier for the product's size guide. - * @property {Object[]} sizes - List of sizes available for the product. - * @property {string} slug - URL-friendly identifier for the product. - * @property {string[]} [tags] - List of tags associated with the product. + * @property {string} [short_description] + * @property {string} [size_guide] + * @property {Object[]} sizes + * @property {string} slug + * @property {string[]} [tags] * @property {TaxIdentifier} tax_identifier * @property {TeaserTag} [teaser_tag] - * @property {string} template_tag - Template tag for the product, used for - * classification. - * @property {Trader[]} trader - List of traders associated with the product. - * @property {number} [uid] - Unique identifier for the product. - * @property {Object} [variant_group] - Variant group information for the product. - * @property {Object} [variant_media] - Media related to product variants. - * @property {Object} [variants] - Variants information for the product. + * @property {string} template_tag + * @property {Trader[]} trader + * @property {number} [uid] + * @property {Object} [variant_group] + * @property {Object} [variant_media] + * @property {Object} [variants] */ /** * @typedef ProductDetail - * @property {Object} [attributes] - Key-value pairs representing various - * product attributes. + * @property {Object} [attributes] * @property {ProductBrand} [brand] - * @property {string} [description] - Detailed description of the product. - * @property {ProductDetailGroupedAttribute[]} [grouped_attributes] - Grouped - * attributes of the product, such as product details and specifications. - * @property {boolean} [has_variant] - Indicates whether the product has variants. - * @property {string[]} [highlights] - Array of highlight features for the product. - * @property {string} [image_nature] - The nature of the product's images. - * @property {string} [item_code] - Unique item code for the product. - * @property {string} [item_type] - Type of the item. - * @property {Media[]} [medias] - Array of media objects such as images and - * videos for the product. - * @property {string} [name] - Name of the product. - * @property {string} [product_online_date] - Date when the product was made - * available online. - * @property {Object} [promo_meta] - Promotional metadata associated with the product. - * @property {number} [rating] - Average rating of the product. - * @property {number} [rating_count] - Total number of ratings for the product. - * @property {string} [short_description] - A brief description of the product. - * @property {string[]} [similars] - Array of similar products. - * @property {string} slug - Unique slug for the product, used in URLs. - * @property {Object} [teaser_tag] - Teaser tag information related to the product. - * @property {string[]} [tryouts] - Array of product tryout options. - * @property {string} [type] - The type of item. - * @property {number} [uid] - Unique identifier for the product. - * @property {string} [country_of_origin] - Country where the product was manufactured. - * @property {ApplicationProductCategoryItem[]} [categories] - Array of - * categories the product belongs to. - * @property {string[]} [tags] - Array of tags associated with the product. - * @property {number} [no_of_boxes] - Number of boxes required for packaging the product. - * @property {CustomOrder} [custom_order] + * @property {string} [color] + * @property {string} [description] + * @property {ProductDetailGroupedAttribute[]} [grouped_attributes] + * @property {boolean} [has_variant] + * @property {string[]} [highlights] + * @property {string} [image_nature] + * @property {string} [item_code] + * @property {string} [item_type] + * @property {Media[]} [medias] + * @property {string} [name] + * @property {string} [product_online_date] + * @property {Object} [promo_meta] + * @property {number} [rating] + * @property {number} [rating_count] + * @property {string} [short_description] + * @property {string[]} [similars] + * @property {string} slug + * @property {Object} [teaser_tag] + * @property {string[]} [tryouts] + * @property {string} [type] + * @property {number} [uid] */ /** * @typedef ProductDetailAttribute - * @property {string} [key] - The name or key of the attribute. - * @property {string} [type] - The type of the attribute. - * @property {string} [value] - The value of the attribute corresponding to the key. + * @property {string} [key] + * @property {string} [type] + * @property {string} [value] */ /** * @typedef ProductDetailGroupedAttribute - * @property {ProductDetailAttribute[]} [details] - An array of individual - * product attributes belonging to this group. - * @property {string} [title] - The title or category name for the grouped attributes. + * @property {ProductDetailAttribute[]} [details] + * @property {string} [title] */ /** - * @typedef ProductDownloadsResponseSchema - * @property {ProductTemplateExportResponseSchema[]} [items] - The items of the job. + * @typedef ProductDownloadsResponse + * @property {ProductTemplateExportResponse[]} [items] - The items of the job. * @property {Page} [page] */ -/** - * @typedef CollectionProductFilters - * @property {ProductFiltersKey} key - * @property {CollectionProductFiltersValue[]} values - A list of possible - * values corresponding to the filter key. These values can be selected for - * filtering products. - */ - /** * @typedef ProductFilters * @property {ProductFiltersKey} key - * @property {ProductFiltersValue[]} values - A list of possible values - * corresponding to the filter key. These values can be selected for filtering - * products. + * @property {ProductFiltersValue[]} values */ /** - * @typedef GetQueryFiltersValuesResponseSchema - * @property {ProductQueryFiltersValue[]} values - A list of filter values that - * can be used for querying products. + * @typedef GetQueryFiltersValuesResponse + * @property {ProductFiltersValue[]} values * @property {Page} page */ @@ -3352,272 +2842,67 @@ const Joi = require("joi"); /** * @typedef ProductFiltersKey - * @property {string} display - The display name of the filter key, used for - * showing on the UI. - * @property {string} [kind] - The kind or type of filter, defining the category - * of the filter. - * @property {string} [logo] - A URL to the logo associated with the filter key. - * @property {string} name - The name of the filter key, used in the query. - * @property {string[]} [operators] - A list of supported operators for this filter key. - */ - -/** - * @typedef ProductQueryFiltersValue - * @property {string} [display] - The human-readable name of the category to be displayed. - * @property {number} [count] - The number of items or products associated with - * this category. - * @property {boolean} [is_selected] - Indicates whether this category is - * currently selected by the user. - * @property {string} [value] - The internal value or identifier representing - * this category. - * @property {string} [logo] - URL of the logo image associated with the category. - */ - -/** - * @typedef CollectionProductFiltersValue - * @property {string} display - Display name of the filter value. - * @property {number} [count] - The number of products that match this filter value. - * @property {boolean} is_selected - Indicates whether the filter value is - * currently selected by the user. - * @property {string} value - The actual value for the filter, used in filtering queries. - * @property {Object} [logo] + * @property {string} display + * @property {string} [kind] + * @property {string} [logo] + * @property {string} name + * @property {string[]} [operators] */ /** * @typedef ProductFiltersValue - * @property {number} [count] - The number of products that match this filter value. - * @property {string} [currency_code] - The currency code used if the filter is - * related to price. - * @property {string} [currency_symbol] - The symbol of the currency used in - * price-related filters. - * @property {string} display - The human-readable label for this filter value. - * @property {string} [display_format] - A format string that controls how the - * value is displayed, commonly used for numeric or price ranges. - * @property {boolean} is_selected - Indicates whether this filter value is - * currently selected by the user. - * @property {number} [max] - The maximum value for a range filter (e.g., price range). - * @property {number} [min] - The minimum value for a range filter (e.g., price range). - * @property {string} [query_format] - The format string used in the query for - * filtering by this value. - * @property {number} [selected_max] - The maximum value selected by the user in - * a range filter. - * @property {number} [selected_min] - The minimum value selected by the user in - * a range filter. - * @property {Object} value - The actual value of the filter. - */ - -/** - * @typedef CollectionProductListingDetail - * @property {Object} [attributes] - Additional attributes for the product. - * @property {ProductBrand} [brand] - * @property {string} [color] - Color of the product. - * @property {string} [description] - Detailed description of the product. - * @property {string} [discount] - Discount information for the product. - * @property {ProductDetailGroupedAttribute[]} [grouped_attributes] - Grouped - * attributes of the product. - * @property {boolean} [has_variant] - Indicates if the product has variants. - * @property {string[]} [highlights] - List of key highlights for the product. - * @property {string} [image_nature] - Nature or type of image associated with - * the product. - * @property {string} [item_code] - Unique code for the product item. - * @property {string} [item_type] - Type of the product item, e.g., 'standard' - * or 'custom'. - * @property {Media[]} [medias] - List of media files (e.g., images) associated - * with the product. - * @property {string} [name] - Name of the product. - * @property {ProductListingPrice} [price] - * @property {string} [product_online_date] - The date when the product became - * available online. - * @property {Object} [promo_meta] - Promotional metadata for the product. - * @property {number} [rating] - Average rating for the product. - * @property {number} [rating_count] - Number of users who have rated the product. - * @property {boolean} [sellable] - Indicates if the product is sellable. - * @property {string} [short_description] - Short description of the product. - * @property {string[]} [similars] - List of similar products. - * @property {string} slug - Slug or URL-friendly identifier for the product. - * @property {Object} [teaser_tag] - Teaser tag for the product. - * @property {string[]} [tryouts] - List of tryouts or tests associated with the product. - * @property {string} [type] - Type of the product, e.g., 'product' or 'variant'. - * @property {number} [uid] - Unique identifier for the product. - * @property {ProductCategory[]} [categories] - List of categories associated - * with the product. - * @property {Object[]} [_custom_meta] - Custom metadata related to the product. - * @property {Action} [action] - * @property {number} [discount_percentage] - Discount percentage on the product. - * @property {boolean} [is_tryout] - Indicates if the product is available for tryout. - * @property {number[]} [all_company_ids] - List of company IDs associated with - * the product. - * @property {boolean} [is_custom_order] - Indicates if the product is a custom order. - * @property {string[]} [collections] - List of collection IDs the product belongs to. - * @property {number} [popularity] - Popularity score of the product. - * @property {number} [brand_uid] - Unique identifier of the brand. - * @property {number} [category_uid] - Unique identifier of the category. - * @property {string} [verification_status] - Verification status of the product. - * @property {string} [channel_identifier] - Identifier for the sales channel. - * @property {string} [category_slug] - Slug identifier for the category. - * @property {string} [size_guide] - Size guide information for the product. - * @property {string} [created_on] - Timestamp when the product was created. - * @property {string} [modified_on] - Timestamp when the product was last modified. - * @property {number[]} [l3_categories] - List of L3 categories associated with - * the product. - * @property {number[]} [store_ids] - List of store IDs where the product is available. - * @property {number[]} [company_ids] - List of company IDs associated with the product. - * @property {number[]} [departments] - List of departments associated with the product. - * @property {string[]} [tags] - List of tags associated with the product. - * @property {string[]} [l3_category_names] - List of L3 category names. - * @property {string[]} [sizes] - List of available sizes for the product. - * @property {string[]} [product_group_tag] - Tags related to the product group. - * @property {boolean} [multi_size] - Indicates if the product is available in - * multiple sizes. - * @property {boolean} [is_gift] - Indicates if the product is giftable. - * @property {boolean} [is_cod] - Indicates if the product is eligible for cash - * on delivery. - * @property {boolean} [is_dependent] - Indicates if the product is dependent on - * other products. - * @property {boolean} [is_available] - Indicates if the product is currently available. - * @property {NetQuantity} [net_quantity] - * @property {ApplicationItemSEO} [seo] - * @property {ApplicationItemMOQ} [moq] - * @property {CustomOrder} [custom_order] - * @property {string} [country_of_origin] - Country of origin of the product. - * @property {Object} [_custom_json] - Custom JSON data for additional configurations. - * @property {Object[]} [multi_categories] - Details of multiple categories - * associated with the product. - * @property {Object} [variant_media] - Variant-specific media associated with - * the product. - * @property {Object} [variant_group] - Group of variant-specific attributes. - * @property {string[]} [identifiers] - Identifiers associated with the product. - * @property {number} [no_of_boxes] - Number of boxes required for the product. - * @property {string} [template_tag] - Template tag associated with the product. - */ - -/** - * @typedef ProductCategory - * @property {number} [id] - Unique identifier of the category. - * @property {number} [uid] - Unique identifier of the category UID. - * @property {string} [name] - Name of the category. - * @property {string} [slug] - Slug identifier for the category. - * @property {Logo} [logo] - * @property {Action} [action] - * @property {Object} [_custom_json] - Custom JSON data for the category. - */ - -/** - * @typedef ApplicationCategoryAction - * @property {CategoryPageAction} [page] - * @property {string} [type] - The type of action to be performed, such as - * navigation to a category or product. - */ - -/** - * @typedef ApplicationCategoryItem - * @property {Object} [_custom_json] - Custom JSON data related to the category. - * @property {ApplicationCategoryAction} [action] - * @property {number} [id] - The unique identifier for the category item. - * @property {CategoryImage} [logo] - * @property {string} [name] - The name of the category. - * @property {number} [uid] - A unique identifier for the category item. - */ - -/** - * @typedef ApplicationProductMedia - * @property {string} [type] - Type of the media (e.g., image, video). - * @property {string} [url] - URL of the media item. - */ - -/** - * @typedef ApplicationProductCategoryItem - * @property {number} [id] - Unique identifier of the category. - * @property {number} [uid] - Unique identifier of the category (UID). - * @property {string} [name] - Name of the category. - * @property {string} [slug] - Slug or unique key for the category. - * @property {ApplicationProductMedia} [logo] - * @property {PageAction} [action] - */ - -/** - * @typedef CategoryPageAction - * @property {CategoryQuery} [query] - * @property {string} [type] - The type of page action, defining what should - * happen when a category is selected. - */ - -/** - * @typedef CategoryQuery - * @property {string[]} [category] - */ - -/** - * @typedef CategoryImage - * @property {string} [type] - The type of image, typically 'image'. - * @property {string} [url] - The URL of the category image. + * @property {number} [count] + * @property {string} [currency_code] + * @property {string} [currency_symbol] + * @property {string} display + * @property {string} [display_format] + * @property {boolean} is_selected + * @property {number} [max] + * @property {number} [min] + * @property {string} [query_format] + * @property {number} [selected_max] + * @property {number} [selected_min] + * @property {Object} value */ /** * @typedef ProductListingDetail - * @property {Object} [attributes] - Additional product attributes, which vary by product. + * @property {Object} [attributes] * @property {ProductBrand} [brand] - * @property {string} [description] - A detailed description of the product. - * @property {string} [discount] - Any discount information applicable to the product. - * @property {ProductDetailGroupedAttribute[]} [grouped_attributes] - A list of - * grouped product attributes. - * @property {boolean} [has_variant] - Indicates whether the product has - * variants such as different sizes or colors. - * @property {string[]} [highlights] - Key highlights of the product. - * @property {string} [image_nature] - The type of product image, such as - * 'lifestyle' or 'catalog'. - * @property {string} [item_code] - The unique code or identifier for the product. - * @property {string} [item_type] - The type of item'. - * @property {Media[]} [medias] - A list of media (images or videos) associated - * with the product. - * @property {string} [name] - The name of the product. + * @property {string} [color] + * @property {string} [description] + * @property {string} [discount] + * @property {ProductDetailGroupedAttribute[]} [grouped_attributes] + * @property {boolean} [has_variant] + * @property {string[]} [highlights] + * @property {string} [image_nature] + * @property {string} [item_code] + * @property {string} [item_type] + * @property {Media[]} [medias] + * @property {string} [name] * @property {ProductListingPrice} [price] - * @property {string} [product_online_date] - The date and time when the product - * was made available online. - * @property {Object} [promo_meta] - Promotional metadata associated with the product. - * @property {number} [rating] - The average rating of the product. - * @property {number} [rating_count] - The number of ratings received for the product. - * @property {boolean} [sellable] - Indicates if the product is currently sellable. - * @property {string} [short_description] - A brief description of the product. - * @property {string[]} [similars] - A list of similar products. - * @property {string} [slug] - The unique URL-friendly identifier for the product. - * @property {Object} [teaser_tag] - Teaser tags for the product, if any. - * @property {string[]} [tryouts] - A list of tryout options for the product. - * @property {string} [type] - The type of product. - * @property {number} [uid] - The unique identifier for the product. - * @property {ApplicationCategoryItem[]} [categories] - A list of categories - * associated with the product. - * @property {string[]} [_custom_meta] - Custom metadata for the product. - * @property {PageAction} [action] - * @property {boolean} [is_tryout] - Indicates if the product is available for tryout. - * @property {number[]} [all_company_ids] - A list of company IDs that sell this product. - * @property {boolean} [is_custom_order] - Indicates if the product is - * custom-made or requires a custom order. - * @property {string[]} [collections] - A list of collections the product belongs to. - */ - -/** - * @typedef ActionObject - * @property {string} [type] - The type of action to be performed, such as - * navigating to a product or category. - * @property {Object} [query] - The query parameters associated with the action. - */ - -/** - * @typedef PageAction - * @property {ActionObject} [page] - * @property {string} [type] - The type of page action to be performed. + * @property {string} [product_online_date] + * @property {Object} [promo_meta] + * @property {number} [rating] + * @property {number} [rating_count] + * @property {boolean} [sellable] + * @property {string} [short_description] + * @property {string[]} [similars] + * @property {string} slug + * @property {Object} [teaser_tag] + * @property {string[]} [tryouts] + * @property {string} [type] + * @property {number} [uid] */ /** * @typedef ProductListingPrice * @property {Price1} [effective] * @property {Price1} [marked] - * @property {Price1} [selling] */ /** - * @typedef ProductListingResponseSchema + * @typedef ProductListingResponse * @property {Product[]} [items] * @property {Page} [page] */ @@ -3634,148 +2919,95 @@ const Joi = require("joi"); * @property {string} [product_online_date] */ +/** + * @typedef ProductPublish1 + * @property {boolean} [is_set] + * @property {string} [product_online_date] + */ + /** * @typedef ProductPublished - * @property {boolean} [is_set] - Indicates whether the product is part of a set. - * @property {number} [product_online_date] - Timestamp when the product is - * scheduled to go live online. + * @property {boolean} [is_set] + * @property {number} [product_online_date] */ /** - * @typedef ProductReturnConfigSchema - * @property {boolean} [on_same_store] - Indicates if the product return is - * allowed only at the same store where it was purchased. - * @property {number} [store_uid] - Unique identifier for the store where the - * product can be returned. + * @typedef ProductReturnConfigSerializer + * @property {boolean} [on_same_store] + * @property {number} [store_uid] */ /** - * @typedef ProductReturnConfigBaseSchema + * @typedef ProductReturnConfigBaseSerializer * @property {boolean} returnable - Boolean Flag for item returnable * @property {number} time - Valid return time for an item * @property {string} unit - Unit of return config days|hours */ -/** - * @typedef Identifier - * @property {boolean} [primary] - Indicates if this is the primary identifier - * for the size. - * @property {string} [gtin_value] - The GTIN (Global Trade Item Number) value - * for the size. - * @property {string} [gtin_type] - The type of GTIN (e.g., SKU code, UPC, EAN). - */ - -/** - * @typedef SizeDetails - * @property {string} [size] - Size identifier for the product (e.g., "S", "M", "L"). - * @property {number} [store_count] - The number of stores that have this size available. - * @property {number} [sellable_quantity] - Quantity of the product that is - * sellable in this size. - * @property {boolean} [sellable] - Indicates if this size is currently sellable. - * @property {number} [size_priority] - The priority of the size for display purposes. - * @property {Identifier[]} [identifiers] - List of identifiers (e.g., SKU - * codes, GTINs) associated with the size. - * @property {Object} [price] - * @property {string} [seller_identifier] - Seller-specific identifier for this size. - * @property {number} [price_transfer] - Price transfer value for this size, - * typically used in business transactions. - * @property {boolean} [track_inventory] - Indicates if inventory is being - * tracked for this size. - */ - /** * @typedef ProductSchemaV2 - * @property {Object} [_custom_json] - Custom JSON data specific to the product, - * used for storing additional information. - * @property {number[]} [all_company_ids] - List of company IDs associated with - * the product. - * @property {string[]} [all_identifiers] - List of unique product identifiers - * such as SKU codes or GTINs. - * @property {Object[]} [all_sizes] - Details of all available sizes for the - * product, including pricing and inventory information. - * @property {Object} [attributes] - Additional attributes specific to the product. + * @property {Object} [_custom_json] + * @property {number[]} [all_company_ids] + * @property {string[]} [all_identifiers] + * @property {Object[]} [all_sizes] + * @property {Object} [attributes] * @property {Brand} [brand] - * @property {number} [brand_uid] - Unique identifier for the brand. - * @property {Object} [category] - Object representing the category to which the - * product belongs. - * @property {string} [category_slug] - Slug representation of the product - * category for SEO purposes. - * @property {number} [category_uid] - Unique identifier for the product category. - * @property {string} [color] - Primary color of the product. - * @property {number} [company_id] - Identifier for the company managing the product. - * @property {string} [country_of_origin] - Country where the product was - * manufactured or sourced. - * @property {Object} [created_by] - Object containing details about the user - * who created the product. - * @property {string} [currency] - The currency in which the product is priced - * (e.g., "INR"). - * @property {Object} [custom_order] - Information about custom order options - * for the product, including manufacturing time. - * @property {number[]} [departments] - List of department IDs associated with - * the product. - * @property {string} [description] - Long description of the product. - * @property {string[]} [highlights] - Key features or highlights of the product. - * @property {string} [hsn_code] - Harmonized System Nomenclature (HSN) code for - * taxation purposes. - * @property {string} [id] - Unique identifier of the product in the database. - * @property {string} [image_nature] - Describes the nature of the product - * images (e.g., "standard"). - * @property {Image[]} [images] - List of image URLs associated with the product. - * @property {boolean} [is_active] - Indicates whether the product is currently - * active or not. - * @property {boolean} [is_dependent] - Indicates if the product depends on - * other products (e.g., part of a set). - * @property {boolean} [is_expirable] - Indicates whether the product has an expiry date. - * @property {boolean} [is_image_less_product] - Indicates if the product does - * not have associated images. - * @property {boolean} [is_physical] - Indicates if the product is a physical - * item (as opposed to a digital product). - * @property {boolean} [is_set] - Indicates if the product is a set of items - * rather than a single item. - * @property {string} [item_code] - Unique code used to identify the product, - * often used internally or by sellers. - * @property {string} [item_type] - Describes the type of product (e.g., - * "standard" or "set"). - * @property {string[]} [l3_mapping] - Hierarchical mapping of the product to - * categories (e.g., "electronics>qled_television"). - * @property {Media[]} [media] - Media assets associated with the product, such - * as images or videos. - * @property {Object} [modified_by] - Object containing details about the user - * who last modified the product. - * @property {string} [modified_on] - The timestamp when the product was last modified. - * @property {Object} [moq] - Minimum order quantity details for the product. - * @property {boolean} [multi_size] - Indicates if the product is available in - * multiple sizes. - * @property {string} [name] - Name of the product. - * @property {NetQuantityResponseSchema} [net_quantity] - * @property {number} [no_of_boxes] - Number of boxes required to pack the product. - * @property {string} [pending] - Pending status related to product availability - * or verification. - * @property {string} [primary_color] - The primary color of the product. - * @property {string[]} [product_group_tag] - Tags associated with the product grouping. + * @property {number} [brand_uid] + * @property {Object} [category] + * @property {string} [category_slug] + * @property {number} [category_uid] + * @property {string} [color] + * @property {number} [company_id] + * @property {string} [country_of_origin] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {string} [currency] + * @property {Object} [custom_order] + * @property {number[]} [departments] + * @property {string} [description] + * @property {string[]} [highlights] + * @property {string} [hsn_code] + * @property {string} [id] + * @property {string} [image_nature] + * @property {Image[]} [images] + * @property {boolean} [is_active] + * @property {boolean} [is_dependent] + * @property {boolean} [is_expirable] + * @property {boolean} [is_image_less_product] + * @property {boolean} [is_physical] + * @property {boolean} [is_set] + * @property {string} [item_code] + * @property {string} [item_type] + * @property {string[]} [l3_mapping] + * @property {Media[]} [media] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {Object} [moq] + * @property {boolean} [multi_size] + * @property {string} [name] + * @property {NetQuantityResponse} [net_quantity] + * @property {number} [no_of_boxes] + * @property {string} [pending] + * @property {string} [primary_color] + * @property {string[]} [product_group_tag] * @property {ProductPublish} [product_publish] - * @property {ReturnConfigResponseSchema} [return_config] - * @property {string} [short_description] - Short description of the product, - * typically used in product listings. - * @property {string} [size_guide] - Reference to the size guide for the - * product, if applicable. - * @property {SizeDetails[]} [sizes] - List of size details for the product. - * @property {string} [slug] - URL-friendly version of the product name for SEO purposes. - * @property {string} [stage] - Current stage of the product (e.g., "pending", - * "verified"). - * @property {string[]} [tags] - Tags associated with the product for - * categorization and search purposes. - * @property {TaxIdentifier} [tax_identifier] - * @property {Object} [teaser_tag] - Teaser tags used for marketing the product - * (e.g., "new arrival"). - * @property {string} [template_tag] - Product template tag (e.g., "television"). - * @property {Trader[]} [trader] - List of traders or sellers associated with the product. - * @property {number} [uid] - Unique identifier of the product. - * @property {Object} [variant_group] - Grouping of product variants. - * @property {Object} [variant_media] - Media information for product variants. - * @property {Object} [variants] - List of product variants. + * @property {ReturnConfigResponse} [return_config] + * @property {string} [short_description] + * @property {string} [size_guide] + * @property {Object[]} [sizes] + * @property {string} [slug] + * @property {string} [stage] + * @property {string[]} [tags] + * @property {Object} [tax_identifier] + * @property {Object} [teaser_tag] + * @property {string} [template_tag] + * @property {Trader[]} [trader] + * @property {number} [uid] + * @property {Object} [variant_group] + * @property {Object} [variant_media] + * @property {Object} [variants] * @property {VerifiedBy} [verified_by] - * @property {string} [verified_on] - Timestamp when the product was verified. + * @property {string} [verified_on] */ /** @@ -3785,85 +3017,53 @@ const Joi = require("joi"); */ /** - * @typedef ProductSizeDeleteDataResponseSchema - * @property {number} [company_id] - The unique identifier for the company that - * manages the product. - * @property {number} [item_id] - The unique identifier for the specific item - * from which the size is being deleted. - * @property {string} [size] - The size being deleted from the product. - */ - -/** - * @typedef ProductSizeDeleteResponseSchema - * @property {ProductSizeDeleteDataResponseSchema} [data] - * @property {boolean} [success] - Indicates whether the size deletion operation - * was successful. + * @typedef ProductSizeDeleteDataResponse + * @property {number} [company_id] + * @property {number} [item_id] + * @property {string} [size] */ /** - * @typedef CollectionProductSortOn - * @property {boolean} [is_selected] - Indicates whether this sorting option is - * currently applied. - * @property {string} [name] - Display name of the sorting option. - * @property {string} [value] - Technical value of the sorting option used in queries. - * @property {string} [logo] - URL to the logo image representing the sorting option. + * @typedef ProductSizeDeleteResponse + * @property {ProductSizeDeleteDataResponse} [data] + * @property {boolean} [success] */ /** * @typedef ProductSortOn - * @property {boolean} [is_selected] - Indicates whether this sorting option is - * currently selected. - * @property {string} [name] - The display name of the sorting option, used to - * show on the UI. - * @property {string} [value] - The value representing the sorting option. - */ - -/** - * @typedef ProductTagsViewResponseSchema - * @property {string[]} [items] - An array of product tag strings representing - * various tags associated with the products. - */ - -/** - * @typedef CreatedBy - * @property {string} [user_id] - Unique identifier for the user. - * @property {string} [username] - Username of the user who created the product. + * @property {boolean} [is_selected] + * @property {string} [name] + * @property {string} [value] */ /** - * @typedef ModifiedBy - * @property {string} [user_id] - Unique identifier for the user who modified the entity. - * @property {string} [username] - Username of the user who last modified the entity. + * @typedef ProductTagsViewResponse + * @property {string[]} [items] */ /** * @typedef ProductTemplate - * @property {string[]} [attributes] - List of attributes associated with the - * product template. - * @property {string[]} [categories] - List of categories the product template belongs to. - * @property {CreatedBy} [created_by] - * @property {string} [created_on] - Timestamp of when the product template was created. - * @property {string[]} [departments] - List of departments the product template - * is associated with. - * @property {string} [description] - Detailed description of the product template. - * @property {boolean} [is_active] - Indicates if the product template is - * currently active. - * @property {boolean} [is_archived] - Indicates if the product template is archived. - * @property {boolean} is_expirable - Indicates if the product template is expirable. - * @property {boolean} is_physical - Indicates if the product template - * represents a physical product. - * @property {string} [logo] - URL of the product template logo. - * @property {ModifiedBy} [modified_by] - * @property {string} [modified_on] - Timestamp of when the product template was - * last modified. - * @property {string} [name] - The name of the product template. - * @property {string} slug - Unique URL-friendly identifier for the product template. + * @property {string[]} [attributes] + * @property {string[]} [categories] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {string[]} [departments] + * @property {string} [description] + * @property {boolean} [is_active] + * @property {boolean} [is_archived] + * @property {boolean} is_expirable + * @property {boolean} is_physical + * @property {string} [logo] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} [name] + * @property {string} slug * @property {string} [tag] */ /** * @typedef ProductTemplateDownloadsExport - * @property {ProductTemplateExportFilterRequestSchema} [filters] - This is the + * @property {ProductTemplateExportFilterRequest} [filters] - This is the * filters of the file for the export. * @property {string[]} [notification_emails] - The list of the emails to be * notified after the completion of the job. @@ -3871,7 +3071,7 @@ const Joi = require("joi"); */ /** - * @typedef ProductTemplateExportFilterRequestSchema + * @typedef ProductTemplateExportFilterRequest * @property {string[]} [brands] - The list of the brands that needs to be exported. * @property {string[]} catalogue_types - The list of the type of the catalog * such as set, standard and composite. @@ -3883,9 +3083,9 @@ const Joi = require("joi"); */ /** - * @typedef ProductTemplateExportResponseSchema + * @typedef ProductTemplateExportResponse * @property {string} [completed_on] - Completion datetime of the job - * @property {UserInfo} [created_by] + * @property {UserInfo1} [created_by] - The user that created the job. * @property {Object} [filters] - The filters that needs to be exported. * @property {string} [modified_on] - Modification date of the job * @property {string[]} [notification_emails] - The notification emails for the job. @@ -3898,23 +3098,18 @@ const Joi = require("joi"); /** * @typedef ProductVariants - * @property {number} [brand_uid] - Unique identifier for the brand associated - * with the product variant. - * @property {number} [category_uid] - Unique identifier for the category to - * which the product variant belongs. - * @property {string} [item_code] - Code that uniquely identifies the specific - * product variant. - * @property {Media[]} [media] - Array of media objects representing images, - * videos, or other media associated with the product variant. - * @property {string} [name] - Name of the product variant. - * @property {number} [uid] - Unique identifier for the product variant. + * @property {number} [brand_uid] + * @property {number} [category_uid] + * @property {string} [item_code] + * @property {Media[]} [media] + * @property {string} [name] + * @property {number} [uid] */ /** - * @typedef ProductVariantsResponseSchema + * @typedef ProductVariantsResponse * @property {Page} [page] - * @property {ProductVariants[]} [variants] - A list of product variants - * returned in the response. + * @property {ProductVariants[]} [variants] */ /** @@ -3986,7 +3181,7 @@ const Joi = require("joi"); */ /** - * @typedef InventoryReturnConfig + * @typedef ReturnConfig1 * @property {boolean} [returnable] - Indicates if the item is returnable. * @property {number} [time] - The return time in days or hours. * @property {string} [unit] - The unit of return time. @@ -4000,11 +3195,10 @@ const Joi = require("joi"); */ /** - * @typedef ReturnConfigResponseSchema - * @property {boolean} [returnable] - Indicates if the product is eligible for return. - * @property {number} [time] - The duration within which the product can be returned. - * @property {string} [unit] - The time unit for the return duration, e.g., - * 'days' or 'hours'. + * @typedef ReturnConfigResponse + * @property {boolean} [returnable] + * @property {number} [time] + * @property {string} [unit] */ /** @@ -4016,53 +3210,30 @@ const Joi = require("joi"); * likely to change. */ -/** - * @typedef PageQuery - * @property {string[]} [brand] - List of brands being filtered by the query. - */ - -/** - * @typedef ApplicationCollectionItemSeoPage - * @property {Object} [params] - Any parameters associated with the page. - * @property {PageQuery} [query] - * @property {string} [type] - The type of page. - * @property {string} [url] - The URL for the page. - */ - -/** - * @typedef ApplicationCollectionItemSeoAction - * @property {string} [type] - The type of action, typically 'page'. - * @property {ApplicationCollectionItemSeoPage} [page] - */ - /** * @typedef ApplicationItemSeoAction - * @property {Object} [page] - * @property {string} type + * @property {Object} [page] - Details of the page associated with this SEO action. + * @property {string} type - Type of action, such as navigation or redirection. */ /** * @typedef ApplicationItemSeoBreadcrumbs - * @property {string} [url] - * @property {ApplicationItemSeoAction[]} [action] - */ - -/** - * @typedef ApplicationCollectionItemSeoBreadcrumbs * @property {string} [url] - The URL that this breadcrumb points to. - * @property {ApplicationCollectionItemSeoAction} [action] + * @property {ApplicationItemSeoAction[]} [action] - The actions available for + * this breadcrumb, defining what happens when it's clicked or interacted with. */ /** * @typedef ApplicationItemSeoMetaTagItem - * @property {string} key - * @property {string} value + * @property {string} key - The name of the meta tag. + * @property {string} value - The value associated with the meta tag. */ /** * @typedef ApplicationItemSeoMetaTags - * @property {string} title - * @property {ApplicationItemSeoMetaTagItem[]} [items] + * @property {string} title - The title for this set of meta tags. + * @property {ApplicationItemSeoMetaTagItem[]} [items] - A list of meta tag + * items, each defined by key-value pairs. */ /** @@ -4074,25 +3245,18 @@ const Joi = require("joi"); /** * @typedef SizePromotionThreshold - * @property {string} [threshold_type] - The type of threshold that applies to - * the size promotion, such as 'quantity' or 'value'. - * @property {number} [threshold_value] - The value of the threshold required to - * trigger the promotion, such as a minimum number of units. + * @property {string} [threshold_type] + * @property {number} [threshold_value] */ /** * @typedef SEOData - * @property {string} [description] - A brief description of the item, primarily - * used for SEO purposes. - * @property {string} [title] - The title of the item, primarily used for SEO - * and displayed in search engine results. + * @property {string} [description] + * @property {string} [title] * @property {Sitemap} [sitemap] - * @property {ApplicationItemSeoBreadcrumbs[]} [breadcrumbs] - An ordered list - * of links showing the hierarchy of the page, aiding navigation and SEO. - * @property {Metatags[]} [meta_tags] - A list of meta tags for the item, used - * for SEO optimization. - * @property {string} [canonical_url] - The canonical URL for the item, - * indicating the preferred URL for search engines to avoid duplicate content. + * @property {ApplicationItemSeoBreadcrumbs[]} [breadcrumbs] + * @property {Metatags[]} [meta_tags] + * @property {string} [canonical_url] */ /** @@ -4127,27 +3291,8 @@ const Joi = require("joi"); /** * @typedef SellerPhoneNumber - * @property {number} country_code - The country code for the phone number, - * typically represented as an integer (e.g., 91 for India). - * @property {string} number - The phone number associated with the seller, - * without the country code. - */ - -/** - * @typedef CollectionSeoDetail - * @property {string} [description] - SEO meta description for the item or - * collection. This is used to describe the content for search engines. - * @property {string} [title] - SEO meta title for the item or collection. It is - * used as the title that appears in search results. - * @property {Sitemap} [sitemap] - * @property {ApplicationCollectionItemSeoBreadcrumbs[]} [breadcrumbs] - List of - * breadcrumbs for navigation, showing the hierarchy of pages leading to the - * current page. - * @property {Metatags[]} [meta_tags] - An array of meta tags, each containing - * key-value pairs for various SEO meta tags used to enhance search visibility. - * @property {string} [canonical_url] - The canonical URL for the item or - * collection, which tells search engines the preferred version of the URL to - * avoid duplicate content issues. + * @property {number} country_code + * @property {string} number */ /** @@ -4170,17 +3315,17 @@ const Joi = require("joi"); /** * @typedef SetSize - * @property {number} pieces - Number of pieces in the set. - * @property {string} size - Size of the item in the set. + * @property {number} pieces + * @property {string} size */ /** - * @typedef SingleCategoryResponseSchema + * @typedef SingleCategoryResponse * @property {Category} [data] */ /** - * @typedef SingleProductResponseSchema + * @typedef SingleProductResponse * @property {ProductSchemaV2} [data] */ @@ -4198,31 +3343,24 @@ const Joi = require("joi"); */ /** - * @typedef SizeGuideResponseSchema - * @property {boolean} [active] - Indicates whether the size guide is currently active. - * @property {number} [brand_id] - The unique identifier for the brand - * associated with the size guide. - * @property {number} [company_id] - The unique identifier for the company that - * owns the size guide. - * @property {CreatedBySchema} [created_by] - * @property {string} [created_on] - The timestamp when the size guide was - * created, in ISO 8601 format. - * @property {Object} [guide] - The main content of the size guide, containing - * details such as the size measurements, headers, and units. - * @property {string} [id] - The public identifier of the size guide. - * @property {string} [image] - A URL pointing to an image associated with the size guide. - * @property {ModifiedBySchema} [modified_by] - * @property {string} [modified_on] - The timestamp when the size guide was last - * modified, in ISO 8601 format. - * @property {string} [name] - The name or title of the size guide. - * @property {string} [subtitle] - A short description or subtitle of the size guide. - * @property {string} [tag] - A tag or label associated with the size guide, - * used for categorization or reference. - * @property {string} [title] - The main title of the size guide. - */ - -/** - * @typedef StoreAssignResponseSchema + * @typedef SizeGuideResponse + * @property {boolean} [active] + * @property {number} [brand_id] + * @property {number} [company_id] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {Object} [guide] + * @property {string} [id] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} [name] + * @property {string} [subtitle] + * @property {string} [tag] + * @property {string} [title] + */ + +/** + * @typedef StoreAssignResponse * @property {string} [_id] * @property {ArticleAssignment1} article_assignment * @property {number} [company_id] @@ -4261,11 +3399,11 @@ const Joi = require("joi"); /** * @typedef StoreMeta - * @property {number} id - The unique identifier of the store. + * @property {number} id */ /** - * @typedef SuccessResponseSchema + * @typedef SuccessResponse * @property {boolean} [success] */ @@ -4285,10 +3423,10 @@ const Joi = require("joi"); /** * @typedef TaxSlab - * @property {number} [cess] - Cess rate applicable for the tax slab. - * @property {string} effective_date - The date from which the tax slab becomes effective. - * @property {number} rate - Applicable tax rate. - * @property {number} threshold - Threshold value above which the tax slab applies. + * @property {number} [cess] + * @property {string} effective_date + * @property {number} rate + * @property {number} threshold */ /** @@ -4314,11 +3452,6 @@ const Joi = require("joi"); * @property {string} [tag] */ -/** - * @typedef TemplateGlobalValidationData - * @property {GlobalValidation} [global_validation] - */ - /** * @typedef TemplateValidationData * @property {GlobalValidation} [global_validation] @@ -4326,18 +3459,13 @@ const Joi = require("joi"); */ /** - * @typedef TemplatesResponseSchema - * @property {ProductTemplate[]} [items] - List of product templates. + * @typedef TemplatesResponse + * @property {ProductTemplate} [items] * @property {Page} [page] */ /** - * @typedef TemplatesGlobalValidationResponseSchema - * @property {TemplateGlobalValidationData} [data] - */ - -/** - * @typedef TemplatesValidationResponseSchema + * @typedef TemplatesValidationResponse * @property {TemplateValidationData} [data] * @property {TemplateDetails} [template_details] */ @@ -4358,9 +3486,9 @@ const Joi = require("joi"); /** * @typedef Trader - * @property {string[]} [address] - List of addresses associated with the trader. - * @property {string} name - The name of the trader. - * @property {string} [type] - The role or type of the trader. + * @property {string[]} [address] + * @property {string} name + * @property {string} [type] */ /** @@ -4371,7 +3499,7 @@ const Joi = require("joi"); */ /** - * @typedef TraderResponseSchema + * @typedef TraderResponse * @property {string[]} [address] * @property {string} [name] * @property {string} [type] @@ -4379,54 +3507,44 @@ const Joi = require("joi"); /** * @typedef UpdateCollection - * @property {Object} [_custom_json] - Custom JSON object containing additional - * metadata specific to the collection. - * @property {Object} [_locale_language] - Locale-based language settings for - * the collection. + * @property {Object} [_custom_json] + * @property {Object} [_locale_language] * @property {CollectionSchedule} [_schedule] - * @property {boolean} [allow_facets] - Indicates whether facets are allowed for - * filtering items in the collection. - * @property {boolean} [allow_sort] - Specifies whether sorting is allowed for - * items within the collection. + * @property {boolean} [allow_facets] + * @property {boolean} [allow_sort] * @property {CollectionBadge} [badge] * @property {CollectionBanner} [banners] - * @property {string} [description] - A brief description of the collection. - * @property {boolean} [is_active] - Indicates if the collection is active and - * visible to users. - * @property {boolean} [is_visible] - Specifies whether the collection is - * visible to users on the platform. + * @property {string} [description] + * @property {boolean} [is_active] + * @property {boolean} [is_visible] * @property {CollectionImage} [logo] - * @property {Object} [meta] - Additional metadata related to the collection. + * @property {Object} [meta] * @property {UserInfo} [modified_by] - * @property {string} [name] - The name of the collection. - * @property {number} [priority] - Priority level of the collection, determining - * its order in listings. - * @property {boolean} [published] - Indicates whether the collection is - * published and accessible to the public. - * @property {CollectionQuery[]} [query] - List of query filters that define - * which items are included in the collection. - * @property {CollectionSeoDetail} [seo] - * @property {string} [slug] - A unique identifier used to reference the - * collection in URLs. - * @property {string} [sort_on] - The field by which items in the collection are - * sorted (e.g., popular, latest). - * @property {string[]} [tags] - List of tags associated with the collection. - * @property {string} [type] - The type of collection, either 'items' or 'query'. - * @property {string[]} [visible_facets_keys] - Keys for facets that are visible - * to users for filtering items in the collection. + * @property {string} [name] + * @property {number} [priority] + * @property {boolean} [published] + * @property {CollectionQuery[]} [query] + * @property {SeoDetail} [seo] + * @property {string} [slug] + * @property {string} [sort_on] + * @property {string[]} [tags] + * @property {string} [type] + * @property {string[]} [visible_facets_keys] */ /** - * @typedef UpdateSearchConfigurationRequestSchema + * @typedef UpdateSearchConfigurationRequest * @property {string} application_id - The application id where custom search * configuration is set * @property {number} company_id - The company id where custom search configuration is set - * @property {UserSchema} [created_by] - The user who created the search configuration. + * @property {UserSerializer} [created_by] - The user who created the search + * configuration. * @property {string} [created_on] - The date and time when the search * configuration was created. * @property {boolean} [is_proximity_enabled] - Flag indicating if proximity * search is enabled for this attribute. - * @property {UserSchema} [modified_by] - The user who modified the search configuration. + * @property {UserSerializer} [modified_by] - The user who modified the search + * configuration. * @property {string} [modified_on] - The date and time when the search * configuration was last modified. * @property {number} [proximity] - Proximity distance configuration @@ -4435,12 +3553,12 @@ const Joi = require("joi"); */ /** - * @typedef UpdateSearchConfigurationResponseSchema + * @typedef UpdateSearchConfigurationResponse * @property {boolean} [success] */ /** - * @typedef CreateMarketplaceOptinResponseSchema + * @typedef CreateMarketplaceOptinResponse * @property {number[]} [store_ids] * @property {number[]} [brand_ids] * @property {number} [company_id] @@ -4476,6 +3594,14 @@ const Joi = require("joi"); /** * @typedef UserInfo + * @property {string} [email] + * @property {string} [uid] + * @property {string} [user_id] + * @property {string} [username] + */ + +/** + * @typedef UserInfo1 * @property {string} [email] - The email address of the user. * @property {string} [uid] - The unique ID of the user. * @property {string} [user_id] - The ID of the user. @@ -4483,14 +3609,14 @@ const Joi = require("joi"); */ /** - * @typedef UserSchema + * @typedef UserSerializer * @property {string} [contact] - The contact information of the user. * @property {string} [user_id] - The unique ID of the user. * @property {string} [username] - The username of the user. */ /** - * @typedef RequestUserSchema + * @typedef RequestUserSerializer * @property {string} [_id] * @property {string} [contact] * @property {string} [uid] @@ -4498,14 +3624,25 @@ const Joi = require("joi"); * @property {string} [username] */ +/** + * @typedef UserSerializer2 + * @property {string} [contact] + * @property {string} [user_id] + * @property {string} [username] + */ + +/** + * @typedef UserSerializer3 + * @property {string} [contact] + * @property {string} [user_id] + * @property {string} [username] + */ + /** * @typedef ValidateIdentifier - * @property {string} gtin_type - The type of the identifier (e.g., GTIN-12, - * GTIN-13, UPC) used to categorize the format of the identifier. - * @property {string} gtin_value - The actual value of the identifier (e.g., the - * numeric or alphanumeric code representing the product). - * @property {boolean} [primary] - A flag indicating whether this identifier is - * the primary one for the product. + * @property {string} gtin_type + * @property {string} gtin_value + * @property {boolean} [primary] */ /** @@ -4515,50 +3652,48 @@ const Joi = require("joi"); /** * @typedef ValidateSizeGuide - * @property {boolean} [active] - Indicates whether the size guide is currently active. - * @property {number} [brand_id] - The unique identifier for the brand - * associated with the size guide. - * @property {string} [company_id] - The unique identifier for the company that - * owns the size guide. - * @property {Object} [created_by] - Information about the user who created the - * size guide. - * @property {string} [created_on] - The timestamp when the size guide was - * created, in ISO 8601 format. - * @property {string} [description] - A detailed HTML description of the size guide. + * @property {boolean} [active] + * @property {number} [brand_id] + * @property {number} [company_id] + * @property {Object} [created_by] + * @property {string} [created_on] + * @property {string} [description] * @property {Guide} [guide] - * @property {string} [id] - The public identifier of the size guide. - * @property {string} [image] - A URL pointing to an image associated with the size guide. - * @property {Object} [modified_by] - Information about the user who last - * modified the size guide. - * @property {string} [modified_on] - The timestamp when the size guide was last - * modified, in ISO 8601 format. - * @property {string} name - The name of the size guide. - * @property {string} [subtitle] - A short description or subtitle of the size guide. - * @property {string} [tag] - A tag or label associated with the size guide, - * used for categorization or reference. - * @property {string} title - The main title of the size guide. + * @property {string} [id] + * @property {string} [image] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} name + * @property {string} [subtitle] + * @property {string} [tag] + * @property {string} title */ /** * @typedef VerifiedBy - * @property {string} [user_id] - The unique identifier of the user who verified - * the product. - * @property {string} [username] - The username of the user who verified the product. + * @property {string} [user_id] + * @property {string} [username] */ /** - * @typedef WeightResponseSchema + * @typedef WeightResponse * @property {boolean} is_default - Indicates if it is the default weight. * @property {number} shipping - The shipping weight. * @property {string} unit - The unit of weight. */ /** - * @typedef InventoryWeightResponseSchema + * @typedef InventoryWeightResponse * @property {number} [shipping] * @property {string} [unit] */ +/** + * @typedef CreatedBy + * @property {string} [username] + * @property {string} [user_id] + */ + /** * @typedef Marketplaces * @property {number[]} [brand_ids] @@ -4582,7 +3717,7 @@ const Joi = require("joi"); */ /** - * @typedef UpdateMarketplaceOptinRequestSchema + * @typedef UpdateMarketplaceOptinRequest * @property {number[]} [brand_ids] * @property {number} [company_id] * @property {boolean} [enabled] @@ -4592,7 +3727,7 @@ const Joi = require("joi"); */ /** - * @typedef UpdateMarketplaceOptinResponseSchema + * @typedef UpdateMarketplaceOptinResponse * @property {number[]} [brand_ids] * @property {number} [company_id] * @property {string} [app_id] @@ -4604,18 +3739,6 @@ const Joi = require("joi"); * @property {CreatedBy} [modified_by] */ -/** - * @typedef Filters - * @property {string[]} [brands] - The list of all the brands selected. - * @property {string} [from_date] - The modified-on date from which the data - * needs to be exported. - * @property {InventoryExportQuantityFilter} [quantity] - The quantity range - * that needs to be exported. - * @property {string[]} [stores] - The list of all the stores selected. - * @property {string} [to_date] - The modified-on date till when the data needs - * to be exported. - */ - /** * @typedef ActionPage * @property {Object} [params] - Parameters that should be considered in path. @@ -4624,44 +3747,6 @@ const Joi = require("joi"); * @property {PageType} type */ -/** - * @typedef Price1 - * @property {CurrencyCodeEnum} [currency_code] - * @property {string} [currency_symbol] - * @property {number} [max] - * @property {number} [min] - */ - -/** - * @typedef MultiCategoriesSchema - * @property {number} [l1] - The ID of the Level 1 (L1) category of the product. - * @property {number} [l2] - The ID of the Level 2 (L2) category of the product. - * @property {number} [l3] - The ID of the Level 3 (L3) category of the product. - * @property {boolean} [is_active] - Indicates whether the L3 category of the - * product is currently active. - * @property {number} [department] - The department associated with the L3 - * category of the product. - */ - -/** - * @typedef CustomMeta - * @property {string} key - The key of the metadata. Should be a non-empty - * string and length should not exceed 30 characters. - * @property {string} value - The value of the metadata. Should be a non-empty - * string and length should not exceed 100 characters. - */ - -/** - * @typedef ValidationErrors - * @property {ValidationError[]} errors - */ - -/** - * @typedef ValidationError - * @property {string} message - A brief description of the error encountered. - * @property {string} field - The field in the request that caused the error. - */ - /** * @typedef {| "about-us" * | "addresses" @@ -4713,8 +3798,6 @@ const Joi = require("joi"); * | "locate-us"} PageType */ -/** @typedef {"INR" | "USD" | "EUR"} CurrencyCodeEnum */ - class CatalogPlatformModel { /** @returns {Action} */ static Action() { @@ -4739,8 +3822,8 @@ class CatalogPlatformModel { }); } - /** @returns {AllowSingleRequestSchema} */ - static AllowSingleRequestSchema() { + /** @returns {AllowSingleRequest} */ + static AllowSingleRequest() { return Joi.object({ allow_single: Joi.boolean().required(), }); @@ -4752,11 +3835,11 @@ class CatalogPlatformModel { app_id: Joi.string().allow("").required(), config_id: Joi.string().allow(""), config_type: Joi.string().allow("").required(), - created_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), created_on: Joi.string().allow(""), id: Joi.string().allow(""), listing: CatalogPlatformModel.ConfigurationListing(), - modified_by: Joi.object().pattern(/\S/, Joi.any()), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), product: CatalogPlatformModel.ConfigurationProduct(), type: Joi.string().allow(""), @@ -4767,18 +3850,18 @@ class CatalogPlatformModel { static AppCategoryReturnConfig() { return Joi.object({ category_id: Joi.number().required(), - return_config: CatalogPlatformModel.ProductReturnConfigBaseSchema().required(), + return_config: CatalogPlatformModel.ProductReturnConfigBaseSerializer().required(), }); } - /** @returns {AppCategoryReturnConfigResponseSchema} */ - static AppCategoryReturnConfigResponseSchema() { + /** @returns {AppCategoryReturnConfigResponse} */ + static AppCategoryReturnConfigResponse() { return Joi.object({ app_id: Joi.string().allow(""), category_id: Joi.number(), logo: Joi.string().allow(""), name: Joi.string().allow(""), - return_config: CatalogPlatformModel.ProductReturnConfigBaseSchema(), + return_config: CatalogPlatformModel.ProductReturnConfigBaseSerializer(), }); } @@ -4788,10 +3871,10 @@ class CatalogPlatformModel { app_id: Joi.string().allow("").required(), config_id: Joi.string().allow(""), config_type: Joi.string().allow("").required(), - created_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), created_on: Joi.string().allow(""), listing: CatalogPlatformModel.ConfigurationListing(), - modified_by: Joi.object().pattern(/\S/, Joi.any()), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), product: CatalogPlatformModel.ConfigurationProduct(), type: Joi.string().allow(""), @@ -4832,21 +3915,21 @@ class CatalogPlatformModel { /** @returns {ApplicationBrandJson} */ static ApplicationBrandJson() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()).required(), + _custom_json: Joi.any().required(), }); } /** @returns {ApplicationCategoryJson} */ static ApplicationCategoryJson() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()).required(), + _custom_json: Joi.any().required(), }); } /** @returns {ApplicationDepartment} */ static ApplicationDepartment() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), app_id: Joi.string().allow("").required(), is_active: Joi.boolean(), logo: Joi.string().allow(""), @@ -4858,12 +3941,12 @@ class CatalogPlatformModel { /** @returns {ApplicationDepartmentJson} */ static ApplicationDepartmentJson() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()).required(), + _custom_json: Joi.any().required(), }); } - /** @returns {ApplicationDepartmentListingResponseSchema} */ - static ApplicationDepartmentListingResponseSchema() { + /** @returns {ApplicationDepartmentListingResponse} */ + static ApplicationDepartmentListingResponse() { return Joi.object({ items: Joi.array().items(CatalogPlatformModel.ApplicationDepartment()), page: CatalogPlatformModel.Page().required(), @@ -4882,9 +3965,9 @@ class CatalogPlatformModel { /** @returns {ApplicationItemMeta} */ static ApplicationItemMeta() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), _custom_meta: Joi.array().items(CatalogPlatformModel.MetaFields()), - alt_text: Joi.object().pattern(/\S/, Joi.any()), + alt_text: Joi.any(), is_cod: Joi.boolean(), is_gift: Joi.boolean(), moq: CatalogPlatformModel.ApplicationItemMOQ(), @@ -4917,82 +4000,12 @@ class CatalogPlatformModel { }); } - /** @returns {ApplicationProductsSchema} */ - static ApplicationProductsSchema() { - return Joi.object({ - attributes: Joi.object().pattern(/\S/, Joi.any()), - brand: CatalogPlatformModel.ProductBrand(), - color: Joi.string().allow(""), - description: Joi.string().allow(""), - discount: Joi.string().allow(""), - has_variant: Joi.boolean(), - highlights: Joi.array().items(Joi.string().allow("")), - image_nature: Joi.string().allow("").required(), - item_code: Joi.string().allow("").required(), - item_type: Joi.string().allow("").required(), - medias: Joi.array().items(CatalogPlatformModel.Media()), - name: Joi.string().allow("").required(), - price: CatalogPlatformModel.ProductListingPrice(), - product_online_date: Joi.string().allow(""), - promo_meta: Joi.object().pattern(/\S/, Joi.any()), - rating: Joi.number(), - rating_count: Joi.number(), - sellable: Joi.boolean(), - short_description: Joi.string().allow(""), - similars: Joi.array().items(Joi.string().allow("")), - slug: Joi.string().allow("").required(), - teaser_tag: Joi.object().pattern(/\S/, Joi.any()), - tryouts: Joi.array().items(Joi.string().allow("")), - type: Joi.string().allow(""), - uid: Joi.number().required(), - popularity: Joi.number(), - brand_uid: Joi.number().required(), - category_uid: Joi.number().required(), - verification_status: Joi.number(), - channel_identifier: Joi.string().allow(""), - category_slug: Joi.string().allow(""), - size_guide: Joi.string().allow(""), - l3_categories: Joi.array().items(Joi.number()).required(), - store_ids: Joi.array().items(Joi.number()), - company_ids: Joi.array().items(Joi.number()), - departments: Joi.array().items(Joi.number()).required(), - tags: Joi.array().items(Joi.string().allow("")), - l3_category_names: Joi.array().items(Joi.string().allow("")), - sizes: Joi.array().items(Joi.string().allow("")), - product_group_tag: Joi.array().items(Joi.string().allow("")), - multi_size: Joi.boolean().required(), - is_gift: Joi.boolean().required(), - is_cod: Joi.boolean().required(), - is_dependent: Joi.boolean().required(), - is_available: Joi.boolean().required(), - moq: CatalogPlatformModel.ApplicationItemMOQ().required(), - seo: CatalogPlatformModel.ApplicationItemSEO().required(), - variants: Joi.object().pattern(/\S/, Joi.any()), - variant_media: Joi.object().pattern(/\S/, Joi.any()), - variant_group: Joi.object().pattern(/\S/, Joi.any()), - multi_categories: Joi.array().items( - CatalogPlatformModel.MultiCategoriesSchema() - ), - template_tag: Joi.string().allow(""), - net_quantity: Joi.object().pattern(/\S/, Joi.any()), - custom_order: CatalogPlatformModel.CustomOrder(), - country_of_origin: Joi.string().allow("").required(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - identifiers: Joi.array().items(Joi.string().allow("")), - item_id: Joi.number(), - _custom_meta: Joi.array().items(CatalogPlatformModel.CustomMeta()), - discount_percentage: Joi.number(), - }); - } - - /** @returns {ApplicationProductListingResponseSchema} */ - static ApplicationProductListingResponseSchema() { + /** @returns {ApplicationProductListingResponse} */ + static ApplicationProductListingResponse() { return Joi.object({ filters: Joi.array().items(CatalogPlatformModel.ProductFilters()), - items: Joi.array().items( - CatalogPlatformModel.ApplicationProductsSchema() - ), - operators: Joi.object().pattern(/\S/, Joi.any()), + items: Joi.array().items(CatalogPlatformModel.ProductListingDetail()), + operators: Joi.any(), page: CatalogPlatformModel.Page().required(), sort_on: Joi.array().items(CatalogPlatformModel.ProductSortOn()), }); @@ -5001,18 +4014,18 @@ class CatalogPlatformModel { /** @returns {ApplicationStoreJson} */ static ApplicationStoreJson() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()).required(), + _custom_json: Joi.any().required(), }); } - /** @returns {AppReturnConfigResponseSchema} */ - static AppReturnConfigResponseSchema() { + /** @returns {AppReturnConfigResponse} */ + static AppReturnConfigResponse() { return Joi.object({ app_id: Joi.string().allow(""), category_count: Joi.number(), company_id: Joi.number(), - created_by: Joi.object().pattern(/\S/, Joi.any()), - modified_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), return_config_level: Joi.string().allow(""), }); @@ -5043,8 +4056,8 @@ class CatalogPlatformModel { }); } - /** @returns {ArticleStoreResponseSchema} */ - static ArticleStoreResponseSchema() { + /** @returns {ArticleStoreResponse} */ + static ArticleStoreResponse() { return Joi.object({ name: Joi.string().allow(""), store_code: Joi.string().allow(""), @@ -5073,7 +4086,7 @@ class CatalogPlatformModel { return Joi.object({ article_assignment: CatalogPlatformModel.ArticleAssignment(), group_id: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), quantity: Joi.number(), query: CatalogPlatformModel.ArticleQuery(), }); @@ -5136,10 +4149,10 @@ class CatalogPlatformModel { }); } - /** @returns {AttributeMasterSchema} */ - static AttributeMasterSchema() { + /** @returns {AttributeMasterSerializer} */ + static AttributeMasterSerializer() { return Joi.object({ - created_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), created_on: Joi.string().allow(""), departments: Joi.array().items(Joi.string().allow("")).required(), description: Joi.string().allow(""), @@ -5148,16 +4161,16 @@ class CatalogPlatformModel { filters: CatalogPlatformModel.AttributeMasterFilter().required(), is_nested: Joi.boolean(), logo: Joi.string().allow(""), - modified_by: Joi.object().pattern(/\S/, Joi.any()), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), - name: Joi.string().allow("").required(), + name: Joi.string().allow(""), raw_key: Joi.string().allow(""), schema: CatalogPlatformModel.AttributeMaster().required(), + slug: Joi.string().allow("").required(), suggestion: Joi.string().allow(""), - synonyms: Joi.object().pattern(/\S/, Joi.any()), + synonyms: Joi.any(), tags: Joi.array().items(Joi.string().allow("")), unit: Joi.string().allow(""), - slug: Joi.string().allow("").required(), variant: Joi.boolean(), }); } @@ -5165,8 +4178,8 @@ class CatalogPlatformModel { /** @returns {AttributeSchemaRange} */ static AttributeSchemaRange() { return Joi.object({ - min: Joi.number(), max: Joi.number(), + min: Joi.number(), }); } @@ -5190,8 +4203,8 @@ class CatalogPlatformModel { /** @returns {AutocompletePageAction} */ static AutocompletePageAction() { return Joi.object({ - params: Joi.object().pattern(/\S/, Joi.any()), - query: Joi.object().pattern(/\S/, Joi.any()), + params: Joi.any(), + query: Joi.any(), type: Joi.string().allow(""), url: Joi.string().allow(""), }); @@ -5200,7 +4213,7 @@ class CatalogPlatformModel { /** @returns {AutocompleteResult} */ static AutocompleteResult() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), action: CatalogPlatformModel.AutocompleteAction(), display: Joi.string().allow(""), logo: CatalogPlatformModel.AutoCompleteMedia(), @@ -5219,19 +4232,21 @@ class CatalogPlatformModel { /** @returns {BaseAppCategoryReturnConfig} */ static BaseAppCategoryReturnConfig() { return Joi.object({ + app_id: Joi.string().allow("").required(), + company_id: Joi.number().required(), data: Joi.array() .items(CatalogPlatformModel.AppCategoryReturnConfig()) .required(), }); } - /** @returns {BaseAppCategoryReturnConfigResponseSchema} */ - static BaseAppCategoryReturnConfigResponseSchema() { + /** @returns {BaseAppCategoryReturnConfigResponse} */ + static BaseAppCategoryReturnConfigResponse() { return Joi.object({ data: Joi.array().items( - CatalogPlatformModel.AppCategoryReturnConfigResponseSchema() + CatalogPlatformModel.AppCategoryReturnConfigResponse() ), - page: CatalogPlatformModel.PageResponseSchema(), + page: CatalogPlatformModel.PageResponse(), }); } @@ -5258,8 +4273,8 @@ class CatalogPlatformModel { }); } - /** @returns {BrandListingResponseSchema} */ - static BrandListingResponseSchema() { + /** @returns {BrandListingResponse} */ + static BrandListingResponse() { return Joi.object({ items: Joi.array().items(CatalogPlatformModel.BrandItem()), page: CatalogPlatformModel.Page().required(), @@ -5293,7 +4308,7 @@ class CatalogPlatformModel { items: Joi.array().items( CatalogPlatformModel.ApplicationBrandListingItemSchema() ), - page: CatalogPlatformModel.Page().required(), + page: CatalogPlatformModel.Page(), }); } @@ -5344,16 +4359,16 @@ class CatalogPlatformModel { }); } - /** @returns {BulkAssetResponseSchema} */ - static BulkAssetResponseSchema() { + /** @returns {BulkAssetResponse} */ + static BulkAssetResponse() { return Joi.object({ items: Joi.array().items(CatalogPlatformModel.Items()), page: CatalogPlatformModel.Page(), }); } - /** @returns {BulkHsnResponseSchema} */ - static BulkHsnResponseSchema() { + /** @returns {BulkHsnResponse} */ + static BulkHsnResponse() { return Joi.object({ success: Joi.boolean(), }); @@ -5388,14 +4403,14 @@ class CatalogPlatformModel { cancelled: Joi.number(), cancelled_records: Joi.array().items(Joi.string().allow("")), company_id: Joi.number(), - created_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), created_on: Joi.string().allow(""), failed: Joi.number(), failed_records: Joi.array().items(CatalogPlatformModel.FailedRecord()), file_path: Joi.string().allow(""), id: Joi.string().allow(""), is_active: Joi.boolean(), - modified_by: Joi.object().pattern(/\S/, Joi.any()), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), stage: Joi.string().allow(""), succeed: Joi.number(), @@ -5406,7 +4421,7 @@ class CatalogPlatformModel { /** @returns {BulkProductJob} */ static BulkProductJob() { return Joi.object({ - company_id: Joi.string().allow(""), + company_id: Joi.number(), template_tag: Joi.string().allow(""), product_type: Joi.string().allow(""), department: Joi.string().allow(""), @@ -5418,15 +4433,13 @@ class CatalogPlatformModel { static BulkJob() { return Joi.object({ cancelled: Joi.number(), - cancelled_records: Joi.array().items( - Joi.object().pattern(/\S/, Joi.any()) - ), + cancelled_records: Joi.array().items(Joi.any()), company_id: Joi.number().required(), - created_by: CatalogPlatformModel.UserInfo(), + created_by: CatalogPlatformModel.UserInfo1(), created_on: Joi.string().allow("").required(), custom_template_tag: Joi.string().allow(""), failed: Joi.number(), - failed_records: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + failed_records: Joi.array().items(Joi.any()), file_path: Joi.string().allow(""), is_active: Joi.boolean(), modified_by: Joi.string().allow("").allow(null), @@ -5439,21 +4452,21 @@ class CatalogPlatformModel { }); } - /** @returns {BulkProductRequestSchema} */ - static BulkProductRequestSchema() { + /** @returns {BulkProductRequest} */ + static BulkProductRequest() { return Joi.object({ batch_id: Joi.string().allow("").required(), company_id: Joi.number().required(), - data: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())).required(), + data: Joi.array().items(Joi.any()).required(), template_tag: Joi.string().allow("").required(), }); } - /** @returns {BulkResponseSchema} */ - static BulkResponseSchema() { + /** @returns {BulkResponse} */ + static BulkResponse() { return Joi.object({ batch_id: Joi.string().allow("").required(), - created_by: CatalogPlatformModel.UserInfo(), + created_by: CatalogPlatformModel.UserInfo1(), created_on: Joi.string().allow("").required(), is_active: Joi.boolean(), modified_by: Joi.string().allow("").allow(null), @@ -5482,16 +4495,16 @@ class CatalogPlatformModel { }); } - /** @returns {CatalogInsightResponseSchema} */ - static CatalogInsightResponseSchema() { + /** @returns {CatalogInsightResponse} */ + static CatalogInsightResponse() { return Joi.object({ brand_distribution: CatalogPlatformModel.CatalogInsightBrand(), item: CatalogPlatformModel.CatalogInsightItem(), }); } - /** @returns {CategoriesResponseSchema} */ - static CategoriesResponseSchema() { + /** @returns {CategoriesResponse} */ + static CategoriesResponse() { return Joi.object({ name: Joi.string().allow(""), slug: Joi.string().allow(""), @@ -5504,7 +4517,7 @@ class CatalogPlatformModel { /** @returns {Category} */ static Category() { return Joi.object({ - created_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), created_on: Joi.string().allow(""), departments: Joi.array().items(Joi.number()).required(), hierarchy: Joi.array().items(CatalogPlatformModel.Hierarchy()), @@ -5513,7 +4526,7 @@ class CatalogPlatformModel { level: Joi.number().required(), marketplaces: CatalogPlatformModel.CategoryMapping(), media: CatalogPlatformModel.Media1(), - modified_by: Joi.object().pattern(/\S/, Joi.any()), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), name: Joi.string().allow("").required(), priority: Joi.number(), @@ -5527,7 +4540,7 @@ class CatalogPlatformModel { /** @returns {CategoryItems} */ static CategoryItems() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + _custom_json: Joi.any().allow(null), action: CatalogPlatformModel.Action(), banners: CatalogPlatformModel.ImageUrls(), childs: Joi.array().items(CatalogPlatformModel.Child()), @@ -5537,8 +4550,8 @@ class CatalogPlatformModel { }); } - /** @returns {CategoryListingResponseSchema} */ - static CategoryListingResponseSchema() { + /** @returns {CategoryListingResponse} */ + static CategoryListingResponse() { return Joi.object({ data: Joi.array().items(CatalogPlatformModel.DepartmentCategoryTree()), departments: Joi.array().items( @@ -5564,8 +4577,8 @@ class CatalogPlatformModel { }); } - /** @returns {CategoryResponseSchema} */ - static CategoryResponseSchema() { + /** @returns {CategoryResponse} */ + static CategoryResponse() { return Joi.object({ items: Joi.array().items(CatalogPlatformModel.Category()), page: CatalogPlatformModel.Page(), @@ -5575,7 +4588,7 @@ class CatalogPlatformModel { /** @returns {Child} */ static Child() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), action: CatalogPlatformModel.Action(), banners: CatalogPlatformModel.ImageUrls(), childs: Joi.array().items(CatalogPlatformModel.SecondLevelChild()), @@ -5601,21 +4614,20 @@ class CatalogPlatformModel { }); } - /** @returns {CollectionCreateResponseSchema} */ - static CollectionCreateResponseSchema() { + /** @returns {CollectionCreateResponse} */ + static CollectionCreateResponse() { return Joi.object({ uid: Joi.string().allow(""), _schedule: CatalogPlatformModel.CollectionSchedule(), allow_facets: Joi.boolean(), allow_sort: Joi.boolean(), app_id: Joi.string().allow(""), - badge: Joi.object().pattern(/\S/, Joi.any()), + badge: Joi.any(), banners: CatalogPlatformModel.ImageUrls(), - cron: Joi.object().pattern(/\S/, Joi.any()), description: Joi.string().allow(""), is_active: Joi.boolean(), logo: CatalogPlatformModel.BannerImage(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), name: Joi.string().allow(""), priority: Joi.number(), query: Joi.array().items(CatalogPlatformModel.CollectionQuery()), @@ -5635,20 +4647,20 @@ class CatalogPlatformModel { }); } - /** @returns {CollectionDetailResponseSchema} */ - static CollectionDetailResponseSchema() { + /** @returns {CollectionDetailResponse} */ + static CollectionDetailResponse() { return Joi.object({ - _schedule: Joi.object().pattern(/\S/, Joi.any()), + _schedule: Joi.any(), allow_facets: Joi.boolean(), allow_sort: Joi.boolean(), app_id: Joi.string().allow(""), - badge: Joi.object().pattern(/\S/, Joi.any()), + badge: Joi.any(), banners: CatalogPlatformModel.ImageUrls(), - cron: Joi.object().pattern(/\S/, Joi.any()), + cron: Joi.any(), description: Joi.string().allow(""), is_active: Joi.boolean(), logo: CatalogPlatformModel.Media(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), name: Joi.string().allow(""), priority: Joi.number(), query: Joi.array().items(CatalogPlatformModel.CollectionQuery()), @@ -5768,10 +4780,10 @@ class CatalogPlatformModel { return Joi.object({ brand_ids: Joi.array().items(Joi.number()).required(), company_id: Joi.number().required(), - created_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), created_on: Joi.number().required(), enabled: Joi.boolean().required(), - modified_by: Joi.object().pattern(/\S/, Joi.any()), + modified_by: Joi.any(), modified_on: Joi.number().required(), opt_level: Joi.string().allow("").required(), platform: Joi.string().allow("").required(), @@ -5779,15 +4791,15 @@ class CatalogPlatformModel { }); } - /** @returns {ConfigErrorResponseSchema} */ - static ConfigErrorResponseSchema() { + /** @returns {ConfigErrorResponse} */ + static ConfigErrorResponse() { return Joi.object({ message: Joi.string().allow("").required(), }); } - /** @returns {ConfigSuccessResponseSchema} */ - static ConfigSuccessResponseSchema() { + /** @returns {ConfigSuccessResponse} */ + static ConfigSuccessResponse() { return Joi.object({ message: Joi.string().allow("").required(), }); @@ -5841,8 +4853,8 @@ class CatalogPlatformModel { CatalogPlatformModel.ConfigurationBucketPoints() ), condition: Joi.string().allow(""), - map: Joi.object().pattern(/\S/, Joi.any()), - map_values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + map: Joi.any(), + map_values: Joi.array().items(Joi.any()), priority: Joi.array().items(Joi.string().allow("")), sort: Joi.string().allow(""), value: Joi.string().allow(""), @@ -5925,7 +4937,7 @@ class CatalogPlatformModel { /** @returns {CreateAutocompleteKeyword} */ static CreateAutocompleteKeyword() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), app_id: Joi.string().allow(""), is_active: Joi.boolean(), results: Joi.array().items(CatalogPlatformModel.AutocompleteResult()), @@ -5933,12 +4945,12 @@ class CatalogPlatformModel { }); } - /** @returns {CreateAutocompleteWordsResponseSchema} */ - static CreateAutocompleteWordsResponseSchema() { + /** @returns {CreateAutocompleteWordsResponse} */ + static CreateAutocompleteWordsResponse() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), app_id: Joi.string().allow(""), - results: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + results: Joi.array().items(Joi.any()), words: Joi.array().items(Joi.string().allow("")), }); } @@ -5946,7 +4958,7 @@ class CatalogPlatformModel { /** @returns {CreateCollection} */ static CreateCollection() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), _locale_language: Joi.object().pattern(/\S/, Joi.any()), _schedule: CatalogPlatformModel.CollectionSchedule(), allow_facets: Joi.boolean(), @@ -5959,7 +4971,7 @@ class CatalogPlatformModel { is_active: Joi.boolean(), is_visible: Joi.boolean(), logo: CatalogPlatformModel.CollectionImage().required(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), modified_by: CatalogPlatformModel.UserInfo(), name: Joi.string().allow("").required(), priority: Joi.number(), @@ -5974,15 +4986,15 @@ class CatalogPlatformModel { }); } - /** @returns {CreateSearchConfigurationRequestSchema} */ - static CreateSearchConfigurationRequestSchema() { + /** @returns {CreateSearchConfigurationRequest} */ + static CreateSearchConfigurationRequest() { return Joi.object({ application_id: Joi.string().allow("").required(), company_id: Joi.number().required(), - created_by: CatalogPlatformModel.UserSchema(), + created_by: CatalogPlatformModel.UserSerializer(), created_on: Joi.string().allow(""), is_proximity_enabled: Joi.boolean(), - modified_by: CatalogPlatformModel.UserSchema(), + modified_by: CatalogPlatformModel.UserSerializer(), modified_on: Joi.string().allow(""), proximity: Joi.number(), searchable_attributes: Joi.array().items( @@ -5991,8 +5003,8 @@ class CatalogPlatformModel { }); } - /** @returns {CreateSearchConfigurationResponseSchema} */ - static CreateSearchConfigurationResponseSchema() { + /** @returns {CreateSearchConfigurationResponse} */ + static CreateSearchConfigurationResponse() { return Joi.object({ success: Joi.boolean(), }); @@ -6001,7 +5013,7 @@ class CatalogPlatformModel { /** @returns {CreateSearchKeyword} */ static CreateSearchKeyword() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), app_id: Joi.string().allow(""), is_active: Joi.boolean(), result: CatalogPlatformModel.SearchKeywordResult().required(), @@ -6012,6 +5024,8 @@ class CatalogPlatformModel { /** @returns {CreateUpdateAppReturnConfig} */ static CreateUpdateAppReturnConfig() { return Joi.object({ + app_id: Joi.string().allow("").required(), + company_id: Joi.number().required(), return_config_level: Joi.string().allow("").required(), }); } @@ -6024,8 +5038,8 @@ class CatalogPlatformModel { }); } - /** @returns {CrossSellingResponseSchema} */ - static CrossSellingResponseSchema() { + /** @returns {CrossSellingResponse} */ + static CrossSellingResponse() { return Joi.object({ brand_distribution: CatalogPlatformModel.CatalogInsightBrand(), data: CatalogPlatformModel.CrossSellingData(), @@ -6035,9 +5049,9 @@ class CatalogPlatformModel { /** @returns {CustomOrder} */ static CustomOrder() { return Joi.object({ - manufacturing_time_unit: Joi.string().allow(""), - is_custom_order: Joi.boolean().required(), + is_custom_order: Joi.boolean(), manufacturing_time: Joi.number(), + manufacturing_time_unit: Joi.string().allow(""), }); } @@ -6051,8 +5065,8 @@ class CatalogPlatformModel { }); } - /** @returns {DefaultKeyRequestSchema} */ - static DefaultKeyRequestSchema() { + /** @returns {DefaultKeyRequest} */ + static DefaultKeyRequest() { return Joi.object({ default_key: Joi.string().allow("").required(), }); @@ -6061,29 +5075,21 @@ class CatalogPlatformModel { /** @returns {DeleteAppCategoryReturnConfig} */ static DeleteAppCategoryReturnConfig() { return Joi.object({ + app_id: Joi.string().allow("").required(), category_ids: Joi.array().items(Joi.number()).required(), + company_id: Joi.number().required(), }); } - /** @returns {DeleteProductRequestBody} */ - static DeleteProductRequestBody() { - return Joi.object({ - brand_uid: Joi.number(), - item_code: Joi.string().allow(""), - company_id: Joi.string().allow(""), - item_id: Joi.number(), - }); - } - - /** @returns {DeleteResponseSchema} */ - static DeleteResponseSchema() { + /** @returns {DeleteResponse} */ + static DeleteResponse() { return Joi.object({ message: Joi.string().allow(""), }); } - /** @returns {DeleteSearchConfigurationResponseSchema} */ - static DeleteSearchConfigurationResponseSchema() { + /** @returns {DeleteSearchConfigurationResponse} */ + static DeleteSearchConfigurationResponse() { return Joi.object({ success: Joi.boolean(), }); @@ -6092,7 +5098,7 @@ class CatalogPlatformModel { /** @returns {Department} */ static Department() { return Joi.object({ - logo: CatalogPlatformModel.DepartmentMedia(), + logo: CatalogPlatformModel.Media2(), name: Joi.string().allow(""), priority_order: Joi.number(), slug: Joi.string().allow(""), @@ -6108,13 +5114,13 @@ class CatalogPlatformModel { }); } - /** @returns {DepartmentErrorResponseSchema} */ - static DepartmentErrorResponseSchema() { + /** @returns {DepartmentErrorResponse} */ + static DepartmentErrorResponse() { return Joi.object({ code: Joi.string().allow(""), - errors: Joi.object().pattern(/\S/, Joi.any()), + errors: Joi.any(), message: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), status: Joi.number(), }); } @@ -6128,23 +5134,23 @@ class CatalogPlatformModel { }); } - /** @returns {DepartmentResponseSchema} */ - static DepartmentResponseSchema() { + /** @returns {DepartmentResponse} */ + static DepartmentResponse() { return Joi.object({ items: Joi.array().items(CatalogPlatformModel.Department()), }); } - /** @returns {DepartmentsResponseSchema} */ - static DepartmentsResponseSchema() { + /** @returns {DepartmentsResponse} */ + static DepartmentsResponse() { return Joi.object({ items: Joi.array().items(CatalogPlatformModel.GetDepartment()), page: CatalogPlatformModel.Page(), }); } - /** @returns {DimensionResponseSchema} */ - static DimensionResponseSchema() { + /** @returns {DimensionResponse} */ + static DimensionResponse() { return Joi.object({ height: Joi.number().required(), is_default: Joi.boolean().required(), @@ -6154,8 +5160,8 @@ class CatalogPlatformModel { }); } - /** @returns {InventoryDimensionResponseSchema} */ - static InventoryDimensionResponseSchema() { + /** @returns {InventoryDimensionResponse} */ + static InventoryDimensionResponse() { return Joi.object({ height: Joi.number(), length: Joi.number(), @@ -6187,13 +5193,13 @@ class CatalogPlatformModel { }); } - /** @returns {ErrorResponseSchema} */ - static ErrorResponseSchema() { + /** @returns {ErrorResponse} */ + static ErrorResponse() { return Joi.object({ - code: Joi.number(), + code: Joi.string().allow(""), error: Joi.string().allow(""), message: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), status: Joi.number(), }); } @@ -6209,22 +5215,23 @@ class CatalogPlatformModel { /** @returns {RawProduct} */ static RawProduct() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), all_company_ids: Joi.array().items(Joi.number()), all_identifiers: Joi.array().items(Joi.string().allow("")), - all_sizes: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), - attributes: Joi.object().pattern(/\S/, Joi.any()), + all_sizes: Joi.array().items(Joi.any()), + attributes: Joi.any(), brand: CatalogPlatformModel.Brand(), brand_uid: Joi.number(), - category: Joi.object().pattern(/\S/, Joi.any()), + category: Joi.any(), category_slug: Joi.string().allow(""), category_uid: Joi.number(), + color: Joi.string().allow(""), company_id: Joi.number(), country_of_origin: Joi.string().allow(""), - created_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), created_on: Joi.string().allow(""), currency: Joi.string().allow(""), - custom_order: Joi.object().pattern(/\S/, Joi.any()), + custom_order: Joi.any(), departments: Joi.array().items(Joi.number()), description: Joi.string().allow(""), highlights: Joi.array().items(Joi.string().allow("")), @@ -6242,41 +5249,40 @@ class CatalogPlatformModel { item_type: Joi.string().allow(""), l3_mapping: Joi.array().items(Joi.string().allow("")), media: Joi.array().items(CatalogPlatformModel.Media()), - modified_by: Joi.object().pattern(/\S/, Joi.any()), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), - moq: Joi.object().pattern(/\S/, Joi.any()), + moq: Joi.any(), multi_size: Joi.boolean(), name: Joi.string().allow(""), - net_quantity: CatalogPlatformModel.NetQuantityResponseSchema(), + net_quantity: CatalogPlatformModel.NetQuantityResponse(), no_of_boxes: Joi.number(), pending: Joi.string().allow(""), primary_color: Joi.string().allow(""), product_group_tag: Joi.array().items(Joi.string().allow("")), product_publish: CatalogPlatformModel.ProductPublished(), - return_config: CatalogPlatformModel.ReturnConfigResponseSchema(), + return_config: CatalogPlatformModel.ReturnConfigResponse(), short_description: Joi.string().allow(""), size_guide: Joi.string().allow(""), - sizes: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + sizes: Joi.array().items(Joi.any()), slug: Joi.string().allow(""), stage: Joi.string().allow(""), tags: Joi.array().items(Joi.string().allow("")), - tax_identifier: CatalogPlatformModel.TaxIdentifier(), - teaser_tag: Joi.object().pattern(/\S/, Joi.any()), + tax_identifier: Joi.any(), + teaser_tag: Joi.any(), template_tag: Joi.string().allow(""), trader: Joi.array().items(CatalogPlatformModel.Trader()), uid: Joi.number(), - variant_group: Joi.object().pattern(/\S/, Joi.any()), - variant_media: Joi.object().pattern(/\S/, Joi.any()), - variants: Joi.object().pattern(/\S/, Joi.any()), + variant_group: Joi.any(), + variant_media: Joi.any(), + variants: Joi.any(), verified_by: CatalogPlatformModel.VerifiedBy(), verified_on: Joi.string().allow(""), store_id_list: Joi.array().items(Joi.string().allow("")), - action: Joi.string().allow(""), }); } - /** @returns {RawProductListingResponseSchema} */ - static RawProductListingResponseSchema() { + /** @returns {RawProductListingResponse} */ + static RawProductListingResponse() { return Joi.object({ items: Joi.array().items(CatalogPlatformModel.RawProduct()), page: CatalogPlatformModel.Page(), @@ -6295,11 +5301,12 @@ class CatalogPlatformModel { /** @returns {AttributeDetail} */ static AttributeDetail() { return Joi.object({ - _id: Joi.array().items(Joi.string().allow("")), + departments: Joi.array().items(Joi.string().allow("")), description: Joi.string().allow(""), details: CatalogPlatformModel.AttributeMasterDetails(), enabled_for_end_consumer: Joi.boolean(), filters: CatalogPlatformModel.AttributeMasterFilter(), + id: Joi.string().allow(""), is_nested: Joi.boolean(), logo: Joi.string().allow(""), meta: CatalogPlatformModel.AttributeMasterMeta(), @@ -6309,31 +5316,8 @@ class CatalogPlatformModel { }); } - /** @returns {LatLong} */ - static LatLong() { - return Joi.object({ - type: Joi.string().allow("").required(), - coordinates: Joi.array().items(Joi.number()).required(), - }); - } - - /** @returns {ApplicationLocationAddressSchema} */ - static ApplicationLocationAddressSchema() { - return Joi.object({ - address1: Joi.string().allow(""), - address2: Joi.string().allow(""), - pincode: Joi.number(), - city: Joi.string().allow(""), - country: Joi.string().allow(""), - state: Joi.string().allow(""), - lat_long: CatalogPlatformModel.LatLong(), - country_code: Joi.string().allow(""), - address_meta: Joi.object().pattern(/\S/, Joi.any()), - }); - } - - /** @returns {GetAddressSchema} */ - static GetAddressSchema() { + /** @returns {GetAddressSerializer} */ + static GetAddressSerializer() { return Joi.object({ address1: Joi.string().allow(""), address2: Joi.string().allow(""), @@ -6375,16 +5359,16 @@ class CatalogPlatformModel { /** @returns {GetAutocompleteWordsData} */ static GetAutocompleteWordsData() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), app_id: Joi.string().allow(""), - results: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + results: Joi.array().items(Joi.any()), uid: Joi.string().allow(""), words: Joi.array().items(Joi.string().allow("")), }); } - /** @returns {GetAutocompleteWordsResponseSchema} */ - static GetAutocompleteWordsResponseSchema() { + /** @returns {GetAutocompleteWordsResponse} */ + static GetAutocompleteWordsResponse() { return Joi.object({ items: Joi.array().items(CatalogPlatformModel.GetAutocompleteWordsData()), page: CatalogPlatformModel.Page(), @@ -6394,25 +5378,25 @@ class CatalogPlatformModel { /** @returns {GetCatalogConfigurationDetailsProduct} */ static GetCatalogConfigurationDetailsProduct() { return Joi.object({ - compare: Joi.object().pattern(/\S/, Joi.any()), - detail: Joi.object().pattern(/\S/, Joi.any()), - similar: Joi.object().pattern(/\S/, Joi.any()), - variant: Joi.object().pattern(/\S/, Joi.any()), + compare: Joi.any(), + detail: Joi.any(), + similar: Joi.any(), + variant: Joi.any(), }); } /** @returns {GetCatalogConfigurationDetailsSchemaListing} */ static GetCatalogConfigurationDetailsSchemaListing() { return Joi.object({ - filter: Joi.object().pattern(/\S/, Joi.any()), - sort: Joi.object().pattern(/\S/, Joi.any()), + filter: Joi.any(), + sort: Joi.any(), }); } /** @returns {GetCatalogConfigurationMetaData} */ static GetCatalogConfigurationMetaData() { return Joi.object({ - listing: CatalogPlatformModel.MetaDataListingResponseSchema(), + listing: CatalogPlatformModel.MetaDataListingResponse(), product: CatalogPlatformModel.GetCatalogConfigurationDetailsProduct(), }); } @@ -6427,11 +5411,10 @@ class CatalogPlatformModel { app_id: Joi.string().allow(""), badge: CatalogPlatformModel.CollectionBadge(), banners: CatalogPlatformModel.ImageUrls(), - cron: Joi.object().pattern(/\S/, Joi.any()), description: Joi.string().allow(""), is_active: Joi.boolean(), logo: CatalogPlatformModel.Media(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), name: Joi.string().allow(""), priority: Joi.number(), query: Joi.array().items(CatalogPlatformModel.CollectionQuery()), @@ -6444,27 +5427,25 @@ class CatalogPlatformModel { published: Joi.boolean(), tags: Joi.array().items(Joi.string().allow("")), sort_on: Joi.string().allow(""), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - _locale_language: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), + _locale_language: Joi.any(), seo: CatalogPlatformModel.SeoDetail(), is_visible: Joi.boolean(), }); } - /** @returns {GetCollectionItemsResponseSchema} */ - static GetCollectionItemsResponseSchema() { + /** @returns {GetCollectionItemsResponse} */ + static GetCollectionItemsResponse() { return Joi.object({ filters: Joi.array().items(CatalogPlatformModel.ProductFilters()), - items: Joi.array().items( - CatalogPlatformModel.ApplicationProductsSchema() - ), + items: Joi.array().items(CatalogPlatformModel.ProductListingDetail()), page: CatalogPlatformModel.Page(), sort_on: Joi.array().items(CatalogPlatformModel.ProductSortOn()), }); } - /** @returns {GetCollectionListingResponseSchema} */ - static GetCollectionListingResponseSchema() { + /** @returns {GetCollectionListingResponse} */ + static GetCollectionListingResponse() { return Joi.object({ filters: CatalogPlatformModel.CollectionListingFilter(), items: Joi.array().items(CatalogPlatformModel.GetCollectionDetailNest()), @@ -6472,30 +5453,30 @@ class CatalogPlatformModel { }); } - /** @returns {GetCollectionQueryOptionResponseSchema} */ - static GetCollectionQueryOptionResponseSchema() { + /** @returns {GetCollectionQueryOptionResponse} */ + static GetCollectionQueryOptionResponse() { return Joi.object({ filters: Joi.array().items(CatalogPlatformModel.ProductFilters()), - operators: Joi.object().pattern(/\S/, Joi.any()).required(), + operators: Joi.object().pattern(/\S/, Joi.string().allow("")).required(), sort_on: Joi.array().items(CatalogPlatformModel.ProductSortOn()), }); } - /** @returns {GetCompanySchema} */ - static GetCompanySchema() { + /** @returns {GetCompanySerializer} */ + static GetCompanySerializer() { return Joi.object({ - addresses: Joi.array().items(CatalogPlatformModel.GetAddressSchema()), + addresses: Joi.array().items(CatalogPlatformModel.GetAddressSerializer()), business_type: Joi.string().allow(""), company_type: Joi.string().allow(""), - created_by: CatalogPlatformModel.UserSchema(), + created_by: CatalogPlatformModel.UserSerializer2(), created_on: Joi.string().allow(""), - modified_by: CatalogPlatformModel.UserSchema(), + modified_by: CatalogPlatformModel.UserSerializer2(), modified_on: Joi.string().allow(""), name: Joi.string().allow(""), reject_reason: Joi.string().allow(""), stage: Joi.string().allow(""), uid: Joi.number(), - verified_by: CatalogPlatformModel.UserSchema(), + verified_by: CatalogPlatformModel.UserSerializer2(), verified_on: Joi.string().allow(""), }); } @@ -6534,8 +5515,8 @@ class CatalogPlatformModel { }); } - /** @returns {GetConfigMetadataResponseSchema} */ - static GetConfigMetadataResponseSchema() { + /** @returns {GetConfigMetadataResponse} */ + static GetConfigMetadataResponse() { return Joi.object({ condition: Joi.array().items(CatalogPlatformModel.ConditionItem()), data: Joi.array().items(CatalogPlatformModel.DataItem()).required(), @@ -6552,56 +5533,31 @@ class CatalogPlatformModel { }); } - /** @returns {GetConfigResponseSchema} */ - static GetConfigResponseSchema() { + /** @returns {GetConfigResponse} */ + static GetConfigResponse() { return Joi.object({ - data: Joi.array().items(CatalogPlatformModel.ConfigItem()).required(), + data: Joi.array().items(Joi.any()).required(), page: CatalogPlatformModel.PageResponseType().required(), }); } - /** @returns {ConfigItem} */ - static ConfigItem() { - return Joi.object({ - app_id: Joi.string().allow(""), - attributes: Joi.array().items(CatalogPlatformModel.AttributeConfig()), - id: Joi.string().allow(""), - is_active: Joi.boolean(), - is_default: Joi.boolean(), - name: Joi.string().allow(""), - priority: Joi.number(), - slug: Joi.string().allow(""), - template_slugs: Joi.array().items(Joi.string().allow("")), - }); - } - - /** @returns {AttributeConfig} */ - static AttributeConfig() { - return Joi.object({ - display_type: Joi.string().allow(""), - is_active: Joi.boolean(), - key: Joi.string().allow(""), - name: Joi.string().allow(""), - priority: Joi.number(), - slug: Joi.string().allow(""), - }); - } - /** @returns {GetDepartment} */ static GetDepartment() { return Joi.object({ - created_by: CatalogPlatformModel.RequestUserSchema(), + created_by: CatalogPlatformModel.RequestUserSerializer(), created_on: Joi.string().allow(""), is_active: Joi.boolean(), item_type: Joi.string().allow(""), logo: Joi.string().allow(""), - modified_by: CatalogPlatformModel.RequestUserSchema(), + modified_by: CatalogPlatformModel.RequestUserSerializer(), modified_on: Joi.string().allow(""), - id: Joi.string().allow(""), name: Joi.string().allow(""), + page_no: Joi.number(), + page_size: Joi.number(), + priority_order: Joi.number(), + search: Joi.string().allow(""), slug: Joi.string().allow(""), synonyms: Joi.array().items(Joi.string().allow("")), - priority_order: Joi.number(), uid: Joi.number(), }); } @@ -6612,75 +5568,76 @@ class CatalogPlatformModel { brand: CatalogPlatformModel.InventoryBrandMeta(), company: CatalogPlatformModel.InventoryCompanyMeta(), country_of_origin: Joi.string().allow(""), - created_by: CatalogPlatformModel.RequestUserSchema(), + created_by: CatalogPlatformModel.RequestUserSerializer(), date_meta: CatalogPlatformModel.DateMeta(), - dimension: CatalogPlatformModel.InventoryDimensionResponseSchema(), + dimension: CatalogPlatformModel.InventoryDimensionResponse(), expiration_date: Joi.string().allow(""), id: Joi.string().allow(""), - identifier: CatalogPlatformModel.Identifier(), + identifier: Joi.any(), inventory_updated_on: Joi.string().allow(""), is_set: Joi.boolean(), item_id: Joi.number(), - manufacturer: CatalogPlatformModel.InventoryManufacturerResponseSchema(), - modified_by: CatalogPlatformModel.RequestUserSchema(), - platforms: Joi.object().pattern(/\S/, Joi.any()), + manufacturer: CatalogPlatformModel.InventoryManufacturerResponse(), + modified_by: CatalogPlatformModel.RequestUserSerializer(), + platforms: Joi.any(), price: CatalogPlatformModel.PriceArticle(), quantities: CatalogPlatformModel.QuantitiesArticle(), return_config: CatalogPlatformModel.ReturnConfig(), seller_identifier: Joi.string().allow(""), size: Joi.string().allow(""), stage: Joi.string().allow(""), - store: CatalogPlatformModel.ArticleStoreResponseSchema(), + store: CatalogPlatformModel.ArticleStoreResponse(), tags: Joi.array().items(Joi.string().allow("")), - tax_identifier: CatalogPlatformModel.TaxIdentifier(), + tax_identifier: Joi.any(), total_quantity: Joi.number(), trace_id: Joi.string().allow(""), track_inventory: Joi.boolean(), - trader: Joi.array().items(CatalogPlatformModel.TraderResponseSchema()), + trader: Joi.array().items(CatalogPlatformModel.TraderResponse()), uid: Joi.string().allow(""), - weight: CatalogPlatformModel.InventoryWeightResponseSchema(), + weight: CatalogPlatformModel.InventoryWeightResponse(), }); } - /** @returns {GetInventoriesResponseSchema} */ - static GetInventoriesResponseSchema() { + /** @returns {GetInventoriesResponse} */ + static GetInventoriesResponse() { return Joi.object({ items: Joi.array().items(CatalogPlatformModel.GetInventories()), page: CatalogPlatformModel.Page(), }); } - /** @returns {GetLocationSchema} */ - static GetLocationSchema() { + /** @returns {GetLocationSerializer} */ + static GetLocationSerializer() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - address: CatalogPlatformModel.GetAddressSchema().required(), - store_code: Joi.string().allow("").required(), - company: CatalogPlatformModel.GetCompanySchema(), + _custom_json: Joi.any(), + address: CatalogPlatformModel.GetAddressSerializer().required(), + code: Joi.string().allow("").required(), + company: CatalogPlatformModel.GetCompanySerializer(), contact_numbers: Joi.array().items( CatalogPlatformModel.SellerPhoneNumber() ), - created_by: CatalogPlatformModel.UserSchema(), + created_by: CatalogPlatformModel.UserSerializer3(), created_on: Joi.string().allow(""), display_name: Joi.string().allow("").required(), documents: Joi.array().items(CatalogPlatformModel.Document()), - gst_credentials: CatalogPlatformModel.InvoiceDetailsSchema(), + gst_credentials: CatalogPlatformModel.InvoiceDetailsSerializer(), integration_type: CatalogPlatformModel.LocationIntegrationType(), - manager: CatalogPlatformModel.LocationManagerSchema(), - modified_by: CatalogPlatformModel.UserSchema(), + manager: CatalogPlatformModel.LocationManagerSerializer(), + modified_by: CatalogPlatformModel.UserSerializer3(), modified_on: Joi.string().allow(""), name: Joi.string().allow("").required(), notification_emails: Joi.array().items(Joi.string().allow("")), phone_number: Joi.string().allow("").required(), - product_return_config: CatalogPlatformModel.ProductReturnConfigSchema(), + product_return_config: CatalogPlatformModel.ProductReturnConfigSerializer(), stage: Joi.string().allow(""), store_type: Joi.string().allow(""), - timing: Joi.array().items(CatalogPlatformModel.LocationDayWiseSchema()), + timing: Joi.array().items( + CatalogPlatformModel.LocationDayWiseSerializer() + ), uid: Joi.number(), - verified_by: CatalogPlatformModel.UserSchema(), + verified_by: CatalogPlatformModel.UserSerializer3(), verified_on: Joi.string().allow(""), - warnings: Joi.object().pattern(/\S/, Joi.any()), - company_id: Joi.number(), + warnings: Joi.any(), }); } @@ -6692,18 +5649,18 @@ class CatalogPlatformModel { }); } - /** @returns {GetProductBundleCreateResponseSchema} */ - static GetProductBundleCreateResponseSchema() { + /** @returns {GetProductBundleCreateResponse} */ + static GetProductBundleCreateResponse() { return Joi.object({ choice: Joi.string().allow("").required(), company_id: Joi.number(), - created_by: CatalogPlatformModel.CreatedBy(), + created_by: Joi.any(), created_on: Joi.string().allow(""), id: Joi.string().allow(""), is_active: Joi.boolean().required(), logo: Joi.string().allow("").allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()), - modified_by: CatalogPlatformModel.ModifiedBy(), + meta: Joi.any(), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), name: Joi.string().allow("").required(), page_visibility: Joi.array().items(Joi.string().allow("")), @@ -6715,24 +5672,24 @@ class CatalogPlatformModel { }); } - /** @returns {GetProductBundleListingResponseSchema} */ - static GetProductBundleListingResponseSchema() { + /** @returns {GetProductBundleListingResponse} */ + static GetProductBundleListingResponse() { return Joi.object({ items: Joi.array().items( - CatalogPlatformModel.GetProductBundleCreateResponseSchema() + CatalogPlatformModel.GetProductBundleCreateResponse() ), page: CatalogPlatformModel.Page(), }); } - /** @returns {GetProductBundleResponseSchema} */ - static GetProductBundleResponseSchema() { + /** @returns {GetProductBundleResponse} */ + static GetProductBundleResponse() { return Joi.object({ choice: Joi.string().allow(""), company_id: Joi.number(), is_active: Joi.boolean(), logo: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), name: Joi.string().allow(""), page_visibility: Joi.array().items(Joi.string().allow("")), products: Joi.array().items(CatalogPlatformModel.GetProducts()), @@ -6749,34 +5706,20 @@ class CatalogPlatformModel { auto_select: Joi.boolean(), max_quantity: Joi.number(), min_quantity: Joi.number(), - product_uid: Joi.number(), - product_details: CatalogPlatformModel.ProductDetails(), - }); - } - - /** @returns {ProductDetails} */ - static ProductDetails() { - return Joi.object({ - slug: Joi.string().allow(""), - quantity: Joi.number(), - attributes: Joi.object().pattern(/\S/, Joi.any()), price: CatalogPlatformModel.Price(), - images: Joi.array().items(Joi.string().allow("")), - uid: Joi.number(), - item_code: Joi.string().allow(""), - identifier: Joi.object().pattern(/\S/, Joi.any()), - sizes: Joi.array().items(Joi.string().allow("")), - country_of_origin: Joi.string().allow(""), + product_details: CatalogPlatformModel.LimitedProductData(), + product_uid: Joi.number(), + sizes: Joi.array().items(CatalogPlatformModel.Size()), }); } - /** @returns {GetCollectionDetailResponseSchema} */ - static GetCollectionDetailResponseSchema() { + /** @returns {GetCollectionDetailResponse} */ + static GetCollectionDetailResponse() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - _locale_language: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), + _locale_language: Joi.any(), _schedule: CatalogPlatformModel.CollectionSchedule(), - action: Joi.object().pattern(/\S/, Joi.any()), + action: Joi.any(), allow_facets: Joi.boolean(), allow_sort: Joi.boolean(), app_id: Joi.string().allow(""), @@ -6786,7 +5729,7 @@ class CatalogPlatformModel { is_active: Joi.boolean(), is_visible: Joi.boolean(), logo: CatalogPlatformModel.Media(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), name: Joi.string().allow(""), priority: Joi.number(), published: Joi.boolean(), @@ -6797,7 +5740,6 @@ class CatalogPlatformModel { tags: Joi.array().items(Joi.string().allow("")), type: Joi.string().allow(""), uid: Joi.string().allow(""), - _id: Joi.string().allow(""), visible_facets_keys: Joi.array().items(Joi.string().allow("")), }); } @@ -6809,8 +5751,8 @@ class CatalogPlatformModel { }); } - /** @returns {GetQueryFiltersKeysResponseSchema} */ - static GetQueryFiltersKeysResponseSchema() { + /** @returns {GetQueryFiltersKeysResponse} */ + static GetQueryFiltersKeysResponse() { return Joi.object({ filters: Joi.array().items(CatalogPlatformModel.ProductFiltersKeysOnly()), operators: Joi.object().pattern(/\S/, Joi.string().allow("")).required(), @@ -6818,16 +5760,12 @@ class CatalogPlatformModel { }); } - /** @returns {GetQueryFiltersResponseSchema} */ - static GetQueryFiltersResponseSchema() { + /** @returns {GetQueryFiltersResponse} */ + static GetQueryFiltersResponse() { return Joi.object({ - filters: Joi.array().items( - CatalogPlatformModel.CollectionProductFilters() - ), + filters: Joi.array().items(CatalogPlatformModel.ProductFilters()), operators: Joi.object().pattern(/\S/, Joi.string().allow("")).required(), - sort_on: Joi.array().items( - CatalogPlatformModel.CollectionProductSortOn() - ), + sort_on: Joi.array().items(CatalogPlatformModel.ProductSortOn()), }); } @@ -6901,15 +5839,15 @@ class CatalogPlatformModel { }); } - /** @returns {GetSearchConfigurationResponseSchema} */ - static GetSearchConfigurationResponseSchema() { + /** @returns {GetSearchConfigurationResponse} */ + static GetSearchConfigurationResponse() { return Joi.object({ application_id: Joi.string().allow("").required(), company_id: Joi.number().required(), - created_by: CatalogPlatformModel.UserSchema(), + created_by: CatalogPlatformModel.UserSerializer(), created_on: Joi.string().allow(""), is_proximity_enabled: Joi.boolean(), - modified_by: CatalogPlatformModel.UserSchema(), + modified_by: CatalogPlatformModel.UserSerializer(), modified_on: Joi.string().allow(""), proximity: Joi.number(), searchable_attributes: Joi.array().items( @@ -6921,25 +5859,25 @@ class CatalogPlatformModel { /** @returns {GetSearchWordsData} */ static GetSearchWordsData() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), app_id: Joi.string().allow(""), is_active: Joi.boolean(), - result: Joi.object().pattern(/\S/, Joi.any()), + result: Joi.any(), uid: Joi.string().allow(""), words: Joi.array().items(Joi.string().allow("")), }); } - /** @returns {GetSearchWordsDetailResponseSchema} */ - static GetSearchWordsDetailResponseSchema() { + /** @returns {GetSearchWordsDetailResponse} */ + static GetSearchWordsDetailResponse() { return Joi.object({ items: CatalogPlatformModel.GetSearchWordsData(), page: CatalogPlatformModel.Page(), }); } - /** @returns {GetSearchWordsResponseSchema} */ - static GetSearchWordsResponseSchema() { + /** @returns {GetSearchWordsResponse} */ + static GetSearchWordsResponse() { return Joi.object({ items: Joi.array().items(CatalogPlatformModel.GetSearchWordsData()), page: CatalogPlatformModel.Page(), @@ -6949,7 +5887,7 @@ class CatalogPlatformModel { /** @returns {GlobalValidation} */ static GlobalValidation() { return Joi.object({ - definitions: Joi.object().pattern(/\S/, Joi.any()), + definitions: Joi.any(), description: Joi.string().allow(""), properties: CatalogPlatformModel.Properties(), required: Joi.array().items(Joi.string().allow("")), @@ -6965,8 +5903,8 @@ class CatalogPlatformModel { }); } - /** @returns {HSNCodesResponseSchema} */ - static HSNCodesResponseSchema() { + /** @returns {HSNCodesResponse} */ + static HSNCodesResponse() { return Joi.object({ data: CatalogPlatformModel.HSNData(), message: Joi.string().allow(""), @@ -6977,23 +5915,7 @@ class CatalogPlatformModel { static HSNData() { return Joi.object({ country_of_origin: Joi.array().items(Joi.string().allow("")), - hsn_code: Joi.array().items(Joi.string().allow("")), - }); - } - - /** @returns {CreatedBySchema} */ - static CreatedBySchema() { - return Joi.object({ - user_id: Joi.string().allow("").required(), - username: Joi.string().allow("").required(), - }); - } - - /** @returns {ModifiedBySchema} */ - static ModifiedBySchema() { - return Joi.object({ - user_id: Joi.string().allow("").required(), - username: Joi.string().allow("").required(), + hsn_code: Joi.array().items(Joi.string().allow("")), }); } @@ -7001,15 +5923,14 @@ class CatalogPlatformModel { static HSNDataInsertV2() { return Joi.object({ country_code: Joi.string().allow("").required(), - created_by: CatalogPlatformModel.CreatedBySchema(), - modified_by: CatalogPlatformModel.ModifiedBySchema(), + created_by: Joi.any(), created_on: Joi.string().allow(""), description: Joi.string().allow("").required(), hsn_code: Joi.string().allow("").required(), hsn_code_id: Joi.string().allow(""), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), - reporting_hsn: Joi.any().required(), - id: Joi.string().allow(""), + reporting_hsn: Joi.string().allow("").required(), taxes: Joi.array().items(CatalogPlatformModel.TaxSlab()).required(), type: Joi.string().allow("").required(), }); @@ -7035,7 +5956,7 @@ class CatalogPlatformModel { static HsnCodesListingResponseSchemaV2() { return Joi.object({ items: Joi.array().items(CatalogPlatformModel.HSNDataInsertV2()), - page: CatalogPlatformModel.PageResponseSchema(), + page: CatalogPlatformModel.PageResponse(), }); } @@ -7060,7 +5981,7 @@ class CatalogPlatformModel { static HsnUpsert() { return Joi.object({ company_id: Joi.number().required(), - hs2_code: Joi.string().allow("").allow(null), + hs2_code: Joi.string().allow("").allow(null).required(), hsn_code: Joi.string().allow("").required(), is_active: Joi.boolean(), tax1: Joi.number().required(), @@ -7114,15 +6035,15 @@ class CatalogPlatformModel { }); } - /** @returns {InventoryBulkRequestSchema} */ - static InventoryBulkRequestSchema() { + /** @returns {InventoryBulkRequest} */ + static InventoryBulkRequest() { return Joi.object({ batch_id: Joi.string().allow("").required(), company_id: Joi.number().required(), sizes: Joi.array() .items(CatalogPlatformModel.InventoryJobPayload()) .required(), - user: Joi.object().pattern(/\S/, Joi.any()), + user: Joi.any(), }); } @@ -7134,8 +6055,8 @@ class CatalogPlatformModel { }); } - /** @returns {InventoryCreateRequestSchema} */ - static InventoryCreateRequestSchema() { + /** @returns {InventoryCreateRequest} */ + static InventoryCreateRequest() { return Joi.object({ data: Joi.array().items(Joi.string().allow("")), filters: CatalogPlatformModel.InventoryExportFilter().required(), @@ -7180,10 +6101,10 @@ class CatalogPlatformModel { }); } - /** @returns {InventoryExportJobListResponseSchema} */ - static InventoryExportJobListResponseSchema() { + /** @returns {InventoryExportJobListResponse} */ + static InventoryExportJobListResponse() { return Joi.object({ - items: CatalogPlatformModel.InventoryJobDetailResponseSchema().required(), + items: CatalogPlatformModel.InventoryJobDetailResponse().required(), page: CatalogPlatformModel.Page(), }); } @@ -7197,8 +6118,8 @@ class CatalogPlatformModel { }); } - /** @returns {InventoryExportRequestSchema} */ - static InventoryExportRequestSchema() { + /** @returns {InventoryExportRequest} */ + static InventoryExportRequest() { return Joi.object({ brand: Joi.array().items(Joi.number()), store: Joi.array().items(Joi.number()), @@ -7206,12 +6127,12 @@ class CatalogPlatformModel { }); } - /** @returns {InventoryExportResponseSchema} */ - static InventoryExportResponseSchema() { + /** @returns {InventoryExportResponse} */ + static InventoryExportResponse() { return Joi.object({ created_by: Joi.string().allow(""), created_on: Joi.string().allow(""), - filters: CatalogPlatformModel.Filters(), + filters: Joi.any(), modified_on: Joi.string().allow(""), notification_emails: Joi.array().items(Joi.string().allow("")), seller_id: Joi.number().required(), @@ -7229,8 +6150,8 @@ class CatalogPlatformModel { }); } - /** @returns {InventoryJobDetailResponseSchema} */ - static InventoryJobDetailResponseSchema() { + /** @returns {InventoryJobDetailResponse} */ + static InventoryJobDetailResponse() { return Joi.object({ cancelled_by: CatalogPlatformModel.UserDetail(), cancelled_on: Joi.string().allow(""), @@ -7243,7 +6164,6 @@ class CatalogPlatformModel { notification_emails: Joi.array().items(Joi.string().allow("")), seller_id: Joi.number().required(), status: Joi.string().allow(""), - stats: Joi.object().pattern(/\S/, Joi.any()), task_id: Joi.string().allow("").required(), type: Joi.string().allow("").allow(null), url: Joi.string().allow("").required(), @@ -7291,13 +6211,6 @@ class CatalogPlatformModel { }); } - /** @returns {AddInventoryRequestPayload} */ - static AddInventoryRequestPayload() { - return Joi.object({ - sizes: Joi.array().items(CatalogPlatformModel.InventoryResponseSchema()), - }); - } - /** @returns {InventoryPayload} */ static InventoryPayload() { return Joi.object({ @@ -7312,8 +6225,8 @@ class CatalogPlatformModel { }); } - /** @returns {InventoryRequestSchema} */ - static InventoryRequestSchema() { + /** @returns {InventoryRequest} */ + static InventoryRequest() { return Joi.object({ company_id: Joi.number().required(), item: CatalogPlatformModel.ItemQuery().required(), @@ -7325,16 +6238,16 @@ class CatalogPlatformModel { static InventoryRequestSchemaV2() { return Joi.object({ company_id: Joi.number().required(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), payload: Joi.array().items(CatalogPlatformModel.InventoryPayload()), }); } - /** @returns {InventoryResponseSchema} */ - static InventoryResponseSchema() { + /** @returns {InventoryResponse} */ + static InventoryResponse() { return Joi.object({ currency: Joi.string().allow(""), - identifiers: Joi.object().pattern(/\S/, Joi.any()), + identifiers: Joi.any(), inventory_updated_on: Joi.string().allow(""), item_id: Joi.number(), price: Joi.number(), @@ -7344,12 +6257,8 @@ class CatalogPlatformModel { sellable_quantity: Joi.number(), seller_identifier: Joi.string().allow(""), size: Joi.string().allow(""), - store: Joi.object().pattern(/\S/, Joi.any()), + store: Joi.any(), uid: Joi.string().allow(""), - created_by: Joi.object().pattern(/\S/, Joi.any()), - modified_by: Joi.object().pattern(/\S/, Joi.any()), - expiration_date: Joi.string().allow(""), - tags: Joi.array().items(Joi.string().allow("")), }); } @@ -7364,7 +6273,7 @@ class CatalogPlatformModel { /** @returns {InventoryResponsePaginated} */ static InventoryResponsePaginated() { return Joi.object({ - items: Joi.array().items(CatalogPlatformModel.InventoryResponseSchema()), + items: Joi.array().items(CatalogPlatformModel.InventoryResponse()), page: CatalogPlatformModel.Page(), }); } @@ -7372,112 +6281,50 @@ class CatalogPlatformModel { /** @returns {InventorySellerIdentifierResponsePaginated} */ static InventorySellerIdentifierResponsePaginated() { return Joi.object({ - items: Joi.array().items( - CatalogPlatformModel.InventorySellerResponseSchema() - ), - page: CatalogPlatformModel.Page(), - }); - } - - /** @returns {ApplicationInventorySellerIdentifierResponsePaginated} */ - static ApplicationInventorySellerIdentifierResponsePaginated() { - return Joi.object({ - items: Joi.array().items( - CatalogPlatformModel.InventorySellerResponseSchema() - ), + items: Joi.array().items(CatalogPlatformModel.InventorySellerResponse()), page: CatalogPlatformModel.Page(), }); } - /** @returns {InventorySellerResponseSchema} */ - static InventorySellerResponseSchema() { - return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - added_on_store: Joi.string().allow(""), - brand: CatalogPlatformModel.BrandMeta().required(), - company: CatalogPlatformModel.CompanyMeta().required(), - country_of_origin: Joi.string().allow("").required(), - created_by: Joi.string().allow("").allow(null), - dimension: CatalogPlatformModel.DimensionResponseSchema().required(), - expiration_date: Joi.string().allow(""), - fragile: Joi.boolean().required(), - fynd_article_code: Joi.string().allow("").required(), - fynd_item_code: Joi.string().allow("").required(), - fynd_meta: Joi.object().pattern(/\S/, Joi.any()), - identifier: Joi.object().pattern(/\S/, Joi.any()).required(), - is_active: Joi.boolean(), - is_set: Joi.boolean(), - item_id: Joi.number().required(), - manufacturer: CatalogPlatformModel.ManufacturerResponseSchema().required(), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - modified_by: Joi.string().allow("").allow(null), - price: CatalogPlatformModel.PriceMeta().required(), - quantities: CatalogPlatformModel.Quantities(), - raw_meta: Joi.object().pattern(/\S/, Joi.any()), - return_config: CatalogPlatformModel.InventoryReturnConfig(), - seller_identifier: Joi.string().allow("").required(), - set: CatalogPlatformModel.InventorySet(), - size: Joi.string().allow("").required(), - stage: Joi.string().allow(""), - store: CatalogPlatformModel.StoreMeta().required(), - tags: Joi.array().items(Joi.string().allow("")).allow(null, ""), - tax_identifier: CatalogPlatformModel.TaxIdentifier(), - total_quantity: Joi.number().required(), - trace_id: Joi.string().allow(""), - track_inventory: Joi.boolean(), - trader: Joi.array().items(CatalogPlatformModel.Trader()).allow(null, ""), - uid: Joi.string().allow("").required(), - weight: CatalogPlatformModel.WeightResponseSchema().required(), - }); - } - - /** @returns {ApplicationInventorySellerResponseSchema} */ - static ApplicationInventorySellerResponseSchema() { + /** @returns {InventorySellerResponse} */ + static InventorySellerResponse() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), added_on_store: Joi.string().allow(""), brand: CatalogPlatformModel.BrandMeta().required(), company: CatalogPlatformModel.CompanyMeta().required(), country_of_origin: Joi.string().allow("").required(), created_by: Joi.string().allow("").allow(null), - dimension: CatalogPlatformModel.DimensionResponseSchema().required(), + dimension: CatalogPlatformModel.DimensionResponse().required(), expiration_date: Joi.string().allow(""), fragile: Joi.boolean().required(), fynd_article_code: Joi.string().allow("").required(), fynd_item_code: Joi.string().allow("").required(), - fynd_meta: Joi.object().pattern(/\S/, Joi.any()), - identifier: Joi.object().pattern(/\S/, Joi.any()).required(), + fynd_meta: Joi.any(), + identifier: Joi.any().required(), is_active: Joi.boolean(), is_set: Joi.boolean(), item_id: Joi.number().required(), - manufacturer: CatalogPlatformModel.ManufacturerResponseSchema().required(), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + manufacturer: CatalogPlatformModel.ManufacturerResponse().required(), + meta: Joi.any().allow(null), modified_by: Joi.string().allow("").allow(null), price: CatalogPlatformModel.PriceMeta().required(), quantities: CatalogPlatformModel.Quantities(), - raw_meta: Joi.object().pattern(/\S/, Joi.any()), - return_config: CatalogPlatformModel.InventoryReturnConfig(), + raw_meta: Joi.any(), + return_config: CatalogPlatformModel.ReturnConfig1(), seller_identifier: Joi.string().allow("").required(), set: CatalogPlatformModel.InventorySet(), size: Joi.string().allow("").required(), stage: Joi.string().allow(""), store: CatalogPlatformModel.StoreMeta().required(), tags: Joi.array().items(Joi.string().allow("")).allow(null, ""), - tax_identifier: CatalogPlatformModel.TaxIdentifier(), + tax_identifier: Joi.any(), total_quantity: Joi.number().required(), trace_id: Joi.string().allow(""), track_inventory: Joi.boolean(), - trader: Joi.array().items(CatalogPlatformModel.Trader()).allow(null, ""), + trader: Joi.array().items(CatalogPlatformModel.Trader1()).allow(null, ""), uid: Joi.string().allow("").required(), - weight: CatalogPlatformModel.WeightResponseSchema().required(), - date_meta: CatalogPlatformModel.DateMeta(), - platforms: Joi.object().pattern(/\S/, Joi.any()), - price_marked: Joi.number(), - price_effective: Joi.number(), - currency: Joi.string().allow(""), - price_selling: Joi.number(), - discount_meta: Joi.object().pattern(/\S/, Joi.any()), - discount_applied: Joi.object().pattern(/\S/, Joi.any()), + weight: CatalogPlatformModel.WeightResponse().required(), }); } @@ -7490,33 +6337,32 @@ class CatalogPlatformModel { }); } - /** @returns {InventoryStockResponseSchema} */ - static InventoryStockResponseSchema() { + /** @returns {InventoryStockResponse} */ + static InventoryStockResponse() { return Joi.object({ - items: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + items: Joi.array().items(Joi.any()), page: CatalogPlatformModel.InventoryPage().required(), }); } - /** @returns {InventoryUpdateResponseSchema} */ - static InventoryUpdateResponseSchema() { + /** @returns {InventoryUpdateResponse} */ + static InventoryUpdateResponse() { return Joi.object({ items: Joi.array().items(CatalogPlatformModel.InventoryResponseItem()), message: Joi.string().allow("").required(), - success: Joi.boolean(), }); } - /** @returns {InventoryValidationResponseSchema} */ - static InventoryValidationResponseSchema() { + /** @returns {InventoryValidationResponse} */ + static InventoryValidationResponse() { return Joi.object({ - data: Joi.object().pattern(/\S/, Joi.any()), + data: Joi.any(), message: Joi.string().allow(""), }); } - /** @returns {InvoiceCredSchema} */ - static InvoiceCredSchema() { + /** @returns {InvoiceCredSerializer} */ + static InvoiceCredSerializer() { return Joi.object({ enabled: Joi.boolean(), password: Joi.string().allow(""), @@ -7524,11 +6370,11 @@ class CatalogPlatformModel { }); } - /** @returns {InvoiceDetailsSchema} */ - static InvoiceDetailsSchema() { + /** @returns {InvoiceDetailsSerializer} */ + static InvoiceDetailsSerializer() { return Joi.object({ - e_invoice: CatalogPlatformModel.InvoiceCredSchema(), - e_waybill: CatalogPlatformModel.InvoiceCredSchema(), + e_invoice: CatalogPlatformModel.InvoiceCredSerializer(), + e_waybill: CatalogPlatformModel.InvoiceCredSerializer(), }); } @@ -7567,13 +6413,13 @@ class CatalogPlatformModel { /** @returns {LimitedProductData} */ static LimitedProductData() { return Joi.object({ - attributes: Joi.object().pattern(/\S/, Joi.any()), + attributes: Joi.any(), country_of_origin: Joi.string().allow(""), - identifier: Joi.object().pattern(/\S/, Joi.any()), + identifier: Joi.any(), images: Joi.array().items(Joi.string().allow("")), item_code: Joi.string().allow(""), name: Joi.string().allow(""), - price: Joi.object().pattern(/\S/, Joi.any()), + price: Joi.any(), quantity: Joi.number(), short_description: Joi.string().allow(""), sizes: Joi.array().items(Joi.string().allow("")), @@ -7582,41 +6428,20 @@ class CatalogPlatformModel { }); } - /** @returns {SizeGuideItem} */ - static SizeGuideItem() { - return Joi.object({ - active: Joi.boolean(), - brand_id: Joi.number(), - company_id: Joi.number(), - created_by: CatalogPlatformModel.CreatedBySchema(), - created_on: Joi.string().allow(""), - guide: CatalogPlatformModel.Guide(), - id: Joi.string().allow(""), - modified_by: CatalogPlatformModel.ModifiedBySchema(), - modified_on: Joi.string().allow(""), - name: Joi.string().allow(""), - subtitle: Joi.string().allow(""), - tag: Joi.string().allow(""), - title: Joi.string().allow(""), - description: Joi.string().allow(""), - image: Joi.string().allow(""), - }); - } - /** @returns {ListSizeGuide} */ static ListSizeGuide() { return Joi.object({ - items: Joi.array().items(CatalogPlatformModel.SizeGuideItem()), - page: CatalogPlatformModel.PageResponseSchema(), + items: Joi.array().items(Joi.any()), + page: Joi.any(), }); } - /** @returns {LocationDayWiseSchema} */ - static LocationDayWiseSchema() { + /** @returns {LocationDayWiseSerializer} */ + static LocationDayWiseSerializer() { return Joi.object({ - closing: CatalogPlatformModel.LocationTimingSchema(), + closing: CatalogPlatformModel.LocationTimingSerializer(), open: Joi.boolean().required(), - opening: CatalogPlatformModel.LocationTimingSchema(), + opening: CatalogPlatformModel.LocationTimingSerializer(), weekday: Joi.string().allow("").required(), }); } @@ -7629,16 +6454,16 @@ class CatalogPlatformModel { }); } - /** @returns {LocationListSchema} */ - static LocationListSchema() { + /** @returns {LocationListSerializer} */ + static LocationListSerializer() { return Joi.object({ - items: Joi.array().items(CatalogPlatformModel.GetLocationSchema()), + items: Joi.array().items(CatalogPlatformModel.GetLocationSerializer()), page: CatalogPlatformModel.Page(), }); } - /** @returns {LocationManagerSchema} */ - static LocationManagerSchema() { + /** @returns {LocationManagerSerializer} */ + static LocationManagerSerializer() { return Joi.object({ email: Joi.string().allow(""), mobile_no: CatalogPlatformModel.SellerPhoneNumber().required(), @@ -7646,8 +6471,8 @@ class CatalogPlatformModel { }); } - /** @returns {LocationTimingSchema} */ - static LocationTimingSchema() { + /** @returns {LocationTimingSerializer} */ + static LocationTimingSerializer() { return Joi.object({ hour: Joi.number(), minute: Joi.number(), @@ -7673,8 +6498,8 @@ class CatalogPlatformModel { }); } - /** @returns {ManufacturerResponseSchema} */ - static ManufacturerResponseSchema() { + /** @returns {ManufacturerResponse} */ + static ManufacturerResponse() { return Joi.object({ address: Joi.string().allow("").required(), is_default: Joi.boolean().required(), @@ -7682,8 +6507,8 @@ class CatalogPlatformModel { }); } - /** @returns {InventoryManufacturerResponseSchema} */ - static InventoryManufacturerResponseSchema() { + /** @returns {InventoryManufacturerResponse} */ + static InventoryManufacturerResponse() { return Joi.object({ address: Joi.string().allow(""), is_default: Joi.boolean(), @@ -7694,11 +6519,9 @@ class CatalogPlatformModel { /** @returns {Media} */ static Media() { return Joi.object({ - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), type: Joi.string().allow(""), url: Joi.string().allow("").required(), - alt: Joi.string().allow(""), - thumbnail: Joi.string().allow(""), }); } @@ -7711,8 +6534,8 @@ class CatalogPlatformModel { }); } - /** @returns {DepartmentMedia} */ - static DepartmentMedia() { + /** @returns {Media2} */ + static Media2() { return Joi.object({ aspect_ratio: Joi.string().allow(""), type: Joi.string().allow(""), @@ -7732,52 +6555,52 @@ class CatalogPlatformModel { /** @returns {Meta} */ static Meta() { return Joi.object({ - headers: Joi.object().pattern(/\S/, Joi.any()), + headers: Joi.any(), unit: Joi.string().allow(""), - values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + values: Joi.array().items(Joi.any()), }); } - /** @returns {MetaDataListingFilterMetaResponseSchema} */ - static MetaDataListingFilterMetaResponseSchema() { + /** @returns {MetaDataListingFilterMetaResponse} */ + static MetaDataListingFilterMetaResponse() { return Joi.object({ display: Joi.string().allow(""), filter_types: Joi.array().items(Joi.string().allow("")), key: Joi.string().allow(""), - units: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + units: Joi.array().items(Joi.any()), }); } - /** @returns {MetaDataListingFilterResponseSchema} */ - static MetaDataListingFilterResponseSchema() { + /** @returns {MetaDataListingFilterResponse} */ + static MetaDataListingFilterResponse() { return Joi.object({ data: Joi.array().items( - CatalogPlatformModel.MetaDataListingFilterMetaResponseSchema() + CatalogPlatformModel.MetaDataListingFilterMetaResponse() ), }); } - /** @returns {MetaDataListingResponseSchema} */ - static MetaDataListingResponseSchema() { + /** @returns {MetaDataListingResponse} */ + static MetaDataListingResponse() { return Joi.object({ - filter: CatalogPlatformModel.MetaDataListingFilterResponseSchema().required(), - sort: CatalogPlatformModel.MetaDataListingSortResponseSchema().required(), + filter: CatalogPlatformModel.MetaDataListingFilterResponse().required(), + sort: CatalogPlatformModel.MetaDataListingSortResponse().required(), }); } - /** @returns {MetaDataListingSortMetaResponseSchema} */ - static MetaDataListingSortMetaResponseSchema() { + /** @returns {MetaDataListingSortMetaResponse} */ + static MetaDataListingSortMetaResponse() { return Joi.object({ display: Joi.string().allow(""), key: Joi.string().allow(""), }); } - /** @returns {MetaDataListingSortResponseSchema} */ - static MetaDataListingSortResponseSchema() { + /** @returns {MetaDataListingSortResponse} */ + static MetaDataListingSortResponse() { return Joi.object({ data: Joi.array().items( - CatalogPlatformModel.MetaDataListingSortMetaResponseSchema() + CatalogPlatformModel.MetaDataListingSortMetaResponse() ), }); } @@ -7798,8 +6621,8 @@ class CatalogPlatformModel { }); } - /** @returns {NetQuantityResponseSchema} */ - static NetQuantityResponseSchema() { + /** @returns {NetQuantityResponse} */ + static NetQuantityResponse() { return Joi.object({ unit: Joi.string().allow(""), value: Joi.number(), @@ -7814,8 +6637,8 @@ class CatalogPlatformModel { }); } - /** @returns {OptInPostRequestSchema} */ - static OptInPostRequestSchema() { + /** @returns {OptInPostRequest} */ + static OptInPostRequest() { return Joi.object({ brand_ids: Joi.array().items(Joi.number()), company_id: Joi.number(), @@ -7861,26 +6684,26 @@ class CatalogPlatformModel { }); } - /** @returns {OwnerAppItemResponseSchema} */ - static OwnerAppItemResponseSchema() { + /** @returns {OwnerAppItemResponse} */ + static OwnerAppItemResponse() { return Joi.object({ - alt_text: Joi.object().pattern(/\S/, Joi.any()), + alt_text: Joi.any(), is_cod: Joi.boolean(), is_gift: Joi.boolean(), moq: CatalogPlatformModel.MOQData(), seo: CatalogPlatformModel.SEOData(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), _custom_meta: Joi.array().items(CatalogPlatformModel.MetaFields()), }); } - /** @returns {PTErrorResponseSchema} */ - static PTErrorResponseSchema() { + /** @returns {PTErrorResponse} */ + static PTErrorResponse() { return Joi.object({ code: Joi.string().allow(""), - errors: Joi.object().pattern(/\S/, Joi.any()), + errors: Joi.any(), message: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), status: Joi.number(), }); } @@ -7898,10 +6721,10 @@ class CatalogPlatformModel { }); } - /** @returns {PageResponseSchema} */ - static PageResponseSchema() { + /** @returns {PageResponse} */ + static PageResponse() { return Joi.object({ - current: Joi.number(), + current: Joi.string().allow(""), has_next: Joi.boolean(), has_previous: Joi.boolean(), item_total: Joi.number(), @@ -7930,8 +6753,8 @@ class CatalogPlatformModel { }); } - /** @returns {ProductListingDetailPrice} */ - static ProductListingDetailPrice() { + /** @returns {Price1} */ + static Price1() { return Joi.object({ currency_code: Joi.string().allow(""), currency_symbol: Joi.string().allow(""), @@ -7946,7 +6769,7 @@ class CatalogPlatformModel { currency: Joi.string().allow(""), effective: Joi.number(), marked: Joi.number(), - tp_notes: Joi.object().pattern(/\S/, Joi.any()), + tp_notes: Joi.any(), transfer: Joi.number(), }); } @@ -7957,16 +6780,16 @@ class CatalogPlatformModel { currency: Joi.string().allow("").required(), effective: Joi.number().required(), marked: Joi.number().required(), - tp_notes: Joi.object().pattern(/\S/, Joi.any()), + tp_notes: Joi.any(), transfer: Joi.number().required(), updated_at: Joi.string().allow(""), }); } - /** @returns {ProdcutTemplateCategoriesResponseSchema} */ - static ProdcutTemplateCategoriesResponseSchema() { + /** @returns {ProdcutTemplateCategoriesResponse} */ + static ProdcutTemplateCategoriesResponse() { return Joi.object({ - items: Joi.array().items(CatalogPlatformModel.CategoriesResponseSchema()), + items: Joi.array().items(CatalogPlatformModel.CategoriesResponse()), page: CatalogPlatformModel.Page(), }); } @@ -7974,23 +6797,23 @@ class CatalogPlatformModel { /** @returns {Product} */ static Product() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), all_company_ids: Joi.array().items(Joi.number()), all_identifiers: Joi.array().items(Joi.string().allow("")), - all_sizes: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), - attributes: Joi.object().pattern(/\S/, Joi.any()), + all_sizes: Joi.array().items(Joi.any()), + attributes: Joi.any(), brand: CatalogPlatformModel.Brand(), brand_uid: Joi.number(), - category: Joi.object().pattern(/\S/, Joi.any()), + category: Joi.any(), category_slug: Joi.string().allow(""), category_uid: Joi.number(), color: Joi.string().allow(""), company_id: Joi.number(), country_of_origin: Joi.string().allow(""), - created_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), created_on: Joi.string().allow(""), currency: Joi.string().allow(""), - custom_order: Joi.object().pattern(/\S/, Joi.any()), + custom_order: Joi.any(), departments: Joi.array().items(Joi.number()), description: Joi.string().allow(""), highlights: Joi.array().items(Joi.string().allow("")), @@ -8008,41 +6831,42 @@ class CatalogPlatformModel { item_type: Joi.string().allow(""), l3_mapping: Joi.array().items(Joi.string().allow("")), media: Joi.array().items(CatalogPlatformModel.Media()), - modified_by: Joi.object().pattern(/\S/, Joi.any()), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), - moq: Joi.object().pattern(/\S/, Joi.any()), + moq: Joi.any(), + multi_size: Joi.boolean(), name: Joi.string().allow(""), - net_quantity: CatalogPlatformModel.NetQuantityResponseSchema(), + net_quantity: CatalogPlatformModel.NetQuantityResponse(), no_of_boxes: Joi.number(), pending: Joi.string().allow(""), primary_color: Joi.string().allow(""), product_group_tag: Joi.array().items(Joi.string().allow("")), product_publish: CatalogPlatformModel.ProductPublished(), - return_config: CatalogPlatformModel.ReturnConfigResponseSchema(), + return_config: CatalogPlatformModel.ReturnConfigResponse(), short_description: Joi.string().allow(""), size_guide: Joi.string().allow(""), - sizes: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + sizes: Joi.array().items(Joi.any()), slug: Joi.string().allow(""), stage: Joi.string().allow(""), tags: Joi.array().items(Joi.string().allow("")), - tax_identifier: CatalogPlatformModel.TaxIdentifier(), - teaser_tag: Joi.object().pattern(/\S/, Joi.any()), + tax_identifier: Joi.any(), + teaser_tag: Joi.any(), template_tag: Joi.string().allow(""), trader: Joi.array().items(CatalogPlatformModel.Trader()), uid: Joi.number(), - variant_group: Joi.object().pattern(/\S/, Joi.any()), - variant_media: Joi.object().pattern(/\S/, Joi.any()), - variants: Joi.object().pattern(/\S/, Joi.any()), + variant_group: Joi.any(), + variant_media: Joi.any(), + variants: Joi.any(), verified_by: CatalogPlatformModel.VerifiedBy(), verified_on: Joi.string().allow(""), }); } - /** @returns {ProductAttributesResponseSchema} */ - static ProductAttributesResponseSchema() { + /** @returns {ProductAttributesResponse} */ + static ProductAttributesResponse() { return Joi.object({ items: Joi.array() - .items(CatalogPlatformModel.AttributeMasterSchema()) + .items(CatalogPlatformModel.AttributeMasterSerializer()) .required(), }); } @@ -8063,22 +6887,20 @@ class CatalogPlatformModel { batch_id: Joi.string().allow(""), company_id: Joi.number(), url: Joi.string().allow("").required(), - user: Joi.object().pattern(/\S/, Joi.any()).required(), + user: Joi.any().required(), }); } - /** @returns {ProductBulkRequestSchema} */ - static ProductBulkRequestSchema() { + /** @returns {ProductBulkRequest} */ + static ProductBulkRequest() { return Joi.object({ cancelled: Joi.number(), - cancelled_records: Joi.array().items( - Joi.object().pattern(/\S/, Joi.any()) - ), + cancelled_records: Joi.array().items(Joi.any()), company_id: Joi.number(), created_by: CatalogPlatformModel.UserDetail1(), created_on: Joi.string().allow(""), failed: Joi.number(), - failed_records: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + failed_records: Joi.array().items(Joi.any()), file_path: Joi.string().allow(""), is_active: Joi.boolean(), modified_by: CatalogPlatformModel.UserDetail1(), @@ -8094,7 +6916,7 @@ class CatalogPlatformModel { /** @returns {ProductBulkRequestList} */ static ProductBulkRequestList() { return Joi.object({ - items: Joi.any(), + items: Joi.array().items(CatalogPlatformModel.ProductBulkRequest()), page: CatalogPlatformModel.Page(), }); } @@ -8111,17 +6933,17 @@ class CatalogPlatformModel { }); } - /** @returns {ProductBundleRequestSchema} */ - static ProductBundleRequestSchema() { + /** @returns {ProductBundleRequest} */ + static ProductBundleRequest() { return Joi.object({ choice: Joi.string().allow("").required(), company_id: Joi.number(), - created_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), created_on: Joi.string().allow(""), is_active: Joi.boolean().required(), logo: Joi.string().allow("").allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()), - modified_by: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), name: Joi.string().allow("").required(), page_visibility: Joi.array().items(Joi.string().allow("")), @@ -8133,14 +6955,16 @@ class CatalogPlatformModel { }); } - /** @returns {ProductBundleUpdateRequestSchema} */ - static ProductBundleUpdateRequestSchema() { + /** @returns {ProductBundleUpdateRequest} */ + static ProductBundleUpdateRequest() { return Joi.object({ choice: Joi.string().allow("").required(), company_id: Joi.number(), is_active: Joi.boolean().required(), logo: Joi.string().allow("").allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), + modified_by: Joi.any(), + modified_on: Joi.string().allow(""), name: Joi.string().allow("").required(), page_visibility: Joi.array().items(Joi.string().allow("")), products: Joi.array() @@ -8154,7 +6978,7 @@ class CatalogPlatformModel { /** @returns {ProductConfigurationDownloads} */ static ProductConfigurationDownloads() { return Joi.object({ - data: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + data: Joi.array().items(Joi.any()), multivalue: Joi.boolean(), }); } @@ -8162,9 +6986,9 @@ class CatalogPlatformModel { /** @returns {ProductCreateUpdateSchemaV2} */ static ProductCreateUpdateSchemaV2() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), action: Joi.string().allow(""), - attributes: Joi.object().pattern(/\S/, Joi.any()), + attributes: Joi.any(), brand_uid: Joi.number().required(), bulk_job_id: Joi.string().allow(""), category_slug: Joi.string().allow("").required(), @@ -8175,7 +6999,9 @@ class CatalogPlatformModel { custom_order: CatalogPlatformModel.CustomOrder(), departments: Joi.array().items(Joi.number()).required(), description: Joi.string().allow(""), - highlights: Joi.array().items(Joi.string().allow("")).allow(null, ""), + highlights: Joi.array() + .items(Joi.string().allow("").allow(null)) + .allow(null, ""), is_active: Joi.boolean(), is_dependent: Joi.boolean(), is_image_less_product: Joi.boolean(), @@ -8188,14 +7014,12 @@ class CatalogPlatformModel { net_quantity: CatalogPlatformModel.NetQuantity(), no_of_boxes: Joi.number(), product_group_tag: Joi.array().items(Joi.string().allow("")), - product_publish: CatalogPlatformModel.ProductPublish(), + product_publish: CatalogPlatformModel.ProductPublish1(), requester: Joi.string().allow(""), return_config: CatalogPlatformModel.ReturnConfig().required(), short_description: Joi.string().allow(""), size_guide: Joi.string().allow(""), - sizes: Joi.array() - .items(Joi.object().pattern(/\S/, Joi.any())) - .required(), + sizes: Joi.array().items(Joi.any()).required(), slug: Joi.string().allow("").required(), tags: Joi.array().items(Joi.string().allow("")), tax_identifier: CatalogPlatformModel.TaxIdentifier().required(), @@ -8203,172 +7027,19 @@ class CatalogPlatformModel { template_tag: Joi.string().allow("").required(), trader: Joi.array().items(CatalogPlatformModel.Trader()).required(), uid: Joi.number().allow(null), - variant_group: Joi.object().pattern(/\S/, Joi.any()), - variant_media: Joi.object().pattern(/\S/, Joi.any()), - variants: Joi.object().pattern(/\S/, Joi.any()), + variant_group: Joi.any(), + variant_media: Joi.any(), + variants: Joi.any(), }); } /** @returns {ProductDetail} */ static ProductDetail() { return Joi.object({ - attributes: Joi.object().pattern(/\S/, Joi.any()), - brand: CatalogPlatformModel.ProductBrand(), - description: Joi.string().allow(""), - grouped_attributes: Joi.array().items( - CatalogPlatformModel.ProductDetailGroupedAttribute() - ), - has_variant: Joi.boolean(), - highlights: Joi.array().items(Joi.string().allow("")), - image_nature: Joi.string().allow(""), - item_code: Joi.string().allow(""), - item_type: Joi.string().allow(""), - medias: Joi.array().items(CatalogPlatformModel.Media()), - name: Joi.string().allow(""), - product_online_date: Joi.string().allow(""), - promo_meta: Joi.object().pattern(/\S/, Joi.any()), - rating: Joi.number(), - rating_count: Joi.number(), - short_description: Joi.string().allow(""), - similars: Joi.array().items(Joi.string().allow("")), - slug: Joi.string().allow("").required(), - teaser_tag: Joi.object().pattern(/\S/, Joi.any()), - tryouts: Joi.array().items(Joi.string().allow("")), - type: Joi.string().allow(""), - uid: Joi.number(), - country_of_origin: Joi.string().allow(""), - categories: Joi.array().items( - CatalogPlatformModel.ApplicationProductCategoryItem() - ), - tags: Joi.array().items(Joi.string().allow("")), - no_of_boxes: Joi.number(), - custom_order: CatalogPlatformModel.CustomOrder(), - }); - } - - /** @returns {ProductDetailAttribute} */ - static ProductDetailAttribute() { - return Joi.object({ - key: Joi.string().allow(""), - type: Joi.string().allow(""), - value: Joi.string().allow(""), - }); - } - - /** @returns {ProductDetailGroupedAttribute} */ - static ProductDetailGroupedAttribute() { - return Joi.object({ - details: Joi.array().items(CatalogPlatformModel.ProductDetailAttribute()), - title: Joi.string().allow(""), - }); - } - - /** @returns {ProductDownloadsResponseSchema} */ - static ProductDownloadsResponseSchema() { - return Joi.object({ - items: Joi.array().items( - CatalogPlatformModel.ProductTemplateExportResponseSchema() - ), - page: CatalogPlatformModel.Page(), - }); - } - - /** @returns {CollectionProductFilters} */ - static CollectionProductFilters() { - return Joi.object({ - key: CatalogPlatformModel.ProductFiltersKey().required(), - values: Joi.array() - .items(CatalogPlatformModel.CollectionProductFiltersValue()) - .required(), - }); - } - - /** @returns {ProductFilters} */ - static ProductFilters() { - return Joi.object({ - key: CatalogPlatformModel.ProductFiltersKey().required(), - values: Joi.array() - .items(CatalogPlatformModel.ProductFiltersValue()) - .required(), - }); - } - - /** @returns {GetQueryFiltersValuesResponseSchema} */ - static GetQueryFiltersValuesResponseSchema() { - return Joi.object({ - values: Joi.array() - .items(CatalogPlatformModel.ProductQueryFiltersValue()) - .required(), - page: CatalogPlatformModel.Page().required(), - }); - } - - /** @returns {ProductFiltersKeysOnly} */ - static ProductFiltersKeysOnly() { - return Joi.object({ - key: CatalogPlatformModel.ProductFiltersKey().required(), - }); - } - - /** @returns {ProductFiltersKey} */ - static ProductFiltersKey() { - return Joi.object({ - display: Joi.string().allow("").required(), - kind: Joi.string().allow(""), - logo: Joi.string().allow(""), - name: Joi.string().allow("").required(), - operators: Joi.array().items(Joi.string().allow("")), - }); - } - - /** @returns {ProductQueryFiltersValue} */ - static ProductQueryFiltersValue() { - return Joi.object({ - display: Joi.string().allow(""), - count: Joi.number(), - is_selected: Joi.boolean(), - value: Joi.string().allow(""), - logo: Joi.string().allow(""), - }); - } - - /** @returns {CollectionProductFiltersValue} */ - static CollectionProductFiltersValue() { - return Joi.object({ - display: Joi.string().allow("").required(), - count: Joi.number(), - is_selected: Joi.boolean().required(), - value: Joi.string().allow("").required(), - logo: Joi.any(), - }); - } - - /** @returns {ProductFiltersValue} */ - static ProductFiltersValue() { - return Joi.object({ - count: Joi.number(), - currency_code: Joi.string().allow(""), - currency_symbol: Joi.string().allow(""), - display: Joi.string().allow("").required(), - display_format: Joi.string().allow(""), - is_selected: Joi.boolean().required(), - max: Joi.number(), - min: Joi.number(), - query_format: Joi.string().allow(""), - selected_max: Joi.number(), - selected_min: Joi.number(), - value: Joi.object().pattern(/\S/, Joi.any()).required(), - }); - } - - /** @returns {CollectionProductListingDetail} */ - static CollectionProductListingDetail() { - return Joi.object({ - attributes: Joi.object().pattern(/\S/, Joi.any()), + attributes: Joi.any(), brand: CatalogPlatformModel.ProductBrand(), color: Joi.string().allow(""), description: Joi.string().allow(""), - discount: Joi.string().allow(""), grouped_attributes: Joi.array().items( CatalogPlatformModel.ProductDetailGroupedAttribute() ), @@ -8379,147 +7050,109 @@ class CatalogPlatformModel { item_type: Joi.string().allow(""), medias: Joi.array().items(CatalogPlatformModel.Media()), name: Joi.string().allow(""), - price: CatalogPlatformModel.ProductListingPrice(), product_online_date: Joi.string().allow(""), - promo_meta: Joi.object().pattern(/\S/, Joi.any()), + promo_meta: Joi.any(), rating: Joi.number(), rating_count: Joi.number(), - sellable: Joi.boolean(), short_description: Joi.string().allow(""), similars: Joi.array().items(Joi.string().allow("")), slug: Joi.string().allow("").required(), - teaser_tag: Joi.object().pattern(/\S/, Joi.any()), + teaser_tag: Joi.any(), tryouts: Joi.array().items(Joi.string().allow("")), type: Joi.string().allow(""), uid: Joi.number(), - categories: Joi.array().items(CatalogPlatformModel.ProductCategory()), - _custom_meta: Joi.array().items(Joi.any()), - action: CatalogPlatformModel.Action(), - discount_percentage: Joi.number(), - is_tryout: Joi.boolean(), - all_company_ids: Joi.array().items(Joi.number()), - is_custom_order: Joi.boolean(), - collections: Joi.array().items(Joi.string().allow("")), - popularity: Joi.number(), - brand_uid: Joi.number(), - category_uid: Joi.number(), - verification_status: Joi.string().allow(""), - channel_identifier: Joi.string().allow(""), - category_slug: Joi.string().allow(""), - size_guide: Joi.string().allow(""), - created_on: Joi.string().allow(""), - modified_on: Joi.string().allow(""), - l3_categories: Joi.array().items(Joi.number()), - store_ids: Joi.array().items(Joi.number()), - company_ids: Joi.array().items(Joi.number()), - departments: Joi.array().items(Joi.number()), - tags: Joi.array().items(Joi.string().allow("")), - l3_category_names: Joi.array().items(Joi.string().allow("")), - sizes: Joi.array().items(Joi.string().allow("")), - product_group_tag: Joi.array().items(Joi.string().allow("")), - multi_size: Joi.boolean(), - is_gift: Joi.boolean(), - is_cod: Joi.boolean(), - is_dependent: Joi.boolean(), - is_available: Joi.boolean(), - net_quantity: CatalogPlatformModel.NetQuantity(), - seo: CatalogPlatformModel.ApplicationItemSEO(), - moq: CatalogPlatformModel.ApplicationItemMOQ(), - custom_order: CatalogPlatformModel.CustomOrder(), - country_of_origin: Joi.string().allow(""), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - multi_categories: Joi.array().items( - Joi.object().pattern(/\S/, Joi.any()) - ), - variant_media: Joi.object().pattern(/\S/, Joi.any()), - variant_group: Joi.object().pattern(/\S/, Joi.any()), - identifiers: Joi.array().items(Joi.string().allow("")), - no_of_boxes: Joi.number(), - template_tag: Joi.string().allow(""), - }); - } - - /** @returns {ProductCategory} */ - static ProductCategory() { - return Joi.object({ - id: Joi.number(), - uid: Joi.number(), - name: Joi.string().allow(""), - slug: Joi.string().allow(""), - logo: CatalogPlatformModel.Logo(), - action: CatalogPlatformModel.Action(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), }); } - /** @returns {ApplicationCategoryAction} */ - static ApplicationCategoryAction() { + /** @returns {ProductDetailAttribute} */ + static ProductDetailAttribute() { return Joi.object({ - page: CatalogPlatformModel.CategoryPageAction(), + key: Joi.string().allow(""), type: Joi.string().allow(""), + value: Joi.string().allow(""), }); } - /** @returns {ApplicationCategoryItem} */ - static ApplicationCategoryItem() { + /** @returns {ProductDetailGroupedAttribute} */ + static ProductDetailGroupedAttribute() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - action: CatalogPlatformModel.ApplicationCategoryAction(), - id: Joi.number(), - logo: CatalogPlatformModel.CategoryImage(), - name: Joi.string().allow(""), - uid: Joi.number(), + details: Joi.array().items(CatalogPlatformModel.ProductDetailAttribute()), + title: Joi.string().allow(""), }); } - /** @returns {ApplicationProductMedia} */ - static ApplicationProductMedia() { + /** @returns {ProductDownloadsResponse} */ + static ProductDownloadsResponse() { return Joi.object({ - type: Joi.string().allow(""), - url: Joi.string().allow(""), + items: Joi.array().items( + CatalogPlatformModel.ProductTemplateExportResponse() + ), + page: CatalogPlatformModel.Page(), }); } - /** @returns {ApplicationProductCategoryItem} */ - static ApplicationProductCategoryItem() { + /** @returns {ProductFilters} */ + static ProductFilters() { return Joi.object({ - id: Joi.number(), - uid: Joi.number(), - name: Joi.string().allow(""), - slug: Joi.string().allow(""), - logo: CatalogPlatformModel.ApplicationProductMedia(), - action: CatalogPlatformModel.PageAction(), + key: CatalogPlatformModel.ProductFiltersKey().required(), + values: Joi.array() + .items(CatalogPlatformModel.ProductFiltersValue()) + .required(), }); } - /** @returns {CategoryPageAction} */ - static CategoryPageAction() { + /** @returns {GetQueryFiltersValuesResponse} */ + static GetQueryFiltersValuesResponse() { return Joi.object({ - query: CatalogPlatformModel.CategoryQuery(), - type: Joi.string().allow(""), + values: Joi.array() + .items(CatalogPlatformModel.ProductFiltersValue()) + .required(), + page: CatalogPlatformModel.Page().required(), }); } - /** @returns {CategoryQuery} */ - static CategoryQuery() { + /** @returns {ProductFiltersKeysOnly} */ + static ProductFiltersKeysOnly() { return Joi.object({ - category: Joi.array().items(Joi.string().allow("")), + key: CatalogPlatformModel.ProductFiltersKey().required(), }); } - /** @returns {CategoryImage} */ - static CategoryImage() { + /** @returns {ProductFiltersKey} */ + static ProductFiltersKey() { return Joi.object({ - type: Joi.string().allow(""), - url: Joi.string().allow(""), + display: Joi.string().allow("").required(), + kind: Joi.string().allow(""), + logo: Joi.string().allow(""), + name: Joi.string().allow("").required(), + operators: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {ProductFiltersValue} */ + static ProductFiltersValue() { + return Joi.object({ + count: Joi.number(), + currency_code: Joi.string().allow(""), + currency_symbol: Joi.string().allow(""), + display: Joi.string().allow("").required(), + display_format: Joi.string().allow(""), + is_selected: Joi.boolean().required(), + max: Joi.number(), + min: Joi.number(), + query_format: Joi.string().allow(""), + selected_max: Joi.number(), + selected_min: Joi.number(), + value: Joi.any().required(), }); } /** @returns {ProductListingDetail} */ static ProductListingDetail() { return Joi.object({ - attributes: Joi.object().pattern(/\S/, Joi.any()), + attributes: Joi.any(), brand: CatalogPlatformModel.ProductBrand(), + color: Joi.string().allow(""), description: Joi.string().allow(""), discount: Joi.string().allow(""), grouped_attributes: Joi.array().items( @@ -8534,42 +7167,17 @@ class CatalogPlatformModel { name: Joi.string().allow(""), price: CatalogPlatformModel.ProductListingPrice(), product_online_date: Joi.string().allow(""), - promo_meta: Joi.object().pattern(/\S/, Joi.any()), + promo_meta: Joi.any(), rating: Joi.number(), rating_count: Joi.number(), sellable: Joi.boolean(), short_description: Joi.string().allow(""), similars: Joi.array().items(Joi.string().allow("")), - slug: Joi.string().allow(""), - teaser_tag: Joi.object().pattern(/\S/, Joi.any()), + slug: Joi.string().allow("").required(), + teaser_tag: Joi.any(), tryouts: Joi.array().items(Joi.string().allow("")), type: Joi.string().allow(""), uid: Joi.number(), - categories: Joi.array().items( - CatalogPlatformModel.ApplicationCategoryItem() - ), - _custom_meta: Joi.array().items(Joi.string().allow("")), - action: CatalogPlatformModel.PageAction(), - is_tryout: Joi.boolean(), - all_company_ids: Joi.array().items(Joi.number()), - is_custom_order: Joi.boolean(), - collections: Joi.array().items(Joi.string().allow("")), - }); - } - - /** @returns {ActionObject} */ - static ActionObject() { - return Joi.object({ - type: Joi.string().allow(""), - query: Joi.object().pattern(/\S/, Joi.any()), - }); - } - - /** @returns {PageAction} */ - static PageAction() { - return Joi.object({ - page: CatalogPlatformModel.ActionObject(), - type: Joi.string().allow(""), }); } @@ -8578,12 +7186,11 @@ class CatalogPlatformModel { return Joi.object({ effective: CatalogPlatformModel.Price1(), marked: CatalogPlatformModel.Price1(), - selling: CatalogPlatformModel.Price1(), }); } - /** @returns {ProductListingResponseSchema} */ - static ProductListingResponseSchema() { + /** @returns {ProductListingResponse} */ + static ProductListingResponse() { return Joi.object({ items: Joi.array().items(CatalogPlatformModel.Product()), page: CatalogPlatformModel.Page(), @@ -8606,6 +7213,14 @@ class CatalogPlatformModel { }); } + /** @returns {ProductPublish1} */ + static ProductPublish1() { + return Joi.object({ + is_set: Joi.boolean(), + product_online_date: Joi.string().allow(""), + }); + } + /** @returns {ProductPublished} */ static ProductPublished() { return Joi.object({ @@ -8614,16 +7229,16 @@ class CatalogPlatformModel { }); } - /** @returns {ProductReturnConfigSchema} */ - static ProductReturnConfigSchema() { + /** @returns {ProductReturnConfigSerializer} */ + static ProductReturnConfigSerializer() { return Joi.object({ on_same_store: Joi.boolean(), store_uid: Joi.number(), }); } - /** @returns {ProductReturnConfigBaseSchema} */ - static ProductReturnConfigBaseSchema() { + /** @returns {ProductReturnConfigBaseSerializer} */ + static ProductReturnConfigBaseSerializer() { return Joi.object({ returnable: Joi.boolean().required(), time: Joi.number().required(), @@ -8631,50 +7246,26 @@ class CatalogPlatformModel { }); } - /** @returns {Identifier} */ - static Identifier() { - return Joi.object({ - primary: Joi.boolean(), - gtin_value: Joi.string().allow(""), - gtin_type: Joi.string().allow(""), - }); - } - - /** @returns {SizeDetails} */ - static SizeDetails() { - return Joi.object({ - size: Joi.string().allow(""), - store_count: Joi.number(), - sellable_quantity: Joi.number(), - sellable: Joi.boolean(), - size_priority: Joi.number(), - identifiers: Joi.array().items(CatalogPlatformModel.Identifier()), - price: Joi.any(), - seller_identifier: Joi.string().allow(""), - price_transfer: Joi.number(), - track_inventory: Joi.boolean(), - }); - } - /** @returns {ProductSchemaV2} */ static ProductSchemaV2() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), all_company_ids: Joi.array().items(Joi.number()), all_identifiers: Joi.array().items(Joi.string().allow("")), - all_sizes: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), - attributes: Joi.object().pattern(/\S/, Joi.any()), + all_sizes: Joi.array().items(Joi.any()), + attributes: Joi.any(), brand: CatalogPlatformModel.Brand(), brand_uid: Joi.number(), - category: Joi.object().pattern(/\S/, Joi.any()), + category: Joi.any(), category_slug: Joi.string().allow(""), category_uid: Joi.number(), color: Joi.string().allow(""), company_id: Joi.number(), country_of_origin: Joi.string().allow(""), - created_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), + created_on: Joi.string().allow(""), currency: Joi.string().allow(""), - custom_order: Joi.object().pattern(/\S/, Joi.any()), + custom_order: Joi.any(), departments: Joi.array().items(Joi.number()), description: Joi.string().allow(""), highlights: Joi.array().items(Joi.string().allow("")), @@ -8692,32 +7283,32 @@ class CatalogPlatformModel { item_type: Joi.string().allow(""), l3_mapping: Joi.array().items(Joi.string().allow("")), media: Joi.array().items(CatalogPlatformModel.Media()), - modified_by: Joi.object().pattern(/\S/, Joi.any()), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), - moq: Joi.object().pattern(/\S/, Joi.any()), + moq: Joi.any(), multi_size: Joi.boolean(), name: Joi.string().allow(""), - net_quantity: CatalogPlatformModel.NetQuantityResponseSchema(), + net_quantity: CatalogPlatformModel.NetQuantityResponse(), no_of_boxes: Joi.number(), pending: Joi.string().allow(""), primary_color: Joi.string().allow(""), product_group_tag: Joi.array().items(Joi.string().allow("")), product_publish: CatalogPlatformModel.ProductPublish(), - return_config: CatalogPlatformModel.ReturnConfigResponseSchema(), + return_config: CatalogPlatformModel.ReturnConfigResponse(), short_description: Joi.string().allow(""), size_guide: Joi.string().allow(""), - sizes: Joi.array().items(CatalogPlatformModel.SizeDetails()), + sizes: Joi.array().items(Joi.any()), slug: Joi.string().allow(""), stage: Joi.string().allow(""), tags: Joi.array().items(Joi.string().allow("")), - tax_identifier: CatalogPlatformModel.TaxIdentifier(), - teaser_tag: Joi.object().pattern(/\S/, Joi.any()), + tax_identifier: Joi.any(), + teaser_tag: Joi.any(), template_tag: Joi.string().allow(""), trader: Joi.array().items(CatalogPlatformModel.Trader()), uid: Joi.number(), - variant_group: Joi.object().pattern(/\S/, Joi.any()), - variant_media: Joi.object().pattern(/\S/, Joi.any()), - variants: Joi.object().pattern(/\S/, Joi.any()), + variant_group: Joi.any(), + variant_media: Joi.any(), + variants: Joi.any(), verified_by: CatalogPlatformModel.VerifiedBy(), verified_on: Joi.string().allow(""), }); @@ -8731,8 +7322,8 @@ class CatalogPlatformModel { }); } - /** @returns {ProductSizeDeleteDataResponseSchema} */ - static ProductSizeDeleteDataResponseSchema() { + /** @returns {ProductSizeDeleteDataResponse} */ + static ProductSizeDeleteDataResponse() { return Joi.object({ company_id: Joi.number(), item_id: Joi.number(), @@ -8740,24 +7331,14 @@ class CatalogPlatformModel { }); } - /** @returns {ProductSizeDeleteResponseSchema} */ - static ProductSizeDeleteResponseSchema() { + /** @returns {ProductSizeDeleteResponse} */ + static ProductSizeDeleteResponse() { return Joi.object({ - data: CatalogPlatformModel.ProductSizeDeleteDataResponseSchema(), + data: CatalogPlatformModel.ProductSizeDeleteDataResponse(), success: Joi.boolean(), }); } - /** @returns {CollectionProductSortOn} */ - static CollectionProductSortOn() { - return Joi.object({ - is_selected: Joi.boolean(), - name: Joi.string().allow(""), - value: Joi.string().allow(""), - logo: Joi.string().allow(""), - }); - } - /** @returns {ProductSortOn} */ static ProductSortOn() { return Joi.object({ @@ -8767,44 +7348,28 @@ class CatalogPlatformModel { }); } - /** @returns {ProductTagsViewResponseSchema} */ - static ProductTagsViewResponseSchema() { + /** @returns {ProductTagsViewResponse} */ + static ProductTagsViewResponse() { return Joi.object({ items: Joi.array().items(Joi.string().allow("")), }); } - /** @returns {CreatedBy} */ - static CreatedBy() { - return Joi.object({ - user_id: Joi.string().allow(""), - username: Joi.string().allow(""), - }); - } - - /** @returns {ModifiedBy} */ - static ModifiedBy() { - return Joi.object({ - user_id: Joi.string().allow(""), - username: Joi.string().allow(""), - }); - } - /** @returns {ProductTemplate} */ static ProductTemplate() { return Joi.object({ - attributes: Joi.array().items(Joi.string().allow("")), - categories: Joi.array().items(Joi.string().allow("")), - created_by: CatalogPlatformModel.CreatedBy(), + attributes: Joi.array().items(Joi.string().allow("")).allow(null, ""), + categories: Joi.array().items(Joi.string().allow("")).allow(null, ""), + created_by: Joi.any(), created_on: Joi.string().allow(""), - departments: Joi.array().items(Joi.string().allow("")), + departments: Joi.array().items(Joi.string().allow("")).allow(null, ""), description: Joi.string().allow(""), is_active: Joi.boolean(), is_archived: Joi.boolean(), is_expirable: Joi.boolean().required(), is_physical: Joi.boolean().required(), logo: Joi.string().allow(""), - modified_by: CatalogPlatformModel.ModifiedBy(), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), name: Joi.string().allow(""), slug: Joi.string().allow("").required(), @@ -8815,14 +7380,14 @@ class CatalogPlatformModel { /** @returns {ProductTemplateDownloadsExport} */ static ProductTemplateDownloadsExport() { return Joi.object({ - filters: CatalogPlatformModel.ProductTemplateExportFilterRequestSchema(), + filters: CatalogPlatformModel.ProductTemplateExportFilterRequest(), notification_emails: Joi.array().items(Joi.string().allow("")), type: Joi.string().allow("").allow(null), }); } - /** @returns {ProductTemplateExportFilterRequestSchema} */ - static ProductTemplateExportFilterRequestSchema() { + /** @returns {ProductTemplateExportFilterRequest} */ + static ProductTemplateExportFilterRequest() { return Joi.object({ brands: Joi.array().items(Joi.string().allow("")), catalogue_types: Joi.array().items(Joi.string().allow("")).required(), @@ -8832,12 +7397,12 @@ class CatalogPlatformModel { }); } - /** @returns {ProductTemplateExportResponseSchema} */ - static ProductTemplateExportResponseSchema() { + /** @returns {ProductTemplateExportResponse} */ + static ProductTemplateExportResponse() { return Joi.object({ completed_on: Joi.string().allow(""), - created_by: CatalogPlatformModel.UserInfo(), - filters: Joi.object().pattern(/\S/, Joi.any()), + created_by: CatalogPlatformModel.UserInfo1(), + filters: Joi.any(), modified_on: Joi.string().allow(""), notification_emails: Joi.array().items(Joi.string().allow("")), seller_id: Joi.number().required(), @@ -8860,8 +7425,8 @@ class CatalogPlatformModel { }); } - /** @returns {ProductVariantsResponseSchema} */ - static ProductVariantsResponseSchema() { + /** @returns {ProductVariantsResponse} */ + static ProductVariantsResponse() { return Joi.object({ page: CatalogPlatformModel.Page(), variants: Joi.array().items(CatalogPlatformModel.ProductVariants()), @@ -8871,35 +7436,35 @@ class CatalogPlatformModel { /** @returns {Properties} */ static Properties() { return Joi.object({ - brand_uid: Joi.object().pattern(/\S/, Joi.any()), - category_slug: Joi.object().pattern(/\S/, Joi.any()), - command: Joi.object().pattern(/\S/, Joi.any()), - country_of_origin: Joi.object().pattern(/\S/, Joi.any()), - currency: Joi.object().pattern(/\S/, Joi.any()), - custom_order: Joi.object().pattern(/\S/, Joi.any()), - description: Joi.object().pattern(/\S/, Joi.any()), - highlights: Joi.object().pattern(/\S/, Joi.any()), - hsn_code: Joi.object().pattern(/\S/, Joi.any()), - is_active: Joi.object().pattern(/\S/, Joi.any()), - is_dependent: Joi.object().pattern(/\S/, Joi.any()), - item_code: Joi.object().pattern(/\S/, Joi.any()), - item_type: Joi.object().pattern(/\S/, Joi.any()), - media: Joi.object().pattern(/\S/, Joi.any()), - multi_size: Joi.object().pattern(/\S/, Joi.any()), - name: Joi.object().pattern(/\S/, Joi.any()), - no_of_boxes: Joi.object().pattern(/\S/, Joi.any()), - product_group_tag: Joi.object().pattern(/\S/, Joi.any()), - product_publish: Joi.object().pattern(/\S/, Joi.any()), - return_config: Joi.object().pattern(/\S/, Joi.any()), - short_description: Joi.object().pattern(/\S/, Joi.any()), - size_guide: Joi.object().pattern(/\S/, Joi.any()), - sizes: Joi.object().pattern(/\S/, Joi.any()), - slug: Joi.object().pattern(/\S/, Joi.any()), - tags: Joi.object().pattern(/\S/, Joi.any()), - teaser_tag: Joi.object().pattern(/\S/, Joi.any()), - trader: Joi.object().pattern(/\S/, Joi.any()), - trader_type: Joi.object().pattern(/\S/, Joi.any()), - variants: Joi.object().pattern(/\S/, Joi.any()), + brand_uid: Joi.any(), + category_slug: Joi.any(), + command: Joi.any(), + country_of_origin: Joi.any(), + currency: Joi.any(), + custom_order: Joi.any(), + description: Joi.any(), + highlights: Joi.any(), + hsn_code: Joi.any(), + is_active: Joi.any(), + is_dependent: Joi.any(), + item_code: Joi.any(), + item_type: Joi.any(), + media: Joi.any(), + multi_size: Joi.any(), + name: Joi.any(), + no_of_boxes: Joi.any(), + product_group_tag: Joi.any(), + product_publish: Joi.any(), + return_config: Joi.any(), + short_description: Joi.any(), + size_guide: Joi.any(), + sizes: Joi.any(), + slug: Joi.any(), + tags: Joi.any(), + teaser_tag: Joi.any(), + trader: Joi.any(), + trader_type: Joi.any(), + variants: Joi.any(), }); } @@ -8948,8 +7513,8 @@ class CatalogPlatformModel { }); } - /** @returns {InventoryReturnConfig} */ - static InventoryReturnConfig() { + /** @returns {ReturnConfig1} */ + static ReturnConfig1() { return Joi.object({ returnable: Joi.boolean(), time: Joi.number(), @@ -8966,8 +7531,8 @@ class CatalogPlatformModel { }); } - /** @returns {ReturnConfigResponseSchema} */ - static ReturnConfigResponseSchema() { + /** @returns {ReturnConfigResponse} */ + static ReturnConfigResponse() { return Joi.object({ returnable: Joi.boolean(), time: Joi.number(), @@ -8983,35 +7548,10 @@ class CatalogPlatformModel { }); } - /** @returns {PageQuery} */ - static PageQuery() { - return Joi.object({ - brand: Joi.array().items(Joi.string().allow("")), - }); - } - - /** @returns {ApplicationCollectionItemSeoPage} */ - static ApplicationCollectionItemSeoPage() { - return Joi.object({ - params: Joi.object().pattern(/\S/, Joi.any()), - query: CatalogPlatformModel.PageQuery(), - type: Joi.string().allow(""), - url: Joi.string().allow(""), - }); - } - - /** @returns {ApplicationCollectionItemSeoAction} */ - static ApplicationCollectionItemSeoAction() { - return Joi.object({ - type: Joi.string().allow(""), - page: CatalogPlatformModel.ApplicationCollectionItemSeoPage(), - }); - } - /** @returns {ApplicationItemSeoAction} */ static ApplicationItemSeoAction() { return Joi.object({ - page: Joi.object().pattern(/\S/, Joi.any()), + page: Joi.any(), type: Joi.string().allow("").required(), }); } @@ -9026,14 +7566,6 @@ class CatalogPlatformModel { }); } - /** @returns {ApplicationCollectionItemSeoBreadcrumbs} */ - static ApplicationCollectionItemSeoBreadcrumbs() { - return Joi.object({ - url: Joi.string().allow(""), - action: CatalogPlatformModel.ApplicationCollectionItemSeoAction(), - }); - } - /** @returns {ApplicationItemSeoMetaTagItem} */ static ApplicationItemSeoMetaTagItem() { return Joi.object({ @@ -9087,7 +7619,7 @@ class CatalogPlatformModel { /** @returns {SearchKeywordResult} */ static SearchKeywordResult() { return Joi.object({ - query: Joi.object().pattern(/\S/, Joi.any()).required(), + query: Joi.any().required(), sort_on: Joi.string().allow("").required(), }); } @@ -9104,7 +7636,7 @@ class CatalogPlatformModel { /** @returns {SecondLevelChild} */ static SecondLevelChild() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), action: CatalogPlatformModel.Action(), banners: CatalogPlatformModel.ImageUrls(), childs: Joi.array().items(CatalogPlatformModel.ThirdLevelChild()), @@ -9122,26 +7654,12 @@ class CatalogPlatformModel { }); } - /** @returns {CollectionSeoDetail} */ - static CollectionSeoDetail() { - return Joi.object({ - description: Joi.string().allow(""), - title: Joi.string().allow(""), - sitemap: CatalogPlatformModel.Sitemap(), - breadcrumbs: Joi.array().items( - CatalogPlatformModel.ApplicationCollectionItemSeoBreadcrumbs() - ), - meta_tags: Joi.array().items(CatalogPlatformModel.Metatags()), - canonical_url: Joi.string().allow(""), - }); - } - /** @returns {SeoDetail} */ static SeoDetail() { return Joi.object({ description: Joi.string().allow(""), title: Joi.string().allow(""), - sitemap: Joi.object().pattern(/\S/, Joi.any()), + sitemap: Joi.any(), breadcrumbs: Joi.array().items( CatalogPlatformModel.ApplicationItemSeoBreadcrumbs() ), @@ -9158,15 +7676,15 @@ class CatalogPlatformModel { }); } - /** @returns {SingleCategoryResponseSchema} */ - static SingleCategoryResponseSchema() { + /** @returns {SingleCategoryResponse} */ + static SingleCategoryResponse() { return Joi.object({ data: CatalogPlatformModel.Category(), }); } - /** @returns {SingleProductResponseSchema} */ - static SingleProductResponseSchema() { + /** @returns {SingleProductResponse} */ + static SingleProductResponse() { return Joi.object({ data: CatalogPlatformModel.ProductSchemaV2(), }); @@ -9189,18 +7707,17 @@ class CatalogPlatformModel { }); } - /** @returns {SizeGuideResponseSchema} */ - static SizeGuideResponseSchema() { + /** @returns {SizeGuideResponse} */ + static SizeGuideResponse() { return Joi.object({ active: Joi.boolean(), brand_id: Joi.number(), company_id: Joi.number(), - created_by: CatalogPlatformModel.CreatedBySchema(), + created_by: Joi.any(), created_on: Joi.string().allow(""), - guide: Joi.object().pattern(/\S/, Joi.any()), + guide: Joi.any(), id: Joi.string().allow(""), - image: Joi.string().allow(""), - modified_by: CatalogPlatformModel.ModifiedBySchema(), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), name: Joi.string().allow(""), subtitle: Joi.string().allow(""), @@ -9209,8 +7726,8 @@ class CatalogPlatformModel { }); } - /** @returns {StoreAssignResponseSchema} */ - static StoreAssignResponseSchema() { + /** @returns {StoreAssignResponse} */ + static StoreAssignResponse() { return Joi.object({ _id: Joi.string().allow(""), article_assignment: CatalogPlatformModel.ArticleAssignment1().required(), @@ -9218,7 +7735,7 @@ class CatalogPlatformModel { group_id: Joi.string().allow(""), index: Joi.number(), item_id: Joi.number().required(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), price_effective: Joi.number(), price_marked: Joi.number(), quantity: Joi.number().required(), @@ -9227,9 +7744,7 @@ class CatalogPlatformModel { status: Joi.boolean().required(), store_id: Joi.number(), store_pincode: Joi.number(), - strategy_wise_listing: Joi.array().items( - Joi.object().pattern(/\S/, Joi.any()) - ), + strategy_wise_listing: Joi.array().items(Joi.any()), uid: Joi.string().allow(""), }); } @@ -9237,20 +7752,18 @@ class CatalogPlatformModel { /** @returns {StoreDetail} */ static StoreDetail() { return Joi.object({ - additional_contacts: Joi.array().items( - Joi.object().pattern(/\S/, Joi.any()) - ), - address: Joi.object().pattern(/\S/, Joi.any()), + additional_contacts: Joi.array().items(Joi.any()), + address: Joi.any(), company_id: Joi.number(), created_on: Joi.string().allow(""), display_name: Joi.string().allow(""), - documents: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), - manager: Joi.object().pattern(/\S/, Joi.any()), + documents: Joi.array().items(Joi.any()), + manager: Joi.any(), modified_on: Joi.string().allow(""), name: Joi.string().allow(""), store_code: Joi.string().allow(""), store_type: Joi.string().allow(""), - timing: Joi.object().pattern(/\S/, Joi.any()), + timing: Joi.any(), uid: Joi.number(), }); } @@ -9262,8 +7775,8 @@ class CatalogPlatformModel { }); } - /** @returns {SuccessResponseSchema} */ - static SuccessResponseSchema() { + /** @returns {SuccessResponse} */ + static SuccessResponse() { return Joi.object({ success: Joi.boolean(), }); @@ -9323,38 +7836,24 @@ class CatalogPlatformModel { }); } - /** @returns {TemplateGlobalValidationData} */ - static TemplateGlobalValidationData() { - return Joi.object({ - global_validation: CatalogPlatformModel.GlobalValidation(), - }); - } - /** @returns {TemplateValidationData} */ static TemplateValidationData() { return Joi.object({ global_validation: CatalogPlatformModel.GlobalValidation(), - template_validation: Joi.object().pattern(/\S/, Joi.any()), + template_validation: Joi.any(), }); } - /** @returns {TemplatesResponseSchema} */ - static TemplatesResponseSchema() { + /** @returns {TemplatesResponse} */ + static TemplatesResponse() { return Joi.object({ - items: Joi.array().items(CatalogPlatformModel.ProductTemplate()), + items: CatalogPlatformModel.ProductTemplate(), page: CatalogPlatformModel.Page(), }); } - /** @returns {TemplatesGlobalValidationResponseSchema} */ - static TemplatesGlobalValidationResponseSchema() { - return Joi.object({ - data: CatalogPlatformModel.TemplateGlobalValidationData(), - }); - } - - /** @returns {TemplatesValidationResponseSchema} */ - static TemplatesValidationResponseSchema() { + /** @returns {TemplatesValidationResponse} */ + static TemplatesValidationResponse() { return Joi.object({ data: CatalogPlatformModel.TemplateValidationData(), template_details: CatalogPlatformModel.TemplateDetails(), @@ -9364,10 +7863,10 @@ class CatalogPlatformModel { /** @returns {ThirdLevelChild} */ static ThirdLevelChild() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), action: CatalogPlatformModel.Action(), banners: CatalogPlatformModel.ImageUrls(), - childs: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + childs: Joi.array().items(Joi.any()), name: Joi.string().allow(""), slug: Joi.string().allow(""), uid: Joi.number(), @@ -9392,8 +7891,8 @@ class CatalogPlatformModel { }); } - /** @returns {TraderResponseSchema} */ - static TraderResponseSchema() { + /** @returns {TraderResponse} */ + static TraderResponse() { return Joi.object({ address: Joi.array().items(Joi.string().allow("")), name: Joi.string().allow(""), @@ -9404,8 +7903,8 @@ class CatalogPlatformModel { /** @returns {UpdateCollection} */ static UpdateCollection() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - _locale_language: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), + _locale_language: Joi.any(), _schedule: CatalogPlatformModel.CollectionSchedule(), allow_facets: Joi.boolean(), allow_sort: Joi.boolean(), @@ -9415,13 +7914,13 @@ class CatalogPlatformModel { is_active: Joi.boolean(), is_visible: Joi.boolean(), logo: CatalogPlatformModel.CollectionImage(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), modified_by: CatalogPlatformModel.UserInfo(), name: Joi.string().allow(""), priority: Joi.number(), published: Joi.boolean(), query: Joi.array().items(CatalogPlatformModel.CollectionQuery()), - seo: CatalogPlatformModel.CollectionSeoDetail(), + seo: CatalogPlatformModel.SeoDetail(), slug: Joi.string().allow(""), sort_on: Joi.string().allow(""), tags: Joi.array().items(Joi.string().allow("")), @@ -9430,15 +7929,15 @@ class CatalogPlatformModel { }); } - /** @returns {UpdateSearchConfigurationRequestSchema} */ - static UpdateSearchConfigurationRequestSchema() { + /** @returns {UpdateSearchConfigurationRequest} */ + static UpdateSearchConfigurationRequest() { return Joi.object({ application_id: Joi.string().allow("").required(), company_id: Joi.number().required(), - created_by: CatalogPlatformModel.UserSchema(), + created_by: CatalogPlatformModel.UserSerializer(), created_on: Joi.string().allow(""), is_proximity_enabled: Joi.boolean(), - modified_by: CatalogPlatformModel.UserSchema(), + modified_by: CatalogPlatformModel.UserSerializer(), modified_on: Joi.string().allow(""), proximity: Joi.number(), searchable_attributes: Joi.array().items( @@ -9447,15 +7946,15 @@ class CatalogPlatformModel { }); } - /** @returns {UpdateSearchConfigurationResponseSchema} */ - static UpdateSearchConfigurationResponseSchema() { + /** @returns {UpdateSearchConfigurationResponse} */ + static UpdateSearchConfigurationResponse() { return Joi.object({ success: Joi.boolean(), }); } - /** @returns {CreateMarketplaceOptinResponseSchema} */ - static CreateMarketplaceOptinResponseSchema() { + /** @returns {CreateMarketplaceOptinResponse} */ + static CreateMarketplaceOptinResponse() { return Joi.object({ store_ids: Joi.array().items(Joi.number()), brand_ids: Joi.array().items(Joi.number()), @@ -9507,8 +8006,18 @@ class CatalogPlatformModel { }); } - /** @returns {UserSchema} */ - static UserSchema() { + /** @returns {UserInfo1} */ + static UserInfo1() { + return Joi.object({ + email: Joi.string().allow(""), + uid: Joi.string().allow(""), + user_id: Joi.string().allow(""), + username: Joi.string().allow(""), + }); + } + + /** @returns {UserSerializer} */ + static UserSerializer() { return Joi.object({ contact: Joi.string().allow(""), user_id: Joi.string().allow(""), @@ -9516,8 +8025,8 @@ class CatalogPlatformModel { }); } - /** @returns {RequestUserSchema} */ - static RequestUserSchema() { + /** @returns {RequestUserSerializer} */ + static RequestUserSerializer() { return Joi.object({ _id: Joi.string().allow(""), contact: Joi.string().allow(""), @@ -9527,6 +8036,24 @@ class CatalogPlatformModel { }); } + /** @returns {UserSerializer2} */ + static UserSerializer2() { + return Joi.object({ + contact: Joi.string().allow(""), + user_id: Joi.string().allow(""), + username: Joi.string().allow(""), + }); + } + + /** @returns {UserSerializer3} */ + static UserSerializer3() { + return Joi.object({ + contact: Joi.string().allow(""), + user_id: Joi.string().allow(""), + username: Joi.string().allow(""), + }); + } + /** @returns {ValidateIdentifier} */ static ValidateIdentifier() { return Joi.object({ @@ -9548,14 +8075,14 @@ class CatalogPlatformModel { return Joi.object({ active: Joi.boolean(), brand_id: Joi.number(), - company_id: Joi.string().allow(""), - created_by: Joi.object().pattern(/\S/, Joi.any()), + company_id: Joi.number(), + created_by: Joi.any(), created_on: Joi.string().allow(""), description: Joi.string().allow(""), guide: CatalogPlatformModel.Guide(), id: Joi.string().allow(""), image: Joi.string().allow(""), - modified_by: Joi.object().pattern(/\S/, Joi.any()), + modified_by: Joi.any(), modified_on: Joi.string().allow(""), name: Joi.string().allow("").required(), subtitle: Joi.string().allow(""), @@ -9572,8 +8099,8 @@ class CatalogPlatformModel { }); } - /** @returns {WeightResponseSchema} */ - static WeightResponseSchema() { + /** @returns {WeightResponse} */ + static WeightResponse() { return Joi.object({ is_default: Joi.boolean().required(), shipping: Joi.number().required(), @@ -9581,14 +8108,22 @@ class CatalogPlatformModel { }); } - /** @returns {InventoryWeightResponseSchema} */ - static InventoryWeightResponseSchema() { + /** @returns {InventoryWeightResponse} */ + static InventoryWeightResponse() { return Joi.object({ shipping: Joi.number(), unit: Joi.string().allow(""), }); } + /** @returns {CreatedBy} */ + static CreatedBy() { + return Joi.object({ + username: Joi.string().allow(""), + user_id: Joi.string().allow(""), + }); + } + /** @returns {Marketplaces} */ static Marketplaces() { return Joi.object({ @@ -9615,8 +8150,8 @@ class CatalogPlatformModel { }); } - /** @returns {UpdateMarketplaceOptinRequestSchema} */ - static UpdateMarketplaceOptinRequestSchema() { + /** @returns {UpdateMarketplaceOptinRequest} */ + static UpdateMarketplaceOptinRequest() { return Joi.object({ brand_ids: Joi.array().items(Joi.number()), company_id: Joi.number(), @@ -9627,8 +8162,8 @@ class CatalogPlatformModel { }); } - /** @returns {UpdateMarketplaceOptinResponseSchema} */ - static UpdateMarketplaceOptinResponseSchema() { + /** @returns {UpdateMarketplaceOptinResponse} */ + static UpdateMarketplaceOptinResponse() { return Joi.object({ brand_ids: Joi.array().items(Joi.number()), company_id: Joi.number(), @@ -9642,17 +8177,6 @@ class CatalogPlatformModel { }); } - /** @returns {Filters} */ - static Filters() { - return Joi.object({ - brands: Joi.array().items(Joi.string().allow("")), - from_date: Joi.string().allow(""), - quantity: CatalogPlatformModel.InventoryExportQuantityFilter(), - stores: Joi.array().items(Joi.string().allow("")), - to_date: Joi.string().allow(""), - }); - } - /** @returns {ActionPage} */ static ActionPage() { return Joi.object({ @@ -9669,52 +8193,6 @@ class CatalogPlatformModel { }); } - /** @returns {Price1} */ - static Price1() { - return Joi.object({ - currency_code: CatalogPlatformModel.CurrencyCodeEnum(), - currency_symbol: Joi.string().allow(""), - max: Joi.number(), - min: Joi.number(), - }); - } - - /** @returns {MultiCategoriesSchema} */ - static MultiCategoriesSchema() { - return Joi.object({ - l1: Joi.number(), - l2: Joi.number(), - l3: Joi.number(), - is_active: Joi.boolean(), - department: Joi.number(), - }); - } - - /** @returns {CustomMeta} */ - static CustomMeta() { - return Joi.object({ - key: Joi.string().allow("").required(), - value: Joi.string().allow("").required(), - }); - } - - /** @returns {ValidationErrors} */ - static ValidationErrors() { - return Joi.object({ - errors: Joi.array() - .items(CatalogPlatformModel.ValidationError()) - .required(), - }); - } - - /** @returns {ValidationError} */ - static ValidationError() { - return Joi.object({ - message: Joi.string().allow("").required(), - field: Joi.string().allow("").required(), - }); - } - /** * Enum: PageType Used By: Catalog * @@ -9819,20 +8297,5 @@ class CatalogPlatformModel { "locate-us" ); } - - /** - * Enum: CurrencyCodeEnum Used By: Catalog - * - * @returns {CurrencyCodeEnum} - */ - static CurrencyCodeEnum() { - return Joi.string().valid( - "INR", - - "USD", - - "EUR" - ); - } } module.exports = CatalogPlatformModel; diff --git a/sdk/platform/Catalog/CatalogPlatformValidator.d.ts b/sdk/platform/Catalog/CatalogPlatformValidator.d.ts index c2fffdc3c..80c0fc9c6 100644 --- a/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +++ b/sdk/platform/Catalog/CatalogPlatformValidator.d.ts @@ -1,9 +1,9 @@ export = CatalogPlatformValidator; /** * @typedef AddInventoryParam - * @property {number} itemId - Item id of the product of which size is to be get. + * @property {number} itemId - Item code of the product of which size is to be get. * @property {string} size - Size in which inventory is to be added. - * @property {CatalogPlatformModel.InventoryRequestSchema} body + * @property {CatalogPlatformModel.InventoryRequest} body */ /** * @typedef AllSizesParam @@ -16,7 +16,7 @@ export = CatalogPlatformValidator; /** * @typedef CreateBulkInventoryParam * @property {string} batchId - Batch Id of the bulk create job. - * @property {CatalogPlatformModel.InventoryBulkRequestSchema} body + * @property {CatalogPlatformModel.InventoryBulkRequest} body */ /** * @typedef CreateBulkInventoryJobParam @@ -28,17 +28,17 @@ export = CatalogPlatformValidator; */ /** * @typedef CreateInventoryExportParam - * @property {CatalogPlatformModel.InventoryCreateRequestSchema} body + * @property {CatalogPlatformModel.InventoryCreateRequest} body */ /** * @typedef CreateInventoryExportJobParam - * @property {CatalogPlatformModel.InventoryExportRequestSchema} body + * @property {CatalogPlatformModel.InventoryExportRequest} body */ /** * @typedef CreateMarketplaceOptinParam * @property {string} marketplaceSlug - The marketplace for which the detail * needs to be retrieved. - * @property {CatalogPlatformModel.OptInPostRequestSchema} body + * @property {CatalogPlatformModel.OptInPostRequest} body */ /** * @typedef CreateProductParam @@ -50,7 +50,7 @@ export = CatalogPlatformValidator; */ /** * @typedef CreateProductBundleParam - * @property {CatalogPlatformModel.ProductBundleRequestSchema} body + * @property {CatalogPlatformModel.ProductBundleRequest} body */ /** * @typedef CreateProductExportJobParam @@ -59,7 +59,7 @@ export = CatalogPlatformValidator; /** * @typedef CreateProductsInBulkParam * @property {string} batchId - Batch Id in which assets to be uploaded. - * @property {CatalogPlatformModel.BulkProductRequestSchema} body + * @property {CatalogPlatformModel.BulkProductRequest} body */ /** * @typedef CreateSizeGuideParam @@ -71,8 +71,7 @@ export = CatalogPlatformValidator; */ /** * @typedef DeleteProductParam - * @property {number} itemId - Id of the product to be deleted. - * @property {CatalogPlatformModel.DeleteProductRequestBody} body + * @property {number} itemId - Id of the product to be updated. */ /** * @typedef DeleteProductBulkJobParam @@ -113,8 +112,8 @@ export = CatalogPlatformValidator; */ /** * @typedef GetAllProductHsnCodesParam - * @property {number} [pageNo] - Indicates current page number - * @property {number} [pageSize] - Indicates page size + * @property {number} [pageNo] - Page no + * @property {number} [pageSize] - Page size * @property {string} [q] - Search using hsn code, description, reporting_hsn * @property {string} [type] - Search using type */ @@ -246,10 +245,6 @@ export = CatalogPlatformValidator; * @typedef GetProductBundleParam * @property {string} [q] - A search string that is searched with product bundle name. * @property {string[]} [slug] - Slugs of bundles to be retrieved. - * @property {number} [pageNo] - The page number to navigate through the given - * set of results - * @property {number} [pageSize] - Number of items to retrieve in each page. - * Default is 12. */ /** * @typedef GetProductBundleDetailParam @@ -375,7 +370,7 @@ export = CatalogPlatformValidator; /** @typedef ListHSNCodesParam */ /** * @typedef ListInventoryExportParam - * @property {string} [status] - Status of the export job.(Pending, Running, Success) + * @property {string} [status] - Status of the export job. * @property {string} [fromDate] - Inventory export history filtered according * to from_date. * @property {string} [toDate] - Inventory export history filtered according to from_date. @@ -418,13 +413,13 @@ export = CatalogPlatformValidator; /** * @typedef UpdateMarketplaceOptinParam * @property {string} marketplaceSlug - Slug of the marketplace . - * @property {CatalogPlatformModel.UpdateMarketplaceOptinRequestSchema} body + * @property {CatalogPlatformModel.UpdateMarketplaceOptinRequest} body */ /** * @typedef UpdateProductBundleParam * @property {string} id - A `id` is a unique identifier for a particular * detail. Pass the `id` of the keywords which you want to delete. - * @property {CatalogPlatformModel.ProductBundleUpdateRequestSchema} body + * @property {CatalogPlatformModel.ProductBundleUpdateRequest} body */ /** * @typedef UpdateRealtimeInventoryParam @@ -442,18 +437,9 @@ export = CatalogPlatformValidator; * @typedef UploadBulkProductsParam * @property {string} department - Department of the product to be uploaded. * @property {string} productType - Product type of the product to be uploaded - * i.e. set, standard, digital. + * i.e. set, standard , digital. * @property {CatalogPlatformModel.BulkProductJob} body */ -/** - * @typedef ValidateProductGlobalTemplateParam - * @property {string} [itemType] - An `item_type` defines the type of item. The - * default value is standard. - * @property {boolean} [bulk] - This specification determines the schema type to - * be retrieved. When set to true, it will return the schema for bulk data; - * when set to false, it will provide the schema for a single product. The - * default value is false. - */ /** * @typedef ValidateProductTemplateParam * @property {string} slug - A `slug` is a unique identifier for a particular template. @@ -614,26 +600,24 @@ declare class CatalogPlatformValidator { static updateSizeGuide(): UpdateSizeGuideParam; /** @returns {UploadBulkProductsParam} */ static uploadBulkProducts(): UploadBulkProductsParam; - /** @returns {ValidateProductGlobalTemplateParam} */ - static validateProductGlobalTemplate(): ValidateProductGlobalTemplateParam; /** @returns {ValidateProductTemplateParam} */ static validateProductTemplate(): ValidateProductTemplateParam; /** @returns {ValidateProductTemplateSchemaParam} */ static validateProductTemplateSchema(): ValidateProductTemplateSchemaParam; } declare namespace CatalogPlatformValidator { - export { AddInventoryParam, AllSizesParam, BulkHsnCodeParam, CreateBulkInventoryParam, CreateBulkInventoryJobParam, CreateBulkProductUploadJobParam, CreateInventoryExportParam, CreateInventoryExportJobParam, CreateMarketplaceOptinParam, CreateProductParam, CreateProductAssetsInBulkParam, CreateProductBundleParam, CreateProductExportJobParam, CreateProductsInBulkParam, CreateSizeGuideParam, DeleteBulkInventoryJobParam, DeleteProductParam, DeleteProductBulkJobParam, DeleteRealtimeInventoryParam, DeleteSizeParam, DownloadInventoryTemplateViewParam, DownloadProductTemplateViewsParam, EditProductParam, ExportInventoryConfigParam, GetAllProductHsnCodesParam, GetAttributeParam, GetCategoryDataParam, GetCompanyBrandDetailParam, GetCompanyDetailParam, GetCompanyMetricsParam, GetDepartmentDataParam, GetHsnCodeParam, GetInventoriesParam, GetInventoryBulkUploadHistoryParam, GetInventoryBySizeParam, GetInventoryBySizeIdentifierParam, GetInventoryExportParam, GetMarketplaceOptinDetailParam, GetMarketplacesParam, GetOptimalLocationsParam, GetProductParam, GetProductAssetsInBulkParam, GetProductAttributesParam, GetProductBulkUploadHistoryParam, GetProductBundleParam, GetProductBundleDetailParam, GetProductExportJobsParam, GetProductSizeParam, GetProductTagsParam, GetProductValidationParam, GetProductsParam, GetSellerInsightsParam, GetSingleProductHSNCodeParam, GetSizeGuideParam, GetSizeGuidesParam, GetStoreDetailParam, GetVariantsOfProductsParam, ListCategoriesParam, ListDepartmentsDataParam, ListHSNCodesParam, ListInventoryExportParam, ListProductTemplateParam, ListProductTemplateCategoriesParam, ListProductTemplateExportDetailsParam, ListTemplateBrandTypeValuesParam, UpdateHsnCodeParam, UpdateInventoriesParam, UpdateMarketplaceOptinParam, UpdateProductBundleParam, UpdateRealtimeInventoryParam, UpdateSizeGuideParam, UploadBulkProductsParam, ValidateProductGlobalTemplateParam, ValidateProductTemplateParam, ValidateProductTemplateSchemaParam }; + export { AddInventoryParam, AllSizesParam, BulkHsnCodeParam, CreateBulkInventoryParam, CreateBulkInventoryJobParam, CreateBulkProductUploadJobParam, CreateInventoryExportParam, CreateInventoryExportJobParam, CreateMarketplaceOptinParam, CreateProductParam, CreateProductAssetsInBulkParam, CreateProductBundleParam, CreateProductExportJobParam, CreateProductsInBulkParam, CreateSizeGuideParam, DeleteBulkInventoryJobParam, DeleteProductParam, DeleteProductBulkJobParam, DeleteRealtimeInventoryParam, DeleteSizeParam, DownloadInventoryTemplateViewParam, DownloadProductTemplateViewsParam, EditProductParam, ExportInventoryConfigParam, GetAllProductHsnCodesParam, GetAttributeParam, GetCategoryDataParam, GetCompanyBrandDetailParam, GetCompanyDetailParam, GetCompanyMetricsParam, GetDepartmentDataParam, GetHsnCodeParam, GetInventoriesParam, GetInventoryBulkUploadHistoryParam, GetInventoryBySizeParam, GetInventoryBySizeIdentifierParam, GetInventoryExportParam, GetMarketplaceOptinDetailParam, GetMarketplacesParam, GetOptimalLocationsParam, GetProductParam, GetProductAssetsInBulkParam, GetProductAttributesParam, GetProductBulkUploadHistoryParam, GetProductBundleParam, GetProductBundleDetailParam, GetProductExportJobsParam, GetProductSizeParam, GetProductTagsParam, GetProductValidationParam, GetProductsParam, GetSellerInsightsParam, GetSingleProductHSNCodeParam, GetSizeGuideParam, GetSizeGuidesParam, GetStoreDetailParam, GetVariantsOfProductsParam, ListCategoriesParam, ListDepartmentsDataParam, ListHSNCodesParam, ListInventoryExportParam, ListProductTemplateParam, ListProductTemplateCategoriesParam, ListProductTemplateExportDetailsParam, ListTemplateBrandTypeValuesParam, UpdateHsnCodeParam, UpdateInventoriesParam, UpdateMarketplaceOptinParam, UpdateProductBundleParam, UpdateRealtimeInventoryParam, UpdateSizeGuideParam, UploadBulkProductsParam, ValidateProductTemplateParam, ValidateProductTemplateSchemaParam }; } type AddInventoryParam = { /** - * - Item id of the product of which size is to be get. + * - Item code of the product of which size is to be get. */ itemId: number; /** * - Size in which inventory is to be added. */ size: string; - body: CatalogPlatformModel.InventoryRequestSchema; + body: CatalogPlatformModel.InventoryRequest; }; type AllSizesParam = { /** @@ -649,7 +633,7 @@ type CreateBulkInventoryParam = { * - Batch Id of the bulk create job. */ batchId: string; - body: CatalogPlatformModel.InventoryBulkRequestSchema; + body: CatalogPlatformModel.InventoryBulkRequest; }; type CreateBulkInventoryJobParam = { body: CatalogPlatformModel.BulkJob; @@ -658,10 +642,10 @@ type CreateBulkProductUploadJobParam = { body: CatalogPlatformModel.BulkJob; }; type CreateInventoryExportParam = { - body: CatalogPlatformModel.InventoryCreateRequestSchema; + body: CatalogPlatformModel.InventoryCreateRequest; }; type CreateInventoryExportJobParam = { - body: CatalogPlatformModel.InventoryExportRequestSchema; + body: CatalogPlatformModel.InventoryExportRequest; }; type CreateMarketplaceOptinParam = { /** @@ -669,7 +653,7 @@ type CreateMarketplaceOptinParam = { * needs to be retrieved. */ marketplaceSlug: string; - body: CatalogPlatformModel.OptInPostRequestSchema; + body: CatalogPlatformModel.OptInPostRequest; }; type CreateProductParam = { body: CatalogPlatformModel.ProductCreateUpdateSchemaV2; @@ -678,7 +662,7 @@ type CreateProductAssetsInBulkParam = { body: CatalogPlatformModel.ProductBulkAssets; }; type CreateProductBundleParam = { - body: CatalogPlatformModel.ProductBundleRequestSchema; + body: CatalogPlatformModel.ProductBundleRequest; }; type CreateProductExportJobParam = { body: CatalogPlatformModel.ProductTemplateDownloadsExport; @@ -688,7 +672,7 @@ type CreateProductsInBulkParam = { * - Batch Id in which assets to be uploaded. */ batchId: string; - body: CatalogPlatformModel.BulkProductRequestSchema; + body: CatalogPlatformModel.BulkProductRequest; }; type CreateSizeGuideParam = { body: CatalogPlatformModel.ValidateSizeGuide; @@ -701,10 +685,9 @@ type DeleteBulkInventoryJobParam = { }; type DeleteProductParam = { /** - * - Id of the product to be deleted. + * - Id of the product to be updated. */ itemId: number; - body: CatalogPlatformModel.DeleteProductRequestBody; }; type DeleteProductBulkJobParam = { /** @@ -771,11 +754,11 @@ type ExportInventoryConfigParam = { }; type GetAllProductHsnCodesParam = { /** - * - Indicates current page number + * - Page no */ pageNo?: number; /** - * - Indicates page size + * - Page size */ pageSize?: number; /** @@ -1054,16 +1037,6 @@ type GetProductBundleParam = { * - Slugs of bundles to be retrieved. */ slug?: string[]; - /** - * - The page number to navigate through the given - * set of results - */ - pageNo?: number; - /** - * - Number of items to retrieve in each page. - * Default is 12. - */ - pageSize?: number; }; type GetProductBundleDetailParam = { /** @@ -1342,7 +1315,7 @@ type ListDepartmentsDataParam = { }; type ListInventoryExportParam = { /** - * - Status of the export job.(Pending, Running, Success) + * - Status of the export job. */ status?: string; /** @@ -1419,7 +1392,7 @@ type UpdateMarketplaceOptinParam = { * - Slug of the marketplace . */ marketplaceSlug: string; - body: CatalogPlatformModel.UpdateMarketplaceOptinRequestSchema; + body: CatalogPlatformModel.UpdateMarketplaceOptinRequest; }; type UpdateProductBundleParam = { /** @@ -1427,7 +1400,7 @@ type UpdateProductBundleParam = { * detail. Pass the `id` of the keywords which you want to delete. */ id: string; - body: CatalogPlatformModel.ProductBundleUpdateRequestSchema; + body: CatalogPlatformModel.ProductBundleUpdateRequest; }; type UpdateRealtimeInventoryParam = { /** @@ -1455,25 +1428,11 @@ type UploadBulkProductsParam = { department: string; /** * - Product type of the product to be uploaded - * i.e. set, standard, digital. + * i.e. set, standard , digital. */ productType: string; body: CatalogPlatformModel.BulkProductJob; }; -type ValidateProductGlobalTemplateParam = { - /** - * - An `item_type` defines the type of item. The - * default value is standard. - */ - itemType?: string; - /** - * - This specification determines the schema type to - * be retrieved. When set to true, it will return the schema for bulk data; - * when set to false, it will provide the schema for a single product. The - * default value is false. - */ - bulk?: boolean; -}; type ValidateProductTemplateParam = { /** * - A `slug` is a unique identifier for a particular template. diff --git a/sdk/platform/Catalog/CatalogPlatformValidator.js b/sdk/platform/Catalog/CatalogPlatformValidator.js index 7dc6e5340..19e85a492 100644 --- a/sdk/platform/Catalog/CatalogPlatformValidator.js +++ b/sdk/platform/Catalog/CatalogPlatformValidator.js @@ -4,9 +4,9 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef AddInventoryParam - * @property {number} itemId - Item id of the product of which size is to be get. + * @property {number} itemId - Item code of the product of which size is to be get. * @property {string} size - Size in which inventory is to be added. - * @property {CatalogPlatformModel.InventoryRequestSchema} body + * @property {CatalogPlatformModel.InventoryRequest} body */ /** @@ -22,7 +22,7 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef CreateBulkInventoryParam * @property {string} batchId - Batch Id of the bulk create job. - * @property {CatalogPlatformModel.InventoryBulkRequestSchema} body + * @property {CatalogPlatformModel.InventoryBulkRequest} body */ /** @@ -37,19 +37,19 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef CreateInventoryExportParam - * @property {CatalogPlatformModel.InventoryCreateRequestSchema} body + * @property {CatalogPlatformModel.InventoryCreateRequest} body */ /** * @typedef CreateInventoryExportJobParam - * @property {CatalogPlatformModel.InventoryExportRequestSchema} body + * @property {CatalogPlatformModel.InventoryExportRequest} body */ /** * @typedef CreateMarketplaceOptinParam * @property {string} marketplaceSlug - The marketplace for which the detail * needs to be retrieved. - * @property {CatalogPlatformModel.OptInPostRequestSchema} body + * @property {CatalogPlatformModel.OptInPostRequest} body */ /** @@ -64,7 +64,7 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef CreateProductBundleParam - * @property {CatalogPlatformModel.ProductBundleRequestSchema} body + * @property {CatalogPlatformModel.ProductBundleRequest} body */ /** @@ -75,7 +75,7 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef CreateProductsInBulkParam * @property {string} batchId - Batch Id in which assets to be uploaded. - * @property {CatalogPlatformModel.BulkProductRequestSchema} body + * @property {CatalogPlatformModel.BulkProductRequest} body */ /** @@ -90,8 +90,7 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef DeleteProductParam - * @property {number} itemId - Id of the product to be deleted. - * @property {CatalogPlatformModel.DeleteProductRequestBody} body + * @property {number} itemId - Id of the product to be updated. */ /** @@ -140,8 +139,8 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef GetAllProductHsnCodesParam - * @property {number} [pageNo] - Indicates current page number - * @property {number} [pageSize] - Indicates page size + * @property {number} [pageNo] - Page no + * @property {number} [pageSize] - Page size * @property {string} [q] - Search using hsn code, description, reporting_hsn * @property {string} [type] - Search using type */ @@ -293,10 +292,6 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); * @typedef GetProductBundleParam * @property {string} [q] - A search string that is searched with product bundle name. * @property {string[]} [slug] - Slugs of bundles to be retrieved. - * @property {number} [pageNo] - The page number to navigate through the given - * set of results - * @property {number} [pageSize] - Number of items to retrieve in each page. - * Default is 12. */ /** @@ -438,7 +433,7 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef ListInventoryExportParam - * @property {string} [status] - Status of the export job.(Pending, Running, Success) + * @property {string} [status] - Status of the export job. * @property {string} [fromDate] - Inventory export history filtered according * to from_date. * @property {string} [toDate] - Inventory export history filtered according to from_date. @@ -488,14 +483,14 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef UpdateMarketplaceOptinParam * @property {string} marketplaceSlug - Slug of the marketplace . - * @property {CatalogPlatformModel.UpdateMarketplaceOptinRequestSchema} body + * @property {CatalogPlatformModel.UpdateMarketplaceOptinRequest} body */ /** * @typedef UpdateProductBundleParam * @property {string} id - A `id` is a unique identifier for a particular * detail. Pass the `id` of the keywords which you want to delete. - * @property {CatalogPlatformModel.ProductBundleUpdateRequestSchema} body + * @property {CatalogPlatformModel.ProductBundleUpdateRequest} body */ /** @@ -516,20 +511,10 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); * @typedef UploadBulkProductsParam * @property {string} department - Department of the product to be uploaded. * @property {string} productType - Product type of the product to be uploaded - * i.e. set, standard, digital. + * i.e. set, standard , digital. * @property {CatalogPlatformModel.BulkProductJob} body */ -/** - * @typedef ValidateProductGlobalTemplateParam - * @property {string} [itemType] - An `item_type` defines the type of item. The - * default value is standard. - * @property {boolean} [bulk] - This specification determines the schema type to - * be retrieved. When set to true, it will return the schema for bulk data; - * when set to false, it will provide the schema for a single product. The - * default value is false. - */ - /** * @typedef ValidateProductTemplateParam * @property {string} slug - A `slug` is a unique identifier for a particular template. @@ -553,7 +538,7 @@ class CatalogPlatformValidator { return Joi.object({ itemId: Joi.number().required(), size: Joi.string().allow("").required(), - body: CatalogPlatformModel.InventoryRequestSchema().required(), + body: CatalogPlatformModel.InventoryRequest().required(), }).required(); } @@ -575,7 +560,7 @@ class CatalogPlatformValidator { static createBulkInventory() { return Joi.object({ batchId: Joi.string().allow("").required(), - body: CatalogPlatformModel.InventoryBulkRequestSchema().required(), + body: CatalogPlatformModel.InventoryBulkRequest().required(), }).required(); } @@ -596,14 +581,14 @@ class CatalogPlatformValidator { /** @returns {CreateInventoryExportParam} */ static createInventoryExport() { return Joi.object({ - body: CatalogPlatformModel.InventoryCreateRequestSchema().required(), + body: CatalogPlatformModel.InventoryCreateRequest().required(), }).required(); } /** @returns {CreateInventoryExportJobParam} */ static createInventoryExportJob() { return Joi.object({ - body: CatalogPlatformModel.InventoryExportRequestSchema().required(), + body: CatalogPlatformModel.InventoryExportRequest().required(), }).required(); } @@ -611,7 +596,7 @@ class CatalogPlatformValidator { static createMarketplaceOptin() { return Joi.object({ marketplaceSlug: Joi.string().allow("").required(), - body: CatalogPlatformModel.OptInPostRequestSchema().required(), + body: CatalogPlatformModel.OptInPostRequest().required(), }).required(); } @@ -632,7 +617,7 @@ class CatalogPlatformValidator { /** @returns {CreateProductBundleParam} */ static createProductBundle() { return Joi.object({ - body: CatalogPlatformModel.ProductBundleRequestSchema().required(), + body: CatalogPlatformModel.ProductBundleRequest().required(), }).required(); } @@ -647,7 +632,7 @@ class CatalogPlatformValidator { static createProductsInBulk() { return Joi.object({ batchId: Joi.string().allow("").required(), - body: CatalogPlatformModel.BulkProductRequestSchema().required(), + body: CatalogPlatformModel.BulkProductRequest().required(), }).required(); } @@ -669,7 +654,6 @@ class CatalogPlatformValidator { static deleteProduct() { return Joi.object({ itemId: Joi.number().required(), - body: CatalogPlatformModel.DeleteProductRequestBody().required(), }).required(); } @@ -904,8 +888,6 @@ class CatalogPlatformValidator { return Joi.object({ q: Joi.string().allow(""), slug: Joi.array().items(Joi.string().allow("")), - pageNo: Joi.number(), - pageSize: Joi.number(), }).required(); } @@ -1112,7 +1094,7 @@ class CatalogPlatformValidator { static updateMarketplaceOptin() { return Joi.object({ marketplaceSlug: Joi.string().allow("").required(), - body: CatalogPlatformModel.UpdateMarketplaceOptinRequestSchema().required(), + body: CatalogPlatformModel.UpdateMarketplaceOptinRequest().required(), }).required(); } @@ -1120,7 +1102,7 @@ class CatalogPlatformValidator { static updateProductBundle() { return Joi.object({ id: Joi.string().allow("").required(), - body: CatalogPlatformModel.ProductBundleUpdateRequestSchema().required(), + body: CatalogPlatformModel.ProductBundleUpdateRequest().required(), }).required(); } @@ -1150,14 +1132,6 @@ class CatalogPlatformValidator { }).required(); } - /** @returns {ValidateProductGlobalTemplateParam} */ - static validateProductGlobalTemplate() { - return Joi.object({ - itemType: Joi.string().allow(""), - bulk: Joi.boolean(), - }).required(); - } - /** @returns {ValidateProductTemplateParam} */ static validateProductTemplate() { return Joi.object({ diff --git a/sdk/platform/Common/CommonPlatformClient.d.ts b/sdk/platform/Common/CommonPlatformClient.d.ts index 303351a9e..788d5cca5 100644 --- a/sdk/platform/Common/CommonPlatformClient.d.ts +++ b/sdk/platform/Common/CommonPlatformClient.d.ts @@ -16,13 +16,12 @@ declare class Common { * @param {CommonPlatformValidator.SearchApplicationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name searchApplication * @summary: List sales channel categories * @description: This API retrieves details for a specific sales channel based on the provided search criteria. The search can be performed using the name of the sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/common/searchApplication/). */ - searchApplication({ authorization, query, requestHeaders }?: CommonPlatformValidator.SearchApplicationParam, { responseHeaders }?: object): Promise; + searchApplication({ authorization, query, requestHeaders }?: CommonPlatformValidator.SearchApplicationParam, { responseHeaders }?: object): Promise; } import CommonPlatformValidator = require("./CommonPlatformValidator"); import CommonPlatformModel = require("./CommonPlatformModel"); diff --git a/sdk/platform/Common/CommonPlatformClient.js b/sdk/platform/Common/CommonPlatformClient.js index 9242b29ca..bac81b858 100644 --- a/sdk/platform/Common/CommonPlatformClient.js +++ b/sdk/platform/Common/CommonPlatformClient.js @@ -93,8 +93,7 @@ class Common { * @param {CommonPlatformValidator.SearchApplicationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name searchApplication * @summary: List sales channel categories * @description: This API retrieves details for a specific sales channel based on the provided search criteria. The search can be performed using the name of the sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/common/searchApplication/). @@ -148,7 +147,7 @@ class Common { const { error: res_error, - } = CommonPlatformModel.ApplicationResponseSchema().validate(responseData, { + } = CommonPlatformModel.ApplicationResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/platform/Common/CommonPlatformModel.d.ts b/sdk/platform/Common/CommonPlatformModel.d.ts index c7e0f79eb..f26257174 100644 --- a/sdk/platform/Common/CommonPlatformModel.d.ts +++ b/sdk/platform/Common/CommonPlatformModel.d.ts @@ -1,6 +1,6 @@ export = CommonPlatformModel; /** - * @typedef ApplicationResponseSchema + * @typedef ApplicationResponse * @property {Application} [application] * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the current sales channel supported currency @@ -104,7 +104,7 @@ export = CommonPlatformModel; * @property {string} [message] - Response message for not found */ /** - * @typedef BadRequestSchema + * @typedef BadRequest * @property {string} [message] - Failure message (in a string format) */ /** @@ -145,11 +145,11 @@ export = CommonPlatformModel; declare class CommonPlatformModel { } declare namespace CommonPlatformModel { - export { ApplicationResponseSchema, Domain, ApplicationWebsite, ApplicationCors, ApplicationAuth, ApplicationRedirections, ApplicationMeta, SecureUrl, Application, NotFound, BadRequestSchema, LocationDefaultLanguage, LocationDefaultCurrency, LocationCountry, Locations }; + export { ApplicationResponse, Domain, ApplicationWebsite, ApplicationCors, ApplicationAuth, ApplicationRedirections, ApplicationMeta, SecureUrl, Application, NotFound, BadRequest, LocationDefaultLanguage, LocationDefaultCurrency, LocationCountry, Locations }; } -/** @returns {ApplicationResponseSchema} */ -declare function ApplicationResponseSchema(): ApplicationResponseSchema; -type ApplicationResponseSchema = { +/** @returns {ApplicationResponse} */ +declare function ApplicationResponse(): ApplicationResponse; +type ApplicationResponse = { application?: Application; /** * - The unique identifier (24-digit Mongo Object ID) @@ -372,9 +372,9 @@ type NotFound = { */ message?: string; }; -/** @returns {BadRequestSchema} */ -declare function BadRequestSchema(): BadRequestSchema; -type BadRequestSchema = { +/** @returns {BadRequest} */ +declare function BadRequest(): BadRequest; +type BadRequest = { /** * - Failure message (in a string format) */ diff --git a/sdk/platform/Common/CommonPlatformModel.js b/sdk/platform/Common/CommonPlatformModel.js index c6badfc18..3b5433d20 100644 --- a/sdk/platform/Common/CommonPlatformModel.js +++ b/sdk/platform/Common/CommonPlatformModel.js @@ -1,7 +1,7 @@ const Joi = require("joi"); /** - * @typedef ApplicationResponseSchema + * @typedef ApplicationResponse * @property {Application} [application] * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the current sales channel supported currency @@ -115,7 +115,7 @@ const Joi = require("joi"); */ /** - * @typedef BadRequestSchema + * @typedef BadRequest * @property {string} [message] - Failure message (in a string format) */ @@ -159,8 +159,8 @@ const Joi = require("joi"); */ class CommonPlatformModel { - /** @returns {ApplicationResponseSchema} */ - static ApplicationResponseSchema() { + /** @returns {ApplicationResponse} */ + static ApplicationResponse() { return Joi.object({ application: CommonPlatformModel.Application(), _id: Joi.string().allow(""), @@ -272,8 +272,8 @@ class CommonPlatformModel { }); } - /** @returns {BadRequestSchema} */ - static BadRequestSchema() { + /** @returns {BadRequest} */ + static BadRequest() { return Joi.object({ message: Joi.string().allow(""), }); diff --git a/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts b/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts index 02dd9ce78..60d888b20 100644 --- a/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +++ b/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts @@ -93,14 +93,14 @@ declare class Communication { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name createEventSubscriptions * @summary: Create an event subscription * @description: Creates a new event subscription. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEventSubscriptions/). */ - createEventSubscriptions({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.CreateEventSubscriptionsParam, { responseHeaders }?: object): Promise; + createEventSubscriptions({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.CreateEventSubscriptionsParam, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.CreateEventSubscriptionsByBulkParam} arg * - Arg object @@ -108,7 +108,7 @@ declare class Communication { * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise< - * CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult[] + * CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse[] * >} * - Success response * @@ -116,7 +116,7 @@ declare class Communication { * @summary: Create event subscriptions in bulk * @description: Creates a new event subscription in bulk. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEventSubscriptionsByBulk/). */ - createEventSubscriptionsByBulk({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.CreateEventSubscriptionsByBulkParam, { responseHeaders }?: object): Promise; + createEventSubscriptionsByBulk({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.CreateEventSubscriptionsByBulkParam, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.CreateJobsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -229,14 +229,14 @@ declare class Communication { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name editEventSubscriptions * @summary: Update an event subscriptions * @description: Modifys the configuration and settings of a specific event subscription. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/editEventSubscriptions/). */ - editEventSubscriptions({ id, body, requestHeaders }?: CommunicationPlatformApplicationValidator.EditEventSubscriptionsParam, { responseHeaders }?: object): Promise; + editEventSubscriptions({ id, body, requestHeaders }?: CommunicationPlatformApplicationValidator.EditEventSubscriptionsParam, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.GetAppProvidersParam} arg * - Arg object @@ -463,14 +463,14 @@ declare class Communication { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getGlobalVariables * @summary: Get all global variables * @description: Retrieves a list of communication global variables. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getGlobalVariables/). */ - getGlobalVariables({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getGlobalVariables({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.GetJobLogsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -655,38 +655,38 @@ declare class Communication { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name postGlobalVariables * @summary: Create global variables * @description: Updates and creates communication global variables. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/postGlobalVariables/). */ - postGlobalVariables({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.PostGlobalVariablesParam, { responseHeaders }?: object): Promise; + postGlobalVariables({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.PostGlobalVariablesParam, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.SendCommunicationAsynchronouslyParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name sendCommunicationAsynchronously * @summary: Send communication asynchronously * @description: Sends communications to sellers with deffered delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/sendCommunicationAsynchronously/). */ - sendCommunicationAsynchronously({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.SendCommunicationAsynchronouslyParam, { responseHeaders }?: object): Promise; + sendCommunicationAsynchronously({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.SendCommunicationAsynchronouslyParam, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.SendCommunicationSynchronouslyParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name sendCommunicationSynchronously * @summary: Send communication synchronously * @description: Sends real-time communications to sellers with immediate delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/sendCommunicationSynchronously/). */ - sendCommunicationSynchronously({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.SendCommunicationSynchronouslyParam, { responseHeaders }?: object): Promise; + sendCommunicationSynchronously({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.SendCommunicationSynchronouslyParam, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.SendOtpParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -703,12 +703,13 @@ declare class Communication { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name triggerCampaignJob * @summary: Trigger a campaign job * @description: Initiates a job to execute a communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/triggerCampaignJob/). */ - triggerCampaignJob({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.TriggerCampaignJobParam, { responseHeaders }?: object): Promise; + triggerCampaignJob({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.TriggerCampaignJobParam, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.UpdateAppProvidersParam} arg * - Arg object diff --git a/sdk/platform/Communication/CommunicationPlatformApplicationClient.js b/sdk/platform/Communication/CommunicationPlatformApplicationClient.js index 5dae0573a..d644b568f 100644 --- a/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +++ b/sdk/platform/Communication/CommunicationPlatformApplicationClient.js @@ -570,7 +570,7 @@ class Communication { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name createEventSubscriptions @@ -628,7 +628,7 @@ class Communication { const { error: res_error, - } = CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult().validate( + } = CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -654,7 +654,7 @@ class Communication { * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise< - * CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult[] + * CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse[] * >} * - Success response * @@ -712,7 +712,7 @@ class Communication { } const { error: res_error } = Joi.array() - .items(CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult()) + .items(CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse()) .validate(responseData, { abortEarly: false, allowUnknown: true }); if (res_error) { @@ -1462,7 +1462,7 @@ class Communication { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name editEventSubscriptions @@ -1522,7 +1522,7 @@ class Communication { const { error: res_error, - } = CommunicationPlatformModel.EventSubscriptionsBulkUpdateResult().validate( + } = CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3043,7 +3043,7 @@ class Communication { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getGlobalVariables @@ -3097,7 +3097,7 @@ class Communication { const { error: res_error, - } = CommunicationPlatformModel.GetGlobalVariablesResult().validate( + } = CommunicationPlatformModel.GlobalVariablesGetResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -4360,7 +4360,7 @@ class Communication { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name postGlobalVariables @@ -4418,7 +4418,7 @@ class Communication { const { error: res_error, - } = CommunicationPlatformModel.CreateGlobalVariablesResult().validate( + } = CommunicationPlatformModel.GlobalVariablesPostResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -4443,7 +4443,7 @@ class Communication { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name sendCommunicationAsynchronously * @summary: Send communication asynchronously * @description: Sends communications to sellers with deffered delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/sendCommunicationAsynchronously/). @@ -4499,7 +4499,7 @@ class Communication { const { error: res_error, - } = CommunicationPlatformModel.EngineResult().validate(responseData, { + } = CommunicationPlatformModel.EngineResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4524,7 +4524,7 @@ class Communication { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name sendCommunicationSynchronously * @summary: Send communication synchronously * @description: Sends real-time communications to sellers with immediate delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/sendCommunicationSynchronously/). @@ -4580,7 +4580,7 @@ class Communication { const { error: res_error, - } = CommunicationPlatformModel.EngineResult().validate(responseData, { + } = CommunicationPlatformModel.EngineResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4684,7 +4684,8 @@ class Communication { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name triggerCampaignJob * @summary: Trigger a campaign job * @description: Initiates a job to execute a communication campaign. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/triggerCampaignJob/). @@ -4740,7 +4741,7 @@ class Communication { const { error: res_error, - } = CommunicationPlatformModel.TriggerJobResult().validate(responseData, { + } = CommunicationPlatformModel.TriggerJobResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts b/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts index d88de16b2..959c8f5a1 100644 --- a/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +++ b/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts @@ -24,7 +24,7 @@ export = CommunicationPlatformApplicationValidator; */ /** * @typedef CreateEventSubscriptionsByBulkParam - * @property {CommunicationPlatformModel.EventSubscriptionsBulkUpdatePayload} body + * @property {CommunicationPlatformModel.EventSubscriptionsBulkUpdateRequest} body */ /** * @typedef CreateJobsParam @@ -214,11 +214,11 @@ export = CommunicationPlatformApplicationValidator; */ /** * @typedef SendCommunicationAsynchronouslyParam - * @property {CommunicationPlatformModel.EnginePayload} body + * @property {CommunicationPlatformModel.EngineRequest} body */ /** * @typedef SendCommunicationSynchronouslyParam - * @property {CommunicationPlatformModel.EnginePayload} body + * @property {CommunicationPlatformModel.EngineRequest} body */ /** * @typedef SendOtpParam @@ -226,7 +226,7 @@ export = CommunicationPlatformApplicationValidator; */ /** * @typedef TriggerCampaignJobParam - * @property {CommunicationPlatformModel.TriggerJobPayload} body + * @property {CommunicationPlatformModel.TriggerJobRequest} body */ /** * @typedef UpdateAppProvidersParam @@ -422,7 +422,7 @@ type CreateEventSubscriptionsParam = { body: CommunicationPlatformModel.SubscriptionsObject; }; type CreateEventSubscriptionsByBulkParam = { - body: CommunicationPlatformModel.EventSubscriptionsBulkUpdatePayload; + body: CommunicationPlatformModel.EventSubscriptionsBulkUpdateRequest; }; type CreateJobsParam = { body: CommunicationPlatformModel.CreateJobsReq; @@ -755,16 +755,16 @@ type PostGlobalVariablesParam = { body: CommunicationPlatformModel.GlobalVariablesReq; }; type SendCommunicationAsynchronouslyParam = { - body: CommunicationPlatformModel.EnginePayload; + body: CommunicationPlatformModel.EngineRequest; }; type SendCommunicationSynchronouslyParam = { - body: CommunicationPlatformModel.EnginePayload; + body: CommunicationPlatformModel.EngineRequest; }; type SendOtpParam = { body: CommunicationPlatformModel.SendOtpCommsReq; }; type TriggerCampaignJobParam = { - body: CommunicationPlatformModel.TriggerJobPayload; + body: CommunicationPlatformModel.TriggerJobRequest; }; type UpdateAppProvidersParam = { body: CommunicationPlatformModel.AppProviderReq; diff --git a/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js b/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js index 9ea18ad60..10b38dd30 100644 --- a/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +++ b/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js @@ -35,7 +35,7 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); /** * @typedef CreateEventSubscriptionsByBulkParam - * @property {CommunicationPlatformModel.EventSubscriptionsBulkUpdatePayload} body + * @property {CommunicationPlatformModel.EventSubscriptionsBulkUpdateRequest} body */ /** @@ -271,12 +271,12 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); /** * @typedef SendCommunicationAsynchronouslyParam - * @property {CommunicationPlatformModel.EnginePayload} body + * @property {CommunicationPlatformModel.EngineRequest} body */ /** * @typedef SendCommunicationSynchronouslyParam - * @property {CommunicationPlatformModel.EnginePayload} body + * @property {CommunicationPlatformModel.EngineRequest} body */ /** @@ -286,7 +286,7 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); /** * @typedef TriggerCampaignJobParam - * @property {CommunicationPlatformModel.TriggerJobPayload} body + * @property {CommunicationPlatformModel.TriggerJobRequest} body */ /** @@ -391,7 +391,7 @@ class CommunicationPlatformApplicationValidator { /** @returns {CreateEventSubscriptionsByBulkParam} */ static createEventSubscriptionsByBulk() { return Joi.object({ - body: CommunicationPlatformModel.EventSubscriptionsBulkUpdatePayload().required(), + body: CommunicationPlatformModel.EventSubscriptionsBulkUpdateRequest().required(), }).required(); } @@ -729,14 +729,14 @@ class CommunicationPlatformApplicationValidator { /** @returns {SendCommunicationAsynchronouslyParam} */ static sendCommunicationAsynchronously() { return Joi.object({ - body: CommunicationPlatformModel.EnginePayload().required(), + body: CommunicationPlatformModel.EngineRequest().required(), }).required(); } /** @returns {SendCommunicationSynchronouslyParam} */ static sendCommunicationSynchronously() { return Joi.object({ - body: CommunicationPlatformModel.EnginePayload().required(), + body: CommunicationPlatformModel.EngineRequest().required(), }).required(); } @@ -750,7 +750,7 @@ class CommunicationPlatformApplicationValidator { /** @returns {TriggerCampaignJobParam} */ static triggerCampaignJob() { return Joi.object({ - body: CommunicationPlatformModel.TriggerJobPayload().required(), + body: CommunicationPlatformModel.TriggerJobRequest().required(), }).required(); } diff --git a/sdk/platform/Communication/CommunicationPlatformModel.d.ts b/sdk/platform/Communication/CommunicationPlatformModel.d.ts index fab78e54e..35f664e19 100644 --- a/sdk/platform/Communication/CommunicationPlatformModel.d.ts +++ b/sdk/platform/Communication/CommunicationPlatformModel.d.ts @@ -1,10 +1,10 @@ export = CommunicationPlatformModel; /** - * @typedef EventSubscriptionsBulkUpdatePayload + * @typedef EventSubscriptionsBulkUpdateRequest * @property {SubscriptionsObject[]} [subscriptions] */ /** - * @typedef EventSubscriptionsBulkUpdateResult + * @typedef EventSubscriptionsBulkUpdateResponse * @property {EventSubscriptionTemplate} [template] * @property {string} [_id] * @property {string} [application] @@ -414,12 +414,12 @@ export = CommunicationPlatformModel; * @property {string} [timestamp] */ /** - * @typedef EnginePayload + * @typedef EngineRequest * @property {PayloadStructure} [payload] * @property {MetaStructure} [meta] */ /** - * @typedef EngineResult + * @typedef EngineResponse * @property {boolean} [success] */ /** @@ -455,20 +455,20 @@ export = CommunicationPlatformModel; * @property {Page} [page] */ /** - * @typedef TriggerJobResult + * @typedef TriggerJobResponse * @property {number} [status] */ /** - * @typedef TriggerJobPayload + * @typedef TriggerJobRequest * @property {string} [job_id] */ /** - * @typedef GetGlobalVariablesResult + * @typedef GlobalVariablesGetResponse * @property {Object} [read_only] * @property {Object} [editable] */ /** - * @typedef CreateGlobalVariablesResult + * @typedef GlobalVariablesPostResponse * @property {string} [_id] * @property {string} [category] * @property {string} [application] @@ -671,8 +671,6 @@ export = CommunicationPlatformModel; * @property {number} [version_id] - The version ID for the test. * @property {string} [sender_id] - The sender ID for the test. * @property {string} [api_key] - The api_key for the test. - * @property {string} [tenant_name_1] - First part of jiocx url. - * @property {string} [tenant_name_2] - Second part of jiocx url. */ /** * @typedef SmsProvider @@ -858,16 +856,16 @@ export = CommunicationPlatformModel; declare class CommunicationPlatformModel { } declare namespace CommunicationPlatformModel { - export { EventSubscriptionsBulkUpdatePayload, EventSubscriptionsBulkUpdateResult, SubscriptionsObject, TemplateObject, CommunicationTemplate, AppProvider, AppProviderRes, AppProviderResVoice, AppProviderResObj, GlobalProviders, GlobalProvidersResObj, AppProviderReq, StatsImported, StatsProcessedEmail, StatsProcessedSms, StatsProcessed, Stats, GetStats, CampaignReq, RecipientHeaders, CampaignEmailTemplate, CampignEmailProvider, CampaignEmail, Campaign, Campaigns, BadRequestSchema, NotFound, AudienceReq, Audience, Audiences, GetNRecordsCsvReq, GetNRecordsCsvResItems, GetNRecordsCsvRes, DummyDatasources, DummyDatasourcesMeta, DummyDatasourcesMetaObj, EmailProviderReqFrom, EmailProviderReq, EmailProvider, EmailProviders, EmailTemplateKeys, EmailTemplateHeaders, EmailTemplateReq, TemplateAndType, EmailTemplate, SystemEmailTemplate, EmailTemplates, SystemEmailTemplates, PayloadEmailTemplateStructure, PayloadEmailProviderStructure, PayloadEmailStructure, PayloadSmsTemplateStructure, PayloadSmsProviderStructure, PayloadSmsStructure, PayloadStructure, MetaStructure, EnginePayload, EngineResult, EventSubscriptionTemplateSms, EventSubscriptionTemplateEmail, EventSubscriptionTemplate, EventSubscription, EventSubscriptions, TriggerJobResult, TriggerJobPayload, GetGlobalVariablesResult, CreateGlobalVariablesResult, GlobalVariablesReq, Job, Jobs, CreateJobsRes, CreateJobsReq, JobLog, JobLogs, LogEmail, LogPushnotification, LogMeta, Log, Logs, SendOtpSmsCommsTemplate, SendOtpSmsCommsProvider, SendOtpEmailCommsProvider, SendOtpEmailCommsTemplate, SendOtpCommsReqData, SendOtpCommsReqSms, SendOtpCommsReqEmail, SendOtpCommsResSms, SendOtpCommsResEmail, SendOtpCommsReq, SendOtpCommsRes, VerifyOtpCommsReq, VerifyOtpCommsSuccessRes, VerifyOtpCommsErrorRes, SmsProviderReq, SmsProvider, SmsProviders, DefaultSmsProviders, SmsTemplateMessage, SmsTemplates, SmsTemplate, SystemSmsTemplates, metaObj, SmsTemplateReq, Notification, SystemNotificationUser, SystemNotification, SystemNotifications, Page, GenericError, GenericDelete, Message, EnabledObj, OtpConfigurationExpiryDuration, OtpConfigurationExpiry, OtpConfiguration }; + export { EventSubscriptionsBulkUpdateRequest, EventSubscriptionsBulkUpdateResponse, SubscriptionsObject, TemplateObject, CommunicationTemplate, AppProvider, AppProviderRes, AppProviderResVoice, AppProviderResObj, GlobalProviders, GlobalProvidersResObj, AppProviderReq, StatsImported, StatsProcessedEmail, StatsProcessedSms, StatsProcessed, Stats, GetStats, CampaignReq, RecipientHeaders, CampaignEmailTemplate, CampignEmailProvider, CampaignEmail, Campaign, Campaigns, BadRequestSchema, NotFound, AudienceReq, Audience, Audiences, GetNRecordsCsvReq, GetNRecordsCsvResItems, GetNRecordsCsvRes, DummyDatasources, DummyDatasourcesMeta, DummyDatasourcesMetaObj, EmailProviderReqFrom, EmailProviderReq, EmailProvider, EmailProviders, EmailTemplateKeys, EmailTemplateHeaders, EmailTemplateReq, TemplateAndType, EmailTemplate, SystemEmailTemplate, EmailTemplates, SystemEmailTemplates, PayloadEmailTemplateStructure, PayloadEmailProviderStructure, PayloadEmailStructure, PayloadSmsTemplateStructure, PayloadSmsProviderStructure, PayloadSmsStructure, PayloadStructure, MetaStructure, EngineRequest, EngineResponse, EventSubscriptionTemplateSms, EventSubscriptionTemplateEmail, EventSubscriptionTemplate, EventSubscription, EventSubscriptions, TriggerJobResponse, TriggerJobRequest, GlobalVariablesGetResponse, GlobalVariablesPostResponse, GlobalVariablesReq, Job, Jobs, CreateJobsRes, CreateJobsReq, JobLog, JobLogs, LogEmail, LogPushnotification, LogMeta, Log, Logs, SendOtpSmsCommsTemplate, SendOtpSmsCommsProvider, SendOtpEmailCommsProvider, SendOtpEmailCommsTemplate, SendOtpCommsReqData, SendOtpCommsReqSms, SendOtpCommsReqEmail, SendOtpCommsResSms, SendOtpCommsResEmail, SendOtpCommsReq, SendOtpCommsRes, VerifyOtpCommsReq, VerifyOtpCommsSuccessRes, VerifyOtpCommsErrorRes, SmsProviderReq, SmsProvider, SmsProviders, DefaultSmsProviders, SmsTemplateMessage, SmsTemplates, SmsTemplate, SystemSmsTemplates, metaObj, SmsTemplateReq, Notification, SystemNotificationUser, SystemNotification, SystemNotifications, Page, GenericError, GenericDelete, Message, EnabledObj, OtpConfigurationExpiryDuration, OtpConfigurationExpiry, OtpConfiguration }; } -/** @returns {EventSubscriptionsBulkUpdatePayload} */ -declare function EventSubscriptionsBulkUpdatePayload(): EventSubscriptionsBulkUpdatePayload; -type EventSubscriptionsBulkUpdatePayload = { +/** @returns {EventSubscriptionsBulkUpdateRequest} */ +declare function EventSubscriptionsBulkUpdateRequest(): EventSubscriptionsBulkUpdateRequest; +type EventSubscriptionsBulkUpdateRequest = { subscriptions?: SubscriptionsObject[]; }; -/** @returns {EventSubscriptionsBulkUpdateResult} */ -declare function EventSubscriptionsBulkUpdateResult(): EventSubscriptionsBulkUpdateResult; -type EventSubscriptionsBulkUpdateResult = { +/** @returns {EventSubscriptionsBulkUpdateResponse} */ +declare function EventSubscriptionsBulkUpdateResponse(): EventSubscriptionsBulkUpdateResponse; +type EventSubscriptionsBulkUpdateResponse = { template?: EventSubscriptionTemplate; _id?: string; application?: string; @@ -1348,15 +1346,15 @@ type MetaStructure = { trace?: string; timestamp?: string; }; -/** @returns {EnginePayload} */ -declare function EnginePayload(): EnginePayload; -type EnginePayload = { +/** @returns {EngineRequest} */ +declare function EngineRequest(): EngineRequest; +type EngineRequest = { payload?: PayloadStructure; meta?: MetaStructure; }; -/** @returns {EngineResult} */ -declare function EngineResult(): EngineResult; -type EngineResult = { +/** @returns {EngineResponse} */ +declare function EngineResponse(): EngineResponse; +type EngineResponse = { success?: boolean; }; /** @returns {EventSubscriptionTemplateSms} */ @@ -1396,25 +1394,25 @@ type EventSubscriptions = { items?: EventSubscription[]; page?: Page; }; -/** @returns {TriggerJobResult} */ -declare function TriggerJobResult(): TriggerJobResult; -type TriggerJobResult = { +/** @returns {TriggerJobResponse} */ +declare function TriggerJobResponse(): TriggerJobResponse; +type TriggerJobResponse = { status?: number; }; -/** @returns {TriggerJobPayload} */ -declare function TriggerJobPayload(): TriggerJobPayload; -type TriggerJobPayload = { +/** @returns {TriggerJobRequest} */ +declare function TriggerJobRequest(): TriggerJobRequest; +type TriggerJobRequest = { job_id?: string; }; -/** @returns {GetGlobalVariablesResult} */ -declare function GetGlobalVariablesResult(): GetGlobalVariablesResult; -type GetGlobalVariablesResult = { +/** @returns {GlobalVariablesGetResponse} */ +declare function GlobalVariablesGetResponse(): GlobalVariablesGetResponse; +type GlobalVariablesGetResponse = { read_only?: any; editable?: any; }; -/** @returns {CreateGlobalVariablesResult} */ -declare function CreateGlobalVariablesResult(): CreateGlobalVariablesResult; -type CreateGlobalVariablesResult = { +/** @returns {GlobalVariablesPostResponse} */ +declare function GlobalVariablesPostResponse(): GlobalVariablesPostResponse; +type GlobalVariablesPostResponse = { _id?: string; category?: string; application?: string; @@ -1680,14 +1678,6 @@ type SmsProviderReq = { * - The api_key for the test. */ api_key?: string; - /** - * - First part of jiocx url. - */ - tenant_name_1?: string; - /** - * - Second part of jiocx url. - */ - tenant_name_2?: string; }; /** @returns {SmsProvider} */ declare function SmsProvider(): SmsProvider; diff --git a/sdk/platform/Communication/CommunicationPlatformModel.js b/sdk/platform/Communication/CommunicationPlatformModel.js index 933e2200b..bdb024cf4 100644 --- a/sdk/platform/Communication/CommunicationPlatformModel.js +++ b/sdk/platform/Communication/CommunicationPlatformModel.js @@ -1,12 +1,12 @@ const Joi = require("joi"); /** - * @typedef EventSubscriptionsBulkUpdatePayload + * @typedef EventSubscriptionsBulkUpdateRequest * @property {SubscriptionsObject[]} [subscriptions] */ /** - * @typedef EventSubscriptionsBulkUpdateResult + * @typedef EventSubscriptionsBulkUpdateResponse * @property {EventSubscriptionTemplate} [template] * @property {string} [_id] * @property {string} [application] @@ -471,13 +471,13 @@ const Joi = require("joi"); */ /** - * @typedef EnginePayload + * @typedef EngineRequest * @property {PayloadStructure} [payload] * @property {MetaStructure} [meta] */ /** - * @typedef EngineResult + * @typedef EngineResponse * @property {boolean} [success] */ @@ -519,23 +519,23 @@ const Joi = require("joi"); */ /** - * @typedef TriggerJobResult + * @typedef TriggerJobResponse * @property {number} [status] */ /** - * @typedef TriggerJobPayload + * @typedef TriggerJobRequest * @property {string} [job_id] */ /** - * @typedef GetGlobalVariablesResult + * @typedef GlobalVariablesGetResponse * @property {Object} [read_only] * @property {Object} [editable] */ /** - * @typedef CreateGlobalVariablesResult + * @typedef GlobalVariablesPostResponse * @property {string} [_id] * @property {string} [category] * @property {string} [application] @@ -765,8 +765,6 @@ const Joi = require("joi"); * @property {number} [version_id] - The version ID for the test. * @property {string} [sender_id] - The sender ID for the test. * @property {string} [api_key] - The api_key for the test. - * @property {string} [tenant_name_1] - First part of jiocx url. - * @property {string} [tenant_name_2] - Second part of jiocx url. */ /** @@ -972,8 +970,8 @@ const Joi = require("joi"); */ class CommunicationPlatformModel { - /** @returns {EventSubscriptionsBulkUpdatePayload} */ - static EventSubscriptionsBulkUpdatePayload() { + /** @returns {EventSubscriptionsBulkUpdateRequest} */ + static EventSubscriptionsBulkUpdateRequest() { return Joi.object({ subscriptions: Joi.array().items( CommunicationPlatformModel.SubscriptionsObject() @@ -981,8 +979,8 @@ class CommunicationPlatformModel { }); } - /** @returns {EventSubscriptionsBulkUpdateResult} */ - static EventSubscriptionsBulkUpdateResult() { + /** @returns {EventSubscriptionsBulkUpdateResponse} */ + static EventSubscriptionsBulkUpdateResponse() { return Joi.object({ template: CommunicationPlatformModel.EventSubscriptionTemplate(), _id: Joi.string().allow(""), @@ -1403,7 +1401,7 @@ class CommunicationPlatformModel { reply_to: Joi.string().allow(""), priority: Joi.string().allow(""), tags: Joi.array().items(Joi.string().allow("")), - template_variables: Joi.object().pattern(/\S/, Joi.any()), + template_variables: Joi.any(), published: Joi.boolean(), subject: CommunicationPlatformModel.TemplateAndType(), html: CommunicationPlatformModel.TemplateAndType(), @@ -1445,7 +1443,7 @@ class CommunicationPlatformModel { html: CommunicationPlatformModel.TemplateAndType(), url_shorten: CommunicationPlatformModel.EnabledObj(), priority: Joi.string().allow(""), - template_variables: Joi.object().pattern(/\S/, Joi.any()), + template_variables: Joi.any(), published: Joi.boolean(), category: Joi.string().allow(""), _id: Joi.string().allow(""), @@ -1477,7 +1475,7 @@ class CommunicationPlatformModel { html: CommunicationPlatformModel.TemplateAndType(), url_shorten: CommunicationPlatformModel.EnabledObj(), priority: Joi.string().allow(""), - template_variables: Joi.object().pattern(/\S/, Joi.any()), + template_variables: Joi.any(), published: Joi.boolean(), category: Joi.string().allow(""), _id: Joi.string().allow(""), @@ -1576,16 +1574,16 @@ class CommunicationPlatformModel { }); } - /** @returns {EnginePayload} */ - static EnginePayload() { + /** @returns {EngineRequest} */ + static EngineRequest() { return Joi.object({ payload: CommunicationPlatformModel.PayloadStructure(), meta: CommunicationPlatformModel.MetaStructure(), }); } - /** @returns {EngineResult} */ - static EngineResult() { + /** @returns {EngineResponse} */ + static EngineResponse() { return Joi.object({ success: Joi.boolean(), }); @@ -1638,35 +1636,35 @@ class CommunicationPlatformModel { }); } - /** @returns {TriggerJobResult} */ - static TriggerJobResult() { + /** @returns {TriggerJobResponse} */ + static TriggerJobResponse() { return Joi.object({ status: Joi.number(), }); } - /** @returns {TriggerJobPayload} */ - static TriggerJobPayload() { + /** @returns {TriggerJobRequest} */ + static TriggerJobRequest() { return Joi.object({ job_id: Joi.string().allow(""), }); } - /** @returns {GetGlobalVariablesResult} */ - static GetGlobalVariablesResult() { + /** @returns {GlobalVariablesGetResponse} */ + static GlobalVariablesGetResponse() { return Joi.object({ - read_only: Joi.object().pattern(/\S/, Joi.any()), - editable: Joi.object().pattern(/\S/, Joi.any()), + read_only: Joi.any(), + editable: Joi.any(), }); } - /** @returns {CreateGlobalVariablesResult} */ - static CreateGlobalVariablesResult() { + /** @returns {GlobalVariablesPostResponse} */ + static GlobalVariablesPostResponse() { return Joi.object({ _id: Joi.string().allow(""), category: Joi.string().allow(""), application: Joi.string().allow(""), - global_variables: Joi.object().pattern(/\S/, Joi.any()), + global_variables: Joi.any(), created_at: Joi.string().allow(""), }); } @@ -1674,7 +1672,7 @@ class CommunicationPlatformModel { /** @returns {GlobalVariablesReq} */ static GlobalVariablesReq() { return Joi.object({ - global_variables: Joi.object().pattern(/\S/, Joi.any()), + global_variables: Joi.any(), }); } @@ -1946,8 +1944,6 @@ class CommunicationPlatformModel { version_id: Joi.number(), sender_id: Joi.string().allow(""), api_key: Joi.string().allow(""), - tenant_name_1: Joi.string().allow(""), - tenant_name_2: Joi.string().allow(""), }); } @@ -2022,7 +2018,7 @@ class CommunicationPlatformModel { message: CommunicationPlatformModel.SmsTemplateMessage(), priority: Joi.string().allow(""), tags: Joi.array().items(Joi.string().allow("")), - template_variables: Joi.object().pattern(/\S/, Joi.any()), + template_variables: Joi.any(), template_id: Joi.string().allow(""), published: Joi.boolean(), category: Joi.string().allow(""), @@ -2045,7 +2041,7 @@ class CommunicationPlatformModel { message: CommunicationPlatformModel.SmsTemplateMessage(), priority: Joi.string().allow(""), tags: Joi.array().items(Joi.string().allow("")), - template_variables: Joi.object().pattern(/\S/, Joi.any()), + template_variables: Joi.any(), template_id: Joi.string().allow(""), published: Joi.boolean(), category: Joi.string().allow(""), @@ -2073,7 +2069,7 @@ class CommunicationPlatformModel { priority: Joi.string().allow(""), template_id: Joi.string().allow(""), meta: CommunicationPlatformModel.metaObj(), - template_variables: Joi.object().pattern(/\S/, Joi.any()), + template_variables: Joi.any(), published: Joi.boolean(), message: CommunicationPlatformModel.SmsTemplateMessage(), }); diff --git a/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts b/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts index f2927d825..0f9a9b9ee 100644 --- a/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +++ b/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts @@ -6,132 +6,130 @@ declare class CompanyProfile { * @param {CompanyProfilePlatformValidator.CbsOnboardGetParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name cbsOnboardGet * @summary: Get company profile * @description: View the company profile of the seller account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/cbsOnboardGet/). */ - cbsOnboardGet({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + cbsOnboardGet({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CompanyProfilePlatformValidator.CreateBrandParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createBrand * @summary: Create brand * @description: Allows to create a brand associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createBrand/). */ - createBrand({ body, requestHeaders }?: CompanyProfilePlatformValidator.CreateBrandParam, { responseHeaders }?: object): Promise; + createBrand({ body, requestHeaders }?: CompanyProfilePlatformValidator.CreateBrandParam, { responseHeaders }?: object): Promise; /** * @param {CompanyProfilePlatformValidator.CreateCompanyBrandMappingParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createCompanyBrandMapping * @summary: Create company-brand mapping * @description: Establish a mapping between a company and a brand. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createCompanyBrandMapping/). */ - createCompanyBrandMapping({ body, requestHeaders }?: CompanyProfilePlatformValidator.CreateCompanyBrandMappingParam, { responseHeaders }?: object): Promise; + createCompanyBrandMapping({ body, requestHeaders }?: CompanyProfilePlatformValidator.CreateCompanyBrandMappingParam, { responseHeaders }?: object): Promise; /** * @param {CompanyProfilePlatformValidator.CreateLocationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createLocation * @summary: Create company stores * @description: Create a new location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createLocation/). */ - createLocation({ body, requestHeaders }?: CompanyProfilePlatformValidator.CreateLocationParam, { responseHeaders }?: object): Promise; + createLocation({ body, requestHeaders }?: CompanyProfilePlatformValidator.CreateLocationParam, { responseHeaders }?: object): Promise; /** * @param {CompanyProfilePlatformValidator.CreateLocationBulkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createLocationBulk * @summary: Bulk create company stores * @description: Allows to create locations in bulk at once associated to a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createLocationBulk/). */ - createLocationBulk({ body, requestHeaders }?: CompanyProfilePlatformValidator.CreateLocationBulkParam, { responseHeaders }?: object): Promise; + createLocationBulk({ body, requestHeaders }?: CompanyProfilePlatformValidator.CreateLocationBulkParam, { responseHeaders }?: object): Promise; /** * @param {CompanyProfilePlatformValidator.EditBrandParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name editBrand * @summary: update brand * @description: Modify brand details and meta of a specific brand. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/editBrand/). */ - editBrand({ brandId, body, requestHeaders }?: CompanyProfilePlatformValidator.EditBrandParam, { responseHeaders }?: object): Promise; + editBrand({ brandId, body, requestHeaders }?: CompanyProfilePlatformValidator.EditBrandParam, { responseHeaders }?: object): Promise; /** * @param {CompanyProfilePlatformValidator.GetBrandParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name getBrand * @summary: Get a brand * @description: Retrieve detailed information about a specific brand associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getBrand/). */ - getBrand({ brandId, requestHeaders }?: CompanyProfilePlatformValidator.GetBrandParam, { responseHeaders }?: object): Promise; + getBrand({ brandId, requestHeaders }?: CompanyProfilePlatformValidator.GetBrandParam, { responseHeaders }?: object): Promise; /** * @param {CompanyProfilePlatformValidator.GetBrandsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name getBrands * @summary: list company brands * @description: Retrieve a list of available brands associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getBrands/). */ - getBrands({ pageNo, pageSize, q, requestHeaders }?: CompanyProfilePlatformValidator.GetBrandsParam, { responseHeaders }?: object): Promise; + getBrands({ pageNo, pageSize, q, requestHeaders }?: CompanyProfilePlatformValidator.GetBrandsParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {number} [arg.pageSize] - Number of items to retrieve in each * page. Default is 10. * @param {string} [arg.q] - Search term for name. - * @returns {Paginator} + * @returns {Paginator} * @summary: list company brands * @description: Retrieve a list of available brands associated to a company. */ getBrandsPaginator({ pageSize, q }?: { pageSize?: number; q?: string; - }): Paginator; + }): Paginator; /** * @param {CompanyProfilePlatformValidator.GetCompanyMetricsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name getCompanyMetrics * @summary: Get company metrics * @description: Allows viewing company metrics, including brand and store status, as well as the number of verified and unverified products, company documents, and store documents. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getCompanyMetrics/). */ - getCompanyMetrics({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getCompanyMetrics({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CompanyProfilePlatformValidator.GetLocationDetailParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getLocationDetail * @summary: Get company stores * @description: Retrive detailed information about a specific location associated to a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocationDetail/). */ - getLocationDetail({ locationId, requestHeaders }?: CompanyProfilePlatformValidator.GetLocationDetailParam, { responseHeaders }?: object): Promise; + getLocationDetail({ locationId, requestHeaders }?: CompanyProfilePlatformValidator.GetLocationDetailParam, { responseHeaders }?: object): Promise; /** * @param {CompanyProfilePlatformValidator.GetLocationTagsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -148,13 +146,13 @@ declare class CompanyProfile { * @param {CompanyProfilePlatformValidator.GetLocationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getLocations * @summary: Get company specific stores * @description: Retrieve a list of locations associated with the company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocations/). */ - getLocations({ storeType, q, stage, pageNo, pageSize, locationIds, types, tags, requestHeaders, }?: CompanyProfilePlatformValidator.GetLocationsParam, { responseHeaders }?: object): Promise; + getLocations({ storeType, q, stage, pageNo, pageSize, locationIds, types, tags, requestHeaders, }?: CompanyProfilePlatformValidator.GetLocationsParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} [arg.storeType] - Helps to sort the location list on the @@ -169,7 +167,7 @@ declare class CompanyProfile { * basis of multiple location type. * @param {string[]} [arg.tags] - Helps to get the location list on the * basis of multiple location tag. - * @returns {Paginator} + * @returns {Paginator} * @summary: Get company specific stores * @description: Retrieve a list of locations associated with the company. */ @@ -181,31 +179,29 @@ declare class CompanyProfile { locationIds?: number[]; types?: string[]; tags?: string[]; - }): Paginator; + }): Paginator; /** * @param {CompanyProfilePlatformValidator.UpdateCompanyParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name updateCompany * @summary: Update company profile * @description: Allows to edit the company profile of the seller account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/updateCompany/). */ - updateCompany({ body, requestHeaders }?: CompanyProfilePlatformValidator.UpdateCompanyParam, { responseHeaders }?: object): Promise; + updateCompany({ body, requestHeaders }?: CompanyProfilePlatformValidator.UpdateCompanyParam, { responseHeaders }?: object): Promise; /** * @param {CompanyProfilePlatformValidator.UpdateLocationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name updateLocation * @summary: Update company stores * @description: Allows to edit a location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/updateLocation/). */ - updateLocation({ locationId, body, requestHeaders }?: CompanyProfilePlatformValidator.UpdateLocationParam, { responseHeaders }?: object): Promise; + updateLocation({ locationId, body, requestHeaders }?: CompanyProfilePlatformValidator.UpdateLocationParam, { responseHeaders }?: object): Promise; } import CompanyProfilePlatformModel = require("./CompanyProfilePlatformModel"); import CompanyProfilePlatformValidator = require("./CompanyProfilePlatformValidator"); diff --git a/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js b/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js index 3c3c6bc13..ada7db74b 100644 --- a/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +++ b/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js @@ -18,7 +18,7 @@ class CompanyProfile { * @param {CompanyProfilePlatformValidator.CbsOnboardGetParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name cbsOnboardGet @@ -72,7 +72,7 @@ class CompanyProfile { const { error: res_error, - } = CompanyProfilePlatformModel.GetCompanyProfileSerializerResponseSchema().validate( + } = CompanyProfilePlatformModel.GetCompanyProfileSerializerResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -95,9 +95,8 @@ class CompanyProfile { * @param {CompanyProfilePlatformValidator.CreateBrandParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createBrand * @summary: Create brand * @description: Allows to create a brand associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createBrand/). @@ -153,7 +152,7 @@ class CompanyProfile { const { error: res_error, - } = CompanyProfilePlatformModel.ProfileSuccessResponseSchema().validate( + } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -178,9 +177,8 @@ class CompanyProfile { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createCompanyBrandMapping * @summary: Create company-brand mapping * @description: Establish a mapping between a company and a brand. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createCompanyBrandMapping/). @@ -238,7 +236,7 @@ class CompanyProfile { const { error: res_error, - } = CompanyProfilePlatformModel.ProfileSuccessResponseSchema().validate( + } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -261,9 +259,8 @@ class CompanyProfile { * @param {CompanyProfilePlatformValidator.CreateLocationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createLocation * @summary: Create company stores * @description: Create a new location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createLocation/). @@ -319,7 +316,7 @@ class CompanyProfile { const { error: res_error, - } = CompanyProfilePlatformModel.ProfileSuccessResponseSchema().validate( + } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -342,9 +339,8 @@ class CompanyProfile { * @param {CompanyProfilePlatformValidator.CreateLocationBulkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createLocationBulk * @summary: Bulk create company stores * @description: Allows to create locations in bulk at once associated to a company - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/createLocationBulk/). @@ -402,7 +398,7 @@ class CompanyProfile { const { error: res_error, - } = CompanyProfilePlatformModel.ProfileSuccessResponseSchema().validate( + } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -425,9 +421,8 @@ class CompanyProfile { * @param {CompanyProfilePlatformValidator.EditBrandParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name editBrand * @summary: update brand * @description: Modify brand details and meta of a specific brand. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/editBrand/). @@ -485,7 +480,7 @@ class CompanyProfile { const { error: res_error, - } = CompanyProfilePlatformModel.ProfileSuccessResponseSchema().validate( + } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -508,8 +503,9 @@ class CompanyProfile { * @param {CompanyProfilePlatformValidator.GetBrandParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name getBrand * @summary: Get a brand * @description: Retrieve detailed information about a specific brand associated to a particular company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getBrand/). @@ -565,7 +561,7 @@ class CompanyProfile { const { error: res_error, - } = CompanyProfilePlatformModel.GetBrandResponseSchema().validate( + } = CompanyProfilePlatformModel.GetBrandResponseSerializer().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -588,8 +584,9 @@ class CompanyProfile { * @param {CompanyProfilePlatformValidator.GetBrandsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name getBrands * @summary: list company brands * @description: Retrieve a list of available brands associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getBrands/). @@ -652,7 +649,7 @@ class CompanyProfile { const { error: res_error, - } = CompanyProfilePlatformModel.CompanyBrandListSchema().validate( + } = CompanyProfilePlatformModel.CompanyBrandListSerializer().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -676,7 +673,7 @@ class CompanyProfile { * @param {number} [arg.pageSize] - Number of items to retrieve in each * page. Default is 10. * @param {string} [arg.q] - Search term for name. - * @returns {Paginator} + * @returns {Paginator} * @summary: list company brands * @description: Retrieve a list of available brands associated to a company. */ @@ -705,7 +702,8 @@ class CompanyProfile { * @param {CompanyProfilePlatformValidator.GetCompanyMetricsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name getCompanyMetrics * @summary: Get company metrics * @description: Allows viewing company metrics, including brand and store status, as well as the number of verified and unverified products, company documents, and store documents. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getCompanyMetrics/). @@ -759,7 +757,7 @@ class CompanyProfile { const { error: res_error, - } = CompanyProfilePlatformModel.MetricsSchema().validate(responseData, { + } = CompanyProfilePlatformModel.MetricsSerializer().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -782,7 +780,7 @@ class CompanyProfile { * @param {CompanyProfilePlatformValidator.GetLocationDetailParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getLocationDetail * @summary: Get company stores @@ -841,10 +839,10 @@ class CompanyProfile { const { error: res_error, - } = CompanyProfilePlatformModel.GetLocationSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = CompanyProfilePlatformModel.GetLocationSerializer().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -943,7 +941,7 @@ class CompanyProfile { * @param {CompanyProfilePlatformValidator.GetLocationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getLocations * @summary: Get company specific stores @@ -1032,7 +1030,7 @@ class CompanyProfile { const { error: res_error, - } = CompanyProfilePlatformModel.LocationListSchema().validate( + } = CompanyProfilePlatformModel.LocationListSerializer().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1065,7 +1063,7 @@ class CompanyProfile { * basis of multiple location type. * @param {string[]} [arg.tags] - Helps to get the location list on the * basis of multiple location tag. - * @returns {Paginator} + * @returns {Paginator} * @summary: Get company specific stores * @description: Retrieve a list of locations associated with the company. */ @@ -1107,9 +1105,8 @@ class CompanyProfile { * @param {CompanyProfilePlatformValidator.UpdateCompanyParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name updateCompany * @summary: Update company profile * @description: Allows to edit the company profile of the seller account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/updateCompany/). @@ -1165,7 +1162,7 @@ class CompanyProfile { const { error: res_error, - } = CompanyProfilePlatformModel.ProfileSuccessResponseSchema().validate( + } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1188,9 +1185,8 @@ class CompanyProfile { * @param {CompanyProfilePlatformValidator.UpdateLocationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name updateLocation * @summary: Update company stores * @description: Allows to edit a location associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/updateLocation/). @@ -1248,7 +1244,7 @@ class CompanyProfile { const { error: res_error, - } = CompanyProfilePlatformModel.ProfileSuccessResponseSchema().validate( + } = CompanyProfilePlatformModel.ProfileSuccessResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); diff --git a/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts b/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts index 3bc3005c5..a9cbce049 100644 --- a/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +++ b/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts @@ -1,12 +1,12 @@ export = CompanyProfilePlatformModel; /** - * @typedef CompanyTaxesSchema + * @typedef CompanyTaxesSerializer * @property {string} [effective_date] * @property {number} [rate] * @property {boolean} [enable] */ /** - * @typedef UserSchema + * @typedef UserSerializer * @property {string} [user_id] * @property {string} [contact] * @property {string} [username] @@ -51,7 +51,7 @@ export = CompanyProfilePlatformModel; * @property {string} [url] */ /** - * @typedef GetAddressSchema + * @typedef GetAddressSerializer * @property {string} [landmark] * @property {string} [country_code] * @property {number} [pincode] @@ -67,14 +67,14 @@ export = CompanyProfilePlatformModel; * @property {number} latitude */ /** - * @typedef GetCompanyProfileSerializerResponseSchema + * @typedef GetCompanyProfileSerializerResponse * @property {string} [business_info] - * @property {CompanyTaxesSchema[]} [taxes] + * @property {CompanyTaxesSerializer[]} [taxes] * @property {string} [business_type] * @property {string} [name] * @property {Object} [_custom_json] * @property {string} [verified_on] - * @property {UserSchema} [created_by] + * @property {UserSerializer} [created_by] * @property {string} [created_on] * @property {Object} [warnings] * @property {BusinessDetails} [business_details] @@ -87,13 +87,13 @@ export = CompanyProfilePlatformModel; * @property {string} [stage] * @property {string} company_type * @property {Document[]} [documents] - * @property {GetAddressSchema[]} [addresses] - * @property {UserSchema} [verified_by] + * @property {GetAddressSerializer[]} [addresses] + * @property {UserSerializer} [verified_by] * @property {string[]} [notification_emails] - * @property {UserSchema} [modified_by] + * @property {UserSerializer} [modified_by] */ /** - * @typedef ErrorResponseSchema + * @typedef ErrorResponse * @property {string} [message] * @property {string} [code] * @property {number} [status] @@ -106,7 +106,7 @@ export = CompanyProfilePlatformModel; * @property {boolean} [enable] */ /** - * @typedef CreateUpdateAddressSchema + * @typedef CreateUpdateAddressSerializer * @property {string} [landmark] * @property {string} [country_code] * @property {number} pincode @@ -130,14 +130,14 @@ export = CompanyProfilePlatformModel; * @property {BusinessDetails} [business_details] * @property {Document[]} [documents] * @property {string} [business_type] - * @property {CreateUpdateAddressSchema[]} [addresses] + * @property {CreateUpdateAddressSerializer[]} [addresses] * @property {string[]} [notification_emails] * @property {ContactDetails} [contact_details] * @property {string} [reject_reason] * @property {string} [name] */ /** - * @typedef ProfileSuccessResponseSchema + * @typedef ProfileSuccessResponse * @property {number} [uid] * @property {string} [message] * @property {boolean} [success] @@ -148,7 +148,7 @@ export = CompanyProfilePlatformModel; * @property {number} [verified] */ /** - * @typedef MetricsSchema + * @typedef MetricsSerializer * @property {string} [stage] * @property {DocumentsObj} [store] * @property {DocumentsObj} [company_documents] @@ -158,18 +158,18 @@ export = CompanyProfilePlatformModel; * @property {DocumentsObj} [brand] */ /** - * @typedef BrandBannerSchema + * @typedef BrandBannerSerializer * @property {string} portrait * @property {string} landscape */ /** - * @typedef GetBrandResponseSchema - * @property {UserSchema} [modified_by] - * @property {BrandBannerSchema} [banner] + * @typedef GetBrandResponseSerializer + * @property {UserSerializer} [modified_by] + * @property {BrandBannerSerializer} [banner] * @property {string} name * @property {Object} [_custom_json] * @property {string} [verified_on] - * @property {UserSchema} [created_by] + * @property {UserSerializer} [created_by] * @property {string} [created_on] * @property {Object} [warnings] * @property {Object} [_locale_language] @@ -179,13 +179,13 @@ export = CompanyProfilePlatformModel; * @property {number} [uid] * @property {string} [reject_reason] * @property {string} [stage] - * @property {UserSchema} [verified_by] + * @property {UserSerializer} [verified_by] * @property {string} [slug_key] * @property {string} [logo] * @property {string} [description] */ /** - * @typedef CreateBrandRequestSchema + * @typedef CreateBrandRequestSerializer * @property {Object} [_custom_json] * @property {Object} [_locale_language] * @property {string[]} [synonyms] @@ -194,12 +194,12 @@ export = CompanyProfilePlatformModel; * @property {string} logo * @property {string} [brand_tier] * @property {number} [uid] - * @property {BrandBannerSchema} banner + * @property {BrandBannerSerializer} banner * @property {string} name * @property {string} [slug_key] */ /** - * @typedef UpdateBrandRequestSchema + * @typedef UpdateBrandRequestSerializer * @property {Object} [_custom_json] * @property {Object} [_locale_language] * @property {string[]} [synonyms] @@ -208,7 +208,7 @@ export = CompanyProfilePlatformModel; * @property {string} logo * @property {string} [brand_tier] * @property {number} [uid] - * @property {BrandBannerSchema} banner + * @property {BrandBannerSerializer} banner * @property {string} name */ /** @@ -222,40 +222,40 @@ export = CompanyProfilePlatformModel; * @property {string} [website_url] */ /** - * @typedef CompanySchema + * @typedef CompanySerializer * @property {string} [stage] * @property {Object} [_custom_json] * @property {string} [verified_on] - * @property {UserSchema} [verified_by] + * @property {UserSerializer} [verified_by] * @property {string} [created_on] - * @property {UserSchema} [created_by] + * @property {UserSerializer} [created_by] * @property {string} company_type * @property {string} [modified_on] * @property {string[]} [market_channels] * @property {string} business_type - * @property {GetAddressSchema[]} [addresses] + * @property {GetAddressSerializer[]} [addresses] * @property {string[]} [notification_emails] * @property {CompanyDetails} [details] * @property {BusinessCountryInfo} [business_country_info] * @property {number} [uid] * @property {string} [reject_reason] * @property {string} [name] - * @property {UserSchema} [modified_by] + * @property {UserSerializer} [modified_by] */ /** - * @typedef CompanyBrandSchema + * @typedef CompanyBrandSerializer * @property {string} [stage] * @property {string} [verified_on] - * @property {UserSchema} [verified_by] + * @property {UserSerializer} [verified_by] * @property {string} [created_on] - * @property {UserSchema} [created_by] - * @property {CompanySchema} [company] + * @property {UserSerializer} [created_by] + * @property {CompanySerializer} [company] * @property {Object} [warnings] * @property {string} [modified_on] * @property {number} [uid] * @property {string} [reject_reason] - * @property {GetBrandResponseSchema} [brand] - * @property {UserSchema} [modified_by] + * @property {GetBrandResponseSerializer} [brand] + * @property {UserSerializer} [modified_by] */ /** * @typedef Page @@ -268,120 +268,120 @@ export = CompanyProfilePlatformModel; * @property {number} [size] - The number of items per page. */ /** - * @typedef CompanyBrandListSchema - * @property {CompanyBrandSchema[]} [items] + * @typedef CompanyBrandListSerializer + * @property {CompanyBrandSerializer[]} [items] * @property {Page} [page] */ /** - * @typedef CompanyBrandPostRequestSchema + * @typedef CompanyBrandPostRequestSerializer * @property {number} [uid] * @property {number[]} brands * @property {number} company */ /** - * @typedef InvoiceCredSchema + * @typedef InvoiceCredSerializer * @property {string} [username] * @property {boolean} [enabled] * @property {string} [password] */ /** - * @typedef InvoiceDetailsSchema - * @property {InvoiceCredSchema} [e_invoice] - * @property {InvoiceCredSchema} [e_waybill] + * @typedef InvoiceDetailsSerializer + * @property {InvoiceCredSerializer} [e_invoice] + * @property {InvoiceCredSerializer} [e_waybill] */ /** - * @typedef GetCompanySchema + * @typedef GetCompanySerializer * @property {string} [stage] * @property {string} [verified_on] - * @property {UserSchema} [verified_by] + * @property {UserSerializer} [verified_by] * @property {string} [created_on] - * @property {UserSchema} [created_by] + * @property {UserSerializer} [created_by] * @property {string} [company_type] * @property {string} [modified_on] * @property {string} [business_type] - * @property {GetAddressSchema[]} [addresses] + * @property {GetAddressSerializer[]} [addresses] * @property {number} [uid] * @property {string} [reject_reason] * @property {string} [name] - * @property {UserSchema} [modified_by] + * @property {UserSerializer} [modified_by] */ /** - * @typedef LocationManagerSchema + * @typedef LocationManagerSerializer * @property {string} [email] * @property {SellerPhoneNumber} mobile_no * @property {string} [name] */ /** - * @typedef LocationTimingSchema + * @typedef LocationTimingSerializer * @property {number} hour * @property {number} minute */ /** - * @typedef LocationDayWiseSchema + * @typedef LocationDayWiseSerializer * @property {boolean} open * @property {string} weekday - * @property {LocationTimingSchema} [opening] - * @property {LocationTimingSchema} [closing] + * @property {LocationTimingSerializer} [opening] + * @property {LocationTimingSerializer} [closing] */ /** - * @typedef HolidayDateSchema + * @typedef HolidayDateSerializer * @property {string} end_date * @property {string} start_date */ /** - * @typedef HolidaySchemaSchema - * @property {HolidayDateSchema} date + * @typedef HolidaySchemaSerializer + * @property {HolidayDateSerializer} date * @property {string} title * @property {string} holiday_type */ /** - * @typedef ProductReturnConfigSchema + * @typedef ProductReturnConfigSerializer * @property {boolean} [on_same_store] * @property {number} [store_uid] */ /** - * @typedef GetLocationSchema + * @typedef GetLocationSerializer * @property {string} code * @property {string} [phone_number] * @property {SellerPhoneNumber[]} [contact_numbers] - * @property {InvoiceDetailsSchema} [gst_credentials] + * @property {InvoiceDetailsSerializer} [gst_credentials] * @property {string} name * @property {Object} [_custom_json] * @property {string} [verified_on] - * @property {UserSchema} [created_by] + * @property {UserSerializer} [created_by] * @property {string} [created_on] - * @property {GetCompanySchema} [company] - * @property {GetAddressSchema} address + * @property {GetCompanySerializer} [company] + * @property {GetAddressSerializer} address * @property {Object} [warnings] * @property {string} [store_type] - * @property {LocationManagerSchema} [manager] + * @property {LocationManagerSerializer} [manager] * @property {boolean} [auto_invoice] * @property {string} [modified_on] * @property {number} [uid] - * @property {LocationDayWiseSchema[]} [timing] + * @property {LocationDayWiseSerializer[]} [timing] * @property {string} [stage] * @property {Document[]} [documents] * @property {boolean} [credit_note] - * @property {HolidaySchemaSchema[]} [holiday] + * @property {HolidaySchemaSerializer[]} [holiday] * @property {string} display_name - * @property {ProductReturnConfigSchema} [product_return_config] - * @property {UserSchema} [verified_by] + * @property {ProductReturnConfigSerializer} [product_return_config] + * @property {UserSerializer} [verified_by] * @property {string[]} [notification_emails] - * @property {UserSchema} [modified_by] + * @property {UserSerializer} [modified_by] * @property {string[]} [tags] * @property {boolean} [default_order_acceptance_timing] - * @property {LocationDayWiseSchema[]} [order_acceptance_timing] + * @property {LocationDayWiseSerializer[]} [order_acceptance_timing] * @property {AverageOrderProcessingTime} [avg_order_processing_time] * @property {boolean} [bulk_shipment] * @property {boolean} [auto_assign_courier_partner] */ /** - * @typedef LocationListSchema - * @property {GetLocationSchema[]} [items] + * @typedef LocationListSerializer + * @property {GetLocationSerializer[]} [items] * @property {Page} [page] */ /** - * @typedef AddressSchema + * @typedef AddressSerializer * @property {string} [landmark] * @property {string} country_code * @property {number} [pincode] @@ -397,39 +397,39 @@ export = CompanyProfilePlatformModel; * @property {number} latitude */ /** - * @typedef LocationSchema + * @typedef LocationSerializer * @property {string} code - * @property {InvoiceDetailsSchema} [gst_credentials] + * @property {InvoiceDetailsSerializer} [gst_credentials] * @property {SellerPhoneNumber[]} [contact_numbers] * @property {string} name * @property {Object} [_custom_json] * @property {Object} [warnings] - * @property {AddressSchema} address + * @property {AddressSerializer} address * @property {number} company * @property {string} [store_type] - * @property {LocationManagerSchema} [manager] + * @property {LocationManagerSerializer} [manager] * @property {boolean} [auto_invoice] * @property {number} [uid] - * @property {LocationDayWiseSchema[]} [timing] + * @property {LocationDayWiseSerializer[]} [timing] * @property {string} [stage] * @property {Document[]} documents * @property {boolean} [credit_note] - * @property {HolidaySchemaSchema[]} [holiday] - * @property {ProductReturnConfigSchema} [product_return_config] + * @property {HolidaySchemaSerializer[]} [holiday] + * @property {ProductReturnConfigSerializer} [product_return_config] * @property {string} display_name * @property {string[]} [notification_emails] * @property {string[]} [tags] * @property {boolean} [default_order_acceptance_timing] - Flag to set * order_acceptance_timing as default timing - * @property {LocationDayWiseSchema[]} [order_acceptance_timing] - Order + * @property {LocationDayWiseSerializer[]} [order_acceptance_timing] - Order * acceptance timing of the store * @property {AverageOrderProcessingTime} [avg_order_processing_time] * @property {boolean} [bulk_shipment] * @property {boolean} [auto_assign_courier_partner] */ /** - * @typedef BulkLocationSchema - * @property {LocationSchema[]} [data] + * @typedef BulkLocationSerializer + * @property {LocationSerializer[]} [data] */ /** * @typedef AverageOrderProcessingTime @@ -444,18 +444,18 @@ export = CompanyProfilePlatformModel; declare class CompanyProfilePlatformModel { } declare namespace CompanyProfilePlatformModel { - export { CompanyTaxesSchema, UserSchema, Website, BusinessDetails, SellerPhoneNumber, ContactDetails, CountryCurrencyInfo, BusinessCountryInfo, Document, GetAddressSchema, GetCompanyProfileSerializerResponseSchema, ErrorResponseSchema, CompanyTaxesSerializer1, CreateUpdateAddressSchema, UpdateCompany, ProfileSuccessResponseSchema, DocumentsObj, MetricsSchema, BrandBannerSchema, GetBrandResponseSchema, CreateBrandRequestSchema, UpdateBrandRequestSchema, CompanySocialAccounts, CompanyDetails, CompanySchema, CompanyBrandSchema, Page, CompanyBrandListSchema, CompanyBrandPostRequestSchema, InvoiceCredSchema, InvoiceDetailsSchema, GetCompanySchema, LocationManagerSchema, LocationTimingSchema, LocationDayWiseSchema, HolidayDateSchema, HolidaySchemaSchema, ProductReturnConfigSchema, GetLocationSchema, LocationListSchema, AddressSchema, LocationSchema, BulkLocationSchema, AverageOrderProcessingTime, StoreTagsResponseSchema }; + export { CompanyTaxesSerializer, UserSerializer, Website, BusinessDetails, SellerPhoneNumber, ContactDetails, CountryCurrencyInfo, BusinessCountryInfo, Document, GetAddressSerializer, GetCompanyProfileSerializerResponse, ErrorResponse, CompanyTaxesSerializer1, CreateUpdateAddressSerializer, UpdateCompany, ProfileSuccessResponse, DocumentsObj, MetricsSerializer, BrandBannerSerializer, GetBrandResponseSerializer, CreateBrandRequestSerializer, UpdateBrandRequestSerializer, CompanySocialAccounts, CompanyDetails, CompanySerializer, CompanyBrandSerializer, Page, CompanyBrandListSerializer, CompanyBrandPostRequestSerializer, InvoiceCredSerializer, InvoiceDetailsSerializer, GetCompanySerializer, LocationManagerSerializer, LocationTimingSerializer, LocationDayWiseSerializer, HolidayDateSerializer, HolidaySchemaSerializer, ProductReturnConfigSerializer, GetLocationSerializer, LocationListSerializer, AddressSerializer, LocationSerializer, BulkLocationSerializer, AverageOrderProcessingTime, StoreTagsResponseSchema }; } -/** @returns {CompanyTaxesSchema} */ -declare function CompanyTaxesSchema(): CompanyTaxesSchema; -type CompanyTaxesSchema = { +/** @returns {CompanyTaxesSerializer} */ +declare function CompanyTaxesSerializer(): CompanyTaxesSerializer; +type CompanyTaxesSerializer = { effective_date?: string; rate?: number; enable?: boolean; }; -/** @returns {UserSchema} */ -declare function UserSchema(): UserSchema; -type UserSchema = { +/** @returns {UserSerializer} */ +declare function UserSerializer(): UserSerializer; +type UserSerializer = { user_id?: string; contact?: string; username?: string; @@ -506,9 +506,9 @@ type Document = { type: string; url?: string; }; -/** @returns {GetAddressSchema} */ -declare function GetAddressSchema(): GetAddressSchema; -type GetAddressSchema = { +/** @returns {GetAddressSerializer} */ +declare function GetAddressSerializer(): GetAddressSerializer; +type GetAddressSerializer = { landmark?: string; country_code?: string; pincode?: number; @@ -523,16 +523,16 @@ type GetAddressSchema = { city?: string; latitude: number; }; -/** @returns {GetCompanyProfileSerializerResponseSchema} */ -declare function GetCompanyProfileSerializerResponseSchema(): GetCompanyProfileSerializerResponseSchema; -type GetCompanyProfileSerializerResponseSchema = { +/** @returns {GetCompanyProfileSerializerResponse} */ +declare function GetCompanyProfileSerializerResponse(): GetCompanyProfileSerializerResponse; +type GetCompanyProfileSerializerResponse = { business_info?: string; - taxes?: CompanyTaxesSchema[]; + taxes?: CompanyTaxesSerializer[]; business_type?: string; name?: string; _custom_json?: any; verified_on?: string; - created_by?: UserSchema; + created_by?: UserSerializer; created_on?: string; warnings?: any; business_details?: BusinessDetails; @@ -545,14 +545,14 @@ type GetCompanyProfileSerializerResponseSchema = { stage?: string; company_type: string; documents?: Document[]; - addresses?: GetAddressSchema[]; - verified_by?: UserSchema; + addresses?: GetAddressSerializer[]; + verified_by?: UserSerializer; notification_emails?: string[]; - modified_by?: UserSchema; + modified_by?: UserSerializer; }; -/** @returns {ErrorResponseSchema} */ -declare function ErrorResponseSchema(): ErrorResponseSchema; -type ErrorResponseSchema = { +/** @returns {ErrorResponse} */ +declare function ErrorResponse(): ErrorResponse; +type ErrorResponse = { message?: string; code?: string; status?: number; @@ -565,9 +565,9 @@ type CompanyTaxesSerializer1 = { rate?: number; enable?: boolean; }; -/** @returns {CreateUpdateAddressSchema} */ -declare function CreateUpdateAddressSchema(): CreateUpdateAddressSchema; -type CreateUpdateAddressSchema = { +/** @returns {CreateUpdateAddressSerializer} */ +declare function CreateUpdateAddressSerializer(): CreateUpdateAddressSerializer; +type CreateUpdateAddressSerializer = { landmark?: string; country_code?: string; pincode: number; @@ -592,15 +592,15 @@ type UpdateCompany = { business_details?: BusinessDetails; documents?: Document[]; business_type?: string; - addresses?: CreateUpdateAddressSchema[]; + addresses?: CreateUpdateAddressSerializer[]; notification_emails?: string[]; contact_details?: ContactDetails; reject_reason?: string; name?: string; }; -/** @returns {ProfileSuccessResponseSchema} */ -declare function ProfileSuccessResponseSchema(): ProfileSuccessResponseSchema; -type ProfileSuccessResponseSchema = { +/** @returns {ProfileSuccessResponse} */ +declare function ProfileSuccessResponse(): ProfileSuccessResponse; +type ProfileSuccessResponse = { uid?: number; message?: string; success?: boolean; @@ -611,9 +611,9 @@ type DocumentsObj = { pending?: number; verified?: number; }; -/** @returns {MetricsSchema} */ -declare function MetricsSchema(): MetricsSchema; -type MetricsSchema = { +/** @returns {MetricsSerializer} */ +declare function MetricsSerializer(): MetricsSerializer; +type MetricsSerializer = { stage?: string; store?: DocumentsObj; company_documents?: DocumentsObj; @@ -622,21 +622,21 @@ type MetricsSchema = { uid?: number; brand?: DocumentsObj; }; -/** @returns {BrandBannerSchema} */ -declare function BrandBannerSchema(): BrandBannerSchema; -type BrandBannerSchema = { +/** @returns {BrandBannerSerializer} */ +declare function BrandBannerSerializer(): BrandBannerSerializer; +type BrandBannerSerializer = { portrait: string; landscape: string; }; -/** @returns {GetBrandResponseSchema} */ -declare function GetBrandResponseSchema(): GetBrandResponseSchema; -type GetBrandResponseSchema = { - modified_by?: UserSchema; - banner?: BrandBannerSchema; +/** @returns {GetBrandResponseSerializer} */ +declare function GetBrandResponseSerializer(): GetBrandResponseSerializer; +type GetBrandResponseSerializer = { + modified_by?: UserSerializer; + banner?: BrandBannerSerializer; name: string; _custom_json?: any; verified_on?: string; - created_by?: UserSchema; + created_by?: UserSerializer; created_on?: string; warnings?: any; _locale_language?: any; @@ -646,14 +646,14 @@ type GetBrandResponseSchema = { uid?: number; reject_reason?: string; stage?: string; - verified_by?: UserSchema; + verified_by?: UserSerializer; slug_key?: string; logo?: string; description?: string; }; -/** @returns {CreateBrandRequestSchema} */ -declare function CreateBrandRequestSchema(): CreateBrandRequestSchema; -type CreateBrandRequestSchema = { +/** @returns {CreateBrandRequestSerializer} */ +declare function CreateBrandRequestSerializer(): CreateBrandRequestSerializer; +type CreateBrandRequestSerializer = { _custom_json?: any; _locale_language?: any; synonyms?: string[]; @@ -662,13 +662,13 @@ type CreateBrandRequestSchema = { logo: string; brand_tier?: string; uid?: number; - banner: BrandBannerSchema; + banner: BrandBannerSerializer; name: string; slug_key?: string; }; -/** @returns {UpdateBrandRequestSchema} */ -declare function UpdateBrandRequestSchema(): UpdateBrandRequestSchema; -type UpdateBrandRequestSchema = { +/** @returns {UpdateBrandRequestSerializer} */ +declare function UpdateBrandRequestSerializer(): UpdateBrandRequestSerializer; +type UpdateBrandRequestSerializer = { _custom_json?: any; _locale_language?: any; synonyms?: string[]; @@ -677,7 +677,7 @@ type UpdateBrandRequestSchema = { logo: string; brand_tier?: string; uid?: number; - banner: BrandBannerSchema; + banner: BrandBannerSerializer; name: string; }; /** @returns {CompanySocialAccounts} */ @@ -692,43 +692,43 @@ type CompanyDetails = { socials?: CompanySocialAccounts[]; website_url?: string; }; -/** @returns {CompanySchema} */ -declare function CompanySchema(): CompanySchema; -type CompanySchema = { +/** @returns {CompanySerializer} */ +declare function CompanySerializer(): CompanySerializer; +type CompanySerializer = { stage?: string; _custom_json?: any; verified_on?: string; - verified_by?: UserSchema; + verified_by?: UserSerializer; created_on?: string; - created_by?: UserSchema; + created_by?: UserSerializer; company_type: string; modified_on?: string; market_channels?: string[]; business_type: string; - addresses?: GetAddressSchema[]; + addresses?: GetAddressSerializer[]; notification_emails?: string[]; details?: CompanyDetails; business_country_info?: BusinessCountryInfo; uid?: number; reject_reason?: string; name?: string; - modified_by?: UserSchema; + modified_by?: UserSerializer; }; -/** @returns {CompanyBrandSchema} */ -declare function CompanyBrandSchema(): CompanyBrandSchema; -type CompanyBrandSchema = { +/** @returns {CompanyBrandSerializer} */ +declare function CompanyBrandSerializer(): CompanyBrandSerializer; +type CompanyBrandSerializer = { stage?: string; verified_on?: string; - verified_by?: UserSchema; + verified_by?: UserSerializer; created_on?: string; - created_by?: UserSchema; - company?: CompanySchema; + created_by?: UserSerializer; + company?: CompanySerializer; warnings?: any; modified_on?: string; uid?: number; reject_reason?: string; - brand?: GetBrandResponseSchema; - modified_by?: UserSchema; + brand?: GetBrandResponseSerializer; + modified_by?: UserSerializer; }; /** @returns {Page} */ declare function Page(): Page; @@ -762,135 +762,135 @@ type Page = { */ size?: number; }; -/** @returns {CompanyBrandListSchema} */ -declare function CompanyBrandListSchema(): CompanyBrandListSchema; -type CompanyBrandListSchema = { - items?: CompanyBrandSchema[]; +/** @returns {CompanyBrandListSerializer} */ +declare function CompanyBrandListSerializer(): CompanyBrandListSerializer; +type CompanyBrandListSerializer = { + items?: CompanyBrandSerializer[]; page?: Page; }; -/** @returns {CompanyBrandPostRequestSchema} */ -declare function CompanyBrandPostRequestSchema(): CompanyBrandPostRequestSchema; -type CompanyBrandPostRequestSchema = { +/** @returns {CompanyBrandPostRequestSerializer} */ +declare function CompanyBrandPostRequestSerializer(): CompanyBrandPostRequestSerializer; +type CompanyBrandPostRequestSerializer = { uid?: number; brands: number[]; company: number; }; -/** @returns {InvoiceCredSchema} */ -declare function InvoiceCredSchema(): InvoiceCredSchema; -type InvoiceCredSchema = { +/** @returns {InvoiceCredSerializer} */ +declare function InvoiceCredSerializer(): InvoiceCredSerializer; +type InvoiceCredSerializer = { username?: string; enabled?: boolean; password?: string; }; -/** @returns {InvoiceDetailsSchema} */ -declare function InvoiceDetailsSchema(): InvoiceDetailsSchema; -type InvoiceDetailsSchema = { - e_invoice?: InvoiceCredSchema; - e_waybill?: InvoiceCredSchema; +/** @returns {InvoiceDetailsSerializer} */ +declare function InvoiceDetailsSerializer(): InvoiceDetailsSerializer; +type InvoiceDetailsSerializer = { + e_invoice?: InvoiceCredSerializer; + e_waybill?: InvoiceCredSerializer; }; -/** @returns {GetCompanySchema} */ -declare function GetCompanySchema(): GetCompanySchema; -type GetCompanySchema = { +/** @returns {GetCompanySerializer} */ +declare function GetCompanySerializer(): GetCompanySerializer; +type GetCompanySerializer = { stage?: string; verified_on?: string; - verified_by?: UserSchema; + verified_by?: UserSerializer; created_on?: string; - created_by?: UserSchema; + created_by?: UserSerializer; company_type?: string; modified_on?: string; business_type?: string; - addresses?: GetAddressSchema[]; + addresses?: GetAddressSerializer[]; uid?: number; reject_reason?: string; name?: string; - modified_by?: UserSchema; + modified_by?: UserSerializer; }; -/** @returns {LocationManagerSchema} */ -declare function LocationManagerSchema(): LocationManagerSchema; -type LocationManagerSchema = { +/** @returns {LocationManagerSerializer} */ +declare function LocationManagerSerializer(): LocationManagerSerializer; +type LocationManagerSerializer = { email?: string; mobile_no: SellerPhoneNumber; name?: string; }; -/** @returns {LocationTimingSchema} */ -declare function LocationTimingSchema(): LocationTimingSchema; -type LocationTimingSchema = { +/** @returns {LocationTimingSerializer} */ +declare function LocationTimingSerializer(): LocationTimingSerializer; +type LocationTimingSerializer = { hour: number; minute: number; }; -/** @returns {LocationDayWiseSchema} */ -declare function LocationDayWiseSchema(): LocationDayWiseSchema; -type LocationDayWiseSchema = { +/** @returns {LocationDayWiseSerializer} */ +declare function LocationDayWiseSerializer(): LocationDayWiseSerializer; +type LocationDayWiseSerializer = { open: boolean; weekday: string; - opening?: LocationTimingSchema; - closing?: LocationTimingSchema; + opening?: LocationTimingSerializer; + closing?: LocationTimingSerializer; }; -/** @returns {HolidayDateSchema} */ -declare function HolidayDateSchema(): HolidayDateSchema; -type HolidayDateSchema = { +/** @returns {HolidayDateSerializer} */ +declare function HolidayDateSerializer(): HolidayDateSerializer; +type HolidayDateSerializer = { end_date: string; start_date: string; }; -/** @returns {HolidaySchemaSchema} */ -declare function HolidaySchemaSchema(): HolidaySchemaSchema; -type HolidaySchemaSchema = { - date: HolidayDateSchema; +/** @returns {HolidaySchemaSerializer} */ +declare function HolidaySchemaSerializer(): HolidaySchemaSerializer; +type HolidaySchemaSerializer = { + date: HolidayDateSerializer; title: string; holiday_type: string; }; -/** @returns {ProductReturnConfigSchema} */ -declare function ProductReturnConfigSchema(): ProductReturnConfigSchema; -type ProductReturnConfigSchema = { +/** @returns {ProductReturnConfigSerializer} */ +declare function ProductReturnConfigSerializer(): ProductReturnConfigSerializer; +type ProductReturnConfigSerializer = { on_same_store?: boolean; store_uid?: number; }; -/** @returns {GetLocationSchema} */ -declare function GetLocationSchema(): GetLocationSchema; -type GetLocationSchema = { +/** @returns {GetLocationSerializer} */ +declare function GetLocationSerializer(): GetLocationSerializer; +type GetLocationSerializer = { code: string; phone_number?: string; contact_numbers?: SellerPhoneNumber[]; - gst_credentials?: InvoiceDetailsSchema; + gst_credentials?: InvoiceDetailsSerializer; name: string; _custom_json?: any; verified_on?: string; - created_by?: UserSchema; + created_by?: UserSerializer; created_on?: string; - company?: GetCompanySchema; - address: GetAddressSchema; + company?: GetCompanySerializer; + address: GetAddressSerializer; warnings?: any; store_type?: string; - manager?: LocationManagerSchema; + manager?: LocationManagerSerializer; auto_invoice?: boolean; modified_on?: string; uid?: number; - timing?: LocationDayWiseSchema[]; + timing?: LocationDayWiseSerializer[]; stage?: string; documents?: Document[]; credit_note?: boolean; - holiday?: HolidaySchemaSchema[]; + holiday?: HolidaySchemaSerializer[]; display_name: string; - product_return_config?: ProductReturnConfigSchema; - verified_by?: UserSchema; + product_return_config?: ProductReturnConfigSerializer; + verified_by?: UserSerializer; notification_emails?: string[]; - modified_by?: UserSchema; + modified_by?: UserSerializer; tags?: string[]; default_order_acceptance_timing?: boolean; - order_acceptance_timing?: LocationDayWiseSchema[]; + order_acceptance_timing?: LocationDayWiseSerializer[]; avg_order_processing_time?: AverageOrderProcessingTime; bulk_shipment?: boolean; auto_assign_courier_partner?: boolean; }; -/** @returns {LocationListSchema} */ -declare function LocationListSchema(): LocationListSchema; -type LocationListSchema = { - items?: GetLocationSchema[]; +/** @returns {LocationListSerializer} */ +declare function LocationListSerializer(): LocationListSerializer; +type LocationListSerializer = { + items?: GetLocationSerializer[]; page?: Page; }; -/** @returns {AddressSchema} */ -declare function AddressSchema(): AddressSchema; -type AddressSchema = { +/** @returns {AddressSerializer} */ +declare function AddressSerializer(): AddressSerializer; +type AddressSerializer = { landmark?: string; country_code: string; pincode?: number; @@ -905,27 +905,27 @@ type AddressSchema = { city?: string; latitude: number; }; -/** @returns {LocationSchema} */ -declare function LocationSchema(): LocationSchema; -type LocationSchema = { +/** @returns {LocationSerializer} */ +declare function LocationSerializer(): LocationSerializer; +type LocationSerializer = { code: string; - gst_credentials?: InvoiceDetailsSchema; + gst_credentials?: InvoiceDetailsSerializer; contact_numbers?: SellerPhoneNumber[]; name: string; _custom_json?: any; warnings?: any; - address: AddressSchema; + address: AddressSerializer; company: number; store_type?: string; - manager?: LocationManagerSchema; + manager?: LocationManagerSerializer; auto_invoice?: boolean; uid?: number; - timing?: LocationDayWiseSchema[]; + timing?: LocationDayWiseSerializer[]; stage?: string; documents: Document[]; credit_note?: boolean; - holiday?: HolidaySchemaSchema[]; - product_return_config?: ProductReturnConfigSchema; + holiday?: HolidaySchemaSerializer[]; + product_return_config?: ProductReturnConfigSerializer; display_name: string; notification_emails?: string[]; tags?: string[]; @@ -938,15 +938,15 @@ type LocationSchema = { * - Order * acceptance timing of the store */ - order_acceptance_timing?: LocationDayWiseSchema[]; + order_acceptance_timing?: LocationDayWiseSerializer[]; avg_order_processing_time?: AverageOrderProcessingTime; bulk_shipment?: boolean; auto_assign_courier_partner?: boolean; }; -/** @returns {BulkLocationSchema} */ -declare function BulkLocationSchema(): BulkLocationSchema; -type BulkLocationSchema = { - data?: LocationSchema[]; +/** @returns {BulkLocationSerializer} */ +declare function BulkLocationSerializer(): BulkLocationSerializer; +type BulkLocationSerializer = { + data?: LocationSerializer[]; }; /** @returns {AverageOrderProcessingTime} */ declare function AverageOrderProcessingTime(): AverageOrderProcessingTime; diff --git a/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js b/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js index 6a20553b2..7bdd5f29b 100644 --- a/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +++ b/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js @@ -1,14 +1,14 @@ const Joi = require("joi"); /** - * @typedef CompanyTaxesSchema + * @typedef CompanyTaxesSerializer * @property {string} [effective_date] * @property {number} [rate] * @property {boolean} [enable] */ /** - * @typedef UserSchema + * @typedef UserSerializer * @property {string} [user_id] * @property {string} [contact] * @property {string} [username] @@ -61,7 +61,7 @@ const Joi = require("joi"); */ /** - * @typedef GetAddressSchema + * @typedef GetAddressSerializer * @property {string} [landmark] * @property {string} [country_code] * @property {number} [pincode] @@ -78,14 +78,14 @@ const Joi = require("joi"); */ /** - * @typedef GetCompanyProfileSerializerResponseSchema + * @typedef GetCompanyProfileSerializerResponse * @property {string} [business_info] - * @property {CompanyTaxesSchema[]} [taxes] + * @property {CompanyTaxesSerializer[]} [taxes] * @property {string} [business_type] * @property {string} [name] * @property {Object} [_custom_json] * @property {string} [verified_on] - * @property {UserSchema} [created_by] + * @property {UserSerializer} [created_by] * @property {string} [created_on] * @property {Object} [warnings] * @property {BusinessDetails} [business_details] @@ -98,14 +98,14 @@ const Joi = require("joi"); * @property {string} [stage] * @property {string} company_type * @property {Document[]} [documents] - * @property {GetAddressSchema[]} [addresses] - * @property {UserSchema} [verified_by] + * @property {GetAddressSerializer[]} [addresses] + * @property {UserSerializer} [verified_by] * @property {string[]} [notification_emails] - * @property {UserSchema} [modified_by] + * @property {UserSerializer} [modified_by] */ /** - * @typedef ErrorResponseSchema + * @typedef ErrorResponse * @property {string} [message] * @property {string} [code] * @property {number} [status] @@ -120,7 +120,7 @@ const Joi = require("joi"); */ /** - * @typedef CreateUpdateAddressSchema + * @typedef CreateUpdateAddressSerializer * @property {string} [landmark] * @property {string} [country_code] * @property {number} pincode @@ -145,7 +145,7 @@ const Joi = require("joi"); * @property {BusinessDetails} [business_details] * @property {Document[]} [documents] * @property {string} [business_type] - * @property {CreateUpdateAddressSchema[]} [addresses] + * @property {CreateUpdateAddressSerializer[]} [addresses] * @property {string[]} [notification_emails] * @property {ContactDetails} [contact_details] * @property {string} [reject_reason] @@ -153,7 +153,7 @@ const Joi = require("joi"); */ /** - * @typedef ProfileSuccessResponseSchema + * @typedef ProfileSuccessResponse * @property {number} [uid] * @property {string} [message] * @property {boolean} [success] @@ -166,7 +166,7 @@ const Joi = require("joi"); */ /** - * @typedef MetricsSchema + * @typedef MetricsSerializer * @property {string} [stage] * @property {DocumentsObj} [store] * @property {DocumentsObj} [company_documents] @@ -177,19 +177,19 @@ const Joi = require("joi"); */ /** - * @typedef BrandBannerSchema + * @typedef BrandBannerSerializer * @property {string} portrait * @property {string} landscape */ /** - * @typedef GetBrandResponseSchema - * @property {UserSchema} [modified_by] - * @property {BrandBannerSchema} [banner] + * @typedef GetBrandResponseSerializer + * @property {UserSerializer} [modified_by] + * @property {BrandBannerSerializer} [banner] * @property {string} name * @property {Object} [_custom_json] * @property {string} [verified_on] - * @property {UserSchema} [created_by] + * @property {UserSerializer} [created_by] * @property {string} [created_on] * @property {Object} [warnings] * @property {Object} [_locale_language] @@ -199,14 +199,14 @@ const Joi = require("joi"); * @property {number} [uid] * @property {string} [reject_reason] * @property {string} [stage] - * @property {UserSchema} [verified_by] + * @property {UserSerializer} [verified_by] * @property {string} [slug_key] * @property {string} [logo] * @property {string} [description] */ /** - * @typedef CreateBrandRequestSchema + * @typedef CreateBrandRequestSerializer * @property {Object} [_custom_json] * @property {Object} [_locale_language] * @property {string[]} [synonyms] @@ -215,13 +215,13 @@ const Joi = require("joi"); * @property {string} logo * @property {string} [brand_tier] * @property {number} [uid] - * @property {BrandBannerSchema} banner + * @property {BrandBannerSerializer} banner * @property {string} name * @property {string} [slug_key] */ /** - * @typedef UpdateBrandRequestSchema + * @typedef UpdateBrandRequestSerializer * @property {Object} [_custom_json] * @property {Object} [_locale_language] * @property {string[]} [synonyms] @@ -230,7 +230,7 @@ const Joi = require("joi"); * @property {string} logo * @property {string} [brand_tier] * @property {number} [uid] - * @property {BrandBannerSchema} banner + * @property {BrandBannerSerializer} banner * @property {string} name */ @@ -247,41 +247,41 @@ const Joi = require("joi"); */ /** - * @typedef CompanySchema + * @typedef CompanySerializer * @property {string} [stage] * @property {Object} [_custom_json] * @property {string} [verified_on] - * @property {UserSchema} [verified_by] + * @property {UserSerializer} [verified_by] * @property {string} [created_on] - * @property {UserSchema} [created_by] + * @property {UserSerializer} [created_by] * @property {string} company_type * @property {string} [modified_on] * @property {string[]} [market_channels] * @property {string} business_type - * @property {GetAddressSchema[]} [addresses] + * @property {GetAddressSerializer[]} [addresses] * @property {string[]} [notification_emails] * @property {CompanyDetails} [details] * @property {BusinessCountryInfo} [business_country_info] * @property {number} [uid] * @property {string} [reject_reason] * @property {string} [name] - * @property {UserSchema} [modified_by] + * @property {UserSerializer} [modified_by] */ /** - * @typedef CompanyBrandSchema + * @typedef CompanyBrandSerializer * @property {string} [stage] * @property {string} [verified_on] - * @property {UserSchema} [verified_by] + * @property {UserSerializer} [verified_by] * @property {string} [created_on] - * @property {UserSchema} [created_by] - * @property {CompanySchema} [company] + * @property {UserSerializer} [created_by] + * @property {CompanySerializer} [company] * @property {Object} [warnings] * @property {string} [modified_on] * @property {number} [uid] * @property {string} [reject_reason] - * @property {GetBrandResponseSchema} [brand] - * @property {UserSchema} [modified_by] + * @property {GetBrandResponseSerializer} [brand] + * @property {UserSerializer} [modified_by] */ /** @@ -296,133 +296,133 @@ const Joi = require("joi"); */ /** - * @typedef CompanyBrandListSchema - * @property {CompanyBrandSchema[]} [items] + * @typedef CompanyBrandListSerializer + * @property {CompanyBrandSerializer[]} [items] * @property {Page} [page] */ /** - * @typedef CompanyBrandPostRequestSchema + * @typedef CompanyBrandPostRequestSerializer * @property {number} [uid] * @property {number[]} brands * @property {number} company */ /** - * @typedef InvoiceCredSchema + * @typedef InvoiceCredSerializer * @property {string} [username] * @property {boolean} [enabled] * @property {string} [password] */ /** - * @typedef InvoiceDetailsSchema - * @property {InvoiceCredSchema} [e_invoice] - * @property {InvoiceCredSchema} [e_waybill] + * @typedef InvoiceDetailsSerializer + * @property {InvoiceCredSerializer} [e_invoice] + * @property {InvoiceCredSerializer} [e_waybill] */ /** - * @typedef GetCompanySchema + * @typedef GetCompanySerializer * @property {string} [stage] * @property {string} [verified_on] - * @property {UserSchema} [verified_by] + * @property {UserSerializer} [verified_by] * @property {string} [created_on] - * @property {UserSchema} [created_by] + * @property {UserSerializer} [created_by] * @property {string} [company_type] * @property {string} [modified_on] * @property {string} [business_type] - * @property {GetAddressSchema[]} [addresses] + * @property {GetAddressSerializer[]} [addresses] * @property {number} [uid] * @property {string} [reject_reason] * @property {string} [name] - * @property {UserSchema} [modified_by] + * @property {UserSerializer} [modified_by] */ /** - * @typedef LocationManagerSchema + * @typedef LocationManagerSerializer * @property {string} [email] * @property {SellerPhoneNumber} mobile_no * @property {string} [name] */ /** - * @typedef LocationTimingSchema + * @typedef LocationTimingSerializer * @property {number} hour * @property {number} minute */ /** - * @typedef LocationDayWiseSchema + * @typedef LocationDayWiseSerializer * @property {boolean} open * @property {string} weekday - * @property {LocationTimingSchema} [opening] - * @property {LocationTimingSchema} [closing] + * @property {LocationTimingSerializer} [opening] + * @property {LocationTimingSerializer} [closing] */ /** - * @typedef HolidayDateSchema + * @typedef HolidayDateSerializer * @property {string} end_date * @property {string} start_date */ /** - * @typedef HolidaySchemaSchema - * @property {HolidayDateSchema} date + * @typedef HolidaySchemaSerializer + * @property {HolidayDateSerializer} date * @property {string} title * @property {string} holiday_type */ /** - * @typedef ProductReturnConfigSchema + * @typedef ProductReturnConfigSerializer * @property {boolean} [on_same_store] * @property {number} [store_uid] */ /** - * @typedef GetLocationSchema + * @typedef GetLocationSerializer * @property {string} code * @property {string} [phone_number] * @property {SellerPhoneNumber[]} [contact_numbers] - * @property {InvoiceDetailsSchema} [gst_credentials] + * @property {InvoiceDetailsSerializer} [gst_credentials] * @property {string} name * @property {Object} [_custom_json] * @property {string} [verified_on] - * @property {UserSchema} [created_by] + * @property {UserSerializer} [created_by] * @property {string} [created_on] - * @property {GetCompanySchema} [company] - * @property {GetAddressSchema} address + * @property {GetCompanySerializer} [company] + * @property {GetAddressSerializer} address * @property {Object} [warnings] * @property {string} [store_type] - * @property {LocationManagerSchema} [manager] + * @property {LocationManagerSerializer} [manager] * @property {boolean} [auto_invoice] * @property {string} [modified_on] * @property {number} [uid] - * @property {LocationDayWiseSchema[]} [timing] + * @property {LocationDayWiseSerializer[]} [timing] * @property {string} [stage] * @property {Document[]} [documents] * @property {boolean} [credit_note] - * @property {HolidaySchemaSchema[]} [holiday] + * @property {HolidaySchemaSerializer[]} [holiday] * @property {string} display_name - * @property {ProductReturnConfigSchema} [product_return_config] - * @property {UserSchema} [verified_by] + * @property {ProductReturnConfigSerializer} [product_return_config] + * @property {UserSerializer} [verified_by] * @property {string[]} [notification_emails] - * @property {UserSchema} [modified_by] + * @property {UserSerializer} [modified_by] * @property {string[]} [tags] * @property {boolean} [default_order_acceptance_timing] - * @property {LocationDayWiseSchema[]} [order_acceptance_timing] + * @property {LocationDayWiseSerializer[]} [order_acceptance_timing] * @property {AverageOrderProcessingTime} [avg_order_processing_time] * @property {boolean} [bulk_shipment] * @property {boolean} [auto_assign_courier_partner] */ /** - * @typedef LocationListSchema - * @property {GetLocationSchema[]} [items] + * @typedef LocationListSerializer + * @property {GetLocationSerializer[]} [items] * @property {Page} [page] */ /** - * @typedef AddressSchema + * @typedef AddressSerializer * @property {string} [landmark] * @property {string} country_code * @property {number} [pincode] @@ -439,31 +439,31 @@ const Joi = require("joi"); */ /** - * @typedef LocationSchema + * @typedef LocationSerializer * @property {string} code - * @property {InvoiceDetailsSchema} [gst_credentials] + * @property {InvoiceDetailsSerializer} [gst_credentials] * @property {SellerPhoneNumber[]} [contact_numbers] * @property {string} name * @property {Object} [_custom_json] * @property {Object} [warnings] - * @property {AddressSchema} address + * @property {AddressSerializer} address * @property {number} company * @property {string} [store_type] - * @property {LocationManagerSchema} [manager] + * @property {LocationManagerSerializer} [manager] * @property {boolean} [auto_invoice] * @property {number} [uid] - * @property {LocationDayWiseSchema[]} [timing] + * @property {LocationDayWiseSerializer[]} [timing] * @property {string} [stage] * @property {Document[]} documents * @property {boolean} [credit_note] - * @property {HolidaySchemaSchema[]} [holiday] - * @property {ProductReturnConfigSchema} [product_return_config] + * @property {HolidaySchemaSerializer[]} [holiday] + * @property {ProductReturnConfigSerializer} [product_return_config] * @property {string} display_name * @property {string[]} [notification_emails] * @property {string[]} [tags] * @property {boolean} [default_order_acceptance_timing] - Flag to set * order_acceptance_timing as default timing - * @property {LocationDayWiseSchema[]} [order_acceptance_timing] - Order + * @property {LocationDayWiseSerializer[]} [order_acceptance_timing] - Order * acceptance timing of the store * @property {AverageOrderProcessingTime} [avg_order_processing_time] * @property {boolean} [bulk_shipment] @@ -471,8 +471,8 @@ const Joi = require("joi"); */ /** - * @typedef BulkLocationSchema - * @property {LocationSchema[]} [data] + * @typedef BulkLocationSerializer + * @property {LocationSerializer[]} [data] */ /** @@ -488,8 +488,8 @@ const Joi = require("joi"); */ class CompanyProfilePlatformModel { - /** @returns {CompanyTaxesSchema} */ - static CompanyTaxesSchema() { + /** @returns {CompanyTaxesSerializer} */ + static CompanyTaxesSerializer() { return Joi.object({ effective_date: Joi.string().allow(""), rate: Joi.number(), @@ -497,8 +497,8 @@ class CompanyProfilePlatformModel { }); } - /** @returns {UserSchema} */ - static UserSchema() { + /** @returns {UserSerializer} */ + static UserSerializer() { return Joi.object({ user_id: Joi.string().allow(""), contact: Joi.string().allow(""), @@ -566,8 +566,8 @@ class CompanyProfilePlatformModel { }); } - /** @returns {GetAddressSchema} */ - static GetAddressSchema() { + /** @returns {GetAddressSerializer} */ + static GetAddressSerializer() { return Joi.object({ landmark: Joi.string().allow(""), country_code: Joi.string().allow(""), @@ -585,20 +585,20 @@ class CompanyProfilePlatformModel { }); } - /** @returns {GetCompanyProfileSerializerResponseSchema} */ - static GetCompanyProfileSerializerResponseSchema() { + /** @returns {GetCompanyProfileSerializerResponse} */ + static GetCompanyProfileSerializerResponse() { return Joi.object({ business_info: Joi.string().allow(""), taxes: Joi.array().items( - CompanyProfilePlatformModel.CompanyTaxesSchema() + CompanyProfilePlatformModel.CompanyTaxesSerializer() ), business_type: Joi.string().allow(""), name: Joi.string().allow(""), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), verified_on: Joi.string().allow(""), - created_by: CompanyProfilePlatformModel.UserSchema(), + created_by: CompanyProfilePlatformModel.UserSerializer(), created_on: Joi.string().allow(""), - warnings: Joi.object().pattern(/\S/, Joi.any()), + warnings: Joi.any(), business_details: CompanyProfilePlatformModel.BusinessDetails(), mode: Joi.string().allow(""), contact_details: CompanyProfilePlatformModel.ContactDetails(), @@ -610,21 +610,21 @@ class CompanyProfilePlatformModel { company_type: Joi.string().allow("").required(), documents: Joi.array().items(CompanyProfilePlatformModel.Document()), addresses: Joi.array().items( - CompanyProfilePlatformModel.GetAddressSchema() + CompanyProfilePlatformModel.GetAddressSerializer() ), - verified_by: CompanyProfilePlatformModel.UserSchema(), + verified_by: CompanyProfilePlatformModel.UserSerializer(), notification_emails: Joi.array().items(Joi.string().allow("")), - modified_by: CompanyProfilePlatformModel.UserSchema(), + modified_by: CompanyProfilePlatformModel.UserSerializer(), }); } - /** @returns {ErrorResponseSchema} */ - static ErrorResponseSchema() { + /** @returns {ErrorResponse} */ + static ErrorResponse() { return Joi.object({ message: Joi.string().allow(""), code: Joi.string().allow(""), status: Joi.number(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), }); } @@ -637,8 +637,8 @@ class CompanyProfilePlatformModel { }); } - /** @returns {CreateUpdateAddressSchema} */ - static CreateUpdateAddressSchema() { + /** @returns {CreateUpdateAddressSerializer} */ + static CreateUpdateAddressSerializer() { return Joi.object({ landmark: Joi.string().allow(""), country_code: Joi.string().allow(""), @@ -659,9 +659,9 @@ class CompanyProfilePlatformModel { return Joi.object({ franchise_enabled: Joi.boolean(), business_info: Joi.string().allow(""), - warnings: Joi.object().pattern(/\S/, Joi.any()), + warnings: Joi.any(), company_type: Joi.string().allow(""), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), taxes: Joi.array().items( CompanyProfilePlatformModel.CompanyTaxesSerializer1() ), @@ -669,7 +669,7 @@ class CompanyProfilePlatformModel { documents: Joi.array().items(CompanyProfilePlatformModel.Document()), business_type: Joi.string().allow(""), addresses: Joi.array().items( - CompanyProfilePlatformModel.CreateUpdateAddressSchema() + CompanyProfilePlatformModel.CreateUpdateAddressSerializer() ), notification_emails: Joi.array().items(Joi.string().allow("")), contact_details: CompanyProfilePlatformModel.ContactDetails(), @@ -678,8 +678,8 @@ class CompanyProfilePlatformModel { }); } - /** @returns {ProfileSuccessResponseSchema} */ - static ProfileSuccessResponseSchema() { + /** @returns {ProfileSuccessResponse} */ + static ProfileSuccessResponse() { return Joi.object({ uid: Joi.number(), message: Joi.string().allow(""), @@ -695,8 +695,8 @@ class CompanyProfilePlatformModel { }); } - /** @returns {MetricsSchema} */ - static MetricsSchema() { + /** @returns {MetricsSerializer} */ + static MetricsSerializer() { return Joi.object({ stage: Joi.string().allow(""), store: CompanyProfilePlatformModel.DocumentsObj(), @@ -708,68 +708,68 @@ class CompanyProfilePlatformModel { }); } - /** @returns {BrandBannerSchema} */ - static BrandBannerSchema() { + /** @returns {BrandBannerSerializer} */ + static BrandBannerSerializer() { return Joi.object({ portrait: Joi.string().allow("").required(), landscape: Joi.string().allow("").required(), }); } - /** @returns {GetBrandResponseSchema} */ - static GetBrandResponseSchema() { + /** @returns {GetBrandResponseSerializer} */ + static GetBrandResponseSerializer() { return Joi.object({ - modified_by: CompanyProfilePlatformModel.UserSchema(), - banner: CompanyProfilePlatformModel.BrandBannerSchema(), + modified_by: CompanyProfilePlatformModel.UserSerializer(), + banner: CompanyProfilePlatformModel.BrandBannerSerializer(), name: Joi.string().allow("").required(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), verified_on: Joi.string().allow(""), - created_by: CompanyProfilePlatformModel.UserSchema(), + created_by: CompanyProfilePlatformModel.UserSerializer(), created_on: Joi.string().allow(""), - warnings: Joi.object().pattern(/\S/, Joi.any()), - _locale_language: Joi.object().pattern(/\S/, Joi.any()), + warnings: Joi.any(), + _locale_language: Joi.any(), mode: Joi.string().allow(""), synonyms: Joi.array().items(Joi.string().allow("")), modified_on: Joi.string().allow(""), uid: Joi.number(), reject_reason: Joi.string().allow(""), stage: Joi.string().allow(""), - verified_by: CompanyProfilePlatformModel.UserSchema(), + verified_by: CompanyProfilePlatformModel.UserSerializer(), slug_key: Joi.string().allow(""), logo: Joi.string().allow(""), description: Joi.string().allow(""), }); } - /** @returns {CreateBrandRequestSchema} */ - static CreateBrandRequestSchema() { + /** @returns {CreateBrandRequestSerializer} */ + static CreateBrandRequestSerializer() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - _locale_language: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), + _locale_language: Joi.any(), synonyms: Joi.array().items(Joi.string().allow("")), company_id: Joi.number(), description: Joi.string().allow(""), logo: Joi.string().allow("").required(), brand_tier: Joi.string().allow(""), uid: Joi.number(), - banner: CompanyProfilePlatformModel.BrandBannerSchema().required(), + banner: CompanyProfilePlatformModel.BrandBannerSerializer().required(), name: Joi.string().allow("").required(), slug_key: Joi.string().allow(""), }); } - /** @returns {UpdateBrandRequestSchema} */ - static UpdateBrandRequestSchema() { + /** @returns {UpdateBrandRequestSerializer} */ + static UpdateBrandRequestSerializer() { return Joi.object({ - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - _locale_language: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), + _locale_language: Joi.any(), synonyms: Joi.array().items(Joi.string().allow("")), company_id: Joi.number(), description: Joi.string().allow(""), logo: Joi.string().allow("").required(), brand_tier: Joi.string().allow(""), uid: Joi.number(), - banner: CompanyProfilePlatformModel.BrandBannerSchema().required(), + banner: CompanyProfilePlatformModel.BrandBannerSerializer().required(), name: Joi.string().allow("").required(), }); } @@ -792,21 +792,21 @@ class CompanyProfilePlatformModel { }); } - /** @returns {CompanySchema} */ - static CompanySchema() { + /** @returns {CompanySerializer} */ + static CompanySerializer() { return Joi.object({ stage: Joi.string().allow(""), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), verified_on: Joi.string().allow(""), - verified_by: CompanyProfilePlatformModel.UserSchema(), + verified_by: CompanyProfilePlatformModel.UserSerializer(), created_on: Joi.string().allow(""), - created_by: CompanyProfilePlatformModel.UserSchema(), + created_by: CompanyProfilePlatformModel.UserSerializer(), company_type: Joi.string().allow("").required(), modified_on: Joi.string().allow(""), market_channels: Joi.array().items(Joi.string().allow("")), business_type: Joi.string().allow("").required(), addresses: Joi.array().items( - CompanyProfilePlatformModel.GetAddressSchema() + CompanyProfilePlatformModel.GetAddressSerializer() ), notification_emails: Joi.array().items(Joi.string().allow("")), details: CompanyProfilePlatformModel.CompanyDetails(), @@ -814,25 +814,25 @@ class CompanyProfilePlatformModel { uid: Joi.number(), reject_reason: Joi.string().allow(""), name: Joi.string().allow(""), - modified_by: CompanyProfilePlatformModel.UserSchema(), + modified_by: CompanyProfilePlatformModel.UserSerializer(), }); } - /** @returns {CompanyBrandSchema} */ - static CompanyBrandSchema() { + /** @returns {CompanyBrandSerializer} */ + static CompanyBrandSerializer() { return Joi.object({ stage: Joi.string().allow(""), verified_on: Joi.string().allow(""), - verified_by: CompanyProfilePlatformModel.UserSchema(), + verified_by: CompanyProfilePlatformModel.UserSerializer(), created_on: Joi.string().allow(""), - created_by: CompanyProfilePlatformModel.UserSchema(), - company: CompanyProfilePlatformModel.CompanySchema(), - warnings: Joi.object().pattern(/\S/, Joi.any()), + created_by: CompanyProfilePlatformModel.UserSerializer(), + company: CompanyProfilePlatformModel.CompanySerializer(), + warnings: Joi.any(), modified_on: Joi.string().allow(""), uid: Joi.number(), reject_reason: Joi.string().allow(""), - brand: CompanyProfilePlatformModel.GetBrandResponseSchema(), - modified_by: CompanyProfilePlatformModel.UserSchema(), + brand: CompanyProfilePlatformModel.GetBrandResponseSerializer(), + modified_by: CompanyProfilePlatformModel.UserSerializer(), }); } @@ -849,18 +849,18 @@ class CompanyProfilePlatformModel { }); } - /** @returns {CompanyBrandListSchema} */ - static CompanyBrandListSchema() { + /** @returns {CompanyBrandListSerializer} */ + static CompanyBrandListSerializer() { return Joi.object({ items: Joi.array().items( - CompanyProfilePlatformModel.CompanyBrandSchema() + CompanyProfilePlatformModel.CompanyBrandSerializer() ), page: CompanyProfilePlatformModel.Page(), }); } - /** @returns {CompanyBrandPostRequestSchema} */ - static CompanyBrandPostRequestSchema() { + /** @returns {CompanyBrandPostRequestSerializer} */ + static CompanyBrandPostRequestSerializer() { return Joi.object({ uid: Joi.number(), brands: Joi.array().items(Joi.number()).required(), @@ -868,8 +868,8 @@ class CompanyProfilePlatformModel { }); } - /** @returns {InvoiceCredSchema} */ - static InvoiceCredSchema() { + /** @returns {InvoiceCredSerializer} */ + static InvoiceCredSerializer() { return Joi.object({ username: Joi.string().allow(""), enabled: Joi.boolean(), @@ -877,37 +877,37 @@ class CompanyProfilePlatformModel { }); } - /** @returns {InvoiceDetailsSchema} */ - static InvoiceDetailsSchema() { + /** @returns {InvoiceDetailsSerializer} */ + static InvoiceDetailsSerializer() { return Joi.object({ - e_invoice: CompanyProfilePlatformModel.InvoiceCredSchema(), - e_waybill: CompanyProfilePlatformModel.InvoiceCredSchema(), + e_invoice: CompanyProfilePlatformModel.InvoiceCredSerializer(), + e_waybill: CompanyProfilePlatformModel.InvoiceCredSerializer(), }); } - /** @returns {GetCompanySchema} */ - static GetCompanySchema() { + /** @returns {GetCompanySerializer} */ + static GetCompanySerializer() { return Joi.object({ stage: Joi.string().allow(""), verified_on: Joi.string().allow(""), - verified_by: CompanyProfilePlatformModel.UserSchema(), + verified_by: CompanyProfilePlatformModel.UserSerializer(), created_on: Joi.string().allow(""), - created_by: CompanyProfilePlatformModel.UserSchema(), + created_by: CompanyProfilePlatformModel.UserSerializer(), company_type: Joi.string().allow(""), modified_on: Joi.string().allow(""), business_type: Joi.string().allow(""), addresses: Joi.array().items( - CompanyProfilePlatformModel.GetAddressSchema() + CompanyProfilePlatformModel.GetAddressSerializer() ), uid: Joi.number(), reject_reason: Joi.string().allow(""), name: Joi.string().allow(""), - modified_by: CompanyProfilePlatformModel.UserSchema(), + modified_by: CompanyProfilePlatformModel.UserSerializer(), }); } - /** @returns {LocationManagerSchema} */ - static LocationManagerSchema() { + /** @returns {LocationManagerSerializer} */ + static LocationManagerSerializer() { return Joi.object({ email: Joi.string().allow(""), mobile_no: CompanyProfilePlatformModel.SellerPhoneNumber().required(), @@ -915,89 +915,89 @@ class CompanyProfilePlatformModel { }); } - /** @returns {LocationTimingSchema} */ - static LocationTimingSchema() { + /** @returns {LocationTimingSerializer} */ + static LocationTimingSerializer() { return Joi.object({ hour: Joi.number().required(), minute: Joi.number().required(), }); } - /** @returns {LocationDayWiseSchema} */ - static LocationDayWiseSchema() { + /** @returns {LocationDayWiseSerializer} */ + static LocationDayWiseSerializer() { return Joi.object({ open: Joi.boolean().required(), weekday: Joi.string().allow("").required(), - opening: CompanyProfilePlatformModel.LocationTimingSchema(), - closing: CompanyProfilePlatformModel.LocationTimingSchema(), + opening: CompanyProfilePlatformModel.LocationTimingSerializer(), + closing: CompanyProfilePlatformModel.LocationTimingSerializer(), }); } - /** @returns {HolidayDateSchema} */ - static HolidayDateSchema() { + /** @returns {HolidayDateSerializer} */ + static HolidayDateSerializer() { return Joi.object({ end_date: Joi.string().allow("").required(), start_date: Joi.string().allow("").required(), }); } - /** @returns {HolidaySchemaSchema} */ - static HolidaySchemaSchema() { + /** @returns {HolidaySchemaSerializer} */ + static HolidaySchemaSerializer() { return Joi.object({ - date: CompanyProfilePlatformModel.HolidayDateSchema().required(), + date: CompanyProfilePlatformModel.HolidayDateSerializer().required(), title: Joi.string().allow("").required(), holiday_type: Joi.string().allow("").required(), }); } - /** @returns {ProductReturnConfigSchema} */ - static ProductReturnConfigSchema() { + /** @returns {ProductReturnConfigSerializer} */ + static ProductReturnConfigSerializer() { return Joi.object({ on_same_store: Joi.boolean(), store_uid: Joi.number(), }); } - /** @returns {GetLocationSchema} */ - static GetLocationSchema() { + /** @returns {GetLocationSerializer} */ + static GetLocationSerializer() { return Joi.object({ code: Joi.string().allow("").required(), phone_number: Joi.string().allow(""), contact_numbers: Joi.array().items( CompanyProfilePlatformModel.SellerPhoneNumber() ), - gst_credentials: CompanyProfilePlatformModel.InvoiceDetailsSchema(), + gst_credentials: CompanyProfilePlatformModel.InvoiceDetailsSerializer(), name: Joi.string().allow("").required(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), verified_on: Joi.string().allow(""), - created_by: CompanyProfilePlatformModel.UserSchema(), + created_by: CompanyProfilePlatformModel.UserSerializer(), created_on: Joi.string().allow(""), - company: CompanyProfilePlatformModel.GetCompanySchema(), - address: CompanyProfilePlatformModel.GetAddressSchema().required(), - warnings: Joi.object().pattern(/\S/, Joi.any()), + company: CompanyProfilePlatformModel.GetCompanySerializer(), + address: CompanyProfilePlatformModel.GetAddressSerializer().required(), + warnings: Joi.any(), store_type: Joi.string().allow(""), - manager: CompanyProfilePlatformModel.LocationManagerSchema(), + manager: CompanyProfilePlatformModel.LocationManagerSerializer(), auto_invoice: Joi.boolean(), modified_on: Joi.string().allow(""), uid: Joi.number(), timing: Joi.array().items( - CompanyProfilePlatformModel.LocationDayWiseSchema() + CompanyProfilePlatformModel.LocationDayWiseSerializer() ), stage: Joi.string().allow(""), documents: Joi.array().items(CompanyProfilePlatformModel.Document()), credit_note: Joi.boolean(), holiday: Joi.array().items( - CompanyProfilePlatformModel.HolidaySchemaSchema() + CompanyProfilePlatformModel.HolidaySchemaSerializer() ), display_name: Joi.string().allow("").required(), - product_return_config: CompanyProfilePlatformModel.ProductReturnConfigSchema(), - verified_by: CompanyProfilePlatformModel.UserSchema(), + product_return_config: CompanyProfilePlatformModel.ProductReturnConfigSerializer(), + verified_by: CompanyProfilePlatformModel.UserSerializer(), notification_emails: Joi.array().items(Joi.string().allow("")), - modified_by: CompanyProfilePlatformModel.UserSchema(), + modified_by: CompanyProfilePlatformModel.UserSerializer(), tags: Joi.array().items(Joi.string().allow("")), default_order_acceptance_timing: Joi.boolean(), order_acceptance_timing: Joi.array().items( - CompanyProfilePlatformModel.LocationDayWiseSchema() + CompanyProfilePlatformModel.LocationDayWiseSerializer() ), avg_order_processing_time: CompanyProfilePlatformModel.AverageOrderProcessingTime(), bulk_shipment: Joi.boolean(), @@ -1005,16 +1005,18 @@ class CompanyProfilePlatformModel { }); } - /** @returns {LocationListSchema} */ - static LocationListSchema() { + /** @returns {LocationListSerializer} */ + static LocationListSerializer() { return Joi.object({ - items: Joi.array().items(CompanyProfilePlatformModel.GetLocationSchema()), + items: Joi.array().items( + CompanyProfilePlatformModel.GetLocationSerializer() + ), page: CompanyProfilePlatformModel.Page(), }); } - /** @returns {AddressSchema} */ - static AddressSchema() { + /** @returns {AddressSerializer} */ + static AddressSerializer() { return Joi.object({ landmark: Joi.string().allow(""), country_code: Joi.string().allow("").required(), @@ -1032,25 +1034,25 @@ class CompanyProfilePlatformModel { }); } - /** @returns {LocationSchema} */ - static LocationSchema() { + /** @returns {LocationSerializer} */ + static LocationSerializer() { return Joi.object({ code: Joi.string().allow("").required(), - gst_credentials: CompanyProfilePlatformModel.InvoiceDetailsSchema(), + gst_credentials: CompanyProfilePlatformModel.InvoiceDetailsSerializer(), contact_numbers: Joi.array().items( CompanyProfilePlatformModel.SellerPhoneNumber() ), name: Joi.string().allow("").required(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), - warnings: Joi.object().pattern(/\S/, Joi.any()), - address: CompanyProfilePlatformModel.AddressSchema().required(), + _custom_json: Joi.any(), + warnings: Joi.any(), + address: CompanyProfilePlatformModel.AddressSerializer().required(), company: Joi.number().required(), store_type: Joi.string().allow(""), - manager: CompanyProfilePlatformModel.LocationManagerSchema(), + manager: CompanyProfilePlatformModel.LocationManagerSerializer(), auto_invoice: Joi.boolean(), uid: Joi.number(), timing: Joi.array().items( - CompanyProfilePlatformModel.LocationDayWiseSchema() + CompanyProfilePlatformModel.LocationDayWiseSerializer() ), stage: Joi.string().allow(""), documents: Joi.array() @@ -1058,15 +1060,15 @@ class CompanyProfilePlatformModel { .required(), credit_note: Joi.boolean(), holiday: Joi.array().items( - CompanyProfilePlatformModel.HolidaySchemaSchema() + CompanyProfilePlatformModel.HolidaySchemaSerializer() ), - product_return_config: CompanyProfilePlatformModel.ProductReturnConfigSchema(), + product_return_config: CompanyProfilePlatformModel.ProductReturnConfigSerializer(), display_name: Joi.string().allow("").required(), notification_emails: Joi.array().items(Joi.string().allow("")), tags: Joi.array().items(Joi.string().allow("")), default_order_acceptance_timing: Joi.boolean(), order_acceptance_timing: Joi.array().items( - CompanyProfilePlatformModel.LocationDayWiseSchema() + CompanyProfilePlatformModel.LocationDayWiseSerializer() ), avg_order_processing_time: CompanyProfilePlatformModel.AverageOrderProcessingTime(), bulk_shipment: Joi.boolean(), @@ -1074,10 +1076,10 @@ class CompanyProfilePlatformModel { }); } - /** @returns {BulkLocationSchema} */ - static BulkLocationSchema() { + /** @returns {BulkLocationSerializer} */ + static BulkLocationSerializer() { return Joi.object({ - data: Joi.array().items(CompanyProfilePlatformModel.LocationSchema()), + data: Joi.array().items(CompanyProfilePlatformModel.LocationSerializer()), }); } diff --git a/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts b/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts index 247c4db91..b2a9ad4ad 100644 --- a/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +++ b/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts @@ -2,24 +2,24 @@ export = CompanyProfilePlatformValidator; /** @typedef CbsOnboardGetParam */ /** * @typedef CreateBrandParam - * @property {CompanyProfilePlatformModel.CreateBrandRequestSchema} body + * @property {CompanyProfilePlatformModel.CreateBrandRequestSerializer} body */ /** * @typedef CreateCompanyBrandMappingParam - * @property {CompanyProfilePlatformModel.CompanyBrandPostRequestSchema} body + * @property {CompanyProfilePlatformModel.CompanyBrandPostRequestSerializer} body */ /** * @typedef CreateLocationParam - * @property {CompanyProfilePlatformModel.LocationSchema} body + * @property {CompanyProfilePlatformModel.LocationSerializer} body */ /** * @typedef CreateLocationBulkParam - * @property {CompanyProfilePlatformModel.BulkLocationSchema} body + * @property {CompanyProfilePlatformModel.BulkLocationSerializer} body */ /** * @typedef EditBrandParam * @property {string} brandId - Id of the brand to be viewed. - * @property {CompanyProfilePlatformModel.UpdateBrandRequestSchema} body + * @property {CompanyProfilePlatformModel.UpdateBrandRequestSerializer} body */ /** * @typedef GetBrandParam @@ -63,7 +63,7 @@ export = CompanyProfilePlatformValidator; /** * @typedef UpdateLocationParam * @property {string} locationId - Id of the location which you want to edit. - * @property {CompanyProfilePlatformModel.LocationSchema} body + * @property {CompanyProfilePlatformModel.LocationSerializer} body */ declare class CompanyProfilePlatformValidator { /** @returns {CbsOnboardGetParam} */ @@ -99,23 +99,23 @@ declare namespace CompanyProfilePlatformValidator { export { CbsOnboardGetParam, CreateBrandParam, CreateCompanyBrandMappingParam, CreateLocationParam, CreateLocationBulkParam, EditBrandParam, GetBrandParam, GetBrandsParam, GetCompanyMetricsParam, GetLocationDetailParam, GetLocationTagsParam, GetLocationsParam, UpdateCompanyParam, UpdateLocationParam }; } type CreateBrandParam = { - body: CompanyProfilePlatformModel.CreateBrandRequestSchema; + body: CompanyProfilePlatformModel.CreateBrandRequestSerializer; }; type CreateCompanyBrandMappingParam = { - body: CompanyProfilePlatformModel.CompanyBrandPostRequestSchema; + body: CompanyProfilePlatformModel.CompanyBrandPostRequestSerializer; }; type CreateLocationParam = { - body: CompanyProfilePlatformModel.LocationSchema; + body: CompanyProfilePlatformModel.LocationSerializer; }; type CreateLocationBulkParam = { - body: CompanyProfilePlatformModel.BulkLocationSchema; + body: CompanyProfilePlatformModel.BulkLocationSerializer; }; type EditBrandParam = { /** * - Id of the brand to be viewed. */ brandId: string; - body: CompanyProfilePlatformModel.UpdateBrandRequestSchema; + body: CompanyProfilePlatformModel.UpdateBrandRequestSerializer; }; type GetBrandParam = { /** @@ -193,7 +193,7 @@ type UpdateLocationParam = { * - Id of the location which you want to edit. */ locationId: string; - body: CompanyProfilePlatformModel.LocationSchema; + body: CompanyProfilePlatformModel.LocationSerializer; }; type CbsOnboardGetParam = any; type GetCompanyMetricsParam = any; diff --git a/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js b/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js index 650711bcc..332bf9f4d 100644 --- a/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +++ b/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js @@ -6,28 +6,28 @@ const CompanyProfilePlatformModel = require("./CompanyProfilePlatformModel"); /** * @typedef CreateBrandParam - * @property {CompanyProfilePlatformModel.CreateBrandRequestSchema} body + * @property {CompanyProfilePlatformModel.CreateBrandRequestSerializer} body */ /** * @typedef CreateCompanyBrandMappingParam - * @property {CompanyProfilePlatformModel.CompanyBrandPostRequestSchema} body + * @property {CompanyProfilePlatformModel.CompanyBrandPostRequestSerializer} body */ /** * @typedef CreateLocationParam - * @property {CompanyProfilePlatformModel.LocationSchema} body + * @property {CompanyProfilePlatformModel.LocationSerializer} body */ /** * @typedef CreateLocationBulkParam - * @property {CompanyProfilePlatformModel.BulkLocationSchema} body + * @property {CompanyProfilePlatformModel.BulkLocationSerializer} body */ /** * @typedef EditBrandParam * @property {string} brandId - Id of the brand to be viewed. - * @property {CompanyProfilePlatformModel.UpdateBrandRequestSchema} body + * @property {CompanyProfilePlatformModel.UpdateBrandRequestSerializer} body */ /** @@ -79,7 +79,7 @@ const CompanyProfilePlatformModel = require("./CompanyProfilePlatformModel"); /** * @typedef UpdateLocationParam * @property {string} locationId - Id of the location which you want to edit. - * @property {CompanyProfilePlatformModel.LocationSchema} body + * @property {CompanyProfilePlatformModel.LocationSerializer} body */ class CompanyProfilePlatformValidator { @@ -91,28 +91,28 @@ class CompanyProfilePlatformValidator { /** @returns {CreateBrandParam} */ static createBrand() { return Joi.object({ - body: CompanyProfilePlatformModel.CreateBrandRequestSchema().required(), + body: CompanyProfilePlatformModel.CreateBrandRequestSerializer().required(), }).required(); } /** @returns {CreateCompanyBrandMappingParam} */ static createCompanyBrandMapping() { return Joi.object({ - body: CompanyProfilePlatformModel.CompanyBrandPostRequestSchema().required(), + body: CompanyProfilePlatformModel.CompanyBrandPostRequestSerializer().required(), }).required(); } /** @returns {CreateLocationParam} */ static createLocation() { return Joi.object({ - body: CompanyProfilePlatformModel.LocationSchema().required(), + body: CompanyProfilePlatformModel.LocationSerializer().required(), }).required(); } /** @returns {CreateLocationBulkParam} */ static createLocationBulk() { return Joi.object({ - body: CompanyProfilePlatformModel.BulkLocationSchema().required(), + body: CompanyProfilePlatformModel.BulkLocationSerializer().required(), }).required(); } @@ -120,7 +120,7 @@ class CompanyProfilePlatformValidator { static editBrand() { return Joi.object({ brandId: Joi.string().allow("").required(), - body: CompanyProfilePlatformModel.UpdateBrandRequestSchema().required(), + body: CompanyProfilePlatformModel.UpdateBrandRequestSerializer().required(), }).required(); } @@ -182,7 +182,7 @@ class CompanyProfilePlatformValidator { static updateLocation() { return Joi.object({ locationId: Joi.string().allow("").required(), - body: CompanyProfilePlatformModel.LocationSchema().required(), + body: CompanyProfilePlatformModel.LocationSerializer().required(), }).required(); } } diff --git a/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts b/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts index 4f467e615..707a9baf6 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +++ b/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts @@ -19,26 +19,24 @@ declare class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name changeDomainType * @summary: Update domain * @description: Modify the type of a specific domain. Primary domain is used as the URL of your website. Short link domain is comparatively smaller and used while generating short links. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/changeDomainType/). */ - changeDomainType({ body, requestHeaders }?: ConfigurationPlatformApplicationValidator.ChangeDomainTypeParam, { responseHeaders }?: object): Promise; + changeDomainType({ body, requestHeaders }?: ConfigurationPlatformApplicationValidator.ChangeDomainTypeParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformApplicationValidator.GetAppApiTokensParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAppApiTokens * @summary: Get sales channel API tokens * @description: Retrieve the tokens used for integrating Firebase, MoEngage, Segment, GTM, Freshchat, Safetynet, Google Map, Google, and Facebook auth. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppApiTokens/). */ - getAppApiTokens({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getAppApiTokens({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformApplicationValidator.GetAppBasicDetailsParam} arg * - Arg object @@ -57,13 +55,12 @@ declare class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAppCompanies * @summary: List sales channel companies * @description: Retrieve info of all the companies (e.g. name, uid, and company type) whose inventory is fetched into the current sales channel sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppCompanies/). */ - getAppCompanies({ uid, pageNo, pageSize, requestHeaders }?: ConfigurationPlatformApplicationValidator.GetAppCompaniesParam, { responseHeaders }?: object): Promise; + getAppCompanies({ uid, pageNo, pageSize, requestHeaders }?: ConfigurationPlatformApplicationValidator.GetAppCompaniesParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformApplicationValidator.GetAppContactInfoParam} arg * - Arg object @@ -96,41 +93,38 @@ declare class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getAppFeatures * @summary: Get sales channel * @description: Shows feature configuration of sales channel websites, such as product detail, landing page, options in the login/registration screen, home page, listing page, reward points, communication opt-in, cart options and many more. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppFeatures/). */ - getAppFeatures({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getAppFeatures({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformApplicationValidator.GetAppStoresParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAppStores * @summary: list sales channel stores * @description: Retrieve information of all the companies (e.g. uid, name, display name, store type, store code and company id) whose inventory is fetched into the current sales channel sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppStores/). */ - getAppStores({ pageNo, pageSize, requestHeaders }?: ConfigurationPlatformApplicationValidator.GetAppStoresParam, { responseHeaders }?: object): Promise; + getAppStores({ pageNo, pageSize, requestHeaders }?: ConfigurationPlatformApplicationValidator.GetAppStoresParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformApplicationValidator.GetAppSupportedCurrencyParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getAppSupportedCurrency * @summary: List supported currencies * @description: Retrieve a list of supported currencies for the sales channel. A list of currencies allowed in the current sales channel. Moreover, get the name, code, symbol, and the decimal digits of the currencies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppSupportedCurrency/). */ - getAppSupportedCurrency({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getAppSupportedCurrency({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformApplicationValidator.GetApplicationByIdParam} arg * - Arg object @@ -162,25 +156,23 @@ declare class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getDomainStatus * @summary: Get domain status * @description: Retrieve the status of a specific domain. Shows if the A records and TXT records of the domain correctly points to appropriate IP on Fynd Servers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getDomainStatus/). */ - getDomainStatus({ body, requestHeaders }?: ConfigurationPlatformApplicationValidator.GetDomainStatusParam, { responseHeaders }?: object): Promise; + getDomainStatus({ body, requestHeaders }?: ConfigurationPlatformApplicationValidator.GetDomainStatusParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformApplicationValidator.GetDomainsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getDomains * @summary: List domains * @description: Retrieve a list of existing domains by its sales channel id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getDomains/). */ - getDomains({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getDomains({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformApplicationValidator.GetInventoryConfigParam} arg * - Arg object @@ -213,14 +205,13 @@ declare class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getOrderingStoreCookie * @summary: Get ordering store signed cookie * @description: Use this API to get an Ordering Store signed cookie upon selecting an ordering store. This will be used by the cart service to verify a coupon against the selected ordering store in cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOrderingStoreCookie/). */ - getOrderingStoreCookie({ body, requestHeaders }?: ConfigurationPlatformApplicationValidator.GetOrderingStoreCookieParam, { responseHeaders }?: object): Promise; + getOrderingStoreCookie({ body, requestHeaders }?: ConfigurationPlatformApplicationValidator.GetOrderingStoreCookieParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformApplicationValidator.GetOrderingStoresByFilterParam} arg * - Arg object @@ -252,14 +243,13 @@ declare class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getStaffOrderingStores * @summary: Get staff ordering stores * @description: Retrieve ordering stores accessible to staff members. Retrieve the details of all stores access given to the staff member (the selling locations where the sales channel will be utilized for placing orders). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getStaffOrderingStores/). */ - getStaffOrderingStores({ pageNo, pageSize, q, requestHeaders }?: ConfigurationPlatformApplicationValidator.GetStaffOrderingStoresParam, { responseHeaders }?: object): Promise; + getStaffOrderingStores({ pageNo, pageSize, q, requestHeaders }?: ConfigurationPlatformApplicationValidator.GetStaffOrderingStoresParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformApplicationValidator.ModifyAppFeaturesParam} arg * - Arg object @@ -291,41 +281,38 @@ declare class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name removeDomainById * @summary: Remove domain * @description: Delete a specific domain from the sales channel. Delete a domain (secondary or shortlink domain) added to a sales channel. It will disable user's access to website, shared links, and other features associated with this domain. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/removeDomainById/). */ - removeDomainById({ id, requestHeaders }?: ConfigurationPlatformApplicationValidator.RemoveDomainByIdParam, { responseHeaders }?: object): Promise; + removeDomainById({ id, requestHeaders }?: ConfigurationPlatformApplicationValidator.RemoveDomainByIdParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformApplicationValidator.RemoveOrderingStoreCookieParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name removeOrderingStoreCookie * @summary: Delete Ordering Store signed cookie * @description: Use this API to unset the Ordering Store cookie upon changing the sales channel, by its domain URL, in the Universal Fynd Store app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/removeOrderingStoreCookie/). */ - removeOrderingStoreCookie({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + removeOrderingStoreCookie({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformApplicationValidator.UpdateAppApiTokensParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name updateAppApiTokens * @summary: Update sales channel API tokens * @description: Add and edit the tokens used for integrating Firebase, MoEngage, Segment, GTM, Freshchat, Safetynet, Google Map, Google and Facebook auth. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateAppApiTokens/). */ - updateAppApiTokens({ body, requestHeaders }?: ConfigurationPlatformApplicationValidator.UpdateAppApiTokensParam, { responseHeaders }?: object): Promise; + updateAppApiTokens({ body, requestHeaders }?: ConfigurationPlatformApplicationValidator.UpdateAppApiTokensParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformApplicationValidator.UpdateAppBasicDetailsParam} arg * - Arg object diff --git a/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js b/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js index e86923dfc..b18f7a1c1 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +++ b/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js @@ -100,8 +100,7 @@ class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name changeDomainType * @summary: Update domain * @description: Modify the type of a specific domain. Primary domain is used as the URL of your website. Short link domain is comparatively smaller and used while generating short links. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/changeDomainType/). @@ -157,10 +156,10 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.DomainsResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ConfigurationPlatformModel.DomainsResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -182,8 +181,7 @@ class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAppApiTokens * @summary: Get sales channel API tokens * @description: Retrieve the tokens used for integrating Firebase, MoEngage, Segment, GTM, Freshchat, Safetynet, Google Map, Google, and Facebook auth. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppApiTokens/). @@ -235,10 +233,10 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.TokenResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ConfigurationPlatformModel.TokenResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -337,8 +335,7 @@ class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAppCompanies * @summary: List sales channel companies * @description: Retrieve info of all the companies (e.g. name, uid, and company type) whose inventory is fetched into the current sales channel sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppCompanies/). @@ -401,10 +398,10 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.CompaniesResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ConfigurationPlatformModel.CompaniesResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -582,9 +579,8 @@ class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getAppFeatures * @summary: Get sales channel * @description: Shows feature configuration of sales channel websites, such as product detail, landing page, options in the login/registration screen, home page, listing page, reward points, communication opt-in, cart options and many more. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppFeatures/). @@ -636,10 +632,10 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.AppFeatureResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ConfigurationPlatformModel.AppFeatureResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -661,8 +657,7 @@ class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAppStores * @summary: list sales channel stores * @description: Retrieve information of all the companies (e.g. uid, name, display name, store type, store code and company id) whose inventory is fetched into the current sales channel sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppStores/). @@ -722,10 +717,10 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.StoresResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ConfigurationPlatformModel.StoresResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -747,9 +742,8 @@ class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getAppSupportedCurrency * @summary: List supported currencies * @description: Retrieve a list of supported currencies for the sales channel. A list of currencies allowed in the current sales channel. Moreover, get the name, code, symbol, and the decimal digits of the currencies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getAppSupportedCurrency/). @@ -801,7 +795,7 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.AppCurrencyResponseSchema().validate( + } = ConfigurationPlatformModel.AppCurrencyResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -985,9 +979,8 @@ class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getDomainStatus * @summary: Get domain status * @description: Retrieve the status of a specific domain. Shows if the A records and TXT records of the domain correctly points to appropriate IP on Fynd Servers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getDomainStatus/). @@ -1043,7 +1036,7 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.DomainStatusResponseSchema().validate( + } = ConfigurationPlatformModel.DomainStatusResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1066,8 +1059,7 @@ class Configuration { * @param {ConfigurationPlatformApplicationValidator.GetDomainsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getDomains * @summary: List domains * @description: Retrieve a list of existing domains by its sales channel id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getDomains/). @@ -1119,10 +1111,10 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.DomainsResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ConfigurationPlatformModel.DomainsResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1300,9 +1292,8 @@ class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getOrderingStoreCookie * @summary: Get ordering store signed cookie * @description: Use this API to get an Ordering Store signed cookie upon selecting an ordering store. This will be used by the cart service to verify a coupon against the selected ordering store in cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOrderingStoreCookie/). @@ -1358,7 +1349,7 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.SuccessMessageResponseSchema().validate( + } = ConfigurationPlatformModel.SuccessMessageResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1552,9 +1543,8 @@ class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getStaffOrderingStores * @summary: Get staff ordering stores * @description: Retrieve ordering stores accessible to staff members. Retrieve the details of all stores access given to the staff member (the selling locations where the sales channel will be utilized for placing orders). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getStaffOrderingStores/). @@ -1617,7 +1607,7 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.OrderingStoresResponseSchema().validate( + } = ConfigurationPlatformModel.OrderingStoresResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1805,9 +1795,8 @@ class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name removeDomainById * @summary: Remove domain * @description: Delete a specific domain from the sales channel. Delete a domain (secondary or shortlink domain) added to a sales channel. It will disable user's access to website, shared links, and other features associated with this domain. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/removeDomainById/). @@ -1863,7 +1852,7 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.SuccessMessageResponseSchema().validate( + } = ConfigurationPlatformModel.SuccessMessageResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1888,9 +1877,8 @@ class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name removeOrderingStoreCookie * @summary: Delete Ordering Store signed cookie * @description: Use this API to unset the Ordering Store cookie upon changing the sales channel, by its domain URL, in the Universal Fynd Store app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/removeOrderingStoreCookie/). @@ -1942,7 +1930,7 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.SuccessMessageResponseSchema().validate( + } = ConfigurationPlatformModel.SuccessMessageResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1967,8 +1955,7 @@ class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name updateAppApiTokens * @summary: Update sales channel API tokens * @description: Add and edit the tokens used for integrating Firebase, MoEngage, Segment, GTM, Freshchat, Safetynet, Google Map, Google and Facebook auth. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/updateAppApiTokens/). @@ -2024,10 +2011,10 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.TokenResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ConfigurationPlatformModel.TokenResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { diff --git a/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts b/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts index 52005cba0..2ee467447 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +++ b/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts @@ -1,11 +1,11 @@ export = ConfigurationPlatformApplicationValidator; /** * @typedef AddDomainParam - * @property {ConfigurationPlatformModel.DomainAddRequestSchema} body + * @property {ConfigurationPlatformModel.DomainAddRequest} body */ /** * @typedef ChangeDomainTypeParam - * @property {ConfigurationPlatformModel.UpdateDomainTypeRequestSchema} body + * @property {ConfigurationPlatformModel.UpdateDomainTypeRequest} body */ /** @typedef GetAppApiTokensParam */ /** @typedef GetAppBasicDetailsParam */ @@ -36,14 +36,14 @@ export = ConfigurationPlatformApplicationValidator; */ /** * @typedef GetDomainStatusParam - * @property {ConfigurationPlatformModel.DomainStatusRequestSchema} body + * @property {ConfigurationPlatformModel.DomainStatusRequest} body */ /** @typedef GetDomainsParam */ /** @typedef GetInventoryConfigParam */ /** @typedef GetOrderingStoreConfigParam */ /** * @typedef GetOrderingStoreCookieParam - * @property {ConfigurationPlatformModel.OrderingStoreSelectRequestSchema} body + * @property {ConfigurationPlatformModel.OrderingStoreSelectRequest} body */ /** * @typedef GetOrderingStoresByFilterParam @@ -51,7 +51,7 @@ export = ConfigurationPlatformApplicationValidator; * set of results. Default value is 1. * @property {number} [pageSize] - The number of items to retrieve in each page. * Default value is 10. - * @property {ConfigurationPlatformModel.FilterOrderingStoreRequestSchema} body + * @property {ConfigurationPlatformModel.FilterOrderingStoreRequest} body */ /** * @typedef GetPreviousVersionsParam @@ -68,7 +68,7 @@ export = ConfigurationPlatformApplicationValidator; */ /** * @typedef ModifyAppFeaturesParam - * @property {ConfigurationPlatformModel.AppFeatureRequestSchema} body + * @property {ConfigurationPlatformModel.AppFeatureRequest} body */ /** * @typedef PartiallyUpdateInventoryConfigParam @@ -81,7 +81,7 @@ export = ConfigurationPlatformApplicationValidator; /** @typedef RemoveOrderingStoreCookieParam */ /** * @typedef UpdateAppApiTokensParam - * @property {ConfigurationPlatformModel.TokenResponseSchema} body + * @property {ConfigurationPlatformModel.TokenResponse} body */ /** * @typedef UpdateAppBasicDetailsParam @@ -97,13 +97,13 @@ export = ConfigurationPlatformApplicationValidator; */ /** * @typedef UpdateAppFeaturesParam - * @property {ConfigurationPlatformModel.AppFeatureRequestSchema} body + * @property {ConfigurationPlatformModel.AppFeatureRequest} body */ /** * @typedef UpdateBuildConfigParam * @property {string} platformType - The device platform for which the mobile * app is built, e.g. android, ios. - * @property {ConfigurationPlatformModel.MobileAppConfigRequestSchema} body + * @property {ConfigurationPlatformModel.MobileAppConfigRequest} body */ /** * @typedef UpdateInventoryConfigParam @@ -183,10 +183,10 @@ declare namespace ConfigurationPlatformApplicationValidator { export { AddDomainParam, ChangeDomainTypeParam, GetAppApiTokensParam, GetAppBasicDetailsParam, GetAppCompaniesParam, GetAppContactInfoParam, GetAppCurrencyConfigParam, GetAppFeaturesParam, GetAppStoresParam, GetAppSupportedCurrencyParam, GetApplicationByIdParam, GetBuildConfigParam, GetDomainStatusParam, GetDomainsParam, GetInventoryConfigParam, GetOrderingStoreConfigParam, GetOrderingStoreCookieParam, GetOrderingStoresByFilterParam, GetPreviousVersionsParam, GetStaffOrderingStoresParam, ModifyAppFeaturesParam, PartiallyUpdateInventoryConfigParam, RemoveDomainByIdParam, RemoveOrderingStoreCookieParam, UpdateAppApiTokensParam, UpdateAppBasicDetailsParam, UpdateAppContactInfoParam, UpdateAppCurrencyConfigParam, UpdateAppFeaturesParam, UpdateBuildConfigParam, UpdateInventoryConfigParam, UpdateOrderingStoreConfigParam }; } type AddDomainParam = { - body: ConfigurationPlatformModel.DomainAddRequestSchema; + body: ConfigurationPlatformModel.DomainAddRequest; }; type ChangeDomainTypeParam = { - body: ConfigurationPlatformModel.UpdateDomainTypeRequestSchema; + body: ConfigurationPlatformModel.UpdateDomainTypeRequest; }; type GetAppCompaniesParam = { /** @@ -224,10 +224,10 @@ type GetBuildConfigParam = { platformType: string; }; type GetDomainStatusParam = { - body: ConfigurationPlatformModel.DomainStatusRequestSchema; + body: ConfigurationPlatformModel.DomainStatusRequest; }; type GetOrderingStoreCookieParam = { - body: ConfigurationPlatformModel.OrderingStoreSelectRequestSchema; + body: ConfigurationPlatformModel.OrderingStoreSelectRequest; }; type GetOrderingStoresByFilterParam = { /** @@ -240,7 +240,7 @@ type GetOrderingStoresByFilterParam = { * Default value is 10. */ pageSize?: number; - body: ConfigurationPlatformModel.FilterOrderingStoreRequestSchema; + body: ConfigurationPlatformModel.FilterOrderingStoreRequest; }; type GetPreviousVersionsParam = { /** @@ -266,7 +266,7 @@ type GetStaffOrderingStoresParam = { q?: string; }; type ModifyAppFeaturesParam = { - body: ConfigurationPlatformModel.AppFeatureRequestSchema; + body: ConfigurationPlatformModel.AppFeatureRequest; }; type PartiallyUpdateInventoryConfigParam = { body: ConfigurationPlatformModel.AppInventoryPartialUpdate; @@ -278,7 +278,7 @@ type RemoveDomainByIdParam = { id: string; }; type UpdateAppApiTokensParam = { - body: ConfigurationPlatformModel.TokenResponseSchema; + body: ConfigurationPlatformModel.TokenResponse; }; type UpdateAppBasicDetailsParam = { body: ConfigurationPlatformModel.ApplicationDetail; @@ -290,7 +290,7 @@ type UpdateAppCurrencyConfigParam = { body: ConfigurationPlatformModel.AppSupportedCurrency; }; type UpdateAppFeaturesParam = { - body: ConfigurationPlatformModel.AppFeatureRequestSchema; + body: ConfigurationPlatformModel.AppFeatureRequest; }; type UpdateBuildConfigParam = { /** @@ -298,7 +298,7 @@ type UpdateBuildConfigParam = { * app is built, e.g. android, ios. */ platformType: string; - body: ConfigurationPlatformModel.MobileAppConfigRequestSchema; + body: ConfigurationPlatformModel.MobileAppConfigRequest; }; type UpdateInventoryConfigParam = { body: ConfigurationPlatformModel.ApplicationInventory; diff --git a/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js b/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js index 98888b419..ee47ee9de 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +++ b/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js @@ -4,12 +4,12 @@ const ConfigurationPlatformModel = require("./ConfigurationPlatformModel"); /** * @typedef AddDomainParam - * @property {ConfigurationPlatformModel.DomainAddRequestSchema} body + * @property {ConfigurationPlatformModel.DomainAddRequest} body */ /** * @typedef ChangeDomainTypeParam - * @property {ConfigurationPlatformModel.UpdateDomainTypeRequestSchema} body + * @property {ConfigurationPlatformModel.UpdateDomainTypeRequest} body */ /** @typedef GetAppApiTokensParam */ @@ -51,7 +51,7 @@ const ConfigurationPlatformModel = require("./ConfigurationPlatformModel"); /** * @typedef GetDomainStatusParam - * @property {ConfigurationPlatformModel.DomainStatusRequestSchema} body + * @property {ConfigurationPlatformModel.DomainStatusRequest} body */ /** @typedef GetDomainsParam */ @@ -62,7 +62,7 @@ const ConfigurationPlatformModel = require("./ConfigurationPlatformModel"); /** * @typedef GetOrderingStoreCookieParam - * @property {ConfigurationPlatformModel.OrderingStoreSelectRequestSchema} body + * @property {ConfigurationPlatformModel.OrderingStoreSelectRequest} body */ /** @@ -71,7 +71,7 @@ const ConfigurationPlatformModel = require("./ConfigurationPlatformModel"); * set of results. Default value is 1. * @property {number} [pageSize] - The number of items to retrieve in each page. * Default value is 10. - * @property {ConfigurationPlatformModel.FilterOrderingStoreRequestSchema} body + * @property {ConfigurationPlatformModel.FilterOrderingStoreRequest} body */ /** @@ -91,7 +91,7 @@ const ConfigurationPlatformModel = require("./ConfigurationPlatformModel"); /** * @typedef ModifyAppFeaturesParam - * @property {ConfigurationPlatformModel.AppFeatureRequestSchema} body + * @property {ConfigurationPlatformModel.AppFeatureRequest} body */ /** @@ -108,7 +108,7 @@ const ConfigurationPlatformModel = require("./ConfigurationPlatformModel"); /** * @typedef UpdateAppApiTokensParam - * @property {ConfigurationPlatformModel.TokenResponseSchema} body + * @property {ConfigurationPlatformModel.TokenResponse} body */ /** @@ -128,14 +128,14 @@ const ConfigurationPlatformModel = require("./ConfigurationPlatformModel"); /** * @typedef UpdateAppFeaturesParam - * @property {ConfigurationPlatformModel.AppFeatureRequestSchema} body + * @property {ConfigurationPlatformModel.AppFeatureRequest} body */ /** * @typedef UpdateBuildConfigParam * @property {string} platformType - The device platform for which the mobile * app is built, e.g. android, ios. - * @property {ConfigurationPlatformModel.MobileAppConfigRequestSchema} body + * @property {ConfigurationPlatformModel.MobileAppConfigRequest} body */ /** @@ -152,14 +152,14 @@ class ConfigurationPlatformApplicationValidator { /** @returns {AddDomainParam} */ static addDomain() { return Joi.object({ - body: ConfigurationPlatformModel.DomainAddRequestSchema().required(), + body: ConfigurationPlatformModel.DomainAddRequest().required(), }).required(); } /** @returns {ChangeDomainTypeParam} */ static changeDomainType() { return Joi.object({ - body: ConfigurationPlatformModel.UpdateDomainTypeRequestSchema().required(), + body: ConfigurationPlatformModel.UpdateDomainTypeRequest().required(), }).required(); } @@ -225,7 +225,7 @@ class ConfigurationPlatformApplicationValidator { /** @returns {GetDomainStatusParam} */ static getDomainStatus() { return Joi.object({ - body: ConfigurationPlatformModel.DomainStatusRequestSchema().required(), + body: ConfigurationPlatformModel.DomainStatusRequest().required(), }).required(); } @@ -247,7 +247,7 @@ class ConfigurationPlatformApplicationValidator { /** @returns {GetOrderingStoreCookieParam} */ static getOrderingStoreCookie() { return Joi.object({ - body: ConfigurationPlatformModel.OrderingStoreSelectRequestSchema().required(), + body: ConfigurationPlatformModel.OrderingStoreSelectRequest().required(), }).required(); } @@ -256,7 +256,7 @@ class ConfigurationPlatformApplicationValidator { return Joi.object({ pageNo: Joi.number(), pageSize: Joi.number(), - body: ConfigurationPlatformModel.FilterOrderingStoreRequestSchema().required(), + body: ConfigurationPlatformModel.FilterOrderingStoreRequest().required(), }).required(); } @@ -279,7 +279,7 @@ class ConfigurationPlatformApplicationValidator { /** @returns {ModifyAppFeaturesParam} */ static modifyAppFeatures() { return Joi.object({ - body: ConfigurationPlatformModel.AppFeatureRequestSchema().required(), + body: ConfigurationPlatformModel.AppFeatureRequest().required(), }).required(); } @@ -305,7 +305,7 @@ class ConfigurationPlatformApplicationValidator { /** @returns {UpdateAppApiTokensParam} */ static updateAppApiTokens() { return Joi.object({ - body: ConfigurationPlatformModel.TokenResponseSchema().required(), + body: ConfigurationPlatformModel.TokenResponse().required(), }).required(); } @@ -333,7 +333,7 @@ class ConfigurationPlatformApplicationValidator { /** @returns {UpdateAppFeaturesParam} */ static updateAppFeatures() { return Joi.object({ - body: ConfigurationPlatformModel.AppFeatureRequestSchema().required(), + body: ConfigurationPlatformModel.AppFeatureRequest().required(), }).required(); } @@ -341,7 +341,7 @@ class ConfigurationPlatformApplicationValidator { static updateBuildConfig() { return Joi.object({ platformType: Joi.string().allow("").required(), - body: ConfigurationPlatformModel.MobileAppConfigRequestSchema().required(), + body: ConfigurationPlatformModel.MobileAppConfigRequest().required(), }).required(); } diff --git a/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts b/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts index 829e3fcbe..bb5dd5950 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +++ b/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts @@ -6,101 +6,82 @@ declare class Configuration { * @param {ConfigurationPlatformValidator.CreateApplicationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name createApplication * @summary: Create sales channel * @description: Generate and add a new sales channel. sales channels are sales channel websites which can be configured, personalized and customized. Use this API to create a new sales channel in the current company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/createApplication/). */ - createApplication({ body, requestHeaders }?: ConfigurationPlatformValidator.CreateApplicationParam, { responseHeaders }?: object): Promise; + createApplication({ body, requestHeaders }?: ConfigurationPlatformValidator.CreateApplicationParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformValidator.GetApplicationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getApplications * @summary: List sales channel stores * @description: Retrieve a list of available sales channels. sales channels are sales channel websites which can be configured, personalized and customised. Use this API to fetch a list of sales channels created within a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getApplications/). */ - getApplications({ pageNo, pageSize, q, requestHeaders }?: ConfigurationPlatformValidator.GetApplicationsParam, { responseHeaders }?: object): Promise; + getApplications({ pageNo, pageSize, q, requestHeaders }?: ConfigurationPlatformValidator.GetApplicationsParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformValidator.GetBrandsByCompanyParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getBrandsByCompany * @summary: List brands by company * @description: Retrieve all the brands added in a company. Get all the brand names, along with URLs of their logo, banner, and portrait image. can be searched on brand_name. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getBrandsByCompany/). */ - getBrandsByCompany({ q, requestHeaders }?: ConfigurationPlatformValidator.GetBrandsByCompanyParam, { responseHeaders }?: object): Promise; + getBrandsByCompany({ q, requestHeaders }?: ConfigurationPlatformValidator.GetBrandsByCompanyParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformValidator.GetCompanyByBrandsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getCompanyByBrands * @summary: List companies by brand * @description: Retrieve a paginated list of companies associated with specific brands. Can be searched using the brand ID and company name - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getCompanyByBrands/). */ - getCompanyByBrands({ body, pageNo, pageSize, requestHeaders }?: ConfigurationPlatformValidator.GetCompanyByBrandsParam, { responseHeaders }?: object): Promise; + getCompanyByBrands({ body, pageNo, pageSize, requestHeaders }?: ConfigurationPlatformValidator.GetCompanyByBrandsParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformValidator.GetCurrenciesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getCurrencies * @summary: List currencies * @description: Retrieve a list of available currencies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getCurrencies/). */ - getCurrencies({ requestHeaders }?: any, { responseHeaders }?: object): Promise; - /** - * @param {ConfigurationPlatformValidator.GetCurrencyExchangeRatesParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getCurrencyExchangeRates - * @summary: Get currency exchange rates - * @description: Retrieve a list of currency exchange rates, relative to a provided currency. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getCurrencyExchangeRates/). - */ - getCurrencyExchangeRates({ currencyCode, exchangeCurrencyCode, exchangeCountryCode, requestHeaders, }?: ConfigurationPlatformValidator.GetCurrencyExchangeRatesParam, { responseHeaders }?: object): Promise; + getCurrencies({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformValidator.GetDomainAvailibilityParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getDomainAvailibility * @summary: List suggestion domain * @description: Check the availability of a specific domain. Use this API to check the domain availability before linking it to sales channel. Also sends domain suggestions that are similar to the queried domain. Note - Custom domain search is currently powered by GoDaddy provider. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getDomainAvailibility/). */ - getDomainAvailibility({ body, requestHeaders }?: ConfigurationPlatformValidator.GetDomainAvailibilityParam, { responseHeaders }?: object): Promise; + getDomainAvailibility({ body, requestHeaders }?: ConfigurationPlatformValidator.GetDomainAvailibilityParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformValidator.GetOtherSellerApplicationByIdParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getOtherSellerApplicationById * @summary: Get others sales. channel * @description: Retrieve details of a seller sales channel that was not created within the current company but has opted for the current company's inventory and searched via the sales channel ID of another sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getOtherSellerApplicationById/). */ - getOtherSellerApplicationById({ id, requestHeaders }?: ConfigurationPlatformValidator.GetOtherSellerApplicationByIdParam, { responseHeaders }?: object): Promise; + getOtherSellerApplicationById({ id, requestHeaders }?: ConfigurationPlatformValidator.GetOtherSellerApplicationByIdParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformValidator.GetOtherSellerApplicationsParam} arg * - Arg object @@ -118,26 +99,24 @@ declare class Configuration { * @param {ConfigurationPlatformValidator.GetStoreByBrandsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getStoreByBrands * @summary: Get store by brands * @description: Retrieve stores associated with specific brands. Retrieve a list of selling locations (stores) by the brands they deal. Store has information about store name, store type, store code, store address, and company detail. filtering can be done on brand id and brand names - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getStoreByBrands/). */ - getStoreByBrands({ body, pageNo, pageSize, requestHeaders }?: ConfigurationPlatformValidator.GetStoreByBrandsParam, { responseHeaders }?: object): Promise; + getStoreByBrands({ body, pageNo, pageSize, requestHeaders }?: ConfigurationPlatformValidator.GetStoreByBrandsParam, { responseHeaders }?: object): Promise; /** * @param {ConfigurationPlatformValidator.OptOutFromApplicationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name optOutFromApplication * @summary: opt out of marketplaces * @description: This API allows businesses to opt out of sharing their inventory with external seller sales channels. By using this API, companies or stores can prevent specific seller sales channels from fetching their inventory data. This feature is useful for businesses that want to control who can access their product listings and other inventory information. It helps maintain privacy and control over data distribution, ensuring that sensitive information is only shared with authorized partners. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/optOutFromApplication/). */ - optOutFromApplication({ id, body, requestHeaders }?: ConfigurationPlatformValidator.OptOutFromApplicationParam, { responseHeaders }?: object): Promise; + optOutFromApplication({ id, body, requestHeaders }?: ConfigurationPlatformValidator.OptOutFromApplicationParam, { responseHeaders }?: object): Promise; } import ConfigurationPlatformValidator = require("./ConfigurationPlatformValidator"); import ConfigurationPlatformModel = require("./ConfigurationPlatformModel"); diff --git a/sdk/platform/Configuration/ConfigurationPlatformClient.js b/sdk/platform/Configuration/ConfigurationPlatformClient.js index 2314ff6a4..4bfbd2e83 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformClient.js +++ b/sdk/platform/Configuration/ConfigurationPlatformClient.js @@ -18,8 +18,7 @@ class Configuration { * @param {ConfigurationPlatformValidator.CreateApplicationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name createApplication * @summary: Create sales channel * @description: Generate and add a new sales channel. sales channels are sales channel websites which can be configured, personalized and customized. Use this API to create a new sales channel in the current company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/createApplication/). @@ -77,10 +76,10 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.CreateAppResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ConfigurationPlatformModel.CreateAppResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -100,9 +99,8 @@ class Configuration { * @param {ConfigurationPlatformValidator.GetApplicationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getApplications * @summary: List sales channel stores * @description: Retrieve a list of available sales channels. sales channels are sales channel websites which can be configured, personalized and customised. Use this API to fetch a list of sales channels created within a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getApplications/). @@ -165,7 +163,7 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.ApplicationsResponseSchema().validate( + } = ConfigurationPlatformModel.ApplicationsResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -188,9 +186,8 @@ class Configuration { * @param {ConfigurationPlatformValidator.GetBrandsByCompanyParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getBrandsByCompany * @summary: List brands by company * @description: Retrieve all the brands added in a company. Get all the brand names, along with URLs of their logo, banner, and portrait image. can be searched on brand_name. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getBrandsByCompany/). @@ -249,7 +246,7 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.BrandsByCompanyResponseSchema().validate( + } = ConfigurationPlatformModel.BrandsByCompanyResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -272,9 +269,8 @@ class Configuration { * @param {ConfigurationPlatformValidator.GetCompanyByBrandsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getCompanyByBrands * @summary: List companies by brand * @description: Retrieve a paginated list of companies associated with specific brands. Can be searched using the brand ID and company name - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getCompanyByBrands/). @@ -338,7 +334,7 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.CompanyByBrandsResponseSchema().validate( + } = ConfigurationPlatformModel.CompanyByBrandsResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -361,9 +357,8 @@ class Configuration { * @param {ConfigurationPlatformValidator.GetCurrenciesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getCurrencies * @summary: List currencies * @description: Retrieve a list of available currencies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getCurrencies/). @@ -415,10 +410,10 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.CurrenciesResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ConfigurationPlatformModel.CurrenciesResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -434,108 +429,11 @@ class Configuration { return response; } - /** - * @param {ConfigurationPlatformValidator.GetCurrencyExchangeRatesParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getCurrencyExchangeRates - * @summary: Get currency exchange rates - * @description: Retrieve a list of currency exchange rates, relative to a provided currency. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getCurrencyExchangeRates/). - */ - async getCurrencyExchangeRates( - { - currencyCode, - exchangeCurrencyCode, - exchangeCountryCode, - requestHeaders, - } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = ConfigurationPlatformValidator.getCurrencyExchangeRates().validate( - { - currencyCode, - exchangeCurrencyCode, - exchangeCountryCode, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = ConfigurationPlatformValidator.getCurrencyExchangeRates().validate( - { - currencyCode, - exchangeCurrencyCode, - exchangeCountryCode, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > Configuration > getCurrencyExchangeRates \n ${warrning}`, - }); - } - - const query_params = {}; - query_params["currency_code"] = currencyCode; - query_params["exchange_currency_code"] = exchangeCurrencyCode; - query_params["exchange_country_code"] = exchangeCountryCode; - - const xHeaders = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "get", - `/service/platform/configuration/v2.0/company/${this.config.companyId}/currency-exchange`, - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = ConfigurationPlatformModel.CurrencyExchangeResponseV2().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > Configuration > getCurrencyExchangeRates \n ${res_error}`, - }); - } - } - - return response; - } - /** * @param {ConfigurationPlatformValidator.GetDomainAvailibilityParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getDomainAvailibility @@ -595,7 +493,7 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.DomainSuggestionsResponseSchema().validate( + } = ConfigurationPlatformModel.DomainSuggestionsResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -620,7 +518,7 @@ class Configuration { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getOtherSellerApplicationById @@ -680,7 +578,7 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.OptedApplicationResponseSchema().validate( + } = ConfigurationPlatformModel.OptedApplicationResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -791,9 +689,8 @@ class Configuration { * @param {ConfigurationPlatformValidator.GetStoreByBrandsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getStoreByBrands * @summary: Get store by brands * @description: Retrieve stores associated with specific brands. Retrieve a list of selling locations (stores) by the brands they deal. Store has information about store name, store type, store code, store address, and company detail. filtering can be done on brand id and brand names - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/getStoreByBrands/). @@ -857,7 +754,7 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.StoreByBrandsResponseSchema().validate( + } = ConfigurationPlatformModel.StoreByBrandsResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -880,9 +777,8 @@ class Configuration { * @param {ConfigurationPlatformValidator.OptOutFromApplicationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name optOutFromApplication * @summary: opt out of marketplaces * @description: This API allows businesses to opt out of sharing their inventory with external seller sales channels. By using this API, companies or stores can prevent specific seller sales channels from fetching their inventory data. This feature is useful for businesses that want to control who can access their product listings and other inventory information. It helps maintain privacy and control over data distribution, ensuring that sensitive information is only shared with authorized partners. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/configuration/optOutFromApplication/). @@ -942,7 +838,7 @@ class Configuration { const { error: res_error, - } = ConfigurationPlatformModel.SuccessMessageResponseSchema().validate( + } = ConfigurationPlatformModel.SuccessMessageResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); diff --git a/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts b/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts index f735c7e0c..deb496bc4 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +++ b/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts @@ -1,28 +1,6 @@ export = ConfigurationPlatformModel; -/** - * @typedef CurrencyExchangeResponseV2 - * @property {string} base - The 3-letter ISO 4217 code representing the base currency. - * @property {string} base_currency_name - The name of the base currency. - * @property {number} ttl_seconds - Time in seconds for which the exchange rates - * are valid. - * @property {CurrencyExchangeItem[]} items - List of exchange rates and currency details. - * @property {number} total - Total number of currency exchange items. - */ -/** - * @typedef CurrencyExchangeItem - * @property {string} currency_code - 3-letter ISO 4217 exchange currency code. - * @property {string} name - Name of the exchange currency - * @property {number} rate - Exchange rate of the currency with respect to the - * base currency. - * @property {string} country_code - ISO 3166 country code. - * @property {string} country_name - Name of the country using this currency. - * @property {string} subunit - The name of the subunit for the currency. - * @property {number} decimal_digits - Number of decimal digits the currency supports. - * @property {string} symbol - The symbol of the currency. - */ /** * @typedef ApplicationInventory - * @property {SearchConfig} [search] * @property {AppInventoryConfig} [inventory] * @property {AuthenticationConfig} [authentication] * @property {ArticleAssignmentConfig} [article_assignment] @@ -55,22 +33,6 @@ export = ConfigurationPlatformModel; * @typedef PiiMasking * @property {boolean} [enabled] */ -/** - * @typedef FstIdentification - * @property {boolean} [enabled] - Indicates whether FST identification is - * enabled for the application. - */ -/** - * @typedef QuerySuggestions - * @property {boolean} [enabled] - Indicates whether query suggestions are enabled. - * @property {number} [max_limit] - Specifies the maximum number of query - * suggestions that can be returned. - */ -/** - * @typedef SearchConfig - * @property {FstIdentification} [fst_identification] - * @property {QuerySuggestions} [query_suggestions] - */ /** * @typedef AppInventoryConfig * @property {InventoryBrand} [brand] @@ -89,6 +51,8 @@ export = ConfigurationPlatformModel; * @property {Object[]} [company_store] - List of selling locations whose * inventory is available to the sales channel for displaying on the website * @property {number} [company_id] + * @property {boolean} [enable_zone_overlapping] - Power product listing with + * overlapping zones */ /** * @typedef InventoryBrand @@ -257,7 +221,6 @@ export = ConfigurationPlatformModel; */ /** * @typedef AppInventoryPartialUpdate - * @property {SearchConfig} [search] * @property {RewardPointsConfig} [reward_points] * @property {AppCartConfig} [cart] * @property {AppPaymentConfig} [payment] @@ -272,24 +235,24 @@ export = ConfigurationPlatformModel; * @property {number} [company_id] - Numeric ID allotted to a business account */ /** - * @typedef CompanyByBrandsRequestSchema + * @typedef CompanyByBrandsRequest * @property {number} brands - Brand UID * @property {string} [search_text] - A search field for finding a company by its name */ /** - * @typedef CompanyByBrandsResponseSchema + * @typedef CompanyByBrandsResponse * @property {BrandCompanyInfo[]} [items] * @property {Page} [page] */ /** - * @typedef StoreByBrandsRequestSchema + * @typedef StoreByBrandsRequest * @property {number} [company_id] - Current company ID for current company * stores only. Don't send in case cross-selling (franchise) is enabled. * @property {number} brands - Brand UID * @property {string} [search_text] - Search store by its name or store code */ /** - * @typedef StoreByBrandsResponseSchema + * @typedef StoreByBrandsResponse * @property {BrandStoreInfo[]} [items] * @property {Page} [page] */ @@ -314,11 +277,11 @@ export = ConfigurationPlatformModel; * portrait banner */ /** - * @typedef BrandsByCompanyResponseSchema + * @typedef BrandsByCompanyResponse * @property {CompanyBrandInfo[]} [brands] */ /** - * @typedef ValidationFailedResponseSchema + * @typedef ValidationFailedResponse * @property {string} [message] - Response message for failed validation */ /** @@ -345,18 +308,18 @@ export = ConfigurationPlatformModel; * amount pan card number is expected from customer for order */ /** - * @typedef CreateApplicationRequestSchema + * @typedef CreateApplicationRequest * @property {App} [app] * @property {ApplicationInventory} [configuration] * @property {AppDomain} [domain] */ /** - * @typedef CreateAppResponseSchema + * @typedef CreateAppResponse * @property {Application} [app] * @property {ApplicationInventory} [configuration] */ /** - * @typedef ApplicationsResponseSchema + * @typedef ApplicationsResponse * @property {Application[]} [items] * @property {Page} [page] */ @@ -390,7 +353,7 @@ export = ConfigurationPlatformModel; * @property {string} [secure_url] - URL where the splash image is hosted */ /** - * @typedef MobileAppConfigRequestSchema + * @typedef MobileAppConfigRequest * @property {string} [app_name] - Name of the mobile app * @property {LandingImage} [landing_image] * @property {SplashImage} [splash_image] @@ -456,7 +419,7 @@ export = ConfigurationPlatformModel; * @property {string[]} [txt_records] */ /** - * @typedef DomainAddRequestSchema + * @typedef DomainAddRequest * @property {DomainAdd} [domain] */ /** @@ -473,7 +436,7 @@ export = ConfigurationPlatformModel; * @property {string} [message] */ /** - * @typedef DomainsResponseSchema + * @typedef DomainsResponse * @property {Domain[]} [domains] */ /** @@ -489,13 +452,13 @@ export = ConfigurationPlatformModel; * domain (short URL e.g. bit.ly) */ /** - * @typedef UpdateDomainTypeRequestSchema + * @typedef UpdateDomainTypeRequest * @property {UpdateDomain} [domain] * @property {string} [action] - Shows domain is made primary domain for the * sales channel or shorlink is created for the sales channel domain */ /** - * @typedef DomainStatusRequestSchema + * @typedef DomainStatusRequest * @property {string} [domain_url] - URL of the domain, e.g. uniket.hostx0.de */ /** @@ -505,16 +468,15 @@ export = ConfigurationPlatformModel; * domain are correctly propagating via DNS servers */ /** - * @typedef DomainStatusResponseSchema + * @typedef DomainStatusResponse * @property {boolean} [connected] - Check if domain is live and mapped to * appropriate IP of Fynd Servers * @property {DomainStatus[]} [status] */ /** - * @typedef DomainSuggestionsRequestSchema + * @typedef DomainSuggestionsRequest * @property {string} [domain_url] - Domain url - * @property {boolean} [custom_domain] - Get suggestions for custom domains or - * Fynd domains + * @property {boolean} [custom] - Get suggestions for custom domains or Fynd domains */ /** * @typedef DomainSuggestion @@ -527,11 +489,11 @@ export = ConfigurationPlatformModel; * @property {string} [currency] - Custom domain currency. Not present for Fynd domains. */ /** - * @typedef DomainSuggestionsResponseSchema + * @typedef DomainSuggestionsResponse * @property {DomainSuggestion[]} [domains] - Domain URL */ /** - * @typedef SuccessMessageResponseSchema + * @typedef SuccessMessageResponse * @property {boolean} [success] - Shows whether domain was deleted successfully * @property {string} [message] - Success message shown to the user (in a string format) */ @@ -550,7 +512,7 @@ export = ConfigurationPlatformModel; * @property {string} [name] - Domain URL of current sales channel, e.g. zenz.com */ /** - * @typedef CompaniesResponseSchema + * @typedef CompaniesResponse * @property {AppInventoryCompanies[]} [items] * @property {Page} [page] */ @@ -562,7 +524,7 @@ export = ConfigurationPlatformModel; * franchisee, distributor, etc. */ /** - * @typedef StoresResponseSchema + * @typedef StoresResponse * @property {AppInventoryStores[]} [items] * @property {Page} [page] */ @@ -587,7 +549,7 @@ export = ConfigurationPlatformModel; * @property {Object} [integration_type] */ /** - * @typedef FilterOrderingStoreRequestSchema + * @typedef FilterOrderingStoreRequest * @property {boolean} [all_stores] - Allow all stores from the ordering stores * @property {number[]} [deployed_stores] * @property {string} [q] - Store code or name of the ordering store @@ -611,7 +573,7 @@ export = ConfigurationPlatformModel; * @property {DeploymentMeta} [deployment_meta] */ /** - * @typedef OrderingStoreSelectRequestSchema + * @typedef OrderingStoreSelectRequest * @property {OrderingStoreSelect} ordering_store */ /** @@ -640,7 +602,7 @@ export = ConfigurationPlatformModel; * @property {Page} [page] */ /** - * @typedef OptedApplicationResponseSchema + * @typedef OptedApplicationResponse * @property {string} [name] - Name of the other seller's sales channel * @property {string} [description] - Basic details about the other seller's sales channel * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) @@ -691,7 +653,7 @@ export = ConfigurationPlatformModel; * of other seller's application */ /** - * @typedef TokenResponseSchema + * @typedef TokenResponse * @property {Tokens} [tokens] * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the token @@ -990,11 +952,11 @@ export = ConfigurationPlatformModel; * value is false. */ /** - * @typedef AppFeatureRequestSchema + * @typedef AppFeatureRequest * @property {AppFeature} [feature] */ /** - * @typedef AppFeatureResponseSchema + * @typedef AppFeatureResponse * @property {AppFeature} [feature] */ /** @@ -1143,7 +1105,7 @@ export = ConfigurationPlatformModel; * @property {string} [created_at] - ISO 8601 timestamp of when token created */ /** - * @typedef InvalidPayloadRequestSchema + * @typedef InvalidPayloadRequest * @property {string} [message] - Error message when request body payload is improper * @property {boolean} [success] - Flag for required not successfull. */ @@ -1309,11 +1271,11 @@ export = ConfigurationPlatformModel; * @property {number} [company_id] */ /** - * @typedef CurrenciesResponseSchema + * @typedef CurrenciesResponse * @property {Currency[]} [items] */ /** - * @typedef AppCurrencyResponseSchema + * @typedef AppCurrencyResponse * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the currency configuration supported by the application * @property {string} [application] - Alphanumeric ID allotted to an application @@ -1374,90 +1336,18 @@ export = ConfigurationPlatformModel; * value is zero. */ /** - * @typedef OrderingStoresResponseSchema + * @typedef OrderingStoresResponse * @property {Page} [page] * @property {OrderingStore[]} [items] */ -/** - * @typedef ValidationErrors - * @property {ValidationError[]} errors - */ -/** - * @typedef ValidationError - * @property {string} message - A brief description of the error encountered. - * @property {string} field - The field in the request that caused the error. - */ declare class ConfigurationPlatformModel { } declare namespace ConfigurationPlatformModel { - export { CurrencyExchangeResponseV2, CurrencyExchangeItem, ApplicationInventory, PiiMasking, FstIdentification, QuerySuggestions, SearchConfig, AppInventoryConfig, InventoryBrand, InventoryStore, AppStoreRules, InventoryCategory, InventoryPrice, InventoryDiscount, AuthenticationConfig, ArticleAssignmentConfig, ArticleAssignmentRules, StorePriority, AppCartConfig, InternationalDeliveryCharges, DeliveryCharges, Charges, AppPaymentConfig, CallbackUrl, Methods, PaymentModeConfig, PaymentSelectionLock, AppOrderConfig, AppLogisticsConfig, LoyaltyPointsConfig, AppInventoryPartialUpdate, BrandCompanyInfo, CompanyByBrandsRequestSchema, CompanyByBrandsResponseSchema, StoreByBrandsRequestSchema, StoreByBrandsResponseSchema, BrandStoreInfo, CompanyBrandInfo, BrandsByCompanyResponseSchema, ValidationFailedResponseSchema, NotFound, CommunicationConfig, CommsConfig, PanCardConfig, CreateApplicationRequestSchema, CreateAppResponseSchema, ApplicationsResponseSchema, MobileAppConfiguration, LandingImage, SplashImage, MobileAppConfigRequestSchema, BuildVersionHistory, BuildVersion, AppSupportedCurrency, DefaultCurrency, DomainAdd, DomainAddRequestSchema, Domain, DomainsResponseSchema, UpdateDomain, UpdateDomainTypeRequestSchema, DomainStatusRequestSchema, DomainStatus, DomainStatusResponseSchema, DomainSuggestionsRequestSchema, DomainSuggestion, DomainSuggestionsResponseSchema, SuccessMessageResponseSchema, App, AppDomain, CompaniesResponseSchema, AppInventoryCompanies, StoresResponseSchema, AppInventoryStores, FilterOrderingStoreRequestSchema, DeploymentMeta, OrderingStoreConfig, OrderingStoreSelectRequestSchema, OrderingStoreSelect, OtherSellerCompany, OtherSellerApplication, OtherSellerApplications, OptedApplicationResponseSchema, OptedCompany, OptedInventory, OptType, OptedStore, OptOutInventory, TokenResponseSchema, Tokens, Firebase, Credentials, Ios, Android, Moengage, MoengageCredentials, Segment, SegmentCredentials, Gtm, GtmCredentials, Freshchat, FreshchatCredentials, Safetynet, SafetynetCredentials, FyndRewards, FyndRewardsCredentials, GoogleMap, GoogleMapCredentials, RewardPointsConfig, Credit, Debit, ProductDetailFeature, LaunchPage, LandingPageFeature, ListingPageFeature, RegistrationPageFeature, AppFeature, HomePageFeature, CommonFeature, InternationalShipping, CommunicationOptinDialogFeature, DeploymentStoreSelectionFeature, ListingPriceFeature, CurrencyFeature, RevenueEngineFeature, FeedbackFeature, CompareProductsFeature, CartFeature, QrFeature, PcrFeature, OrderFeature, AppFeatureRequestSchema, AppFeatureResponseSchema, Currency, ApplicationWebsite, ApplicationCors, ApplicationAuth, ApplicationRedirections, ApplicationMeta, SecureUrl, Application, ApplicationById, TokenSchemaID, TokenSchema, InvalidPayloadRequestSchema, Page, ApplicationInformation, InformationAddress, InformationPhone, InformationLoc, InformationSupport, InformationSupportPhone, InformationSupportEmail, SocialLinks, FacebookLink, InstagramLink, TwitterLink, PinterestLink, GooglePlusLink, YoutubeLink, LinkedInLink, VimeoLink, BlogLink, Links, BusinessHighlights, ApplicationDetail, CurrenciesResponseSchema, AppCurrencyResponseSchema, StoreLatLong, OptedStoreAddress, OrderingStore, OrderingStores, OrderingStoresResponseSchema, ValidationErrors, ValidationError }; + export { ApplicationInventory, PiiMasking, AppInventoryConfig, InventoryBrand, InventoryStore, AppStoreRules, InventoryCategory, InventoryPrice, InventoryDiscount, AuthenticationConfig, ArticleAssignmentConfig, ArticleAssignmentRules, StorePriority, AppCartConfig, InternationalDeliveryCharges, DeliveryCharges, Charges, AppPaymentConfig, CallbackUrl, Methods, PaymentModeConfig, PaymentSelectionLock, AppOrderConfig, AppLogisticsConfig, LoyaltyPointsConfig, AppInventoryPartialUpdate, BrandCompanyInfo, CompanyByBrandsRequest, CompanyByBrandsResponse, StoreByBrandsRequest, StoreByBrandsResponse, BrandStoreInfo, CompanyBrandInfo, BrandsByCompanyResponse, ValidationFailedResponse, NotFound, CommunicationConfig, CommsConfig, PanCardConfig, CreateApplicationRequest, CreateAppResponse, ApplicationsResponse, MobileAppConfiguration, LandingImage, SplashImage, MobileAppConfigRequest, BuildVersionHistory, BuildVersion, AppSupportedCurrency, DefaultCurrency, DomainAdd, DomainAddRequest, Domain, DomainsResponse, UpdateDomain, UpdateDomainTypeRequest, DomainStatusRequest, DomainStatus, DomainStatusResponse, DomainSuggestionsRequest, DomainSuggestion, DomainSuggestionsResponse, SuccessMessageResponse, App, AppDomain, CompaniesResponse, AppInventoryCompanies, StoresResponse, AppInventoryStores, FilterOrderingStoreRequest, DeploymentMeta, OrderingStoreConfig, OrderingStoreSelectRequest, OrderingStoreSelect, OtherSellerCompany, OtherSellerApplication, OtherSellerApplications, OptedApplicationResponse, OptedCompany, OptedInventory, OptType, OptedStore, OptOutInventory, TokenResponse, Tokens, Firebase, Credentials, Ios, Android, Moengage, MoengageCredentials, Segment, SegmentCredentials, Gtm, GtmCredentials, Freshchat, FreshchatCredentials, Safetynet, SafetynetCredentials, FyndRewards, FyndRewardsCredentials, GoogleMap, GoogleMapCredentials, RewardPointsConfig, Credit, Debit, ProductDetailFeature, LaunchPage, LandingPageFeature, ListingPageFeature, RegistrationPageFeature, AppFeature, HomePageFeature, CommonFeature, InternationalShipping, CommunicationOptinDialogFeature, DeploymentStoreSelectionFeature, ListingPriceFeature, CurrencyFeature, RevenueEngineFeature, FeedbackFeature, CompareProductsFeature, CartFeature, QrFeature, PcrFeature, OrderFeature, AppFeatureRequest, AppFeatureResponse, Currency, ApplicationWebsite, ApplicationCors, ApplicationAuth, ApplicationRedirections, ApplicationMeta, SecureUrl, Application, ApplicationById, TokenSchemaID, TokenSchema, InvalidPayloadRequest, Page, ApplicationInformation, InformationAddress, InformationPhone, InformationLoc, InformationSupport, InformationSupportPhone, InformationSupportEmail, SocialLinks, FacebookLink, InstagramLink, TwitterLink, PinterestLink, GooglePlusLink, YoutubeLink, LinkedInLink, VimeoLink, BlogLink, Links, BusinessHighlights, ApplicationDetail, CurrenciesResponse, AppCurrencyResponse, StoreLatLong, OptedStoreAddress, OrderingStore, OrderingStores, OrderingStoresResponse }; } -/** @returns {CurrencyExchangeResponseV2} */ -declare function CurrencyExchangeResponseV2(): CurrencyExchangeResponseV2; -type CurrencyExchangeResponseV2 = { - /** - * - The 3-letter ISO 4217 code representing the base currency. - */ - base: string; - /** - * - The name of the base currency. - */ - base_currency_name: string; - /** - * - Time in seconds for which the exchange rates - * are valid. - */ - ttl_seconds: number; - /** - * - List of exchange rates and currency details. - */ - items: CurrencyExchangeItem[]; - /** - * - Total number of currency exchange items. - */ - total: number; -}; -/** @returns {CurrencyExchangeItem} */ -declare function CurrencyExchangeItem(): CurrencyExchangeItem; -type CurrencyExchangeItem = { - /** - * - 3-letter ISO 4217 exchange currency code. - */ - currency_code: string; - /** - * - Name of the exchange currency - */ - name: string; - /** - * - Exchange rate of the currency with respect to the - * base currency. - */ - rate: number; - /** - * - ISO 3166 country code. - */ - country_code: string; - /** - * - Name of the country using this currency. - */ - country_name: string; - /** - * - The name of the subunit for the currency. - */ - subunit: string; - /** - * - Number of decimal digits the currency supports. - */ - decimal_digits: number; - /** - * - The symbol of the currency. - */ - symbol: string; -}; /** @returns {ApplicationInventory} */ declare function ApplicationInventory(): ApplicationInventory; type ApplicationInventory = { - search?: SearchConfig; inventory?: AppInventoryConfig; authentication?: AuthenticationConfig; article_assignment?: ArticleAssignmentConfig; @@ -1512,34 +1402,6 @@ declare function PiiMasking(): PiiMasking; type PiiMasking = { enabled?: boolean; }; -/** @returns {FstIdentification} */ -declare function FstIdentification(): FstIdentification; -type FstIdentification = { - /** - * - Indicates whether FST identification is - * enabled for the application. - */ - enabled?: boolean; -}; -/** @returns {QuerySuggestions} */ -declare function QuerySuggestions(): QuerySuggestions; -type QuerySuggestions = { - /** - * - Indicates whether query suggestions are enabled. - */ - enabled?: boolean; - /** - * - Specifies the maximum number of query - * suggestions that can be returned. - */ - max_limit?: number; -}; -/** @returns {SearchConfig} */ -declare function SearchConfig(): SearchConfig; -type SearchConfig = { - fst_identification?: FstIdentification; - query_suggestions?: QuerySuggestions; -}; /** @returns {AppInventoryConfig} */ declare function AppInventoryConfig(): AppInventoryConfig; type AppInventoryConfig = { @@ -1574,6 +1436,11 @@ type AppInventoryConfig = { */ company_store?: any[]; company_id?: number; + /** + * - Power product listing with + * overlapping zones + */ + enable_zone_overlapping?: boolean; }; /** @returns {InventoryBrand} */ declare function InventoryBrand(): InventoryBrand; @@ -1897,7 +1764,6 @@ type LoyaltyPointsConfig = { /** @returns {AppInventoryPartialUpdate} */ declare function AppInventoryPartialUpdate(): AppInventoryPartialUpdate; type AppInventoryPartialUpdate = { - search?: SearchConfig; reward_points?: RewardPointsConfig; cart?: AppCartConfig; payment?: AppPaymentConfig; @@ -1921,9 +1787,9 @@ type BrandCompanyInfo = { */ company_id?: number; }; -/** @returns {CompanyByBrandsRequestSchema} */ -declare function CompanyByBrandsRequestSchema(): CompanyByBrandsRequestSchema; -type CompanyByBrandsRequestSchema = { +/** @returns {CompanyByBrandsRequest} */ +declare function CompanyByBrandsRequest(): CompanyByBrandsRequest; +type CompanyByBrandsRequest = { /** * - Brand UID */ @@ -1933,15 +1799,15 @@ type CompanyByBrandsRequestSchema = { */ search_text?: string; }; -/** @returns {CompanyByBrandsResponseSchema} */ -declare function CompanyByBrandsResponseSchema(): CompanyByBrandsResponseSchema; -type CompanyByBrandsResponseSchema = { +/** @returns {CompanyByBrandsResponse} */ +declare function CompanyByBrandsResponse(): CompanyByBrandsResponse; +type CompanyByBrandsResponse = { items?: BrandCompanyInfo[]; page?: Page; }; -/** @returns {StoreByBrandsRequestSchema} */ -declare function StoreByBrandsRequestSchema(): StoreByBrandsRequestSchema; -type StoreByBrandsRequestSchema = { +/** @returns {StoreByBrandsRequest} */ +declare function StoreByBrandsRequest(): StoreByBrandsRequest; +type StoreByBrandsRequest = { /** * - Current company ID for current company * stores only. Don't send in case cross-selling (franchise) is enabled. @@ -1956,9 +1822,9 @@ type StoreByBrandsRequestSchema = { */ search_text?: string; }; -/** @returns {StoreByBrandsResponseSchema} */ -declare function StoreByBrandsResponseSchema(): StoreByBrandsResponseSchema; -type StoreByBrandsResponseSchema = { +/** @returns {StoreByBrandsResponse} */ +declare function StoreByBrandsResponse(): StoreByBrandsResponse; +type StoreByBrandsResponse = { items?: BrandStoreInfo[]; page?: Page; }; @@ -2011,14 +1877,14 @@ type CompanyBrandInfo = { */ brand_banner_portrait_url?: string; }; -/** @returns {BrandsByCompanyResponseSchema} */ -declare function BrandsByCompanyResponseSchema(): BrandsByCompanyResponseSchema; -type BrandsByCompanyResponseSchema = { +/** @returns {BrandsByCompanyResponse} */ +declare function BrandsByCompanyResponse(): BrandsByCompanyResponse; +type BrandsByCompanyResponse = { brands?: CompanyBrandInfo[]; }; -/** @returns {ValidationFailedResponseSchema} */ -declare function ValidationFailedResponseSchema(): ValidationFailedResponseSchema; -type ValidationFailedResponseSchema = { +/** @returns {ValidationFailedResponse} */ +declare function ValidationFailedResponse(): ValidationFailedResponse; +type ValidationFailedResponse = { /** * - Response message for failed validation */ @@ -2069,22 +1935,22 @@ type PanCardConfig = { */ online_threshold_amount?: number; }; -/** @returns {CreateApplicationRequestSchema} */ -declare function CreateApplicationRequestSchema(): CreateApplicationRequestSchema; -type CreateApplicationRequestSchema = { +/** @returns {CreateApplicationRequest} */ +declare function CreateApplicationRequest(): CreateApplicationRequest; +type CreateApplicationRequest = { app?: App; configuration?: ApplicationInventory; domain?: AppDomain; }; -/** @returns {CreateAppResponseSchema} */ -declare function CreateAppResponseSchema(): CreateAppResponseSchema; -type CreateAppResponseSchema = { +/** @returns {CreateAppResponse} */ +declare function CreateAppResponse(): CreateAppResponse; +type CreateAppResponse = { app?: Application; configuration?: ApplicationInventory; }; -/** @returns {ApplicationsResponseSchema} */ -declare function ApplicationsResponseSchema(): ApplicationsResponseSchema; -type ApplicationsResponseSchema = { +/** @returns {ApplicationsResponse} */ +declare function ApplicationsResponse(): ApplicationsResponse; +type ApplicationsResponse = { items?: Application[]; page?: Page; }; @@ -2159,9 +2025,9 @@ type SplashImage = { */ secure_url?: string; }; -/** @returns {MobileAppConfigRequestSchema} */ -declare function MobileAppConfigRequestSchema(): MobileAppConfigRequestSchema; -type MobileAppConfigRequestSchema = { +/** @returns {MobileAppConfigRequest} */ +declare function MobileAppConfigRequest(): MobileAppConfigRequest; +type MobileAppConfigRequest = { /** * - Name of the mobile app */ @@ -2303,9 +2169,9 @@ type DomainAdd = { message?: string; txt_records?: string[]; }; -/** @returns {DomainAddRequestSchema} */ -declare function DomainAddRequestSchema(): DomainAddRequestSchema; -type DomainAddRequestSchema = { +/** @returns {DomainAddRequest} */ +declare function DomainAddRequest(): DomainAddRequest; +type DomainAddRequest = { domain?: DomainAdd; }; /** @returns {Domain} */ @@ -2340,9 +2206,9 @@ type Domain = { is_predefined?: boolean; message?: string; }; -/** @returns {DomainsResponseSchema} */ -declare function DomainsResponseSchema(): DomainsResponseSchema; -type DomainsResponseSchema = { +/** @returns {DomainsResponse} */ +declare function DomainsResponse(): DomainsResponse; +type DomainsResponse = { domains?: Domain[]; }; /** @returns {UpdateDomain} */ @@ -2373,9 +2239,9 @@ type UpdateDomain = { */ is_shortlink?: boolean; }; -/** @returns {UpdateDomainTypeRequestSchema} */ -declare function UpdateDomainTypeRequestSchema(): UpdateDomainTypeRequestSchema; -type UpdateDomainTypeRequestSchema = { +/** @returns {UpdateDomainTypeRequest} */ +declare function UpdateDomainTypeRequest(): UpdateDomainTypeRequest; +type UpdateDomainTypeRequest = { domain?: UpdateDomain; /** * - Shows domain is made primary domain for the @@ -2383,9 +2249,9 @@ type UpdateDomainTypeRequestSchema = { */ action?: string; }; -/** @returns {DomainStatusRequestSchema} */ -declare function DomainStatusRequestSchema(): DomainStatusRequestSchema; -type DomainStatusRequestSchema = { +/** @returns {DomainStatusRequest} */ +declare function DomainStatusRequest(): DomainStatusRequest; +type DomainStatusRequest = { /** * - URL of the domain, e.g. uniket.hostx0.de */ @@ -2404,9 +2270,9 @@ type DomainStatus = { */ status?: boolean; }; -/** @returns {DomainStatusResponseSchema} */ -declare function DomainStatusResponseSchema(): DomainStatusResponseSchema; -type DomainStatusResponseSchema = { +/** @returns {DomainStatusResponse} */ +declare function DomainStatusResponse(): DomainStatusResponse; +type DomainStatusResponse = { /** * - Check if domain is live and mapped to * appropriate IP of Fynd Servers @@ -2414,18 +2280,17 @@ type DomainStatusResponseSchema = { connected?: boolean; status?: DomainStatus[]; }; -/** @returns {DomainSuggestionsRequestSchema} */ -declare function DomainSuggestionsRequestSchema(): DomainSuggestionsRequestSchema; -type DomainSuggestionsRequestSchema = { +/** @returns {DomainSuggestionsRequest} */ +declare function DomainSuggestionsRequest(): DomainSuggestionsRequest; +type DomainSuggestionsRequest = { /** * - Domain url */ domain_url?: string; /** - * - Get suggestions for custom domains or - * Fynd domains + * - Get suggestions for custom domains or Fynd domains */ - custom_domain?: boolean; + custom?: boolean; }; /** @returns {DomainSuggestion} */ declare function DomainSuggestion(): DomainSuggestion; @@ -2453,17 +2318,17 @@ type DomainSuggestion = { */ currency?: string; }; -/** @returns {DomainSuggestionsResponseSchema} */ -declare function DomainSuggestionsResponseSchema(): DomainSuggestionsResponseSchema; -type DomainSuggestionsResponseSchema = { +/** @returns {DomainSuggestionsResponse} */ +declare function DomainSuggestionsResponse(): DomainSuggestionsResponse; +type DomainSuggestionsResponse = { /** * - Domain URL */ domains?: DomainSuggestion[]; }; -/** @returns {SuccessMessageResponseSchema} */ -declare function SuccessMessageResponseSchema(): SuccessMessageResponseSchema; -type SuccessMessageResponseSchema = { +/** @returns {SuccessMessageResponse} */ +declare function SuccessMessageResponse(): SuccessMessageResponse; +type SuccessMessageResponse = { /** * - Shows whether domain was deleted successfully */ @@ -2504,9 +2369,9 @@ type AppDomain = { */ name?: string; }; -/** @returns {CompaniesResponseSchema} */ -declare function CompaniesResponseSchema(): CompaniesResponseSchema; -type CompaniesResponseSchema = { +/** @returns {CompaniesResponse} */ +declare function CompaniesResponse(): CompaniesResponse; +type CompaniesResponse = { items?: AppInventoryCompanies[]; page?: Page; }; @@ -2527,9 +2392,9 @@ type AppInventoryCompanies = { */ company_type?: string; }; -/** @returns {StoresResponseSchema} */ -declare function StoresResponseSchema(): StoresResponseSchema; -type StoresResponseSchema = { +/** @returns {StoresResponse} */ +declare function StoresResponse(): StoresResponse; +type StoresResponse = { items?: AppInventoryStores[]; page?: Page; }; @@ -2578,9 +2443,9 @@ type AppInventoryStores = { address?: any; integration_type?: any; }; -/** @returns {FilterOrderingStoreRequestSchema} */ -declare function FilterOrderingStoreRequestSchema(): FilterOrderingStoreRequestSchema; -type FilterOrderingStoreRequestSchema = { +/** @returns {FilterOrderingStoreRequest} */ +declare function FilterOrderingStoreRequest(): FilterOrderingStoreRequest; +type FilterOrderingStoreRequest = { /** * - Allow all stores from the ordering stores */ @@ -2626,9 +2491,9 @@ declare function OrderingStoreConfig(): OrderingStoreConfig; type OrderingStoreConfig = { deployment_meta?: DeploymentMeta; }; -/** @returns {OrderingStoreSelectRequestSchema} */ -declare function OrderingStoreSelectRequestSchema(): OrderingStoreSelectRequestSchema; -type OrderingStoreSelectRequestSchema = { +/** @returns {OrderingStoreSelectRequest} */ +declare function OrderingStoreSelectRequest(): OrderingStoreSelectRequest; +type OrderingStoreSelectRequest = { ordering_store: OrderingStoreSelect; }; /** @returns {OrderingStoreSelect} */ @@ -2684,9 +2549,9 @@ type OtherSellerApplications = { items?: OtherSellerApplication[]; page?: Page; }; -/** @returns {OptedApplicationResponseSchema} */ -declare function OptedApplicationResponseSchema(): OptedApplicationResponseSchema; -type OptedApplicationResponseSchema = { +/** @returns {OptedApplicationResponse} */ +declare function OptedApplicationResponse(): OptedApplicationResponse; +type OptedApplicationResponse = { /** * - Name of the other seller's sales channel */ @@ -2798,9 +2663,9 @@ type OptOutInventory = { */ company: number[]; }; -/** @returns {TokenResponseSchema} */ -declare function TokenResponseSchema(): TokenResponseSchema; -type TokenResponseSchema = { +/** @returns {TokenResponse} */ +declare function TokenResponse(): TokenResponse; +type TokenResponse = { tokens?: Tokens; /** * - The unique identifier (24-digit Mongo Object ID) @@ -3362,14 +3227,14 @@ type OrderFeature = { */ buy_again?: boolean; }; -/** @returns {AppFeatureRequestSchema} */ -declare function AppFeatureRequestSchema(): AppFeatureRequestSchema; -type AppFeatureRequestSchema = { +/** @returns {AppFeatureRequest} */ +declare function AppFeatureRequest(): AppFeatureRequest; +type AppFeatureRequest = { feature?: AppFeature; }; -/** @returns {AppFeatureResponseSchema} */ -declare function AppFeatureResponseSchema(): AppFeatureResponseSchema; -type AppFeatureResponseSchema = { +/** @returns {AppFeatureResponse} */ +declare function AppFeatureResponse(): AppFeatureResponse; +type AppFeatureResponse = { feature?: AppFeature; }; /** @returns {Currency} */ @@ -3669,9 +3534,9 @@ type TokenSchema = { */ created_at?: string; }; -/** @returns {InvalidPayloadRequestSchema} */ -declare function InvalidPayloadRequestSchema(): InvalidPayloadRequestSchema; -type InvalidPayloadRequestSchema = { +/** @returns {InvalidPayloadRequest} */ +declare function InvalidPayloadRequest(): InvalidPayloadRequest; +type InvalidPayloadRequest = { /** * - Error message when request body payload is improper */ @@ -4046,14 +3911,14 @@ type ApplicationDetail = { slug?: string; company_id?: number; }; -/** @returns {CurrenciesResponseSchema} */ -declare function CurrenciesResponseSchema(): CurrenciesResponseSchema; -type CurrenciesResponseSchema = { +/** @returns {CurrenciesResponse} */ +declare function CurrenciesResponse(): CurrenciesResponse; +type CurrenciesResponse = { items?: Currency[]; }; -/** @returns {AppCurrencyResponseSchema} */ -declare function AppCurrencyResponseSchema(): AppCurrencyResponseSchema; -type AppCurrencyResponseSchema = { +/** @returns {AppCurrencyResponse} */ +declare function AppCurrencyResponse(): AppCurrencyResponse; +type AppCurrencyResponse = { /** * - The unique identifier (24-digit Mongo Object ID) * of the currency configuration supported by the application @@ -4201,26 +4066,9 @@ type OrderingStores = { */ __v?: number; }; -/** @returns {OrderingStoresResponseSchema} */ -declare function OrderingStoresResponseSchema(): OrderingStoresResponseSchema; -type OrderingStoresResponseSchema = { +/** @returns {OrderingStoresResponse} */ +declare function OrderingStoresResponse(): OrderingStoresResponse; +type OrderingStoresResponse = { page?: Page; items?: OrderingStore[]; }; -/** @returns {ValidationErrors} */ -declare function ValidationErrors(): ValidationErrors; -type ValidationErrors = { - errors: ValidationError[]; -}; -/** @returns {ValidationError} */ -declare function ValidationError(): ValidationError; -type ValidationError = { - /** - * - A brief description of the error encountered. - */ - message: string; - /** - * - The field in the request that caused the error. - */ - field: string; -}; diff --git a/sdk/platform/Configuration/ConfigurationPlatformModel.js b/sdk/platform/Configuration/ConfigurationPlatformModel.js index ef4b014ed..2dc827d12 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformModel.js +++ b/sdk/platform/Configuration/ConfigurationPlatformModel.js @@ -1,31 +1,7 @@ const Joi = require("joi"); -/** - * @typedef CurrencyExchangeResponseV2 - * @property {string} base - The 3-letter ISO 4217 code representing the base currency. - * @property {string} base_currency_name - The name of the base currency. - * @property {number} ttl_seconds - Time in seconds for which the exchange rates - * are valid. - * @property {CurrencyExchangeItem[]} items - List of exchange rates and currency details. - * @property {number} total - Total number of currency exchange items. - */ - -/** - * @typedef CurrencyExchangeItem - * @property {string} currency_code - 3-letter ISO 4217 exchange currency code. - * @property {string} name - Name of the exchange currency - * @property {number} rate - Exchange rate of the currency with respect to the - * base currency. - * @property {string} country_code - ISO 3166 country code. - * @property {string} country_name - Name of the country using this currency. - * @property {string} subunit - The name of the subunit for the currency. - * @property {number} decimal_digits - Number of decimal digits the currency supports. - * @property {string} symbol - The symbol of the currency. - */ - /** * @typedef ApplicationInventory - * @property {SearchConfig} [search] * @property {AppInventoryConfig} [inventory] * @property {AuthenticationConfig} [authentication] * @property {ArticleAssignmentConfig} [article_assignment] @@ -60,25 +36,6 @@ const Joi = require("joi"); * @property {boolean} [enabled] */ -/** - * @typedef FstIdentification - * @property {boolean} [enabled] - Indicates whether FST identification is - * enabled for the application. - */ - -/** - * @typedef QuerySuggestions - * @property {boolean} [enabled] - Indicates whether query suggestions are enabled. - * @property {number} [max_limit] - Specifies the maximum number of query - * suggestions that can be returned. - */ - -/** - * @typedef SearchConfig - * @property {FstIdentification} [fst_identification] - * @property {QuerySuggestions} [query_suggestions] - */ - /** * @typedef AppInventoryConfig * @property {InventoryBrand} [brand] @@ -97,6 +54,8 @@ const Joi = require("joi"); * @property {Object[]} [company_store] - List of selling locations whose * inventory is available to the sales channel for displaying on the website * @property {number} [company_id] + * @property {boolean} [enable_zone_overlapping] - Power product listing with + * overlapping zones */ /** @@ -288,7 +247,6 @@ const Joi = require("joi"); /** * @typedef AppInventoryPartialUpdate - * @property {SearchConfig} [search] * @property {RewardPointsConfig} [reward_points] * @property {AppCartConfig} [cart] * @property {AppPaymentConfig} [payment] @@ -305,19 +263,19 @@ const Joi = require("joi"); */ /** - * @typedef CompanyByBrandsRequestSchema + * @typedef CompanyByBrandsRequest * @property {number} brands - Brand UID * @property {string} [search_text] - A search field for finding a company by its name */ /** - * @typedef CompanyByBrandsResponseSchema + * @typedef CompanyByBrandsResponse * @property {BrandCompanyInfo[]} [items] * @property {Page} [page] */ /** - * @typedef StoreByBrandsRequestSchema + * @typedef StoreByBrandsRequest * @property {number} [company_id] - Current company ID for current company * stores only. Don't send in case cross-selling (franchise) is enabled. * @property {number} brands - Brand UID @@ -325,7 +283,7 @@ const Joi = require("joi"); */ /** - * @typedef StoreByBrandsResponseSchema + * @typedef StoreByBrandsResponse * @property {BrandStoreInfo[]} [items] * @property {Page} [page] */ @@ -353,12 +311,12 @@ const Joi = require("joi"); */ /** - * @typedef BrandsByCompanyResponseSchema + * @typedef BrandsByCompanyResponse * @property {CompanyBrandInfo[]} [brands] */ /** - * @typedef ValidationFailedResponseSchema + * @typedef ValidationFailedResponse * @property {string} [message] - Response message for failed validation */ @@ -390,20 +348,20 @@ const Joi = require("joi"); */ /** - * @typedef CreateApplicationRequestSchema + * @typedef CreateApplicationRequest * @property {App} [app] * @property {ApplicationInventory} [configuration] * @property {AppDomain} [domain] */ /** - * @typedef CreateAppResponseSchema + * @typedef CreateAppResponse * @property {Application} [app] * @property {ApplicationInventory} [configuration] */ /** - * @typedef ApplicationsResponseSchema + * @typedef ApplicationsResponse * @property {Application[]} [items] * @property {Page} [page] */ @@ -441,7 +399,7 @@ const Joi = require("joi"); */ /** - * @typedef MobileAppConfigRequestSchema + * @typedef MobileAppConfigRequest * @property {string} [app_name] - Name of the mobile app * @property {LandingImage} [landing_image] * @property {SplashImage} [splash_image] @@ -513,7 +471,7 @@ const Joi = require("joi"); */ /** - * @typedef DomainAddRequestSchema + * @typedef DomainAddRequest * @property {DomainAdd} [domain] */ @@ -532,7 +490,7 @@ const Joi = require("joi"); */ /** - * @typedef DomainsResponseSchema + * @typedef DomainsResponse * @property {Domain[]} [domains] */ @@ -550,14 +508,14 @@ const Joi = require("joi"); */ /** - * @typedef UpdateDomainTypeRequestSchema + * @typedef UpdateDomainTypeRequest * @property {UpdateDomain} [domain] * @property {string} [action] - Shows domain is made primary domain for the * sales channel or shorlink is created for the sales channel domain */ /** - * @typedef DomainStatusRequestSchema + * @typedef DomainStatusRequest * @property {string} [domain_url] - URL of the domain, e.g. uniket.hostx0.de */ @@ -569,17 +527,16 @@ const Joi = require("joi"); */ /** - * @typedef DomainStatusResponseSchema + * @typedef DomainStatusResponse * @property {boolean} [connected] - Check if domain is live and mapped to * appropriate IP of Fynd Servers * @property {DomainStatus[]} [status] */ /** - * @typedef DomainSuggestionsRequestSchema + * @typedef DomainSuggestionsRequest * @property {string} [domain_url] - Domain url - * @property {boolean} [custom_domain] - Get suggestions for custom domains or - * Fynd domains + * @property {boolean} [custom] - Get suggestions for custom domains or Fynd domains */ /** @@ -594,12 +551,12 @@ const Joi = require("joi"); */ /** - * @typedef DomainSuggestionsResponseSchema + * @typedef DomainSuggestionsResponse * @property {DomainSuggestion[]} [domains] - Domain URL */ /** - * @typedef SuccessMessageResponseSchema + * @typedef SuccessMessageResponse * @property {boolean} [success] - Shows whether domain was deleted successfully * @property {string} [message] - Success message shown to the user (in a string format) */ @@ -621,7 +578,7 @@ const Joi = require("joi"); */ /** - * @typedef CompaniesResponseSchema + * @typedef CompaniesResponse * @property {AppInventoryCompanies[]} [items] * @property {Page} [page] */ @@ -635,7 +592,7 @@ const Joi = require("joi"); */ /** - * @typedef StoresResponseSchema + * @typedef StoresResponse * @property {AppInventoryStores[]} [items] * @property {Page} [page] */ @@ -662,7 +619,7 @@ const Joi = require("joi"); */ /** - * @typedef FilterOrderingStoreRequestSchema + * @typedef FilterOrderingStoreRequest * @property {boolean} [all_stores] - Allow all stores from the ordering stores * @property {number[]} [deployed_stores] * @property {string} [q] - Store code or name of the ordering store @@ -689,7 +646,7 @@ const Joi = require("joi"); */ /** - * @typedef OrderingStoreSelectRequestSchema + * @typedef OrderingStoreSelectRequest * @property {OrderingStoreSelect} ordering_store */ @@ -723,7 +680,7 @@ const Joi = require("joi"); */ /** - * @typedef OptedApplicationResponseSchema + * @typedef OptedApplicationResponse * @property {string} [name] - Name of the other seller's sales channel * @property {string} [description] - Basic details about the other seller's sales channel * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) @@ -780,7 +737,7 @@ const Joi = require("joi"); */ /** - * @typedef TokenResponseSchema + * @typedef TokenResponse * @property {Tokens} [tokens] * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the token @@ -1122,12 +1079,12 @@ const Joi = require("joi"); */ /** - * @typedef AppFeatureRequestSchema + * @typedef AppFeatureRequest * @property {AppFeature} [feature] */ /** - * @typedef AppFeatureResponseSchema + * @typedef AppFeatureResponse * @property {AppFeature} [feature] */ @@ -1288,7 +1245,7 @@ const Joi = require("joi"); */ /** - * @typedef InvalidPayloadRequestSchema + * @typedef InvalidPayloadRequest * @property {string} [message] - Error message when request body payload is improper * @property {boolean} [success] - Flag for required not successfull. */ @@ -1476,12 +1433,12 @@ const Joi = require("joi"); */ /** - * @typedef CurrenciesResponseSchema + * @typedef CurrenciesResponse * @property {Currency[]} [items] */ /** - * @typedef AppCurrencyResponseSchema + * @typedef AppCurrencyResponse * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the currency configuration supported by the application * @property {string} [application] - Alphanumeric ID allotted to an application @@ -1547,54 +1504,15 @@ const Joi = require("joi"); */ /** - * @typedef OrderingStoresResponseSchema + * @typedef OrderingStoresResponse * @property {Page} [page] * @property {OrderingStore[]} [items] */ -/** - * @typedef ValidationErrors - * @property {ValidationError[]} errors - */ - -/** - * @typedef ValidationError - * @property {string} message - A brief description of the error encountered. - * @property {string} field - The field in the request that caused the error. - */ - class ConfigurationPlatformModel { - /** @returns {CurrencyExchangeResponseV2} */ - static CurrencyExchangeResponseV2() { - return Joi.object({ - base: Joi.string().allow("").required(), - base_currency_name: Joi.string().allow("").required(), - ttl_seconds: Joi.number().required(), - items: Joi.array() - .items(ConfigurationPlatformModel.CurrencyExchangeItem()) - .required(), - total: Joi.number().required(), - }); - } - - /** @returns {CurrencyExchangeItem} */ - static CurrencyExchangeItem() { - return Joi.object({ - currency_code: Joi.string().allow("").required(), - name: Joi.string().allow("").required(), - rate: Joi.number().required(), - country_code: Joi.string().allow("").required(), - country_name: Joi.string().allow("").required(), - subunit: Joi.string().allow("").required(), - decimal_digits: Joi.number().required(), - symbol: Joi.string().allow("").required(), - }); - } - /** @returns {ApplicationInventory} */ static ApplicationInventory() { return Joi.object({ - search: ConfigurationPlatformModel.SearchConfig(), inventory: ConfigurationPlatformModel.AppInventoryConfig(), authentication: ConfigurationPlatformModel.AuthenticationConfig(), article_assignment: ConfigurationPlatformModel.ArticleAssignmentConfig(), @@ -1626,29 +1544,6 @@ class ConfigurationPlatformModel { }); } - /** @returns {FstIdentification} */ - static FstIdentification() { - return Joi.object({ - enabled: Joi.boolean(), - }); - } - - /** @returns {QuerySuggestions} */ - static QuerySuggestions() { - return Joi.object({ - enabled: Joi.boolean(), - max_limit: Joi.number(), - }); - } - - /** @returns {SearchConfig} */ - static SearchConfig() { - return Joi.object({ - fst_identification: ConfigurationPlatformModel.FstIdentification(), - query_suggestions: ConfigurationPlatformModel.QuerySuggestions(), - }); - } - /** @returns {AppInventoryConfig} */ static AppInventoryConfig() { return Joi.object({ @@ -1664,6 +1559,7 @@ class ConfigurationPlatformModel { image: Joi.array().items(Joi.string().allow("")), company_store: Joi.array().items(Joi.any()), company_id: Joi.number(), + enable_zone_overlapping: Joi.boolean(), }); } @@ -1881,7 +1777,6 @@ class ConfigurationPlatformModel { /** @returns {AppInventoryPartialUpdate} */ static AppInventoryPartialUpdate() { return Joi.object({ - search: ConfigurationPlatformModel.SearchConfig(), reward_points: ConfigurationPlatformModel.RewardPointsConfig(), cart: ConfigurationPlatformModel.AppCartConfig(), payment: ConfigurationPlatformModel.AppPaymentConfig(), @@ -1899,24 +1794,24 @@ class ConfigurationPlatformModel { }); } - /** @returns {CompanyByBrandsRequestSchema} */ - static CompanyByBrandsRequestSchema() { + /** @returns {CompanyByBrandsRequest} */ + static CompanyByBrandsRequest() { return Joi.object({ brands: Joi.number().required(), search_text: Joi.string().allow(""), }); } - /** @returns {CompanyByBrandsResponseSchema} */ - static CompanyByBrandsResponseSchema() { + /** @returns {CompanyByBrandsResponse} */ + static CompanyByBrandsResponse() { return Joi.object({ items: Joi.array().items(ConfigurationPlatformModel.BrandCompanyInfo()), page: ConfigurationPlatformModel.Page(), }); } - /** @returns {StoreByBrandsRequestSchema} */ - static StoreByBrandsRequestSchema() { + /** @returns {StoreByBrandsRequest} */ + static StoreByBrandsRequest() { return Joi.object({ company_id: Joi.number(), brands: Joi.number().required(), @@ -1924,8 +1819,8 @@ class ConfigurationPlatformModel { }); } - /** @returns {StoreByBrandsResponseSchema} */ - static StoreByBrandsResponseSchema() { + /** @returns {StoreByBrandsResponse} */ + static StoreByBrandsResponse() { return Joi.object({ items: Joi.array().items(ConfigurationPlatformModel.BrandStoreInfo()), page: ConfigurationPlatformModel.Page(), @@ -1955,15 +1850,15 @@ class ConfigurationPlatformModel { }); } - /** @returns {BrandsByCompanyResponseSchema} */ - static BrandsByCompanyResponseSchema() { + /** @returns {BrandsByCompanyResponse} */ + static BrandsByCompanyResponse() { return Joi.object({ brands: Joi.array().items(ConfigurationPlatformModel.CompanyBrandInfo()), }); } - /** @returns {ValidationFailedResponseSchema} */ - static ValidationFailedResponseSchema() { + /** @returns {ValidationFailedResponse} */ + static ValidationFailedResponse() { return Joi.object({ message: Joi.string().allow(""), }); @@ -2002,8 +1897,8 @@ class ConfigurationPlatformModel { }); } - /** @returns {CreateApplicationRequestSchema} */ - static CreateApplicationRequestSchema() { + /** @returns {CreateApplicationRequest} */ + static CreateApplicationRequest() { return Joi.object({ app: ConfigurationPlatformModel.App(), configuration: ConfigurationPlatformModel.ApplicationInventory(), @@ -2011,16 +1906,16 @@ class ConfigurationPlatformModel { }); } - /** @returns {CreateAppResponseSchema} */ - static CreateAppResponseSchema() { + /** @returns {CreateAppResponse} */ + static CreateAppResponse() { return Joi.object({ app: ConfigurationPlatformModel.Application(), configuration: ConfigurationPlatformModel.ApplicationInventory(), }); } - /** @returns {ApplicationsResponseSchema} */ - static ApplicationsResponseSchema() { + /** @returns {ApplicationsResponse} */ + static ApplicationsResponse() { return Joi.object({ items: Joi.array().items(ConfigurationPlatformModel.Application()), page: ConfigurationPlatformModel.Page(), @@ -2060,8 +1955,8 @@ class ConfigurationPlatformModel { }); } - /** @returns {MobileAppConfigRequestSchema} */ - static MobileAppConfigRequestSchema() { + /** @returns {MobileAppConfigRequest} */ + static MobileAppConfigRequest() { return Joi.object({ app_name: Joi.string().allow(""), landing_image: ConfigurationPlatformModel.LandingImage(), @@ -2127,8 +2022,8 @@ class ConfigurationPlatformModel { }); } - /** @returns {DomainAddRequestSchema} */ - static DomainAddRequestSchema() { + /** @returns {DomainAddRequest} */ + static DomainAddRequest() { return Joi.object({ domain: ConfigurationPlatformModel.DomainAdd(), }); @@ -2147,8 +2042,8 @@ class ConfigurationPlatformModel { }); } - /** @returns {DomainsResponseSchema} */ - static DomainsResponseSchema() { + /** @returns {DomainsResponse} */ + static DomainsResponse() { return Joi.object({ domains: Joi.array().items(ConfigurationPlatformModel.Domain()), }); @@ -2165,16 +2060,16 @@ class ConfigurationPlatformModel { }); } - /** @returns {UpdateDomainTypeRequestSchema} */ - static UpdateDomainTypeRequestSchema() { + /** @returns {UpdateDomainTypeRequest} */ + static UpdateDomainTypeRequest() { return Joi.object({ domain: ConfigurationPlatformModel.UpdateDomain(), action: Joi.string().allow(""), }); } - /** @returns {DomainStatusRequestSchema} */ - static DomainStatusRequestSchema() { + /** @returns {DomainStatusRequest} */ + static DomainStatusRequest() { return Joi.object({ domain_url: Joi.string().allow(""), }); @@ -2188,19 +2083,19 @@ class ConfigurationPlatformModel { }); } - /** @returns {DomainStatusResponseSchema} */ - static DomainStatusResponseSchema() { + /** @returns {DomainStatusResponse} */ + static DomainStatusResponse() { return Joi.object({ connected: Joi.boolean(), status: Joi.array().items(ConfigurationPlatformModel.DomainStatus()), }); } - /** @returns {DomainSuggestionsRequestSchema} */ - static DomainSuggestionsRequestSchema() { + /** @returns {DomainSuggestionsRequest} */ + static DomainSuggestionsRequest() { return Joi.object({ domain_url: Joi.string().allow(""), - custom_domain: Joi.boolean(), + custom: Joi.boolean(), }); } @@ -2215,15 +2110,15 @@ class ConfigurationPlatformModel { }); } - /** @returns {DomainSuggestionsResponseSchema} */ - static DomainSuggestionsResponseSchema() { + /** @returns {DomainSuggestionsResponse} */ + static DomainSuggestionsResponse() { return Joi.object({ domains: Joi.array().items(ConfigurationPlatformModel.DomainSuggestion()), }); } - /** @returns {SuccessMessageResponseSchema} */ - static SuccessMessageResponseSchema() { + /** @returns {SuccessMessageResponse} */ + static SuccessMessageResponse() { return Joi.object({ success: Joi.boolean(), message: Joi.string().allow(""), @@ -2248,8 +2143,8 @@ class ConfigurationPlatformModel { }); } - /** @returns {CompaniesResponseSchema} */ - static CompaniesResponseSchema() { + /** @returns {CompaniesResponse} */ + static CompaniesResponse() { return Joi.object({ items: Joi.array().items( ConfigurationPlatformModel.AppInventoryCompanies() @@ -2267,8 +2162,8 @@ class ConfigurationPlatformModel { }); } - /** @returns {StoresResponseSchema} */ - static StoresResponseSchema() { + /** @returns {StoresResponse} */ + static StoresResponse() { return Joi.object({ items: Joi.array().items(ConfigurationPlatformModel.AppInventoryStores()), page: ConfigurationPlatformModel.Page(), @@ -2291,8 +2186,8 @@ class ConfigurationPlatformModel { }); } - /** @returns {FilterOrderingStoreRequestSchema} */ - static FilterOrderingStoreRequestSchema() { + /** @returns {FilterOrderingStoreRequest} */ + static FilterOrderingStoreRequest() { return Joi.object({ all_stores: Joi.boolean(), deployed_stores: Joi.array().items(Joi.number()), @@ -2320,8 +2215,8 @@ class ConfigurationPlatformModel { }); } - /** @returns {OrderingStoreSelectRequestSchema} */ - static OrderingStoreSelectRequestSchema() { + /** @returns {OrderingStoreSelectRequest} */ + static OrderingStoreSelectRequest() { return Joi.object({ ordering_store: ConfigurationPlatformModel.OrderingStoreSelect().required(), }); @@ -2364,8 +2259,8 @@ class ConfigurationPlatformModel { }); } - /** @returns {OptedApplicationResponseSchema} */ - static OptedApplicationResponseSchema() { + /** @returns {OptedApplicationResponse} */ + static OptedApplicationResponse() { return Joi.object({ name: Joi.string().allow(""), description: Joi.string().allow(""), @@ -2425,8 +2320,8 @@ class ConfigurationPlatformModel { }); } - /** @returns {TokenResponseSchema} */ - static TokenResponseSchema() { + /** @returns {TokenResponse} */ + static TokenResponse() { return Joi.object({ tokens: ConfigurationPlatformModel.Tokens(), _id: Joi.string().allow(""), @@ -2632,8 +2527,8 @@ class ConfigurationPlatformModel { static LaunchPage() { return Joi.object({ page_type: Joi.string().allow(""), - params: Joi.object().pattern(/\S/, Joi.any()), - query: Joi.object().pattern(/\S/, Joi.any()), + params: Joi.any(), + query: Joi.any(), }); } @@ -2799,15 +2694,15 @@ class ConfigurationPlatformModel { }); } - /** @returns {AppFeatureRequestSchema} */ - static AppFeatureRequestSchema() { + /** @returns {AppFeatureRequest} */ + static AppFeatureRequest() { return Joi.object({ feature: ConfigurationPlatformModel.AppFeature(), }); } - /** @returns {AppFeatureResponseSchema} */ - static AppFeatureResponseSchema() { + /** @returns {AppFeatureResponse} */ + static AppFeatureResponse() { return Joi.object({ feature: ConfigurationPlatformModel.AppFeature(), }); @@ -2969,8 +2864,8 @@ class ConfigurationPlatformModel { }); } - /** @returns {InvalidPayloadRequestSchema} */ - static InvalidPayloadRequestSchema() { + /** @returns {InvalidPayloadRequest} */ + static InvalidPayloadRequest() { return Joi.object({ message: Joi.string().allow(""), success: Joi.boolean(), @@ -3198,15 +3093,15 @@ class ConfigurationPlatformModel { }); } - /** @returns {CurrenciesResponseSchema} */ - static CurrenciesResponseSchema() { + /** @returns {CurrenciesResponse} */ + static CurrenciesResponse() { return Joi.object({ items: Joi.array().items(ConfigurationPlatformModel.Currency()), }); } - /** @returns {AppCurrencyResponseSchema} */ - static AppCurrencyResponseSchema() { + /** @returns {AppCurrencyResponse} */ + static AppCurrencyResponse() { return Joi.object({ _id: Joi.string().allow(""), application: Joi.string().allow(""), @@ -3273,29 +3168,12 @@ class ConfigurationPlatformModel { }); } - /** @returns {OrderingStoresResponseSchema} */ - static OrderingStoresResponseSchema() { + /** @returns {OrderingStoresResponse} */ + static OrderingStoresResponse() { return Joi.object({ page: ConfigurationPlatformModel.Page(), items: Joi.array().items(ConfigurationPlatformModel.OrderingStore()), }); } - - /** @returns {ValidationErrors} */ - static ValidationErrors() { - return Joi.object({ - errors: Joi.array() - .items(ConfigurationPlatformModel.ValidationError()) - .required(), - }); - } - - /** @returns {ValidationError} */ - static ValidationError() { - return Joi.object({ - message: Joi.string().allow("").required(), - field: Joi.string().allow("").required(), - }); - } } module.exports = ConfigurationPlatformModel; diff --git a/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts b/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts index 5862bbf33..12e102f65 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +++ b/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts @@ -1,7 +1,7 @@ export = ConfigurationPlatformValidator; /** * @typedef CreateApplicationParam - * @property {ConfigurationPlatformModel.CreateApplicationRequestSchema} body + * @property {ConfigurationPlatformModel.CreateApplicationRequest} body */ /** * @typedef GetApplicationsParam @@ -19,21 +19,12 @@ export = ConfigurationPlatformValidator; * set of results. Default value is 1. * @property {number} [pageSize] - The number of items to retrieve in each page. * Default value is 10. - * @property {ConfigurationPlatformModel.CompanyByBrandsRequestSchema} body + * @property {ConfigurationPlatformModel.CompanyByBrandsRequest} body */ /** @typedef GetCurrenciesParam */ -/** - * @typedef GetCurrencyExchangeRatesParam - * @property {string} [currencyCode] - The 3-letter ISO 4217 code representing - * the base currency for the exchange rates. Defaults to "INR" if not specified. - * @property {string} [exchangeCurrencyCode] - A 3-letter ISO 4217 currency code - * for which exchange rates against the base currency are requested. - * @property {string} [exchangeCountryCode] - The country code for which - * exchange rates against the base currency are requested. - */ /** * @typedef GetDomainAvailibilityParam - * @property {ConfigurationPlatformModel.DomainSuggestionsRequestSchema} body + * @property {ConfigurationPlatformModel.DomainSuggestionsRequest} body */ /** * @typedef GetOtherSellerApplicationByIdParam @@ -52,7 +43,7 @@ export = ConfigurationPlatformValidator; * set of results. Default value is 1. * @property {number} [pageSize] - The number of items to retrieve in each page. * Default value is 10. - * @property {ConfigurationPlatformModel.StoreByBrandsRequestSchema} body + * @property {ConfigurationPlatformModel.StoreByBrandsRequest} body */ /** * @typedef OptOutFromApplicationParam @@ -71,8 +62,6 @@ declare class ConfigurationPlatformValidator { static getCompanyByBrands(): GetCompanyByBrandsParam; /** @returns {GetCurrenciesParam} */ static getCurrencies(): any; - /** @returns {GetCurrencyExchangeRatesParam} */ - static getCurrencyExchangeRates(): GetCurrencyExchangeRatesParam; /** @returns {GetDomainAvailibilityParam} */ static getDomainAvailibility(): GetDomainAvailibilityParam; /** @returns {GetOtherSellerApplicationByIdParam} */ @@ -85,10 +74,10 @@ declare class ConfigurationPlatformValidator { static optOutFromApplication(): OptOutFromApplicationParam; } declare namespace ConfigurationPlatformValidator { - export { CreateApplicationParam, GetApplicationsParam, GetBrandsByCompanyParam, GetCompanyByBrandsParam, GetCurrenciesParam, GetCurrencyExchangeRatesParam, GetDomainAvailibilityParam, GetOtherSellerApplicationByIdParam, GetOtherSellerApplicationsParam, GetStoreByBrandsParam, OptOutFromApplicationParam }; + export { CreateApplicationParam, GetApplicationsParam, GetBrandsByCompanyParam, GetCompanyByBrandsParam, GetCurrenciesParam, GetDomainAvailibilityParam, GetOtherSellerApplicationByIdParam, GetOtherSellerApplicationsParam, GetStoreByBrandsParam, OptOutFromApplicationParam }; } type CreateApplicationParam = { - body: ConfigurationPlatformModel.CreateApplicationRequestSchema; + body: ConfigurationPlatformModel.CreateApplicationRequest; }; type GetApplicationsParam = { pageNo?: number; @@ -115,27 +104,10 @@ type GetCompanyByBrandsParam = { * Default value is 10. */ pageSize?: number; - body: ConfigurationPlatformModel.CompanyByBrandsRequestSchema; -}; -type GetCurrencyExchangeRatesParam = { - /** - * - The 3-letter ISO 4217 code representing - * the base currency for the exchange rates. Defaults to "INR" if not specified. - */ - currencyCode?: string; - /** - * - A 3-letter ISO 4217 currency code - * for which exchange rates against the base currency are requested. - */ - exchangeCurrencyCode?: string; - /** - * - The country code for which - * exchange rates against the base currency are requested. - */ - exchangeCountryCode?: string; + body: ConfigurationPlatformModel.CompanyByBrandsRequest; }; type GetDomainAvailibilityParam = { - body: ConfigurationPlatformModel.DomainSuggestionsRequestSchema; + body: ConfigurationPlatformModel.DomainSuggestionsRequest; }; type GetOtherSellerApplicationByIdParam = { /** @@ -166,7 +138,7 @@ type GetStoreByBrandsParam = { * Default value is 10. */ pageSize?: number; - body: ConfigurationPlatformModel.StoreByBrandsRequestSchema; + body: ConfigurationPlatformModel.StoreByBrandsRequest; }; type OptOutFromApplicationParam = { /** diff --git a/sdk/platform/Configuration/ConfigurationPlatformValidator.js b/sdk/platform/Configuration/ConfigurationPlatformValidator.js index 0ea85c550..5fc579287 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformValidator.js +++ b/sdk/platform/Configuration/ConfigurationPlatformValidator.js @@ -4,7 +4,7 @@ const ConfigurationPlatformModel = require("./ConfigurationPlatformModel"); /** * @typedef CreateApplicationParam - * @property {ConfigurationPlatformModel.CreateApplicationRequestSchema} body + * @property {ConfigurationPlatformModel.CreateApplicationRequest} body */ /** @@ -25,24 +25,14 @@ const ConfigurationPlatformModel = require("./ConfigurationPlatformModel"); * set of results. Default value is 1. * @property {number} [pageSize] - The number of items to retrieve in each page. * Default value is 10. - * @property {ConfigurationPlatformModel.CompanyByBrandsRequestSchema} body + * @property {ConfigurationPlatformModel.CompanyByBrandsRequest} body */ /** @typedef GetCurrenciesParam */ -/** - * @typedef GetCurrencyExchangeRatesParam - * @property {string} [currencyCode] - The 3-letter ISO 4217 code representing - * the base currency for the exchange rates. Defaults to "INR" if not specified. - * @property {string} [exchangeCurrencyCode] - A 3-letter ISO 4217 currency code - * for which exchange rates against the base currency are requested. - * @property {string} [exchangeCountryCode] - The country code for which - * exchange rates against the base currency are requested. - */ - /** * @typedef GetDomainAvailibilityParam - * @property {ConfigurationPlatformModel.DomainSuggestionsRequestSchema} body + * @property {ConfigurationPlatformModel.DomainSuggestionsRequest} body */ /** @@ -64,7 +54,7 @@ const ConfigurationPlatformModel = require("./ConfigurationPlatformModel"); * set of results. Default value is 1. * @property {number} [pageSize] - The number of items to retrieve in each page. * Default value is 10. - * @property {ConfigurationPlatformModel.StoreByBrandsRequestSchema} body + * @property {ConfigurationPlatformModel.StoreByBrandsRequest} body */ /** @@ -78,7 +68,7 @@ class ConfigurationPlatformValidator { /** @returns {CreateApplicationParam} */ static createApplication() { return Joi.object({ - body: ConfigurationPlatformModel.CreateApplicationRequestSchema().required(), + body: ConfigurationPlatformModel.CreateApplicationRequest().required(), }).required(); } @@ -103,7 +93,7 @@ class ConfigurationPlatformValidator { return Joi.object({ pageNo: Joi.number(), pageSize: Joi.number(), - body: ConfigurationPlatformModel.CompanyByBrandsRequestSchema().required(), + body: ConfigurationPlatformModel.CompanyByBrandsRequest().required(), }).required(); } @@ -112,19 +102,10 @@ class ConfigurationPlatformValidator { return Joi.object({}).required(); } - /** @returns {GetCurrencyExchangeRatesParam} */ - static getCurrencyExchangeRates() { - return Joi.object({ - currencyCode: Joi.string().allow(""), - exchangeCurrencyCode: Joi.string().allow(""), - exchangeCountryCode: Joi.string().allow(""), - }).required(); - } - /** @returns {GetDomainAvailibilityParam} */ static getDomainAvailibility() { return Joi.object({ - body: ConfigurationPlatformModel.DomainSuggestionsRequestSchema().required(), + body: ConfigurationPlatformModel.DomainSuggestionsRequest().required(), }).required(); } @@ -148,7 +129,7 @@ class ConfigurationPlatformValidator { return Joi.object({ pageNo: Joi.number(), pageSize: Joi.number(), - body: ConfigurationPlatformModel.StoreByBrandsRequestSchema().required(), + body: ConfigurationPlatformModel.StoreByBrandsRequest().required(), }).required(); } diff --git a/sdk/platform/Content/ContentPlatformApplicationClient.d.ts b/sdk/platform/Content/ContentPlatformApplicationClient.d.ts index d2f5100f8..f9e6378de 100644 --- a/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +++ b/sdk/platform/Content/ContentPlatformApplicationClient.d.ts @@ -59,6 +59,20 @@ declare class Content { * @description: Generate and add a new announcement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAnnouncement/). */ createAnnouncement({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreateAnnouncementParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.CreateAppCustomFieldByResourceIdParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name createAppCustomFieldByResourceId + * @summary: Create custom field entries for gives resource and resource_id + * @description: You can add a custom field using this endpoint to any resource by providing the resource ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomFieldByResourceId/). + */ + createAppCustomFieldByResourceId({ resource, resourceId, body, requestHeaders }?: ContentPlatformApplicationValidator.CreateAppCustomFieldByResourceIdParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.CreateAppCustomFieldDefinitionParam} arg * - Arg object @@ -69,36 +83,35 @@ declare class Content { * - Success response * * @name createAppCustomFieldDefinition - * @summary: Create custom field definition for a given resource type + * @summary: Create custom field definition * @description: You can create custom fields definition to any resource so you can extend property of resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomFieldDefinition/). */ - createAppCustomFieldDefinition({ resource, body, requestHeaders }?: ContentPlatformApplicationValidator.CreateAppCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; + createAppCustomFieldDefinition({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreateAppCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.CreateAppCustomObjectBySlugParam} arg + * @param {ContentPlatformApplicationValidator.CreateAppCustomObjectParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name createAppCustomObjectBySlug + * @name createAppCustomObject * @summary: Create custom object entries - * @description: Custom object entries against the custom object definition can be added using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomObjectBySlug/). + * @description: Custom object entries against the custom object definition can be added using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomObject/). */ - createAppCustomObjectBySlug({ definitionSlug, body, requestHeaders }?: ContentPlatformApplicationValidator.CreateAppCustomObjectBySlugParam, { responseHeaders }?: object): Promise; + createAppCustomObject({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreateAppCustomObjectParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.CreateAppCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createAppCustomObjectDefinition * @summary: Create custom object definition * @description: Create a custom object that will have a collection of custom fields and can be used anywhere in the custom field for any resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomObjectDefinition/). */ - createAppCustomObjectDefinition({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreateAppCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; + createAppCustomObjectDefinition({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreateAppCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.CreateBlogParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -201,31 +214,31 @@ declare class Content { */ deleteAnnouncement({ announcementId, requestHeaders }?: ContentPlatformApplicationValidator.DeleteAnnouncementParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionBySlugParam} arg + * @param {ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name deleteAppCustomFieldDefinitionBySlug + * @name deleteAppCustomFieldDefinition * @summary: Delete custom fields definition - * @description: Custom field definition and its assosiated custom fields value can be deleted using this api on the basis of definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomFieldDefinitionBySlug/). + * @description: Custom field definition and its assosiated custom fields value can be deleted using this api on the basis of definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomFieldDefinition/). */ - deleteAppCustomFieldDefinitionBySlug({ slug, resource, namespace, requestHeaders }?: ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionBySlugParam, { responseHeaders }?: object): Promise; + deleteAppCustomFieldDefinition({ definitionId, requestHeaders }?: ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectBySlugParam} arg + * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name deleteAppCustomObjectBySlug + * @name deleteAppCustomObject * @summary: Delete custom object - * @description: A Custom object entry can be deleted by providing the custom object definition slug and custom object entry slug using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObjectBySlug/). + * @description: Custom object entries can be deleted by providing the delete ID using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObject/). */ - deleteAppCustomObjectBySlug({ definitionSlug, slug, requestHeaders }?: ContentPlatformApplicationValidator.DeleteAppCustomObjectBySlugParam, { responseHeaders }?: object): Promise; + deleteAppCustomObject({ metaobjectId, requestHeaders }?: ContentPlatformApplicationValidator.DeleteAppCustomObjectParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectDefinitionBySlugParam} arg + * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -233,11 +246,11 @@ declare class Content { * @returns {Promise} * - Success response * - * @name deleteAppCustomObjectDefinitionBySlug + * @name deleteAppCustomObjectDefinition * @summary: Delete custom object definition - * @description: Custom object definitions can be deleted using this endpoint by providing the definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObjectDefinitionBySlug/). + * @description: Custom object definitions can be deleted using this endpoint by providing the definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObjectDefinition/). */ - deleteAppCustomObjectDefinitionBySlug({ slug, requestHeaders }?: ContentPlatformApplicationValidator.DeleteAppCustomObjectDefinitionBySlugParam, { responseHeaders }?: object): Promise; + deleteAppCustomObjectDefinition({ definitionId, requestHeaders }?: ContentPlatformApplicationValidator.DeleteAppCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.DeleteBlogParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -383,7 +396,7 @@ declare class Content { */ editSEOMarkupSchema({ id, body, requestHeaders }?: ContentPlatformApplicationValidator.EditSEOMarkupSchemaParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.ExportAppCustomObjectEntriesBySlugParam} arg + * @param {ContentPlatformApplicationValidator.ExportAppCustomObjectEntriesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -391,11 +404,11 @@ declare class Content { * @returns {Promise} * - Success response * - * @name exportAppCustomObjectEntriesBySlug + * @name exportAppCustomObjectEntries * @summary: Initiate download for bulk custom object entries - * @description: Custom object bulk export of bulk entries can be perform using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportAppCustomObjectEntriesBySlug/). + * @description: Custom object bulk export of bulk entries can be perform using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportAppCustomObjectEntries/). */ - exportAppCustomObjectEntriesBySlug({ slug, requestHeaders }?: ContentPlatformApplicationValidator.ExportAppCustomObjectEntriesBySlugParam, { responseHeaders }?: object): Promise; + exportAppCustomObjectEntries({ definitionId, requestHeaders }?: ContentPlatformApplicationValidator.ExportAppCustomObjectEntriesParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GenerateSEOTitleParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -432,32 +445,19 @@ declare class Content { */ getAnnouncementsList({ pageNo, pageSize, requestHeaders }?: ContentPlatformApplicationValidator.GetAnnouncementsListParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionByResourceParam} arg + * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getAppCustomFieldDefinitionByResource - * @summary: Get custom fields definitions for a given resource type - * @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinitionByResource/). - */ - getAppCustomFieldDefinitionByResource({ pageNo, pageSize, resource, types, search, slugs, namespaces, requestHeaders, }?: ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionByResourceParam, { responseHeaders }?: object): Promise; - /** - * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionBySlugParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name getAppCustomFieldDefinitionBySlug - * @summary: Get custom fields definition by resource, slug and namespace - * @description: Custom field definitions can be retrived from this using its slug, namespace and resource - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinitionBySlug/). + * @name getAppCustomFieldDefinition + * @summary: Get custom fields definition + * @description: Custom field definitions can be fetch using definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinition/). */ - getAppCustomFieldDefinitionBySlug({ slug, resource, namespace, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionBySlugParam, { responseHeaders }?: object): Promise; + getAppCustomFieldDefinition({ definitionId, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionsParam} arg * - Arg object @@ -470,21 +470,34 @@ declare class Content { * @summary: Get custom fields definitions * @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinitions/). */ - getAppCustomFieldDefinitions({ pageNo, pageSize, resources, types, search, slugs, namespaces, requestHeaders, }?: ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionsParam, { responseHeaders }?: object): Promise; + getAppCustomFieldDefinitions({ pageNo, pageSize, resource, type, search, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionsParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GetAppCustomFieldTypesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAppCustomFieldTypes * @summary: Get custom field types * @description: Each custom field and custom field definition has a type, which defines the type of information that it can store. The custom field types have built-in validation. This api will give list of supported custom fields types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldTypes/). */ - getAppCustomFieldTypes({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getAppCustomFieldTypes({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomFieldsParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getAppCustomFields + * @summary: Get list of custom fields of gives resource + * @description: Retrieves a list of custom fields attached to a particular resource by using the resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFields/). + */ + getAppCustomFields({ resource, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomFieldsParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.GetAppCustomFieldsByResourceSlugParam} arg + * @param {ContentPlatformApplicationValidator.GetAppCustomFieldsByResourceIdParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -492,38 +505,36 @@ declare class Content { * @returns {Promise} * - Success response * - * @name getAppCustomFieldsByResourceSlug - * @summary: Get list of custom fields of given resource and resource slug - * @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldsByResourceSlug/). + * @name getAppCustomFieldsByResourceId + * @summary: Get list of custom fields of given resource and resource id + * @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldsByResourceId/). */ - getAppCustomFieldsByResourceSlug({ resource, resourceSlug, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomFieldsByResourceSlugParam, { responseHeaders }?: object): Promise; + getAppCustomFieldsByResourceId({ resource, resourceId, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomFieldsByResourceIdParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.GetAppCustomObjectBySlugParam} arg + * @param {ContentPlatformApplicationValidator.GetAppCustomObjectParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getAppCustomObjectBySlug + * @returns {Promise} - Success response + * @name getAppCustomObject * @summary: Get custom object details - * @description: Details of a custom object entry can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectBySlug/). + * @description: Details of custom objects, their field details, definitions, and references can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObject/). */ - getAppCustomObjectBySlug({ definitionSlug, slug, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomObjectBySlugParam, { responseHeaders }?: object): Promise; + getAppCustomObject({ metaobjectId, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomObjectParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionBySlugParam} arg + * @param {ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getAppCustomObjectDefinitionBySlug + * @returns {Promise} - + * Success response + * @name getAppCustomObjectDefinition * @summary: Get custom object definition - * @description: Custom object definitions can be fetched using their custom object definition slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectDefinitionBySlug/). + * @description: Custom object definitions can be fetched using their definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectDefinition/). */ - getAppCustomObjectDefinitionBySlug({ slug, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionBySlugParam, { responseHeaders }?: object): Promise; + getAppCustomObjectDefinition({ definitionId, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionsParam} arg * - Arg object @@ -538,17 +549,17 @@ declare class Content { */ getAppCustomObjectDefinitions({ pageNo, pageSize, search, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionsParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.GetAppCustomObjectsBySlugParam} arg + * @param {ContentPlatformApplicationValidator.GetAppCustomObjectsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getAppCustomObjectsBySlug + * @name getAppCustomObjects * @summary: Get list of custom objects - * @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectsBySlug/). + * @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjects/). */ - getAppCustomObjectsBySlug({ pageNo, pageSize, definitionSlug, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomObjectsBySlugParam, { responseHeaders }?: object): Promise; + getAppCustomObjects({ pageNo, pageSize, definitionId, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomObjectsParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GetAppJobsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -583,12 +594,12 @@ declare class Content { * @param {ContentPlatformApplicationValidator.GetBlogsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBlogs * @summary: List blogs * @description: List all blogs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getBlogs/). */ - getBlogs({ pageNo, pageSize, tags, q, slug, title, status, requestHeaders }?: ContentPlatformApplicationValidator.GetBlogsParam, { responseHeaders }?: object): Promise; + getBlogs({ pageNo, pageSize, tags, q, slug, title, status, requestHeaders }?: ContentPlatformApplicationValidator.GetBlogsParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GetDataLoadersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -618,13 +629,13 @@ declare class Content { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getDefaultNavigations * @summary: Get default navigations * @description: Retrieve default navigation elements. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getDefaultNavigations/). */ - getDefaultNavigations({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getDefaultNavigations({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GetDefaultSEOMarkupSchemaParam} arg * - Arg object @@ -698,12 +709,12 @@ declare class Content { * @param {ContentPlatformApplicationValidator.GetLandingPagesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getLandingPages * @summary: Get landing pages * @description: Lists a list landing pages as per device types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getLandingPages/). */ - getLandingPages({ pageNo, pageSize, requestHeaders }?: ContentPlatformApplicationValidator.GetLandingPagesParam, { responseHeaders }?: object): Promise; + getLandingPages({ pageNo, pageSize, requestHeaders }?: ContentPlatformApplicationValidator.GetLandingPagesParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GetLegalInformationParam} arg * - Arg object @@ -732,12 +743,12 @@ declare class Content { * @param {ContentPlatformApplicationValidator.GetNavigationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getNavigations * @summary: Get navigation items * @description: Retrieve a list of navigational elements. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getNavigations/). */ - getNavigations({ devicePlatform, pageNo, pageSize, requestHeaders }?: ContentPlatformApplicationValidator.GetNavigationsParam, { responseHeaders }?: object): Promise; + getNavigations({ devicePlatform, pageNo, pageSize, requestHeaders }?: ContentPlatformApplicationValidator.GetNavigationsParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GetPageBySlugParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -772,12 +783,12 @@ declare class Content { * @param {ContentPlatformApplicationValidator.GetPagesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPages * @summary: Get pages * @description: Retrieve a list of available pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPages/). */ - getPages({ pageNo, pageSize, requestHeaders }?: ContentPlatformApplicationValidator.GetPagesParam, { responseHeaders }?: object): Promise; + getPages({ pageNo, pageSize, requestHeaders }?: ContentPlatformApplicationValidator.GetPagesParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GetPathRedirectionRuleParam} arg * - Arg object @@ -854,12 +865,32 @@ declare class Content { * @param {ContentPlatformApplicationValidator.GetSlideshowsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSlideshows * @summary: List Slideshows * @description: Use this API to list all Slideshows - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSlideshows/). */ - getSlideshows({ devicePlatform, pageNo, pageSize, requestHeaders }?: ContentPlatformApplicationValidator.GetSlideshowsParam, { responseHeaders }?: object): Promise; + getSlideshows({ devicePlatform, pageNo, pageSize, requestHeaders }?: ContentPlatformApplicationValidator.GetSlideshowsParam, { responseHeaders }?: object): Promise; + /** + * @param {Object} arg - Arg object. + * @param {string} arg.companyId - Numeric ID allotted to a business account + * on Fynd Platform + * @param {string} arg.applicationId - Numeric ID allotted to an application + * created within a business account. + * @param {string} arg.devicePlatform - Filter slideshows by platform. + * Acceptable values are: web, android, ios and all + * @param {number} [arg.pageSize] - The number of items to retrieve in each + * page. Default value is 10. + * @returns {Paginator} + * @summary: List Slideshows + * @description: Use this API to list all Slideshows + */ + getSlideshowsPaginator({ companyId, applicationId, devicePlatform, pageSize, }?: { + companyId: string; + applicationId: string; + devicePlatform: string; + pageSize?: number; + }): Paginator; /** * @param {ContentPlatformApplicationValidator.GetSupportInformationParam} arg * - Arg object @@ -873,31 +904,32 @@ declare class Content { */ getSupportInformation({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.ImportAppCustomObjectEntriesBySlugParam} arg + * @param {ContentPlatformApplicationValidator.ImportAppCustomObjectEntriesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name importAppCustomObjectEntriesBySlug + * @name importAppCustomObjectEntries * @summary: Bulk custom object entries upload - * @description: Custom object bulk import of bulk entries can be performed using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importAppCustomObjectEntriesBySlug/). + * @description: Custom object bulk import of bulk entries can be performed using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importAppCustomObjectEntries/). */ - importAppCustomObjectEntriesBySlug({ slug, body, requestHeaders }?: ContentPlatformApplicationValidator.ImportAppCustomObjectEntriesBySlugParam, { responseHeaders }?: object): Promise; + importAppCustomObjectEntries({ definitionId, body, requestHeaders }?: ContentPlatformApplicationValidator.ImportAppCustomObjectEntriesParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.RemoveInjectableTagParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name removeInjectableTag * @summary: Remove HTML tag * @description: Delete a specific injectable tag. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/removeInjectableTag/). */ - removeInjectableTag({ body, requestHeaders }?: ContentPlatformApplicationValidator.RemoveInjectableTagParam, { responseHeaders }?: object): Promise; + removeInjectableTag({ body, requestHeaders }?: ContentPlatformApplicationValidator.RemoveInjectableTagParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.ResetDataLoaderParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -910,17 +942,17 @@ declare class Content { */ resetDataLoader({ service, operationId, requestHeaders }?: ContentPlatformApplicationValidator.ResetDataLoaderParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.SampleAppCustomObjectBulkEntryBySlugParam} arg + * @param {ContentPlatformApplicationValidator.SampleAppCustomObjectBulkEntryParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name sampleAppCustomObjectBulkEntryBySlug + * @name sampleAppCustomObjectBulkEntry * @summary: Download sample for custom object bulk entry - * @description: Sample files for custom object bulk import can be obtained from this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleAppCustomObjectBulkEntryBySlug/). + * @description: Sample files for custom object bulk import can be obtained from this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleAppCustomObjectBulkEntry/). */ - sampleAppCustomObjectBulkEntryBySlug({ slug, requestHeaders }?: ContentPlatformApplicationValidator.SampleAppCustomObjectBulkEntryBySlugParam, { responseHeaders }?: object): Promise; + sampleAppCustomObjectBulkEntry({ definitionId, requestHeaders }?: ContentPlatformApplicationValidator.SampleAppCustomObjectBulkEntryParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.SelectDataLoaderParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -959,21 +991,7 @@ declare class Content { */ updateAnnouncementSchedule({ announcementId, body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateAnnouncementScheduleParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldByResourceSlugParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name updateAppCustomFieldByResourceSlug - * @summary: Create custom field entries for gives resource and resource slug - * @description: You can add a custom field using this endpoint to any resource by providing the resource slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomFieldByResourceSlug/). - */ - updateAppCustomFieldByResourceSlug({ resource, resourceSlug, body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateAppCustomFieldByResourceSlugParam, { responseHeaders }?: object): Promise; - /** - * @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionBySlugParam} arg + * @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -981,38 +999,36 @@ declare class Content { * @returns {Promise} * - Success response * - * @name updateAppCustomFieldDefinitionBySlug + * @name updateAppCustomFieldDefinition * @summary: Update custom field definition - * @description: Custom fields definition can be update using this api, You can update custom field definition name and description. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomFieldDefinitionBySlug/). + * @description: Custom fields definition can be update using this api, You can update custom field definition name and description. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomFieldDefinition/). */ - updateAppCustomFieldDefinitionBySlug({ slug, resource, namespace, body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionBySlugParam, { responseHeaders }?: object): Promise; + updateAppCustomFieldDefinition({ definitionId, body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectBySlugParam} arg + * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name updateAppCustomObjectBySlug + * @returns {Promise} - Success response + * @name updateAppCustomObject * @summary: Update custom object details - * @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObjectBySlug/). + * @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObject/). */ - updateAppCustomObjectBySlug({ definitionSlug, slug, body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateAppCustomObjectBySlugParam, { responseHeaders }?: object): Promise; + updateAppCustomObject({ metaobjectId, body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateAppCustomObjectParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionBySlugParam} arg + * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name updateAppCustomObjectDefinitionBySlug + * @returns {Promise} - + * Success response + * @name updateAppCustomObjectDefinition * @summary: Update custom object definition - * @description: Custom object definitions can be updated using this endpoint. You can update the name and description of the custom object and add more custom field definitions to the existing custom object. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObjectDefinitionBySlug/). + * @description: Custom object definitions can be updated using this endpoint. You can update the name and description of the custom object and add more custom field definitions to the existing custom object. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObjectDefinition/). */ - updateAppCustomObjectDefinitionBySlug({ slug, body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionBySlugParam, { responseHeaders }?: object): Promise; + updateAppCustomObjectDefinition({ definitionId, body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.UpdateBlogParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -1162,3 +1178,4 @@ declare class Content { } import ContentPlatformApplicationValidator = require("./ContentPlatformApplicationValidator"); import ContentPlatformModel = require("./ContentPlatformModel"); +import Paginator = require("../../common/Paginator"); diff --git a/sdk/platform/Content/ContentPlatformApplicationClient.js b/sdk/platform/Content/ContentPlatformApplicationClient.js index 07344caba..eb8960f74 100644 --- a/sdk/platform/Content/ContentPlatformApplicationClient.js +++ b/sdk/platform/Content/ContentPlatformApplicationClient.js @@ -416,6 +416,93 @@ class Content { return response; } + /** + * @param {ContentPlatformApplicationValidator.CreateAppCustomFieldByResourceIdParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name createAppCustomFieldByResourceId + * @summary: Create custom field entries for gives resource and resource_id + * @description: You can add a custom field using this endpoint to any resource by providing the resource ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomFieldByResourceId/). + */ + async createAppCustomFieldByResourceId( + { resource, resourceId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.createAppCustomFieldByResourceId().validate( + { + resource, + resourceId, + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.createAppCustomFieldByResourceId().validate( + { + resource, + resourceId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > createAppCustomFieldByResourceId \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "put", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/${resource}/${resourceId}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomFieldsResponseByResourceIdSchema().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Content > createAppCustomFieldByResourceId \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {ContentPlatformApplicationValidator.CreateAppCustomFieldDefinitionParam} arg * - Arg object @@ -426,18 +513,17 @@ class Content { * - Success response * * @name createAppCustomFieldDefinition - * @summary: Create custom field definition for a given resource type + * @summary: Create custom field definition * @description: You can create custom fields definition to any resource so you can extend property of resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomFieldDefinition/). */ async createAppCustomFieldDefinition( - { resource, body, requestHeaders } = { requestHeaders: {} }, + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, } = ContentPlatformApplicationValidator.createAppCustomFieldDefinition().validate( { - resource, body, }, { abortEarly: false, allowUnknown: true } @@ -451,7 +537,6 @@ class Content { error: warrning, } = ContentPlatformApplicationValidator.createAppCustomFieldDefinition().validate( { - resource, body, }, { abortEarly: false, allowUnknown: false } @@ -468,7 +553,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/definition`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions`, query_params, body, requestHeaders, @@ -502,25 +587,24 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.CreateAppCustomObjectBySlugParam} arg + * @param {ContentPlatformApplicationValidator.CreateAppCustomObjectParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name createAppCustomObjectBySlug + * @name createAppCustomObject * @summary: Create custom object entries - * @description: Custom object entries against the custom object definition can be added using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomObjectBySlug/). + * @description: Custom object entries against the custom object definition can be added using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomObject/). */ - async createAppCustomObjectBySlug( - { definitionSlug, body, requestHeaders } = { requestHeaders: {} }, + async createAppCustomObject( + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.createAppCustomObjectBySlug().validate( + } = ContentPlatformApplicationValidator.createAppCustomObject().validate( { - definitionSlug, body, }, { abortEarly: false, allowUnknown: true } @@ -532,9 +616,8 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.createAppCustomObjectBySlug().validate( + } = ContentPlatformApplicationValidator.createAppCustomObject().validate( { - definitionSlug, body, }, { abortEarly: false, allowUnknown: false } @@ -542,7 +625,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > createAppCustomObjectBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createAppCustomObject \n ${warrning}`, }); } @@ -551,7 +634,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects`, query_params, body, requestHeaders, @@ -576,7 +659,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > createAppCustomObjectBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createAppCustomObject \n ${res_error}`, }); } } @@ -590,9 +673,8 @@ class Content { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createAppCustomObjectDefinition * @summary: Create custom object definition * @description: Create a custom object that will have a collection of custom fields and can be used anywhere in the custom field for any resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomObjectDefinition/). @@ -634,7 +716,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions`, query_params, body, requestHeaders, @@ -648,7 +730,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate( + } = ContentPlatformModel.CustomObjectDefinitionSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1386,27 +1468,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionBySlugParam} arg + * @param {ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name deleteAppCustomFieldDefinitionBySlug + * @name deleteAppCustomFieldDefinition * @summary: Delete custom fields definition - * @description: Custom field definition and its assosiated custom fields value can be deleted using this api on the basis of definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomFieldDefinitionBySlug/). + * @description: Custom field definition and its assosiated custom fields value can be deleted using this api on the basis of definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomFieldDefinition/). */ - async deleteAppCustomFieldDefinitionBySlug( - { slug, resource, namespace, requestHeaders } = { requestHeaders: {} }, + async deleteAppCustomFieldDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinitionBySlug().validate( + } = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinition().validate( { - slug, - resource, - namespace, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -1417,18 +1497,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinitionBySlug().validate( + } = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinition().validate( { - slug, - resource, - namespace, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteAppCustomFieldDefinitionBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteAppCustomFieldDefinition \n ${warrning}`, }); } @@ -1437,7 +1515,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "delete", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions/${definitionId}`, query_params, undefined, requestHeaders, @@ -1462,7 +1540,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteAppCustomFieldDefinitionBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteAppCustomFieldDefinition \n ${res_error}`, }); } } @@ -1471,26 +1549,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectBySlugParam} arg + * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name deleteAppCustomObjectBySlug + * @name deleteAppCustomObject * @summary: Delete custom object - * @description: A Custom object entry can be deleted by providing the custom object definition slug and custom object entry slug using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObjectBySlug/). + * @description: Custom object entries can be deleted by providing the delete ID using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObject/). */ - async deleteAppCustomObjectBySlug( - { definitionSlug, slug, requestHeaders } = { requestHeaders: {} }, + async deleteAppCustomObject( + { metaobjectId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.deleteAppCustomObjectBySlug().validate( + } = ContentPlatformApplicationValidator.deleteAppCustomObject().validate( { - definitionSlug, - slug, + metaobjectId, }, { abortEarly: false, allowUnknown: true } ); @@ -1501,17 +1578,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.deleteAppCustomObjectBySlug().validate( + } = ContentPlatformApplicationValidator.deleteAppCustomObject().validate( { - definitionSlug, - slug, + metaobjectId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteAppCustomObjectBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteAppCustomObject \n ${warrning}`, }); } @@ -1520,7 +1596,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "delete", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/${metaobjectId}`, query_params, undefined, requestHeaders, @@ -1545,7 +1621,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteAppCustomObjectBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteAppCustomObject \n ${res_error}`, }); } } @@ -1554,7 +1630,7 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectDefinitionBySlugParam} arg + * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -1562,19 +1638,19 @@ class Content { * @returns {Promise} * - Success response * - * @name deleteAppCustomObjectDefinitionBySlug + * @name deleteAppCustomObjectDefinition * @summary: Delete custom object definition - * @description: Custom object definitions can be deleted using this endpoint by providing the definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObjectDefinitionBySlug/). + * @description: Custom object definitions can be deleted using this endpoint by providing the definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObjectDefinition/). */ - async deleteAppCustomObjectDefinitionBySlug( - { slug, requestHeaders } = { requestHeaders: {} }, + async deleteAppCustomObjectDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.deleteAppCustomObjectDefinitionBySlug().validate( + } = ContentPlatformApplicationValidator.deleteAppCustomObjectDefinition().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -1585,16 +1661,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.deleteAppCustomObjectDefinitionBySlug().validate( + } = ContentPlatformApplicationValidator.deleteAppCustomObjectDefinition().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteAppCustomObjectDefinitionBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteAppCustomObjectDefinition \n ${warrning}`, }); } @@ -1603,7 +1679,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "delete", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions/${definitionId}`, query_params, undefined, requestHeaders, @@ -1628,7 +1704,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteAppCustomObjectDefinitionBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteAppCustomObjectDefinition \n ${res_error}`, }); } } @@ -2678,7 +2754,7 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.ExportAppCustomObjectEntriesBySlugParam} arg + * @param {ContentPlatformApplicationValidator.ExportAppCustomObjectEntriesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -2686,19 +2762,19 @@ class Content { * @returns {Promise} * - Success response * - * @name exportAppCustomObjectEntriesBySlug + * @name exportAppCustomObjectEntries * @summary: Initiate download for bulk custom object entries - * @description: Custom object bulk export of bulk entries can be perform using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportAppCustomObjectEntriesBySlug/). + * @description: Custom object bulk export of bulk entries can be perform using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportAppCustomObjectEntries/). */ - async exportAppCustomObjectEntriesBySlug( - { slug, requestHeaders } = { requestHeaders: {} }, + async exportAppCustomObjectEntries( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.exportAppCustomObjectEntriesBySlug().validate( + } = ContentPlatformApplicationValidator.exportAppCustomObjectEntries().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -2709,16 +2785,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.exportAppCustomObjectEntriesBySlug().validate( + } = ContentPlatformApplicationValidator.exportAppCustomObjectEntries().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > exportAppCustomObjectEntriesBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > exportAppCustomObjectEntries \n ${warrning}`, }); } @@ -2727,7 +2803,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}/bulk/download`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/bulk/${definitionId}/download`, query_params, undefined, requestHeaders, @@ -2752,7 +2828,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > exportAppCustomObjectEntriesBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > exportAppCustomObjectEntries \n ${res_error}`, }); } } @@ -3009,41 +3085,27 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionByResourceParam} arg + * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getAppCustomFieldDefinitionByResource - * @summary: Get custom fields definitions for a given resource type - * @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinitionByResource/). + * @returns {Promise} + * - Success response + * + * @name getAppCustomFieldDefinition + * @summary: Get custom fields definition + * @description: Custom field definitions can be fetch using definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinition/). */ - async getAppCustomFieldDefinitionByResource( - { - pageNo, - pageSize, - resource, - types, - search, - slugs, - namespaces, - requestHeaders, - } = { requestHeaders: {} }, + async getAppCustomFieldDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitionByResource().validate( + } = ContentPlatformApplicationValidator.getAppCustomFieldDefinition().validate( { - pageNo, - pageSize, - resource, - types, - search, - slugs, - namespaces, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -3054,37 +3116,25 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitionByResource().validate( + } = ContentPlatformApplicationValidator.getAppCustomFieldDefinition().validate( { - pageNo, - pageSize, - resource, - types, - search, - slugs, - namespaces, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinitionByResource \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinition \n ${warrning}`, }); } const query_params = {}; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; - query_params["types"] = types; - query_params["search"] = search; - query_params["slugs"] = slugs; - query_params["namespaces"] = namespaces; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/definition`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions/${definitionId}`, query_params, undefined, requestHeaders, @@ -3098,7 +3148,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate( + } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3109,7 +3159,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinitionByResource \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinition \n ${res_error}`, }); } } @@ -3118,29 +3168,32 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionBySlugParam} arg + * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getAppCustomFieldDefinitionBySlug - * @summary: Get custom fields definition by resource, slug and namespace - * @description: Custom field definitions can be retrived from this using its slug, namespace and resource - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinitionBySlug/). + * @returns {Promise} - + * Success response + * @name getAppCustomFieldDefinitions + * @summary: Get custom fields definitions + * @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinitions/). */ - async getAppCustomFieldDefinitionBySlug( - { slug, resource, namespace, requestHeaders } = { requestHeaders: {} }, + async getAppCustomFieldDefinitions( + { pageNo, pageSize, resource, type, search, requestHeaders } = { + requestHeaders: {}, + }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitionBySlug().validate( + } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitions().validate( { - slug, + pageNo, + pageSize, resource, - namespace, + type, + search, }, { abortEarly: false, allowUnknown: true } ); @@ -3151,27 +3204,34 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitionBySlug().validate( + } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitions().validate( { - slug, + pageNo, + pageSize, resource, - namespace, + type, + search, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinitionBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinitions \n ${warrning}`, }); } const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["resource"] = resource; + query_params["type"] = type; + query_params["search"] = search; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions`, query_params, undefined, requestHeaders, @@ -3185,7 +3245,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.MetaFieldDefinitionDetailResSchema().validate( + } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3196,7 +3256,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinitionBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinitions \n ${res_error}`, }); } } @@ -3205,42 +3265,24 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionsParam} arg + * @param {ContentPlatformApplicationValidator.GetAppCustomFieldTypesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getAppCustomFieldDefinitions - * @summary: Get custom fields definitions - * @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinitions/). + * @returns {Promise} - Success response + * @name getAppCustomFieldTypes + * @summary: Get custom field types + * @description: Each custom field and custom field definition has a type, which defines the type of information that it can store. The custom field types have built-in validation. This api will give list of supported custom fields types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldTypes/). */ - async getAppCustomFieldDefinitions( - { - pageNo, - pageSize, - resources, - types, - search, - slugs, - namespaces, - requestHeaders, - } = { requestHeaders: {} }, + async getAppCustomFieldTypes( + { requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitions().validate( - { - pageNo, - pageSize, - resources, - types, - search, - slugs, - namespaces, - }, + } = ContentPlatformApplicationValidator.getAppCustomFieldTypes().validate( + {}, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -3250,38 +3292,23 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitions().validate( - { - pageNo, - pageSize, - resources, - types, - search, - slugs, - namespaces, - }, + } = ContentPlatformApplicationValidator.getAppCustomFieldTypes().validate( + {}, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinitions \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldTypes \n ${warrning}`, }); } const query_params = {}; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; - query_params["resources"] = resources; - query_params["types"] = types; - query_params["search"] = search; - query_params["slugs"] = slugs; - query_params["namespaces"] = namespaces; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/definition`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/types`, query_params, undefined, requestHeaders, @@ -3295,10 +3322,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -3306,7 +3333,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinitions \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getAppCustomFieldTypes \n ${res_error}`, }); } } @@ -3315,24 +3342,27 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetAppCustomFieldTypesParam} arg + * @param {ContentPlatformApplicationValidator.GetAppCustomFieldsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getAppCustomFieldTypes - * @summary: Get custom field types - * @description: Each custom field and custom field definition has a type, which defines the type of information that it can store. The custom field types have built-in validation. This api will give list of supported custom fields types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldTypes/). + * @returns {Promise} - + * Success response + * @name getAppCustomFields + * @summary: Get list of custom fields of gives resource + * @description: Retrieves a list of custom fields attached to a particular resource by using the resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFields/). */ - async getAppCustomFieldTypes( - { requestHeaders } = { requestHeaders: {} }, + async getAppCustomFields( + { resource, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getAppCustomFieldTypes().validate( - {}, + } = ContentPlatformApplicationValidator.getAppCustomFields().validate( + { + resource, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -3342,14 +3372,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getAppCustomFieldTypes().validate( - {}, + } = ContentPlatformApplicationValidator.getAppCustomFields().validate( + { + resource, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldTypes \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getAppCustomFields \n ${warrning}`, }); } @@ -3358,7 +3390,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/types`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/${resource}`, query_params, undefined, requestHeaders, @@ -3372,10 +3404,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.MetafieldTypesSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ContentPlatformModel.CustomFieldsResponseSchema().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -3383,7 +3415,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getAppCustomFieldTypes \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getAppCustomFields \n ${res_error}`, }); } } @@ -3392,7 +3424,7 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetAppCustomFieldsByResourceSlugParam} arg + * @param {ContentPlatformApplicationValidator.GetAppCustomFieldsByResourceIdParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -3400,20 +3432,20 @@ class Content { * @returns {Promise} * - Success response * - * @name getAppCustomFieldsByResourceSlug - * @summary: Get list of custom fields of given resource and resource slug - * @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldsByResourceSlug/). + * @name getAppCustomFieldsByResourceId + * @summary: Get list of custom fields of given resource and resource id + * @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldsByResourceId/). */ - async getAppCustomFieldsByResourceSlug( - { resource, resourceSlug, requestHeaders } = { requestHeaders: {} }, + async getAppCustomFieldsByResourceId( + { resource, resourceId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getAppCustomFieldsByResourceSlug().validate( + } = ContentPlatformApplicationValidator.getAppCustomFieldsByResourceId().validate( { resource, - resourceSlug, + resourceId, }, { abortEarly: false, allowUnknown: true } ); @@ -3424,17 +3456,17 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getAppCustomFieldsByResourceSlug().validate( + } = ContentPlatformApplicationValidator.getAppCustomFieldsByResourceId().validate( { resource, - resourceSlug, + resourceId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldsByResourceSlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldsByResourceId \n ${warrning}`, }); } @@ -3443,7 +3475,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/${resourceSlug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/${resource}/${resourceId}`, query_params, undefined, requestHeaders, @@ -3468,7 +3500,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getAppCustomFieldsByResourceSlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getAppCustomFieldsByResourceId \n ${res_error}`, }); } } @@ -3477,27 +3509,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetAppCustomObjectBySlugParam} arg + * @param {ContentPlatformApplicationValidator.GetAppCustomObjectParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getAppCustomObjectBySlug + * @returns {Promise} - Success response + * @name getAppCustomObject * @summary: Get custom object details - * @description: Details of a custom object entry can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectBySlug/). + * @description: Details of custom objects, their field details, definitions, and references can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObject/). */ - async getAppCustomObjectBySlug( - { definitionSlug, slug, requestHeaders } = { requestHeaders: {} }, + async getAppCustomObject( + { metaobjectId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getAppCustomObjectBySlug().validate( + } = ContentPlatformApplicationValidator.getAppCustomObject().validate( { - definitionSlug, - slug, + metaobjectId, }, { abortEarly: false, allowUnknown: true } ); @@ -3508,17 +3538,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getAppCustomObjectBySlug().validate( + } = ContentPlatformApplicationValidator.getAppCustomObject().validate( { - definitionSlug, - slug, + metaobjectId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getAppCustomObjectBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getAppCustomObject \n ${warrning}`, }); } @@ -3527,7 +3556,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/${metaobjectId}`, query_params, undefined, requestHeaders, @@ -3541,7 +3570,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomObjectBySlugSchema().validate(responseData, { + } = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3552,7 +3581,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getAppCustomObjectBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getAppCustomObject \n ${res_error}`, }); } } @@ -3561,27 +3590,26 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionBySlugParam} arg + * @param {ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getAppCustomObjectDefinitionBySlug + * @returns {Promise} - + * Success response + * @name getAppCustomObjectDefinition * @summary: Get custom object definition - * @description: Custom object definitions can be fetched using their custom object definition slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectDefinitionBySlug/). + * @description: Custom object definitions can be fetched using their definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectDefinition/). */ - async getAppCustomObjectDefinitionBySlug( - { slug, requestHeaders } = { requestHeaders: {} }, + async getAppCustomObjectDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getAppCustomObjectDefinitionBySlug().validate( + } = ContentPlatformApplicationValidator.getAppCustomObjectDefinition().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -3592,16 +3620,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getAppCustomObjectDefinitionBySlug().validate( + } = ContentPlatformApplicationValidator.getAppCustomObjectDefinition().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getAppCustomObjectDefinitionBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getAppCustomObjectDefinition \n ${warrning}`, }); } @@ -3610,7 +3638,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions/${definitionId}`, query_params, undefined, requestHeaders, @@ -3624,7 +3652,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate( + } = ContentPlatformModel.CustomObjectDefinitionSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3635,7 +3663,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getAppCustomObjectDefinitionBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getAppCustomObjectDefinition \n ${res_error}`, }); } } @@ -3699,7 +3727,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions`, query_params, undefined, requestHeaders, @@ -3733,29 +3761,27 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetAppCustomObjectsBySlugParam} arg + * @param {ContentPlatformApplicationValidator.GetAppCustomObjectsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getAppCustomObjectsBySlug + * @name getAppCustomObjects * @summary: Get list of custom objects - * @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectsBySlug/). + * @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjects/). */ - async getAppCustomObjectsBySlug( - { pageNo, pageSize, definitionSlug, requestHeaders } = { - requestHeaders: {}, - }, + async getAppCustomObjects( + { pageNo, pageSize, definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getAppCustomObjectsBySlug().validate( + } = ContentPlatformApplicationValidator.getAppCustomObjects().validate( { pageNo, pageSize, - definitionSlug, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -3766,29 +3792,30 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getAppCustomObjectsBySlug().validate( + } = ContentPlatformApplicationValidator.getAppCustomObjects().validate( { pageNo, pageSize, - definitionSlug, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getAppCustomObjectsBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getAppCustomObjects \n ${warrning}`, }); } const query_params = {}; + query_params["definition_id"] = definitionId; query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects`, query_params, undefined, requestHeaders, @@ -3813,7 +3840,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getAppCustomObjectsBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getAppCustomObjects \n ${res_error}`, }); } } @@ -4063,7 +4090,7 @@ class Content { * @param {ContentPlatformApplicationValidator.GetBlogsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBlogs * @summary: List blogs * @description: List all blogs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getBlogs/). @@ -4138,7 +4165,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.BlogGetDetails().validate(responseData, { + } = ContentPlatformModel.BlogGetResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4320,7 +4347,7 @@ class Content { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getDefaultNavigations * @summary: Get default navigations @@ -4373,10 +4400,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.DefaultNavigationDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ContentPlatformModel.DefaultNavigationResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4877,7 +4904,7 @@ class Content { * @param {ContentPlatformApplicationValidator.GetLandingPagesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getLandingPages * @summary: Get landing pages * @description: Lists a list landing pages as per device types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getLandingPages/). @@ -4937,7 +4964,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.LandingPageGetDetails().validate(responseData, { + } = ContentPlatformModel.LandingPageGetResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -5121,7 +5148,7 @@ class Content { * @param {ContentPlatformApplicationValidator.GetNavigationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getNavigations * @summary: Get navigation items * @description: Retrieve a list of navigational elements. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getNavigations/). @@ -5186,7 +5213,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.NavigationGetDetails().validate(responseData, { + } = ContentPlatformModel.NavigationGetResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -5438,7 +5465,7 @@ class Content { * @param {ContentPlatformApplicationValidator.GetPagesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPages * @summary: Get pages * @description: Retrieve a list of available pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPages/). @@ -5496,7 +5523,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.PageGetDetails().validate(responseData, { + } = ContentPlatformModel.PageGetResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -6020,7 +6047,7 @@ class Content { * @param {ContentPlatformApplicationValidator.GetSlideshowsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSlideshows * @summary: List Slideshows * @description: Use this API to list all Slideshows - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSlideshows/). @@ -6085,7 +6112,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.SlideshowGetDetails().validate(responseData, { + } = ContentPlatformModel.SlideshowGetResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -6104,6 +6131,48 @@ class Content { return response; } + /** + * @param {Object} arg - Arg object. + * @param {string} arg.companyId - Numeric ID allotted to a business account + * on Fynd Platform + * @param {string} arg.applicationId - Numeric ID allotted to an application + * created within a business account. + * @param {string} arg.devicePlatform - Filter slideshows by platform. + * Acceptable values are: web, android, ios and all + * @param {number} [arg.pageSize] - The number of items to retrieve in each + * page. Default value is 10. + * @returns {Paginator} + * @summary: List Slideshows + * @description: Use this API to list all Slideshows + */ + getSlideshowsPaginator({ + companyId, + applicationId, + devicePlatform, + pageSize, + } = {}) { + const paginator = new Paginator(); + const callback = async () => { + const pageId = paginator.nextId; + const pageNo = paginator.pageNo; + const pageType = "number"; + const data = await this.getSlideshows({ + companyId: companyId, + applicationId: applicationId, + devicePlatform: devicePlatform, + pageNo: pageNo, + pageSize: pageSize, + }); + paginator.setPaginator({ + hasNext: data.page.has_next ? true : false, + nextId: data.page.next_id, + }); + return data; + }; + paginator.setCallback(callback.bind(this)); + return paginator; + } + /** * @param {ContentPlatformApplicationValidator.GetSupportInformationParam} arg * - Arg object @@ -6182,27 +6251,27 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.ImportAppCustomObjectEntriesBySlugParam} arg + * @param {ContentPlatformApplicationValidator.ImportAppCustomObjectEntriesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name importAppCustomObjectEntriesBySlug + * @name importAppCustomObjectEntries * @summary: Bulk custom object entries upload - * @description: Custom object bulk import of bulk entries can be performed using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importAppCustomObjectEntriesBySlug/). + * @description: Custom object bulk import of bulk entries can be performed using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importAppCustomObjectEntries/). */ - async importAppCustomObjectEntriesBySlug( - { slug, body, requestHeaders } = { requestHeaders: {} }, + async importAppCustomObjectEntries( + { definitionId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.importAppCustomObjectEntriesBySlug().validate( + } = ContentPlatformApplicationValidator.importAppCustomObjectEntries().validate( { - slug, + definitionId, body, }, { abortEarly: false, allowUnknown: true } @@ -6214,9 +6283,9 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.importAppCustomObjectEntriesBySlug().validate( + } = ContentPlatformApplicationValidator.importAppCustomObjectEntries().validate( { - slug, + definitionId, body, }, { abortEarly: false, allowUnknown: false } @@ -6224,7 +6293,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > importAppCustomObjectEntriesBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > importAppCustomObjectEntries \n ${warrning}`, }); } @@ -6233,7 +6302,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}/bulk/upload`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/bulk/${definitionId}/upload`, query_params, body, requestHeaders, @@ -6247,7 +6316,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomObjectEntryBulkUploadDetails().validate( + } = ContentPlatformModel.CustomObjectEntryBulkUploadResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -6258,7 +6327,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > importAppCustomObjectEntriesBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > importAppCustomObjectEntries \n ${res_error}`, }); } } @@ -6272,7 +6341,8 @@ class Content { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name removeInjectableTag * @summary: Remove HTML tag * @description: Delete a specific injectable tag. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/removeInjectableTag/). @@ -6328,7 +6398,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.TagDeleteSuccessDetails().validate(responseData, { + } = ContentPlatformModel.TagDeleteSuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -6430,25 +6500,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.SampleAppCustomObjectBulkEntryBySlugParam} arg + * @param {ContentPlatformApplicationValidator.SampleAppCustomObjectBulkEntryParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name sampleAppCustomObjectBulkEntryBySlug + * @name sampleAppCustomObjectBulkEntry * @summary: Download sample for custom object bulk entry - * @description: Sample files for custom object bulk import can be obtained from this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleAppCustomObjectBulkEntryBySlug/). + * @description: Sample files for custom object bulk import can be obtained from this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleAppCustomObjectBulkEntry/). */ - async sampleAppCustomObjectBulkEntryBySlug( - { slug, requestHeaders } = { requestHeaders: {} }, + async sampleAppCustomObjectBulkEntry( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.sampleAppCustomObjectBulkEntryBySlug().validate( + } = ContentPlatformApplicationValidator.sampleAppCustomObjectBulkEntry().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -6459,16 +6529,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.sampleAppCustomObjectBulkEntryBySlug().validate( + } = ContentPlatformApplicationValidator.sampleAppCustomObjectBulkEntry().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > sampleAppCustomObjectBulkEntryBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > sampleAppCustomObjectBulkEntry \n ${warrning}`, }); } @@ -6477,7 +6547,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}/bulk/sample`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/bulk/${definitionId}/sample`, query_params, undefined, requestHeaders, @@ -6499,7 +6569,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > sampleAppCustomObjectBulkEntryBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > sampleAppCustomObjectBulkEntry \n ${res_error}`, }); } } @@ -6756,94 +6826,7 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldByResourceSlugParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name updateAppCustomFieldByResourceSlug - * @summary: Create custom field entries for gives resource and resource slug - * @description: You can add a custom field using this endpoint to any resource by providing the resource slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomFieldByResourceSlug/). - */ - async updateAppCustomFieldByResourceSlug( - { resource, resourceSlug, body, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = ContentPlatformApplicationValidator.updateAppCustomFieldByResourceSlug().validate( - { - resource, - resourceSlug, - body, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = ContentPlatformApplicationValidator.updateAppCustomFieldByResourceSlug().validate( - { - resource, - resourceSlug, - body, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldByResourceSlug \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "put", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/${resourceSlug}`, - query_params, - body, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = ContentPlatformModel.CustomFieldsResponseByResourceIdSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > Content > updateAppCustomFieldByResourceSlug \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionBySlugParam} arg + * @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -6851,23 +6834,19 @@ class Content { * @returns {Promise} * - Success response * - * @name updateAppCustomFieldDefinitionBySlug + * @name updateAppCustomFieldDefinition * @summary: Update custom field definition - * @description: Custom fields definition can be update using this api, You can update custom field definition name and description. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomFieldDefinitionBySlug/). + * @description: Custom fields definition can be update using this api, You can update custom field definition name and description. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomFieldDefinition/). */ - async updateAppCustomFieldDefinitionBySlug( - { slug, resource, namespace, body, requestHeaders } = { - requestHeaders: {}, - }, + async updateAppCustomFieldDefinition( + { definitionId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.updateAppCustomFieldDefinitionBySlug().validate( + } = ContentPlatformApplicationValidator.updateAppCustomFieldDefinition().validate( { - slug, - resource, - namespace, + definitionId, body, }, { abortEarly: false, allowUnknown: true } @@ -6879,11 +6858,9 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.updateAppCustomFieldDefinitionBySlug().validate( + } = ContentPlatformApplicationValidator.updateAppCustomFieldDefinition().validate( { - slug, - resource, - namespace, + definitionId, body, }, { abortEarly: false, allowUnknown: false } @@ -6891,7 +6868,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldDefinitionBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldDefinition \n ${warrning}`, }); } @@ -6900,7 +6877,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions/${definitionId}`, query_params, body, requestHeaders, @@ -6925,7 +6902,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > updateAppCustomFieldDefinitionBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > updateAppCustomFieldDefinition \n ${res_error}`, }); } } @@ -6934,27 +6911,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectBySlugParam} arg + * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name updateAppCustomObjectBySlug + * @returns {Promise} - Success response + * @name updateAppCustomObject * @summary: Update custom object details - * @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObjectBySlug/). + * @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObject/). */ - async updateAppCustomObjectBySlug( - { definitionSlug, slug, body, requestHeaders } = { requestHeaders: {} }, + async updateAppCustomObject( + { metaobjectId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.updateAppCustomObjectBySlug().validate( + } = ContentPlatformApplicationValidator.updateAppCustomObject().validate( { - definitionSlug, - slug, + metaobjectId, body, }, { abortEarly: false, allowUnknown: true } @@ -6966,10 +6941,9 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.updateAppCustomObjectBySlug().validate( + } = ContentPlatformApplicationValidator.updateAppCustomObject().validate( { - definitionSlug, - slug, + metaobjectId, body, }, { abortEarly: false, allowUnknown: false } @@ -6977,7 +6951,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > updateAppCustomObjectBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > updateAppCustomObject \n ${warrning}`, }); } @@ -6986,7 +6960,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${definitionSlug}/entries/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/${metaobjectId}`, query_params, body, requestHeaders, @@ -7000,7 +6974,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomObjectBySlugSchema().validate(responseData, { + } = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -7011,7 +6985,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > updateAppCustomObjectBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > updateAppCustomObject \n ${res_error}`, }); } } @@ -7020,27 +6994,26 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionBySlugParam} arg + * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name updateAppCustomObjectDefinitionBySlug + * @returns {Promise} - + * Success response + * @name updateAppCustomObjectDefinition * @summary: Update custom object definition - * @description: Custom object definitions can be updated using this endpoint. You can update the name and description of the custom object and add more custom field definitions to the existing custom object. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObjectDefinitionBySlug/). + * @description: Custom object definitions can be updated using this endpoint. You can update the name and description of the custom object and add more custom field definitions to the existing custom object. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObjectDefinition/). */ - async updateAppCustomObjectDefinitionBySlug( - { slug, body, requestHeaders } = { requestHeaders: {} }, + async updateAppCustomObjectDefinition( + { definitionId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.updateAppCustomObjectDefinitionBySlug().validate( + } = ContentPlatformApplicationValidator.updateAppCustomObjectDefinition().validate( { - slug, + definitionId, body, }, { abortEarly: false, allowUnknown: true } @@ -7052,9 +7025,9 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.updateAppCustomObjectDefinitionBySlug().validate( + } = ContentPlatformApplicationValidator.updateAppCustomObjectDefinition().validate( { - slug, + definitionId, body, }, { abortEarly: false, allowUnknown: false } @@ -7062,7 +7035,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > updateAppCustomObjectDefinitionBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > updateAppCustomObjectDefinition \n ${warrning}`, }); } @@ -7071,7 +7044,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/customobjects/definition/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions/${definitionId}`, query_params, body, requestHeaders, @@ -7085,7 +7058,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate( + } = ContentPlatformModel.CustomObjectDefinitionSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -7096,7 +7069,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > updateAppCustomObjectDefinitionBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > updateAppCustomObjectDefinition \n ${res_error}`, }); } } diff --git a/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts b/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts index c2705abe8..c11575380 100644 --- a/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +++ b/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts @@ -21,14 +21,18 @@ export = ContentPlatformApplicationValidator; * @property {ContentPlatformModel.AdminAnnouncementSchema} body */ /** - * @typedef CreateAppCustomFieldDefinitionParam + * @typedef CreateAppCustomFieldByResourceIdParam * @property {string} resource + * @property {string} resourceId + * @property {ContentPlatformModel.CustomFieldRequestSchema} body + */ +/** + * @typedef CreateAppCustomFieldDefinitionParam * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body */ /** - * @typedef CreateAppCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {ContentPlatformModel.CustomObjectRequestSchemaWithoutId} body + * @typedef CreateAppCustomObjectParam + * @property {ContentPlatformModel.CustomObjectRequestSchema} body */ /** * @typedef CreateAppCustomObjectDefinitionParam @@ -36,7 +40,7 @@ export = ContentPlatformApplicationValidator; */ /** * @typedef CreateBlogParam - * @property {ContentPlatformModel.BlogPayload} body + * @property {ContentPlatformModel.BlogRequest} body */ /** * @typedef CreateFaqCategoryParam @@ -48,15 +52,15 @@ export = ContentPlatformApplicationValidator; */ /** * @typedef CreateNavigationParam - * @property {ContentPlatformModel.NavigationPayload} body + * @property {ContentPlatformModel.NavigationRequest} body */ /** * @typedef CreatePageParam - * @property {ContentPlatformModel.PagePayload} body + * @property {ContentPlatformModel.PageRequest} body */ /** * @typedef CreatePagePreviewParam - * @property {ContentPlatformModel.PagePayload} body + * @property {ContentPlatformModel.PageRequest} body */ /** * @typedef CreateSEOMarkupSchemaParam @@ -64,26 +68,23 @@ export = ContentPlatformApplicationValidator; */ /** * @typedef CreateSlideshowParam - * @property {ContentPlatformModel.SlideshowPayload} body + * @property {ContentPlatformModel.SlideshowRequest} body */ /** * @typedef DeleteAnnouncementParam * @property {string} announcementId - ID allotted to the announcement. */ /** - * @typedef DeleteAppCustomFieldDefinitionBySlugParam - * @property {string} slug - * @property {string} resource - * @property {string} namespace + * @typedef DeleteAppCustomFieldDefinitionParam + * @property {string} definitionId */ /** - * @typedef DeleteAppCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {string} slug + * @typedef DeleteAppCustomObjectParam + * @property {string} metaobjectId */ /** - * @typedef DeleteAppCustomObjectDefinitionBySlugParam - * @property {string} slug + * @typedef DeleteAppCustomObjectDefinitionParam + * @property {string} definitionId */ /** * @typedef DeleteBlogParam @@ -144,8 +145,8 @@ export = ContentPlatformApplicationValidator; * @property {ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody} body */ /** - * @typedef ExportAppCustomObjectEntriesBySlugParam - * @property {string} slug + * @typedef ExportAppCustomObjectEntriesParam + * @property {string} definitionId */ /** * @typedef GenerateSEOTitleParam @@ -166,45 +167,34 @@ export = ContentPlatformApplicationValidator; * Default value is 10. */ /** - * @typedef GetAppCustomFieldDefinitionByResourceParam - * @property {string} pageNo - * @property {string} pageSize - * @property {string} resource - * @property {string} [types] - * @property {string} [search] - * @property {string} [slugs] - * @property {string} [namespaces] - */ -/** - * @typedef GetAppCustomFieldDefinitionBySlugParam - * @property {string} slug - * @property {string} resource - * @property {string} namespace + * @typedef GetAppCustomFieldDefinitionParam + * @property {string} definitionId */ /** * @typedef GetAppCustomFieldDefinitionsParam * @property {string} pageNo * @property {string} pageSize - * @property {string} [resources] - * @property {string} [types] + * @property {string} [resource] + * @property {string} [type] * @property {string} [search] - * @property {string} [slugs] - * @property {string} [namespaces] */ /** @typedef GetAppCustomFieldTypesParam */ /** - * @typedef GetAppCustomFieldsByResourceSlugParam + * @typedef GetAppCustomFieldsParam * @property {string} resource - * @property {string} resourceSlug */ /** - * @typedef GetAppCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {string} slug + * @typedef GetAppCustomFieldsByResourceIdParam + * @property {string} resource + * @property {string} resourceId */ /** - * @typedef GetAppCustomObjectDefinitionBySlugParam - * @property {string} slug + * @typedef GetAppCustomObjectParam + * @property {string} metaobjectId + */ +/** + * @typedef GetAppCustomObjectDefinitionParam + * @property {string} definitionId */ /** * @typedef GetAppCustomObjectDefinitionsParam @@ -213,10 +203,10 @@ export = ContentPlatformApplicationValidator; * @property {string} [search] */ /** - * @typedef GetAppCustomObjectsBySlugParam + * @typedef GetAppCustomObjectsParam + * @property {string} [definitionId] * @property {string} pageNo * @property {string} pageSize - * @property {string} definitionSlug */ /** * @typedef GetAppJobsParam @@ -288,8 +278,8 @@ export = ContentPlatformApplicationValidator; * @typedef GetNavigationBySlugParam * @property {string} slug - A short, human-readable, URL-friendly identifier of * a navigation. You can get slug value of a navigation from `getNavigations` API. - * @property {string} [devicePlatform] - Filter navigations by platform. - * Acceptable values are: web, android, ios. + * @property {string} devicePlatform - Filter navigations by platform. + * Acceptable values are: web, android, ios, all */ /** * @typedef GetNavigationsParam @@ -358,8 +348,8 @@ export = ContentPlatformApplicationValidator; */ /** @typedef GetSupportInformationParam */ /** - * @typedef ImportAppCustomObjectEntriesBySlugParam - * @property {string} slug + * @typedef ImportAppCustomObjectEntriesParam + * @property {string} definitionId * @property {ContentPlatformModel.CustomObjectBulkSchema} body */ /** @@ -372,8 +362,8 @@ export = ContentPlatformApplicationValidator; * @property {string} operationId - Name of operation id of the service. */ /** - * @typedef SampleAppCustomObjectBulkEntryBySlugParam - * @property {string} slug + * @typedef SampleAppCustomObjectBulkEntryParam + * @property {string} definitionId */ /** * @typedef SelectDataLoaderParam @@ -390,33 +380,24 @@ export = ContentPlatformApplicationValidator; * @property {ContentPlatformModel.ScheduleSchema} body */ /** - * @typedef UpdateAppCustomFieldByResourceSlugParam - * @property {string} resource - * @property {string} resourceSlug - * @property {ContentPlatformModel.CustomFieldRequestSchema} body - */ -/** - * @typedef UpdateAppCustomFieldDefinitionBySlugParam - * @property {string} slug - * @property {string} resource - * @property {string} namespace + * @typedef UpdateAppCustomFieldDefinitionParam + * @property {string} definitionId * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body */ /** - * @typedef UpdateAppCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {string} slug - * @property {ContentPlatformModel.CustomObjectRequestSchemaWithoutId} body + * @typedef UpdateAppCustomObjectParam + * @property {string} metaobjectId + * @property {ContentPlatformModel.CustomObjectRequestSchema} body */ /** - * @typedef UpdateAppCustomObjectDefinitionBySlugParam - * @property {string} slug + * @typedef UpdateAppCustomObjectDefinitionParam + * @property {string} definitionId * @property {ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema} body */ /** * @typedef UpdateBlogParam * @property {string} id - ID allotted to the blog. - * @property {ContentPlatformModel.BlogPayload} body + * @property {ContentPlatformModel.BlogRequest} body */ /** * @typedef UpdateFaqParam @@ -445,7 +426,7 @@ export = ContentPlatformApplicationValidator; /** * @typedef UpdateNavigationParam * @property {string} id - ID allotted to the navigation. - * @property {ContentPlatformModel.NavigationPayload} body + * @property {ContentPlatformModel.NavigationRequest} body */ /** * @typedef UpdatePageParam @@ -456,7 +437,7 @@ export = ContentPlatformApplicationValidator; * @typedef UpdatePagePreviewParam * @property {string} slug - A short, human-readable, URL-friendly identifier of * a page. You can get slug value of a page from `getPages` API. - * @property {ContentPlatformModel.PagePublishPayload} body + * @property {ContentPlatformModel.PagePublishRequest} body */ /** * @typedef UpdatePathRedirectionRulesParam @@ -470,7 +451,7 @@ export = ContentPlatformApplicationValidator; /** * @typedef UpdateSlideshowParam * @property {string} id - ID allotted to the slideshow. - * @property {ContentPlatformModel.SlideshowPayload} body + * @property {ContentPlatformModel.SlideshowRequest} body */ /** * @typedef UpdateSupportInformationParam @@ -487,10 +468,12 @@ declare class ContentPlatformApplicationValidator { static addPathRedirectionRules(): AddPathRedirectionRulesParam; /** @returns {CreateAnnouncementParam} */ static createAnnouncement(): CreateAnnouncementParam; + /** @returns {CreateAppCustomFieldByResourceIdParam} */ + static createAppCustomFieldByResourceId(): CreateAppCustomFieldByResourceIdParam; /** @returns {CreateAppCustomFieldDefinitionParam} */ static createAppCustomFieldDefinition(): CreateAppCustomFieldDefinitionParam; - /** @returns {CreateAppCustomObjectBySlugParam} */ - static createAppCustomObjectBySlug(): CreateAppCustomObjectBySlugParam; + /** @returns {CreateAppCustomObjectParam} */ + static createAppCustomObject(): CreateAppCustomObjectParam; /** @returns {CreateAppCustomObjectDefinitionParam} */ static createAppCustomObjectDefinition(): CreateAppCustomObjectDefinitionParam; /** @returns {CreateBlogParam} */ @@ -511,12 +494,12 @@ declare class ContentPlatformApplicationValidator { static createSlideshow(): CreateSlideshowParam; /** @returns {DeleteAnnouncementParam} */ static deleteAnnouncement(): DeleteAnnouncementParam; - /** @returns {DeleteAppCustomFieldDefinitionBySlugParam} */ - static deleteAppCustomFieldDefinitionBySlug(): DeleteAppCustomFieldDefinitionBySlugParam; - /** @returns {DeleteAppCustomObjectBySlugParam} */ - static deleteAppCustomObjectBySlug(): DeleteAppCustomObjectBySlugParam; - /** @returns {DeleteAppCustomObjectDefinitionBySlugParam} */ - static deleteAppCustomObjectDefinitionBySlug(): DeleteAppCustomObjectDefinitionBySlugParam; + /** @returns {DeleteAppCustomFieldDefinitionParam} */ + static deleteAppCustomFieldDefinition(): DeleteAppCustomFieldDefinitionParam; + /** @returns {DeleteAppCustomObjectParam} */ + static deleteAppCustomObject(): DeleteAppCustomObjectParam; + /** @returns {DeleteAppCustomObjectDefinitionParam} */ + static deleteAppCustomObjectDefinition(): DeleteAppCustomObjectDefinitionParam; /** @returns {DeleteBlogParam} */ static deleteBlog(): DeleteBlogParam; /** @returns {DeleteDataLoaderParam} */ @@ -543,32 +526,32 @@ declare class ContentPlatformApplicationValidator { static editInjectableTag(): EditInjectableTagParam; /** @returns {EditSEOMarkupSchemaParam} */ static editSEOMarkupSchema(): EditSEOMarkupSchemaParam; - /** @returns {ExportAppCustomObjectEntriesBySlugParam} */ - static exportAppCustomObjectEntriesBySlug(): ExportAppCustomObjectEntriesBySlugParam; + /** @returns {ExportAppCustomObjectEntriesParam} */ + static exportAppCustomObjectEntries(): ExportAppCustomObjectEntriesParam; /** @returns {GenerateSEOTitleParam} */ static generateSEOTitle(): GenerateSEOTitleParam; /** @returns {GetAnnouncementByIdParam} */ static getAnnouncementById(): GetAnnouncementByIdParam; /** @returns {GetAnnouncementsListParam} */ static getAnnouncementsList(): GetAnnouncementsListParam; - /** @returns {GetAppCustomFieldDefinitionByResourceParam} */ - static getAppCustomFieldDefinitionByResource(): GetAppCustomFieldDefinitionByResourceParam; - /** @returns {GetAppCustomFieldDefinitionBySlugParam} */ - static getAppCustomFieldDefinitionBySlug(): GetAppCustomFieldDefinitionBySlugParam; + /** @returns {GetAppCustomFieldDefinitionParam} */ + static getAppCustomFieldDefinition(): GetAppCustomFieldDefinitionParam; /** @returns {GetAppCustomFieldDefinitionsParam} */ static getAppCustomFieldDefinitions(): GetAppCustomFieldDefinitionsParam; /** @returns {GetAppCustomFieldTypesParam} */ static getAppCustomFieldTypes(): any; - /** @returns {GetAppCustomFieldsByResourceSlugParam} */ - static getAppCustomFieldsByResourceSlug(): GetAppCustomFieldsByResourceSlugParam; - /** @returns {GetAppCustomObjectBySlugParam} */ - static getAppCustomObjectBySlug(): GetAppCustomObjectBySlugParam; - /** @returns {GetAppCustomObjectDefinitionBySlugParam} */ - static getAppCustomObjectDefinitionBySlug(): GetAppCustomObjectDefinitionBySlugParam; + /** @returns {GetAppCustomFieldsParam} */ + static getAppCustomFields(): GetAppCustomFieldsParam; + /** @returns {GetAppCustomFieldsByResourceIdParam} */ + static getAppCustomFieldsByResourceId(): GetAppCustomFieldsByResourceIdParam; + /** @returns {GetAppCustomObjectParam} */ + static getAppCustomObject(): GetAppCustomObjectParam; + /** @returns {GetAppCustomObjectDefinitionParam} */ + static getAppCustomObjectDefinition(): GetAppCustomObjectDefinitionParam; /** @returns {GetAppCustomObjectDefinitionsParam} */ static getAppCustomObjectDefinitions(): GetAppCustomObjectDefinitionsParam; - /** @returns {GetAppCustomObjectsBySlugParam} */ - static getAppCustomObjectsBySlug(): GetAppCustomObjectsBySlugParam; + /** @returns {GetAppCustomObjectsParam} */ + static getAppCustomObjects(): GetAppCustomObjectsParam; /** @returns {GetAppJobsParam} */ static getAppJobs(): GetAppJobsParam; /** @returns {GetAppResourcesParam} */ @@ -627,28 +610,26 @@ declare class ContentPlatformApplicationValidator { static getSlideshows(): GetSlideshowsParam; /** @returns {GetSupportInformationParam} */ static getSupportInformation(): any; - /** @returns {ImportAppCustomObjectEntriesBySlugParam} */ - static importAppCustomObjectEntriesBySlug(): ImportAppCustomObjectEntriesBySlugParam; + /** @returns {ImportAppCustomObjectEntriesParam} */ + static importAppCustomObjectEntries(): ImportAppCustomObjectEntriesParam; /** @returns {RemoveInjectableTagParam} */ static removeInjectableTag(): RemoveInjectableTagParam; /** @returns {ResetDataLoaderParam} */ static resetDataLoader(): ResetDataLoaderParam; - /** @returns {SampleAppCustomObjectBulkEntryBySlugParam} */ - static sampleAppCustomObjectBulkEntryBySlug(): SampleAppCustomObjectBulkEntryBySlugParam; + /** @returns {SampleAppCustomObjectBulkEntryParam} */ + static sampleAppCustomObjectBulkEntry(): SampleAppCustomObjectBulkEntryParam; /** @returns {SelectDataLoaderParam} */ static selectDataLoader(): SelectDataLoaderParam; /** @returns {UpdateAnnouncementParam} */ static updateAnnouncement(): UpdateAnnouncementParam; /** @returns {UpdateAnnouncementScheduleParam} */ static updateAnnouncementSchedule(): UpdateAnnouncementScheduleParam; - /** @returns {UpdateAppCustomFieldByResourceSlugParam} */ - static updateAppCustomFieldByResourceSlug(): UpdateAppCustomFieldByResourceSlugParam; - /** @returns {UpdateAppCustomFieldDefinitionBySlugParam} */ - static updateAppCustomFieldDefinitionBySlug(): UpdateAppCustomFieldDefinitionBySlugParam; - /** @returns {UpdateAppCustomObjectBySlugParam} */ - static updateAppCustomObjectBySlug(): UpdateAppCustomObjectBySlugParam; - /** @returns {UpdateAppCustomObjectDefinitionBySlugParam} */ - static updateAppCustomObjectDefinitionBySlug(): UpdateAppCustomObjectDefinitionBySlugParam; + /** @returns {UpdateAppCustomFieldDefinitionParam} */ + static updateAppCustomFieldDefinition(): UpdateAppCustomFieldDefinitionParam; + /** @returns {UpdateAppCustomObjectParam} */ + static updateAppCustomObject(): UpdateAppCustomObjectParam; + /** @returns {UpdateAppCustomObjectDefinitionParam} */ + static updateAppCustomObjectDefinition(): UpdateAppCustomObjectDefinitionParam; /** @returns {UpdateBlogParam} */ static updateBlog(): UpdateBlogParam; /** @returns {UpdateFaqParam} */ @@ -677,7 +658,7 @@ declare class ContentPlatformApplicationValidator { static updateSupportInformation(): UpdateSupportInformationParam; } declare namespace ContentPlatformApplicationValidator { - export { AddDataLoaderParam, AddFaqParam, AddInjectableTagParam, AddPathRedirectionRulesParam, CreateAnnouncementParam, CreateAppCustomFieldDefinitionParam, CreateAppCustomObjectBySlugParam, CreateAppCustomObjectDefinitionParam, CreateBlogParam, CreateFaqCategoryParam, CreateLandingPageParam, CreateNavigationParam, CreatePageParam, CreatePagePreviewParam, CreateSEOMarkupSchemaParam, CreateSlideshowParam, DeleteAnnouncementParam, DeleteAppCustomFieldDefinitionBySlugParam, DeleteAppCustomObjectBySlugParam, DeleteAppCustomObjectDefinitionBySlugParam, DeleteBlogParam, DeleteDataLoaderParam, DeleteFaqParam, DeleteFaqCategoryParam, DeleteLandingPageParam, DeleteNavigationParam, DeletePageParam, DeletePathRedirectionRulesParam, DeleteSEOMarkupSchemaParam, DeleteSlideshowParam, EditDataLoaderParam, EditInjectableTagParam, EditSEOMarkupSchemaParam, ExportAppCustomObjectEntriesBySlugParam, GenerateSEOTitleParam, GetAnnouncementByIdParam, GetAnnouncementsListParam, GetAppCustomFieldDefinitionByResourceParam, GetAppCustomFieldDefinitionBySlugParam, GetAppCustomFieldDefinitionsParam, GetAppCustomFieldTypesParam, GetAppCustomFieldsByResourceSlugParam, GetAppCustomObjectBySlugParam, GetAppCustomObjectDefinitionBySlugParam, GetAppCustomObjectDefinitionsParam, GetAppCustomObjectsBySlugParam, GetAppJobsParam, GetAppResourcesParam, GetBlogBySlugParam, GetBlogsParam, GetDataLoadersParam, GetDataLoadersByServiceParam, GetDefaultNavigationsParam, GetDefaultSEOMarkupSchemaParam, GetFaqByIdOrSlugParam, GetFaqCategoriesParam, GetFaqCategoryBySlugOrIdParam, GetFaqsByCategoryIdOrSlugParam, GetInjectableTagsParam, GetLandingPagesParam, GetLegalInformationParam, GetNavigationBySlugParam, GetNavigationsParam, GetPageBySlugParam, GetPageMetaParam, GetPageSpecParam, GetPagesParam, GetPathRedirectionRuleParam, GetPathRedirectionRulesParam, GetSEOConfigurationParam, GetSEOMarkupSchemaParam, GetSEOMarkupSchemasParam, GetSlideshowBySlugParam, GetSlideshowsParam, GetSupportInformationParam, ImportAppCustomObjectEntriesBySlugParam, RemoveInjectableTagParam, ResetDataLoaderParam, SampleAppCustomObjectBulkEntryBySlugParam, SelectDataLoaderParam, UpdateAnnouncementParam, UpdateAnnouncementScheduleParam, UpdateAppCustomFieldByResourceSlugParam, UpdateAppCustomFieldDefinitionBySlugParam, UpdateAppCustomObjectBySlugParam, UpdateAppCustomObjectDefinitionBySlugParam, UpdateBlogParam, UpdateFaqParam, UpdateFaqCategoryParam, UpdateInjectableTagParam, UpdateLandingPageParam, UpdateLegalInformationParam, UpdateNavigationParam, UpdatePageParam, UpdatePagePreviewParam, UpdatePathRedirectionRulesParam, UpdateSEOConfigurationParam, UpdateSlideshowParam, UpdateSupportInformationParam }; + export { AddDataLoaderParam, AddFaqParam, AddInjectableTagParam, AddPathRedirectionRulesParam, CreateAnnouncementParam, CreateAppCustomFieldByResourceIdParam, CreateAppCustomFieldDefinitionParam, CreateAppCustomObjectParam, CreateAppCustomObjectDefinitionParam, CreateBlogParam, CreateFaqCategoryParam, CreateLandingPageParam, CreateNavigationParam, CreatePageParam, CreatePagePreviewParam, CreateSEOMarkupSchemaParam, CreateSlideshowParam, DeleteAnnouncementParam, DeleteAppCustomFieldDefinitionParam, DeleteAppCustomObjectParam, DeleteAppCustomObjectDefinitionParam, DeleteBlogParam, DeleteDataLoaderParam, DeleteFaqParam, DeleteFaqCategoryParam, DeleteLandingPageParam, DeleteNavigationParam, DeletePageParam, DeletePathRedirectionRulesParam, DeleteSEOMarkupSchemaParam, DeleteSlideshowParam, EditDataLoaderParam, EditInjectableTagParam, EditSEOMarkupSchemaParam, ExportAppCustomObjectEntriesParam, GenerateSEOTitleParam, GetAnnouncementByIdParam, GetAnnouncementsListParam, GetAppCustomFieldDefinitionParam, GetAppCustomFieldDefinitionsParam, GetAppCustomFieldTypesParam, GetAppCustomFieldsParam, GetAppCustomFieldsByResourceIdParam, GetAppCustomObjectParam, GetAppCustomObjectDefinitionParam, GetAppCustomObjectDefinitionsParam, GetAppCustomObjectsParam, GetAppJobsParam, GetAppResourcesParam, GetBlogBySlugParam, GetBlogsParam, GetDataLoadersParam, GetDataLoadersByServiceParam, GetDefaultNavigationsParam, GetDefaultSEOMarkupSchemaParam, GetFaqByIdOrSlugParam, GetFaqCategoriesParam, GetFaqCategoryBySlugOrIdParam, GetFaqsByCategoryIdOrSlugParam, GetInjectableTagsParam, GetLandingPagesParam, GetLegalInformationParam, GetNavigationBySlugParam, GetNavigationsParam, GetPageBySlugParam, GetPageMetaParam, GetPageSpecParam, GetPagesParam, GetPathRedirectionRuleParam, GetPathRedirectionRulesParam, GetSEOConfigurationParam, GetSEOMarkupSchemaParam, GetSEOMarkupSchemasParam, GetSlideshowBySlugParam, GetSlideshowsParam, GetSupportInformationParam, ImportAppCustomObjectEntriesParam, RemoveInjectableTagParam, ResetDataLoaderParam, SampleAppCustomObjectBulkEntryParam, SelectDataLoaderParam, UpdateAnnouncementParam, UpdateAnnouncementScheduleParam, UpdateAppCustomFieldDefinitionParam, UpdateAppCustomObjectParam, UpdateAppCustomObjectDefinitionParam, UpdateBlogParam, UpdateFaqParam, UpdateFaqCategoryParam, UpdateInjectableTagParam, UpdateLandingPageParam, UpdateLegalInformationParam, UpdateNavigationParam, UpdatePageParam, UpdatePagePreviewParam, UpdatePathRedirectionRulesParam, UpdateSEOConfigurationParam, UpdateSlideshowParam, UpdateSupportInformationParam }; } type AddDataLoaderParam = { body: ContentPlatformModel.DataLoaderSchema; @@ -698,19 +679,22 @@ type AddPathRedirectionRulesParam = { type CreateAnnouncementParam = { body: ContentPlatformModel.AdminAnnouncementSchema; }; -type CreateAppCustomFieldDefinitionParam = { +type CreateAppCustomFieldByResourceIdParam = { resource: string; + resourceId: string; + body: ContentPlatformModel.CustomFieldRequestSchema; +}; +type CreateAppCustomFieldDefinitionParam = { body: ContentPlatformModel.CustomFieldDefinitionRequestSchema; }; -type CreateAppCustomObjectBySlugParam = { - definitionSlug: string; - body: ContentPlatformModel.CustomObjectRequestSchemaWithoutId; +type CreateAppCustomObjectParam = { + body: ContentPlatformModel.CustomObjectRequestSchema; }; type CreateAppCustomObjectDefinitionParam = { body: ContentPlatformModel.CustomObjectDefinitionRequestSchema; }; type CreateBlogParam = { - body: ContentPlatformModel.BlogPayload; + body: ContentPlatformModel.BlogRequest; }; type CreateFaqCategoryParam = { body: ContentPlatformModel.CreateFaqCategoryRequestSchema; @@ -719,19 +703,19 @@ type CreateLandingPageParam = { body: ContentPlatformModel.LandingPageSchema; }; type CreateNavigationParam = { - body: ContentPlatformModel.NavigationPayload; + body: ContentPlatformModel.NavigationRequest; }; type CreatePageParam = { - body: ContentPlatformModel.PagePayload; + body: ContentPlatformModel.PageRequest; }; type CreatePagePreviewParam = { - body: ContentPlatformModel.PagePayload; + body: ContentPlatformModel.PageRequest; }; type CreateSEOMarkupSchemaParam = { body: ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody; }; type CreateSlideshowParam = { - body: ContentPlatformModel.SlideshowPayload; + body: ContentPlatformModel.SlideshowRequest; }; type DeleteAnnouncementParam = { /** @@ -739,17 +723,14 @@ type DeleteAnnouncementParam = { */ announcementId: string; }; -type DeleteAppCustomFieldDefinitionBySlugParam = { - slug: string; - resource: string; - namespace: string; +type DeleteAppCustomFieldDefinitionParam = { + definitionId: string; }; -type DeleteAppCustomObjectBySlugParam = { - definitionSlug: string; - slug: string; +type DeleteAppCustomObjectParam = { + metaobjectId: string; }; -type DeleteAppCustomObjectDefinitionBySlugParam = { - slug: string; +type DeleteAppCustomObjectDefinitionParam = { + definitionId: string; }; type DeleteBlogParam = { /** @@ -838,8 +819,8 @@ type EditSEOMarkupSchemaParam = { id: string; body: ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody; }; -type ExportAppCustomObjectEntriesBySlugParam = { - slug: string; +type ExportAppCustomObjectEntriesParam = { + definitionId: string; }; type GenerateSEOTitleParam = { /** @@ -868,49 +849,38 @@ type GetAnnouncementsListParam = { */ pageSize?: number; }; -type GetAppCustomFieldDefinitionByResourceParam = { - pageNo: string; - pageSize: string; - resource: string; - types?: string; - search?: string; - slugs?: string; - namespaces?: string; -}; -type GetAppCustomFieldDefinitionBySlugParam = { - slug: string; - resource: string; - namespace: string; +type GetAppCustomFieldDefinitionParam = { + definitionId: string; }; type GetAppCustomFieldDefinitionsParam = { pageNo: string; pageSize: string; - resources?: string; - types?: string; + resource?: string; + type?: string; search?: string; - slugs?: string; - namespaces?: string; }; -type GetAppCustomFieldsByResourceSlugParam = { +type GetAppCustomFieldsParam = { resource: string; - resourceSlug: string; }; -type GetAppCustomObjectBySlugParam = { - definitionSlug: string; - slug: string; +type GetAppCustomFieldsByResourceIdParam = { + resource: string; + resourceId: string; }; -type GetAppCustomObjectDefinitionBySlugParam = { - slug: string; +type GetAppCustomObjectParam = { + metaobjectId: string; +}; +type GetAppCustomObjectDefinitionParam = { + definitionId: string; }; type GetAppCustomObjectDefinitionsParam = { pageNo: string; pageSize: string; search?: string; }; -type GetAppCustomObjectsBySlugParam = { +type GetAppCustomObjectsParam = { + definitionId?: string; pageNo: string; pageSize: string; - definitionSlug: string; }; type GetAppJobsParam = { page: string; @@ -1019,9 +989,9 @@ type GetNavigationBySlugParam = { slug: string; /** * - Filter navigations by platform. - * Acceptable values are: web, android, ios. + * Acceptable values are: web, android, ios, all */ - devicePlatform?: string; + devicePlatform: string; }; type GetNavigationsParam = { /** @@ -1133,8 +1103,8 @@ type GetSlideshowsParam = { */ pageSize?: number; }; -type ImportAppCustomObjectEntriesBySlugParam = { - slug: string; +type ImportAppCustomObjectEntriesParam = { + definitionId: string; body: ContentPlatformModel.CustomObjectBulkSchema; }; type RemoveInjectableTagParam = { @@ -1150,8 +1120,8 @@ type ResetDataLoaderParam = { */ operationId: string; }; -type SampleAppCustomObjectBulkEntryBySlugParam = { - slug: string; +type SampleAppCustomObjectBulkEntryParam = { + definitionId: string; }; type SelectDataLoaderParam = { /** @@ -1173,24 +1143,16 @@ type UpdateAnnouncementScheduleParam = { announcementId: string; body: ContentPlatformModel.ScheduleSchema; }; -type UpdateAppCustomFieldByResourceSlugParam = { - resource: string; - resourceSlug: string; - body: ContentPlatformModel.CustomFieldRequestSchema; -}; -type UpdateAppCustomFieldDefinitionBySlugParam = { - slug: string; - resource: string; - namespace: string; +type UpdateAppCustomFieldDefinitionParam = { + definitionId: string; body: ContentPlatformModel.CustomFieldDefinitionRequestSchema; }; -type UpdateAppCustomObjectBySlugParam = { - definitionSlug: string; - slug: string; - body: ContentPlatformModel.CustomObjectRequestSchemaWithoutId; +type UpdateAppCustomObjectParam = { + metaobjectId: string; + body: ContentPlatformModel.CustomObjectRequestSchema; }; -type UpdateAppCustomObjectDefinitionBySlugParam = { - slug: string; +type UpdateAppCustomObjectDefinitionParam = { + definitionId: string; body: ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema; }; type UpdateBlogParam = { @@ -1198,7 +1160,7 @@ type UpdateBlogParam = { * - ID allotted to the blog. */ id: string; - body: ContentPlatformModel.BlogPayload; + body: ContentPlatformModel.BlogRequest; }; type UpdateFaqParam = { /** @@ -1236,7 +1198,7 @@ type UpdateNavigationParam = { * - ID allotted to the navigation. */ id: string; - body: ContentPlatformModel.NavigationPayload; + body: ContentPlatformModel.NavigationRequest; }; type UpdatePageParam = { /** @@ -1251,7 +1213,7 @@ type UpdatePagePreviewParam = { * a page. You can get slug value of a page from `getPages` API. */ slug: string; - body: ContentPlatformModel.PagePublishPayload; + body: ContentPlatformModel.PagePublishRequest; }; type UpdatePathRedirectionRulesParam = { /** @@ -1268,7 +1230,7 @@ type UpdateSlideshowParam = { * - ID allotted to the slideshow. */ id: string; - body: ContentPlatformModel.SlideshowPayload; + body: ContentPlatformModel.SlideshowRequest; }; type UpdateSupportInformationParam = { body: ContentPlatformModel.Support; diff --git a/sdk/platform/Content/ContentPlatformApplicationValidator.js b/sdk/platform/Content/ContentPlatformApplicationValidator.js index 994a4e01b..3faca8643 100644 --- a/sdk/platform/Content/ContentPlatformApplicationValidator.js +++ b/sdk/platform/Content/ContentPlatformApplicationValidator.js @@ -29,15 +29,20 @@ const ContentPlatformModel = require("./ContentPlatformModel"); */ /** - * @typedef CreateAppCustomFieldDefinitionParam + * @typedef CreateAppCustomFieldByResourceIdParam * @property {string} resource + * @property {string} resourceId + * @property {ContentPlatformModel.CustomFieldRequestSchema} body + */ + +/** + * @typedef CreateAppCustomFieldDefinitionParam * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body */ /** - * @typedef CreateAppCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {ContentPlatformModel.CustomObjectRequestSchemaWithoutId} body + * @typedef CreateAppCustomObjectParam + * @property {ContentPlatformModel.CustomObjectRequestSchema} body */ /** @@ -47,7 +52,7 @@ const ContentPlatformModel = require("./ContentPlatformModel"); /** * @typedef CreateBlogParam - * @property {ContentPlatformModel.BlogPayload} body + * @property {ContentPlatformModel.BlogRequest} body */ /** @@ -62,17 +67,17 @@ const ContentPlatformModel = require("./ContentPlatformModel"); /** * @typedef CreateNavigationParam - * @property {ContentPlatformModel.NavigationPayload} body + * @property {ContentPlatformModel.NavigationRequest} body */ /** * @typedef CreatePageParam - * @property {ContentPlatformModel.PagePayload} body + * @property {ContentPlatformModel.PageRequest} body */ /** * @typedef CreatePagePreviewParam - * @property {ContentPlatformModel.PagePayload} body + * @property {ContentPlatformModel.PageRequest} body */ /** @@ -82,7 +87,7 @@ const ContentPlatformModel = require("./ContentPlatformModel"); /** * @typedef CreateSlideshowParam - * @property {ContentPlatformModel.SlideshowPayload} body + * @property {ContentPlatformModel.SlideshowRequest} body */ /** @@ -91,21 +96,18 @@ const ContentPlatformModel = require("./ContentPlatformModel"); */ /** - * @typedef DeleteAppCustomFieldDefinitionBySlugParam - * @property {string} slug - * @property {string} resource - * @property {string} namespace + * @typedef DeleteAppCustomFieldDefinitionParam + * @property {string} definitionId */ /** - * @typedef DeleteAppCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {string} slug + * @typedef DeleteAppCustomObjectParam + * @property {string} metaobjectId */ /** - * @typedef DeleteAppCustomObjectDefinitionBySlugParam - * @property {string} slug + * @typedef DeleteAppCustomObjectDefinitionParam + * @property {string} definitionId */ /** @@ -180,8 +182,8 @@ const ContentPlatformModel = require("./ContentPlatformModel"); */ /** - * @typedef ExportAppCustomObjectEntriesBySlugParam - * @property {string} slug + * @typedef ExportAppCustomObjectEntriesParam + * @property {string} definitionId */ /** @@ -206,51 +208,40 @@ const ContentPlatformModel = require("./ContentPlatformModel"); */ /** - * @typedef GetAppCustomFieldDefinitionByResourceParam - * @property {string} pageNo - * @property {string} pageSize - * @property {string} resource - * @property {string} [types] - * @property {string} [search] - * @property {string} [slugs] - * @property {string} [namespaces] - */ - -/** - * @typedef GetAppCustomFieldDefinitionBySlugParam - * @property {string} slug - * @property {string} resource - * @property {string} namespace + * @typedef GetAppCustomFieldDefinitionParam + * @property {string} definitionId */ /** * @typedef GetAppCustomFieldDefinitionsParam * @property {string} pageNo * @property {string} pageSize - * @property {string} [resources] - * @property {string} [types] + * @property {string} [resource] + * @property {string} [type] * @property {string} [search] - * @property {string} [slugs] - * @property {string} [namespaces] */ /** @typedef GetAppCustomFieldTypesParam */ /** - * @typedef GetAppCustomFieldsByResourceSlugParam + * @typedef GetAppCustomFieldsParam * @property {string} resource - * @property {string} resourceSlug */ /** - * @typedef GetAppCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {string} slug + * @typedef GetAppCustomFieldsByResourceIdParam + * @property {string} resource + * @property {string} resourceId */ /** - * @typedef GetAppCustomObjectDefinitionBySlugParam - * @property {string} slug + * @typedef GetAppCustomObjectParam + * @property {string} metaobjectId + */ + +/** + * @typedef GetAppCustomObjectDefinitionParam + * @property {string} definitionId */ /** @@ -261,10 +252,10 @@ const ContentPlatformModel = require("./ContentPlatformModel"); */ /** - * @typedef GetAppCustomObjectsBySlugParam + * @typedef GetAppCustomObjectsParam + * @property {string} [definitionId] * @property {string} pageNo * @property {string} pageSize - * @property {string} definitionSlug */ /** @@ -352,8 +343,8 @@ const ContentPlatformModel = require("./ContentPlatformModel"); * @typedef GetNavigationBySlugParam * @property {string} slug - A short, human-readable, URL-friendly identifier of * a navigation. You can get slug value of a navigation from `getNavigations` API. - * @property {string} [devicePlatform] - Filter navigations by platform. - * Acceptable values are: web, android, ios. + * @property {string} devicePlatform - Filter navigations by platform. + * Acceptable values are: web, android, ios, all */ /** @@ -436,8 +427,8 @@ const ContentPlatformModel = require("./ContentPlatformModel"); /** @typedef GetSupportInformationParam */ /** - * @typedef ImportAppCustomObjectEntriesBySlugParam - * @property {string} slug + * @typedef ImportAppCustomObjectEntriesParam + * @property {string} definitionId * @property {ContentPlatformModel.CustomObjectBulkSchema} body */ @@ -453,8 +444,8 @@ const ContentPlatformModel = require("./ContentPlatformModel"); */ /** - * @typedef SampleAppCustomObjectBulkEntryBySlugParam - * @property {string} slug + * @typedef SampleAppCustomObjectBulkEntryParam + * @property {string} definitionId */ /** @@ -475,37 +466,27 @@ const ContentPlatformModel = require("./ContentPlatformModel"); */ /** - * @typedef UpdateAppCustomFieldByResourceSlugParam - * @property {string} resource - * @property {string} resourceSlug - * @property {ContentPlatformModel.CustomFieldRequestSchema} body - */ - -/** - * @typedef UpdateAppCustomFieldDefinitionBySlugParam - * @property {string} slug - * @property {string} resource - * @property {string} namespace + * @typedef UpdateAppCustomFieldDefinitionParam + * @property {string} definitionId * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body */ /** - * @typedef UpdateAppCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {string} slug - * @property {ContentPlatformModel.CustomObjectRequestSchemaWithoutId} body + * @typedef UpdateAppCustomObjectParam + * @property {string} metaobjectId + * @property {ContentPlatformModel.CustomObjectRequestSchema} body */ /** - * @typedef UpdateAppCustomObjectDefinitionBySlugParam - * @property {string} slug + * @typedef UpdateAppCustomObjectDefinitionParam + * @property {string} definitionId * @property {ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema} body */ /** * @typedef UpdateBlogParam * @property {string} id - ID allotted to the blog. - * @property {ContentPlatformModel.BlogPayload} body + * @property {ContentPlatformModel.BlogRequest} body */ /** @@ -540,7 +521,7 @@ const ContentPlatformModel = require("./ContentPlatformModel"); /** * @typedef UpdateNavigationParam * @property {string} id - ID allotted to the navigation. - * @property {ContentPlatformModel.NavigationPayload} body + * @property {ContentPlatformModel.NavigationRequest} body */ /** @@ -553,7 +534,7 @@ const ContentPlatformModel = require("./ContentPlatformModel"); * @typedef UpdatePagePreviewParam * @property {string} slug - A short, human-readable, URL-friendly identifier of * a page. You can get slug value of a page from `getPages` API. - * @property {ContentPlatformModel.PagePublishPayload} body + * @property {ContentPlatformModel.PagePublishRequest} body */ /** @@ -570,7 +551,7 @@ const ContentPlatformModel = require("./ContentPlatformModel"); /** * @typedef UpdateSlideshowParam * @property {string} id - ID allotted to the slideshow. - * @property {ContentPlatformModel.SlideshowPayload} body + * @property {ContentPlatformModel.SlideshowRequest} body */ /** @@ -615,19 +596,26 @@ class ContentPlatformApplicationValidator { }).required(); } + /** @returns {CreateAppCustomFieldByResourceIdParam} */ + static createAppCustomFieldByResourceId() { + return Joi.object({ + resource: Joi.string().allow("").required(), + resourceId: Joi.string().allow("").required(), + body: ContentPlatformModel.CustomFieldRequestSchema().required(), + }).required(); + } + /** @returns {CreateAppCustomFieldDefinitionParam} */ static createAppCustomFieldDefinition() { return Joi.object({ - resource: Joi.string().allow("").required(), body: ContentPlatformModel.CustomFieldDefinitionRequestSchema().required(), }).required(); } - /** @returns {CreateAppCustomObjectBySlugParam} */ - static createAppCustomObjectBySlug() { + /** @returns {CreateAppCustomObjectParam} */ + static createAppCustomObject() { return Joi.object({ - definitionSlug: Joi.string().allow("").required(), - body: ContentPlatformModel.CustomObjectRequestSchemaWithoutId().required(), + body: ContentPlatformModel.CustomObjectRequestSchema().required(), }).required(); } @@ -641,7 +629,7 @@ class ContentPlatformApplicationValidator { /** @returns {CreateBlogParam} */ static createBlog() { return Joi.object({ - body: ContentPlatformModel.BlogPayload().required(), + body: ContentPlatformModel.BlogRequest().required(), }).required(); } @@ -662,21 +650,21 @@ class ContentPlatformApplicationValidator { /** @returns {CreateNavigationParam} */ static createNavigation() { return Joi.object({ - body: ContentPlatformModel.NavigationPayload().required(), + body: ContentPlatformModel.NavigationRequest().required(), }).required(); } /** @returns {CreatePageParam} */ static createPage() { return Joi.object({ - body: ContentPlatformModel.PagePayload().required(), + body: ContentPlatformModel.PageRequest().required(), }).required(); } /** @returns {CreatePagePreviewParam} */ static createPagePreview() { return Joi.object({ - body: ContentPlatformModel.PagePayload().required(), + body: ContentPlatformModel.PageRequest().required(), }).required(); } @@ -690,7 +678,7 @@ class ContentPlatformApplicationValidator { /** @returns {CreateSlideshowParam} */ static createSlideshow() { return Joi.object({ - body: ContentPlatformModel.SlideshowPayload().required(), + body: ContentPlatformModel.SlideshowRequest().required(), }).required(); } @@ -701,27 +689,24 @@ class ContentPlatformApplicationValidator { }).required(); } - /** @returns {DeleteAppCustomFieldDefinitionBySlugParam} */ - static deleteAppCustomFieldDefinitionBySlug() { + /** @returns {DeleteAppCustomFieldDefinitionParam} */ + static deleteAppCustomFieldDefinition() { return Joi.object({ - slug: Joi.string().allow("").required(), - resource: Joi.string().allow("").required(), - namespace: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), }).required(); } - /** @returns {DeleteAppCustomObjectBySlugParam} */ - static deleteAppCustomObjectBySlug() { + /** @returns {DeleteAppCustomObjectParam} */ + static deleteAppCustomObject() { return Joi.object({ - definitionSlug: Joi.string().allow("").required(), - slug: Joi.string().allow("").required(), + metaobjectId: Joi.string().allow("").required(), }).required(); } - /** @returns {DeleteAppCustomObjectDefinitionBySlugParam} */ - static deleteAppCustomObjectDefinitionBySlug() { + /** @returns {DeleteAppCustomObjectDefinitionParam} */ + static deleteAppCustomObjectDefinition() { return Joi.object({ - slug: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), }).required(); } @@ -820,10 +805,10 @@ class ContentPlatformApplicationValidator { }).required(); } - /** @returns {ExportAppCustomObjectEntriesBySlugParam} */ - static exportAppCustomObjectEntriesBySlug() { + /** @returns {ExportAppCustomObjectEntriesParam} */ + static exportAppCustomObjectEntries() { return Joi.object({ - slug: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), }).required(); } @@ -850,25 +835,10 @@ class ContentPlatformApplicationValidator { }).required(); } - /** @returns {GetAppCustomFieldDefinitionByResourceParam} */ - static getAppCustomFieldDefinitionByResource() { + /** @returns {GetAppCustomFieldDefinitionParam} */ + static getAppCustomFieldDefinition() { return Joi.object({ - pageNo: Joi.string().allow("").required(), - pageSize: Joi.string().allow("").required(), - resource: Joi.string().allow("").required(), - types: Joi.string().allow(""), - search: Joi.string().allow(""), - slugs: Joi.string().allow(""), - namespaces: Joi.string().allow(""), - }).required(); - } - - /** @returns {GetAppCustomFieldDefinitionBySlugParam} */ - static getAppCustomFieldDefinitionBySlug() { - return Joi.object({ - slug: Joi.string().allow("").required(), - resource: Joi.string().allow("").required(), - namespace: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), }).required(); } @@ -877,11 +847,9 @@ class ContentPlatformApplicationValidator { return Joi.object({ pageNo: Joi.string().allow("").required(), pageSize: Joi.string().allow("").required(), - resources: Joi.string().allow(""), - types: Joi.string().allow(""), + resource: Joi.string().allow(""), + type: Joi.string().allow(""), search: Joi.string().allow(""), - slugs: Joi.string().allow(""), - namespaces: Joi.string().allow(""), }).required(); } @@ -890,26 +858,32 @@ class ContentPlatformApplicationValidator { return Joi.object({}).required(); } - /** @returns {GetAppCustomFieldsByResourceSlugParam} */ - static getAppCustomFieldsByResourceSlug() { + /** @returns {GetAppCustomFieldsParam} */ + static getAppCustomFields() { return Joi.object({ resource: Joi.string().allow("").required(), - resourceSlug: Joi.string().allow("").required(), }).required(); } - /** @returns {GetAppCustomObjectBySlugParam} */ - static getAppCustomObjectBySlug() { + /** @returns {GetAppCustomFieldsByResourceIdParam} */ + static getAppCustomFieldsByResourceId() { return Joi.object({ - definitionSlug: Joi.string().allow("").required(), - slug: Joi.string().allow("").required(), + resource: Joi.string().allow("").required(), + resourceId: Joi.string().allow("").required(), }).required(); } - /** @returns {GetAppCustomObjectDefinitionBySlugParam} */ - static getAppCustomObjectDefinitionBySlug() { + /** @returns {GetAppCustomObjectParam} */ + static getAppCustomObject() { return Joi.object({ - slug: Joi.string().allow("").required(), + metaobjectId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetAppCustomObjectDefinitionParam} */ + static getAppCustomObjectDefinition() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), }).required(); } @@ -922,12 +896,12 @@ class ContentPlatformApplicationValidator { }).required(); } - /** @returns {GetAppCustomObjectsBySlugParam} */ - static getAppCustomObjectsBySlug() { + /** @returns {GetAppCustomObjectsParam} */ + static getAppCustomObjects() { return Joi.object({ + definitionId: Joi.string().allow(""), pageNo: Joi.string().allow("").required(), pageSize: Joi.string().allow("").required(), - definitionSlug: Joi.string().allow("").required(), }).required(); } @@ -1039,7 +1013,7 @@ class ContentPlatformApplicationValidator { static getNavigationBySlug() { return Joi.object({ slug: Joi.string().allow("").required(), - devicePlatform: Joi.string().allow(""), + devicePlatform: Joi.string().allow("").required(), }).required(); } @@ -1136,10 +1110,10 @@ class ContentPlatformApplicationValidator { return Joi.object({}).required(); } - /** @returns {ImportAppCustomObjectEntriesBySlugParam} */ - static importAppCustomObjectEntriesBySlug() { + /** @returns {ImportAppCustomObjectEntriesParam} */ + static importAppCustomObjectEntries() { return Joi.object({ - slug: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), body: ContentPlatformModel.CustomObjectBulkSchema().required(), }).required(); } @@ -1159,10 +1133,10 @@ class ContentPlatformApplicationValidator { }).required(); } - /** @returns {SampleAppCustomObjectBulkEntryBySlugParam} */ - static sampleAppCustomObjectBulkEntryBySlug() { + /** @returns {SampleAppCustomObjectBulkEntryParam} */ + static sampleAppCustomObjectBulkEntry() { return Joi.object({ - slug: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), }).required(); } @@ -1189,38 +1163,26 @@ class ContentPlatformApplicationValidator { }).required(); } - /** @returns {UpdateAppCustomFieldByResourceSlugParam} */ - static updateAppCustomFieldByResourceSlug() { + /** @returns {UpdateAppCustomFieldDefinitionParam} */ + static updateAppCustomFieldDefinition() { return Joi.object({ - resource: Joi.string().allow("").required(), - resourceSlug: Joi.string().allow("").required(), - body: ContentPlatformModel.CustomFieldRequestSchema().required(), - }).required(); - } - - /** @returns {UpdateAppCustomFieldDefinitionBySlugParam} */ - static updateAppCustomFieldDefinitionBySlug() { - return Joi.object({ - slug: Joi.string().allow("").required(), - resource: Joi.string().allow("").required(), - namespace: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), body: ContentPlatformModel.CustomFieldDefinitionRequestSchema().required(), }).required(); } - /** @returns {UpdateAppCustomObjectBySlugParam} */ - static updateAppCustomObjectBySlug() { + /** @returns {UpdateAppCustomObjectParam} */ + static updateAppCustomObject() { return Joi.object({ - definitionSlug: Joi.string().allow("").required(), - slug: Joi.string().allow("").required(), - body: ContentPlatformModel.CustomObjectRequestSchemaWithoutId().required(), + metaobjectId: Joi.string().allow("").required(), + body: ContentPlatformModel.CustomObjectRequestSchema().required(), }).required(); } - /** @returns {UpdateAppCustomObjectDefinitionBySlugParam} */ - static updateAppCustomObjectDefinitionBySlug() { + /** @returns {UpdateAppCustomObjectDefinitionParam} */ + static updateAppCustomObjectDefinition() { return Joi.object({ - slug: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), body: ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema().required(), }).required(); } @@ -1229,7 +1191,7 @@ class ContentPlatformApplicationValidator { static updateBlog() { return Joi.object({ id: Joi.string().allow("").required(), - body: ContentPlatformModel.BlogPayload().required(), + body: ContentPlatformModel.BlogRequest().required(), }).required(); } @@ -1276,7 +1238,7 @@ class ContentPlatformApplicationValidator { static updateNavigation() { return Joi.object({ id: Joi.string().allow("").required(), - body: ContentPlatformModel.NavigationPayload().required(), + body: ContentPlatformModel.NavigationRequest().required(), }).required(); } @@ -1292,7 +1254,7 @@ class ContentPlatformApplicationValidator { static updatePagePreview() { return Joi.object({ slug: Joi.string().allow("").required(), - body: ContentPlatformModel.PagePublishPayload().required(), + body: ContentPlatformModel.PagePublishRequest().required(), }).required(); } @@ -1315,7 +1277,7 @@ class ContentPlatformApplicationValidator { static updateSlideshow() { return Joi.object({ id: Joi.string().allow("").required(), - body: ContentPlatformModel.SlideshowPayload().required(), + body: ContentPlatformModel.SlideshowRequest().required(), }).required(); } diff --git a/sdk/platform/Content/ContentPlatformClient.d.ts b/sdk/platform/Content/ContentPlatformClient.d.ts index 8bb11addb..917182d59 100644 --- a/sdk/platform/Content/ContentPlatformClient.d.ts +++ b/sdk/platform/Content/ContentPlatformClient.d.ts @@ -2,6 +2,20 @@ export = Content; declare class Content { constructor(config: any); config: any; + /** + * @param {ContentPlatformValidator.CreateCustomFieldByResourceIdParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name createCustomFieldByResourceId + * @summary: Create custom field entries for gives resource and resource_id + * @description: You can add a custom field using this endpoint to any resource by providing the resource ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomFieldByResourceId/). + */ + createCustomFieldByResourceId({ resource, resourceId, body, requestHeaders }?: ContentPlatformValidator.CreateCustomFieldByResourceIdParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformValidator.CreateCustomFieldDefinitionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -10,71 +24,55 @@ declare class Content { * - Success response * * @name createCustomFieldDefinition - * @summary: Create custom field definition for a given resource type + * @summary: Create custom field definition * @description: You can create custom fields definition to any resource so you can extend property of resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomFieldDefinition/). */ - createCustomFieldDefinition({ resource, body, requestHeaders }?: ContentPlatformValidator.CreateCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; + createCustomFieldDefinition({ body, requestHeaders }?: ContentPlatformValidator.CreateCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.CreateCustomObjectBySlugParam} arg - Arg object + * @param {ContentPlatformValidator.CreateCustomObjectParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name createCustomObjectBySlug + * @name createCustomObject * @summary: Create custom object entries - * @description: Custom object entries against the custom object definition can be added using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomObjectBySlug/). + * @description: Custom object entries against the custom object definition can be added using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomObject/). */ - createCustomObjectBySlug({ definitionSlug, body, requestHeaders }?: ContentPlatformValidator.CreateCustomObjectBySlugParam, { responseHeaders }?: object): Promise; + createCustomObject({ body, requestHeaders }?: ContentPlatformValidator.CreateCustomObjectParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformValidator.CreateCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name createCustomObjectDefinition * @summary: Create custom object definition * @description: Create a custom object that will have a collection of custom fields and can be used anywhere in the custom field for any resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomObjectDefinition/). */ - createCustomObjectDefinition({ body, requestHeaders }?: ContentPlatformValidator.CreateCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; + createCustomObjectDefinition({ body, requestHeaders }?: ContentPlatformValidator.CreateCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.DeleteCustomFieldDefinitionBySlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.DeleteCustomFieldDefinitionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name deleteCustomFieldDefinitionBySlug + * @name deleteCustomFieldDefinition * @summary: Delete custom fields definition - * @description: Custom field definition and its assosiated custom fields value can be deleted using this api on the basis of definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomFieldDefinitionBySlug/). + * @description: Custom field definition and its assosiated custom fields value can be deleted using this api on the basis of definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomFieldDefinition/). */ - deleteCustomFieldDefinitionBySlug({ slug, resource, namespace, requestHeaders }?: ContentPlatformValidator.DeleteCustomFieldDefinitionBySlugParam, { responseHeaders }?: object): Promise; + deleteCustomFieldDefinition({ definitionId, requestHeaders }?: ContentPlatformValidator.DeleteCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.DeleteCustomFieldsByResourceSlugParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name deleteCustomFieldsByResourceSlug - * @summary: delete custom fields of given resource and resource slug - * @description: Use this API to delete the custom fields for given resource in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomFieldsByResourceSlug/). - */ - deleteCustomFieldsByResourceSlug({ resource, resourceSlug, ids, requestHeaders }?: ContentPlatformValidator.DeleteCustomFieldsByResourceSlugParam, { responseHeaders }?: object): Promise; - /** - * @param {ContentPlatformValidator.DeleteCustomObjectBySlugParam} arg - Arg object + * @param {ContentPlatformValidator.DeleteCustomObjectParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name deleteCustomObjectBySlug + * @name deleteCustomObject * @summary: Delete custom object - * @description: Custom object entries can be deleted by providing the delete ID using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObjectBySlug/). + * @description: Custom object entries can be deleted by providing the delete ID using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObject/). */ - deleteCustomObjectBySlug({ definitionSlug, slug, requestHeaders }?: ContentPlatformValidator.DeleteCustomObjectBySlugParam, { responseHeaders }?: object): Promise; + deleteCustomObject({ metaobjectId, requestHeaders }?: ContentPlatformValidator.DeleteCustomObjectParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.DeleteCustomObjectDefinitionBySlugParam} arg + * @param {ContentPlatformValidator.DeleteCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -82,52 +80,35 @@ declare class Content { * @returns {Promise} * - Success response * - * @name deleteCustomObjectDefinitionBySlug - * @summary: Delete custom object definition - * @description: Custom object definitions can be deleted using this endpoint by providing the definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObjectDefinitionBySlug/). + * @name deleteCustomObjectDefinition + * @summary: delete custom object definition + * @description: Custom object definitions can be deleted using this endpoint by providing the definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObjectDefinition/). */ - deleteCustomObjectDefinitionBySlug({ slug, requestHeaders }?: ContentPlatformValidator.DeleteCustomObjectDefinitionBySlugParam, { responseHeaders }?: object): Promise; + deleteCustomObjectDefinition({ definitionId, requestHeaders }?: ContentPlatformValidator.DeleteCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.ExportCustomObjectEntriesBySlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.ExportCustomObjectEntriesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} * - Success response * - * @name exportCustomObjectEntriesBySlug + * @name exportCustomObjectEntries * @summary: Initiate download for bulk custom object entries - * @description: Custom object bulk export of bulk entries can be perform using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportCustomObjectEntriesBySlug/). - */ - exportCustomObjectEntriesBySlug({ slug, requestHeaders }?: ContentPlatformValidator.ExportCustomObjectEntriesBySlugParam, { responseHeaders }?: object): Promise; - /** - * @param {ContentPlatformValidator.GetCustomFieldDefinitionByResourceParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getCustomFieldDefinitionByResource - * @summary: Get custom fields definitions for a given resource type - * @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinitionByResource/). + * @description: Custom object bulk export of bulk entries can be perform using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportCustomObjectEntries/). */ - getCustomFieldDefinitionByResource({ pageNo, pageSize, resource, types, search, slugs, namespaces, requestHeaders, }?: ContentPlatformValidator.GetCustomFieldDefinitionByResourceParam, { responseHeaders }?: object): Promise; + exportCustomObjectEntries({ definitionId, requestHeaders }?: ContentPlatformValidator.ExportCustomObjectEntriesParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.GetCustomFieldDefinitionBySlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.GetCustomFieldDefinitionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name getCustomFieldDefinitionBySlug - * @summary: Get custom fields definition by resource, slug and namespace - * @description: Custom field definitions can be retrived from this using its slug, namespace and resource - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinitionBySlug/). + * @name getCustomFieldDefinition + * @summary: Get custom fields definition + * @description: Custom field definitions can be fetch using definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinition/). */ - getCustomFieldDefinitionBySlug({ slug, resource, namespace, requestHeaders }?: ContentPlatformValidator.GetCustomFieldDefinitionBySlugParam, { responseHeaders }?: object): Promise; + getCustomFieldDefinition({ definitionId, requestHeaders }?: ContentPlatformValidator.GetCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformValidator.GetCustomFieldDefinitionsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -138,56 +119,61 @@ declare class Content { * @summary: Get custom fields definitions * @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinitions/). */ - getCustomFieldDefinitions({ pageNo, pageSize, resources, types, search, slugs, namespaces, requestHeaders, }?: ContentPlatformValidator.GetCustomFieldDefinitionsParam, { responseHeaders }?: object): Promise; + getCustomFieldDefinitions({ pageNo, pageSize, resource, type, search, requestHeaders }?: ContentPlatformValidator.GetCustomFieldDefinitionsParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformValidator.GetCustomFieldTypesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getCustomFieldTypes * @summary: Get custom field types * @description: Each custom field and custom field definition has a type, which defines the type of information that it can store. The custom field types have built-in validation. This api will give list of supported custom fields types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldTypes/). */ - getCustomFieldTypes({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getCustomFieldTypes({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.GetCustomFieldsByResourceSlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.GetCustomFieldsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getCustomFields + * @summary: Get list of custom fields of given resource + * @description: Retrieves a list of custom fields attached to a particular resource by using the resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFields/). + */ + getCustomFields({ resource, requestHeaders }?: ContentPlatformValidator.GetCustomFieldsParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.GetCustomFieldsByResourceIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} * - Success response * - * @name getCustomFieldsByResourceSlug - * @summary: Get list of custom fields of given resource and resource slug - * @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldsByResourceSlug/). + * @name getCustomFieldsByResourceId + * @summary: Get list of custom fields of given resource and resource id + * @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldsByResourceId/). */ - getCustomFieldsByResourceSlug({ resource, resourceSlug, requestHeaders }?: ContentPlatformValidator.GetCustomFieldsByResourceSlugParam, { responseHeaders }?: object): Promise; + getCustomFieldsByResourceId({ resource, resourceId, requestHeaders }?: ContentPlatformValidator.GetCustomFieldsByResourceIdParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.GetCustomObjectBySlugParam} arg - Arg object + * @param {ContentPlatformValidator.GetCustomObjectParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getCustomObjectBySlug + * @returns {Promise} - Success response + * @name getCustomObject * @summary: Get custom object details - * @description: Details of a custom object entry can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectBySlug/). + * @description: Details of custom objects, their field details, definitions, and references can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObject/). */ - getCustomObjectBySlug({ definitionSlug, slug, requestHeaders }?: ContentPlatformValidator.GetCustomObjectBySlugParam, { responseHeaders }?: object): Promise; + getCustomObject({ metaobjectId, requestHeaders }?: ContentPlatformValidator.GetCustomObjectParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.GetCustomObjectDefinitionBySlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.GetCustomObjectDefinitionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getCustomObjectDefinitionBySlug + * @returns {Promise} - + * Success response + * @name getCustomObjectDefinition * @summary: Get custom object definition - * @description: Custom object definitions can be fetched using their custom object definition slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectDefinitionBySlug/). + * @description: Custom object definitions can be fetched using their definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectDefinition/). */ - getCustomObjectDefinitionBySlug({ slug, requestHeaders }?: ContentPlatformValidator.GetCustomObjectDefinitionBySlugParam, { responseHeaders }?: object): Promise; + getCustomObjectDefinition({ definitionId, requestHeaders }?: ContentPlatformValidator.GetCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformValidator.GetCustomObjectDefinitionsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -200,15 +186,15 @@ declare class Content { */ getCustomObjectDefinitions({ pageNo, pageSize, search, requestHeaders }?: ContentPlatformValidator.GetCustomObjectDefinitionsParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.GetCustomObjectsBySlugParam} arg - Arg object + * @param {ContentPlatformValidator.GetCustomObjectsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getCustomObjectsBySlug - * @summary: Get list of custom objects under a certain custom object definition - * @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectsBySlug/). + * @name getCustomObjects + * @summary: Get list of custom objects + * @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjects/). */ - getCustomObjectsBySlug({ pageNo, pageSize, definitionSlug, requestHeaders }?: ContentPlatformValidator.GetCustomObjectsBySlugParam, { responseHeaders }?: object): Promise; + getCustomObjects({ pageNo, pageSize, definitionId, requestHeaders }?: ContentPlatformValidator.GetCustomObjectsParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformValidator.GetJobsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -226,88 +212,66 @@ declare class Content { * @returns {Promise} - Success response * @name getResources * @summary: Get resources - * @description: Use this API to retrieve the resources, such as products, collections, customers, selling locations, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getResources/). + * @description: Each custom fields is assosiated with a resource such as product, promotion, coupon, selling location etc, This will gives list of supported resource list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getResources/). */ getResources({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.ImportCustomObjectEntriesBySlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.ImportCustomObjectEntriesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name importCustomObjectEntriesBySlug + * @name importCustomObjectEntries * @summary: Bulk custom object entries upload - * @description: Custom object bulk import of bulk entries can be performed using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importCustomObjectEntriesBySlug/). + * @description: Custom object bulk import of bulk entries can be performed using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importCustomObjectEntries/). */ - importCustomObjectEntriesBySlug({ slug, body, requestHeaders }?: ContentPlatformValidator.ImportCustomObjectEntriesBySlugParam, { responseHeaders }?: object): Promise; + importCustomObjectEntries({ definitionId, body, requestHeaders }?: ContentPlatformValidator.ImportCustomObjectEntriesParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.SampleCustomObjectBulkEntryBySlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.SampleCustomObjectBulkEntryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name sampleCustomObjectBulkEntryBySlug + * @name sampleCustomObjectBulkEntry * @summary: Download sample for custom object bulk entry - * @description: Sample files for custom object bulk import can be obtained from this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleCustomObjectBulkEntryBySlug/). - */ - sampleCustomObjectBulkEntryBySlug({ slug, requestHeaders }?: ContentPlatformValidator.SampleCustomObjectBulkEntryBySlugParam, { responseHeaders }?: object): Promise; - /** - * @param {ContentPlatformValidator.UpdateCustomFieldByResourceSlugParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name updateCustomFieldByResourceSlug - * @summary: Update custom field entries for gives resource and resource slug - * @description: You can add a custom field using this endpoint to any resource by providing the resource slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomFieldByResourceSlug/). + * @description: Sample files for custom object bulk import can be obtained from this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleCustomObjectBulkEntry/). */ - updateCustomFieldByResourceSlug({ resource, resourceSlug, body, requestHeaders }?: ContentPlatformValidator.UpdateCustomFieldByResourceSlugParam, { responseHeaders }?: object): Promise; + sampleCustomObjectBulkEntry({ definitionId, requestHeaders }?: ContentPlatformValidator.SampleCustomObjectBulkEntryParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.UpdateCustomFieldDefinitionBySlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.UpdateCustomFieldDefinitionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} * - Success response * - * @name updateCustomFieldDefinitionBySlug + * @name updateCustomFieldDefinition * @summary: Update custom field definition - * @description: Custom fields definition can be update using this api, You can update custom field definition name and description. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomFieldDefinitionBySlug/). + * @description: Custom fields definition can be update using this api, You can update custom field definition name and description. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomFieldDefinition/). */ - updateCustomFieldDefinitionBySlug({ slug, resource, namespace, body, requestHeaders }?: ContentPlatformValidator.UpdateCustomFieldDefinitionBySlugParam, { responseHeaders }?: object): Promise; + updateCustomFieldDefinition({ definitionId, body, requestHeaders }?: ContentPlatformValidator.UpdateCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.UpdateCustomObjectBySlugParam} arg - Arg object + * @param {ContentPlatformValidator.UpdateCustomObjectParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name updateCustomObjectBySlug + * @returns {Promise} - Success response + * @name updateCustomObject * @summary: Update custom object details - * @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObjectBySlug/). + * @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObject/). */ - updateCustomObjectBySlug({ definitionSlug, slug, body, requestHeaders }?: ContentPlatformValidator.UpdateCustomObjectBySlugParam, { responseHeaders }?: object): Promise; + updateCustomObject({ metaobjectId, body, requestHeaders }?: ContentPlatformValidator.UpdateCustomObjectParam, { responseHeaders }?: object): Promise; /** - * @param {ContentPlatformValidator.UpdateCustomObjectDefinitionBySlugParam} arg + * @param {ContentPlatformValidator.UpdateCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name updateCustomObjectDefinitionBySlug + * @returns {Promise} - + * Success response + * @name updateCustomObjectDefinition * @summary: Update custom object definition - * @description: Custom object definitions can be updated using this endpoint. You can update the name and description of the custom object and add more custom field definitions to the existing custom object. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObjectDefinitionBySlug/). + * @description: Custom object definitions can be updated using this endpoint. You can update the name and description of the custom object and add more custom field definitions to the existing custom object. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObjectDefinition/). */ - updateCustomObjectDefinitionBySlug({ slug, body, requestHeaders }?: ContentPlatformValidator.UpdateCustomObjectDefinitionBySlugParam, { responseHeaders }?: object): Promise; + updateCustomObjectDefinition({ definitionId, body, requestHeaders }?: ContentPlatformValidator.UpdateCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; } import ContentPlatformValidator = require("./ContentPlatformValidator"); import ContentPlatformModel = require("./ContentPlatformModel"); diff --git a/sdk/platform/Content/ContentPlatformClient.js b/sdk/platform/Content/ContentPlatformClient.js index 3cd8f9a64..bda9cef60 100644 --- a/sdk/platform/Content/ContentPlatformClient.js +++ b/sdk/platform/Content/ContentPlatformClient.js @@ -15,25 +15,28 @@ class Content { } /** - * @param {ContentPlatformValidator.CreateCustomFieldDefinitionParam} arg - Arg object + * @param {ContentPlatformValidator.CreateCustomFieldByResourceIdParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name createCustomFieldDefinition - * @summary: Create custom field definition for a given resource type - * @description: You can create custom fields definition to any resource so you can extend property of resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomFieldDefinition/). + * @name createCustomFieldByResourceId + * @summary: Create custom field entries for gives resource and resource_id + * @description: You can add a custom field using this endpoint to any resource by providing the resource ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomFieldByResourceId/). */ - async createCustomFieldDefinition( - { resource, body, requestHeaders } = { requestHeaders: {} }, + async createCustomFieldByResourceId( + { resource, resourceId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformValidator.createCustomFieldDefinition().validate( + } = ContentPlatformValidator.createCustomFieldByResourceId().validate( { resource, + resourceId, body, }, { abortEarly: false, allowUnknown: true } @@ -45,9 +48,10 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.createCustomFieldDefinition().validate( + } = ContentPlatformValidator.createCustomFieldByResourceId().validate( { resource, + resourceId, body, }, { abortEarly: false, allowUnknown: false } @@ -55,7 +59,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > createCustomFieldDefinition \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createCustomFieldByResourceId \n ${warrning}`, }); } @@ -65,8 +69,8 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "post", - `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/definition`, + "put", + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/${resource}/${resourceId}`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -80,7 +84,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().validate( + } = ContentPlatformModel.CustomFieldsResponseByResourceIdSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -91,7 +95,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > createCustomFieldDefinition \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createCustomFieldByResourceId \n ${res_error}`, }); } } @@ -100,23 +104,24 @@ class Content { } /** - * @param {ContentPlatformValidator.CreateCustomObjectBySlugParam} arg - Arg object + * @param {ContentPlatformValidator.CreateCustomFieldDefinitionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name createCustomObjectBySlug - * @summary: Create custom object entries - * @description: Custom object entries against the custom object definition can be added using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomObjectBySlug/). + * @returns {Promise} + * - Success response + * + * @name createCustomFieldDefinition + * @summary: Create custom field definition + * @description: You can create custom fields definition to any resource so you can extend property of resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomFieldDefinition/). */ - async createCustomObjectBySlug( - { definitionSlug, body, requestHeaders } = { requestHeaders: {} }, + async createCustomFieldDefinition( + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformValidator.createCustomObjectBySlug().validate( + } = ContentPlatformValidator.createCustomFieldDefinition().validate( { - definitionSlug, body, }, { abortEarly: false, allowUnknown: true } @@ -128,9 +133,8 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.createCustomObjectBySlug().validate( + } = ContentPlatformValidator.createCustomFieldDefinition().validate( { - definitionSlug, body, }, { abortEarly: false, allowUnknown: false } @@ -138,7 +142,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > createCustomObjectBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createCustomFieldDefinition \n ${warrning}`, }); } @@ -149,7 +153,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -163,10 +167,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomObjectSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -174,7 +178,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > createCustomObjectBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createCustomFieldDefinition \n ${res_error}`, }); } } @@ -183,25 +187,19 @@ class Content { } /** - * @param {ContentPlatformValidator.CreateCustomObjectDefinitionParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.CreateCustomObjectParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name createCustomObjectDefinition - * @summary: Create custom object definition - * @description: Create a custom object that will have a collection of custom fields and can be used anywhere in the custom field for any resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomObjectDefinition/). + * @returns {Promise} - Success response + * @name createCustomObject + * @summary: Create custom object entries + * @description: Custom object entries against the custom object definition can be added using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomObject/). */ - async createCustomObjectDefinition( + async createCustomObject( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { - error, - } = ContentPlatformValidator.createCustomObjectDefinition().validate( + const { error } = ContentPlatformValidator.createCustomObject().validate( { body, }, @@ -214,7 +212,7 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.createCustomObjectDefinition().validate( + } = ContentPlatformValidator.createCustomObject().validate( { body, }, @@ -223,7 +221,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > createCustomObjectDefinition \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createCustomObject \n ${warrning}`, }); } @@ -234,7 +232,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -248,10 +246,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ContentPlatformModel.CustomObjectSchema().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -259,7 +257,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > createCustomObjectDefinition \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createCustomObject \n ${res_error}`, }); } } @@ -268,27 +266,26 @@ class Content { } /** - * @param {ContentPlatformValidator.DeleteCustomFieldDefinitionBySlugParam} arg + * @param {ContentPlatformValidator.CreateCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deleteCustomFieldDefinitionBySlug - * @summary: Delete custom fields definition - * @description: Custom field definition and its assosiated custom fields value can be deleted using this api on the basis of definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomFieldDefinitionBySlug/). + * @returns {Promise} - + * Success response + * @name createCustomObjectDefinition + * @summary: Create custom object definition + * @description: Create a custom object that will have a collection of custom fields and can be used anywhere in the custom field for any resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomObjectDefinition/). */ - async deleteCustomFieldDefinitionBySlug( - { slug, resource, namespace, requestHeaders } = { requestHeaders: {} }, + async createCustomObjectDefinition( + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformValidator.deleteCustomFieldDefinitionBySlug().validate( + } = ContentPlatformValidator.createCustomObjectDefinition().validate( { - slug, - resource, - namespace, + body, }, { abortEarly: false, allowUnknown: true } ); @@ -299,18 +296,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.deleteCustomFieldDefinitionBySlug().validate( + } = ContentPlatformValidator.createCustomObjectDefinition().validate( { - slug, - resource, - namespace, + body, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteCustomFieldDefinitionBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createCustomObjectDefinition \n ${warrning}`, }); } @@ -320,10 +315,10 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "delete", - `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`, + "post", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions`, query_params, - undefined, + body, { ...xHeaders, ...requestHeaders }, { responseHeaders } ); @@ -335,10 +330,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomDataDeleteSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ContentPlatformModel.CustomObjectDefinitionSchema().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -346,7 +341,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteCustomFieldDefinitionBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createCustomObjectDefinition \n ${res_error}`, }); } } @@ -355,28 +350,23 @@ class Content { } /** - * @param {ContentPlatformValidator.DeleteCustomFieldsByResourceSlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.DeleteCustomFieldDefinitionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name deleteCustomFieldsByResourceSlug - * @summary: delete custom fields of given resource and resource slug - * @description: Use this API to delete the custom fields for given resource in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomFieldsByResourceSlug/). + * @returns {Promise} - Success response + * @name deleteCustomFieldDefinition + * @summary: Delete custom fields definition + * @description: Custom field definition and its assosiated custom fields value can be deleted using this api on the basis of definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomFieldDefinition/). */ - async deleteCustomFieldsByResourceSlug( - { resource, resourceSlug, ids, requestHeaders } = { requestHeaders: {} }, + async deleteCustomFieldDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformValidator.deleteCustomFieldsByResourceSlug().validate( + } = ContentPlatformValidator.deleteCustomFieldDefinition().validate( { - resource, - resourceSlug, - ids, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -387,30 +377,27 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.deleteCustomFieldsByResourceSlug().validate( + } = ContentPlatformValidator.deleteCustomFieldDefinition().validate( { - resource, - resourceSlug, - ids, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteCustomFieldsByResourceSlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteCustomFieldDefinition \n ${warrning}`, }); } const query_params = {}; - query_params["ids"] = ids; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, "delete", - `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/${resourceSlug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions/${definitionId}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -424,7 +411,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomFieldsDeleteSchema().validate(responseData, { + } = ContentPlatformModel.CustomDataDeleteSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -435,7 +422,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteCustomFieldsByResourceSlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteCustomFieldDefinition \n ${res_error}`, }); } } @@ -444,24 +431,21 @@ class Content { } /** - * @param {ContentPlatformValidator.DeleteCustomObjectBySlugParam} arg - Arg object + * @param {ContentPlatformValidator.DeleteCustomObjectParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name deleteCustomObjectBySlug + * @name deleteCustomObject * @summary: Delete custom object - * @description: Custom object entries can be deleted by providing the delete ID using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObjectBySlug/). + * @description: Custom object entries can be deleted by providing the delete ID using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObject/). */ - async deleteCustomObjectBySlug( - { definitionSlug, slug, requestHeaders } = { requestHeaders: {} }, + async deleteCustomObject( + { metaobjectId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { - error, - } = ContentPlatformValidator.deleteCustomObjectBySlug().validate( + const { error } = ContentPlatformValidator.deleteCustomObject().validate( { - definitionSlug, - slug, + metaobjectId, }, { abortEarly: false, allowUnknown: true } ); @@ -472,17 +456,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.deleteCustomObjectBySlug().validate( + } = ContentPlatformValidator.deleteCustomObject().validate( { - definitionSlug, - slug, + metaobjectId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteCustomObjectBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteCustomObject \n ${warrning}`, }); } @@ -493,7 +476,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "delete", - `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/${metaobjectId}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -518,7 +501,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteCustomObjectBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteCustomObject \n ${res_error}`, }); } } @@ -527,7 +510,7 @@ class Content { } /** - * @param {ContentPlatformValidator.DeleteCustomObjectDefinitionBySlugParam} arg + * @param {ContentPlatformValidator.DeleteCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -535,19 +518,19 @@ class Content { * @returns {Promise} * - Success response * - * @name deleteCustomObjectDefinitionBySlug - * @summary: Delete custom object definition - * @description: Custom object definitions can be deleted using this endpoint by providing the definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObjectDefinitionBySlug/). + * @name deleteCustomObjectDefinition + * @summary: delete custom object definition + * @description: Custom object definitions can be deleted using this endpoint by providing the definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObjectDefinition/). */ - async deleteCustomObjectDefinitionBySlug( - { slug, requestHeaders } = { requestHeaders: {} }, + async deleteCustomObjectDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformValidator.deleteCustomObjectDefinitionBySlug().validate( + } = ContentPlatformValidator.deleteCustomObjectDefinition().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -558,16 +541,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.deleteCustomObjectDefinitionBySlug().validate( + } = ContentPlatformValidator.deleteCustomObjectDefinition().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteCustomObjectDefinitionBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteCustomObjectDefinition \n ${warrning}`, }); } @@ -578,7 +561,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "delete", - `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions/${definitionId}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -603,7 +586,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteCustomObjectDefinitionBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteCustomObjectDefinition \n ${res_error}`, }); } } @@ -612,27 +595,25 @@ class Content { } /** - * @param {ContentPlatformValidator.ExportCustomObjectEntriesBySlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.ExportCustomObjectEntriesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} * - Success response * - * @name exportCustomObjectEntriesBySlug + * @name exportCustomObjectEntries * @summary: Initiate download for bulk custom object entries - * @description: Custom object bulk export of bulk entries can be perform using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportCustomObjectEntriesBySlug/). + * @description: Custom object bulk export of bulk entries can be perform using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportCustomObjectEntries/). */ - async exportCustomObjectEntriesBySlug( - { slug, requestHeaders } = { requestHeaders: {} }, + async exportCustomObjectEntries( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformValidator.exportCustomObjectEntriesBySlug().validate( + } = ContentPlatformValidator.exportCustomObjectEntries().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -643,16 +624,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.exportCustomObjectEntriesBySlug().validate( + } = ContentPlatformValidator.exportCustomObjectEntries().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > exportCustomObjectEntriesBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > exportCustomObjectEntries \n ${warrning}`, }); } @@ -663,7 +644,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}/bulk/download`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/bulk/${definitionId}/download`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -688,7 +669,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > exportCustomObjectEntriesBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > exportCustomObjectEntries \n ${res_error}`, }); } } @@ -697,41 +678,25 @@ class Content { } /** - * @param {ContentPlatformValidator.GetCustomFieldDefinitionByResourceParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.GetCustomFieldDefinitionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getCustomFieldDefinitionByResource - * @summary: Get custom fields definitions for a given resource type - * @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinitionByResource/). + * @returns {Promise} + * - Success response + * + * @name getCustomFieldDefinition + * @summary: Get custom fields definition + * @description: Custom field definitions can be fetch using definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinition/). */ - async getCustomFieldDefinitionByResource( - { - pageNo, - pageSize, - resource, - types, - search, - slugs, - namespaces, - requestHeaders, - } = { requestHeaders: {} }, + async getCustomFieldDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformValidator.getCustomFieldDefinitionByResource().validate( + } = ContentPlatformValidator.getCustomFieldDefinition().validate( { - pageNo, - pageSize, - resource, - types, - search, - slugs, - namespaces, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -742,39 +707,27 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.getCustomFieldDefinitionByResource().validate( + } = ContentPlatformValidator.getCustomFieldDefinition().validate( { - pageNo, - pageSize, - resource, - types, - search, - slugs, - namespaces, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinitionByResource \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinition \n ${warrning}`, }); } const query_params = {}; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; - query_params["types"] = types; - query_params["search"] = search; - query_params["slugs"] = slugs; - query_params["namespaces"] = namespaces; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/definition`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions/${definitionId}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -788,7 +741,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate( + } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -799,7 +752,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getCustomFieldDefinitionByResource \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getCustomFieldDefinition \n ${res_error}`, }); } } @@ -808,29 +761,30 @@ class Content { } /** - * @param {ContentPlatformValidator.GetCustomFieldDefinitionBySlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.GetCustomFieldDefinitionsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getCustomFieldDefinitionBySlug - * @summary: Get custom fields definition by resource, slug and namespace - * @description: Custom field definitions can be retrived from this using its slug, namespace and resource - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinitionBySlug/). + * @returns {Promise} - + * Success response + * @name getCustomFieldDefinitions + * @summary: Get custom fields definitions + * @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinitions/). */ - async getCustomFieldDefinitionBySlug( - { slug, resource, namespace, requestHeaders } = { requestHeaders: {} }, + async getCustomFieldDefinitions( + { pageNo, pageSize, resource, type, search, requestHeaders } = { + requestHeaders: {}, + }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformValidator.getCustomFieldDefinitionBySlug().validate( + } = ContentPlatformValidator.getCustomFieldDefinitions().validate( { - slug, + pageNo, + pageSize, resource, - namespace, + type, + search, }, { abortEarly: false, allowUnknown: true } ); @@ -841,29 +795,36 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.getCustomFieldDefinitionBySlug().validate( + } = ContentPlatformValidator.getCustomFieldDefinitions().validate( { - slug, + pageNo, + pageSize, resource, - namespace, + type, + search, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinitionBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinitions \n ${warrning}`, }); } const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["resource"] = resource; + query_params["type"] = type; + query_params["search"] = search; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -877,7 +838,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.MetaFieldDefinitionDetailResSchema().validate( + } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -888,7 +849,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getCustomFieldDefinitionBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getCustomFieldDefinitions \n ${res_error}`, }); } } @@ -897,40 +858,20 @@ class Content { } /** - * @param {ContentPlatformValidator.GetCustomFieldDefinitionsParam} arg - Arg object + * @param {ContentPlatformValidator.GetCustomFieldTypesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getCustomFieldDefinitions - * @summary: Get custom fields definitions - * @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinitions/). + * @returns {Promise} - Success response + * @name getCustomFieldTypes + * @summary: Get custom field types + * @description: Each custom field and custom field definition has a type, which defines the type of information that it can store. The custom field types have built-in validation. This api will give list of supported custom fields types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldTypes/). */ - async getCustomFieldDefinitions( - { - pageNo, - pageSize, - resources, - types, - search, - slugs, - namespaces, - requestHeaders, - } = { requestHeaders: {} }, + async getCustomFieldTypes( + { requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { - error, - } = ContentPlatformValidator.getCustomFieldDefinitions().validate( - { - pageNo, - pageSize, - resources, - types, - search, - slugs, - namespaces, - }, + const { error } = ContentPlatformValidator.getCustomFieldTypes().validate( + {}, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -940,40 +881,25 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.getCustomFieldDefinitions().validate( - { - pageNo, - pageSize, - resources, - types, - search, - slugs, - namespaces, - }, + } = ContentPlatformValidator.getCustomFieldTypes().validate( + {}, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinitions \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getCustomFieldTypes \n ${warrning}`, }); } const query_params = {}; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; - query_params["resources"] = resources; - query_params["types"] = types; - query_params["search"] = search; - query_params["slugs"] = slugs; - query_params["namespaces"] = namespaces; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/definition`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/types`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -987,10 +913,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomFieldDefinitionsSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -998,7 +924,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getCustomFieldDefinitions \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getCustomFieldTypes \n ${res_error}`, }); } } @@ -1007,20 +933,23 @@ class Content { } /** - * @param {ContentPlatformValidator.GetCustomFieldTypesParam} arg - Arg object + * @param {ContentPlatformValidator.GetCustomFieldsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getCustomFieldTypes - * @summary: Get custom field types - * @description: Each custom field and custom field definition has a type, which defines the type of information that it can store. The custom field types have built-in validation. This api will give list of supported custom fields types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldTypes/). + * @returns {Promise} - + * Success response + * @name getCustomFields + * @summary: Get list of custom fields of given resource + * @description: Retrieves a list of custom fields attached to a particular resource by using the resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFields/). */ - async getCustomFieldTypes( - { requestHeaders } = { requestHeaders: {} }, + async getCustomFields( + { resource, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ContentPlatformValidator.getCustomFieldTypes().validate( - {}, + const { error } = ContentPlatformValidator.getCustomFields().validate( + { + resource, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -1030,14 +959,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.getCustomFieldTypes().validate( - {}, + } = ContentPlatformValidator.getCustomFields().validate( + { + resource, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getCustomFieldTypes \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getCustomFields \n ${warrning}`, }); } @@ -1048,7 +979,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/types`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/${resource}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -1062,10 +993,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.MetafieldTypesSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ContentPlatformModel.CustomFieldsResponseSchema().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1073,7 +1004,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getCustomFieldTypes \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getCustomFields \n ${res_error}`, }); } } @@ -1082,28 +1013,26 @@ class Content { } /** - * @param {ContentPlatformValidator.GetCustomFieldsByResourceSlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.GetCustomFieldsByResourceIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} * - Success response * - * @name getCustomFieldsByResourceSlug - * @summary: Get list of custom fields of given resource and resource slug - * @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldsByResourceSlug/). + * @name getCustomFieldsByResourceId + * @summary: Get list of custom fields of given resource and resource id + * @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldsByResourceId/). */ - async getCustomFieldsByResourceSlug( - { resource, resourceSlug, requestHeaders } = { requestHeaders: {} }, + async getCustomFieldsByResourceId( + { resource, resourceId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformValidator.getCustomFieldsByResourceSlug().validate( + } = ContentPlatformValidator.getCustomFieldsByResourceId().validate( { resource, - resourceSlug, + resourceId, }, { abortEarly: false, allowUnknown: true } ); @@ -1114,17 +1043,17 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.getCustomFieldsByResourceSlug().validate( + } = ContentPlatformValidator.getCustomFieldsByResourceId().validate( { resource, - resourceSlug, + resourceId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getCustomFieldsByResourceSlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getCustomFieldsByResourceId \n ${warrning}`, }); } @@ -1135,7 +1064,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/${resourceSlug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/${resource}/${resourceId}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -1160,7 +1089,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getCustomFieldsByResourceSlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getCustomFieldsByResourceId \n ${res_error}`, }); } } @@ -1169,23 +1098,21 @@ class Content { } /** - * @param {ContentPlatformValidator.GetCustomObjectBySlugParam} arg - Arg object + * @param {ContentPlatformValidator.GetCustomObjectParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getCustomObjectBySlug + * @returns {Promise} - Success response + * @name getCustomObject * @summary: Get custom object details - * @description: Details of a custom object entry can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectBySlug/). + * @description: Details of custom objects, their field details, definitions, and references can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObject/). */ - async getCustomObjectBySlug( - { definitionSlug, slug, requestHeaders } = { requestHeaders: {} }, + async getCustomObject( + { metaobjectId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ContentPlatformValidator.getCustomObjectBySlug().validate( + const { error } = ContentPlatformValidator.getCustomObject().validate( { - definitionSlug, - slug, + metaobjectId, }, { abortEarly: false, allowUnknown: true } ); @@ -1196,17 +1123,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.getCustomObjectBySlug().validate( + } = ContentPlatformValidator.getCustomObject().validate( { - definitionSlug, - slug, + metaobjectId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getCustomObjectBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getCustomObject \n ${warrning}`, }); } @@ -1217,7 +1143,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/${metaobjectId}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -1231,7 +1157,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomObjectBySlugSchema().validate(responseData, { + } = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1242,7 +1168,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getCustomObjectBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getCustomObject \n ${res_error}`, }); } } @@ -1251,27 +1177,24 @@ class Content { } /** - * @param {ContentPlatformValidator.GetCustomObjectDefinitionBySlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.GetCustomObjectDefinitionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getCustomObjectDefinitionBySlug + * @returns {Promise} - + * Success response + * @name getCustomObjectDefinition * @summary: Get custom object definition - * @description: Custom object definitions can be fetched using their custom object definition slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectDefinitionBySlug/). + * @description: Custom object definitions can be fetched using their definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectDefinition/). */ - async getCustomObjectDefinitionBySlug( - { slug, requestHeaders } = { requestHeaders: {} }, + async getCustomObjectDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformValidator.getCustomObjectDefinitionBySlug().validate( + } = ContentPlatformValidator.getCustomObjectDefinition().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -1282,16 +1205,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.getCustomObjectDefinitionBySlug().validate( + } = ContentPlatformValidator.getCustomObjectDefinition().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getCustomObjectDefinitionBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getCustomObjectDefinition \n ${warrning}`, }); } @@ -1302,7 +1225,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions/${definitionId}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -1316,7 +1239,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate( + } = ContentPlatformModel.CustomObjectDefinitionSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1327,7 +1250,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getCustomObjectDefinitionBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getCustomObjectDefinition \n ${res_error}`, }); } } @@ -1391,7 +1314,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -1425,27 +1348,23 @@ class Content { } /** - * @param {ContentPlatformValidator.GetCustomObjectsBySlugParam} arg - Arg object + * @param {ContentPlatformValidator.GetCustomObjectsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getCustomObjectsBySlug - * @summary: Get list of custom objects under a certain custom object definition - * @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectsBySlug/). + * @name getCustomObjects + * @summary: Get list of custom objects + * @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjects/). */ - async getCustomObjectsBySlug( - { pageNo, pageSize, definitionSlug, requestHeaders } = { - requestHeaders: {}, - }, + async getCustomObjects( + { pageNo, pageSize, definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { - error, - } = ContentPlatformValidator.getCustomObjectsBySlug().validate( + const { error } = ContentPlatformValidator.getCustomObjects().validate( { pageNo, pageSize, - definitionSlug, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -1456,22 +1375,23 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.getCustomObjectsBySlug().validate( + } = ContentPlatformValidator.getCustomObjects().validate( { pageNo, pageSize, - definitionSlug, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getCustomObjectsBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getCustomObjects \n ${warrning}`, }); } const query_params = {}; + query_params["definition_id"] = definitionId; query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; @@ -1480,7 +1400,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -1505,7 +1425,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getCustomObjectsBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getCustomObjects \n ${res_error}`, }); } } @@ -1604,7 +1524,7 @@ class Content { * @returns {Promise} - Success response * @name getResources * @summary: Get resources - * @description: Use this API to retrieve the resources, such as products, collections, customers, selling locations, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getResources/). + * @description: Each custom fields is assosiated with a resource such as product, promotion, coupon, selling location etc, This will gives list of supported resource list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getResources/). */ async getResources( { requestHeaders } = { requestHeaders: {} }, @@ -1673,27 +1593,25 @@ class Content { } /** - * @param {ContentPlatformValidator.ImportCustomObjectEntriesBySlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.ImportCustomObjectEntriesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name importCustomObjectEntriesBySlug + * @name importCustomObjectEntries * @summary: Bulk custom object entries upload - * @description: Custom object bulk import of bulk entries can be performed using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importCustomObjectEntriesBySlug/). + * @description: Custom object bulk import of bulk entries can be performed using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importCustomObjectEntries/). */ - async importCustomObjectEntriesBySlug( - { slug, body, requestHeaders } = { requestHeaders: {} }, + async importCustomObjectEntries( + { definitionId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformValidator.importCustomObjectEntriesBySlug().validate( + } = ContentPlatformValidator.importCustomObjectEntries().validate( { - slug, + definitionId, body, }, { abortEarly: false, allowUnknown: true } @@ -1705,9 +1623,9 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.importCustomObjectEntriesBySlug().validate( + } = ContentPlatformValidator.importCustomObjectEntries().validate( { - slug, + definitionId, body, }, { abortEarly: false, allowUnknown: false } @@ -1715,7 +1633,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > importCustomObjectEntriesBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > importCustomObjectEntries \n ${warrning}`, }); } @@ -1726,7 +1644,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}/bulk/upload`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/bulk/${definitionId}/upload`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -1740,7 +1658,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomObjectEntryBulkUploadDetails().validate( + } = ContentPlatformModel.CustomObjectEntryBulkUploadResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1751,7 +1669,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > importCustomObjectEntriesBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > importCustomObjectEntries \n ${res_error}`, }); } } @@ -1760,25 +1678,23 @@ class Content { } /** - * @param {ContentPlatformValidator.SampleCustomObjectBulkEntryBySlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.SampleCustomObjectBulkEntryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name sampleCustomObjectBulkEntryBySlug + * @name sampleCustomObjectBulkEntry * @summary: Download sample for custom object bulk entry - * @description: Sample files for custom object bulk import can be obtained from this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleCustomObjectBulkEntryBySlug/). + * @description: Sample files for custom object bulk import can be obtained from this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleCustomObjectBulkEntry/). */ - async sampleCustomObjectBulkEntryBySlug( - { slug, requestHeaders } = { requestHeaders: {} }, + async sampleCustomObjectBulkEntry( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformValidator.sampleCustomObjectBulkEntryBySlug().validate( + } = ContentPlatformValidator.sampleCustomObjectBulkEntry().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -1789,16 +1705,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.sampleCustomObjectBulkEntryBySlug().validate( + } = ContentPlatformValidator.sampleCustomObjectBulkEntry().validate( { - slug, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > sampleCustomObjectBulkEntryBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > sampleCustomObjectBulkEntry \n ${warrning}`, }); } @@ -1809,7 +1725,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}/bulk/sample`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/bulk/${definitionId}/sample`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -1831,96 +1747,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > sampleCustomObjectBulkEntryBySlug \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {ContentPlatformValidator.UpdateCustomFieldByResourceSlugParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name updateCustomFieldByResourceSlug - * @summary: Update custom field entries for gives resource and resource slug - * @description: You can add a custom field using this endpoint to any resource by providing the resource slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomFieldByResourceSlug/). - */ - async updateCustomFieldByResourceSlug( - { resource, resourceSlug, body, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = ContentPlatformValidator.updateCustomFieldByResourceSlug().validate( - { - resource, - resourceSlug, - body, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = ContentPlatformValidator.updateCustomFieldByResourceSlug().validate( - { - resource, - resourceSlug, - body, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > Content > updateCustomFieldByResourceSlug \n ${warrning}`, - }); - } - - const query_params = {}; - - const xHeaders = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "put", - `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/${resourceSlug}`, - query_params, - body, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = ContentPlatformModel.CustomFieldsResponseByResourceIdSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > Content > updateCustomFieldByResourceSlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > sampleCustomObjectBulkEntry \n ${res_error}`, }); } } @@ -1929,31 +1756,25 @@ class Content { } /** - * @param {ContentPlatformValidator.UpdateCustomFieldDefinitionBySlugParam} arg - * - Arg object - * + * @param {ContentPlatformValidator.UpdateCustomFieldDefinitionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} * - Success response * - * @name updateCustomFieldDefinitionBySlug + * @name updateCustomFieldDefinition * @summary: Update custom field definition - * @description: Custom fields definition can be update using this api, You can update custom field definition name and description. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomFieldDefinitionBySlug/). + * @description: Custom fields definition can be update using this api, You can update custom field definition name and description. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomFieldDefinition/). */ - async updateCustomFieldDefinitionBySlug( - { slug, resource, namespace, body, requestHeaders } = { - requestHeaders: {}, - }, + async updateCustomFieldDefinition( + { definitionId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformValidator.updateCustomFieldDefinitionBySlug().validate( + } = ContentPlatformValidator.updateCustomFieldDefinition().validate( { - slug, - resource, - namespace, + definitionId, body, }, { abortEarly: false, allowUnknown: true } @@ -1965,11 +1786,9 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.updateCustomFieldDefinitionBySlug().validate( + } = ContentPlatformValidator.updateCustomFieldDefinition().validate( { - slug, - resource, - namespace, + definitionId, body, }, { abortEarly: false, allowUnknown: false } @@ -1977,7 +1796,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > updateCustomFieldDefinitionBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > updateCustomFieldDefinition \n ${warrning}`, }); } @@ -1988,7 +1807,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/content/v2.0/company/${this.config.companyId}/customfields/resource/${resource}/namespace/${namespace}/definition/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions/${definitionId}`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -2013,7 +1832,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > updateCustomFieldDefinitionBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > updateCustomFieldDefinition \n ${res_error}`, }); } } @@ -2022,25 +1841,21 @@ class Content { } /** - * @param {ContentPlatformValidator.UpdateCustomObjectBySlugParam} arg - Arg object + * @param {ContentPlatformValidator.UpdateCustomObjectParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name updateCustomObjectBySlug + * @returns {Promise} - Success response + * @name updateCustomObject * @summary: Update custom object details - * @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObjectBySlug/). + * @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObject/). */ - async updateCustomObjectBySlug( - { definitionSlug, slug, body, requestHeaders } = { requestHeaders: {} }, + async updateCustomObject( + { metaobjectId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { - error, - } = ContentPlatformValidator.updateCustomObjectBySlug().validate( + const { error } = ContentPlatformValidator.updateCustomObject().validate( { - definitionSlug, - slug, + metaobjectId, body, }, { abortEarly: false, allowUnknown: true } @@ -2052,10 +1867,9 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.updateCustomObjectBySlug().validate( + } = ContentPlatformValidator.updateCustomObject().validate( { - definitionSlug, - slug, + metaobjectId, body, }, { abortEarly: false, allowUnknown: false } @@ -2063,7 +1877,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > updateCustomObjectBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > updateCustomObject \n ${warrning}`, }); } @@ -2074,7 +1888,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${definitionSlug}/entries/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/${metaobjectId}`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -2088,7 +1902,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomObjectBySlugSchema().validate(responseData, { + } = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2099,7 +1913,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > updateCustomObjectBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > updateCustomObject \n ${res_error}`, }); } } @@ -2108,27 +1922,26 @@ class Content { } /** - * @param {ContentPlatformValidator.UpdateCustomObjectDefinitionBySlugParam} arg + * @param {ContentPlatformValidator.UpdateCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name updateCustomObjectDefinitionBySlug + * @returns {Promise} - + * Success response + * @name updateCustomObjectDefinition * @summary: Update custom object definition - * @description: Custom object definitions can be updated using this endpoint. You can update the name and description of the custom object and add more custom field definitions to the existing custom object. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObjectDefinitionBySlug/). + * @description: Custom object definitions can be updated using this endpoint. You can update the name and description of the custom object and add more custom field definitions to the existing custom object. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObjectDefinition/). */ - async updateCustomObjectDefinitionBySlug( - { slug, body, requestHeaders } = { requestHeaders: {} }, + async updateCustomObjectDefinition( + { definitionId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformValidator.updateCustomObjectDefinitionBySlug().validate( + } = ContentPlatformValidator.updateCustomObjectDefinition().validate( { - slug, + definitionId, body, }, { abortEarly: false, allowUnknown: true } @@ -2140,9 +1953,9 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformValidator.updateCustomObjectDefinitionBySlug().validate( + } = ContentPlatformValidator.updateCustomObjectDefinition().validate( { - slug, + definitionId, body, }, { abortEarly: false, allowUnknown: false } @@ -2150,7 +1963,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > updateCustomObjectDefinitionBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > updateCustomObjectDefinition \n ${warrning}`, }); } @@ -2161,7 +1974,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/content/v2.0/company/${this.config.companyId}/customobjects/definition/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions/${definitionId}`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -2175,7 +1988,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CustomObjectDefinitionSlugSchema().validate( + } = ContentPlatformModel.CustomObjectDefinitionSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -2186,7 +1999,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > updateCustomObjectDefinitionBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > updateCustomObjectDefinition \n ${res_error}`, }); } } diff --git a/sdk/platform/Content/ContentPlatformModel.d.ts b/sdk/platform/Content/ContentPlatformModel.d.ts index 20d8dc555..d88296d53 100644 --- a/sdk/platform/Content/ContentPlatformModel.d.ts +++ b/sdk/platform/Content/ContentPlatformModel.d.ts @@ -1,9 +1,4 @@ export = ContentPlatformModel; -/** - * @typedef ValidationError - * @property {string} message - A brief description of the error encountered. - * @property {string} field - The field in the request that caused the error. - */ /** * @typedef GenerateSEOContent * @property {string} [text] @@ -161,7 +156,7 @@ export = ContentPlatformModel; * @property {string} [end] */ /** - * @typedef BlogGetDetails + * @typedef BlogGetResponse * @property {BlogSchema[]} [items] * @property {Page} [page] * @property {BlogFilters} [filters] @@ -246,7 +241,7 @@ export = ContentPlatformModel; * @property {string} [modified_on] */ /** - * @typedef BlogPayload + * @typedef BlogRequest * @property {string} [application] * @property {Object} [_custom_json] * @property {Author} [author] @@ -395,7 +390,7 @@ export = ContentPlatformModel; * @property {DataLoaderSchema[]} [items] */ /** - * @typedef TagDeleteSuccessDetails + * @typedef TagDeleteSuccessResponse * @property {boolean} [success] */ /** @@ -508,7 +503,7 @@ export = ContentPlatformModel; * @property {number} [size] - The number of items per page. */ /** - * @typedef LandingPageGetDetails + * @typedef LandingPageGetResponse * @property {LandingPageSchema[]} [items] * @property {Page} [page] */ @@ -525,11 +520,11 @@ export = ContentPlatformModel; * @property {Object} [_custom_json] */ /** - * @typedef DefaultNavigationDetails + * @typedef DefaultNavigationResponse * @property {NavigationSchema[]} [items] */ /** - * @typedef NavigationGetDetails + * @typedef NavigationGetResponse * @property {NavigationSchema[]} [items] * @property {Page} [page] */ @@ -553,7 +548,7 @@ export = ContentPlatformModel; * @property {NavigationReference[]} [navigation] */ /** - * @typedef NavigationPayload + * @typedef NavigationRequest * @property {string} [name] * @property {string} [slug] * @property {string[]} [platform] @@ -561,7 +556,7 @@ export = ContentPlatformModel; * @property {NavigationReference[]} [navigation] */ /** - * @typedef PageGetDetails + * @typedef PageGetResponse * @property {PageSchema[]} [items] * @property {Page} [page] */ @@ -612,7 +607,7 @@ export = ContentPlatformModel; * @property {string} [id] */ /** - * @typedef PagePayload + * @typedef PageRequest * @property {CronSchedule} [_schedule] * @property {string} [application] * @property {Author} [author] @@ -635,7 +630,7 @@ export = ContentPlatformModel; * @property {number} [duration] */ /** - * @typedef PagePublishPayload + * @typedef PagePublishRequest * @property {boolean} [publish] */ /** @@ -645,7 +640,7 @@ export = ContentPlatformModel; * @property {string} [application_id] */ /** - * @typedef SlideshowGetDetails + * @typedef SlideshowGetResponse * @property {SlideshowSchema[]} [items] * @property {Page} [page] */ @@ -663,7 +658,7 @@ export = ContentPlatformModel; * @property {Object} [_custom_json] */ /** - * @typedef SlideshowPayload + * @typedef SlideshowRequest * @property {string} [slug] * @property {string} [platform] * @property {ConfigurationSchema} [configuration] @@ -742,108 +737,93 @@ export = ContentPlatformModel; */ /** * @typedef FieldValidations - * @property {string} [name] - Name of validation - * @property {string} [type] - Type of validation + * @property {string} [name] + * @property {string} [type] * @property {Object} [value] */ /** * @typedef FieldDefinitionSchema - * @property {string} [id] - Unique system generated id - * @property {string} [resource] - Resource type to which custom field belongs - * @property {string} [name] - Name of custom field - * @property {string} [namespace] - Namespace of custom field - * @property {string} [slug] - Slug of custom field - * @property {string} [description] - Description of custom field definition - * @property {string} [type] - Data type of custom field - * @property {boolean} [multi_value] - Flag to denote whether custom field is - * multivalued or not - * @property {FieldValidations[]} [validations] - List of validations applied - * @property {string} [company_id] - Id of company - * @property {boolean} [required] - Whether the custom field is required or not - * @property {boolean} [is_deleted] - Whether the custom field is deleted or not - * @property {string} [type_name] - Type of type field - * @property {number} [invalid_fields_count] - Count of invalid fields after validation + * @property {string} [_id] + * @property {string} [creator] + * @property {string} [resource] + * @property {string} [name] + * @property {string} [namespace] + * @property {string} [key] + * @property {string} [description] + * @property {string} [type] + * @property {boolean} [multi_value] + * @property {FieldValidations[]} [validations] + * @property {string} [company_id] + * @property {string} [created_by] + * @property {string} [updated_by] + * @property {boolean} [required] + * @property {boolean} [is_deleted] + * @property {string} [created_at] + * @property {string} [updated_at] + * @property {string} [type_name] + * @property {number} [invalid_fields_count] */ /** * @typedef CustomFieldDefinitionsSchema - * @property {FieldDefinitionSchema[]} [items] - List of custom field definitions + * @property {FieldDefinitionSchema[]} [items] * @property {Page} [page] */ /** * @typedef CustomFieldDefinitionRequestSchema - * @property {string} [type] - Data type of custom field - * @property {string} [slug] - Slug of custom field definition - * @property {string} [namespace] - Namespace of custom field definition - * @property {boolean} [multi_value] - Flag to denote whether custom field is - * multi valued or not - * @property {string} [name] - Name of custom field definition - * @property {string} [description] - Description of a custom field definition - * @property {FieldValidations[]} [validations] - Validations for a custom field + * @property {string} [resource] + * @property {string} [type] + * @property {string} [key] + * @property {string} [namespace] + * @property {boolean} [multi_value] + * @property {string} [name] + * @property {string} [description] + * @property {FieldValidations[]} [validations] */ /** * @typedef CustomObjectCustomFieldDefinitions - * @property {string} [id] - Unique identifer for a custom field - * @property {string} [type] - Data type of custom field - * @property {string} [description] - Description of custom field - * @property {string} [name] - Name of custom field - * @property {boolean} [multi_value] - Flag to denote if cusom field is multi - * valued or not - * @property {boolean} [required] - Whether the field is required or not - * @property {string} [slug] - Slug of custom field definition - * @property {FieldValidations[]} [validations] - Validations added against the - * custom field + * @property {string} [id] + * @property {string} [type] + * @property {string} [description] + * @property {string} [name] + * @property {boolean} [multi_value] + * @property {boolean} [required] + * @property {string} [key] + * @property {FieldValidations[]} [validations] * @property {string} [action] */ /** * @typedef CustomObjectDefinitionUpdateRequestSchema - * @property {string} [description] - Description of custom object definiton - * @property {string} [name] - Name of custom object definition - * @property {string} [display_name_key] - Custom field slug which is used as a - * display key in + * @property {string} [type] + * @property {string} [description] + * @property {string} [name] + * @property {string} [display_name_key] * @property {CustomObjectCustomFieldDefinitions[]} [field_definitions] */ /** * @typedef CustomFieldDefinitionDetailResSchema - * @property {string} [resource] - Resource to which custom field is associated - * @property {string} [name] - Name of custom field - * @property {string} [namespace] - Namespace of custom field - * @property {string} [slug] - Slug of custom field - * @property {string} [description] - Description regarding custom field - * @property {string} [type] - Data type of custom field - * @property {boolean} [multi_value] - Flag to denote whether custom field is - * multi valued or not - * @property {string} [company_id] - Company Identifer - * @property {string} [application_id] - Sales channel identifier - * @property {boolean} [required] - Whether the customfield is required or not - * @property {boolean} [is_deleted] - Is custom field deleted - * @property {string} [id] - Unique system generated id - * @property {Object[]} [validations] - * @property {string} [created_at] - Date time at which field was created - * @property {string} [updated_at] - Date time at for a field's last modification - */ -/** - * @typedef MetaFieldDefinitionDetailResSchema - * @property {string} [resource] - Resource to which meta field is associated - * @property {string} [name] - Name of meta field - * @property {string} [namespace] - Namespace of meta field - * @property {string} [slug] - Slug of meta field - * @property {string} [description] - Description regarding meta field - * @property {string} [type] - Data type of meta field - * @property {boolean} [multi_value] - Flag to denote whether meta field is - * multi valued or not - * @property {string} [company_id] - Company Identifer - * @property {string} [application_id] - Sales channel identifier - * @property {boolean} [required] - Whether the field is required or not - * @property {boolean} [is_deleted] - Is meta field deleted - * @property {string} [id] - Unique system generated id + * @property {string} [creator] + * @property {string} [resource] + * @property {string} [name] + * @property {string} [namespace] + * @property {string} [key] + * @property {string} [description] + * @property {string} [type] + * @property {boolean} [multi_value] + * @property {string} [company_id] + * @property {string} [application_id] + * @property {string} [created_by] + * @property {string} [updated_by] + * @property {boolean} [required] + * @property {boolean} [is_deleted] + * @property {string} [_id] * @property {Object[]} [validations] - * @property {string} [created_at] - Date time at which field was created - * @property {string} [updated_at] - Date time at for a field's last modification + * @property {string} [created_at] + * @property {string} [updated_at] */ /** * @typedef CustomDataDeleteSchema - * @property {boolean} [success] - Denotes the success of the delete operation - * @property {string} [message] - Denotes the message of delete operation + * @property {boolean} [success] + * @property {string} [message] */ /** * @typedef CustomFieldValue @@ -851,31 +831,29 @@ export = ContentPlatformModel; */ /** * @typedef CustomFieldSchema - * @property {string} [id] - Unique system generated id - * @property {string} [namespace] - Namespace of custom field definition - * @property {string} [slug] - Slug of custom field definition - * @property {string} [resource] - The resource for which custom field is being created + * @property {string} [_id] + * @property {string} [namespace] + * @property {string} [key] + * @property {string} [resource] + * @property {string} [creator] * @property {CustomFieldValue[]} [value] - * @property {string} [resource_slug] - Unique identifier of the resource - * @property {string} [type] - Data type of custom field - * @property {boolean} [multi_value] - Whether custom field is multi valued - * @property {string} [company_id] - Identifer for a company + * @property {string} [resource_id] + * @property {string} [type] + * @property {boolean} [multi_value] + * @property {string} [company_id] + * @property {string} [definition_id] * @property {boolean} [has_invalid_values] * @property {Object[]} [invalid_value_errors] - * @property {boolean} [is_deleted] - Indicates whether custom field is deleted - * @property {string} [created_at] - Time at which customer field was created - * @property {string} [updated_at] - Time at which custom field was updated + * @property {string} [created_by] + * @property {boolean} [is_deleted] + * @property {string} [created_at] + * @property {string} [updated_at] */ /** * @typedef CustomFieldsResponseSchema * @property {CustomFieldSchema[]} [items] * @property {Page} [page] */ -/** - * @typedef CustomFieldsDeleteSchema - * @property {boolean} [success] - * @property {string} [message] - */ /** * @typedef CustomFieldsResponseByResourceIdSchema * @property {CustomFieldSchema[]} [items] @@ -883,9 +861,7 @@ export = ContentPlatformModel; /** * @typedef CustomField * @property {Object[]} [value] - * @property {string} [namespace] - This is the namespace to which custom field belongs - * @property {string} [slug] - This is the slug of custom field used while - * creating a custom field definition + * @property {string} [definition_id] */ /** * @typedef CustomFieldRequestSchema @@ -893,140 +869,146 @@ export = ContentPlatformModel; */ /** * @typedef CustomObjectSchema - * @property {string} [id] - Unique system generated id - * @property {string} [company_id] - Identifer for a company - * @property {string} [application_id] - Identifer for a sales channel - * @property {string} [status] - Status of custom object - * @property {string} [type] - Slug of custom object definition - * @property {string} [definition_slug] - Slug for custom object definition - * @property {string} [display_name] - Value of custom field used for displaying - * custom object - * @property {CustomFieldSchema[]} [fields] - Fields associated to the custom object + * @property {string} [_id] + * @property {string} [creator] + * @property {string} [company_id] + * @property {string} [application_id] + * @property {string} [created_by] + * @property {string} [updated_by] + * @property {string} [status] + * @property {string} [type] + * @property {string} [display_name] + * @property {string} [definition_id] + * @property {CustomFieldSchema[]} [fields] */ /** * @typedef CustomObjectDefinitionRequestSchema - * @property {string} [type] - Namespace/Slug of Custom object definition - * @property {string} [definition_slug] - Unique slug for a custom object definition - * @property {string} [description] - Description of custom object definition - * @property {string} [name] - Name of custom object - * @property {string} [display_name_key] - Denotes which custom field to be used - * for displaying custom object - * @property {CustomObjectCustomFieldDefinitions[]} [field_definitions] - List - * of custom field definitions belonging to this custom object definition - */ -/** - * @typedef CustomObjectDefinitionSlugSchema - * @property {string} [id] - Unique system generated custom object definition id - * @property {string} [name] - Display name of custom object definition - * @property {string} [type] - Type of custom object definiton - * @property {string} [definition_slug] - Slug of custom object definiton - * @property {string} [display_name_key] - Display name of custom object definition - * @property {string} [description] - Description of custom object definition - * @property {CustomFieldDefinitionDetailResSchema[]} [field_definitions] - - * Custom fields inside custom objects + * @property {string} [type] + * @property {string} [description] + * @property {string} [name] + * @property {string} [display_name_key] + * @property {CustomObjectCustomFieldDefinitions[]} [field_definitions] + */ +/** + * @typedef CustomObjectCustomFieldDefinitionResSchema + * @property {string} [creator] + * @property {string} [resource] + * @property {string} [name] + * @property {string} [namespace] + * @property {string} [key] + * @property {string} [description] + * @property {string} [type] + * @property {boolean} [multi_value] + * @property {FieldValidations[]} [validations] + * @property {string} [company_id] + * @property {string} [created_by] + * @property {string} [metaobject_definition_id] + * @property {boolean} [required] + * @property {boolean} [is_deleted] + * @property {string} [_id] + * @property {string} [created_at] + * @property {string} [updated_at] + */ +/** + * @typedef CustomObjectDefinitionSchema + * @property {string} [_id] + * @property {string} [name] + * @property {string} [type] + * @property {string} [display_name_key] + * @property {string} [description] + * @property {string} [creator] + * @property {string} [created_by] + * @property {string} [updated_by] + * @property {CustomObjectCustomFieldDefinitionResSchema[]} [field_definitions] */ /** * @typedef CustomObjectDefinitionDeleteResponseSchema - * @property {boolean} [success] - Success status of delete custom object definition. - * @property {string} [message] - Response message when custom object definition - * is deleted. + * @property {boolean} [success] + * @property {string} [message] */ /** - * @typedef CustomObjectEntryBulkUploadDetails - * @property {string} [url] - Signed url of csv - * @property {number} [total_records] - Total no of records in csv file + * @typedef CustomObjectEntryBulkUploadResponse + * @property {string} [url] + * @property {number} [total_records] */ /** - * @typedef CustomObjectListItemDefinitionModel - * @property {string} [id] - Unique system generated id - * @property {string} [name] - Name of custom object - * @property {string} [type] - Type of custom object entry + * @typedef CustomObjectListItemDefinationSchema + * @property {string} [_id] + * @property {string} [name] + * @property {string} [type] */ /** * @typedef CustomObjectListItemSchema - * @property {string} [id] - Unique system generated id - * @property {string} [status] - Status of custom object - * @property {string} [created_at] - Creation time of custom object document - * @property {string} [updated_at] - Updation time of custom object document - * @property {string} [display_name] - Display name of custom object - * @property {CustomObjectListItemDefinitionModel} [definition] - * @property {number} [references] - References of the custom object entry + * @property {string} [_id] + * @property {string} [definition_id] + * @property {string} [status] + * @property {string} [updated_at] + * @property {string} [display_name] + * @property {CustomObjectListItemDefinationSchema} [definition] + * @property {number} [references] */ /** * @typedef CustomObjectsSchema - * @property {CustomObjectListItemSchema[]} [items] - List of paginated custom - * object entries + * @property {CustomObjectListItemSchema[]} [items] * @property {Page} [page] */ /** - * @typedef CustomObjectFieldDefinition - * @property {string} [id] - Unique system generate id - * @property {string} [slug] - Slug of custom field definition - * @property {string} [namespace] - Namespace of custom field definition - * @property {Object[]} [value] - Value of custom field - * @property {string} [type] - Data type of the custom field + * @typedef CustomObjectFieldSchema + * @property {string} [_id] + * @property {string} [key] + * @property {Object[]} [value] + * @property {string} [type] + * @property {string} [definition_id] */ /** - * @typedef CustomObjectBySlugSchema - * @property {string} [id] - Unique system generated identifer for a Custom Object - * @property {string} [status] - Status of Custom Object - * @property {string} [display_name] - Display name for the Custom Object - * @property {CustomObjectListItemDefinitionModel} [definition] - * @property {Object[]} [references] - Places where the custom object has been - * used as a custom field - * @property {string} [slug] - Slug of custom object entry - * @property {string} [definition_slug] - Slug of custom object definition - * @property {CustomObjectFieldDefinition[]} [fields] - List of custom fields - * inside the custom object + * @typedef CustomObjectByIdSchema + * @property {string} [_id] + * @property {string} [status] + * @property {string} [display_name] + * @property {CustomObjectListItemDefinationSchema} [definition] + * @property {Object[]} [references] + * @property {CustomObjectFieldSchema[]} [fields] */ /** * @typedef CustomObjectBulkEntryInitiateDownload - * @property {string} [message] - Message for the user - * @property {string} [task_id] - Identifer for a task + * @property {string} [message] + * @property {string} [task_id] */ /** * @typedef CustomObjectMetaSchema - * @property {number} [mo_total_count] - Total number of entries in the bulk entry - * @property {number} [mo_success_count] - Number of entries which were successful - * @property {number} [mo_error_count] - Number of entries which were failed - * @property {string} [mo_defintion_type] - Type of object - */ -/** - * @typedef JobSchema - * @property {string} [id] - Unique system generated id - * @property {string[]} [jobs] - List of total jobs - * @property {string[]} [finished_jobs] - List of finished jobs - * @property {string[]} [error_jobs] - List of jobs which resulted in an error - * @property {string[]} [errors_occured] - List of errors occurred in the job - * @property {string} [company_id] - Company Identifer - * @property {string} [status] - Status of job - * @property {string} [action_type] - Type of job - * @property {string} [entity] - Entity against which job is running - * @property {string} [error_url] - URL which contains the file with errors - * @property {number} [finished_count] - Number of items successfully finished - * @property {number} [error_count] - Number of items in error - * @property {number} [success_count] - Number of successful items - * @property {number} [total_jobs] - Total number of jobs - * @property {CustomObjectMetaSchema} [meta] - * @property {string} [created_by] - Source from where the bulk job is created - * @property {string} [created_at] - Date/Time when the job was created - * @property {string} [updated_at] - Date/Time when the job was updated - * @property {string} [application_id] - Sales Channel Identifier + * @property {number} [mo_total_count] + * @property {number} [mo_success_count] + * @property {number} [mo_error_count] + * @property {string} [mo_defintion_type] */ /** - * @typedef CustomFieldBulkEntry - * @property {JobSchema[]} [items] - * @property {Page} [page] + * @typedef CustomObjectJobSchema + * @property {string} [_id] + * @property {string[]} [jobs] + * @property {string[]} [finished_jobs] + * @property {string[]} [error_jobs] + * @property {string[]} [errors_occured] + * @property {string} [company_id] + * @property {string} [creator] + * @property {string} [url] + * @property {string} [status] + * @property {string} [action_type] + * @property {string} [entity] + * @property {string} [error_url] + * @property {number} [finished_count] + * @property {number} [error_count] + * @property {number} [success_count] + * @property {number} [total_jobs] + * @property {CustomObjectMetaSchema} [meta] + * @property {string} [created_by] + * @property {string} [created_at] + * @property {string} [updated_at] */ /** * @typedef CustomObjectBulkEntry - * @property {JobSchema[]} [items] + * @property {CustomObjectJobSchema[]} [items] * @property {Page} [page] */ -/** - * @typedef MetafieldTypesSchema - * @property {CustomFieldTypeSchema} [metafield_types] - */ /** * @typedef CustomFieldTypeSchema * @property {StringSingleLine} [string_single_line] @@ -1042,8 +1024,6 @@ export = ContentPlatformModel; * @property {Url} [url] * @property {Metaobject} [metaobject] * @property {Product} [product] - * @property {HTML} [html] - * @property {Duration} [duration] */ /** * @typedef SupportedValidationsMetaExampleSchema @@ -1062,149 +1042,117 @@ export = ContentPlatformModel; * @property {boolean} [required] * @property {SupportedValidationsMetaSchema} [meta] */ -/** - * @typedef Duration - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Type of custom field - * @property {string} [category] - Category of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field - */ -/** - * @typedef HTML - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Type of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field - */ /** * @typedef StringSingleLine - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [category] - Category of custom field - * @property {string} [type] - Type of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [category] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef StringMultiLine - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [category] - Category of custom field - * @property {string} [type] - Type of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [category] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Dropdown - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [category] - Category of custom field - * @property {string} [type] - Category of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [category] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Integer - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Type of custom field - * @property {string} [category] - Category of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [type] + * @property {string} [category] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef FloatType - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Type of custom field - * @property {string} [category] - Category of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [type] + * @property {string} [category] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef BooleanType - * @property {string} [name] - Name data type of custom field - * @property {string} [category] - Category of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Category of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Date - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [category] - Category of custom field - * @property {string} [type] - Type of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [category] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Datetime - * @property {string} [name] - Name data type of custom field - * @property {string} [category] - Category of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Type of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Json - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [category] - Category of custom field - * @property {string} [type] - Type of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [category] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef File - * @property {string} [name] - Name data type of custom field - * @property {string} [category] - Category of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Type of custom field + * @property {string} [name] + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [type] * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Url - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Type of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Metaobject - * @property {string} [name] - Name of Custom Object - * @property {boolean} [list_enabled] - Whether the field is allowed to have - * multiple list items - * @property {string} [category] - Category of Custom Object Definition that - * Custom Object belongs to - * @property {string} [type] - Type of Custom Object Definition + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [category] + * @property {string} [type] * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Product - * @property {string} [name] - Name of Product - * @property {boolean} [list_enabled] - Whether the field is allowed to have - * multiple list items - * @property {string} [category] - Category of Custom Object Definition that - * Product is associated with - * @property {string} [type] - Custom Object Definition that Product is associated with + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [category] + * @property {string} [type] * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef CustomObjectEntry - * @property {string} [id] - Unique system generated id - * @property {string} [name] - Name of Custom Object definition - * @property {string} [type] - Type of Custom Object Definition - * @property {string} [updated_at] - Updation time of a Custom Object - * @property {number} [entries_count] - Number of entries against the Custom - * Object definition - * @property {number} [fields_count] - Number of fields against a Custom Object definition + * @property {string} [_id] + * @property {string} [name] + * @property {string} [type] + * @property {string} [updated_at] + * @property {number} [entries_count] + * @property {number} [fields_count] */ /** * @typedef CustomObjectDefinitionsSchema @@ -1213,29 +1161,19 @@ export = ContentPlatformModel; */ /** * @typedef CustomObjectEntryFieldSchema - * @property {string} [namespace] - This is namespace for a custom field definition - * @property {string} [slug] - This is slug for a custom field definition - */ -/** - * @typedef CustomObjectEntryFieldSchemaWithoutID - * @property {string} [slug] - Custom fields belonging to a custom object - * @property {Object} [value] - Value of custom field inside a custom object + * @property {string} [definition_id] + * @property {Object[]} [value] */ /** * @typedef CustomObjectRequestSchema - * @property {string} [status] - Flag to denote status of Custom Object - * @property {string} [slug] - This is slug for a custom field definition - * @property {CustomObjectEntryFieldSchema[]} [fields] - List of custom fields - */ -/** - * @typedef CustomObjectRequestSchemaWithoutId - * @property {string} [status] - Status of the custom object entry. - * @property {CustomObjectEntryFieldSchemaWithoutID[]} [fields] - List of custom fields + * @property {string} [status] + * @property {string} [definition_id] + * @property {CustomObjectEntryFieldSchema[]} [fields] */ /** * @typedef CustomObjectBulkSchema - * @property {string} [url] - Full URL for the bulk operations data - * @property {number} [total_records] - Total records in the upload. + * @property {string} [url] + * @property {number} [total_records] */ /** * @typedef ActionPage @@ -1298,20 +1236,8 @@ export = ContentPlatformModel; declare class ContentPlatformModel { } declare namespace ContentPlatformModel { - export { ValidationError, GenerateSEOContent, GeneratedSEOContent, ApplicationLegal, ApplicationLegalFAQ, PathMappingSchema, PathSourceSchema, SeoComponent, SeoSchema, CustomMetaTag, Detail, SeoSchemaComponent, SEOSchemaMarkupTemplate, SEOSchemaMarkupTemplateRequestBody, AnnouncementPageSchema, EditorMeta, AnnouncementAuthorSchema, AdminAnnouncementSchema, DefaultSchemaComponent, DefaultSEOSchemaMarkupTemplate, ScheduleSchema, NextSchedule, BlogGetDetails, BlogFilters, ResourceContent, Asset, Author, BlogSchema, SEO, SEOImage, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, DateMeta, BlogPayload, GetAnnouncementListSchema, CreateAnnouncementSchema, DataLoaderResponseSchema, DataLoaderResetResponseSchema, LocaleLanguage, Language, Action, NavigationReference, CronBasedScheduleSchema, ConfigurationSchema, SlideshowMedia, UpdateHandpickedSchema, HandpickedTagSchema, RemoveHandpickedSchema, CreateTagSchema, CreateTagRequestSchema, DataLoaderSchema, DataLoaderSourceSchema, DataLoadersSchema, TagDeleteSuccessDetails, ContentAPIError, CommonError, CategorySchema, ChildrenSchema, CategoryRequestSchema, FAQCategorySchema, FaqSchema, FAQ, CreateFaqResponseSchema, CreateFaqSchema, GetFaqSchema, UpdateFaqCategoryRequestSchema, CreateFaqCategoryRequestSchema, CreateFaqCategorySchema, GetFaqCategoriesSchema, GetFaqCategoryBySlugSchema, Page, LandingPageGetDetails, LandingPageSchema, DefaultNavigationDetails, NavigationGetDetails, Orientation, NavigationSchema, NavigationPayload, PageGetDetails, PageSpec, PageSpecParam, PageSpecItem, PageSchema, CreatedBySchema, PagePayload, CronSchedule, PagePublishPayload, PageMetaSchema, SlideshowGetDetails, SlideshowSchema, SlideshowPayload, Support, PhoneProperties, PhoneSchema, EmailProperties, EmailSchema, ContactSchema, TagsSchema, TagSchema, TagSourceSchema, ResourcesSchema, ResourceSchema, FieldValidations, FieldDefinitionSchema, CustomFieldDefinitionsSchema, CustomFieldDefinitionRequestSchema, CustomObjectCustomFieldDefinitions, CustomObjectDefinitionUpdateRequestSchema, CustomFieldDefinitionDetailResSchema, MetaFieldDefinitionDetailResSchema, CustomDataDeleteSchema, CustomFieldValue, CustomFieldSchema, CustomFieldsResponseSchema, CustomFieldsDeleteSchema, CustomFieldsResponseByResourceIdSchema, CustomField, CustomFieldRequestSchema, CustomObjectSchema, CustomObjectDefinitionRequestSchema, CustomObjectDefinitionSlugSchema, CustomObjectDefinitionDeleteResponseSchema, CustomObjectEntryBulkUploadDetails, CustomObjectListItemDefinitionModel, CustomObjectListItemSchema, CustomObjectsSchema, CustomObjectFieldDefinition, CustomObjectBySlugSchema, CustomObjectBulkEntryInitiateDownload, CustomObjectMetaSchema, JobSchema, CustomFieldBulkEntry, CustomObjectBulkEntry, MetafieldTypesSchema, CustomFieldTypeSchema, SupportedValidationsMetaExampleSchema, SupportedValidationsMetaSchema, SupportedValidationsSchema, Duration, HTML, StringSingleLine, StringMultiLine, Dropdown, Integer, FloatType, BooleanType, Date, Datetime, Json, File, Url, Metaobject, Product, CustomObjectEntry, CustomObjectDefinitionsSchema, CustomObjectEntryFieldSchema, CustomObjectEntryFieldSchemaWithoutID, CustomObjectRequestSchema, CustomObjectRequestSchemaWithoutId, CustomObjectBulkSchema, ActionPage, GenerationEntityType, PageType }; + export { GenerateSEOContent, GeneratedSEOContent, ApplicationLegal, ApplicationLegalFAQ, PathMappingSchema, PathSourceSchema, SeoComponent, SeoSchema, CustomMetaTag, Detail, SeoSchemaComponent, SEOSchemaMarkupTemplate, SEOSchemaMarkupTemplateRequestBody, AnnouncementPageSchema, EditorMeta, AnnouncementAuthorSchema, AdminAnnouncementSchema, DefaultSchemaComponent, DefaultSEOSchemaMarkupTemplate, ScheduleSchema, NextSchedule, BlogGetResponse, BlogFilters, ResourceContent, Asset, Author, BlogSchema, SEO, SEOImage, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, DateMeta, BlogRequest, GetAnnouncementListSchema, CreateAnnouncementSchema, DataLoaderResponseSchema, DataLoaderResetResponseSchema, LocaleLanguage, Language, Action, NavigationReference, CronBasedScheduleSchema, ConfigurationSchema, SlideshowMedia, UpdateHandpickedSchema, HandpickedTagSchema, RemoveHandpickedSchema, CreateTagSchema, CreateTagRequestSchema, DataLoaderSchema, DataLoaderSourceSchema, DataLoadersSchema, TagDeleteSuccessResponse, ContentAPIError, CommonError, CategorySchema, ChildrenSchema, CategoryRequestSchema, FAQCategorySchema, FaqSchema, FAQ, CreateFaqResponseSchema, CreateFaqSchema, GetFaqSchema, UpdateFaqCategoryRequestSchema, CreateFaqCategoryRequestSchema, CreateFaqCategorySchema, GetFaqCategoriesSchema, GetFaqCategoryBySlugSchema, Page, LandingPageGetResponse, LandingPageSchema, DefaultNavigationResponse, NavigationGetResponse, Orientation, NavigationSchema, NavigationRequest, PageGetResponse, PageSpec, PageSpecParam, PageSpecItem, PageSchema, CreatedBySchema, PageRequest, CronSchedule, PagePublishRequest, PageMetaSchema, SlideshowGetResponse, SlideshowSchema, SlideshowRequest, Support, PhoneProperties, PhoneSchema, EmailProperties, EmailSchema, ContactSchema, TagsSchema, TagSchema, TagSourceSchema, ResourcesSchema, ResourceSchema, FieldValidations, FieldDefinitionSchema, CustomFieldDefinitionsSchema, CustomFieldDefinitionRequestSchema, CustomObjectCustomFieldDefinitions, CustomObjectDefinitionUpdateRequestSchema, CustomFieldDefinitionDetailResSchema, CustomDataDeleteSchema, CustomFieldValue, CustomFieldSchema, CustomFieldsResponseSchema, CustomFieldsResponseByResourceIdSchema, CustomField, CustomFieldRequestSchema, CustomObjectSchema, CustomObjectDefinitionRequestSchema, CustomObjectCustomFieldDefinitionResSchema, CustomObjectDefinitionSchema, CustomObjectDefinitionDeleteResponseSchema, CustomObjectEntryBulkUploadResponse, CustomObjectListItemDefinationSchema, CustomObjectListItemSchema, CustomObjectsSchema, CustomObjectFieldSchema, CustomObjectByIdSchema, CustomObjectBulkEntryInitiateDownload, CustomObjectMetaSchema, CustomObjectJobSchema, CustomObjectBulkEntry, CustomFieldTypeSchema, SupportedValidationsMetaExampleSchema, SupportedValidationsMetaSchema, SupportedValidationsSchema, StringSingleLine, StringMultiLine, Dropdown, Integer, FloatType, BooleanType, Date, Datetime, Json, File, Url, Metaobject, Product, CustomObjectEntry, CustomObjectDefinitionsSchema, CustomObjectEntryFieldSchema, CustomObjectRequestSchema, CustomObjectBulkSchema, ActionPage, GenerationEntityType, PageType }; } -/** @returns {ValidationError} */ -declare function ValidationError(): ValidationError; -type ValidationError = { - /** - * - A brief description of the error encountered. - */ - message: string; - /** - * - The field in the request that caused the error. - */ - field: string; -}; /** @returns {GenerateSEOContent} */ declare function GenerateSEOContent(): GenerateSEOContent; type GenerateSEOContent = { @@ -1489,9 +1415,9 @@ type NextSchedule = { start?: string; end?: string; }; -/** @returns {BlogGetDetails} */ -declare function BlogGetDetails(): BlogGetDetails; -type BlogGetDetails = { +/** @returns {BlogGetResponse} */ +declare function BlogGetResponse(): BlogGetResponse; +type BlogGetResponse = { items?: BlogSchema[]; page?: Page; filters?: BlogFilters; @@ -1587,9 +1513,9 @@ type DateMeta = { created_on?: string; modified_on?: string; }; -/** @returns {BlogPayload} */ -declare function BlogPayload(): BlogPayload; -type BlogPayload = { +/** @returns {BlogRequest} */ +declare function BlogRequest(): BlogRequest; +type BlogRequest = { application?: string; _custom_json?: any; author?: Author; @@ -1759,9 +1685,9 @@ declare function DataLoadersSchema(): DataLoadersSchema; type DataLoadersSchema = { items?: DataLoaderSchema[]; }; -/** @returns {TagDeleteSuccessDetails} */ -declare function TagDeleteSuccessDetails(): TagDeleteSuccessDetails; -type TagDeleteSuccessDetails = { +/** @returns {TagDeleteSuccessResponse} */ +declare function TagDeleteSuccessResponse(): TagDeleteSuccessResponse; +type TagDeleteSuccessResponse = { success?: boolean; }; /** @returns {ContentAPIError} */ @@ -1911,9 +1837,9 @@ type Page = { */ size?: number; }; -/** @returns {LandingPageGetDetails} */ -declare function LandingPageGetDetails(): LandingPageGetDetails; -type LandingPageGetDetails = { +/** @returns {LandingPageGetResponse} */ +declare function LandingPageGetResponse(): LandingPageGetResponse; +type LandingPageGetResponse = { items?: LandingPageSchema[]; page?: Page; }; @@ -1930,14 +1856,14 @@ type LandingPageSchema = { archived?: boolean; _custom_json?: any; }; -/** @returns {DefaultNavigationDetails} */ -declare function DefaultNavigationDetails(): DefaultNavigationDetails; -type DefaultNavigationDetails = { +/** @returns {DefaultNavigationResponse} */ +declare function DefaultNavigationResponse(): DefaultNavigationResponse; +type DefaultNavigationResponse = { items?: NavigationSchema[]; }; -/** @returns {NavigationGetDetails} */ -declare function NavigationGetDetails(): NavigationGetDetails; -type NavigationGetDetails = { +/** @returns {NavigationGetResponse} */ +declare function NavigationGetResponse(): NavigationGetResponse; +type NavigationGetResponse = { items?: NavigationSchema[]; page?: Page; }; @@ -1962,18 +1888,18 @@ type NavigationSchema = { version?: number; navigation?: NavigationReference[]; }; -/** @returns {NavigationPayload} */ -declare function NavigationPayload(): NavigationPayload; -type NavigationPayload = { +/** @returns {NavigationRequest} */ +declare function NavigationRequest(): NavigationRequest; +type NavigationRequest = { name?: string; slug?: string; platform?: string[]; orientation?: Orientation; navigation?: NavigationReference[]; }; -/** @returns {PageGetDetails} */ -declare function PageGetDetails(): PageGetDetails; -type PageGetDetails = { +/** @returns {PageGetResponse} */ +declare function PageGetResponse(): PageGetResponse; +type PageGetResponse = { items?: PageSchema[]; page?: Page; }; @@ -2031,9 +1957,9 @@ declare function CreatedBySchema(): CreatedBySchema; type CreatedBySchema = { id?: string; }; -/** @returns {PagePayload} */ -declare function PagePayload(): PagePayload; -type PagePayload = { +/** @returns {PageRequest} */ +declare function PageRequest(): PageRequest; +type PageRequest = { _schedule?: CronSchedule; application?: string; author?: Author; @@ -2056,9 +1982,9 @@ type CronSchedule = { end?: string; duration?: number; }; -/** @returns {PagePublishPayload} */ -declare function PagePublishPayload(): PagePublishPayload; -type PagePublishPayload = { +/** @returns {PagePublishRequest} */ +declare function PagePublishRequest(): PagePublishRequest; +type PagePublishRequest = { publish?: boolean; }; /** @returns {PageMetaSchema} */ @@ -2068,9 +1994,9 @@ type PageMetaSchema = { custom_pages?: PageSchema[]; application_id?: string; }; -/** @returns {SlideshowGetDetails} */ -declare function SlideshowGetDetails(): SlideshowGetDetails; -type SlideshowGetDetails = { +/** @returns {SlideshowGetResponse} */ +declare function SlideshowGetResponse(): SlideshowGetResponse; +type SlideshowGetResponse = { items?: SlideshowSchema[]; page?: Page; }; @@ -2088,9 +2014,9 @@ type SlideshowSchema = { archived?: boolean; _custom_json?: any; }; -/** @returns {SlideshowPayload} */ -declare function SlideshowPayload(): SlideshowPayload; -type SlideshowPayload = { +/** @returns {SlideshowRequest} */ +declare function SlideshowRequest(): SlideshowRequest; +type SlideshowRequest = { slug?: string; platform?: string; configuration?: ConfigurationSchema; @@ -2190,310 +2116,99 @@ type ResourceSchema = { /** @returns {FieldValidations} */ declare function FieldValidations(): FieldValidations; type FieldValidations = { - /** - * - Name of validation - */ name?: string; - /** - * - Type of validation - */ type?: string; value?: any; }; /** @returns {FieldDefinitionSchema} */ declare function FieldDefinitionSchema(): FieldDefinitionSchema; type FieldDefinitionSchema = { - /** - * - Unique system generated id - */ - id?: string; - /** - * - Resource type to which custom field belongs - */ + _id?: string; + creator?: string; resource?: string; - /** - * - Name of custom field - */ name?: string; - /** - * - Namespace of custom field - */ namespace?: string; - /** - * - Slug of custom field - */ - slug?: string; - /** - * - Description of custom field definition - */ + key?: string; description?: string; - /** - * - Data type of custom field - */ type?: string; - /** - * - Flag to denote whether custom field is - * multivalued or not - */ multi_value?: boolean; - /** - * - List of validations applied - */ validations?: FieldValidations[]; - /** - * - Id of company - */ company_id?: string; - /** - * - Whether the custom field is required or not - */ + created_by?: string; + updated_by?: string; required?: boolean; - /** - * - Whether the custom field is deleted or not - */ is_deleted?: boolean; - /** - * - Type of type field - */ + created_at?: string; + updated_at?: string; type_name?: string; - /** - * - Count of invalid fields after validation - */ invalid_fields_count?: number; }; /** @returns {CustomFieldDefinitionsSchema} */ declare function CustomFieldDefinitionsSchema(): CustomFieldDefinitionsSchema; type CustomFieldDefinitionsSchema = { - /** - * - List of custom field definitions - */ items?: FieldDefinitionSchema[]; page?: Page; }; /** @returns {CustomFieldDefinitionRequestSchema} */ declare function CustomFieldDefinitionRequestSchema(): CustomFieldDefinitionRequestSchema; type CustomFieldDefinitionRequestSchema = { - /** - * - Data type of custom field - */ + resource?: string; type?: string; - /** - * - Slug of custom field definition - */ - slug?: string; - /** - * - Namespace of custom field definition - */ + key?: string; namespace?: string; - /** - * - Flag to denote whether custom field is - * multi valued or not - */ multi_value?: boolean; - /** - * - Name of custom field definition - */ name?: string; - /** - * - Description of a custom field definition - */ description?: string; - /** - * - Validations for a custom field - */ validations?: FieldValidations[]; }; /** @returns {CustomObjectCustomFieldDefinitions} */ declare function CustomObjectCustomFieldDefinitions(): CustomObjectCustomFieldDefinitions; type CustomObjectCustomFieldDefinitions = { - /** - * - Unique identifer for a custom field - */ id?: string; - /** - * - Data type of custom field - */ type?: string; - /** - * - Description of custom field - */ description?: string; - /** - * - Name of custom field - */ name?: string; - /** - * - Flag to denote if cusom field is multi - * valued or not - */ multi_value?: boolean; - /** - * - Whether the field is required or not - */ required?: boolean; - /** - * - Slug of custom field definition - */ - slug?: string; - /** - * - Validations added against the - * custom field - */ + key?: string; validations?: FieldValidations[]; action?: string; }; /** @returns {CustomObjectDefinitionUpdateRequestSchema} */ declare function CustomObjectDefinitionUpdateRequestSchema(): CustomObjectDefinitionUpdateRequestSchema; type CustomObjectDefinitionUpdateRequestSchema = { - /** - * - Description of custom object definiton - */ + type?: string; description?: string; - /** - * - Name of custom object definition - */ name?: string; - /** - * - Custom field slug which is used as a - * display key in - */ display_name_key?: string; field_definitions?: CustomObjectCustomFieldDefinitions[]; }; /** @returns {CustomFieldDefinitionDetailResSchema} */ declare function CustomFieldDefinitionDetailResSchema(): CustomFieldDefinitionDetailResSchema; type CustomFieldDefinitionDetailResSchema = { - /** - * - Resource to which custom field is associated - */ + creator?: string; resource?: string; - /** - * - Name of custom field - */ name?: string; - /** - * - Namespace of custom field - */ namespace?: string; - /** - * - Slug of custom field - */ - slug?: string; - /** - * - Description regarding custom field - */ + key?: string; description?: string; - /** - * - Data type of custom field - */ type?: string; - /** - * - Flag to denote whether custom field is - * multi valued or not - */ multi_value?: boolean; - /** - * - Company Identifer - */ company_id?: string; - /** - * - Sales channel identifier - */ application_id?: string; - /** - * - Whether the customfield is required or not - */ - required?: boolean; - /** - * - Is custom field deleted - */ - is_deleted?: boolean; - /** - * - Unique system generated id - */ - id?: string; - validations?: any[]; - /** - * - Date time at which field was created - */ - created_at?: string; - /** - * - Date time at for a field's last modification - */ - updated_at?: string; -}; -/** @returns {MetaFieldDefinitionDetailResSchema} */ -declare function MetaFieldDefinitionDetailResSchema(): MetaFieldDefinitionDetailResSchema; -type MetaFieldDefinitionDetailResSchema = { - /** - * - Resource to which meta field is associated - */ - resource?: string; - /** - * - Name of meta field - */ - name?: string; - /** - * - Namespace of meta field - */ - namespace?: string; - /** - * - Slug of meta field - */ - slug?: string; - /** - * - Description regarding meta field - */ - description?: string; - /** - * - Data type of meta field - */ - type?: string; - /** - * - Flag to denote whether meta field is - * multi valued or not - */ - multi_value?: boolean; - /** - * - Company Identifer - */ - company_id?: string; - /** - * - Sales channel identifier - */ - application_id?: string; - /** - * - Whether the field is required or not - */ + created_by?: string; + updated_by?: string; required?: boolean; - /** - * - Is meta field deleted - */ is_deleted?: boolean; - /** - * - Unique system generated id - */ - id?: string; + _id?: string; validations?: any[]; - /** - * - Date time at which field was created - */ created_at?: string; - /** - * - Date time at for a field's last modification - */ updated_at?: string; }; /** @returns {CustomDataDeleteSchema} */ declare function CustomDataDeleteSchema(): CustomDataDeleteSchema; type CustomDataDeleteSchema = { - /** - * - Denotes the success of the delete operation - */ success?: boolean; - /** - * - Denotes the message of delete operation - */ message?: string; }; /** @returns {CustomFieldValue} */ @@ -2504,52 +2219,22 @@ type CustomFieldValue = { /** @returns {CustomFieldSchema} */ declare function CustomFieldSchema(): CustomFieldSchema; type CustomFieldSchema = { - /** - * - Unique system generated id - */ - id?: string; - /** - * - Namespace of custom field definition - */ + _id?: string; namespace?: string; - /** - * - Slug of custom field definition - */ - slug?: string; - /** - * - The resource for which custom field is being created - */ + key?: string; resource?: string; + creator?: string; value?: CustomFieldValue[]; - /** - * - Unique identifier of the resource - */ - resource_slug?: string; - /** - * - Data type of custom field - */ + resource_id?: string; type?: string; - /** - * - Whether custom field is multi valued - */ multi_value?: boolean; - /** - * - Identifer for a company - */ company_id?: string; + definition_id?: string; has_invalid_values?: boolean; invalid_value_errors?: any[]; - /** - * - Indicates whether custom field is deleted - */ + created_by?: string; is_deleted?: boolean; - /** - * - Time at which customer field was created - */ created_at?: string; - /** - * - Time at which custom field was updated - */ updated_at?: string; }; /** @returns {CustomFieldsResponseSchema} */ @@ -2558,12 +2243,6 @@ type CustomFieldsResponseSchema = { items?: CustomFieldSchema[]; page?: Page; }; -/** @returns {CustomFieldsDeleteSchema} */ -declare function CustomFieldsDeleteSchema(): CustomFieldsDeleteSchema; -type CustomFieldsDeleteSchema = { - success?: boolean; - message?: string; -}; /** @returns {CustomFieldsResponseByResourceIdSchema} */ declare function CustomFieldsResponseByResourceIdSchema(): CustomFieldsResponseByResourceIdSchema; type CustomFieldsResponseByResourceIdSchema = { @@ -2573,15 +2252,7 @@ type CustomFieldsResponseByResourceIdSchema = { declare function CustomField(): CustomField; type CustomField = { value?: any[]; - /** - * - This is the namespace to which custom field belongs - */ - namespace?: string; - /** - * - This is the slug of custom field used while - * creating a custom field definition - */ - slug?: string; + definition_id?: string; }; /** @returns {CustomFieldRequestSchema} */ declare function CustomFieldRequestSchema(): CustomFieldRequestSchema; @@ -2591,368 +2262,160 @@ type CustomFieldRequestSchema = { /** @returns {CustomObjectSchema} */ declare function CustomObjectSchema(): CustomObjectSchema; type CustomObjectSchema = { - /** - * - Unique system generated id - */ - id?: string; - /** - * - Identifer for a company - */ + _id?: string; + creator?: string; company_id?: string; - /** - * - Identifer for a sales channel - */ application_id?: string; - /** - * - Status of custom object - */ + created_by?: string; + updated_by?: string; status?: string; - /** - * - Slug of custom object definition - */ type?: string; - /** - * - Slug for custom object definition - */ - definition_slug?: string; - /** - * - Value of custom field used for displaying - * custom object - */ display_name?: string; - /** - * - Fields associated to the custom object - */ + definition_id?: string; fields?: CustomFieldSchema[]; }; /** @returns {CustomObjectDefinitionRequestSchema} */ declare function CustomObjectDefinitionRequestSchema(): CustomObjectDefinitionRequestSchema; type CustomObjectDefinitionRequestSchema = { - /** - * - Namespace/Slug of Custom object definition - */ type?: string; - /** - * - Unique slug for a custom object definition - */ - definition_slug?: string; - /** - * - Description of custom object definition - */ description?: string; - /** - * - Name of custom object - */ name?: string; - /** - * - Denotes which custom field to be used - * for displaying custom object - */ display_name_key?: string; - /** - * - List - * of custom field definitions belonging to this custom object definition - */ field_definitions?: CustomObjectCustomFieldDefinitions[]; }; -/** @returns {CustomObjectDefinitionSlugSchema} */ -declare function CustomObjectDefinitionSlugSchema(): CustomObjectDefinitionSlugSchema; -type CustomObjectDefinitionSlugSchema = { - /** - * - Unique system generated custom object definition id - */ - id?: string; - /** - * - Display name of custom object definition - */ +/** @returns {CustomObjectCustomFieldDefinitionResSchema} */ +declare function CustomObjectCustomFieldDefinitionResSchema(): CustomObjectCustomFieldDefinitionResSchema; +type CustomObjectCustomFieldDefinitionResSchema = { + creator?: string; + resource?: string; + name?: string; + namespace?: string; + key?: string; + description?: string; + type?: string; + multi_value?: boolean; + validations?: FieldValidations[]; + company_id?: string; + created_by?: string; + metaobject_definition_id?: string; + required?: boolean; + is_deleted?: boolean; + _id?: string; + created_at?: string; + updated_at?: string; +}; +/** @returns {CustomObjectDefinitionSchema} */ +declare function CustomObjectDefinitionSchema(): CustomObjectDefinitionSchema; +type CustomObjectDefinitionSchema = { + _id?: string; name?: string; - /** - * - Type of custom object definiton - */ type?: string; - /** - * - Slug of custom object definiton - */ - definition_slug?: string; - /** - * - Display name of custom object definition - */ display_name_key?: string; - /** - * - Description of custom object definition - */ description?: string; - /** - * - - * Custom fields inside custom objects - */ - field_definitions?: CustomFieldDefinitionDetailResSchema[]; + creator?: string; + created_by?: string; + updated_by?: string; + field_definitions?: CustomObjectCustomFieldDefinitionResSchema[]; }; /** @returns {CustomObjectDefinitionDeleteResponseSchema} */ declare function CustomObjectDefinitionDeleteResponseSchema(): CustomObjectDefinitionDeleteResponseSchema; type CustomObjectDefinitionDeleteResponseSchema = { - /** - * - Success status of delete custom object definition. - */ success?: boolean; - /** - * - Response message when custom object definition - * is deleted. - */ message?: string; }; -/** @returns {CustomObjectEntryBulkUploadDetails} */ -declare function CustomObjectEntryBulkUploadDetails(): CustomObjectEntryBulkUploadDetails; -type CustomObjectEntryBulkUploadDetails = { - /** - * - Signed url of csv - */ +/** @returns {CustomObjectEntryBulkUploadResponse} */ +declare function CustomObjectEntryBulkUploadResponse(): CustomObjectEntryBulkUploadResponse; +type CustomObjectEntryBulkUploadResponse = { url?: string; - /** - * - Total no of records in csv file - */ total_records?: number; }; -/** @returns {CustomObjectListItemDefinitionModel} */ -declare function CustomObjectListItemDefinitionModel(): CustomObjectListItemDefinitionModel; -type CustomObjectListItemDefinitionModel = { - /** - * - Unique system generated id - */ - id?: string; - /** - * - Name of custom object - */ +/** @returns {CustomObjectListItemDefinationSchema} */ +declare function CustomObjectListItemDefinationSchema(): CustomObjectListItemDefinationSchema; +type CustomObjectListItemDefinationSchema = { + _id?: string; name?: string; - /** - * - Type of custom object entry - */ type?: string; }; /** @returns {CustomObjectListItemSchema} */ declare function CustomObjectListItemSchema(): CustomObjectListItemSchema; type CustomObjectListItemSchema = { - /** - * - Unique system generated id - */ - id?: string; - /** - * - Status of custom object - */ + _id?: string; + definition_id?: string; status?: string; - /** - * - Creation time of custom object document - */ - created_at?: string; - /** - * - Updation time of custom object document - */ updated_at?: string; - /** - * - Display name of custom object - */ display_name?: string; - definition?: CustomObjectListItemDefinitionModel; - /** - * - References of the custom object entry - */ + definition?: CustomObjectListItemDefinationSchema; references?: number; }; /** @returns {CustomObjectsSchema} */ declare function CustomObjectsSchema(): CustomObjectsSchema; type CustomObjectsSchema = { - /** - * - List of paginated custom - * object entries - */ items?: CustomObjectListItemSchema[]; page?: Page; }; -/** @returns {CustomObjectFieldDefinition} */ -declare function CustomObjectFieldDefinition(): CustomObjectFieldDefinition; -type CustomObjectFieldDefinition = { - /** - * - Unique system generate id - */ - id?: string; - /** - * - Slug of custom field definition - */ - slug?: string; - /** - * - Namespace of custom field definition - */ - namespace?: string; - /** - * - Value of custom field - */ +/** @returns {CustomObjectFieldSchema} */ +declare function CustomObjectFieldSchema(): CustomObjectFieldSchema; +type CustomObjectFieldSchema = { + _id?: string; + key?: string; value?: any[]; - /** - * - Data type of the custom field - */ type?: string; + definition_id?: string; }; -/** @returns {CustomObjectBySlugSchema} */ -declare function CustomObjectBySlugSchema(): CustomObjectBySlugSchema; -type CustomObjectBySlugSchema = { - /** - * - Unique system generated identifer for a Custom Object - */ - id?: string; - /** - * - Status of Custom Object - */ +/** @returns {CustomObjectByIdSchema} */ +declare function CustomObjectByIdSchema(): CustomObjectByIdSchema; +type CustomObjectByIdSchema = { + _id?: string; status?: string; - /** - * - Display name for the Custom Object - */ display_name?: string; - definition?: CustomObjectListItemDefinitionModel; - /** - * - Places where the custom object has been - * used as a custom field - */ + definition?: CustomObjectListItemDefinationSchema; references?: any[]; - /** - * - Slug of custom object entry - */ - slug?: string; - /** - * - Slug of custom object definition - */ - definition_slug?: string; - /** - * - List of custom fields - * inside the custom object - */ - fields?: CustomObjectFieldDefinition[]; + fields?: CustomObjectFieldSchema[]; }; /** @returns {CustomObjectBulkEntryInitiateDownload} */ declare function CustomObjectBulkEntryInitiateDownload(): CustomObjectBulkEntryInitiateDownload; type CustomObjectBulkEntryInitiateDownload = { - /** - * - Message for the user - */ message?: string; - /** - * - Identifer for a task - */ task_id?: string; }; /** @returns {CustomObjectMetaSchema} */ declare function CustomObjectMetaSchema(): CustomObjectMetaSchema; type CustomObjectMetaSchema = { - /** - * - Total number of entries in the bulk entry - */ mo_total_count?: number; - /** - * - Number of entries which were successful - */ mo_success_count?: number; - /** - * - Number of entries which were failed - */ mo_error_count?: number; - /** - * - Type of object - */ mo_defintion_type?: string; }; -/** @returns {JobSchema} */ -declare function JobSchema(): JobSchema; -type JobSchema = { - /** - * - Unique system generated id - */ - id?: string; - /** - * - List of total jobs - */ +/** @returns {CustomObjectJobSchema} */ +declare function CustomObjectJobSchema(): CustomObjectJobSchema; +type CustomObjectJobSchema = { + _id?: string; jobs?: string[]; - /** - * - List of finished jobs - */ finished_jobs?: string[]; - /** - * - List of jobs which resulted in an error - */ error_jobs?: string[]; - /** - * - List of errors occurred in the job - */ errors_occured?: string[]; - /** - * - Company Identifer - */ company_id?: string; - /** - * - Status of job - */ + creator?: string; + url?: string; status?: string; - /** - * - Type of job - */ action_type?: string; - /** - * - Entity against which job is running - */ entity?: string; - /** - * - URL which contains the file with errors - */ error_url?: string; - /** - * - Number of items successfully finished - */ finished_count?: number; - /** - * - Number of items in error - */ error_count?: number; - /** - * - Number of successful items - */ success_count?: number; - /** - * - Total number of jobs - */ total_jobs?: number; meta?: CustomObjectMetaSchema; - /** - * - Source from where the bulk job is created - */ created_by?: string; - /** - * - Date/Time when the job was created - */ created_at?: string; - /** - * - Date/Time when the job was updated - */ updated_at?: string; - /** - * - Sales Channel Identifier - */ - application_id?: string; -}; -/** @returns {CustomFieldBulkEntry} */ -declare function CustomFieldBulkEntry(): CustomFieldBulkEntry; -type CustomFieldBulkEntry = { - items?: JobSchema[]; - page?: Page; }; /** @returns {CustomObjectBulkEntry} */ declare function CustomObjectBulkEntry(): CustomObjectBulkEntry; type CustomObjectBulkEntry = { - items?: JobSchema[]; + items?: CustomObjectJobSchema[]; page?: Page; }; -/** @returns {MetafieldTypesSchema} */ -declare function MetafieldTypesSchema(): MetafieldTypesSchema; -type MetafieldTypesSchema = { - metafield_types?: CustomFieldTypeSchema; -}; /** @returns {CustomFieldTypeSchema} */ declare function CustomFieldTypeSchema(): CustomFieldTypeSchema; type CustomFieldTypeSchema = { @@ -2969,8 +2432,6 @@ type CustomFieldTypeSchema = { url?: Url; metaobject?: Metaobject; product?: Product; - html?: HTML; - duration?: Duration; }; /** @returns {SupportedValidationsMetaExampleSchema} */ declare function SupportedValidationsMetaExampleSchema(): SupportedValidationsMetaExampleSchema; @@ -2992,392 +2453,130 @@ type SupportedValidationsSchema = { required?: boolean; meta?: SupportedValidationsMetaSchema; }; -/** @returns {Duration} */ -declare function Duration(): Duration; -type Duration = { - /** - * - Name data type of custom field - */ - name?: string; - /** - * - Flag for listing enabled or not - */ - list_enabled?: boolean; - /** - * - Type of custom field - */ - type?: string; - /** - * - Category of custom field - */ - category?: string; - /** - * - List of - * validations available for the field - */ - supported_validations?: SupportedValidationsSchema[]; -}; -/** @returns {HTML} */ -declare function HTML(): HTML; -type HTML = { - /** - * - Name data type of custom field - */ - name?: string; - /** - * - Flag for listing enabled or not - */ - list_enabled?: boolean; - /** - * - Type of custom field - */ - type?: string; - /** - * - List of - * validations available for the field - */ - supported_validations?: SupportedValidationsSchema[]; -}; /** @returns {StringSingleLine} */ declare function StringSingleLine(): StringSingleLine; type StringSingleLine = { - /** - * - Name data type of custom field - */ name?: string; - /** - * - Flag for listing enabled or not - */ list_enabled?: boolean; - /** - * - Category of custom field - */ category?: string; - /** - * - Type of custom field - */ type?: string; - /** - * - List of - * validations available for the field - */ supported_validations?: SupportedValidationsSchema[]; }; /** @returns {StringMultiLine} */ declare function StringMultiLine(): StringMultiLine; type StringMultiLine = { - /** - * - Name data type of custom field - */ name?: string; - /** - * - Flag for listing enabled or not - */ list_enabled?: boolean; - /** - * - Category of custom field - */ category?: string; - /** - * - Type of custom field - */ type?: string; - /** - * - List of - * validations available for the field - */ supported_validations?: SupportedValidationsSchema[]; }; /** @returns {Dropdown} */ declare function Dropdown(): Dropdown; type Dropdown = { - /** - * - Name data type of custom field - */ name?: string; - /** - * - Flag for listing enabled or not - */ list_enabled?: boolean; - /** - * - Category of custom field - */ category?: string; - /** - * - Category of custom field - */ type?: string; - /** - * - List of - * validations available for the field - */ supported_validations?: SupportedValidationsSchema[]; }; /** @returns {Integer} */ declare function Integer(): Integer; type Integer = { - /** - * - Name data type of custom field - */ name?: string; - /** - * - Flag for listing enabled or not - */ list_enabled?: boolean; - /** - * - Type of custom field - */ type?: string; - /** - * - Category of custom field - */ category?: string; - /** - * - List of - * validations available for the field - */ supported_validations?: SupportedValidationsSchema[]; }; /** @returns {FloatType} */ declare function FloatType(): FloatType; type FloatType = { - /** - * - Name data type of custom field - */ name?: string; - /** - * - Flag for listing enabled or not - */ list_enabled?: boolean; - /** - * - Type of custom field - */ type?: string; - /** - * - Category of custom field - */ category?: string; - /** - * - List of - * validations available for the field - */ supported_validations?: SupportedValidationsSchema[]; }; /** @returns {BooleanType} */ declare function BooleanType(): BooleanType; type BooleanType = { - /** - * - Name data type of custom field - */ name?: string; - /** - * - Category of custom field - */ category?: string; - /** - * - Flag for listing enabled or not - */ list_enabled?: boolean; - /** - * - Category of custom field - */ type?: string; - /** - * - List of - * validations available for the field - */ supported_validations?: SupportedValidationsSchema[]; }; /** @returns {Date} */ declare function Date(): Date; type Date = { - /** - * - Name data type of custom field - */ name?: string; - /** - * - Flag for listing enabled or not - */ list_enabled?: boolean; - /** - * - Category of custom field - */ category?: string; - /** - * - Type of custom field - */ type?: string; - /** - * - List of - * validations available for the field - */ supported_validations?: SupportedValidationsSchema[]; }; /** @returns {Datetime} */ declare function Datetime(): Datetime; type Datetime = { - /** - * - Name data type of custom field - */ name?: string; - /** - * - Category of custom field - */ category?: string; - /** - * - Flag for listing enabled or not - */ list_enabled?: boolean; - /** - * - Type of custom field - */ type?: string; - /** - * - List of - * validations available for the field - */ supported_validations?: SupportedValidationsSchema[]; }; /** @returns {Json} */ declare function Json(): Json; type Json = { - /** - * - Name data type of custom field - */ name?: string; - /** - * - Flag for listing enabled or not - */ list_enabled?: boolean; - /** - * - Category of custom field - */ category?: string; - /** - * - Type of custom field - */ type?: string; - /** - * - List of - * validations available for the field - */ supported_validations?: SupportedValidationsSchema[]; }; /** @returns {File} */ declare function File(): File; type File = { - /** - * - Name data type of custom field - */ name?: string; - /** - * - Category of custom field - */ category?: string; - /** - * - Flag for listing enabled or not - */ list_enabled?: boolean; - /** - * - Type of custom field - */ type?: string; supported_validations?: SupportedValidationsSchema[]; }; /** @returns {Url} */ declare function Url(): Url; type Url = { - /** - * - Name data type of custom field - */ name?: string; - /** - * - Flag for listing enabled or not - */ list_enabled?: boolean; - /** - * - Type of custom field - */ type?: string; - /** - * - List of - * validations available for the field - */ supported_validations?: SupportedValidationsSchema[]; }; /** @returns {Metaobject} */ declare function Metaobject(): Metaobject; type Metaobject = { - /** - * - Name of Custom Object - */ name?: string; - /** - * - Whether the field is allowed to have - * multiple list items - */ list_enabled?: boolean; - /** - * - Category of Custom Object Definition that - * Custom Object belongs to - */ category?: string; - /** - * - Type of Custom Object Definition - */ type?: string; supported_validations?: SupportedValidationsSchema[]; }; /** @returns {Product} */ declare function Product(): Product; type Product = { - /** - * - Name of Product - */ name?: string; - /** - * - Whether the field is allowed to have - * multiple list items - */ list_enabled?: boolean; - /** - * - Category of Custom Object Definition that - * Product is associated with - */ category?: string; - /** - * - Custom Object Definition that Product is associated with - */ type?: string; supported_validations?: SupportedValidationsSchema[]; }; /** @returns {CustomObjectEntry} */ declare function CustomObjectEntry(): CustomObjectEntry; type CustomObjectEntry = { - /** - * - Unique system generated id - */ - id?: string; - /** - * - Name of Custom Object definition - */ + _id?: string; name?: string; - /** - * - Type of Custom Object Definition - */ type?: string; - /** - * - Updation time of a Custom Object - */ updated_at?: string; - /** - * - Number of entries against the Custom - * Object definition - */ entries_count?: number; - /** - * - Number of fields against a Custom Object definition - */ fields_count?: number; }; /** @returns {CustomObjectDefinitionsSchema} */ @@ -3389,65 +2588,20 @@ type CustomObjectDefinitionsSchema = { /** @returns {CustomObjectEntryFieldSchema} */ declare function CustomObjectEntryFieldSchema(): CustomObjectEntryFieldSchema; type CustomObjectEntryFieldSchema = { - /** - * - This is namespace for a custom field definition - */ - namespace?: string; - /** - * - This is slug for a custom field definition - */ - slug?: string; -}; -/** @returns {CustomObjectEntryFieldSchemaWithoutID} */ -declare function CustomObjectEntryFieldSchemaWithoutID(): CustomObjectEntryFieldSchemaWithoutID; -type CustomObjectEntryFieldSchemaWithoutID = { - /** - * - Custom fields belonging to a custom object - */ - slug?: string; - /** - * - Value of custom field inside a custom object - */ - value?: any; + definition_id?: string; + value?: any[]; }; /** @returns {CustomObjectRequestSchema} */ declare function CustomObjectRequestSchema(): CustomObjectRequestSchema; type CustomObjectRequestSchema = { - /** - * - Flag to denote status of Custom Object - */ status?: string; - /** - * - This is slug for a custom field definition - */ - slug?: string; - /** - * - List of custom fields - */ + definition_id?: string; fields?: CustomObjectEntryFieldSchema[]; }; -/** @returns {CustomObjectRequestSchemaWithoutId} */ -declare function CustomObjectRequestSchemaWithoutId(): CustomObjectRequestSchemaWithoutId; -type CustomObjectRequestSchemaWithoutId = { - /** - * - Status of the custom object entry. - */ - status?: string; - /** - * - List of custom fields - */ - fields?: CustomObjectEntryFieldSchemaWithoutID[]; -}; /** @returns {CustomObjectBulkSchema} */ declare function CustomObjectBulkSchema(): CustomObjectBulkSchema; type CustomObjectBulkSchema = { - /** - * - Full URL for the bulk operations data - */ url?: string; - /** - * - Total records in the upload. - */ total_records?: number; }; /** @returns {ActionPage} */ diff --git a/sdk/platform/Content/ContentPlatformModel.js b/sdk/platform/Content/ContentPlatformModel.js index 7b3b576ed..9c4463e7c 100644 --- a/sdk/platform/Content/ContentPlatformModel.js +++ b/sdk/platform/Content/ContentPlatformModel.js @@ -1,11 +1,5 @@ const Joi = require("joi"); -/** - * @typedef ValidationError - * @property {string} message - A brief description of the error encountered. - * @property {string} field - The field in the request that caused the error. - */ - /** * @typedef GenerateSEOContent * @property {string} [text] @@ -184,7 +178,7 @@ const Joi = require("joi"); */ /** - * @typedef BlogGetDetails + * @typedef BlogGetResponse * @property {BlogSchema[]} [items] * @property {Page} [page] * @property {BlogFilters} [filters] @@ -282,7 +276,7 @@ const Joi = require("joi"); */ /** - * @typedef BlogPayload + * @typedef BlogRequest * @property {string} [application] * @property {Object} [_custom_json] * @property {Author} [author] @@ -451,7 +445,7 @@ const Joi = require("joi"); */ /** - * @typedef TagDeleteSuccessDetails + * @typedef TagDeleteSuccessResponse * @property {boolean} [success] */ @@ -582,7 +576,7 @@ const Joi = require("joi"); */ /** - * @typedef LandingPageGetDetails + * @typedef LandingPageGetResponse * @property {LandingPageSchema[]} [items] * @property {Page} [page] */ @@ -601,12 +595,12 @@ const Joi = require("joi"); */ /** - * @typedef DefaultNavigationDetails + * @typedef DefaultNavigationResponse * @property {NavigationSchema[]} [items] */ /** - * @typedef NavigationGetDetails + * @typedef NavigationGetResponse * @property {NavigationSchema[]} [items] * @property {Page} [page] */ @@ -633,7 +627,7 @@ const Joi = require("joi"); */ /** - * @typedef NavigationPayload + * @typedef NavigationRequest * @property {string} [name] * @property {string} [slug] * @property {string[]} [platform] @@ -642,7 +636,7 @@ const Joi = require("joi"); */ /** - * @typedef PageGetDetails + * @typedef PageGetResponse * @property {PageSchema[]} [items] * @property {Page} [page] */ @@ -699,7 +693,7 @@ const Joi = require("joi"); */ /** - * @typedef PagePayload + * @typedef PageRequest * @property {CronSchedule} [_schedule] * @property {string} [application] * @property {Author} [author] @@ -724,7 +718,7 @@ const Joi = require("joi"); */ /** - * @typedef PagePublishPayload + * @typedef PagePublishRequest * @property {boolean} [publish] */ @@ -736,7 +730,7 @@ const Joi = require("joi"); */ /** - * @typedef SlideshowGetDetails + * @typedef SlideshowGetResponse * @property {SlideshowSchema[]} [items] * @property {Page} [page] */ @@ -756,7 +750,7 @@ const Joi = require("joi"); */ /** - * @typedef SlideshowPayload + * @typedef SlideshowRequest * @property {string} [slug] * @property {string} [platform] * @property {ConfigurationSchema} [configuration] @@ -847,116 +841,100 @@ const Joi = require("joi"); /** * @typedef FieldValidations - * @property {string} [name] - Name of validation - * @property {string} [type] - Type of validation + * @property {string} [name] + * @property {string} [type] * @property {Object} [value] */ /** * @typedef FieldDefinitionSchema - * @property {string} [id] - Unique system generated id - * @property {string} [resource] - Resource type to which custom field belongs - * @property {string} [name] - Name of custom field - * @property {string} [namespace] - Namespace of custom field - * @property {string} [slug] - Slug of custom field - * @property {string} [description] - Description of custom field definition - * @property {string} [type] - Data type of custom field - * @property {boolean} [multi_value] - Flag to denote whether custom field is - * multivalued or not - * @property {FieldValidations[]} [validations] - List of validations applied - * @property {string} [company_id] - Id of company - * @property {boolean} [required] - Whether the custom field is required or not - * @property {boolean} [is_deleted] - Whether the custom field is deleted or not - * @property {string} [type_name] - Type of type field - * @property {number} [invalid_fields_count] - Count of invalid fields after validation + * @property {string} [_id] + * @property {string} [creator] + * @property {string} [resource] + * @property {string} [name] + * @property {string} [namespace] + * @property {string} [key] + * @property {string} [description] + * @property {string} [type] + * @property {boolean} [multi_value] + * @property {FieldValidations[]} [validations] + * @property {string} [company_id] + * @property {string} [created_by] + * @property {string} [updated_by] + * @property {boolean} [required] + * @property {boolean} [is_deleted] + * @property {string} [created_at] + * @property {string} [updated_at] + * @property {string} [type_name] + * @property {number} [invalid_fields_count] */ /** * @typedef CustomFieldDefinitionsSchema - * @property {FieldDefinitionSchema[]} [items] - List of custom field definitions + * @property {FieldDefinitionSchema[]} [items] * @property {Page} [page] */ /** * @typedef CustomFieldDefinitionRequestSchema - * @property {string} [type] - Data type of custom field - * @property {string} [slug] - Slug of custom field definition - * @property {string} [namespace] - Namespace of custom field definition - * @property {boolean} [multi_value] - Flag to denote whether custom field is - * multi valued or not - * @property {string} [name] - Name of custom field definition - * @property {string} [description] - Description of a custom field definition - * @property {FieldValidations[]} [validations] - Validations for a custom field + * @property {string} [resource] + * @property {string} [type] + * @property {string} [key] + * @property {string} [namespace] + * @property {boolean} [multi_value] + * @property {string} [name] + * @property {string} [description] + * @property {FieldValidations[]} [validations] */ /** * @typedef CustomObjectCustomFieldDefinitions - * @property {string} [id] - Unique identifer for a custom field - * @property {string} [type] - Data type of custom field - * @property {string} [description] - Description of custom field - * @property {string} [name] - Name of custom field - * @property {boolean} [multi_value] - Flag to denote if cusom field is multi - * valued or not - * @property {boolean} [required] - Whether the field is required or not - * @property {string} [slug] - Slug of custom field definition - * @property {FieldValidations[]} [validations] - Validations added against the - * custom field + * @property {string} [id] + * @property {string} [type] + * @property {string} [description] + * @property {string} [name] + * @property {boolean} [multi_value] + * @property {boolean} [required] + * @property {string} [key] + * @property {FieldValidations[]} [validations] * @property {string} [action] */ /** * @typedef CustomObjectDefinitionUpdateRequestSchema - * @property {string} [description] - Description of custom object definiton - * @property {string} [name] - Name of custom object definition - * @property {string} [display_name_key] - Custom field slug which is used as a - * display key in + * @property {string} [type] + * @property {string} [description] + * @property {string} [name] + * @property {string} [display_name_key] * @property {CustomObjectCustomFieldDefinitions[]} [field_definitions] */ /** * @typedef CustomFieldDefinitionDetailResSchema - * @property {string} [resource] - Resource to which custom field is associated - * @property {string} [name] - Name of custom field - * @property {string} [namespace] - Namespace of custom field - * @property {string} [slug] - Slug of custom field - * @property {string} [description] - Description regarding custom field - * @property {string} [type] - Data type of custom field - * @property {boolean} [multi_value] - Flag to denote whether custom field is - * multi valued or not - * @property {string} [company_id] - Company Identifer - * @property {string} [application_id] - Sales channel identifier - * @property {boolean} [required] - Whether the customfield is required or not - * @property {boolean} [is_deleted] - Is custom field deleted - * @property {string} [id] - Unique system generated id - * @property {Object[]} [validations] - * @property {string} [created_at] - Date time at which field was created - * @property {string} [updated_at] - Date time at for a field's last modification - */ - -/** - * @typedef MetaFieldDefinitionDetailResSchema - * @property {string} [resource] - Resource to which meta field is associated - * @property {string} [name] - Name of meta field - * @property {string} [namespace] - Namespace of meta field - * @property {string} [slug] - Slug of meta field - * @property {string} [description] - Description regarding meta field - * @property {string} [type] - Data type of meta field - * @property {boolean} [multi_value] - Flag to denote whether meta field is - * multi valued or not - * @property {string} [company_id] - Company Identifer - * @property {string} [application_id] - Sales channel identifier - * @property {boolean} [required] - Whether the field is required or not - * @property {boolean} [is_deleted] - Is meta field deleted - * @property {string} [id] - Unique system generated id + * @property {string} [creator] + * @property {string} [resource] + * @property {string} [name] + * @property {string} [namespace] + * @property {string} [key] + * @property {string} [description] + * @property {string} [type] + * @property {boolean} [multi_value] + * @property {string} [company_id] + * @property {string} [application_id] + * @property {string} [created_by] + * @property {string} [updated_by] + * @property {boolean} [required] + * @property {boolean} [is_deleted] + * @property {string} [_id] * @property {Object[]} [validations] - * @property {string} [created_at] - Date time at which field was created - * @property {string} [updated_at] - Date time at for a field's last modification + * @property {string} [created_at] + * @property {string} [updated_at] */ /** * @typedef CustomDataDeleteSchema - * @property {boolean} [success] - Denotes the success of the delete operation - * @property {string} [message] - Denotes the message of delete operation + * @property {boolean} [success] + * @property {string} [message] */ /** @@ -966,20 +944,23 @@ const Joi = require("joi"); /** * @typedef CustomFieldSchema - * @property {string} [id] - Unique system generated id - * @property {string} [namespace] - Namespace of custom field definition - * @property {string} [slug] - Slug of custom field definition - * @property {string} [resource] - The resource for which custom field is being created + * @property {string} [_id] + * @property {string} [namespace] + * @property {string} [key] + * @property {string} [resource] + * @property {string} [creator] * @property {CustomFieldValue[]} [value] - * @property {string} [resource_slug] - Unique identifier of the resource - * @property {string} [type] - Data type of custom field - * @property {boolean} [multi_value] - Whether custom field is multi valued - * @property {string} [company_id] - Identifer for a company + * @property {string} [resource_id] + * @property {string} [type] + * @property {boolean} [multi_value] + * @property {string} [company_id] + * @property {string} [definition_id] * @property {boolean} [has_invalid_values] * @property {Object[]} [invalid_value_errors] - * @property {boolean} [is_deleted] - Indicates whether custom field is deleted - * @property {string} [created_at] - Time at which customer field was created - * @property {string} [updated_at] - Time at which custom field was updated + * @property {string} [created_by] + * @property {boolean} [is_deleted] + * @property {string} [created_at] + * @property {string} [updated_at] */ /** @@ -988,12 +969,6 @@ const Joi = require("joi"); * @property {Page} [page] */ -/** - * @typedef CustomFieldsDeleteSchema - * @property {boolean} [success] - * @property {string} [message] - */ - /** * @typedef CustomFieldsResponseByResourceIdSchema * @property {CustomFieldSchema[]} [items] @@ -1002,9 +977,7 @@ const Joi = require("joi"); /** * @typedef CustomField * @property {Object[]} [value] - * @property {string} [namespace] - This is the namespace to which custom field belongs - * @property {string} [slug] - This is the slug of custom field used while - * creating a custom field definition + * @property {string} [definition_id] */ /** @@ -1014,156 +987,161 @@ const Joi = require("joi"); /** * @typedef CustomObjectSchema - * @property {string} [id] - Unique system generated id - * @property {string} [company_id] - Identifer for a company - * @property {string} [application_id] - Identifer for a sales channel - * @property {string} [status] - Status of custom object - * @property {string} [type] - Slug of custom object definition - * @property {string} [definition_slug] - Slug for custom object definition - * @property {string} [display_name] - Value of custom field used for displaying - * custom object - * @property {CustomFieldSchema[]} [fields] - Fields associated to the custom object + * @property {string} [_id] + * @property {string} [creator] + * @property {string} [company_id] + * @property {string} [application_id] + * @property {string} [created_by] + * @property {string} [updated_by] + * @property {string} [status] + * @property {string} [type] + * @property {string} [display_name] + * @property {string} [definition_id] + * @property {CustomFieldSchema[]} [fields] */ /** * @typedef CustomObjectDefinitionRequestSchema - * @property {string} [type] - Namespace/Slug of Custom object definition - * @property {string} [definition_slug] - Unique slug for a custom object definition - * @property {string} [description] - Description of custom object definition - * @property {string} [name] - Name of custom object - * @property {string} [display_name_key] - Denotes which custom field to be used - * for displaying custom object - * @property {CustomObjectCustomFieldDefinitions[]} [field_definitions] - List - * of custom field definitions belonging to this custom object definition + * @property {string} [type] + * @property {string} [description] + * @property {string} [name] + * @property {string} [display_name_key] + * @property {CustomObjectCustomFieldDefinitions[]} [field_definitions] */ /** - * @typedef CustomObjectDefinitionSlugSchema - * @property {string} [id] - Unique system generated custom object definition id - * @property {string} [name] - Display name of custom object definition - * @property {string} [type] - Type of custom object definiton - * @property {string} [definition_slug] - Slug of custom object definiton - * @property {string} [display_name_key] - Display name of custom object definition - * @property {string} [description] - Description of custom object definition - * @property {CustomFieldDefinitionDetailResSchema[]} [field_definitions] - - * Custom fields inside custom objects + * @typedef CustomObjectCustomFieldDefinitionResSchema + * @property {string} [creator] + * @property {string} [resource] + * @property {string} [name] + * @property {string} [namespace] + * @property {string} [key] + * @property {string} [description] + * @property {string} [type] + * @property {boolean} [multi_value] + * @property {FieldValidations[]} [validations] + * @property {string} [company_id] + * @property {string} [created_by] + * @property {string} [metaobject_definition_id] + * @property {boolean} [required] + * @property {boolean} [is_deleted] + * @property {string} [_id] + * @property {string} [created_at] + * @property {string} [updated_at] + */ + +/** + * @typedef CustomObjectDefinitionSchema + * @property {string} [_id] + * @property {string} [name] + * @property {string} [type] + * @property {string} [display_name_key] + * @property {string} [description] + * @property {string} [creator] + * @property {string} [created_by] + * @property {string} [updated_by] + * @property {CustomObjectCustomFieldDefinitionResSchema[]} [field_definitions] */ /** * @typedef CustomObjectDefinitionDeleteResponseSchema - * @property {boolean} [success] - Success status of delete custom object definition. - * @property {string} [message] - Response message when custom object definition - * is deleted. + * @property {boolean} [success] + * @property {string} [message] */ /** - * @typedef CustomObjectEntryBulkUploadDetails - * @property {string} [url] - Signed url of csv - * @property {number} [total_records] - Total no of records in csv file + * @typedef CustomObjectEntryBulkUploadResponse + * @property {string} [url] + * @property {number} [total_records] */ /** - * @typedef CustomObjectListItemDefinitionModel - * @property {string} [id] - Unique system generated id - * @property {string} [name] - Name of custom object - * @property {string} [type] - Type of custom object entry + * @typedef CustomObjectListItemDefinationSchema + * @property {string} [_id] + * @property {string} [name] + * @property {string} [type] */ /** * @typedef CustomObjectListItemSchema - * @property {string} [id] - Unique system generated id - * @property {string} [status] - Status of custom object - * @property {string} [created_at] - Creation time of custom object document - * @property {string} [updated_at] - Updation time of custom object document - * @property {string} [display_name] - Display name of custom object - * @property {CustomObjectListItemDefinitionModel} [definition] - * @property {number} [references] - References of the custom object entry + * @property {string} [_id] + * @property {string} [definition_id] + * @property {string} [status] + * @property {string} [updated_at] + * @property {string} [display_name] + * @property {CustomObjectListItemDefinationSchema} [definition] + * @property {number} [references] */ /** * @typedef CustomObjectsSchema - * @property {CustomObjectListItemSchema[]} [items] - List of paginated custom - * object entries + * @property {CustomObjectListItemSchema[]} [items] * @property {Page} [page] */ /** - * @typedef CustomObjectFieldDefinition - * @property {string} [id] - Unique system generate id - * @property {string} [slug] - Slug of custom field definition - * @property {string} [namespace] - Namespace of custom field definition - * @property {Object[]} [value] - Value of custom field - * @property {string} [type] - Data type of the custom field + * @typedef CustomObjectFieldSchema + * @property {string} [_id] + * @property {string} [key] + * @property {Object[]} [value] + * @property {string} [type] + * @property {string} [definition_id] */ /** - * @typedef CustomObjectBySlugSchema - * @property {string} [id] - Unique system generated identifer for a Custom Object - * @property {string} [status] - Status of Custom Object - * @property {string} [display_name] - Display name for the Custom Object - * @property {CustomObjectListItemDefinitionModel} [definition] - * @property {Object[]} [references] - Places where the custom object has been - * used as a custom field - * @property {string} [slug] - Slug of custom object entry - * @property {string} [definition_slug] - Slug of custom object definition - * @property {CustomObjectFieldDefinition[]} [fields] - List of custom fields - * inside the custom object + * @typedef CustomObjectByIdSchema + * @property {string} [_id] + * @property {string} [status] + * @property {string} [display_name] + * @property {CustomObjectListItemDefinationSchema} [definition] + * @property {Object[]} [references] + * @property {CustomObjectFieldSchema[]} [fields] */ /** * @typedef CustomObjectBulkEntryInitiateDownload - * @property {string} [message] - Message for the user - * @property {string} [task_id] - Identifer for a task + * @property {string} [message] + * @property {string} [task_id] */ /** * @typedef CustomObjectMetaSchema - * @property {number} [mo_total_count] - Total number of entries in the bulk entry - * @property {number} [mo_success_count] - Number of entries which were successful - * @property {number} [mo_error_count] - Number of entries which were failed - * @property {string} [mo_defintion_type] - Type of object - */ - -/** - * @typedef JobSchema - * @property {string} [id] - Unique system generated id - * @property {string[]} [jobs] - List of total jobs - * @property {string[]} [finished_jobs] - List of finished jobs - * @property {string[]} [error_jobs] - List of jobs which resulted in an error - * @property {string[]} [errors_occured] - List of errors occurred in the job - * @property {string} [company_id] - Company Identifer - * @property {string} [status] - Status of job - * @property {string} [action_type] - Type of job - * @property {string} [entity] - Entity against which job is running - * @property {string} [error_url] - URL which contains the file with errors - * @property {number} [finished_count] - Number of items successfully finished - * @property {number} [error_count] - Number of items in error - * @property {number} [success_count] - Number of successful items - * @property {number} [total_jobs] - Total number of jobs - * @property {CustomObjectMetaSchema} [meta] - * @property {string} [created_by] - Source from where the bulk job is created - * @property {string} [created_at] - Date/Time when the job was created - * @property {string} [updated_at] - Date/Time when the job was updated - * @property {string} [application_id] - Sales Channel Identifier + * @property {number} [mo_total_count] + * @property {number} [mo_success_count] + * @property {number} [mo_error_count] + * @property {string} [mo_defintion_type] */ /** - * @typedef CustomFieldBulkEntry - * @property {JobSchema[]} [items] - * @property {Page} [page] + * @typedef CustomObjectJobSchema + * @property {string} [_id] + * @property {string[]} [jobs] + * @property {string[]} [finished_jobs] + * @property {string[]} [error_jobs] + * @property {string[]} [errors_occured] + * @property {string} [company_id] + * @property {string} [creator] + * @property {string} [url] + * @property {string} [status] + * @property {string} [action_type] + * @property {string} [entity] + * @property {string} [error_url] + * @property {number} [finished_count] + * @property {number} [error_count] + * @property {number} [success_count] + * @property {number} [total_jobs] + * @property {CustomObjectMetaSchema} [meta] + * @property {string} [created_by] + * @property {string} [created_at] + * @property {string} [updated_at] */ /** * @typedef CustomObjectBulkEntry - * @property {JobSchema[]} [items] + * @property {CustomObjectJobSchema[]} [items] * @property {Page} [page] */ -/** - * @typedef MetafieldTypesSchema - * @property {CustomFieldTypeSchema} [metafield_types] - */ - /** * @typedef CustomFieldTypeSchema * @property {StringSingleLine} [string_single_line] @@ -1179,8 +1157,6 @@ const Joi = require("joi"); * @property {Url} [url] * @property {Metaobject} [metaobject] * @property {Product} [product] - * @property {HTML} [html] - * @property {Duration} [duration] */ /** @@ -1203,164 +1179,130 @@ const Joi = require("joi"); * @property {SupportedValidationsMetaSchema} [meta] */ -/** - * @typedef Duration - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Type of custom field - * @property {string} [category] - Category of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field - */ - -/** - * @typedef HTML - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Type of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field - */ - /** * @typedef StringSingleLine - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [category] - Category of custom field - * @property {string} [type] - Type of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [category] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef StringMultiLine - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [category] - Category of custom field - * @property {string} [type] - Type of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [category] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Dropdown - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [category] - Category of custom field - * @property {string} [type] - Category of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [category] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Integer - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Type of custom field - * @property {string} [category] - Category of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [type] + * @property {string} [category] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef FloatType - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Type of custom field - * @property {string} [category] - Category of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [type] + * @property {string} [category] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef BooleanType - * @property {string} [name] - Name data type of custom field - * @property {string} [category] - Category of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Category of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Date - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [category] - Category of custom field - * @property {string} [type] - Type of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [category] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Datetime - * @property {string} [name] - Name data type of custom field - * @property {string} [category] - Category of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Type of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Json - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [category] - Category of custom field - * @property {string} [type] - Type of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [category] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef File - * @property {string} [name] - Name data type of custom field - * @property {string} [category] - Category of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Type of custom field + * @property {string} [name] + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [type] * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Url - * @property {string} [name] - Name data type of custom field - * @property {boolean} [list_enabled] - Flag for listing enabled or not - * @property {string} [type] - Type of custom field - * @property {SupportedValidationsSchema[]} [supported_validations] - List of - * validations available for the field + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [type] + * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Metaobject - * @property {string} [name] - Name of Custom Object - * @property {boolean} [list_enabled] - Whether the field is allowed to have - * multiple list items - * @property {string} [category] - Category of Custom Object Definition that - * Custom Object belongs to - * @property {string} [type] - Type of Custom Object Definition + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [category] + * @property {string} [type] * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef Product - * @property {string} [name] - Name of Product - * @property {boolean} [list_enabled] - Whether the field is allowed to have - * multiple list items - * @property {string} [category] - Category of Custom Object Definition that - * Product is associated with - * @property {string} [type] - Custom Object Definition that Product is associated with + * @property {string} [name] + * @property {boolean} [list_enabled] + * @property {string} [category] + * @property {string} [type] * @property {SupportedValidationsSchema[]} [supported_validations] */ /** * @typedef CustomObjectEntry - * @property {string} [id] - Unique system generated id - * @property {string} [name] - Name of Custom Object definition - * @property {string} [type] - Type of Custom Object Definition - * @property {string} [updated_at] - Updation time of a Custom Object - * @property {number} [entries_count] - Number of entries against the Custom - * Object definition - * @property {number} [fields_count] - Number of fields against a Custom Object definition + * @property {string} [_id] + * @property {string} [name] + * @property {string} [type] + * @property {string} [updated_at] + * @property {number} [entries_count] + * @property {number} [fields_count] */ /** @@ -1371,33 +1313,21 @@ const Joi = require("joi"); /** * @typedef CustomObjectEntryFieldSchema - * @property {string} [namespace] - This is namespace for a custom field definition - * @property {string} [slug] - This is slug for a custom field definition - */ - -/** - * @typedef CustomObjectEntryFieldSchemaWithoutID - * @property {string} [slug] - Custom fields belonging to a custom object - * @property {Object} [value] - Value of custom field inside a custom object + * @property {string} [definition_id] + * @property {Object[]} [value] */ /** * @typedef CustomObjectRequestSchema - * @property {string} [status] - Flag to denote status of Custom Object - * @property {string} [slug] - This is slug for a custom field definition - * @property {CustomObjectEntryFieldSchema[]} [fields] - List of custom fields - */ - -/** - * @typedef CustomObjectRequestSchemaWithoutId - * @property {string} [status] - Status of the custom object entry. - * @property {CustomObjectEntryFieldSchemaWithoutID[]} [fields] - List of custom fields + * @property {string} [status] + * @property {string} [definition_id] + * @property {CustomObjectEntryFieldSchema[]} [fields] */ /** * @typedef CustomObjectBulkSchema - * @property {string} [url] - Full URL for the bulk operations data - * @property {number} [total_records] - Total records in the upload. + * @property {string} [url] + * @property {number} [total_records] */ /** @@ -1462,14 +1392,6 @@ const Joi = require("joi"); */ class ContentPlatformModel { - /** @returns {ValidationError} */ - static ValidationError() { - return Joi.object({ - message: Joi.string().allow("").required(), - field: Joi.string().allow("").required(), - }); - } - /** @returns {GenerateSEOContent} */ static GenerateSEOContent() { return Joi.object({ @@ -1691,8 +1613,8 @@ class ContentPlatformModel { }); } - /** @returns {BlogGetDetails} */ - static BlogGetDetails() { + /** @returns {BlogGetResponse} */ + static BlogGetResponse() { return Joi.object({ items: Joi.array().items(ContentPlatformModel.BlogSchema()), page: ContentPlatformModel.Page(), @@ -1737,7 +1659,7 @@ class ContentPlatformModel { static BlogSchema() { return Joi.object({ _id: Joi.string().allow(""), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), application: Joi.string().allow(""), archived: Joi.boolean(), author: ContentPlatformModel.Author(), @@ -1815,11 +1737,11 @@ class ContentPlatformModel { }); } - /** @returns {BlogPayload} */ - static BlogPayload() { + /** @returns {BlogRequest} */ + static BlogRequest() { return Joi.object({ application: Joi.string().allow(""), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), author: ContentPlatformModel.Author(), content: Joi.array().items(ContentPlatformModel.ResourceContent()), feature_image: ContentPlatformModel.Asset(), @@ -1957,7 +1879,7 @@ class ContentPlatformModel { static HandpickedTagSchema() { return Joi.object({ position: Joi.string().allow(""), - attributes: Joi.object().pattern(/\S/, Joi.any()), + attributes: Joi.any(), name: Joi.string().allow(""), url: Joi.string().allow(""), type: Joi.string().allow(""), @@ -1982,7 +1904,7 @@ class ContentPlatformModel { type: Joi.string().allow(""), url: Joi.string().allow(""), position: Joi.string().allow(""), - attributes: Joi.object().pattern(/\S/, Joi.any()), + attributes: Joi.any(), pages: Joi.array().items(Joi.any()), content: Joi.string().allow(""), }); @@ -2024,8 +1946,8 @@ class ContentPlatformModel { }); } - /** @returns {TagDeleteSuccessDetails} */ - static TagDeleteSuccessDetails() { + /** @returns {TagDeleteSuccessResponse} */ + static TagDeleteSuccessResponse() { return Joi.object({ success: Joi.boolean(), }); @@ -2041,7 +1963,7 @@ class ContentPlatformModel { info: Joi.string().allow(""), request_id: Joi.string().allow(""), stack_trace: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), }); } @@ -2063,7 +1985,7 @@ class ContentPlatformModel { slug: Joi.string().allow(""), application: Joi.string().allow(""), icon_url: Joi.string().allow(""), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), }); } @@ -2097,7 +2019,7 @@ class ContentPlatformModel { slug: Joi.string().allow(""), application: Joi.string().allow(""), icon_url: Joi.string().allow(""), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), }); } @@ -2191,8 +2113,8 @@ class ContentPlatformModel { }); } - /** @returns {LandingPageGetDetails} */ - static LandingPageGetDetails() { + /** @returns {LandingPageGetResponse} */ + static LandingPageGetResponse() { return Joi.object({ items: Joi.array().items(ContentPlatformModel.LandingPageSchema()), page: ContentPlatformModel.Page(), @@ -2210,19 +2132,19 @@ class ContentPlatformModel { _id: Joi.string().allow(""), application: Joi.string().allow(""), archived: Joi.boolean(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), }); } - /** @returns {DefaultNavigationDetails} */ - static DefaultNavigationDetails() { + /** @returns {DefaultNavigationResponse} */ + static DefaultNavigationResponse() { return Joi.object({ items: Joi.array().items(ContentPlatformModel.NavigationSchema()), }); } - /** @returns {NavigationGetDetails} */ - static NavigationGetDetails() { + /** @returns {NavigationGetResponse} */ + static NavigationGetResponse() { return Joi.object({ items: Joi.array().items(ContentPlatformModel.NavigationSchema()), page: ContentPlatformModel.Page(), @@ -2254,8 +2176,8 @@ class ContentPlatformModel { }); } - /** @returns {NavigationPayload} */ - static NavigationPayload() { + /** @returns {NavigationRequest} */ + static NavigationRequest() { return Joi.object({ name: Joi.string().allow(""), slug: Joi.string().allow(""), @@ -2265,8 +2187,8 @@ class ContentPlatformModel { }); } - /** @returns {PageGetDetails} */ - static PageGetDetails() { + /** @returns {PageGetResponse} */ + static PageGetResponse() { return Joi.object({ items: Joi.array().items(ContentPlatformModel.PageSchema()), page: ContentPlatformModel.Page(), @@ -2312,7 +2234,7 @@ class ContentPlatformModel { feature_image: ContentPlatformModel.Asset(), page_meta: Joi.array().items(Joi.any()), _schedule: ContentPlatformModel.ScheduleSchema(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), orientation: Joi.string().allow(""), platform: Joi.string().allow(""), published: Joi.boolean(), @@ -2321,7 +2243,7 @@ class ContentPlatformModel { title: Joi.string().allow(""), type: Joi.string().allow(""), seo: ContentPlatformModel.SEO(), - visibility: Joi.object().pattern(/\S/, Joi.any()), + visibility: Joi.any(), archived: Joi.boolean(), }); } @@ -2333,13 +2255,13 @@ class ContentPlatformModel { }); } - /** @returns {PagePayload} */ - static PagePayload() { + /** @returns {PageRequest} */ + static PageRequest() { return Joi.object({ _schedule: ContentPlatformModel.CronSchedule(), application: Joi.string().allow(""), author: ContentPlatformModel.Author(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), orientation: Joi.string().allow(""), content: Joi.array().items(Joi.any()), feature_image: ContentPlatformModel.Asset(), @@ -2362,8 +2284,8 @@ class ContentPlatformModel { }); } - /** @returns {PagePublishPayload} */ - static PagePublishPayload() { + /** @returns {PagePublishRequest} */ + static PagePublishRequest() { return Joi.object({ publish: Joi.boolean(), }); @@ -2378,8 +2300,8 @@ class ContentPlatformModel { }); } - /** @returns {SlideshowGetDetails} */ - static SlideshowGetDetails() { + /** @returns {SlideshowGetResponse} */ + static SlideshowGetResponse() { return Joi.object({ items: Joi.array().items(ContentPlatformModel.SlideshowSchema()), page: ContentPlatformModel.Page(), @@ -2398,12 +2320,12 @@ class ContentPlatformModel { media: Joi.array().items(ContentPlatformModel.SlideshowMedia()), active: Joi.boolean(), archived: Joi.boolean(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), }); } - /** @returns {SlideshowPayload} */ - static SlideshowPayload() { + /** @returns {SlideshowRequest} */ + static SlideshowRequest() { return Joi.object({ slug: Joi.string().allow(""), platform: Joi.string().allow(""), @@ -2485,7 +2407,7 @@ class ContentPlatformModel { sub_type: Joi.string().allow(""), _id: Joi.string().allow(""), position: Joi.string().allow(""), - attributes: Joi.object().pattern(/\S/, Joi.any()), + attributes: Joi.any(), content: Joi.string().allow(""), pages: Joi.array().items(Joi.any()), __source: ContentPlatformModel.TagSourceSchema(), @@ -2528,18 +2450,23 @@ class ContentPlatformModel { /** @returns {FieldDefinitionSchema} */ static FieldDefinitionSchema() { return Joi.object({ - id: Joi.string().allow(""), + _id: Joi.string().allow(""), + creator: Joi.string().allow(""), resource: Joi.string().allow(""), name: Joi.string().allow(""), namespace: Joi.string().allow(""), - slug: Joi.string().allow(""), + key: Joi.string().allow(""), description: Joi.string().allow(""), type: Joi.string().allow(""), multi_value: Joi.boolean(), validations: Joi.array().items(ContentPlatformModel.FieldValidations()), company_id: Joi.string().allow(""), + created_by: Joi.string().allow(""), + updated_by: Joi.string().allow(""), required: Joi.boolean(), is_deleted: Joi.boolean(), + created_at: Joi.string().allow(""), + updated_at: Joi.string().allow(""), type_name: Joi.string().allow(""), invalid_fields_count: Joi.number(), }); @@ -2556,8 +2483,9 @@ class ContentPlatformModel { /** @returns {CustomFieldDefinitionRequestSchema} */ static CustomFieldDefinitionRequestSchema() { return Joi.object({ + resource: Joi.string().allow(""), type: Joi.string().allow(""), - slug: Joi.string().allow(""), + key: Joi.string().allow(""), namespace: Joi.string().allow(""), multi_value: Joi.boolean(), name: Joi.string().allow(""), @@ -2575,7 +2503,7 @@ class ContentPlatformModel { name: Joi.string().allow(""), multi_value: Joi.boolean(), required: Joi.boolean(), - slug: Joi.string().allow(""), + key: Joi.string().allow(""), validations: Joi.array().items(ContentPlatformModel.FieldValidations()), action: Joi.string().allow(""), }); @@ -2584,6 +2512,7 @@ class ContentPlatformModel { /** @returns {CustomObjectDefinitionUpdateRequestSchema} */ static CustomObjectDefinitionUpdateRequestSchema() { return Joi.object({ + type: Joi.string().allow(""), description: Joi.string().allow(""), name: Joi.string().allow(""), display_name_key: Joi.string().allow(""), @@ -2596,39 +2525,21 @@ class ContentPlatformModel { /** @returns {CustomFieldDefinitionDetailResSchema} */ static CustomFieldDefinitionDetailResSchema() { return Joi.object({ + creator: Joi.string().allow(""), resource: Joi.string().allow(""), name: Joi.string().allow(""), namespace: Joi.string().allow(""), - slug: Joi.string().allow(""), - description: Joi.string().allow(""), - type: Joi.string().allow(""), - multi_value: Joi.boolean(), - company_id: Joi.string().allow(""), - application_id: Joi.string().allow(""), - required: Joi.boolean(), - is_deleted: Joi.boolean(), - id: Joi.string().allow(""), - validations: Joi.array().items(Joi.any()), - created_at: Joi.string().allow(""), - updated_at: Joi.string().allow(""), - }); - } - - /** @returns {MetaFieldDefinitionDetailResSchema} */ - static MetaFieldDefinitionDetailResSchema() { - return Joi.object({ - resource: Joi.string().allow(""), - name: Joi.string().allow(""), - namespace: Joi.string().allow(""), - slug: Joi.string().allow(""), + key: Joi.string().allow(""), description: Joi.string().allow(""), type: Joi.string().allow(""), multi_value: Joi.boolean(), company_id: Joi.string().allow(""), application_id: Joi.string().allow(""), + created_by: Joi.string().allow(""), + updated_by: Joi.string().allow(""), required: Joi.boolean(), is_deleted: Joi.boolean(), - id: Joi.string().allow(""), + _id: Joi.string().allow(""), validations: Joi.array().items(Joi.any()), created_at: Joi.string().allow(""), updated_at: Joi.string().allow(""), @@ -2653,17 +2564,20 @@ class ContentPlatformModel { /** @returns {CustomFieldSchema} */ static CustomFieldSchema() { return Joi.object({ - id: Joi.string().allow(""), + _id: Joi.string().allow(""), namespace: Joi.string().allow(""), - slug: Joi.string().allow(""), + key: Joi.string().allow(""), resource: Joi.string().allow(""), + creator: Joi.string().allow(""), value: Joi.array().items(ContentPlatformModel.CustomFieldValue()), - resource_slug: Joi.string().allow(""), + resource_id: Joi.string().allow(""), type: Joi.string().allow(""), multi_value: Joi.boolean(), company_id: Joi.string().allow(""), + definition_id: Joi.string().allow(""), has_invalid_values: Joi.boolean(), invalid_value_errors: Joi.array().items(Joi.any()), + created_by: Joi.string().allow(""), is_deleted: Joi.boolean(), created_at: Joi.string().allow(""), updated_at: Joi.string().allow(""), @@ -2678,14 +2592,6 @@ class ContentPlatformModel { }); } - /** @returns {CustomFieldsDeleteSchema} */ - static CustomFieldsDeleteSchema() { - return Joi.object({ - success: Joi.boolean(), - message: Joi.string().allow(""), - }); - } - /** @returns {CustomFieldsResponseByResourceIdSchema} */ static CustomFieldsResponseByResourceIdSchema() { return Joi.object({ @@ -2697,8 +2603,7 @@ class ContentPlatformModel { static CustomField() { return Joi.object({ value: Joi.array().items(Joi.any()), - namespace: Joi.string().allow(""), - slug: Joi.string().allow(""), + definition_id: Joi.string().allow(""), }); } @@ -2712,13 +2617,16 @@ class ContentPlatformModel { /** @returns {CustomObjectSchema} */ static CustomObjectSchema() { return Joi.object({ - id: Joi.string().allow(""), + _id: Joi.string().allow(""), + creator: Joi.string().allow(""), company_id: Joi.string().allow(""), application_id: Joi.string().allow(""), + created_by: Joi.string().allow(""), + updated_by: Joi.string().allow(""), status: Joi.string().allow(""), type: Joi.string().allow(""), - definition_slug: Joi.string().allow(""), display_name: Joi.string().allow(""), + definition_id: Joi.string().allow(""), fields: Joi.array().items(ContentPlatformModel.CustomFieldSchema()), }); } @@ -2727,7 +2635,6 @@ class ContentPlatformModel { static CustomObjectDefinitionRequestSchema() { return Joi.object({ type: Joi.string().allow(""), - definition_slug: Joi.string().allow(""), description: Joi.string().allow(""), name: Joi.string().allow(""), display_name_key: Joi.string().allow(""), @@ -2737,17 +2644,42 @@ class ContentPlatformModel { }); } - /** @returns {CustomObjectDefinitionSlugSchema} */ - static CustomObjectDefinitionSlugSchema() { + /** @returns {CustomObjectCustomFieldDefinitionResSchema} */ + static CustomObjectCustomFieldDefinitionResSchema() { return Joi.object({ - id: Joi.string().allow(""), + creator: Joi.string().allow(""), + resource: Joi.string().allow(""), + name: Joi.string().allow(""), + namespace: Joi.string().allow(""), + key: Joi.string().allow(""), + description: Joi.string().allow(""), + type: Joi.string().allow(""), + multi_value: Joi.boolean(), + validations: Joi.array().items(ContentPlatformModel.FieldValidations()), + company_id: Joi.string().allow(""), + created_by: Joi.string().allow(""), + metaobject_definition_id: Joi.string().allow(""), + required: Joi.boolean(), + is_deleted: Joi.boolean(), + _id: Joi.string().allow(""), + created_at: Joi.string().allow(""), + updated_at: Joi.string().allow(""), + }); + } + + /** @returns {CustomObjectDefinitionSchema} */ + static CustomObjectDefinitionSchema() { + return Joi.object({ + _id: Joi.string().allow(""), name: Joi.string().allow(""), type: Joi.string().allow(""), - definition_slug: Joi.string().allow(""), display_name_key: Joi.string().allow(""), description: Joi.string().allow(""), + creator: Joi.string().allow(""), + created_by: Joi.string().allow(""), + updated_by: Joi.string().allow(""), field_definitions: Joi.array().items( - ContentPlatformModel.CustomFieldDefinitionDetailResSchema() + ContentPlatformModel.CustomObjectCustomFieldDefinitionResSchema() ), }); } @@ -2760,18 +2692,18 @@ class ContentPlatformModel { }); } - /** @returns {CustomObjectEntryBulkUploadDetails} */ - static CustomObjectEntryBulkUploadDetails() { + /** @returns {CustomObjectEntryBulkUploadResponse} */ + static CustomObjectEntryBulkUploadResponse() { return Joi.object({ url: Joi.string().allow(""), total_records: Joi.number(), }); } - /** @returns {CustomObjectListItemDefinitionModel} */ - static CustomObjectListItemDefinitionModel() { + /** @returns {CustomObjectListItemDefinationSchema} */ + static CustomObjectListItemDefinationSchema() { return Joi.object({ - id: Joi.string().allow(""), + _id: Joi.string().allow(""), name: Joi.string().allow(""), type: Joi.string().allow(""), }); @@ -2780,12 +2712,12 @@ class ContentPlatformModel { /** @returns {CustomObjectListItemSchema} */ static CustomObjectListItemSchema() { return Joi.object({ - id: Joi.string().allow(""), + _id: Joi.string().allow(""), + definition_id: Joi.string().allow(""), status: Joi.string().allow(""), - created_at: Joi.string().allow(""), updated_at: Joi.string().allow(""), display_name: Joi.string().allow(""), - definition: ContentPlatformModel.CustomObjectListItemDefinitionModel(), + definition: ContentPlatformModel.CustomObjectListItemDefinationSchema(), references: Joi.number(), }); } @@ -2800,30 +2732,26 @@ class ContentPlatformModel { }); } - /** @returns {CustomObjectFieldDefinition} */ - static CustomObjectFieldDefinition() { + /** @returns {CustomObjectFieldSchema} */ + static CustomObjectFieldSchema() { return Joi.object({ - id: Joi.string().allow(""), - slug: Joi.string().allow(""), - namespace: Joi.string().allow(""), + _id: Joi.string().allow(""), + key: Joi.string().allow(""), value: Joi.array().items(Joi.any()), type: Joi.string().allow(""), + definition_id: Joi.string().allow(""), }); } - /** @returns {CustomObjectBySlugSchema} */ - static CustomObjectBySlugSchema() { + /** @returns {CustomObjectByIdSchema} */ + static CustomObjectByIdSchema() { return Joi.object({ - id: Joi.string().allow(""), + _id: Joi.string().allow(""), status: Joi.string().allow(""), display_name: Joi.string().allow(""), - definition: ContentPlatformModel.CustomObjectListItemDefinitionModel(), + definition: ContentPlatformModel.CustomObjectListItemDefinationSchema(), references: Joi.array().items(Joi.any()), - slug: Joi.string().allow(""), - definition_slug: Joi.string().allow(""), - fields: Joi.array().items( - ContentPlatformModel.CustomObjectFieldDefinition() - ), + fields: Joi.array().items(ContentPlatformModel.CustomObjectFieldSchema()), }); } @@ -2845,15 +2773,17 @@ class ContentPlatformModel { }); } - /** @returns {JobSchema} */ - static JobSchema() { + /** @returns {CustomObjectJobSchema} */ + static CustomObjectJobSchema() { return Joi.object({ - id: Joi.string().allow(""), + _id: Joi.string().allow(""), jobs: Joi.array().items(Joi.string().allow("")), finished_jobs: Joi.array().items(Joi.string().allow("")), error_jobs: Joi.array().items(Joi.string().allow("")), errors_occured: Joi.array().items(Joi.string().allow("")), company_id: Joi.string().allow(""), + creator: Joi.string().allow(""), + url: Joi.string().allow(""), status: Joi.string().allow(""), action_type: Joi.string().allow(""), entity: Joi.string().allow(""), @@ -2866,33 +2796,17 @@ class ContentPlatformModel { created_by: Joi.string().allow(""), created_at: Joi.string().allow(""), updated_at: Joi.string().allow(""), - application_id: Joi.string().allow(""), - }); - } - - /** @returns {CustomFieldBulkEntry} */ - static CustomFieldBulkEntry() { - return Joi.object({ - items: Joi.array().items(ContentPlatformModel.JobSchema()), - page: ContentPlatformModel.Page(), }); } /** @returns {CustomObjectBulkEntry} */ static CustomObjectBulkEntry() { return Joi.object({ - items: Joi.array().items(ContentPlatformModel.JobSchema()), + items: Joi.array().items(ContentPlatformModel.CustomObjectJobSchema()), page: ContentPlatformModel.Page(), }); } - /** @returns {MetafieldTypesSchema} */ - static MetafieldTypesSchema() { - return Joi.object({ - metafield_types: ContentPlatformModel.CustomFieldTypeSchema(), - }); - } - /** @returns {CustomFieldTypeSchema} */ static CustomFieldTypeSchema() { return Joi.object({ @@ -2909,8 +2823,6 @@ class ContentPlatformModel { url: ContentPlatformModel.Url(), metaobject: ContentPlatformModel.Metaobject(), product: ContentPlatformModel.Product(), - html: ContentPlatformModel.HTML(), - duration: ContentPlatformModel.Duration(), }); } @@ -2942,31 +2854,6 @@ class ContentPlatformModel { }); } - /** @returns {Duration} */ - static Duration() { - return Joi.object({ - name: Joi.string().allow(""), - list_enabled: Joi.boolean(), - type: Joi.string().allow(""), - category: Joi.string().allow(""), - supported_validations: Joi.array().items( - ContentPlatformModel.SupportedValidationsSchema() - ), - }); - } - - /** @returns {HTML} */ - static HTML() { - return Joi.object({ - name: Joi.string().allow(""), - list_enabled: Joi.boolean(), - type: Joi.string().allow(""), - supported_validations: Joi.array().items( - ContentPlatformModel.SupportedValidationsSchema() - ), - }); - } - /** @returns {StringSingleLine} */ static StringSingleLine() { return Joi.object({ @@ -3138,7 +3025,7 @@ class ContentPlatformModel { /** @returns {CustomObjectEntry} */ static CustomObjectEntry() { return Joi.object({ - id: Joi.string().allow(""), + _id: Joi.string().allow(""), name: Joi.string().allow(""), type: Joi.string().allow(""), updated_at: Joi.string().allow(""), @@ -3158,16 +3045,8 @@ class ContentPlatformModel { /** @returns {CustomObjectEntryFieldSchema} */ static CustomObjectEntryFieldSchema() { return Joi.object({ - namespace: Joi.string().allow(""), - slug: Joi.string().allow(""), - }); - } - - /** @returns {CustomObjectEntryFieldSchemaWithoutID} */ - static CustomObjectEntryFieldSchemaWithoutID() { - return Joi.object({ - slug: Joi.string().allow(""), - value: Joi.any(), + definition_id: Joi.string().allow(""), + value: Joi.array().items(Joi.any()), }); } @@ -3175,23 +3054,13 @@ class ContentPlatformModel { static CustomObjectRequestSchema() { return Joi.object({ status: Joi.string().allow(""), - slug: Joi.string().allow(""), + definition_id: Joi.string().allow(""), fields: Joi.array().items( ContentPlatformModel.CustomObjectEntryFieldSchema() ), }); } - /** @returns {CustomObjectRequestSchemaWithoutId} */ - static CustomObjectRequestSchemaWithoutId() { - return Joi.object({ - status: Joi.string().allow(""), - fields: Joi.array().items( - ContentPlatformModel.CustomObjectEntryFieldSchemaWithoutID() - ), - }); - } - /** @returns {CustomObjectBulkSchema} */ static CustomObjectBulkSchema() { return Joi.object({ diff --git a/sdk/platform/Content/ContentPlatformValidator.d.ts b/sdk/platform/Content/ContentPlatformValidator.d.ts index 9cc8a4a85..a6b6d48b7 100644 --- a/sdk/platform/Content/ContentPlatformValidator.d.ts +++ b/sdk/platform/Content/ContentPlatformValidator.d.ts @@ -1,83 +1,67 @@ export = ContentPlatformValidator; /** - * @typedef CreateCustomFieldDefinitionParam + * @typedef CreateCustomFieldByResourceIdParam * @property {string} resource + * @property {string} resourceId + * @property {ContentPlatformModel.CustomFieldRequestSchema} body + */ +/** + * @typedef CreateCustomFieldDefinitionParam * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body */ /** - * @typedef CreateCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {ContentPlatformModel.CustomObjectRequestSchemaWithoutId} body + * @typedef CreateCustomObjectParam + * @property {ContentPlatformModel.CustomObjectRequestSchema} body */ /** * @typedef CreateCustomObjectDefinitionParam * @property {ContentPlatformModel.CustomObjectDefinitionRequestSchema} body */ /** - * @typedef DeleteCustomFieldDefinitionBySlugParam - * @property {string} slug - * @property {string} resource - * @property {string} namespace + * @typedef DeleteCustomFieldDefinitionParam + * @property {string} definitionId */ /** - * @typedef DeleteCustomFieldsByResourceSlugParam - * @property {string} resource - * @property {string} resourceSlug - * @property {string} ids + * @typedef DeleteCustomObjectParam + * @property {string} metaobjectId */ /** - * @typedef DeleteCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {string} slug + * @typedef DeleteCustomObjectDefinitionParam + * @property {string} definitionId */ /** - * @typedef DeleteCustomObjectDefinitionBySlugParam - * @property {string} slug + * @typedef ExportCustomObjectEntriesParam + * @property {string} definitionId */ /** - * @typedef ExportCustomObjectEntriesBySlugParam - * @property {string} slug + * @typedef GetCustomFieldDefinitionParam + * @property {string} definitionId */ /** - * @typedef GetCustomFieldDefinitionByResourceParam + * @typedef GetCustomFieldDefinitionsParam * @property {string} pageNo * @property {string} pageSize - * @property {string} resource - * @property {string} [types] + * @property {string} [resource] + * @property {string} [type] * @property {string} [search] - * @property {string} [slugs] - * @property {string} [namespaces] */ +/** @typedef GetCustomFieldTypesParam */ /** - * @typedef GetCustomFieldDefinitionBySlugParam - * @property {string} slug + * @typedef GetCustomFieldsParam * @property {string} resource - * @property {string} namespace */ /** - * @typedef GetCustomFieldDefinitionsParam - * @property {string} pageNo - * @property {string} pageSize - * @property {string} [resources] - * @property {string} [types] - * @property {string} [search] - * @property {string} [slugs] - * @property {string} [namespaces] - */ -/** @typedef GetCustomFieldTypesParam */ -/** - * @typedef GetCustomFieldsByResourceSlugParam + * @typedef GetCustomFieldsByResourceIdParam * @property {string} resource - * @property {string} resourceSlug + * @property {string} resourceId */ /** - * @typedef GetCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {string} slug + * @typedef GetCustomObjectParam + * @property {string} metaobjectId */ /** - * @typedef GetCustomObjectDefinitionBySlugParam - * @property {string} slug + * @typedef GetCustomObjectDefinitionParam + * @property {string} definitionId */ /** * @typedef GetCustomObjectDefinitionsParam @@ -86,10 +70,10 @@ export = ContentPlatformValidator; * @property {string} [search] */ /** - * @typedef GetCustomObjectsBySlugParam + * @typedef GetCustomObjectsParam + * @property {string} [definitionId] * @property {string} pageNo * @property {string} pageSize - * @property {string} definitionSlug */ /** * @typedef GetJobsParam @@ -99,198 +83,163 @@ export = ContentPlatformValidator; */ /** @typedef GetResourcesParam */ /** - * @typedef ImportCustomObjectEntriesBySlugParam - * @property {string} slug + * @typedef ImportCustomObjectEntriesParam + * @property {string} definitionId * @property {ContentPlatformModel.CustomObjectBulkSchema} body */ /** - * @typedef SampleCustomObjectBulkEntryBySlugParam - * @property {string} slug + * @typedef SampleCustomObjectBulkEntryParam + * @property {string} definitionId */ /** - * @typedef UpdateCustomFieldByResourceSlugParam - * @property {string} resource - * @property {string} resourceSlug - * @property {ContentPlatformModel.CustomFieldRequestSchema} body - */ -/** - * @typedef UpdateCustomFieldDefinitionBySlugParam - * @property {string} slug - * @property {string} resource - * @property {string} namespace + * @typedef UpdateCustomFieldDefinitionParam + * @property {string} definitionId * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body */ /** - * @typedef UpdateCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {string} slug - * @property {ContentPlatformModel.CustomObjectRequestSchemaWithoutId} body + * @typedef UpdateCustomObjectParam + * @property {string} metaobjectId + * @property {ContentPlatformModel.CustomObjectRequestSchema} body */ /** - * @typedef UpdateCustomObjectDefinitionBySlugParam - * @property {string} slug + * @typedef UpdateCustomObjectDefinitionParam + * @property {string} definitionId * @property {ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema} body */ declare class ContentPlatformValidator { + /** @returns {CreateCustomFieldByResourceIdParam} */ + static createCustomFieldByResourceId(): CreateCustomFieldByResourceIdParam; /** @returns {CreateCustomFieldDefinitionParam} */ static createCustomFieldDefinition(): CreateCustomFieldDefinitionParam; - /** @returns {CreateCustomObjectBySlugParam} */ - static createCustomObjectBySlug(): CreateCustomObjectBySlugParam; + /** @returns {CreateCustomObjectParam} */ + static createCustomObject(): CreateCustomObjectParam; /** @returns {CreateCustomObjectDefinitionParam} */ static createCustomObjectDefinition(): CreateCustomObjectDefinitionParam; - /** @returns {DeleteCustomFieldDefinitionBySlugParam} */ - static deleteCustomFieldDefinitionBySlug(): DeleteCustomFieldDefinitionBySlugParam; - /** @returns {DeleteCustomFieldsByResourceSlugParam} */ - static deleteCustomFieldsByResourceSlug(): DeleteCustomFieldsByResourceSlugParam; - /** @returns {DeleteCustomObjectBySlugParam} */ - static deleteCustomObjectBySlug(): DeleteCustomObjectBySlugParam; - /** @returns {DeleteCustomObjectDefinitionBySlugParam} */ - static deleteCustomObjectDefinitionBySlug(): DeleteCustomObjectDefinitionBySlugParam; - /** @returns {ExportCustomObjectEntriesBySlugParam} */ - static exportCustomObjectEntriesBySlug(): ExportCustomObjectEntriesBySlugParam; - /** @returns {GetCustomFieldDefinitionByResourceParam} */ - static getCustomFieldDefinitionByResource(): GetCustomFieldDefinitionByResourceParam; - /** @returns {GetCustomFieldDefinitionBySlugParam} */ - static getCustomFieldDefinitionBySlug(): GetCustomFieldDefinitionBySlugParam; + /** @returns {DeleteCustomFieldDefinitionParam} */ + static deleteCustomFieldDefinition(): DeleteCustomFieldDefinitionParam; + /** @returns {DeleteCustomObjectParam} */ + static deleteCustomObject(): DeleteCustomObjectParam; + /** @returns {DeleteCustomObjectDefinitionParam} */ + static deleteCustomObjectDefinition(): DeleteCustomObjectDefinitionParam; + /** @returns {ExportCustomObjectEntriesParam} */ + static exportCustomObjectEntries(): ExportCustomObjectEntriesParam; + /** @returns {GetCustomFieldDefinitionParam} */ + static getCustomFieldDefinition(): GetCustomFieldDefinitionParam; /** @returns {GetCustomFieldDefinitionsParam} */ static getCustomFieldDefinitions(): GetCustomFieldDefinitionsParam; /** @returns {GetCustomFieldTypesParam} */ static getCustomFieldTypes(): any; - /** @returns {GetCustomFieldsByResourceSlugParam} */ - static getCustomFieldsByResourceSlug(): GetCustomFieldsByResourceSlugParam; - /** @returns {GetCustomObjectBySlugParam} */ - static getCustomObjectBySlug(): GetCustomObjectBySlugParam; - /** @returns {GetCustomObjectDefinitionBySlugParam} */ - static getCustomObjectDefinitionBySlug(): GetCustomObjectDefinitionBySlugParam; + /** @returns {GetCustomFieldsParam} */ + static getCustomFields(): GetCustomFieldsParam; + /** @returns {GetCustomFieldsByResourceIdParam} */ + static getCustomFieldsByResourceId(): GetCustomFieldsByResourceIdParam; + /** @returns {GetCustomObjectParam} */ + static getCustomObject(): GetCustomObjectParam; + /** @returns {GetCustomObjectDefinitionParam} */ + static getCustomObjectDefinition(): GetCustomObjectDefinitionParam; /** @returns {GetCustomObjectDefinitionsParam} */ static getCustomObjectDefinitions(): GetCustomObjectDefinitionsParam; - /** @returns {GetCustomObjectsBySlugParam} */ - static getCustomObjectsBySlug(): GetCustomObjectsBySlugParam; + /** @returns {GetCustomObjectsParam} */ + static getCustomObjects(): GetCustomObjectsParam; /** @returns {GetJobsParam} */ static getJobs(): GetJobsParam; /** @returns {GetResourcesParam} */ static getResources(): any; - /** @returns {ImportCustomObjectEntriesBySlugParam} */ - static importCustomObjectEntriesBySlug(): ImportCustomObjectEntriesBySlugParam; - /** @returns {SampleCustomObjectBulkEntryBySlugParam} */ - static sampleCustomObjectBulkEntryBySlug(): SampleCustomObjectBulkEntryBySlugParam; - /** @returns {UpdateCustomFieldByResourceSlugParam} */ - static updateCustomFieldByResourceSlug(): UpdateCustomFieldByResourceSlugParam; - /** @returns {UpdateCustomFieldDefinitionBySlugParam} */ - static updateCustomFieldDefinitionBySlug(): UpdateCustomFieldDefinitionBySlugParam; - /** @returns {UpdateCustomObjectBySlugParam} */ - static updateCustomObjectBySlug(): UpdateCustomObjectBySlugParam; - /** @returns {UpdateCustomObjectDefinitionBySlugParam} */ - static updateCustomObjectDefinitionBySlug(): UpdateCustomObjectDefinitionBySlugParam; + /** @returns {ImportCustomObjectEntriesParam} */ + static importCustomObjectEntries(): ImportCustomObjectEntriesParam; + /** @returns {SampleCustomObjectBulkEntryParam} */ + static sampleCustomObjectBulkEntry(): SampleCustomObjectBulkEntryParam; + /** @returns {UpdateCustomFieldDefinitionParam} */ + static updateCustomFieldDefinition(): UpdateCustomFieldDefinitionParam; + /** @returns {UpdateCustomObjectParam} */ + static updateCustomObject(): UpdateCustomObjectParam; + /** @returns {UpdateCustomObjectDefinitionParam} */ + static updateCustomObjectDefinition(): UpdateCustomObjectDefinitionParam; } declare namespace ContentPlatformValidator { - export { CreateCustomFieldDefinitionParam, CreateCustomObjectBySlugParam, CreateCustomObjectDefinitionParam, DeleteCustomFieldDefinitionBySlugParam, DeleteCustomFieldsByResourceSlugParam, DeleteCustomObjectBySlugParam, DeleteCustomObjectDefinitionBySlugParam, ExportCustomObjectEntriesBySlugParam, GetCustomFieldDefinitionByResourceParam, GetCustomFieldDefinitionBySlugParam, GetCustomFieldDefinitionsParam, GetCustomFieldTypesParam, GetCustomFieldsByResourceSlugParam, GetCustomObjectBySlugParam, GetCustomObjectDefinitionBySlugParam, GetCustomObjectDefinitionsParam, GetCustomObjectsBySlugParam, GetJobsParam, GetResourcesParam, ImportCustomObjectEntriesBySlugParam, SampleCustomObjectBulkEntryBySlugParam, UpdateCustomFieldByResourceSlugParam, UpdateCustomFieldDefinitionBySlugParam, UpdateCustomObjectBySlugParam, UpdateCustomObjectDefinitionBySlugParam }; + export { CreateCustomFieldByResourceIdParam, CreateCustomFieldDefinitionParam, CreateCustomObjectParam, CreateCustomObjectDefinitionParam, DeleteCustomFieldDefinitionParam, DeleteCustomObjectParam, DeleteCustomObjectDefinitionParam, ExportCustomObjectEntriesParam, GetCustomFieldDefinitionParam, GetCustomFieldDefinitionsParam, GetCustomFieldTypesParam, GetCustomFieldsParam, GetCustomFieldsByResourceIdParam, GetCustomObjectParam, GetCustomObjectDefinitionParam, GetCustomObjectDefinitionsParam, GetCustomObjectsParam, GetJobsParam, GetResourcesParam, ImportCustomObjectEntriesParam, SampleCustomObjectBulkEntryParam, UpdateCustomFieldDefinitionParam, UpdateCustomObjectParam, UpdateCustomObjectDefinitionParam }; } -type CreateCustomFieldDefinitionParam = { +type CreateCustomFieldByResourceIdParam = { resource: string; + resourceId: string; + body: ContentPlatformModel.CustomFieldRequestSchema; +}; +type CreateCustomFieldDefinitionParam = { body: ContentPlatformModel.CustomFieldDefinitionRequestSchema; }; -type CreateCustomObjectBySlugParam = { - definitionSlug: string; - body: ContentPlatformModel.CustomObjectRequestSchemaWithoutId; +type CreateCustomObjectParam = { + body: ContentPlatformModel.CustomObjectRequestSchema; }; type CreateCustomObjectDefinitionParam = { body: ContentPlatformModel.CustomObjectDefinitionRequestSchema; }; -type DeleteCustomFieldDefinitionBySlugParam = { - slug: string; - resource: string; - namespace: string; +type DeleteCustomFieldDefinitionParam = { + definitionId: string; }; -type DeleteCustomFieldsByResourceSlugParam = { - resource: string; - resourceSlug: string; - ids: string; +type DeleteCustomObjectParam = { + metaobjectId: string; }; -type DeleteCustomObjectBySlugParam = { - definitionSlug: string; - slug: string; +type DeleteCustomObjectDefinitionParam = { + definitionId: string; }; -type DeleteCustomObjectDefinitionBySlugParam = { - slug: string; +type ExportCustomObjectEntriesParam = { + definitionId: string; }; -type ExportCustomObjectEntriesBySlugParam = { - slug: string; +type GetCustomFieldDefinitionParam = { + definitionId: string; }; -type GetCustomFieldDefinitionByResourceParam = { +type GetCustomFieldDefinitionsParam = { pageNo: string; pageSize: string; - resource: string; - types?: string; + resource?: string; + type?: string; search?: string; - slugs?: string; - namespaces?: string; }; -type GetCustomFieldDefinitionBySlugParam = { - slug: string; +type GetCustomFieldsParam = { resource: string; - namespace: string; }; -type GetCustomFieldDefinitionsParam = { - pageNo: string; - pageSize: string; - resources?: string; - types?: string; - search?: string; - slugs?: string; - namespaces?: string; -}; -type GetCustomFieldsByResourceSlugParam = { +type GetCustomFieldsByResourceIdParam = { resource: string; - resourceSlug: string; + resourceId: string; }; -type GetCustomObjectBySlugParam = { - definitionSlug: string; - slug: string; +type GetCustomObjectParam = { + metaobjectId: string; }; -type GetCustomObjectDefinitionBySlugParam = { - slug: string; +type GetCustomObjectDefinitionParam = { + definitionId: string; }; type GetCustomObjectDefinitionsParam = { pageNo: string; pageSize: string; search?: string; }; -type GetCustomObjectsBySlugParam = { +type GetCustomObjectsParam = { + definitionId?: string; pageNo: string; pageSize: string; - definitionSlug: string; }; type GetJobsParam = { page: string; pageSize: string; actionType: string; }; -type ImportCustomObjectEntriesBySlugParam = { - slug: string; +type ImportCustomObjectEntriesParam = { + definitionId: string; body: ContentPlatformModel.CustomObjectBulkSchema; }; -type SampleCustomObjectBulkEntryBySlugParam = { - slug: string; +type SampleCustomObjectBulkEntryParam = { + definitionId: string; }; -type UpdateCustomFieldByResourceSlugParam = { - resource: string; - resourceSlug: string; - body: ContentPlatformModel.CustomFieldRequestSchema; -}; -type UpdateCustomFieldDefinitionBySlugParam = { - slug: string; - resource: string; - namespace: string; +type UpdateCustomFieldDefinitionParam = { + definitionId: string; body: ContentPlatformModel.CustomFieldDefinitionRequestSchema; }; -type UpdateCustomObjectBySlugParam = { - definitionSlug: string; - slug: string; - body: ContentPlatformModel.CustomObjectRequestSchemaWithoutId; +type UpdateCustomObjectParam = { + metaobjectId: string; + body: ContentPlatformModel.CustomObjectRequestSchema; }; -type UpdateCustomObjectDefinitionBySlugParam = { - slug: string; +type UpdateCustomObjectDefinitionParam = { + definitionId: string; body: ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema; }; type GetCustomFieldTypesParam = any; diff --git a/sdk/platform/Content/ContentPlatformValidator.js b/sdk/platform/Content/ContentPlatformValidator.js index ed17e7c2b..0916a63a4 100644 --- a/sdk/platform/Content/ContentPlatformValidator.js +++ b/sdk/platform/Content/ContentPlatformValidator.js @@ -3,15 +3,20 @@ const Joi = require("joi"); const ContentPlatformModel = require("./ContentPlatformModel"); /** - * @typedef CreateCustomFieldDefinitionParam + * @typedef CreateCustomFieldByResourceIdParam * @property {string} resource + * @property {string} resourceId + * @property {ContentPlatformModel.CustomFieldRequestSchema} body + */ + +/** + * @typedef CreateCustomFieldDefinitionParam * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body */ /** - * @typedef CreateCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {ContentPlatformModel.CustomObjectRequestSchemaWithoutId} body + * @typedef CreateCustomObjectParam + * @property {ContentPlatformModel.CustomObjectRequestSchema} body */ /** @@ -20,81 +25,60 @@ const ContentPlatformModel = require("./ContentPlatformModel"); */ /** - * @typedef DeleteCustomFieldDefinitionBySlugParam - * @property {string} slug - * @property {string} resource - * @property {string} namespace + * @typedef DeleteCustomFieldDefinitionParam + * @property {string} definitionId */ /** - * @typedef DeleteCustomFieldsByResourceSlugParam - * @property {string} resource - * @property {string} resourceSlug - * @property {string} ids + * @typedef DeleteCustomObjectParam + * @property {string} metaobjectId */ /** - * @typedef DeleteCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {string} slug + * @typedef DeleteCustomObjectDefinitionParam + * @property {string} definitionId */ /** - * @typedef DeleteCustomObjectDefinitionBySlugParam - * @property {string} slug + * @typedef ExportCustomObjectEntriesParam + * @property {string} definitionId */ /** - * @typedef ExportCustomObjectEntriesBySlugParam - * @property {string} slug + * @typedef GetCustomFieldDefinitionParam + * @property {string} definitionId */ /** - * @typedef GetCustomFieldDefinitionByResourceParam + * @typedef GetCustomFieldDefinitionsParam * @property {string} pageNo * @property {string} pageSize - * @property {string} resource - * @property {string} [types] + * @property {string} [resource] + * @property {string} [type] * @property {string} [search] - * @property {string} [slugs] - * @property {string} [namespaces] */ -/** - * @typedef GetCustomFieldDefinitionBySlugParam - * @property {string} slug - * @property {string} resource - * @property {string} namespace - */ +/** @typedef GetCustomFieldTypesParam */ /** - * @typedef GetCustomFieldDefinitionsParam - * @property {string} pageNo - * @property {string} pageSize - * @property {string} [resources] - * @property {string} [types] - * @property {string} [search] - * @property {string} [slugs] - * @property {string} [namespaces] + * @typedef GetCustomFieldsParam + * @property {string} resource */ -/** @typedef GetCustomFieldTypesParam */ - /** - * @typedef GetCustomFieldsByResourceSlugParam + * @typedef GetCustomFieldsByResourceIdParam * @property {string} resource - * @property {string} resourceSlug + * @property {string} resourceId */ /** - * @typedef GetCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {string} slug + * @typedef GetCustomObjectParam + * @property {string} metaobjectId */ /** - * @typedef GetCustomObjectDefinitionBySlugParam - * @property {string} slug + * @typedef GetCustomObjectDefinitionParam + * @property {string} definitionId */ /** @@ -105,10 +89,10 @@ const ContentPlatformModel = require("./ContentPlatformModel"); */ /** - * @typedef GetCustomObjectsBySlugParam + * @typedef GetCustomObjectsParam + * @property {string} [definitionId] * @property {string} pageNo * @property {string} pageSize - * @property {string} definitionSlug */ /** @@ -121,58 +105,55 @@ const ContentPlatformModel = require("./ContentPlatformModel"); /** @typedef GetResourcesParam */ /** - * @typedef ImportCustomObjectEntriesBySlugParam - * @property {string} slug + * @typedef ImportCustomObjectEntriesParam + * @property {string} definitionId * @property {ContentPlatformModel.CustomObjectBulkSchema} body */ /** - * @typedef SampleCustomObjectBulkEntryBySlugParam - * @property {string} slug + * @typedef SampleCustomObjectBulkEntryParam + * @property {string} definitionId */ /** - * @typedef UpdateCustomFieldByResourceSlugParam - * @property {string} resource - * @property {string} resourceSlug - * @property {ContentPlatformModel.CustomFieldRequestSchema} body - */ - -/** - * @typedef UpdateCustomFieldDefinitionBySlugParam - * @property {string} slug - * @property {string} resource - * @property {string} namespace + * @typedef UpdateCustomFieldDefinitionParam + * @property {string} definitionId * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body */ /** - * @typedef UpdateCustomObjectBySlugParam - * @property {string} definitionSlug - * @property {string} slug - * @property {ContentPlatformModel.CustomObjectRequestSchemaWithoutId} body + * @typedef UpdateCustomObjectParam + * @property {string} metaobjectId + * @property {ContentPlatformModel.CustomObjectRequestSchema} body */ /** - * @typedef UpdateCustomObjectDefinitionBySlugParam - * @property {string} slug + * @typedef UpdateCustomObjectDefinitionParam + * @property {string} definitionId * @property {ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema} body */ class ContentPlatformValidator { + /** @returns {CreateCustomFieldByResourceIdParam} */ + static createCustomFieldByResourceId() { + return Joi.object({ + resource: Joi.string().allow("").required(), + resourceId: Joi.string().allow("").required(), + body: ContentPlatformModel.CustomFieldRequestSchema().required(), + }).required(); + } + /** @returns {CreateCustomFieldDefinitionParam} */ static createCustomFieldDefinition() { return Joi.object({ - resource: Joi.string().allow("").required(), body: ContentPlatformModel.CustomFieldDefinitionRequestSchema().required(), }).required(); } - /** @returns {CreateCustomObjectBySlugParam} */ - static createCustomObjectBySlug() { + /** @returns {CreateCustomObjectParam} */ + static createCustomObject() { return Joi.object({ - definitionSlug: Joi.string().allow("").required(), - body: ContentPlatformModel.CustomObjectRequestSchemaWithoutId().required(), + body: ContentPlatformModel.CustomObjectRequestSchema().required(), }).required(); } @@ -183,65 +164,38 @@ class ContentPlatformValidator { }).required(); } - /** @returns {DeleteCustomFieldDefinitionBySlugParam} */ - static deleteCustomFieldDefinitionBySlug() { + /** @returns {DeleteCustomFieldDefinitionParam} */ + static deleteCustomFieldDefinition() { return Joi.object({ - slug: Joi.string().allow("").required(), - resource: Joi.string().allow("").required(), - namespace: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), }).required(); } - /** @returns {DeleteCustomFieldsByResourceSlugParam} */ - static deleteCustomFieldsByResourceSlug() { + /** @returns {DeleteCustomObjectParam} */ + static deleteCustomObject() { return Joi.object({ - resource: Joi.string().allow("").required(), - resourceSlug: Joi.string().allow("").required(), - ids: Joi.string().allow("").required(), + metaobjectId: Joi.string().allow("").required(), }).required(); } - /** @returns {DeleteCustomObjectBySlugParam} */ - static deleteCustomObjectBySlug() { + /** @returns {DeleteCustomObjectDefinitionParam} */ + static deleteCustomObjectDefinition() { return Joi.object({ - definitionSlug: Joi.string().allow("").required(), - slug: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), }).required(); } - /** @returns {DeleteCustomObjectDefinitionBySlugParam} */ - static deleteCustomObjectDefinitionBySlug() { + /** @returns {ExportCustomObjectEntriesParam} */ + static exportCustomObjectEntries() { return Joi.object({ - slug: Joi.string().allow("").required(), - }).required(); - } - - /** @returns {ExportCustomObjectEntriesBySlugParam} */ - static exportCustomObjectEntriesBySlug() { - return Joi.object({ - slug: Joi.string().allow("").required(), - }).required(); - } - - /** @returns {GetCustomFieldDefinitionByResourceParam} */ - static getCustomFieldDefinitionByResource() { - return Joi.object({ - pageNo: Joi.string().allow("").required(), - pageSize: Joi.string().allow("").required(), - resource: Joi.string().allow("").required(), - types: Joi.string().allow(""), - search: Joi.string().allow(""), - slugs: Joi.string().allow(""), - namespaces: Joi.string().allow(""), + definitionId: Joi.string().allow("").required(), }).required(); } - /** @returns {GetCustomFieldDefinitionBySlugParam} */ - static getCustomFieldDefinitionBySlug() { + /** @returns {GetCustomFieldDefinitionParam} */ + static getCustomFieldDefinition() { return Joi.object({ - slug: Joi.string().allow("").required(), - resource: Joi.string().allow("").required(), - namespace: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), }).required(); } @@ -250,11 +204,9 @@ class ContentPlatformValidator { return Joi.object({ pageNo: Joi.string().allow("").required(), pageSize: Joi.string().allow("").required(), - resources: Joi.string().allow(""), - types: Joi.string().allow(""), + resource: Joi.string().allow(""), + type: Joi.string().allow(""), search: Joi.string().allow(""), - slugs: Joi.string().allow(""), - namespaces: Joi.string().allow(""), }).required(); } @@ -263,26 +215,32 @@ class ContentPlatformValidator { return Joi.object({}).required(); } - /** @returns {GetCustomFieldsByResourceSlugParam} */ - static getCustomFieldsByResourceSlug() { + /** @returns {GetCustomFieldsParam} */ + static getCustomFields() { + return Joi.object({ + resource: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetCustomFieldsByResourceIdParam} */ + static getCustomFieldsByResourceId() { return Joi.object({ resource: Joi.string().allow("").required(), - resourceSlug: Joi.string().allow("").required(), + resourceId: Joi.string().allow("").required(), }).required(); } - /** @returns {GetCustomObjectBySlugParam} */ - static getCustomObjectBySlug() { + /** @returns {GetCustomObjectParam} */ + static getCustomObject() { return Joi.object({ - definitionSlug: Joi.string().allow("").required(), - slug: Joi.string().allow("").required(), + metaobjectId: Joi.string().allow("").required(), }).required(); } - /** @returns {GetCustomObjectDefinitionBySlugParam} */ - static getCustomObjectDefinitionBySlug() { + /** @returns {GetCustomObjectDefinitionParam} */ + static getCustomObjectDefinition() { return Joi.object({ - slug: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), }).required(); } @@ -295,12 +253,12 @@ class ContentPlatformValidator { }).required(); } - /** @returns {GetCustomObjectsBySlugParam} */ - static getCustomObjectsBySlug() { + /** @returns {GetCustomObjectsParam} */ + static getCustomObjects() { return Joi.object({ + definitionId: Joi.string().allow(""), pageNo: Joi.string().allow("").required(), pageSize: Joi.string().allow("").required(), - definitionSlug: Joi.string().allow("").required(), }).required(); } @@ -318,53 +276,41 @@ class ContentPlatformValidator { return Joi.object({}).required(); } - /** @returns {ImportCustomObjectEntriesBySlugParam} */ - static importCustomObjectEntriesBySlug() { + /** @returns {ImportCustomObjectEntriesParam} */ + static importCustomObjectEntries() { return Joi.object({ - slug: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), body: ContentPlatformModel.CustomObjectBulkSchema().required(), }).required(); } - /** @returns {SampleCustomObjectBulkEntryBySlugParam} */ - static sampleCustomObjectBulkEntryBySlug() { + /** @returns {SampleCustomObjectBulkEntryParam} */ + static sampleCustomObjectBulkEntry() { return Joi.object({ - slug: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), }).required(); } - /** @returns {UpdateCustomFieldByResourceSlugParam} */ - static updateCustomFieldByResourceSlug() { + /** @returns {UpdateCustomFieldDefinitionParam} */ + static updateCustomFieldDefinition() { return Joi.object({ - resource: Joi.string().allow("").required(), - resourceSlug: Joi.string().allow("").required(), - body: ContentPlatformModel.CustomFieldRequestSchema().required(), - }).required(); - } - - /** @returns {UpdateCustomFieldDefinitionBySlugParam} */ - static updateCustomFieldDefinitionBySlug() { - return Joi.object({ - slug: Joi.string().allow("").required(), - resource: Joi.string().allow("").required(), - namespace: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), body: ContentPlatformModel.CustomFieldDefinitionRequestSchema().required(), }).required(); } - /** @returns {UpdateCustomObjectBySlugParam} */ - static updateCustomObjectBySlug() { + /** @returns {UpdateCustomObjectParam} */ + static updateCustomObject() { return Joi.object({ - definitionSlug: Joi.string().allow("").required(), - slug: Joi.string().allow("").required(), - body: ContentPlatformModel.CustomObjectRequestSchemaWithoutId().required(), + metaobjectId: Joi.string().allow("").required(), + body: ContentPlatformModel.CustomObjectRequestSchema().required(), }).required(); } - /** @returns {UpdateCustomObjectDefinitionBySlugParam} */ - static updateCustomObjectDefinitionBySlug() { + /** @returns {UpdateCustomObjectDefinitionParam} */ + static updateCustomObjectDefinition() { return Joi.object({ - slug: Joi.string().allow("").required(), + definitionId: Joi.string().allow("").required(), body: ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema().required(), }).required(); } diff --git a/sdk/platform/Discount/DiscountPlatformClient.d.ts b/sdk/platform/Discount/DiscountPlatformClient.d.ts index 680b492fa..e23dc98bf 100644 --- a/sdk/platform/Discount/DiscountPlatformClient.d.ts +++ b/sdk/platform/Discount/DiscountPlatformClient.d.ts @@ -6,24 +6,22 @@ declare class Discount { * @param {DiscountPlatformValidator.CancelDownloadJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name cancelDownloadJob * @summary: delete discount download job * @description: Cancel a discount download job by its id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/cancelDownloadJob/). */ - cancelDownloadJob({ id, requestHeaders }?: DiscountPlatformValidator.CancelDownloadJobParam, { responseHeaders }?: object): Promise; + cancelDownloadJob({ id, requestHeaders }?: DiscountPlatformValidator.CancelDownloadJobParam, { responseHeaders }?: object): Promise; /** * @param {DiscountPlatformValidator.CancelValidationJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name cancelValidationJob * @summary: deletel validation job discount * @description: Cancel validation job of a discount by its id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/cancelValidationJob/). */ - cancelValidationJob({ id, requestHeaders }?: DiscountPlatformValidator.CancelValidationJobParam, { responseHeaders }?: object): Promise; + cancelValidationJob({ id, requestHeaders }?: DiscountPlatformValidator.CancelValidationJobParam, { responseHeaders }?: object): Promise; /** * @param {DiscountPlatformValidator.CreateDiscountParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -38,12 +36,12 @@ declare class Discount { * @param {DiscountPlatformValidator.DownloadDiscountFileParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name downloadDiscountFile * @summary: Get discount file * @description: Retrieve a discount file by its type, it could be product or inventory. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/downloadDiscountFile/). */ - downloadDiscountFile({ type, body, requestHeaders }?: DiscountPlatformValidator.DownloadDiscountFileParam, { responseHeaders }?: object): Promise; + downloadDiscountFile({ type, body, requestHeaders }?: DiscountPlatformValidator.DownloadDiscountFileParam, { responseHeaders }?: object): Promise; /** * @param {DiscountPlatformValidator.GetDiscountParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -68,22 +66,22 @@ declare class Discount { * @param {DiscountPlatformValidator.GetDownloadJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getDownloadJob * @summary: List discount download job * @description: Retrieve a discount download job by its id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/getDownloadJob/). */ - getDownloadJob({ id, requestHeaders }?: DiscountPlatformValidator.GetDownloadJobParam, { responseHeaders }?: object): Promise; + getDownloadJob({ id, requestHeaders }?: DiscountPlatformValidator.GetDownloadJobParam, { responseHeaders }?: object): Promise; /** * @param {DiscountPlatformValidator.GetValidationJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getValidationJob * @summary: List validation job discount * @description: Retrieve a validation job of a discount by its id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/getValidationJob/). */ - getValidationJob({ id, requestHeaders }?: DiscountPlatformValidator.GetValidationJobParam, { responseHeaders }?: object): Promise; + getValidationJob({ id, requestHeaders }?: DiscountPlatformValidator.GetValidationJobParam, { responseHeaders }?: object): Promise; /** * @param {DiscountPlatformValidator.UpdateDiscountParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -108,12 +106,12 @@ declare class Discount { * @param {DiscountPlatformValidator.ValidateDiscountFileParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name validateDiscountFile * @summary: Validate discount file * @description: Validates the discount file for any discrepancies. like item should be valid etc.. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/validateDiscountFile/). */ - validateDiscountFile({ body, discount, requestHeaders }?: DiscountPlatformValidator.ValidateDiscountFileParam, { responseHeaders }?: object): Promise; + validateDiscountFile({ body, discount, requestHeaders }?: DiscountPlatformValidator.ValidateDiscountFileParam, { responseHeaders }?: object): Promise; } import DiscountPlatformValidator = require("./DiscountPlatformValidator"); import DiscountPlatformModel = require("./DiscountPlatformModel"); diff --git a/sdk/platform/Discount/DiscountPlatformClient.js b/sdk/platform/Discount/DiscountPlatformClient.js index 770bc1320..ddf4c12d3 100644 --- a/sdk/platform/Discount/DiscountPlatformClient.js +++ b/sdk/platform/Discount/DiscountPlatformClient.js @@ -18,8 +18,7 @@ class Discount { * @param {DiscountPlatformValidator.CancelDownloadJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name cancelDownloadJob * @summary: delete discount download job * @description: Cancel a discount download job by its id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/cancelDownloadJob/). @@ -75,7 +74,7 @@ class Discount { const { error: res_error, - } = DiscountPlatformModel.CancelJobResponseSchema().validate(responseData, { + } = DiscountPlatformModel.CancelJobResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -98,8 +97,7 @@ class Discount { * @param {DiscountPlatformValidator.CancelValidationJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name cancelValidationJob * @summary: deletel validation job discount * @description: Cancel validation job of a discount by its id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/cancelValidationJob/). @@ -155,7 +153,7 @@ class Discount { const { error: res_error, - } = DiscountPlatformModel.CancelJobResponseSchema().validate(responseData, { + } = DiscountPlatformModel.CancelJobResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -257,7 +255,7 @@ class Discount { * @param {DiscountPlatformValidator.DownloadDiscountFileParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name downloadDiscountFile * @summary: Get discount file * @description: Retrieve a discount file by its type, it could be product or inventory. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/downloadDiscountFile/). @@ -315,7 +313,7 @@ class Discount { const { error: res_error, - } = DiscountPlatformModel.FileJobResponseSchema().validate(responseData, { + } = DiscountPlatformModel.FileJobResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -532,7 +530,7 @@ class Discount { * @param {DiscountPlatformValidator.GetDownloadJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getDownloadJob * @summary: List discount download job * @description: Retrieve a discount download job by its id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/getDownloadJob/). @@ -588,7 +586,7 @@ class Discount { const { error: res_error, - } = DiscountPlatformModel.FileJobResponseSchema().validate(responseData, { + } = DiscountPlatformModel.FileJobResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -611,7 +609,7 @@ class Discount { * @param {DiscountPlatformValidator.GetValidationJobParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getValidationJob * @summary: List validation job discount * @description: Retrieve a validation job of a discount by its id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/getValidationJob/). @@ -667,7 +665,7 @@ class Discount { const { error: res_error, - } = DiscountPlatformModel.FileJobResponseSchema().validate(responseData, { + } = DiscountPlatformModel.FileJobResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -850,7 +848,7 @@ class Discount { * @param {DiscountPlatformValidator.ValidateDiscountFileParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name validateDiscountFile * @summary: Validate discount file * @description: Validates the discount file for any discrepancies. like item should be valid etc.. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/validateDiscountFile/). @@ -909,7 +907,7 @@ class Discount { const { error: res_error, - } = DiscountPlatformModel.FileJobResponseSchema().validate(responseData, { + } = DiscountPlatformModel.FileJobResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/platform/Discount/DiscountPlatformModel.d.ts b/sdk/platform/Discount/DiscountPlatformModel.d.ts index 2d4c7fa1d..51357be6e 100644 --- a/sdk/platform/Discount/DiscountPlatformModel.d.ts +++ b/sdk/platform/Discount/DiscountPlatformModel.d.ts @@ -97,7 +97,7 @@ export = DiscountPlatformModel; * @property {DiscountItems[]} items */ /** - * @typedef FileJobResponseSchema + * @typedef FileJobResponse * @property {string} stage * @property {number} total * @property {number} failed @@ -115,7 +115,7 @@ export = DiscountPlatformModel; * @property {UserDetails} [created_by] */ /** - * @typedef FileJobRequestSchema + * @typedef FileJobRequest * @property {string} name * @property {boolean} is_active * @property {number} company_id @@ -135,7 +135,7 @@ export = DiscountPlatformModel; * @property {number[]} [store_ids] */ /** - * @typedef CancelJobResponseSchema + * @typedef CancelJobResponse * @property {boolean} success */ /** @@ -170,7 +170,7 @@ export = DiscountPlatformModel; declare class DiscountPlatformModel { } declare namespace DiscountPlatformModel { - export { ValidityObject, CreateUpdateDiscount, DiscountMeta, DiscountJob, FileJobBody, ListOrCalender, DiscountItems, BulkDiscount, FileJobResponseSchema, FileJobRequestSchema, DownloadFileJob, CancelJobResponseSchema, Page, UserDetails, BadRequestObject, BadRequestData, BadRequestObjectGet }; + export { ValidityObject, CreateUpdateDiscount, DiscountMeta, DiscountJob, FileJobBody, ListOrCalender, DiscountItems, BulkDiscount, FileJobResponse, FileJobRequest, DownloadFileJob, CancelJobResponse, Page, UserDetails, BadRequestObject, BadRequestData, BadRequestObjectGet }; } /** @returns {ValidityObject} */ declare function ValidityObject(): ValidityObject; @@ -286,9 +286,9 @@ type BulkDiscount = { company_id: number; items: DiscountItems[]; }; -/** @returns {FileJobResponseSchema} */ -declare function FileJobResponseSchema(): FileJobResponseSchema; -type FileJobResponseSchema = { +/** @returns {FileJobResponse} */ +declare function FileJobResponse(): FileJobResponse; +type FileJobResponse = { stage: string; total: number; failed: number; @@ -308,9 +308,9 @@ type FileJobResponseSchema = { modified_on?: string; created_by?: UserDetails; }; -/** @returns {FileJobRequestSchema} */ -declare function FileJobRequestSchema(): FileJobRequestSchema; -type FileJobRequestSchema = { +/** @returns {FileJobRequest} */ +declare function FileJobRequest(): FileJobRequest; +type FileJobRequest = { name: string; is_active: boolean; company_id: number; @@ -330,9 +330,9 @@ type DownloadFileJob = { brand_ids?: number[]; store_ids?: number[]; }; -/** @returns {CancelJobResponseSchema} */ -declare function CancelJobResponseSchema(): CancelJobResponseSchema; -type CancelJobResponseSchema = { +/** @returns {CancelJobResponse} */ +declare function CancelJobResponse(): CancelJobResponse; +type CancelJobResponse = { success: boolean; }; /** @returns {Page} */ diff --git a/sdk/platform/Discount/DiscountPlatformModel.js b/sdk/platform/Discount/DiscountPlatformModel.js index b1574a7c6..d63d660ce 100644 --- a/sdk/platform/Discount/DiscountPlatformModel.js +++ b/sdk/platform/Discount/DiscountPlatformModel.js @@ -106,7 +106,7 @@ const Joi = require("joi"); */ /** - * @typedef FileJobResponseSchema + * @typedef FileJobResponse * @property {string} stage * @property {number} total * @property {number} failed @@ -125,7 +125,7 @@ const Joi = require("joi"); */ /** - * @typedef FileJobRequestSchema + * @typedef FileJobRequest * @property {string} name * @property {boolean} is_active * @property {number} company_id @@ -147,7 +147,7 @@ const Joi = require("joi"); */ /** - * @typedef CancelJobResponseSchema + * @typedef CancelJobResponse * @property {boolean} success */ @@ -246,7 +246,7 @@ class DiscountPlatformModel { modified_on: Joi.string().allow("").required(), created_by: DiscountPlatformModel.UserDetails().required(), modified_by: DiscountPlatformModel.UserDetails().required(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), }); } @@ -272,7 +272,7 @@ class DiscountPlatformModel { modified_on: Joi.string().allow(""), created_by: DiscountPlatformModel.UserDetails(), modified_by: DiscountPlatformModel.UserDetails(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), }); } @@ -306,8 +306,8 @@ class DiscountPlatformModel { }); } - /** @returns {FileJobResponseSchema} */ - static FileJobResponseSchema() { + /** @returns {FileJobResponse} */ + static FileJobResponse() { return Joi.object({ stage: Joi.string().allow("").required(), total: Joi.number().required(), @@ -327,8 +327,8 @@ class DiscountPlatformModel { }); } - /** @returns {FileJobRequestSchema} */ - static FileJobRequestSchema() { + /** @returns {FileJobRequest} */ + static FileJobRequest() { return Joi.object({ name: Joi.string().allow("").required(), is_active: Joi.boolean().required(), @@ -341,7 +341,7 @@ class DiscountPlatformModel { brand_ids: Joi.array().items(Joi.number()), store_ids: Joi.array().items(Joi.number()), validity: DiscountPlatformModel.ValidityObject().required(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), }); } @@ -353,8 +353,8 @@ class DiscountPlatformModel { }); } - /** @returns {CancelJobResponseSchema} */ - static CancelJobResponseSchema() { + /** @returns {CancelJobResponse} */ + static CancelJobResponse() { return Joi.object({ success: Joi.boolean().required(), }); diff --git a/sdk/platform/Discount/DiscountPlatformValidator.d.ts b/sdk/platform/Discount/DiscountPlatformValidator.d.ts index c7daaad9d..7d667e4d6 100644 --- a/sdk/platform/Discount/DiscountPlatformValidator.d.ts +++ b/sdk/platform/Discount/DiscountPlatformValidator.d.ts @@ -54,7 +54,7 @@ export = DiscountPlatformValidator; /** * @typedef ValidateDiscountFileParam * @property {string} [discount] - Discount - * @property {DiscountPlatformModel.FileJobRequestSchema} body + * @property {DiscountPlatformModel.FileJobRequest} body */ declare class DiscountPlatformValidator { /** @returns {CancelDownloadJobParam} */ @@ -181,6 +181,6 @@ type ValidateDiscountFileParam = { * - Discount */ discount?: string; - body: DiscountPlatformModel.FileJobRequestSchema; + body: DiscountPlatformModel.FileJobRequest; }; import DiscountPlatformModel = require("./DiscountPlatformModel"); diff --git a/sdk/platform/Discount/DiscountPlatformValidator.js b/sdk/platform/Discount/DiscountPlatformValidator.js index a74c536b7..1b41e3c57 100644 --- a/sdk/platform/Discount/DiscountPlatformValidator.js +++ b/sdk/platform/Discount/DiscountPlatformValidator.js @@ -67,7 +67,7 @@ const DiscountPlatformModel = require("./DiscountPlatformModel"); /** * @typedef ValidateDiscountFileParam * @property {string} [discount] - Discount - * @property {DiscountPlatformModel.FileJobRequestSchema} body + * @property {DiscountPlatformModel.FileJobRequest} body */ class DiscountPlatformValidator { @@ -156,7 +156,7 @@ class DiscountPlatformValidator { static validateDiscountFile() { return Joi.object({ discount: Joi.string().allow(""), - body: DiscountPlatformModel.FileJobRequestSchema().required(), + body: DiscountPlatformModel.FileJobRequest().required(), }).required(); } } diff --git a/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts b/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts index f951fc1ad..572aa78b7 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +++ b/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts @@ -9,20 +9,20 @@ declare class FileStorage { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name appCompleteUpload - * @summary: Application complete upload. - * @description: Finish uploading a file from an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCompleteUpload/). + * @summary: Complete file upload for Application + * @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database on platform at application level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCompleteUpload/). */ - appCompleteUpload({ namespace, body, requestHeaders }?: FileStoragePlatformApplicationValidator.AppCompleteUploadParam, { responseHeaders }?: object): Promise; + appCompleteUpload({ namespace, body, requestHeaders }?: FileStoragePlatformApplicationValidator.AppCompleteUploadParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformApplicationValidator.AppCopyFilesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name appCopyFiles - * @summary: Application copy files. - * @description: Copy files from an application to another location. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCopyFiles/). + * @summary: Copy files for Application + * @description: Handle multiple file uploads, updating progress and providing detailed status reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCopyFiles/). */ appCopyFiles({ body, sync, requestHeaders }?: FileStoragePlatformApplicationValidator.AppCopyFilesParam, { responseHeaders }?: object): Promise; /** @@ -31,20 +31,20 @@ declare class FileStorage { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name appStartUpload - * @summary: Application start upload. - * @description: Start uploading a file from an application and returns a storage link in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appStartUpload/). + * @summary: Initiates file upload for Application + * @description: Inititates the process of uploading a file to storage location, and returns a storage link in response on platofrm at application level. Please refer group description for more details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appStartUpload/). */ - appStartUpload({ namespace, body, requestHeaders }?: FileStoragePlatformApplicationValidator.AppStartUploadParam, { responseHeaders }?: object): Promise; + appStartUpload({ namespace, body, requestHeaders }?: FileStoragePlatformApplicationValidator.AppStartUploadParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformApplicationValidator.AppbrowseParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name appbrowse - * @summary: Application browse files. - * @description: Browse files within an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appbrowse/). + * @summary: Browse files for Application + * @description: View and navigate through available files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appbrowse/). */ appbrowse({ namespace, page, limit, search, requestHeaders }?: FileStoragePlatformApplicationValidator.AppbrowseParam, { responseHeaders }?: object): Promise; /** @@ -53,47 +53,10 @@ declare class FileStorage { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name browsefiles - * @summary: Browse Files - * @description: Browse Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/browsefiles/). + * @summary: Browse files for Application + * @description: View and navigate through available files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/browsefiles/). */ browsefiles({ namespace, body, page, limit, search, requestHeaders }?: FileStoragePlatformApplicationValidator.BrowsefilesParam, { responseHeaders }?: object): Promise; - /** - * @param {FileStoragePlatformApplicationValidator.DeletePdfGeneratorConfigParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deletePdfGeneratorConfig - * @summary: Delete a PDF generator configuration - * @description: Deletes a specific PDF generator configuration based on the provided id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/deletePdfGeneratorConfig/). - */ - deletePdfGeneratorConfig({ id, requestHeaders }?: FileStoragePlatformApplicationValidator.DeletePdfGeneratorConfigParam, { responseHeaders }?: object): Promise; - /** - * @param {FileStoragePlatformApplicationValidator.FetchPdfDefaultTemplateByIdParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name fetchPdfDefaultTemplateById - * @summary: get default html template for invoice or label - * @description: get default html template for invoice such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/fetchPdfDefaultTemplateById/). - */ - fetchPdfDefaultTemplateById({ id, requestHeaders }?: FileStoragePlatformApplicationValidator.FetchPdfDefaultTemplateByIdParam, { responseHeaders }?: object): Promise; - /** - * @param {FileStoragePlatformApplicationValidator.FetchPdfTypeByIdParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name fetchPdfTypeById - * @summary: Get the pdf types of by id - * @description: Get the pdf types of PDF formats for filter - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/fetchPdfTypeById/). - */ - fetchPdfTypeById({ id, requestHeaders }?: FileStoragePlatformApplicationValidator.FetchPdfTypeByIdParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformApplicationValidator.GeneratePaymentReceiptParam} arg * - Arg object @@ -102,34 +65,36 @@ declare class FileStorage { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name generatePaymentReceipt - * @summary: Generate payment receipt. + * @summary: Generate payment receipt * @description: Generate Payment Receipt for Jiomart Digital - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/generatePaymentReceipt/). */ generatePaymentReceipt({ body, requestHeaders }?: FileStoragePlatformApplicationValidator.GeneratePaymentReceiptParam, { responseHeaders }?: object): Promise; /** - * @param {FileStoragePlatformApplicationValidator.GetConfigHtmlTemplateByIdParam} arg + * @param {FileStoragePlatformApplicationValidator.GetDefaultHtmlTemplateParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getConfigHtmlTemplateById - * @summary: Update html template for invoice or label - * @description: Update html template for invoice such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getConfigHtmlTemplateById/). + * @returns {Promise} - Success response + * @name getDefaultHtmlTemplate + * @summary: Get html template for Application + * @description: Get the saved html template for provided sales channel + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultHtmlTemplate/). */ - getConfigHtmlTemplateById({ id, requestHeaders }?: FileStoragePlatformApplicationValidator.GetConfigHtmlTemplateByIdParam, { responseHeaders }?: object): Promise; + getDefaultHtmlTemplate({ pdfTypeId, format, countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetDefaultHtmlTemplateParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformApplicationValidator.GetDefaultPdfDataParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name getDefaultPdfData - * @summary: Get default PDF data. - * @description: Retrieve default data for PDF generation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/). + * @summary: Get default PDF data + * @description: Retrieve default pdf payload data for invoice generation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/). */ - getDefaultPdfData({ pdfTypeId, countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetDefaultPdfDataParam, { responseHeaders }?: object): Promise; + getDefaultPdfData({ pdfTypeId, countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetDefaultPdfDataParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformApplicationValidator.GetDefaultPdfTemplateParam} arg * - Arg object @@ -139,44 +104,21 @@ declare class FileStorage { * @returns {Promise} - * Success response * @name getDefaultPdfTemplate - * @summary: Get default PDF template. - * @description: Retrieve the default PDF template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/). + * @summary: Get default PDF template + * @description: Retrieve to get the default Invoice template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/). */ getDefaultPdfTemplate({ pdfTypeId, format, countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetDefaultPdfTemplateParam, { responseHeaders }?: object): Promise; - /** - * @param {FileStoragePlatformApplicationValidator.GetHtmlTemplateConfigParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getHtmlTemplateConfig - * @summary: Get html template for sales channel - * @description: Get default html template for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getHtmlTemplateConfig/). - */ - getHtmlTemplateConfig({ pdfTypeId, format, countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetHtmlTemplateConfigParam, { responseHeaders }?: object): Promise; - /** - * @param {FileStoragePlatformApplicationValidator.GetPdfPayloadByIdParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPdfPayloadById - * @summary: Get default PDF data. - * @description: Retrieve default data for PDF generation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfPayloadById/). - */ - getPdfPayloadById({ id, requestHeaders }?: FileStoragePlatformApplicationValidator.GetPdfPayloadByIdParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformApplicationValidator.GetPdfTypesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name getPdfTypes - * @summary: Get all the supported invoice pdf types - * @description: Get all the supported invoice pdf types such as Invoice, Label, Delivery challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/). + * @summary: Get PDF types + * @description: Retrieve a list of available invoice types. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/). */ - getPdfTypes({ storeOs, countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetPdfTypesParam, { responseHeaders }?: object): Promise; + getPdfTypes({ countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetPdfTypesParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformApplicationValidator.SaveHtmlTemplateParam} arg * - Arg object @@ -186,8 +128,8 @@ declare class FileStorage { * @returns {Promise} - * Success response * @name saveHtmlTemplate - * @summary: Save HTML template. - * @description: Store an HTML template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/saveHtmlTemplate/). + * @summary: Save PDF template + * @description: Save html template for provided sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/saveHtmlTemplate/). */ saveHtmlTemplate({ body, requestHeaders }?: FileStoragePlatformApplicationValidator.SaveHtmlTemplateParam, { responseHeaders }?: object): Promise; /** diff --git a/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js b/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js index 76efcd571..cb4f40ef0 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +++ b/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js @@ -23,10 +23,10 @@ class FileStorage { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name appCompleteUpload - * @summary: Application complete upload. - * @description: Finish uploading a file from an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCompleteUpload/). + * @summary: Complete file upload for Application + * @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database on platform at application level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCompleteUpload/). */ async appCompleteUpload( { namespace, body, requestHeaders } = { requestHeaders: {} }, @@ -69,7 +69,7 @@ class FileStorage { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/assets/v2.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/complete`, + `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/complete`, query_params, body, requestHeaders, @@ -83,7 +83,7 @@ class FileStorage { const { error: res_error, - } = FileStoragePlatformModel.FileUploadComplete().validate(responseData, { + } = FileStoragePlatformModel.CompleteResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -108,8 +108,8 @@ class FileStorage { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name appCopyFiles - * @summary: Application copy files. - * @description: Copy files from an application to another location. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCopyFiles/). + * @summary: Copy files for Application + * @description: Handle multiple file uploads, updating progress and providing detailed status reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appCopyFiles/). */ async appCopyFiles( { body, sync, requestHeaders } = { requestHeaders: {} }, @@ -188,10 +188,10 @@ class FileStorage { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name appStartUpload - * @summary: Application start upload. - * @description: Start uploading a file from an application and returns a storage link in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appStartUpload/). + * @summary: Initiates file upload for Application + * @description: Inititates the process of uploading a file to storage location, and returns a storage link in response on platofrm at application level. Please refer group description for more details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appStartUpload/). */ async appStartUpload( { namespace, body, requestHeaders } = { requestHeaders: {} }, @@ -234,7 +234,7 @@ class FileStorage { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/assets/v2.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/start`, + `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/upload/start`, query_params, body, requestHeaders, @@ -248,7 +248,7 @@ class FileStorage { const { error: res_error, - } = FileStoragePlatformModel.FileUpload().validate(responseData, { + } = FileStoragePlatformModel.StartResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -273,8 +273,8 @@ class FileStorage { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name appbrowse - * @summary: Application browse files. - * @description: Browse files within an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appbrowse/). + * @summary: Browse files for Application + * @description: View and navigate through available files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appbrowse/). */ async appbrowse( { namespace, page, limit, search, requestHeaders } = { requestHeaders: {} }, @@ -361,8 +361,8 @@ class FileStorage { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name browsefiles - * @summary: Browse Files - * @description: Browse Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/browsefiles/). + * @summary: Browse files for Application + * @description: View and navigate through available files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/browsefiles/). */ async browsefiles( { namespace, body, page, limit, search, requestHeaders } = { @@ -447,248 +447,6 @@ class FileStorage { return response; } - /** - * @param {FileStoragePlatformApplicationValidator.DeletePdfGeneratorConfigParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deletePdfGeneratorConfig - * @summary: Delete a PDF generator configuration - * @description: Deletes a specific PDF generator configuration based on the provided id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/deletePdfGeneratorConfig/). - */ - async deletePdfGeneratorConfig( - { id, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = FileStoragePlatformApplicationValidator.deletePdfGeneratorConfig().validate( - { - id, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = FileStoragePlatformApplicationValidator.deletePdfGeneratorConfig().validate( - { - id, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > FileStorage > deletePdfGeneratorConfig \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "delete", - `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config/${id}`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { error: res_error } = Joi.any().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > FileStorage > deletePdfGeneratorConfig \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {FileStoragePlatformApplicationValidator.FetchPdfDefaultTemplateByIdParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name fetchPdfDefaultTemplateById - * @summary: get default html template for invoice or label - * @description: get default html template for invoice such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/fetchPdfDefaultTemplateById/). - */ - async fetchPdfDefaultTemplateById( - { id, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = FileStoragePlatformApplicationValidator.fetchPdfDefaultTemplateById().validate( - { - id, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = FileStoragePlatformApplicationValidator.fetchPdfDefaultTemplateById().validate( - { - id, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > FileStorage > fetchPdfDefaultTemplateById \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "get", - `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/default-template/${id}`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = FileStoragePlatformModel.PdfDefaultTemplateById().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > FileStorage > fetchPdfDefaultTemplateById \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {FileStoragePlatformApplicationValidator.FetchPdfTypeByIdParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name fetchPdfTypeById - * @summary: Get the pdf types of by id - * @description: Get the pdf types of PDF formats for filter - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/fetchPdfTypeById/). - */ - async fetchPdfTypeById( - { id, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = FileStoragePlatformApplicationValidator.fetchPdfTypeById().validate( - { - id, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = FileStoragePlatformApplicationValidator.fetchPdfTypeById().validate( - { - id, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > FileStorage > fetchPdfTypeById \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "get", - `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/types/${id}`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = FileStoragePlatformModel.PdfTypeByIdDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > FileStorage > fetchPdfTypeById \n ${res_error}`, - }); - } - } - - return response; - } - /** * @param {FileStoragePlatformApplicationValidator.GeneratePaymentReceiptParam} arg * - Arg object @@ -697,7 +455,7 @@ class FileStorage { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name generatePaymentReceipt - * @summary: Generate payment receipt. + * @summary: Generate payment receipt * @description: Generate Payment Receipt for Jiomart Digital - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/generatePaymentReceipt/). */ async generatePaymentReceipt( @@ -769,25 +527,28 @@ class FileStorage { } /** - * @param {FileStoragePlatformApplicationValidator.GetConfigHtmlTemplateByIdParam} arg + * @param {FileStoragePlatformApplicationValidator.GetDefaultHtmlTemplateParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getConfigHtmlTemplateById - * @summary: Update html template for invoice or label - * @description: Update html template for invoice such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getConfigHtmlTemplateById/). + * @returns {Promise} - Success response + * @name getDefaultHtmlTemplate + * @summary: Get html template for Application + * @description: Get the saved html template for provided sales channel + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultHtmlTemplate/). */ - async getConfigHtmlTemplateById( - { id, requestHeaders } = { requestHeaders: {} }, + async getDefaultHtmlTemplate( + { pdfTypeId, format, countryCode, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = FileStoragePlatformApplicationValidator.getConfigHtmlTemplateById().validate( + } = FileStoragePlatformApplicationValidator.getDefaultHtmlTemplate().validate( { - id, + pdfTypeId, + format, + countryCode, }, { abortEarly: false, allowUnknown: true } ); @@ -798,25 +559,30 @@ class FileStorage { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = FileStoragePlatformApplicationValidator.getConfigHtmlTemplateById().validate( + } = FileStoragePlatformApplicationValidator.getDefaultHtmlTemplate().validate( { - id, + pdfTypeId, + format, + countryCode, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > FileStorage > getConfigHtmlTemplateById \n ${warrning}`, + message: `Parameter Validation warrnings for platform > FileStorage > getDefaultHtmlTemplate \n ${warrning}`, }); } const query_params = {}; + query_params["pdf_type_id"] = pdfTypeId; + query_params["format"] = format; + query_params["country_code"] = countryCode; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config/${id}`, + `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config`, query_params, undefined, requestHeaders, @@ -828,7 +594,9 @@ class FileStorage { responseData = response[0]; } - const { error: res_error } = Joi.any().validate(responseData, { + const { + error: res_error, + } = FileStoragePlatformModel.PdfConfigSuccess().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -839,7 +607,7 @@ class FileStorage { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > FileStorage > getConfigHtmlTemplateById \n ${res_error}`, + message: `Response Validation Warnings for platform > FileStorage > getDefaultHtmlTemplate \n ${res_error}`, }); } } @@ -853,10 +621,11 @@ class FileStorage { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name getDefaultPdfData - * @summary: Get default PDF data. - * @description: Retrieve default data for PDF generation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/). + * @summary: Get default PDF data + * @description: Retrieve default pdf payload data for invoice generation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/). */ async getDefaultPdfData( { pdfTypeId, countryCode, requestHeaders } = { requestHeaders: {} }, @@ -913,10 +682,10 @@ class FileStorage { const { error: res_error, - } = FileStoragePlatformModel.PdfDataItemsDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = FileStoragePlatformModel.DummyTemplateDataItems().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -941,8 +710,8 @@ class FileStorage { * @returns {Promise} - * Success response * @name getDefaultPdfTemplate - * @summary: Get default PDF template. - * @description: Retrieve the default PDF template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/). + * @summary: Get default PDF template + * @description: Retrieve to get the default Invoice template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/). */ async getDefaultPdfTemplate( { pdfTypeId, format, countryCode, requestHeaders } = { requestHeaders: {} }, @@ -1021,193 +790,24 @@ class FileStorage { return response; } - /** - * @param {FileStoragePlatformApplicationValidator.GetHtmlTemplateConfigParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getHtmlTemplateConfig - * @summary: Get html template for sales channel - * @description: Get default html template for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getHtmlTemplateConfig/). - */ - async getHtmlTemplateConfig( - { pdfTypeId, format, countryCode, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = FileStoragePlatformApplicationValidator.getHtmlTemplateConfig().validate( - { - pdfTypeId, - format, - countryCode, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = FileStoragePlatformApplicationValidator.getHtmlTemplateConfig().validate( - { - pdfTypeId, - format, - countryCode, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > FileStorage > getHtmlTemplateConfig \n ${warrning}`, - }); - } - - const query_params = {}; - query_params["pdf_type_id"] = pdfTypeId; - query_params["format"] = format; - query_params["country_code"] = countryCode; - - const response = await PlatformAPIClient.execute( - this.config, - "get", - `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/config`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = FileStoragePlatformModel.PdfConfigSuccess().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > FileStorage > getHtmlTemplateConfig \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {FileStoragePlatformApplicationValidator.GetPdfPayloadByIdParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPdfPayloadById - * @summary: Get default PDF data. - * @description: Retrieve default data for PDF generation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfPayloadById/). - */ - async getPdfPayloadById( - { id, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = FileStoragePlatformApplicationValidator.getPdfPayloadById().validate( - { - id, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = FileStoragePlatformApplicationValidator.getPdfPayloadById().validate( - { - id, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > FileStorage > getPdfPayloadById \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "get", - `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pdf/mapper/${id}`, - query_params, - undefined, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = FileStoragePlatformModel.MapperDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > FileStorage > getPdfPayloadById \n ${res_error}`, - }); - } - } - - return response; - } - /** * @param {FileStoragePlatformApplicationValidator.GetPdfTypesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name getPdfTypes - * @summary: Get all the supported invoice pdf types - * @description: Get all the supported invoice pdf types such as Invoice, Label, Delivery challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/). + * @summary: Get PDF types + * @description: Retrieve a list of available invoice types. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/). */ async getPdfTypes( - { storeOs, countryCode, requestHeaders } = { requestHeaders: {} }, + { countryCode, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, } = FileStoragePlatformApplicationValidator.getPdfTypes().validate( { - storeOs, countryCode, }, { abortEarly: false, allowUnknown: true } @@ -1221,7 +821,6 @@ class FileStorage { error: warrning, } = FileStoragePlatformApplicationValidator.getPdfTypes().validate( { - storeOs, countryCode, }, { abortEarly: false, allowUnknown: false } @@ -1235,7 +834,6 @@ class FileStorage { const query_params = {}; query_params["country_code"] = countryCode; - query_params["store_os"] = storeOs; const response = await PlatformAPIClient.execute( this.config, @@ -1254,7 +852,7 @@ class FileStorage { const { error: res_error, - } = FileStoragePlatformModel.InvoiceTypes().validate(responseData, { + } = FileStoragePlatformModel.InvoiceTypesResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1282,8 +880,8 @@ class FileStorage { * @returns {Promise} - * Success response * @name saveHtmlTemplate - * @summary: Save HTML template. - * @description: Store an HTML template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/saveHtmlTemplate/). + * @summary: Save PDF template + * @description: Save html template for provided sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/saveHtmlTemplate/). */ async saveHtmlTemplate( { body, requestHeaders } = { requestHeaders: {} }, diff --git a/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts b/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts index c2666370c..426d7a930 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +++ b/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts @@ -5,7 +5,7 @@ export = FileStoragePlatformApplicationValidator; * files(products, orders, logistics etc), Required for validating the data of * the file being uploaded, decides where exactly the file will be stored * inside the storage bucket. - * @property {FileStoragePlatformModel.FileUpload} body + * @property {FileStoragePlatformModel.StartResponse} body */ /** * @typedef AppCopyFilesParam @@ -18,7 +18,7 @@ export = FileStoragePlatformApplicationValidator; * files(products, orders, logistics etc), Required for validating the data of * the file being uploaded, decides where exactly the file will be stored * inside the storage bucket. - * @property {FileStoragePlatformModel.FileUploadStart} body + * @property {FileStoragePlatformModel.StartRequest} body */ /** * @typedef AppbrowseParam @@ -41,51 +41,30 @@ export = FileStoragePlatformApplicationValidator; * @property {string} [search] - Search * @property {FileStoragePlatformModel.ExtensionSlug} body */ -/** - * @typedef DeletePdfGeneratorConfigParam - * @property {string} id - */ -/** - * @typedef FetchPdfDefaultTemplateByIdParam - * @property {string} id - */ -/** - * @typedef FetchPdfTypeByIdParam - * @property {string} id - */ /** * @typedef GeneratePaymentReceiptParam * @property {FileStoragePlatformModel.PaymentReceiptRequestBody} body */ /** - * @typedef GetConfigHtmlTemplateByIdParam - * @property {string} id - */ -/** - * @typedef GetDefaultPdfDataParam + * @typedef GetDefaultHtmlTemplateParam * @property {number} pdfTypeId + * @property {string} format * @property {string} [countryCode] */ /** - * @typedef GetDefaultPdfTemplateParam + * @typedef GetDefaultPdfDataParam * @property {number} pdfTypeId - * @property {string} format * @property {string} [countryCode] */ /** - * @typedef GetHtmlTemplateConfigParam + * @typedef GetDefaultPdfTemplateParam * @property {number} pdfTypeId * @property {string} format * @property {string} [countryCode] */ -/** - * @typedef GetPdfPayloadByIdParam - * @property {string} id - */ /** * @typedef GetPdfTypesParam * @property {string} [countryCode] - * @property {boolean} storeOs */ /** * @typedef SaveHtmlTemplateParam @@ -107,24 +86,14 @@ declare class FileStoragePlatformApplicationValidator { static appbrowse(): AppbrowseParam; /** @returns {BrowsefilesParam} */ static browsefiles(): BrowsefilesParam; - /** @returns {DeletePdfGeneratorConfigParam} */ - static deletePdfGeneratorConfig(): DeletePdfGeneratorConfigParam; - /** @returns {FetchPdfDefaultTemplateByIdParam} */ - static fetchPdfDefaultTemplateById(): FetchPdfDefaultTemplateByIdParam; - /** @returns {FetchPdfTypeByIdParam} */ - static fetchPdfTypeById(): FetchPdfTypeByIdParam; /** @returns {GeneratePaymentReceiptParam} */ static generatePaymentReceipt(): GeneratePaymentReceiptParam; - /** @returns {GetConfigHtmlTemplateByIdParam} */ - static getConfigHtmlTemplateById(): GetConfigHtmlTemplateByIdParam; + /** @returns {GetDefaultHtmlTemplateParam} */ + static getDefaultHtmlTemplate(): GetDefaultHtmlTemplateParam; /** @returns {GetDefaultPdfDataParam} */ static getDefaultPdfData(): GetDefaultPdfDataParam; /** @returns {GetDefaultPdfTemplateParam} */ static getDefaultPdfTemplate(): GetDefaultPdfTemplateParam; - /** @returns {GetHtmlTemplateConfigParam} */ - static getHtmlTemplateConfig(): GetHtmlTemplateConfigParam; - /** @returns {GetPdfPayloadByIdParam} */ - static getPdfPayloadById(): GetPdfPayloadByIdParam; /** @returns {GetPdfTypesParam} */ static getPdfTypes(): GetPdfTypesParam; /** @returns {SaveHtmlTemplateParam} */ @@ -133,7 +102,7 @@ declare class FileStoragePlatformApplicationValidator { static updateHtmlTemplate(): UpdateHtmlTemplateParam; } declare namespace FileStoragePlatformApplicationValidator { - export { AppCompleteUploadParam, AppCopyFilesParam, AppStartUploadParam, AppbrowseParam, BrowsefilesParam, DeletePdfGeneratorConfigParam, FetchPdfDefaultTemplateByIdParam, FetchPdfTypeByIdParam, GeneratePaymentReceiptParam, GetConfigHtmlTemplateByIdParam, GetDefaultPdfDataParam, GetDefaultPdfTemplateParam, GetHtmlTemplateConfigParam, GetPdfPayloadByIdParam, GetPdfTypesParam, SaveHtmlTemplateParam, UpdateHtmlTemplateParam }; + export { AppCompleteUploadParam, AppCopyFilesParam, AppStartUploadParam, AppbrowseParam, BrowsefilesParam, GeneratePaymentReceiptParam, GetDefaultHtmlTemplateParam, GetDefaultPdfDataParam, GetDefaultPdfTemplateParam, GetPdfTypesParam, SaveHtmlTemplateParam, UpdateHtmlTemplateParam }; } type AppCompleteUploadParam = { /** @@ -143,7 +112,7 @@ type AppCompleteUploadParam = { * inside the storage bucket. */ namespace: string; - body: FileStoragePlatformModel.FileUpload; + body: FileStoragePlatformModel.StartResponse; }; type AppCopyFilesParam = { /** @@ -160,7 +129,7 @@ type AppStartUploadParam = { * inside the storage bucket. */ namespace: string; - body: FileStoragePlatformModel.FileUploadStart; + body: FileStoragePlatformModel.StartRequest; }; type AppbrowseParam = { /** @@ -205,41 +174,25 @@ type BrowsefilesParam = { search?: string; body: FileStoragePlatformModel.ExtensionSlug; }; -type DeletePdfGeneratorConfigParam = { - id: string; -}; -type FetchPdfDefaultTemplateByIdParam = { - id: string; -}; -type FetchPdfTypeByIdParam = { - id: string; -}; type GeneratePaymentReceiptParam = { body: FileStoragePlatformModel.PaymentReceiptRequestBody; }; -type GetConfigHtmlTemplateByIdParam = { - id: string; -}; -type GetDefaultPdfDataParam = { +type GetDefaultHtmlTemplateParam = { pdfTypeId: number; + format: string; countryCode?: string; }; -type GetDefaultPdfTemplateParam = { +type GetDefaultPdfDataParam = { pdfTypeId: number; - format: string; countryCode?: string; }; -type GetHtmlTemplateConfigParam = { +type GetDefaultPdfTemplateParam = { pdfTypeId: number; format: string; countryCode?: string; }; -type GetPdfPayloadByIdParam = { - id: string; -}; type GetPdfTypesParam = { countryCode?: string; - storeOs: boolean; }; type SaveHtmlTemplateParam = { body: FileStoragePlatformModel.PdfConfig; diff --git a/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js b/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js index ef8a573ac..6321d16f9 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +++ b/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js @@ -8,7 +8,7 @@ const FileStoragePlatformModel = require("./FileStoragePlatformModel"); * files(products, orders, logistics etc), Required for validating the data of * the file being uploaded, decides where exactly the file will be stored * inside the storage bucket. - * @property {FileStoragePlatformModel.FileUpload} body + * @property {FileStoragePlatformModel.StartResponse} body */ /** @@ -23,7 +23,7 @@ const FileStoragePlatformModel = require("./FileStoragePlatformModel"); * files(products, orders, logistics etc), Required for validating the data of * the file being uploaded, decides where exactly the file will be stored * inside the storage bucket. - * @property {FileStoragePlatformModel.FileUploadStart} body + * @property {FileStoragePlatformModel.StartRequest} body */ /** @@ -49,60 +49,34 @@ const FileStoragePlatformModel = require("./FileStoragePlatformModel"); * @property {FileStoragePlatformModel.ExtensionSlug} body */ -/** - * @typedef DeletePdfGeneratorConfigParam - * @property {string} id - */ - -/** - * @typedef FetchPdfDefaultTemplateByIdParam - * @property {string} id - */ - -/** - * @typedef FetchPdfTypeByIdParam - * @property {string} id - */ - /** * @typedef GeneratePaymentReceiptParam * @property {FileStoragePlatformModel.PaymentReceiptRequestBody} body */ /** - * @typedef GetConfigHtmlTemplateByIdParam - * @property {string} id - */ - -/** - * @typedef GetDefaultPdfDataParam + * @typedef GetDefaultHtmlTemplateParam * @property {number} pdfTypeId + * @property {string} format * @property {string} [countryCode] */ /** - * @typedef GetDefaultPdfTemplateParam + * @typedef GetDefaultPdfDataParam * @property {number} pdfTypeId - * @property {string} format * @property {string} [countryCode] */ /** - * @typedef GetHtmlTemplateConfigParam + * @typedef GetDefaultPdfTemplateParam * @property {number} pdfTypeId * @property {string} format * @property {string} [countryCode] */ -/** - * @typedef GetPdfPayloadByIdParam - * @property {string} id - */ - /** * @typedef GetPdfTypesParam * @property {string} [countryCode] - * @property {boolean} storeOs */ /** @@ -122,7 +96,7 @@ class FileStoragePlatformApplicationValidator { return Joi.object({ namespace: Joi.string().allow("").required(), - body: FileStoragePlatformModel.FileUpload().required(), + body: FileStoragePlatformModel.StartResponse().required(), }).required(); } @@ -140,7 +114,7 @@ class FileStoragePlatformApplicationValidator { return Joi.object({ namespace: Joi.string().allow("").required(), - body: FileStoragePlatformModel.FileUploadStart().required(), + body: FileStoragePlatformModel.StartRequest().required(), }).required(); } @@ -167,27 +141,6 @@ class FileStoragePlatformApplicationValidator { }).required(); } - /** @returns {DeletePdfGeneratorConfigParam} */ - static deletePdfGeneratorConfig() { - return Joi.object({ - id: Joi.string().allow("").required(), - }).required(); - } - - /** @returns {FetchPdfDefaultTemplateByIdParam} */ - static fetchPdfDefaultTemplateById() { - return Joi.object({ - id: Joi.string().allow("").required(), - }).required(); - } - - /** @returns {FetchPdfTypeByIdParam} */ - static fetchPdfTypeById() { - return Joi.object({ - id: Joi.string().allow("").required(), - }).required(); - } - /** @returns {GeneratePaymentReceiptParam} */ static generatePaymentReceipt() { return Joi.object({ @@ -195,10 +148,12 @@ class FileStoragePlatformApplicationValidator { }).required(); } - /** @returns {GetConfigHtmlTemplateByIdParam} */ - static getConfigHtmlTemplateById() { + /** @returns {GetDefaultHtmlTemplateParam} */ + static getDefaultHtmlTemplate() { return Joi.object({ - id: Joi.string().allow("").required(), + pdfTypeId: Joi.number().required(), + format: Joi.string().allow("").required(), + countryCode: Joi.string().allow(""), }).required(); } @@ -219,27 +174,10 @@ class FileStoragePlatformApplicationValidator { }).required(); } - /** @returns {GetHtmlTemplateConfigParam} */ - static getHtmlTemplateConfig() { - return Joi.object({ - pdfTypeId: Joi.number().required(), - format: Joi.string().allow("").required(), - countryCode: Joi.string().allow(""), - }).required(); - } - - /** @returns {GetPdfPayloadByIdParam} */ - static getPdfPayloadById() { - return Joi.object({ - id: Joi.string().allow("").required(), - }).required(); - } - /** @returns {GetPdfTypesParam} */ static getPdfTypes() { return Joi.object({ countryCode: Joi.string().allow(""), - storeOs: Joi.boolean().required(), }).required(); } diff --git a/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts b/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts index b33738e17..6997ccc92 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +++ b/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts @@ -8,7 +8,7 @@ declare class FileStorage { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name browse - * @summary: Browse files. + * @summary: Browse files * @description: View and navigate through available files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/browse/). */ browse({ namespace, page, limit, requestHeaders }?: FileStoragePlatformValidator.BrowseParam, { responseHeaders }?: object): Promise; @@ -16,52 +16,52 @@ declare class FileStorage { * @param {FileStoragePlatformValidator.CompleteUploadParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name completeUpload - * @summary: Complete file upload. - * @description: Starts the process of uploading a file to storage location, and returns a storage link in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/completeUpload/). + * @summary: Complete file upload + * @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database at platform level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/completeUpload/). */ - completeUpload({ namespace, body, requestHeaders }?: FileStoragePlatformValidator.CompleteUploadParam, { responseHeaders }?: object): Promise; + completeUpload({ namespace, body, requestHeaders }?: FileStoragePlatformValidator.CompleteUploadParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformValidator.CopyFilesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name copyFiles - * @summary: Copy files. - * @description: Duplicate files to another location. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/copyFiles/). + * @summary: Copy files + * @description: Handle multiple file uploads, updating progress and providing detailed status reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/copyFiles/). */ copyFiles({ body, sync, requestHeaders }?: FileStoragePlatformValidator.CopyFilesParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformValidator.GetSignUrlsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSignUrls - * @summary: Get signed URLs. - * @description: Retrieve signed URLs for file access. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getSignUrls/). + * @summary: Get signed URLs + * @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored resources inside private bucket. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getSignUrls/). */ - getSignUrls({ body, requestHeaders }?: FileStoragePlatformValidator.GetSignUrlsParam, { responseHeaders }?: object): Promise; + getSignUrls({ body, requestHeaders }?: FileStoragePlatformValidator.GetSignUrlsParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformValidator.ProxyParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name proxy - * @summary: Proxy file access. - * @description: Access files through a proxy. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/proxy/). + * @summary: Access files through a proxy + * @description: It enables the communication between two entities by directing client requests to the correct server and sending responses back to the client. Please refer group description for more details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/proxy/). */ - proxy({ url, requestHeaders }?: FileStoragePlatformValidator.ProxyParam, { responseHeaders }?: object): Promise; + proxy({ url, requestHeaders }?: FileStoragePlatformValidator.ProxyParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformValidator.StartUploadParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name startUpload - * @summary: Start file upload. - * @description: Inititates the process of uploading a file to storage location, and returns a storage link in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/startUpload/). + * @summary: Start file upload + * @description: Inititates the process of uploading a file to storage location, and returns a storage link in response at platform level. Please refer group description for more details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/startUpload/). */ - startUpload({ namespace, body, requestHeaders }?: FileStoragePlatformValidator.StartUploadParam, { responseHeaders }?: object): Promise; + startUpload({ namespace, body, requestHeaders }?: FileStoragePlatformValidator.StartUploadParam, { responseHeaders }?: object): Promise; /** * @param data * @param {string} file_name diff --git a/sdk/platform/FileStorage/FileStoragePlatformClient.js b/sdk/platform/FileStorage/FileStoragePlatformClient.js index 14c55b7ab..708ae723a 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformClient.js +++ b/sdk/platform/FileStorage/FileStoragePlatformClient.js @@ -22,7 +22,7 @@ class FileStorage { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name browse - * @summary: Browse files. + * @summary: Browse files * @description: View and navigate through available files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/browse/). */ async browse( @@ -103,10 +103,10 @@ class FileStorage { * @param {FileStoragePlatformValidator.CompleteUploadParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name completeUpload - * @summary: Complete file upload. - * @description: Starts the process of uploading a file to storage location, and returns a storage link in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/completeUpload/). + * @summary: Complete file upload + * @description: Complete the file upload and store the file details such as name, size, content type, and namespace to maintain integrity within the system's database at platform level - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/completeUpload/). */ async completeUpload( { namespace, body, requestHeaders } = { requestHeaders: {} }, @@ -149,7 +149,7 @@ class FileStorage { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/assets/v2.0/company/${this.config.companyId}/namespaces/${namespace}/upload/complete`, + `/service/platform/assets/v1.0/company/${this.config.companyId}/namespaces/${namespace}/upload/complete`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -163,7 +163,7 @@ class FileStorage { const { error: res_error, - } = FileStoragePlatformModel.FileUploadComplete().validate(responseData, { + } = FileStoragePlatformModel.CompleteResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -188,8 +188,8 @@ class FileStorage { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name copyFiles - * @summary: Copy files. - * @description: Duplicate files to another location. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/copyFiles/). + * @summary: Copy files + * @description: Handle multiple file uploads, updating progress and providing detailed status reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/copyFiles/). */ async copyFiles( { body, sync, requestHeaders } = { requestHeaders: {} }, @@ -266,10 +266,10 @@ class FileStorage { * @param {FileStoragePlatformValidator.GetSignUrlsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSignUrls - * @summary: Get signed URLs. - * @description: Retrieve signed URLs for file access. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getSignUrls/). + * @summary: Get signed URLs + * @description: Generates secure, signed URLs that is valid for certain expiry time for accessing stored resources inside private bucket. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getSignUrls/). */ async getSignUrls( { body, requestHeaders } = { requestHeaders: {} }, @@ -322,7 +322,7 @@ class FileStorage { const { error: res_error, - } = FileStoragePlatformModel.SignUrlResult().validate(responseData, { + } = FileStoragePlatformModel.SignUrlResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -345,10 +345,10 @@ class FileStorage { * @param {FileStoragePlatformValidator.ProxyParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name proxy - * @summary: Proxy file access. - * @description: Access files through a proxy. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/proxy/). + * @summary: Access files through a proxy + * @description: It enables the communication between two entities by directing client requests to the correct server and sending responses back to the client. Please refer group description for more details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/proxy/). */ async proxy( { url, requestHeaders } = { requestHeaders: {} }, @@ -400,7 +400,7 @@ class FileStorage { const { error: res_error, - } = FileStoragePlatformModel.ProxyFileAccess().validate(responseData, { + } = FileStoragePlatformModel.ProxyResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -423,10 +423,10 @@ class FileStorage { * @param {FileStoragePlatformValidator.StartUploadParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name startUpload - * @summary: Start file upload. - * @description: Inititates the process of uploading a file to storage location, and returns a storage link in response. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/startUpload/). + * @summary: Start file upload + * @description: Inititates the process of uploading a file to storage location, and returns a storage link in response at platform level. Please refer group description for more details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/startUpload/). */ async startUpload( { namespace, body, requestHeaders } = { requestHeaders: {} }, @@ -469,7 +469,7 @@ class FileStorage { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/assets/v2.0/company/${this.config.companyId}/namespaces/${namespace}/upload/start`, + `/service/platform/assets/v1.0/company/${this.config.companyId}/namespaces/${namespace}/upload/start`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -483,7 +483,7 @@ class FileStorage { const { error: res_error, - } = FileStoragePlatformModel.FileUpload().validate(responseData, { + } = FileStoragePlatformModel.StartResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts b/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts index 73dcfbd47..06e1dba5d 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +++ b/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts @@ -1,85 +1,11 @@ export = FileStoragePlatformModel; /** - * @typedef UpdatePdfType - * @property {number} [pdf_type_id] - * @property {string} [name] - * @property {string[]} [format] - * @property {boolean} [visibility] - * @property {Object} [schema] - * @property {boolean} [store_os] - * @property {string} [country_code] - */ -/** - * @typedef PdfTypeByIdDetails - * @property {boolean} [store_os] - * @property {string} [country_code] - * @property {number} [pdf_type_id] - * @property {number} [__v] - * @property {string} [_id] - * @property {string[]} [format] - * @property {string} [name] - * @property {boolean} [visibility] - */ -/** - * @typedef PdfConfigurationData - * @property {string} [_id] - * @property {number} [pdf_type_id] - * @property {string} [format] - * @property {string} [template] - * @property {string} [country_code] - * @property {number} [__v] - */ -/** - * @typedef UpdatedDefaultTemplateById - * @property {PdfConfigurationData} [data] - * @property {boolean} [success] - */ -/** - * @typedef UpdateTemplate - * @property {number} [pdf_type_id] - * @property {string} [format] - This is invoice document format such as A4, A6, POS, A5 - * @property {string} [country_code] - This is iso code of a country - * @property {string} [template] - This is html template string - * @property {boolean} [store_os] - This flag is to identify store-os - */ -/** - * @typedef PdfDefaultTemplateById - * @property {string} [_id] - The ID of the PDF default template - * @property {string} [country_code] - The country code associated with the template - * @property {string} [format] - The format of the template (e.g., "A4") - * @property {number} [pdf_type_id] - The ID of the PDF type - * @property {number} [__v] - Version number - * @property {string} [template] - The HTML template content - */ -/** - * @typedef PdfTemplateCreateSuccess - * @property {number} [code] - * @property {boolean} [success] - * @property {PdfTemplateCreateSuccessData} [data] - */ -/** - * @typedef PdfTemplateCreateSuccessData - * @property {string} [_id] - * @property {number} [pdf_type_id] - * @property {string} [format] - * @property {string} [template] - * @property {string} [country_code] - * @property {number} [__v] - */ -/** - * @typedef CreateTemplate - * @property {number} pdf_type_id - * @property {string} format - This is invoice document format such as A4, A6, POS, A5 - * @property {string} country_code - This is iso code of a country - * @property {string} [template] - This is html template string - */ -/** - * @typedef PdfDefaultTemplateSuccess - * @property {Document[]} [data] - * @property {boolean} [success] - Indicates if the request was successful. + * @typedef ProxyResponse + * @property {Object} [data] + * @property {Object} [support] */ /** - * @typedef FailedBrowseFilesResult + * @typedef FailedResponse * @property {string} message */ /** @@ -94,7 +20,7 @@ export = FileStoragePlatformModel; * @property {string} url */ /** - * @typedef FileUpload + * @typedef StartResponse * @property {string} file_name * @property {string} file_path * @property {string} content_type @@ -103,10 +29,15 @@ export = FileStoragePlatformModel; * @property {string} operation * @property {number} size * @property {Upload} upload + * @property {CDN} cdn * @property {string[]} [tags] */ /** - * @typedef FileUploadStart + * @typedef Params + * @property {string} [subpath] - The subpath for the file. + */ +/** + * @typedef StartRequest * @property {string} file_name * @property {string} content_type * @property {number} size @@ -118,7 +49,7 @@ export = FileStoragePlatformModel; * @property {string} [username] */ /** - * @typedef FileUploadComplete + * @typedef CompleteResponse * @property {string} _id * @property {string} file_name * @property {string} file_path @@ -135,11 +66,6 @@ export = FileStoragePlatformModel; * @property {string} modified_on * @property {CreatedBy} [created_by] */ -/** - * @typedef ProxyFileAccess - * @property {Object} [data] - * @property {Object} [support] - */ /** * @typedef DestinationNamespace * @property {string} [namespace] @@ -156,16 +82,16 @@ export = FileStoragePlatformModel; * @property {number} expiry */ /** - * @typedef SignUrlResult + * @typedef SignUrlResponse * @property {Urls[]} urls */ /** - * @typedef SignUrl + * @typedef SignUrlRequest * @property {number} expiry * @property {string[]} urls */ /** - * @typedef InvoiceTypesData + * @typedef InvoiceTypesDataResponse * @property {boolean} [status] * @property {string} _id * @property {number} pdf_type_id @@ -173,12 +99,11 @@ export = FileStoragePlatformModel; * @property {string[]} format * @property {number} __v * @property {boolean} visibility - * @property {boolean} store_os * @property {string} country_code */ /** - * @typedef InvoiceTypes - * @property {InvoiceTypesData[]} data + * @typedef InvoiceTypesResponse + * @property {InvoiceTypesDataResponse[]} data * @property {boolean} success */ /** @@ -459,7 +384,7 @@ export = FileStoragePlatformModel; * @property {MetaProperty} [generator] */ /** - * @typedef PdfPayloadDetails + * @typedef DummyTemplateDataPayload * @property {boolean} [is_export] * @property {boolean} [is_export_shipment] * @property {string} [app_domain_name] @@ -493,6 +418,8 @@ export = FileStoragePlatformModel; * @property {boolean} [is_self_ship] * @property {string} [mode] * @property {boolean} [is_self_pickup] + * @property {Object} [shipment_meta] - This field represents the shipment meta details + * @property {Object} [order_meta] - This field represents the order meta details * @property {string} [platform_name] * @property {number} [amount_to_be_collected] * @property {number} [amount_paid] @@ -511,60 +438,32 @@ export = FileStoragePlatformModel; * @property {string} [_id] - This field contains the unique identifier for the * PDF payload. * @property {number} [pdf_type_id] - This is invoice unique id - * @property {PdfPayloadDetails} payload + * @property {DummyTemplateDataPayload} payload * @property {string} [country_code] - This field represents the country code. - * @property {number} [__v] - */ -/** - * @typedef savePdfPayload - * @property {number} [pdf_type_id] - * @property {PdfPayloadDetails} [payload] - * @property {string} [country_code] - */ -/** - * @typedef MapperDetails - * @property {string} [_id] - * @property {number} [pdf_type_id] - * @property {PdfPayloadDetails} [payload] - * @property {string} [country_code] * @property {number} [__v] - This field holds the version number. */ /** - * @typedef PdfDataItemsDetails + * @typedef DummyTemplateDataItems * @property {DummyTemplateData[]} data * @property {boolean} success */ /** * @typedef PdfConfig * @property {string} [format] - This is invoice document format such as A4, A6, POS - * @property {string} [template] - This is html template string. - * @property {number} [pdf_type_id] - This field holds an identifier for the type of PDF. - * @property {string} [country_code] - This field contains the country code. - * @property {boolean} [default_template] - This field indicates whether the - * fetched HTML template is the default template. + * @property {string} [template] - This is html template string + * @property {number} [pdf_type_id] */ /** * @typedef PdfConfigSuccessData - * @property {string} [_id] - This field contains the unique identifier for the - * PDF configuration. - * @property {number} [company_id] - This field holds the identifier for the - * company associated with the PDF configuration. - * @property {string} [application_id] - This field contains the identifier for - * the application that uses this PDF configuration. - * @property {number} [pdf_type_id] - This field holds an identifier for the type of PDF. - * @property {string} [format] - This field specifies the format of the invoice document. - * @property {string} [template] - This field contains the HTML template string - * for the PDF document. - * @property {number} [__v] - This field holds the version number of the PDF - * configuration document. + * @property {string} [_id] + * @property {number} [company_id] + * @property {string} [application_id] + * @property {number} [pdf_type_id] + * @property {string} [format] + * @property {string} [template] + * @property {number} [__v] * @property {string} [country_code] */ -/** - * @typedef DeleteMapperById - * @property {string} [message] - This field represents the country code. - * @property {boolean} [default_template] - This field indicates whether the - * HTML template is the default template. - */ /** * @typedef PdfConfigSuccess * @property {PdfConfigSuccessData[]} [data] @@ -585,6 +484,11 @@ export = FileStoragePlatformModel; * @property {PdfConfigSaveSuccessData} [data] * @property {boolean} [success] */ +/** + * @typedef PdfDefaultTemplateSuccess + * @property {Document[]} [data] + * @property {boolean} [success] - Indicates if the request was successful. + */ /** * @typedef Document * @property {string} [_id] @@ -666,142 +570,17 @@ export = FileStoragePlatformModel; declare class FileStoragePlatformModel { } declare namespace FileStoragePlatformModel { - export { UpdatePdfType, PdfTypeByIdDetails, PdfConfigurationData, UpdatedDefaultTemplateById, UpdateTemplate, PdfDefaultTemplateById, PdfTemplateCreateSuccess, PdfTemplateCreateSuccessData, CreateTemplate, PdfDefaultTemplateSuccess, FailedBrowseFilesResult, CDN, Upload, FileUpload, FileUploadStart, CreatedBy, FileUploadComplete, ProxyFileAccess, DestinationNamespace, CopyFiles, Urls, SignUrlResult, SignUrl, InvoiceTypesData, InvoiceTypes, ConversionRate, DeliveryPartnerDetail, Image, PaymentData, InvoiceDetail, CompanyDetail, StoreDetail, CustomerBillingDetail, CustomerShippingDetail, ReturnDetail, Brand, Cgst, Sgst, Igst, Tax, ItemsProductTable, ProductTable, Taxes, TaxTable, RegisteredCompanyDetail, Kwargs, ShipmentIdBarcodeGenerator, SignedQrcodeGenerator, KwargsUpiQrcode, UpiQrcodeGenerator, DigitalsignatureGenerator, KwargsAwbNumber, AwbNumberLabelBarcodeGenerator, AwbNumberBarcodeGenerator, MetaProperty, Meta, PdfPayloadDetails, DummyTemplateData, savePdfPayload, MapperDetails, PdfDataItemsDetails, PdfConfig, PdfConfigSuccessData, DeleteMapperById, PdfConfigSuccess, PdfConfigSaveSuccessData, PdfConfigSaveSuccess, Document, PaymentReceiptRequestBody, PaymentReceiptOrderDetails, PaymentReceiptCustomerDetails, PaymentReceiptPayments, PaymentReceiptFormat, PaymentReceiptService, PaymentReceiptTaxes, PaymentReceiptPayload, PaymentReceiptMeta, ExtensionSlug }; + export { ProxyResponse, FailedResponse, CDN, Upload, StartResponse, Params, StartRequest, CreatedBy, CompleteResponse, DestinationNamespace, CopyFiles, Urls, SignUrlResponse, SignUrlRequest, InvoiceTypesDataResponse, InvoiceTypesResponse, ConversionRate, DeliveryPartnerDetail, Image, PaymentData, InvoiceDetail, CompanyDetail, StoreDetail, CustomerBillingDetail, CustomerShippingDetail, ReturnDetail, Brand, Cgst, Sgst, Igst, Tax, ItemsProductTable, ProductTable, Taxes, TaxTable, RegisteredCompanyDetail, Kwargs, ShipmentIdBarcodeGenerator, SignedQrcodeGenerator, KwargsUpiQrcode, UpiQrcodeGenerator, DigitalsignatureGenerator, KwargsAwbNumber, AwbNumberLabelBarcodeGenerator, AwbNumberBarcodeGenerator, MetaProperty, Meta, DummyTemplateDataPayload, DummyTemplateData, DummyTemplateDataItems, PdfConfig, PdfConfigSuccessData, PdfConfigSuccess, PdfConfigSaveSuccessData, PdfConfigSaveSuccess, PdfDefaultTemplateSuccess, Document, PaymentReceiptRequestBody, PaymentReceiptOrderDetails, PaymentReceiptCustomerDetails, PaymentReceiptPayments, PaymentReceiptFormat, PaymentReceiptService, PaymentReceiptTaxes, PaymentReceiptPayload, PaymentReceiptMeta, ExtensionSlug }; } -/** @returns {UpdatePdfType} */ -declare function UpdatePdfType(): UpdatePdfType; -type UpdatePdfType = { - pdf_type_id?: number; - name?: string; - format?: string[]; - visibility?: boolean; - schema?: any; - store_os?: boolean; - country_code?: string; -}; -/** @returns {PdfTypeByIdDetails} */ -declare function PdfTypeByIdDetails(): PdfTypeByIdDetails; -type PdfTypeByIdDetails = { - store_os?: boolean; - country_code?: string; - pdf_type_id?: number; - __v?: number; - _id?: string; - format?: string[]; - name?: string; - visibility?: boolean; -}; -/** @returns {PdfConfigurationData} */ -declare function PdfConfigurationData(): PdfConfigurationData; -type PdfConfigurationData = { - _id?: string; - pdf_type_id?: number; - format?: string; - template?: string; - country_code?: string; - __v?: number; -}; -/** @returns {UpdatedDefaultTemplateById} */ -declare function UpdatedDefaultTemplateById(): UpdatedDefaultTemplateById; -type UpdatedDefaultTemplateById = { - data?: PdfConfigurationData; - success?: boolean; -}; -/** @returns {UpdateTemplate} */ -declare function UpdateTemplate(): UpdateTemplate; -type UpdateTemplate = { - pdf_type_id?: number; - /** - * - This is invoice document format such as A4, A6, POS, A5 - */ - format?: string; - /** - * - This is iso code of a country - */ - country_code?: string; - /** - * - This is html template string - */ - template?: string; - /** - * - This flag is to identify store-os - */ - store_os?: boolean; -}; -/** @returns {PdfDefaultTemplateById} */ -declare function PdfDefaultTemplateById(): PdfDefaultTemplateById; -type PdfDefaultTemplateById = { - /** - * - The ID of the PDF default template - */ - _id?: string; - /** - * - The country code associated with the template - */ - country_code?: string; - /** - * - The format of the template (e.g., "A4") - */ - format?: string; - /** - * - The ID of the PDF type - */ - pdf_type_id?: number; - /** - * - Version number - */ - __v?: number; - /** - * - The HTML template content - */ - template?: string; -}; -/** @returns {PdfTemplateCreateSuccess} */ -declare function PdfTemplateCreateSuccess(): PdfTemplateCreateSuccess; -type PdfTemplateCreateSuccess = { - code?: number; - success?: boolean; - data?: PdfTemplateCreateSuccessData; -}; -/** @returns {PdfTemplateCreateSuccessData} */ -declare function PdfTemplateCreateSuccessData(): PdfTemplateCreateSuccessData; -type PdfTemplateCreateSuccessData = { - _id?: string; - pdf_type_id?: number; - format?: string; - template?: string; - country_code?: string; - __v?: number; -}; -/** @returns {CreateTemplate} */ -declare function CreateTemplate(): CreateTemplate; -type CreateTemplate = { - pdf_type_id: number; - /** - * - This is invoice document format such as A4, A6, POS, A5 - */ - format: string; - /** - * - This is iso code of a country - */ - country_code: string; - /** - * - This is html template string - */ - template?: string; -}; -/** @returns {PdfDefaultTemplateSuccess} */ -declare function PdfDefaultTemplateSuccess(): PdfDefaultTemplateSuccess; -type PdfDefaultTemplateSuccess = { - data?: Document[]; - /** - * - Indicates if the request was successful. - */ - success?: boolean; +/** @returns {ProxyResponse} */ +declare function ProxyResponse(): ProxyResponse; +type ProxyResponse = { + data?: any; + support?: any; }; -/** @returns {FailedBrowseFilesResult} */ -declare function FailedBrowseFilesResult(): FailedBrowseFilesResult; -type FailedBrowseFilesResult = { +/** @returns {FailedResponse} */ +declare function FailedResponse(): FailedResponse; +type FailedResponse = { message: string; }; /** @returns {CDN} */ @@ -817,9 +596,9 @@ type Upload = { expiry: number; url: string; }; -/** @returns {FileUpload} */ -declare function FileUpload(): FileUpload; -type FileUpload = { +/** @returns {StartResponse} */ +declare function StartResponse(): StartResponse; +type StartResponse = { file_name: string; file_path: string; content_type: string; @@ -828,11 +607,20 @@ type FileUpload = { operation: string; size: number; upload: Upload; + cdn: CDN; tags?: string[]; }; -/** @returns {FileUploadStart} */ -declare function FileUploadStart(): FileUploadStart; -type FileUploadStart = { +/** @returns {Params} */ +declare function Params(): Params; +type Params = { + /** + * - The subpath for the file. + */ + subpath?: string; +}; +/** @returns {StartRequest} */ +declare function StartRequest(): StartRequest; +type StartRequest = { file_name: string; content_type: string; size: number; @@ -844,9 +632,9 @@ declare function CreatedBy(): CreatedBy; type CreatedBy = { username?: string; }; -/** @returns {FileUploadComplete} */ -declare function FileUploadComplete(): FileUploadComplete; -type FileUploadComplete = { +/** @returns {CompleteResponse} */ +declare function CompleteResponse(): CompleteResponse; +type CompleteResponse = { _id: string; file_name: string; file_path: string; @@ -863,12 +651,6 @@ type FileUploadComplete = { modified_on: string; created_by?: CreatedBy; }; -/** @returns {ProxyFileAccess} */ -declare function ProxyFileAccess(): ProxyFileAccess; -type ProxyFileAccess = { - data?: any; - support?: any; -}; /** @returns {DestinationNamespace} */ declare function DestinationNamespace(): DestinationNamespace; type DestinationNamespace = { @@ -887,20 +669,20 @@ type Urls = { signed_url: string; expiry: number; }; -/** @returns {SignUrlResult} */ -declare function SignUrlResult(): SignUrlResult; -type SignUrlResult = { +/** @returns {SignUrlResponse} */ +declare function SignUrlResponse(): SignUrlResponse; +type SignUrlResponse = { urls: Urls[]; }; -/** @returns {SignUrl} */ -declare function SignUrl(): SignUrl; -type SignUrl = { +/** @returns {SignUrlRequest} */ +declare function SignUrlRequest(): SignUrlRequest; +type SignUrlRequest = { expiry: number; urls: string[]; }; -/** @returns {InvoiceTypesData} */ -declare function InvoiceTypesData(): InvoiceTypesData; -type InvoiceTypesData = { +/** @returns {InvoiceTypesDataResponse} */ +declare function InvoiceTypesDataResponse(): InvoiceTypesDataResponse; +type InvoiceTypesDataResponse = { status?: boolean; _id: string; pdf_type_id: number; @@ -908,13 +690,12 @@ type InvoiceTypesData = { format: string[]; __v: number; visibility: boolean; - store_os: boolean; country_code: string; }; -/** @returns {InvoiceTypes} */ -declare function InvoiceTypes(): InvoiceTypes; -type InvoiceTypes = { - data: InvoiceTypesData[]; +/** @returns {InvoiceTypesResponse} */ +declare function InvoiceTypesResponse(): InvoiceTypesResponse; +type InvoiceTypesResponse = { + data: InvoiceTypesDataResponse[]; success: boolean; }; /** @returns {ConversionRate} */ @@ -1291,9 +1072,9 @@ declare function Meta(): Meta; type Meta = { generator?: MetaProperty; }; -/** @returns {PdfPayloadDetails} */ -declare function PdfPayloadDetails(): PdfPayloadDetails; -type PdfPayloadDetails = { +/** @returns {DummyTemplateDataPayload} */ +declare function DummyTemplateDataPayload(): DummyTemplateDataPayload; +type DummyTemplateDataPayload = { is_export?: boolean; is_export_shipment?: boolean; app_domain_name?: string; @@ -1327,6 +1108,14 @@ type PdfPayloadDetails = { is_self_ship?: boolean; mode?: string; is_self_pickup?: boolean; + /** + * - This field represents the shipment meta details + */ + shipment_meta?: any; + /** + * - This field represents the order meta details + */ + order_meta?: any; platform_name?: string; amount_to_be_collected?: number; amount_paid?: number; @@ -1352,35 +1141,19 @@ type DummyTemplateData = { * - This is invoice unique id */ pdf_type_id?: number; - payload: PdfPayloadDetails; + payload: DummyTemplateDataPayload; /** * - This field represents the country code. */ country_code?: string; - __v?: number; -}; -/** @returns {savePdfPayload} */ -declare function savePdfPayload(): savePdfPayload; -type savePdfPayload = { - pdf_type_id?: number; - payload?: PdfPayloadDetails; - country_code?: string; -}; -/** @returns {MapperDetails} */ -declare function MapperDetails(): MapperDetails; -type MapperDetails = { - _id?: string; - pdf_type_id?: number; - payload?: PdfPayloadDetails; - country_code?: string; /** * - This field holds the version number. */ __v?: number; }; -/** @returns {PdfDataItemsDetails} */ -declare function PdfDataItemsDetails(): PdfDataItemsDetails; -type PdfDataItemsDetails = { +/** @returns {DummyTemplateDataItems} */ +declare function DummyTemplateDataItems(): DummyTemplateDataItems; +type DummyTemplateDataItems = { data: DummyTemplateData[]; success: boolean; }; @@ -1392,74 +1165,23 @@ type PdfConfig = { */ format?: string; /** - * - This is html template string. + * - This is html template string */ template?: string; - /** - * - This field holds an identifier for the type of PDF. - */ pdf_type_id?: number; - /** - * - This field contains the country code. - */ - country_code?: string; - /** - * - This field indicates whether the - * fetched HTML template is the default template. - */ - default_template?: boolean; }; /** @returns {PdfConfigSuccessData} */ declare function PdfConfigSuccessData(): PdfConfigSuccessData; type PdfConfigSuccessData = { - /** - * - This field contains the unique identifier for the - * PDF configuration. - */ _id?: string; - /** - * - This field holds the identifier for the - * company associated with the PDF configuration. - */ company_id?: number; - /** - * - This field contains the identifier for - * the application that uses this PDF configuration. - */ application_id?: string; - /** - * - This field holds an identifier for the type of PDF. - */ pdf_type_id?: number; - /** - * - This field specifies the format of the invoice document. - */ format?: string; - /** - * - This field contains the HTML template string - * for the PDF document. - */ template?: string; - /** - * - This field holds the version number of the PDF - * configuration document. - */ __v?: number; country_code?: string; }; -/** @returns {DeleteMapperById} */ -declare function DeleteMapperById(): DeleteMapperById; -type DeleteMapperById = { - /** - * - This field represents the country code. - */ - message?: string; - /** - * - This field indicates whether the - * HTML template is the default template. - */ - default_template?: boolean; -}; /** @returns {PdfConfigSuccess} */ declare function PdfConfigSuccess(): PdfConfigSuccess; type PdfConfigSuccess = { @@ -1483,6 +1205,15 @@ type PdfConfigSaveSuccess = { data?: PdfConfigSaveSuccessData; success?: boolean; }; +/** @returns {PdfDefaultTemplateSuccess} */ +declare function PdfDefaultTemplateSuccess(): PdfDefaultTemplateSuccess; +type PdfDefaultTemplateSuccess = { + data?: Document[]; + /** + * - Indicates if the request was successful. + */ + success?: boolean; +}; /** @returns {Document} */ declare function Document(): Document; type Document = { diff --git a/sdk/platform/FileStorage/FileStoragePlatformModel.js b/sdk/platform/FileStorage/FileStoragePlatformModel.js index e230e795b..2cf706567 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformModel.js +++ b/sdk/platform/FileStorage/FileStoragePlatformModel.js @@ -1,96 +1,13 @@ const Joi = require("joi"); /** - * @typedef UpdatePdfType - * @property {number} [pdf_type_id] - * @property {string} [name] - * @property {string[]} [format] - * @property {boolean} [visibility] - * @property {Object} [schema] - * @property {boolean} [store_os] - * @property {string} [country_code] - */ - -/** - * @typedef PdfTypeByIdDetails - * @property {boolean} [store_os] - * @property {string} [country_code] - * @property {number} [pdf_type_id] - * @property {number} [__v] - * @property {string} [_id] - * @property {string[]} [format] - * @property {string} [name] - * @property {boolean} [visibility] - */ - -/** - * @typedef PdfConfigurationData - * @property {string} [_id] - * @property {number} [pdf_type_id] - * @property {string} [format] - * @property {string} [template] - * @property {string} [country_code] - * @property {number} [__v] - */ - -/** - * @typedef UpdatedDefaultTemplateById - * @property {PdfConfigurationData} [data] - * @property {boolean} [success] - */ - -/** - * @typedef UpdateTemplate - * @property {number} [pdf_type_id] - * @property {string} [format] - This is invoice document format such as A4, A6, POS, A5 - * @property {string} [country_code] - This is iso code of a country - * @property {string} [template] - This is html template string - * @property {boolean} [store_os] - This flag is to identify store-os - */ - -/** - * @typedef PdfDefaultTemplateById - * @property {string} [_id] - The ID of the PDF default template - * @property {string} [country_code] - The country code associated with the template - * @property {string} [format] - The format of the template (e.g., "A4") - * @property {number} [pdf_type_id] - The ID of the PDF type - * @property {number} [__v] - Version number - * @property {string} [template] - The HTML template content - */ - -/** - * @typedef PdfTemplateCreateSuccess - * @property {number} [code] - * @property {boolean} [success] - * @property {PdfTemplateCreateSuccessData} [data] - */ - -/** - * @typedef PdfTemplateCreateSuccessData - * @property {string} [_id] - * @property {number} [pdf_type_id] - * @property {string} [format] - * @property {string} [template] - * @property {string} [country_code] - * @property {number} [__v] - */ - -/** - * @typedef CreateTemplate - * @property {number} pdf_type_id - * @property {string} format - This is invoice document format such as A4, A6, POS, A5 - * @property {string} country_code - This is iso code of a country - * @property {string} [template] - This is html template string - */ - -/** - * @typedef PdfDefaultTemplateSuccess - * @property {Document[]} [data] - * @property {boolean} [success] - Indicates if the request was successful. + * @typedef ProxyResponse + * @property {Object} [data] + * @property {Object} [support] */ /** - * @typedef FailedBrowseFilesResult + * @typedef FailedResponse * @property {string} message */ @@ -108,7 +25,7 @@ const Joi = require("joi"); */ /** - * @typedef FileUpload + * @typedef StartResponse * @property {string} file_name * @property {string} file_path * @property {string} content_type @@ -117,11 +34,17 @@ const Joi = require("joi"); * @property {string} operation * @property {number} size * @property {Upload} upload + * @property {CDN} cdn * @property {string[]} [tags] */ /** - * @typedef FileUploadStart + * @typedef Params + * @property {string} [subpath] - The subpath for the file. + */ + +/** + * @typedef StartRequest * @property {string} file_name * @property {string} content_type * @property {number} size @@ -135,7 +58,7 @@ const Joi = require("joi"); */ /** - * @typedef FileUploadComplete + * @typedef CompleteResponse * @property {string} _id * @property {string} file_name * @property {string} file_path @@ -153,12 +76,6 @@ const Joi = require("joi"); * @property {CreatedBy} [created_by] */ -/** - * @typedef ProxyFileAccess - * @property {Object} [data] - * @property {Object} [support] - */ - /** * @typedef DestinationNamespace * @property {string} [namespace] @@ -178,18 +95,18 @@ const Joi = require("joi"); */ /** - * @typedef SignUrlResult + * @typedef SignUrlResponse * @property {Urls[]} urls */ /** - * @typedef SignUrl + * @typedef SignUrlRequest * @property {number} expiry * @property {string[]} urls */ /** - * @typedef InvoiceTypesData + * @typedef InvoiceTypesDataResponse * @property {boolean} [status] * @property {string} _id * @property {number} pdf_type_id @@ -197,13 +114,12 @@ const Joi = require("joi"); * @property {string[]} format * @property {number} __v * @property {boolean} visibility - * @property {boolean} store_os * @property {string} country_code */ /** - * @typedef InvoiceTypes - * @property {InvoiceTypesData[]} data + * @typedef InvoiceTypesResponse + * @property {InvoiceTypesDataResponse[]} data * @property {boolean} success */ @@ -516,7 +432,7 @@ const Joi = require("joi"); */ /** - * @typedef PdfPayloadDetails + * @typedef DummyTemplateDataPayload * @property {boolean} [is_export] * @property {boolean} [is_export_shipment] * @property {string} [app_domain_name] @@ -550,6 +466,8 @@ const Joi = require("joi"); * @property {boolean} [is_self_ship] * @property {string} [mode] * @property {boolean} [is_self_pickup] + * @property {Object} [shipment_meta] - This field represents the shipment meta details + * @property {Object} [order_meta] - This field represents the order meta details * @property {string} [platform_name] * @property {number} [amount_to_be_collected] * @property {number} [amount_paid] @@ -569,29 +487,13 @@ const Joi = require("joi"); * @property {string} [_id] - This field contains the unique identifier for the * PDF payload. * @property {number} [pdf_type_id] - This is invoice unique id - * @property {PdfPayloadDetails} payload + * @property {DummyTemplateDataPayload} payload * @property {string} [country_code] - This field represents the country code. - * @property {number} [__v] - */ - -/** - * @typedef savePdfPayload - * @property {number} [pdf_type_id] - * @property {PdfPayloadDetails} [payload] - * @property {string} [country_code] - */ - -/** - * @typedef MapperDetails - * @property {string} [_id] - * @property {number} [pdf_type_id] - * @property {PdfPayloadDetails} [payload] - * @property {string} [country_code] * @property {number} [__v] - This field holds the version number. */ /** - * @typedef PdfDataItemsDetails + * @typedef DummyTemplateDataItems * @property {DummyTemplateData[]} data * @property {boolean} success */ @@ -599,37 +501,22 @@ const Joi = require("joi"); /** * @typedef PdfConfig * @property {string} [format] - This is invoice document format such as A4, A6, POS - * @property {string} [template] - This is html template string. - * @property {number} [pdf_type_id] - This field holds an identifier for the type of PDF. - * @property {string} [country_code] - This field contains the country code. - * @property {boolean} [default_template] - This field indicates whether the - * fetched HTML template is the default template. + * @property {string} [template] - This is html template string + * @property {number} [pdf_type_id] */ /** * @typedef PdfConfigSuccessData - * @property {string} [_id] - This field contains the unique identifier for the - * PDF configuration. - * @property {number} [company_id] - This field holds the identifier for the - * company associated with the PDF configuration. - * @property {string} [application_id] - This field contains the identifier for - * the application that uses this PDF configuration. - * @property {number} [pdf_type_id] - This field holds an identifier for the type of PDF. - * @property {string} [format] - This field specifies the format of the invoice document. - * @property {string} [template] - This field contains the HTML template string - * for the PDF document. - * @property {number} [__v] - This field holds the version number of the PDF - * configuration document. + * @property {string} [_id] + * @property {number} [company_id] + * @property {string} [application_id] + * @property {number} [pdf_type_id] + * @property {string} [format] + * @property {string} [template] + * @property {number} [__v] * @property {string} [country_code] */ -/** - * @typedef DeleteMapperById - * @property {string} [message] - This field represents the country code. - * @property {boolean} [default_template] - This field indicates whether the - * HTML template is the default template. - */ - /** * @typedef PdfConfigSuccess * @property {PdfConfigSuccessData[]} [data] @@ -653,6 +540,12 @@ const Joi = require("joi"); * @property {boolean} [success] */ +/** + * @typedef PdfDefaultTemplateSuccess + * @property {Document[]} [data] + * @property {boolean} [success] - Indicates if the request was successful. + */ + /** * @typedef Document * @property {string} [_id] @@ -743,117 +636,16 @@ const Joi = require("joi"); */ class FileStoragePlatformModel { - /** @returns {UpdatePdfType} */ - static UpdatePdfType() { + /** @returns {ProxyResponse} */ + static ProxyResponse() { return Joi.object({ - pdf_type_id: Joi.number(), - name: Joi.string().allow(""), - format: Joi.array().items(Joi.string().allow("")), - visibility: Joi.boolean(), - schema: Joi.object().pattern(/\S/, Joi.any()), - store_os: Joi.boolean(), - country_code: Joi.string().allow(""), - }); - } - - /** @returns {PdfTypeByIdDetails} */ - static PdfTypeByIdDetails() { - return Joi.object({ - store_os: Joi.boolean(), - country_code: Joi.string().allow(""), - pdf_type_id: Joi.number(), - __v: Joi.number(), - _id: Joi.string().allow(""), - format: Joi.array().items(Joi.string().allow("")), - name: Joi.string().allow(""), - visibility: Joi.boolean(), - }); - } - - /** @returns {PdfConfigurationData} */ - static PdfConfigurationData() { - return Joi.object({ - _id: Joi.string().allow(""), - pdf_type_id: Joi.number(), - format: Joi.string().allow(""), - template: Joi.string().allow(""), - country_code: Joi.string().allow(""), - __v: Joi.number(), - }); - } - - /** @returns {UpdatedDefaultTemplateById} */ - static UpdatedDefaultTemplateById() { - return Joi.object({ - data: FileStoragePlatformModel.PdfConfigurationData(), - success: Joi.boolean(), - }); - } - - /** @returns {UpdateTemplate} */ - static UpdateTemplate() { - return Joi.object({ - pdf_type_id: Joi.number(), - format: Joi.string().allow(""), - country_code: Joi.string().allow(""), - template: Joi.string().allow(""), - store_os: Joi.boolean(), - }); - } - - /** @returns {PdfDefaultTemplateById} */ - static PdfDefaultTemplateById() { - return Joi.object({ - _id: Joi.string().allow(""), - country_code: Joi.string().allow(""), - format: Joi.string().allow(""), - pdf_type_id: Joi.number(), - __v: Joi.number(), - template: Joi.string().allow(""), - }); - } - - /** @returns {PdfTemplateCreateSuccess} */ - static PdfTemplateCreateSuccess() { - return Joi.object({ - code: Joi.number(), - success: Joi.boolean(), - data: FileStoragePlatformModel.PdfTemplateCreateSuccessData(), - }); - } - - /** @returns {PdfTemplateCreateSuccessData} */ - static PdfTemplateCreateSuccessData() { - return Joi.object({ - _id: Joi.string().allow(""), - pdf_type_id: Joi.number(), - format: Joi.string().allow(""), - template: Joi.string().allow(""), - country_code: Joi.string().allow(""), - __v: Joi.number(), - }); - } - - /** @returns {CreateTemplate} */ - static CreateTemplate() { - return Joi.object({ - pdf_type_id: Joi.number().required(), - format: Joi.string().allow("").required(), - country_code: Joi.string().allow("").required(), - template: Joi.string().allow(""), - }); - } - - /** @returns {PdfDefaultTemplateSuccess} */ - static PdfDefaultTemplateSuccess() { - return Joi.object({ - data: Joi.array().items(FileStoragePlatformModel.Document()), - success: Joi.boolean(), + data: Joi.object().pattern(/\S/, Joi.any()), + support: Joi.object().pattern(/\S/, Joi.any()), }); } - /** @returns {FailedBrowseFilesResult} */ - static FailedBrowseFilesResult() { + /** @returns {FailedResponse} */ + static FailedResponse() { return Joi.object({ message: Joi.string().allow("").required(), }); @@ -876,8 +668,8 @@ class FileStoragePlatformModel { }); } - /** @returns {FileUpload} */ - static FileUpload() { + /** @returns {StartResponse} */ + static StartResponse() { return Joi.object({ file_name: Joi.string().allow("").required(), file_path: Joi.string().allow("").required(), @@ -887,12 +679,20 @@ class FileStoragePlatformModel { operation: Joi.string().allow("").required(), size: Joi.number().required(), upload: FileStoragePlatformModel.Upload().required(), + cdn: FileStoragePlatformModel.CDN().required(), tags: Joi.array().items(Joi.string().allow("")), }); } - /** @returns {FileUploadStart} */ - static FileUploadStart() { + /** @returns {Params} */ + static Params() { + return Joi.object({ + subpath: Joi.string().allow(""), + }); + } + + /** @returns {StartRequest} */ + static StartRequest() { return Joi.object({ file_name: Joi.string().allow("").required(), content_type: Joi.string().allow("").required(), @@ -909,8 +709,8 @@ class FileStoragePlatformModel { }); } - /** @returns {FileUploadComplete} */ - static FileUploadComplete() { + /** @returns {CompleteResponse} */ + static CompleteResponse() { return Joi.object({ _id: Joi.string().allow("").required(), file_name: Joi.string().allow("").required(), @@ -930,14 +730,6 @@ class FileStoragePlatformModel { }); } - /** @returns {ProxyFileAccess} */ - static ProxyFileAccess() { - return Joi.object({ - data: Joi.object().pattern(/\S/, Joi.any()), - support: Joi.object().pattern(/\S/, Joi.any()), - }); - } - /** @returns {DestinationNamespace} */ static DestinationNamespace() { return Joi.object({ @@ -962,23 +754,23 @@ class FileStoragePlatformModel { }); } - /** @returns {SignUrlResult} */ - static SignUrlResult() { + /** @returns {SignUrlResponse} */ + static SignUrlResponse() { return Joi.object({ urls: Joi.array().items(FileStoragePlatformModel.Urls()).required(), }); } - /** @returns {SignUrl} */ - static SignUrl() { + /** @returns {SignUrlRequest} */ + static SignUrlRequest() { return Joi.object({ expiry: Joi.number().required(), urls: Joi.array().items(Joi.string().allow("")).required(), }); } - /** @returns {InvoiceTypesData} */ - static InvoiceTypesData() { + /** @returns {InvoiceTypesDataResponse} */ + static InvoiceTypesDataResponse() { return Joi.object({ status: Joi.boolean(), _id: Joi.string().allow("").required(), @@ -987,16 +779,15 @@ class FileStoragePlatformModel { format: Joi.array().items(Joi.string().allow("")).required(), __v: Joi.number().required(), visibility: Joi.boolean().required(), - store_os: Joi.boolean().required(), country_code: Joi.string().allow("").required(), }); } - /** @returns {InvoiceTypes} */ - static InvoiceTypes() { + /** @returns {InvoiceTypesResponse} */ + static InvoiceTypesResponse() { return Joi.object({ data: Joi.array() - .items(FileStoragePlatformModel.InvoiceTypesData()) + .items(FileStoragePlatformModel.InvoiceTypesDataResponse()) .required(), success: Joi.boolean().required(), }); @@ -1367,8 +1158,8 @@ class FileStoragePlatformModel { }); } - /** @returns {PdfPayloadDetails} */ - static PdfPayloadDetails() { + /** @returns {DummyTemplateDataPayload} */ + static DummyTemplateDataPayload() { return Joi.object({ is_export: Joi.boolean(), is_export_shipment: Joi.boolean(), @@ -1403,6 +1194,8 @@ class FileStoragePlatformModel { is_self_ship: Joi.boolean(), mode: Joi.string().allow(""), is_self_pickup: Joi.boolean(), + shipment_meta: Joi.object().pattern(/\S/, Joi.any()), + order_meta: Joi.object().pattern(/\S/, Joi.any()), platform_name: Joi.string().allow(""), amount_to_be_collected: Joi.number(), amount_paid: Joi.number(), @@ -1423,34 +1216,14 @@ class FileStoragePlatformModel { return Joi.object({ _id: Joi.string().allow(""), pdf_type_id: Joi.number(), - payload: FileStoragePlatformModel.PdfPayloadDetails().required(), + payload: FileStoragePlatformModel.DummyTemplateDataPayload().required(), country_code: Joi.string().allow(""), __v: Joi.number(), }); } - /** @returns {savePdfPayload} */ - static savePdfPayload() { - return Joi.object({ - pdf_type_id: Joi.number(), - payload: FileStoragePlatformModel.PdfPayloadDetails(), - country_code: Joi.string().allow(""), - }); - } - - /** @returns {MapperDetails} */ - static MapperDetails() { - return Joi.object({ - _id: Joi.string().allow(""), - pdf_type_id: Joi.number(), - payload: FileStoragePlatformModel.PdfPayloadDetails(), - country_code: Joi.string().allow(""), - __v: Joi.number(), - }); - } - - /** @returns {PdfDataItemsDetails} */ - static PdfDataItemsDetails() { + /** @returns {DummyTemplateDataItems} */ + static DummyTemplateDataItems() { return Joi.object({ data: Joi.array() .items(FileStoragePlatformModel.DummyTemplateData()) @@ -1465,8 +1238,6 @@ class FileStoragePlatformModel { format: Joi.string().allow(""), template: Joi.string().allow(""), pdf_type_id: Joi.number(), - country_code: Joi.string().allow(""), - default_template: Joi.boolean(), }); } @@ -1484,14 +1255,6 @@ class FileStoragePlatformModel { }); } - /** @returns {DeleteMapperById} */ - static DeleteMapperById() { - return Joi.object({ - message: Joi.string().allow(""), - default_template: Joi.boolean(), - }); - } - /** @returns {PdfConfigSuccess} */ static PdfConfigSuccess() { return Joi.object({ @@ -1521,6 +1284,14 @@ class FileStoragePlatformModel { }); } + /** @returns {PdfDefaultTemplateSuccess} */ + static PdfDefaultTemplateSuccess() { + return Joi.object({ + data: Joi.array().items(FileStoragePlatformModel.Document()), + success: Joi.boolean(), + }); + } + /** @returns {Document} */ static Document() { return Joi.object({ @@ -1614,7 +1385,7 @@ class FileStoragePlatformModel { return Joi.object({ job_type: Joi.string().allow(""), action: Joi.string().allow(""), - event: Joi.object().pattern(/\S/, Joi.any()), + event: Joi.any(), organizaton_id: Joi.string().allow(""), company_id: Joi.number(), application_id: Joi.array().items(Joi.string().allow("")), @@ -1622,7 +1393,7 @@ class FileStoragePlatformModel { trace_id: Joi.array().items(Joi.string().allow("")), created_timestamp: Joi.number(), service: FileStoragePlatformModel.PaymentReceiptService(), - event_trace_info: Joi.object().pattern(/\S/, Joi.any()), + event_trace_info: Joi.any(), trace: Joi.string().allow(""), }); } diff --git a/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts b/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts index bab4147f7..09694cdf2 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +++ b/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts @@ -14,7 +14,7 @@ export = FileStoragePlatformValidator; * files(products, orders, logistics etc), Required for validating the data of * the file being uploaded, decides where exactly the file will be stored * inside the storage bucket. - * @property {FileStoragePlatformModel.FileUpload} body + * @property {FileStoragePlatformModel.StartResponse} body */ /** * @typedef CopyFilesParam @@ -23,7 +23,7 @@ export = FileStoragePlatformValidator; */ /** * @typedef GetSignUrlsParam - * @property {FileStoragePlatformModel.SignUrl} body + * @property {FileStoragePlatformModel.SignUrlRequest} body */ /** * @typedef ProxyParam @@ -35,7 +35,7 @@ export = FileStoragePlatformValidator; * files(products, orders, logistics etc), Required for validating the data of * the file being uploaded, decides where exactly the file will be stored * inside the storage bucket. - * @property {FileStoragePlatformModel.FileUploadStart} body + * @property {FileStoragePlatformModel.StartRequest} body */ declare class FileStoragePlatformValidator { /** @returns {BrowseParam} */ @@ -79,14 +79,14 @@ type CompleteUploadParam = { * inside the storage bucket. */ namespace: string; - body: FileStoragePlatformModel.FileUpload; + body: FileStoragePlatformModel.StartResponse; }; type CopyFilesParam = { sync?: boolean; body: FileStoragePlatformModel.CopyFiles; }; type GetSignUrlsParam = { - body: FileStoragePlatformModel.SignUrl; + body: FileStoragePlatformModel.SignUrlRequest; }; type ProxyParam = { /** @@ -102,6 +102,6 @@ type StartUploadParam = { * inside the storage bucket. */ namespace: string; - body: FileStoragePlatformModel.FileUploadStart; + body: FileStoragePlatformModel.StartRequest; }; import FileStoragePlatformModel = require("./FileStoragePlatformModel"); diff --git a/sdk/platform/FileStorage/FileStoragePlatformValidator.js b/sdk/platform/FileStorage/FileStoragePlatformValidator.js index 7c3bcfec5..f98be14e1 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformValidator.js +++ b/sdk/platform/FileStorage/FileStoragePlatformValidator.js @@ -18,7 +18,7 @@ const FileStoragePlatformModel = require("./FileStoragePlatformModel"); * files(products, orders, logistics etc), Required for validating the data of * the file being uploaded, decides where exactly the file will be stored * inside the storage bucket. - * @property {FileStoragePlatformModel.FileUpload} body + * @property {FileStoragePlatformModel.StartResponse} body */ /** @@ -29,7 +29,7 @@ const FileStoragePlatformModel = require("./FileStoragePlatformModel"); /** * @typedef GetSignUrlsParam - * @property {FileStoragePlatformModel.SignUrl} body + * @property {FileStoragePlatformModel.SignUrlRequest} body */ /** @@ -43,7 +43,7 @@ const FileStoragePlatformModel = require("./FileStoragePlatformModel"); * files(products, orders, logistics etc), Required for validating the data of * the file being uploaded, decides where exactly the file will be stored * inside the storage bucket. - * @property {FileStoragePlatformModel.FileUploadStart} body + * @property {FileStoragePlatformModel.StartRequest} body */ class FileStoragePlatformValidator { @@ -60,7 +60,7 @@ class FileStoragePlatformValidator { static completeUpload() { return Joi.object({ namespace: Joi.string().allow("").required(), - body: FileStoragePlatformModel.FileUpload().required(), + body: FileStoragePlatformModel.StartResponse().required(), }).required(); } @@ -75,7 +75,7 @@ class FileStoragePlatformValidator { /** @returns {GetSignUrlsParam} */ static getSignUrls() { return Joi.object({ - body: FileStoragePlatformModel.SignUrl().required(), + body: FileStoragePlatformModel.SignUrlRequest().required(), }).required(); } @@ -90,7 +90,7 @@ class FileStoragePlatformValidator { static startUpload() { return Joi.object({ namespace: Joi.string().allow("").required(), - body: FileStoragePlatformModel.FileUploadStart().required(), + body: FileStoragePlatformModel.StartRequest().required(), }).required(); } } diff --git a/sdk/platform/Finance/FinancePlatformClient.d.ts b/sdk/platform/Finance/FinancePlatformClient.d.ts new file mode 100644 index 000000000..d61e3de81 --- /dev/null +++ b/sdk/platform/Finance/FinancePlatformClient.d.ts @@ -0,0 +1,320 @@ +export = Finance; +declare class Finance { + constructor(config: any); + config: any; + /** + * @param {FinancePlatformValidator.ChannelDisplayNameParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name channelDisplayName + * @summary: Get channel display name + * @description: Retrieve the display name for a channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/channelDisplayName/). + */ + channelDisplayName({ filterKey, requestHeaders }?: FinancePlatformValidator.ChannelDisplayNameParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.CreateSellerCreditNoteConfigParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name createSellerCreditNoteConfig + * @summary: Create seller credit note config + * @description: Set up configuration for seller credit notes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/createSellerCreditNoteConfig/). + */ + createSellerCreditNoteConfig({ body, requestHeaders }?: FinancePlatformValidator.CreateSellerCreditNoteConfigParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.CreditNoteDetailsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name creditNoteDetails + * @summary: Get credit note details + * @description: Retrieve detailed information about a credit note. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/creditNoteDetails/). + */ + creditNoteDetails({ body, requestHeaders }?: FinancePlatformValidator.CreditNoteDetailsParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.CreditlineDataplatformParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name creditlineDataplatform + * @summary: Access credit line data platform + * @description: Connect to the credit line data platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/creditlineDataplatform/). + */ + creditlineDataplatform({ body, requestHeaders }?: FinancePlatformValidator.CreditlineDataplatformParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.DeleteConfigParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteConfig + * @summary: Deletes credit note config + * @description: Deletes credit note config. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/deleteConfig/). + */ + deleteConfig({ body, requestHeaders }?: FinancePlatformValidator.DeleteConfigParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.DownloadCreditDebitNoteParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name downloadCreditDebitNote + * @summary: Download credit/debit note + * @description: Retrieve and save credit/debit notes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/downloadCreditDebitNote/). + */ + downloadCreditDebitNote({ body, requestHeaders }?: FinancePlatformValidator.DownloadCreditDebitNoteParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.DownloadReportParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name downloadReport + * @summary: Download financial report + * @description: Retrieve and save a financial report. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/downloadReport/). + */ + downloadReport({ body, requestHeaders }?: FinancePlatformValidator.DownloadReportParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.DownloadReportCustomerCnParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name downloadReportCustomerCn + * @summary: Download customer credit note report + * @description: Retrieve and save a report for customer credit notes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/downloadReportCustomerCn/). + */ + downloadReportCustomerCn({ body, requestHeaders }?: FinancePlatformValidator.DownloadReportCustomerCnParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.GenerateReportParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name generateReport + * @summary: Generate financial report + * @description: Create a financial report with relevant data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/generateReport/). + */ + generateReport({ body, requestHeaders }?: FinancePlatformValidator.GenerateReportParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.GenerateReportCustomerCnParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name generateReportCustomerCn + * @summary: Generate customer credit note report + * @description: Create a report specifically for customer credit notes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/generateReportCustomerCn/). + */ + generateReportCustomerCn({ body, requestHeaders }?: FinancePlatformValidator.GenerateReportCustomerCnParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.GetAffiliateParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAffiliate + * @summary: Get affiliate details + * @description: Retrieve information about an affiliate. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getAffiliate/). + */ + getAffiliate({ body, requestHeaders }?: FinancePlatformValidator.GetAffiliateParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.GetCnConfigParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCnConfig + * @summary: Get credit note configuration + * @description: Retrieve configuration settings for credit notes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getCnConfig/). + */ + getCnConfig({ body, requestHeaders }?: FinancePlatformValidator.GetCnConfigParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.GetCustomerCreditBalanceParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getCustomerCreditBalance + * @summary: Get customer credit balance + * @description: Retrieve the credit balance of a customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getCustomerCreditBalance/). + */ + getCustomerCreditBalance({ body, requestHeaders }?: FinancePlatformValidator.GetCustomerCreditBalanceParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.GetDataParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getData + * @summary: Get financial data + * @description: Retrieve financial data for analysis. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getData/). + */ + getData({ body, requestHeaders }?: FinancePlatformValidator.GetDataParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.GetPdfUrlViewParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getPdfUrlView + * @summary: Get PDF URL view + * @description: Retrieve a URL to view a PDF document. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getPdfUrlView/). + */ + getPdfUrlView({ body, requestHeaders }?: FinancePlatformValidator.GetPdfUrlViewParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.GetReasonParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getReason + * @summary: Get transaction reason + * @description: Retrieve the reason behind a transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getReason/). + */ + getReason({ body, requestHeaders }?: FinancePlatformValidator.GetReasonParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.GetReportListParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getReportList + * @summary: Get report list + * @description: Retrieve a list of available financial reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getReportList/). + */ + getReportList({ body, requestHeaders }?: FinancePlatformValidator.GetReportListParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.GetReportingFiltersParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getReportingFilters + * @summary: Get reporting filters + * @description: Retrieve available filters for financial reporting. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getReportingFilters/). + */ + getReportingFilters({ filterKey, affiliateId, requestHeaders }?: FinancePlatformValidator.GetReportingFiltersParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.InvoiceActivityLogsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name invoiceActivityLogs + * @summary: Display activity log details of an invoice + * @description: Display activity log details of invoice. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoiceActivityLogs/). + */ + invoiceActivityLogs({ invoiceNumber, requestHeaders }?: FinancePlatformValidator.InvoiceActivityLogsParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.InvoiceListingParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name invoiceListing + * @summary: List invoices + * @description: Provides list of invoices generated for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoiceListing/). + */ + invoiceListing({ body, requestHeaders }?: FinancePlatformValidator.InvoiceListingParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.InvoicePDFParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name invoicePDF + * @summary: Get invoice PDF + * @description: Retrieve the PDF version of an invoice. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoicePDF/). + */ + invoicePDF({ body, requestHeaders }?: FinancePlatformValidator.InvoicePDFParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.InvoicePaymentDetailsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name invoicePaymentDetails + * @summary: Display payment details of an invoice + * @description: Display payment details of invoice. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoicePaymentDetails/). + */ + invoicePaymentDetails({ invoiceNumber, requestHeaders }?: FinancePlatformValidator.InvoicePaymentDetailsParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.InvoicePaymentOptionsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name invoicePaymentOptions + * @summary: Display all payment options for invoice. + * @description: Display all payment options for invoice. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoicePaymentOptions/). + */ + invoicePaymentOptions({ body, requestHeaders }?: FinancePlatformValidator.InvoicePaymentOptionsParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.InvoiceTypeParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name invoiceType + * @summary: Get invoice types + * @description: Retrieve a list of available invoice types. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoiceType/). + */ + invoiceType({ body, requestHeaders }?: FinancePlatformValidator.InvoiceTypeParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.IsCnRefundMethodParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name isCnRefundMethod + * @summary: Check refund method + * @description: Verify the refund method for credit notes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/isCnRefundMethod/). + */ + isCnRefundMethod({ body, requestHeaders }?: FinancePlatformValidator.IsCnRefundMethodParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.IsCreditlinePlatformParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name isCreditlinePlatform + * @summary: Check credit line platform status + * @description: Determine if the credit line platform is operational. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/isCreditlinePlatform/). + */ + isCreditlinePlatform({ body, requestHeaders }?: FinancePlatformValidator.IsCreditlinePlatformParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.OrderFreezeParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name orderFreeze + * @summary: Get status of oms freeze. + * @description: Used to get status of oms freeze. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/orderFreeze/). + */ + orderFreeze({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.PaymentProcessParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name paymentProcess + * @summary: Process payments + * @description: Initiate and manage payment processes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/paymentProcess/). + */ + paymentProcess({ body, requestHeaders }?: FinancePlatformValidator.PaymentProcessParam, { responseHeaders }?: object): Promise; + /** + * @param {FinancePlatformValidator.UnlockCreditNoteParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name unlockCreditNote + * @summary: Unlock credit notes + * @description: Used to unlock all request credit notes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/unlockCreditNote/). + */ + unlockCreditNote({ body, requestHeaders }?: FinancePlatformValidator.UnlockCreditNoteParam, { responseHeaders }?: object): Promise; +} +import FinancePlatformValidator = require("./FinancePlatformValidator"); +import FinancePlatformModel = require("./FinancePlatformModel"); diff --git a/sdk/platform/Finance/FinancePlatformClient.js b/sdk/platform/Finance/FinancePlatformClient.js new file mode 100644 index 000000000..87e82453d --- /dev/null +++ b/sdk/platform/Finance/FinancePlatformClient.js @@ -0,0 +1,2333 @@ +const PlatformAPIClient = require("../PlatformAPIClient"); +const { + FDKClientValidationError, + FDKResponseValidationError, +} = require("../../common/FDKError"); +const Paginator = require("../../common/Paginator"); +const FinancePlatformValidator = require("./FinancePlatformValidator"); +const FinancePlatformModel = require("./FinancePlatformModel"); +const { Logger } = require("./../../common/Logger"); +const Joi = require("joi"); + +class Finance { + constructor(config) { + this.config = config; + } + + /** + * @param {FinancePlatformValidator.ChannelDisplayNameParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name channelDisplayName + * @summary: Get channel display name + * @description: Retrieve the display name for a channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/channelDisplayName/). + */ + async channelDisplayName( + { filterKey, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.channelDisplayName().validate( + { + filterKey, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.channelDisplayName().validate( + { + filterKey, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > channelDisplayName \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["filter_key"] = filterKey; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/finance/v1.0/company/${this.config.companyId}/channel-display-names`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.ChannelDisplayNameResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > channelDisplayName \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.CreateSellerCreditNoteConfigParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name createSellerCreditNoteConfig + * @summary: Create seller credit note config + * @description: Set up configuration for seller credit notes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/createSellerCreditNoteConfig/). + */ + async createSellerCreditNoteConfig( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = FinancePlatformValidator.createSellerCreditNoteConfig().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.createSellerCreditNoteConfig().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > createSellerCreditNoteConfig \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/create-update-credit-note-config`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.CreateSellerCreditNoteConfigResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > createSellerCreditNoteConfig \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.CreditNoteDetailsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name creditNoteDetails + * @summary: Get credit note details + * @description: Retrieve detailed information about a credit note. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/creditNoteDetails/). + */ + async creditNoteDetails( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.creditNoteDetails().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.creditNoteDetails().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > creditNoteDetails \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/credit-note-details`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.CreditNoteDetailsResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > creditNoteDetails \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.CreditlineDataplatformParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name creditlineDataplatform + * @summary: Access credit line data platform + * @description: Connect to the credit line data platform. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/creditlineDataplatform/). + */ + async creditlineDataplatform( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = FinancePlatformValidator.creditlineDataplatform().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.creditlineDataplatform().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > creditlineDataplatform \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/credit-line-data`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.CreditlineDataPlatformResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > creditlineDataplatform \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.DeleteConfigParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteConfig + * @summary: Deletes credit note config + * @description: Deletes credit note config. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/deleteConfig/). + */ + async deleteConfig( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.deleteConfig().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.deleteConfig().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > deleteConfig \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/delete-seller-config`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.DeleteConfigResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > deleteConfig \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.DownloadCreditDebitNoteParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name downloadCreditDebitNote + * @summary: Download credit/debit note + * @description: Retrieve and save credit/debit notes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/downloadCreditDebitNote/). + */ + async downloadCreditDebitNote( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = FinancePlatformValidator.downloadCreditDebitNote().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.downloadCreditDebitNote().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > downloadCreditDebitNote \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/download-credit-debit-note`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.DownloadCreditDebitNoteResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > downloadCreditDebitNote \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.DownloadReportParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name downloadReport + * @summary: Download financial report + * @description: Retrieve and save a financial report. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/downloadReport/). + */ + async downloadReport( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.downloadReport().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.downloadReport().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > downloadReport \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/download-report`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.DownloadReportList().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > downloadReport \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.DownloadReportCustomerCnParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name downloadReportCustomerCn + * @summary: Download customer credit note report + * @description: Retrieve and save a report for customer credit notes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/downloadReportCustomerCn/). + */ + async downloadReportCustomerCn( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = FinancePlatformValidator.downloadReportCustomerCn().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.downloadReportCustomerCn().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > downloadReportCustomerCn \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/download-report-customer-cn`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.DownloadReportCustomerCnResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > downloadReportCustomerCn \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.GenerateReportParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name generateReport + * @summary: Generate financial report + * @description: Create a financial report with relevant data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/generateReport/). + */ + async generateReport( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.generateReport().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.generateReport().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > generateReport \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/generate-report`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.GenerateReportJson().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > generateReport \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.GenerateReportCustomerCnParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name generateReportCustomerCn + * @summary: Generate customer credit note report + * @description: Create a report specifically for customer credit notes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/generateReportCustomerCn/). + */ + async generateReportCustomerCn( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = FinancePlatformValidator.generateReportCustomerCn().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.generateReportCustomerCn().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > generateReportCustomerCn \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/generate-report-customer-cn`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.GenerateReportCustomerCnResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > generateReportCustomerCn \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.GetAffiliateParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAffiliate + * @summary: Get affiliate details + * @description: Retrieve information about an affiliate. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getAffiliate/). + */ + async getAffiliate( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.getAffiliate().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.getAffiliate().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > getAffiliate \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/get-affiliate-list`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.GetAffiliateResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > getAffiliate \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.GetCnConfigParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCnConfig + * @summary: Get credit note configuration + * @description: Retrieve configuration settings for credit notes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getCnConfig/). + */ + async getCnConfig( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.getCnConfig().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = FinancePlatformValidator.getCnConfig().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > getCnConfig \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/get-seller-cn-config`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.GetCnConfigResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > getCnConfig \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.GetCustomerCreditBalanceParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getCustomerCreditBalance + * @summary: Get customer credit balance + * @description: Retrieve the credit balance of a customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getCustomerCreditBalance/). + */ + async getCustomerCreditBalance( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = FinancePlatformValidator.getCustomerCreditBalance().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.getCustomerCreditBalance().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > getCustomerCreditBalance \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/customer-credit-balance`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.GetCustomerCreditBalanceResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > getCustomerCreditBalance \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.GetDataParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getData + * @summary: Get financial data + * @description: Retrieve financial data for analysis. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getData/). + */ + async getData( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.getData().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = FinancePlatformValidator.getData().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > getData \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/get-data`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.GetEngineResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > getData \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.GetPdfUrlViewParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getPdfUrlView + * @summary: Get PDF URL view + * @description: Retrieve a URL to view a PDF document. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getPdfUrlView/). + */ + async getPdfUrlView( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.getPdfUrlView().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.getPdfUrlView().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > getPdfUrlView \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/get-cn-pdf-link`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.GetPdfUrlViewResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > getPdfUrlView \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.GetReasonParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getReason + * @summary: Get transaction reason + * @description: Retrieve the reason behind a transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getReason/). + */ + async getReason( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.getReason().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = FinancePlatformValidator.getReason().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > getReason \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/get-reason`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.GetReasonResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > getReason \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.GetReportListParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getReportList + * @summary: Get report list + * @description: Retrieve a list of available financial reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getReportList/). + */ + async getReportList( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.getReportList().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.getReportList().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > getReportList \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/get-report-list`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.GetReportListResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > getReportList \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.GetReportingFiltersParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getReportingFilters + * @summary: Get reporting filters + * @description: Retrieve available filters for financial reporting. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getReportingFilters/). + */ + async getReportingFilters( + { filterKey, affiliateId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.getReportingFilters().validate( + { + filterKey, + affiliateId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.getReportingFilters().validate( + { + filterKey, + affiliateId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > getReportingFilters \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["filter_key"] = filterKey; + query_params["affiliate_id"] = affiliateId; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/finance/v1.0/company/${this.config.companyId}/reporting-filters`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.GetReportingFiltersResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > getReportingFilters \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.InvoiceActivityLogsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name invoiceActivityLogs + * @summary: Display activity log details of an invoice + * @description: Display activity log details of invoice. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoiceActivityLogs/). + */ + async invoiceActivityLogs( + { invoiceNumber, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.invoiceActivityLogs().validate( + { + invoiceNumber, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.invoiceActivityLogs().validate( + { + invoiceNumber, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > invoiceActivityLogs \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/finance/v1.0/company/${this.config.companyId}/invoice/${invoiceNumber}/activity`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.InvoiceActivityLogsResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > invoiceActivityLogs \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.InvoiceListingParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name invoiceListing + * @summary: List invoices + * @description: Provides list of invoices generated for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoiceListing/). + */ + async invoiceListing( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.invoiceListing().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.invoiceListing().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > invoiceListing \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/invoice/listing`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.InvoiceListingResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > invoiceListing \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.InvoicePDFParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name invoicePDF + * @summary: Get invoice PDF + * @description: Retrieve the PDF version of an invoice. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoicePDF/). + */ + async invoicePDF( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.invoicePDF().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = FinancePlatformValidator.invoicePDF().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > invoicePDF \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/invoice/pdf-view`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.InvoicePdfResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > invoicePDF \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.InvoicePaymentDetailsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name invoicePaymentDetails + * @summary: Display payment details of an invoice + * @description: Display payment details of invoice. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoicePaymentDetails/). + */ + async invoicePaymentDetails( + { invoiceNumber, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.invoicePaymentDetails().validate( + { + invoiceNumber, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.invoicePaymentDetails().validate( + { + invoiceNumber, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > invoicePaymentDetails \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/finance/v1.0/company/${this.config.companyId}/invoice/${invoiceNumber}/payment`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.InvoicePaymentDetailsResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > invoicePaymentDetails \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.InvoicePaymentOptionsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name invoicePaymentOptions + * @summary: Display all payment options for invoice. + * @description: Display all payment options for invoice. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoicePaymentOptions/). + */ + async invoicePaymentOptions( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.invoicePaymentOptions().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.invoicePaymentOptions().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > invoicePaymentOptions \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/invoice-payment-options`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.InvoicePaymentOptionsResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > invoicePaymentOptions \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.InvoiceTypeParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name invoiceType + * @summary: Get invoice types + * @description: Retrieve a list of available invoice types. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoiceType/). + */ + async invoiceType( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.invoiceType().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = FinancePlatformValidator.invoiceType().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > invoiceType \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/invoice-type`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.InvoiceTypeResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > invoiceType \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.IsCnRefundMethodParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name isCnRefundMethod + * @summary: Check refund method + * @description: Verify the refund method for credit notes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/isCnRefundMethod/). + */ + async isCnRefundMethod( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.isCnRefundMethod().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.isCnRefundMethod().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > isCnRefundMethod \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/cn-as-refund-method`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.IsCnRefundMethodResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > isCnRefundMethod \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.IsCreditlinePlatformParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name isCreditlinePlatform + * @summary: Check credit line platform status + * @description: Determine if the credit line platform is operational. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/isCreditlinePlatform/). + */ + async isCreditlinePlatform( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.isCreditlinePlatform().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.isCreditlinePlatform().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > isCreditlinePlatform \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/creditline-opted`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.IsCreditlinePlatformResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > isCreditlinePlatform \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.OrderFreezeParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name orderFreeze + * @summary: Get status of oms freeze. + * @description: Used to get status of oms freeze. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/orderFreeze/). + */ + async orderFreeze( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.orderFreeze().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = FinancePlatformValidator.orderFreeze().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > orderFreeze \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/finance/v1.0/company/${this.config.companyId}/order/freeze`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.OrederFreezeResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > orderFreeze \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.PaymentProcessParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name paymentProcess + * @summary: Process payments + * @description: Initiate and manage payment processes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/paymentProcess/). + */ + async paymentProcess( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.paymentProcess().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.paymentProcess().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > paymentProcess \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/payment-process`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.PaymentProcessResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > paymentProcess \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {FinancePlatformValidator.UnlockCreditNoteParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name unlockCreditNote + * @summary: Unlock credit notes + * @description: Used to unlock all request credit notes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/unlockCreditNote/). + */ + async unlockCreditNote( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = FinancePlatformValidator.unlockCreditNote().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FinancePlatformValidator.unlockCreditNote().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Finance > unlockCreditNote \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/finance/v1.0/company/${this.config.companyId}/credit-notes/unlock`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = FinancePlatformModel.UnlockCreditNoteResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Finance > unlockCreditNote \n ${res_error}`, + }); + } + } + + return response; + } +} + +module.exports = Finance; diff --git a/sdk/platform/Finance/FinancePlatformModel.d.ts b/sdk/platform/Finance/FinancePlatformModel.d.ts new file mode 100644 index 000000000..ea5cd8712 --- /dev/null +++ b/sdk/platform/Finance/FinancePlatformModel.d.ts @@ -0,0 +1,2890 @@ +export = FinancePlatformModel; +/** + * @typedef OrederFreezeResponse + * @property {boolean} [success] - Indicates whether the operation was successful or not. + * @property {boolean} [oms_freeze] - Flag indicating if the system is frozen + * for order management. + * @property {string} [source] - Optional field indicating the data source of + * the information. + */ +/** + * @typedef GenerateReportMeta + * @property {string} [brand] - The brand name associated with the report meta + * information. + * @property {string} [company] - The company name associated with the report + * meta information. + * @property {string} [channel] - The sale channel name associated with seller. + */ +/** + * @typedef GenerateReportFilters + * @property {string[]} [brand] - An array of brand names to filter the report data. + * @property {string[]} [company] - An array of company id to filter the report data. + * @property {string[]} [channel] - An array of sale channel names associated + * with seller to filter the report data. + */ +/** + * @typedef GenerateReportPlatform + * @property {string} [start_date] - The start date to generate report specific preiod. + * @property {string} [end_date] - The end date to generate report specific preiod. + * @property {GenerateReportMeta} [meta] + * @property {string} [report_id] - The unique identifier of the generate report + * where different report configure. + * @property {GenerateReportFilters} [filters] + */ +/** + * @typedef GenerateReportReq + * @property {GenerateReportPlatform} [data] + */ +/** + * @typedef Page + * @property {number} [item_total] - The total number of items on the page. + * @property {string} [next_id] - The identifier for the next page. + * @property {boolean} [has_previous] - Indicates whether there is a previous page. + * @property {boolean} [has_next] - Indicates whether there is a next page. + * @property {number} [current] - The current page number. + * @property {string} type - The type of the page, such as 'PageType'. + * @property {number} [size] - The number of items per page. + */ +/** + * @typedef Currency + * @property {string} [code] - The unique currency code. + * @property {string} [symbol] - The unique currency symbol. + * @property {string} [name] - The unique currency name. + */ +/** + * @typedef GenerateReportJson + * @property {Object} [data] + * @property {number} [item_count] - Total number of items in the report. + * @property {Page} [page] + * @property {string} [end_date] - The end date to generate report specific preiod. + * @property {string} [start_date] - The start date to generate report specific preiod. + * @property {string[][]} [items] - Nested array structure representing report + * items or data. + * @property {string[]} [headers] - Headers describing each item in the report data. + */ +/** + * @typedef Error + * @property {number} [status] + * @property {string} [reason] + * @property {boolean} [success] + * @property {string} [message] + * @property {string} [code] + * @property {string} [exception] + * @property {string} [info] + * @property {string} [request_id] + * @property {string} [stack_trace] + * @property {ErrorMeta} [meta] + */ +/** + * @typedef ErrorMeta + * @property {ErrorMetaItems[]} [columns_errors] + */ +/** + * @typedef ErrorMetaItems + * @property {number} [code] + * @property {string} [message] + */ +/** + * @typedef DownloadReport + * @property {DownloadReportData} [data] + */ +/** + * @typedef DownloadReportData + * @property {number} [page] - The current page number of the report. + * @property {number} [page_size] - The number of items displayed per page. + * @property {string} [start_date] - The start date for fetching the report + * history for download. + * @property {string} [end_date] - The end date for fetching the report history + * for download. + */ +/** + * @typedef DownloadReportItems + * @property {string} [start_date] - The start date for the report item. + * @property {string} [end_date] - The end date for the report item. + * @property {GenerateReportMeta} [meta] + * @property {string} [report_id] - The unique identifier of the report item. + * @property {GenerateReportFilters} [filters] + */ +/** + * @typedef DownloadReportList + * @property {DownloadReportItems[]} [items] - A list of report items available + * for download. + * @property {Page} [page] + * @property {number} [item_count] - The total number of items in the report list. + */ +/** + * @typedef GetEngineFilters + * @property {string} [config_field] - The configuration field used for filtering. + * @property {string} [status] - The status used for filtering. + * @property {boolean} [is_active] - Flag indicating if the filter is active. + * @property {string} [seller_id] - The seller ID used for filtering. + */ +/** + * @typedef GetEngineData + * @property {string} [status] - Status of the request. + * @property {GetEngineFilters} [filters] + * @property {string[]} [project] - A list of fields to get data from tables. + * @property {string} [table_name] - The name of the table from which to retrieve data. + * @property {Object} [search] - Search criteria for querying on given table + * specific fields. + * @property {number} [page] - The current page number for pagination. + * @property {number} [page_size] - The number of items displayed per page. + * @property {string} [order_by] - The field by which to order the results. + */ +/** + * @typedef GetEngineReq + * @property {GetEngineData} [data] + */ +/** + * @typedef GetEngineResponse + * @property {boolean} [success] - Indicates whether the request was successful. + * @property {Object[]} [items] - A list of items returned by the request. + * @property {Page} [page] + * @property {number} [item_count] - The total number of items returned by the request. + */ +/** + * @typedef GetReason + * @property {string} [reason_type] - The type of reason associated with the request. + */ +/** + * @typedef GetReasonReq + * @property {GetReason} [data] + */ +/** + * @typedef ReasonItem + * @property {string} [id] - Id of the reason for reason_type. + * @property {string} [name] - Code of the reason for reason_type. + * @property {string} [display_name] - Display name of the reason for reason_type. + */ +/** + * @typedef GetReasonResponse + * @property {boolean} [success] - Indicates whether the request was successfull. + * @property {ReasonItem[]} [item_list] - The list of items returned in the response. + * @property {number} [item_count] - The number of items in the response. + * @property {Page} [page] + */ +/** + * @typedef GetReportListData + * @property {string} [role_name] - The name of the role requesting the report list. + * @property {boolean} [listing_enabled] - Indicates whether listing is enabled + * for the role. + */ +/** + * @typedef GetReportListReq + * @property {GetReportListData} [data] + */ +/** + * @typedef GetReportListResponse + * @property {boolean} [success] - Indicates whether the request was successful. + * @property {ReportItem[]} [items] - The list of report items. + * @property {Page} [page] + * @property {number} [total_count] - The total number of items in the report list. + */ +/** + * @typedef ReportItem + * @property {string} [id] - The unique identifier for the report item. + * @property {string} [name] - The name of the report item. + * @property {string} [description] - A brief description of the report item. + * @property {string[]} [allowed_filters] - The filters that can be applied to + * the report item. + * @property {Object} [config_meta] - Metadata related to the report item configuration. + * @property {string} [report_type] - The type of the report item. + * @property {string} [display_date] - The display date of the report item, if applicable. + */ +/** + * @typedef GetAffiliate + * @property {number} [company_id] - The unique identifier of the company + * associated with the affiliate. + */ +/** + * @typedef GetAffiliateResponse + * @property {string} [reason] - The reason for the response, if applicable. + * @property {boolean} [success] - Indicates whether the request was successful. + * @property {Object[]} [docs] - List of items or data related to the affiliate. + */ +/** + * @typedef DownloadCreditDebitNote + * @property {string[]} [note_id] - List of unique identifiers for the + * credit/debit notes to be download. + */ +/** + * @typedef DownloadCreditDebitNoteReq + * @property {DownloadCreditDebitNote} [data] + */ +/** + * @typedef DownloadCreditDebitNoteResponseData + * @property {string} [id] - The unique identifier of the download credit/debit note. + * @property {string} [pdf_s3_url] - The URL where the PDF of the credit/debit + * note is stored. + */ +/** + * @typedef DownloadCreditDebitNoteResponse + * @property {boolean} [success] - Indicates whether the request to download the + * credit/debit notes was successful. + * @property {DownloadCreditDebitNoteResponseData[]} [data] - List of + * credit/debit notes download data. + */ +/** + * @typedef InvoiceBillingItem + * @property {string} [invoice_number] - The number of the invoice associated + * with the billing item. + * @property {number} [amount] - The amount of the billing item. + */ +/** + * @typedef PaymentProcessPayload + * @property {string} [platform] - The platform through which the payment is processed. + * @property {number} [amount] - The total amount to be processed in the payment. + * @property {string} [transaction_type] - The type of transaction (e.g., seller_online). + * @property {string} [source_reference] - The reference for the source of the payment. + * @property {number} [total_amount] - The total amount to be processed in the payment. + * @property {Object} [meta] - Additional metadata related to the payment. + * @property {string} [currency] - The currency in which the payment is made. + * @property {string} [seller_id] - The unique identifier for the seller + * receiving the payment. + * @property {string} [mode_of_payment] - The mode of payment (e.g., online). + * @property {InvoiceBillingItem[]} [invoice_billing_items] + */ +/** + * @typedef PaymentProcessReq + * @property {PaymentProcessPayload} [data] + */ +/** + * @typedef PaymentProcessResponse + * @property {number} [code] - Response code indicating the status of the payment process. + * @property {string} [message] - A message providing additional information + * about the payment process response. + * @property {Object} [meta] - Additional metadata related to the payment + * process response. + * @property {string} [transaction_id] - The unique identifier for the payment + * transaction. + * @property {string} [redirect_url] - URL to redirect the user to complete the + * payment process, if applicable. + */ +/** + * @typedef CreditlineDataPlatformPayload + * @property {number} [page] - The page number for pagination. + * @property {string} [seller_id] - The unique identifier for the seller. + * @property {string} [end_date] - The end date for the query. + * @property {string} [start_date] - The start date for the query. + * @property {number} [page_size] - The number of items per page. + */ +/** + * @typedef CreditlineDataPlatformReq + * @property {CreditlineDataPlatformPayload} [data] + */ +/** + * @typedef CreditlineDataPlatformResponse + * @property {Object[]} [items] - The list of items in the response. + * @property {number} [code] - The response status code. + * @property {boolean} [show_mr] - A flag indicating whether to show MR (some + * specific field). + * @property {Page} [page] + * @property {string} [message] - The response message. + * @property {string[]} [headers] - The list of response headers. + * @property {number} [item_count] - The total number of items. + */ +/** + * @typedef IsCreditlinePayload + * @property {string} [seller_id] - The unique identifier for the seller to + * check for credit line eligibility. + */ +/** + * @typedef IsCreditlinePlatformReq + * @property {IsCreditlinePayload} [data] + */ +/** + * @typedef IsCreditlinePlatformResponse + * @property {boolean} [is_creditline_opted] - Indicates whether the seller has + * opted for a credit line. + * @property {number} [code] - Response code indicating the status of the credit + * line check. + */ +/** + * @typedef InvoiceTypePayloadData + * @property {boolean} [is_active] - Indicates if the invoice type is active. + */ +/** + * @typedef InvoiceTypeReq + * @property {InvoiceTypePayloadData} [data] + */ +/** + * @typedef InvoiceTypeResponseItems + * @property {string} [text] - The text description of the invoice type. + * @property {string} [value] - The value or code representing the invoice type. + */ +/** + * @typedef InvoiceTypeResponse + * @property {boolean} [success] - Indicates whether the request was successful. + * @property {InvoiceTypeResponseItems[]} [invoice_type_list] - List of invoice + * types available. + * @property {InvoiceTypeResponseItems[]} [payment_status_list] - List of + * payment statuses available. + */ +/** + * @typedef InoviceListingPayloadDataFilters + * @property {string[]} [payment_status] - List of payment statuses to filter by. + * @property {string[]} [invoice_type] - List of invoice types to filter by. + * @property {string[]} [company_id] - List of company IDs to filter by. + */ +/** + * @typedef InvoiceListingPayloadData + * @property {number} [page_size] - The number of items per page for pagination. + * @property {number} [page] - The page number for pagination. + * @property {string} [start_date] - The start date for the invoice listing filter. + * @property {string} [end_date] - The end date for the invoice listing filter. + * @property {string} [search] - Search term for filtering invoices. + * @property {InoviceListingPayloadDataFilters} [filters] + */ +/** + * @typedef InvoiceListingReq + * @property {InvoiceListingPayloadData} [data] + */ +/** + * @typedef UnpaidInvoiceDataItems + * @property {number} [total_unpaid_invoice_count] - The total count of unpaid invoices. + * @property {string} [currency] - The currency used for unpaid invoices. + * @property {number} [total_unpaid_amount] - The total amount of unpaid invoices. + */ +/** + * @typedef InvoiceListingResponseItems + * @property {number} [amount] - The amount of the invoice. + * @property {string} [company] - The name of the company associated with the invoice. + * @property {string} [status] - The current status of the invoice (e.g., + * 'paid', 'unpaid'). + * @property {string} [due_date] - The due date of the invoice. + * @property {string} [invoice_date] - The date when the invoice was issued. + * @property {string} [invoice_type] - The type of invoice. + * @property {string} [period] - The period covered by the invoice. + * @property {string} [invoice_number] - The invoice number. + * @property {boolean} [is_downloadable] - Indicates if the invoice is available + * for download. + * @property {string} [invoice_id] - The unique identifier of the invoice. + * @property {Currency} [currency] + */ +/** + * @typedef InvoiceListingResponse + * @property {boolean} [success] - Indicates whether the request was successful. + * @property {string[]} [headers] - Headers related to the invoice listing response. + * @property {UnpaidInvoiceDataItems} [unpaid_invoice_data] + * @property {InvoiceListingResponseItems[]} [items] - List of invoice items in + * the response. + * @property {Page} [page] + * @property {number} [item_count] - The total number of invoice items in the response. + */ +/** + * @typedef InvoicePdfPayloadData + * @property {string[]} [invoice_number] - List of invoice numbers for which + * PDFs are requested. + */ +/** + * @typedef InvoicePdfReq + * @property {InvoicePdfPayloadData} [data] + */ +/** + * @typedef InvoicePdfResponse + * @property {boolean} [success] - Indicates whether the PDF generation request + * was successful. + * @property {string[]} [data] - List of URLs or paths to the generated PDF files. + * @property {string[]} [error] - List of errors encountered while generating the PDFs. + */ +/** + * @typedef IsCnRefundMethodData + * @property {string} [affiliate_id] - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + * @property {boolean} [toggle_edit_required] - Indicates whether editing the + * refund method is required. + * @property {number} [seller_id] - Unique identifier for the seller. + */ +/** + * @typedef IsCnRefundMethodReq + * @property {IsCnRefundMethodData} [data] + */ +/** + * @typedef IsCnRefundMethodResponseData + * @property {boolean} [is_first_time_user] - Indicates whether the seller for + * specific sale channel is using the refund method for the first time. + */ +/** + * @typedef IsCnRefundMethodResponse + * @property {boolean} [success] - Indicates whether the request to determine + * the refund method was successful. + * @property {IsCnRefundMethodResponseData} [data] + */ +/** + * @typedef CreditNoteConfigNotificationEvents + * @property {number} [expiration_reminder_to_customer] - Number of days before + * the expiration date to send a reminder notification to the customer. + */ +/** + * @typedef CreateSellerCreditNoteConfig + * @property {boolean} [is_cn_as_refund_method] - Indicates if the credit note + * is used as a refund method. + * @property {string} [affiliate_id] - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + * @property {string[]} [source_channel] - List of source channels associated + * with the credit note configuration. + * @property {number} [seller_id] - Unique identifier for the seller. + * @property {CreditNoteConfigNotificationEvents} [notification_events] + * @property {string} [sales_channel_name] - Name of the sales channel. + * @property {string[]} [ordering_channel] - List of ordering channels + * associated with the credit note configuration. + * @property {number} [validity] - Validity period of the credit note in days. + * @property {string} [currency_type] - Type of currency used for the credit note. + * @property {string[]} [slug_values] - List of slug values associated with the + * credit note configuration. + */ +/** + * @typedef CreateSellerCreditNoteConfigReq + * @property {CreateSellerCreditNoteConfig} [data] + */ +/** + * @typedef CreateSellerCreditNoteConfigResponse + * @property {boolean} [success] - Indicates if the credit note configuration + * creation was successful. + * @property {string} [message] - Additional information or message about the + * credit note configuration creation process. + */ +/** + * @typedef DeleteConfig + * @property {string} [affiliate_id] - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + * @property {string[]} [slug_values] - List of slug values associated with the + * credit note configuration. + * @property {number} [seller_id] - Unique identifier for the seller. + */ +/** + * @typedef DeleteConfigReq + * @property {DeleteConfig} [data] + */ +/** + * @typedef DeleteConfigResponse + * @property {boolean} [success] - Indicates if the configuration deletion was successful. + * @property {string} [message] - Additional information or message about the + * configuration deletion process. + */ +/** + * @typedef ChannelDisplayNameItems + * @property {string} [key] - The unique key identifying the channel. + * @property {string} [value] - The display name of the channel associated with the key. + */ +/** + * @typedef ChannelDisplayNameResponse + * @property {boolean} [success] - Indicates if the retrieval of channel display + * names was successful. + * @property {ChannelDisplayNameItems[]} [items] - List of items containing + * key-value pairs for channel display names. + */ +/** + * @typedef CnReferenceNumber + * @property {string} [cn_reference_number] - The unique reference number of the + * credit note. + */ +/** + * @typedef GetPdfUrlViewReq + * @property {CnReferenceNumber} [data] + */ +/** + * @typedef GetPdfUrlViewResponseData + * @property {string} [s3_pdf_link] - The URL link where credit nore pdf stored + * to view and download. + * @property {string} [cn_reference_number] - The unique reference number of the + * credit note. + */ +/** + * @typedef GetPdfUrlViewResponse + * @property {boolean} [success] - Indicates if the retrieval of the pdf URL was + * successful. + * @property {GetPdfUrlViewResponseData} [data] + */ +/** + * @typedef CreditNoteDetailsReq + * @property {CnReferenceNumber} [data] + */ +/** + * @typedef CnDetails + * @property {string} [staff_id] - ID of the staff member associated with the credit note. + * @property {string} [expiry_date] - Expiry date of the credit note. + * @property {string} [channel_of_issuance] - Channel through which the credit + * note was issued. + * @property {string} [order_id] - Order ID of order for which credit note created. + * @property {string} [date_issued] - Date when the credit note was issued. + * @property {string} [ordering_channel] - Ordering channel associated with the + * credit note. + * @property {string} [shipment_id] - Shipment Id associated with the credit note. + * @property {string} [store_id] - Store Id associated with the credit note. + * @property {string} [invoice_number] - Invoice number associated with the credit note. + */ +/** + * @typedef RedemptionDetails + * @property {Object} [meta] - Additional metadata related to the redemption details. + * @property {string} [staff_id] - ID of the staff member who processed the redemption. + * @property {string} [created_at] - Date and time when the redemption was processed. + * @property {string} [order_id] - Order Id of the order associated with the redemption. + * @property {string} [store_id] - Store Id of the order associated with the redemption. + * @property {string} [shipment_id] - Shipment Id of the order associated with + * the redemption. + * @property {string} [ordering_channel] - Ordering channel associated with the + * redemption. + * @property {number} [amount_debited] - Amount debited from the credit note + * during redemption. + * @property {string} [invoice_number] - Invoice number associated with the redemption. + */ +/** + * @typedef CreditNoteDetails + * @property {string} [currency] - Currency in which the credit note is issued. + * @property {number} [current_amount_used] - Current amount used from the credit note. + * @property {string} [cn_status] - Status of the credit note. + * @property {string} [customer_mobile_number] - Mobile number of the customer + * associated with the credit note. + * @property {string} [cn_reference_number] - Unique Credit number of the credit note. + * @property {CnDetails} [cn_details] + * @property {RedemptionDetails[]} [redemption_details] - List of redemption + * details associated with the credit note. + * @property {number} [remaining_cn_amount] - Remaining amount left in the credit note. + * @property {number} [available_cn_balance] - Available balance in the credit note. + * @property {number} [cn_amount] - Total amount of the credit note. + */ +/** + * @typedef CreditNoteDetailsResponse + * @property {boolean} [success] - Indicates if the retrieval of credit note + * details was successful. + * @property {CreditNoteDetails} [data] + */ +/** + * @typedef GetCustomerCreditBalance + * @property {string} [affiliate_id] - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + * @property {number} [seller_id] - Unique identifier for the seller. + * @property {string} [customer_mobile_number] - Mobile number of the customer + * for whom the credit balance is requested. + */ +/** + * @typedef GetCustomerCreditBalanceReq + * @property {GetCustomerCreditBalance} [data] + */ +/** + * @typedef GetCustomerCreditBalanceResponseData + * @property {string} [customer_mobile_number] - Mobile number of the customer. + * @property {number} [total_credited_balance] - Total credited balance + * available for the customer. + */ +/** + * @typedef GetCustomerCreditBalanceResponse + * @property {boolean} [success] - Indicates if the retrieval of customer credit + * balance was successful. + * @property {GetCustomerCreditBalanceResponseData} [data] + */ +/** + * @typedef GetCnConfigReq + * @property {DeleteConfig} [data] + */ +/** + * @typedef GetCnConfigResponseMeta + * @property {string} [reason] - Reason associated with the configuration response. + * @property {string[]} [source_channel] - List of source channels associated + * with the credit note configuration. + */ +/** + * @typedef GetCnConfigResponseData + * @property {boolean} [is_cn_as_refund_method] - Indicates if the credit note + * is configured as a refund method. + * @property {string} [affiliate_id] - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + * @property {Object} [meta] + * @property {number} [seller_id] - Unique identifier for the seller. + * @property {CreditNoteConfigNotificationEvents} [notification_events] + * @property {number} [validity] - Validity period of the credit note + * configuration in days. + * @property {string[]} [redemption_ordering_channel] - List of ordering + * channels associated with credit note redemption. + * @property {string} [currency_type] - Type of currency used for the credit note. + */ +/** + * @typedef GetCnConfigResponse + * @property {boolean} [success] - Indicates if the retrieval of credit note + * configuration was successful. + * @property {GetCnConfigResponseData} [data] + */ +/** + * @typedef CnGenerateReportFilters + * @property {string[]} [staff_id] - Array of staff IDs for filtering credit note reports. + * @property {string[]} [channel_of_issuance] - Array of channels through which + * credit notes were issued. + * @property {string[]} [utilisation] - Array of utilisation types for filtering + * credit note reports. + * @property {string[]} [ordering_channel] - Array of ordering channels + * associated with credit note reports. + * @property {number[]} [store_id] - Array of store IDs for filtering credit note reports. + * @property {string[]} [type_of_transaction] - Array of transaction types for + * filtering credit note reports. + * @property {string[]} [issuance_channel] - Array of issuance channels for + * filtering credit note reports. + */ +/** + * @typedef CnGenerateReport + * @property {number} [page] - Page number of the credit note report. + * @property {string} [end_date] - End date for filtering credit note data. + * @property {number} [page_size] - Number of items per page in the credit note report. + * @property {CnGenerateReportFilters} [filters] + * @property {string} [affiliate_id] - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + * @property {GenerateReportFilters} [meta] + * @property {string} [search] - Search query to filter credit note data by keyword. + * @property {string} [report_id] - Unique identifier for the credit note report. + * @property {string} [search_type] - Type of search criteria used for filtering + * credit note data. + * @property {string} [start_date] - Start date for filtering credit note data. + */ +/** + * @typedef GenerateReportCustomerCnReq + * @property {CnGenerateReport} [data] + */ +/** + * @typedef CnGenerateReportItems + * @property {string} [expiry_date] - Expiry date of the credit note item. + * @property {string} [status] - Status of the credit note item. + * @property {number} [total_amount] - Total amount of the credit note item. + * @property {string} [order_id] - Order ID of the order associated with the + * credit note item. + * @property {string} [date_issued] - Date when the credit note item was issued. + * @property {string} [shipment_id] - Shipment ID of the order associated with + * the credit note item. + * @property {string} [invoice_number] - Invoice number associated with the + * credit note item. + * @property {string} [credit_note_number] - Unique number of the credit note item. + */ +/** + * @typedef GenerateReportCustomerCnResponseData + * @property {boolean} [success] - Indicates if the credit note report + * generation was successful. + * @property {string} [message] - Additional message or information related to + * the credit note report. + * @property {CnGenerateReportItems[]} [items] - List of credit note items in the report. + * @property {Object} [row_header_display_order] - Display order for row headers + * in the report. + * @property {string} [end_date] - End date used in the credit note report. + * @property {Page} [page] + * @property {string[]} [headers] - Headers included in the credit note report. + * @property {string[]} [primary_headers] - Primary headers used in the credit + * note report. + * @property {string[]} [allowed_filters] - Allowed filters for the credit note report. + * @property {string} [start_date] - Start date used in the credit note report. + * @property {number} [item_count] - Total count of credit note items in the report. + */ +/** + * @typedef GenerateReportCustomerCnResponse + * @property {GenerateReportCustomerCnResponseData} [data] + */ +/** + * @typedef CnDownloadReport + * @property {number} [page] - Page number of the download report. + * @property {string} [start_date] - Start date for filtering credit note data + * in the report. + * @property {string} [end_date] - End date for filtering credit note data in the report. + * @property {string} [affiliate_id] - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + * @property {string} [search] - Search query to filter credit note data by keyword. + * @property {string} [status] - Status of the credit note data in the report. + * @property {string} [search_type] - Type of search criteria used for filtering + * credit note data. + * @property {number} [page_size] - Number of items per page in the download report. + */ +/** + * @typedef DownloadReportCustomerCnReq + * @property {CnDownloadReport} [data] + */ +/** + * @typedef DownloadReportResponseData + * @property {string} [report_config_id] - Unique identifier for the report configuration. + * @property {string} [full_name] - Full name associated with the report request. + * @property {string} [requested_by] - User who requested the report. + * @property {string} [start_date] - Start date used in the report. + * @property {string} [end_date] - End date used in the report. + * @property {Object} [request_dict] - Dictionary containing request parameters + * for the report. + * @property {string} [download_link] - Download link for accessing the generated report. + * @property {string} [created_at] - Date and time when the report was created. + * @property {Object} [meta] - Additional metadata associated with the report. + * @property {string} [msg] - Message related to the report status or generation. + * @property {string} [report_name] - Name of the generated report. + * @property {string} [status] - Status of the report. + * @property {string} [display_name] - Display name of the report. + * @property {Object} [filters] - Filters applied to generate the report. + */ +/** + * @typedef DownloadReportCustomerCnResponse + * @property {DownloadReportResponseData[]} [items] - List of download report data items. + * @property {number} [item_count] - Total count of items in the download report. + * @property {Page} [page] + */ +/** + * @typedef GetReportingFilters + * @property {string} [text] - Display text for the filter. + * @property {string} [type] - Type of the fields like seach, filter(e.g., + * single, multi select). + * @property {Object[]} [options] - Options available for the filter. + * @property {string} [value] - Value to be pass in response select from options. + */ +/** + * @typedef GetReportingNestedFilters + * @property {string} [text] - Display text for the nested filter. + * @property {Object[]} [options] - Options available for the nested filter. + * @property {boolean} [required] - Indicates if the nested filter is required. + * @property {string} [placeholder_text] - Placeholder text for the nested filter. + * @property {string} [type] - Type of the nested filter (e.g., single, multi select). + * @property {string} [value] - Value to be pass in response select from options. + */ +/** + * @typedef GetReportingFiltersReasonOptions + * @property {string} [text] - Display text for the reason option. + * @property {string} [value] - Value of the reason option. + * @property {string} [placeholder_text] - Placeholder text for the reason option. + */ +/** + * @typedef GetReportingFiltersReason + * @property {string} [text] - Display text for the reason. + * @property {string} [type] - Type of the reason. + * @property {string} [value] - Value to be pass in response. + * @property {GetReportingFiltersReasonOptions[]} [options] - Options available + * for the reasons select from options. + */ +/** + * @typedef GetReportingFiltersResponse + * @property {GetReportingFiltersReason} [reason] + * @property {GetReportingFilters} [search] + * @property {GetReportingNestedFilters[]} [filters] - Array of nested filter objects. + * @property {GetReportingFilters} [status] + */ +/** + * @typedef InvoicePaymentOptionsPayloadData + * @property {string[]} [invoice_numbers] - List of invoice numbers for which + * payment options are being requested. + */ +/** + * @typedef InvoicePaymentOptionsReq + * @property {InvoicePaymentOptionsPayloadData} [data] + */ +/** + * @typedef InvoicePaymentOptionsResponsePayableAmounts + * @property {number} [amount] - Amount that is payable for the invoice. + * @property {string} [amount_key] - Key associated with the payable amount for + * identification. + * @property {string} [header] - Header describing the payable amount. + */ +/** + * @typedef InvoicePaymentOptionsResponseDeductedAmounts + * @property {number} [amount] - Amount deducted from the invoice. + * @property {string} [header] - Header describing the deducted amount. + * @property {string} [amount_key] - Key associated with the deducted amount for + * identification. + * @property {boolean} [is_payable] - Indicates whether the deducted amount is payable. + * @property {string} [symbol] - Currency symbol associated with the deducted amount. + */ +/** + * @typedef InvoicePaymentOptionsResponseData + * @property {string} [invoice_number] - Invoice number for which payment + * options are provided. + * @property {string} [invoice_type] - Type of the invoice (e.g., 'Seller Fynd', + * 'Platform Subscription'). + * @property {InvoicePaymentOptionsResponsePayableAmounts[]} [display_amounts] + * - List of amounts that are payable for the invoice. + * + * @property {Object} [total_amount] - Total amount for the invoice. + * @property {Object} [deducted_amounts] - Amounts deducted from the total, + * including any associated details. + * @property {InvoicePaymentOptionsResponsePayableAmounts[]} [payable_amounts] + * - Amounts that are payable for the invoice. + * + * @property {Currency} [currency] + */ +/** + * @typedef InvoicePaymentOptionsResponse + * @property {string} [reason] - Reason for the response or any errors encountered. + * @property {InvoicePaymentOptionsResponseData[]} [data] - List of data objects + * containing details about invoice payment options. + * @property {number} [total_payable_amount] - Total amount payable for the invoices. + * @property {number} [invoice_count] - Number of invoices included in the response. + * @property {boolean} [success] - Indicates whether the request to retrieve + * invoice payment options was successful. + */ +/** + * @typedef PaymentDetail + * @property {string} [display_name] - Name or label displayed for the payment detail. + * @property {string} [value] - Value associated with the payment detail (e.g., + * amount, transaction ID). + */ +/** + * @typedef PaidInvoicePaymentDetail + * @property {PaymentDetail[]} [payment_details] - List of payment details for + * the invoice. + * @property {string} [date_of_payment] - Date when the payment was made. + * @property {number} [amount] - Amount paid towards the invoice. + */ +/** + * @typedef InvoicePaymentDetailsResponseData + * @property {PaidInvoicePaymentDetail[]} [paid_invoice_payment_details] - List + * of details for paid invoices. + * @property {Object[]} [failed_attempts_details] - Details of any failed + * payment attempts for the invoices. + */ +/** + * @typedef InvoicePaymentDetailsResponse + * @property {string} [reason] - Reason for the response or any errors encountered. + * @property {InvoicePaymentDetailsResponseData} [data] + * @property {boolean} [success] - Indicates whether the request to retrieve + * invoice payment details was successful. + * @property {boolean} [payment_details_visible] - Indicates whether payment + * details are visible or hidden in the response. + */ +/** + * @typedef InvoiceActivityLogsResponseData + * @property {string} [performed_by] - Identifier of the user or system that + * performed the activity. + * @property {string} [status] - Status of the activity (e.g., 'Completed', 'Pending'). + * @property {string} [reason] - Reason for the activity status or any related notes. + * @property {boolean} [is_resolved] - Indicates whether the activity issue is resolved. + * @property {number} [retry_attempts] - Number of retry attempts made for the activity. + * @property {number} [max_retry_attempts] - Maximum number of retry attempts + * allowed for the activity. + */ +/** + * @typedef InvoiceActivityLogsResponse + * @property {InvoiceActivityLogsResponseData[]} [data] - List of activity logs + * related to invoices. + */ +/** + * @typedef InvoiceActivityLogError + * @property {string} [reason] - Reason for the error or issue encountered with + * the invoice activity logs. + */ +/** + * @typedef UnlockCreditNoteRequestData + * @property {string} [seller_id] - The unique identifier for the seller. + * @property {string[]} [locked_credit_notes] - A list of credit notes that are locked. + * @property {string} [unlock_reason] - The reason for unlocking the credit notes. + * @property {string} [description] - Additional details or comments about the + * unlock request. + */ +/** + * @typedef UnlockCreditNoteReq + * @property {UnlockCreditNoteRequestData} [data] + */ +/** + * @typedef UnlockCreditNoteResponseData + * @property {boolean} [is_cn_unlocked] - Indicates whether the credit note is unlocked. + * @property {string} [status] - The current status of the each credit notes. + */ +/** + * @typedef UnlockCreditNoteResponse + * @property {boolean} [success] - Indicates whether the credit note unlock + * request was successful. + * @property {UnlockCreditNoteResponseData} [data] + */ +declare class FinancePlatformModel { +} +declare namespace FinancePlatformModel { + export { OrederFreezeResponse, GenerateReportMeta, GenerateReportFilters, GenerateReportPlatform, GenerateReportReq, Page, Currency, GenerateReportJson, Error, ErrorMeta, ErrorMetaItems, DownloadReport, DownloadReportData, DownloadReportItems, DownloadReportList, GetEngineFilters, GetEngineData, GetEngineReq, GetEngineResponse, GetReason, GetReasonReq, ReasonItem, GetReasonResponse, GetReportListData, GetReportListReq, GetReportListResponse, ReportItem, GetAffiliate, GetAffiliateResponse, DownloadCreditDebitNote, DownloadCreditDebitNoteReq, DownloadCreditDebitNoteResponseData, DownloadCreditDebitNoteResponse, InvoiceBillingItem, PaymentProcessPayload, PaymentProcessReq, PaymentProcessResponse, CreditlineDataPlatformPayload, CreditlineDataPlatformReq, CreditlineDataPlatformResponse, IsCreditlinePayload, IsCreditlinePlatformReq, IsCreditlinePlatformResponse, InvoiceTypePayloadData, InvoiceTypeReq, InvoiceTypeResponseItems, InvoiceTypeResponse, InoviceListingPayloadDataFilters, InvoiceListingPayloadData, InvoiceListingReq, UnpaidInvoiceDataItems, InvoiceListingResponseItems, InvoiceListingResponse, InvoicePdfPayloadData, InvoicePdfReq, InvoicePdfResponse, IsCnRefundMethodData, IsCnRefundMethodReq, IsCnRefundMethodResponseData, IsCnRefundMethodResponse, CreditNoteConfigNotificationEvents, CreateSellerCreditNoteConfig, CreateSellerCreditNoteConfigReq, CreateSellerCreditNoteConfigResponse, DeleteConfig, DeleteConfigReq, DeleteConfigResponse, ChannelDisplayNameItems, ChannelDisplayNameResponse, CnReferenceNumber, GetPdfUrlViewReq, GetPdfUrlViewResponseData, GetPdfUrlViewResponse, CreditNoteDetailsReq, CnDetails, RedemptionDetails, CreditNoteDetails, CreditNoteDetailsResponse, GetCustomerCreditBalance, GetCustomerCreditBalanceReq, GetCustomerCreditBalanceResponseData, GetCustomerCreditBalanceResponse, GetCnConfigReq, GetCnConfigResponseMeta, GetCnConfigResponseData, GetCnConfigResponse, CnGenerateReportFilters, CnGenerateReport, GenerateReportCustomerCnReq, CnGenerateReportItems, GenerateReportCustomerCnResponseData, GenerateReportCustomerCnResponse, CnDownloadReport, DownloadReportCustomerCnReq, DownloadReportResponseData, DownloadReportCustomerCnResponse, GetReportingFilters, GetReportingNestedFilters, GetReportingFiltersReasonOptions, GetReportingFiltersReason, GetReportingFiltersResponse, InvoicePaymentOptionsPayloadData, InvoicePaymentOptionsReq, InvoicePaymentOptionsResponsePayableAmounts, InvoicePaymentOptionsResponseDeductedAmounts, InvoicePaymentOptionsResponseData, InvoicePaymentOptionsResponse, PaymentDetail, PaidInvoicePaymentDetail, InvoicePaymentDetailsResponseData, InvoicePaymentDetailsResponse, InvoiceActivityLogsResponseData, InvoiceActivityLogsResponse, InvoiceActivityLogError, UnlockCreditNoteRequestData, UnlockCreditNoteReq, UnlockCreditNoteResponseData, UnlockCreditNoteResponse }; +} +/** @returns {OrederFreezeResponse} */ +declare function OrederFreezeResponse(): OrederFreezeResponse; +type OrederFreezeResponse = { + /** + * - Indicates whether the operation was successful or not. + */ + success?: boolean; + /** + * - Flag indicating if the system is frozen + * for order management. + */ + oms_freeze?: boolean; + /** + * - Optional field indicating the data source of + * the information. + */ + source?: string; +}; +/** @returns {GenerateReportMeta} */ +declare function GenerateReportMeta(): GenerateReportMeta; +type GenerateReportMeta = { + /** + * - The brand name associated with the report meta + * information. + */ + brand?: string; + /** + * - The company name associated with the report + * meta information. + */ + company?: string; + /** + * - The sale channel name associated with seller. + */ + channel?: string; +}; +/** @returns {GenerateReportFilters} */ +declare function GenerateReportFilters(): GenerateReportFilters; +type GenerateReportFilters = { + /** + * - An array of brand names to filter the report data. + */ + brand?: string[]; + /** + * - An array of company id to filter the report data. + */ + company?: string[]; + /** + * - An array of sale channel names associated + * with seller to filter the report data. + */ + channel?: string[]; +}; +/** @returns {GenerateReportPlatform} */ +declare function GenerateReportPlatform(): GenerateReportPlatform; +type GenerateReportPlatform = { + /** + * - The start date to generate report specific preiod. + */ + start_date?: string; + /** + * - The end date to generate report specific preiod. + */ + end_date?: string; + meta?: GenerateReportMeta; + /** + * - The unique identifier of the generate report + * where different report configure. + */ + report_id?: string; + filters?: GenerateReportFilters; +}; +/** @returns {GenerateReportReq} */ +declare function GenerateReportReq(): GenerateReportReq; +type GenerateReportReq = { + data?: GenerateReportPlatform; +}; +/** @returns {Page} */ +declare function Page(): Page; +type Page = { + /** + * - The total number of items on the page. + */ + item_total?: number; + /** + * - The identifier for the next page. + */ + next_id?: string; + /** + * - Indicates whether there is a previous page. + */ + has_previous?: boolean; + /** + * - Indicates whether there is a next page. + */ + has_next?: boolean; + /** + * - The current page number. + */ + current?: number; + /** + * - The type of the page, such as 'PageType'. + */ + type: string; + /** + * - The number of items per page. + */ + size?: number; +}; +/** @returns {Currency} */ +declare function Currency(): Currency; +type Currency = { + /** + * - The unique currency code. + */ + code?: string; + /** + * - The unique currency symbol. + */ + symbol?: string; + /** + * - The unique currency name. + */ + name?: string; +}; +/** @returns {GenerateReportJson} */ +declare function GenerateReportJson(): GenerateReportJson; +type GenerateReportJson = { + data?: any; + /** + * - Total number of items in the report. + */ + item_count?: number; + page?: Page; + /** + * - The end date to generate report specific preiod. + */ + end_date?: string; + /** + * - The start date to generate report specific preiod. + */ + start_date?: string; + /** + * - Nested array structure representing report + * items or data. + */ + items?: string[][]; + /** + * - Headers describing each item in the report data. + */ + headers?: string[]; +}; +/** @returns {Error} */ +declare function Error(): Error; +type Error = { + status?: number; + reason?: string; + success?: boolean; + message?: string; + code?: string; + exception?: string; + info?: string; + request_id?: string; + stack_trace?: string; + meta?: ErrorMeta; +}; +/** @returns {ErrorMeta} */ +declare function ErrorMeta(): ErrorMeta; +type ErrorMeta = { + columns_errors?: ErrorMetaItems[]; +}; +/** @returns {ErrorMetaItems} */ +declare function ErrorMetaItems(): ErrorMetaItems; +type ErrorMetaItems = { + code?: number; + message?: string; +}; +/** @returns {DownloadReport} */ +declare function DownloadReport(): DownloadReport; +type DownloadReport = { + data?: DownloadReportData; +}; +/** @returns {DownloadReportData} */ +declare function DownloadReportData(): DownloadReportData; +type DownloadReportData = { + /** + * - The current page number of the report. + */ + page?: number; + /** + * - The number of items displayed per page. + */ + page_size?: number; + /** + * - The start date for fetching the report + * history for download. + */ + start_date?: string; + /** + * - The end date for fetching the report history + * for download. + */ + end_date?: string; +}; +/** @returns {DownloadReportItems} */ +declare function DownloadReportItems(): DownloadReportItems; +type DownloadReportItems = { + /** + * - The start date for the report item. + */ + start_date?: string; + /** + * - The end date for the report item. + */ + end_date?: string; + meta?: GenerateReportMeta; + /** + * - The unique identifier of the report item. + */ + report_id?: string; + filters?: GenerateReportFilters; +}; +/** @returns {DownloadReportList} */ +declare function DownloadReportList(): DownloadReportList; +type DownloadReportList = { + /** + * - A list of report items available + * for download. + */ + items?: DownloadReportItems[]; + page?: Page; + /** + * - The total number of items in the report list. + */ + item_count?: number; +}; +/** @returns {GetEngineFilters} */ +declare function GetEngineFilters(): GetEngineFilters; +type GetEngineFilters = { + /** + * - The configuration field used for filtering. + */ + config_field?: string; + /** + * - The status used for filtering. + */ + status?: string; + /** + * - Flag indicating if the filter is active. + */ + is_active?: boolean; + /** + * - The seller ID used for filtering. + */ + seller_id?: string; +}; +/** @returns {GetEngineData} */ +declare function GetEngineData(): GetEngineData; +type GetEngineData = { + /** + * - Status of the request. + */ + status?: string; + filters?: GetEngineFilters; + /** + * - A list of fields to get data from tables. + */ + project?: string[]; + /** + * - The name of the table from which to retrieve data. + */ + table_name?: string; + /** + * - Search criteria for querying on given table + * specific fields. + */ + search?: any; + /** + * - The current page number for pagination. + */ + page?: number; + /** + * - The number of items displayed per page. + */ + page_size?: number; + /** + * - The field by which to order the results. + */ + order_by?: string; +}; +/** @returns {GetEngineReq} */ +declare function GetEngineReq(): GetEngineReq; +type GetEngineReq = { + data?: GetEngineData; +}; +/** @returns {GetEngineResponse} */ +declare function GetEngineResponse(): GetEngineResponse; +type GetEngineResponse = { + /** + * - Indicates whether the request was successful. + */ + success?: boolean; + /** + * - A list of items returned by the request. + */ + items?: any[]; + page?: Page; + /** + * - The total number of items returned by the request. + */ + item_count?: number; +}; +/** @returns {GetReason} */ +declare function GetReason(): GetReason; +type GetReason = { + /** + * - The type of reason associated with the request. + */ + reason_type?: string; +}; +/** @returns {GetReasonReq} */ +declare function GetReasonReq(): GetReasonReq; +type GetReasonReq = { + data?: GetReason; +}; +/** @returns {ReasonItem} */ +declare function ReasonItem(): ReasonItem; +type ReasonItem = { + /** + * - Id of the reason for reason_type. + */ + id?: string; + /** + * - Code of the reason for reason_type. + */ + name?: string; + /** + * - Display name of the reason for reason_type. + */ + display_name?: string; +}; +/** @returns {GetReasonResponse} */ +declare function GetReasonResponse(): GetReasonResponse; +type GetReasonResponse = { + /** + * - Indicates whether the request was successfull. + */ + success?: boolean; + /** + * - The list of items returned in the response. + */ + item_list?: ReasonItem[]; + /** + * - The number of items in the response. + */ + item_count?: number; + page?: Page; +}; +/** @returns {GetReportListData} */ +declare function GetReportListData(): GetReportListData; +type GetReportListData = { + /** + * - The name of the role requesting the report list. + */ + role_name?: string; + /** + * - Indicates whether listing is enabled + * for the role. + */ + listing_enabled?: boolean; +}; +/** @returns {GetReportListReq} */ +declare function GetReportListReq(): GetReportListReq; +type GetReportListReq = { + data?: GetReportListData; +}; +/** @returns {GetReportListResponse} */ +declare function GetReportListResponse(): GetReportListResponse; +type GetReportListResponse = { + /** + * - Indicates whether the request was successful. + */ + success?: boolean; + /** + * - The list of report items. + */ + items?: ReportItem[]; + page?: Page; + /** + * - The total number of items in the report list. + */ + total_count?: number; +}; +/** @returns {ReportItem} */ +declare function ReportItem(): ReportItem; +type ReportItem = { + /** + * - The unique identifier for the report item. + */ + id?: string; + /** + * - The name of the report item. + */ + name?: string; + /** + * - A brief description of the report item. + */ + description?: string; + /** + * - The filters that can be applied to + * the report item. + */ + allowed_filters?: string[]; + /** + * - Metadata related to the report item configuration. + */ + config_meta?: any; + /** + * - The type of the report item. + */ + report_type?: string; + /** + * - The display date of the report item, if applicable. + */ + display_date?: string; +}; +/** @returns {GetAffiliate} */ +declare function GetAffiliate(): GetAffiliate; +type GetAffiliate = { + /** + * - The unique identifier of the company + * associated with the affiliate. + */ + company_id?: number; +}; +/** @returns {GetAffiliateResponse} */ +declare function GetAffiliateResponse(): GetAffiliateResponse; +type GetAffiliateResponse = { + /** + * - The reason for the response, if applicable. + */ + reason?: string; + /** + * - Indicates whether the request was successful. + */ + success?: boolean; + /** + * - List of items or data related to the affiliate. + */ + docs?: any[]; +}; +/** @returns {DownloadCreditDebitNote} */ +declare function DownloadCreditDebitNote(): DownloadCreditDebitNote; +type DownloadCreditDebitNote = { + /** + * - List of unique identifiers for the + * credit/debit notes to be download. + */ + note_id?: string[]; +}; +/** @returns {DownloadCreditDebitNoteReq} */ +declare function DownloadCreditDebitNoteReq(): DownloadCreditDebitNoteReq; +type DownloadCreditDebitNoteReq = { + data?: DownloadCreditDebitNote; +}; +/** @returns {DownloadCreditDebitNoteResponseData} */ +declare function DownloadCreditDebitNoteResponseData(): DownloadCreditDebitNoteResponseData; +type DownloadCreditDebitNoteResponseData = { + /** + * - The unique identifier of the download credit/debit note. + */ + id?: string; + /** + * - The URL where the PDF of the credit/debit + * note is stored. + */ + pdf_s3_url?: string; +}; +/** @returns {DownloadCreditDebitNoteResponse} */ +declare function DownloadCreditDebitNoteResponse(): DownloadCreditDebitNoteResponse; +type DownloadCreditDebitNoteResponse = { + /** + * - Indicates whether the request to download the + * credit/debit notes was successful. + */ + success?: boolean; + /** + * - List of + * credit/debit notes download data. + */ + data?: DownloadCreditDebitNoteResponseData[]; +}; +/** @returns {InvoiceBillingItem} */ +declare function InvoiceBillingItem(): InvoiceBillingItem; +type InvoiceBillingItem = { + /** + * - The number of the invoice associated + * with the billing item. + */ + invoice_number?: string; + /** + * - The amount of the billing item. + */ + amount?: number; +}; +/** @returns {PaymentProcessPayload} */ +declare function PaymentProcessPayload(): PaymentProcessPayload; +type PaymentProcessPayload = { + /** + * - The platform through which the payment is processed. + */ + platform?: string; + /** + * - The total amount to be processed in the payment. + */ + amount?: number; + /** + * - The type of transaction (e.g., seller_online). + */ + transaction_type?: string; + /** + * - The reference for the source of the payment. + */ + source_reference?: string; + /** + * - The total amount to be processed in the payment. + */ + total_amount?: number; + /** + * - Additional metadata related to the payment. + */ + meta?: any; + /** + * - The currency in which the payment is made. + */ + currency?: string; + /** + * - The unique identifier for the seller + * receiving the payment. + */ + seller_id?: string; + /** + * - The mode of payment (e.g., online). + */ + mode_of_payment?: string; + invoice_billing_items?: InvoiceBillingItem[]; +}; +/** @returns {PaymentProcessReq} */ +declare function PaymentProcessReq(): PaymentProcessReq; +type PaymentProcessReq = { + data?: PaymentProcessPayload; +}; +/** @returns {PaymentProcessResponse} */ +declare function PaymentProcessResponse(): PaymentProcessResponse; +type PaymentProcessResponse = { + /** + * - Response code indicating the status of the payment process. + */ + code?: number; + /** + * - A message providing additional information + * about the payment process response. + */ + message?: string; + /** + * - Additional metadata related to the payment + * process response. + */ + meta?: any; + /** + * - The unique identifier for the payment + * transaction. + */ + transaction_id?: string; + /** + * - URL to redirect the user to complete the + * payment process, if applicable. + */ + redirect_url?: string; +}; +/** @returns {CreditlineDataPlatformPayload} */ +declare function CreditlineDataPlatformPayload(): CreditlineDataPlatformPayload; +type CreditlineDataPlatformPayload = { + /** + * - The page number for pagination. + */ + page?: number; + /** + * - The unique identifier for the seller. + */ + seller_id?: string; + /** + * - The end date for the query. + */ + end_date?: string; + /** + * - The start date for the query. + */ + start_date?: string; + /** + * - The number of items per page. + */ + page_size?: number; +}; +/** @returns {CreditlineDataPlatformReq} */ +declare function CreditlineDataPlatformReq(): CreditlineDataPlatformReq; +type CreditlineDataPlatformReq = { + data?: CreditlineDataPlatformPayload; +}; +/** @returns {CreditlineDataPlatformResponse} */ +declare function CreditlineDataPlatformResponse(): CreditlineDataPlatformResponse; +type CreditlineDataPlatformResponse = { + /** + * - The list of items in the response. + */ + items?: any[]; + /** + * - The response status code. + */ + code?: number; + /** + * - A flag indicating whether to show MR (some + * specific field). + */ + show_mr?: boolean; + page?: Page; + /** + * - The response message. + */ + message?: string; + /** + * - The list of response headers. + */ + headers?: string[]; + /** + * - The total number of items. + */ + item_count?: number; +}; +/** @returns {IsCreditlinePayload} */ +declare function IsCreditlinePayload(): IsCreditlinePayload; +type IsCreditlinePayload = { + /** + * - The unique identifier for the seller to + * check for credit line eligibility. + */ + seller_id?: string; +}; +/** @returns {IsCreditlinePlatformReq} */ +declare function IsCreditlinePlatformReq(): IsCreditlinePlatformReq; +type IsCreditlinePlatformReq = { + data?: IsCreditlinePayload; +}; +/** @returns {IsCreditlinePlatformResponse} */ +declare function IsCreditlinePlatformResponse(): IsCreditlinePlatformResponse; +type IsCreditlinePlatformResponse = { + /** + * - Indicates whether the seller has + * opted for a credit line. + */ + is_creditline_opted?: boolean; + /** + * - Response code indicating the status of the credit + * line check. + */ + code?: number; +}; +/** @returns {InvoiceTypePayloadData} */ +declare function InvoiceTypePayloadData(): InvoiceTypePayloadData; +type InvoiceTypePayloadData = { + /** + * - Indicates if the invoice type is active. + */ + is_active?: boolean; +}; +/** @returns {InvoiceTypeReq} */ +declare function InvoiceTypeReq(): InvoiceTypeReq; +type InvoiceTypeReq = { + data?: InvoiceTypePayloadData; +}; +/** @returns {InvoiceTypeResponseItems} */ +declare function InvoiceTypeResponseItems(): InvoiceTypeResponseItems; +type InvoiceTypeResponseItems = { + /** + * - The text description of the invoice type. + */ + text?: string; + /** + * - The value or code representing the invoice type. + */ + value?: string; +}; +/** @returns {InvoiceTypeResponse} */ +declare function InvoiceTypeResponse(): InvoiceTypeResponse; +type InvoiceTypeResponse = { + /** + * - Indicates whether the request was successful. + */ + success?: boolean; + /** + * - List of invoice + * types available. + */ + invoice_type_list?: InvoiceTypeResponseItems[]; + /** + * - List of + * payment statuses available. + */ + payment_status_list?: InvoiceTypeResponseItems[]; +}; +/** @returns {InoviceListingPayloadDataFilters} */ +declare function InoviceListingPayloadDataFilters(): InoviceListingPayloadDataFilters; +type InoviceListingPayloadDataFilters = { + /** + * - List of payment statuses to filter by. + */ + payment_status?: string[]; + /** + * - List of invoice types to filter by. + */ + invoice_type?: string[]; + /** + * - List of company IDs to filter by. + */ + company_id?: string[]; +}; +/** @returns {InvoiceListingPayloadData} */ +declare function InvoiceListingPayloadData(): InvoiceListingPayloadData; +type InvoiceListingPayloadData = { + /** + * - The number of items per page for pagination. + */ + page_size?: number; + /** + * - The page number for pagination. + */ + page?: number; + /** + * - The start date for the invoice listing filter. + */ + start_date?: string; + /** + * - The end date for the invoice listing filter. + */ + end_date?: string; + /** + * - Search term for filtering invoices. + */ + search?: string; + filters?: InoviceListingPayloadDataFilters; +}; +/** @returns {InvoiceListingReq} */ +declare function InvoiceListingReq(): InvoiceListingReq; +type InvoiceListingReq = { + data?: InvoiceListingPayloadData; +}; +/** @returns {UnpaidInvoiceDataItems} */ +declare function UnpaidInvoiceDataItems(): UnpaidInvoiceDataItems; +type UnpaidInvoiceDataItems = { + /** + * - The total count of unpaid invoices. + */ + total_unpaid_invoice_count?: number; + /** + * - The currency used for unpaid invoices. + */ + currency?: string; + /** + * - The total amount of unpaid invoices. + */ + total_unpaid_amount?: number; +}; +/** @returns {InvoiceListingResponseItems} */ +declare function InvoiceListingResponseItems(): InvoiceListingResponseItems; +type InvoiceListingResponseItems = { + /** + * - The amount of the invoice. + */ + amount?: number; + /** + * - The name of the company associated with the invoice. + */ + company?: string; + /** + * - The current status of the invoice (e.g., + * 'paid', 'unpaid'). + */ + status?: string; + /** + * - The due date of the invoice. + */ + due_date?: string; + /** + * - The date when the invoice was issued. + */ + invoice_date?: string; + /** + * - The type of invoice. + */ + invoice_type?: string; + /** + * - The period covered by the invoice. + */ + period?: string; + /** + * - The invoice number. + */ + invoice_number?: string; + /** + * - Indicates if the invoice is available + * for download. + */ + is_downloadable?: boolean; + /** + * - The unique identifier of the invoice. + */ + invoice_id?: string; + currency?: Currency; +}; +/** @returns {InvoiceListingResponse} */ +declare function InvoiceListingResponse(): InvoiceListingResponse; +type InvoiceListingResponse = { + /** + * - Indicates whether the request was successful. + */ + success?: boolean; + /** + * - Headers related to the invoice listing response. + */ + headers?: string[]; + unpaid_invoice_data?: UnpaidInvoiceDataItems; + /** + * - List of invoice items in + * the response. + */ + items?: InvoiceListingResponseItems[]; + page?: Page; + /** + * - The total number of invoice items in the response. + */ + item_count?: number; +}; +/** @returns {InvoicePdfPayloadData} */ +declare function InvoicePdfPayloadData(): InvoicePdfPayloadData; +type InvoicePdfPayloadData = { + /** + * - List of invoice numbers for which + * PDFs are requested. + */ + invoice_number?: string[]; +}; +/** @returns {InvoicePdfReq} */ +declare function InvoicePdfReq(): InvoicePdfReq; +type InvoicePdfReq = { + data?: InvoicePdfPayloadData; +}; +/** @returns {InvoicePdfResponse} */ +declare function InvoicePdfResponse(): InvoicePdfResponse; +type InvoicePdfResponse = { + /** + * - Indicates whether the PDF generation request + * was successful. + */ + success?: boolean; + /** + * - List of URLs or paths to the generated PDF files. + */ + data?: string[]; + /** + * - List of errors encountered while generating the PDFs. + */ + error?: string[]; +}; +/** @returns {IsCnRefundMethodData} */ +declare function IsCnRefundMethodData(): IsCnRefundMethodData; +type IsCnRefundMethodData = { + /** + * - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + */ + affiliate_id?: string; + /** + * - Indicates whether editing the + * refund method is required. + */ + toggle_edit_required?: boolean; + /** + * - Unique identifier for the seller. + */ + seller_id?: number; +}; +/** @returns {IsCnRefundMethodReq} */ +declare function IsCnRefundMethodReq(): IsCnRefundMethodReq; +type IsCnRefundMethodReq = { + data?: IsCnRefundMethodData; +}; +/** @returns {IsCnRefundMethodResponseData} */ +declare function IsCnRefundMethodResponseData(): IsCnRefundMethodResponseData; +type IsCnRefundMethodResponseData = { + /** + * - Indicates whether the seller for + * specific sale channel is using the refund method for the first time. + */ + is_first_time_user?: boolean; +}; +/** @returns {IsCnRefundMethodResponse} */ +declare function IsCnRefundMethodResponse(): IsCnRefundMethodResponse; +type IsCnRefundMethodResponse = { + /** + * - Indicates whether the request to determine + * the refund method was successful. + */ + success?: boolean; + data?: IsCnRefundMethodResponseData; +}; +/** @returns {CreditNoteConfigNotificationEvents} */ +declare function CreditNoteConfigNotificationEvents(): CreditNoteConfigNotificationEvents; +type CreditNoteConfigNotificationEvents = { + /** + * - Number of days before + * the expiration date to send a reminder notification to the customer. + */ + expiration_reminder_to_customer?: number; +}; +/** @returns {CreateSellerCreditNoteConfig} */ +declare function CreateSellerCreditNoteConfig(): CreateSellerCreditNoteConfig; +type CreateSellerCreditNoteConfig = { + /** + * - Indicates if the credit note + * is used as a refund method. + */ + is_cn_as_refund_method?: boolean; + /** + * - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + */ + affiliate_id?: string; + /** + * - List of source channels associated + * with the credit note configuration. + */ + source_channel?: string[]; + /** + * - Unique identifier for the seller. + */ + seller_id?: number; + notification_events?: CreditNoteConfigNotificationEvents; + /** + * - Name of the sales channel. + */ + sales_channel_name?: string; + /** + * - List of ordering channels + * associated with the credit note configuration. + */ + ordering_channel?: string[]; + /** + * - Validity period of the credit note in days. + */ + validity?: number; + /** + * - Type of currency used for the credit note. + */ + currency_type?: string; + /** + * - List of slug values associated with the + * credit note configuration. + */ + slug_values?: string[]; +}; +/** @returns {CreateSellerCreditNoteConfigReq} */ +declare function CreateSellerCreditNoteConfigReq(): CreateSellerCreditNoteConfigReq; +type CreateSellerCreditNoteConfigReq = { + data?: CreateSellerCreditNoteConfig; +}; +/** @returns {CreateSellerCreditNoteConfigResponse} */ +declare function CreateSellerCreditNoteConfigResponse(): CreateSellerCreditNoteConfigResponse; +type CreateSellerCreditNoteConfigResponse = { + /** + * - Indicates if the credit note configuration + * creation was successful. + */ + success?: boolean; + /** + * - Additional information or message about the + * credit note configuration creation process. + */ + message?: string; +}; +/** @returns {DeleteConfig} */ +declare function DeleteConfig(): DeleteConfig; +type DeleteConfig = { + /** + * - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + */ + affiliate_id?: string; + /** + * - List of slug values associated with the + * credit note configuration. + */ + slug_values?: string[]; + /** + * - Unique identifier for the seller. + */ + seller_id?: number; +}; +/** @returns {DeleteConfigReq} */ +declare function DeleteConfigReq(): DeleteConfigReq; +type DeleteConfigReq = { + data?: DeleteConfig; +}; +/** @returns {DeleteConfigResponse} */ +declare function DeleteConfigResponse(): DeleteConfigResponse; +type DeleteConfigResponse = { + /** + * - Indicates if the configuration deletion was successful. + */ + success?: boolean; + /** + * - Additional information or message about the + * configuration deletion process. + */ + message?: string; +}; +/** @returns {ChannelDisplayNameItems} */ +declare function ChannelDisplayNameItems(): ChannelDisplayNameItems; +type ChannelDisplayNameItems = { + /** + * - The unique key identifying the channel. + */ + key?: string; + /** + * - The display name of the channel associated with the key. + */ + value?: string; +}; +/** @returns {ChannelDisplayNameResponse} */ +declare function ChannelDisplayNameResponse(): ChannelDisplayNameResponse; +type ChannelDisplayNameResponse = { + /** + * - Indicates if the retrieval of channel display + * names was successful. + */ + success?: boolean; + /** + * - List of items containing + * key-value pairs for channel display names. + */ + items?: ChannelDisplayNameItems[]; +}; +/** @returns {CnReferenceNumber} */ +declare function CnReferenceNumber(): CnReferenceNumber; +type CnReferenceNumber = { + /** + * - The unique reference number of the + * credit note. + */ + cn_reference_number?: string; +}; +/** @returns {GetPdfUrlViewReq} */ +declare function GetPdfUrlViewReq(): GetPdfUrlViewReq; +type GetPdfUrlViewReq = { + data?: CnReferenceNumber; +}; +/** @returns {GetPdfUrlViewResponseData} */ +declare function GetPdfUrlViewResponseData(): GetPdfUrlViewResponseData; +type GetPdfUrlViewResponseData = { + /** + * - The URL link where credit nore pdf stored + * to view and download. + */ + s3_pdf_link?: string; + /** + * - The unique reference number of the + * credit note. + */ + cn_reference_number?: string; +}; +/** @returns {GetPdfUrlViewResponse} */ +declare function GetPdfUrlViewResponse(): GetPdfUrlViewResponse; +type GetPdfUrlViewResponse = { + /** + * - Indicates if the retrieval of the pdf URL was + * successful. + */ + success?: boolean; + data?: GetPdfUrlViewResponseData; +}; +/** @returns {CreditNoteDetailsReq} */ +declare function CreditNoteDetailsReq(): CreditNoteDetailsReq; +type CreditNoteDetailsReq = { + data?: CnReferenceNumber; +}; +/** @returns {CnDetails} */ +declare function CnDetails(): CnDetails; +type CnDetails = { + /** + * - ID of the staff member associated with the credit note. + */ + staff_id?: string; + /** + * - Expiry date of the credit note. + */ + expiry_date?: string; + /** + * - Channel through which the credit + * note was issued. + */ + channel_of_issuance?: string; + /** + * - Order ID of order for which credit note created. + */ + order_id?: string; + /** + * - Date when the credit note was issued. + */ + date_issued?: string; + /** + * - Ordering channel associated with the + * credit note. + */ + ordering_channel?: string; + /** + * - Shipment Id associated with the credit note. + */ + shipment_id?: string; + /** + * - Store Id associated with the credit note. + */ + store_id?: string; + /** + * - Invoice number associated with the credit note. + */ + invoice_number?: string; +}; +/** @returns {RedemptionDetails} */ +declare function RedemptionDetails(): RedemptionDetails; +type RedemptionDetails = { + /** + * - Additional metadata related to the redemption details. + */ + meta?: any; + /** + * - ID of the staff member who processed the redemption. + */ + staff_id?: string; + /** + * - Date and time when the redemption was processed. + */ + created_at?: string; + /** + * - Order Id of the order associated with the redemption. + */ + order_id?: string; + /** + * - Store Id of the order associated with the redemption. + */ + store_id?: string; + /** + * - Shipment Id of the order associated with + * the redemption. + */ + shipment_id?: string; + /** + * - Ordering channel associated with the + * redemption. + */ + ordering_channel?: string; + /** + * - Amount debited from the credit note + * during redemption. + */ + amount_debited?: number; + /** + * - Invoice number associated with the redemption. + */ + invoice_number?: string; +}; +/** @returns {CreditNoteDetails} */ +declare function CreditNoteDetails(): CreditNoteDetails; +type CreditNoteDetails = { + /** + * - Currency in which the credit note is issued. + */ + currency?: string; + /** + * - Current amount used from the credit note. + */ + current_amount_used?: number; + /** + * - Status of the credit note. + */ + cn_status?: string; + /** + * - Mobile number of the customer + * associated with the credit note. + */ + customer_mobile_number?: string; + /** + * - Unique Credit number of the credit note. + */ + cn_reference_number?: string; + cn_details?: CnDetails; + /** + * - List of redemption + * details associated with the credit note. + */ + redemption_details?: RedemptionDetails[]; + /** + * - Remaining amount left in the credit note. + */ + remaining_cn_amount?: number; + /** + * - Available balance in the credit note. + */ + available_cn_balance?: number; + /** + * - Total amount of the credit note. + */ + cn_amount?: number; +}; +/** @returns {CreditNoteDetailsResponse} */ +declare function CreditNoteDetailsResponse(): CreditNoteDetailsResponse; +type CreditNoteDetailsResponse = { + /** + * - Indicates if the retrieval of credit note + * details was successful. + */ + success?: boolean; + data?: CreditNoteDetails; +}; +/** @returns {GetCustomerCreditBalance} */ +declare function GetCustomerCreditBalance(): GetCustomerCreditBalance; +type GetCustomerCreditBalance = { + /** + * - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + */ + affiliate_id?: string; + /** + * - Unique identifier for the seller. + */ + seller_id?: number; + /** + * - Mobile number of the customer + * for whom the credit balance is requested. + */ + customer_mobile_number?: string; +}; +/** @returns {GetCustomerCreditBalanceReq} */ +declare function GetCustomerCreditBalanceReq(): GetCustomerCreditBalanceReq; +type GetCustomerCreditBalanceReq = { + data?: GetCustomerCreditBalance; +}; +/** @returns {GetCustomerCreditBalanceResponseData} */ +declare function GetCustomerCreditBalanceResponseData(): GetCustomerCreditBalanceResponseData; +type GetCustomerCreditBalanceResponseData = { + /** + * - Mobile number of the customer. + */ + customer_mobile_number?: string; + /** + * - Total credited balance + * available for the customer. + */ + total_credited_balance?: number; +}; +/** @returns {GetCustomerCreditBalanceResponse} */ +declare function GetCustomerCreditBalanceResponse(): GetCustomerCreditBalanceResponse; +type GetCustomerCreditBalanceResponse = { + /** + * - Indicates if the retrieval of customer credit + * balance was successful. + */ + success?: boolean; + data?: GetCustomerCreditBalanceResponseData; +}; +/** @returns {GetCnConfigReq} */ +declare function GetCnConfigReq(): GetCnConfigReq; +type GetCnConfigReq = { + data?: DeleteConfig; +}; +/** @returns {GetCnConfigResponseMeta} */ +declare function GetCnConfigResponseMeta(): GetCnConfigResponseMeta; +type GetCnConfigResponseMeta = { + /** + * - Reason associated with the configuration response. + */ + reason?: string; + /** + * - List of source channels associated + * with the credit note configuration. + */ + source_channel?: string[]; +}; +/** @returns {GetCnConfigResponseData} */ +declare function GetCnConfigResponseData(): GetCnConfigResponseData; +type GetCnConfigResponseData = { + /** + * - Indicates if the credit note + * is configured as a refund method. + */ + is_cn_as_refund_method?: boolean; + /** + * - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + */ + affiliate_id?: string; + meta?: any; + /** + * - Unique identifier for the seller. + */ + seller_id?: number; + notification_events?: CreditNoteConfigNotificationEvents; + /** + * - Validity period of the credit note + * configuration in days. + */ + validity?: number; + /** + * - List of ordering + * channels associated with credit note redemption. + */ + redemption_ordering_channel?: string[]; + /** + * - Type of currency used for the credit note. + */ + currency_type?: string; +}; +/** @returns {GetCnConfigResponse} */ +declare function GetCnConfigResponse(): GetCnConfigResponse; +type GetCnConfigResponse = { + /** + * - Indicates if the retrieval of credit note + * configuration was successful. + */ + success?: boolean; + data?: GetCnConfigResponseData; +}; +/** @returns {CnGenerateReportFilters} */ +declare function CnGenerateReportFilters(): CnGenerateReportFilters; +type CnGenerateReportFilters = { + /** + * - Array of staff IDs for filtering credit note reports. + */ + staff_id?: string[]; + /** + * - Array of channels through which + * credit notes were issued. + */ + channel_of_issuance?: string[]; + /** + * - Array of utilisation types for filtering + * credit note reports. + */ + utilisation?: string[]; + /** + * - Array of ordering channels + * associated with credit note reports. + */ + ordering_channel?: string[]; + /** + * - Array of store IDs for filtering credit note reports. + */ + store_id?: number[]; + /** + * - Array of transaction types for + * filtering credit note reports. + */ + type_of_transaction?: string[]; + /** + * - Array of issuance channels for + * filtering credit note reports. + */ + issuance_channel?: string[]; +}; +/** @returns {CnGenerateReport} */ +declare function CnGenerateReport(): CnGenerateReport; +type CnGenerateReport = { + /** + * - Page number of the credit note report. + */ + page?: number; + /** + * - End date for filtering credit note data. + */ + end_date?: string; + /** + * - Number of items per page in the credit note report. + */ + page_size?: number; + filters?: CnGenerateReportFilters; + /** + * - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + */ + affiliate_id?: string; + meta?: GenerateReportFilters; + /** + * - Search query to filter credit note data by keyword. + */ + search?: string; + /** + * - Unique identifier for the credit note report. + */ + report_id?: string; + /** + * - Type of search criteria used for filtering + * credit note data. + */ + search_type?: string; + /** + * - Start date for filtering credit note data. + */ + start_date?: string; +}; +/** @returns {GenerateReportCustomerCnReq} */ +declare function GenerateReportCustomerCnReq(): GenerateReportCustomerCnReq; +type GenerateReportCustomerCnReq = { + data?: CnGenerateReport; +}; +/** @returns {CnGenerateReportItems} */ +declare function CnGenerateReportItems(): CnGenerateReportItems; +type CnGenerateReportItems = { + /** + * - Expiry date of the credit note item. + */ + expiry_date?: string; + /** + * - Status of the credit note item. + */ + status?: string; + /** + * - Total amount of the credit note item. + */ + total_amount?: number; + /** + * - Order ID of the order associated with the + * credit note item. + */ + order_id?: string; + /** + * - Date when the credit note item was issued. + */ + date_issued?: string; + /** + * - Shipment ID of the order associated with + * the credit note item. + */ + shipment_id?: string; + /** + * - Invoice number associated with the + * credit note item. + */ + invoice_number?: string; + /** + * - Unique number of the credit note item. + */ + credit_note_number?: string; +}; +/** @returns {GenerateReportCustomerCnResponseData} */ +declare function GenerateReportCustomerCnResponseData(): GenerateReportCustomerCnResponseData; +type GenerateReportCustomerCnResponseData = { + /** + * - Indicates if the credit note report + * generation was successful. + */ + success?: boolean; + /** + * - Additional message or information related to + * the credit note report. + */ + message?: string; + /** + * - List of credit note items in the report. + */ + items?: CnGenerateReportItems[]; + /** + * - Display order for row headers + * in the report. + */ + row_header_display_order?: any; + /** + * - End date used in the credit note report. + */ + end_date?: string; + page?: Page; + /** + * - Headers included in the credit note report. + */ + headers?: string[]; + /** + * - Primary headers used in the credit + * note report. + */ + primary_headers?: string[]; + /** + * - Allowed filters for the credit note report. + */ + allowed_filters?: string[]; + /** + * - Start date used in the credit note report. + */ + start_date?: string; + /** + * - Total count of credit note items in the report. + */ + item_count?: number; +}; +/** @returns {GenerateReportCustomerCnResponse} */ +declare function GenerateReportCustomerCnResponse(): GenerateReportCustomerCnResponse; +type GenerateReportCustomerCnResponse = { + data?: GenerateReportCustomerCnResponseData; +}; +/** @returns {CnDownloadReport} */ +declare function CnDownloadReport(): CnDownloadReport; +type CnDownloadReport = { + /** + * - Page number of the download report. + */ + page?: number; + /** + * - Start date for filtering credit note data + * in the report. + */ + start_date?: string; + /** + * - End date for filtering credit note data in the report. + */ + end_date?: string; + /** + * - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + */ + affiliate_id?: string; + /** + * - Search query to filter credit note data by keyword. + */ + search?: string; + /** + * - Status of the credit note data in the report. + */ + status?: string; + /** + * - Type of search criteria used for filtering + * credit note data. + */ + search_type?: string; + /** + * - Number of items per page in the download report. + */ + page_size?: number; +}; +/** @returns {DownloadReportCustomerCnReq} */ +declare function DownloadReportCustomerCnReq(): DownloadReportCustomerCnReq; +type DownloadReportCustomerCnReq = { + data?: CnDownloadReport; +}; +/** @returns {DownloadReportResponseData} */ +declare function DownloadReportResponseData(): DownloadReportResponseData; +type DownloadReportResponseData = { + /** + * - Unique identifier for the report configuration. + */ + report_config_id?: string; + /** + * - Full name associated with the report request. + */ + full_name?: string; + /** + * - User who requested the report. + */ + requested_by?: string; + /** + * - Start date used in the report. + */ + start_date?: string; + /** + * - End date used in the report. + */ + end_date?: string; + /** + * - Dictionary containing request parameters + * for the report. + */ + request_dict?: any; + /** + * - Download link for accessing the generated report. + */ + download_link?: string; + /** + * - Date and time when the report was created. + */ + created_at?: string; + /** + * - Additional metadata associated with the report. + */ + meta?: any; + /** + * - Message related to the report status or generation. + */ + msg?: string; + /** + * - Name of the generated report. + */ + report_name?: string; + /** + * - Status of the report. + */ + status?: string; + /** + * - Display name of the report. + */ + display_name?: string; + /** + * - Filters applied to generate the report. + */ + filters?: any; +}; +/** @returns {DownloadReportCustomerCnResponse} */ +declare function DownloadReportCustomerCnResponse(): DownloadReportCustomerCnResponse; +type DownloadReportCustomerCnResponse = { + /** + * - List of download report data items. + */ + items?: DownloadReportResponseData[]; + /** + * - Total count of items in the download report. + */ + item_count?: number; + page?: Page; +}; +/** @returns {GetReportingFilters} */ +declare function GetReportingFilters(): GetReportingFilters; +type GetReportingFilters = { + /** + * - Display text for the filter. + */ + text?: string; + /** + * - Type of the fields like seach, filter(e.g., + * single, multi select). + */ + type?: string; + /** + * - Options available for the filter. + */ + options?: any[]; + /** + * - Value to be pass in response select from options. + */ + value?: string; +}; +/** @returns {GetReportingNestedFilters} */ +declare function GetReportingNestedFilters(): GetReportingNestedFilters; +type GetReportingNestedFilters = { + /** + * - Display text for the nested filter. + */ + text?: string; + /** + * - Options available for the nested filter. + */ + options?: any[]; + /** + * - Indicates if the nested filter is required. + */ + required?: boolean; + /** + * - Placeholder text for the nested filter. + */ + placeholder_text?: string; + /** + * - Type of the nested filter (e.g., single, multi select). + */ + type?: string; + /** + * - Value to be pass in response select from options. + */ + value?: string; +}; +/** @returns {GetReportingFiltersReasonOptions} */ +declare function GetReportingFiltersReasonOptions(): GetReportingFiltersReasonOptions; +type GetReportingFiltersReasonOptions = { + /** + * - Display text for the reason option. + */ + text?: string; + /** + * - Value of the reason option. + */ + value?: string; + /** + * - Placeholder text for the reason option. + */ + placeholder_text?: string; +}; +/** @returns {GetReportingFiltersReason} */ +declare function GetReportingFiltersReason(): GetReportingFiltersReason; +type GetReportingFiltersReason = { + /** + * - Display text for the reason. + */ + text?: string; + /** + * - Type of the reason. + */ + type?: string; + /** + * - Value to be pass in response. + */ + value?: string; + /** + * - Options available + * for the reasons select from options. + */ + options?: GetReportingFiltersReasonOptions[]; +}; +/** @returns {GetReportingFiltersResponse} */ +declare function GetReportingFiltersResponse(): GetReportingFiltersResponse; +type GetReportingFiltersResponse = { + reason?: GetReportingFiltersReason; + search?: GetReportingFilters; + /** + * - Array of nested filter objects. + */ + filters?: GetReportingNestedFilters[]; + status?: GetReportingFilters; +}; +/** @returns {InvoicePaymentOptionsPayloadData} */ +declare function InvoicePaymentOptionsPayloadData(): InvoicePaymentOptionsPayloadData; +type InvoicePaymentOptionsPayloadData = { + /** + * - List of invoice numbers for which + * payment options are being requested. + */ + invoice_numbers?: string[]; +}; +/** @returns {InvoicePaymentOptionsReq} */ +declare function InvoicePaymentOptionsReq(): InvoicePaymentOptionsReq; +type InvoicePaymentOptionsReq = { + data?: InvoicePaymentOptionsPayloadData; +}; +/** @returns {InvoicePaymentOptionsResponsePayableAmounts} */ +declare function InvoicePaymentOptionsResponsePayableAmounts(): InvoicePaymentOptionsResponsePayableAmounts; +type InvoicePaymentOptionsResponsePayableAmounts = { + /** + * - Amount that is payable for the invoice. + */ + amount?: number; + /** + * - Key associated with the payable amount for + * identification. + */ + amount_key?: string; + /** + * - Header describing the payable amount. + */ + header?: string; +}; +/** @returns {InvoicePaymentOptionsResponseDeductedAmounts} */ +declare function InvoicePaymentOptionsResponseDeductedAmounts(): InvoicePaymentOptionsResponseDeductedAmounts; +type InvoicePaymentOptionsResponseDeductedAmounts = { + /** + * - Amount deducted from the invoice. + */ + amount?: number; + /** + * - Header describing the deducted amount. + */ + header?: string; + /** + * - Key associated with the deducted amount for + * identification. + */ + amount_key?: string; + /** + * - Indicates whether the deducted amount is payable. + */ + is_payable?: boolean; + /** + * - Currency symbol associated with the deducted amount. + */ + symbol?: string; +}; +/** @returns {InvoicePaymentOptionsResponseData} */ +declare function InvoicePaymentOptionsResponseData(): InvoicePaymentOptionsResponseData; +type InvoicePaymentOptionsResponseData = { + /** + * - Invoice number for which payment + * options are provided. + */ + invoice_number?: string; + /** + * - Type of the invoice (e.g., 'Seller Fynd', + * 'Platform Subscription'). + */ + invoice_type?: string; + /** + * - List of amounts that are payable for the invoice. + */ + display_amounts?: InvoicePaymentOptionsResponsePayableAmounts[]; + /** + * - Total amount for the invoice. + */ + total_amount?: any; + /** + * - Amounts deducted from the total, + * including any associated details. + */ + deducted_amounts?: any; + /** + * - Amounts that are payable for the invoice. + */ + payable_amounts?: InvoicePaymentOptionsResponsePayableAmounts[]; + currency?: Currency; +}; +/** @returns {InvoicePaymentOptionsResponse} */ +declare function InvoicePaymentOptionsResponse(): InvoicePaymentOptionsResponse; +type InvoicePaymentOptionsResponse = { + /** + * - Reason for the response or any errors encountered. + */ + reason?: string; + /** + * - List of data objects + * containing details about invoice payment options. + */ + data?: InvoicePaymentOptionsResponseData[]; + /** + * - Total amount payable for the invoices. + */ + total_payable_amount?: number; + /** + * - Number of invoices included in the response. + */ + invoice_count?: number; + /** + * - Indicates whether the request to retrieve + * invoice payment options was successful. + */ + success?: boolean; +}; +/** @returns {PaymentDetail} */ +declare function PaymentDetail(): PaymentDetail; +type PaymentDetail = { + /** + * - Name or label displayed for the payment detail. + */ + display_name?: string; + /** + * - Value associated with the payment detail (e.g., + * amount, transaction ID). + */ + value?: string; +}; +/** @returns {PaidInvoicePaymentDetail} */ +declare function PaidInvoicePaymentDetail(): PaidInvoicePaymentDetail; +type PaidInvoicePaymentDetail = { + /** + * - List of payment details for + * the invoice. + */ + payment_details?: PaymentDetail[]; + /** + * - Date when the payment was made. + */ + date_of_payment?: string; + /** + * - Amount paid towards the invoice. + */ + amount?: number; +}; +/** @returns {InvoicePaymentDetailsResponseData} */ +declare function InvoicePaymentDetailsResponseData(): InvoicePaymentDetailsResponseData; +type InvoicePaymentDetailsResponseData = { + /** + * - List + * of details for paid invoices. + */ + paid_invoice_payment_details?: PaidInvoicePaymentDetail[]; + /** + * - Details of any failed + * payment attempts for the invoices. + */ + failed_attempts_details?: any[]; +}; +/** @returns {InvoicePaymentDetailsResponse} */ +declare function InvoicePaymentDetailsResponse(): InvoicePaymentDetailsResponse; +type InvoicePaymentDetailsResponse = { + /** + * - Reason for the response or any errors encountered. + */ + reason?: string; + data?: InvoicePaymentDetailsResponseData; + /** + * - Indicates whether the request to retrieve + * invoice payment details was successful. + */ + success?: boolean; + /** + * - Indicates whether payment + * details are visible or hidden in the response. + */ + payment_details_visible?: boolean; +}; +/** @returns {InvoiceActivityLogsResponseData} */ +declare function InvoiceActivityLogsResponseData(): InvoiceActivityLogsResponseData; +type InvoiceActivityLogsResponseData = { + /** + * - Identifier of the user or system that + * performed the activity. + */ + performed_by?: string; + /** + * - Status of the activity (e.g., 'Completed', 'Pending'). + */ + status?: string; + /** + * - Reason for the activity status or any related notes. + */ + reason?: string; + /** + * - Indicates whether the activity issue is resolved. + */ + is_resolved?: boolean; + /** + * - Number of retry attempts made for the activity. + */ + retry_attempts?: number; + /** + * - Maximum number of retry attempts + * allowed for the activity. + */ + max_retry_attempts?: number; +}; +/** @returns {InvoiceActivityLogsResponse} */ +declare function InvoiceActivityLogsResponse(): InvoiceActivityLogsResponse; +type InvoiceActivityLogsResponse = { + /** + * - List of activity logs + * related to invoices. + */ + data?: InvoiceActivityLogsResponseData[]; +}; +/** @returns {InvoiceActivityLogError} */ +declare function InvoiceActivityLogError(): InvoiceActivityLogError; +type InvoiceActivityLogError = { + /** + * - Reason for the error or issue encountered with + * the invoice activity logs. + */ + reason?: string; +}; +/** @returns {UnlockCreditNoteRequestData} */ +declare function UnlockCreditNoteRequestData(): UnlockCreditNoteRequestData; +type UnlockCreditNoteRequestData = { + /** + * - The unique identifier for the seller. + */ + seller_id?: string; + /** + * - A list of credit notes that are locked. + */ + locked_credit_notes?: string[]; + /** + * - The reason for unlocking the credit notes. + */ + unlock_reason?: string; + /** + * - Additional details or comments about the + * unlock request. + */ + description?: string; +}; +/** @returns {UnlockCreditNoteReq} */ +declare function UnlockCreditNoteReq(): UnlockCreditNoteReq; +type UnlockCreditNoteReq = { + data?: UnlockCreditNoteRequestData; +}; +/** @returns {UnlockCreditNoteResponseData} */ +declare function UnlockCreditNoteResponseData(): UnlockCreditNoteResponseData; +type UnlockCreditNoteResponseData = { + /** + * - Indicates whether the credit note is unlocked. + */ + is_cn_unlocked?: boolean; + /** + * - The current status of the each credit notes. + */ + status?: string; +}; +/** @returns {UnlockCreditNoteResponse} */ +declare function UnlockCreditNoteResponse(): UnlockCreditNoteResponse; +type UnlockCreditNoteResponse = { + /** + * - Indicates whether the credit note unlock + * request was successful. + */ + success?: boolean; + data?: UnlockCreditNoteResponseData; +}; diff --git a/sdk/platform/Finance/FinancePlatformModel.js b/sdk/platform/Finance/FinancePlatformModel.js new file mode 100644 index 000000000..a2fcc7656 --- /dev/null +++ b/sdk/platform/Finance/FinancePlatformModel.js @@ -0,0 +1,2148 @@ +const Joi = require("joi"); + +/** + * @typedef OrederFreezeResponse + * @property {boolean} [success] - Indicates whether the operation was successful or not. + * @property {boolean} [oms_freeze] - Flag indicating if the system is frozen + * for order management. + * @property {string} [source] - Optional field indicating the data source of + * the information. + */ + +/** + * @typedef GenerateReportMeta + * @property {string} [brand] - The brand name associated with the report meta + * information. + * @property {string} [company] - The company name associated with the report + * meta information. + * @property {string} [channel] - The sale channel name associated with seller. + */ + +/** + * @typedef GenerateReportFilters + * @property {string[]} [brand] - An array of brand names to filter the report data. + * @property {string[]} [company] - An array of company id to filter the report data. + * @property {string[]} [channel] - An array of sale channel names associated + * with seller to filter the report data. + */ + +/** + * @typedef GenerateReportPlatform + * @property {string} [start_date] - The start date to generate report specific preiod. + * @property {string} [end_date] - The end date to generate report specific preiod. + * @property {GenerateReportMeta} [meta] + * @property {string} [report_id] - The unique identifier of the generate report + * where different report configure. + * @property {GenerateReportFilters} [filters] + */ + +/** + * @typedef GenerateReportReq + * @property {GenerateReportPlatform} [data] + */ + +/** + * @typedef Page + * @property {number} [item_total] - The total number of items on the page. + * @property {string} [next_id] - The identifier for the next page. + * @property {boolean} [has_previous] - Indicates whether there is a previous page. + * @property {boolean} [has_next] - Indicates whether there is a next page. + * @property {number} [current] - The current page number. + * @property {string} type - The type of the page, such as 'PageType'. + * @property {number} [size] - The number of items per page. + */ + +/** + * @typedef Currency + * @property {string} [code] - The unique currency code. + * @property {string} [symbol] - The unique currency symbol. + * @property {string} [name] - The unique currency name. + */ + +/** + * @typedef GenerateReportJson + * @property {Object} [data] + * @property {number} [item_count] - Total number of items in the report. + * @property {Page} [page] + * @property {string} [end_date] - The end date to generate report specific preiod. + * @property {string} [start_date] - The start date to generate report specific preiod. + * @property {string[][]} [items] - Nested array structure representing report + * items or data. + * @property {string[]} [headers] - Headers describing each item in the report data. + */ + +/** + * @typedef Error + * @property {number} [status] + * @property {string} [reason] + * @property {boolean} [success] + * @property {string} [message] + * @property {string} [code] + * @property {string} [exception] + * @property {string} [info] + * @property {string} [request_id] + * @property {string} [stack_trace] + * @property {ErrorMeta} [meta] + */ + +/** + * @typedef ErrorMeta + * @property {ErrorMetaItems[]} [columns_errors] + */ + +/** + * @typedef ErrorMetaItems + * @property {number} [code] + * @property {string} [message] + */ + +/** + * @typedef DownloadReport + * @property {DownloadReportData} [data] + */ + +/** + * @typedef DownloadReportData + * @property {number} [page] - The current page number of the report. + * @property {number} [page_size] - The number of items displayed per page. + * @property {string} [start_date] - The start date for fetching the report + * history for download. + * @property {string} [end_date] - The end date for fetching the report history + * for download. + */ + +/** + * @typedef DownloadReportItems + * @property {string} [start_date] - The start date for the report item. + * @property {string} [end_date] - The end date for the report item. + * @property {GenerateReportMeta} [meta] + * @property {string} [report_id] - The unique identifier of the report item. + * @property {GenerateReportFilters} [filters] + */ + +/** + * @typedef DownloadReportList + * @property {DownloadReportItems[]} [items] - A list of report items available + * for download. + * @property {Page} [page] + * @property {number} [item_count] - The total number of items in the report list. + */ + +/** + * @typedef GetEngineFilters + * @property {string} [config_field] - The configuration field used for filtering. + * @property {string} [status] - The status used for filtering. + * @property {boolean} [is_active] - Flag indicating if the filter is active. + * @property {string} [seller_id] - The seller ID used for filtering. + */ + +/** + * @typedef GetEngineData + * @property {string} [status] - Status of the request. + * @property {GetEngineFilters} [filters] + * @property {string[]} [project] - A list of fields to get data from tables. + * @property {string} [table_name] - The name of the table from which to retrieve data. + * @property {Object} [search] - Search criteria for querying on given table + * specific fields. + * @property {number} [page] - The current page number for pagination. + * @property {number} [page_size] - The number of items displayed per page. + * @property {string} [order_by] - The field by which to order the results. + */ + +/** + * @typedef GetEngineReq + * @property {GetEngineData} [data] + */ + +/** + * @typedef GetEngineResponse + * @property {boolean} [success] - Indicates whether the request was successful. + * @property {Object[]} [items] - A list of items returned by the request. + * @property {Page} [page] + * @property {number} [item_count] - The total number of items returned by the request. + */ + +/** + * @typedef GetReason + * @property {string} [reason_type] - The type of reason associated with the request. + */ + +/** + * @typedef GetReasonReq + * @property {GetReason} [data] + */ + +/** + * @typedef ReasonItem + * @property {string} [id] - Id of the reason for reason_type. + * @property {string} [name] - Code of the reason for reason_type. + * @property {string} [display_name] - Display name of the reason for reason_type. + */ + +/** + * @typedef GetReasonResponse + * @property {boolean} [success] - Indicates whether the request was successfull. + * @property {ReasonItem[]} [item_list] - The list of items returned in the response. + * @property {number} [item_count] - The number of items in the response. + * @property {Page} [page] + */ + +/** + * @typedef GetReportListData + * @property {string} [role_name] - The name of the role requesting the report list. + * @property {boolean} [listing_enabled] - Indicates whether listing is enabled + * for the role. + */ + +/** + * @typedef GetReportListReq + * @property {GetReportListData} [data] + */ + +/** + * @typedef GetReportListResponse + * @property {boolean} [success] - Indicates whether the request was successful. + * @property {ReportItem[]} [items] - The list of report items. + * @property {Page} [page] + * @property {number} [total_count] - The total number of items in the report list. + */ + +/** + * @typedef ReportItem + * @property {string} [id] - The unique identifier for the report item. + * @property {string} [name] - The name of the report item. + * @property {string} [description] - A brief description of the report item. + * @property {string[]} [allowed_filters] - The filters that can be applied to + * the report item. + * @property {Object} [config_meta] - Metadata related to the report item configuration. + * @property {string} [report_type] - The type of the report item. + * @property {string} [display_date] - The display date of the report item, if applicable. + */ + +/** + * @typedef GetAffiliate + * @property {number} [company_id] - The unique identifier of the company + * associated with the affiliate. + */ + +/** + * @typedef GetAffiliateResponse + * @property {string} [reason] - The reason for the response, if applicable. + * @property {boolean} [success] - Indicates whether the request was successful. + * @property {Object[]} [docs] - List of items or data related to the affiliate. + */ + +/** + * @typedef DownloadCreditDebitNote + * @property {string[]} [note_id] - List of unique identifiers for the + * credit/debit notes to be download. + */ + +/** + * @typedef DownloadCreditDebitNoteReq + * @property {DownloadCreditDebitNote} [data] + */ + +/** + * @typedef DownloadCreditDebitNoteResponseData + * @property {string} [id] - The unique identifier of the download credit/debit note. + * @property {string} [pdf_s3_url] - The URL where the PDF of the credit/debit + * note is stored. + */ + +/** + * @typedef DownloadCreditDebitNoteResponse + * @property {boolean} [success] - Indicates whether the request to download the + * credit/debit notes was successful. + * @property {DownloadCreditDebitNoteResponseData[]} [data] - List of + * credit/debit notes download data. + */ + +/** + * @typedef InvoiceBillingItem + * @property {string} [invoice_number] - The number of the invoice associated + * with the billing item. + * @property {number} [amount] - The amount of the billing item. + */ + +/** + * @typedef PaymentProcessPayload + * @property {string} [platform] - The platform through which the payment is processed. + * @property {number} [amount] - The total amount to be processed in the payment. + * @property {string} [transaction_type] - The type of transaction (e.g., seller_online). + * @property {string} [source_reference] - The reference for the source of the payment. + * @property {number} [total_amount] - The total amount to be processed in the payment. + * @property {Object} [meta] - Additional metadata related to the payment. + * @property {string} [currency] - The currency in which the payment is made. + * @property {string} [seller_id] - The unique identifier for the seller + * receiving the payment. + * @property {string} [mode_of_payment] - The mode of payment (e.g., online). + * @property {InvoiceBillingItem[]} [invoice_billing_items] + */ + +/** + * @typedef PaymentProcessReq + * @property {PaymentProcessPayload} [data] + */ + +/** + * @typedef PaymentProcessResponse + * @property {number} [code] - Response code indicating the status of the payment process. + * @property {string} [message] - A message providing additional information + * about the payment process response. + * @property {Object} [meta] - Additional metadata related to the payment + * process response. + * @property {string} [transaction_id] - The unique identifier for the payment + * transaction. + * @property {string} [redirect_url] - URL to redirect the user to complete the + * payment process, if applicable. + */ + +/** + * @typedef CreditlineDataPlatformPayload + * @property {number} [page] - The page number for pagination. + * @property {string} [seller_id] - The unique identifier for the seller. + * @property {string} [end_date] - The end date for the query. + * @property {string} [start_date] - The start date for the query. + * @property {number} [page_size] - The number of items per page. + */ + +/** + * @typedef CreditlineDataPlatformReq + * @property {CreditlineDataPlatformPayload} [data] + */ + +/** + * @typedef CreditlineDataPlatformResponse + * @property {Object[]} [items] - The list of items in the response. + * @property {number} [code] - The response status code. + * @property {boolean} [show_mr] - A flag indicating whether to show MR (some + * specific field). + * @property {Page} [page] + * @property {string} [message] - The response message. + * @property {string[]} [headers] - The list of response headers. + * @property {number} [item_count] - The total number of items. + */ + +/** + * @typedef IsCreditlinePayload + * @property {string} [seller_id] - The unique identifier for the seller to + * check for credit line eligibility. + */ + +/** + * @typedef IsCreditlinePlatformReq + * @property {IsCreditlinePayload} [data] + */ + +/** + * @typedef IsCreditlinePlatformResponse + * @property {boolean} [is_creditline_opted] - Indicates whether the seller has + * opted for a credit line. + * @property {number} [code] - Response code indicating the status of the credit + * line check. + */ + +/** + * @typedef InvoiceTypePayloadData + * @property {boolean} [is_active] - Indicates if the invoice type is active. + */ + +/** + * @typedef InvoiceTypeReq + * @property {InvoiceTypePayloadData} [data] + */ + +/** + * @typedef InvoiceTypeResponseItems + * @property {string} [text] - The text description of the invoice type. + * @property {string} [value] - The value or code representing the invoice type. + */ + +/** + * @typedef InvoiceTypeResponse + * @property {boolean} [success] - Indicates whether the request was successful. + * @property {InvoiceTypeResponseItems[]} [invoice_type_list] - List of invoice + * types available. + * @property {InvoiceTypeResponseItems[]} [payment_status_list] - List of + * payment statuses available. + */ + +/** + * @typedef InoviceListingPayloadDataFilters + * @property {string[]} [payment_status] - List of payment statuses to filter by. + * @property {string[]} [invoice_type] - List of invoice types to filter by. + * @property {string[]} [company_id] - List of company IDs to filter by. + */ + +/** + * @typedef InvoiceListingPayloadData + * @property {number} [page_size] - The number of items per page for pagination. + * @property {number} [page] - The page number for pagination. + * @property {string} [start_date] - The start date for the invoice listing filter. + * @property {string} [end_date] - The end date for the invoice listing filter. + * @property {string} [search] - Search term for filtering invoices. + * @property {InoviceListingPayloadDataFilters} [filters] + */ + +/** + * @typedef InvoiceListingReq + * @property {InvoiceListingPayloadData} [data] + */ + +/** + * @typedef UnpaidInvoiceDataItems + * @property {number} [total_unpaid_invoice_count] - The total count of unpaid invoices. + * @property {string} [currency] - The currency used for unpaid invoices. + * @property {number} [total_unpaid_amount] - The total amount of unpaid invoices. + */ + +/** + * @typedef InvoiceListingResponseItems + * @property {number} [amount] - The amount of the invoice. + * @property {string} [company] - The name of the company associated with the invoice. + * @property {string} [status] - The current status of the invoice (e.g., + * 'paid', 'unpaid'). + * @property {string} [due_date] - The due date of the invoice. + * @property {string} [invoice_date] - The date when the invoice was issued. + * @property {string} [invoice_type] - The type of invoice. + * @property {string} [period] - The period covered by the invoice. + * @property {string} [invoice_number] - The invoice number. + * @property {boolean} [is_downloadable] - Indicates if the invoice is available + * for download. + * @property {string} [invoice_id] - The unique identifier of the invoice. + * @property {Currency} [currency] + */ + +/** + * @typedef InvoiceListingResponse + * @property {boolean} [success] - Indicates whether the request was successful. + * @property {string[]} [headers] - Headers related to the invoice listing response. + * @property {UnpaidInvoiceDataItems} [unpaid_invoice_data] + * @property {InvoiceListingResponseItems[]} [items] - List of invoice items in + * the response. + * @property {Page} [page] + * @property {number} [item_count] - The total number of invoice items in the response. + */ + +/** + * @typedef InvoicePdfPayloadData + * @property {string[]} [invoice_number] - List of invoice numbers for which + * PDFs are requested. + */ + +/** + * @typedef InvoicePdfReq + * @property {InvoicePdfPayloadData} [data] + */ + +/** + * @typedef InvoicePdfResponse + * @property {boolean} [success] - Indicates whether the PDF generation request + * was successful. + * @property {string[]} [data] - List of URLs or paths to the generated PDF files. + * @property {string[]} [error] - List of errors encountered while generating the PDFs. + */ + +/** + * @typedef IsCnRefundMethodData + * @property {string} [affiliate_id] - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + * @property {boolean} [toggle_edit_required] - Indicates whether editing the + * refund method is required. + * @property {number} [seller_id] - Unique identifier for the seller. + */ + +/** + * @typedef IsCnRefundMethodReq + * @property {IsCnRefundMethodData} [data] + */ + +/** + * @typedef IsCnRefundMethodResponseData + * @property {boolean} [is_first_time_user] - Indicates whether the seller for + * specific sale channel is using the refund method for the first time. + */ + +/** + * @typedef IsCnRefundMethodResponse + * @property {boolean} [success] - Indicates whether the request to determine + * the refund method was successful. + * @property {IsCnRefundMethodResponseData} [data] + */ + +/** + * @typedef CreditNoteConfigNotificationEvents + * @property {number} [expiration_reminder_to_customer] - Number of days before + * the expiration date to send a reminder notification to the customer. + */ + +/** + * @typedef CreateSellerCreditNoteConfig + * @property {boolean} [is_cn_as_refund_method] - Indicates if the credit note + * is used as a refund method. + * @property {string} [affiliate_id] - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + * @property {string[]} [source_channel] - List of source channels associated + * with the credit note configuration. + * @property {number} [seller_id] - Unique identifier for the seller. + * @property {CreditNoteConfigNotificationEvents} [notification_events] + * @property {string} [sales_channel_name] - Name of the sales channel. + * @property {string[]} [ordering_channel] - List of ordering channels + * associated with the credit note configuration. + * @property {number} [validity] - Validity period of the credit note in days. + * @property {string} [currency_type] - Type of currency used for the credit note. + * @property {string[]} [slug_values] - List of slug values associated with the + * credit note configuration. + */ + +/** + * @typedef CreateSellerCreditNoteConfigReq + * @property {CreateSellerCreditNoteConfig} [data] + */ + +/** + * @typedef CreateSellerCreditNoteConfigResponse + * @property {boolean} [success] - Indicates if the credit note configuration + * creation was successful. + * @property {string} [message] - Additional information or message about the + * credit note configuration creation process. + */ + +/** + * @typedef DeleteConfig + * @property {string} [affiliate_id] - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + * @property {string[]} [slug_values] - List of slug values associated with the + * credit note configuration. + * @property {number} [seller_id] - Unique identifier for the seller. + */ + +/** + * @typedef DeleteConfigReq + * @property {DeleteConfig} [data] + */ + +/** + * @typedef DeleteConfigResponse + * @property {boolean} [success] - Indicates if the configuration deletion was successful. + * @property {string} [message] - Additional information or message about the + * configuration deletion process. + */ + +/** + * @typedef ChannelDisplayNameItems + * @property {string} [key] - The unique key identifying the channel. + * @property {string} [value] - The display name of the channel associated with the key. + */ + +/** + * @typedef ChannelDisplayNameResponse + * @property {boolean} [success] - Indicates if the retrieval of channel display + * names was successful. + * @property {ChannelDisplayNameItems[]} [items] - List of items containing + * key-value pairs for channel display names. + */ + +/** + * @typedef CnReferenceNumber + * @property {string} [cn_reference_number] - The unique reference number of the + * credit note. + */ + +/** + * @typedef GetPdfUrlViewReq + * @property {CnReferenceNumber} [data] + */ + +/** + * @typedef GetPdfUrlViewResponseData + * @property {string} [s3_pdf_link] - The URL link where credit nore pdf stored + * to view and download. + * @property {string} [cn_reference_number] - The unique reference number of the + * credit note. + */ + +/** + * @typedef GetPdfUrlViewResponse + * @property {boolean} [success] - Indicates if the retrieval of the pdf URL was + * successful. + * @property {GetPdfUrlViewResponseData} [data] + */ + +/** + * @typedef CreditNoteDetailsReq + * @property {CnReferenceNumber} [data] + */ + +/** + * @typedef CnDetails + * @property {string} [staff_id] - ID of the staff member associated with the credit note. + * @property {string} [expiry_date] - Expiry date of the credit note. + * @property {string} [channel_of_issuance] - Channel through which the credit + * note was issued. + * @property {string} [order_id] - Order ID of order for which credit note created. + * @property {string} [date_issued] - Date when the credit note was issued. + * @property {string} [ordering_channel] - Ordering channel associated with the + * credit note. + * @property {string} [shipment_id] - Shipment Id associated with the credit note. + * @property {string} [store_id] - Store Id associated with the credit note. + * @property {string} [invoice_number] - Invoice number associated with the credit note. + */ + +/** + * @typedef RedemptionDetails + * @property {Object} [meta] - Additional metadata related to the redemption details. + * @property {string} [staff_id] - ID of the staff member who processed the redemption. + * @property {string} [created_at] - Date and time when the redemption was processed. + * @property {string} [order_id] - Order Id of the order associated with the redemption. + * @property {string} [store_id] - Store Id of the order associated with the redemption. + * @property {string} [shipment_id] - Shipment Id of the order associated with + * the redemption. + * @property {string} [ordering_channel] - Ordering channel associated with the + * redemption. + * @property {number} [amount_debited] - Amount debited from the credit note + * during redemption. + * @property {string} [invoice_number] - Invoice number associated with the redemption. + */ + +/** + * @typedef CreditNoteDetails + * @property {string} [currency] - Currency in which the credit note is issued. + * @property {number} [current_amount_used] - Current amount used from the credit note. + * @property {string} [cn_status] - Status of the credit note. + * @property {string} [customer_mobile_number] - Mobile number of the customer + * associated with the credit note. + * @property {string} [cn_reference_number] - Unique Credit number of the credit note. + * @property {CnDetails} [cn_details] + * @property {RedemptionDetails[]} [redemption_details] - List of redemption + * details associated with the credit note. + * @property {number} [remaining_cn_amount] - Remaining amount left in the credit note. + * @property {number} [available_cn_balance] - Available balance in the credit note. + * @property {number} [cn_amount] - Total amount of the credit note. + */ + +/** + * @typedef CreditNoteDetailsResponse + * @property {boolean} [success] - Indicates if the retrieval of credit note + * details was successful. + * @property {CreditNoteDetails} [data] + */ + +/** + * @typedef GetCustomerCreditBalance + * @property {string} [affiliate_id] - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + * @property {number} [seller_id] - Unique identifier for the seller. + * @property {string} [customer_mobile_number] - Mobile number of the customer + * for whom the credit balance is requested. + */ + +/** + * @typedef GetCustomerCreditBalanceReq + * @property {GetCustomerCreditBalance} [data] + */ + +/** + * @typedef GetCustomerCreditBalanceResponseData + * @property {string} [customer_mobile_number] - Mobile number of the customer. + * @property {number} [total_credited_balance] - Total credited balance + * available for the customer. + */ + +/** + * @typedef GetCustomerCreditBalanceResponse + * @property {boolean} [success] - Indicates if the retrieval of customer credit + * balance was successful. + * @property {GetCustomerCreditBalanceResponseData} [data] + */ + +/** + * @typedef GetCnConfigReq + * @property {DeleteConfig} [data] + */ + +/** + * @typedef GetCnConfigResponseMeta + * @property {string} [reason] - Reason associated with the configuration response. + * @property {string[]} [source_channel] - List of source channels associated + * with the credit note configuration. + */ + +/** + * @typedef GetCnConfigResponseData + * @property {boolean} [is_cn_as_refund_method] - Indicates if the credit note + * is configured as a refund method. + * @property {string} [affiliate_id] - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + * @property {Object} [meta] + * @property {number} [seller_id] - Unique identifier for the seller. + * @property {CreditNoteConfigNotificationEvents} [notification_events] + * @property {number} [validity] - Validity period of the credit note + * configuration in days. + * @property {string[]} [redemption_ordering_channel] - List of ordering + * channels associated with credit note redemption. + * @property {string} [currency_type] - Type of currency used for the credit note. + */ + +/** + * @typedef GetCnConfigResponse + * @property {boolean} [success] - Indicates if the retrieval of credit note + * configuration was successful. + * @property {GetCnConfigResponseData} [data] + */ + +/** + * @typedef CnGenerateReportFilters + * @property {string[]} [staff_id] - Array of staff IDs for filtering credit note reports. + * @property {string[]} [channel_of_issuance] - Array of channels through which + * credit notes were issued. + * @property {string[]} [utilisation] - Array of utilisation types for filtering + * credit note reports. + * @property {string[]} [ordering_channel] - Array of ordering channels + * associated with credit note reports. + * @property {number[]} [store_id] - Array of store IDs for filtering credit note reports. + * @property {string[]} [type_of_transaction] - Array of transaction types for + * filtering credit note reports. + * @property {string[]} [issuance_channel] - Array of issuance channels for + * filtering credit note reports. + */ + +/** + * @typedef CnGenerateReport + * @property {number} [page] - Page number of the credit note report. + * @property {string} [end_date] - End date for filtering credit note data. + * @property {number} [page_size] - Number of items per page in the credit note report. + * @property {CnGenerateReportFilters} [filters] + * @property {string} [affiliate_id] - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + * @property {GenerateReportFilters} [meta] + * @property {string} [search] - Search query to filter credit note data by keyword. + * @property {string} [report_id] - Unique identifier for the credit note report. + * @property {string} [search_type] - Type of search criteria used for filtering + * credit note data. + * @property {string} [start_date] - Start date for filtering credit note data. + */ + +/** + * @typedef GenerateReportCustomerCnReq + * @property {CnGenerateReport} [data] + */ + +/** + * @typedef CnGenerateReportItems + * @property {string} [expiry_date] - Expiry date of the credit note item. + * @property {string} [status] - Status of the credit note item. + * @property {number} [total_amount] - Total amount of the credit note item. + * @property {string} [order_id] - Order ID of the order associated with the + * credit note item. + * @property {string} [date_issued] - Date when the credit note item was issued. + * @property {string} [shipment_id] - Shipment ID of the order associated with + * the credit note item. + * @property {string} [invoice_number] - Invoice number associated with the + * credit note item. + * @property {string} [credit_note_number] - Unique number of the credit note item. + */ + +/** + * @typedef GenerateReportCustomerCnResponseData + * @property {boolean} [success] - Indicates if the credit note report + * generation was successful. + * @property {string} [message] - Additional message or information related to + * the credit note report. + * @property {CnGenerateReportItems[]} [items] - List of credit note items in the report. + * @property {Object} [row_header_display_order] - Display order for row headers + * in the report. + * @property {string} [end_date] - End date used in the credit note report. + * @property {Page} [page] + * @property {string[]} [headers] - Headers included in the credit note report. + * @property {string[]} [primary_headers] - Primary headers used in the credit + * note report. + * @property {string[]} [allowed_filters] - Allowed filters for the credit note report. + * @property {string} [start_date] - Start date used in the credit note report. + * @property {number} [item_count] - Total count of credit note items in the report. + */ + +/** + * @typedef GenerateReportCustomerCnResponse + * @property {GenerateReportCustomerCnResponseData} [data] + */ + +/** + * @typedef CnDownloadReport + * @property {number} [page] - Page number of the download report. + * @property {string} [start_date] - Start date for filtering credit note data + * in the report. + * @property {string} [end_date] - End date for filtering credit note data in the report. + * @property {string} [affiliate_id] - The unique identifier of sale channels or + * application as affiliate_id associated with the seller. + * @property {string} [search] - Search query to filter credit note data by keyword. + * @property {string} [status] - Status of the credit note data in the report. + * @property {string} [search_type] - Type of search criteria used for filtering + * credit note data. + * @property {number} [page_size] - Number of items per page in the download report. + */ + +/** + * @typedef DownloadReportCustomerCnReq + * @property {CnDownloadReport} [data] + */ + +/** + * @typedef DownloadReportResponseData + * @property {string} [report_config_id] - Unique identifier for the report configuration. + * @property {string} [full_name] - Full name associated with the report request. + * @property {string} [requested_by] - User who requested the report. + * @property {string} [start_date] - Start date used in the report. + * @property {string} [end_date] - End date used in the report. + * @property {Object} [request_dict] - Dictionary containing request parameters + * for the report. + * @property {string} [download_link] - Download link for accessing the generated report. + * @property {string} [created_at] - Date and time when the report was created. + * @property {Object} [meta] - Additional metadata associated with the report. + * @property {string} [msg] - Message related to the report status or generation. + * @property {string} [report_name] - Name of the generated report. + * @property {string} [status] - Status of the report. + * @property {string} [display_name] - Display name of the report. + * @property {Object} [filters] - Filters applied to generate the report. + */ + +/** + * @typedef DownloadReportCustomerCnResponse + * @property {DownloadReportResponseData[]} [items] - List of download report data items. + * @property {number} [item_count] - Total count of items in the download report. + * @property {Page} [page] + */ + +/** + * @typedef GetReportingFilters + * @property {string} [text] - Display text for the filter. + * @property {string} [type] - Type of the fields like seach, filter(e.g., + * single, multi select). + * @property {Object[]} [options] - Options available for the filter. + * @property {string} [value] - Value to be pass in response select from options. + */ + +/** + * @typedef GetReportingNestedFilters + * @property {string} [text] - Display text for the nested filter. + * @property {Object[]} [options] - Options available for the nested filter. + * @property {boolean} [required] - Indicates if the nested filter is required. + * @property {string} [placeholder_text] - Placeholder text for the nested filter. + * @property {string} [type] - Type of the nested filter (e.g., single, multi select). + * @property {string} [value] - Value to be pass in response select from options. + */ + +/** + * @typedef GetReportingFiltersReasonOptions + * @property {string} [text] - Display text for the reason option. + * @property {string} [value] - Value of the reason option. + * @property {string} [placeholder_text] - Placeholder text for the reason option. + */ + +/** + * @typedef GetReportingFiltersReason + * @property {string} [text] - Display text for the reason. + * @property {string} [type] - Type of the reason. + * @property {string} [value] - Value to be pass in response. + * @property {GetReportingFiltersReasonOptions[]} [options] - Options available + * for the reasons select from options. + */ + +/** + * @typedef GetReportingFiltersResponse + * @property {GetReportingFiltersReason} [reason] + * @property {GetReportingFilters} [search] + * @property {GetReportingNestedFilters[]} [filters] - Array of nested filter objects. + * @property {GetReportingFilters} [status] + */ + +/** + * @typedef InvoicePaymentOptionsPayloadData + * @property {string[]} [invoice_numbers] - List of invoice numbers for which + * payment options are being requested. + */ + +/** + * @typedef InvoicePaymentOptionsReq + * @property {InvoicePaymentOptionsPayloadData} [data] + */ + +/** + * @typedef InvoicePaymentOptionsResponsePayableAmounts + * @property {number} [amount] - Amount that is payable for the invoice. + * @property {string} [amount_key] - Key associated with the payable amount for + * identification. + * @property {string} [header] - Header describing the payable amount. + */ + +/** + * @typedef InvoicePaymentOptionsResponseDeductedAmounts + * @property {number} [amount] - Amount deducted from the invoice. + * @property {string} [header] - Header describing the deducted amount. + * @property {string} [amount_key] - Key associated with the deducted amount for + * identification. + * @property {boolean} [is_payable] - Indicates whether the deducted amount is payable. + * @property {string} [symbol] - Currency symbol associated with the deducted amount. + */ + +/** + * @typedef InvoicePaymentOptionsResponseData + * @property {string} [invoice_number] - Invoice number for which payment + * options are provided. + * @property {string} [invoice_type] - Type of the invoice (e.g., 'Seller Fynd', + * 'Platform Subscription'). + * @property {InvoicePaymentOptionsResponsePayableAmounts[]} [display_amounts] + * - List of amounts that are payable for the invoice. + * + * @property {Object} [total_amount] - Total amount for the invoice. + * @property {Object} [deducted_amounts] - Amounts deducted from the total, + * including any associated details. + * @property {InvoicePaymentOptionsResponsePayableAmounts[]} [payable_amounts] + * - Amounts that are payable for the invoice. + * + * @property {Currency} [currency] + */ + +/** + * @typedef InvoicePaymentOptionsResponse + * @property {string} [reason] - Reason for the response or any errors encountered. + * @property {InvoicePaymentOptionsResponseData[]} [data] - List of data objects + * containing details about invoice payment options. + * @property {number} [total_payable_amount] - Total amount payable for the invoices. + * @property {number} [invoice_count] - Number of invoices included in the response. + * @property {boolean} [success] - Indicates whether the request to retrieve + * invoice payment options was successful. + */ + +/** + * @typedef PaymentDetail + * @property {string} [display_name] - Name or label displayed for the payment detail. + * @property {string} [value] - Value associated with the payment detail (e.g., + * amount, transaction ID). + */ + +/** + * @typedef PaidInvoicePaymentDetail + * @property {PaymentDetail[]} [payment_details] - List of payment details for + * the invoice. + * @property {string} [date_of_payment] - Date when the payment was made. + * @property {number} [amount] - Amount paid towards the invoice. + */ + +/** + * @typedef InvoicePaymentDetailsResponseData + * @property {PaidInvoicePaymentDetail[]} [paid_invoice_payment_details] - List + * of details for paid invoices. + * @property {Object[]} [failed_attempts_details] - Details of any failed + * payment attempts for the invoices. + */ + +/** + * @typedef InvoicePaymentDetailsResponse + * @property {string} [reason] - Reason for the response or any errors encountered. + * @property {InvoicePaymentDetailsResponseData} [data] + * @property {boolean} [success] - Indicates whether the request to retrieve + * invoice payment details was successful. + * @property {boolean} [payment_details_visible] - Indicates whether payment + * details are visible or hidden in the response. + */ + +/** + * @typedef InvoiceActivityLogsResponseData + * @property {string} [performed_by] - Identifier of the user or system that + * performed the activity. + * @property {string} [status] - Status of the activity (e.g., 'Completed', 'Pending'). + * @property {string} [reason] - Reason for the activity status or any related notes. + * @property {boolean} [is_resolved] - Indicates whether the activity issue is resolved. + * @property {number} [retry_attempts] - Number of retry attempts made for the activity. + * @property {number} [max_retry_attempts] - Maximum number of retry attempts + * allowed for the activity. + */ + +/** + * @typedef InvoiceActivityLogsResponse + * @property {InvoiceActivityLogsResponseData[]} [data] - List of activity logs + * related to invoices. + */ + +/** + * @typedef InvoiceActivityLogError + * @property {string} [reason] - Reason for the error or issue encountered with + * the invoice activity logs. + */ + +/** + * @typedef UnlockCreditNoteRequestData + * @property {string} [seller_id] - The unique identifier for the seller. + * @property {string[]} [locked_credit_notes] - A list of credit notes that are locked. + * @property {string} [unlock_reason] - The reason for unlocking the credit notes. + * @property {string} [description] - Additional details or comments about the + * unlock request. + */ + +/** + * @typedef UnlockCreditNoteReq + * @property {UnlockCreditNoteRequestData} [data] + */ + +/** + * @typedef UnlockCreditNoteResponseData + * @property {boolean} [is_cn_unlocked] - Indicates whether the credit note is unlocked. + * @property {string} [status] - The current status of the each credit notes. + */ + +/** + * @typedef UnlockCreditNoteResponse + * @property {boolean} [success] - Indicates whether the credit note unlock + * request was successful. + * @property {UnlockCreditNoteResponseData} [data] + */ + +class FinancePlatformModel { + /** @returns {OrederFreezeResponse} */ + static OrederFreezeResponse() { + return Joi.object({ + success: Joi.boolean(), + oms_freeze: Joi.boolean(), + source: Joi.string().allow("").allow(null), + }); + } + + /** @returns {GenerateReportMeta} */ + static GenerateReportMeta() { + return Joi.object({ + brand: Joi.string().allow(""), + company: Joi.string().allow(""), + channel: Joi.string().allow(""), + }); + } + + /** @returns {GenerateReportFilters} */ + static GenerateReportFilters() { + return Joi.object({ + brand: Joi.array().items(Joi.string().allow("")), + company: Joi.array().items(Joi.string().allow("")), + channel: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {GenerateReportPlatform} */ + static GenerateReportPlatform() { + return Joi.object({ + start_date: Joi.string().allow(""), + end_date: Joi.string().allow(""), + meta: FinancePlatformModel.GenerateReportMeta(), + report_id: Joi.string().allow(""), + filters: FinancePlatformModel.GenerateReportFilters(), + }); + } + + /** @returns {GenerateReportReq} */ + static GenerateReportReq() { + return Joi.object({ + data: FinancePlatformModel.GenerateReportPlatform(), + }); + } + + /** @returns {Page} */ + static Page() { + return Joi.object({ + item_total: Joi.number(), + next_id: Joi.string().allow(""), + has_previous: Joi.boolean(), + has_next: Joi.boolean(), + current: Joi.number(), + type: Joi.string().allow("").required(), + size: Joi.number(), + }); + } + + /** @returns {Currency} */ + static Currency() { + return Joi.object({ + code: Joi.string().allow(""), + symbol: Joi.string().allow(""), + name: Joi.string().allow(""), + }).allow(null); + } + + /** @returns {GenerateReportJson} */ + static GenerateReportJson() { + return Joi.object({ + data: Joi.any(), + item_count: Joi.number(), + page: FinancePlatformModel.Page(), + end_date: Joi.string().allow(""), + start_date: Joi.string().allow(""), + items: Joi.array().items(Joi.array().items(Joi.string().allow(""))), + headers: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {Error} */ + static Error() { + return Joi.object({ + status: Joi.number(), + reason: Joi.string().allow(""), + success: Joi.boolean(), + message: Joi.string().allow(""), + code: Joi.string().allow("").allow(null), + exception: Joi.string().allow(""), + info: Joi.string().allow("").allow(null), + request_id: Joi.string().allow("").allow(null), + stack_trace: Joi.string().allow("").allow(null), + meta: FinancePlatformModel.ErrorMeta(), + }); + } + + /** @returns {ErrorMeta} */ + static ErrorMeta() { + return Joi.object({ + columns_errors: Joi.array().items(FinancePlatformModel.ErrorMetaItems()), + }); + } + + /** @returns {ErrorMetaItems} */ + static ErrorMetaItems() { + return Joi.object({ + code: Joi.number().allow(null), + message: Joi.string().allow("").allow(null), + }); + } + + /** @returns {DownloadReport} */ + static DownloadReport() { + return Joi.object({ + data: FinancePlatformModel.DownloadReportData(), + }); + } + + /** @returns {DownloadReportData} */ + static DownloadReportData() { + return Joi.object({ + page: Joi.number(), + page_size: Joi.number(), + start_date: Joi.string().allow(""), + end_date: Joi.string().allow(""), + }); + } + + /** @returns {DownloadReportItems} */ + static DownloadReportItems() { + return Joi.object({ + start_date: Joi.string().allow(""), + end_date: Joi.string().allow(""), + meta: FinancePlatformModel.GenerateReportMeta(), + report_id: Joi.string().allow(""), + filters: FinancePlatformModel.GenerateReportFilters(), + }); + } + + /** @returns {DownloadReportList} */ + static DownloadReportList() { + return Joi.object({ + items: Joi.array().items(FinancePlatformModel.DownloadReportItems()), + page: FinancePlatformModel.Page(), + item_count: Joi.number(), + }); + } + + /** @returns {GetEngineFilters} */ + static GetEngineFilters() { + return Joi.object({ + config_field: Joi.string().allow(""), + status: Joi.string().allow(""), + is_active: Joi.boolean(), + seller_id: Joi.string().allow(""), + }); + } + + /** @returns {GetEngineData} */ + static GetEngineData() { + return Joi.object({ + status: Joi.string().allow(""), + filters: FinancePlatformModel.GetEngineFilters(), + project: Joi.array().items(Joi.string().allow("")), + table_name: Joi.string().allow(""), + search: Joi.any(), + page: Joi.number(), + page_size: Joi.number(), + order_by: Joi.string().allow(""), + }); + } + + /** @returns {GetEngineReq} */ + static GetEngineReq() { + return Joi.object({ + data: FinancePlatformModel.GetEngineData(), + }); + } + + /** @returns {GetEngineResponse} */ + static GetEngineResponse() { + return Joi.object({ + success: Joi.boolean(), + items: Joi.array().items(Joi.any()), + page: FinancePlatformModel.Page(), + item_count: Joi.number(), + }); + } + + /** @returns {GetReason} */ + static GetReason() { + return Joi.object({ + reason_type: Joi.string().allow(""), + }); + } + + /** @returns {GetReasonReq} */ + static GetReasonReq() { + return Joi.object({ + data: FinancePlatformModel.GetReason(), + }); + } + + /** @returns {ReasonItem} */ + static ReasonItem() { + return Joi.object({ + id: Joi.string().allow(""), + name: Joi.string().allow(""), + display_name: Joi.string().allow(""), + }); + } + + /** @returns {GetReasonResponse} */ + static GetReasonResponse() { + return Joi.object({ + success: Joi.boolean(), + item_list: Joi.array().items(FinancePlatformModel.ReasonItem()), + item_count: Joi.number(), + page: FinancePlatformModel.Page(), + }); + } + + /** @returns {GetReportListData} */ + static GetReportListData() { + return Joi.object({ + role_name: Joi.string().allow(""), + listing_enabled: Joi.boolean(), + }); + } + + /** @returns {GetReportListReq} */ + static GetReportListReq() { + return Joi.object({ + data: FinancePlatformModel.GetReportListData(), + }); + } + + /** @returns {GetReportListResponse} */ + static GetReportListResponse() { + return Joi.object({ + success: Joi.boolean(), + items: Joi.array().items(FinancePlatformModel.ReportItem()), + page: FinancePlatformModel.Page(), + total_count: Joi.number(), + }); + } + + /** @returns {ReportItem} */ + static ReportItem() { + return Joi.object({ + id: Joi.string().allow(""), + name: Joi.string().allow(""), + description: Joi.string().allow(""), + allowed_filters: Joi.array().items(Joi.string().allow("")), + config_meta: Joi.any(), + report_type: Joi.string().allow(""), + display_date: Joi.string().allow("").allow(null), + }); + } + + /** @returns {GetAffiliate} */ + static GetAffiliate() { + return Joi.object({ + company_id: Joi.number(), + }); + } + + /** @returns {GetAffiliateResponse} */ + static GetAffiliateResponse() { + return Joi.object({ + reason: Joi.string().allow(""), + success: Joi.boolean(), + docs: Joi.array().items(Joi.any()), + }); + } + + /** @returns {DownloadCreditDebitNote} */ + static DownloadCreditDebitNote() { + return Joi.object({ + note_id: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {DownloadCreditDebitNoteReq} */ + static DownloadCreditDebitNoteReq() { + return Joi.object({ + data: FinancePlatformModel.DownloadCreditDebitNote(), + }); + } + + /** @returns {DownloadCreditDebitNoteResponseData} */ + static DownloadCreditDebitNoteResponseData() { + return Joi.object({ + id: Joi.string().allow(""), + pdf_s3_url: Joi.string().allow(""), + }); + } + + /** @returns {DownloadCreditDebitNoteResponse} */ + static DownloadCreditDebitNoteResponse() { + return Joi.object({ + success: Joi.boolean(), + data: Joi.array().items( + FinancePlatformModel.DownloadCreditDebitNoteResponseData() + ), + }); + } + + /** @returns {InvoiceBillingItem} */ + static InvoiceBillingItem() { + return Joi.object({ + invoice_number: Joi.string().allow(""), + amount: Joi.number(), + }); + } + + /** @returns {PaymentProcessPayload} */ + static PaymentProcessPayload() { + return Joi.object({ + platform: Joi.string().allow(""), + amount: Joi.number(), + transaction_type: Joi.string().allow(""), + source_reference: Joi.string().allow(""), + total_amount: Joi.number(), + meta: Joi.any(), + currency: Joi.string().allow(""), + seller_id: Joi.string().allow(""), + mode_of_payment: Joi.string().allow(""), + invoice_billing_items: Joi.array().items( + FinancePlatformModel.InvoiceBillingItem() + ), + }); + } + + /** @returns {PaymentProcessReq} */ + static PaymentProcessReq() { + return Joi.object({ + data: FinancePlatformModel.PaymentProcessPayload(), + }); + } + + /** @returns {PaymentProcessResponse} */ + static PaymentProcessResponse() { + return Joi.object({ + code: Joi.number(), + message: Joi.string().allow(""), + meta: Joi.any(), + transaction_id: Joi.string().allow(""), + redirect_url: Joi.string().allow(""), + }); + } + + /** @returns {CreditlineDataPlatformPayload} */ + static CreditlineDataPlatformPayload() { + return Joi.object({ + page: Joi.number(), + seller_id: Joi.string().allow(""), + end_date: Joi.string().allow(""), + start_date: Joi.string().allow(""), + page_size: Joi.number(), + }); + } + + /** @returns {CreditlineDataPlatformReq} */ + static CreditlineDataPlatformReq() { + return Joi.object({ + data: FinancePlatformModel.CreditlineDataPlatformPayload(), + }); + } + + /** @returns {CreditlineDataPlatformResponse} */ + static CreditlineDataPlatformResponse() { + return Joi.object({ + items: Joi.array().items(Joi.any()), + code: Joi.number(), + show_mr: Joi.boolean(), + page: FinancePlatformModel.Page(), + message: Joi.string().allow(""), + headers: Joi.array().items(Joi.string().allow("")), + item_count: Joi.number(), + }); + } + + /** @returns {IsCreditlinePayload} */ + static IsCreditlinePayload() { + return Joi.object({ + seller_id: Joi.string().allow(""), + }); + } + + /** @returns {IsCreditlinePlatformReq} */ + static IsCreditlinePlatformReq() { + return Joi.object({ + data: FinancePlatformModel.IsCreditlinePayload(), + }); + } + + /** @returns {IsCreditlinePlatformResponse} */ + static IsCreditlinePlatformResponse() { + return Joi.object({ + is_creditline_opted: Joi.boolean(), + code: Joi.number(), + }); + } + + /** @returns {InvoiceTypePayloadData} */ + static InvoiceTypePayloadData() { + return Joi.object({ + is_active: Joi.boolean(), + }); + } + + /** @returns {InvoiceTypeReq} */ + static InvoiceTypeReq() { + return Joi.object({ + data: FinancePlatformModel.InvoiceTypePayloadData(), + }); + } + + /** @returns {InvoiceTypeResponseItems} */ + static InvoiceTypeResponseItems() { + return Joi.object({ + text: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + + /** @returns {InvoiceTypeResponse} */ + static InvoiceTypeResponse() { + return Joi.object({ + success: Joi.boolean(), + invoice_type_list: Joi.array().items( + FinancePlatformModel.InvoiceTypeResponseItems() + ), + payment_status_list: Joi.array().items( + FinancePlatformModel.InvoiceTypeResponseItems() + ), + }); + } + + /** @returns {InoviceListingPayloadDataFilters} */ + static InoviceListingPayloadDataFilters() { + return Joi.object({ + payment_status: Joi.array().items(Joi.string().allow("")), + invoice_type: Joi.array().items(Joi.string().allow("")), + company_id: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {InvoiceListingPayloadData} */ + static InvoiceListingPayloadData() { + return Joi.object({ + page_size: Joi.number(), + page: Joi.number(), + start_date: Joi.string().allow(""), + end_date: Joi.string().allow(""), + search: Joi.string().allow(""), + filters: FinancePlatformModel.InoviceListingPayloadDataFilters(), + }); + } + + /** @returns {InvoiceListingReq} */ + static InvoiceListingReq() { + return Joi.object({ + data: FinancePlatformModel.InvoiceListingPayloadData(), + }); + } + + /** @returns {UnpaidInvoiceDataItems} */ + static UnpaidInvoiceDataItems() { + return Joi.object({ + total_unpaid_invoice_count: Joi.number(), + currency: Joi.string().allow(""), + total_unpaid_amount: Joi.number(), + }); + } + + /** @returns {InvoiceListingResponseItems} */ + static InvoiceListingResponseItems() { + return Joi.object({ + amount: Joi.number(), + company: Joi.string().allow(""), + status: Joi.string().allow(""), + due_date: Joi.string().allow(""), + invoice_date: Joi.string().allow(""), + invoice_type: Joi.string().allow(""), + period: Joi.string().allow(""), + invoice_number: Joi.string().allow(""), + is_downloadable: Joi.boolean(), + invoice_id: Joi.string().allow(""), + currency: FinancePlatformModel.Currency(), + }); + } + + /** @returns {InvoiceListingResponse} */ + static InvoiceListingResponse() { + return Joi.object({ + success: Joi.boolean(), + headers: Joi.array().items(Joi.string().allow("")), + unpaid_invoice_data: FinancePlatformModel.UnpaidInvoiceDataItems(), + items: Joi.array().items( + FinancePlatformModel.InvoiceListingResponseItems() + ), + page: FinancePlatformModel.Page(), + item_count: Joi.number(), + }); + } + + /** @returns {InvoicePdfPayloadData} */ + static InvoicePdfPayloadData() { + return Joi.object({ + invoice_number: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {InvoicePdfReq} */ + static InvoicePdfReq() { + return Joi.object({ + data: FinancePlatformModel.InvoicePdfPayloadData(), + }); + } + + /** @returns {InvoicePdfResponse} */ + static InvoicePdfResponse() { + return Joi.object({ + success: Joi.boolean(), + data: Joi.array().items(Joi.string().allow("")), + error: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {IsCnRefundMethodData} */ + static IsCnRefundMethodData() { + return Joi.object({ + affiliate_id: Joi.string().allow(""), + toggle_edit_required: Joi.boolean(), + seller_id: Joi.number(), + }); + } + + /** @returns {IsCnRefundMethodReq} */ + static IsCnRefundMethodReq() { + return Joi.object({ + data: FinancePlatformModel.IsCnRefundMethodData(), + }); + } + + /** @returns {IsCnRefundMethodResponseData} */ + static IsCnRefundMethodResponseData() { + return Joi.object({ + is_first_time_user: Joi.boolean(), + }); + } + + /** @returns {IsCnRefundMethodResponse} */ + static IsCnRefundMethodResponse() { + return Joi.object({ + success: Joi.boolean(), + data: FinancePlatformModel.IsCnRefundMethodResponseData(), + }); + } + + /** @returns {CreditNoteConfigNotificationEvents} */ + static CreditNoteConfigNotificationEvents() { + return Joi.object({ + expiration_reminder_to_customer: Joi.number(), + }); + } + + /** @returns {CreateSellerCreditNoteConfig} */ + static CreateSellerCreditNoteConfig() { + return Joi.object({ + is_cn_as_refund_method: Joi.boolean(), + affiliate_id: Joi.string().allow(""), + source_channel: Joi.array().items(Joi.string().allow("")), + seller_id: Joi.number(), + notification_events: FinancePlatformModel.CreditNoteConfigNotificationEvents(), + sales_channel_name: Joi.string().allow(""), + ordering_channel: Joi.array().items(Joi.string().allow("")), + validity: Joi.number(), + currency_type: Joi.string().allow(""), + slug_values: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {CreateSellerCreditNoteConfigReq} */ + static CreateSellerCreditNoteConfigReq() { + return Joi.object({ + data: FinancePlatformModel.CreateSellerCreditNoteConfig(), + }); + } + + /** @returns {CreateSellerCreditNoteConfigResponse} */ + static CreateSellerCreditNoteConfigResponse() { + return Joi.object({ + success: Joi.boolean(), + message: Joi.string().allow(""), + }); + } + + /** @returns {DeleteConfig} */ + static DeleteConfig() { + return Joi.object({ + affiliate_id: Joi.string().allow(""), + slug_values: Joi.array().items(Joi.string().allow("")), + seller_id: Joi.number(), + }); + } + + /** @returns {DeleteConfigReq} */ + static DeleteConfigReq() { + return Joi.object({ + data: FinancePlatformModel.DeleteConfig(), + }); + } + + /** @returns {DeleteConfigResponse} */ + static DeleteConfigResponse() { + return Joi.object({ + success: Joi.boolean(), + message: Joi.string().allow(""), + }); + } + + /** @returns {ChannelDisplayNameItems} */ + static ChannelDisplayNameItems() { + return Joi.object({ + key: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + + /** @returns {ChannelDisplayNameResponse} */ + static ChannelDisplayNameResponse() { + return Joi.object({ + success: Joi.boolean(), + items: Joi.array().items(FinancePlatformModel.ChannelDisplayNameItems()), + }); + } + + /** @returns {CnReferenceNumber} */ + static CnReferenceNumber() { + return Joi.object({ + cn_reference_number: Joi.string().allow(""), + }); + } + + /** @returns {GetPdfUrlViewReq} */ + static GetPdfUrlViewReq() { + return Joi.object({ + data: FinancePlatformModel.CnReferenceNumber(), + }); + } + + /** @returns {GetPdfUrlViewResponseData} */ + static GetPdfUrlViewResponseData() { + return Joi.object({ + s3_pdf_link: Joi.string().allow(""), + cn_reference_number: Joi.string().allow(""), + }); + } + + /** @returns {GetPdfUrlViewResponse} */ + static GetPdfUrlViewResponse() { + return Joi.object({ + success: Joi.boolean(), + data: FinancePlatformModel.GetPdfUrlViewResponseData(), + }); + } + + /** @returns {CreditNoteDetailsReq} */ + static CreditNoteDetailsReq() { + return Joi.object({ + data: FinancePlatformModel.CnReferenceNumber(), + }); + } + + /** @returns {CnDetails} */ + static CnDetails() { + return Joi.object({ + staff_id: Joi.string().allow(""), + expiry_date: Joi.string().allow(""), + channel_of_issuance: Joi.string().allow(""), + order_id: Joi.string().allow(""), + date_issued: Joi.string().allow(""), + ordering_channel: Joi.string().allow(""), + shipment_id: Joi.string().allow(""), + store_id: Joi.string().allow(""), + invoice_number: Joi.string().allow(""), + }); + } + + /** @returns {RedemptionDetails} */ + static RedemptionDetails() { + return Joi.object({ + meta: Joi.any(), + staff_id: Joi.string().allow(""), + created_at: Joi.string().allow(""), + order_id: Joi.string().allow(""), + store_id: Joi.string().allow(""), + shipment_id: Joi.string().allow(""), + ordering_channel: Joi.string().allow(""), + amount_debited: Joi.number(), + invoice_number: Joi.string().allow(""), + }); + } + + /** @returns {CreditNoteDetails} */ + static CreditNoteDetails() { + return Joi.object({ + currency: Joi.string().allow("").allow(null), + current_amount_used: Joi.number(), + cn_status: Joi.string().allow(""), + customer_mobile_number: Joi.string().allow(""), + cn_reference_number: Joi.string().allow(""), + cn_details: FinancePlatformModel.CnDetails(), + redemption_details: Joi.array().items( + FinancePlatformModel.RedemptionDetails() + ), + remaining_cn_amount: Joi.number(), + available_cn_balance: Joi.number(), + cn_amount: Joi.number(), + }); + } + + /** @returns {CreditNoteDetailsResponse} */ + static CreditNoteDetailsResponse() { + return Joi.object({ + success: Joi.boolean(), + data: FinancePlatformModel.CreditNoteDetails(), + }); + } + + /** @returns {GetCustomerCreditBalance} */ + static GetCustomerCreditBalance() { + return Joi.object({ + affiliate_id: Joi.string().allow(""), + seller_id: Joi.number(), + customer_mobile_number: Joi.string().allow(""), + }); + } + + /** @returns {GetCustomerCreditBalanceReq} */ + static GetCustomerCreditBalanceReq() { + return Joi.object({ + data: FinancePlatformModel.GetCustomerCreditBalance(), + }); + } + + /** @returns {GetCustomerCreditBalanceResponseData} */ + static GetCustomerCreditBalanceResponseData() { + return Joi.object({ + customer_mobile_number: Joi.string().allow(""), + total_credited_balance: Joi.number(), + }); + } + + /** @returns {GetCustomerCreditBalanceResponse} */ + static GetCustomerCreditBalanceResponse() { + return Joi.object({ + success: Joi.boolean(), + data: FinancePlatformModel.GetCustomerCreditBalanceResponseData(), + }); + } + + /** @returns {GetCnConfigReq} */ + static GetCnConfigReq() { + return Joi.object({ + data: FinancePlatformModel.DeleteConfig(), + }); + } + + /** @returns {GetCnConfigResponseMeta} */ + static GetCnConfigResponseMeta() { + return Joi.object({ + reason: Joi.string().allow("").allow(null), + source_channel: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {GetCnConfigResponseData} */ + static GetCnConfigResponseData() { + return Joi.object({ + is_cn_as_refund_method: Joi.boolean(), + affiliate_id: Joi.string().allow(""), + meta: Joi.any(), + seller_id: Joi.number(), + notification_events: FinancePlatformModel.CreditNoteConfigNotificationEvents(), + validity: Joi.number(), + redemption_ordering_channel: Joi.array().items(Joi.string().allow("")), + currency_type: Joi.string().allow(""), + }); + } + + /** @returns {GetCnConfigResponse} */ + static GetCnConfigResponse() { + return Joi.object({ + success: Joi.boolean(), + data: FinancePlatformModel.GetCnConfigResponseData(), + }); + } + + /** @returns {CnGenerateReportFilters} */ + static CnGenerateReportFilters() { + return Joi.object({ + staff_id: Joi.array().items(Joi.string().allow("")), + channel_of_issuance: Joi.array().items(Joi.string().allow("")), + utilisation: Joi.array().items(Joi.string().allow("")), + ordering_channel: Joi.array().items(Joi.string().allow("")), + store_id: Joi.array().items(Joi.number()), + type_of_transaction: Joi.array().items(Joi.string().allow("")), + issuance_channel: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {CnGenerateReport} */ + static CnGenerateReport() { + return Joi.object({ + page: Joi.number(), + end_date: Joi.string().allow(""), + page_size: Joi.number(), + filters: FinancePlatformModel.CnGenerateReportFilters(), + affiliate_id: Joi.string().allow(""), + meta: FinancePlatformModel.GenerateReportFilters(), + search: Joi.string().allow(""), + report_id: Joi.string().allow(""), + search_type: Joi.string().allow(""), + start_date: Joi.string().allow(""), + }); + } + + /** @returns {GenerateReportCustomerCnReq} */ + static GenerateReportCustomerCnReq() { + return Joi.object({ + data: FinancePlatformModel.CnGenerateReport(), + }); + } + + /** @returns {CnGenerateReportItems} */ + static CnGenerateReportItems() { + return Joi.object({ + expiry_date: Joi.string().allow(""), + status: Joi.string().allow(""), + total_amount: Joi.number(), + order_id: Joi.string().allow(""), + date_issued: Joi.string().allow(""), + shipment_id: Joi.string().allow(""), + invoice_number: Joi.string().allow(""), + credit_note_number: Joi.string().allow(""), + }); + } + + /** @returns {GenerateReportCustomerCnResponseData} */ + static GenerateReportCustomerCnResponseData() { + return Joi.object({ + success: Joi.boolean(), + message: Joi.string().allow(""), + items: Joi.array().items(FinancePlatformModel.CnGenerateReportItems()), + row_header_display_order: Joi.any(), + end_date: Joi.string().allow(""), + page: FinancePlatformModel.Page(), + headers: Joi.array().items(Joi.string().allow("")), + primary_headers: Joi.array().items(Joi.string().allow("")), + allowed_filters: Joi.array().items(Joi.string().allow("")), + start_date: Joi.string().allow(""), + item_count: Joi.number(), + }); + } + + /** @returns {GenerateReportCustomerCnResponse} */ + static GenerateReportCustomerCnResponse() { + return Joi.object({ + data: FinancePlatformModel.GenerateReportCustomerCnResponseData(), + }); + } + + /** @returns {CnDownloadReport} */ + static CnDownloadReport() { + return Joi.object({ + page: Joi.number(), + start_date: Joi.string().allow(""), + end_date: Joi.string().allow(""), + affiliate_id: Joi.string().allow(""), + search: Joi.string().allow(""), + status: Joi.string().allow(""), + search_type: Joi.string().allow(""), + page_size: Joi.number(), + }); + } + + /** @returns {DownloadReportCustomerCnReq} */ + static DownloadReportCustomerCnReq() { + return Joi.object({ + data: FinancePlatformModel.CnDownloadReport(), + }); + } + + /** @returns {DownloadReportResponseData} */ + static DownloadReportResponseData() { + return Joi.object({ + report_config_id: Joi.string().allow(""), + full_name: Joi.string().allow(""), + requested_by: Joi.string().allow(""), + start_date: Joi.string().allow(""), + end_date: Joi.string().allow(""), + request_dict: Joi.any(), + download_link: Joi.string().allow(""), + created_at: Joi.string().allow(""), + meta: Joi.any(), + msg: Joi.string().allow(""), + report_name: Joi.string().allow(""), + status: Joi.string().allow(""), + display_name: Joi.string().allow(""), + filters: Joi.any(), + }); + } + + /** @returns {DownloadReportCustomerCnResponse} */ + static DownloadReportCustomerCnResponse() { + return Joi.object({ + items: Joi.array().items( + FinancePlatformModel.DownloadReportResponseData() + ), + item_count: Joi.number(), + page: FinancePlatformModel.Page(), + }); + } + + /** @returns {GetReportingFilters} */ + static GetReportingFilters() { + return Joi.object({ + text: Joi.string().allow(""), + type: Joi.string().allow(""), + options: Joi.array().items(Joi.any()), + value: Joi.string().allow(""), + }); + } + + /** @returns {GetReportingNestedFilters} */ + static GetReportingNestedFilters() { + return Joi.object({ + text: Joi.string().allow(""), + options: Joi.array().items(Joi.any()), + required: Joi.boolean(), + placeholder_text: Joi.string().allow(""), + type: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + + /** @returns {GetReportingFiltersReasonOptions} */ + static GetReportingFiltersReasonOptions() { + return Joi.object({ + text: Joi.string().allow(""), + value: Joi.string().allow(""), + placeholder_text: Joi.string().allow(""), + }); + } + + /** @returns {GetReportingFiltersReason} */ + static GetReportingFiltersReason() { + return Joi.object({ + text: Joi.string().allow(""), + type: Joi.string().allow(""), + value: Joi.string().allow(""), + options: Joi.array().items( + FinancePlatformModel.GetReportingFiltersReasonOptions() + ), + }); + } + + /** @returns {GetReportingFiltersResponse} */ + static GetReportingFiltersResponse() { + return Joi.object({ + reason: FinancePlatformModel.GetReportingFiltersReason(), + search: FinancePlatformModel.GetReportingFilters(), + filters: Joi.array().items( + FinancePlatformModel.GetReportingNestedFilters() + ), + status: FinancePlatformModel.GetReportingFilters(), + }); + } + + /** @returns {InvoicePaymentOptionsPayloadData} */ + static InvoicePaymentOptionsPayloadData() { + return Joi.object({ + invoice_numbers: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {InvoicePaymentOptionsReq} */ + static InvoicePaymentOptionsReq() { + return Joi.object({ + data: FinancePlatformModel.InvoicePaymentOptionsPayloadData(), + }); + } + + /** @returns {InvoicePaymentOptionsResponsePayableAmounts} */ + static InvoicePaymentOptionsResponsePayableAmounts() { + return Joi.object({ + amount: Joi.number(), + amount_key: Joi.string().allow(""), + header: Joi.string().allow(""), + }); + } + + /** @returns {InvoicePaymentOptionsResponseDeductedAmounts} */ + static InvoicePaymentOptionsResponseDeductedAmounts() { + return Joi.object({ + amount: Joi.number(), + header: Joi.string().allow(""), + amount_key: Joi.string().allow(""), + is_payable: Joi.boolean(), + symbol: Joi.string().allow(""), + }); + } + + /** @returns {InvoicePaymentOptionsResponseData} */ + static InvoicePaymentOptionsResponseData() { + return Joi.object({ + invoice_number: Joi.string().allow(""), + invoice_type: Joi.string().allow(""), + display_amounts: Joi.array().items( + FinancePlatformModel.InvoicePaymentOptionsResponsePayableAmounts() + ), + total_amount: Joi.any(), + deducted_amounts: Joi.any(), + payable_amounts: Joi.array().items( + FinancePlatformModel.InvoicePaymentOptionsResponsePayableAmounts() + ), + currency: FinancePlatformModel.Currency(), + }); + } + + /** @returns {InvoicePaymentOptionsResponse} */ + static InvoicePaymentOptionsResponse() { + return Joi.object({ + reason: Joi.string().allow(""), + data: Joi.array().items( + FinancePlatformModel.InvoicePaymentOptionsResponseData() + ), + total_payable_amount: Joi.number(), + invoice_count: Joi.number(), + success: Joi.boolean(), + }); + } + + /** @returns {PaymentDetail} */ + static PaymentDetail() { + return Joi.object({ + display_name: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + + /** @returns {PaidInvoicePaymentDetail} */ + static PaidInvoicePaymentDetail() { + return Joi.object({ + payment_details: Joi.array().items(FinancePlatformModel.PaymentDetail()), + date_of_payment: Joi.string().allow(""), + amount: Joi.number(), + }); + } + + /** @returns {InvoicePaymentDetailsResponseData} */ + static InvoicePaymentDetailsResponseData() { + return Joi.object({ + paid_invoice_payment_details: Joi.array().items( + FinancePlatformModel.PaidInvoicePaymentDetail() + ), + failed_attempts_details: Joi.array().items(Joi.any()), + }); + } + + /** @returns {InvoicePaymentDetailsResponse} */ + static InvoicePaymentDetailsResponse() { + return Joi.object({ + reason: Joi.string().allow(""), + data: FinancePlatformModel.InvoicePaymentDetailsResponseData(), + success: Joi.boolean(), + payment_details_visible: Joi.boolean(), + }); + } + + /** @returns {InvoiceActivityLogsResponseData} */ + static InvoiceActivityLogsResponseData() { + return Joi.object({ + performed_by: Joi.string().allow("").allow(null), + status: Joi.string().allow(""), + reason: Joi.string().allow("").allow(null), + is_resolved: Joi.boolean(), + retry_attempts: Joi.number(), + max_retry_attempts: Joi.number().allow(null), + }); + } + + /** @returns {InvoiceActivityLogsResponse} */ + static InvoiceActivityLogsResponse() { + return Joi.object({ + data: Joi.array().items( + FinancePlatformModel.InvoiceActivityLogsResponseData() + ), + }); + } + + /** @returns {InvoiceActivityLogError} */ + static InvoiceActivityLogError() { + return Joi.object({ + reason: Joi.string().allow(""), + }); + } + + /** @returns {UnlockCreditNoteRequestData} */ + static UnlockCreditNoteRequestData() { + return Joi.object({ + seller_id: Joi.string().allow(""), + locked_credit_notes: Joi.array().items(Joi.string().allow("")), + unlock_reason: Joi.string().allow(""), + description: Joi.string().allow(""), + }); + } + + /** @returns {UnlockCreditNoteReq} */ + static UnlockCreditNoteReq() { + return Joi.object({ + data: FinancePlatformModel.UnlockCreditNoteRequestData(), + }); + } + + /** @returns {UnlockCreditNoteResponseData} */ + static UnlockCreditNoteResponseData() { + return Joi.object({ + is_cn_unlocked: Joi.boolean(), + status: Joi.string().allow(""), + }); + } + + /** @returns {UnlockCreditNoteResponse} */ + static UnlockCreditNoteResponse() { + return Joi.object({ + success: Joi.boolean(), + data: FinancePlatformModel.UnlockCreditNoteResponseData(), + }); + } +} +module.exports = FinancePlatformModel; diff --git a/sdk/platform/Finance/FinancePlatformValidator.d.ts b/sdk/platform/Finance/FinancePlatformValidator.d.ts new file mode 100644 index 000000000..4f1a29301 --- /dev/null +++ b/sdk/platform/Finance/FinancePlatformValidator.d.ts @@ -0,0 +1,284 @@ +export = FinancePlatformValidator; +/** + * @typedef ChannelDisplayNameParam + * @property {string} filterKey - Gives display name for channel. + */ +/** + * @typedef CreateSellerCreditNoteConfigParam + * @property {FinancePlatformModel.CreateSellerCreditNoteConfigReq} body + */ +/** + * @typedef CreditNoteDetailsParam + * @property {FinancePlatformModel.CreditNoteDetailsReq} body + */ +/** + * @typedef CreditlineDataplatformParam + * @property {FinancePlatformModel.CreditlineDataPlatformReq} body + */ +/** + * @typedef DeleteConfigParam + * @property {FinancePlatformModel.DeleteConfigReq} body + */ +/** + * @typedef DownloadCreditDebitNoteParam + * @property {FinancePlatformModel.DownloadCreditDebitNoteReq} body + */ +/** + * @typedef DownloadReportParam + * @property {FinancePlatformModel.DownloadReport} body + */ +/** + * @typedef DownloadReportCustomerCnParam + * @property {FinancePlatformModel.DownloadReportCustomerCnReq} body + */ +/** + * @typedef GenerateReportParam + * @property {FinancePlatformModel.GenerateReportReq} body + */ +/** + * @typedef GenerateReportCustomerCnParam + * @property {FinancePlatformModel.GenerateReportCustomerCnReq} body + */ +/** + * @typedef GetAffiliateParam + * @property {FinancePlatformModel.GetAffiliate} body + */ +/** + * @typedef GetCnConfigParam + * @property {FinancePlatformModel.GetCnConfigReq} body + */ +/** + * @typedef GetCustomerCreditBalanceParam + * @property {FinancePlatformModel.GetCustomerCreditBalanceReq} body + */ +/** + * @typedef GetDataParam + * @property {FinancePlatformModel.GetEngineReq} body + */ +/** + * @typedef GetPdfUrlViewParam + * @property {FinancePlatformModel.GetPdfUrlViewReq} body + */ +/** + * @typedef GetReasonParam + * @property {FinancePlatformModel.GetReasonReq} body + */ +/** + * @typedef GetReportListParam + * @property {FinancePlatformModel.GetReportListReq} body + */ +/** + * @typedef GetReportingFiltersParam + * @property {string} filterKey - Filter type. + * @property {string} [affiliateId] - Affiliate id. + */ +/** + * @typedef InvoiceActivityLogsParam + * @property {string} invoiceNumber - Invoice Number for which the data will be + * returned. Invoice_number is required. + */ +/** + * @typedef InvoiceListingParam + * @property {FinancePlatformModel.InvoiceListingReq} body + */ +/** + * @typedef InvoicePDFParam + * @property {FinancePlatformModel.InvoicePdfReq} body + */ +/** + * @typedef InvoicePaymentDetailsParam + * @property {string} invoiceNumber - Invoice Number for which the data will be + * returned.Invoice_Number is required. + */ +/** + * @typedef InvoicePaymentOptionsParam + * @property {FinancePlatformModel.InvoicePaymentOptionsReq} body + */ +/** + * @typedef InvoiceTypeParam + * @property {FinancePlatformModel.InvoiceTypeReq} body + */ +/** + * @typedef IsCnRefundMethodParam + * @property {FinancePlatformModel.IsCnRefundMethodReq} body + */ +/** + * @typedef IsCreditlinePlatformParam + * @property {FinancePlatformModel.IsCreditlinePlatformReq} body + */ +/** @typedef OrderFreezeParam */ +/** + * @typedef PaymentProcessParam + * @property {FinancePlatformModel.PaymentProcessReq} body + */ +/** + * @typedef UnlockCreditNoteParam + * @property {FinancePlatformModel.UnlockCreditNoteReq} body + */ +declare class FinancePlatformValidator { + /** @returns {ChannelDisplayNameParam} */ + static channelDisplayName(): ChannelDisplayNameParam; + /** @returns {CreateSellerCreditNoteConfigParam} */ + static createSellerCreditNoteConfig(): CreateSellerCreditNoteConfigParam; + /** @returns {CreditNoteDetailsParam} */ + static creditNoteDetails(): CreditNoteDetailsParam; + /** @returns {CreditlineDataplatformParam} */ + static creditlineDataplatform(): CreditlineDataplatformParam; + /** @returns {DeleteConfigParam} */ + static deleteConfig(): DeleteConfigParam; + /** @returns {DownloadCreditDebitNoteParam} */ + static downloadCreditDebitNote(): DownloadCreditDebitNoteParam; + /** @returns {DownloadReportParam} */ + static downloadReport(): DownloadReportParam; + /** @returns {DownloadReportCustomerCnParam} */ + static downloadReportCustomerCn(): DownloadReportCustomerCnParam; + /** @returns {GenerateReportParam} */ + static generateReport(): GenerateReportParam; + /** @returns {GenerateReportCustomerCnParam} */ + static generateReportCustomerCn(): GenerateReportCustomerCnParam; + /** @returns {GetAffiliateParam} */ + static getAffiliate(): GetAffiliateParam; + /** @returns {GetCnConfigParam} */ + static getCnConfig(): GetCnConfigParam; + /** @returns {GetCustomerCreditBalanceParam} */ + static getCustomerCreditBalance(): GetCustomerCreditBalanceParam; + /** @returns {GetDataParam} */ + static getData(): GetDataParam; + /** @returns {GetPdfUrlViewParam} */ + static getPdfUrlView(): GetPdfUrlViewParam; + /** @returns {GetReasonParam} */ + static getReason(): GetReasonParam; + /** @returns {GetReportListParam} */ + static getReportList(): GetReportListParam; + /** @returns {GetReportingFiltersParam} */ + static getReportingFilters(): GetReportingFiltersParam; + /** @returns {InvoiceActivityLogsParam} */ + static invoiceActivityLogs(): InvoiceActivityLogsParam; + /** @returns {InvoiceListingParam} */ + static invoiceListing(): InvoiceListingParam; + /** @returns {InvoicePDFParam} */ + static invoicePDF(): InvoicePDFParam; + /** @returns {InvoicePaymentDetailsParam} */ + static invoicePaymentDetails(): InvoicePaymentDetailsParam; + /** @returns {InvoicePaymentOptionsParam} */ + static invoicePaymentOptions(): InvoicePaymentOptionsParam; + /** @returns {InvoiceTypeParam} */ + static invoiceType(): InvoiceTypeParam; + /** @returns {IsCnRefundMethodParam} */ + static isCnRefundMethod(): IsCnRefundMethodParam; + /** @returns {IsCreditlinePlatformParam} */ + static isCreditlinePlatform(): IsCreditlinePlatformParam; + /** @returns {OrderFreezeParam} */ + static orderFreeze(): any; + /** @returns {PaymentProcessParam} */ + static paymentProcess(): PaymentProcessParam; + /** @returns {UnlockCreditNoteParam} */ + static unlockCreditNote(): UnlockCreditNoteParam; +} +declare namespace FinancePlatformValidator { + export { ChannelDisplayNameParam, CreateSellerCreditNoteConfigParam, CreditNoteDetailsParam, CreditlineDataplatformParam, DeleteConfigParam, DownloadCreditDebitNoteParam, DownloadReportParam, DownloadReportCustomerCnParam, GenerateReportParam, GenerateReportCustomerCnParam, GetAffiliateParam, GetCnConfigParam, GetCustomerCreditBalanceParam, GetDataParam, GetPdfUrlViewParam, GetReasonParam, GetReportListParam, GetReportingFiltersParam, InvoiceActivityLogsParam, InvoiceListingParam, InvoicePDFParam, InvoicePaymentDetailsParam, InvoicePaymentOptionsParam, InvoiceTypeParam, IsCnRefundMethodParam, IsCreditlinePlatformParam, OrderFreezeParam, PaymentProcessParam, UnlockCreditNoteParam }; +} +type ChannelDisplayNameParam = { + /** + * - Gives display name for channel. + */ + filterKey: string; +}; +type CreateSellerCreditNoteConfigParam = { + body: FinancePlatformModel.CreateSellerCreditNoteConfigReq; +}; +type CreditNoteDetailsParam = { + body: FinancePlatformModel.CreditNoteDetailsReq; +}; +type CreditlineDataplatformParam = { + body: FinancePlatformModel.CreditlineDataPlatformReq; +}; +type DeleteConfigParam = { + body: FinancePlatformModel.DeleteConfigReq; +}; +type DownloadCreditDebitNoteParam = { + body: FinancePlatformModel.DownloadCreditDebitNoteReq; +}; +type DownloadReportParam = { + body: FinancePlatformModel.DownloadReport; +}; +type DownloadReportCustomerCnParam = { + body: FinancePlatformModel.DownloadReportCustomerCnReq; +}; +type GenerateReportParam = { + body: FinancePlatformModel.GenerateReportReq; +}; +type GenerateReportCustomerCnParam = { + body: FinancePlatformModel.GenerateReportCustomerCnReq; +}; +type GetAffiliateParam = { + body: FinancePlatformModel.GetAffiliate; +}; +type GetCnConfigParam = { + body: FinancePlatformModel.GetCnConfigReq; +}; +type GetCustomerCreditBalanceParam = { + body: FinancePlatformModel.GetCustomerCreditBalanceReq; +}; +type GetDataParam = { + body: FinancePlatformModel.GetEngineReq; +}; +type GetPdfUrlViewParam = { + body: FinancePlatformModel.GetPdfUrlViewReq; +}; +type GetReasonParam = { + body: FinancePlatformModel.GetReasonReq; +}; +type GetReportListParam = { + body: FinancePlatformModel.GetReportListReq; +}; +type GetReportingFiltersParam = { + /** + * - Filter type. + */ + filterKey: string; + /** + * - Affiliate id. + */ + affiliateId?: string; +}; +type InvoiceActivityLogsParam = { + /** + * - Invoice Number for which the data will be + * returned. Invoice_number is required. + */ + invoiceNumber: string; +}; +type InvoiceListingParam = { + body: FinancePlatformModel.InvoiceListingReq; +}; +type InvoicePDFParam = { + body: FinancePlatformModel.InvoicePdfReq; +}; +type InvoicePaymentDetailsParam = { + /** + * - Invoice Number for which the data will be + * returned.Invoice_Number is required. + */ + invoiceNumber: string; +}; +type InvoicePaymentOptionsParam = { + body: FinancePlatformModel.InvoicePaymentOptionsReq; +}; +type InvoiceTypeParam = { + body: FinancePlatformModel.InvoiceTypeReq; +}; +type IsCnRefundMethodParam = { + body: FinancePlatformModel.IsCnRefundMethodReq; +}; +type IsCreditlinePlatformParam = { + body: FinancePlatformModel.IsCreditlinePlatformReq; +}; +type PaymentProcessParam = { + body: FinancePlatformModel.PaymentProcessReq; +}; +type UnlockCreditNoteParam = { + body: FinancePlatformModel.UnlockCreditNoteReq; +}; +type OrderFreezeParam = any; +import FinancePlatformModel = require("./FinancePlatformModel"); diff --git a/sdk/platform/Finance/FinancePlatformValidator.js b/sdk/platform/Finance/FinancePlatformValidator.js new file mode 100644 index 000000000..d5d48b3a2 --- /dev/null +++ b/sdk/platform/Finance/FinancePlatformValidator.js @@ -0,0 +1,354 @@ +const Joi = require("joi"); + +const FinancePlatformModel = require("./FinancePlatformModel"); + +/** + * @typedef ChannelDisplayNameParam + * @property {string} filterKey - Gives display name for channel. + */ + +/** + * @typedef CreateSellerCreditNoteConfigParam + * @property {FinancePlatformModel.CreateSellerCreditNoteConfigReq} body + */ + +/** + * @typedef CreditNoteDetailsParam + * @property {FinancePlatformModel.CreditNoteDetailsReq} body + */ + +/** + * @typedef CreditlineDataplatformParam + * @property {FinancePlatformModel.CreditlineDataPlatformReq} body + */ + +/** + * @typedef DeleteConfigParam + * @property {FinancePlatformModel.DeleteConfigReq} body + */ + +/** + * @typedef DownloadCreditDebitNoteParam + * @property {FinancePlatformModel.DownloadCreditDebitNoteReq} body + */ + +/** + * @typedef DownloadReportParam + * @property {FinancePlatformModel.DownloadReport} body + */ + +/** + * @typedef DownloadReportCustomerCnParam + * @property {FinancePlatformModel.DownloadReportCustomerCnReq} body + */ + +/** + * @typedef GenerateReportParam + * @property {FinancePlatformModel.GenerateReportReq} body + */ + +/** + * @typedef GenerateReportCustomerCnParam + * @property {FinancePlatformModel.GenerateReportCustomerCnReq} body + */ + +/** + * @typedef GetAffiliateParam + * @property {FinancePlatformModel.GetAffiliate} body + */ + +/** + * @typedef GetCnConfigParam + * @property {FinancePlatformModel.GetCnConfigReq} body + */ + +/** + * @typedef GetCustomerCreditBalanceParam + * @property {FinancePlatformModel.GetCustomerCreditBalanceReq} body + */ + +/** + * @typedef GetDataParam + * @property {FinancePlatformModel.GetEngineReq} body + */ + +/** + * @typedef GetPdfUrlViewParam + * @property {FinancePlatformModel.GetPdfUrlViewReq} body + */ + +/** + * @typedef GetReasonParam + * @property {FinancePlatformModel.GetReasonReq} body + */ + +/** + * @typedef GetReportListParam + * @property {FinancePlatformModel.GetReportListReq} body + */ + +/** + * @typedef GetReportingFiltersParam + * @property {string} filterKey - Filter type. + * @property {string} [affiliateId] - Affiliate id. + */ + +/** + * @typedef InvoiceActivityLogsParam + * @property {string} invoiceNumber - Invoice Number for which the data will be + * returned. Invoice_number is required. + */ + +/** + * @typedef InvoiceListingParam + * @property {FinancePlatformModel.InvoiceListingReq} body + */ + +/** + * @typedef InvoicePDFParam + * @property {FinancePlatformModel.InvoicePdfReq} body + */ + +/** + * @typedef InvoicePaymentDetailsParam + * @property {string} invoiceNumber - Invoice Number for which the data will be + * returned.Invoice_Number is required. + */ + +/** + * @typedef InvoicePaymentOptionsParam + * @property {FinancePlatformModel.InvoicePaymentOptionsReq} body + */ + +/** + * @typedef InvoiceTypeParam + * @property {FinancePlatformModel.InvoiceTypeReq} body + */ + +/** + * @typedef IsCnRefundMethodParam + * @property {FinancePlatformModel.IsCnRefundMethodReq} body + */ + +/** + * @typedef IsCreditlinePlatformParam + * @property {FinancePlatformModel.IsCreditlinePlatformReq} body + */ + +/** @typedef OrderFreezeParam */ + +/** + * @typedef PaymentProcessParam + * @property {FinancePlatformModel.PaymentProcessReq} body + */ + +/** + * @typedef UnlockCreditNoteParam + * @property {FinancePlatformModel.UnlockCreditNoteReq} body + */ + +class FinancePlatformValidator { + /** @returns {ChannelDisplayNameParam} */ + static channelDisplayName() { + return Joi.object({ + filterKey: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {CreateSellerCreditNoteConfigParam} */ + static createSellerCreditNoteConfig() { + return Joi.object({ + body: FinancePlatformModel.CreateSellerCreditNoteConfigReq().required(), + }).required(); + } + + /** @returns {CreditNoteDetailsParam} */ + static creditNoteDetails() { + return Joi.object({ + body: FinancePlatformModel.CreditNoteDetailsReq().required(), + }).required(); + } + + /** @returns {CreditlineDataplatformParam} */ + static creditlineDataplatform() { + return Joi.object({ + body: FinancePlatformModel.CreditlineDataPlatformReq().required(), + }).required(); + } + + /** @returns {DeleteConfigParam} */ + static deleteConfig() { + return Joi.object({ + body: FinancePlatformModel.DeleteConfigReq().required(), + }).required(); + } + + /** @returns {DownloadCreditDebitNoteParam} */ + static downloadCreditDebitNote() { + return Joi.object({ + body: FinancePlatformModel.DownloadCreditDebitNoteReq().required(), + }).required(); + } + + /** @returns {DownloadReportParam} */ + static downloadReport() { + return Joi.object({ + body: FinancePlatformModel.DownloadReport().required(), + }).required(); + } + + /** @returns {DownloadReportCustomerCnParam} */ + static downloadReportCustomerCn() { + return Joi.object({ + body: FinancePlatformModel.DownloadReportCustomerCnReq().required(), + }).required(); + } + + /** @returns {GenerateReportParam} */ + static generateReport() { + return Joi.object({ + body: FinancePlatformModel.GenerateReportReq().required(), + }).required(); + } + + /** @returns {GenerateReportCustomerCnParam} */ + static generateReportCustomerCn() { + return Joi.object({ + body: FinancePlatformModel.GenerateReportCustomerCnReq().required(), + }).required(); + } + + /** @returns {GetAffiliateParam} */ + static getAffiliate() { + return Joi.object({ + body: FinancePlatformModel.GetAffiliate().required(), + }).required(); + } + + /** @returns {GetCnConfigParam} */ + static getCnConfig() { + return Joi.object({ + body: FinancePlatformModel.GetCnConfigReq().required(), + }).required(); + } + + /** @returns {GetCustomerCreditBalanceParam} */ + static getCustomerCreditBalance() { + return Joi.object({ + body: FinancePlatformModel.GetCustomerCreditBalanceReq().required(), + }).required(); + } + + /** @returns {GetDataParam} */ + static getData() { + return Joi.object({ + body: FinancePlatformModel.GetEngineReq().required(), + }).required(); + } + + /** @returns {GetPdfUrlViewParam} */ + static getPdfUrlView() { + return Joi.object({ + body: FinancePlatformModel.GetPdfUrlViewReq().required(), + }).required(); + } + + /** @returns {GetReasonParam} */ + static getReason() { + return Joi.object({ + body: FinancePlatformModel.GetReasonReq().required(), + }).required(); + } + + /** @returns {GetReportListParam} */ + static getReportList() { + return Joi.object({ + body: FinancePlatformModel.GetReportListReq().required(), + }).required(); + } + + /** @returns {GetReportingFiltersParam} */ + static getReportingFilters() { + return Joi.object({ + filterKey: Joi.string().allow("").required(), + affiliateId: Joi.string().allow(""), + }).required(); + } + + /** @returns {InvoiceActivityLogsParam} */ + static invoiceActivityLogs() { + return Joi.object({ + invoiceNumber: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {InvoiceListingParam} */ + static invoiceListing() { + return Joi.object({ + body: FinancePlatformModel.InvoiceListingReq().required(), + }).required(); + } + + /** @returns {InvoicePDFParam} */ + static invoicePDF() { + return Joi.object({ + body: FinancePlatformModel.InvoicePdfReq().required(), + }).required(); + } + + /** @returns {InvoicePaymentDetailsParam} */ + static invoicePaymentDetails() { + return Joi.object({ + invoiceNumber: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {InvoicePaymentOptionsParam} */ + static invoicePaymentOptions() { + return Joi.object({ + body: FinancePlatformModel.InvoicePaymentOptionsReq().required(), + }).required(); + } + + /** @returns {InvoiceTypeParam} */ + static invoiceType() { + return Joi.object({ + body: FinancePlatformModel.InvoiceTypeReq().required(), + }).required(); + } + + /** @returns {IsCnRefundMethodParam} */ + static isCnRefundMethod() { + return Joi.object({ + body: FinancePlatformModel.IsCnRefundMethodReq().required(), + }).required(); + } + + /** @returns {IsCreditlinePlatformParam} */ + static isCreditlinePlatform() { + return Joi.object({ + body: FinancePlatformModel.IsCreditlinePlatformReq().required(), + }).required(); + } + + /** @returns {OrderFreezeParam} */ + static orderFreeze() { + return Joi.object({}).required(); + } + + /** @returns {PaymentProcessParam} */ + static paymentProcess() { + return Joi.object({ + body: FinancePlatformModel.PaymentProcessReq().required(), + }).required(); + } + + /** @returns {UnlockCreditNoteParam} */ + static unlockCreditNote() { + return Joi.object({ + body: FinancePlatformModel.UnlockCreditNoteReq().required(), + }).required(); + } +} + +module.exports = FinancePlatformValidator; diff --git a/sdk/platform/Lead/LeadPlatformClient.d.ts b/sdk/platform/Lead/LeadPlatformClient.d.ts index 03d6c83e6..d54fcc5d6 100644 --- a/sdk/platform/Lead/LeadPlatformClient.d.ts +++ b/sdk/platform/Lead/LeadPlatformClient.d.ts @@ -46,12 +46,12 @@ declare class Lead { * @param {LeadPlatformValidator.GetGeneralConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getGeneralConfig * @summary: Get general configuration * @description: Get general configuration settings related to support system for company tickets - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getGeneralConfig/). */ - getGeneralConfig({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getGeneralConfig({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {LeadPlatformValidator.GetPlatformTicketParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/platform/Lead/LeadPlatformClient.js b/sdk/platform/Lead/LeadPlatformClient.js index 0603b3742..c9fc154e5 100644 --- a/sdk/platform/Lead/LeadPlatformClient.js +++ b/sdk/platform/Lead/LeadPlatformClient.js @@ -336,7 +336,7 @@ class Lead { * @param {LeadPlatformValidator.GetGeneralConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getGeneralConfig * @summary: Get general configuration * @description: Get general configuration settings related to support system for company tickets - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getGeneralConfig/). @@ -388,7 +388,7 @@ class Lead { const { error: res_error, - } = LeadPlatformModel.GeneralConfigDetails().validate(responseData, { + } = LeadPlatformModel.GeneralConfigResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/platform/Lead/LeadPlatformModel.d.ts b/sdk/platform/Lead/LeadPlatformModel.d.ts index f09e17229..635e19deb 100644 --- a/sdk/platform/Lead/LeadPlatformModel.d.ts +++ b/sdk/platform/Lead/LeadPlatformModel.d.ts @@ -1,6 +1,6 @@ export = LeadPlatformModel; /** - * @typedef GeneralConfigDetails + * @typedef GeneralConfigResponse * @property {string} [_id] * @property {SupportCommunicationSchema[]} [support_communication] * @property {boolean} [show_communication_info] @@ -288,11 +288,11 @@ export = LeadPlatformModel; declare class LeadPlatformModel { } declare namespace LeadPlatformModel { - export { GeneralConfigDetails, SupportCommunicationSchema, SupportSchema, GeneralConfigIntegrationSchema, TicketList, Page, TicketHistoryList, CustomFormList, CreateCustomFormPayload, EditCustomFormPayload, EditTicketPayload, AgentChangePayload, Filter, TicketHistoryPayload, TicketContext, CreatedOn, TicketAsset, TicketContent, AddTicketPayload, Priority, SLA, Status, TicketFeedbackList, TicketFeedbackPayload, SubmitButton, PollForAssignment, CustomForm, FeedbackForm, TicketCategory, FeedbackResponseItem, TicketFeedback, TicketHistory, Ticket, ErrorMessage, PriorityEnum, HistoryTypeEnum, TicketAssetTypeEnum, TicketSourceEnum }; + export { GeneralConfigResponse, SupportCommunicationSchema, SupportSchema, GeneralConfigIntegrationSchema, TicketList, Page, TicketHistoryList, CustomFormList, CreateCustomFormPayload, EditCustomFormPayload, EditTicketPayload, AgentChangePayload, Filter, TicketHistoryPayload, TicketContext, CreatedOn, TicketAsset, TicketContent, AddTicketPayload, Priority, SLA, Status, TicketFeedbackList, TicketFeedbackPayload, SubmitButton, PollForAssignment, CustomForm, FeedbackForm, TicketCategory, FeedbackResponseItem, TicketFeedback, TicketHistory, Ticket, ErrorMessage, PriorityEnum, HistoryTypeEnum, TicketAssetTypeEnum, TicketSourceEnum }; } -/** @returns {GeneralConfigDetails} */ -declare function GeneralConfigDetails(): GeneralConfigDetails; -type GeneralConfigDetails = { +/** @returns {GeneralConfigResponse} */ +declare function GeneralConfigResponse(): GeneralConfigResponse; +type GeneralConfigResponse = { _id?: string; support_communication?: SupportCommunicationSchema[]; show_communication_info?: boolean; diff --git a/sdk/platform/Lead/LeadPlatformModel.js b/sdk/platform/Lead/LeadPlatformModel.js index ab11ebe80..6def2044f 100644 --- a/sdk/platform/Lead/LeadPlatformModel.js +++ b/sdk/platform/Lead/LeadPlatformModel.js @@ -1,7 +1,7 @@ const Joi = require("joi"); /** - * @typedef GeneralConfigDetails + * @typedef GeneralConfigResponse * @property {string} [_id] * @property {SupportCommunicationSchema[]} [support_communication] * @property {boolean} [show_communication_info] @@ -325,8 +325,8 @@ const Joi = require("joi"); /** @typedef {"platform_panel" | "sales_channel"} TicketSourceEnum */ class LeadPlatformModel { - /** @returns {GeneralConfigDetails} */ - static GeneralConfigDetails() { + /** @returns {GeneralConfigResponse} */ + static GeneralConfigResponse() { return Joi.object({ _id: Joi.string().allow(""), support_communication: Joi.array().items( @@ -474,7 +474,7 @@ class LeadPlatformModel { /** @returns {TicketHistoryPayload} */ static TicketHistoryPayload() { return Joi.object({ - value: Joi.object().pattern(/\S/, Joi.any()).required(), + value: Joi.any().required(), type: LeadPlatformModel.HistoryTypeEnum().required(), }); } @@ -515,12 +515,12 @@ class LeadPlatformModel { /** @returns {AddTicketPayload} */ static AddTicketPayload() { return Joi.object({ - created_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), status: Joi.string().allow(""), priority: LeadPlatformModel.PriorityEnum(), category: Joi.string().allow("").required(), content: LeadPlatformModel.TicketContent().required(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), }); } @@ -559,7 +559,7 @@ class LeadPlatformModel { /** @returns {TicketFeedbackPayload} */ static TicketFeedbackPayload() { return Joi.object({ - form_response: Joi.object().pattern(/\S/, Joi.any()), + form_response: Joi.any(), }); } @@ -605,9 +605,9 @@ class LeadPlatformModel { /** @returns {FeedbackForm} */ static FeedbackForm() { return Joi.object({ - inputs: Joi.object().pattern(/\S/, Joi.any()), + inputs: Joi.any(), title: Joi.string().allow(""), - timestamps: Joi.object().pattern(/\S/, Joi.any()), + timestamps: Joi.any(), }); } @@ -641,7 +641,7 @@ class LeadPlatformModel { .items(LeadPlatformModel.FeedbackResponseItem()) .required(), category: Joi.string().allow(""), - user: Joi.object().pattern(/\S/, Joi.any()), + user: Joi.any(), updated_at: Joi.string().allow(""), created_at: Joi.string().allow(""), }); @@ -651,10 +651,10 @@ class LeadPlatformModel { static TicketHistory() { return Joi.object({ type: Joi.string().allow("").required(), - value: Joi.object().pattern(/\S/, Joi.any()).required(), + value: Joi.any().required(), ticket_id: Joi.string().allow("").required(), created_on: LeadPlatformModel.CreatedOn(), - created_by: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), _id: Joi.string().allow("").required(), updated_at: Joi.string().allow(""), created_at: Joi.string().allow(""), @@ -674,12 +674,12 @@ class LeadPlatformModel { status: LeadPlatformModel.Status().required(), priority: LeadPlatformModel.Priority().required(), sla: LeadPlatformModel.SLA(), - created_by: Joi.object().pattern(/\S/, Joi.any()), - assigned_to: Joi.object().pattern(/\S/, Joi.any()), + created_by: Joi.any(), + assigned_to: Joi.any(), tags: Joi.array().items(Joi.string().allow("")), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), is_feedback_pending: Joi.boolean(), - integration: Joi.object().pattern(/\S/, Joi.any()), + integration: Joi.any(), _id: Joi.string().allow("").required(), updated_at: Joi.string().allow(""), created_at: Joi.string().allow(""), diff --git a/sdk/platform/Order/OrderPlatformApplicationClient.d.ts b/sdk/platform/Order/OrderPlatformApplicationClient.d.ts index 53fb48ae2..298301876 100644 --- a/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +++ b/sdk/platform/Order/OrderPlatformApplicationClient.d.ts @@ -19,37 +19,26 @@ declare class Order { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getApplicationShipments * @summary: List sales channel shipments * @description: Get shipments of a particular sales channel based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getApplicationShipments/). */ - getApplicationShipments({ lane, searchType, searchId, fromDate, toDate, dpIds, orderingCompanyId, stores, salesChannel, requestByExt, pageNo, pageSize, customerId, isPrioritySort, excludeLockedShipments, requestHeaders, }?: OrderPlatformApplicationValidator.GetApplicationShipmentsParam, { responseHeaders }?: object): Promise; + getApplicationShipments({ lane, searchType, searchId, fromDate, toDate, dpIds, orderingCompanyId, stores, salesChannel, requestByExt, pageNo, pageSize, customerId, isPrioritySort, excludeLockedShipments, requestHeaders, }?: OrderPlatformApplicationValidator.GetApplicationShipmentsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformApplicationValidator.GetPlatformShipmentReasonsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getPlatformShipmentReasons * @summary: List shipment cancellation reasons * @description: Get reasons to perform full or partial cancellation of a shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getPlatformShipmentReasons/). */ - getPlatformShipmentReasons({ action, requestHeaders }?: OrderPlatformApplicationValidator.GetPlatformShipmentReasonsParam, { responseHeaders }?: object): Promise; - /** - * @param {OrderPlatformApplicationValidator.GetRulesParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getRules - * @summary: List of RMA rules based on the given input conditions. - * @description: Retrieves a comprehensive list of RMA (Return Merchandise Authorization) rules associated with a specific company and application. These rules dictate the processes for handling returns, including actions, reasons, quality control (QC) types, and associated questions. The endpoint allows for filtering and pagination based on input conditions, providing a tailored set of rules that match the criteria specified. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRules/). - */ - getRules({ body, requestHeaders }?: OrderPlatformApplicationValidator.GetRulesParam, { responseHeaders }?: object): Promise; + getPlatformShipmentReasons({ action, requestHeaders }?: OrderPlatformApplicationValidator.GetPlatformShipmentReasonsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformApplicationValidator.GetShipmentBagReasonsParam} arg * - Arg object @@ -58,8 +47,8 @@ declare class Order { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name getShipmentBagReasons - * @summary: Retrieve Reasons for Cancellation and Return journey - * @description: Allows users to retrieve a comprehensive list of reasons for cancellation or returning a shipment. It provides both cancellation and return reasons, with an emphasis on Quality Control (QC) evaluations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentBagReasons/). + * @summary: List bag cancellation reasons + * @description: Get reasons to perform full or partial cancellation of a shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentBagReasons/). */ getShipmentBagReasons({ shipmentId, lineNumber, requestHeaders }?: OrderPlatformApplicationValidator.GetShipmentBagReasonsParam, { responseHeaders }?: object): Promise; /** diff --git a/sdk/platform/Order/OrderPlatformApplicationClient.js b/sdk/platform/Order/OrderPlatformApplicationClient.js index 7dfb8f305..fd0f4037d 100644 --- a/sdk/platform/Order/OrderPlatformApplicationClient.js +++ b/sdk/platform/Order/OrderPlatformApplicationClient.js @@ -113,7 +113,7 @@ class Order { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getApplicationShipments @@ -231,7 +231,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema().validate( + } = OrderPlatformModel.ShipmentInternalPlatformViewResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -256,8 +256,7 @@ class Order { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getPlatformShipmentReasons * @summary: List shipment cancellation reasons * @description: Get reasons to perform full or partial cancellation of a shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getPlatformShipmentReasons/). @@ -313,84 +312,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.ShipmentReasonsResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > Order > getPlatformShipmentReasons \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {OrderPlatformApplicationValidator.GetRulesParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getRules - * @summary: List of RMA rules based on the given input conditions. - * @description: Retrieves a comprehensive list of RMA (Return Merchandise Authorization) rules associated with a specific company and application. These rules dictate the processes for handling returns, including actions, reasons, quality control (QC) types, and associated questions. The endpoint allows for filtering and pagination based on input conditions, providing a tailored set of rules that match the criteria specified. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRules/). - */ - async getRules( - { body, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = OrderPlatformApplicationValidator.getRules().validate( - { - body, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = OrderPlatformApplicationValidator.getRules().validate( - { - body, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > Order > getRules \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "post", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/rule_list`, - query_params, - body, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = OrderPlatformModel.RuleListResponseSchema().validate(responseData, { + } = OrderPlatformModel.ShipmentReasonsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -401,7 +323,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > getRules \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > getPlatformShipmentReasons \n ${res_error}`, }); } } @@ -417,8 +339,8 @@ class Order { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name getShipmentBagReasons - * @summary: Retrieve Reasons for Cancellation and Return journey - * @description: Allows users to retrieve a comprehensive list of reasons for cancellation or returning a shipment. It provides both cancellation and return reasons, with an emphasis on Quality Control (QC) evaluations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentBagReasons/). + * @summary: List bag cancellation reasons + * @description: Get reasons to perform full or partial cancellation of a shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentBagReasons/). */ async getShipmentBagReasons( { shipmentId, lineNumber, requestHeaders } = { requestHeaders: {} }, diff --git a/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts b/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts index ef80a0f91..152a7cf23 100644 --- a/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +++ b/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts @@ -8,47 +8,35 @@ export = OrderPlatformApplicationValidator; */ /** * @typedef GetApplicationShipmentsParam - * @property {string} [lane] - Optional parameter to specify the lane for - * filtering results. - * @property {string} [searchType] - Search_type refers to the field that will - * be used as the target for the search operation - * @property {string} [searchId] - Identifier used for the search operation - * based on the selected search type. - * @property {string} [fromDate] - Date time in UTC timezone as per ISO format. - * @property {string} [toDate] - Date time in UTC timezone as per ISO format. - * @property {string} [dpIds] - Comma-separated list of delivery partner IDs to - * filter results. - * @property {string} [orderingCompanyId] - ID of the company placing the order, - * used for filtering results. - * @property {string} [stores] - Comma-separated list of store IDs to filter results. - * @property {string} [salesChannel] - The sales channel to filter results. - * @property {string} [requestByExt] - Identifier for external requests. - * @property {number} [pageNo] - The page number for pagination of results. - * @property {number} [pageSize] - The number of results to return per page for - * pagination. - * @property {string} [customerId] - ID of the customer to filter results - * related to specific customer. - * @property {boolean} [isPrioritySort] - Flag to determine if results should be - * sorted by priority. Defaults to true. - * @property {boolean} [excludeLockedShipments] - Flag to exclude shipments that - * are currently locked from the results. + * @property {string} [lane] + * @property {string} [searchType] + * @property {string} [searchId] + * @property {string} [fromDate] + * @property {string} [toDate] + * @property {string} [dpIds] + * @property {string} [orderingCompanyId] + * @property {string} [stores] + * @property {string} [salesChannel] + * @property {string} [requestByExt] + * @property {number} [pageNo] + * @property {number} [pageSize] + * @property {string} [customerId] + * @property {boolean} [isPrioritySort] + * @property {boolean} [excludeLockedShipments] */ /** * @typedef GetPlatformShipmentReasonsParam * @property {string} action */ -/** - * @typedef GetRulesParam - * @property {OrderPlatformModel.RuleListRequestSchema} body - */ /** * @typedef GetShipmentBagReasonsParam - * @property {string} shipmentId - The unique identifier for the shipment - * @property {number} lineNumber - A unique identifier of the bag's line number. + * @property {string} shipmentId - ID of the bag. An order may contain multiple + * items and may get divided into one or more shipment, each having its own ID. + * @property {number} lineNumber - Line number of bag. */ /** * @typedef TrackShipmentPlatformParam - * @property {string} shipmentId - The unique identifier for the shipment + * @property {string} shipmentId - Shipment Id */ declare class OrderPlatformApplicationValidator { /** @returns {FailedOrderLogsParam} */ @@ -57,15 +45,13 @@ declare class OrderPlatformApplicationValidator { static getApplicationShipments(): GetApplicationShipmentsParam; /** @returns {GetPlatformShipmentReasonsParam} */ static getPlatformShipmentReasons(): GetPlatformShipmentReasonsParam; - /** @returns {GetRulesParam} */ - static getRules(): GetRulesParam; /** @returns {GetShipmentBagReasonsParam} */ static getShipmentBagReasons(): GetShipmentBagReasonsParam; /** @returns {TrackShipmentPlatformParam} */ static trackShipmentPlatform(): TrackShipmentPlatformParam; } declare namespace OrderPlatformApplicationValidator { - export { FailedOrderLogsParam, GetApplicationShipmentsParam, GetPlatformShipmentReasonsParam, GetRulesParam, GetShipmentBagReasonsParam, TrackShipmentPlatformParam }; + export { FailedOrderLogsParam, GetApplicationShipmentsParam, GetPlatformShipmentReasonsParam, GetShipmentBagReasonsParam, TrackShipmentPlatformParam }; } type FailedOrderLogsParam = { /** @@ -86,96 +72,39 @@ type FailedOrderLogsParam = { searchValue?: string; }; type GetApplicationShipmentsParam = { - /** - * - Optional parameter to specify the lane for - * filtering results. - */ lane?: string; - /** - * - Search_type refers to the field that will - * be used as the target for the search operation - */ searchType?: string; - /** - * - Identifier used for the search operation - * based on the selected search type. - */ searchId?: string; - /** - * - Date time in UTC timezone as per ISO format. - */ fromDate?: string; - /** - * - Date time in UTC timezone as per ISO format. - */ toDate?: string; - /** - * - Comma-separated list of delivery partner IDs to - * filter results. - */ dpIds?: string; - /** - * - ID of the company placing the order, - * used for filtering results. - */ orderingCompanyId?: string; - /** - * - Comma-separated list of store IDs to filter results. - */ stores?: string; - /** - * - The sales channel to filter results. - */ salesChannel?: string; - /** - * - Identifier for external requests. - */ requestByExt?: string; - /** - * - The page number for pagination of results. - */ pageNo?: number; - /** - * - The number of results to return per page for - * pagination. - */ pageSize?: number; - /** - * - ID of the customer to filter results - * related to specific customer. - */ customerId?: string; - /** - * - Flag to determine if results should be - * sorted by priority. Defaults to true. - */ isPrioritySort?: boolean; - /** - * - Flag to exclude shipments that - * are currently locked from the results. - */ excludeLockedShipments?: boolean; }; type GetPlatformShipmentReasonsParam = { action: string; }; -type GetRulesParam = { - body: OrderPlatformModel.RuleListRequestSchema; -}; type GetShipmentBagReasonsParam = { /** - * - The unique identifier for the shipment + * - ID of the bag. An order may contain multiple + * items and may get divided into one or more shipment, each having its own ID. */ shipmentId: string; /** - * - A unique identifier of the bag's line number. + * - Line number of bag. */ lineNumber: number; }; type TrackShipmentPlatformParam = { /** - * - The unique identifier for the shipment + * - Shipment Id */ shipmentId: string; }; -import OrderPlatformModel = require("./OrderPlatformModel"); diff --git a/sdk/platform/Order/OrderPlatformApplicationValidator.js b/sdk/platform/Order/OrderPlatformApplicationValidator.js index fa4352c5c..70cb9a2e8 100644 --- a/sdk/platform/Order/OrderPlatformApplicationValidator.js +++ b/sdk/platform/Order/OrderPlatformApplicationValidator.js @@ -12,30 +12,21 @@ const OrderPlatformModel = require("./OrderPlatformModel"); /** * @typedef GetApplicationShipmentsParam - * @property {string} [lane] - Optional parameter to specify the lane for - * filtering results. - * @property {string} [searchType] - Search_type refers to the field that will - * be used as the target for the search operation - * @property {string} [searchId] - Identifier used for the search operation - * based on the selected search type. - * @property {string} [fromDate] - Date time in UTC timezone as per ISO format. - * @property {string} [toDate] - Date time in UTC timezone as per ISO format. - * @property {string} [dpIds] - Comma-separated list of delivery partner IDs to - * filter results. - * @property {string} [orderingCompanyId] - ID of the company placing the order, - * used for filtering results. - * @property {string} [stores] - Comma-separated list of store IDs to filter results. - * @property {string} [salesChannel] - The sales channel to filter results. - * @property {string} [requestByExt] - Identifier for external requests. - * @property {number} [pageNo] - The page number for pagination of results. - * @property {number} [pageSize] - The number of results to return per page for - * pagination. - * @property {string} [customerId] - ID of the customer to filter results - * related to specific customer. - * @property {boolean} [isPrioritySort] - Flag to determine if results should be - * sorted by priority. Defaults to true. - * @property {boolean} [excludeLockedShipments] - Flag to exclude shipments that - * are currently locked from the results. + * @property {string} [lane] + * @property {string} [searchType] + * @property {string} [searchId] + * @property {string} [fromDate] + * @property {string} [toDate] + * @property {string} [dpIds] + * @property {string} [orderingCompanyId] + * @property {string} [stores] + * @property {string} [salesChannel] + * @property {string} [requestByExt] + * @property {number} [pageNo] + * @property {number} [pageSize] + * @property {string} [customerId] + * @property {boolean} [isPrioritySort] + * @property {boolean} [excludeLockedShipments] */ /** @@ -43,20 +34,16 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @property {string} action */ -/** - * @typedef GetRulesParam - * @property {OrderPlatformModel.RuleListRequestSchema} body - */ - /** * @typedef GetShipmentBagReasonsParam - * @property {string} shipmentId - The unique identifier for the shipment - * @property {number} lineNumber - A unique identifier of the bag's line number. + * @property {string} shipmentId - ID of the bag. An order may contain multiple + * items and may get divided into one or more shipment, each having its own ID. + * @property {number} lineNumber - Line number of bag. */ /** * @typedef TrackShipmentPlatformParam - * @property {string} shipmentId - The unique identifier for the shipment + * @property {string} shipmentId - Shipment Id */ class OrderPlatformApplicationValidator { @@ -98,13 +85,6 @@ class OrderPlatformApplicationValidator { }).required(); } - /** @returns {GetRulesParam} */ - static getRules() { - return Joi.object({ - body: OrderPlatformModel.RuleListRequestSchema().required(), - }).required(); - } - /** @returns {GetShipmentBagReasonsParam} */ static getShipmentBagReasons() { return Joi.object({ diff --git a/sdk/platform/Order/OrderPlatformClient.d.ts b/sdk/platform/Order/OrderPlatformClient.d.ts index 5f434a90d..01a5dda6c 100644 --- a/sdk/platform/Order/OrderPlatformClient.d.ts +++ b/sdk/platform/Order/OrderPlatformClient.d.ts @@ -6,46 +6,43 @@ declare class Order { * @param {OrderPlatformValidator.AddStateManagerConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name addStateManagerConfig * @summary: Allows esm config updation * @description: Update ESM config - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/addStateManagerConfig/). */ - addStateManagerConfig({ body, requestHeaders }?: OrderPlatformValidator.AddStateManagerConfigParam, { responseHeaders }?: object): Promise; + addStateManagerConfig({ body, requestHeaders }?: OrderPlatformValidator.AddStateManagerConfigParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.AttachOrderUserParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name attachOrderUser * @summary: Attach order to a user * @description: Attach an anonymous order to a customer based on OTP verification - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/attachOrderUser/). */ - attachOrderUser({ body, requestHeaders }?: OrderPlatformValidator.AttachOrderUserParam, { responseHeaders }?: object): Promise; + attachOrderUser({ body, requestHeaders }?: OrderPlatformValidator.AttachOrderUserParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.BulkListingParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name bulkListing * @summary: Lists bulk operations * @description: Get list of bulk operation that is initiated and completed as per the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkListing/). */ - bulkListing({ pageSize, pageNo, startDate, endDate, status, bulkActionType, searchKey, requestHeaders, }?: OrderPlatformValidator.BulkListingParam, { responseHeaders }?: object): Promise; + bulkListing({ pageSize, pageNo, startDate, endDate, status, bulkActionType, searchKey, requestHeaders, }?: OrderPlatformValidator.BulkListingParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.BulkStateTransistionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name bulkStateTransistion * @summary: Upload bulk state transitions file * @description: Performs state transisiton in bulk using the CSV or excel file for the given shipments. The bulk transition CSV or excel template can be downloaded using the seller template download method. Current supported format is excel and CSV. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkStateTransistion/). */ - bulkStateTransistion({ body, requestHeaders }?: OrderPlatformValidator.BulkStateTransistionParam, { responseHeaders }?: object): Promise; + bulkStateTransistion({ body, requestHeaders }?: OrderPlatformValidator.BulkStateTransistionParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.CheckOrderStatusParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -56,71 +53,57 @@ declare class Order { * @description: Used to verify the status of order. It queries error logs, resyncs the shipments if there was an issue with sync etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/checkOrderStatus/). */ checkOrderStatus({ body, requestHeaders }?: OrderPlatformValidator.CheckOrderStatusParam, { responseHeaders }?: object): Promise; - /** - * @param {OrderPlatformValidator.CreateChannelConfigParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name createChannelConfig - * @summary: Create channel configuration - * @description: Set up configuration for a channel specific to orders which has implications over how the order fulfilment happens in a channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createChannelConfig/). - */ - createChannelConfig({ body, requestHeaders }?: OrderPlatformValidator.CreateChannelConfigParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.CreateOrderParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createOrder * @summary: Create order * @description: Creates an order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createOrder/). */ - createOrder({ body, requestHeaders }?: OrderPlatformValidator.CreateOrderParam, { responseHeaders }?: object): Promise; + createOrder({ body, requestHeaders }?: OrderPlatformValidator.CreateOrderParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.DispatchManifestsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name dispatchManifests * @summary: Dispatch manifest * @description: Updates the status of the manifest to processed and change the status of the shipments in the manifest to dispatch status - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifests/). */ - dispatchManifests({ body, requestHeaders }?: OrderPlatformValidator.DispatchManifestsParam, { responseHeaders }?: object): Promise; + dispatchManifests({ body, requestHeaders }?: OrderPlatformValidator.DispatchManifestsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.DownloadBulkActionTemplateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name downloadBulkActionTemplate * @summary: Download bulk template * @description: Download bulk seller templates which can be used to perform operations in bulk - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadBulkActionTemplate/). */ - downloadBulkActionTemplate({ templateSlug, requestHeaders }?: OrderPlatformValidator.DownloadBulkActionTemplateParam, { responseHeaders }?: object): Promise; + downloadBulkActionTemplate({ templateSlug, requestHeaders }?: OrderPlatformValidator.DownloadBulkActionTemplateParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.DownloadLanesReportParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name downloadLanesReport * @summary: Download Lane report * @description: Downloads shipments/orders present in the provided lane - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadLanesReport/). */ - downloadLanesReport({ body, requestHeaders }?: OrderPlatformValidator.DownloadLanesReportParam, { responseHeaders }?: object): Promise; + downloadLanesReport({ body, requestHeaders }?: OrderPlatformValidator.DownloadLanesReportParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.EInvoiceRetryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name eInvoiceRetry * @summary: Retry E-invoice * @description: Reattempt the generation of an E-invoice - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/eInvoiceRetry/). */ - eInvoiceRetry({ body, requestHeaders }?: OrderPlatformValidator.EInvoiceRetryParam, { responseHeaders }?: object): Promise; + eInvoiceRetry({ body, requestHeaders }?: OrderPlatformValidator.EInvoiceRetryParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.FailedOrderLogDetailsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -146,35 +129,33 @@ declare class Order { * @param {OrderPlatformValidator.GenerateInvoiceIDParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name generateInvoiceID * @summary: Generate and attach invoice Id * @description: Generate and attach Invoice Ids against shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateInvoiceID/). */ - generateInvoiceID({ invoiceType, body, requestHeaders }?: OrderPlatformValidator.GenerateInvoiceIDParam, { responseHeaders }?: object): Promise; + generateInvoiceID({ invoiceType, body, requestHeaders }?: OrderPlatformValidator.GenerateInvoiceIDParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name generatePOSReceiptByOrderId * @summary: Generate POS receipt by order Id * @description: Create a point-of-sale (POS) receipt for a specific order by order Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generatePOSReceiptByOrderId/). */ - generatePOSReceiptByOrderId({ orderId, shipmentId, documentType, requestHeaders }?: OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam, { responseHeaders }?: object): Promise; + generatePOSReceiptByOrderId({ orderId, shipmentId, documentType, requestHeaders }?: OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GenerateProcessManifestParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name generateProcessManifest * @summary: Process Order Manifest * @description: Endpoint to save and process order manifests. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateProcessManifest/). */ - generateProcessManifest({ body, requestHeaders }?: OrderPlatformValidator.GenerateProcessManifestParam, { responseHeaders }?: object): Promise; + generateProcessManifest({ body, requestHeaders }?: OrderPlatformValidator.GenerateProcessManifestParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetAllowedStateTransitionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -190,99 +171,84 @@ declare class Order { * @param {OrderPlatformValidator.GetAllowedTemplatesForBulkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAllowedTemplatesForBulk * @summary: List bulk operation templates * @description: Gets all the allowed templates to perform bulk operations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedTemplatesForBulk/). */ - getAllowedTemplatesForBulk({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getAllowedTemplatesForBulk({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAnnouncements * @summary: List announcements * @description: Retrieve announcements related to orders fulfilment configured by platform or company admin - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAnnouncements/). */ - getAnnouncements({ date, requestHeaders }?: OrderPlatformValidator.GetAnnouncementsParam, { responseHeaders }?: object): Promise; + getAnnouncements({ date, requestHeaders }?: OrderPlatformValidator.GetAnnouncementsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getBagById * @summary: Get bag * @description: Retrieve detailed information about a specific bag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/). */ - getBagById({ bagId, channelBagId, channelId, requestHeaders }?: OrderPlatformValidator.GetBagByIdParam, { responseHeaders }?: object): Promise; + getBagById({ bagId, channelBagId, channelId, requestHeaders }?: OrderPlatformValidator.GetBagByIdParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetBagsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getBags * @summary: List bags * @description: Get paginated list of bags based on provided filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBags/). */ - getBags({ bagIds, shipmentIds, orderIds, channelBagIds, channelShipmentIds, channelOrderIds, channelId, pageNo, pageSize, requestHeaders, }?: OrderPlatformValidator.GetBagsParam, { responseHeaders }?: object): Promise; + getBags({ bagIds, shipmentIds, orderIds, channelBagIds, channelShipmentIds, channelOrderIds, channelId, pageNo, pageSize, requestHeaders, }?: OrderPlatformValidator.GetBagsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetBulkActionTemplateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getBulkActionTemplate * @summary: List supported templates * @description: Get list of templates so that users can download the required template - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkActionTemplate/). */ - getBulkActionTemplate({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getBulkActionTemplate({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetBulkShipmentExcelFileParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBulkShipmentExcelFile * @summary: Generate the report * @description: Generates the report which can be filled and uploaded to perform the bulk operation based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkShipmentExcelFile/). */ - getBulkShipmentExcelFile({ salesChannels, dpIds, startDate, endDate, stores, tags, bagStatus, paymentMethods, fileType, timeToDispatch, pageNo, pageSize, requestHeaders, }?: OrderPlatformValidator.GetBulkShipmentExcelFileParam, { responseHeaders }?: object): Promise; - /** - * @param {OrderPlatformValidator.GetChannelConfigParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getChannelConfig - * @summary: Get channel configuration - * @description: Retrieve configuration settings specific to orders for a channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getChannelConfig/). - */ - getChannelConfig({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getBulkShipmentExcelFile({ salesChannels, dpIds, startDate, endDate, stores, tags, bagStatus, paymentMethods, fileType, timeToDispatch, pageNo, pageSize, requestHeaders, }?: OrderPlatformValidator.GetBulkShipmentExcelFileParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetFileByStatusParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getFileByStatus * @summary: Download file used for Bulk operation * @description: Get the file download URL used for performing bulk operation - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getFileByStatus/). */ - getFileByStatus({ batchId, status, fileType, reportType, requestHeaders }?: OrderPlatformValidator.GetFileByStatusParam, { responseHeaders }?: object): Promise; + getFileByStatus({ batchId, status, fileType, reportType, requestHeaders }?: OrderPlatformValidator.GetFileByStatusParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getLaneConfig * @summary: Get lane configuration * @description: Get configuration settings for lanes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/). */ - getLaneConfig({ superLane, groupEntity, fromDate, toDate, startDate, endDate, dpIds, stores, salesChannels, paymentMode, bagStatus, searchType, searchValue, tags, timeToDispatch, paymentMethods, myOrders, showCrossCompanyData, orderType, requestHeaders, }?: OrderPlatformValidator.GetLaneConfigParam, { responseHeaders }?: object): Promise; + getLaneConfig({ superLane, groupEntity, fromDate, toDate, startDate, endDate, dpIds, stores, salesChannels, paymentMode, bagStatus, searchType, searchValue, tags, timeToDispatch, paymentMethods, myOrders, showCrossCompanyData, orderType, requestHeaders, }?: OrderPlatformValidator.GetLaneConfigParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetManifestDetailsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -307,13 +273,12 @@ declare class Order { * @param {OrderPlatformValidator.GetManifestfiltersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getManifestfilters * @summary: List filters * @description: Get supported filter for listing manifests - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestfilters/). */ - getManifestfilters({ view, requestHeaders }?: OrderPlatformValidator.GetManifestfiltersParam, { responseHeaders }?: object): Promise; + getManifestfilters({ view, requestHeaders }?: OrderPlatformValidator.GetManifestfiltersParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetManifestsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -328,80 +293,75 @@ declare class Order { * @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getOrderById * @summary: Get order * @description: Get detailed information about a specific order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/). */ - getOrderById({ orderId, myOrders, allowInactive, requestHeaders }?: OrderPlatformValidator.GetOrderByIdParam, { responseHeaders }?: object): Promise; + getOrderById({ orderId, myOrders, allowInactive, requestHeaders }?: OrderPlatformValidator.GetOrderByIdParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetOrdersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getOrders * @summary: List orders - * @description: Get a list of orders based on the filters provided. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/). + * @description: Get a list of orders based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/). */ - getOrders({ lane, searchType, bagStatus, timeToDispatch, paymentMethods, tags, searchValue, fromDate, toDate, startDate, endDate, dpIds, stores, salesChannels, pageNo, pageSize, isPrioritySort, customMeta, myOrders, showCrossCompanyData, customerId, orderType, allowInactive, groupEntity, enforceDateFilter, requestHeaders, }?: OrderPlatformValidator.GetOrdersParam, { responseHeaders }?: object): Promise; + getOrders({ lane, searchType, bagStatus, timeToDispatch, paymentMethods, tags, searchValue, fromDate, toDate, startDate, endDate, dpIds, stores, salesChannels, pageNo, pageSize, isPrioritySort, customMeta, myOrders, showCrossCompanyData, customerId, orderType, allowInactive, enforceDateFilter, requestHeaders, }?: OrderPlatformValidator.GetOrdersParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getRoleBasedActions * @summary: Get role-based actions * @description: Retrieve permissible actions based on user roles such as company_admin, company_operation, customer_care, and read_only. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRoleBasedActions/). */ - getRoleBasedActions({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getRoleBasedActions({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getShipmentById - * @summary: Get shipment details + * @summary: Get shipment * @description: Get detailed information about a specific shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/). */ - getShipmentById({ channelShipmentId, shipmentId, fetchActiveShipment, allowInactive, requestHeaders, }?: OrderPlatformValidator.GetShipmentByIdParam, { responseHeaders }?: object): Promise; + getShipmentById({ channelShipmentId, shipmentId, fetchActiveShipment, allowInactive, requestHeaders, }?: OrderPlatformValidator.GetShipmentByIdParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetShipmentHistoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getShipmentHistory * @summary: Get a shipment's history * @description: Get the history of the shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/). */ - getShipmentHistory({ shipmentId, bagId, requestHeaders }?: OrderPlatformValidator.GetShipmentHistoryParam, { responseHeaders }?: object): Promise; + getShipmentHistory({ shipmentId, bagId, requestHeaders }?: OrderPlatformValidator.GetShipmentHistoryParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetShipmentReasonsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getShipmentReasons * @summary: List bag cancellation reasons * @description: Get reasons to perform full or partial cancellation of a bag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentReasons/). */ - getShipmentReasons({ shipmentId, bagId, state, requestHeaders }?: OrderPlatformValidator.GetShipmentReasonsParam, { responseHeaders }?: object): Promise; + getShipmentReasons({ shipmentId, bagId, state, requestHeaders }?: OrderPlatformValidator.GetShipmentReasonsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetShipmentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getShipments * @summary: List shipments * @description: Get a list of shipments based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipments/). */ - getShipments({ lane, bagStatus, statusOverrideLane, timeToDispatch, searchType, searchValue, fromDate, toDate, startDate, endDate, dpIds, stores, salesChannels, pageNo, pageSize, fetchActiveShipment, allowInactive, excludeLockedShipments, paymentMethods, channelShipmentId, channelOrderId, customMeta, orderingChannel, companyAffiliateTag, myOrders, platformUserId, sortType, showCrossCompanyData, tags, customerId, orderType, groupEntity, enforceDateFilter, requestHeaders, }?: OrderPlatformValidator.GetShipmentsParam, { responseHeaders }?: object): Promise; + getShipments({ lane, bagStatus, statusOverrideLane, timeToDispatch, searchType, searchValue, fromDate, toDate, startDate, endDate, dpIds, stores, salesChannels, pageNo, pageSize, fetchActiveShipment, allowInactive, excludeLockedShipments, paymentMethods, channelShipmentId, channelOrderId, customMeta, orderingChannel, companyAffiliateTag, myOrders, platformUserId, sortType, showCrossCompanyData, tags, customerId, orderType, enforceDateFilter, requestHeaders, }?: OrderPlatformValidator.GetShipmentsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetStateManagerConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -428,45 +388,43 @@ declare class Order { * @param {OrderPlatformValidator.GetTemplateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getTemplate * @summary: Download bulk operation templates * @description: Get the excel or CSV file URL for the template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getTemplate/). */ - getTemplate({ templateName, requestHeaders }?: OrderPlatformValidator.GetTemplateParam, { responseHeaders }?: object): Promise; + getTemplate({ templateName, requestHeaders }?: OrderPlatformValidator.GetTemplateParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetfiltersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getfilters * @summary: List filters * @description: Get supported filters for various listing operations - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getfilters/). */ - getfilters({ view, groupEntity, requestHeaders }?: OrderPlatformValidator.GetfiltersParam, { responseHeaders }?: object): Promise; + getfilters({ view, groupEntity, requestHeaders }?: OrderPlatformValidator.GetfiltersParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.InvalidateShipmentCacheParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name invalidateShipmentCache * @summary: Invalidate shipment cache * @description: Clear the existing shipment cache data stored in Redis and serialize the updated data for subsequent use. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/invalidateShipmentCache/). */ - invalidateShipmentCache({ body, requestHeaders }?: OrderPlatformValidator.InvalidateShipmentCacheParam, { responseHeaders }?: object): Promise; + invalidateShipmentCache({ body, requestHeaders }?: OrderPlatformValidator.InvalidateShipmentCacheParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.JobDetailsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name jobDetails * @summary: Get bulk operation details * @description: Fetches details of the job for the provided batch Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/jobDetails/). */ - jobDetails({ batchId, requestHeaders }?: OrderPlatformValidator.JobDetailsParam, { responseHeaders }?: object): Promise; + jobDetails({ batchId, requestHeaders }?: OrderPlatformValidator.JobDetailsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.OrderUpdateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -481,101 +439,86 @@ declare class Order { * @param {OrderPlatformValidator.PostShipmentHistoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name postShipmentHistory * @summary: Create shipment history * @description: Used to add logs in history for a bag for the provided Shipment ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postShipmentHistory/). */ - postShipmentHistory({ body, requestHeaders }?: OrderPlatformValidator.PostShipmentHistoryParam, { responseHeaders }?: object): Promise; + postShipmentHistory({ body, requestHeaders }?: OrderPlatformValidator.PostShipmentHistoryParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.ReassignLocationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name reassignLocation * @summary: Reassign location * @description: Reassign the shipment to a another location and update its status to 'Store Reassigned.' - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/reassignLocation/). */ - reassignLocation({ body, requestHeaders }?: OrderPlatformValidator.ReassignLocationParam, { responseHeaders }?: object): Promise; + reassignLocation({ body, requestHeaders }?: OrderPlatformValidator.ReassignLocationParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.SendSmsNinjaParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name sendSmsNinja * @summary: Send SMS * @description: Send SMS to customer based on the template that is selected - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendSmsNinja/). */ - sendSmsNinja({ body, requestHeaders }?: OrderPlatformValidator.SendSmsNinjaParam, { responseHeaders }?: object): Promise; + sendSmsNinja({ body, requestHeaders }?: OrderPlatformValidator.SendSmsNinjaParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.SendUserMobileOTPParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name sendUserMobileOTP * @summary: Send user mobile OTP * @description: Send a one-time OTP to a customer mobile number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendUserMobileOTP/). */ - sendUserMobileOTP({ body, requestHeaders }?: OrderPlatformValidator.SendUserMobileOTPParam, { responseHeaders }?: object): Promise; + sendUserMobileOTP({ body, requestHeaders }?: OrderPlatformValidator.SendUserMobileOTPParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.TrackShipmentParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name trackShipment * @summary: Track shipment * @description: Retrieve courier partner tracking details for a given shipment Id or AWB number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/trackShipment/). */ - trackShipment({ shipmentId, awb, pageNo, pageSize, requestHeaders }?: OrderPlatformValidator.TrackShipmentParam, { responseHeaders }?: object): Promise; + trackShipment({ shipmentId, awb, pageNo, pageSize, requestHeaders }?: OrderPlatformValidator.TrackShipmentParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.UpdateAddressParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateAddress * @summary: Update shipment address - * @description: Update the address details of an existing shipment based on the provided address_category. This operation allows the modification of critical shipment details, potentially affecting delivery/billing accuracy and customer communication. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateAddress/). + * @description: Modify the address details of an existing shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateAddress/). */ - updateAddress({ shipmentId, body, requestHeaders }?: OrderPlatformValidator.UpdateAddressParam, { responseHeaders }?: object): Promise; + updateAddress({ shipmentId, addressCategory, name, address, addressType, pincode, phone, email, landmark, city, state, country, requestHeaders, }?: OrderPlatformValidator.UpdateAddressParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.UpdatePackagingDimensionsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updatePackagingDimensions * @summary: Update packaging dimensions * @description: Used to modify the packaging dimension of a shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updatePackagingDimensions/). */ - updatePackagingDimensions({ body, requestHeaders }?: OrderPlatformValidator.UpdatePackagingDimensionsParam, { responseHeaders }?: object): Promise; - /** - * @param {OrderPlatformValidator.UpdatePaymentInfoParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name updatePaymentInfo - * @summary: Update payment details for an order, its shipments and its bags. - * @description: Updates the payment mode for an order, its shipments and its bags. This endpoint allows for modifying payment methods, and associated details but not amount. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updatePaymentInfo/). - */ - updatePaymentInfo({ body, requestHeaders }?: OrderPlatformValidator.UpdatePaymentInfoParam, { responseHeaders }?: object): Promise; + updatePackagingDimensions({ body, requestHeaders }?: OrderPlatformValidator.UpdatePackagingDimensionsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.UpdateShipmentLockParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name updateShipmentLock * @summary: Update a shipment lock * @description: Modify shipment/bag lock status and update lock/unlock messages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentLock/). */ - updateShipmentLock({ body, requestHeaders }?: OrderPlatformValidator.UpdateShipmentLockParam, { responseHeaders }?: object): Promise; + updateShipmentLock({ body, requestHeaders }?: OrderPlatformValidator.UpdateShipmentLockParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.UpdateShipmentStatusParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -603,22 +546,22 @@ declare class Order { * @param {OrderPlatformValidator.UploadConsentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name uploadConsents * @summary: Upload consent * @description: Uploads the consent signed by courier partner and seller to keep records - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/uploadConsents/). */ - uploadConsents({ body, requestHeaders }?: OrderPlatformValidator.UploadConsentsParam, { responseHeaders }?: object): Promise; + uploadConsents({ body, requestHeaders }?: OrderPlatformValidator.UploadConsentsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.VerifyMobileOTPParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyMobileOTP * @summary: Verify mobile OTP * @description: Perform OTP verification to link a user to an anonymous order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/verifyMobileOTP/). */ - verifyMobileOTP({ body, requestHeaders }?: OrderPlatformValidator.VerifyMobileOTPParam, { responseHeaders }?: object): Promise; + verifyMobileOTP({ body, requestHeaders }?: OrderPlatformValidator.VerifyMobileOTPParam, { responseHeaders }?: object): Promise; } import OrderPlatformValidator = require("./OrderPlatformValidator"); import OrderPlatformModel = require("./OrderPlatformModel"); diff --git a/sdk/platform/Order/OrderPlatformClient.js b/sdk/platform/Order/OrderPlatformClient.js index eb035cfeb..235361718 100644 --- a/sdk/platform/Order/OrderPlatformClient.js +++ b/sdk/platform/Order/OrderPlatformClient.js @@ -18,8 +18,7 @@ class Order { * @param {OrderPlatformValidator.AddStateManagerConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name addStateManagerConfig * @summary: Allows esm config updation * @description: Update ESM config - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/addStateManagerConfig/). @@ -75,10 +74,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.ConfigUpdatedResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.ConfigUpdatedResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -98,8 +97,7 @@ class Order { * @param {OrderPlatformValidator.AttachOrderUserParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name attachOrderUser * @summary: Attach order to a user * @description: Attach an anonymous order to a customer based on OTP verification - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/attachOrderUser/). @@ -155,10 +153,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.AttachOrderUserResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.AttachOrderUserResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -178,7 +176,7 @@ class Order { * @param {OrderPlatformValidator.BulkListingParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name bulkListing * @summary: Lists bulk operations * @description: Get list of bulk operation that is initiated and completed as per the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkListing/). @@ -260,7 +258,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.BulkListingResponseSchema().validate(responseData, { + } = OrderPlatformModel.BulkListingResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -283,9 +281,8 @@ class Order { * @param {OrderPlatformValidator.BulkStateTransistionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name bulkStateTransistion * @summary: Upload bulk state transitions file * @description: Performs state transisiton in bulk using the CSV or excel file for the given shipments. The bulk transition CSV or excel template can be downloaded using the seller template download method. Current supported format is excel and CSV. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkStateTransistion/). @@ -341,7 +338,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.BulkStateTransistionResponseSchema().validate( + } = OrderPlatformModel.BulkStateTransistionResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -439,92 +436,11 @@ class Order { return response; } - /** - * @param {OrderPlatformValidator.CreateChannelConfigParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name createChannelConfig - * @summary: Create channel configuration - * @description: Set up configuration for a channel specific to orders which has implications over how the order fulfilment happens in a channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createChannelConfig/). - */ - async createChannelConfig( - { body, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = OrderPlatformValidator.createChannelConfig().validate( - { - body, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = OrderPlatformValidator.createChannelConfig().validate( - { - body, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > Order > createChannelConfig \n ${warrning}`, - }); - } - - const query_params = {}; - - const xHeaders = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "post", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`, - query_params, - body, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = OrderPlatformModel.CreateChannelConfigResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > Order > createChannelConfig \n ${res_error}`, - }); - } - } - - return response; - } - /** * @param {OrderPlatformValidator.CreateOrderParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createOrder * @summary: Create order * @description: Creates an order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/createOrder/). @@ -578,7 +494,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.CreateOrderResponseSchema().validate(responseData, { + } = OrderPlatformModel.CreateOrderResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -601,7 +517,7 @@ class Order { * @param {OrderPlatformValidator.DispatchManifestsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name dispatchManifests * @summary: Dispatch manifest * @description: Updates the status of the manifest to processed and change the status of the shipments in the manifest to dispatch status - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifests/). @@ -657,7 +573,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.SuccessResponseSchema().validate(responseData, { + } = OrderPlatformModel.SuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -680,7 +596,7 @@ class Order { * @param {OrderPlatformValidator.DownloadBulkActionTemplateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name downloadBulkActionTemplate * @summary: Download bulk template * @description: Download bulk seller templates which can be used to perform operations in bulk - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadBulkActionTemplate/). @@ -739,7 +655,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.FileResponseSchema().validate(responseData, { + } = OrderPlatformModel.FileResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -762,9 +678,8 @@ class Order { * @param {OrderPlatformValidator.DownloadLanesReportParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name downloadLanesReport * @summary: Download Lane report * @description: Downloads shipments/orders present in the provided lane - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/downloadLanesReport/). @@ -820,7 +735,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.BulkReportsDownloadResponseSchema().validate( + } = OrderPlatformModel.BulkReportsDownloadResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -843,8 +758,7 @@ class Order { * @param {OrderPlatformValidator.EInvoiceRetryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name eInvoiceRetry * @summary: Retry E-invoice * @description: Reattempt the generation of an E-invoice - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/eInvoiceRetry/). @@ -898,10 +812,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.EInvoiceRetryResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.EInvoiceRetryResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1080,8 +994,7 @@ class Order { * @param {OrderPlatformValidator.GenerateInvoiceIDParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name generateInvoiceID * @summary: Generate and attach invoice Id * @description: Generate and attach Invoice Ids against shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateInvoiceID/). @@ -1139,10 +1052,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.GenerateInvoiceIDResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.GenerateInvoiceIDResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1162,9 +1075,8 @@ class Order { * @param {OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name generatePOSReceiptByOrderId * @summary: Generate POS receipt by order Id * @description: Create a point-of-sale (POS) receipt for a specific order by order Id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generatePOSReceiptByOrderId/). @@ -1230,7 +1142,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.GeneratePosOrderReceiptResponseSchema().validate( + } = OrderPlatformModel.GeneratePosOrderReceiptResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1253,7 +1165,7 @@ class Order { * @param {OrderPlatformValidator.GenerateProcessManifestParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name generateProcessManifest * @summary: Process Order Manifest * @description: Endpoint to save and process order manifests. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateProcessManifest/). @@ -1309,7 +1221,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.ManifestResponseSchema().validate(responseData, { + } = OrderPlatformModel.ManifestResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1418,8 +1330,7 @@ class Order { * @param {OrderPlatformValidator.GetAllowedTemplatesForBulkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAllowedTemplatesForBulk * @summary: List bulk operation templates * @description: Gets all the allowed templates to perform bulk operations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedTemplatesForBulk/). @@ -1473,10 +1384,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.AllowedTemplatesResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.AllowedTemplatesResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1496,8 +1407,7 @@ class Order { * @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getAnnouncements * @summary: List announcements * @description: Retrieve announcements related to orders fulfilment configured by platform or company admin - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAnnouncements/). @@ -1554,10 +1464,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.AnnouncementsResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.AnnouncementsResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1577,9 +1487,8 @@ class Order { * @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getBagById * @summary: Get bag * @description: Retrieve detailed information about a specific bag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/). @@ -1640,10 +1549,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.BagDetailsPlatformResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.BagDetailsPlatformResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1663,8 +1572,7 @@ class Order { * @param {OrderPlatformValidator.GetBagsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getBags * @summary: List bags * @description: Get paginated list of bags based on provided filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBags/). @@ -1754,10 +1662,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.GetBagsPlatformResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.GetBagsPlatformResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1777,9 +1685,8 @@ class Order { * @param {OrderPlatformValidator.GetBulkActionTemplateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getBulkActionTemplate * @summary: List supported templates * @description: Get list of templates so that users can download the required template - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkActionTemplate/). @@ -1831,10 +1738,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.BulkActionTemplateResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.BulkActionTemplateResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1854,7 +1761,7 @@ class Order { * @param {OrderPlatformValidator.GetBulkShipmentExcelFileParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBulkShipmentExcelFile * @summary: Generate the report * @description: Generates the report which can be filled and uploaded to perform the bulk operation based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkShipmentExcelFile/). @@ -1960,7 +1867,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.FileResponseSchema().validate(responseData, { + } = OrderPlatformModel.FileResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1979,86 +1886,11 @@ class Order { return response; } - /** - * @param {OrderPlatformValidator.GetChannelConfigParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getChannelConfig - * @summary: Get channel configuration - * @description: Retrieve configuration settings specific to orders for a channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getChannelConfig/). - */ - async getChannelConfig( - { requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = OrderPlatformValidator.getChannelConfig().validate( - {}, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = OrderPlatformValidator.getChannelConfig().validate( - {}, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > Order > getChannelConfig \n ${warrning}`, - }); - } - - const query_params = {}; - - const xHeaders = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "get", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/order-config`, - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = OrderPlatformModel.CreateChannelConfigData().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > Order > getChannelConfig \n ${res_error}`, - }); - } - } - - return response; - } - /** * @param {OrderPlatformValidator.GetFileByStatusParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getFileByStatus * @summary: Download file used for Bulk operation * @description: Get the file download URL used for performing bulk operation - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getFileByStatus/). @@ -2125,7 +1957,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.JobFailedResponseSchema().validate(responseData, { + } = OrderPlatformModel.JobFailedResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2148,7 +1980,7 @@ class Order { * @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getLaneConfig * @summary: Get lane configuration * @description: Get configuration settings for lanes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/). @@ -2278,7 +2110,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.LaneConfigResponseSchema().validate(responseData, { + } = OrderPlatformModel.LaneConfigResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2523,8 +2355,7 @@ class Order { * @param {OrderPlatformValidator.GetManifestfiltersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getManifestfilters * @summary: List filters * @description: Get supported filter for listing manifests - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestfilters/). @@ -2581,10 +2412,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.ManifestFiltersResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.ManifestFiltersResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2717,8 +2548,7 @@ class Order { * @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getOrderById * @summary: Get order * @description: Get detailed information about a specific order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/). @@ -2781,7 +2611,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.OrderDetailsResponseSchema().validate(responseData, { + } = OrderPlatformModel.OrderDetailsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2804,11 +2634,10 @@ class Order { * @param {OrderPlatformValidator.GetOrdersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getOrders * @summary: List orders - * @description: Get a list of orders based on the filters provided. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/). + * @description: Get a list of orders based on the filters provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/). */ async getOrders( { @@ -2835,7 +2664,6 @@ class Order { customerId, orderType, allowInactive, - groupEntity, enforceDateFilter, requestHeaders, } = { requestHeaders: {} }, @@ -2866,7 +2694,6 @@ class Order { customerId, orderType, allowInactive, - groupEntity, enforceDateFilter, }, { abortEarly: false, allowUnknown: true } @@ -2901,7 +2728,6 @@ class Order { customerId, orderType, allowInactive, - groupEntity, enforceDateFilter, }, { abortEarly: false, allowUnknown: false } @@ -2937,7 +2763,6 @@ class Order { query_params["customer_id"] = customerId; query_params["order_type"] = orderType; query_params["allow_inactive"] = allowInactive; - query_params["group_entity"] = groupEntity; query_params["enforce_date_filter"] = enforceDateFilter; const xHeaders = {}; @@ -2959,7 +2784,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.OrderListingResponseSchema().validate(responseData, { + } = OrderPlatformModel.OrderListingResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2982,7 +2807,7 @@ class Order { * @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getRoleBasedActions * @summary: Get role-based actions * @description: Retrieve permissible actions based on user roles such as company_admin, company_operation, customer_care, and read_only. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRoleBasedActions/). @@ -3034,7 +2859,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.GetActionsResponseSchema().validate(responseData, { + } = OrderPlatformModel.GetActionsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3057,10 +2882,9 @@ class Order { * @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getShipmentById - * @summary: Get shipment details + * @summary: Get shipment * @description: Get detailed information about a specific shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/). */ async getShipmentById( @@ -3130,7 +2954,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.ShipmentInfoResponseSchema().validate(responseData, { + } = OrderPlatformModel.ShipmentInfoResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3153,8 +2977,7 @@ class Order { * @param {OrderPlatformValidator.GetShipmentHistoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getShipmentHistory * @summary: Get a shipment's history * @description: Get the history of the shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/). @@ -3214,10 +3037,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.ShipmentHistoryResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.ShipmentHistoryResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -3237,9 +3060,8 @@ class Order { * @param {OrderPlatformValidator.GetShipmentReasonsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name getShipmentReasons * @summary: List bag cancellation reasons * @description: Get reasons to perform full or partial cancellation of a bag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentReasons/). @@ -3299,7 +3121,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.PlatformShipmentReasonsResponseSchema().validate( + } = OrderPlatformModel.PlatformShipmentReasonsResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3322,7 +3144,7 @@ class Order { * @param {OrderPlatformValidator.GetShipmentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getShipments @@ -3362,7 +3184,6 @@ class Order { tags, customerId, orderType, - groupEntity, enforceDateFilter, requestHeaders, } = { requestHeaders: {} }, @@ -3401,7 +3222,6 @@ class Order { tags, customerId, orderType, - groupEntity, enforceDateFilter, }, { abortEarly: false, allowUnknown: true } @@ -3444,7 +3264,6 @@ class Order { tags, customerId, orderType, - groupEntity, enforceDateFilter, }, { abortEarly: false, allowUnknown: false } @@ -3488,7 +3307,6 @@ class Order { query_params["tags"] = tags; query_params["customer_id"] = customerId; query_params["order_type"] = orderType; - query_params["group_entity"] = groupEntity; query_params["enforce_date_filter"] = enforceDateFilter; const xHeaders = {}; @@ -3510,7 +3328,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.ShipmentInternalPlatformViewResponseSchema().validate( + } = OrderPlatformModel.ShipmentInternalPlatformViewResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3694,8 +3512,7 @@ class Order { * @param {OrderPlatformValidator.GetTemplateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name getTemplate * @summary: Download bulk operation templates * @description: Get the excel or CSV file URL for the template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getTemplate/). @@ -3749,10 +3566,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.TemplateDownloadResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.TemplateDownloadResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -3772,7 +3589,7 @@ class Order { * @param {OrderPlatformValidator.GetfiltersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getfilters * @summary: List filters * @description: Get supported filters for various listing operations - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getfilters/). @@ -3830,7 +3647,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.FiltersResponseSchema().validate(responseData, { + } = OrderPlatformModel.FiltersResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3853,9 +3670,8 @@ class Order { * @param {OrderPlatformValidator.InvalidateShipmentCacheParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name invalidateShipmentCache * @summary: Invalidate shipment cache * @description: Clear the existing shipment cache data stored in Redis and serialize the updated data for subsequent use. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/invalidateShipmentCache/). @@ -3911,7 +3727,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.InvalidateShipmentCacheResponseSchema().validate( + } = OrderPlatformModel.InvalidateShipmentCacheResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3934,7 +3750,7 @@ class Order { * @param {OrderPlatformValidator.JobDetailsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name jobDetails * @summary: Get bulk operation details * @description: Fetches details of the job for the provided batch Id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/jobDetails/). @@ -3988,7 +3804,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.JobDetailsResponseSchema().validate(responseData, { + } = OrderPlatformModel.JobDetailsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4088,8 +3904,7 @@ class Order { * @param {OrderPlatformValidator.PostShipmentHistoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name postShipmentHistory * @summary: Create shipment history * @description: Used to add logs in history for a bag for the provided Shipment ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/postShipmentHistory/). @@ -4145,10 +3960,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.ShipmentHistoryResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.ShipmentHistoryResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4168,8 +3983,7 @@ class Order { * @param {OrderPlatformValidator.ReassignLocationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name reassignLocation * @summary: Reassign location * @description: Reassign the shipment to a another location and update its status to 'Store Reassigned.' - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/reassignLocation/). @@ -4225,10 +4039,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.StoreReassignResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.StoreReassignResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4248,7 +4062,7 @@ class Order { * @param {OrderPlatformValidator.SendSmsNinjaParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name sendSmsNinja * @summary: Send SMS * @description: Send SMS to customer based on the template that is selected - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendSmsNinja/). @@ -4302,7 +4116,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.BaseResponseSchema().validate(responseData, { + } = OrderPlatformModel.BaseResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4325,8 +4139,7 @@ class Order { * @param {OrderPlatformValidator.SendUserMobileOTPParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name sendUserMobileOTP * @summary: Send user mobile OTP * @description: Send a one-time OTP to a customer mobile number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/sendUserMobileOTP/). @@ -4382,10 +4195,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.SendUserMobileOtpResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.SendUserMobileOtpResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4405,9 +4218,8 @@ class Order { * @param {OrderPlatformValidator.TrackShipmentParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name trackShipment * @summary: Track shipment * @description: Retrieve courier partner tracking details for a given shipment Id or AWB number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/trackShipment/). @@ -4473,7 +4285,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.CourierPartnerTrackingResponseSchema().validate( + } = OrderPlatformModel.CourierPartnerTrackingResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -4496,19 +4308,44 @@ class Order { * @param {OrderPlatformValidator.UpdateAddressParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateAddress * @summary: Update shipment address - * @description: Update the address details of an existing shipment based on the provided address_category. This operation allows the modification of critical shipment details, potentially affecting delivery/billing accuracy and customer communication. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateAddress/). + * @description: Modify the address details of an existing shipment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateAddress/). */ async updateAddress( - { shipmentId, body, requestHeaders } = { requestHeaders: {} }, + { + shipmentId, + addressCategory, + name, + address, + addressType, + pincode, + phone, + email, + landmark, + city, + state, + country, + requestHeaders, + } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error } = OrderPlatformValidator.updateAddress().validate( { shipmentId, - body, + addressCategory, + + name, + address, + addressType, + pincode, + phone, + email, + landmark, + city, + state, + country, }, { abortEarly: false, allowUnknown: true } ); @@ -4520,7 +4357,18 @@ class Order { const { error: warrning } = OrderPlatformValidator.updateAddress().validate( { shipmentId, - body, + addressCategory, + + name, + address, + addressType, + pincode, + phone, + email, + landmark, + city, + state, + country, }, { abortEarly: false, allowUnknown: false } ); @@ -4532,15 +4380,27 @@ class Order { } const query_params = {}; + query_params["shipment_id"] = shipmentId; + query_params["name"] = name; + query_params["address"] = address; + query_params["address_type"] = addressType; + query_params["pincode"] = pincode; + query_params["phone"] = phone; + query_params["email"] = email; + query_params["landmark"] = landmark; + query_params["address_category"] = addressCategory; + query_params["city"] = city; + query_params["state"] = state; + query_params["country"] = country; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, - "put", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/${shipmentId}/address`, + "post", + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/delight/update-address`, query_params, - body, + undefined, { ...xHeaders, ...requestHeaders }, { responseHeaders } ); @@ -4552,7 +4412,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.BaseResponseSchema().validate(responseData, { + } = OrderPlatformModel.BaseResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4575,7 +4435,7 @@ class Order { * @param {OrderPlatformValidator.UpdatePackagingDimensionsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updatePackagingDimensions @@ -4635,7 +4495,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.UpdatePackagingDimensionsResponseSchema().validate( + } = OrderPlatformModel.UpdatePackagingDimensionsResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -4654,90 +4514,12 @@ class Order { return response; } - /** - * @param {OrderPlatformValidator.UpdatePaymentInfoParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name updatePaymentInfo - * @summary: Update payment details for an order, its shipments and its bags. - * @description: Updates the payment mode for an order, its shipments and its bags. This endpoint allows for modifying payment methods, and associated details but not amount. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updatePaymentInfo/). - */ - async updatePaymentInfo( - { body, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = OrderPlatformValidator.updatePaymentInfo().validate( - { - body, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = OrderPlatformValidator.updatePaymentInfo().validate( - { - body, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > Order > updatePaymentInfo \n ${warrning}`, - }); - } - - const query_params = {}; - - const xHeaders = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "put", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/payment/update`, - query_params, - body, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { error: res_error } = Joi.any().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > Order > updatePaymentInfo \n ${res_error}`, - }); - } - } - - return response; - } - /** * @param {OrderPlatformValidator.UpdateShipmentLockParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - + * Success response * @name updateShipmentLock * @summary: Update a shipment lock * @description: Modify shipment/bag lock status and update lock/unlock messages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/updateShipmentLock/). @@ -4793,10 +4575,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.UpdateShipmentLockResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.UpdateShipmentLockResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4977,7 +4759,7 @@ class Order { * @param {OrderPlatformValidator.UploadConsentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name uploadConsents * @summary: Upload consent * @description: Uploads the consent signed by courier partner and seller to keep records - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/uploadConsents/). @@ -5033,7 +4815,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.SuccessResponseSchema().validate(responseData, { + } = OrderPlatformModel.SuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -5056,7 +4838,7 @@ class Order { * @param {OrderPlatformValidator.VerifyMobileOTPParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyMobileOTP * @summary: Verify mobile OTP * @description: Perform OTP verification to link a user to an anonymous order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/verifyMobileOTP/). @@ -5112,7 +4894,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.VerifyOtpResponseSchema().validate(responseData, { + } = OrderPlatformModel.VerifyOtpResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/platform/Order/OrderPlatformModel.d.ts b/sdk/platform/Order/OrderPlatformModel.d.ts index f032096c2..2764398a5 100644 --- a/sdk/platform/Order/OrderPlatformModel.d.ts +++ b/sdk/platform/Order/OrderPlatformModel.d.ts @@ -7,34 +7,28 @@ export = OrderPlatformModel; * @property {string[]} [bag_ids] - Bag Ids to clear cache of shipment Ids mapped to it */ /** - * @typedef InvalidateShipmentCacheNestedResponseSchema + * @typedef InvalidateShipmentCacheNestedResponse * @property {string} [shipment_id] - * @property {number} [status] - The HTTP status code corresponding to the - * overall status of the shipment response. + * @property {number} [status] * @property {string} [message] * @property {string} [error] */ /** - * @typedef InvalidateShipmentCacheResponseSchema - * @property {InvalidateShipmentCacheNestedResponseSchema[]} [response] + * @typedef InvalidateShipmentCacheResponse + * @property {InvalidateShipmentCacheNestedResponse[]} [response] */ /** - * @typedef UpdatePackingErrorResponseSchema + * @typedef UpdatePackingErrorResponse * @property {number} [status] - Represents the HTTP status code of the API response. * @property {string} [error] - Descriptive error message that occurred. */ /** - * @typedef ErrorResponseSchema + * @typedef ErrorResponse * @property {number} [status] - Represents the HTTP status code of the API response. * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} message - A message describing the error that occurred. - * @property {string} [error_trace] - This field is intended to store the error - * trace of the error that occurred.For example, "Exception Trace" represents - * a placeholder for the actual stack trace data that would be captured when - * an exception occurs."Internal Server Error" indicates a generic error - * message suggesting that the server encountered an unexpected condition that - * prevented it from fulfilling the request. + * @property {string} [error_trace] - Error trace of the error that occurred. * @property {string} [error] */ /** @@ -58,7 +52,7 @@ export = OrderPlatformModel; * associated with the reassignment. */ /** - * @typedef StoreReassignResponseSchema + * @typedef StoreReassignResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [message] - A descriptive message providing additional @@ -83,13 +77,7 @@ export = OrderPlatformModel; * @typedef UpdateShipmentLockPayload * @property {string} entity_type - Specifies the type of entity being locked or unlocked. * @property {string} action - Indicates the action to be performed on the entity. - * @property {string} action_type - Defines the current lock state or lock type - * of a shipment, dictating the types of transitions or actions that can be - * performed next.The action_type can be one of the following - complete- - * Complete lock specifies that no action can be performed for that shipment. - * - operational- The shipment is in an operational phase, during which only - * financial-related actions are permissible. - financial- The shipment is in - * a financial phase, allowing for operational actions to be taken. + * @property {string} action_type - Specifies the type of action being taken. * @property {LockManagerEntities[]} entities - List of entities to be locked or unlocked * @property {boolean} [resume_tasks_after_unlock] - Indicates whether tasks * should resume automatically after unlocking, such as DP assignment task and @@ -114,7 +102,7 @@ export = OrderPlatformModel; * Required if the ID is missing */ /** - * @typedef CheckResponseSchema + * @typedef CheckResponse * @property {string} [shipment_id] - Shipment ID * @property {string} [status] - Status * @property {boolean} [is_bag_locked] - Is Bag Locked @@ -127,17 +115,17 @@ export = OrderPlatformModel; * @property {Bags[]} [bags] */ /** - * @typedef UpdateShipmentLockResponseSchema + * @typedef UpdateShipmentLockResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [message] - A descriptive message providing additional * information about the API response, such as success confirmation or error details. - * @property {CheckResponseSchema[]} [check_response] - An array containing the - * lock status of entities if the action performed was a 'check'. Each item in - * the array represents the status of a specific entity. + * @property {CheckResponse[]} [check_response] - An array containing the lock + * status of entities if the action performed was a 'check'. Each item in the + * array represents the status of a specific entity. */ /** - * @typedef AnnouncementResponseSchema + * @typedef AnnouncementResponse * @property {string} [to_datetime] - The end date and time for the event, * indicating when the issue is expected to be resolved. * @property {number} id - A unique identifier for the announcement. @@ -159,16 +147,14 @@ export = OrderPlatformModel; * created, providing context for its age and relevance. */ /** - * @typedef AnnouncementsResponseSchema - * @property {AnnouncementResponseSchema[]} [announcements] + * @typedef AnnouncementsResponse + * @property {AnnouncementResponse[]} [announcements] * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {number} [status] - Represents the HTTP status code of the API response - * @property {string} [message] - A descriptive message providing additional - * information about the API response. */ /** - * @typedef BaseResponseSchema + * @typedef BaseResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [message] - A descriptive message providing additional @@ -236,16 +222,9 @@ export = OrderPlatformModel; */ /** * @typedef ProductsDataUpdatesFilters - * @property {number} [line_number] - Represents the specific line item within a - * bag, used to identify and reference a particular product in a list. This - * helps in pinpointing the exact item being updated or processed. - * @property {string} [identifier] - A unique string that serves as the - * product’s identifier, such as a SKU, barcode, or another distinct code. - * This ensures the product is correctly identified and distinguished from - * other items in the system. - * @property {number} [quantity] - The quantity of the product or item, - * specified as an integer. This indicates how many units of the product are - * being referenced or processed, such as the number of items in a bag or shipment. + * @property {number} [line_number] - The line number for the product or bag. + * @property {string} [identifier] - The unique article or item identifier for + * the product or bag. */ /** * @typedef ProductsDataUpdates @@ -258,13 +237,7 @@ export = OrderPlatformModel; * @typedef EntitiesDataUpdates * @property {Object[]} [filters] - A list of filters used to specify which * shipments are targeted for updates. - * @property {Object} [data] - Encapsulates a dynamic set of updates and - * modifications applied to the entity. - */ -/** - * @typedef OrderDataUpdates - * @property {Object} [data] - Encapsulates a dynamic set of updates and - * modifications applied to the order. + * @property {Object} [data] - Contains the specific data for updating the shipment. */ /** * @typedef DataUpdates @@ -274,10 +247,9 @@ export = OrderPlatformModel; * the properties of products or bags. * @property {EntitiesDataUpdates[]} [entities] - A list of updates related to * the properties of any relevant entities. - * @property {OrderDataUpdates[]} [order] */ /** - * @typedef ShipmentsRequestSchema + * @typedef ShipmentsRequest * @property {string} identifier - Unique identifier for the shipment. * @property {ReasonsData} [reasons] * @property {Products[]} [products] - A list of products or bags that need to @@ -285,35 +257,10 @@ export = OrderPlatformModel; * @property {DataUpdates} [data_updates] */ /** - * @typedef UpdatedAddressSchema - * @property {string} [address] - The complete address. - * @property {string} [area] - The locality or area associated with the address. - * @property {string} [landmark] - A prominent nearby landmark for locating the address. - * @property {string} [pincode] - The postal code (for example, zip, postcode, - * or Eircode) of the address. - * @property {string} [city] - The city, town, or village of the address. - * @property {string} [state] - The state or province of the address. - * @property {string} [name] - The name of the person associated with the address. - * @property {string} [phone] - Phone number associated with the address user. - * @property {string} [email] - Email address associated with the address user. - * @property {string} [country] - The country of the address. - * @property {string} [country_iso_code] - The ISO code representing the country - * of the address. - * @property {number} [latitude] - The latitude of the address. - * @property {number} [longitude] - The longitude of the address. - */ -/** - * @typedef UpdateAddressRequestBody - * @property {UpdatedAddressSchema} [updated_address] - * @property {string} [address_type] - The type of address (e.g., office, home). - * @property {string} [address_category] - The category of the address (e.g., - * delivery, billing). - */ -/** - * @typedef StatuesRequestSchema + * @typedef StatuesRequest * @property {string} [status] - The new status to be assigned to the shipment(s). - * @property {ShipmentsRequestSchema[]} [shipments] - A list of shipments to - * which the new status will be applied. + * @property {ShipmentsRequest[]} [shipments] - A list of shipments to which the + * new status will be applied. * @property {string} [exclude_bags_next_state] - Specifies the state to which * remaining bags or products should be changed, effectively excluding them * from the current status update. @@ -325,8 +272,8 @@ export = OrderPlatformModel; * @typedef UpdateShipmentStatusRequestSchema * @property {boolean} [force_transition] - Indicates whether to force the * status transition, overriding any restrictions or checks that may normally apply. - * @property {StatuesRequestSchema[]} [statuses] - A list of status updates to - * be applied to the shipment. + * @property {StatuesRequest[]} [statuses] - A list of status updates to be + * applied to the shipment. * @property {boolean} [lock_after_transition] - Specifies whether the shipment * should be locked automatically after a transition occurs. * @property {boolean} [unlock_before_transition] - Specifies whether the @@ -339,7 +286,7 @@ export = OrderPlatformModel; * invoicing task. */ /** - * @typedef ShipmentsResponseSchema + * @typedef ShipmentsResponse * @property {number} [status] * @property {Object} [final_state] * @property {string} [identifier] @@ -349,6 +296,14 @@ export = OrderPlatformModel; * @property {string} [message] * @property {string} [exception] */ +/** + * @typedef StatuesResponse + * @property {ShipmentsResponse[]} [shipments] + */ +/** + * @typedef UpdateShipmentStatusResponseBody + * @property {StatuesResponse[]} [statuses] + */ /** * @typedef DPConfiguration * @property {string} [shipping_by] - Shipping_by denotes dp assignment @@ -361,264 +316,23 @@ export = OrderPlatformModel; * @property {string} [source] - The source field identifies the channel through * which the order was placed, such as MARKETPLACE, ECOMM. */ -/** - * @typedef LockStateMessage - * @property {string} [state] - The state for which the custom lock message applies. - * @property {string} [message] - Custom lock message used when the shipment is - * locked in the specified state. - */ /** * @typedef CreateOrderConfig * @property {DPConfiguration} dp_configuration + * @property {string} [integration_type] - Flag denotes integration type which + * is used to retrieve specific configurations and application details + * relevant to channel fulfillment. * @property {boolean} [location_reassignment] - Flag denotes if the location - * for the store needs to be reassigned post cancellation. If true,location - * for the store gets auto reassigned post cancellation, if set false location - * reassignment will not be performed as its disabled. + * for the store needs to be reassigned post cancellation. * @property {PaymentConfig} [payment] * @property {boolean} [optimal_shipment_creation] - Denotes the shipment * breaking strategy. If the flag is set true, the shipment is created using * optimal shipment creation strategy based on the servicability & packaging * dimensions by OMS .If false, shipment details, including location_id, must * be passed to FDK for processing. - * @property {LockStateMessage[]} [lock_state_messages] - A list of - * state-specific custom lock messages. - * @property {string} [integration_type] - Flag denotes integration type which - * is used to retrieve specific configurations and application details - * relevant to channel fulfillment. - */ -/** - * @typedef StatuesResponseSchema - * @property {ShipmentsResponseSchema[]} [shipments] - List of Shipments which - * includes data for each shipment, the current status code, final state - * information including reasons for cancellation (if applicable), and unique - * shipment identifiers are provided. - */ -/** - * @typedef UpdateShipmentStatusResponseBody - * @property {StatuesResponseSchema[]} [statuses] - List of statuses of the - * shipments after a status update operation. Includes an array of status - * objects, each containing details about shipments that have undergone data updates. - */ -/** - * @typedef OrderUser - * @property {number} phone - * @property {string} last_name - * @property {string} [address1] - * @property {string} state - * @property {string} pincode - * @property {string} first_name - * @property {number} mobile - * @property {string} [address2] - * @property {string} email - * @property {string} country - * @property {string} city - */ -/** - * @typedef OrderPriority - * @property {string} [fulfilment_priority_text] - * @property {string} [affiliate_priority_code] - * @property {number} [fulfilment_priority] - */ -/** - * @typedef ArticleDetails - * @property {string} _id - A unique identifier for the article, facilitating - * easy reference and management within the system. - * @property {number} brand_id - Numerical code representing the brand - * associated with the article, linking it to its manufacturer or creator. - * @property {Object} dimension - Specifies the physical dimensions of the - * article, including height, width, and depth, providing a comprehensive - * understanding of its size. - * @property {Object} category - Classifies the article into a specific category - * or type, aiding in organization and filtering based on its nature or usecase. - * @property {Object} weight - Details the weight of the article, crucial for - * logistics, shipping calculations, and customer information. - * @property {Object} attributes - Holds additional descriptive details and - * characteristics of the article, such as color, material, and style, - * enhancing product understanding. - * @property {number} quantity - Specifies the available or required quantity of - * the article, important for inventory management and order fulfillment. - */ -/** - * @typedef LocationDetails - * @property {string} fulfillment_type - The method of fulfillment used by the store. - * @property {ArticleDetails[]} articles - * @property {number} fulfillment_id - */ -/** - * @typedef ShipmentDetails - * @property {string} [box_type] - Box type of the shipment in which the - * shipment will be delivered. - * @property {number} shipments - * @property {number} fulfillment_id - * @property {ArticleDetails[]} articles - * @property {string} [dp_id] - * @property {Object} [meta] - * @property {string} affiliate_shipment_id - * @property {Object} [dp_options] - Delivery partner options that are available - * to deliver the shipment. - * @property {boolean} [lock_status] - * @property {Object} [action_to_status] - This field maps potential actions - * (e.g., downloading an invoice or label) to their corresponding shipment - * lock statuses, indicating which operations are allowed depending on the - * shipment's current lock status. When an action is set to 'lock', it means - * no transitions or updates to the shipment's status can be performed until - * the specified action is completed. For instance, if 'download_invoice' is - * in a 'lock' state, the shipment cannot undergo any status transitions until - * the invoice is either downloaded. Similarly, 'download_label' being in a - * 'lock' state prevents any shipment status transitions until a new label is - * downloaded. - */ -/** - * @typedef ShipmentConfig - * @property {LocationDetails} [location_details] - * @property {string} source - * @property {string} to_pincode - * @property {ShipmentDetails[]} shipment - * @property {string} identifier - The unique identifier for the shipment. - * @property {string} payment_mode - * @property {string} action - * @property {string} journey - */ -/** - * @typedef ShipmentData - * @property {ShipmentConfig} shipment_data - */ -/** - * @typedef MarketPlacePdf - * @property {string} [invoice] - * @property {string} [label] - */ -/** - * @typedef AffiliateBag - * @property {MarketPlacePdf} [pdf_links] - * @property {number} store_id - * @property {string} sku - * @property {number} discount - * @property {number} unit_price - * @property {number} price_effective - * @property {string} affiliate_store_id - * @property {Object} identifier - The unique identifier for the bag. - * @property {string} seller_identifier - * @property {string} item_size - * @property {number} amount_paid - * @property {string} fynd_store_id - * @property {number} item_id - * @property {number} delivery_charge - * @property {number} avl_qty - * @property {number} price_marked - * @property {number} quantity - * @property {number} company_id - * @property {string} hsn_code_id - * @property {string} _id - * @property {Object} affiliate_meta - Sales channel meta data information for the bag. - * @property {string} modified_on - The date and time when the bag was updated - * or modified. - * @property {number} transfer_price - */ -/** - * @typedef UserData - * @property {OrderUser} [shipping_user] - * @property {OrderUser} [billing_user] - */ -/** - * @typedef OrderInfo - * @property {string} [affiliate_order_id] - A unique identifier assigned to the - * order by an affiliate partner or platform, facilitating tracking across - * different systems. - * @property {number} cod_charges - * @property {Object} items - Contains detailed information about the items - * included in the order ensuring comprehensive order management. - * @property {number} discount - * @property {OrderUser} billing_address - * @property {Object} [payment] - Outlines the payment details for the order, - * including payment method, transaction status, and any related financial - * information, supporting secure and efficient payment processing. - * @property {OrderPriority} [order_priority] - * @property {ShipmentData} [shipment] - * @property {number} delivery_charges - * @property {OrderUser} shipping_address - * @property {number} order_value - * @property {string} payment_mode - * @property {AffiliateBag[]} bags - * @property {UserData} user - * @property {string} [coupon] - */ -/** - * @typedef AffiliateAppConfigMeta - * @property {string} value - * @property {string} name - */ -/** - * @typedef AffiliateAppConfig - * @property {string} id - * @property {string} [description] - * @property {string} updated_at - The date and time when the app config was updated. - * @property {string} name - * @property {string} token - * @property {AffiliateAppConfigMeta[]} [meta] - * @property {string} owner - * @property {string} secret - * @property {string} created_at - Timestamp when the app config was created. - */ -/** - * @typedef AffiliateInventoryArticleAssignmentConfig - * @property {boolean} [post_order_reassignment] - */ -/** - * @typedef AffiliateInventoryPaymentConfig - * @property {string} [source] - * @property {string} [mode_of_payment] - */ -/** - * @typedef AffiliateInventoryStoreConfig - * @property {Object} [store] - Fulfilling store information related to the shipment. - */ -/** - * @typedef AffiliateInventoryOrderConfig - * @property {boolean} [force_reassignment] - */ -/** - * @typedef AffiliateInventoryLogisticsConfig - * @property {boolean} [dp_assignment] - */ -/** - * @typedef AffiliateInventoryConfig - * @property {AffiliateInventoryArticleAssignmentConfig} [article_assignment] - * @property {AffiliateInventoryPaymentConfig} [payment] - * @property {AffiliateInventoryStoreConfig} [inventory] - * @property {AffiliateInventoryOrderConfig} [order] - * @property {AffiliateInventoryLogisticsConfig} [logistics] - */ -/** - * @typedef AffiliateConfig - * @property {AffiliateAppConfig} [app] - * @property {AffiliateInventoryConfig} [inventory] - * @property {number} [app_company_id] - A unique identifier for the company - * associated with the affiliate app, used for tracking and managing affiliate - * relationships. - */ -/** - * @typedef Affiliate - * @property {string} id - * @property {AffiliateConfig} [config] - * @property {string} token - */ -/** - * @typedef AffiliateStoreIdMapping - * @property {number} store_id - * @property {string} marketplace_store_id - */ -/** - * @typedef OrderConfig - * @property {boolean} [create_user] - * @property {string} [article_lookup] - * @property {string} [bag_end_state] - * @property {Affiliate} affiliate - * @property {string} [store_lookup] - * @property {AffiliateStoreIdMapping[]} affiliate_store_id_mapping */ /** - * @typedef CreateOrderResponseSchema + * @typedef CreateOrderResponse * @property {string} fynd_order_id - A string that represents the unique * identifier assigned to the order. */ @@ -628,7 +342,7 @@ export = OrderPlatformModel; * dispatched. */ /** - * @typedef SuccessResponseSchema + * @typedef SuccessResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [message] - A descriptive message providing additional @@ -646,7 +360,7 @@ export = OrderPlatformModel; * identifier for the permission, often used in routing or API calls. */ /** - * @typedef GetActionsResponseSchema + * @typedef GetActionsResponse * @property {ActionInfo[]} [permissions] - A response object that contains a * list of permissions available to the user. */ @@ -660,22 +374,6 @@ export = OrderPlatformModel; * @property {number} [code] - Unique code identifying the reason. * @property {number} [quantity] - Quantity related to the reason, if applicable. */ -/** - * @typedef RefundInformation - * @property {string} [mode] - The payment method used for the order, such as - * CARD, Net Banking (NB), or other options. This field indicates how the - * original payment was made and will determine how the refund is processed. - * @property {number} [amount] - The amount to be refunded, represented as a - * floating-point number. This specifies the exact value that will be returned - * to the customer. - * @property {string} [merchant_transaction_id] - A unique identifier associated - * with the payment transaction, such as TR669796C0012CF31BBD. This ID helps - * track and reference the specific transaction within the merchant's system. - * @property {string} [refund_status] - The current status of the refund - * process, indicating whether the refund has been completed, is pending, or - * has encountered an issue (e.g., 'refund_done', 'refund_failed'). This field - * reflects the state of the refund operation. - */ /** * @typedef HistoryMeta * @property {number} [store_id] - Unique identifier for the store involved in @@ -700,29 +398,12 @@ export = OrderPlatformModel; * applicable. * @property {string} [activity_comment] - Comments related to the activity, if * applicable. - * @property {string} [activity_type] - Defines the category of event-related - * information for a shipment, indicating the nature of the update. This - * includes whether the update pertains to the status of the shipment, - * comments added to it, or notifications about specific events. + * @property {string} [activity_type] - Type of activity being recorded, if applicable. * @property {string} [receiver] - Name of the receiver involved in the * activity, if applicable. * @property {string} [recipient] - Recipient of the activity, if applicable. * @property {string} [slug] - Slug identifier for the activity. * @property {string} [message] - Any additional messages related to the activity. - * @property {string} [prev_store_name] - The name of the store where the item - * was previously located before being transferred or processed. This field - * can be null if the previous store information is not applicable or available. - * @property {string} [prev_store_code] - The unique code associated with the - * previous store. This code helps identify the store in the system and can be - * null if the previous store code is not recorded or required. - * @property {string} [prev_store_id] - The unique identifier (ID) of the - * previous store in the database or system. This ID can be null if the - * previous store information is not relevant or if the store did not have a - * designated ID. - * @property {string} [refund_to] - The destination or method by which a refund - * will be issued. This indicates where the refunded amount will be sent, such - * as back to the original payment source (e.g., 'Back To Source'). - * @property {RefundInformation[]} [refund_information] */ /** * @typedef HistoryDict @@ -736,19 +417,16 @@ export = OrderPlatformModel; * in ISO format. * @property {string} [ticket_id] - Unique identifier for the ticket associated * with the activity. - * @property {string} activity_type - Defines the category of event-related - * information for a shipment, indicating the nature of the update. This - * includes whether the update pertains to the status of the shipment, - * comments added to it, or notifications about specific events. + * @property {string} type - Type of activity history * @property {string} [l2_detail] - L2 details regarding the bag or activity. * @property {string} [assigned_agent] - Name of the agent assigned to the activity. - * @property {HistoryMeta} [meta] + * @property {HistoryMeta} [meta] - Metadata about the activity * @property {string} [l1_detail] - L1 details regarding the bag or activity. * @property {string} message - Message or comment regarding the history. * @property {string} user - Name of the user who created the history record. */ /** - * @typedef ShipmentHistoryResponseSchema + * @typedef ShipmentHistoryResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {HistoryDict[]} activity_history - A list of activity records @@ -784,9 +462,9 @@ export = OrderPlatformModel; */ /** * @typedef SmsDataPayload - * @property {string} shipment_id - Unique identifier which is used to identify - * a shipment. - * @property {string} phone_number - The recipient's phone number for communication. + * @property {number} shipment_id - Unique identifier for the shipment + * associated with the SMS. + * @property {number} phone_number - The recipient's phone number for communication. * @property {number} [amount_paid] - The amount that has been paid, as mapped * in the communication template. * @property {string} order_id - Unique identifier for the order associated with @@ -812,36 +490,26 @@ export = OrderPlatformModel; /** * @typedef OrderDetails * @property {string} [fynd_order_id] - * @property {string} [created_at] - Date and time when the order was created. + * @property {string} [created_at] * @property {string} [user_id] * @property {TaxDetails} [tax_details] * @property {number} [mongo_cart_id] * @property {number} [delivery_charges] * @property {string} [transaction_id] * @property {string} [collect_by] - * @property {Object} [headers] - Header details of the order. + * @property {Object} [headers] * @property {number} [coupon_value] * @property {number} [order_value] * @property {string} [created_time] - * @property {string} [currency] - The currency in which the prices details - * associated with the item is specified. + * @property {string} [currency] * @property {number} [total_order_value] * @property {string} [ordering_channel] - * @property {Object} [meta] - Meta data of the order data contains additional, - * potentially dynamic information about the order data. + * @property {Object} [meta] * @property {number} [cod_charges] * @property {number} [cashback_value] * @property {string} [refund_by] - * @property {string} [affiliate_order_date] - Specifies the date and time of - * the order when it was created within the affiliate's system. It specifies - * that the date and time are recorded in ISO 8601 format. - * @property {Object} [payment_methods] - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. The structure is designed to accommodate any number of - * payment methods,providing flexibility and comprehensive insights into each - * transaction's payment aspect. + * @property {string} [affiliate_order_date] + * @property {Object} [payment_methods] * @property {string} [affiliate_order_id] * @property {number} [payment_mode_id] * @property {number} [promotion_effective_discount] @@ -852,7 +520,6 @@ export = OrderPlatformModel; * @property {string} [affiliate_id] * @property {string} [ordering_channel_logo] * @property {Prices} [prices] - * @property {PriceAdjustmentCharge[]} [charges] */ /** * @typedef Meta @@ -898,19 +565,9 @@ export = OrderPlatformModel; * @property {OrderStatusData[]} [result] - The order's current status and * related shipment details. */ -/** - * @typedef SendSmsResponseSchema - * @property {boolean} success - Indicates whether the SMS was sent - * successfully. A value of `true` means the SMS was sent without errors, - * while `false` indicates there was an issue. - * @property {string} message - Provides additional information about the - * success or failure of the SMS sending operation. If `success` is `false`, - * this message may contain error details. - */ /** * @typedef Dimension - * @property {string} [packaging_type] - Defines the type of packaging used for - * the product, encompassing materials, design, and form factors. + * @property {string} [packaging_type] - Describes the type of packaging used. * @property {number} [weight] - The weight of the package in kilograms. * @property {number} [height] - The height of the package in centimetres. * @property {number} [length] - The length of the package in centimetres. @@ -924,7 +581,7 @@ export = OrderPlatformModel; * @property {Dimension[]} dimension - A list of dimensions for the packaging. */ /** - * @typedef UpdatePackagingDimensionsResponseSchema + * @typedef UpdatePackagingDimensionsResponse * @property {string} [message] */ /** @@ -977,32 +634,8 @@ export = OrderPlatformModel; * for the merchant to confirm the order. * @property {Object} [customer_pickup_slot] - An object that provides details * of the pick-up time slot set by the customer. - * @property {string} [pack_by_date] - Defines the deadline for having the - * package fully packed and ready for dispatch or pickup, integral to - * streamlining the fulfillment process. - */ -/** - * @typedef Tag - * @property {string} [slug] - A unique identifier or short label for the tag - * for shipment reference. - * @property {string} [display_text] - Label of the tag. This text is shown to - * users, representing the tag in an human-readable format. - */ -/** - * @typedef ProcessAfterConfig - * @property {boolean} [is_scheduled_shipment] - Indicates whether the shipment - * is scheduled for later processing. - * @property {string} [enable_processing_after] - Specifies the UTC time after - * which the shipment will be automatically processed. - */ -/** - * @typedef SystemMessages - * @property {string} message_type - Specifies the type of message. - * @property {number} priority - This will determine the sequence of messages (1 - * being the highest priority). - * @property {string} message - Message to be displayed at Platform's Order Details. - * @property {string[]} [inject_at] - Holds the list of OMS status at which the - * message should be visible. + * @property {string} [pack_by_date] - A string indicating the date by which the + * order must be packaged for fulfillment. */ /** * @typedef Shipment @@ -1011,8 +644,7 @@ export = OrderPlatformModel; * @property {string} [external_shipment_id] - External shipment identifier or * marketplace's unique shipment identifier. * @property {ProcessingDates} [processing_dates] - * @property {Object} [meta] - Meta data of the shipment contains additional, - * potentially dynamic information about the shipment. + * @property {Object} [meta] - An object containing metadata related to the shipment. * @property {number} [priority] - An integer indicating the priority level of * the shipment. * @property {number} [location_id] - Location Identifier or Store/Fulfillment @@ -1021,48 +653,29 @@ export = OrderPlatformModel; * must be associated with a specific location. When * `optimal_shipment_creation` is true, the optimal location for order * creation would be assigned, location_id becomes optional. - * @property {string} [order_type] - Defines the specific journey a shipment - * will follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. For example: - * - * - "HomeDelivery": The order undergoes all state transitions typical for a - * delivery, from processing the shipment to final delivery at the - * customer's address. - * - "PickAtStore": The order is prepared for pickup and moved to a state where it - * is ready to be handed over directly to the customer at the store. This - * type streamlines the process by bypassing traditional shipping stages - * and facilitating a quicker transition to the final handover stage. - * - "Digital": This order type likely refers to orders that involve digital goods - * or services, such as software, digital subscriptions, e-books, online - * courses, or any other item that can be delivered electronically. - * - * @property {string[]} [tags] - * @property {SystemMessages[]} [system_messages] - * @property {ProcessAfterConfig} [process_after_config] + * @property {string} [order_type] - The order type of shipment. * @property {string} [parent_type] * @property {string} [store_invoice_id] * @property {string} [lock_status] * @property {string} [type] - * @property {Address} [billing_address_json] + * @property {PlatformDeliveryAddress} [billing_address_json] * @property {string} [id] * @property {number} [fulfilment_priority] * @property {boolean} [is_active] * @property {string} [previous_shipment_id] - * @property {Object} [pdf_links] - PDF Links associated with the shipment. - * @property {Address} [delivery_address_json] + * @property {Object} [pdf_links] + * @property {PlatformDeliveryAddress} [delivery_address_json] * @property {string} [eway_bill_id] * @property {string} [affiliate_shipment_id] * @property {string} [fynd_order_id] - * @property {string} [created_at] - Specifies the date and time when the - * shipment was created. + * @property {string[]} [tags] + * @property {string} [created_at] * @property {string} [delivery_awb_number] - * @property {Address} [hand_over_contact_json] + * @property {PlatformDeliveryAddress} [hand_over_contact_json] * @property {string} [credit_note_id] * @property {string} [parent_id] * @property {string} [affiliate_id] - * @property {string} [packaging_type] - Defines the type of packaging used for - * the product, encompassing materials, design, and form factors. + * @property {string} [packaging_type] * @property {string} [vertical] * @property {number} [quantity] * @property {ShipmentStatusData} [status] @@ -1084,8 +697,7 @@ export = OrderPlatformModel; * shipping purposes. * @property {string} [customer_code] - A string representing the customer's * unique identifier in the seller's system. - * @property {string} [shipping_type] - Specifies the method or service used for - * the shipping of the shipment. + * @property {string} [shipping_type] - A string describing the shipping type. * @property {string} [middle_name] - A string containing the customer's middle name. * @property {string} [primary_mobile_number] - A string for the customer's * primary mobile number. @@ -1120,55 +732,9 @@ export = OrderPlatformModel; * @property {string} [primary_email] - A string representing the primary email * address for the customer. * @property {string} [address2] - A string representing the second line of the address. - * @property {string} [country_code] - Uniquely identifies the country - * associated with the shipping address. This code is essential for - * international shipments, ensuring accurate routing and delivery across - * global postal and customs services. Examples include 'US' for the United - * States, 'IN' for India. - * @property {string} [country_iso_code] - Specifies the country's unique - * identifier ollowing the ISO 3166-1 alpha-2 standard. This two-letter code - * is crucial for distinguishing countries in international transactions, data - * processing, and shipping logistics. - */ -/** - * @typedef BillingInfo - * @property {string} [alternate_mobile_number] - * @property {string} [state] - * @property {string} [customer_code] - A unique identifier assigned to the - * customer, facilitating order tracking and service customization. - * @property {string} [middle_name] - * @property {string} [primary_mobile_number] - * @property {string} [last_name] - * @property {string} [gender] - * @property {string} [house_no] - * @property {string} [first_name] - * @property {string} [title] - * @property {string} [country] - * @property {string} [state_code] - The code representing the state or region - * within the country, if applicable. - * @property {string} [city] - * @property {string} [external_customer_code] - A unique identifier assigned to - * customers by an external system or partner organization. This code is - * crucial for integrating and synchronizing customer information across - * different platforms or services. - * @property {string} [floor_no] - * @property {string} [alternate_email] - * @property {string} [address] - * @property {string} [area] - A string representing the area of the customer's location. - * @property {string} [address1] - A string representing the first line of the address. - * @property {string} [pincode] - A string representing the pincode of the - * customer's location. - * @property {string} [primary_email] - A string representing the primary email - * address for the customer. - * @property {string} [address2] - A string representing the second line of the address. - * @property {string} [country_code] - Uniquely identifies the country - * associated with the billing address details. This code is essential for - * international shipments, ensuring accurate routing and delivery across - * global postal and customs services. Examples include 'US' for the United - * States, 'IN' for India. - * @property {string} [country_iso_code] - The ISO 3166-1 alpha-2 code for the - * country, consisting of two uppercase letters. This standardized format - * ensures consistent identification of countries across systems. + * @property {string} [country_code] - A string representing the country code of + * the customer's location. + * @property {string} [country_iso_code] - Country Code in ISO 2 format (e.g. US, IN) */ /** * @typedef UserInfo @@ -1217,22 +783,21 @@ export = OrderPlatformModel; */ /** * @typedef CreateOrderAPI - * @property {Shipment[]} shipments - List of Shipments which includes shipment - * data like shipment items, shipment promise, Shipment type, shipment order - * type, shipment dp options etc. + * @property {Shipment[]} shipments - An array of shipment objects that detail + * the items being shipped as part of the order. * @property {ShippingInfo} shipping_info * @property {ShippingInfo} billing_info - * @property {Object} [currency_info] - This object can accommodate a range of - * currency-related information, provides a flexible structure for storing - * comprehensive details about the currency or currencies involved in a transaction. + * @property {Object} [currency_info] - An object that provides details about + * the currency in which the order is processed, including currency code and + * conversion rates if applicable. * @property {string} [external_order_id] - A unique identifier for the order * assigned by an external system. * @property {Charge[]} [charges] - An array of charge objects that detail the * various fees associated with the order. * @property {string} [external_creation_date] - A string that specifies the * date and time when the order was created in an external system - * @property {Object} [meta] - Meta data of the order that contains additional, - * potentially dynamic information about the order. + * @property {Object} [meta] - A generic object that can hold any additional + * metadata related to the order. * @property {TaxInfo} [tax_info] * @property {CreateOrderConfig} config * @property {PaymentInfo} payment_info @@ -1240,10 +805,6 @@ export = OrderPlatformModel; * @property {number} [ordering_store_id] - Unique identifier for the store * where the order was placed. * @property {string} [order_platform] - The platform used to place the order. - * @property {string} [status] - Represents the current status of the order, - * specifying whether the order is in a 'pendency' state (awaiting further - * action) or marked as 'complete'. - * @property {SystemMessages[]} [system_messages] * @property {string} [order_type] - A string that specifies the type of order * being placed. * @property {string} [fynd_order_id] - Unique identifier for the order. @@ -1261,56 +822,12 @@ export = OrderPlatformModel; * @property {string} [fynd_order_id] - A string that represents the unique * identifier assigned to the order. */ -/** - * @typedef PaymentMethods - * @property {string} [collect_by] - * @property {string} [refund_by] - * @property {string} [mode] - */ -/** - * @typedef CreateChannelPaymentInfo - * @property {string} [source] - * @property {PaymentMethods[]} [payment_methods] - * @property {string} [mode_of_payment] - */ -/** - * @typedef CreateChannelConfig - * @property {DPConfiguration} [dp_configuration] - * @property {string} [shipment_assignment] - * @property {boolean} [location_reassignment] - * @property {Object} [logo_url] - * @property {CreateChannelPaymentInfo} [payment_info] - * @property {string[]} [lock_states] - */ -/** - * @typedef CreateChannelConfigData - * @property {CreateChannelConfig} [config_data] - */ -/** - * @typedef CreateChannelConifgErrorResponseSchema - * @property {string} [error] - A string that represents the unique identifier - * assigned to the order. - * @property {string} [request_id] - * @property {number} status - * @property {Object} [info] - * @property {string} [stack_trace] - * @property {string} [code] - * @property {string} [meta] - * @property {string} message - * @property {string} [exception] - */ /** * @typedef UploadManifestConsent * @property {string} consent_url - A URL that directs users to a consent page * or document related to the upload of the manifest. * @property {string} manifest_id - The unique identifier for the manifest being uploaded. */ -/** - * @typedef CreateChannelConfigResponseSchema - * @property {boolean} [is_inserted] - * @property {boolean} [is_upserted] - * @property {boolean} [acknowledged] - */ /** * @typedef PlatformOrderUpdate * @property {string} order_id - A string that represents the unique identifier @@ -1339,11 +856,6 @@ export = OrderPlatformModel; * @typedef OrderStatus * @property {FyndOrderIdList[]} [order_details] - An array of objects that * provide details about the orders, including their respective order IDs. - * @property {string} start_date - Denotes the start date and time when the - * order was created. - * @property {string} end_date - Specifies the deadline by which a particular - * action related to the order needs to be completed. - * @property {number} mobile */ /** * @typedef BagStateTransitionMap @@ -1357,23 +869,6 @@ export = OrderPlatformModel; * @property {string[]} [next_statuses] - A list of possible next statuses that * can be transitioned to from the current status. */ -/** - * @typedef FetchCreditBalanceRequestPayload - * @property {string} affiliate_id - * @property {string} seller_id - * @property {string} customer_mobile_number - */ -/** - * @typedef CreditBalanceInfo - * @property {string} [total_credited_balance] - * @property {string} [reason] - * @property {string} [customer_mobile_number] - */ -/** - * @typedef FetchCreditBalanceResponsePayload - * @property {boolean} success - * @property {CreditBalanceInfo} data - */ /** * @typedef RefundModeConfigRequestPayload * @property {string} fynd_order_id - A unique identifier for the order placed @@ -1427,11 +922,7 @@ export = OrderPlatformModel; * @property {string} first_name - A string representing the user's first name. * @property {string} last_name - A string representing the user's last name. * @property {string} mobile - A string representing the user's mobile number. - * @property {string} [country_code] - Uniquely identifies the country - * associated with the user information. This code is essential for - * international shipments, ensuring accurate routing and delivery across - * global postal and customs services. Examples include 'US' for the United - * States, 'IN' for India. + * @property {string} [country_code] - A string representing the user's country code. */ /** * @typedef AttachOrderUser @@ -1441,7 +932,7 @@ export = OrderPlatformModel; * @property {AttachUserInfo} user_info */ /** - * @typedef AttachOrderUserResponseSchema + * @typedef AttachOrderUserResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [message] - A descriptive message providing additional @@ -1451,10 +942,8 @@ export = OrderPlatformModel; * @typedef SendUserMobileOTP * @property {number} mobile - The mobile phone number of the user to whom the * OTP (One-Time Password) will be sent. - * @property {string} [country_code] - Uniquely identifies the country - * associated with the mobile number. This code is essential for for correctly - * formatting and routing the OTP messages to mobile phones across - * international borders. Examples include 'US' for the United States, 'IN' for India. + * @property {string} [country_code] - The country code associated with the + * user's mobile number. */ /** * @typedef PointBlankOtpData @@ -1467,7 +956,7 @@ export = OrderPlatformModel; * associated with the OTP request. */ /** - * @typedef SendUserMobileOtpResponseSchema + * @typedef SendUserMobileOtpResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {number} [status] - The HTTP status code of the API response @@ -1499,7 +988,7 @@ export = OrderPlatformModel; * associated with the mobile number. */ /** - * @typedef VerifyOtpResponseSchema + * @typedef VerifyOtpResponse * @property {number} [status] - Represents the HTTP status code of the API response. * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). @@ -1508,11 +997,11 @@ export = OrderPlatformModel; * @property {VerifyOtpResponseData} [data] */ /** - * @typedef BulkReportsDownloadRequestSchema + * @typedef BulkReportsDownloadRequest * @property {string[]} [store_ids] - A list of specific store IDs for which the * reports should be generated. - * @property {string} [lane_type] - Defines the category or type of lane for - * which the report is being requested for download. + * @property {string} [lane_type] - Specifies the type of lane for which the + * report is being requested. * @property {string[]} [custom_headers] - Allows users to specify custom * headers for the downloaded report. * @property {string} [report_type] - Indicates the type of report being requested. @@ -1530,13 +1019,13 @@ export = OrderPlatformModel; * users to define custom filters specific to the lanes being reported on. */ /** - * @typedef BulkReportsDownloadResponseSchema + * @typedef BulkReportsDownloadResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [batch_id] - A unique identifier for the batch of reports generated. */ /** - * @typedef APIFailedResponseSchema + * @typedef APIFailedResponse * @property {boolean} [status] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [error] - A descriptive message detailing the error that @@ -1549,7 +1038,7 @@ export = OrderPlatformModel; * @property {string} [file_name] - Name of the file associated with the bulk operation. */ /** - * @typedef BulkStateTransistionResponseSchema + * @typedef BulkStateTransistionResponse * @property {boolean} [status] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [message] - A descriptive message providing additional @@ -1560,14 +1049,11 @@ export = OrderPlatformModel; * @typedef ShipmentActionInfo * @property {string[]} [label] * @property {string[]} [invoice] - * @property {Object[]} [failed_shipments] - List of Failed Shipments which - * includes shipment data like shipment items, shipment promise, Shipment - * type, shipment order type, shipment dp options etc. + * @property {Object[]} [failed_shipments] * @property {string[]} [processing_shipments] * @property {string[]} [successful_shipments] * @property {string[]} [invoiceable_shipments] - * @property {Object} [failed_invoiced_shipments] - Specifies the shipment - * records that have encountered issues during the invoicing process. + * @property {Object} [failed_invoiced_shipments] * @property {string[]} [processing_invoice_shipments] * @property {string[]} [successful_invoiced_shipments] */ @@ -1596,7 +1082,7 @@ export = OrderPlatformModel; * bulk action. * @property {number} [updated_ts] - A timestamp (in Unix format) indicating * when the bulk action was last updated. - * @property {string} [status] - Indicates the current status of the bulk action. + * @property {boolean} [status] - Indicates the current status of the bulk action. * @property {string} [store_code] - A code representing the store, which can be * used for internal tracking or identification. * @property {string} [bulk_action_type] - Specifies the type of bulk action @@ -1650,7 +1136,7 @@ export = OrderPlatformModel; * @property {number} [size] - The number of items per page. */ /** - * @typedef BulkListingResponseSchema + * @typedef BulkListingResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {BulkActionListingData[]} [data] - An array containing the details @@ -1676,7 +1162,7 @@ export = OrderPlatformModel; * @property {string} [company_id] - Unique identifier of a company on the platform. */ /** - * @typedef JobDetailsResponseSchema + * @typedef JobDetailsResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {JobDetailsData[]} [data] - An array representing the details of a job. @@ -1694,7 +1180,7 @@ export = OrderPlatformModel; * @property {string} [status] - The current status of the job. */ /** - * @typedef JobFailedResponseSchema + * @typedef JobFailedResponse * @property {string} [file_name] - The name of the file associated with the failed job. * @property {string} [url] - The URL where the uploaded bulk file can be accessed. */ @@ -1829,57 +1315,35 @@ export = OrderPlatformModel; * @property {Manifest[]} [manifest_details] - An array of manifest objects that * provide overarching details about the manifest itself. */ -/** - * @typedef FiltersRequestSchema - * @property {DateRange} [date_range] - * @property {string} [logo] - * @property {number} stores - * @property {string} dp_name - * @property {number} dp_ids - * @property {string} lane - * @property {string} store_name - */ -/** - * @typedef ProcessManifest - * @property {FiltersRequestSchema} filters - * @property {string} action - * @property {string} unique_id - * @property {string} [manifest_id] - */ -/** - * @typedef ProcessManifestResponseSchema - * @property {number} [company_id] - Id of the company. - * @property {Filters} [filters] - * @property {string} [user_id] - Id of the user. - * @property {string} [manifest_id] - Id of the manifest. - * @property {string} [action] - * @property {string} [uid] - * @property {string} [created_by] - */ -/** - * @typedef ProcessManifestItemResponseSchema - * @property {ProcessManifestResponseSchema} [items] - */ /** * @typedef FilterInfoOption - * @property {string} [text] - The display text of the option. - * @property {string} [name] - Name of the option. - * @property {string} [placeholder_text] - Placeholder text of the option. - * @property {string} [value] - The value of the option. - * @property {number} [min_search_size] - Minimum search size of the option. - * @property {boolean} [show_ui] - Specifies whether the option should be shown in the UI. + * @property {string} [text] - The option value or text set for the filter option. + * @property {string} [name] - The option name indicating the type of + * information the filter relates to. + * @property {string} [placeholder_text] - Represents the placeholder text that + * might appear in a UI element. + * @property {string} [value] - A unique value for the filter used in processing + * filter selections. + * @property {number} [min_search_size] - Indicates the minimum size for search + * criteria, potentially related to how many items to display or filter. + * @property {boolean} [show_ui] - Indicates whether this option should be + * visible in the user interface. */ /** * @typedef FiltersInfo - * @property {FilterInfoOption[]} [options] - Options of the filter.[dropdown] - * @property {string} text - Display text of filter - * @property {string} [placeholder_text] - Placeholder text of filter. - * @property {string} value - The value of the filter. - * @property {boolean} [required] - Specifies whether the filter is required or not. - * @property {string} type - Single_select/multi_select - */ -/** - * @typedef ManifestFiltersResponseSchema + * @property {FilterInfoOption[]} [options] + * @property {string} text - The label or name for the filter, which indicates + * what the filter is related to. + * @property {string} [placeholder_text] - A placeholder text that provides + * guidance on how to use the filter. + * @property {string} value - A unique identifier for the filter, used for + * processing filter selections. + * @property {boolean} [required] - Indicates whether the filter is mandatory to + * fill out when applying the filter set. + * @property {string} type - Specifies the type of filter. + */ +/** + * @typedef ManifestFiltersResponse * @property {FiltersInfo[]} [advance_filter] * @property {FiltersInfo[]} [global_filter] */ @@ -1899,15 +1363,11 @@ export = OrderPlatformModel; * @property {string} ack_no * @property {string} irn * @property {string} signed_invoice - * @property {string} signed_qr_code - QR code containing the signed e-invoice - * data for quick and secure verification purposes. + * @property {string} signed_qr_code */ /** * @typedef EInvoiceErrorDetails - * @property {string} [error_code] - Represents an identifier for the specific - * error encountered during the e-invoice generation or processing. This code - * facilitates quick identification and troubleshooting of issues, allowing - * for more efficient resolution. + * @property {string} [error_code] * @property {string} error_message */ /** @@ -1918,15 +1378,7 @@ export = OrderPlatformModel; /** * @typedef EInvoiceResponseData * @property {string} shipment_id - * @property {string} einvoice_type - Defines the category or type of e-invoice - * generated for the shipment. This property must be set to one of the - * following values to qualify the shipment for e-invoice generation. invoice- - * A document detailing the sale, including goods, services, prices, and - * taxes, requesting payment. credit_note- Issued as an adjustment or - * correction to a previously issued invoice. It may indicate a reduction in - * the amount often due to reasons such as returned goods, overbilling, or a - * post-sale discount. A credit note effectively reverses or alters the - * charges outlined in the original invoice, either partially or in full. + * @property {string} einvoice_type * @property {number} status * @property {string} message * @property {EInvoiceDetails} [einvoice_info] @@ -1936,7 +1388,7 @@ export = OrderPlatformModel; * @property {EInvoiceRetryShipmentData[]} [shipments_data] */ /** - * @typedef EInvoiceRetryResponseSchema + * @typedef EInvoiceRetryResponse * @property {EInvoiceResponseData[]} response_data */ /** @@ -1946,21 +1398,13 @@ export = OrderPlatformModel; /** * @typedef EInvoiceErrorResponseData * @property {string} shipment_id - * @property {string} einvoice_type - Defines the category or type of e-invoice - * generated for the shipment. This property must be set to one of the - * following values to qualify the shipment for e-invoice generation. invoice- - * A document detailing the sale, including goods, services, prices, and - * taxes, requesting payment. credit_note- Issued as an adjustment or - * correction to a previously issued invoice. It may indicate a reduction in - * the amount often due to reasons such as returned goods, overbilling, or a - * post-sale discount. A credit note effectively reverses or alters the - * charges outlined in the original invoice, either partially or in full. + * @property {string} einvoice_type * @property {number} status * @property {string} message * @property {EInvoiceErrorInfo} [einvoice_info] */ /** - * @typedef EInvoiceErrorResponseSchema + * @typedef EInvoiceErrorResponse * @property {EInvoiceErrorResponseData[]} [response_data] * @property {string} [message] */ @@ -1972,15 +1416,7 @@ export = OrderPlatformModel; /** * @typedef EInvoiceRetryShipmentData * @property {string} shipment_id - * @property {string} einvoice_type - Defines the category or type of e-invoice - * generated for the shipment. This property must be set to one of the - * following values to qualify the shipment for e-invoice generation. invoice- - * A document detailing the sale, including goods, services, prices, and - * taxes, requesting payment. credit_note- Issued as an adjustment or - * correction to a previously issued invoice. It may indicate a reduction in - * the amount often due to reasons such as returned goods, overbilling, or a - * post-sale discount. A credit note effectively reverses or alters the - * charges outlined in the original invoice, either partially or in full. + * @property {string} einvoice_type */ /** * @typedef CourierPartnerTrackingDetails @@ -2008,7 +1444,7 @@ export = OrderPlatformModel; * @property {string} shipment_id - The unique identifier for the shipment. */ /** - * @typedef CourierPartnerTrackingResponseSchema + * @typedef CourierPartnerTrackingResponse * @property {CourierPartnerTrackingDetails[]} [items] * @property {PageDetails} [page] */ @@ -2030,15 +1466,11 @@ export = OrderPlatformModel; * @property {string} order_id * @property {LogsChannelDetails} channel * @property {LogPaymentDetails} payment - * @property {string} created_at - Created date and time of the failed order. - * @property {string} error_message - A technical description of the error that - * occurred, intended for debugging purposes. - * @property {string} display_message - A user-friendly message that can be - * displayed to the end-user, explaining the failure in a more general and - * understandable manner. + * @property {string} created_at + * @property {string} error_message + * @property {string} display_message * @property {string} method_name - * @property {Object} meta - Meta data of the failed orders that contains - * additional, potentially dynamic information about the order. + * @property {Object} meta */ /** * @typedef FailedOrderLogs @@ -2047,25 +1479,15 @@ export = OrderPlatformModel; */ /** * @typedef FailedOrderLogDetails - * @property {string} error_trace - This field is intended to store the error - * trace of the error that occurred.For example, "Exception Trace" represents - * a placeholder for the actual stack trace data that would be captured when - * an exception occurs."Internal Server Error" indicates a generic error - * message suggesting that the server encountered an unexpected condition that - * prevented it from fulfilling the request. - * @property {string} exception - This field captures the exception raised by - * the system during an Order Failure. It indicates an event that disrupts the - * normal flow of the program's instructions. + * @property {string} error_trace + * @property {string} exception */ /** * @typedef GenerateInvoiceIDResponseData - * @property {string} [shipment_id] - The unique identifier for the shipment - * associated with the invoice. - * @property {boolean} [success] - Indicates whether the API call was successful - * (true) or not (false). - * @property {string} [invoice_id] - The generated invoice ID, or null if the - * generation failed. - * @property {boolean} [error_message] - Provides a descriptive error message. + * @property {string} [shipment_id] + * @property {boolean} [success] + * @property {string} [invoice_id] + * @property {boolean} [error_message] */ /** * @typedef GenerateInvoiceIDErrorResponseData @@ -2076,23 +1498,22 @@ export = OrderPlatformModel; */ /** * @typedef GenerateInvoiceIDRequestSchema - * @property {string[]} shipment_ids - List of shipment IDs for which invoice - * need to be generated. + * @property {string[]} shipment_ids */ /** - * @typedef GenerateInvoiceIDResponseSchema + * @typedef GenerateInvoiceIDResponse * @property {GenerateInvoiceIDResponseData[]} [items] */ /** - * @typedef GenerateInvoiceIDErrorResponseSchema + * @typedef GenerateInvoiceIDErrorResponse * @property {GenerateInvoiceIDErrorResponseData[]} [items] */ /** - * @typedef ManifestResponseSchema + * @typedef ManifestResponse * @property {ManifestItems} [items] */ /** - * @typedef ProcessManifestRequestSchema + * @typedef ProcessManifestRequest * @property {string} action - Represents the operation to be performed on the manifest. * @property {string} [manifest_id] - Represents the identifier for a specific manifest. * @property {Filters} filters @@ -2116,7 +1537,7 @@ export = OrderPlatformModel; * the manifest items. */ /** - * @typedef ManifestErrorResponseSchema + * @typedef ManifestErrorResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [error] - Provides a descriptive error message. @@ -2131,7 +1552,7 @@ export = OrderPlatformModel; * resulted in a new document being inserted. */ /** - * @typedef ConfigUpdatedResponseSchema + * @typedef ConfigUpdatedResponse * @property {ConfigData[]} data - The result of the config update operation, * including whether it was acknowledged, upserted, or inserted. * @property {boolean} success - Indicates whether the config update operation @@ -2204,18 +1625,11 @@ export = OrderPlatformModel; */ /** * @typedef Filter - * @property {string} [order_type] - Defines the specific journey a shipment - * will follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. For example: + * @property {string} [order_type] - Indicates the type or category of the order. * - * - "HomeDelivery": The order goes through all the steps needed for delivery, - * from being packed to arriving at the customer’s address. - * - "PickAtStore": The order is prepared for pickup at the store, skipping - * shipping steps to make it ready faster for the customer to collect in person. - * - "Digital": This order type likely refers to orders that involve digital goods - * or services, such as software, digital subscriptions, e-books, online - * courses, or any other item that can be delivered electronically. + * - PickAtStore: Pick from store + * - HomeDelivery: Home delivery + * - Digital: Digital * * @property {boolean} [is_partial_transition] - Specifies whether a partial * transition of the order is allowed, allowing some components to progress @@ -2224,6 +1638,11 @@ export = OrderPlatformModel; * assignment of a designated person is automatically triggered in the context of ACF. * @property {string} [lock_status] - Indicates the current locking status of * the shipment. + * + * - `complete`: Complete shipment lock + * - `operational`: Operational shipment lock + * - `None`: No lock on shipment + * * @property {boolean} [lock_after_transition] - Specifies whether locking is * required after transitioning to the next status. lock_after_transition : * true - Lock Transition enabled lock_after_transition : false - Lock @@ -2245,21 +1664,31 @@ export = OrderPlatformModel; * check is performed in a point of sale (POS) scenario. * @property {string} [order_platform] - Specifies the platform on which the * order was placed. + * + * - `platform-pos`: POS + * - `platform-site`: WEB + * - `openapi`: OPENAPI + * - `marketplace`: MARKETPLACE + * * @property {string} [refund_type] - Indicates the type of refund associated * with the order. + * + * - `credit_note`: CREDIT_NOTE + * - `source`: SOURCE + * - `bank_transfer`: BANK + * - `manual_refund`: MANUAL_REFUND + * * @property {boolean} [is_non_pos_platform] - Specifies whether the platform is * non-point of sale (POS) in nature. * @property {boolean} [is_self_ship] - Indicates whether the order is * self-shipped by the seller. - * @property {string} [seller_country_code] - Specifies the country code of the - * seller in ISO 3166-1 alpha-2 format. + * @property {string} [seller_country_code] - Specifies the country code of the seller. * * - `seller_country_code`: US * - `seller_country_code`: UK * - `seller_country_code`: IN * - * @property {string} [customer_country_code] - Specifies the country code of - * the seller in ISO 3166-1 alpha-2 format. + * @property {string} [customer_country_code] - Specifies the country code of the seller. * * - `customer_country_code`: US * - `customer_country_code`: UK @@ -2276,15 +1705,13 @@ export = OrderPlatformModel; * @typedef PostHook * @property {string} task - Name of the hook that has to be added * @property {Object} [kwargs] - Additional parameters for the hook - * @property {Filter} [filters] - Criteria to filter which hooks are applied - * based on certain conditions. + * @property {Filter} [filters] - Filters for scope selection. */ /** * @typedef PreHook * @property {string} task - Name of the hook that has to be added * @property {Object} [kwargs] - Additional parameters for the hook - * @property {Filter} [filters] - Criteria to filter which hooks are applied - * based on certain conditions. + * @property {Filter} [filters] - Filter */ /** * @typedef Config @@ -2319,207 +1746,16 @@ export = OrderPlatformModel; * @property {TransitionConfigData} [data] */ /** - * @typedef RuleListRequestSchema - * @property {number} [page_no] - The page number to be retrieved. This - * determines the starting point for the list of rules to be returned. - * @property {string[]} [channel] - An array of channel (application ID) - * identifiers. These channels represent the specific application contexts for - * which the rules are being requested. - * @property {string[]} [department] - An array of department identifiers. The - * rules returned will be applicable to these specified departments. - * @property {string[]} [id] - An array of rule identifiers. This allows for - * retrieving specific rules based on their unique IDs. - * @property {boolean} [is_active] - Indicates whether the rules to be retrieved - * are active. This flag helps filter the rules based on their current status. - */ -/** - * @typedef RuleErrorResponseSchema - * @property {boolean} [success] - A flag that indicates whether the request was - * successful. It returns `false` if an error occurred. - * @property {string} [error] - The error message that provides details about - * why the request failed. - */ -/** - * @typedef RMAPageInfo - * @property {string} [type] - The type of pagination used. Common values could - * be "number" for numeric pagination, which indicates that the pages are - * numbered sequentially. - * @property {number} [current] - The current page number being displayed. This - * reflects the page of data currently being viewed. - * @property {number} [size] - The number of items per page. This sets the limit - * on how many rule items are shown on each page. - * @property {number} [item_total] - The total number of items available. This - * provides an overview of the entire dataset from which the rules are being paginated. - * @property {boolean} [has_previous] - Indicates whether there are previous - * pages available before the current page. It helps in navigating backward - * through the data. - * @property {boolean} [has_next] - Indicates whether there are more pages - * available after the current page. It helps in determining if there is more - * data to be viewed. - */ -/** - * @typedef RuleAction - * @property {Reason[]} [reasons] - */ -/** - * @typedef QuestionSetItem - * @property {number} id - The unique identifier for the question. This ID is - * used to distinguish between different questions. - * @property {string} display_name - The display name or text of the question. - * This is what is shown to the user during interactions. - */ -/** - * @typedef Reason - * @property {number} [id] - A unique identifier for the reason. - * @property {string} display_name - The display name for the reason, used for - * user-facing purposes. - * @property {Reason[]} [reasons] - A list of sub-reasons under the main reason. - * These provide additional layers of granularity to the main reason. - * @property {string[]} qc_type - List of QC (Quality Control) types -- having - * return reason types indicating the stage at which QC is performed. - - * "Doorstep QC" refers involves inspecting products for damages at the - * customer's location before delivery. - "Pre QC" requires customers to - * upload product photos for a preliminary quality check by the operations - * team before a return or exchange pickup is arranged, ensuring criteria are - * met and optimizing logistics. - * @property {QuestionSet[]} question_set - An array of question sets linked to - * the reason, defining the questions to be answered. - * @property {Object} meta - Meta object of the reason. This contains any - * additional metadata that might be relevant to the reason. - * @property {boolean} is_active - Indicates whether the reason is currently - * active. Active reasons are those that are currently in use within the system. - */ -/** - * @typedef Conditions - * @property {string} [department] - The department ID to which the rule - * applies. This helps in filtering the rules based on specific departments. - * @property {string} [l3] - The Level 3 category ID to which the rule applies. - * This further refines the application of the rule within a specific category. - */ -/** - * @typedef RuleItem - * @property {string} id - The unique identifier for the rule item. This ID is - * essential for referencing and managing individual rules. - * @property {string} entity_type - The type of entity the rule applies to, such - * as "department" or "l3". This specifies the scope of the rule. - * @property {string} value - The value associated with the entity type, such as - * a department ID or L3 category ID. This value determines the specific - * context in which the rule is applied. - * @property {string} channel - The channel (application ID) to which the rule - * applies. This links the rule to a specific sales channel or application. - * @property {RuleAction} actions - The actions and reasons associated with the - * rule. These define what happens when the rule is triggered. - * @property {boolean} qc_enabled - Indicates whether quality checks are enabled - * for this rule. If enabled, the rule includes quality control mechanisms. - * @property {boolean} is_deleted - Indicates whether the rule is deleted. - * Deleted rules are no longer active or enforceable. - * @property {Conditions} conditions - * @property {Object} meta - Metadata associated with the rule. This provides - * additional context and information related to the rule. - * @property {string} rule_type - The type of rule, such as "custom" or - * "global". This specifies whether the rule is a custom one or a global standard. - * @property {boolean} is_active - Indicates whether the rule is currently - * active. Active rules are those that are currently being enforced. - */ -/** - * @typedef RuleError - * @property {string} type - The type of error encountered. This could be - * related to validation, processing, or other issues. - * @property {string} value - A specific value related to the error. This - * provides context to the error, such as which input was problematic. - * @property {string} message - The error message that describes what went - * wrong. This message is intended for developers or users to understand the issue. - */ -/** - * @typedef RuleListResponseSchema - * @property {RMAPageInfo} [page] - Provides information about the pagination of - * the rule list. This includes details like the current page, the total - * number of items, and whether there are previous or next pages available. - * @property {RuleItem[]} [items] - A list of rule items included in the - * response. Each item represents a specific RMA rule, detailing its unique - * identifier, entity type, associated actions, conditions, and other relevant - * attributes. This list is essential for understanding the individual rules - * that are applied within the system for return merchandise authorization. - * @property {boolean} [success] - Indicates whether the request was successful. - * A value of `true` means the rules were retrieved successfully, while - * `false` indicates an error occurred during the request. - * @property {RuleError} [error] - Contains error details if the request was not - * successful. This includes the type of error, the value that caused the - * issue, and a message explaining the error. These details help in diagnosing - * and resolving issues that may arise when retrieving the rules. - */ -/** - * @typedef UpdateShipmentPaymentMode - * @property {string} shipment_id - Unique identifier used to filter the shipment. - * @property {ProductSchema[]} [products] - List of products attached with the - * shipment against which the payment methods needs to be overridden. - * @property {PaymentMethodSchema[]} [payment_methods] - List of payment methods - * that needs to be updated on shipment level. - */ -/** - * @typedef CommonErrorResponseSchema + * @typedef CommonErrorResponse * @property {number} [status] - The HTTP status code corresponding to the error. * @property {string} [message] - A message describing the error that occurred. */ /** - * @typedef ExceptionErrorResponseSchema + * @typedef ExceptionErrorResponse * @property {string} [message] - A message describing the error that occurred. * @property {string} [exception] - The class path of the exception that was thrown. * @property {string} [stack_trace] - The stack trace from the server for the error. */ -/** - * @typedef ProductSchema - * @property {number} line_number - The line number of a product used to - * uniquely identify and filter the specific product within the shipment. - * @property {PaymentMethodSchema[]} payment_methods - List of payment methods - * that needs to be updated against filtered product. - */ -/** - * @typedef PaymentMethodSchema - * @property {string} name - The name of the payment method (e.g., "Credit - * Card", "PayPal"). - * @property {string} mode - The mode of payment (e.g., "PREPAID", "COD"). - * @property {number} amount - The amount to be paid using this payment method. - * @property {PaymentMetaDataSchema} [meta] - * @property {string} identifier - Unique identifier for this payment method. - * @property {string} display_name - The name to be displayed for this payment method. - * @property {string} aggregator - The payment aggregator or service provider - * used for this payment method. - * @property {ActionDetailSchema} action - * @property {string} refund_by - Payment refund by for the customer and seller - * (e.g fynd, seller). - * @property {string} collect_by - Payment collected by for the customer and - * seller (e.g fynd, seller). - */ -/** - * @typedef ActionDetailSchema - * @property {Object} name - The type of action to be performed (currently only - * "override" is supported). - * @property {string} current_mode - The current payment mode before the action - * is applied. - * @property {string} current_identifier - The current identifier of the payment - * method before the action is applied. - * @property {string} [refund_to] - Specifies where the refund should be - * directed to, if applicable. - */ -/** - * @typedef PaymentMetaDataSchema - * @property {string} [payment_gateway] - The name or identifier of the payment - * gateway used. - * @property {string} [payment_identifier] - A unique identifier for this - * payment transaction. - * @property {PaymentMetaLogoURLSchema} [logo_url] - */ -/** - * @typedef PaymentMetaLogoURLSchema - * @property {string} large - URL for the large version of the payment method's logo. - * @property {string} small - URL for the small version of the payment method's logo. - */ -/** - * @typedef ValidationError - * @property {string} message - A brief description of the error encountered. - * @property {string} field - The field in the request that caused the error. - */ /** * @typedef Page * @property {number} [item_total] - The total number of items on the page. @@ -2532,781 +1768,382 @@ export = OrderPlatformModel; */ /** * @typedef BagReasonMeta - * @property {boolean} [show_text_area] - Indicates whether a text area should - * be displayed for additional input related to the bag reason. + * @property {boolean} [show_text_area] */ /** * @typedef QuestionSet - * @property {number} [id] - A unique identifier for the question set. - * @property {string} [display_name] - The display name for the question set, - * used for user-facing purposes. + * @property {number} [id] + * @property {string} [display_name] */ /** * @typedef BagReasons - * @property {string[]} [qc_type] - List of QC (Quality Control) types -- having - * return reason types indicating the stage at which QC is performed. - - * "Doorstep QC" refers involves inspecting products for damages at the - * customer's location before delivery. - "Pre QC" requires customers to - * upload product photos for a preliminary quality check by the operations - * team before a return or exchange pickup is arranged, ensuring criteria are - * met and optimizing logistics. - * @property {number} [id] - A unique identifier for the bag reason. - * @property {string} [display_name] - The display name for the bag reason, used - * for user-facing purposes. + * @property {string[]} [qc_type] + * @property {number} [id] + * @property {string} [display_name] * @property {BagReasonMeta} [meta] - * @property {QuestionSet[]} [question_set] - An array of question sets linked - * to the bag reason, defining the questions to be answered. - * @property {BagReasons[]} [reasons] - An array of nested bag reasons that can - * further explain the primary reason. + * @property {QuestionSet[]} [question_set] + * @property {BagReasons[]} [reasons] */ /** * @typedef ShipmentBagReasons - * @property {BagReasons[]} [reasons] - List of bag reasons for a shipment with - * a corresponding shipment status. - * @property {boolean} [success] - Indicates whether the API call was successful - * (true) or not (false). - * @property {number} [rule_id] - The unique identifier for the rule that is - * associated with the given reasons. This ID serves as a reference to the - * specific rule within the RMA system that governs or influences the reasons listed. + * @property {BagReasons[]} [reasons] + * @property {boolean} [success] */ /** * @typedef ShipmentStatus - * @property {string} [current_shipment_status] - The current status of the shipment. - * @property {Object} [meta] - It contains the additional properties related to - * shipment status transition like Kafka_emission_status, user_name, etc. - * Additionally it is dynamic. - * @property {number} [id] - A unique identifier for the shipment status. - * @property {string[]} [bag_list] - A list of bags associated with the - * shipment, useful for tracking individual items within the shipment. - * @property {string} title - A brief title or label for the shipment status, - * summarizing its current state. - * @property {string} [display_name] - A user-friendly name or identifier for - * the shipment status. - * @property {string} [created_at] - Timestamp when the shipment was initially - * created.This timestamp is crucial for tracking the shipment's age, - * scheduling, and historical analysis. - * @property {string} [created_ts] - A general timestamp for when the shipment - * was created, formatted for internal processing. - * @property {string} [shipment_id] - A unique identifier for the shipment. - * @property {string} [status_created_at] - Timestamp when the transition for - * the status of the shipment was created. Date time in UTC timezone as per ISO format. - * @property {string} [updated_ts] - A general timestamp indicating when the - * status was updated, useful for processing and tracking. - * @property {string} status - This key denotes the status of the shipment, - * providing a clear indication of its current processing stage. + * @property {string} [current_shipment_status] + * @property {Object} [meta] + * @property {number} [shipment_status_id] + * @property {string[]} [bag_list] + * @property {string} title + * @property {string} [created_at] + * @property {string} [created_ts] + * @property {string} [shipment_id] + * @property {string} [status_created_at] + * @property {string} [status_created_ts] + * @property {string} status */ /** * @typedef UserDataInfo - * @property {number} [id] - The unique identifier associated with the user. - * @property {string} [user_oid] - The object ID for the user, used for - * referencing the user in various operations. - * @property {string} [mongo_user_id] - The identifier for the user. - * @property {string} [external_customer_id] - The identifier for the user in - * external systems. - * @property {string} [first_name] - The first name of the user. - * @property {string} [last_name] - The last name of the user. - * @property {string} [mobile] - The mobile phone number of the user. - * @property {string} [email] - The email address of the user. - * @property {string} [meta] - Additional metadata related to the user. - * @property {boolean} [is_anonymous_user] - Indicates whether the user is an - * anonymous user (true) or registered (false). - * @property {string} [name] - A full name of the user, which may be a - * combination of first and last name. - * @property {string} [gender] - The gender of the user. - * @property {string} [country_phone_code] - The country-specific phone code, - * useful for formatting mobile numbers correctly. - */ -/** - * @typedef Address - * @property {string} [phone] - The phone number at the address, used for - * contact purposes. - * @property {string} [address2] - An optional additional field for the street - * address of the address. - * @property {string} [address] - An optional additional field for the street - * address of the address. - * @property {number} [longitude] - The longitude coordinate of the address. - * @property {string} [pincode] - The postal code of the address. - * @property {string} [area] - Area details of the address. - * @property {string} [address_type] - The type of the address. - * @property {string} [country] - The name of the country of the address. - * @property {string} [address_category] - Category or classification of the - * address. The address_category field that includes "store", "delivery", and - * "billing" serves to classify addresses based on various business processes. - * addresses based on various business processes - * - * - 'store': Identifies addresses associated with physical retail locations or - * warehouses which is essential for inventory management, order - * fulfillment, and facilitating in-store pickups or returns. - * - 'delivery': Identifies addresses where orders are shipped to customers which - * ensures successful delivery, enhancing customer satisfaction, and - * optimizing logistics operations. - * - 'billing': Identifies addresses used for billing and financial transactions - * which are essential for payment processing, invoice generation, and - * maintaining financial accuracy - * - * @property {string} [email] - The email of the person associated with the order. - * @property {string} [created_at] - Created at date for address - * @property {string} [address1] - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like {address} {address2} - * {area} {state} {country}, Address1 compiles all into a single formatted string. - * @property {string} [display_address] - A formatted version of the address for - * display purposes. - * @property {string} [landmark] - A notable landmark near the address, aiding - * in location identification. - * @property {string} [updated_at] - Updated at date for address - * @property {string} [version] - The version number of the address record - * @property {number} [latitude] - The latitude coordinate of the address. - * @property {string} [contact_person] - The full name of the person associated - * with the address. - * @property {string} [state] - The name of the region (for example, province, - * state, or prefecture) of the address. - * @property {string} [city] - The city, town of the address. - * @property {string} [area_code_slug] - A slug representation of the area code. - * @property {string} [country_code] - A code representing the country for the address. - * @property {string} [country_iso_code] - The ISO code representing the country - * for the address. - * @property {string} [country_phone_code] - The country-specific phone code for - * formatting phone numbers. - * @property {string} [delivery_address_id] - A unique identifier for the - * delivery address. - * @property {Object} [geo_location] - An object containing additional - * geographical information related to the address. - * @property {string} [name] - A unique identifier for the name associated with - * the address. - * @property {string} [sector] - The sector or zone of the address, if applicable. - * @property {string} [state_code] - A code representing the state or region for - * the address. - * @property {string} [uid] - A unique identifier for the user associated with - * the address. - * @property {string} [user_id] - The unique identifier of the user in the system. + * @property {number} [uid] + * @property {string} [user_oid] + * @property {string} [external_customer_id] + * @property {string} [first_name] + * @property {string} [last_name] + * @property {string} [mobile] + * @property {string} [email] + * @property {boolean} [is_anonymous_user] + * @property {string} [avis_user_id] + * @property {string} [name] + * @property {string} [gender] + */ +/** + * @typedef PlatformDeliveryAddress + * @property {string} [phone] + * @property {string} [address2] + * @property {number} [longitude] + * @property {string} [pincode] + * @property {string} [area] + * @property {string} [address_type] + * @property {string} [country] + * @property {string} [address_category] + * @property {string} [email] + * @property {string} [created_at] + * @property {string} [address1] + * @property {string} [display_address] + * @property {string} [landmark] + * @property {string} [updated_at] + * @property {string} [version] + * @property {number} [latitude] + * @property {string} [contact_person] + * @property {string} [state] + * @property {string} [city] */ /** * @typedef ShipmentListingChannel - * @property {string} [channel_shipment_id] - A unique identifier for the - * shipment associated with a specific channel, facilitating tracking and management. - * @property {boolean} [is_affiliate] - Indicates whether the shipment is - * associated with an affiliate program, which may affect processing and fulfillment. - * @property {string} [logo] - A URL or path to the logo of the shipment - * channel, used for branding and identification purposes. - * @property {string} [name] - The name of the shipment channel, providing a - * human-readable reference for the channel through which the shipment is processed. + * @property {string} [channel_shipment_id] + * @property {boolean} [is_affiliate] + * @property {string} [logo] + * @property {string} [name] */ /** * @typedef Prices - * @property {number} [refund_credit] - Refund credits applicable to the - * customer in case of returns or cancellations. - * @property {number} [amount_paid_roundoff] - Total amount paid, rounded off to - * the nearest integer. - * @property {number} [price_effective] - Effective price after applying - * discounts to the MRP (Maximum Retail Price). - * @property {number} [promotion_effective_discount] - Discount amount provided - * through promotions applicable to the purchase. - * @property {number} [pm_price_split] - Updated selling price of the product in - * the event of repricing. - * @property {number} [refund_amount] - Total amount to be refunded in case of - * cancellation or return. - * @property {number} [transfer_price] - Fixed selling price applicable for - * payouts by the brand to the platform. - * @property {number} [coupon_effective_discount] - Discount amount applicable - * when using a coupon. - * @property {number} [tax_collected_at_source] - Tax amount collected at the - * source during the transaction. - * @property {number} [brand_calculated_amount] - Calculated price after - * deducting coupon and promotion discounts from the effective price. - * @property {number} [delivery_charge] - Fee charged for delivery, as - * stipulated by the delivery partner. - * @property {number} [cashback] - Cashback points or amount provided to the - * customer post-purchase. - * @property {number} [value_of_good] - Effective selling price minus the GST - * amount applicable to the product. - * @property {number} [cashback_applied] - Actual cashback value that has been - * applied to the purchase. - * @property {number} [cod_charges] - Charges applicable for Cash on Delivery - * (COD) orders. - * @property {number} [price_marked] - The marked price of the item before any - * discounts or adjustments. - * @property {number} [amount_paid] - Total amount actually paid by the customer - * for the purchase. - * @property {number} [coupon_value] - The effective value of the coupon applied - * to the transaction. - * @property {number} [discount] - Total discount amount deducted from the - * original price of the product. - * @property {number} [fynd_credits] - Credits awarded by Fynd, which can be - * used for future purchases. - * @property {number} [gift_price] - The amount associated with any gift card - * used in the transaction. - * @property {number} [amount_to_be_collected] - Total amount to be collected in - * scenarios involving multiple payment methods. - */ -/** - * @typedef ChargeDistributionSchema - * @property {string} type - This field defines the distribution type, e.g - * values('multi', 'single') multi: distribute the changes across all entity - * single: distribute the changes across to any one single entity - * @property {string} logic - This field defines the distribution logic e.g - * values('apportion', 'equally') apportion: distribute charge amount based of - * weighted average amount of all the entity (like article with [10, 20] will - * get charge of 9 as [3, 6]) equally: distribute charge amount 'equally' to - * all the entity - */ -/** - * @typedef ChargeDistributionLogic - * @property {ChargeDistributionSchema} distribution - * @property {string} distribution_level - This field defines the distribution - * level, e.g distribution level is (order, shipment, article) - */ -/** - * @typedef ChargeAmountCurrency - * @property {number} value - Charge currency value or amount - * @property {string} currency - Charge currency code - */ -/** - * @typedef ChargeAmount - * @property {ChargeAmountCurrency} base_currency - * @property {ChargeAmountCurrency} ordering_currency - */ -/** - * @typedef PriceAdjustmentCharge - * @property {string} [code] - Code defined for charge - * @property {string} name - Display name for charge (charge is unique by the name) - * @property {string} [type] - Type defined for charge - * @property {ChargeAmount} amount - * @property {ChargeDistributionLogic} distribution_logic - */ -/** - * @typedef OrderingCurrencyPrices - * @property {number} [refund_credit] - Amount of refund credits applicable to - * the customer's account for returned items or cancellations. - * @property {number} [amount_paid_roundoff] - Total amount paid by the - * customer, rounded off to the nearest integer for ease of processing. - * @property {number} [price_effective] - Final effective price of the product - * after applying discounts to the marked retail price (MRP). - * @property {number} [promotion_effective_discount] - Total discount amount - * applied through promotional offers specific to the customer's purchase. - * @property {number} [pm_price_split] - Updated selling price of the product - * after any repricing adjustments made before the sale. - * @property {number} [refund_amount] - Amount that will be refunded to the - * customer in case of order cancellation or product return. - * @property {number} [transfer_price] - Fixed price set for payouts by the - * brand, representing the cost to the retailer or affiliate. - * @property {number} [coupon_effective_discount] - Discount value realized - * through the use of a coupon code applied at the time of purchase. - * @property {number} [tax_collected_at_source] - Total tax amount that is - * collected at the point of sale, often applicable for tax regulations. - * @property {number} [brand_calculated_amount] - Amount calculated by the brand - * after applying any relevant coupons and promotions to the base price. - * @property {number} [delivery_charge] - Cost charged for the delivery service, - * as determined by the delivery partner handling the shipment. - * @property {number} [cashback] - Points or monetary value returned to the - * customer as a reward for their purchase, which can be used for future transactions. - * @property {number} [value_of_good] - Net selling price of the product after - * excluding the GST (Goods and Services Tax) amount from the total. - * @property {number} [cashback_applied] - Total cashback value that has been - * applied to the customer's account or to the current transaction. - * @property {number} [cod_charges] - Additional fee charged for orders placed - * via cash on delivery (COD) payment method. - * @property {number} [price_marked] - The original price indicated for the - * product before any discounts or promotions are applied. - * @property {number} [amount_paid] - The total amount the customer has paid for - * their order, including all applicable charges and discounts. - * @property {number} [coupon_value] - The specific value of the coupon used in - * the transaction, reflecting its impact on the total price. - * @property {number} [discount] - Total amount discounted from the original - * price of the product, reflecting savings for the customer. - * @property {number} [fynd_credits] - Credits provided by Fynd, which can be - * used for discounts on future purchases. - * @property {number} [gift_price] - Monetary value assigned to a gift card - * purchased by the customer, usable for future transactions. - * @property {number} [amount_to_be_collected] - Amount to be collected from the - * customer when multiple payment methods are utilized for a single order. + * @property {number} [refund_credit] + * @property {number} [amount_paid_roundoff] + * @property {number} [price_effective] + * @property {number} [promotion_effective_discount] + * @property {number} [pm_price_split] + * @property {number} [refund_amount] + * @property {number} [transfer_price] + * @property {number} [coupon_effective_discount] + * @property {number} [tax_collected_at_source] + * @property {number} [brand_calculated_amount] + * @property {number} [delivery_charge] + * @property {number} [cashback] + * @property {number} [value_of_good] + * @property {number} [cashback_applied] + * @property {number} [cod_charges] + * @property {number} [price_marked] + * @property {number} [amount_paid] + * @property {number} [coupon_value] + * @property {number} [discount] + * @property {number} [fynd_credits] + * @property {number} [gift_price] + * @property {number} [amount_to_be_collected] */ /** * @typedef Identifier - * @property {string} [alu] - The ALU (Article Level Unit) code used to identify - * the item at a detailed level, often specific to certain retail or - * distribution systems. - * @property {string} [ean] - The European Article Number (EAN) is a unique - * identifier for products, primarily used in retail and logistics. It helps - * in tracking and managing inventory across various platforms. - * @property {string} [sku_code] - The Stock Keeping Unit (SKU) code of the item - * - uniquely identifies each distinct product. SKUs are used to track - * inventory levels, facilitate accurate stocktaking, and streamline order - * fulfillment processes. This code is essential for inventory management, - * allowing for the differentiation between products based on attributes such - * as price, color, and size. - * @property {string} [upc] - The Universal Product Code (UPC) is a barcode - * symbol used for tracking trade items in stores. It is widely used in North - * America and helps in identifying products quickly during point-of-sale transactions. - * @property {string} [isbn] - The International Standard Book Number (ISBN) is - * a unique identifier for books, allowing for easier management and tracking - * of book inventories in retail and library systems. + * @property {string} [alu] + * @property {string} [ean] + * @property {string} [sku_code] + * @property {string} [upc] + * @property {string} [isbn] */ /** * @typedef FinancialBreakup - * @property {number} refund_credit - The amount of refund credits applicable - * for the transaction. - * @property {number} [amount_paid_roundoff] - Total amount paid, rounded off to - * the nearest integer for billing purposes. - * @property {number} price_effective - The effective price after applying - * discounts and before any taxes. - * @property {number} promotion_effective_discount - The amount of discount - * applied from promotional offers. - * @property {number} transfer_price - The fixed selling price applicable for - * payouts by the brand. - * @property {number} coupon_effective_discount - The discount applied through a - * coupon code, if applicable. - * @property {number} gst_fee - Total Goods and Services Tax (GST) fee charged - * on the goods or services. - * @property {number} [tax_collected_at_source] - Tax amount collected at the - * source of income or transaction. - * @property {number} brand_calculated_amount - Amount calculated by the brand, - * possibly reflecting various costs or fees. - * @property {number} delivery_charge - Fee applicable for the delivery of the goods. - * @property {string} gst_tag - A tag used to denote GST-related attributes or - * classifications. - * @property {string} hsn_code - The HSN Code (Harmonized System of Nomenclature - * Code) is an internationally standardized system for classifying goods, used - * in trade and commerce for uniform identification across different countries. - * @property {number} cashback - The cashback amount provided to the customer, - * if applicable. - * @property {string} item_name - The name or description of the item related to - * the financial breakup. - * @property {number} value_of_good - The assessed value of the goods before - * applying any taxes or fees. - * @property {number} cashback_applied - The effective cashback value that has - * been applied to the transaction. - * @property {number} cod_charges - Charges applicable for Cash on Delivery (COD) orders. - * @property {number} price_marked - The indicated price or value assigned to an - * item before any discounts or adjustments. - * @property {string} size - The size of the item, if applicable. - * @property {number} amount_paid - Total amount paid by the customer for the transaction. - * @property {number} coupon_value - The effective value of the coupon used in - * the transaction. - * @property {number} discount - Total amount discounted from the original price - * of the goods. - * @property {number} fynd_credits - Credits provided by Fynd to the customer, - * possibly as part of a rewards program. - * @property {number} gst_tax_percentage - The percentage of GST applicable on - * the goods or services. - * @property {number} [amount_to_be_collected] - Amount to be collected in case - * of multiple modes of payments. - * @property {Identifier} identifiers - * @property {number} total_units - The total number of units involved in the transaction. - * @property {boolean} added_to_fynd_cash - Indicates whether the amount has - * been added to Fynd cash for future use. - */ -/** - * @typedef GSTDetailsData - * @property {number} [cgst_tax_percentage] - The percentage of Central Goods - * and Services Tax (CGST) applicable on the goods or services. - * @property {string} [gstin_code] - A GST Number (Goods and Services Tax - * Identification Number, often abbreviated as GSTIN) is a unique identifier - * assigned to a business or individual registered under the Goods and - * Services Tax (GST) system in countries like India. The GST number is - * essential for businesses to comply with tax regulations and for the - * government to track tax payments and returns. - * @property {number} value_of_good - The assessed value of the goods before - * applying any taxes or fees. - * @property {number} gst_fee - The total GST fee charged on the goods or services. - * @property {number} [igst_tax_percentage] - The percentage of Integrated Goods - * and Services Tax (IGST) applicable for inter-state transactions. - * @property {number} [gst_tax_percentage] - The overall GST tax percentage - * applicable to the goods or services. - * @property {string} [hsn_code_id] - Unique identifier for the Harmonized - * System of Nomenclature (HSN) code used to classify goods. - * @property {number} [igst_gst_fee] - The GST fee applicable for IGST, usually - * for inter-state transactions. - * @property {boolean} [is_default_hsn_code] - Indicates whether this HSN code - * is the default classification for the goods. - * @property {number} [sgst_gst_fee] - The GST fee applicable for State Goods - * and Services Tax (SGST). - * @property {number} tax_collected_at_source - Tax amount collected at the - * source of income or transaction, often for compliance and revenue tracking. - * @property {number} brand_calculated_amount - Amount calculated by the brand, - * potentially reflecting costs, fees, or pricing structures. - * @property {number} [cgst_gst_fee] - The GST fee applicable for CGST. - * @property {string} [gst_tag] - A tag or label used to denote GST-related - * attributes or classifications. - * @property {number} [sgst_tax_percentage] - The percentage of State Goods and - * Services Tax (SGST) applicable on the goods or services. - * @property {string} [hsn_code] - The HSN Code (Harmonized System of - * Nomenclature Code) is an internationally standardized system for - * classifying goods. It is used in trade and commerce to identify products - * and services uniformly across different countries and industries. The - * system was developed by the World Customs Organization (WCO) and is widely - * used in customs processes and tax systems. - */ + * @property {number} refund_credit + * @property {number} [amount_paid_roundoff] + * @property {number} price_effective + * @property {number} promotion_effective_discount + * @property {number} transfer_price + * @property {number} coupon_effective_discount + * @property {number} gst_fee + * @property {number} [tax_collected_at_source] + * @property {number} brand_calculated_amount + * @property {number} delivery_charge + * @property {string} gst_tag + * @property {string} hsn_code + * @property {number} cashback + * @property {string} item_name + * @property {number} value_of_good + * @property {number} cashback_applied + * @property {number} cod_charges + * @property {number} price_marked + * @property {string} size + * @property {number} amount_paid + * @property {number} coupon_value + * @property {number} discount + * @property {number} fynd_credits + * @property {number} gst_tax_percentage + * @property {number} [amount_to_be_collected] + * @property {Identifier} identifiers + * @property {number} total_units + * @property {boolean} added_to_fynd_cash + */ +/** + * @typedef GSTDetailsData + * @property {number} [cgst_tax_percentage] + * @property {string} [gstin_code] + * @property {number} value_of_good + * @property {number} gst_fee + * @property {number} [igst_tax_percentage] + * @property {number} [gst_tax_percentage] + * @property {string} [hsn_code_id] + * @property {number} [igst_gst_fee] + * @property {boolean} [is_default_hsn_code] + * @property {number} [sgst_gst_fee] + * @property {number} tax_collected_at_source + * @property {number} brand_calculated_amount + * @property {number} [cgst_gst_fee] + * @property {string} [gst_tag] + * @property {number} [sgst_tax_percentage] + * @property {string} [hsn_code] + */ /** * @typedef BagStateMapper - * @property {boolean} [is_active] - Indicates whether the state is currently - * active in the shipment process. - * @property {string} [app_display_name] - Display name used in the application - * to represent this state. - * @property {string} state_type - Serves as a key identifier to differentiate - * among the diverse types of states a shipment can undergo throughout its journey. - * - * - 'operational': Pertains to states that involve the physical handling and - * movement of the shipment, such as packing, in transit, and delivery. - * - 'financial': Relates to states associated with the payment, invoicing, and - * any monetary transactions or obligations tied to the shipment. - * - 'logistics': Encompasses states that deal with the broader logistical - * planning and coordination necessary for the shipment's journey, - * including route optimization and carrier selection. - * + * @property {boolean} [is_active] + * @property {string} [app_display_name] + * @property {string} state_type * @property {number} id - * @property {string} journey_type - It is a type being used to represent the - * journey of shipment through the performed status transition. Forward - * Journey: The forward journey encompasses all the stages of shipping, - * including order placement, packing, dispatch, in-transit updates, and - * delivery. Return Journey: Contrary to the forward journey, the return - * journey involves the process of sending items back from the customer to the - * original sender or a designated return facility. - * @property {string} [app_state_name] - The name of the state as used within - * the application, providing a clear reference. - * @property {string} name - Official name of the state in the context of the - * shipment process. - * @property {boolean} [app_facing] - Indicates if this state is visible to the - * customer in the application. - * @property {boolean} [notify_customer] - Indicates whether the customer should - * be notified upon reaching this state. - * @property {string} display_name - User-friendly name for the state, suitable - * for display purposes. + * @property {string} journey_type + * @property {string} [app_state_name] + * @property {string} name + * @property {boolean} [app_facing] + * @property {boolean} [notify_customer] + * @property {string} display_name */ /** * @typedef BagStatusHistory - * @property {boolean} [forward] - Indicates whether the bag is being forwarded - * to the next stage in the shipment process. - * @property {number} [store_id] - Unique identifier for the store associated - * with the bag's current status. - * @property {string} [delivery_awb_number] - The Air Waybill (AWB) number used - * for tracking the delivery of the bag. - * @property {boolean} [kafka_sync] - Indicates if the status update has been - * synchronized with Kafka for real-time processing. - * @property {number} [delivery_partner_id] - Identifier for the delivery - * partner responsible for the shipment. - * @property {string} [app_display_name] - The display name of the application - * that is handling the bag status update. - * @property {number} [state_id] - Unique identifier for the current state of - * the bag in the shipment process. - * @property {string} [state_type] - Serves as a key identifier to differentiate - * among the diverse types of states a shipment can undergo throughout its journey. - * @property {number} [bsh_id] - Unique identifier for the bag status history entry. - * @property {string} [created_at] - Timestamp when the bag status history - * transaction was created. - * @property {string} [created_ts] - Timestamp of creation in a different - * format, if applicable. - * @property {string} [shipment_id] - Identifier for the shipment associated - * with this bag status entry. - * @property {string} [updated_at] - Timestamp when the bag status history - * transaction was last updated. - * @property {string} [updated_ts] - Timestamp of last update in a different - * format, if applicable. + * @property {boolean} [forward] + * @property {number} [store_id] + * @property {string} [delivery_awb_number] + * @property {boolean} [kafka_sync] + * @property {number} [delivery_partner_id] + * @property {string} [app_display_name] + * @property {number} [state_id] + * @property {string} [state_type] + * @property {number} [bsh_id] + * @property {string} [created_at] + * @property {string} [created_ts] + * @property {string} [shipment_id] + * @property {string} [updated_at] + * @property {string} [updated_ts] * @property {BagStateMapper} [bag_state_mapper] - * @property {number} [bag_id] - Unique identifier for the bag whose status is - * being tracked. - * @property {Object[]} [reasons] - List of reasons associated with the current - * status of the bag. - * @property {string} status - Current status of the bag in the shipment process. - * @property {string} [display_name] - User-friendly name that describes the - * current state of the bag. + * @property {number} [bag_id] + * @property {Object[]} [reasons] + * @property {string} status + * @property {string} [display_name] */ /** * @typedef Dimensions - * @property {number} [height] - The height measurement of the object, typically - * representing the vertical dimension. - * @property {number} [width] - The width measurement of the object, indicating - * the horizontal dimension. - * @property {boolean} [is_default] - A flag indicating whether these dimensions - * are the default measurements for the object. - * @property {string} [unit] - The unit of measurement used for the dimensions - * (e.g., centimeters, inches). - * @property {number} [length] - The length measurement of the object, - * representing the longest dimension. + * @property {number} [height] + * @property {number} [width] + * @property {boolean} [is_default] + * @property {string} [unit] + * @property {number} [length] */ /** * @typedef ReturnConfig - * @property {boolean} [returnable] - Indicates whether the article is eligible - * for return, allowing customers to send it back under specified conditions. - * @property {number} [time] - The time frame within which the return must be - * initiated, typically measured in days. - * @property {string} [unit] - The unit of time for the return period (e.g., days, weeks). + * @property {boolean} [returnable] + * @property {number} [time] + * @property {string} [unit] */ /** * @typedef Weight - * @property {boolean} [is_default] - Indicates whether this weight value is the - * default weight used for the article. - * @property {number} [shipping] - The weight of the article specifically for - * shipping purposes, usually measured in grams or kilograms. - * @property {string} [unit] - The unit of measurement for the weight (e.g., - * grams, kilograms, pounds). + * @property {boolean} [is_default] + * @property {number} [shipping] + * @property {string} [unit] */ /** * @typedef Article - * @property {Object} [child_details] - Contains a flexible set of key-value - * pairs representing detailed information about the article's child entities, - * including dimensions (width, height, length), weight, and unique - * identifiers (EAN, article code, seller identifier) for each child entity. - * @property {string} seller_identifier - Unique identifier assigned by the - * seller to the article, used for inventory management. - * @property {string} uid - A unique identifier for the article within the system. - * @property {Object} [set] - Represents the data related to combinations of - * articles that, while being the same product, vary by size, color, or other - * distinguishing features. + * @property {Object} [child_details] + * @property {string} seller_identifier + * @property {string} uid + * @property {Object} [a_set] * @property {Dimensions} [dimensions] - * @property {Object} [currency] - Currency in which the transaction amount - * associated with the article is specified. - * @property {boolean} [esp_modified] - Indicates whether the article has been - * modified by the ESP (e-commerce service provider). - * @property {ReturnConfig} [return_config] - Configuration related to the - * return policy for the article. - * @property {string} [code] - Internal code or identifier for the article, used - * for reference. + * @property {Object} [currency] + * @property {boolean} [esp_modified] + * @property {ReturnConfig} [return_config] + * @property {string} [code] * @property {Weight} [weight] - * @property {string} _id - The unique identifier for the article within the database. - * @property {Object} identifiers - Details of identifiers associated with the - * article, including SKU codes and other relevant identifiers. - * @property {string} [raw_meta] - Raw metadata associated with the article, - * providing additional context or information. - * @property {string} size - Size of the article, which may vary for clothing, - * accessories, etc. - * @property {boolean} [is_set] - Indicates whether the article is part of a set - * or collection. - * @property {string[]} [tags] - Tags associated with the article for - * categorization and search optimization. + * @property {string} _id + * @property {Object} identifiers + * @property {string} [raw_meta] + * @property {string} size + * @property {boolean} [is_set] + * @property {string[]} [tags] */ /** * @typedef ShipmentListingBrand - * @property {string} [logo] - URL or path to the logo image of the brand - * associated with the shipment. - * @property {string} [created_on] - Timestamp indicating when the brand of the - * shipment was created, formatted as date-time. - * @property {string} [name] - The name of the brand linked to the shipment. - * @property {string} [logo_base64] - Base64 encoded string of the brand's logo - * image, allowing for direct embedding in documents or applications. + * @property {string} [logo] + * @property {string} [created_on] + * @property {string} [name] + * @property {string} [logo_base64] */ /** * @typedef ReplacementDetails - * @property {string} [replacement_type] - Specifies the nature or category of - * the replacement requested or processed for an item. - * @property {string} [original_affiliate_order_id] - The original order ID - * associated with the item that is being replaced. + * @property {string} [replacement_type] + * @property {string} [original_affiliate_order_id] */ /** * @typedef AffiliateMeta - * @property {string} [order_item_id] - A unique identifier for the order item - * associated with the affiliate shipment. - * @property {string} [channel_order_id] - The order ID assigned by the sales - * channel for tracking purposes. - * @property {number} [employee_discount] - The discount percentage or amount - * applied to the order for employees. - * @property {string} [box_type] - Box type of the shipment in which the - * shipment will be delivered. - * @property {number} [quantity] - The total quantity of items in the order. - * @property {number} [size_level_total_qty] - The total quantity of items - * grouped by size level for the order. - * @property {number} [loyalty_discount] - The discount percentage or amount - * applied to the order based on customer loyalty. + * @property {string} [order_item_id] + * @property {string} [channel_order_id] + * @property {number} [employee_discount] + * @property {string} [box_type] + * @property {number} [quantity] + * @property {number} [size_level_total_qty] + * @property {number} [loyalty_discount] * @property {ReplacementDetails} [replacement_details] - * @property {string} [channel_shipment_id] - The shipment ID assigned by the - * sales channel for tracking purposes. - * @property {string} [marketplace_invoice_id] - The invoice ID related to the - * marketplace for the transaction. - * @property {string} [due_date] - Specifies the deadline by which a particular - * action related to the affiliate shipment needs to be completed. - * @property {string} [coupon_code] - A unique code provided to customers for - * redeeming special offers or discounts on their purchases. - * @property {boolean} [is_priority] - Indicates whether the shipment is a - * priority for fulfillment. - * @property {boolean} [is_serial_number_required] - Indicates whether a serial - * number is required for the items in the shipment. - * @property {number} [fulfilment_priority] - A value indicating the priority - * level of order fulfillment. - * @property {number} [customer_selling_price] - The selling price at which the - * product is offered to the customer. + * @property {string} [channel_shipment_id] + * @property {string} [marketplace_invoice_id] + * @property {string} [due_date] + * @property {string} [coupon_code] + * @property {boolean} [is_priority] + * @property {boolean} [is_serial_number_required] + * @property {number} [fulfilment_priority] + * @property {number} [customer_selling_price] */ /** * @typedef AffiliateBagDetails * @property {AffiliateMeta} affiliate_meta - * @property {string} affiliate_order_id - Unique identifier for the affiliate - * order associated with the bag. - * @property {number} [employee_discount] - Discount percentage or amount - * applicable to employees for this order. - * @property {string} affiliate_bag_id - Unique identifier for the affiliate - * bag, used for tracking and reference. - * @property {number} [loyalty_discount] - Discount amount applied based on - * customer loyalty, if applicable. + * @property {string} affiliate_order_id + * @property {number} [employee_discount] + * @property {string} affiliate_bag_id + * @property {number} [loyalty_discount] */ /** * @typedef PlatformArticleAttributes - * @property {string} [currency] - The currency in which the price of the - * article is specified. + * @property {string} [currency] */ /** * @typedef PlatformItem - * @property {number} [id] - Unique identifier for the platform item. + * @property {number} [id] * @property {PlatformArticleAttributes} [attributes] - * @property {number} [brand_id] - Identifier for the brand associated with the item. - * @property {string} [slug_key] - A user-friendly string that represents the - * item, often used in URLs. - * @property {number} [l3_category] - Represents the product's classification at - * the third level in the e-commerce platform's category hierarchy, using an - * integer identifier. - * @property {string} [l3_category_name] - Name of the third-level category - * under which the product is listed. - * @property {string} [last_updated_at] - Timestamp when any aspect of the - * associated record was modified, formatted as date-time. - * @property {string} [name] - The name of the product item. - * @property {string[]} [l2_category] - Represents the second level of - * categorization for items, helping customers narrow down their search. - * @property {string} [brand] - Name of the brand associated with the item. - * @property {string[]} [image] - Array of image URLs representing the item. - * @property {string} [code] - Unique code for the item, often used for - * inventory management. - * @property {string[]} [l1_category] - Represents the highest or top-tier level - * of categorization for the product. - * @property {string} [size] - Size specification of the product, if applicable. - * @property {boolean} [can_cancel] - Indicates whether the item can be canceled - * after order placement. - * @property {boolean} [can_return] - Indicates whether the item is eligible for return. - * @property {string} [branch_url] - URL linking to a specific branch or store - * where the item is available. - * @property {Object} [meta] - Meta data containing additional, dynamic - * information about the item. - * @property {string} [color] - Color specification of the product, if applicable. - * @property {number} [department_id] - Identifier for the department associated - * with the product. - * @property {string[]} [images] - Array of image URLs representing different - * views or angles of the item. + * @property {number} [brand_id] + * @property {string} [slug_key] + * @property {number} [l3_category] + * @property {string} [l3_category_name] + * @property {string} [last_updated_at] + * @property {string} [name] + * @property {string[]} [l2_category] + * @property {string} [brand] + * @property {string[]} [image] + * @property {string} [code] + * @property {string[]} [l1_category] + * @property {string} [size] + * @property {boolean} [can_cancel] + * @property {boolean} [can_return] + * @property {string} [branch_url] + * @property {Object} [meta] + * @property {string} [color] + * @property {number} [department_id] + * @property {string[]} [images] */ /** * @typedef Dates - * @property {string} [delivery_date] - Represents the scheduled date and time - * for the delivery of the entity. + * @property {string} [delivery_date] * @property {string} [order_created] */ /** * @typedef BagReturnableCancelableStatus - * @property {boolean} is_returnable - Indicates whether the bag can be returned - * by the customer. - * @property {boolean} is_active - Specifies if the current status of the bag is - * active, affecting its eligibility for return or cancellation. - * @property {boolean} can_be_cancelled - Indicates if the bag order can be - * cancelled by the customer. - * @property {boolean} enable_tracking - Indicates whether tracking is enabled - * for the bag, allowing customers to monitor its status. - * @property {boolean} is_customer_return_allowed - Specifies if the customer is - * permitted to return the bag, based on the return policy. + * @property {boolean} is_returnable + * @property {boolean} is_active + * @property {boolean} can_be_cancelled + * @property {boolean} enable_tracking + * @property {boolean} is_customer_return_allowed */ /** * @typedef BagUnit - * @property {string} [bag_type] - Specifies the type or category of the bag. + * @property {string} [bag_type] * @property {GSTDetailsData} [gst] * @property {FinancialBreakup[]} financial_breakup - * @property {string} [bag_expiry_date] - Indicates the date and time when the - * contents of a bag, or the bag itself, are no longer considered valid or - * safe for use. This is particularly relevant in contexts where the bag - * contains perishable goods, sensitive materials, or items with a limited shelf life + * @property {string} [bag_expiry_date] * @property {BagStatusHistory[]} [bag_status] * @property {BagStatusHistory} current_operational_status * @property {Article} [article] * @property {ShipmentListingBrand} [brand] * @property {AffiliateBagDetails} [affiliate_bag_details] * @property {PlatformItem} [item] - * @property {Object[]} [reasons] - A collection of reasons associated with the - * bag, which could pertain to returns, cancellations, or other relevant contexts. - * @property {number} product_quantity - The total quantity of products - * contained within the bag. - * @property {boolean} [can_return] - Indicates whether the items in the bag are - * eligible for return. - * @property {string} [display_name] - A user-friendly name or label for the - * bag, which may be displayed in interfaces. - * @property {boolean} [can_cancel] - Indicates whether the bag or its contents - * can be canceled. - * @property {string} [size] - Specifies the size of the bag, which may be - * relevant for packaging or shipping considerations. - * @property {number} [line_number] - Represents the line number in an order or - * transaction associated with the bag. - * @property {Object} [meta] - Meta data of the bag contains additional, - * potentially dynamic information about the bag. + * @property {Object[]} [reasons] + * @property {number} product_quantity + * @property {boolean} [can_return] + * @property {string} [display_name] + * @property {boolean} [can_cancel] + * @property {string} [size] + * @property {number} [line_number] + * @property {Object} [meta] * @property {Prices} [prices] - * @property {OrderingCurrencyPrices} [ordering_currency_prices] * @property {Dates} [dates] * @property {BagStatusHistory} current_status - * @property {number} bag_id - Unique identifier for the bag. - * @property {string} [entity_type] - Specifies the type of entity. + * @property {number} bag_id + * @property {string} [entity_type] * @property {BagReturnableCancelableStatus} status */ /** * @typedef ShipmentItemFulFillingStore - * @property {string} [phone] - Contact number for the fulfilling store, - * allowing customers to reach out for inquiries or assistance. - * @property {string[]} [brand_store_tags] - Tags associated with the brand - * store, providing additional categorization or identification of the store's - * attributes. - * @property {string} [pincode] - Postal code for the fulfilling store's - * location, essential for identifying the specific area and ensuring accurate - * deliveries. - * @property {Object} [meta] - Meta data of the fulfilling store that contains - * additional, potentially dynamic information about the fulfilling store. - * @property {string} [address] - Comprehensive address details of the - * fulfilling store, including all necessary components for locating the store. - * @property {string} [address1] - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like Address1 compiles all into - * a single formatted string. The address is formed by the template provided - * and whichever keys are present in the template are populated as is from - * store address fields. Template Example: {address} {address2}_{area} - * {state}_{country}, - * @property {string} [display_address] - A user-friendly formatted version of - * the store's address for display purposes, making it easier for customers to read. - * @property {string} [location_type] - Type of location of the fulfilling store. - * @property {number} id - Unique identifier for the fulfilling store in the database. - * @property {string} code - A specific code assigned to the store, often used - * for internal tracking or categorization purposes. - * @property {string} [store_email] - Email address for the fulfilling store, - * allowing for electronic communication and inquiries. - * @property {string} [name] - The name of the fulfilling store, which helps - * customers identify the store. - * @property {string} [state] - The state where the fulfilling store is located, - * important for regional identification. - * @property {string} [city] - The city where the fulfilling store is situated, - * providing more specific location details. - * @property {string[]} [tags] - Additional tags associated with the store, used - * for categorization and filtering purposes. + * @property {string} [phone] + * @property {string[]} [brand_store_tags] + * @property {string} [pincode] + * @property {Object} [meta] + * @property {string} [address] + * @property {string} [address1] + * @property {string} [display_address] + * @property {string} [location_type] + * @property {number} id + * @property {string} code + * @property {string} [store_email] + * @property {string} [name] + * @property {string} [state] + * @property {string} [city] + * @property {string[]} [tags] */ /** * @typedef Currency - * @property {string} [currency_code] - This specifies the currency code for all - * amounts. The currency_code field will hold a string value representing the - * code for the currency in which all monetary amounts are denominated. This - * code typically follows the ISO 4217 standard, which uses three-letter - * alphabetic codes to define different currencies around the world. For - * example, 'USD' for United States Dollar, 'INR' for Indian Rupees. - * @property {string} [currency_symbol] - The symbol representing the currency. + * @property {string} [currency_code] + * @property {string} [currency_symbol] */ /** * @typedef OrderingCurrency - * @property {string} [currency_code] - This specifies the currency code for all amounts. - * @property {string} [currency_name] - The full name of the currency. - * @property {string} [currency_symbol] - The symbol representing the currency. - * @property {string} [currency_sub_unit] - The sub-unit of the currency + * @property {string} [currency_code] + * @property {string} [currency_name] + * @property {string} [currency_symbol] + * @property {string} [currency_sub_unit] */ /** * @typedef ConversionRate - * @property {string} [base] - The base currency code, example 'INR' for Indian - * Rupee, against which all conversion rates are calculated. Follows the ISO - * 4217 standard.This includes the currency's name, its conversion rate - * relative to the base currency ('value'), the currency symbol, and any - * sub-unit of the currency. This setup not only facilitates currency - * conversion but also enriches the data with useful currency descriptors, - * enhancing financial operations and analyses. - * @property {Object} [rates] - An object , where each key is a currency code - * and its value is an object containing detailed information about that - * currency. This includes the currency's name, its conversion rate relative - * to the base currency ('value'), the currency symbol, and any sub-unit of - * the currency. This setup not only facilitates currency conversion but also - * enriches the data with useful currency descriptors. + * @property {string} [base] + * @property {Object} [rates] */ /** * @typedef CurrencyInfo @@ -3315,162 +2152,84 @@ export = OrderPlatformModel; */ /** * @typedef ShipmentItem - * @property {string} [order_date] - Denotes the date and time when an order was - * placed by the customer. This timestamp is crucial for tracking the order' - * @property {string} [order_created_ts] - The timestamp indicating when the - * order was created. + * @property {string} [order_date] + * @property {string} [order_created_ts] * @property {ShipmentStatus} [shipment_status] * @property {UserDataInfo} [user] - * @property {string} [estimated_sla_time] - The estimated Service Level - * Agreement (SLA) time for the shipment. - * @property {string} [estimated_sla_ts] - The timestamp for the estimated SLA, - * providing a specific time for expected delivery. - * @property {Address} [delivery_address] - * @property {Address} [billing_address] - * @property {AffiliateDetails} [affiliate_details] - * @property {boolean} [is_active] - This flag denotes whether the shipment is - * active or not. + * @property {string} [estimated_sla_time] + * @property {string} [estimated_sla_ts] + * @property {PlatformDeliveryAddress} [delivery_address] * @property {ShipmentListingChannel} [channel] - * @property {string} [previous_shipment_id] - The ID of any previous shipment - * related to this order. - * @property {string} [forward_end_shipment_id] - The forward_end_shipment_id - * represents the shipment ID of the original forward journey shipment. When a - * shipment is transitioned to a return journey, the original shipment ID from - * the forward journey is recorded in the forward_end_shipment_id field of the - * return journey shipment. Even if the return shipment is later split into - * multiple shipments, each of these shipments will retain the same - * forward_end_shipment_id value that was assigned during the initial return - * journey initiation. This ensures that all return shipments can be traced - * back to the original forward journey shipment. - * @property {boolean} [lock_status] - Indicates whether the shipment is - * currently locked for processing (true) or not (false). - * @property {string} [invoice_id] - The ID of the invoice associated with the shipment. - * @property {Object} [payment_methods] - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. This includes metadata such as logos, payment IDs, and - * merchant codes, as well as transaction-specific details like the payment - * mode, name, amount, and entities responsible for refunds and collections. - * The structure is designed to accommodate any number of payment methods, - * providing flexibility and comprehensive insights into each transaction's - * payment aspect. - * @property {Object[]} [payment_info] - An array of payment information items - * related to the shipment, detailing transaction specifics. - * @property {string} [status_created_at] - Date time in UTC timezone as per ISO format. - * @property {string} [status_created_ts] - The timestamp indicating when the - * current status was logged, usually in ISO 8601 format. - * @property {string} [display_name] - A user-friendly name or identifier for - * the shipment, useful for display purposes. - * @property {BagUnit[]} [bags] - An array of bags included in the shipment. + * @property {string} [previous_shipment_id] + * @property {boolean} [lock_status] + * @property {string} [invoice_id] + * @property {Object} [payment_methods] + * @property {Object[]} [payment_info] + * @property {string} [status_created_at] + * @property {string} [status_created_ts] + * @property {string} [display_name] + * @property {BagUnit[]} [bags] * @property {ShipmentItemFulFillingStore} [fulfilling_store] - * @property {Object} [meta] - Meta data of the item contains additional, - * potentially dynamic information about the item. - * @property {string} [payment_mode] - The mode of payment used for the shipment. - * @property {boolean} [can_process] - Indicates whether the shipment can - * currently be processed (true) or not (false). + * @property {Object} [meta] + * @property {string} [payment_mode] + * @property {boolean} [can_process] * @property {Prices} [prices] - * @property {OrderingCurrencyPrices} [ordering_currency_prices] - * @property {string} order_id - The unique identifier of the order for the shipment. - * @property {string} [ordering_channnel] - The channel used for ordering the shipment. - * @property {string} [shipment_id] - The unique identifier for the shipment itself. - * @property {string} [customer_note] - Any special notes or instructions - * provided by the customer related to the shipment. - * @property {number} total_bags - The total number of bags in the shipment. - * @property {string} shipment_created_at - Timestamp of the shipment created. - * @property {string} [mode_of_payment] - The method of payment used to create the order. - * @property {string} [shipment_created_ts] - The timestamp indicating when the - * shipment was created. + * @property {string} order_id + * @property {string} [ordering_channnel] + * @property {string} [shipment_id] + * @property {string} [customer_note] + * @property {number} total_bags + * @property {string} shipment_created_at + * @property {string} [mode_of_payment] + * @property {string} [shipment_created_ts] * @property {Currency} [currency] * @property {CurrencyInfo} [currency_info] * @property {boolean} [is_lapa_enabled] - Flag to show NDR actions based on * LAPA (Logistic As Per Actual) plan subscription. If LAPA plan taken, true, * else false. - * @property {Object} [logistics_meta] - An object storing detailed - * logistics-related information, including courier partner details and other - * relevant metadata. */ /** - * @typedef ShipmentInternalPlatformViewResponseSchema - * @property {number} [total_count] - The total number of shipments matching the - * query criteria. - * @property {string} [message] - A message providing additional context about - * the response. - * @property {boolean} [success] - Indicates whether the API call was successful - * (true) or not (false). - * @property {ShipmentItem[]} [items] - An array of shipment items returned as - * part of the response. - * @property {string} [lane] - The lane associated with the shipment. + * @typedef ShipmentInternalPlatformViewResponse + * @property {number} [total_count] + * @property {string} [message] + * @property {boolean} [success] + * @property {ShipmentItem[]} [items] + * @property {string} [lane] * @property {Page} [page] */ /** * @typedef TrackingList - * @property {boolean} [is_passed] - A flag indicating whether the tracking - * event has already occurred. If true, it means the event is in the past; - * otherwise, it is either current or future. - * @property {string} text - A descriptive message or status update associated - * with the tracking event, providing context about the shipment's progress or - * condition. - * @property {boolean} [is_current] - A flag indicating whether this tracking - * event is the most recent update. If true, it reflects the latest status of - * the shipment. - * @property {string} [time] - A timestamp representing when the tracking event - * occurred. This helps in understanding the timeline of the shipment's journey. - * @property {string} [created_ts] - A timestamp indicating when the tracking - * information was created or logged in the system. This may differ from the - * event time. - * @property {string} status - The specific status associated with the tracking - * event, such as "In Transit," "Delivered," or "Out for Delivery," providing - * clarity on the shipment's current phase. + * @property {boolean} [is_passed] + * @property {string} text + * @property {boolean} [is_current] + * @property {string} [time] + * @property {string} [created_ts] + * @property {string} status */ /** * @typedef InvoiceInfo - * @property {string} [store_invoice_id] - A unique identifier for the invoice - * generated by the store or platform, used for internal tracking and reference. - * @property {string} [invoice_url] - A URL linking to the digital version of - * the invoice, allowing users to view or download the invoice document online. - * @property {string} [updated_date] - Denotes the date and time when the - * invoice information was modified or updated, providing a record of the most - * recent changes. - * @property {string} [external_invoice_id] - An identifier for the invoice used - * by external systems or partners, facilitating cross-system tracking and - * reconciliation. - * @property {string} [label_url] - A URL linking to the shipping label - * associated with the invoice, which may be used for shipment tracking and logistics. - * @property {string} [credit_note_id] - The identifier for any credit note - * related to the invoice, used in cases of refunds or adjustments to the - * original billing. - * @property {Object} [links] - An object containing additional links relevant - * to the invoice, which may include related documents or resources. + * @property {string} [store_invoice_id] + * @property {string} [invoice_url] + * @property {string} [updated_date] + * @property {string} [external_invoice_id] + * @property {string} [label_url] + * @property {string} [credit_note_id] + * @property {Object} [links] */ /** * @typedef OrderDetailsData - * @property {string} [order_date] - Represents the date and time when the order - * was placed by the customer. This timestamp is essential for tracking the - * initiation of the order process, scheduling deliveries, and analyzing order - * timelines. - * @property {string} [created_ts] - A timestamp indicating when the order was - * created in the system. - * @property {Object} [tax_details] - Contains a flexible and comprehensive set - * of key-value pairs detailing the tax calculations and classifications - * applicable to the order. - * @property {string} [cod_charges] - The charges associated with Cash on - * Delivery (COD) payments. - * @property {string} [source] - The source from which the order originated. - * @property {string} fynd_order_id - An unique identifier for the order. - * @property {string} [affiliate_id] - Affiliate id associated with order. - * @property {string} [affiliate_order_id] - Affiliate order id associated with order. - * @property {Object} [ordering_channel_logo] - Represents the logo of the - * channel through which the order was placed, encapsulating branding elements - * and any relevant styling attributes. This object is designed to be - * flexible, allowing for the inclusion of various properties that define how - * the logo should be displayed across different platforms or documents - * related to the order. - * @property {string} [order_value] - The total monetary value of the order - * @property {string} [ordering_channel] - The specific channel through which - * the order was placed - * @property {Object} [meta] - Meta data of the order contains additional, - * potentially dynamic information about the order. + * @property {string} [order_date] + * @property {string} [created_ts] + * @property {Object} [tax_details] + * @property {string} [cod_charges] + * @property {string} [source] + * @property {string} fynd_order_id + * @property {string} [affiliate_id] + * @property {string} [affiliate_order_id] + * @property {Object} [ordering_channel_logo] + * @property {string} [order_value] + * @property {string} [ordering_channel] + * @property {Object} [meta] */ /** * @typedef UserDetailsData @@ -3478,330 +2237,225 @@ export = OrderPlatformModel; * @property {string} pincode * @property {string} address * @property {string} [area] - * @property {string} [address_type] - The type of the address (e.g., home, office). + * @property {string} [address_type] * @property {string} country * @property {string} [email] - * @property {string} [address1] - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like {address} {address2} - * {area} {state} {country}, Address1 compiles all into a single formatted string. + * @property {string} [address1] * @property {string} [landmark] * @property {string} state * @property {string} name * @property {string} city - * @property {string} [state_code] - The code representing the state or region - * within the country, if applicable. - * @property {string} [country_iso_code] - The country ISO code, a two-character - * standard (ISO 3166-1 alpha-2) code, uniquely identifies the country. This - * field is used to specify countries in a standardized format, facilitating - * global data interoperability. Examples include 'US' for the United States - * and 'IN' for India. - * @property {string} [country_phone_code] - This is the two-digit standard code - * representing the dialing prefix for the user's country, associated with the - * user's mobile number. + * @property {string} [state_code] + * @property {string} [country_iso_code] + * @property {string} [country_phone_code] * @property {string} [display_address] */ /** * @typedef PhoneDetails - * @property {number} [country_code] - Identifies the country of the user's - * phone number using the two-character standard ISO 3166-1 alpha-2 country - * codes. Examples include 'US' for the United States and 'IN' for India. - * @property {string} [number] - The actual phone number of the user. + * @property {number} [country_code] + * @property {string} [number] */ /** * @typedef ContactDetails - * @property {PhoneDetails[]} [phone] - An array of phone numbers associated - * with the contact. - * @property {string[]} [emails] - An array of email addresses associated with - * the contact. + * @property {PhoneDetails[]} [phone] + * @property {string[]} [emails] */ /** * @typedef CompanyDetails - * @property {string} [company_name] - The name of the company. - * @property {Object} [address] - It contains the properties for the address of a company. - * @property {string} [company_cin] - The Corporate Identification Number (CIN) - * of the company. - * @property {number} [company_id] - A unique identifier for the company on the platform. - * @property {string} [company_gst] - The Goods and Services Tax (GST) number of - * the company. + * @property {string} [company_name] + * @property {Object} [address] + * @property {string} [company_cin] + * @property {number} [company_id] + * @property {string} [company_gst] * @property {ContactDetails} [company_contact] */ /** * @typedef OrderingStoreDetails - * @property {string} [phone] - The contact phone number for the ordering store. - * @property {string} [pincode] - The postal code associated with the ordering - * store's location. - * @property {Object} [meta] - Meta data of the ordering store contains - * additional, potentially dynamic information about the ordering store. - * @property {string} [address] - The complete address of the ordering store. - * @property {string} [address1] - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like {address} {address2} - * {area} {state} {country}, Address1 compiles all into a single formatted string. - * @property {string} [display_address] - Formatted address based on the - * title-template provided by the partner. - * @property {number} [id] - A unique identifier for the ordering store. - * @property {string} [code] - A specific code associated with the ordering store. - * @property {string} [store_name] - The name of the ordering store. - * @property {string} [country] - The country in which the ordering store is located. - * @property {string} [contact_person] - The name of the primary contact person - * at the ordering store. - * @property {string} [state] - The state or region where the ordering store is situated. - * @property {string} [city] - The city in which the ordering store is located. + * @property {string} [phone] + * @property {string} [pincode] + * @property {Object} [meta] + * @property {string} [address] + * @property {string} [address1] + * @property {string} [display_address] + * @property {number} [id] + * @property {string} [code] + * @property {string} [store_name] + * @property {string} [country] + * @property {string} [contact_person] + * @property {string} [state] + * @property {string} [city] */ /** * @typedef DPDetailsData - * @property {string} [pincode] - The postal code associated with the delivery - * partner's location - * @property {string} [track_url] - A URL that provides access to real-time - * tracking information for the shipment. - * @property {string} [eway_bill_id] - The unique identifier for the e-way bill - * generated for the shipment. - * @property {number} [id] - A unique identifier for the delivery partner details. - * @property {string} [country] - The country in which the delivery partner operates. - * @property {string} [awb_no] - The Air Waybill number, a tracking number used - * for air freight shipments, allowing for the identification and tracking of - * the package in transit. - * @property {string} [gst_tag] - A tag associated with the Goods and Services - * Tax (GST) for the shipment. - * @property {string} [name] - The name of the delivery partner or service - * provider responsible for transporting the shipment. + * @property {string} [pincode] + * @property {string} [track_url] + * @property {string} [eway_bill_id] + * @property {number} [id] + * @property {string} [country] + * @property {string} [awb_no] + * @property {string} [gst_tag] + * @property {string} [name] */ /** * @typedef BuyerDetails - * @property {string} [ajio_site_id] - The unique identifier for the buyer on - * the Ajio platform. - * @property {number} pincode - The postal code for the buyer's shipping - * address, used for delivery location identification. - * @property {string} address - Provides the comprehensive address details of - * the buyer's shipping address. - * @property {string} gstin - The Goods and Services Tax Identification Number - * (GSTIN) of the buyer. - * @property {string} name - The full name of the buyer, essential for - * personalizing communication and delivery. - * @property {string} state - The name of the state where the buyer's shipping - * address is located, important for logistical purposes. - * @property {string} city - The name of the city where the buyer's shipping - * address is located, which helps in identifying delivery zones. + * @property {string} [ajio_site_id] + * @property {number} pincode + * @property {string} address + * @property {string} gstin + * @property {string} name + * @property {string} state + * @property {string} city */ /** * @typedef DebugInfo - * @property {string} [stormbreaker_uuid] - A unique identifier (UUID) - * associated with the Stormbreaker system, used for tracking and debugging - * purposes in the application. + * @property {string} [stormbreaker_uuid] */ /** * @typedef EinvoiceInfo - * @property {Object} [credit_note] - Specifies the reverse einvoice transaction - * create on government portal. - * @property {Object} [invoice] - It specifies the forward einvoice transaction - * created on government portal. + * @property {Object} [credit_note] + * @property {Object} [invoice] */ /** * @typedef Formatted - * @property {string} [max] - Represents the maximum formatted value, providing - * a limit for the associated data, such as dimensions or weights. - * @property {string} [min] - Represents the minimum formatted value, - * establishing a lower limit for the associated data, ensuring it meets - * certain criteria or standards. + * @property {string} [max] + * @property {string} [min] */ /** * @typedef ShipmentTags - * @property {string} [slug] - A URL-friendly string representing the tag, often - * used for routing or categorization. - * @property {string} [entity_type] - Type of entity that the tag is associated - * to (bag, shipments). - * @property {string} [display_text] - A human-readable text representation of - * the tag, used for display purposes in user interfaces. + * @property {string} [slug] + * @property {string} [entity_type] + * @property {string} [display_text] */ /** * @typedef LockData - * @property {boolean} [locked] - Indicates whether the shipment is currently - * locked for processing (true) or not (false). - * @property {boolean} [mto] - A flag indicating whether the shipment is part of - * a multi-modal transport operation. - * @property {string} [lock_message] - An optional message providing additional - * context or information regarding the lock status. + * @property {boolean} [locked] + * @property {boolean} [mto] + * @property {string} [lock_message] */ /** * @typedef ShipmentTimeStamp - * @property {number} [max] - Represents the maximum timestamp value, indicating - * the latest time relevant to the shipment. - * @property {number} [min] - Represents the minimum timestamp value, indicating - * the earliest time relevant to the shipment. + * @property {number} [max] + * @property {number} [min] */ /** * @typedef ShipmentMeta - * @property {string} [tracking_url] - A URL for tracking the shipment. - * @property {string} [estimated_delivery_date] - Provides a forecasted date and - * time by which the shipment is expected to be delivered to the recipient. - * This estimation is crucial for planning purposes, both for the sender in - * managing expectations and for the recipient in preparing for receipt. - * @property {boolean} same_store_available - Indicates whether the shipment is - * available for pickup from the same store. + * @property {string} [tracking_url] + * @property {string} [estimated_delivery_date] + * @property {boolean} same_store_available * @property {BuyerDetails} [b2b_buyer_details] * @property {Formatted} [formatted] * @property {DebugInfo} [debug_info] - * @property {string} [return_awb_number] - The Air Waybill (AWB) number - * associated with a return shipment. - * @property {boolean} [is_self_ship] - Indicates whether the shipment is a - * self-shipped order. - * @property {string} [box_type] - Box type of the shipment in which the - * shipment will be delivered. + * @property {string} [return_awb_number] + * @property {boolean} [is_self_ship] + * @property {string} [box_type] * @property {EinvoiceInfo} [einvoice_info] - * @property {string} [return_affiliate_shipment_id] - The shipment ID - * associated with a return from an affiliate. - * @property {string} [parent_dp_id] - The unique identifier for the parent - * delivery partner. - * @property {number} [shipment_weight] - The total weight of the shipment. + * @property {string} [return_affiliate_shipment_id] + * @property {string} [parent_dp_id] + * @property {number} [shipment_weight] * @property {Dimensions} [dimension] - * @property {Object} [dp_options] - Delivery partner options that are available - * to deliver the shipment. - * @property {boolean} [assign_dp_from_sb] - Indicates whether to assign the - * delivery partner from the store’s basket. - * @property {string} [due_date] - Specifies the deadline by which a particular - * action related to the affiliate shipment needs to be completed. - * @property {string} [store_invoice_updated_date] - Denotes the date and time - * when the store's invoice related to this shipment was updated. This - * timestamp is vital for tracking changes to billing details, adjustments in - * charges, or updates in the invoicing status. - * @property {string} [forward_affiliate_shipment_id] - The shipment ID for the - * forward journey of an affiliate shipment. - * @property {number} [return_store_node] - The identifier for the store node - * involved in the return process. - * @property {string} [fulfilment_priority_text] - Textual representation of the - * fulfillment priority for the shipment. - * @property {ShipmentTags[]} [shipment_tags] - Tags associated with the - * shipment for categorization and filtering. - * @property {Object} [external] - External metadata related to the shipment. - * @property {string} [awb_number] - The Air Waybill number associated with the shipment. + * @property {Object} [dp_options] + * @property {boolean} [assign_dp_from_sb] + * @property {string} [due_date] + * @property {string} [store_invoice_updated_date] + * @property {string} [forward_affiliate_shipment_id] + * @property {number} [return_store_node] + * @property {string} [fulfilment_priority_text] + * @property {ShipmentTags[]} [shipment_tags] + * @property {Object} [external] + * @property {string} [awb_number] * @property {LockData} [lock_data] - * @property {string} [order_type] - Defines the specific journey a shipment - * will follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. - * @property {Object} [ewaybill_info] - Electronic Way Bill details i.e - * ewayBillNo, ewayBillDate that are utilized in the transportation of goods. - * @property {string} [dp_id] - The unique identifier for the delivery partner - * associated with the shipment. - * @property {number} [shipment_volumetric_weight] - The volumetric weight of - * the shipment, which may differ from its actual weight. - * @property {string} [marketplace_store_id] - The unique identifier for the - * marketplace store associated with the shipment. - * @property {Object} [return_details] - An object containing the return details - * of the shipment. - * @property {string} [dp_sort_key] - A sort key for the delivery partner, used - * for prioritization. - * @property {string} [packaging_name] - The name of the packaging used for the shipment. + * @property {string} [order_type] + * @property {Object} [ewaybill_info] + * @property {string} [dp_id] + * @property {number} [shipment_volumetric_weight] + * @property {string} [marketplace_store_id] + * @property {Object} [return_details] + * @property {string} [dp_sort_key] + * @property {string} [packaging_name] * @property {ShipmentTimeStamp} [timestamp] - * @property {boolean} [auto_trigger_dp_assignment_acf] - Indicates whether - * automatic delivery partner assignment is triggered for this shipment. - * @property {string} [dp_name] - The name of the delivery partner associated - * with the shipment. - * @property {string} [po_number] - The purchase order number associated with - * the shipment. - * @property {number} weight - The weight of the shipment, typically measured in - * grams or kilograms. - * @property {Object} [b2c_buyer_details] - Contains detailed information about - * the buyer in a business-to-consumer (B2C) transaction. This object is - * designed to capture a wide array of buyer-specific data such as contact - * information, shipping address, preferences, and any other relevant details - * that enhance the understanding of the buyer's profile and needs. - * @property {string} [forward_affiliate_order_id] - The order ID for the - * forward journey of an affiliate shipment. - * @property {string} [return_affiliate_order_id] - The order ID for the return - * journey of an affiliate shipment. - * @property {Object} [bag_weight] - This object is designed to accommodate a - * range of weight-related information. Denotes the weight of the bag, - * potentially including various measurements or related details. - * @property {string} [refund_to] - Specifies the recipient of any refunds - * related to the shipment. + * @property {boolean} [auto_trigger_dp_assignment_acf] + * @property {string} [dp_name] + * @property {string} [po_number] + * @property {number} weight + * @property {Object} [b2c_buyer_details] + * @property {string} [forward_affiliate_order_id] + * @property {string} [return_affiliate_order_id] + * @property {Object} [bag_weight] + * @property {string} [refund_to] */ /** * @typedef PDFLinks - * @property {string} invoice_type - The type of invoice issued, such as 'fynd' - * or other classifications. - * @property {string} [label_a6] - URL or path to the A6 size label document. - * @property {string} [invoice] - URL or path to the main invoice document. - * @property {string} [label_pos] - URL or path to the POS label document. - * @property {string} [invoice_a6] - URL or path to the A6 size invoice document. - * @property {string} [b2b] - URL or path to the B2B document related to the transaction. - * @property {string} [label] - URL or path to the general label document. - * @property {string} [label_a4] - URL or path to the A4 size label document. - * @property {string} label_type - Specifies the type of label associated with a - * PDF document,indicating its purpose or content. The label_type helps in - * organizing and identifying PDF documents quickly, ensuring that users or - * systems can efficiently utilize the correct documents for required actions. - * @property {string} [invoice_export] - URL or path to the exported invoice document. - * @property {string} [credit_note_url] - URL or path to the credit note document. - * @property {string} [delivery_challan_a4] - URL or path to the A4 delivery - * challan document. - * @property {string} [label_export] - URL or path to the exported label document. - * @property {string} [invoice_a4] - URL or path to the A4 size invoice document. - * @property {string} [invoice_pos] - URL or path to the POS invoice document. - * @property {string} [po_invoice] - URL or path to the purchase order invoice document. + * @property {string} invoice_type + * @property {string} [label_a6] + * @property {string} [invoice] + * @property {string} [label_pos] + * @property {string} [invoice_a6] + * @property {string} [b2b] + * @property {string} [label] + * @property {string} [label_a4] + * @property {string} label_type + * @property {string} [invoice_export] + * @property {string} [credit_note_url] + * @property {string} [delivery_challan_a4] + * @property {string} [label_export] + * @property {string} [invoice_a4] + * @property {string} [invoice_pos] + * @property {string} [po_invoice] + */ +/** + * @typedef AffiliateConfig + * @property {number} [app_company_id] */ /** * @typedef AffiliateDetails * @property {ShipmentMeta} shipment_meta * @property {AffiliateMeta} affiliate_meta - * @property {string} affiliate_shipment_id - The shipment ID specific to this affiliate. - * @property {string} [company_affiliate_tag] - An optional tag representing the - * company's affiliate association. - * @property {string} affiliate_order_id - The order ID associated with the - * affiliate shipment. + * @property {string} affiliate_shipment_id + * @property {string} [company_affiliate_tag] + * @property {string} affiliate_order_id * @property {PDFLinks} [pdf_links] * @property {AffiliateConfig} [config] - * @property {string} [affiliate_id] - The unique identifier for the affiliate. - * @property {string} affiliate_store_id - The unique identifier for the - * affiliate's store. - * @property {string} affiliate_bag_id - The unique identifier for the affiliate's bag. - * @property {string} [id] - The unique identifier for the affiliate. + * @property {string} [affiliate_id] + * @property {string} affiliate_store_id + * @property {string} affiliate_bag_id + * @property {string} [ad_id] */ /** * @typedef BagConfigs - * @property {boolean} is_returnable - Indicates whether the bag is eligible for - * return by the customer. - * @property {boolean} allow_force_return - A flag that determines if a forced - * return can be initiated for the bag. - * @property {boolean} is_active - A flag indicating whether the bag is active or not. - * @property {boolean} can_be_cancelled - A flag that determines if the bag can - * be cancelled. - * @property {boolean} enable_tracking - A flag that determines if shipment - * tracking is enabled for the bag. - * @property {boolean} is_customer_return_allowed - A flag that determines if - * customer return is allowed for the bag. + * @property {boolean} is_returnable + * @property {boolean} allow_force_return + * @property {boolean} is_active + * @property {boolean} can_be_cancelled + * @property {boolean} enable_tracking + * @property {boolean} is_customer_return_allowed */ /** * @typedef OrderBagArticle - * @property {Object} [identifiers] - Details of Identifiers associated with the article. + * @property {Object} [identifiers] * @property {ReturnConfig} [return_config] - * @property {string} [uid] - A unique identifier for the article within the order bag. - * @property {string} [size] - The size of the article, which may be relevant - * for clothing. - * @property {string[]} [tags] - An array of tags associated with the article. + * @property {string} [uid] + * @property {string} [size] + * @property {string[]} [tags] */ /** * @typedef OrderBrandName - * @property {string} [logo] - A URL or path to the logo image associated with the brand. - * @property {number} [company] - A unique identifier for the company associated - * with the brand. - * @property {number} id - A unique identifier for the brand within the system. - * @property {string} [created_on] - Timestamp when the brand of the order was created. - * @property {string} [brand_name] - The name of the brand associated with the order. - * @property {string} [modified_on] - Timestamp when the brand of the order was modified. + * @property {string} [logo] + * @property {number} [company] + * @property {number} id + * @property {string} [created_on] + * @property {string} [brand_name] + * @property {string} [modified_on] */ /** * @typedef AffiliateBagsDetails - * @property {string} [affiliate_bag_id] - A unique identifier for the affiliate bag. - * @property {string} [coupon_code] - A unique code provided to customers for - * redeeming special offers or discounts on their purchases. + * @property {string} [affiliate_bag_id] + * @property {string} [coupon_code] * @property {AffiliateMeta} [affiliate_meta] */ /** * @typedef BagPaymentMethods - * @property {string} [mode] - The payment mode used for the transaction. - * @property {number} [amount] - The total amount associated with the payment method + * @property {string} [mode] + * @property {number} [amount] */ /** * @typedef DiscountRules @@ -3815,373 +2469,182 @@ export = OrderPlatformModel; /** * @typedef BuyRules * @property {ItemCriterias} [item_criteria] - * @property {Object} [cart_conditions] - Specifies the rules that must be met - * at the cart level for any purchasing rules or promotional discounts to be - * applied. Specifically, it includes criteria such as the total quantity of - * items in the cart. For instance, a rule might require that the cart - * contains at least one item for the promotion to apply. This setup allows - * for the dynamic application of discounts or special buying rules based on - * cart conditions. - */ -/** - * @typedef PriceMinMax - * @property {number} [min] - The minimum price value. Represents the lowest - * price in the price range. - * @property {number} [max] - The maximum price value. Represents the highest - * price in the price range. - */ -/** - * @typedef ItemPriceDetails - * @property {PriceMinMax} [marked] - * @property {PriceMinMax} [effective] - * @property {string} [currency] - The currency in which the prices details - * associated with the item is specified. - */ -/** - * @typedef FreeGiftItems - * @property {string} [item_slug] - A unique identifier for the item, typically - * used in URLs for SEO purposes. - * @property {string} [item_name] - The name of the item. - * @property {ItemPriceDetails} [item_price_details] - * @property {string} [item_brand_name] - The brand name of the item. - * @property {number} [item_id] - A unique numerical identifier for the item. - * @property {string[]} [item_images_url] - A list of URLs pointing to images of the item. - */ -/** - * @typedef AppliedFreeArticles - * @property {string} [article_id] - A unique identifier for the article to - * which the free gift is applied. - * @property {Object} [free_gift_item_details] - Details of the free gift item - * associated with the article, including relevant attributes like name, - * description, and any other specifications. - * @property {string} [parent_item_identifier] - An identifier for the parent - * item with which the free gift is associated, typically used to link the - * free gift to the original purchased item. - * @property {number} [quantity] - The quantity of the free gift items applied - * to the article. + * @property {Object} [cart_conditions] */ /** * @typedef AppliedPromos - * @property {string} [promotion_type] - Specifies the type of discount or deal - * applied to the current promotion, defining how the promotion modifies the - * price or adds value to the purchase. Each type represents a different - * promotional strategy - percentage- Discount by a percentage of the original - * price. - amount- Discount by a specific amount off the original price. - - * fixed_price- Sets the price to a specific fixed amount. - bogo- Buy One Get - * One or at a discount. - contract_price- Special pricing based on a contract - * or agreement. - shipping_price- Discount or deal related to the shipping - * cost. - ladder_price- Price changes based on quantity purchased. - - * bundle_price_percentage- Discount on a bundle purchase by a percentage. - - * bundle_price_amount- Discount on a bundle purchase by a specific amount. - - * bundle_amount_percentage- A percentage of the purchase amount is applied as - * a discount when buying in a bundle. - custom- A custom promotion not - * covered by other types. - free_gift_items- Free gift items are included - * with the purchase. - free_non_sellable_items- Free items that are not for - * sale are included with the purchase. - * @property {string} [promotion_name] - The name of the promotional campaign or offer. - * @property {DiscountRules[]} [discount_rules] - A list of rules that define - * the conditions under which discounts are applied. - * @property {number} [amount] - The total monetary value of the discount or promotion. - * @property {number} [article_quantity] - The quantity of articles required to - * qualify for the promotion. - * @property {BuyRules[]} [buy_rules] - A list of rules that outline the - * conditions for purchasing items under the promotion. - * @property {string} [promo_id] - A unique identifier for the promotion. - * @property {boolean} [mrp_promotion] - A flag that designates whether or not - * the promotion is an MRP (manufacturer's reduced price) promotion. - * @property {AppliedFreeArticles[]} [applied_free_articles] - A list of - * articles that are eligible for free under the promotion. + * @property {string} [promotion_type] + * @property {string} [promotion_name] + * @property {DiscountRules[]} [discount_rules] + * @property {number} [amount] + * @property {number} [article_quantity] + * @property {BuyRules[]} [buy_rules] + * @property {string} [promo_id] + * @property {boolean} [mrp_promotion] */ /** * @typedef CurrentStatus - * @property {number} [store_id] - A unique identifier for the store associated - * with the shipment. - * @property {string} [delivery_awb_number] - The Air Waybill (AWB) number for - * the delivery. - * @property {boolean} [kafka_sync] - A flag indicating whether the current - * status is synchronized with Kafka or not. - * @property {number} [delivery_partner_id] - A unique identifier for the - * delivery partner responsible for handling the shipment. - * @property {string} [state_type] - Serves as a key identifier to differentiate - * among the diverse types of states a shipment can undergo throughout its journey. - * - * - 'operational': Pertains to states that involve the physical handling and - * movement of the shipment, such as packing, in transit, and delivery. - * - 'financial': Relates to states associated with the payment, invoicing, and - * any monetary transactions or obligations tied to the shipment. - * - 'logistics': Encompasses states that deal with the broader logistical - * planning and coordination necessary for the shipment's journey, - * including route optimization and carrier selection. - * - * @property {number} [state_id] - A unique identifier for the specific state of - * the shipment. - * @property {number} id - A unique identifier for the current status entry - * @property {string} [created_at] - Denotes the date and time when the bag - * status was created. - * @property {string} [created_ts] - A timestamp indicating when the status was created - * @property {string} [shipment_id] - A unique identifier for the shipment. - * @property {string} [updated_at] - The date and time when the current status - * was last updated. + * @property {number} [store_id] + * @property {string} [delivery_awb_number] + * @property {boolean} [kafka_sync] + * @property {number} [delivery_partner_id] + * @property {string} [state_type] + * @property {number} [state_id] + * @property {number} id + * @property {string} [created_at] + * @property {string} [created_ts] + * @property {string} [shipment_id] + * @property {string} [updated_at] * @property {BagStateMapper} [bag_state_mapper] - * @property {number} [bag_id] - A unique identifier for the bag associated with - * the shipment. - * @property {string} [status] - A descriptive label representing the current - * status of the shipment. + * @property {number} [bag_id] + * @property {string} [status] */ /** * @typedef OrderBags * @property {GSTDetailsData} [gst_details] * @property {BagStatusHistory[]} [bag_status] - * @property {Object} [parent_promo_bags] - An object containing details of - * parent promotional bags. + * @property {Object} [parent_promo_bags] * @property {FinancialBreakup} [financial_breakup] * @property {BagConfigs} [bag_configs] * @property {string} [seller_identifier] - * @property {Address} [delivery_address] + * @property {PlatformDeliveryAddress} [delivery_address] * @property {OrderBagArticle} [article] * @property {OrderBrandName} [brand] * @property {string} [group_id] * @property {AffiliateBagsDetails} [affiliate_bag_details] * @property {PlatformItem} [item] - * @property {BagPaymentMethods[]} [payment_methods] - An array detailing the - * various payment methods utilized for the transaction. Each item within this - * array represents a distinct method of payment. It encapsulates the details - * of various payment methods available for completing a transaction. It - * includes comprehensive information such as the payment mode, amount, - * transaction status, and identifiers for each payment method. + * @property {BagPaymentMethods[]} [payment_methods] * @property {BagPaymentMethods[]} [payment_info] - * @property {number} [quantity] - The number of items contained in the bag. - * @property {string} [identifier] - A unique identifier for the bag. - * @property {boolean} [can_return] - Indicates whether the items in the bag are - * eligible for return by the customer. - * @property {boolean} [can_cancel] - Indicates whether the bag is eligible for - * cancellation by the customer. - * @property {string} [display_name] - A user-friendly name for the bag. - * @property {number} [line_number] - A unique identifier for each line item in a bag. - * @property {Object} [meta] - Meta data of the bags contains additional, - * potentially dynamic information about the bags. + * @property {number} [quantity] + * @property {string} [identifier] + * @property {boolean} [can_return] + * @property {boolean} [can_cancel] + * @property {string} [display_name] + * @property {number} [line_number] + * @property {Object} [meta] * @property {AppliedPromos[]} [applied_promos] * @property {Prices} [prices] - * @property {PriceAdjustmentCharge[]} [charges] - * @property {OrderingCurrencyPrices} [ordering_currency_prices] * @property {CurrentStatus} [current_status] * @property {number} bag_id - * @property {string} [entity_type] - Type of entity that the tag is associated - * to (bag, shipments). - * @property {boolean} [is_parent] - A flag indicating whether the current bag - * is a parent entity or not. + * @property {string} [entity_type] + * @property {boolean} [is_parent] */ /** * @typedef FulfillingStore - * @property {string} phone - The contact phone number for the fulfilling store. - * @property {string} pincode - The postal code for the fulfilling store's location. - * @property {Object} meta - Meta data of the fulfilling store contains - * additional, potentially dynamic information about the fulfilling store. - * @property {string} address - The complete address of the fulfilling store. - * @property {string} [address1] - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like {address} {address2} - * {area} {state} {country}, Address1 compiles all into a single formatted string. - * @property {string} [display_address] - Display friendly version of the - * Fulfilment Store Address. - * @property {number} id - The unique id or identifier of a fulfilment store. - * @property {string} code - The unique code of the fulfilment store. - * @property {string} store_name - The unique name of a fulfillment store. - * @property {string} country - The name of the country associated with a - * specific fulfilment store. - * @property {string} fulfillment_channel - The channel through which - * fulfillment is managed. - * @property {string} contact_person - The name of the contact person associated - * with a fulfilling store. - * @property {string} state - The state or region where the fulfilling store is located. - * @property {string} city - The city in which the fulfilling store is situated. + * @property {string} phone + * @property {string} pincode + * @property {Object} meta + * @property {string} address + * @property {string} [address1] + * @property {string} [display_address] + * @property {number} id + * @property {string} code + * @property {string} store_name + * @property {string} country + * @property {string} fulfillment_channel + * @property {string} contact_person + * @property {string} state + * @property {string} city */ /** * @typedef ShipmentPayments - * @property {string} [mode] - The payment mode used for the shipment. - * @property {string} [logo] - A URL or path to the logo associated with the - * payment method. - * @property {string} [source] - The source or origin of the payment + * @property {string} [mode] + * @property {string} [logo] + * @property {string} [source] */ /** * @typedef ShipmentStatusData - * @property {Object} [meta] - It contains the additional properties related to - * shipment status transition like Kafka_emission_status, user_name, etc. - * Additionally it is dynamic. - * @property {string[]} [bag_list] - The list of bags that are in this shipment - * status transition. - * @property {number} [id] - Unique identifier for a shipment status. - * @property {string} [created_at] - Denotes the date and time when the - * transition was created. - * @property {string} [created_ts] - A timestamp indicating when the status - * entry was created. - * @property {string} [shipment_id] - The unique identifier for the shipment. - * @property {string} [status] - The current status of the shipment. - * @property {string} [display_name] - A user-friendly name or description of - * the current shipment status. - * @property {string} [current_shipment_status] - Reflects the most recent - * status of the shipment. - * @property {string} [status_created_at] - Denotes the date and time when the - * transition of the status of the shipment was created. + * @property {Object} [meta] + * @property {string[]} [bag_list] + * @property {number} [id] + * @property {string} [created_at] + * @property {string} [created_ts] + * @property {string} [shipment_id] + * @property {string} [status] + * @property {string} [display_name] + * @property {string} [current_shipment_status] + * @property {string} [status_created_at] */ /** * @typedef ShipmentLockDetails - * @property {boolean} [lock_status] - Represents the lock status of the shipment. - * @property {string} [lock_message] - A user-friendly message that explains the - * reason for locking the shipment. - * @property {Object} [action_to_status] - This field maps potential actions - * (e.g., downloading an invoice or label) to their corresponding shipment - * lock statuses, indicating which operations are allowed depending on the - * shipment's current lock status. When an action is set to 'lock', it means - * no transitions or updates to the shipment's status can be performed until - * the specified action is completed. For instance, if 'download_invoice' is - * in a 'lock' state, the shipment cannot undergo any status transitions until - * the invoice is either downloaded. Similarly, 'download_label' being in a - * 'lock' state prevents any shipment status transitions until a new label is - * downloaded. + * @property {boolean} [lock_status] + * @property {string} [lock_message] + * @property {Object} [action_to_status] */ /** * @typedef PlatformShipment - * @property {string} [picked_date] - Indicates the date and time when the - * shipment was physically picked up from the sender or the origin point by - * the delivery service. This timestamp is crucial for tracking the - * commencement of the shipment's journey. - * @property {TrackingList[]} [tracking_list] - A list of tracking updates - * associated with the shipment. + * @property {string} [picked_date] + * @property {TrackingList[]} [tracking_list] * @property {InvoiceInfo} [invoice] - * @property {string} [shipment_status] - Represents the current status of the shipment. + * @property {string} [shipment_status] * @property {GSTDetailsData} [gst_details] * @property {OrderStatusData} [order_status] - * @property {Object} [delivery_slot] - Represents a specific time window - * allocated for the delivery of an order or shipment. + * @property {Object} [delivery_slot] * @property {OrderDetailsData} [order] * @property {UserDataInfo} [user] - * @property {boolean} [enable_dp_tracking] - A flag indicating whether the - * delivery partner tracking feature is enabled for this shipment. - * @property {string} [custom_message] - A custom message or note associated - * with the shipment. - * @property {string} [estimated_sla_time] - The estimated service level - * agreement (SLA) time for the shipment, indicating expected delivery timelines. - * @property {string} [estimated_sla_ts] - A timestamp indicating when the - * estimated SLA time is expected to be met. - * @property {boolean} [can_update_dimension] - Indicates whether the dimensions - * of the shipment can be updated after creation. - * @property {string[]} [shipment_images] - A list of URLs for images related to - * the shipment. - * @property {Object} [delivery_details] - A list of details about the delivery - * of an order. - * @property {Object} [billing_details] - Information regarding the billing for - * the shipment, including billing address and payment method. - * @property {string} [forward_shipment_id] - The ID of the parent forward - * journey shipment. - * @property {number} [fulfilment_priority] - The fulfilment priority, with - * lower numbers indicating a higher priority. + * @property {boolean} [enable_dp_tracking] + * @property {string} [custom_message] + * @property {string} [estimated_sla_time] + * @property {string} [estimated_sla_ts] + * @property {boolean} [can_update_dimension] + * @property {string[]} [shipment_images] + * @property {UserDetailsData} [delivery_details] + * @property {UserDetailsData} [billing_details] + * @property {string} [forward_shipment_id] + * @property {number} [fulfilment_priority] * @property {ShipmentLockDetails} [shipment_details] - * @property {Object[]} [custom_meta] - An array of custom metadata objects that - * may contain additional, dynamic information specific to the shipment. - * @property {number} [shipment_quantity] - The total quantity of items included - * in the shipment. + * @property {Object[]} [custom_meta] + * @property {number} [shipment_quantity] * @property {CompanyDetails} [company_details] * @property {OrderingStoreDetails} [ordering_store] - * @property {string} [order_platform] - The platform used to place the order. - * @property {boolean} [lock_status] - Indicates whether the shipment is - * currently locked or not for modifications or updates. - * @property {string} [platform_logo] - The URL of the ordering platform's logo. - * @property {string} [user_agent] - Information about the user agent string, - * typically containing details about the browser or application used to place - * the order. + * @property {string} [order_platform] + * @property {boolean} [lock_status] + * @property {string} [platform_logo] + * @property {string} [user_agent] * @property {DPDetailsData} [dp_details] - * @property {string} [invoice_id] - The unique identifier for the invoice - * associated with the shipment. - * @property {Object} [payment_methods] - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. The structure is designed to accommodate any number of - * payment methods,providing flexibility and comprehensive insights into each - * transaction's payment aspect. - * @property {Object[]} [payment_info] - An array of objects containing detailed - * information about the payments made for the shipment. - * @property {Object} [coupon] - Coupon data of the shipment which denotes if - * coupon is applied, coupon code, coupon amount, coupon title and coupon message. + * @property {string} [invoice_id] + * @property {Object} [payment_methods] + * @property {Object[]} [payment_info] + * @property {Object} [coupon] * @property {AffiliateDetails} [affiliate_details] - * @property {string} [priority_text] - Text that indicates the priority level - * of the shipment. - * @property {BagStatusHistory[]} [bag_status_history] - A history of status - * changes for bags associated with the shipment. - * @property {boolean} [is_dp_assign_enabled] - A flag indicating whether - * delivery partner assignment features are enabled for the shipment. - * @property {OrderBags[]} [bags] - A list of bags included in the shipment - * @property {boolean} [dp_assignment] - Indicates whether a delivery partner - * has been assigned to the shipment. - * @property {number} [total_items] - The total number of items contained within - * the shipment, + * @property {string} [priority_text] + * @property {BagStatusHistory[]} [bag_status_history] + * @property {boolean} [is_dp_assign_enabled] + * @property {OrderBags[]} [bags] + * @property {boolean} [dp_assignment] + * @property {number} [total_items] * @property {FulfillingStore} [fulfilling_store] - * @property {Object} [meta] - Meta data of the shipment contains additional, - * potentially dynamic information about the shipment. - * @property {Object} [pdf_links] - PDF Links associated with the shipment. - * @property {string} [payment_mode] - The mode of payment used for the shipment. - * @property {string} [packaging_type] - Defines the type of packaging used for - * the product, encompassing materials, design, and form factors. - * @property {string} [journey_type] - It is a type being used to represent the - * journey of shipment through the performed status transition. Forward - * Journey: The forward journey encompasses all the stages of shipping, - * including order placement, packing, dispatch, in-transit updates, and - * delivery. Return Journey: Contrary to the forward journey, the return - * journey involves the process of sending items back from the customer to the - * original sender or a designated return facility. + * @property {Object} [meta] + * @property {Object} [pdf_links] + * @property {string} [payment_mode] + * @property {string} [packaging_type] + * @property {string} [journey_type] * @property {Prices} [prices] - * @property {PriceAdjustmentCharge[]} [charges] - An array of charges applied - * to the shipment. - * @property {OrderingCurrencyPrices} [ordering_currency_prices] - * @property {string} [vertical] - The business vertical or category to which - * the shipment belongs. - * @property {string} shipment_id - A unique identifier for the shipment. + * @property {string} [vertical] + * @property {string} shipment_id * @property {ShipmentPayments} [payments] - * @property {string} [operational_status] - The operational status of the shipment. + * @property {string} [operational_status] * @property {ShipmentStatusData} [status] - * @property {number} [total_bags] - The total number of bags in the shipment. - * @property {string} [shipment_created_at] - Denotes the date and time when the - * shipment was created. - * @property {string} [shipment_created_ts] - A timestamp representing when the - * shipment was created. + * @property {number} [total_bags] + * @property {string} [shipment_created_at] + * @property {string} [shipment_created_ts] * @property {Currency} [currency] * @property {CurrencyInfo} [currency_info] - * @property {string} [previous_shipment_id] - The ID of the previous shipment - * in the sequence. - * @property {number} [shipment_update_time] - A numerical representation of the - * last update time for the shipment - * @property {Address} [rto_address] - * @property {string} [credit_note_id] - The identifier for any credit note - * issued for the shipment - * @property {boolean} [is_self_ship] - A flag indicating whether the shipment - * is being self-shipped by the seller or vendor. - * @property {string} [mode_of_payment] - The specific mode of payment used for - * the transaction + * @property {string} [previous_shipment_id] + * @property {number} [shipment_update_time] + * @property {PlatformDeliveryAddress} [rto_address] + * @property {string} [credit_note_id] + * @property {boolean} [is_self_ship] + * @property {string} [mode_of_payment] * @property {boolean} [is_lapa_enabled] - Flag to show NDR actions based on * LAPA (Logistic As Per Actual) plan subscription. If LAPA plan taken, true, * else false. - * @property {string} [forward_end_shipment_id] - The forward_end_shipment_id - * represents the shipment ID of the original forward journey shipment. When a - * shipment is transitioned to a return journey, the original shipment ID from - * the forward journey is recorded in the forward_end_shipment_id field of the - * return journey shipment. Even if the return shipment is later split into - * multiple shipments, each of these shipments will retain the same - * forward_end_shipment_id value that was assigned during the initial return - * journey initiation. This ensures that all return shipments can be traced - * back to the original forward journey shipment. - * @property {Object} [logistics_meta] - An object storing detailed - * logistics-related information, including courier partner details and other - * relevant metadata. - */ -/** - * @typedef ShipmentInfoResponseSchema - * @property {string} [message] - A descriptive message providing additional - * information about the API response. - * @property {boolean} success - Indicates whether the API call was successful - * (true) or not (false). - * @property {PlatformShipment[]} [shipments] - A list of platform shipment - * objects, containing information related to a shipment. + */ +/** + * @typedef ShipmentInfoResponse + * @property {string} [message] + * @property {boolean} success + * @property {PlatformShipment[]} [shipments] */ /** * @typedef TaxDetails @@ -4190,69 +2653,29 @@ export = OrderPlatformModel; */ /** * @typedef PaymentInfoData - * @property {Object} [meta] - It contains the additional properties related to - * shipment status transition like Kafka_emission_status, user_name, etc. - * Additionally it is dynamic. - * @property {string} [mode] - Information about the payment source. For eg, NB_ICICI. - * @property {string} [name] - The name of the payment method (e.g., "Credit - * Card", "PayPal"). - * @property {number} [amount] - Amount paid using this payment method. - * @property {boolean} [collected] - Indicates whether this payment method has - * been collected or not. - * @property {string} [refund_by] - Payment refund by for the customer and - * seller (e.g fynd, seller). - * @property {string} [collect_by] - Payment collected by for the customer and - * seller (e.g fynd, seller). - * @property {string} [display_name] - The name of the payment method as it - * should be displayed to the user. - * @property {string} [merchant_transaction_id] - A unique identifier associated - * with the payment transaction, such as TR669796C0012CF31BBD. This ID helps - * track and reference the specific transaction within the merchant's system. - */ -/** - * @typedef CurrencySchema - * @property {string} [currency_code] - The ISO 4217 currency code, such as - * 'INR' for Indian Rupee. This field represents the standardized three-letter - * code of a currency. - * @property {string} [currency_symbol] - The symbol representing the currency, - * such as '₹' for Indian Rupee. This is used for display purposes alongside - * currency amounts. + * @property {Object} [meta] + * @property {string} [mode] + * @property {string} [name] + * @property {number} [amount] + * @property {boolean} [collected] + * @property {string} [refund_by] + * @property {string} [collect_by] + * @property {string} [display_name] + * @property {string} [merchant_transaction_id] */ /** * @typedef OrderData - * @property {string} [ordering_channel] - The specific channel through which - * the order was placed. - * @property {string} order_date - Specifies the exact date and time when the - * order was placed by the customer, serving as a key timestamp for the - * initiation of the order processing cycle. + * @property {string} order_date * @property {string} [created_ts] * @property {TaxDetails} [tax_details] - * @property {Object} [meta] - Meta data of the order contains additional, - * potentially dynamic information about the order. + * @property {Object} [meta] * @property {string} fynd_order_id * @property {Prices} [prices] - * @property {PriceAdjustmentCharge[]} [charges] - * @property {OrderingCurrencyPrices} [ordering_currency_prices] - * @property {Object} [payment_methods] - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. This includes metadata such as logos, payment IDs, and - * merchant codes, as well as transaction-specific details like the payment - * mode, name, amount, and entities responsible for refunds and collections. - * The structure is designed to accommodate any number of payment methods, - * providing flexibility and comprehensive insights into each transaction's - * payment aspect. + * @property {Object} [payment_methods] * @property {PaymentInfoData[]} [payment_info] - * @property {string} [affiliate_order_id] - External Order id - * @property {string} [affiliate_id] - Unique identifier for the sales channel. - * @property {string} [source] - Specifies the origin from from which the order - * is created, including mobile applications, web interfaces, social media - * integrations, or external APIs. - * @property {CurrencySchema} [currency] */ /** - * @typedef OrderDetailsResponseSchema + * @typedef OrderDetailsResponse * @property {OrderData} [order] * @property {boolean} success * @property {PlatformShipment[]} [shipments] @@ -4273,91 +2696,62 @@ export = OrderPlatformModel; * @property {number} [total_items] */ /** - * @typedef LaneConfigResponseSchema + * @typedef LaneConfigResponse * @property {SuperLane[]} [super_lanes] */ /** * @typedef PlatformBreakupValues - * @property {string} [value] - Represents the value associated with a specific - * component of the price breakdown. - * @property {string} [name] - Represents the name associated with a specific - * component of the price breakdown. - * @property {string} [display] - A user-friendly display name for the - * component, intended for presentation in user interfaces. + * @property {string} [value] + * @property {string} [name] + * @property {string} [display] */ /** * @typedef PlatformChannel - * @property {string} [logo] - Represents the logo of the channel through which - * the order was placed. - * @property {string} [name] - Represents the name of the channel through which - * the order was placed + * @property {string} [logo] + * @property {string} [name] */ /** * @typedef PlatformOrderItems - * @property {PlatformBreakupValues[]} [breakup_values] - The breakup_values - * array contains detailed breakdowns of different pricing components related - * to an order. Each item in the array is a reference to the - * PlatformBreakupValues schema, which provides specific details about each - * component such as loyalty points, coupon discounts, raw pricing data, and - * display information. + * @property {PlatformBreakupValues[]} [breakup_values] * @property {number} [total_order_value] - * @property {Object} [meta] - It contains the additional properties related to - * order transition like Kafka_emission_status, user_name, etc. Additionally - * it is dynamic, potentially. - * @property {string} [order_created_time] - The Date and time when the order was created. - * @property {string} [order_created_ts] - The timestamp indicating when the - * order was created. - * @property {string} [payment_mode] - The payment mode used for the order. - * @property {PlatformShipment[]} [shipments] - An array of shipment items - * returned as part of the order. - * @property {string} [order_id] - A unique identifier associated with the order. + * @property {Object} [meta] + * @property {string} [order_created_time] + * @property {string} [order_created_ts] + * @property {string} [payment_mode] + * @property {PlatformShipment[]} [shipments] + * @property {string} [order_id] * @property {PlatformChannel} [channel] * @property {UserDataInfo} [user_info] * @property {number} [order_value] * @property {Currency} [currency] * @property {CurrencyInfo} [currency_info] - * @property {Prices} [prices] - * @property {OrderingCurrencyPrices} [ordering_currency_prices] */ /** - * @typedef OrderListingResponseSchema - * @property {number} [total_count] - The total number of orders matching the - * query criteria. - * @property {string} [message] - A message providing additional context about - * the response. - * @property {boolean} [success] - Indicates whether the API call was successful - * (true) or not (false). - * @property {PlatformOrderItems[]} [items] - An array of shipment items - * returned as part of the response. - * @property {string} [lane] - The lane associated with the order. + * @typedef OrderListingResponse + * @property {number} [total_count] + * @property {string} [message] + * @property {boolean} [success] + * @property {PlatformOrderItems[]} [items] + * @property {string} [lane] * @property {Page} [page] */ /** * @typedef PlatformTrack - * @property {string} [last_location_recieved_at] - The current geographic - * location of the courier partner. - * @property {Object} [meta] - A field to store additional metadata related to - * the courier partner's operations or the shipment. - * @property {string} [raw_status] - The current status of the shipment as - * updated by the courier partner. - * @property {string} [updated_at] - Human readable timestamp when the status - * was last updated by the courier partner. - * @property {string} [updated_time] - The timestamp when the status was last - * updated by the courier partner. - * @property {string} [awb] - The Air Waybill (AWB) number associated with the - * shipment, used for tracking the parcel in transit. - * @property {string} [shipment_type] - Indicates the type of journey the shipment. - * @property {string} [status] - The operational status of the shipment. - * @property {string} [reason] - Any additional remarks or comments from the - * courier partner regarding the shipment. - * @property {string} [account_name] - The name of the courier partner - * responsible for the shipment. + * @property {string} [last_location_recieved_at] + * @property {Object} [meta] + * @property {string} [raw_status] + * @property {string} [updated_at] + * @property {string} [updated_time] + * @property {string} [awb] + * @property {string} [shipment_type] + * @property {string} [status] + * @property {string} [reason] + * @property {string} [account_name] */ /** * @typedef PlatformShipmentTrack - * @property {Object} [meta] - Meta data of the shipment contains additional, - * potentially dynamic information about the shipment. - * @property {PlatformTrack[]} [results] - A list of tracking details at various status. + * @property {Object} [meta] + * @property {PlatformTrack[]} [results] */ /** * @typedef AdvanceFilterInfo @@ -4366,17 +2760,11 @@ export = OrderPlatformModel; * @property {FiltersInfo[]} [unfulfilled] * @property {FiltersInfo[]} [filters] * @property {FiltersInfo[]} [processed] - * @property {Object} [applied_filters] - Specifies the set of filters currently - * applied , search result, or view, detailing the criteria used to narrow - * down or sort the information presented. This object is designed to be - * highly flexible, allowing for the inclusion of various filter types such as - * date ranges, categories, status flags, or custom search terms. - * @property {Object} [page] - An object representing a page with pagination details. + * @property {Object} [applied_filters] + * @property {Object} [page] */ /** - * @typedef FiltersResponseSchema - * @property {AdvanceFilterInfo} [advance] - * @property {FiltersInfo} [global_1] + * @typedef FiltersResponse * @property {AdvanceFilterInfo} [advance_filter] * @property {FiltersInfo[]} [global_filter] */ @@ -4385,7 +2773,7 @@ export = OrderPlatformModel; * @property {string} [url] */ /** - * @typedef FileResponseSchema + * @typedef FileResponse * @property {string} [file_name] - Name of the file * @property {URL} [cdn] */ @@ -4395,14 +2783,20 @@ export = OrderPlatformModel; * @property {string} [text] */ /** - * @typedef BulkActionTemplateResponseSchema + * @typedef BulkActionTemplateResponse * @property {BulkActionTemplate[]} [template_x_slug] - Allowed bulk action template slugs */ /** - * @typedef PlatformShipmentReasonsResponseSchema - * @property {Reason[]} [reasons] - An array of reasons associated with the platform. - * @property {boolean} [success] - Indicates whether the API call was successful - * (true) or not (false). + * @typedef Reason + * @property {string[]} [qc_type] + * @property {number} [id] + * @property {QuestionSet[]} [question_set] + * @property {string} [display_name] + */ +/** + * @typedef PlatformShipmentReasonsResponse + * @property {Reason[]} [reasons] + * @property {boolean} [success] */ /** * @typedef ShipmentResponseReasons @@ -4410,7 +2804,7 @@ export = OrderPlatformModel; * @property {string} [reason] */ /** - * @typedef ShipmentReasonsResponseSchema + * @typedef ShipmentReasonsResponse * @property {ShipmentResponseReasons[]} reasons * @property {string} message * @property {boolean} success @@ -4418,41 +2812,21 @@ export = OrderPlatformModel; /** * @typedef StoreAddress * @property {string} phone - * @property {string} created_at - Denotes the date and time when the transition - * of the store address was created. + * @property {string} created_at * @property {string} contact_person * @property {number} pincode - * @property {string} address_type - The type of the address (e.g., home, office). - * @property {string} address1 - The primary address dynamically forms based on - * a template. If the template includes a single key, Address1 contains that - * data. For templates with multiple keys like {address} {address2} {area} - * {state} {country}, Address1 compiles all into a single formatted string. + * @property {string} address_type + * @property {string} address1 * @property {string} [display_address] * @property {string} [version] - * @property {string} address_category - Category or classification of the - * address. The address_category field that includes "store", "delivery", and - * "billing" serves to classify addresses based on various business processes - * - * - 'store': Identifies addresses associated with physical retail locations or - * warehouses which is essential for inventory management, order - * fulfillment, and facilitating in-store pickups or returns. - * - 'delivery': Identifies addresses where orders are shipped to customers which - * ensures successful delivery, enhancing customer satisfaction, and - * optimizing logistics operations. - * - 'billing': Identifies addresses used for billing and financial transactions - * which are essential for payment processing, invoice generation, and - * maintaining financial accuracy. - * + * @property {string} address_category * @property {string} city * @property {number} longitude * @property {string} [address2] * @property {string} [area] * @property {string} [email] - * @property {string} updated_at - Denotes the date and time when any - * modifications were made to the store. - * @property {string} country_code - Uniquely identifies the country of the - * store addressds_type using the two-character standard ISO 3166-1 alpha-2 - * country codes. Examples include 'US' for the United States and 'IN' for India. + * @property {string} updated_at + * @property {string} country_code * @property {string} country * @property {string} [landmark] * @property {number} latitude @@ -4483,7 +2857,7 @@ export = OrderPlatformModel; /** * @typedef Document * @property {string} value - * @property {string} type - Type of the document. + * @property {string} ds_type * @property {boolean} verified * @property {string} legal_name * @property {string} [url] @@ -4494,21 +2868,15 @@ export = OrderPlatformModel; */ /** * @typedef StoreMeta - * @property {Object} [additional_contact_details] - Provides a flexible - * structure for storing extra contact information related to the store. + * @property {Object} [additional_contact_details] * @property {Object[]} [timing] * @property {string[]} [notification_emails] * @property {string} [gst_number] - * @property {Object} [ewaybill_portal_details] - Contains essential information - * and settings related to the e-Way Bill portal, which is used for generating - * and managing e-waybills for the transportation of goods under specific tax - * regulations. + * @property {Object} [ewaybill_portal_details] * @property {EInvoicePortalDetails} [einvoice_portal_details] * @property {StoreGstCredentials} gst_credentials * @property {string} stage - * @property {Object} [product_return_config] - Product return configuration - * details for the location. It can include details like on_same_store - * denoting whether return can be initiated at the same store. + * @property {Object} [product_return_config] * @property {StoreDocuments} [documents] * @property {string} display_name */ @@ -4518,17 +2886,14 @@ export = OrderPlatformModel; * @property {boolean} [is_active] * @property {number} company_id * @property {number} [alohomora_user_id] - * @property {string} created_at - Denotes the date and time when the store was created. + * @property {string} created_at * @property {string} contact_person * @property {string} store_email * @property {boolean} [is_enabled_for_recon] * @property {string} pincode * @property {string} [mall_area] * @property {string} [vat_no] - * @property {string} address1 - The primary address dynamically forms based on - * a template. If the template includes a single key, Address1 contains that - * data. For templates with multiple keys like {address} {address2} {area} - * {state} {country}, Address1 compiles all into a single formatted string. + * @property {string} address1 * @property {string} [display_address] * @property {string} [store_active_from] * @property {string} city @@ -4537,11 +2902,10 @@ export = OrderPlatformModel; * @property {string[]} [brand_store_tags] * @property {string} [order_integration_id] * @property {number} [parent_store_id] - * @property {string} location_type - Type of location of the fulfilling store. + * @property {string} location_type * @property {string} [code] * @property {string} fulfillment_channel - * @property {string} [updated_at] - Denotes the date and time when any - * modifications were made to the store. + * @property {string} [updated_at] * @property {StoreAddress} [store_address_json] * @property {StoreMeta} meta * @property {string} [s_id] @@ -4560,16 +2924,15 @@ export = OrderPlatformModel; * @property {string} [logo] * @property {string} [invoice_prefix] * @property {boolean} [credit_note_allowed] - * @property {string} [start_date] - Denotes the start date and time when the - * brand was created. + * @property {string} [start_date] * @property {string} [company] * @property {boolean} [is_virtual_invoice] * @property {string} [script_last_ran] * @property {string} [pickup_location] - * @property {string} [created_on] - Timestamp when the brand was created. + * @property {string} [created_on] * @property {string} brand_name * @property {number} [brand_id] - * @property {string} [modified_on] - Timestamp when the brand of the order was modified. + * @property {string} [modified_on] * @property {number} [id] */ /** @@ -4578,68 +2941,43 @@ export = OrderPlatformModel; * @property {number} brand_id * @property {string} slug_key * @property {string} [webstore_product_url] - * @property {number} [l3_category] - Represents the product's classification at - * the third level in the e-commerce platform's category hierarchy, using an - * integer identifier. This finer level of categorization allows for precise - * product organization and easier navigation for customers seeking specific items. - * @property {string} [l3_category_name] - This key specifies the name of the - * third-level category under which the product is listed, offering a more - * detailed classification within the e-commerce platform's hierarchy. - * @property {string} [last_updated_at] - Denotes the date and time when the - * item was updated. + * @property {number} [l3_category] + * @property {string} [l3_category_name] + * @property {string} [last_updated_at] * @property {string} name - * @property {string[]} [l2_category] - The l2_category field represents the - * second level of categorization for items within an e-commerce platform's - * hierarchy. This allows for classification beyond the top-tier (level 1) - * categories, helping customers to narrow down their search and find products + * @property {string[]} [l2_category] * @property {string} brand * @property {string[]} image * @property {string} [code] - * @property {number} [l1_category_id] - The unique identifier of the defines - * the top-tier categories to which a product belongs within the e-commerce - * platform's hierarchy. + * @property {number} [l1_category_id] * @property {number} item_id - * @property {string[]} [l1_category] - This array defines the top-tier - * categories to which a product belongs within the e-commerce platform's hierarchy. + * @property {string[]} [l1_category] * @property {string} [gender] * @property {boolean} [can_cancel] * @property {boolean} [can_return] * @property {string} size * @property {string} [branch_url] - * @property {Object} [meta] - Meta data of the item contains additional, - * potentially dynamic information about the item. + * @property {Object} [meta] * @property {string} [color] * @property {number} [department_id] * @property {number} [l2_category_id] */ /** * @typedef ArticleStatusDetails - * @property {Object} [status] - Captures comprehensive status information for - * an article. Each status type, such as 'cancelled_fynd', contains objects - * keyed by unique identifiers (UIDs). These objects detail the specific - * status, including associated bag IDs with their quantities, total quantity - * affected, and reasons for the status if applicable. This structure allows - * for tracking multiple status conditions and their details for a single article. + * @property {Object} [status] */ /** * @typedef Company * @property {string} [pan_no] - * @property {string} [created_on] - Timestamp when the company was created. + * @property {string} [created_on] * @property {number} [id] * @property {string} [company_name] * @property {string} [gst_number] - * @property {string} [company_type] - The type of company, which can be one of - * the following: - `distributor`: Distributor - `franchise`: Franchise - - * `mbo`: MBO (Managed Business Operations) - `manufacturer-owner`: Owner/Manufacturer - * @property {string} [modified_on] - Timestamp when the company was modified. - * @property {Object} [meta] - Meta data of the company contains additional, - * potentially dynamic information about the company. - * @property {string} [business_type] - The type of business structure, which - * can be one of the following: - `Private`: Private Limited Company - - * `LLP/Partnership`: Limited Liability Partnership or Partnership - - * `HUF/Proprietorship`: Hindu Undivided Family or Proprietorship. - * @property {string} [agreement_start_date] - Specifies the official beginning - * date and time of an agreement or contract associated with the company. + * @property {string} [company_type] + * @property {string} [modified_on] + * @property {Object} [meta] + * @property {string} [business_type] + * @property {string} [agreement_start_date] */ /** * @typedef ShipmentGstDetails @@ -4647,12 +2985,7 @@ export = OrderPlatformModel; * @property {number} [gst_fee] * @property {number} [brand_calculated_amount] * @property {number} [tax_collected_at_source] - * @property {string} [gstin_code] - A GST Number (Goods and Services Tax - * Identification Number, often abbreviated as GSTIN) is a unique identifier - * assigned to a business or individual registered under the Goods and - * Services Tax (GST) system in countries like India. The GST number is - * essential for businesses to comply with tax regulations and for the - * government to track tax payments and returns. + * @property {string} [gstin_code] */ /** * @typedef DeliverySlotDetails @@ -4664,12 +2997,18 @@ export = OrderPlatformModel; */ /** * @typedef InvoiceDetails - * @property {string} [updated_date] - Specifies the date and time when the - * invoice was last updated. + * @property {string} [updated_date] * @property {string} [store_invoice_id] * @property {string} [invoice_url] * @property {string} [label_url] */ +/** + * @typedef ShipmentDetails + * @property {string} [dp_id] + * @property {Object} [dp_options] + * @property {boolean} [lock_status] + * @property {Object} [action_to_status] + */ /** * @typedef UserDetails * @property {string} [user_oid] @@ -4681,8 +3020,7 @@ export = OrderPlatformModel; * @property {boolean} [is_anonymous_user] * @property {string} [gender] * @property {string} [mongo_user_id] - * @property {Object} [meta] - Meta data of the user details contains - * additional, potentially dynamic information about the user details. + * @property {Object} [meta] */ /** * @typedef WeightData @@ -4691,154 +3029,87 @@ export = OrderPlatformModel; */ /** * @typedef BagDetails - * @property {number} [bag_update_time] - The timestamp indicating when the - * bag's information was last updated - * @property {string} [id] - A unique identifier for the bag record within the system. - * @property {number} [bag_id] - A unique identifier specifically for the bag - * itself, used for tracking purposes. + * @property {number} [bag_update_time] + * @property {string} [id] + * @property {number} [bag_id] * @property {AffiliateBagDetails} [affiliate_bag_details] * @property {AffiliateDetails} [affiliate_details] - * @property {Object[]} [applied_promos] - A list of promotional discounts that - * were applied to the bag's contents. + * @property {Object[]} [applied_promos] * @property {Article} [article] * @property {ArticleStatusDetails} [article_details] - * @property {BagStatusHistory[]} [bag_status] - An array of current status - * records associated with the bag, reflecting its lifecycle stages (e.g., - * pending, placed, delivered). - * @property {BagStatusHistory[]} [bag_status_history] - An array of current - * status records associated with the bag, reflecting its lifecycle stages - * (e.g., pending, placed, delivered). + * @property {BagStatusHistory[]} [bag_status] + * @property {BagStatusHistory[]} [bag_status_history] * @property {Brand} [brand] * @property {Company} [company] * @property {BagStatusHistory} [current_operational_status] * @property {BagStatusHistory} [current_status] * @property {Dates} [dates] - * @property {Address} [delivery_address] + * @property {PlatformDeliveryAddress} [delivery_address] * @property {DeliverySlotDetails} [delivery_slot] - * @property {string} [display_name] - Name of the bag intended for user display. - * @property {Object} [dp_details] - Additional information about the delivery - * partner (DP) handling the bag. + * @property {string} [display_name] + * @property {Object} [dp_details] * @property {Object} [einvoice_info] - * @property {string} [entity_type] - Type of entity that the tag is associated - * to (bag, shipments). - * @property {Object} [fallback_user] - Details of the fallback user associated - * with the bag . - * @property {FinancialBreakup[]} [financial_breakup] - A breakdown of the - * financial aspects associated with the bag, such as product prices, taxes, - * discounts, and total cost. + * @property {string} [entity_type] + * @property {Object} [fallback_user] + * @property {FinancialBreakup[]} [financial_breakup] * @property {Store} [fulfilling_store] - * @property {Object} [fyndstore_emp] - Fynd store employee details. + * @property {Object} [fyndstore_emp] * @property {GSTDetailsData} [gst_details] * @property {InvoiceDetails} [invoice] * @property {Item} [item] - * @property {string} [journey_type] - It is a type being used to represent the - * journey of shipment through the performed status transition. Forward - * Journey: The forward journey encompasses all the stages of shipping, - * including order placement, packing, dispatch, in-transit updates, and - * delivery. Return Journey: Contrary to the forward journey, the return - * journey involves the process of sending items back from the customer to the - * original sender or a designated return facility. - * @property {number} [line_number] - A unique identifying number associated - * with the bag. It is generated sequentially as bags are created. - * @property {boolean} [lock_status] - Indicates whether the bag is locked from - * further changes (true/false). A locked bag cannot undergo modifications - * until unlocked. - * @property {string} [manifest_id] - The identifier-assigned bags receive after - * they are manifest (thereby creating a shipment in conjunction with the - * allocated manifest). - * @property {Object} [meta] - Meta data of the bag details contains additional, - * potentially dynamic information about the bag details. - * @property {string} [mode_of_payment] - This field reflects the payment method - * used in the transaction for a particular bag. - * @property {number} [no_of_bags_order] - The total number of bags in this bag's order. - * @property {string} [operational_status] - The particular state a bag occupies - * in the shipment life-cycle. + * @property {string} [journey_type] + * @property {number} [line_number] + * @property {boolean} [lock_status] + * @property {string} [manifest_id] + * @property {Object} [meta] + * @property {string} [mode_of_payment] + * @property {number} [no_of_bags_order] + * @property {string} [operational_status] * @property {OrderDetails} [order] - * @property {string} [order_integration_id] - A unique identifier used for - * integrating this order with external systems or services. - * @property {string} [order_type] - Defines the specific journey a shipment - * will follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. For example: - * - * - "HomeDelivery": The order goes through all the steps needed for delivery, - * from being packed to arriving at the customer’s address. - * - "PickAtStore": The order is prepared for pickup at the store, skipping - * shipping steps to make it ready faster for the customer to collect in person. - * - "Digital": This order type likely refers to orders that involve digital goods - * or services, such as software, digital subscriptions, e-books, online - * courses, or any other item that can be delivered electronically. - * - * @property {number} [order_value] - An estimated value of the order at the - * time of placement or sale. + * @property {string} [order_integration_id] + * @property {string} [order_type] + * @property {number} [order_value] * @property {Store} [ordering_store] - * @property {Object} [parent_promo_bags] - An object containing details of - * parent promotional bags. - * @property {Object} [payment_methods] - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. The structure is designed to accommodate any number of - * payment methods,providing flexibility and comprehensive insights into each - * transaction's payment aspect. - * @property {string} [payment_type] - The Specific type of payment. - * @property {Object} [payments] - Defines allowed payment details for the item. + * @property {Object} [parent_promo_bags] + * @property {Object} [payment_methods] + * @property {string} [payment_type] + * @property {Object} [payments] * @property {Prices} [prices] - * @property {PriceAdjustmentCharge[]} [charges] - Defines any additional - * charges for the product. - * @property {boolean} [qc_required] - Indicates whether quality check is - * required for the product. - * @property {number} [quantity] - The quantity of the product. - * @property {Object[]} [reasons] - Information about why the Bag's - * item/products are being cancelled or returned or exchanged. This keys - * within this object represent unique - * @property {boolean} [restore_coupon] - Indicates whether voucher/wallet - * points can be reapplied to the product. - * @property {Object} [restore_promos] - Provides a flexible structure for - * storing information about promotion details or offers that are eligible for - * restoration. This can include details such as promo codes, descriptions of - * the offers, eligibility criteria, restoration conditions, and any other - * relevant data that supports the reactivation of previously paused or - * expired promotions. - * @property {Address} [rto_address] - * @property {string} [seller_identifier] - A unique identifier assigned by the - * seller to represent a specific transaction in their order processing system. + * @property {boolean} [qc_required] + * @property {number} [quantity] + * @property {Object[]} [reasons] + * @property {boolean} [restore_coupon] + * @property {Object} [restore_promos] + * @property {PlatformDeliveryAddress} [rto_address] + * @property {string} [seller_identifier] * @property {Shipment} [shipment] * @property {ShipmentDetails} [shipment_details] - * @property {string} [shipment_id] - Unique identifier of the shipment. + * @property {string} [shipment_id] * @property {ShipmentGstDetails} [shipment_gst] * @property {ShipmentStatusData} [shipment_status] - * @property {ShipmentStatusData[]} [shipment_status_history] - Status history - * of the shipment item in the order. + * @property {ShipmentStatusData[]} [shipment_status_history] * @property {BagReturnableCancelableStatus} [status] - * @property {string[]} [tags] - A list of tags or labels associated with the - * bag, which might be used for filtering, sorting, or categorizing purposes. - * @property {number} [total_shipment_bags] - The total number of shipped bags. - * @property {number} [total_shipments_in_order] - The total number of shipments - * in the order. - * @property {string} [transaction_type] - Specifies the type of the transaction - * being processed. This classification helps in distinguishing between - * different operational processes and allows for tailored handling of each - * transaction type. For example, a 'shipment' transaction type refers to - * operations related to the shipping of goods. - * @property {string} [type] - The type of the bag. - * @property {string} [updated_at] - The date and time when the bag was last updated. + * @property {string[]} [tags] + * @property {number} [total_shipment_bags] + * @property {number} [total_shipments_in_order] + * @property {string} [transaction_type] + * @property {string} [type] + * @property {string} [updated_at] * @property {UserDetails} [user] * @property {WeightData} [weight] - * @property {number[]} [original_bag_list] - Specifies the list of integers - * that specify the bag number - * @property {string} [identifier] - The unique identifier for the bag. + * @property {number[]} [original_bag_list] + * @property {string} [identifier] */ /** - * @typedef BagDetailsPlatformResponseSchema - * @property {number} [status_code] - Response status_code. + * @typedef BagDetailsPlatformResponse + * @property {number} [status_code] * @property {BagDetails} [data] */ /** * @typedef BagsPage * @property {number} item_total * @property {boolean} has_next - * @property {string} page_type - The type of the page. + * @property {string} page_type * @property {number} current * @property {number} size */ @@ -4848,12 +3119,12 @@ export = OrderPlatformModel; * @property {BagsPage} [page] */ /** - * @typedef GetBagsPlatformResponseSchema - * @property {number} [status_code] - Response status_code. + * @typedef GetBagsPlatformResponse + * @property {number} [status_code] * @property {BagData} [data] */ /** - * @typedef GeneratePosOrderReceiptResponseSchema + * @typedef GeneratePosOrderReceiptResponse * @property {string} [customer_cn_receipt] * @property {boolean} [success] * @property {string} [order_id] @@ -4870,29 +3141,28 @@ export = OrderPlatformModel; * @property {string} [value] */ /** - * @typedef AllowedTemplatesResponseSchema + * @typedef AllowedTemplatesResponse * @property {Templates[]} [template_x_slug] */ /** - * @typedef TemplateDownloadResponseSchema + * @typedef TemplateDownloadResponse * @property {string} [file_name] * @property {string} [url] */ /** * @typedef Error - * @property {string} [message] - A message describing the error that occurred. - * @property {boolean} [success] - Indicates whether the API call was successful - * (true) or not (false). - */ + * @property {string} [message] + * @property {boolean} [success] + */ /** - * @typedef BulkFailedResponseSchema + * @typedef BulkFailedResponse * @property {boolean} [status] * @property {string} [error] */ declare class OrderPlatformModel { } declare namespace OrderPlatformModel { - export { InvalidateShipmentCachePayload, InvalidateShipmentCacheNestedResponseSchema, InvalidateShipmentCacheResponseSchema, UpdatePackingErrorResponseSchema, ErrorResponseSchema, StoreReassign, StoreReassignResponseSchema, LockManagerEntities, UpdateShipmentLockPayload, OriginalFilter, Bags, CheckResponseSchema, UpdateShipmentLockResponseSchema, AnnouncementResponseSchema, AnnouncementsResponseSchema, BaseResponseSchema, ErrorDetail, ProductsReasonsFilters, ProductsReasonsData, ProductsReasons, EntityReasonData, EntitiesReasons, ReasonsData, Products, OrderItemDataUpdates, ProductsDataUpdatesFilters, ProductsDataUpdates, EntitiesDataUpdates, OrderDataUpdates, DataUpdates, ShipmentsRequestSchema, UpdatedAddressSchema, UpdateAddressRequestBody, StatuesRequestSchema, UpdateShipmentStatusRequestSchema, ShipmentsResponseSchema, DPConfiguration, PaymentConfig, LockStateMessage, CreateOrderConfig, StatuesResponseSchema, UpdateShipmentStatusResponseBody, OrderUser, OrderPriority, ArticleDetails, LocationDetails, ShipmentDetails, ShipmentConfig, ShipmentData, MarketPlacePdf, AffiliateBag, UserData, OrderInfo, AffiliateAppConfigMeta, AffiliateAppConfig, AffiliateInventoryArticleAssignmentConfig, AffiliateInventoryPaymentConfig, AffiliateInventoryStoreConfig, AffiliateInventoryOrderConfig, AffiliateInventoryLogisticsConfig, AffiliateInventoryConfig, AffiliateConfig, Affiliate, AffiliateStoreIdMapping, OrderConfig, CreateOrderResponseSchema, DispatchManifest, SuccessResponseSchema, ActionInfo, GetActionsResponseSchema, HistoryReason, RefundInformation, HistoryMeta, HistoryDict, ShipmentHistoryResponseSchema, PostHistoryFilters, PostHistoryData, PostHistoryDict, PostShipmentHistory, SmsDataPayload, SendSmsPayload, OrderDetails, Meta, ShipmentDetail, OrderStatusData, OrderStatusResult, SendSmsResponseSchema, Dimension, UpdatePackagingDimensionsPayload, UpdatePackagingDimensionsResponseSchema, Tax, AmountSchema, Charge, LineItem, ProcessingDates, Tag, ProcessAfterConfig, SystemMessages, Shipment, GeoLocationSchema, ShippingInfo, BillingInfo, UserInfo, TaxInfo, PaymentMethod, PaymentInfo, CreateOrderAPI, CreateOrderErrorReponse, PaymentMethods, CreateChannelPaymentInfo, CreateChannelConfig, CreateChannelConfigData, CreateChannelConifgErrorResponseSchema, UploadManifestConsent, CreateChannelConfigResponseSchema, PlatformOrderUpdate, ResponseDetail, FyndOrderIdList, OrderStatus, BagStateTransitionMap, RoleBaseStateTransitionMapping, FetchCreditBalanceRequestPayload, CreditBalanceInfo, FetchCreditBalanceResponsePayload, RefundModeConfigRequestPayload, RefundOption, RefundModeFormat, RefundModeInfo, RefundModeConfigResponsePayload, AttachUserOtpData, AttachUserInfo, AttachOrderUser, AttachOrderUserResponseSchema, SendUserMobileOTP, PointBlankOtpData, SendUserMobileOtpResponseSchema, VerifyOtpData, VerifyMobileOTP, VerifyOtpResponseData, VerifyOtpResponseSchema, BulkReportsDownloadRequestSchema, BulkReportsDownloadResponseSchema, APIFailedResponseSchema, BulkStateTransistionRequestSchema, BulkStateTransistionResponseSchema, ShipmentActionInfo, BulkActionListingData, BulkListinPage, BulkListingResponseSchema, JobDetailsData, JobDetailsResponseSchema, JobFailedResponseSchema, ManifestPageInfo, ManifestItemDetails, ManifestShipmentListing, DateRange, Filters, ManifestFile, ManifestMediaUpdate, PDFMeta, TotalShipmentPricesCount, ManifestMeta, Manifest, ManifestList, ManifestDetails, FiltersRequestSchema, ProcessManifest, ProcessManifestResponseSchema, ProcessManifestItemResponseSchema, FilterInfoOption, FiltersInfo, ManifestFiltersResponseSchema, PageDetails, EInvoiceIrnDetails, EInvoiceErrorDetails, EInvoiceDetails, EInvoiceResponseData, EInvoiceRetry, EInvoiceRetryResponseSchema, EInvoiceErrorInfo, EInvoiceErrorResponseData, EInvoiceErrorResponseSchema, EInvoiceErrorResponseDetails, EInvoiceRetryShipmentData, CourierPartnerTrackingDetails, CourierPartnerTrackingResponseSchema, LogsChannelDetails, LogPaymentDetails, FailedOrdersItem, FailedOrderLogs, FailedOrderLogDetails, GenerateInvoiceIDResponseData, GenerateInvoiceIDErrorResponseData, GenerateInvoiceIDRequestSchema, GenerateInvoiceIDResponseSchema, GenerateInvoiceIDErrorResponseSchema, ManifestResponseSchema, ProcessManifestRequestSchema, ManifestItems, ManifestErrorResponseSchema, ConfigData, ConfigUpdatedResponseSchema, FlagData, Flags, Filter, PostHook, PreHook, Config, TransitionConfigCondition, TransitionConfigData, TransitionConfigPayload, RuleListRequestSchema, RuleErrorResponseSchema, RMAPageInfo, RuleAction, QuestionSetItem, Reason, Conditions, RuleItem, RuleError, RuleListResponseSchema, UpdateShipmentPaymentMode, CommonErrorResponseSchema, ExceptionErrorResponseSchema, ProductSchema, PaymentMethodSchema, ActionDetailSchema, PaymentMetaDataSchema, PaymentMetaLogoURLSchema, ValidationError, Page, BagReasonMeta, QuestionSet, BagReasons, ShipmentBagReasons, ShipmentStatus, UserDataInfo, Address, ShipmentListingChannel, Prices, ChargeDistributionSchema, ChargeDistributionLogic, ChargeAmountCurrency, ChargeAmount, PriceAdjustmentCharge, OrderingCurrencyPrices, Identifier, FinancialBreakup, GSTDetailsData, BagStateMapper, BagStatusHistory, Dimensions, ReturnConfig, Weight, Article, ShipmentListingBrand, ReplacementDetails, AffiliateMeta, AffiliateBagDetails, PlatformArticleAttributes, PlatformItem, Dates, BagReturnableCancelableStatus, BagUnit, ShipmentItemFulFillingStore, Currency, OrderingCurrency, ConversionRate, CurrencyInfo, ShipmentItem, ShipmentInternalPlatformViewResponseSchema, TrackingList, InvoiceInfo, OrderDetailsData, UserDetailsData, PhoneDetails, ContactDetails, CompanyDetails, OrderingStoreDetails, DPDetailsData, BuyerDetails, DebugInfo, EinvoiceInfo, Formatted, ShipmentTags, LockData, ShipmentTimeStamp, ShipmentMeta, PDFLinks, AffiliateDetails, BagConfigs, OrderBagArticle, OrderBrandName, AffiliateBagsDetails, BagPaymentMethods, DiscountRules, ItemCriterias, BuyRules, PriceMinMax, ItemPriceDetails, FreeGiftItems, AppliedFreeArticles, AppliedPromos, CurrentStatus, OrderBags, FulfillingStore, ShipmentPayments, ShipmentStatusData, ShipmentLockDetails, PlatformShipment, ShipmentInfoResponseSchema, TaxDetails, PaymentInfoData, CurrencySchema, OrderData, OrderDetailsResponseSchema, SubLane, SuperLane, LaneConfigResponseSchema, PlatformBreakupValues, PlatformChannel, PlatformOrderItems, OrderListingResponseSchema, PlatformTrack, PlatformShipmentTrack, AdvanceFilterInfo, FiltersResponseSchema, URL, FileResponseSchema, BulkActionTemplate, BulkActionTemplateResponseSchema, PlatformShipmentReasonsResponseSchema, ShipmentResponseReasons, ShipmentReasonsResponseSchema, StoreAddress, EInvoicePortalDetails, StoreEinvoice, StoreEwaybill, StoreGstCredentials, Document, StoreDocuments, StoreMeta, Store, Brand, Item, ArticleStatusDetails, Company, ShipmentGstDetails, DeliverySlotDetails, InvoiceDetails, UserDetails, WeightData, BagDetails, BagDetailsPlatformResponseSchema, BagsPage, BagData, GetBagsPlatformResponseSchema, GeneratePosOrderReceiptResponseSchema, Templates, AllowedTemplatesResponseSchema, TemplateDownloadResponseSchema, Error, BulkFailedResponseSchema }; + export { InvalidateShipmentCachePayload, InvalidateShipmentCacheNestedResponse, InvalidateShipmentCacheResponse, UpdatePackingErrorResponse, ErrorResponse, StoreReassign, StoreReassignResponse, LockManagerEntities, UpdateShipmentLockPayload, OriginalFilter, Bags, CheckResponse, UpdateShipmentLockResponse, AnnouncementResponse, AnnouncementsResponse, BaseResponse, ErrorDetail, ProductsReasonsFilters, ProductsReasonsData, ProductsReasons, EntityReasonData, EntitiesReasons, ReasonsData, Products, OrderItemDataUpdates, ProductsDataUpdatesFilters, ProductsDataUpdates, EntitiesDataUpdates, DataUpdates, ShipmentsRequest, StatuesRequest, UpdateShipmentStatusRequestSchema, ShipmentsResponse, StatuesResponse, UpdateShipmentStatusResponseBody, DPConfiguration, PaymentConfig, CreateOrderConfig, CreateOrderResponse, DispatchManifest, SuccessResponse, ActionInfo, GetActionsResponse, HistoryReason, HistoryMeta, HistoryDict, ShipmentHistoryResponse, PostHistoryFilters, PostHistoryData, PostHistoryDict, PostShipmentHistory, SmsDataPayload, SendSmsPayload, OrderDetails, Meta, ShipmentDetail, OrderStatusData, OrderStatusResult, Dimension, UpdatePackagingDimensionsPayload, UpdatePackagingDimensionsResponse, Tax, AmountSchema, Charge, LineItem, ProcessingDates, Shipment, GeoLocationSchema, ShippingInfo, UserInfo, TaxInfo, PaymentMethod, PaymentInfo, CreateOrderAPI, CreateOrderErrorReponse, UploadManifestConsent, PlatformOrderUpdate, ResponseDetail, FyndOrderIdList, OrderStatus, BagStateTransitionMap, RoleBaseStateTransitionMapping, RefundModeConfigRequestPayload, RefundOption, RefundModeFormat, RefundModeInfo, RefundModeConfigResponsePayload, AttachUserOtpData, AttachUserInfo, AttachOrderUser, AttachOrderUserResponse, SendUserMobileOTP, PointBlankOtpData, SendUserMobileOtpResponse, VerifyOtpData, VerifyMobileOTP, VerifyOtpResponseData, VerifyOtpResponse, BulkReportsDownloadRequest, BulkReportsDownloadResponse, APIFailedResponse, BulkStateTransistionRequestSchema, BulkStateTransistionResponse, ShipmentActionInfo, BulkActionListingData, BulkListinPage, BulkListingResponse, JobDetailsData, JobDetailsResponse, JobFailedResponse, ManifestPageInfo, ManifestItemDetails, ManifestShipmentListing, DateRange, Filters, ManifestFile, ManifestMediaUpdate, PDFMeta, TotalShipmentPricesCount, ManifestMeta, Manifest, ManifestList, ManifestDetails, FilterInfoOption, FiltersInfo, ManifestFiltersResponse, PageDetails, EInvoiceIrnDetails, EInvoiceErrorDetails, EInvoiceDetails, EInvoiceResponseData, EInvoiceRetry, EInvoiceRetryResponse, EInvoiceErrorInfo, EInvoiceErrorResponseData, EInvoiceErrorResponse, EInvoiceErrorResponseDetails, EInvoiceRetryShipmentData, CourierPartnerTrackingDetails, CourierPartnerTrackingResponse, LogsChannelDetails, LogPaymentDetails, FailedOrdersItem, FailedOrderLogs, FailedOrderLogDetails, GenerateInvoiceIDResponseData, GenerateInvoiceIDErrorResponseData, GenerateInvoiceIDRequestSchema, GenerateInvoiceIDResponse, GenerateInvoiceIDErrorResponse, ManifestResponse, ProcessManifestRequest, ManifestItems, ManifestErrorResponse, ConfigData, ConfigUpdatedResponse, FlagData, Flags, Filter, PostHook, PreHook, Config, TransitionConfigCondition, TransitionConfigData, TransitionConfigPayload, CommonErrorResponse, ExceptionErrorResponse, Page, BagReasonMeta, QuestionSet, BagReasons, ShipmentBagReasons, ShipmentStatus, UserDataInfo, PlatformDeliveryAddress, ShipmentListingChannel, Prices, Identifier, FinancialBreakup, GSTDetailsData, BagStateMapper, BagStatusHistory, Dimensions, ReturnConfig, Weight, Article, ShipmentListingBrand, ReplacementDetails, AffiliateMeta, AffiliateBagDetails, PlatformArticleAttributes, PlatformItem, Dates, BagReturnableCancelableStatus, BagUnit, ShipmentItemFulFillingStore, Currency, OrderingCurrency, ConversionRate, CurrencyInfo, ShipmentItem, ShipmentInternalPlatformViewResponse, TrackingList, InvoiceInfo, OrderDetailsData, UserDetailsData, PhoneDetails, ContactDetails, CompanyDetails, OrderingStoreDetails, DPDetailsData, BuyerDetails, DebugInfo, EinvoiceInfo, Formatted, ShipmentTags, LockData, ShipmentTimeStamp, ShipmentMeta, PDFLinks, AffiliateConfig, AffiliateDetails, BagConfigs, OrderBagArticle, OrderBrandName, AffiliateBagsDetails, BagPaymentMethods, DiscountRules, ItemCriterias, BuyRules, AppliedPromos, CurrentStatus, OrderBags, FulfillingStore, ShipmentPayments, ShipmentStatusData, ShipmentLockDetails, PlatformShipment, ShipmentInfoResponse, TaxDetails, PaymentInfoData, OrderData, OrderDetailsResponse, SubLane, SuperLane, LaneConfigResponse, PlatformBreakupValues, PlatformChannel, PlatformOrderItems, OrderListingResponse, PlatformTrack, PlatformShipmentTrack, AdvanceFilterInfo, FiltersResponse, URL, FileResponse, BulkActionTemplate, BulkActionTemplateResponse, Reason, PlatformShipmentReasonsResponse, ShipmentResponseReasons, ShipmentReasonsResponse, StoreAddress, EInvoicePortalDetails, StoreEinvoice, StoreEwaybill, StoreGstCredentials, Document, StoreDocuments, StoreMeta, Store, Brand, Item, ArticleStatusDetails, Company, ShipmentGstDetails, DeliverySlotDetails, InvoiceDetails, ShipmentDetails, UserDetails, WeightData, BagDetails, BagDetailsPlatformResponse, BagsPage, BagData, GetBagsPlatformResponse, GeneratePosOrderReceiptResponse, Templates, AllowedTemplatesResponse, TemplateDownloadResponse, Error, BulkFailedResponse }; } /** @returns {InvalidateShipmentCachePayload} */ declare function InvalidateShipmentCachePayload(): InvalidateShipmentCachePayload; @@ -4911,26 +3181,22 @@ type InvalidateShipmentCachePayload = { */ bag_ids?: string[]; }; -/** @returns {InvalidateShipmentCacheNestedResponseSchema} */ -declare function InvalidateShipmentCacheNestedResponseSchema(): InvalidateShipmentCacheNestedResponseSchema; -type InvalidateShipmentCacheNestedResponseSchema = { +/** @returns {InvalidateShipmentCacheNestedResponse} */ +declare function InvalidateShipmentCacheNestedResponse(): InvalidateShipmentCacheNestedResponse; +type InvalidateShipmentCacheNestedResponse = { shipment_id?: string; - /** - * - The HTTP status code corresponding to the - * overall status of the shipment response. - */ status?: number; message?: string; error?: string; }; -/** @returns {InvalidateShipmentCacheResponseSchema} */ -declare function InvalidateShipmentCacheResponseSchema(): InvalidateShipmentCacheResponseSchema; -type InvalidateShipmentCacheResponseSchema = { - response?: InvalidateShipmentCacheNestedResponseSchema[]; +/** @returns {InvalidateShipmentCacheResponse} */ +declare function InvalidateShipmentCacheResponse(): InvalidateShipmentCacheResponse; +type InvalidateShipmentCacheResponse = { + response?: InvalidateShipmentCacheNestedResponse[]; }; -/** @returns {UpdatePackingErrorResponseSchema} */ -declare function UpdatePackingErrorResponseSchema(): UpdatePackingErrorResponseSchema; -type UpdatePackingErrorResponseSchema = { +/** @returns {UpdatePackingErrorResponse} */ +declare function UpdatePackingErrorResponse(): UpdatePackingErrorResponse; +type UpdatePackingErrorResponse = { /** * - Represents the HTTP status code of the API response. */ @@ -4940,9 +3206,9 @@ type UpdatePackingErrorResponseSchema = { */ error?: string; }; -/** @returns {ErrorResponseSchema} */ -declare function ErrorResponseSchema(): ErrorResponseSchema; -type ErrorResponseSchema = { +/** @returns {ErrorResponse} */ +declare function ErrorResponse(): ErrorResponse; +type ErrorResponse = { /** * - Represents the HTTP status code of the API response. */ @@ -4957,12 +3223,7 @@ type ErrorResponseSchema = { */ message: string; /** - * - This field is intended to store the error - * trace of the error that occurred.For example, "Exception Trace" represents - * a placeholder for the actual stack trace data that would be captured when - * an exception occurs."Internal Server Error" indicates a generic error - * message suggesting that the server encountered an unexpected condition that - * prevented it from fulfilling the request. + * - Error trace of the error that occurred. */ error_trace?: string; error?: string; @@ -5018,9 +3279,9 @@ type StoreReassign = { */ mongo_article_id?: string; }; -/** @returns {StoreReassignResponseSchema} */ -declare function StoreReassignResponseSchema(): StoreReassignResponseSchema; -type StoreReassignResponseSchema = { +/** @returns {StoreReassignResponse} */ +declare function StoreReassignResponse(): StoreReassignResponse; +type StoreReassignResponse = { /** * - Indicates whether the API call was successful * (true) or not (false). @@ -5078,13 +3339,7 @@ type UpdateShipmentLockPayload = { */ action: string; /** - * - Defines the current lock state or lock type - * of a shipment, dictating the types of transitions or actions that can be - * performed next.The action_type can be one of the following - complete- - * Complete lock specifies that no action can be performed for that shipment. - * - operational- The shipment is in an operational phase, during which only - * financial-related actions are permissible. - financial- The shipment is in - * a financial phase, allowing for operational actions to be taken. + * - Specifies the type of action being taken. */ action_type: string; /** @@ -5142,9 +3397,9 @@ type Bags = { */ affiliate_order_id?: string; }; -/** @returns {CheckResponseSchema} */ -declare function CheckResponseSchema(): CheckResponseSchema; -type CheckResponseSchema = { +/** @returns {CheckResponse} */ +declare function CheckResponse(): CheckResponse; +type CheckResponse = { /** * - Shipment ID */ @@ -5180,9 +3435,9 @@ type CheckResponseSchema = { affiliate_shipment_id?: string; bags?: Bags[]; }; -/** @returns {UpdateShipmentLockResponseSchema} */ -declare function UpdateShipmentLockResponseSchema(): UpdateShipmentLockResponseSchema; -type UpdateShipmentLockResponseSchema = { +/** @returns {UpdateShipmentLockResponse} */ +declare function UpdateShipmentLockResponse(): UpdateShipmentLockResponse; +type UpdateShipmentLockResponse = { /** * - Indicates whether the API call was successful * (true) or not (false). @@ -5194,15 +3449,15 @@ type UpdateShipmentLockResponseSchema = { */ message?: string; /** - * - An array containing the - * lock status of entities if the action performed was a 'check'. Each item in - * the array represents the status of a specific entity. + * - An array containing the lock + * status of entities if the action performed was a 'check'. Each item in the + * array represents the status of a specific entity. */ - check_response?: CheckResponseSchema[]; + check_response?: CheckResponse[]; }; -/** @returns {AnnouncementResponseSchema} */ -declare function AnnouncementResponseSchema(): AnnouncementResponseSchema; -type AnnouncementResponseSchema = { +/** @returns {AnnouncementResponse} */ +declare function AnnouncementResponse(): AnnouncementResponse; +type AnnouncementResponse = { /** * - The end date and time for the event, * indicating when the issue is expected to be resolved. @@ -5253,10 +3508,10 @@ type AnnouncementResponseSchema = { */ created_at?: string; }; -/** @returns {AnnouncementsResponseSchema} */ -declare function AnnouncementsResponseSchema(): AnnouncementsResponseSchema; -type AnnouncementsResponseSchema = { - announcements?: AnnouncementResponseSchema[]; +/** @returns {AnnouncementsResponse} */ +declare function AnnouncementsResponse(): AnnouncementsResponse; +type AnnouncementsResponse = { + announcements?: AnnouncementResponse[]; /** * - Indicates whether the API call was successful * (true) or not (false). @@ -5266,15 +3521,10 @@ type AnnouncementsResponseSchema = { * - Represents the HTTP status code of the API response */ status?: number; - /** - * - A descriptive message providing additional - * information about the API response. - */ - message?: string; }; -/** @returns {BaseResponseSchema} */ -declare function BaseResponseSchema(): BaseResponseSchema; -type BaseResponseSchema = { +/** @returns {BaseResponse} */ +declare function BaseResponse(): BaseResponse; +type BaseResponse = { /** * - Indicates whether the API call was successful * (true) or not (false). @@ -5410,24 +3660,14 @@ type OrderItemDataUpdates = { declare function ProductsDataUpdatesFilters(): ProductsDataUpdatesFilters; type ProductsDataUpdatesFilters = { /** - * - Represents the specific line item within a - * bag, used to identify and reference a particular product in a list. This - * helps in pinpointing the exact item being updated or processed. + * - The line number for the product or bag. */ line_number?: number; /** - * - A unique string that serves as the - * product’s identifier, such as a SKU, barcode, or another distinct code. - * This ensures the product is correctly identified and distinguished from - * other items in the system. + * - The unique article or item identifier for + * the product or bag. */ identifier?: string; - /** - * - The quantity of the product or item, - * specified as an integer. This indicates how many units of the product are - * being referenced or processed, such as the number of items in a bag or shipment. - */ - quantity?: number; }; /** @returns {ProductsDataUpdates} */ declare function ProductsDataUpdates(): ProductsDataUpdates; @@ -5452,17 +3692,7 @@ type EntitiesDataUpdates = { */ filters?: any[]; /** - * - Encapsulates a dynamic set of updates and - * modifications applied to the entity. - */ - data?: any; -}; -/** @returns {OrderDataUpdates} */ -declare function OrderDataUpdates(): OrderDataUpdates; -type OrderDataUpdates = { - /** - * - Encapsulates a dynamic set of updates and - * modifications applied to the order. + * - Contains the specific data for updating the shipment. */ data?: any; }; @@ -5484,11 +3714,10 @@ type DataUpdates = { * the properties of any relevant entities. */ entities?: EntitiesDataUpdates[]; - order?: OrderDataUpdates[]; }; -/** @returns {ShipmentsRequestSchema} */ -declare function ShipmentsRequestSchema(): ShipmentsRequestSchema; -type ShipmentsRequestSchema = { +/** @returns {ShipmentsRequest} */ +declare function ShipmentsRequest(): ShipmentsRequest; +type ShipmentsRequest = { /** * - Unique identifier for the shipment. */ @@ -5501,90 +3730,18 @@ type ShipmentsRequestSchema = { products?: Products[]; data_updates?: DataUpdates; }; -/** @returns {UpdatedAddressSchema} */ -declare function UpdatedAddressSchema(): UpdatedAddressSchema; -type UpdatedAddressSchema = { - /** - * - The complete address. - */ - address?: string; - /** - * - The locality or area associated with the address. - */ - area?: string; - /** - * - A prominent nearby landmark for locating the address. - */ - landmark?: string; - /** - * - The postal code (for example, zip, postcode, - * or Eircode) of the address. - */ - pincode?: string; - /** - * - The city, town, or village of the address. - */ - city?: string; - /** - * - The state or province of the address. - */ - state?: string; - /** - * - The name of the person associated with the address. - */ - name?: string; - /** - * - Phone number associated with the address user. - */ - phone?: string; - /** - * - Email address associated with the address user. - */ - email?: string; - /** - * - The country of the address. - */ - country?: string; - /** - * - The ISO code representing the country - * of the address. - */ - country_iso_code?: string; - /** - * - The latitude of the address. - */ - latitude?: number; - /** - * - The longitude of the address. - */ - longitude?: number; -}; -/** @returns {UpdateAddressRequestBody} */ -declare function UpdateAddressRequestBody(): UpdateAddressRequestBody; -type UpdateAddressRequestBody = { - updated_address?: UpdatedAddressSchema; - /** - * - The type of address (e.g., office, home). - */ - address_type?: string; - /** - * - The category of the address (e.g., - * delivery, billing). - */ - address_category?: string; -}; -/** @returns {StatuesRequestSchema} */ -declare function StatuesRequestSchema(): StatuesRequestSchema; -type StatuesRequestSchema = { +/** @returns {StatuesRequest} */ +declare function StatuesRequest(): StatuesRequest; +type StatuesRequest = { /** * - The new status to be assigned to the shipment(s). */ status?: string; /** - * - A list of shipments to - * which the new status will be applied. + * - A list of shipments to which the + * new status will be applied. */ - shipments?: ShipmentsRequestSchema[]; + shipments?: ShipmentsRequest[]; /** * - Specifies the state to which * remaining bags or products should be changed, effectively excluding them @@ -5607,10 +3764,10 @@ type UpdateShipmentStatusRequestSchema = { */ force_transition?: boolean; /** - * - A list of status updates to - * be applied to the shipment. + * - A list of status updates to be + * applied to the shipment. */ - statuses?: StatuesRequestSchema[]; + statuses?: StatuesRequest[]; /** * - Specifies whether the shipment * should be locked automatically after a transition occurs. @@ -5634,9 +3791,9 @@ type UpdateShipmentStatusRequestSchema = { */ resume_tasks_after_unlock?: boolean; }; -/** @returns {ShipmentsResponseSchema} */ -declare function ShipmentsResponseSchema(): ShipmentsResponseSchema; -type ShipmentsResponseSchema = { +/** @returns {ShipmentsResponse} */ +declare function ShipmentsResponse(): ShipmentsResponse; +type ShipmentsResponse = { status?: number; final_state?: any; identifier?: string; @@ -5646,6 +3803,16 @@ type ShipmentsResponseSchema = { message?: string; exception?: string; }; +/** @returns {StatuesResponse} */ +declare function StatuesResponse(): StatuesResponse; +type StatuesResponse = { + shipments?: ShipmentsResponse[]; +}; +/** @returns {UpdateShipmentStatusResponseBody} */ +declare function UpdateShipmentStatusResponseBody(): UpdateShipmentStatusResponseBody; +type UpdateShipmentStatusResponseBody = { + statuses?: StatuesResponse[]; +}; /** @returns {DPConfiguration} */ declare function DPConfiguration(): DPConfiguration; type DPConfiguration = { @@ -5669,28 +3836,19 @@ type PaymentConfig = { */ source?: string; }; -/** @returns {LockStateMessage} */ -declare function LockStateMessage(): LockStateMessage; -type LockStateMessage = { - /** - * - The state for which the custom lock message applies. - */ - state?: string; - /** - * - Custom lock message used when the shipment is - * locked in the specified state. - */ - message?: string; -}; /** @returns {CreateOrderConfig} */ declare function CreateOrderConfig(): CreateOrderConfig; type CreateOrderConfig = { dp_configuration: DPConfiguration; + /** + * - Flag denotes integration type which + * is used to retrieve specific configurations and application details + * relevant to channel fulfillment. + */ + integration_type?: string; /** * - Flag denotes if the location - * for the store needs to be reassigned post cancellation. If true,location - * for the store gets auto reassigned post cancellation, if set false location - * reassignment will not be performed as its disabled. + * for the store needs to be reassigned post cancellation. */ location_reassignment?: boolean; payment?: PaymentConfig; @@ -5702,349 +3860,10 @@ type CreateOrderConfig = { * be passed to FDK for processing. */ optimal_shipment_creation?: boolean; - /** - * - A list of - * state-specific custom lock messages. - */ - lock_state_messages?: LockStateMessage[]; - /** - * - Flag denotes integration type which - * is used to retrieve specific configurations and application details - * relevant to channel fulfillment. - */ - integration_type?: string; -}; -/** @returns {StatuesResponseSchema} */ -declare function StatuesResponseSchema(): StatuesResponseSchema; -type StatuesResponseSchema = { - /** - * - List of Shipments which - * includes data for each shipment, the current status code, final state - * information including reasons for cancellation (if applicable), and unique - * shipment identifiers are provided. - */ - shipments?: ShipmentsResponseSchema[]; -}; -/** @returns {UpdateShipmentStatusResponseBody} */ -declare function UpdateShipmentStatusResponseBody(): UpdateShipmentStatusResponseBody; -type UpdateShipmentStatusResponseBody = { - /** - * - List of statuses of the - * shipments after a status update operation. Includes an array of status - * objects, each containing details about shipments that have undergone data updates. - */ - statuses?: StatuesResponseSchema[]; -}; -/** @returns {OrderUser} */ -declare function OrderUser(): OrderUser; -type OrderUser = { - phone: number; - last_name: string; - address1?: string; - state: string; - pincode: string; - first_name: string; - mobile: number; - address2?: string; - email: string; - country: string; - city: string; -}; -/** @returns {OrderPriority} */ -declare function OrderPriority(): OrderPriority; -type OrderPriority = { - fulfilment_priority_text?: string; - affiliate_priority_code?: string; - fulfilment_priority?: number; -}; -/** @returns {ArticleDetails} */ -declare function ArticleDetails(): ArticleDetails; -type ArticleDetails = { - /** - * - A unique identifier for the article, facilitating - * easy reference and management within the system. - */ - _id: string; - /** - * - Numerical code representing the brand - * associated with the article, linking it to its manufacturer or creator. - */ - brand_id: number; - /** - * - Specifies the physical dimensions of the - * article, including height, width, and depth, providing a comprehensive - * understanding of its size. - */ - dimension: any; - /** - * - Classifies the article into a specific category - * or type, aiding in organization and filtering based on its nature or usecase. - */ - category: any; - /** - * - Details the weight of the article, crucial for - * logistics, shipping calculations, and customer information. - */ - weight: any; - /** - * - Holds additional descriptive details and - * characteristics of the article, such as color, material, and style, - * enhancing product understanding. - */ - attributes: any; - /** - * - Specifies the available or required quantity of - * the article, important for inventory management and order fulfillment. - */ - quantity: number; -}; -/** @returns {LocationDetails} */ -declare function LocationDetails(): LocationDetails; -type LocationDetails = { - /** - * - The method of fulfillment used by the store. - */ - fulfillment_type: string; - articles: ArticleDetails[]; - fulfillment_id: number; -}; -/** @returns {ShipmentDetails} */ -declare function ShipmentDetails(): ShipmentDetails; -type ShipmentDetails = { - /** - * - Box type of the shipment in which the - * shipment will be delivered. - */ - box_type?: string; - shipments: number; - fulfillment_id: number; - articles: ArticleDetails[]; - dp_id?: string; - meta?: any; - affiliate_shipment_id: string; - /** - * - Delivery partner options that are available - * to deliver the shipment. - */ - dp_options?: any; - lock_status?: boolean; - /** - * - This field maps potential actions - * (e.g., downloading an invoice or label) to their corresponding shipment - * lock statuses, indicating which operations are allowed depending on the - * shipment's current lock status. When an action is set to 'lock', it means - * no transitions or updates to the shipment's status can be performed until - * the specified action is completed. For instance, if 'download_invoice' is - * in a 'lock' state, the shipment cannot undergo any status transitions until - * the invoice is either downloaded. Similarly, 'download_label' being in a - * 'lock' state prevents any shipment status transitions until a new label is - * downloaded. - */ - action_to_status?: any; -}; -/** @returns {ShipmentConfig} */ -declare function ShipmentConfig(): ShipmentConfig; -type ShipmentConfig = { - location_details?: LocationDetails; - source: string; - to_pincode: string; - shipment: ShipmentDetails[]; - /** - * - The unique identifier for the shipment. - */ - identifier: string; - payment_mode: string; - action: string; - journey: string; -}; -/** @returns {ShipmentData} */ -declare function ShipmentData(): ShipmentData; -type ShipmentData = { - shipment_data: ShipmentConfig; -}; -/** @returns {MarketPlacePdf} */ -declare function MarketPlacePdf(): MarketPlacePdf; -type MarketPlacePdf = { - invoice?: string; - label?: string; -}; -/** @returns {AffiliateBag} */ -declare function AffiliateBag(): AffiliateBag; -type AffiliateBag = { - pdf_links?: MarketPlacePdf; - store_id: number; - sku: string; - discount: number; - unit_price: number; - price_effective: number; - affiliate_store_id: string; - /** - * - The unique identifier for the bag. - */ - identifier: any; - seller_identifier: string; - item_size: string; - amount_paid: number; - fynd_store_id: string; - item_id: number; - delivery_charge: number; - avl_qty: number; - price_marked: number; - quantity: number; - company_id: number; - hsn_code_id: string; - _id: string; - /** - * - Sales channel meta data information for the bag. - */ - affiliate_meta: any; - /** - * - The date and time when the bag was updated - * or modified. - */ - modified_on: string; - transfer_price: number; -}; -/** @returns {UserData} */ -declare function UserData(): UserData; -type UserData = { - shipping_user?: OrderUser; - billing_user?: OrderUser; -}; -/** @returns {OrderInfo} */ -declare function OrderInfo(): OrderInfo; -type OrderInfo = { - /** - * - A unique identifier assigned to the - * order by an affiliate partner or platform, facilitating tracking across - * different systems. - */ - affiliate_order_id?: string; - cod_charges: number; - /** - * - Contains detailed information about the items - * included in the order ensuring comprehensive order management. - */ - items: any; - discount: number; - billing_address: OrderUser; - /** - * - Outlines the payment details for the order, - * including payment method, transaction status, and any related financial - * information, supporting secure and efficient payment processing. - */ - payment?: any; - order_priority?: OrderPriority; - shipment?: ShipmentData; - delivery_charges: number; - shipping_address: OrderUser; - order_value: number; - payment_mode: string; - bags: AffiliateBag[]; - user: UserData; - coupon?: string; -}; -/** @returns {AffiliateAppConfigMeta} */ -declare function AffiliateAppConfigMeta(): AffiliateAppConfigMeta; -type AffiliateAppConfigMeta = { - value: string; - name: string; -}; -/** @returns {AffiliateAppConfig} */ -declare function AffiliateAppConfig(): AffiliateAppConfig; -type AffiliateAppConfig = { - id: string; - description?: string; - /** - * - The date and time when the app config was updated. - */ - updated_at: string; - name: string; - token: string; - meta?: AffiliateAppConfigMeta[]; - owner: string; - secret: string; - /** - * - Timestamp when the app config was created. - */ - created_at: string; -}; -/** @returns {AffiliateInventoryArticleAssignmentConfig} */ -declare function AffiliateInventoryArticleAssignmentConfig(): AffiliateInventoryArticleAssignmentConfig; -type AffiliateInventoryArticleAssignmentConfig = { - post_order_reassignment?: boolean; -}; -/** @returns {AffiliateInventoryPaymentConfig} */ -declare function AffiliateInventoryPaymentConfig(): AffiliateInventoryPaymentConfig; -type AffiliateInventoryPaymentConfig = { - source?: string; - mode_of_payment?: string; -}; -/** @returns {AffiliateInventoryStoreConfig} */ -declare function AffiliateInventoryStoreConfig(): AffiliateInventoryStoreConfig; -type AffiliateInventoryStoreConfig = { - /** - * - Fulfilling store information related to the shipment. - */ - store?: any; -}; -/** @returns {AffiliateInventoryOrderConfig} */ -declare function AffiliateInventoryOrderConfig(): AffiliateInventoryOrderConfig; -type AffiliateInventoryOrderConfig = { - force_reassignment?: boolean; -}; -/** @returns {AffiliateInventoryLogisticsConfig} */ -declare function AffiliateInventoryLogisticsConfig(): AffiliateInventoryLogisticsConfig; -type AffiliateInventoryLogisticsConfig = { - dp_assignment?: boolean; -}; -/** @returns {AffiliateInventoryConfig} */ -declare function AffiliateInventoryConfig(): AffiliateInventoryConfig; -type AffiliateInventoryConfig = { - article_assignment?: AffiliateInventoryArticleAssignmentConfig; - payment?: AffiliateInventoryPaymentConfig; - inventory?: AffiliateInventoryStoreConfig; - order?: AffiliateInventoryOrderConfig; - logistics?: AffiliateInventoryLogisticsConfig; -}; -/** @returns {AffiliateConfig} */ -declare function AffiliateConfig(): AffiliateConfig; -type AffiliateConfig = { - app?: AffiliateAppConfig; - inventory?: AffiliateInventoryConfig; - /** - * - A unique identifier for the company - * associated with the affiliate app, used for tracking and managing affiliate - * relationships. - */ - app_company_id?: number; }; -/** @returns {Affiliate} */ -declare function Affiliate(): Affiliate; -type Affiliate = { - id: string; - config?: AffiliateConfig; - token: string; -}; -/** @returns {AffiliateStoreIdMapping} */ -declare function AffiliateStoreIdMapping(): AffiliateStoreIdMapping; -type AffiliateStoreIdMapping = { - store_id: number; - marketplace_store_id: string; -}; -/** @returns {OrderConfig} */ -declare function OrderConfig(): OrderConfig; -type OrderConfig = { - create_user?: boolean; - article_lookup?: string; - bag_end_state?: string; - affiliate: Affiliate; - store_lookup?: string; - affiliate_store_id_mapping: AffiliateStoreIdMapping[]; -}; -/** @returns {CreateOrderResponseSchema} */ -declare function CreateOrderResponseSchema(): CreateOrderResponseSchema; -type CreateOrderResponseSchema = { +/** @returns {CreateOrderResponse} */ +declare function CreateOrderResponse(): CreateOrderResponse; +type CreateOrderResponse = { /** * - A string that represents the unique * identifier assigned to the order. @@ -6060,9 +3879,9 @@ type DispatchManifest = { */ manifest_id: string; }; -/** @returns {SuccessResponseSchema} */ -declare function SuccessResponseSchema(): SuccessResponseSchema; -type SuccessResponseSchema = { +/** @returns {SuccessResponse} */ +declare function SuccessResponse(): SuccessResponse; +type SuccessResponse = { /** * - Indicates whether the API call was successful * (true) or not (false). @@ -6098,9 +3917,9 @@ type ActionInfo = { */ slug: string; }; -/** @returns {GetActionsResponseSchema} */ -declare function GetActionsResponseSchema(): GetActionsResponseSchema; -type GetActionsResponseSchema = { +/** @returns {GetActionsResponse} */ +declare function GetActionsResponse(): GetActionsResponse; +type GetActionsResponse = { /** * - A response object that contains a * list of permissions available to the user. @@ -6136,35 +3955,6 @@ type HistoryReason = { */ quantity?: number; }; -/** @returns {RefundInformation} */ -declare function RefundInformation(): RefundInformation; -type RefundInformation = { - /** - * - The payment method used for the order, such as - * CARD, Net Banking (NB), or other options. This field indicates how the - * original payment was made and will determine how the refund is processed. - */ - mode?: string; - /** - * - The amount to be refunded, represented as a - * floating-point number. This specifies the exact value that will be returned - * to the customer. - */ - amount?: number; - /** - * - A unique identifier associated - * with the payment transaction, such as TR669796C0012CF31BBD. This ID helps - * track and reference the specific transaction within the merchant's system. - */ - merchant_transaction_id?: string; - /** - * - The current status of the refund - * process, indicating whether the refund has been completed, is pending, or - * has encountered an issue (e.g., 'refund_done', 'refund_failed'). This field - * reflects the state of the refund operation. - */ - refund_status?: string; -}; /** @returns {HistoryMeta} */ declare function HistoryMeta(): HistoryMeta; type HistoryMeta = { @@ -6242,10 +4032,7 @@ type HistoryMeta = { */ activity_comment?: string; /** - * - Defines the category of event-related - * information for a shipment, indicating the nature of the update. This - * includes whether the update pertains to the status of the shipment, - * comments added to it, or notifications about specific events. + * - Type of activity being recorded, if applicable. */ activity_type?: string; /** @@ -6265,32 +4052,6 @@ type HistoryMeta = { * - Any additional messages related to the activity. */ message?: string; - /** - * - The name of the store where the item - * was previously located before being transferred or processed. This field - * can be null if the previous store information is not applicable or available. - */ - prev_store_name?: string; - /** - * - The unique code associated with the - * previous store. This code helps identify the store in the system and can be - * null if the previous store code is not recorded or required. - */ - prev_store_code?: string; - /** - * - The unique identifier (ID) of the - * previous store in the database or system. This ID can be null if the - * previous store information is not relevant or if the store did not have a - * designated ID. - */ - prev_store_id?: string; - /** - * - The destination or method by which a refund - * will be issued. This indicates where the refunded amount will be sent, such - * as back to the original payment source (e.g., 'Back To Source'). - */ - refund_to?: string; - refund_information?: RefundInformation[]; }; /** @returns {HistoryDict} */ declare function HistoryDict(): HistoryDict; @@ -6327,12 +4088,9 @@ type HistoryDict = { */ ticket_id?: string; /** - * - Defines the category of event-related - * information for a shipment, indicating the nature of the update. This - * includes whether the update pertains to the status of the shipment, - * comments added to it, or notifications about specific events. + * - Type of activity history */ - activity_type: string; + type: string; /** * - L2 details regarding the bag or activity. */ @@ -6341,6 +4099,9 @@ type HistoryDict = { * - Name of the agent assigned to the activity. */ assigned_agent?: string; + /** + * - Metadata about the activity + */ meta?: HistoryMeta; /** * - L1 details regarding the bag or activity. @@ -6355,9 +4116,9 @@ type HistoryDict = { */ user: string; }; -/** @returns {ShipmentHistoryResponseSchema} */ -declare function ShipmentHistoryResponseSchema(): ShipmentHistoryResponseSchema; -type ShipmentHistoryResponseSchema = { +/** @returns {ShipmentHistoryResponse} */ +declare function ShipmentHistoryResponse(): ShipmentHistoryResponse; +type ShipmentHistoryResponse = { /** * - Indicates whether the API call was successful * (true) or not (false). @@ -6426,14 +4187,14 @@ type PostShipmentHistory = { declare function SmsDataPayload(): SmsDataPayload; type SmsDataPayload = { /** - * - Unique identifier which is used to identify - * a shipment. + * - Unique identifier for the shipment + * associated with the SMS. */ - shipment_id: string; + shipment_id: number; /** * - The recipient's phone number for communication. */ - phone_number: string; + phone_number: number; /** * - The amount that has been paid, as mapped * in the communication template. @@ -6491,9 +4252,6 @@ type SendSmsPayload = { declare function OrderDetails(): OrderDetails; type OrderDetails = { fynd_order_id?: string; - /** - * - Date and time when the order was created. - */ created_at?: string; user_id?: string; tax_details?: TaxDetails; @@ -6501,43 +4259,18 @@ type OrderDetails = { delivery_charges?: number; transaction_id?: string; collect_by?: string; - /** - * - Header details of the order. - */ headers?: any; coupon_value?: number; order_value?: number; created_time?: string; - /** - * - The currency in which the prices details - * associated with the item is specified. - */ currency?: string; total_order_value?: number; ordering_channel?: string; - /** - * - Meta data of the order data contains additional, - * potentially dynamic information about the order data. - */ meta?: any; cod_charges?: number; cashback_value?: number; refund_by?: string; - /** - * - Specifies the date and time of - * the order when it was created within the affiliate's system. It specifies - * that the date and time are recorded in ISO 8601 format. - */ affiliate_order_date?: string; - /** - * - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. The structure is designed to accommodate any number of - * payment methods,providing flexibility and comprehensive insights into each - * transaction's payment aspect. - */ payment_methods?: any; affiliate_order_id?: string; payment_mode_id?: number; @@ -6549,7 +4282,6 @@ type OrderDetails = { affiliate_id?: string; ordering_channel_logo?: string; prices?: Prices; - charges?: PriceAdjustmentCharge[]; }; /** @returns {Meta} */ declare function Meta(): Meta; @@ -6644,28 +4376,11 @@ type OrderStatusResult = { */ result?: OrderStatusData[]; }; -/** @returns {SendSmsResponseSchema} */ -declare function SendSmsResponseSchema(): SendSmsResponseSchema; -type SendSmsResponseSchema = { - /** - * - Indicates whether the SMS was sent - * successfully. A value of `true` means the SMS was sent without errors, - * while `false` indicates there was an issue. - */ - success: boolean; - /** - * - Provides additional information about the - * success or failure of the SMS sending operation. If `success` is `false`, - * this message may contain error details. - */ - message: string; -}; /** @returns {Dimension} */ declare function Dimension(): Dimension; type Dimension = { /** - * - Defines the type of packaging used for - * the product, encompassing materials, design, and form factors. + * - Describes the type of packaging used. */ packaging_type?: string; /** @@ -6702,9 +4417,9 @@ type UpdatePackagingDimensionsPayload = { */ dimension: Dimension[]; }; -/** @returns {UpdatePackagingDimensionsResponseSchema} */ -declare function UpdatePackagingDimensionsResponseSchema(): UpdatePackagingDimensionsResponseSchema; -type UpdatePackagingDimensionsResponseSchema = { +/** @returns {UpdatePackagingDimensionsResponse} */ +declare function UpdatePackagingDimensionsResponse(): UpdatePackagingDimensionsResponse; +type UpdatePackagingDimensionsResponse = { message?: string; }; /** @returns {Tax} */ @@ -6823,62 +4538,11 @@ type ProcessingDates = { */ customer_pickup_slot?: any; /** - * - Defines the deadline for having the - * package fully packed and ready for dispatch or pickup, integral to - * streamlining the fulfillment process. + * - A string indicating the date by which the + * order must be packaged for fulfillment. */ pack_by_date?: string; }; -/** @returns {Tag} */ -declare function Tag(): Tag; -type Tag = { - /** - * - A unique identifier or short label for the tag - * for shipment reference. - */ - slug?: string; - /** - * - Label of the tag. This text is shown to - * users, representing the tag in an human-readable format. - */ - display_text?: string; -}; -/** @returns {ProcessAfterConfig} */ -declare function ProcessAfterConfig(): ProcessAfterConfig; -type ProcessAfterConfig = { - /** - * - Indicates whether the shipment - * is scheduled for later processing. - */ - is_scheduled_shipment?: boolean; - /** - * - Specifies the UTC time after - * which the shipment will be automatically processed. - */ - enable_processing_after?: string; -}; -/** @returns {SystemMessages} */ -declare function SystemMessages(): SystemMessages; -type SystemMessages = { - /** - * - Specifies the type of message. - */ - message_type: string; - /** - * - This will determine the sequence of messages (1 - * being the highest priority). - */ - priority: number; - /** - * - Message to be displayed at Platform's Order Details. - */ - message: string; - /** - * - Holds the list of OMS status at which the - * message should be visible. - */ - inject_at?: string[]; -}; /** @returns {Shipment} */ declare function Shipment(): Shipment; type Shipment = { @@ -6894,8 +4558,7 @@ type Shipment = { external_shipment_id?: string; processing_dates?: ProcessingDates; /** - * - Meta data of the shipment contains additional, - * potentially dynamic information about the shipment. + * - An object containing metadata related to the shipment. */ meta?: any; /** @@ -6913,57 +4576,30 @@ type Shipment = { */ location_id?: number; /** - * - Defines the specific journey a shipment - * will follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. For example: - * - * - "HomeDelivery": The order undergoes all state transitions typical for a - * delivery, from processing the shipment to final delivery at the - * customer's address. - * - "PickAtStore": The order is prepared for pickup and moved to a state where it - * is ready to be handed over directly to the customer at the store. This - * type streamlines the process by bypassing traditional shipping stages - * and facilitating a quicker transition to the final handover stage. - * - "Digital": This order type likely refers to orders that involve digital goods - * or services, such as software, digital subscriptions, e-books, online - * courses, or any other item that can be delivered electronically. + * - The order type of shipment. */ order_type?: string; - tags?: string[]; - system_messages?: SystemMessages[]; - process_after_config?: ProcessAfterConfig; parent_type?: string; store_invoice_id?: string; lock_status?: string; type?: string; - billing_address_json?: Address; + billing_address_json?: PlatformDeliveryAddress; id?: string; fulfilment_priority?: number; is_active?: boolean; previous_shipment_id?: string; - /** - * - PDF Links associated with the shipment. - */ pdf_links?: any; - delivery_address_json?: Address; + delivery_address_json?: PlatformDeliveryAddress; eway_bill_id?: string; affiliate_shipment_id?: string; fynd_order_id?: string; - /** - * - Specifies the date and time when the - * shipment was created. - */ + tags?: string[]; created_at?: string; delivery_awb_number?: string; - hand_over_contact_json?: Address; + hand_over_contact_json?: PlatformDeliveryAddress; credit_note_id?: string; parent_id?: string; affiliate_id?: string; - /** - * - Defines the type of packaging used for - * the product, encompassing materials, design, and form factors. - */ packaging_type?: string; vertical?: string; quantity?: number; @@ -7004,8 +4640,7 @@ type ShippingInfo = { */ customer_code?: string; /** - * - Specifies the method or service used for - * the shipping of the shipment. + * - A string describing the shipping type. */ shipping_type?: string; /** @@ -7109,89 +4744,12 @@ type ShippingInfo = { */ address2?: string; /** - * - Uniquely identifies the country - * associated with the shipping address. This code is essential for - * international shipments, ensuring accurate routing and delivery across - * global postal and customs services. Examples include 'US' for the United - * States, 'IN' for India. - */ - country_code?: string; - /** - * - Specifies the country's unique - * identifier ollowing the ISO 3166-1 alpha-2 standard. This two-letter code - * is crucial for distinguishing countries in international transactions, data - * processing, and shipping logistics. - */ - country_iso_code?: string; -}; -/** @returns {BillingInfo} */ -declare function BillingInfo(): BillingInfo; -type BillingInfo = { - alternate_mobile_number?: string; - state?: string; - /** - * - A unique identifier assigned to the - * customer, facilitating order tracking and service customization. - */ - customer_code?: string; - middle_name?: string; - primary_mobile_number?: string; - last_name?: string; - gender?: string; - house_no?: string; - first_name?: string; - title?: string; - country?: string; - /** - * - The code representing the state or region - * within the country, if applicable. - */ - state_code?: string; - city?: string; - /** - * - A unique identifier assigned to - * customers by an external system or partner organization. This code is - * crucial for integrating and synchronizing customer information across - * different platforms or services. - */ - external_customer_code?: string; - floor_no?: string; - alternate_email?: string; - address?: string; - /** - * - A string representing the area of the customer's location. - */ - area?: string; - /** - * - A string representing the first line of the address. - */ - address1?: string; - /** - * - A string representing the pincode of the - * customer's location. - */ - pincode?: string; - /** - * - A string representing the primary email - * address for the customer. - */ - primary_email?: string; - /** - * - A string representing the second line of the address. - */ - address2?: string; - /** - * - Uniquely identifies the country - * associated with the billing address details. This code is essential for - * international shipments, ensuring accurate routing and delivery across - * global postal and customs services. Examples include 'US' for the United - * States, 'IN' for India. + * - A string representing the country code of + * the customer's location. */ country_code?: string; /** - * - The ISO 3166-1 alpha-2 code for the - * country, consisting of two uppercase letters. This standardized format - * ensures consistent identification of countries across systems. + * - Country Code in ISO 2 format (e.g. US, IN) */ country_iso_code?: string; }; @@ -7308,17 +4866,16 @@ type PaymentInfo = { declare function CreateOrderAPI(): CreateOrderAPI; type CreateOrderAPI = { /** - * - List of Shipments which includes shipment - * data like shipment items, shipment promise, Shipment type, shipment order - * type, shipment dp options etc. + * - An array of shipment objects that detail + * the items being shipped as part of the order. */ shipments: Shipment[]; shipping_info: ShippingInfo; billing_info: ShippingInfo; /** - * - This object can accommodate a range of - * currency-related information, provides a flexible structure for storing - * comprehensive details about the currency or currencies involved in a transaction. + * - An object that provides details about + * the currency in which the order is processed, including currency code and + * conversion rates if applicable. */ currency_info?: any; /** @@ -7337,8 +4894,8 @@ type CreateOrderAPI = { */ external_creation_date?: string; /** - * - Meta data of the order that contains additional, - * potentially dynamic information about the order. + * - A generic object that can hold any additional + * metadata related to the order. */ meta?: any; tax_info?: TaxInfo; @@ -7354,13 +4911,6 @@ type CreateOrderAPI = { * - The platform used to place the order. */ order_platform?: string; - /** - * - Represents the current status of the order, - * specifying whether the order is in a 'pendency' state (awaiting further - * action) or marked as 'complete'. - */ - status?: string; - system_messages?: SystemMessages[]; /** * - A string that specifies the type of order * being placed. @@ -7403,52 +4953,6 @@ type CreateOrderErrorReponse = { */ fynd_order_id?: string; }; -/** @returns {PaymentMethods} */ -declare function PaymentMethods(): PaymentMethods; -type PaymentMethods = { - collect_by?: string; - refund_by?: string; - mode?: string; -}; -/** @returns {CreateChannelPaymentInfo} */ -declare function CreateChannelPaymentInfo(): CreateChannelPaymentInfo; -type CreateChannelPaymentInfo = { - source?: string; - payment_methods?: PaymentMethods[]; - mode_of_payment?: string; -}; -/** @returns {CreateChannelConfig} */ -declare function CreateChannelConfig(): CreateChannelConfig; -type CreateChannelConfig = { - dp_configuration?: DPConfiguration; - shipment_assignment?: string; - location_reassignment?: boolean; - logo_url?: any; - payment_info?: CreateChannelPaymentInfo; - lock_states?: string[]; -}; -/** @returns {CreateChannelConfigData} */ -declare function CreateChannelConfigData(): CreateChannelConfigData; -type CreateChannelConfigData = { - config_data?: CreateChannelConfig; -}; -/** @returns {CreateChannelConifgErrorResponseSchema} */ -declare function CreateChannelConifgErrorResponseSchema(): CreateChannelConifgErrorResponseSchema; -type CreateChannelConifgErrorResponseSchema = { - /** - * - A string that represents the unique identifier - * assigned to the order. - */ - error?: string; - request_id?: string; - status: number; - info?: any; - stack_trace?: string; - code?: string; - meta?: string; - message: string; - exception?: string; -}; /** @returns {UploadManifestConsent} */ declare function UploadManifestConsent(): UploadManifestConsent; type UploadManifestConsent = { @@ -7462,13 +4966,6 @@ type UploadManifestConsent = { */ manifest_id: string; }; -/** @returns {CreateChannelConfigResponseSchema} */ -declare function CreateChannelConfigResponseSchema(): CreateChannelConfigResponseSchema; -type CreateChannelConfigResponseSchema = { - is_inserted?: boolean; - is_upserted?: boolean; - acknowledged?: boolean; -}; /** @returns {PlatformOrderUpdate} */ declare function PlatformOrderUpdate(): PlatformOrderUpdate; type PlatformOrderUpdate = { @@ -7528,17 +5025,6 @@ type OrderStatus = { * provide details about the orders, including their respective order IDs. */ order_details?: FyndOrderIdList[]; - /** - * - Denotes the start date and time when the - * order was created. - */ - start_date: string; - /** - * - Specifies the deadline by which a particular - * action related to the order needs to be completed. - */ - end_date: string; - mobile: number; }; /** @returns {BagStateTransitionMap} */ declare function BagStateTransitionMap(): BagStateTransitionMap; @@ -7560,26 +5046,6 @@ type RoleBaseStateTransitionMapping = { */ next_statuses?: string[]; }; -/** @returns {FetchCreditBalanceRequestPayload} */ -declare function FetchCreditBalanceRequestPayload(): FetchCreditBalanceRequestPayload; -type FetchCreditBalanceRequestPayload = { - affiliate_id: string; - seller_id: string; - customer_mobile_number: string; -}; -/** @returns {CreditBalanceInfo} */ -declare function CreditBalanceInfo(): CreditBalanceInfo; -type CreditBalanceInfo = { - total_credited_balance?: string; - reason?: string; - customer_mobile_number?: string; -}; -/** @returns {FetchCreditBalanceResponsePayload} */ -declare function FetchCreditBalanceResponsePayload(): FetchCreditBalanceResponsePayload; -type FetchCreditBalanceResponsePayload = { - success: boolean; - data: CreditBalanceInfo; -}; /** @returns {RefundModeConfigRequestPayload} */ declare function RefundModeConfigRequestPayload(): RefundModeConfigRequestPayload; type RefundModeConfigRequestPayload = { @@ -7704,11 +5170,7 @@ type AttachUserInfo = { */ mobile: string; /** - * - Uniquely identifies the country - * associated with the user information. This code is essential for - * international shipments, ensuring accurate routing and delivery across - * global postal and customs services. Examples include 'US' for the United - * States, 'IN' for India. + * - A string representing the user's country code. */ country_code?: string; }; @@ -7723,9 +5185,9 @@ type AttachOrderUser = { fynd_order_id: string; user_info: AttachUserInfo; }; -/** @returns {AttachOrderUserResponseSchema} */ -declare function AttachOrderUserResponseSchema(): AttachOrderUserResponseSchema; -type AttachOrderUserResponseSchema = { +/** @returns {AttachOrderUserResponse} */ +declare function AttachOrderUserResponse(): AttachOrderUserResponse; +type AttachOrderUserResponse = { /** * - Indicates whether the API call was successful * (true) or not (false). @@ -7746,10 +5208,8 @@ type SendUserMobileOTP = { */ mobile: number; /** - * - Uniquely identifies the country - * associated with the mobile number. This code is essential for for correctly - * formatting and routing the OTP messages to mobile phones across - * international borders. Examples include 'US' for the United States, 'IN' for India. + * - The country code associated with the + * user's mobile number. */ country_code?: string; }; @@ -7776,9 +5236,9 @@ type PointBlankOtpData = { */ mobile?: number; }; -/** @returns {SendUserMobileOtpResponseSchema} */ -declare function SendUserMobileOtpResponseSchema(): SendUserMobileOtpResponseSchema; -type SendUserMobileOtpResponseSchema = { +/** @returns {SendUserMobileOtpResponse} */ +declare function SendUserMobileOtpResponse(): SendUserMobileOtpResponse; +type SendUserMobileOtpResponse = { /** * - Indicates whether the API call was successful * (true) or not (false). @@ -7845,9 +5305,9 @@ type VerifyOtpResponseData = { */ country_code?: string; }; -/** @returns {VerifyOtpResponseSchema} */ -declare function VerifyOtpResponseSchema(): VerifyOtpResponseSchema; -type VerifyOtpResponseSchema = { +/** @returns {VerifyOtpResponse} */ +declare function VerifyOtpResponse(): VerifyOtpResponse; +type VerifyOtpResponse = { /** * - Represents the HTTP status code of the API response. */ @@ -7864,17 +5324,17 @@ type VerifyOtpResponseSchema = { message?: string; data?: VerifyOtpResponseData; }; -/** @returns {BulkReportsDownloadRequestSchema} */ -declare function BulkReportsDownloadRequestSchema(): BulkReportsDownloadRequestSchema; -type BulkReportsDownloadRequestSchema = { +/** @returns {BulkReportsDownloadRequest} */ +declare function BulkReportsDownloadRequest(): BulkReportsDownloadRequest; +type BulkReportsDownloadRequest = { /** * - A list of specific store IDs for which the * reports should be generated. */ store_ids?: string[]; /** - * - Defines the category or type of lane for - * which the report is being requested for download. + * - Specifies the type of lane for which the + * report is being requested. */ lane_type?: string; /** @@ -7917,9 +5377,9 @@ type BulkReportsDownloadRequestSchema = { */ custom_filters_for_lane?: any; }; -/** @returns {BulkReportsDownloadResponseSchema} */ -declare function BulkReportsDownloadResponseSchema(): BulkReportsDownloadResponseSchema; -type BulkReportsDownloadResponseSchema = { +/** @returns {BulkReportsDownloadResponse} */ +declare function BulkReportsDownloadResponse(): BulkReportsDownloadResponse; +type BulkReportsDownloadResponse = { /** * - Indicates whether the API call was successful * (true) or not (false). @@ -7930,9 +5390,9 @@ type BulkReportsDownloadResponseSchema = { */ batch_id?: string; }; -/** @returns {APIFailedResponseSchema} */ -declare function APIFailedResponseSchema(): APIFailedResponseSchema; -type APIFailedResponseSchema = { +/** @returns {APIFailedResponse} */ +declare function APIFailedResponse(): APIFailedResponse; +type APIFailedResponse = { /** * - Indicates whether the API call was successful * (true) or not (false). @@ -7957,9 +5417,9 @@ type BulkStateTransistionRequestSchema = { */ file_name?: string; }; -/** @returns {BulkStateTransistionResponseSchema} */ -declare function BulkStateTransistionResponseSchema(): BulkStateTransistionResponseSchema; -type BulkStateTransistionResponseSchema = { +/** @returns {BulkStateTransistionResponse} */ +declare function BulkStateTransistionResponse(): BulkStateTransistionResponse; +type BulkStateTransistionResponse = { /** * - Indicates whether the API call was successful * (true) or not (false). @@ -7980,19 +5440,10 @@ declare function ShipmentActionInfo(): ShipmentActionInfo; type ShipmentActionInfo = { label?: string[]; invoice?: string[]; - /** - * - List of Failed Shipments which - * includes shipment data like shipment items, shipment promise, Shipment - * type, shipment order type, shipment dp options etc. - */ failed_shipments?: any[]; processing_shipments?: string[]; successful_shipments?: string[]; invoiceable_shipments?: string[]; - /** - * - Specifies the shipment - * records that have encountered issues during the invoicing process. - */ failed_invoiced_shipments?: any; processing_invoice_shipments?: string[]; successful_invoiced_shipments?: string[]; @@ -8062,7 +5513,7 @@ type BulkActionListingData = { /** * - Indicates the current status of the bulk action. */ - status?: string; + status?: boolean; /** * - A code representing the store, which can be * used for internal tracking or identification. @@ -8191,9 +5642,9 @@ type BulkListinPage = { */ size?: number; }; -/** @returns {BulkListingResponseSchema} */ -declare function BulkListingResponseSchema(): BulkListingResponseSchema; -type BulkListingResponseSchema = { +/** @returns {BulkListingResponse} */ +declare function BulkListingResponse(): BulkListingResponse; +type BulkListingResponse = { /** * - Indicates whether the API call was successful * (true) or not (false). @@ -8249,9 +5700,9 @@ type JobDetailsData = { */ company_id?: string; }; -/** @returns {JobDetailsResponseSchema} */ -declare function JobDetailsResponseSchema(): JobDetailsResponseSchema; -type JobDetailsResponseSchema = { +/** @returns {JobDetailsResponse} */ +declare function JobDetailsResponse(): JobDetailsResponse; +type JobDetailsResponse = { /** * - Indicates whether the API call was successful * (true) or not (false). @@ -8298,9 +5749,9 @@ type JobDetailsResponseSchema = { */ status?: string; }; -/** @returns {JobFailedResponseSchema} */ -declare function JobFailedResponseSchema(): JobFailedResponseSchema; -type JobFailedResponseSchema = { +/** @returns {JobFailedResponse} */ +declare function JobFailedResponse(): JobFailedResponse; +type JobFailedResponse = { /** * - The name of the file associated with the failed job. */ @@ -8622,109 +6073,71 @@ type ManifestDetails = { */ manifest_details?: Manifest[]; }; -/** @returns {FiltersRequestSchema} */ -declare function FiltersRequestSchema(): FiltersRequestSchema; -type FiltersRequestSchema = { - date_range?: DateRange; - logo?: string; - stores: number; - dp_name: string; - dp_ids: number; - lane: string; - store_name: string; -}; -/** @returns {ProcessManifest} */ -declare function ProcessManifest(): ProcessManifest; -type ProcessManifest = { - filters: FiltersRequestSchema; - action: string; - unique_id: string; - manifest_id?: string; -}; -/** @returns {ProcessManifestResponseSchema} */ -declare function ProcessManifestResponseSchema(): ProcessManifestResponseSchema; -type ProcessManifestResponseSchema = { - /** - * - Id of the company. - */ - company_id?: number; - filters?: Filters; - /** - * - Id of the user. - */ - user_id?: string; - /** - * - Id of the manifest. - */ - manifest_id?: string; - action?: string; - uid?: string; - created_by?: string; -}; -/** @returns {ProcessManifestItemResponseSchema} */ -declare function ProcessManifestItemResponseSchema(): ProcessManifestItemResponseSchema; -type ProcessManifestItemResponseSchema = { - items?: ProcessManifestResponseSchema; -}; /** @returns {FilterInfoOption} */ declare function FilterInfoOption(): FilterInfoOption; type FilterInfoOption = { /** - * - The display text of the option. + * - The option value or text set for the filter option. */ text?: string; /** - * - Name of the option. + * - The option name indicating the type of + * information the filter relates to. */ name?: string; /** - * - Placeholder text of the option. + * - Represents the placeholder text that + * might appear in a UI element. */ placeholder_text?: string; /** - * - The value of the option. + * - A unique value for the filter used in processing + * filter selections. */ value?: string; /** - * - Minimum search size of the option. + * - Indicates the minimum size for search + * criteria, potentially related to how many items to display or filter. */ min_search_size?: number; /** - * - Specifies whether the option should be shown in the UI. + * - Indicates whether this option should be + * visible in the user interface. */ show_ui?: boolean; }; /** @returns {FiltersInfo} */ declare function FiltersInfo(): FiltersInfo; type FiltersInfo = { - /** - * - Options of the filter.[dropdown] - */ options?: FilterInfoOption[]; /** - * - Display text of filter + * - The label or name for the filter, which indicates + * what the filter is related to. */ text: string; /** - * - Placeholder text of filter. + * - A placeholder text that provides + * guidance on how to use the filter. */ placeholder_text?: string; /** - * - The value of the filter. + * - A unique identifier for the filter, used for + * processing filter selections. */ value: string; /** - * - Specifies whether the filter is required or not. + * - Indicates whether the filter is mandatory to + * fill out when applying the filter set. */ required?: boolean; /** - * - Single_select/multi_select + * - Specifies the type of filter. */ type: string; }; -/** @returns {ManifestFiltersResponseSchema} */ -declare function ManifestFiltersResponseSchema(): ManifestFiltersResponseSchema; -type ManifestFiltersResponseSchema = { +/** @returns {ManifestFiltersResponse} */ +declare function ManifestFiltersResponse(): ManifestFiltersResponse; +type ManifestFiltersResponse = { advance_filter?: FiltersInfo[]; global_filter?: FiltersInfo[]; }; @@ -8764,21 +6177,11 @@ type EInvoiceIrnDetails = { ack_no: string; irn: string; signed_invoice: string; - /** - * - QR code containing the signed e-invoice - * data for quick and secure verification purposes. - */ signed_qr_code: string; }; /** @returns {EInvoiceErrorDetails} */ declare function EInvoiceErrorDetails(): EInvoiceErrorDetails; type EInvoiceErrorDetails = { - /** - * - Represents an identifier for the specific - * error encountered during the e-invoice generation or processing. This code - * facilitates quick identification and troubleshooting of issues, allowing - * for more efficient resolution. - */ error_code?: string; error_message: string; }; @@ -8792,17 +6195,6 @@ type EInvoiceDetails = { declare function EInvoiceResponseData(): EInvoiceResponseData; type EInvoiceResponseData = { shipment_id: string; - /** - * - Defines the category or type of e-invoice - * generated for the shipment. This property must be set to one of the - * following values to qualify the shipment for e-invoice generation. invoice- - * A document detailing the sale, including goods, services, prices, and - * taxes, requesting payment. credit_note- Issued as an adjustment or - * correction to a previously issued invoice. It may indicate a reduction in - * the amount often due to reasons such as returned goods, overbilling, or a - * post-sale discount. A credit note effectively reverses or alters the - * charges outlined in the original invoice, either partially or in full. - */ einvoice_type: string; status: number; message: string; @@ -8813,9 +6205,9 @@ declare function EInvoiceRetry(): EInvoiceRetry; type EInvoiceRetry = { shipments_data?: EInvoiceRetryShipmentData[]; }; -/** @returns {EInvoiceRetryResponseSchema} */ -declare function EInvoiceRetryResponseSchema(): EInvoiceRetryResponseSchema; -type EInvoiceRetryResponseSchema = { +/** @returns {EInvoiceRetryResponse} */ +declare function EInvoiceRetryResponse(): EInvoiceRetryResponse; +type EInvoiceRetryResponse = { response_data: EInvoiceResponseData[]; }; /** @returns {EInvoiceErrorInfo} */ @@ -8827,25 +6219,14 @@ type EInvoiceErrorInfo = { declare function EInvoiceErrorResponseData(): EInvoiceErrorResponseData; type EInvoiceErrorResponseData = { shipment_id: string; - /** - * - Defines the category or type of e-invoice - * generated for the shipment. This property must be set to one of the - * following values to qualify the shipment for e-invoice generation. invoice- - * A document detailing the sale, including goods, services, prices, and - * taxes, requesting payment. credit_note- Issued as an adjustment or - * correction to a previously issued invoice. It may indicate a reduction in - * the amount often due to reasons such as returned goods, overbilling, or a - * post-sale discount. A credit note effectively reverses or alters the - * charges outlined in the original invoice, either partially or in full. - */ einvoice_type: string; status: number; message: string; einvoice_info?: EInvoiceErrorInfo; }; -/** @returns {EInvoiceErrorResponseSchema} */ -declare function EInvoiceErrorResponseSchema(): EInvoiceErrorResponseSchema; -type EInvoiceErrorResponseSchema = { +/** @returns {EInvoiceErrorResponse} */ +declare function EInvoiceErrorResponse(): EInvoiceErrorResponse; +type EInvoiceErrorResponse = { response_data?: EInvoiceErrorResponseData[]; message?: string; }; @@ -8859,17 +6240,6 @@ type EInvoiceErrorResponseDetails = { declare function EInvoiceRetryShipmentData(): EInvoiceRetryShipmentData; type EInvoiceRetryShipmentData = { shipment_id: string; - /** - * - Defines the category or type of e-invoice - * generated for the shipment. This property must be set to one of the - * following values to qualify the shipment for e-invoice generation. invoice- - * A document detailing the sale, including goods, services, prices, and - * taxes, requesting payment. credit_note- Issued as an adjustment or - * correction to a previously issued invoice. It may indicate a reduction in - * the amount often due to reasons such as returned goods, overbilling, or a - * post-sale discount. A credit note effectively reverses or alters the - * charges outlined in the original invoice, either partially or in full. - */ einvoice_type: string; }; /** @returns {CourierPartnerTrackingDetails} */ @@ -8937,9 +6307,9 @@ type CourierPartnerTrackingDetails = { */ shipment_id: string; }; -/** @returns {CourierPartnerTrackingResponseSchema} */ -declare function CourierPartnerTrackingResponseSchema(): CourierPartnerTrackingResponseSchema; -type CourierPartnerTrackingResponseSchema = { +/** @returns {CourierPartnerTrackingResponse} */ +declare function CourierPartnerTrackingResponse(): CourierPartnerTrackingResponse; +type CourierPartnerTrackingResponse = { items?: CourierPartnerTrackingDetails[]; page?: PageDetails; }; @@ -8964,26 +6334,10 @@ type FailedOrdersItem = { order_id: string; channel: LogsChannelDetails; payment: LogPaymentDetails; - /** - * - Created date and time of the failed order. - */ created_at: string; - /** - * - A technical description of the error that - * occurred, intended for debugging purposes. - */ error_message: string; - /** - * - A user-friendly message that can be - * displayed to the end-user, explaining the failure in a more general and - * understandable manner. - */ display_message: string; method_name: string; - /** - * - Meta data of the failed orders that contains - * additional, potentially dynamic information about the order. - */ meta: any; }; /** @returns {FailedOrderLogs} */ @@ -8995,43 +6349,15 @@ type FailedOrderLogs = { /** @returns {FailedOrderLogDetails} */ declare function FailedOrderLogDetails(): FailedOrderLogDetails; type FailedOrderLogDetails = { - /** - * - This field is intended to store the error - * trace of the error that occurred.For example, "Exception Trace" represents - * a placeholder for the actual stack trace data that would be captured when - * an exception occurs."Internal Server Error" indicates a generic error - * message suggesting that the server encountered an unexpected condition that - * prevented it from fulfilling the request. - */ error_trace: string; - /** - * - This field captures the exception raised by - * the system during an Order Failure. It indicates an event that disrupts the - * normal flow of the program's instructions. - */ exception: string; }; /** @returns {GenerateInvoiceIDResponseData} */ declare function GenerateInvoiceIDResponseData(): GenerateInvoiceIDResponseData; type GenerateInvoiceIDResponseData = { - /** - * - The unique identifier for the shipment - * associated with the invoice. - */ shipment_id?: string; - /** - * - Indicates whether the API call was successful - * (true) or not (false). - */ success?: boolean; - /** - * - The generated invoice ID, or null if the - * generation failed. - */ invoice_id?: string; - /** - * - Provides a descriptive error message. - */ error_message?: boolean; }; /** @returns {GenerateInvoiceIDErrorResponseData} */ @@ -9045,30 +6371,26 @@ type GenerateInvoiceIDErrorResponseData = { /** @returns {GenerateInvoiceIDRequestSchema} */ declare function GenerateInvoiceIDRequestSchema(): GenerateInvoiceIDRequestSchema; type GenerateInvoiceIDRequestSchema = { - /** - * - List of shipment IDs for which invoice - * need to be generated. - */ shipment_ids: string[]; }; -/** @returns {GenerateInvoiceIDResponseSchema} */ -declare function GenerateInvoiceIDResponseSchema(): GenerateInvoiceIDResponseSchema; -type GenerateInvoiceIDResponseSchema = { +/** @returns {GenerateInvoiceIDResponse} */ +declare function GenerateInvoiceIDResponse(): GenerateInvoiceIDResponse; +type GenerateInvoiceIDResponse = { items?: GenerateInvoiceIDResponseData[]; }; -/** @returns {GenerateInvoiceIDErrorResponseSchema} */ -declare function GenerateInvoiceIDErrorResponseSchema(): GenerateInvoiceIDErrorResponseSchema; -type GenerateInvoiceIDErrorResponseSchema = { +/** @returns {GenerateInvoiceIDErrorResponse} */ +declare function GenerateInvoiceIDErrorResponse(): GenerateInvoiceIDErrorResponse; +type GenerateInvoiceIDErrorResponse = { items?: GenerateInvoiceIDErrorResponseData[]; }; -/** @returns {ManifestResponseSchema} */ -declare function ManifestResponseSchema(): ManifestResponseSchema; -type ManifestResponseSchema = { +/** @returns {ManifestResponse} */ +declare function ManifestResponse(): ManifestResponse; +type ManifestResponse = { items?: ManifestItems; }; -/** @returns {ProcessManifestRequestSchema} */ -declare function ProcessManifestRequestSchema(): ProcessManifestRequestSchema; -type ProcessManifestRequestSchema = { +/** @returns {ProcessManifestRequest} */ +declare function ProcessManifestRequest(): ProcessManifestRequest; +type ProcessManifestRequest = { /** * - Represents the operation to be performed on the manifest. */ @@ -9125,9 +6447,9 @@ type ManifestItems = { */ user_id?: string; }; -/** @returns {ManifestErrorResponseSchema} */ -declare function ManifestErrorResponseSchema(): ManifestErrorResponseSchema; -type ManifestErrorResponseSchema = { +/** @returns {ManifestErrorResponse} */ +declare function ManifestErrorResponse(): ManifestErrorResponse; +type ManifestErrorResponse = { /** * - Indicates whether the API call was successful * (true) or not (false). @@ -9157,9 +6479,9 @@ type ConfigData = { */ is_inserted?: boolean; }; -/** @returns {ConfigUpdatedResponseSchema} */ -declare function ConfigUpdatedResponseSchema(): ConfigUpdatedResponseSchema; -type ConfigUpdatedResponseSchema = { +/** @returns {ConfigUpdatedResponse} */ +declare function ConfigUpdatedResponse(): ConfigUpdatedResponse; +type ConfigUpdatedResponse = { /** * - The result of the config update operation, * including whether it was acknowledged, upserted, or inserted. @@ -9267,18 +6589,11 @@ type Flags = { declare function Filter(): Filter; type Filter = { /** - * - Defines the specific journey a shipment - * will follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. For example: + * - Indicates the type or category of the order. * - * - "HomeDelivery": The order goes through all the steps needed for delivery, - * from being packed to arriving at the customer’s address. - * - "PickAtStore": The order is prepared for pickup at the store, skipping - * shipping steps to make it ready faster for the customer to collect in person. - * - "Digital": This order type likely refers to orders that involve digital goods - * or services, such as software, digital subscriptions, e-books, online - * courses, or any other item that can be delivered electronically. + * - PickAtStore: Pick from store + * - HomeDelivery: Home delivery + * - Digital: Digital */ order_type?: string; /** @@ -9295,6 +6610,10 @@ type Filter = { /** * - Indicates the current locking status of * the shipment. + * + * - `complete`: Complete shipment lock + * - `operational`: Operational shipment lock + * - `None`: No lock on shipment */ lock_status?: string; /** @@ -9343,11 +6662,21 @@ type Filter = { /** * - Specifies the platform on which the * order was placed. + * + * - `platform-pos`: POS + * - `platform-site`: WEB + * - `openapi`: OPENAPI + * - `marketplace`: MARKETPLACE */ order_platform?: string; /** * - Indicates the type of refund associated * with the order. + * + * - `credit_note`: CREDIT_NOTE + * - `source`: SOURCE + * - `bank_transfer`: BANK + * - `manual_refund`: MANUAL_REFUND */ refund_type?: string; /** @@ -9361,8 +6690,7 @@ type Filter = { */ is_self_ship?: boolean; /** - * - Specifies the country code of the - * seller in ISO 3166-1 alpha-2 format. + * - Specifies the country code of the seller. * * - `seller_country_code`: US * - `seller_country_code`: UK @@ -9370,8 +6698,7 @@ type Filter = { */ seller_country_code?: string; /** - * - Specifies the country code of - * the seller in ISO 3166-1 alpha-2 format. + * - Specifies the country code of the seller. * * - `customer_country_code`: US * - `customer_country_code`: UK @@ -9403,8 +6730,7 @@ type PostHook = { */ kwargs?: any; /** - * - Criteria to filter which hooks are applied - * based on certain conditions. + * - Filters for scope selection. */ filters?: Filter; }; @@ -9420,8 +6746,7 @@ type PreHook = { */ kwargs?: any; /** - * - Criteria to filter which hooks are applied - * based on certain conditions. + * - Filter */ filters?: Filter; }; @@ -9491,2004 +6816,415 @@ declare function TransitionConfigPayload(): TransitionConfigPayload; type TransitionConfigPayload = { data?: TransitionConfigData; }; -/** @returns {RuleListRequestSchema} */ -declare function RuleListRequestSchema(): RuleListRequestSchema; -type RuleListRequestSchema = { +/** @returns {CommonErrorResponse} */ +declare function CommonErrorResponse(): CommonErrorResponse; +type CommonErrorResponse = { /** - * - The page number to be retrieved. This - * determines the starting point for the list of rules to be returned. + * - The HTTP status code corresponding to the error. */ - page_no?: number; + status?: number; /** - * - An array of channel (application ID) - * identifiers. These channels represent the specific application contexts for - * which the rules are being requested. + * - A message describing the error that occurred. */ - channel?: string[]; + message?: string; +}; +/** @returns {ExceptionErrorResponse} */ +declare function ExceptionErrorResponse(): ExceptionErrorResponse; +type ExceptionErrorResponse = { /** - * - An array of department identifiers. The - * rules returned will be applicable to these specified departments. + * - A message describing the error that occurred. */ - department?: string[]; + message?: string; /** - * - An array of rule identifiers. This allows for - * retrieving specific rules based on their unique IDs. + * - The class path of the exception that was thrown. */ - id?: string[]; + exception?: string; /** - * - Indicates whether the rules to be retrieved - * are active. This flag helps filter the rules based on their current status. + * - The stack trace from the server for the error. */ - is_active?: boolean; + stack_trace?: string; }; -/** @returns {RuleErrorResponseSchema} */ -declare function RuleErrorResponseSchema(): RuleErrorResponseSchema; -type RuleErrorResponseSchema = { - /** - * - A flag that indicates whether the request was - * successful. It returns `false` if an error occurred. - */ - success?: boolean; +/** @returns {Page} */ +declare function Page(): Page; +type Page = { /** - * - The error message that provides details about - * why the request failed. + * - The total number of items on the page. */ - error?: string; -}; -/** @returns {RMAPageInfo} */ -declare function RMAPageInfo(): RMAPageInfo; -type RMAPageInfo = { + item_total?: number; /** - * - The type of pagination used. Common values could - * be "number" for numeric pagination, which indicates that the pages are - * numbered sequentially. + * - The identifier for the next page. */ - type?: string; + next_id?: string; /** - * - The current page number being displayed. This - * reflects the page of data currently being viewed. + * - Indicates whether there is a previous page. */ - current?: number; + has_previous?: boolean; /** - * - The number of items per page. This sets the limit - * on how many rule items are shown on each page. + * - Indicates whether there is a next page. */ - size?: number; + has_next?: boolean; /** - * - The total number of items available. This - * provides an overview of the entire dataset from which the rules are being paginated. + * - The current page number. */ - item_total?: number; + current?: number; /** - * - Indicates whether there are previous - * pages available before the current page. It helps in navigating backward - * through the data. + * - The type of the page, such as 'PageType'. */ - has_previous?: boolean; + type: string; /** - * - Indicates whether there are more pages - * available after the current page. It helps in determining if there is more - * data to be viewed. + * - The number of items per page. */ - has_next?: boolean; + size?: number; }; -/** @returns {RuleAction} */ -declare function RuleAction(): RuleAction; -type RuleAction = { - reasons?: Reason[]; -}; -/** @returns {QuestionSetItem} */ -declare function QuestionSetItem(): QuestionSetItem; -type QuestionSetItem = { - /** - * - The unique identifier for the question. This ID is - * used to distinguish between different questions. - */ - id: number; - /** - * - The display name or text of the question. - * This is what is shown to the user during interactions. - */ - display_name: string; -}; -/** @returns {Reason} */ -declare function Reason(): Reason; -type Reason = { - /** - * - A unique identifier for the reason. - */ - id?: number; - /** - * - The display name for the reason, used for - * user-facing purposes. - */ - display_name: string; - /** - * - A list of sub-reasons under the main reason. - * These provide additional layers of granularity to the main reason. - */ - reasons?: Reason[]; - /** - * - List of QC (Quality Control) types -- having - * return reason types indicating the stage at which QC is performed. - - * "Doorstep QC" refers involves inspecting products for damages at the - * customer's location before delivery. - "Pre QC" requires customers to - * upload product photos for a preliminary quality check by the operations - * team before a return or exchange pickup is arranged, ensuring criteria are - * met and optimizing logistics. - */ - qc_type: string[]; - /** - * - An array of question sets linked to - * the reason, defining the questions to be answered. - */ - question_set: QuestionSet[]; - /** - * - Meta object of the reason. This contains any - * additional metadata that might be relevant to the reason. - */ - meta: any; - /** - * - Indicates whether the reason is currently - * active. Active reasons are those that are currently in use within the system. - */ - is_active: boolean; -}; -/** @returns {Conditions} */ -declare function Conditions(): Conditions; -type Conditions = { - /** - * - The department ID to which the rule - * applies. This helps in filtering the rules based on specific departments. - */ - department?: string; - /** - * - The Level 3 category ID to which the rule applies. - * This further refines the application of the rule within a specific category. - */ - l3?: string; -}; -/** @returns {RuleItem} */ -declare function RuleItem(): RuleItem; -type RuleItem = { - /** - * - The unique identifier for the rule item. This ID is - * essential for referencing and managing individual rules. - */ - id: string; - /** - * - The type of entity the rule applies to, such - * as "department" or "l3". This specifies the scope of the rule. - */ - entity_type: string; - /** - * - The value associated with the entity type, such as - * a department ID or L3 category ID. This value determines the specific - * context in which the rule is applied. - */ - value: string; - /** - * - The channel (application ID) to which the rule - * applies. This links the rule to a specific sales channel or application. - */ - channel: string; - /** - * - The actions and reasons associated with the - * rule. These define what happens when the rule is triggered. - */ - actions: RuleAction; - /** - * - Indicates whether quality checks are enabled - * for this rule. If enabled, the rule includes quality control mechanisms. - */ - qc_enabled: boolean; - /** - * - Indicates whether the rule is deleted. - * Deleted rules are no longer active or enforceable. - */ - is_deleted: boolean; - conditions: Conditions; - /** - * - Metadata associated with the rule. This provides - * additional context and information related to the rule. - */ - meta: any; - /** - * - The type of rule, such as "custom" or - * "global". This specifies whether the rule is a custom one or a global standard. - */ - rule_type: string; - /** - * - Indicates whether the rule is currently - * active. Active rules are those that are currently being enforced. - */ - is_active: boolean; -}; -/** @returns {RuleError} */ -declare function RuleError(): RuleError; -type RuleError = { - /** - * - The type of error encountered. This could be - * related to validation, processing, or other issues. - */ - type: string; - /** - * - A specific value related to the error. This - * provides context to the error, such as which input was problematic. - */ - value: string; - /** - * - The error message that describes what went - * wrong. This message is intended for developers or users to understand the issue. - */ - message: string; -}; -/** @returns {RuleListResponseSchema} */ -declare function RuleListResponseSchema(): RuleListResponseSchema; -type RuleListResponseSchema = { - /** - * - Provides information about the pagination of - * the rule list. This includes details like the current page, the total - * number of items, and whether there are previous or next pages available. - */ - page?: RMAPageInfo; - /** - * - A list of rule items included in the - * response. Each item represents a specific RMA rule, detailing its unique - * identifier, entity type, associated actions, conditions, and other relevant - * attributes. This list is essential for understanding the individual rules - * that are applied within the system for return merchandise authorization. - */ - items?: RuleItem[]; - /** - * - Indicates whether the request was successful. - * A value of `true` means the rules were retrieved successfully, while - * `false` indicates an error occurred during the request. - */ - success?: boolean; - /** - * - Contains error details if the request was not - * successful. This includes the type of error, the value that caused the - * issue, and a message explaining the error. These details help in diagnosing - * and resolving issues that may arise when retrieving the rules. - */ - error?: RuleError; -}; -/** @returns {UpdateShipmentPaymentMode} */ -declare function UpdateShipmentPaymentMode(): UpdateShipmentPaymentMode; -type UpdateShipmentPaymentMode = { - /** - * - Unique identifier used to filter the shipment. - */ - shipment_id: string; - /** - * - List of products attached with the - * shipment against which the payment methods needs to be overridden. - */ - products?: ProductSchema[]; - /** - * - List of payment methods - * that needs to be updated on shipment level. - */ - payment_methods?: PaymentMethodSchema[]; -}; -/** @returns {CommonErrorResponseSchema} */ -declare function CommonErrorResponseSchema(): CommonErrorResponseSchema; -type CommonErrorResponseSchema = { - /** - * - The HTTP status code corresponding to the error. - */ - status?: number; - /** - * - A message describing the error that occurred. - */ - message?: string; -}; -/** @returns {ExceptionErrorResponseSchema} */ -declare function ExceptionErrorResponseSchema(): ExceptionErrorResponseSchema; -type ExceptionErrorResponseSchema = { - /** - * - A message describing the error that occurred. - */ - message?: string; - /** - * - The class path of the exception that was thrown. - */ - exception?: string; - /** - * - The stack trace from the server for the error. - */ - stack_trace?: string; -}; -/** @returns {ProductSchema} */ -declare function ProductSchema(): ProductSchema; -type ProductSchema = { - /** - * - The line number of a product used to - * uniquely identify and filter the specific product within the shipment. - */ - line_number: number; - /** - * - List of payment methods - * that needs to be updated against filtered product. - */ - payment_methods: PaymentMethodSchema[]; -}; -/** @returns {PaymentMethodSchema} */ -declare function PaymentMethodSchema(): PaymentMethodSchema; -type PaymentMethodSchema = { - /** - * - The name of the payment method (e.g., "Credit - * Card", "PayPal"). - */ - name: string; - /** - * - The mode of payment (e.g., "PREPAID", "COD"). - */ - mode: string; - /** - * - The amount to be paid using this payment method. - */ - amount: number; - meta?: PaymentMetaDataSchema; - /** - * - Unique identifier for this payment method. - */ - identifier: string; - /** - * - The name to be displayed for this payment method. - */ - display_name: string; - /** - * - The payment aggregator or service provider - * used for this payment method. - */ - aggregator: string; - action: ActionDetailSchema; - /** - * - Payment refund by for the customer and seller - * (e.g fynd, seller). - */ - refund_by: string; - /** - * - Payment collected by for the customer and - * seller (e.g fynd, seller). - */ - collect_by: string; -}; -/** @returns {ActionDetailSchema} */ -declare function ActionDetailSchema(): ActionDetailSchema; -type ActionDetailSchema = { - /** - * - The type of action to be performed (currently only - * "override" is supported). - */ - name: any; - /** - * - The current payment mode before the action - * is applied. - */ - current_mode: string; - /** - * - The current identifier of the payment - * method before the action is applied. - */ - current_identifier: string; - /** - * - Specifies where the refund should be - * directed to, if applicable. - */ - refund_to?: string; -}; -/** @returns {PaymentMetaDataSchema} */ -declare function PaymentMetaDataSchema(): PaymentMetaDataSchema; -type PaymentMetaDataSchema = { - /** - * - The name or identifier of the payment - * gateway used. - */ - payment_gateway?: string; - /** - * - A unique identifier for this - * payment transaction. - */ - payment_identifier?: string; - logo_url?: PaymentMetaLogoURLSchema; -}; -/** @returns {PaymentMetaLogoURLSchema} */ -declare function PaymentMetaLogoURLSchema(): PaymentMetaLogoURLSchema; -type PaymentMetaLogoURLSchema = { - /** - * - URL for the large version of the payment method's logo. - */ - large: string; - /** - * - URL for the small version of the payment method's logo. - */ - small: string; -}; -/** @returns {ValidationError} */ -declare function ValidationError(): ValidationError; -type ValidationError = { - /** - * - A brief description of the error encountered. - */ - message: string; - /** - * - The field in the request that caused the error. - */ - field: string; -}; -/** @returns {Page} */ -declare function Page(): Page; -type Page = { - /** - * - The total number of items on the page. - */ - item_total?: number; - /** - * - The identifier for the next page. - */ - next_id?: string; - /** - * - Indicates whether there is a previous page. - */ - has_previous?: boolean; - /** - * - Indicates whether there is a next page. - */ - has_next?: boolean; - /** - * - The current page number. - */ - current?: number; - /** - * - The type of the page, such as 'PageType'. - */ - type: string; - /** - * - The number of items per page. - */ - size?: number; -}; -/** @returns {BagReasonMeta} */ -declare function BagReasonMeta(): BagReasonMeta; -type BagReasonMeta = { - /** - * - Indicates whether a text area should - * be displayed for additional input related to the bag reason. - */ - show_text_area?: boolean; +/** @returns {BagReasonMeta} */ +declare function BagReasonMeta(): BagReasonMeta; +type BagReasonMeta = { + show_text_area?: boolean; }; /** @returns {QuestionSet} */ declare function QuestionSet(): QuestionSet; type QuestionSet = { - /** - * - A unique identifier for the question set. - */ id?: number; - /** - * - The display name for the question set, - * used for user-facing purposes. - */ display_name?: string; }; /** @returns {BagReasons} */ declare function BagReasons(): BagReasons; type BagReasons = { - /** - * - List of QC (Quality Control) types -- having - * return reason types indicating the stage at which QC is performed. - - * "Doorstep QC" refers involves inspecting products for damages at the - * customer's location before delivery. - "Pre QC" requires customers to - * upload product photos for a preliminary quality check by the operations - * team before a return or exchange pickup is arranged, ensuring criteria are - * met and optimizing logistics. - */ qc_type?: string[]; - /** - * - A unique identifier for the bag reason. - */ id?: number; - /** - * - The display name for the bag reason, used - * for user-facing purposes. - */ display_name?: string; meta?: BagReasonMeta; - /** - * - An array of question sets linked - * to the bag reason, defining the questions to be answered. - */ question_set?: QuestionSet[]; - /** - * - An array of nested bag reasons that can - * further explain the primary reason. - */ reasons?: BagReasons[]; }; /** @returns {ShipmentBagReasons} */ declare function ShipmentBagReasons(): ShipmentBagReasons; type ShipmentBagReasons = { - /** - * - List of bag reasons for a shipment with - * a corresponding shipment status. - */ reasons?: BagReasons[]; - /** - * - Indicates whether the API call was successful - * (true) or not (false). - */ success?: boolean; - /** - * - The unique identifier for the rule that is - * associated with the given reasons. This ID serves as a reference to the - * specific rule within the RMA system that governs or influences the reasons listed. - */ - rule_id?: number; }; /** @returns {ShipmentStatus} */ declare function ShipmentStatus(): ShipmentStatus; type ShipmentStatus = { - /** - * - The current status of the shipment. - */ current_shipment_status?: string; - /** - * - It contains the additional properties related to - * shipment status transition like Kafka_emission_status, user_name, etc. - * Additionally it is dynamic. - */ meta?: any; - /** - * - A unique identifier for the shipment status. - */ - id?: number; - /** - * - A list of bags associated with the - * shipment, useful for tracking individual items within the shipment. - */ + shipment_status_id?: number; bag_list?: string[]; - /** - * - A brief title or label for the shipment status, - * summarizing its current state. - */ title: string; - /** - * - A user-friendly name or identifier for - * the shipment status. - */ - display_name?: string; - /** - * - Timestamp when the shipment was initially - * created.This timestamp is crucial for tracking the shipment's age, - * scheduling, and historical analysis. - */ created_at?: string; - /** - * - A general timestamp for when the shipment - * was created, formatted for internal processing. - */ created_ts?: string; - /** - * - A unique identifier for the shipment. - */ shipment_id?: string; - /** - * - Timestamp when the transition for - * the status of the shipment was created. Date time in UTC timezone as per ISO format. - */ status_created_at?: string; - /** - * - A general timestamp indicating when the - * status was updated, useful for processing and tracking. - */ - updated_ts?: string; - /** - * - This key denotes the status of the shipment, - * providing a clear indication of its current processing stage. - */ + status_created_ts?: string; status: string; }; /** @returns {UserDataInfo} */ declare function UserDataInfo(): UserDataInfo; type UserDataInfo = { - /** - * - The unique identifier associated with the user. - */ - id?: number; - /** - * - The object ID for the user, used for - * referencing the user in various operations. - */ + uid?: number; user_oid?: string; - /** - * - The identifier for the user. - */ - mongo_user_id?: string; - /** - * - The identifier for the user in - * external systems. - */ external_customer_id?: string; - /** - * - The first name of the user. - */ first_name?: string; - /** - * - The last name of the user. - */ last_name?: string; - /** - * - The mobile phone number of the user. - */ mobile?: string; - /** - * - The email address of the user. - */ email?: string; - /** - * - Additional metadata related to the user. - */ - meta?: string; - /** - * - Indicates whether the user is an - * anonymous user (true) or registered (false). - */ is_anonymous_user?: boolean; - /** - * - A full name of the user, which may be a - * combination of first and last name. - */ + avis_user_id?: string; name?: string; - /** - * - The gender of the user. - */ gender?: string; - /** - * - The country-specific phone code, - * useful for formatting mobile numbers correctly. - */ - country_phone_code?: string; }; -/** @returns {Address} */ -declare function Address(): Address; -type Address = { - /** - * - The phone number at the address, used for - * contact purposes. - */ +/** @returns {PlatformDeliveryAddress} */ +declare function PlatformDeliveryAddress(): PlatformDeliveryAddress; +type PlatformDeliveryAddress = { phone?: string; - /** - * - An optional additional field for the street - * address of the address. - */ address2?: string; - /** - * - An optional additional field for the street - * address of the address. - */ - address?: string; - /** - * - The longitude coordinate of the address. - */ longitude?: number; - /** - * - The postal code of the address. - */ - pincode?: string; - /** - * - Area details of the address. - */ - area?: string; - /** - * - The type of the address. - */ - address_type?: string; - /** - * - The name of the country of the address. - */ - country?: string; - /** - * - Category or classification of the - * address. The address_category field that includes "store", "delivery", and - * "billing" serves to classify addresses based on various business processes. - * addresses based on various business processes - * - * - 'store': Identifies addresses associated with physical retail locations or - * warehouses which is essential for inventory management, order - * fulfillment, and facilitating in-store pickups or returns. - * - 'delivery': Identifies addresses where orders are shipped to customers which - * ensures successful delivery, enhancing customer satisfaction, and - * optimizing logistics operations. - * - 'billing': Identifies addresses used for billing and financial transactions - * which are essential for payment processing, invoice generation, and - * maintaining financial accuracy - */ - address_category?: string; - /** - * - The email of the person associated with the order. - */ - email?: string; - /** - * - Created at date for address - */ - created_at?: string; - /** - * - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like {address} {address2} - * {area} {state} {country}, Address1 compiles all into a single formatted string. - */ - address1?: string; - /** - * - A formatted version of the address for - * display purposes. - */ - display_address?: string; - /** - * - A notable landmark near the address, aiding - * in location identification. - */ - landmark?: string; - /** - * - Updated at date for address - */ - updated_at?: string; - /** - * - The version number of the address record - */ - version?: string; - /** - * - The latitude coordinate of the address. - */ - latitude?: number; - /** - * - The full name of the person associated - * with the address. - */ - contact_person?: string; - /** - * - The name of the region (for example, province, - * state, or prefecture) of the address. - */ - state?: string; - /** - * - The city, town of the address. - */ - city?: string; - /** - * - A slug representation of the area code. - */ - area_code_slug?: string; - /** - * - A code representing the country for the address. - */ - country_code?: string; - /** - * - The ISO code representing the country - * for the address. - */ - country_iso_code?: string; - /** - * - The country-specific phone code for - * formatting phone numbers. - */ - country_phone_code?: string; - /** - * - A unique identifier for the - * delivery address. - */ - delivery_address_id?: string; - /** - * - An object containing additional - * geographical information related to the address. - */ - geo_location?: any; - /** - * - A unique identifier for the name associated with - * the address. - */ - name?: string; - /** - * - The sector or zone of the address, if applicable. - */ - sector?: string; - /** - * - A code representing the state or region for - * the address. - */ - state_code?: string; - /** - * - A unique identifier for the user associated with - * the address. - */ - uid?: string; - /** - * - The unique identifier of the user in the system. - */ - user_id?: string; + pincode?: string; + area?: string; + address_type?: string; + country?: string; + address_category?: string; + email?: string; + created_at?: string; + address1?: string; + display_address?: string; + landmark?: string; + updated_at?: string; + version?: string; + latitude?: number; + contact_person?: string; + state?: string; + city?: string; }; /** @returns {ShipmentListingChannel} */ declare function ShipmentListingChannel(): ShipmentListingChannel; type ShipmentListingChannel = { - /** - * - A unique identifier for the - * shipment associated with a specific channel, facilitating tracking and management. - */ channel_shipment_id?: string; - /** - * - Indicates whether the shipment is - * associated with an affiliate program, which may affect processing and fulfillment. - */ is_affiliate?: boolean; - /** - * - A URL or path to the logo of the shipment - * channel, used for branding and identification purposes. - */ logo?: string; - /** - * - The name of the shipment channel, providing a - * human-readable reference for the channel through which the shipment is processed. - */ name?: string; }; /** @returns {Prices} */ declare function Prices(): Prices; type Prices = { - /** - * - Refund credits applicable to the - * customer in case of returns or cancellations. - */ - refund_credit?: number; - /** - * - Total amount paid, rounded off to - * the nearest integer. - */ - amount_paid_roundoff?: number; - /** - * - Effective price after applying - * discounts to the MRP (Maximum Retail Price). - */ - price_effective?: number; - /** - * - Discount amount provided - * through promotions applicable to the purchase. - */ - promotion_effective_discount?: number; - /** - * - Updated selling price of the product in - * the event of repricing. - */ - pm_price_split?: number; - /** - * - Total amount to be refunded in case of - * cancellation or return. - */ - refund_amount?: number; - /** - * - Fixed selling price applicable for - * payouts by the brand to the platform. - */ - transfer_price?: number; - /** - * - Discount amount applicable - * when using a coupon. - */ - coupon_effective_discount?: number; - /** - * - Tax amount collected at the - * source during the transaction. - */ - tax_collected_at_source?: number; - /** - * - Calculated price after - * deducting coupon and promotion discounts from the effective price. - */ - brand_calculated_amount?: number; - /** - * - Fee charged for delivery, as - * stipulated by the delivery partner. - */ - delivery_charge?: number; - /** - * - Cashback points or amount provided to the - * customer post-purchase. - */ - cashback?: number; - /** - * - Effective selling price minus the GST - * amount applicable to the product. - */ - value_of_good?: number; - /** - * - Actual cashback value that has been - * applied to the purchase. - */ - cashback_applied?: number; - /** - * - Charges applicable for Cash on Delivery - * (COD) orders. - */ - cod_charges?: number; - /** - * - The marked price of the item before any - * discounts or adjustments. - */ - price_marked?: number; - /** - * - Total amount actually paid by the customer - * for the purchase. - */ - amount_paid?: number; - /** - * - The effective value of the coupon applied - * to the transaction. - */ - coupon_value?: number; - /** - * - Total discount amount deducted from the - * original price of the product. - */ - discount?: number; - /** - * - Credits awarded by Fynd, which can be - * used for future purchases. - */ - fynd_credits?: number; - /** - * - The amount associated with any gift card - * used in the transaction. - */ - gift_price?: number; - /** - * - Total amount to be collected in - * scenarios involving multiple payment methods. - */ - amount_to_be_collected?: number; -}; -/** @returns {ChargeDistributionSchema} */ -declare function ChargeDistributionSchema(): ChargeDistributionSchema; -type ChargeDistributionSchema = { - /** - * - This field defines the distribution type, e.g - * values('multi', 'single') multi: distribute the changes across all entity - * single: distribute the changes across to any one single entity - */ - type: string; - /** - * - This field defines the distribution logic e.g - * values('apportion', 'equally') apportion: distribute charge amount based of - * weighted average amount of all the entity (like article with [10, 20] will - * get charge of 9 as [3, 6]) equally: distribute charge amount 'equally' to - * all the entity - */ - logic: string; -}; -/** @returns {ChargeDistributionLogic} */ -declare function ChargeDistributionLogic(): ChargeDistributionLogic; -type ChargeDistributionLogic = { - distribution: ChargeDistributionSchema; - /** - * - This field defines the distribution - * level, e.g distribution level is (order, shipment, article) - */ - distribution_level: string; -}; -/** @returns {ChargeAmountCurrency} */ -declare function ChargeAmountCurrency(): ChargeAmountCurrency; -type ChargeAmountCurrency = { - /** - * - Charge currency value or amount - */ - value: number; - /** - * - Charge currency code - */ - currency: string; -}; -/** @returns {ChargeAmount} */ -declare function ChargeAmount(): ChargeAmount; -type ChargeAmount = { - base_currency: ChargeAmountCurrency; - ordering_currency: ChargeAmountCurrency; -}; -/** @returns {PriceAdjustmentCharge} */ -declare function PriceAdjustmentCharge(): PriceAdjustmentCharge; -type PriceAdjustmentCharge = { - /** - * - Code defined for charge - */ - code?: string; - /** - * - Display name for charge (charge is unique by the name) - */ - name: string; - /** - * - Type defined for charge - */ - type?: string; - amount: ChargeAmount; - distribution_logic: ChargeDistributionLogic; -}; -/** @returns {OrderingCurrencyPrices} */ -declare function OrderingCurrencyPrices(): OrderingCurrencyPrices; -type OrderingCurrencyPrices = { - /** - * - Amount of refund credits applicable to - * the customer's account for returned items or cancellations. - */ refund_credit?: number; - /** - * - Total amount paid by the - * customer, rounded off to the nearest integer for ease of processing. - */ amount_paid_roundoff?: number; - /** - * - Final effective price of the product - * after applying discounts to the marked retail price (MRP). - */ price_effective?: number; - /** - * - Total discount amount - * applied through promotional offers specific to the customer's purchase. - */ promotion_effective_discount?: number; - /** - * - Updated selling price of the product - * after any repricing adjustments made before the sale. - */ pm_price_split?: number; - /** - * - Amount that will be refunded to the - * customer in case of order cancellation or product return. - */ refund_amount?: number; - /** - * - Fixed price set for payouts by the - * brand, representing the cost to the retailer or affiliate. - */ transfer_price?: number; - /** - * - Discount value realized - * through the use of a coupon code applied at the time of purchase. - */ coupon_effective_discount?: number; - /** - * - Total tax amount that is - * collected at the point of sale, often applicable for tax regulations. - */ tax_collected_at_source?: number; - /** - * - Amount calculated by the brand - * after applying any relevant coupons and promotions to the base price. - */ brand_calculated_amount?: number; - /** - * - Cost charged for the delivery service, - * as determined by the delivery partner handling the shipment. - */ delivery_charge?: number; - /** - * - Points or monetary value returned to the - * customer as a reward for their purchase, which can be used for future transactions. - */ cashback?: number; - /** - * - Net selling price of the product after - * excluding the GST (Goods and Services Tax) amount from the total. - */ value_of_good?: number; - /** - * - Total cashback value that has been - * applied to the customer's account or to the current transaction. - */ cashback_applied?: number; - /** - * - Additional fee charged for orders placed - * via cash on delivery (COD) payment method. - */ cod_charges?: number; - /** - * - The original price indicated for the - * product before any discounts or promotions are applied. - */ price_marked?: number; - /** - * - The total amount the customer has paid for - * their order, including all applicable charges and discounts. - */ amount_paid?: number; - /** - * - The specific value of the coupon used in - * the transaction, reflecting its impact on the total price. - */ coupon_value?: number; - /** - * - Total amount discounted from the original - * price of the product, reflecting savings for the customer. - */ discount?: number; - /** - * - Credits provided by Fynd, which can be - * used for discounts on future purchases. - */ fynd_credits?: number; - /** - * - Monetary value assigned to a gift card - * purchased by the customer, usable for future transactions. - */ gift_price?: number; - /** - * - Amount to be collected from the - * customer when multiple payment methods are utilized for a single order. - */ amount_to_be_collected?: number; }; /** @returns {Identifier} */ declare function Identifier(): Identifier; type Identifier = { - /** - * - The ALU (Article Level Unit) code used to identify - * the item at a detailed level, often specific to certain retail or - * distribution systems. - */ alu?: string; - /** - * - The European Article Number (EAN) is a unique - * identifier for products, primarily used in retail and logistics. It helps - * in tracking and managing inventory across various platforms. - */ ean?: string; - /** - * - The Stock Keeping Unit (SKU) code of the item - * - uniquely identifies each distinct product. SKUs are used to track - * inventory levels, facilitate accurate stocktaking, and streamline order - * fulfillment processes. This code is essential for inventory management, - * allowing for the differentiation between products based on attributes such - * as price, color, and size. - */ sku_code?: string; - /** - * - The Universal Product Code (UPC) is a barcode - * symbol used for tracking trade items in stores. It is widely used in North - * America and helps in identifying products quickly during point-of-sale transactions. - */ upc?: string; - /** - * - The International Standard Book Number (ISBN) is - * a unique identifier for books, allowing for easier management and tracking - * of book inventories in retail and library systems. - */ isbn?: string; }; /** @returns {FinancialBreakup} */ declare function FinancialBreakup(): FinancialBreakup; type FinancialBreakup = { - /** - * - The amount of refund credits applicable - * for the transaction. - */ refund_credit: number; - /** - * - Total amount paid, rounded off to - * the nearest integer for billing purposes. - */ amount_paid_roundoff?: number; - /** - * - The effective price after applying - * discounts and before any taxes. - */ price_effective: number; - /** - * - The amount of discount - * applied from promotional offers. - */ promotion_effective_discount: number; - /** - * - The fixed selling price applicable for - * payouts by the brand. - */ transfer_price: number; - /** - * - The discount applied through a - * coupon code, if applicable. - */ coupon_effective_discount: number; - /** - * - Total Goods and Services Tax (GST) fee charged - * on the goods or services. - */ gst_fee: number; - /** - * - Tax amount collected at the - * source of income or transaction. - */ tax_collected_at_source?: number; - /** - * - Amount calculated by the brand, - * possibly reflecting various costs or fees. - */ brand_calculated_amount: number; - /** - * - Fee applicable for the delivery of the goods. - */ delivery_charge: number; - /** - * - A tag used to denote GST-related attributes or - * classifications. - */ gst_tag: string; - /** - * - The HSN Code (Harmonized System of Nomenclature - * Code) is an internationally standardized system for classifying goods, used - * in trade and commerce for uniform identification across different countries. - */ hsn_code: string; - /** - * - The cashback amount provided to the customer, - * if applicable. - */ cashback: number; - /** - * - The name or description of the item related to - * the financial breakup. - */ item_name: string; - /** - * - The assessed value of the goods before - * applying any taxes or fees. - */ value_of_good: number; - /** - * - The effective cashback value that has - * been applied to the transaction. - */ cashback_applied: number; - /** - * - Charges applicable for Cash on Delivery (COD) orders. - */ cod_charges: number; - /** - * - The indicated price or value assigned to an - * item before any discounts or adjustments. - */ price_marked: number; - /** - * - The size of the item, if applicable. - */ size: string; - /** - * - Total amount paid by the customer for the transaction. - */ amount_paid: number; - /** - * - The effective value of the coupon used in - * the transaction. - */ coupon_value: number; - /** - * - Total amount discounted from the original price - * of the goods. - */ discount: number; - /** - * - Credits provided by Fynd to the customer, - * possibly as part of a rewards program. - */ fynd_credits: number; - /** - * - The percentage of GST applicable on - * the goods or services. - */ gst_tax_percentage: number; - /** - * - Amount to be collected in case - * of multiple modes of payments. - */ amount_to_be_collected?: number; identifiers: Identifier; - /** - * - The total number of units involved in the transaction. - */ total_units: number; - /** - * - Indicates whether the amount has - * been added to Fynd cash for future use. - */ added_to_fynd_cash: boolean; }; /** @returns {GSTDetailsData} */ declare function GSTDetailsData(): GSTDetailsData; type GSTDetailsData = { - /** - * - The percentage of Central Goods - * and Services Tax (CGST) applicable on the goods or services. - */ cgst_tax_percentage?: number; - /** - * - A GST Number (Goods and Services Tax - * Identification Number, often abbreviated as GSTIN) is a unique identifier - * assigned to a business or individual registered under the Goods and - * Services Tax (GST) system in countries like India. The GST number is - * essential for businesses to comply with tax regulations and for the - * government to track tax payments and returns. - */ gstin_code?: string; - /** - * - The assessed value of the goods before - * applying any taxes or fees. - */ value_of_good: number; - /** - * - The total GST fee charged on the goods or services. - */ gst_fee: number; - /** - * - The percentage of Integrated Goods - * and Services Tax (IGST) applicable for inter-state transactions. - */ igst_tax_percentage?: number; - /** - * - The overall GST tax percentage - * applicable to the goods or services. - */ gst_tax_percentage?: number; - /** - * - Unique identifier for the Harmonized - * System of Nomenclature (HSN) code used to classify goods. - */ hsn_code_id?: string; - /** - * - The GST fee applicable for IGST, usually - * for inter-state transactions. - */ igst_gst_fee?: number; - /** - * - Indicates whether this HSN code - * is the default classification for the goods. - */ is_default_hsn_code?: boolean; - /** - * - The GST fee applicable for State Goods - * and Services Tax (SGST). - */ sgst_gst_fee?: number; - /** - * - Tax amount collected at the - * source of income or transaction, often for compliance and revenue tracking. - */ tax_collected_at_source: number; - /** - * - Amount calculated by the brand, - * potentially reflecting costs, fees, or pricing structures. - */ brand_calculated_amount: number; - /** - * - The GST fee applicable for CGST. - */ cgst_gst_fee?: number; - /** - * - A tag or label used to denote GST-related - * attributes or classifications. - */ gst_tag?: string; - /** - * - The percentage of State Goods and - * Services Tax (SGST) applicable on the goods or services. - */ sgst_tax_percentage?: number; - /** - * - The HSN Code (Harmonized System of - * Nomenclature Code) is an internationally standardized system for - * classifying goods. It is used in trade and commerce to identify products - * and services uniformly across different countries and industries. The - * system was developed by the World Customs Organization (WCO) and is widely - * used in customs processes and tax systems. - */ hsn_code?: string; }; /** @returns {BagStateMapper} */ declare function BagStateMapper(): BagStateMapper; type BagStateMapper = { - /** - * - Indicates whether the state is currently - * active in the shipment process. - */ is_active?: boolean; - /** - * - Display name used in the application - * to represent this state. - */ app_display_name?: string; - /** - * - Serves as a key identifier to differentiate - * among the diverse types of states a shipment can undergo throughout its journey. - * - * - 'operational': Pertains to states that involve the physical handling and - * movement of the shipment, such as packing, in transit, and delivery. - * - 'financial': Relates to states associated with the payment, invoicing, and - * any monetary transactions or obligations tied to the shipment. - * - 'logistics': Encompasses states that deal with the broader logistical - * planning and coordination necessary for the shipment's journey, - * including route optimization and carrier selection. - */ state_type: string; id: number; - /** - * - It is a type being used to represent the - * journey of shipment through the performed status transition. Forward - * Journey: The forward journey encompasses all the stages of shipping, - * including order placement, packing, dispatch, in-transit updates, and - * delivery. Return Journey: Contrary to the forward journey, the return - * journey involves the process of sending items back from the customer to the - * original sender or a designated return facility. - */ journey_type: string; - /** - * - The name of the state as used within - * the application, providing a clear reference. - */ app_state_name?: string; - /** - * - Official name of the state in the context of the - * shipment process. - */ name: string; - /** - * - Indicates if this state is visible to the - * customer in the application. - */ app_facing?: boolean; - /** - * - Indicates whether the customer should - * be notified upon reaching this state. - */ notify_customer?: boolean; - /** - * - User-friendly name for the state, suitable - * for display purposes. - */ display_name: string; }; /** @returns {BagStatusHistory} */ declare function BagStatusHistory(): BagStatusHistory; type BagStatusHistory = { - /** - * - Indicates whether the bag is being forwarded - * to the next stage in the shipment process. - */ forward?: boolean; - /** - * - Unique identifier for the store associated - * with the bag's current status. - */ store_id?: number; - /** - * - The Air Waybill (AWB) number used - * for tracking the delivery of the bag. - */ delivery_awb_number?: string; - /** - * - Indicates if the status update has been - * synchronized with Kafka for real-time processing. - */ kafka_sync?: boolean; - /** - * - Identifier for the delivery - * partner responsible for the shipment. - */ delivery_partner_id?: number; - /** - * - The display name of the application - * that is handling the bag status update. - */ app_display_name?: string; - /** - * - Unique identifier for the current state of - * the bag in the shipment process. - */ state_id?: number; - /** - * - Serves as a key identifier to differentiate - * among the diverse types of states a shipment can undergo throughout its journey. - */ state_type?: string; - /** - * - Unique identifier for the bag status history entry. - */ bsh_id?: number; - /** - * - Timestamp when the bag status history - * transaction was created. - */ created_at?: string; - /** - * - Timestamp of creation in a different - * format, if applicable. - */ created_ts?: string; - /** - * - Identifier for the shipment associated - * with this bag status entry. - */ shipment_id?: string; - /** - * - Timestamp when the bag status history - * transaction was last updated. - */ updated_at?: string; - /** - * - Timestamp of last update in a different - * format, if applicable. - */ updated_ts?: string; bag_state_mapper?: BagStateMapper; - /** - * - Unique identifier for the bag whose status is - * being tracked. - */ bag_id?: number; - /** - * - List of reasons associated with the current - * status of the bag. - */ reasons?: any[]; - /** - * - Current status of the bag in the shipment process. - */ status: string; - /** - * - User-friendly name that describes the - * current state of the bag. - */ display_name?: string; }; /** @returns {Dimensions} */ declare function Dimensions(): Dimensions; type Dimensions = { - /** - * - The height measurement of the object, typically - * representing the vertical dimension. - */ height?: number; - /** - * - The width measurement of the object, indicating - * the horizontal dimension. - */ width?: number; - /** - * - A flag indicating whether these dimensions - * are the default measurements for the object. - */ is_default?: boolean; - /** - * - The unit of measurement used for the dimensions - * (e.g., centimeters, inches). - */ unit?: string; - /** - * - The length measurement of the object, - * representing the longest dimension. - */ length?: number; }; /** @returns {ReturnConfig} */ declare function ReturnConfig(): ReturnConfig; type ReturnConfig = { - /** - * - Indicates whether the article is eligible - * for return, allowing customers to send it back under specified conditions. - */ returnable?: boolean; - /** - * - The time frame within which the return must be - * initiated, typically measured in days. - */ time?: number; - /** - * - The unit of time for the return period (e.g., days, weeks). - */ unit?: string; }; /** @returns {Weight} */ declare function Weight(): Weight; type Weight = { - /** - * - Indicates whether this weight value is the - * default weight used for the article. - */ is_default?: boolean; - /** - * - The weight of the article specifically for - * shipping purposes, usually measured in grams or kilograms. - */ shipping?: number; - /** - * - The unit of measurement for the weight (e.g., - * grams, kilograms, pounds). - */ unit?: string; }; /** @returns {Article} */ declare function Article(): Article; type Article = { - /** - * - Contains a flexible set of key-value - * pairs representing detailed information about the article's child entities, - * including dimensions (width, height, length), weight, and unique - * identifiers (EAN, article code, seller identifier) for each child entity. - */ child_details?: any; - /** - * - Unique identifier assigned by the - * seller to the article, used for inventory management. - */ seller_identifier: string; - /** - * - A unique identifier for the article within the system. - */ uid: string; - /** - * - Represents the data related to combinations of - * articles that, while being the same product, vary by size, color, or other - * distinguishing features. - */ - set?: any; + a_set?: any; dimensions?: Dimensions; - /** - * - Currency in which the transaction amount - * associated with the article is specified. - */ currency?: any; - /** - * - Indicates whether the article has been - * modified by the ESP (e-commerce service provider). - */ esp_modified?: boolean; - /** - * - Configuration related to the - * return policy for the article. - */ return_config?: ReturnConfig; - /** - * - Internal code or identifier for the article, used - * for reference. - */ code?: string; weight?: Weight; - /** - * - The unique identifier for the article within the database. - */ _id: string; - /** - * - Details of identifiers associated with the - * article, including SKU codes and other relevant identifiers. - */ identifiers: any; - /** - * - Raw metadata associated with the article, - * providing additional context or information. - */ raw_meta?: string; - /** - * - Size of the article, which may vary for clothing, - * accessories, etc. - */ size: string; - /** - * - Indicates whether the article is part of a set - * or collection. - */ is_set?: boolean; - /** - * - Tags associated with the article for - * categorization and search optimization. - */ tags?: string[]; }; /** @returns {ShipmentListingBrand} */ declare function ShipmentListingBrand(): ShipmentListingBrand; type ShipmentListingBrand = { - /** - * - URL or path to the logo image of the brand - * associated with the shipment. - */ logo?: string; - /** - * - Timestamp indicating when the brand of the - * shipment was created, formatted as date-time. - */ created_on?: string; - /** - * - The name of the brand linked to the shipment. - */ name?: string; - /** - * - Base64 encoded string of the brand's logo - * image, allowing for direct embedding in documents or applications. - */ logo_base64?: string; }; /** @returns {ReplacementDetails} */ declare function ReplacementDetails(): ReplacementDetails; type ReplacementDetails = { - /** - * - Specifies the nature or category of - * the replacement requested or processed for an item. - */ replacement_type?: string; - /** - * - The original order ID - * associated with the item that is being replaced. - */ original_affiliate_order_id?: string; }; /** @returns {AffiliateMeta} */ declare function AffiliateMeta(): AffiliateMeta; type AffiliateMeta = { - /** - * - A unique identifier for the order item - * associated with the affiliate shipment. - */ order_item_id?: string; - /** - * - The order ID assigned by the sales - * channel for tracking purposes. - */ channel_order_id?: string; - /** - * - The discount percentage or amount - * applied to the order for employees. - */ employee_discount?: number; - /** - * - Box type of the shipment in which the - * shipment will be delivered. - */ box_type?: string; - /** - * - The total quantity of items in the order. - */ quantity?: number; - /** - * - The total quantity of items - * grouped by size level for the order. - */ size_level_total_qty?: number; - /** - * - The discount percentage or amount - * applied to the order based on customer loyalty. - */ loyalty_discount?: number; replacement_details?: ReplacementDetails; - /** - * - The shipment ID assigned by the - * sales channel for tracking purposes. - */ channel_shipment_id?: string; - /** - * - The invoice ID related to the - * marketplace for the transaction. - */ marketplace_invoice_id?: string; - /** - * - Specifies the deadline by which a particular - * action related to the affiliate shipment needs to be completed. - */ due_date?: string; - /** - * - A unique code provided to customers for - * redeeming special offers or discounts on their purchases. - */ coupon_code?: string; - /** - * - Indicates whether the shipment is a - * priority for fulfillment. - */ is_priority?: boolean; - /** - * - Indicates whether a serial - * number is required for the items in the shipment. - */ is_serial_number_required?: boolean; - /** - * - A value indicating the priority - * level of order fulfillment. - */ fulfilment_priority?: number; - /** - * - The selling price at which the - * product is offered to the customer. - */ customer_selling_price?: number; }; /** @returns {AffiliateBagDetails} */ declare function AffiliateBagDetails(): AffiliateBagDetails; type AffiliateBagDetails = { affiliate_meta: AffiliateMeta; - /** - * - Unique identifier for the affiliate - * order associated with the bag. - */ affiliate_order_id: string; - /** - * - Discount percentage or amount - * applicable to employees for this order. - */ employee_discount?: number; - /** - * - Unique identifier for the affiliate - * bag, used for tracking and reference. - */ affiliate_bag_id: string; - /** - * - Discount amount applied based on - * customer loyalty, if applicable. - */ loyalty_discount?: number; }; /** @returns {PlatformArticleAttributes} */ declare function PlatformArticleAttributes(): PlatformArticleAttributes; type PlatformArticleAttributes = { - /** - * - The currency in which the price of the - * article is specified. - */ currency?: string; }; /** @returns {PlatformItem} */ declare function PlatformItem(): PlatformItem; type PlatformItem = { - /** - * - Unique identifier for the platform item. - */ id?: number; attributes?: PlatformArticleAttributes; - /** - * - Identifier for the brand associated with the item. - */ brand_id?: number; - /** - * - A user-friendly string that represents the - * item, often used in URLs. - */ slug_key?: string; - /** - * - Represents the product's classification at - * the third level in the e-commerce platform's category hierarchy, using an - * integer identifier. - */ l3_category?: number; - /** - * - Name of the third-level category - * under which the product is listed. - */ l3_category_name?: string; - /** - * - Timestamp when any aspect of the - * associated record was modified, formatted as date-time. - */ last_updated_at?: string; - /** - * - The name of the product item. - */ name?: string; - /** - * - Represents the second level of - * categorization for items, helping customers narrow down their search. - */ l2_category?: string[]; - /** - * - Name of the brand associated with the item. - */ brand?: string; - /** - * - Array of image URLs representing the item. - */ image?: string[]; - /** - * - Unique code for the item, often used for - * inventory management. - */ code?: string; - /** - * - Represents the highest or top-tier level - * of categorization for the product. - */ l1_category?: string[]; - /** - * - Size specification of the product, if applicable. - */ size?: string; - /** - * - Indicates whether the item can be canceled - * after order placement. - */ can_cancel?: boolean; - /** - * - Indicates whether the item is eligible for return. - */ can_return?: boolean; - /** - * - URL linking to a specific branch or store - * where the item is available. - */ branch_url?: string; - /** - * - Meta data containing additional, dynamic - * information about the item. - */ meta?: any; - /** - * - Color specification of the product, if applicable. - */ color?: string; - /** - * - Identifier for the department associated - * with the product. - */ department_id?: number; - /** - * - Array of image URLs representing different - * views or angles of the item. - */ images?: string[]; }; /** @returns {Dates} */ declare function Dates(): Dates; type Dates = { - /** - * - Represents the scheduled date and time - * for the delivery of the entity. - */ delivery_date?: string; order_created?: string; }; /** @returns {BagReturnableCancelableStatus} */ declare function BagReturnableCancelableStatus(): BagReturnableCancelableStatus; type BagReturnableCancelableStatus = { - /** - * - Indicates whether the bag can be returned - * by the customer. - */ is_returnable: boolean; - /** - * - Specifies if the current status of the bag is - * active, affecting its eligibility for return or cancellation. - */ is_active: boolean; - /** - * - Indicates if the bag order can be - * cancelled by the customer. - */ can_be_cancelled: boolean; - /** - * - Indicates whether tracking is enabled - * for the bag, allowing customers to monitor its status. - */ enable_tracking: boolean; - /** - * - Specifies if the customer is - * permitted to return the bag, based on the return policy. - */ is_customer_return_allowed: boolean; }; /** @returns {BagUnit} */ declare function BagUnit(): BagUnit; type BagUnit = { - /** - * - Specifies the type or category of the bag. - */ bag_type?: string; gst?: GSTDetailsData; financial_breakup: FinancialBreakup[]; - /** - * - Indicates the date and time when the - * contents of a bag, or the bag itself, are no longer considered valid or - * safe for use. This is particularly relevant in contexts where the bag - * contains perishable goods, sensitive materials, or items with a limited shelf life - */ bag_expiry_date?: string; bag_status?: BagStatusHistory[]; current_operational_status: BagStatusHistory; @@ -11496,202 +7232,58 @@ type BagUnit = { brand?: ShipmentListingBrand; affiliate_bag_details?: AffiliateBagDetails; item?: PlatformItem; - /** - * - A collection of reasons associated with the - * bag, which could pertain to returns, cancellations, or other relevant contexts. - */ reasons?: any[]; - /** - * - The total quantity of products - * contained within the bag. - */ product_quantity: number; - /** - * - Indicates whether the items in the bag are - * eligible for return. - */ can_return?: boolean; - /** - * - A user-friendly name or label for the - * bag, which may be displayed in interfaces. - */ display_name?: string; - /** - * - Indicates whether the bag or its contents - * can be canceled. - */ can_cancel?: boolean; - /** - * - Specifies the size of the bag, which may be - * relevant for packaging or shipping considerations. - */ size?: string; - /** - * - Represents the line number in an order or - * transaction associated with the bag. - */ line_number?: number; - /** - * - Meta data of the bag contains additional, - * potentially dynamic information about the bag. - */ meta?: any; prices?: Prices; - ordering_currency_prices?: OrderingCurrencyPrices; dates?: Dates; current_status: BagStatusHistory; - /** - * - Unique identifier for the bag. - */ bag_id: number; - /** - * - Specifies the type of entity. - */ entity_type?: string; status: BagReturnableCancelableStatus; }; /** @returns {ShipmentItemFulFillingStore} */ declare function ShipmentItemFulFillingStore(): ShipmentItemFulFillingStore; type ShipmentItemFulFillingStore = { - /** - * - Contact number for the fulfilling store, - * allowing customers to reach out for inquiries or assistance. - */ phone?: string; - /** - * - Tags associated with the brand - * store, providing additional categorization or identification of the store's - * attributes. - */ brand_store_tags?: string[]; - /** - * - Postal code for the fulfilling store's - * location, essential for identifying the specific area and ensuring accurate - * deliveries. - */ pincode?: string; - /** - * - Meta data of the fulfilling store that contains - * additional, potentially dynamic information about the fulfilling store. - */ meta?: any; - /** - * - Comprehensive address details of the - * fulfilling store, including all necessary components for locating the store. - */ address?: string; - /** - * - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like Address1 compiles all into - * a single formatted string. The address is formed by the template provided - * and whichever keys are present in the template are populated as is from - * store address fields. Template Example: {address} {address2}_{area} - * {state}_{country}, - */ address1?: string; - /** - * - A user-friendly formatted version of - * the store's address for display purposes, making it easier for customers to read. - */ display_address?: string; - /** - * - Type of location of the fulfilling store. - */ location_type?: string; - /** - * - Unique identifier for the fulfilling store in the database. - */ id: number; - /** - * - A specific code assigned to the store, often used - * for internal tracking or categorization purposes. - */ code: string; - /** - * - Email address for the fulfilling store, - * allowing for electronic communication and inquiries. - */ store_email?: string; - /** - * - The name of the fulfilling store, which helps - * customers identify the store. - */ name?: string; - /** - * - The state where the fulfilling store is located, - * important for regional identification. - */ state?: string; - /** - * - The city where the fulfilling store is situated, - * providing more specific location details. - */ city?: string; - /** - * - Additional tags associated with the store, used - * for categorization and filtering purposes. - */ tags?: string[]; }; /** @returns {Currency} */ declare function Currency(): Currency; type Currency = { - /** - * - This specifies the currency code for all - * amounts. The currency_code field will hold a string value representing the - * code for the currency in which all monetary amounts are denominated. This - * code typically follows the ISO 4217 standard, which uses three-letter - * alphabetic codes to define different currencies around the world. For - * example, 'USD' for United States Dollar, 'INR' for Indian Rupees. - */ currency_code?: string; - /** - * - The symbol representing the currency. - */ currency_symbol?: string; }; /** @returns {OrderingCurrency} */ declare function OrderingCurrency(): OrderingCurrency; type OrderingCurrency = { - /** - * - This specifies the currency code for all amounts. - */ currency_code?: string; - /** - * - The full name of the currency. - */ currency_name?: string; - /** - * - The symbol representing the currency. - */ currency_symbol?: string; - /** - * - The sub-unit of the currency - */ currency_sub_unit?: string; }; /** @returns {ConversionRate} */ declare function ConversionRate(): ConversionRate; type ConversionRate = { - /** - * - The base currency code, example 'INR' for Indian - * Rupee, against which all conversion rates are calculated. Follows the ISO - * 4217 standard.This includes the currency's name, its conversion rate - * relative to the base currency ('value'), the currency symbol, and any - * sub-unit of the currency. This setup not only facilitates currency - * conversion but also enriches the data with useful currency descriptors, - * enhancing financial operations and analyses. - */ base?: string; - /** - * - An object , where each key is a currency code - * and its value is an object containing detailed information about that - * currency. This includes the currency's name, its conversion rate relative - * to the base currency ('value'), the currency symbol, and any sub-unit of - * the currency. This setup not only facilitates currency conversion but also - * enriches the data with useful currency descriptors. - */ rates?: any; }; /** @returns {CurrencyInfo} */ @@ -11703,149 +7295,35 @@ type CurrencyInfo = { /** @returns {ShipmentItem} */ declare function ShipmentItem(): ShipmentItem; type ShipmentItem = { - /** - * - Denotes the date and time when an order was - * placed by the customer. This timestamp is crucial for tracking the order' - */ order_date?: string; - /** - * - The timestamp indicating when the - * order was created. - */ order_created_ts?: string; shipment_status?: ShipmentStatus; user?: UserDataInfo; - /** - * - The estimated Service Level - * Agreement (SLA) time for the shipment. - */ estimated_sla_time?: string; - /** - * - The timestamp for the estimated SLA, - * providing a specific time for expected delivery. - */ estimated_sla_ts?: string; - delivery_address?: Address; - billing_address?: Address; - affiliate_details?: AffiliateDetails; - /** - * - This flag denotes whether the shipment is - * active or not. - */ - is_active?: boolean; + delivery_address?: PlatformDeliveryAddress; channel?: ShipmentListingChannel; - /** - * - The ID of any previous shipment - * related to this order. - */ previous_shipment_id?: string; - /** - * - The forward_end_shipment_id - * represents the shipment ID of the original forward journey shipment. When a - * shipment is transitioned to a return journey, the original shipment ID from - * the forward journey is recorded in the forward_end_shipment_id field of the - * return journey shipment. Even if the return shipment is later split into - * multiple shipments, each of these shipments will retain the same - * forward_end_shipment_id value that was assigned during the initial return - * journey initiation. This ensures that all return shipments can be traced - * back to the original forward journey shipment. - */ - forward_end_shipment_id?: string; - /** - * - Indicates whether the shipment is - * currently locked for processing (true) or not (false). - */ lock_status?: boolean; - /** - * - The ID of the invoice associated with the shipment. - */ invoice_id?: string; - /** - * - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. This includes metadata such as logos, payment IDs, and - * merchant codes, as well as transaction-specific details like the payment - * mode, name, amount, and entities responsible for refunds and collections. - * The structure is designed to accommodate any number of payment methods, - * providing flexibility and comprehensive insights into each transaction's - * payment aspect. - */ payment_methods?: any; - /** - * - An array of payment information items - * related to the shipment, detailing transaction specifics. - */ payment_info?: any[]; - /** - * - Date time in UTC timezone as per ISO format. - */ status_created_at?: string; - /** - * - The timestamp indicating when the - * current status was logged, usually in ISO 8601 format. - */ status_created_ts?: string; - /** - * - A user-friendly name or identifier for - * the shipment, useful for display purposes. - */ display_name?: string; - /** - * - An array of bags included in the shipment. - */ bags?: BagUnit[]; fulfilling_store?: ShipmentItemFulFillingStore; - /** - * - Meta data of the item contains additional, - * potentially dynamic information about the item. - */ meta?: any; - /** - * - The mode of payment used for the shipment. - */ payment_mode?: string; - /** - * - Indicates whether the shipment can - * currently be processed (true) or not (false). - */ can_process?: boolean; prices?: Prices; - ordering_currency_prices?: OrderingCurrencyPrices; - /** - * - The unique identifier of the order for the shipment. - */ order_id: string; - /** - * - The channel used for ordering the shipment. - */ ordering_channnel?: string; - /** - * - The unique identifier for the shipment itself. - */ shipment_id?: string; - /** - * - Any special notes or instructions - * provided by the customer related to the shipment. - */ customer_note?: string; - /** - * - The total number of bags in the shipment. - */ total_bags: number; - /** - * - Timestamp of the shipment created. - */ shipment_created_at: string; - /** - * - The method of payment used to create the order. - */ mode_of_payment?: string; - /** - * - The timestamp indicating when the - * shipment was created. - */ shipment_created_ts?: string; currency?: Currency; currency_info?: CurrencyInfo; @@ -11855,187 +7333,52 @@ type ShipmentItem = { * else false. */ is_lapa_enabled?: boolean; - /** - * - An object storing detailed - * logistics-related information, including courier partner details and other - * relevant metadata. - */ - logistics_meta?: any; }; -/** @returns {ShipmentInternalPlatformViewResponseSchema} */ -declare function ShipmentInternalPlatformViewResponseSchema(): ShipmentInternalPlatformViewResponseSchema; -type ShipmentInternalPlatformViewResponseSchema = { - /** - * - The total number of shipments matching the - * query criteria. - */ +/** @returns {ShipmentInternalPlatformViewResponse} */ +declare function ShipmentInternalPlatformViewResponse(): ShipmentInternalPlatformViewResponse; +type ShipmentInternalPlatformViewResponse = { total_count?: number; - /** - * - A message providing additional context about - * the response. - */ message?: string; - /** - * - Indicates whether the API call was successful - * (true) or not (false). - */ success?: boolean; - /** - * - An array of shipment items returned as - * part of the response. - */ items?: ShipmentItem[]; - /** - * - The lane associated with the shipment. - */ lane?: string; page?: Page; }; /** @returns {TrackingList} */ declare function TrackingList(): TrackingList; type TrackingList = { - /** - * - A flag indicating whether the tracking - * event has already occurred. If true, it means the event is in the past; - * otherwise, it is either current or future. - */ is_passed?: boolean; - /** - * - A descriptive message or status update associated - * with the tracking event, providing context about the shipment's progress or - * condition. - */ text: string; - /** - * - A flag indicating whether this tracking - * event is the most recent update. If true, it reflects the latest status of - * the shipment. - */ is_current?: boolean; - /** - * - A timestamp representing when the tracking event - * occurred. This helps in understanding the timeline of the shipment's journey. - */ time?: string; - /** - * - A timestamp indicating when the tracking - * information was created or logged in the system. This may differ from the - * event time. - */ created_ts?: string; - /** - * - The specific status associated with the tracking - * event, such as "In Transit," "Delivered," or "Out for Delivery," providing - * clarity on the shipment's current phase. - */ status: string; }; /** @returns {InvoiceInfo} */ declare function InvoiceInfo(): InvoiceInfo; type InvoiceInfo = { - /** - * - A unique identifier for the invoice - * generated by the store or platform, used for internal tracking and reference. - */ store_invoice_id?: string; - /** - * - A URL linking to the digital version of - * the invoice, allowing users to view or download the invoice document online. - */ invoice_url?: string; - /** - * - Denotes the date and time when the - * invoice information was modified or updated, providing a record of the most - * recent changes. - */ updated_date?: string; - /** - * - An identifier for the invoice used - * by external systems or partners, facilitating cross-system tracking and - * reconciliation. - */ external_invoice_id?: string; - /** - * - A URL linking to the shipping label - * associated with the invoice, which may be used for shipment tracking and logistics. - */ label_url?: string; - /** - * - The identifier for any credit note - * related to the invoice, used in cases of refunds or adjustments to the - * original billing. - */ credit_note_id?: string; - /** - * - An object containing additional links relevant - * to the invoice, which may include related documents or resources. - */ links?: any; }; /** @returns {OrderDetailsData} */ declare function OrderDetailsData(): OrderDetailsData; type OrderDetailsData = { - /** - * - Represents the date and time when the order - * was placed by the customer. This timestamp is essential for tracking the - * initiation of the order process, scheduling deliveries, and analyzing order - * timelines. - */ order_date?: string; - /** - * - A timestamp indicating when the order was - * created in the system. - */ created_ts?: string; - /** - * - Contains a flexible and comprehensive set - * of key-value pairs detailing the tax calculations and classifications - * applicable to the order. - */ tax_details?: any; - /** - * - The charges associated with Cash on - * Delivery (COD) payments. - */ cod_charges?: string; - /** - * - The source from which the order originated. - */ source?: string; - /** - * - An unique identifier for the order. - */ fynd_order_id: string; - /** - * - Affiliate id associated with order. - */ affiliate_id?: string; - /** - * - Affiliate order id associated with order. - */ affiliate_order_id?: string; - /** - * - Represents the logo of the - * channel through which the order was placed, encapsulating branding elements - * and any relevant styling attributes. This object is designed to be - * flexible, allowing for the inclusion of various properties that define how - * the logo should be displayed across different platforms or documents - * related to the order. - */ ordering_channel_logo?: any; - /** - * - The total monetary value of the order - */ order_value?: string; - /** - * - The specific channel through which - * the order was placed - */ ordering_channel?: string; - /** - * - Meta data of the order contains additional, - * potentially dynamic information about the order. - */ meta?: any; }; /** @returns {UserDetailsData} */ @@ -12045,751 +7388,245 @@ type UserDetailsData = { pincode: string; address: string; area?: string; - /** - * - The type of the address (e.g., home, office). - */ address_type?: string; country: string; email?: string; - /** - * - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like {address} {address2} - * {area} {state} {country}, Address1 compiles all into a single formatted string. - */ address1?: string; landmark?: string; state: string; name: string; city: string; - /** - * - The code representing the state or region - * within the country, if applicable. - */ state_code?: string; - /** - * - The country ISO code, a two-character - * standard (ISO 3166-1 alpha-2) code, uniquely identifies the country. This - * field is used to specify countries in a standardized format, facilitating - * global data interoperability. Examples include 'US' for the United States - * and 'IN' for India. - */ country_iso_code?: string; - /** - * - This is the two-digit standard code - * representing the dialing prefix for the user's country, associated with the - * user's mobile number. - */ country_phone_code?: string; display_address?: string; }; /** @returns {PhoneDetails} */ declare function PhoneDetails(): PhoneDetails; type PhoneDetails = { - /** - * - Identifies the country of the user's - * phone number using the two-character standard ISO 3166-1 alpha-2 country - * codes. Examples include 'US' for the United States and 'IN' for India. - */ country_code?: number; - /** - * - The actual phone number of the user. - */ number?: string; }; /** @returns {ContactDetails} */ declare function ContactDetails(): ContactDetails; type ContactDetails = { - /** - * - An array of phone numbers associated - * with the contact. - */ phone?: PhoneDetails[]; - /** - * - An array of email addresses associated with - * the contact. - */ emails?: string[]; }; /** @returns {CompanyDetails} */ declare function CompanyDetails(): CompanyDetails; type CompanyDetails = { - /** - * - The name of the company. - */ company_name?: string; - /** - * - It contains the properties for the address of a company. - */ address?: any; - /** - * - The Corporate Identification Number (CIN) - * of the company. - */ company_cin?: string; - /** - * - A unique identifier for the company on the platform. - */ company_id?: number; - /** - * - The Goods and Services Tax (GST) number of - * the company. - */ company_gst?: string; company_contact?: ContactDetails; }; /** @returns {OrderingStoreDetails} */ declare function OrderingStoreDetails(): OrderingStoreDetails; type OrderingStoreDetails = { - /** - * - The contact phone number for the ordering store. - */ phone?: string; - /** - * - The postal code associated with the ordering - * store's location. - */ pincode?: string; - /** - * - Meta data of the ordering store contains - * additional, potentially dynamic information about the ordering store. - */ meta?: any; - /** - * - The complete address of the ordering store. - */ address?: string; - /** - * - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like {address} {address2} - * {area} {state} {country}, Address1 compiles all into a single formatted string. - */ address1?: string; - /** - * - Formatted address based on the - * title-template provided by the partner. - */ display_address?: string; - /** - * - A unique identifier for the ordering store. - */ id?: number; - /** - * - A specific code associated with the ordering store. - */ code?: string; - /** - * - The name of the ordering store. - */ store_name?: string; - /** - * - The country in which the ordering store is located. - */ country?: string; - /** - * - The name of the primary contact person - * at the ordering store. - */ contact_person?: string; - /** - * - The state or region where the ordering store is situated. - */ state?: string; - /** - * - The city in which the ordering store is located. - */ city?: string; }; /** @returns {DPDetailsData} */ declare function DPDetailsData(): DPDetailsData; type DPDetailsData = { - /** - * - The postal code associated with the delivery - * partner's location - */ pincode?: string; - /** - * - A URL that provides access to real-time - * tracking information for the shipment. - */ track_url?: string; - /** - * - The unique identifier for the e-way bill - * generated for the shipment. - */ eway_bill_id?: string; - /** - * - A unique identifier for the delivery partner details. - */ id?: number; - /** - * - The country in which the delivery partner operates. - */ country?: string; - /** - * - The Air Waybill number, a tracking number used - * for air freight shipments, allowing for the identification and tracking of - * the package in transit. - */ awb_no?: string; - /** - * - A tag associated with the Goods and Services - * Tax (GST) for the shipment. - */ gst_tag?: string; - /** - * - The name of the delivery partner or service - * provider responsible for transporting the shipment. - */ name?: string; }; /** @returns {BuyerDetails} */ declare function BuyerDetails(): BuyerDetails; type BuyerDetails = { - /** - * - The unique identifier for the buyer on - * the Ajio platform. - */ ajio_site_id?: string; - /** - * - The postal code for the buyer's shipping - * address, used for delivery location identification. - */ pincode: number; - /** - * - Provides the comprehensive address details of - * the buyer's shipping address. - */ address: string; - /** - * - The Goods and Services Tax Identification Number - * (GSTIN) of the buyer. - */ gstin: string; - /** - * - The full name of the buyer, essential for - * personalizing communication and delivery. - */ name: string; - /** - * - The name of the state where the buyer's shipping - * address is located, important for logistical purposes. - */ state: string; - /** - * - The name of the city where the buyer's shipping - * address is located, which helps in identifying delivery zones. - */ city: string; }; /** @returns {DebugInfo} */ declare function DebugInfo(): DebugInfo; type DebugInfo = { - /** - * - A unique identifier (UUID) - * associated with the Stormbreaker system, used for tracking and debugging - * purposes in the application. - */ stormbreaker_uuid?: string; }; /** @returns {EinvoiceInfo} */ declare function EinvoiceInfo(): EinvoiceInfo; type EinvoiceInfo = { - /** - * - Specifies the reverse einvoice transaction - * create on government portal. - */ credit_note?: any; - /** - * - It specifies the forward einvoice transaction - * created on government portal. - */ invoice?: any; }; /** @returns {Formatted} */ declare function Formatted(): Formatted; type Formatted = { - /** - * - Represents the maximum formatted value, providing - * a limit for the associated data, such as dimensions or weights. - */ max?: string; - /** - * - Represents the minimum formatted value, - * establishing a lower limit for the associated data, ensuring it meets - * certain criteria or standards. - */ min?: string; }; /** @returns {ShipmentTags} */ declare function ShipmentTags(): ShipmentTags; type ShipmentTags = { - /** - * - A URL-friendly string representing the tag, often - * used for routing or categorization. - */ slug?: string; - /** - * - Type of entity that the tag is associated - * to (bag, shipments). - */ entity_type?: string; - /** - * - A human-readable text representation of - * the tag, used for display purposes in user interfaces. - */ display_text?: string; }; /** @returns {LockData} */ declare function LockData(): LockData; type LockData = { - /** - * - Indicates whether the shipment is currently - * locked for processing (true) or not (false). - */ locked?: boolean; - /** - * - A flag indicating whether the shipment is part of - * a multi-modal transport operation. - */ mto?: boolean; - /** - * - An optional message providing additional - * context or information regarding the lock status. - */ lock_message?: string; }; /** @returns {ShipmentTimeStamp} */ declare function ShipmentTimeStamp(): ShipmentTimeStamp; -type ShipmentTimeStamp = { - /** - * - Represents the maximum timestamp value, indicating - * the latest time relevant to the shipment. - */ +type ShipmentTimeStamp = { max?: number; - /** - * - Represents the minimum timestamp value, indicating - * the earliest time relevant to the shipment. - */ min?: number; }; /** @returns {ShipmentMeta} */ declare function ShipmentMeta(): ShipmentMeta; type ShipmentMeta = { - /** - * - A URL for tracking the shipment. - */ tracking_url?: string; - /** - * - Provides a forecasted date and - * time by which the shipment is expected to be delivered to the recipient. - * This estimation is crucial for planning purposes, both for the sender in - * managing expectations and for the recipient in preparing for receipt. - */ estimated_delivery_date?: string; - /** - * - Indicates whether the shipment is - * available for pickup from the same store. - */ same_store_available: boolean; b2b_buyer_details?: BuyerDetails; formatted?: Formatted; debug_info?: DebugInfo; - /** - * - The Air Waybill (AWB) number - * associated with a return shipment. - */ return_awb_number?: string; - /** - * - Indicates whether the shipment is a - * self-shipped order. - */ is_self_ship?: boolean; - /** - * - Box type of the shipment in which the - * shipment will be delivered. - */ box_type?: string; einvoice_info?: EinvoiceInfo; - /** - * - The shipment ID - * associated with a return from an affiliate. - */ return_affiliate_shipment_id?: string; - /** - * - The unique identifier for the parent - * delivery partner. - */ parent_dp_id?: string; - /** - * - The total weight of the shipment. - */ shipment_weight?: number; dimension?: Dimensions; - /** - * - Delivery partner options that are available - * to deliver the shipment. - */ dp_options?: any; - /** - * - Indicates whether to assign the - * delivery partner from the store’s basket. - */ assign_dp_from_sb?: boolean; - /** - * - Specifies the deadline by which a particular - * action related to the affiliate shipment needs to be completed. - */ due_date?: string; - /** - * - Denotes the date and time - * when the store's invoice related to this shipment was updated. This - * timestamp is vital for tracking changes to billing details, adjustments in - * charges, or updates in the invoicing status. - */ store_invoice_updated_date?: string; - /** - * - The shipment ID for the - * forward journey of an affiliate shipment. - */ forward_affiliate_shipment_id?: string; - /** - * - The identifier for the store node - * involved in the return process. - */ return_store_node?: number; - /** - * - Textual representation of the - * fulfillment priority for the shipment. - */ fulfilment_priority_text?: string; - /** - * - Tags associated with the - * shipment for categorization and filtering. - */ shipment_tags?: ShipmentTags[]; - /** - * - External metadata related to the shipment. - */ external?: any; - /** - * - The Air Waybill number associated with the shipment. - */ awb_number?: string; lock_data?: LockData; - /** - * - Defines the specific journey a shipment - * will follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. - */ order_type?: string; - /** - * - Electronic Way Bill details i.e - * ewayBillNo, ewayBillDate that are utilized in the transportation of goods. - */ ewaybill_info?: any; - /** - * - The unique identifier for the delivery partner - * associated with the shipment. - */ dp_id?: string; - /** - * - The volumetric weight of - * the shipment, which may differ from its actual weight. - */ shipment_volumetric_weight?: number; - /** - * - The unique identifier for the - * marketplace store associated with the shipment. - */ marketplace_store_id?: string; - /** - * - An object containing the return details - * of the shipment. - */ return_details?: any; - /** - * - A sort key for the delivery partner, used - * for prioritization. - */ dp_sort_key?: string; - /** - * - The name of the packaging used for the shipment. - */ packaging_name?: string; timestamp?: ShipmentTimeStamp; - /** - * - Indicates whether - * automatic delivery partner assignment is triggered for this shipment. - */ auto_trigger_dp_assignment_acf?: boolean; - /** - * - The name of the delivery partner associated - * with the shipment. - */ dp_name?: string; - /** - * - The purchase order number associated with - * the shipment. - */ po_number?: string; - /** - * - The weight of the shipment, typically measured in - * grams or kilograms. - */ weight: number; - /** - * - Contains detailed information about - * the buyer in a business-to-consumer (B2C) transaction. This object is - * designed to capture a wide array of buyer-specific data such as contact - * information, shipping address, preferences, and any other relevant details - * that enhance the understanding of the buyer's profile and needs. - */ b2c_buyer_details?: any; - /** - * - The order ID for the - * forward journey of an affiliate shipment. - */ forward_affiliate_order_id?: string; - /** - * - The order ID for the return - * journey of an affiliate shipment. - */ return_affiliate_order_id?: string; - /** - * - This object is designed to accommodate a - * range of weight-related information. Denotes the weight of the bag, - * potentially including various measurements or related details. - */ bag_weight?: any; - /** - * - Specifies the recipient of any refunds - * related to the shipment. - */ refund_to?: string; }; /** @returns {PDFLinks} */ declare function PDFLinks(): PDFLinks; type PDFLinks = { - /** - * - The type of invoice issued, such as 'fynd' - * or other classifications. - */ invoice_type: string; - /** - * - URL or path to the A6 size label document. - */ label_a6?: string; - /** - * - URL or path to the main invoice document. - */ invoice?: string; - /** - * - URL or path to the POS label document. - */ label_pos?: string; - /** - * - URL or path to the A6 size invoice document. - */ invoice_a6?: string; - /** - * - URL or path to the B2B document related to the transaction. - */ b2b?: string; - /** - * - URL or path to the general label document. - */ label?: string; - /** - * - URL or path to the A4 size label document. - */ label_a4?: string; - /** - * - Specifies the type of label associated with a - * PDF document,indicating its purpose or content. The label_type helps in - * organizing and identifying PDF documents quickly, ensuring that users or - * systems can efficiently utilize the correct documents for required actions. - */ label_type: string; - /** - * - URL or path to the exported invoice document. - */ invoice_export?: string; - /** - * - URL or path to the credit note document. - */ credit_note_url?: string; - /** - * - URL or path to the A4 delivery - * challan document. - */ delivery_challan_a4?: string; - /** - * - URL or path to the exported label document. - */ label_export?: string; - /** - * - URL or path to the A4 size invoice document. - */ invoice_a4?: string; - /** - * - URL or path to the POS invoice document. - */ invoice_pos?: string; - /** - * - URL or path to the purchase order invoice document. - */ po_invoice?: string; }; +/** @returns {AffiliateConfig} */ +declare function AffiliateConfig(): AffiliateConfig; +type AffiliateConfig = { + app_company_id?: number; +}; /** @returns {AffiliateDetails} */ declare function AffiliateDetails(): AffiliateDetails; type AffiliateDetails = { shipment_meta: ShipmentMeta; affiliate_meta: AffiliateMeta; - /** - * - The shipment ID specific to this affiliate. - */ affiliate_shipment_id: string; - /** - * - An optional tag representing the - * company's affiliate association. - */ company_affiliate_tag?: string; - /** - * - The order ID associated with the - * affiliate shipment. - */ affiliate_order_id: string; pdf_links?: PDFLinks; config?: AffiliateConfig; - /** - * - The unique identifier for the affiliate. - */ affiliate_id?: string; - /** - * - The unique identifier for the - * affiliate's store. - */ affiliate_store_id: string; - /** - * - The unique identifier for the affiliate's bag. - */ affiliate_bag_id: string; - /** - * - The unique identifier for the affiliate. - */ - id?: string; + ad_id?: string; }; /** @returns {BagConfigs} */ declare function BagConfigs(): BagConfigs; type BagConfigs = { - /** - * - Indicates whether the bag is eligible for - * return by the customer. - */ is_returnable: boolean; - /** - * - A flag that determines if a forced - * return can be initiated for the bag. - */ allow_force_return: boolean; - /** - * - A flag indicating whether the bag is active or not. - */ is_active: boolean; - /** - * - A flag that determines if the bag can - * be cancelled. - */ can_be_cancelled: boolean; - /** - * - A flag that determines if shipment - * tracking is enabled for the bag. - */ enable_tracking: boolean; - /** - * - A flag that determines if - * customer return is allowed for the bag. - */ is_customer_return_allowed: boolean; }; /** @returns {OrderBagArticle} */ declare function OrderBagArticle(): OrderBagArticle; type OrderBagArticle = { - /** - * - Details of Identifiers associated with the article. - */ identifiers?: any; return_config?: ReturnConfig; - /** - * - A unique identifier for the article within the order bag. - */ uid?: string; - /** - * - The size of the article, which may be relevant - * for clothing. - */ size?: string; - /** - * - An array of tags associated with the article. - */ tags?: string[]; }; /** @returns {OrderBrandName} */ declare function OrderBrandName(): OrderBrandName; type OrderBrandName = { - /** - * - A URL or path to the logo image associated with the brand. - */ logo?: string; - /** - * - A unique identifier for the company associated - * with the brand. - */ company?: number; - /** - * - A unique identifier for the brand within the system. - */ id: number; - /** - * - Timestamp when the brand of the order was created. - */ created_on?: string; - /** - * - The name of the brand associated with the order. - */ brand_name?: string; - /** - * - Timestamp when the brand of the order was modified. - */ modified_on?: string; }; /** @returns {AffiliateBagsDetails} */ declare function AffiliateBagsDetails(): AffiliateBagsDetails; type AffiliateBagsDetails = { - /** - * - A unique identifier for the affiliate bag. - */ affiliate_bag_id?: string; - /** - * - A unique code provided to customers for - * redeeming special offers or discounts on their purchases. - */ coupon_code?: string; affiliate_meta?: AffiliateMeta; }; /** @returns {BagPaymentMethods} */ declare function BagPaymentMethods(): BagPaymentMethods; type BagPaymentMethods = { - /** - * - The payment mode used for the transaction. - */ mode?: string; - /** - * - The total amount associated with the payment method - */ amount?: number; }; /** @returns {DiscountRules} */ @@ -12807,728 +7644,180 @@ type ItemCriterias = { declare function BuyRules(): BuyRules; type BuyRules = { item_criteria?: ItemCriterias; - /** - * - Specifies the rules that must be met - * at the cart level for any purchasing rules or promotional discounts to be - * applied. Specifically, it includes criteria such as the total quantity of - * items in the cart. For instance, a rule might require that the cart - * contains at least one item for the promotion to apply. This setup allows - * for the dynamic application of discounts or special buying rules based on - * cart conditions. - */ cart_conditions?: any; }; -/** @returns {PriceMinMax} */ -declare function PriceMinMax(): PriceMinMax; -type PriceMinMax = { - /** - * - The minimum price value. Represents the lowest - * price in the price range. - */ - min?: number; - /** - * - The maximum price value. Represents the highest - * price in the price range. - */ - max?: number; -}; -/** @returns {ItemPriceDetails} */ -declare function ItemPriceDetails(): ItemPriceDetails; -type ItemPriceDetails = { - marked?: PriceMinMax; - effective?: PriceMinMax; - /** - * - The currency in which the prices details - * associated with the item is specified. - */ - currency?: string; -}; -/** @returns {FreeGiftItems} */ -declare function FreeGiftItems(): FreeGiftItems; -type FreeGiftItems = { - /** - * - A unique identifier for the item, typically - * used in URLs for SEO purposes. - */ - item_slug?: string; - /** - * - The name of the item. - */ - item_name?: string; - item_price_details?: ItemPriceDetails; - /** - * - The brand name of the item. - */ - item_brand_name?: string; - /** - * - A unique numerical identifier for the item. - */ - item_id?: number; - /** - * - A list of URLs pointing to images of the item. - */ - item_images_url?: string[]; -}; -/** @returns {AppliedFreeArticles} */ -declare function AppliedFreeArticles(): AppliedFreeArticles; -type AppliedFreeArticles = { - /** - * - A unique identifier for the article to - * which the free gift is applied. - */ - article_id?: string; - /** - * - Details of the free gift item - * associated with the article, including relevant attributes like name, - * description, and any other specifications. - */ - free_gift_item_details?: any; - /** - * - An identifier for the parent - * item with which the free gift is associated, typically used to link the - * free gift to the original purchased item. - */ - parent_item_identifier?: string; - /** - * - The quantity of the free gift items applied - * to the article. - */ - quantity?: number; -}; /** @returns {AppliedPromos} */ declare function AppliedPromos(): AppliedPromos; type AppliedPromos = { - /** - * - Specifies the type of discount or deal - * applied to the current promotion, defining how the promotion modifies the - * price or adds value to the purchase. Each type represents a different - * promotional strategy - percentage- Discount by a percentage of the original - * price. - amount- Discount by a specific amount off the original price. - - * fixed_price- Sets the price to a specific fixed amount. - bogo- Buy One Get - * One or at a discount. - contract_price- Special pricing based on a contract - * or agreement. - shipping_price- Discount or deal related to the shipping - * cost. - ladder_price- Price changes based on quantity purchased. - - * bundle_price_percentage- Discount on a bundle purchase by a percentage. - - * bundle_price_amount- Discount on a bundle purchase by a specific amount. - - * bundle_amount_percentage- A percentage of the purchase amount is applied as - * a discount when buying in a bundle. - custom- A custom promotion not - * covered by other types. - free_gift_items- Free gift items are included - * with the purchase. - free_non_sellable_items- Free items that are not for - * sale are included with the purchase. - */ promotion_type?: string; - /** - * - The name of the promotional campaign or offer. - */ promotion_name?: string; - /** - * - A list of rules that define - * the conditions under which discounts are applied. - */ discount_rules?: DiscountRules[]; - /** - * - The total monetary value of the discount or promotion. - */ amount?: number; - /** - * - The quantity of articles required to - * qualify for the promotion. - */ article_quantity?: number; - /** - * - A list of rules that outline the - * conditions for purchasing items under the promotion. - */ buy_rules?: BuyRules[]; - /** - * - A unique identifier for the promotion. - */ promo_id?: string; - /** - * - A flag that designates whether or not - * the promotion is an MRP (manufacturer's reduced price) promotion. - */ mrp_promotion?: boolean; - /** - * - A list of - * articles that are eligible for free under the promotion. - */ - applied_free_articles?: AppliedFreeArticles[]; }; /** @returns {CurrentStatus} */ declare function CurrentStatus(): CurrentStatus; type CurrentStatus = { - /** - * - A unique identifier for the store associated - * with the shipment. - */ store_id?: number; - /** - * - The Air Waybill (AWB) number for - * the delivery. - */ delivery_awb_number?: string; - /** - * - A flag indicating whether the current - * status is synchronized with Kafka or not. - */ kafka_sync?: boolean; - /** - * - A unique identifier for the - * delivery partner responsible for handling the shipment. - */ delivery_partner_id?: number; - /** - * - Serves as a key identifier to differentiate - * among the diverse types of states a shipment can undergo throughout its journey. - * - * - 'operational': Pertains to states that involve the physical handling and - * movement of the shipment, such as packing, in transit, and delivery. - * - 'financial': Relates to states associated with the payment, invoicing, and - * any monetary transactions or obligations tied to the shipment. - * - 'logistics': Encompasses states that deal with the broader logistical - * planning and coordination necessary for the shipment's journey, - * including route optimization and carrier selection. - */ state_type?: string; - /** - * - A unique identifier for the specific state of - * the shipment. - */ state_id?: number; - /** - * - A unique identifier for the current status entry - */ id: number; - /** - * - Denotes the date and time when the bag - * status was created. - */ created_at?: string; - /** - * - A timestamp indicating when the status was created - */ created_ts?: string; - /** - * - A unique identifier for the shipment. - */ shipment_id?: string; - /** - * - The date and time when the current status - * was last updated. - */ updated_at?: string; bag_state_mapper?: BagStateMapper; - /** - * - A unique identifier for the bag associated with - * the shipment. - */ bag_id?: number; - /** - * - A descriptive label representing the current - * status of the shipment. - */ status?: string; }; /** @returns {OrderBags} */ declare function OrderBags(): OrderBags; type OrderBags = { gst_details?: GSTDetailsData; - bag_status?: BagStatusHistory[]; - /** - * - An object containing details of - * parent promotional bags. - */ + bag_status?: BagStatusHistory[]; parent_promo_bags?: any; financial_breakup?: FinancialBreakup; bag_configs?: BagConfigs; seller_identifier?: string; - delivery_address?: Address; + delivery_address?: PlatformDeliveryAddress; article?: OrderBagArticle; brand?: OrderBrandName; group_id?: string; affiliate_bag_details?: AffiliateBagsDetails; item?: PlatformItem; - /** - * - An array detailing the - * various payment methods utilized for the transaction. Each item within this - * array represents a distinct method of payment. It encapsulates the details - * of various payment methods available for completing a transaction. It - * includes comprehensive information such as the payment mode, amount, - * transaction status, and identifiers for each payment method. - */ payment_methods?: BagPaymentMethods[]; payment_info?: BagPaymentMethods[]; - /** - * - The number of items contained in the bag. - */ quantity?: number; - /** - * - A unique identifier for the bag. - */ identifier?: string; - /** - * - Indicates whether the items in the bag are - * eligible for return by the customer. - */ can_return?: boolean; - /** - * - Indicates whether the bag is eligible for - * cancellation by the customer. - */ can_cancel?: boolean; - /** - * - A user-friendly name for the bag. - */ display_name?: string; - /** - * - A unique identifier for each line item in a bag. - */ line_number?: number; - /** - * - Meta data of the bags contains additional, - * potentially dynamic information about the bags. - */ meta?: any; applied_promos?: AppliedPromos[]; prices?: Prices; - charges?: PriceAdjustmentCharge[]; - ordering_currency_prices?: OrderingCurrencyPrices; current_status?: CurrentStatus; bag_id: number; - /** - * - Type of entity that the tag is associated - * to (bag, shipments). - */ entity_type?: string; - /** - * - A flag indicating whether the current bag - * is a parent entity or not. - */ is_parent?: boolean; }; /** @returns {FulfillingStore} */ declare function FulfillingStore(): FulfillingStore; type FulfillingStore = { - /** - * - The contact phone number for the fulfilling store. - */ phone: string; - /** - * - The postal code for the fulfilling store's location. - */ pincode: string; - /** - * - Meta data of the fulfilling store contains - * additional, potentially dynamic information about the fulfilling store. - */ meta: any; - /** - * - The complete address of the fulfilling store. - */ address: string; - /** - * - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like {address} {address2} - * {area} {state} {country}, Address1 compiles all into a single formatted string. - */ address1?: string; - /** - * - Display friendly version of the - * Fulfilment Store Address. - */ display_address?: string; - /** - * - The unique id or identifier of a fulfilment store. - */ id: number; - /** - * - The unique code of the fulfilment store. - */ code: string; - /** - * - The unique name of a fulfillment store. - */ store_name: string; - /** - * - The name of the country associated with a - * specific fulfilment store. - */ country: string; - /** - * - The channel through which - * fulfillment is managed. - */ fulfillment_channel: string; - /** - * - The name of the contact person associated - * with a fulfilling store. - */ contact_person: string; - /** - * - The state or region where the fulfilling store is located. - */ state: string; - /** - * - The city in which the fulfilling store is situated. - */ city: string; }; /** @returns {ShipmentPayments} */ declare function ShipmentPayments(): ShipmentPayments; type ShipmentPayments = { - /** - * - The payment mode used for the shipment. - */ mode?: string; - /** - * - A URL or path to the logo associated with the - * payment method. - */ logo?: string; - /** - * - The source or origin of the payment - */ source?: string; }; /** @returns {ShipmentStatusData} */ declare function ShipmentStatusData(): ShipmentStatusData; type ShipmentStatusData = { - /** - * - It contains the additional properties related to - * shipment status transition like Kafka_emission_status, user_name, etc. - * Additionally it is dynamic. - */ meta?: any; - /** - * - The list of bags that are in this shipment - * status transition. - */ bag_list?: string[]; - /** - * - Unique identifier for a shipment status. - */ id?: number; - /** - * - Denotes the date and time when the - * transition was created. - */ created_at?: string; - /** - * - A timestamp indicating when the status - * entry was created. - */ created_ts?: string; - /** - * - The unique identifier for the shipment. - */ shipment_id?: string; - /** - * - The current status of the shipment. - */ status?: string; - /** - * - A user-friendly name or description of - * the current shipment status. - */ display_name?: string; - /** - * - Reflects the most recent - * status of the shipment. - */ current_shipment_status?: string; - /** - * - Denotes the date and time when the - * transition of the status of the shipment was created. - */ status_created_at?: string; }; /** @returns {ShipmentLockDetails} */ declare function ShipmentLockDetails(): ShipmentLockDetails; type ShipmentLockDetails = { - /** - * - Represents the lock status of the shipment. - */ lock_status?: boolean; - /** - * - A user-friendly message that explains the - * reason for locking the shipment. - */ lock_message?: string; - /** - * - This field maps potential actions - * (e.g., downloading an invoice or label) to their corresponding shipment - * lock statuses, indicating which operations are allowed depending on the - * shipment's current lock status. When an action is set to 'lock', it means - * no transitions or updates to the shipment's status can be performed until - * the specified action is completed. For instance, if 'download_invoice' is - * in a 'lock' state, the shipment cannot undergo any status transitions until - * the invoice is either downloaded. Similarly, 'download_label' being in a - * 'lock' state prevents any shipment status transitions until a new label is - * downloaded. - */ action_to_status?: any; }; /** @returns {PlatformShipment} */ declare function PlatformShipment(): PlatformShipment; type PlatformShipment = { - /** - * - Indicates the date and time when the - * shipment was physically picked up from the sender or the origin point by - * the delivery service. This timestamp is crucial for tracking the - * commencement of the shipment's journey. - */ picked_date?: string; - /** - * - A list of tracking updates - * associated with the shipment. - */ tracking_list?: TrackingList[]; invoice?: InvoiceInfo; - /** - * - Represents the current status of the shipment. - */ shipment_status?: string; gst_details?: GSTDetailsData; order_status?: OrderStatusData; - /** - * - Represents a specific time window - * allocated for the delivery of an order or shipment. - */ delivery_slot?: any; order?: OrderDetailsData; user?: UserDataInfo; - /** - * - A flag indicating whether the - * delivery partner tracking feature is enabled for this shipment. - */ enable_dp_tracking?: boolean; - /** - * - A custom message or note associated - * with the shipment. - */ custom_message?: string; - /** - * - The estimated service level - * agreement (SLA) time for the shipment, indicating expected delivery timelines. - */ estimated_sla_time?: string; - /** - * - A timestamp indicating when the - * estimated SLA time is expected to be met. - */ estimated_sla_ts?: string; - /** - * - Indicates whether the dimensions - * of the shipment can be updated after creation. - */ can_update_dimension?: boolean; - /** - * - A list of URLs for images related to - * the shipment. - */ shipment_images?: string[]; - /** - * - A list of details about the delivery - * of an order. - */ - delivery_details?: any; - /** - * - Information regarding the billing for - * the shipment, including billing address and payment method. - */ - billing_details?: any; - /** - * - The ID of the parent forward - * journey shipment. - */ + delivery_details?: UserDetailsData; + billing_details?: UserDetailsData; forward_shipment_id?: string; - /** - * - The fulfilment priority, with - * lower numbers indicating a higher priority. - */ fulfilment_priority?: number; shipment_details?: ShipmentLockDetails; - /** - * - An array of custom metadata objects that - * may contain additional, dynamic information specific to the shipment. - */ custom_meta?: any[]; - /** - * - The total quantity of items included - * in the shipment. - */ shipment_quantity?: number; company_details?: CompanyDetails; ordering_store?: OrderingStoreDetails; - /** - * - The platform used to place the order. - */ order_platform?: string; - /** - * - Indicates whether the shipment is - * currently locked or not for modifications or updates. - */ lock_status?: boolean; - /** - * - The URL of the ordering platform's logo. - */ platform_logo?: string; - /** - * - Information about the user agent string, - * typically containing details about the browser or application used to place - * the order. - */ user_agent?: string; dp_details?: DPDetailsData; - /** - * - The unique identifier for the invoice - * associated with the shipment. - */ invoice_id?: string; - /** - * - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. The structure is designed to accommodate any number of - * payment methods,providing flexibility and comprehensive insights into each - * transaction's payment aspect. - */ payment_methods?: any; - /** - * - An array of objects containing detailed - * information about the payments made for the shipment. - */ payment_info?: any[]; - /** - * - Coupon data of the shipment which denotes if - * coupon is applied, coupon code, coupon amount, coupon title and coupon message. - */ coupon?: any; affiliate_details?: AffiliateDetails; - /** - * - Text that indicates the priority level - * of the shipment. - */ priority_text?: string; - /** - * - A history of status - * changes for bags associated with the shipment. - */ bag_status_history?: BagStatusHistory[]; - /** - * - A flag indicating whether - * delivery partner assignment features are enabled for the shipment. - */ is_dp_assign_enabled?: boolean; - /** - * - A list of bags included in the shipment - */ bags?: OrderBags[]; - /** - * - Indicates whether a delivery partner - * has been assigned to the shipment. - */ dp_assignment?: boolean; - /** - * - The total number of items contained within - * the shipment, - */ total_items?: number; fulfilling_store?: FulfillingStore; - /** - * - Meta data of the shipment contains additional, - * potentially dynamic information about the shipment. - */ meta?: any; - /** - * - PDF Links associated with the shipment. - */ pdf_links?: any; - /** - * - The mode of payment used for the shipment. - */ payment_mode?: string; - /** - * - Defines the type of packaging used for - * the product, encompassing materials, design, and form factors. - */ packaging_type?: string; - /** - * - It is a type being used to represent the - * journey of shipment through the performed status transition. Forward - * Journey: The forward journey encompasses all the stages of shipping, - * including order placement, packing, dispatch, in-transit updates, and - * delivery. Return Journey: Contrary to the forward journey, the return - * journey involves the process of sending items back from the customer to the - * original sender or a designated return facility. - */ journey_type?: string; prices?: Prices; - /** - * - An array of charges applied - * to the shipment. - */ - charges?: PriceAdjustmentCharge[]; - ordering_currency_prices?: OrderingCurrencyPrices; - /** - * - The business vertical or category to which - * the shipment belongs. - */ vertical?: string; - /** - * - A unique identifier for the shipment. - */ shipment_id: string; payments?: ShipmentPayments; - /** - * - The operational status of the shipment. - */ operational_status?: string; status?: ShipmentStatusData; - /** - * - The total number of bags in the shipment. - */ total_bags?: number; - /** - * - Denotes the date and time when the - * shipment was created. - */ shipment_created_at?: string; - /** - * - A timestamp representing when the - * shipment was created. - */ shipment_created_ts?: string; currency?: Currency; currency_info?: CurrencyInfo; - /** - * - The ID of the previous shipment - * in the sequence. - */ previous_shipment_id?: string; - /** - * - A numerical representation of the - * last update time for the shipment - */ shipment_update_time?: number; - rto_address?: Address; - /** - * - The identifier for any credit note - * issued for the shipment - */ + rto_address?: PlatformDeliveryAddress; credit_note_id?: string; - /** - * - A flag indicating whether the shipment - * is being self-shipped by the seller or vendor. - */ is_self_ship?: boolean; - /** - * - The specific mode of payment used for - * the transaction - */ mode_of_payment?: string; /** * - Flag to show NDR actions based on @@ -13536,42 +7825,12 @@ type PlatformShipment = { * else false. */ is_lapa_enabled?: boolean; - /** - * - The forward_end_shipment_id - * represents the shipment ID of the original forward journey shipment. When a - * shipment is transitioned to a return journey, the original shipment ID from - * the forward journey is recorded in the forward_end_shipment_id field of the - * return journey shipment. Even if the return shipment is later split into - * multiple shipments, each of these shipments will retain the same - * forward_end_shipment_id value that was assigned during the initial return - * journey initiation. This ensures that all return shipments can be traced - * back to the original forward journey shipment. - */ - forward_end_shipment_id?: string; - /** - * - An object storing detailed - * logistics-related information, including courier partner details and other - * relevant metadata. - */ - logistics_meta?: any; }; -/** @returns {ShipmentInfoResponseSchema} */ -declare function ShipmentInfoResponseSchema(): ShipmentInfoResponseSchema; -type ShipmentInfoResponseSchema = { - /** - * - A descriptive message providing additional - * information about the API response. - */ +/** @returns {ShipmentInfoResponse} */ +declare function ShipmentInfoResponse(): ShipmentInfoResponse; +type ShipmentInfoResponse = { message?: string; - /** - * - Indicates whether the API call was successful - * (true) or not (false). - */ success: boolean; - /** - * - A list of platform shipment - * objects, containing information related to a shipment. - */ shipments?: PlatformShipment[]; }; /** @returns {TaxDetails} */ @@ -13583,126 +7842,31 @@ type TaxDetails = { /** @returns {PaymentInfoData} */ declare function PaymentInfoData(): PaymentInfoData; type PaymentInfoData = { - /** - * - It contains the additional properties related to - * shipment status transition like Kafka_emission_status, user_name, etc. - * Additionally it is dynamic. - */ meta?: any; - /** - * - Information about the payment source. For eg, NB_ICICI. - */ mode?: string; - /** - * - The name of the payment method (e.g., "Credit - * Card", "PayPal"). - */ name?: string; - /** - * - Amount paid using this payment method. - */ amount?: number; - /** - * - Indicates whether this payment method has - * been collected or not. - */ collected?: boolean; - /** - * - Payment refund by for the customer and - * seller (e.g fynd, seller). - */ refund_by?: string; - /** - * - Payment collected by for the customer and - * seller (e.g fynd, seller). - */ collect_by?: string; - /** - * - The name of the payment method as it - * should be displayed to the user. - */ display_name?: string; - /** - * - A unique identifier associated - * with the payment transaction, such as TR669796C0012CF31BBD. This ID helps - * track and reference the specific transaction within the merchant's system. - */ merchant_transaction_id?: string; }; -/** @returns {CurrencySchema} */ -declare function CurrencySchema(): CurrencySchema; -type CurrencySchema = { - /** - * - The ISO 4217 currency code, such as - * 'INR' for Indian Rupee. This field represents the standardized three-letter - * code of a currency. - */ - currency_code?: string; - /** - * - The symbol representing the currency, - * such as '₹' for Indian Rupee. This is used for display purposes alongside - * currency amounts. - */ - currency_symbol?: string; -}; /** @returns {OrderData} */ declare function OrderData(): OrderData; type OrderData = { - /** - * - The specific channel through which - * the order was placed. - */ - ordering_channel?: string; - /** - * - Specifies the exact date and time when the - * order was placed by the customer, serving as a key timestamp for the - * initiation of the order processing cycle. - */ order_date: string; created_ts?: string; tax_details?: TaxDetails; - /** - * - Meta data of the order contains additional, - * potentially dynamic information about the order. - */ meta?: any; fynd_order_id: string; prices?: Prices; - charges?: PriceAdjustmentCharge[]; - ordering_currency_prices?: OrderingCurrencyPrices; - /** - * - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. This includes metadata such as logos, payment IDs, and - * merchant codes, as well as transaction-specific details like the payment - * mode, name, amount, and entities responsible for refunds and collections. - * The structure is designed to accommodate any number of payment methods, - * providing flexibility and comprehensive insights into each transaction's - * payment aspect. - */ payment_methods?: any; payment_info?: PaymentInfoData[]; - /** - * - External Order id - */ - affiliate_order_id?: string; - /** - * - Unique identifier for the sales channel. - */ - affiliate_id?: string; - /** - * - Specifies the origin from from which the order - * is created, including mobile applications, web interfaces, social media - * integrations, or external APIs. - */ - source?: string; - currency?: CurrencySchema; }; -/** @returns {OrderDetailsResponseSchema} */ -declare function OrderDetailsResponseSchema(): OrderDetailsResponseSchema; -type OrderDetailsResponseSchema = { +/** @returns {OrderDetailsResponse} */ +declare function OrderDetailsResponse(): OrderDetailsResponse; +type OrderDetailsResponse = { order?: OrderData; success: boolean; shipments?: PlatformShipment[]; @@ -13724,185 +7888,69 @@ type SuperLane = { text: string; total_items?: number; }; -/** @returns {LaneConfigResponseSchema} */ -declare function LaneConfigResponseSchema(): LaneConfigResponseSchema; -type LaneConfigResponseSchema = { +/** @returns {LaneConfigResponse} */ +declare function LaneConfigResponse(): LaneConfigResponse; +type LaneConfigResponse = { super_lanes?: SuperLane[]; }; /** @returns {PlatformBreakupValues} */ declare function PlatformBreakupValues(): PlatformBreakupValues; type PlatformBreakupValues = { - /** - * - Represents the value associated with a specific - * component of the price breakdown. - */ value?: string; - /** - * - Represents the name associated with a specific - * component of the price breakdown. - */ name?: string; - /** - * - A user-friendly display name for the - * component, intended for presentation in user interfaces. - */ display?: string; }; /** @returns {PlatformChannel} */ declare function PlatformChannel(): PlatformChannel; type PlatformChannel = { - /** - * - Represents the logo of the channel through which - * the order was placed. - */ logo?: string; - /** - * - Represents the name of the channel through which - * the order was placed - */ name?: string; }; /** @returns {PlatformOrderItems} */ declare function PlatformOrderItems(): PlatformOrderItems; type PlatformOrderItems = { - /** - * - The breakup_values - * array contains detailed breakdowns of different pricing components related - * to an order. Each item in the array is a reference to the - * PlatformBreakupValues schema, which provides specific details about each - * component such as loyalty points, coupon discounts, raw pricing data, and - * display information. - */ breakup_values?: PlatformBreakupValues[]; total_order_value?: number; - /** - * - It contains the additional properties related to - * order transition like Kafka_emission_status, user_name, etc. Additionally - * it is dynamic, potentially. - */ meta?: any; - /** - * - The Date and time when the order was created. - */ order_created_time?: string; - /** - * - The timestamp indicating when the - * order was created. - */ order_created_ts?: string; - /** - * - The payment mode used for the order. - */ payment_mode?: string; - /** - * - An array of shipment items - * returned as part of the order. - */ shipments?: PlatformShipment[]; - /** - * - A unique identifier associated with the order. - */ order_id?: string; channel?: PlatformChannel; user_info?: UserDataInfo; order_value?: number; currency?: Currency; currency_info?: CurrencyInfo; - prices?: Prices; - ordering_currency_prices?: OrderingCurrencyPrices; }; -/** @returns {OrderListingResponseSchema} */ -declare function OrderListingResponseSchema(): OrderListingResponseSchema; -type OrderListingResponseSchema = { - /** - * - The total number of orders matching the - * query criteria. - */ +/** @returns {OrderListingResponse} */ +declare function OrderListingResponse(): OrderListingResponse; +type OrderListingResponse = { total_count?: number; - /** - * - A message providing additional context about - * the response. - */ message?: string; - /** - * - Indicates whether the API call was successful - * (true) or not (false). - */ success?: boolean; - /** - * - An array of shipment items - * returned as part of the response. - */ items?: PlatformOrderItems[]; - /** - * - The lane associated with the order. - */ lane?: string; page?: Page; }; /** @returns {PlatformTrack} */ declare function PlatformTrack(): PlatformTrack; type PlatformTrack = { - /** - * - The current geographic - * location of the courier partner. - */ last_location_recieved_at?: string; - /** - * - A field to store additional metadata related to - * the courier partner's operations or the shipment. - */ meta?: any; - /** - * - The current status of the shipment as - * updated by the courier partner. - */ raw_status?: string; - /** - * - Human readable timestamp when the status - * was last updated by the courier partner. - */ updated_at?: string; - /** - * - The timestamp when the status was last - * updated by the courier partner. - */ updated_time?: string; - /** - * - The Air Waybill (AWB) number associated with the - * shipment, used for tracking the parcel in transit. - */ awb?: string; - /** - * - Indicates the type of journey the shipment. - */ shipment_type?: string; - /** - * - The operational status of the shipment. - */ status?: string; - /** - * - Any additional remarks or comments from the - * courier partner regarding the shipment. - */ reason?: string; - /** - * - The name of the courier partner - * responsible for the shipment. - */ account_name?: string; }; /** @returns {PlatformShipmentTrack} */ declare function PlatformShipmentTrack(): PlatformShipmentTrack; type PlatformShipmentTrack = { - /** - * - Meta data of the shipment contains additional, - * potentially dynamic information about the shipment. - */ meta?: any; - /** - * - A list of tracking details at various status. - */ results?: PlatformTrack[]; }; /** @returns {AdvanceFilterInfo} */ @@ -13913,24 +7961,12 @@ type AdvanceFilterInfo = { unfulfilled?: FiltersInfo[]; filters?: FiltersInfo[]; processed?: FiltersInfo[]; - /** - * - Specifies the set of filters currently - * applied , search result, or view, detailing the criteria used to narrow - * down or sort the information presented. This object is designed to be - * highly flexible, allowing for the inclusion of various filter types such as - * date ranges, categories, status flags, or custom search terms. - */ applied_filters?: any; - /** - * - An object representing a page with pagination details. - */ page?: any; }; -/** @returns {FiltersResponseSchema} */ -declare function FiltersResponseSchema(): FiltersResponseSchema; -type FiltersResponseSchema = { - advance?: AdvanceFilterInfo; - global_1?: FiltersInfo; +/** @returns {FiltersResponse} */ +declare function FiltersResponse(): FiltersResponse; +type FiltersResponse = { advance_filter?: AdvanceFilterInfo; global_filter?: FiltersInfo[]; }; @@ -13939,9 +7975,9 @@ declare function URL(): URL; type URL = { url?: string; }; -/** @returns {FileResponseSchema} */ -declare function FileResponseSchema(): FileResponseSchema; -type FileResponseSchema = { +/** @returns {FileResponse} */ +declare function FileResponse(): FileResponse; +type FileResponse = { /** * - Name of the file */ @@ -13954,25 +7990,26 @@ type BulkActionTemplate = { value?: string; text?: string; }; -/** @returns {BulkActionTemplateResponseSchema} */ -declare function BulkActionTemplateResponseSchema(): BulkActionTemplateResponseSchema; -type BulkActionTemplateResponseSchema = { +/** @returns {BulkActionTemplateResponse} */ +declare function BulkActionTemplateResponse(): BulkActionTemplateResponse; +type BulkActionTemplateResponse = { /** * - Allowed bulk action template slugs */ template_x_slug?: BulkActionTemplate[]; }; -/** @returns {PlatformShipmentReasonsResponseSchema} */ -declare function PlatformShipmentReasonsResponseSchema(): PlatformShipmentReasonsResponseSchema; -type PlatformShipmentReasonsResponseSchema = { - /** - * - An array of reasons associated with the platform. - */ +/** @returns {Reason} */ +declare function Reason(): Reason; +type Reason = { + qc_type?: string[]; + id?: number; + question_set?: QuestionSet[]; + display_name?: string; +}; +/** @returns {PlatformShipmentReasonsResponse} */ +declare function PlatformShipmentReasonsResponse(): PlatformShipmentReasonsResponse; +type PlatformShipmentReasonsResponse = { reasons?: Reason[]; - /** - * - Indicates whether the API call was successful - * (true) or not (false). - */ success?: boolean; }; /** @returns {ShipmentResponseReasons} */ @@ -13981,9 +8018,9 @@ type ShipmentResponseReasons = { reason_id?: number; reason?: string; }; -/** @returns {ShipmentReasonsResponseSchema} */ -declare function ShipmentReasonsResponseSchema(): ShipmentReasonsResponseSchema; -type ShipmentReasonsResponseSchema = { +/** @returns {ShipmentReasonsResponse} */ +declare function ShipmentReasonsResponse(): ShipmentReasonsResponse; +type ShipmentReasonsResponse = { reasons: ShipmentResponseReasons[]; message: string; success: boolean; @@ -13992,57 +8029,20 @@ type ShipmentReasonsResponseSchema = { declare function StoreAddress(): StoreAddress; type StoreAddress = { phone: string; - /** - * - Denotes the date and time when the transition - * of the store address was created. - */ created_at: string; contact_person: string; pincode: number; - /** - * - The type of the address (e.g., home, office). - */ address_type: string; - /** - * - The primary address dynamically forms based on - * a template. If the template includes a single key, Address1 contains that - * data. For templates with multiple keys like {address} {address2} {area} - * {state} {country}, Address1 compiles all into a single formatted string. - */ address1: string; display_address?: string; version?: string; - /** - * - Category or classification of the - * address. The address_category field that includes "store", "delivery", and - * "billing" serves to classify addresses based on various business processes - * - * - 'store': Identifies addresses associated with physical retail locations or - * warehouses which is essential for inventory management, order - * fulfillment, and facilitating in-store pickups or returns. - * - 'delivery': Identifies addresses where orders are shipped to customers which - * ensures successful delivery, enhancing customer satisfaction, and - * optimizing logistics operations. - * - 'billing': Identifies addresses used for billing and financial transactions - * which are essential for payment processing, invoice generation, and - * maintaining financial accuracy. - */ address_category: string; city: string; longitude: number; address2?: string; area?: string; email?: string; - /** - * - Denotes the date and time when any - * modifications were made to the store. - */ updated_at: string; - /** - * - Uniquely identifies the country of the - * store addressds_type using the two-character standard ISO 3166-1 alpha-2 - * country codes. Examples include 'US' for the United States and 'IN' for India. - */ country_code: string; country: string; landmark?: string; @@ -14079,10 +8079,7 @@ type StoreGstCredentials = { declare function Document(): Document; type Document = { value: string; - /** - * - Type of the document. - */ - type: string; + ds_type: string; verified: boolean; legal_name: string; url?: string; @@ -14095,29 +8092,14 @@ type StoreDocuments = { /** @returns {StoreMeta} */ declare function StoreMeta(): StoreMeta; type StoreMeta = { - /** - * - Provides a flexible - * structure for storing extra contact information related to the store. - */ additional_contact_details?: any; timing?: any[]; notification_emails?: string[]; gst_number?: string; - /** - * - Contains essential information - * and settings related to the e-Way Bill portal, which is used for generating - * and managing e-waybills for the transportation of goods under specific tax - * regulations. - */ ewaybill_portal_details?: any; einvoice_portal_details?: EInvoicePortalDetails; gst_credentials: StoreGstCredentials; stage: string; - /** - * - Product return configuration - * details for the location. It can include details like on_same_store - * denoting whether return can be initiated at the same store. - */ product_return_config?: any; documents?: StoreDocuments; display_name: string; @@ -14129,9 +8111,6 @@ type Store = { is_active?: boolean; company_id: number; alohomora_user_id?: number; - /** - * - Denotes the date and time when the store was created. - */ created_at: string; contact_person: string; store_email: string; @@ -14139,12 +8118,6 @@ type Store = { pincode: string; mall_area?: string; vat_no?: string; - /** - * - The primary address dynamically forms based on - * a template. If the template includes a single key, Address1 contains that - * data. For templates with multiple keys like {address} {address2} {area} - * {state} {country}, Address1 compiles all into a single formatted string. - */ address1: string; display_address?: string; store_active_from?: string; @@ -14154,16 +8127,9 @@ type Store = { brand_store_tags?: string[]; order_integration_id?: string; parent_store_id?: number; - /** - * - Type of location of the fulfilling store. - */ location_type: string; code?: string; fulfillment_channel: string; - /** - * - Denotes the date and time when any - * modifications were made to the store. - */ updated_at?: string; store_address_json?: StoreAddress; meta: StoreMeta; @@ -14184,24 +8150,14 @@ type Brand = { logo?: string; invoice_prefix?: string; credit_note_allowed?: boolean; - /** - * - Denotes the start date and time when the - * brand was created. - */ start_date?: string; company?: string; is_virtual_invoice?: boolean; script_last_ran?: string; pickup_location?: string; - /** - * - Timestamp when the brand was created. - */ created_on?: string; brand_name: string; brand_id?: number; - /** - * - Timestamp when the brand of the order was modified. - */ modified_on?: string; id?: number; }; @@ -14215,56 +8171,22 @@ type Item = { brand_id: number; slug_key: string; webstore_product_url?: string; - /** - * - Represents the product's classification at - * the third level in the e-commerce platform's category hierarchy, using an - * integer identifier. This finer level of categorization allows for precise - * product organization and easier navigation for customers seeking specific items. - */ l3_category?: number; - /** - * - This key specifies the name of the - * third-level category under which the product is listed, offering a more - * detailed classification within the e-commerce platform's hierarchy. - */ l3_category_name?: string; - /** - * - Denotes the date and time when the - * item was updated. - */ last_updated_at?: string; name: string; - /** - * - The l2_category field represents the - * second level of categorization for items within an e-commerce platform's - * hierarchy. This allows for classification beyond the top-tier (level 1) - * categories, helping customers to narrow down their search and find products - */ l2_category?: string[]; brand: string; image: string[]; code?: string; - /** - * - The unique identifier of the defines - * the top-tier categories to which a product belongs within the e-commerce - * platform's hierarchy. - */ l1_category_id?: number; item_id: number; - /** - * - This array defines the top-tier - * categories to which a product belongs within the e-commerce platform's hierarchy. - */ l1_category?: string[]; gender?: string; can_cancel?: boolean; can_return?: boolean; size: string; branch_url?: string; - /** - * - Meta data of the item contains additional, - * potentially dynamic information about the item. - */ meta?: any; color?: string; department_id?: number; @@ -14273,53 +8195,20 @@ type Item = { /** @returns {ArticleStatusDetails} */ declare function ArticleStatusDetails(): ArticleStatusDetails; type ArticleStatusDetails = { - /** - * - Captures comprehensive status information for - * an article. Each status type, such as 'cancelled_fynd', contains objects - * keyed by unique identifiers (UIDs). These objects detail the specific - * status, including associated bag IDs with their quantities, total quantity - * affected, and reasons for the status if applicable. This structure allows - * for tracking multiple status conditions and their details for a single article. - */ status?: any; }; /** @returns {Company} */ declare function Company(): Company; type Company = { pan_no?: string; - /** - * - Timestamp when the company was created. - */ created_on?: string; id?: number; company_name?: string; gst_number?: string; - /** - * - The type of company, which can be one of - * the following: - `distributor`: Distributor - `franchise`: Franchise - - * `mbo`: MBO (Managed Business Operations) - `manufacturer-owner`: Owner/Manufacturer - */ company_type?: string; - /** - * - Timestamp when the company was modified. - */ modified_on?: string; - /** - * - Meta data of the company contains additional, - * potentially dynamic information about the company. - */ meta?: any; - /** - * - The type of business structure, which - * can be one of the following: - `Private`: Private Limited Company - - * `LLP/Partnership`: Limited Liability Partnership or Partnership - - * `HUF/Proprietorship`: Hindu Undivided Family or Proprietorship. - */ business_type?: string; - /** - * - Specifies the official beginning - * date and time of an agreement or contract associated with the company. - */ agreement_start_date?: string; }; /** @returns {ShipmentGstDetails} */ @@ -14329,14 +8218,6 @@ type ShipmentGstDetails = { gst_fee?: number; brand_calculated_amount?: number; tax_collected_at_source?: number; - /** - * - A GST Number (Goods and Services Tax - * Identification Number, often abbreviated as GSTIN) is a unique identifier - * assigned to a business or individual registered under the Goods and - * Services Tax (GST) system in countries like India. The GST number is - * essential for businesses to comply with tax regulations and for the - * government to track tax payments and returns. - */ gstin_code?: string; }; /** @returns {DeliverySlotDetails} */ @@ -14351,15 +8232,19 @@ type DeliverySlotDetails = { /** @returns {InvoiceDetails} */ declare function InvoiceDetails(): InvoiceDetails; type InvoiceDetails = { - /** - * - Specifies the date and time when the - * invoice was last updated. - */ updated_date?: string; store_invoice_id?: string; invoice_url?: string; label_url?: string; }; +/** @returns {ShipmentDetails} */ +declare function ShipmentDetails(): ShipmentDetails; +type ShipmentDetails = { + dp_id?: string; + dp_options?: any; + lock_status?: boolean; + action_to_status?: any; +}; /** @returns {UserDetails} */ declare function UserDetails(): UserDetails; type UserDetails = { @@ -14372,10 +8257,6 @@ type UserDetails = { is_anonymous_user?: boolean; gender?: string; mongo_user_id?: string; - /** - * - Meta data of the user details contains - * additional, potentially dynamic information about the user details. - */ meta?: any; }; /** @returns {WeightData} */ @@ -14387,281 +8268,80 @@ type WeightData = { /** @returns {BagDetails} */ declare function BagDetails(): BagDetails; type BagDetails = { - /** - * - The timestamp indicating when the - * bag's information was last updated - */ bag_update_time?: number; - /** - * - A unique identifier for the bag record within the system. - */ id?: string; - /** - * - A unique identifier specifically for the bag - * itself, used for tracking purposes. - */ bag_id?: number; affiliate_bag_details?: AffiliateBagDetails; affiliate_details?: AffiliateDetails; - /** - * - A list of promotional discounts that - * were applied to the bag's contents. - */ applied_promos?: any[]; article?: Article; article_details?: ArticleStatusDetails; - /** - * - An array of current status - * records associated with the bag, reflecting its lifecycle stages (e.g., - * pending, placed, delivered). - */ bag_status?: BagStatusHistory[]; - /** - * - An array of current - * status records associated with the bag, reflecting its lifecycle stages - * (e.g., pending, placed, delivered). - */ bag_status_history?: BagStatusHistory[]; brand?: Brand; company?: Company; current_operational_status?: BagStatusHistory; current_status?: BagStatusHistory; dates?: Dates; - delivery_address?: Address; + delivery_address?: PlatformDeliveryAddress; delivery_slot?: DeliverySlotDetails; - /** - * - Name of the bag intended for user display. - */ display_name?: string; - /** - * - Additional information about the delivery - * partner (DP) handling the bag. - */ dp_details?: any; einvoice_info?: any; - /** - * - Type of entity that the tag is associated - * to (bag, shipments). - */ entity_type?: string; - /** - * - Details of the fallback user associated - * with the bag . - */ fallback_user?: any; - /** - * - A breakdown of the - * financial aspects associated with the bag, such as product prices, taxes, - * discounts, and total cost. - */ financial_breakup?: FinancialBreakup[]; fulfilling_store?: Store; - /** - * - Fynd store employee details. - */ fyndstore_emp?: any; gst_details?: GSTDetailsData; invoice?: InvoiceDetails; item?: Item; - /** - * - It is a type being used to represent the - * journey of shipment through the performed status transition. Forward - * Journey: The forward journey encompasses all the stages of shipping, - * including order placement, packing, dispatch, in-transit updates, and - * delivery. Return Journey: Contrary to the forward journey, the return - * journey involves the process of sending items back from the customer to the - * original sender or a designated return facility. - */ journey_type?: string; - /** - * - A unique identifying number associated - * with the bag. It is generated sequentially as bags are created. - */ line_number?: number; - /** - * - Indicates whether the bag is locked from - * further changes (true/false). A locked bag cannot undergo modifications - * until unlocked. - */ lock_status?: boolean; - /** - * - The identifier-assigned bags receive after - * they are manifest (thereby creating a shipment in conjunction with the - * allocated manifest). - */ manifest_id?: string; - /** - * - Meta data of the bag details contains additional, - * potentially dynamic information about the bag details. - */ meta?: any; - /** - * - This field reflects the payment method - * used in the transaction for a particular bag. - */ mode_of_payment?: string; - /** - * - The total number of bags in this bag's order. - */ no_of_bags_order?: number; - /** - * - The particular state a bag occupies - * in the shipment life-cycle. - */ operational_status?: string; order?: OrderDetails; - /** - * - A unique identifier used for - * integrating this order with external systems or services. - */ order_integration_id?: string; - /** - * - Defines the specific journey a shipment - * will follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. For example: - * - * - "HomeDelivery": The order goes through all the steps needed for delivery, - * from being packed to arriving at the customer’s address. - * - "PickAtStore": The order is prepared for pickup at the store, skipping - * shipping steps to make it ready faster for the customer to collect in person. - * - "Digital": This order type likely refers to orders that involve digital goods - * or services, such as software, digital subscriptions, e-books, online - * courses, or any other item that can be delivered electronically. - */ order_type?: string; - /** - * - An estimated value of the order at the - * time of placement or sale. - */ order_value?: number; ordering_store?: Store; - /** - * - An object containing details of - * parent promotional bags. - */ parent_promo_bags?: any; - /** - * - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. The structure is designed to accommodate any number of - * payment methods,providing flexibility and comprehensive insights into each - * transaction's payment aspect. - */ payment_methods?: any; - /** - * - The Specific type of payment. - */ payment_type?: string; - /** - * - Defines allowed payment details for the item. - */ payments?: any; prices?: Prices; - /** - * - Defines any additional - * charges for the product. - */ - charges?: PriceAdjustmentCharge[]; - /** - * - Indicates whether quality check is - * required for the product. - */ qc_required?: boolean; - /** - * - The quantity of the product. - */ quantity?: number; - /** - * - Information about why the Bag's - * item/products are being cancelled or returned or exchanged. This keys - * within this object represent unique - */ reasons?: any[]; - /** - * - Indicates whether voucher/wallet - * points can be reapplied to the product. - */ restore_coupon?: boolean; - /** - * - Provides a flexible structure for - * storing information about promotion details or offers that are eligible for - * restoration. This can include details such as promo codes, descriptions of - * the offers, eligibility criteria, restoration conditions, and any other - * relevant data that supports the reactivation of previously paused or - * expired promotions. - */ restore_promos?: any; - rto_address?: Address; - /** - * - A unique identifier assigned by the - * seller to represent a specific transaction in their order processing system. - */ + rto_address?: PlatformDeliveryAddress; seller_identifier?: string; shipment?: Shipment; shipment_details?: ShipmentDetails; - /** - * - Unique identifier of the shipment. - */ shipment_id?: string; shipment_gst?: ShipmentGstDetails; shipment_status?: ShipmentStatusData; - /** - * - Status history - * of the shipment item in the order. - */ shipment_status_history?: ShipmentStatusData[]; status?: BagReturnableCancelableStatus; - /** - * - A list of tags or labels associated with the - * bag, which might be used for filtering, sorting, or categorizing purposes. - */ tags?: string[]; - /** - * - The total number of shipped bags. - */ total_shipment_bags?: number; - /** - * - The total number of shipments - * in the order. - */ total_shipments_in_order?: number; - /** - * - Specifies the type of the transaction - * being processed. This classification helps in distinguishing between - * different operational processes and allows for tailored handling of each - * transaction type. For example, a 'shipment' transaction type refers to - * operations related to the shipping of goods. - */ transaction_type?: string; - /** - * - The type of the bag. - */ type?: string; - /** - * - The date and time when the bag was last updated. - */ updated_at?: string; user?: UserDetails; weight?: WeightData; - /** - * - Specifies the list of integers - * that specify the bag number - */ original_bag_list?: number[]; - /** - * - The unique identifier for the bag. - */ identifier?: string; }; -/** @returns {BagDetailsPlatformResponseSchema} */ -declare function BagDetailsPlatformResponseSchema(): BagDetailsPlatformResponseSchema; -type BagDetailsPlatformResponseSchema = { - /** - * - Response status_code. - */ +/** @returns {BagDetailsPlatformResponse} */ +declare function BagDetailsPlatformResponse(): BagDetailsPlatformResponse; +type BagDetailsPlatformResponse = { status_code?: number; data?: BagDetails; }; @@ -14670,9 +8350,6 @@ declare function BagsPage(): BagsPage; type BagsPage = { item_total: number; has_next: boolean; - /** - * - The type of the page. - */ page_type: string; current: number; size: number; @@ -14683,18 +8360,15 @@ type BagData = { items?: BagDetails[]; page?: BagsPage; }; -/** @returns {GetBagsPlatformResponseSchema} */ -declare function GetBagsPlatformResponseSchema(): GetBagsPlatformResponseSchema; -type GetBagsPlatformResponseSchema = { - /** - * - Response status_code. - */ +/** @returns {GetBagsPlatformResponse} */ +declare function GetBagsPlatformResponse(): GetBagsPlatformResponse; +type GetBagsPlatformResponse = { status_code?: number; data?: BagData; }; -/** @returns {GeneratePosOrderReceiptResponseSchema} */ -declare function GeneratePosOrderReceiptResponseSchema(): GeneratePosOrderReceiptResponseSchema; -type GeneratePosOrderReceiptResponseSchema = { +/** @returns {GeneratePosOrderReceiptResponse} */ +declare function GeneratePosOrderReceiptResponse(): GeneratePosOrderReceiptResponse; +type GeneratePosOrderReceiptResponse = { customer_cn_receipt?: string; success?: boolean; order_id?: string; @@ -14711,33 +8385,26 @@ type Templates = { text?: string; value?: string; }; -/** @returns {AllowedTemplatesResponseSchema} */ -declare function AllowedTemplatesResponseSchema(): AllowedTemplatesResponseSchema; -type AllowedTemplatesResponseSchema = { +/** @returns {AllowedTemplatesResponse} */ +declare function AllowedTemplatesResponse(): AllowedTemplatesResponse; +type AllowedTemplatesResponse = { template_x_slug?: Templates[]; }; -/** @returns {TemplateDownloadResponseSchema} */ -declare function TemplateDownloadResponseSchema(): TemplateDownloadResponseSchema; -type TemplateDownloadResponseSchema = { +/** @returns {TemplateDownloadResponse} */ +declare function TemplateDownloadResponse(): TemplateDownloadResponse; +type TemplateDownloadResponse = { file_name?: string; url?: string; }; /** @returns {Error} */ declare function Error(): Error; type Error = { - /** - * - A message describing the error that occurred. - */ message?: string; - /** - * - Indicates whether the API call was successful - * (true) or not (false). - */ success?: boolean; }; -/** @returns {BulkFailedResponseSchema} */ -declare function BulkFailedResponseSchema(): BulkFailedResponseSchema; -type BulkFailedResponseSchema = { +/** @returns {BulkFailedResponse} */ +declare function BulkFailedResponse(): BulkFailedResponse; +type BulkFailedResponse = { status?: boolean; error?: string; }; diff --git a/sdk/platform/Order/OrderPlatformModel.js b/sdk/platform/Order/OrderPlatformModel.js index 97ab8a3fd..909c892b1 100644 --- a/sdk/platform/Order/OrderPlatformModel.js +++ b/sdk/platform/Order/OrderPlatformModel.js @@ -9,37 +9,31 @@ const Joi = require("joi"); */ /** - * @typedef InvalidateShipmentCacheNestedResponseSchema + * @typedef InvalidateShipmentCacheNestedResponse * @property {string} [shipment_id] - * @property {number} [status] - The HTTP status code corresponding to the - * overall status of the shipment response. + * @property {number} [status] * @property {string} [message] * @property {string} [error] */ /** - * @typedef InvalidateShipmentCacheResponseSchema - * @property {InvalidateShipmentCacheNestedResponseSchema[]} [response] + * @typedef InvalidateShipmentCacheResponse + * @property {InvalidateShipmentCacheNestedResponse[]} [response] */ /** - * @typedef UpdatePackingErrorResponseSchema + * @typedef UpdatePackingErrorResponse * @property {number} [status] - Represents the HTTP status code of the API response. * @property {string} [error] - Descriptive error message that occurred. */ /** - * @typedef ErrorResponseSchema + * @typedef ErrorResponse * @property {number} [status] - Represents the HTTP status code of the API response. * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} message - A message describing the error that occurred. - * @property {string} [error_trace] - This field is intended to store the error - * trace of the error that occurred.For example, "Exception Trace" represents - * a placeholder for the actual stack trace data that would be captured when - * an exception occurs."Internal Server Error" indicates a generic error - * message suggesting that the server encountered an unexpected condition that - * prevented it from fulfilling the request. + * @property {string} [error_trace] - Error trace of the error that occurred. * @property {string} [error] */ @@ -65,7 +59,7 @@ const Joi = require("joi"); */ /** - * @typedef StoreReassignResponseSchema + * @typedef StoreReassignResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [message] - A descriptive message providing additional @@ -92,13 +86,7 @@ const Joi = require("joi"); * @typedef UpdateShipmentLockPayload * @property {string} entity_type - Specifies the type of entity being locked or unlocked. * @property {string} action - Indicates the action to be performed on the entity. - * @property {string} action_type - Defines the current lock state or lock type - * of a shipment, dictating the types of transitions or actions that can be - * performed next.The action_type can be one of the following - complete- - * Complete lock specifies that no action can be performed for that shipment. - * - operational- The shipment is in an operational phase, during which only - * financial-related actions are permissible. - financial- The shipment is in - * a financial phase, allowing for operational actions to be taken. + * @property {string} action_type - Specifies the type of action being taken. * @property {LockManagerEntities[]} entities - List of entities to be locked or unlocked * @property {boolean} [resume_tasks_after_unlock] - Indicates whether tasks * should resume automatically after unlocking, such as DP assignment task and @@ -126,7 +114,7 @@ const Joi = require("joi"); */ /** - * @typedef CheckResponseSchema + * @typedef CheckResponse * @property {string} [shipment_id] - Shipment ID * @property {string} [status] - Status * @property {boolean} [is_bag_locked] - Is Bag Locked @@ -140,18 +128,18 @@ const Joi = require("joi"); */ /** - * @typedef UpdateShipmentLockResponseSchema + * @typedef UpdateShipmentLockResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [message] - A descriptive message providing additional * information about the API response, such as success confirmation or error details. - * @property {CheckResponseSchema[]} [check_response] - An array containing the - * lock status of entities if the action performed was a 'check'. Each item in - * the array represents the status of a specific entity. + * @property {CheckResponse[]} [check_response] - An array containing the lock + * status of entities if the action performed was a 'check'. Each item in the + * array represents the status of a specific entity. */ /** - * @typedef AnnouncementResponseSchema + * @typedef AnnouncementResponse * @property {string} [to_datetime] - The end date and time for the event, * indicating when the issue is expected to be resolved. * @property {number} id - A unique identifier for the announcement. @@ -174,17 +162,15 @@ const Joi = require("joi"); */ /** - * @typedef AnnouncementsResponseSchema - * @property {AnnouncementResponseSchema[]} [announcements] + * @typedef AnnouncementsResponse + * @property {AnnouncementResponse[]} [announcements] * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {number} [status] - Represents the HTTP status code of the API response - * @property {string} [message] - A descriptive message providing additional - * information about the API response. */ /** - * @typedef BaseResponseSchema + * @typedef BaseResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [message] - A descriptive message providing additional @@ -262,16 +248,9 @@ const Joi = require("joi"); /** * @typedef ProductsDataUpdatesFilters - * @property {number} [line_number] - Represents the specific line item within a - * bag, used to identify and reference a particular product in a list. This - * helps in pinpointing the exact item being updated or processed. - * @property {string} [identifier] - A unique string that serves as the - * product’s identifier, such as a SKU, barcode, or another distinct code. - * This ensures the product is correctly identified and distinguished from - * other items in the system. - * @property {number} [quantity] - The quantity of the product or item, - * specified as an integer. This indicates how many units of the product are - * being referenced or processed, such as the number of items in a bag or shipment. + * @property {number} [line_number] - The line number for the product or bag. + * @property {string} [identifier] - The unique article or item identifier for + * the product or bag. */ /** @@ -286,14 +265,7 @@ const Joi = require("joi"); * @typedef EntitiesDataUpdates * @property {Object[]} [filters] - A list of filters used to specify which * shipments are targeted for updates. - * @property {Object} [data] - Encapsulates a dynamic set of updates and - * modifications applied to the entity. - */ - -/** - * @typedef OrderDataUpdates - * @property {Object} [data] - Encapsulates a dynamic set of updates and - * modifications applied to the order. + * @property {Object} [data] - Contains the specific data for updating the shipment. */ /** @@ -304,11 +276,10 @@ const Joi = require("joi"); * the properties of products or bags. * @property {EntitiesDataUpdates[]} [entities] - A list of updates related to * the properties of any relevant entities. - * @property {OrderDataUpdates[]} [order] */ /** - * @typedef ShipmentsRequestSchema + * @typedef ShipmentsRequest * @property {string} identifier - Unique identifier for the shipment. * @property {ReasonsData} [reasons] * @property {Products[]} [products] - A list of products or bags that need to @@ -317,37 +288,10 @@ const Joi = require("joi"); */ /** - * @typedef UpdatedAddressSchema - * @property {string} [address] - The complete address. - * @property {string} [area] - The locality or area associated with the address. - * @property {string} [landmark] - A prominent nearby landmark for locating the address. - * @property {string} [pincode] - The postal code (for example, zip, postcode, - * or Eircode) of the address. - * @property {string} [city] - The city, town, or village of the address. - * @property {string} [state] - The state or province of the address. - * @property {string} [name] - The name of the person associated with the address. - * @property {string} [phone] - Phone number associated with the address user. - * @property {string} [email] - Email address associated with the address user. - * @property {string} [country] - The country of the address. - * @property {string} [country_iso_code] - The ISO code representing the country - * of the address. - * @property {number} [latitude] - The latitude of the address. - * @property {number} [longitude] - The longitude of the address. - */ - -/** - * @typedef UpdateAddressRequestBody - * @property {UpdatedAddressSchema} [updated_address] - * @property {string} [address_type] - The type of address (e.g., office, home). - * @property {string} [address_category] - The category of the address (e.g., - * delivery, billing). - */ - -/** - * @typedef StatuesRequestSchema + * @typedef StatuesRequest * @property {string} [status] - The new status to be assigned to the shipment(s). - * @property {ShipmentsRequestSchema[]} [shipments] - A list of shipments to - * which the new status will be applied. + * @property {ShipmentsRequest[]} [shipments] - A list of shipments to which the + * new status will be applied. * @property {string} [exclude_bags_next_state] - Specifies the state to which * remaining bags or products should be changed, effectively excluding them * from the current status update. @@ -360,8 +304,8 @@ const Joi = require("joi"); * @typedef UpdateShipmentStatusRequestSchema * @property {boolean} [force_transition] - Indicates whether to force the * status transition, overriding any restrictions or checks that may normally apply. - * @property {StatuesRequestSchema[]} [statuses] - A list of status updates to - * be applied to the shipment. + * @property {StatuesRequest[]} [statuses] - A list of status updates to be + * applied to the shipment. * @property {boolean} [lock_after_transition] - Specifies whether the shipment * should be locked automatically after a transition occurs. * @property {boolean} [unlock_before_transition] - Specifies whether the @@ -375,7 +319,7 @@ const Joi = require("joi"); */ /** - * @typedef ShipmentsResponseSchema + * @typedef ShipmentsResponse * @property {number} [status] * @property {Object} [final_state] * @property {string} [identifier] @@ -386,6 +330,16 @@ const Joi = require("joi"); * @property {string} [exception] */ +/** + * @typedef StatuesResponse + * @property {ShipmentsResponse[]} [shipments] + */ + +/** + * @typedef UpdateShipmentStatusResponseBody + * @property {StatuesResponse[]} [statuses] + */ + /** * @typedef DPConfiguration * @property {string} [shipping_by] - Shipping_by denotes dp assignment @@ -400,291 +354,24 @@ const Joi = require("joi"); * which the order was placed, such as MARKETPLACE, ECOMM. */ -/** - * @typedef LockStateMessage - * @property {string} [state] - The state for which the custom lock message applies. - * @property {string} [message] - Custom lock message used when the shipment is - * locked in the specified state. - */ - /** * @typedef CreateOrderConfig * @property {DPConfiguration} dp_configuration + * @property {string} [integration_type] - Flag denotes integration type which + * is used to retrieve specific configurations and application details + * relevant to channel fulfillment. * @property {boolean} [location_reassignment] - Flag denotes if the location - * for the store needs to be reassigned post cancellation. If true,location - * for the store gets auto reassigned post cancellation, if set false location - * reassignment will not be performed as its disabled. + * for the store needs to be reassigned post cancellation. * @property {PaymentConfig} [payment] * @property {boolean} [optimal_shipment_creation] - Denotes the shipment * breaking strategy. If the flag is set true, the shipment is created using * optimal shipment creation strategy based on the servicability & packaging * dimensions by OMS .If false, shipment details, including location_id, must * be passed to FDK for processing. - * @property {LockStateMessage[]} [lock_state_messages] - A list of - * state-specific custom lock messages. - * @property {string} [integration_type] - Flag denotes integration type which - * is used to retrieve specific configurations and application details - * relevant to channel fulfillment. - */ - -/** - * @typedef StatuesResponseSchema - * @property {ShipmentsResponseSchema[]} [shipments] - List of Shipments which - * includes data for each shipment, the current status code, final state - * information including reasons for cancellation (if applicable), and unique - * shipment identifiers are provided. - */ - -/** - * @typedef UpdateShipmentStatusResponseBody - * @property {StatuesResponseSchema[]} [statuses] - List of statuses of the - * shipments after a status update operation. Includes an array of status - * objects, each containing details about shipments that have undergone data updates. - */ - -/** - * @typedef OrderUser - * @property {number} phone - * @property {string} last_name - * @property {string} [address1] - * @property {string} state - * @property {string} pincode - * @property {string} first_name - * @property {number} mobile - * @property {string} [address2] - * @property {string} email - * @property {string} country - * @property {string} city - */ - -/** - * @typedef OrderPriority - * @property {string} [fulfilment_priority_text] - * @property {string} [affiliate_priority_code] - * @property {number} [fulfilment_priority] - */ - -/** - * @typedef ArticleDetails - * @property {string} _id - A unique identifier for the article, facilitating - * easy reference and management within the system. - * @property {number} brand_id - Numerical code representing the brand - * associated with the article, linking it to its manufacturer or creator. - * @property {Object} dimension - Specifies the physical dimensions of the - * article, including height, width, and depth, providing a comprehensive - * understanding of its size. - * @property {Object} category - Classifies the article into a specific category - * or type, aiding in organization and filtering based on its nature or usecase. - * @property {Object} weight - Details the weight of the article, crucial for - * logistics, shipping calculations, and customer information. - * @property {Object} attributes - Holds additional descriptive details and - * characteristics of the article, such as color, material, and style, - * enhancing product understanding. - * @property {number} quantity - Specifies the available or required quantity of - * the article, important for inventory management and order fulfillment. - */ - -/** - * @typedef LocationDetails - * @property {string} fulfillment_type - The method of fulfillment used by the store. - * @property {ArticleDetails[]} articles - * @property {number} fulfillment_id - */ - -/** - * @typedef ShipmentDetails - * @property {string} [box_type] - Box type of the shipment in which the - * shipment will be delivered. - * @property {number} shipments - * @property {number} fulfillment_id - * @property {ArticleDetails[]} articles - * @property {string} [dp_id] - * @property {Object} [meta] - * @property {string} affiliate_shipment_id - * @property {Object} [dp_options] - Delivery partner options that are available - * to deliver the shipment. - * @property {boolean} [lock_status] - * @property {Object} [action_to_status] - This field maps potential actions - * (e.g., downloading an invoice or label) to their corresponding shipment - * lock statuses, indicating which operations are allowed depending on the - * shipment's current lock status. When an action is set to 'lock', it means - * no transitions or updates to the shipment's status can be performed until - * the specified action is completed. For instance, if 'download_invoice' is - * in a 'lock' state, the shipment cannot undergo any status transitions until - * the invoice is either downloaded. Similarly, 'download_label' being in a - * 'lock' state prevents any shipment status transitions until a new label is - * downloaded. - */ - -/** - * @typedef ShipmentConfig - * @property {LocationDetails} [location_details] - * @property {string} source - * @property {string} to_pincode - * @property {ShipmentDetails[]} shipment - * @property {string} identifier - The unique identifier for the shipment. - * @property {string} payment_mode - * @property {string} action - * @property {string} journey - */ - -/** - * @typedef ShipmentData - * @property {ShipmentConfig} shipment_data - */ - -/** - * @typedef MarketPlacePdf - * @property {string} [invoice] - * @property {string} [label] - */ - -/** - * @typedef AffiliateBag - * @property {MarketPlacePdf} [pdf_links] - * @property {number} store_id - * @property {string} sku - * @property {number} discount - * @property {number} unit_price - * @property {number} price_effective - * @property {string} affiliate_store_id - * @property {Object} identifier - The unique identifier for the bag. - * @property {string} seller_identifier - * @property {string} item_size - * @property {number} amount_paid - * @property {string} fynd_store_id - * @property {number} item_id - * @property {number} delivery_charge - * @property {number} avl_qty - * @property {number} price_marked - * @property {number} quantity - * @property {number} company_id - * @property {string} hsn_code_id - * @property {string} _id - * @property {Object} affiliate_meta - Sales channel meta data information for the bag. - * @property {string} modified_on - The date and time when the bag was updated - * or modified. - * @property {number} transfer_price - */ - -/** - * @typedef UserData - * @property {OrderUser} [shipping_user] - * @property {OrderUser} [billing_user] - */ - -/** - * @typedef OrderInfo - * @property {string} [affiliate_order_id] - A unique identifier assigned to the - * order by an affiliate partner or platform, facilitating tracking across - * different systems. - * @property {number} cod_charges - * @property {Object} items - Contains detailed information about the items - * included in the order ensuring comprehensive order management. - * @property {number} discount - * @property {OrderUser} billing_address - * @property {Object} [payment] - Outlines the payment details for the order, - * including payment method, transaction status, and any related financial - * information, supporting secure and efficient payment processing. - * @property {OrderPriority} [order_priority] - * @property {ShipmentData} [shipment] - * @property {number} delivery_charges - * @property {OrderUser} shipping_address - * @property {number} order_value - * @property {string} payment_mode - * @property {AffiliateBag[]} bags - * @property {UserData} user - * @property {string} [coupon] - */ - -/** - * @typedef AffiliateAppConfigMeta - * @property {string} value - * @property {string} name - */ - -/** - * @typedef AffiliateAppConfig - * @property {string} id - * @property {string} [description] - * @property {string} updated_at - The date and time when the app config was updated. - * @property {string} name - * @property {string} token - * @property {AffiliateAppConfigMeta[]} [meta] - * @property {string} owner - * @property {string} secret - * @property {string} created_at - Timestamp when the app config was created. - */ - -/** - * @typedef AffiliateInventoryArticleAssignmentConfig - * @property {boolean} [post_order_reassignment] - */ - -/** - * @typedef AffiliateInventoryPaymentConfig - * @property {string} [source] - * @property {string} [mode_of_payment] - */ - -/** - * @typedef AffiliateInventoryStoreConfig - * @property {Object} [store] - Fulfilling store information related to the shipment. - */ - -/** - * @typedef AffiliateInventoryOrderConfig - * @property {boolean} [force_reassignment] - */ - -/** - * @typedef AffiliateInventoryLogisticsConfig - * @property {boolean} [dp_assignment] - */ - -/** - * @typedef AffiliateInventoryConfig - * @property {AffiliateInventoryArticleAssignmentConfig} [article_assignment] - * @property {AffiliateInventoryPaymentConfig} [payment] - * @property {AffiliateInventoryStoreConfig} [inventory] - * @property {AffiliateInventoryOrderConfig} [order] - * @property {AffiliateInventoryLogisticsConfig} [logistics] - */ - -/** - * @typedef AffiliateConfig - * @property {AffiliateAppConfig} [app] - * @property {AffiliateInventoryConfig} [inventory] - * @property {number} [app_company_id] - A unique identifier for the company - * associated with the affiliate app, used for tracking and managing affiliate - * relationships. - */ - -/** - * @typedef Affiliate - * @property {string} id - * @property {AffiliateConfig} [config] - * @property {string} token - */ - -/** - * @typedef AffiliateStoreIdMapping - * @property {number} store_id - * @property {string} marketplace_store_id */ /** - * @typedef OrderConfig - * @property {boolean} [create_user] - * @property {string} [article_lookup] - * @property {string} [bag_end_state] - * @property {Affiliate} affiliate - * @property {string} [store_lookup] - * @property {AffiliateStoreIdMapping[]} affiliate_store_id_mapping - */ - -/** - * @typedef CreateOrderResponseSchema + * @typedef CreateOrderResponse * @property {string} fynd_order_id - A string that represents the unique * identifier assigned to the order. */ @@ -696,7 +383,7 @@ const Joi = require("joi"); */ /** - * @typedef SuccessResponseSchema + * @typedef SuccessResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [message] - A descriptive message providing additional @@ -716,7 +403,7 @@ const Joi = require("joi"); */ /** - * @typedef GetActionsResponseSchema + * @typedef GetActionsResponse * @property {ActionInfo[]} [permissions] - A response object that contains a * list of permissions available to the user. */ @@ -732,23 +419,6 @@ const Joi = require("joi"); * @property {number} [quantity] - Quantity related to the reason, if applicable. */ -/** - * @typedef RefundInformation - * @property {string} [mode] - The payment method used for the order, such as - * CARD, Net Banking (NB), or other options. This field indicates how the - * original payment was made and will determine how the refund is processed. - * @property {number} [amount] - The amount to be refunded, represented as a - * floating-point number. This specifies the exact value that will be returned - * to the customer. - * @property {string} [merchant_transaction_id] - A unique identifier associated - * with the payment transaction, such as TR669796C0012CF31BBD. This ID helps - * track and reference the specific transaction within the merchant's system. - * @property {string} [refund_status] - The current status of the refund - * process, indicating whether the refund has been completed, is pending, or - * has encountered an issue (e.g., 'refund_done', 'refund_failed'). This field - * reflects the state of the refund operation. - */ - /** * @typedef HistoryMeta * @property {number} [store_id] - Unique identifier for the store involved in @@ -773,29 +443,12 @@ const Joi = require("joi"); * applicable. * @property {string} [activity_comment] - Comments related to the activity, if * applicable. - * @property {string} [activity_type] - Defines the category of event-related - * information for a shipment, indicating the nature of the update. This - * includes whether the update pertains to the status of the shipment, - * comments added to it, or notifications about specific events. + * @property {string} [activity_type] - Type of activity being recorded, if applicable. * @property {string} [receiver] - Name of the receiver involved in the * activity, if applicable. * @property {string} [recipient] - Recipient of the activity, if applicable. * @property {string} [slug] - Slug identifier for the activity. * @property {string} [message] - Any additional messages related to the activity. - * @property {string} [prev_store_name] - The name of the store where the item - * was previously located before being transferred or processed. This field - * can be null if the previous store information is not applicable or available. - * @property {string} [prev_store_code] - The unique code associated with the - * previous store. This code helps identify the store in the system and can be - * null if the previous store code is not recorded or required. - * @property {string} [prev_store_id] - The unique identifier (ID) of the - * previous store in the database or system. This ID can be null if the - * previous store information is not relevant or if the store did not have a - * designated ID. - * @property {string} [refund_to] - The destination or method by which a refund - * will be issued. This indicates where the refunded amount will be sent, such - * as back to the original payment source (e.g., 'Back To Source'). - * @property {RefundInformation[]} [refund_information] */ /** @@ -810,20 +463,17 @@ const Joi = require("joi"); * in ISO format. * @property {string} [ticket_id] - Unique identifier for the ticket associated * with the activity. - * @property {string} activity_type - Defines the category of event-related - * information for a shipment, indicating the nature of the update. This - * includes whether the update pertains to the status of the shipment, - * comments added to it, or notifications about specific events. + * @property {string} type - Type of activity history * @property {string} [l2_detail] - L2 details regarding the bag or activity. * @property {string} [assigned_agent] - Name of the agent assigned to the activity. - * @property {HistoryMeta} [meta] + * @property {HistoryMeta} [meta] - Metadata about the activity * @property {string} [l1_detail] - L1 details regarding the bag or activity. * @property {string} message - Message or comment regarding the history. * @property {string} user - Name of the user who created the history record. */ /** - * @typedef ShipmentHistoryResponseSchema + * @typedef ShipmentHistoryResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {HistoryDict[]} activity_history - A list of activity records @@ -864,9 +514,9 @@ const Joi = require("joi"); /** * @typedef SmsDataPayload - * @property {string} shipment_id - Unique identifier which is used to identify - * a shipment. - * @property {string} phone_number - The recipient's phone number for communication. + * @property {number} shipment_id - Unique identifier for the shipment + * associated with the SMS. + * @property {number} phone_number - The recipient's phone number for communication. * @property {number} [amount_paid] - The amount that has been paid, as mapped * in the communication template. * @property {string} order_id - Unique identifier for the order associated with @@ -894,36 +544,26 @@ const Joi = require("joi"); /** * @typedef OrderDetails * @property {string} [fynd_order_id] - * @property {string} [created_at] - Date and time when the order was created. + * @property {string} [created_at] * @property {string} [user_id] * @property {TaxDetails} [tax_details] * @property {number} [mongo_cart_id] * @property {number} [delivery_charges] * @property {string} [transaction_id] * @property {string} [collect_by] - * @property {Object} [headers] - Header details of the order. + * @property {Object} [headers] * @property {number} [coupon_value] * @property {number} [order_value] * @property {string} [created_time] - * @property {string} [currency] - The currency in which the prices details - * associated with the item is specified. + * @property {string} [currency] * @property {number} [total_order_value] * @property {string} [ordering_channel] - * @property {Object} [meta] - Meta data of the order data contains additional, - * potentially dynamic information about the order data. + * @property {Object} [meta] * @property {number} [cod_charges] * @property {number} [cashback_value] * @property {string} [refund_by] - * @property {string} [affiliate_order_date] - Specifies the date and time of - * the order when it was created within the affiliate's system. It specifies - * that the date and time are recorded in ISO 8601 format. - * @property {Object} [payment_methods] - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. The structure is designed to accommodate any number of - * payment methods,providing flexibility and comprehensive insights into each - * transaction's payment aspect. + * @property {string} [affiliate_order_date] + * @property {Object} [payment_methods] * @property {string} [affiliate_order_id] * @property {number} [payment_mode_id] * @property {number} [promotion_effective_discount] @@ -934,7 +574,6 @@ const Joi = require("joi"); * @property {string} [affiliate_id] * @property {string} [ordering_channel_logo] * @property {Prices} [prices] - * @property {PriceAdjustmentCharge[]} [charges] */ /** @@ -985,20 +624,9 @@ const Joi = require("joi"); * related shipment details. */ -/** - * @typedef SendSmsResponseSchema - * @property {boolean} success - Indicates whether the SMS was sent - * successfully. A value of `true` means the SMS was sent without errors, - * while `false` indicates there was an issue. - * @property {string} message - Provides additional information about the - * success or failure of the SMS sending operation. If `success` is `false`, - * this message may contain error details. - */ - /** * @typedef Dimension - * @property {string} [packaging_type] - Defines the type of packaging used for - * the product, encompassing materials, design, and form factors. + * @property {string} [packaging_type] - Describes the type of packaging used. * @property {number} [weight] - The weight of the package in kilograms. * @property {number} [height] - The height of the package in centimetres. * @property {number} [length] - The length of the package in centimetres. @@ -1014,7 +642,7 @@ const Joi = require("joi"); */ /** - * @typedef UpdatePackagingDimensionsResponseSchema + * @typedef UpdatePackagingDimensionsResponse * @property {string} [message] */ @@ -1072,35 +700,8 @@ const Joi = require("joi"); * for the merchant to confirm the order. * @property {Object} [customer_pickup_slot] - An object that provides details * of the pick-up time slot set by the customer. - * @property {string} [pack_by_date] - Defines the deadline for having the - * package fully packed and ready for dispatch or pickup, integral to - * streamlining the fulfillment process. - */ - -/** - * @typedef Tag - * @property {string} [slug] - A unique identifier or short label for the tag - * for shipment reference. - * @property {string} [display_text] - Label of the tag. This text is shown to - * users, representing the tag in an human-readable format. - */ - -/** - * @typedef ProcessAfterConfig - * @property {boolean} [is_scheduled_shipment] - Indicates whether the shipment - * is scheduled for later processing. - * @property {string} [enable_processing_after] - Specifies the UTC time after - * which the shipment will be automatically processed. - */ - -/** - * @typedef SystemMessages - * @property {string} message_type - Specifies the type of message. - * @property {number} priority - This will determine the sequence of messages (1 - * being the highest priority). - * @property {string} message - Message to be displayed at Platform's Order Details. - * @property {string[]} [inject_at] - Holds the list of OMS status at which the - * message should be visible. + * @property {string} [pack_by_date] - A string indicating the date by which the + * order must be packaged for fulfillment. */ /** @@ -1110,8 +711,7 @@ const Joi = require("joi"); * @property {string} [external_shipment_id] - External shipment identifier or * marketplace's unique shipment identifier. * @property {ProcessingDates} [processing_dates] - * @property {Object} [meta] - Meta data of the shipment contains additional, - * potentially dynamic information about the shipment. + * @property {Object} [meta] - An object containing metadata related to the shipment. * @property {number} [priority] - An integer indicating the priority level of * the shipment. * @property {number} [location_id] - Location Identifier or Store/Fulfillment @@ -1120,48 +720,29 @@ const Joi = require("joi"); * must be associated with a specific location. When * `optimal_shipment_creation` is true, the optimal location for order * creation would be assigned, location_id becomes optional. - * @property {string} [order_type] - Defines the specific journey a shipment - * will follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. For example: - * - * - "HomeDelivery": The order undergoes all state transitions typical for a - * delivery, from processing the shipment to final delivery at the - * customer's address. - * - "PickAtStore": The order is prepared for pickup and moved to a state where it - * is ready to be handed over directly to the customer at the store. This - * type streamlines the process by bypassing traditional shipping stages - * and facilitating a quicker transition to the final handover stage. - * - "Digital": This order type likely refers to orders that involve digital goods - * or services, such as software, digital subscriptions, e-books, online - * courses, or any other item that can be delivered electronically. - * - * @property {string[]} [tags] - * @property {SystemMessages[]} [system_messages] - * @property {ProcessAfterConfig} [process_after_config] + * @property {string} [order_type] - The order type of shipment. * @property {string} [parent_type] * @property {string} [store_invoice_id] * @property {string} [lock_status] * @property {string} [type] - * @property {Address} [billing_address_json] + * @property {PlatformDeliveryAddress} [billing_address_json] * @property {string} [id] * @property {number} [fulfilment_priority] * @property {boolean} [is_active] * @property {string} [previous_shipment_id] - * @property {Object} [pdf_links] - PDF Links associated with the shipment. - * @property {Address} [delivery_address_json] + * @property {Object} [pdf_links] + * @property {PlatformDeliveryAddress} [delivery_address_json] * @property {string} [eway_bill_id] * @property {string} [affiliate_shipment_id] * @property {string} [fynd_order_id] - * @property {string} [created_at] - Specifies the date and time when the - * shipment was created. + * @property {string[]} [tags] + * @property {string} [created_at] * @property {string} [delivery_awb_number] - * @property {Address} [hand_over_contact_json] + * @property {PlatformDeliveryAddress} [hand_over_contact_json] * @property {string} [credit_note_id] * @property {string} [parent_id] * @property {string} [affiliate_id] - * @property {string} [packaging_type] - Defines the type of packaging used for - * the product, encompassing materials, design, and form factors. + * @property {string} [packaging_type] * @property {string} [vertical] * @property {number} [quantity] * @property {ShipmentStatusData} [status] @@ -1185,8 +766,7 @@ const Joi = require("joi"); * shipping purposes. * @property {string} [customer_code] - A string representing the customer's * unique identifier in the seller's system. - * @property {string} [shipping_type] - Specifies the method or service used for - * the shipping of the shipment. + * @property {string} [shipping_type] - A string describing the shipping type. * @property {string} [middle_name] - A string containing the customer's middle name. * @property {string} [primary_mobile_number] - A string for the customer's * primary mobile number. @@ -1221,56 +801,9 @@ const Joi = require("joi"); * @property {string} [primary_email] - A string representing the primary email * address for the customer. * @property {string} [address2] - A string representing the second line of the address. - * @property {string} [country_code] - Uniquely identifies the country - * associated with the shipping address. This code is essential for - * international shipments, ensuring accurate routing and delivery across - * global postal and customs services. Examples include 'US' for the United - * States, 'IN' for India. - * @property {string} [country_iso_code] - Specifies the country's unique - * identifier ollowing the ISO 3166-1 alpha-2 standard. This two-letter code - * is crucial for distinguishing countries in international transactions, data - * processing, and shipping logistics. - */ - -/** - * @typedef BillingInfo - * @property {string} [alternate_mobile_number] - * @property {string} [state] - * @property {string} [customer_code] - A unique identifier assigned to the - * customer, facilitating order tracking and service customization. - * @property {string} [middle_name] - * @property {string} [primary_mobile_number] - * @property {string} [last_name] - * @property {string} [gender] - * @property {string} [house_no] - * @property {string} [first_name] - * @property {string} [title] - * @property {string} [country] - * @property {string} [state_code] - The code representing the state or region - * within the country, if applicable. - * @property {string} [city] - * @property {string} [external_customer_code] - A unique identifier assigned to - * customers by an external system or partner organization. This code is - * crucial for integrating and synchronizing customer information across - * different platforms or services. - * @property {string} [floor_no] - * @property {string} [alternate_email] - * @property {string} [address] - * @property {string} [area] - A string representing the area of the customer's location. - * @property {string} [address1] - A string representing the first line of the address. - * @property {string} [pincode] - A string representing the pincode of the - * customer's location. - * @property {string} [primary_email] - A string representing the primary email - * address for the customer. - * @property {string} [address2] - A string representing the second line of the address. - * @property {string} [country_code] - Uniquely identifies the country - * associated with the billing address details. This code is essential for - * international shipments, ensuring accurate routing and delivery across - * global postal and customs services. Examples include 'US' for the United - * States, 'IN' for India. - * @property {string} [country_iso_code] - The ISO 3166-1 alpha-2 code for the - * country, consisting of two uppercase letters. This standardized format - * ensures consistent identification of countries across systems. + * @property {string} [country_code] - A string representing the country code of + * the customer's location. + * @property {string} [country_iso_code] - Country Code in ISO 2 format (e.g. US, IN) */ /** @@ -1324,22 +857,21 @@ const Joi = require("joi"); /** * @typedef CreateOrderAPI - * @property {Shipment[]} shipments - List of Shipments which includes shipment - * data like shipment items, shipment promise, Shipment type, shipment order - * type, shipment dp options etc. + * @property {Shipment[]} shipments - An array of shipment objects that detail + * the items being shipped as part of the order. * @property {ShippingInfo} shipping_info * @property {ShippingInfo} billing_info - * @property {Object} [currency_info] - This object can accommodate a range of - * currency-related information, provides a flexible structure for storing - * comprehensive details about the currency or currencies involved in a transaction. + * @property {Object} [currency_info] - An object that provides details about + * the currency in which the order is processed, including currency code and + * conversion rates if applicable. * @property {string} [external_order_id] - A unique identifier for the order * assigned by an external system. * @property {Charge[]} [charges] - An array of charge objects that detail the * various fees associated with the order. * @property {string} [external_creation_date] - A string that specifies the * date and time when the order was created in an external system - * @property {Object} [meta] - Meta data of the order that contains additional, - * potentially dynamic information about the order. + * @property {Object} [meta] - A generic object that can hold any additional + * metadata related to the order. * @property {TaxInfo} [tax_info] * @property {CreateOrderConfig} config * @property {PaymentInfo} payment_info @@ -1347,10 +879,6 @@ const Joi = require("joi"); * @property {number} [ordering_store_id] - Unique identifier for the store * where the order was placed. * @property {string} [order_platform] - The platform used to place the order. - * @property {string} [status] - Represents the current status of the order, - * specifying whether the order is in a 'pendency' state (awaiting further - * action) or marked as 'complete'. - * @property {SystemMessages[]} [system_messages] * @property {string} [order_type] - A string that specifies the type of order * being placed. * @property {string} [fynd_order_id] - Unique identifier for the order. @@ -1370,49 +898,6 @@ const Joi = require("joi"); * identifier assigned to the order. */ -/** - * @typedef PaymentMethods - * @property {string} [collect_by] - * @property {string} [refund_by] - * @property {string} [mode] - */ - -/** - * @typedef CreateChannelPaymentInfo - * @property {string} [source] - * @property {PaymentMethods[]} [payment_methods] - * @property {string} [mode_of_payment] - */ - -/** - * @typedef CreateChannelConfig - * @property {DPConfiguration} [dp_configuration] - * @property {string} [shipment_assignment] - * @property {boolean} [location_reassignment] - * @property {Object} [logo_url] - * @property {CreateChannelPaymentInfo} [payment_info] - * @property {string[]} [lock_states] - */ - -/** - * @typedef CreateChannelConfigData - * @property {CreateChannelConfig} [config_data] - */ - -/** - * @typedef CreateChannelConifgErrorResponseSchema - * @property {string} [error] - A string that represents the unique identifier - * assigned to the order. - * @property {string} [request_id] - * @property {number} status - * @property {Object} [info] - * @property {string} [stack_trace] - * @property {string} [code] - * @property {string} [meta] - * @property {string} message - * @property {string} [exception] - */ - /** * @typedef UploadManifestConsent * @property {string} consent_url - A URL that directs users to a consent page @@ -1420,13 +905,6 @@ const Joi = require("joi"); * @property {string} manifest_id - The unique identifier for the manifest being uploaded. */ -/** - * @typedef CreateChannelConfigResponseSchema - * @property {boolean} [is_inserted] - * @property {boolean} [is_upserted] - * @property {boolean} [acknowledged] - */ - /** * @typedef PlatformOrderUpdate * @property {string} order_id - A string that represents the unique identifier @@ -1458,11 +936,6 @@ const Joi = require("joi"); * @typedef OrderStatus * @property {FyndOrderIdList[]} [order_details] - An array of objects that * provide details about the orders, including their respective order IDs. - * @property {string} start_date - Denotes the start date and time when the - * order was created. - * @property {string} end_date - Specifies the deadline by which a particular - * action related to the order needs to be completed. - * @property {number} mobile */ /** @@ -1479,26 +952,6 @@ const Joi = require("joi"); * can be transitioned to from the current status. */ -/** - * @typedef FetchCreditBalanceRequestPayload - * @property {string} affiliate_id - * @property {string} seller_id - * @property {string} customer_mobile_number - */ - -/** - * @typedef CreditBalanceInfo - * @property {string} [total_credited_balance] - * @property {string} [reason] - * @property {string} [customer_mobile_number] - */ - -/** - * @typedef FetchCreditBalanceResponsePayload - * @property {boolean} success - * @property {CreditBalanceInfo} data - */ - /** * @typedef RefundModeConfigRequestPayload * @property {string} fynd_order_id - A unique identifier for the order placed @@ -1558,11 +1011,7 @@ const Joi = require("joi"); * @property {string} first_name - A string representing the user's first name. * @property {string} last_name - A string representing the user's last name. * @property {string} mobile - A string representing the user's mobile number. - * @property {string} [country_code] - Uniquely identifies the country - * associated with the user information. This code is essential for - * international shipments, ensuring accurate routing and delivery across - * global postal and customs services. Examples include 'US' for the United - * States, 'IN' for India. + * @property {string} [country_code] - A string representing the user's country code. */ /** @@ -1574,7 +1023,7 @@ const Joi = require("joi"); */ /** - * @typedef AttachOrderUserResponseSchema + * @typedef AttachOrderUserResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [message] - A descriptive message providing additional @@ -1585,10 +1034,8 @@ const Joi = require("joi"); * @typedef SendUserMobileOTP * @property {number} mobile - The mobile phone number of the user to whom the * OTP (One-Time Password) will be sent. - * @property {string} [country_code] - Uniquely identifies the country - * associated with the mobile number. This code is essential for for correctly - * formatting and routing the OTP messages to mobile phones across - * international borders. Examples include 'US' for the United States, 'IN' for India. + * @property {string} [country_code] - The country code associated with the + * user's mobile number. */ /** @@ -1603,7 +1050,7 @@ const Joi = require("joi"); */ /** - * @typedef SendUserMobileOtpResponseSchema + * @typedef SendUserMobileOtpResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {number} [status] - The HTTP status code of the API response @@ -1639,7 +1086,7 @@ const Joi = require("joi"); */ /** - * @typedef VerifyOtpResponseSchema + * @typedef VerifyOtpResponse * @property {number} [status] - Represents the HTTP status code of the API response. * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). @@ -1649,11 +1096,11 @@ const Joi = require("joi"); */ /** - * @typedef BulkReportsDownloadRequestSchema + * @typedef BulkReportsDownloadRequest * @property {string[]} [store_ids] - A list of specific store IDs for which the * reports should be generated. - * @property {string} [lane_type] - Defines the category or type of lane for - * which the report is being requested for download. + * @property {string} [lane_type] - Specifies the type of lane for which the + * report is being requested. * @property {string[]} [custom_headers] - Allows users to specify custom * headers for the downloaded report. * @property {string} [report_type] - Indicates the type of report being requested. @@ -1672,14 +1119,14 @@ const Joi = require("joi"); */ /** - * @typedef BulkReportsDownloadResponseSchema + * @typedef BulkReportsDownloadResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [batch_id] - A unique identifier for the batch of reports generated. */ /** - * @typedef APIFailedResponseSchema + * @typedef APIFailedResponse * @property {boolean} [status] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [error] - A descriptive message detailing the error that @@ -1694,7 +1141,7 @@ const Joi = require("joi"); */ /** - * @typedef BulkStateTransistionResponseSchema + * @typedef BulkStateTransistionResponse * @property {boolean} [status] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [message] - A descriptive message providing additional @@ -1706,14 +1153,11 @@ const Joi = require("joi"); * @typedef ShipmentActionInfo * @property {string[]} [label] * @property {string[]} [invoice] - * @property {Object[]} [failed_shipments] - List of Failed Shipments which - * includes shipment data like shipment items, shipment promise, Shipment - * type, shipment order type, shipment dp options etc. + * @property {Object[]} [failed_shipments] * @property {string[]} [processing_shipments] * @property {string[]} [successful_shipments] * @property {string[]} [invoiceable_shipments] - * @property {Object} [failed_invoiced_shipments] - Specifies the shipment - * records that have encountered issues during the invoicing process. + * @property {Object} [failed_invoiced_shipments] * @property {string[]} [processing_invoice_shipments] * @property {string[]} [successful_invoiced_shipments] */ @@ -1743,7 +1187,7 @@ const Joi = require("joi"); * bulk action. * @property {number} [updated_ts] - A timestamp (in Unix format) indicating * when the bulk action was last updated. - * @property {string} [status] - Indicates the current status of the bulk action. + * @property {boolean} [status] - Indicates the current status of the bulk action. * @property {string} [store_code] - A code representing the store, which can be * used for internal tracking or identification. * @property {string} [bulk_action_type] - Specifies the type of bulk action @@ -1799,7 +1243,7 @@ const Joi = require("joi"); */ /** - * @typedef BulkListingResponseSchema + * @typedef BulkListingResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {BulkActionListingData[]} [data] - An array containing the details @@ -1827,7 +1271,7 @@ const Joi = require("joi"); */ /** - * @typedef JobDetailsResponseSchema + * @typedef JobDetailsResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {JobDetailsData[]} [data] - An array representing the details of a job. @@ -1846,7 +1290,7 @@ const Joi = require("joi"); */ /** - * @typedef JobFailedResponseSchema + * @typedef JobFailedResponse * @property {string} [file_name] - The name of the file associated with the failed job. * @property {string} [url] - The URL where the uploaded bulk file can be accessed. */ @@ -1995,63 +1439,37 @@ const Joi = require("joi"); * provide overarching details about the manifest itself. */ -/** - * @typedef FiltersRequestSchema - * @property {DateRange} [date_range] - * @property {string} [logo] - * @property {number} stores - * @property {string} dp_name - * @property {number} dp_ids - * @property {string} lane - * @property {string} store_name - */ - -/** - * @typedef ProcessManifest - * @property {FiltersRequestSchema} filters - * @property {string} action - * @property {string} unique_id - * @property {string} [manifest_id] - */ - -/** - * @typedef ProcessManifestResponseSchema - * @property {number} [company_id] - Id of the company. - * @property {Filters} [filters] - * @property {string} [user_id] - Id of the user. - * @property {string} [manifest_id] - Id of the manifest. - * @property {string} [action] - * @property {string} [uid] - * @property {string} [created_by] - */ - -/** - * @typedef ProcessManifestItemResponseSchema - * @property {ProcessManifestResponseSchema} [items] - */ - /** * @typedef FilterInfoOption - * @property {string} [text] - The display text of the option. - * @property {string} [name] - Name of the option. - * @property {string} [placeholder_text] - Placeholder text of the option. - * @property {string} [value] - The value of the option. - * @property {number} [min_search_size] - Minimum search size of the option. - * @property {boolean} [show_ui] - Specifies whether the option should be shown in the UI. + * @property {string} [text] - The option value or text set for the filter option. + * @property {string} [name] - The option name indicating the type of + * information the filter relates to. + * @property {string} [placeholder_text] - Represents the placeholder text that + * might appear in a UI element. + * @property {string} [value] - A unique value for the filter used in processing + * filter selections. + * @property {number} [min_search_size] - Indicates the minimum size for search + * criteria, potentially related to how many items to display or filter. + * @property {boolean} [show_ui] - Indicates whether this option should be + * visible in the user interface. */ /** * @typedef FiltersInfo - * @property {FilterInfoOption[]} [options] - Options of the filter.[dropdown] - * @property {string} text - Display text of filter - * @property {string} [placeholder_text] - Placeholder text of filter. - * @property {string} value - The value of the filter. - * @property {boolean} [required] - Specifies whether the filter is required or not. - * @property {string} type - Single_select/multi_select + * @property {FilterInfoOption[]} [options] + * @property {string} text - The label or name for the filter, which indicates + * what the filter is related to. + * @property {string} [placeholder_text] - A placeholder text that provides + * guidance on how to use the filter. + * @property {string} value - A unique identifier for the filter, used for + * processing filter selections. + * @property {boolean} [required] - Indicates whether the filter is mandatory to + * fill out when applying the filter set. + * @property {string} type - Specifies the type of filter. */ /** - * @typedef ManifestFiltersResponseSchema + * @typedef ManifestFiltersResponse * @property {FiltersInfo[]} [advance_filter] * @property {FiltersInfo[]} [global_filter] */ @@ -2073,16 +1491,12 @@ const Joi = require("joi"); * @property {string} ack_no * @property {string} irn * @property {string} signed_invoice - * @property {string} signed_qr_code - QR code containing the signed e-invoice - * data for quick and secure verification purposes. + * @property {string} signed_qr_code */ /** * @typedef EInvoiceErrorDetails - * @property {string} [error_code] - Represents an identifier for the specific - * error encountered during the e-invoice generation or processing. This code - * facilitates quick identification and troubleshooting of issues, allowing - * for more efficient resolution. + * @property {string} [error_code] * @property {string} error_message */ @@ -2095,15 +1509,7 @@ const Joi = require("joi"); /** * @typedef EInvoiceResponseData * @property {string} shipment_id - * @property {string} einvoice_type - Defines the category or type of e-invoice - * generated for the shipment. This property must be set to one of the - * following values to qualify the shipment for e-invoice generation. invoice- - * A document detailing the sale, including goods, services, prices, and - * taxes, requesting payment. credit_note- Issued as an adjustment or - * correction to a previously issued invoice. It may indicate a reduction in - * the amount often due to reasons such as returned goods, overbilling, or a - * post-sale discount. A credit note effectively reverses or alters the - * charges outlined in the original invoice, either partially or in full. + * @property {string} einvoice_type * @property {number} status * @property {string} message * @property {EInvoiceDetails} [einvoice_info] @@ -2115,7 +1521,7 @@ const Joi = require("joi"); */ /** - * @typedef EInvoiceRetryResponseSchema + * @typedef EInvoiceRetryResponse * @property {EInvoiceResponseData[]} response_data */ @@ -2127,22 +1533,14 @@ const Joi = require("joi"); /** * @typedef EInvoiceErrorResponseData * @property {string} shipment_id - * @property {string} einvoice_type - Defines the category or type of e-invoice - * generated for the shipment. This property must be set to one of the - * following values to qualify the shipment for e-invoice generation. invoice- - * A document detailing the sale, including goods, services, prices, and - * taxes, requesting payment. credit_note- Issued as an adjustment or - * correction to a previously issued invoice. It may indicate a reduction in - * the amount often due to reasons such as returned goods, overbilling, or a - * post-sale discount. A credit note effectively reverses or alters the - * charges outlined in the original invoice, either partially or in full. + * @property {string} einvoice_type * @property {number} status * @property {string} message * @property {EInvoiceErrorInfo} [einvoice_info] */ /** - * @typedef EInvoiceErrorResponseSchema + * @typedef EInvoiceErrorResponse * @property {EInvoiceErrorResponseData[]} [response_data] * @property {string} [message] */ @@ -2156,15 +1554,7 @@ const Joi = require("joi"); /** * @typedef EInvoiceRetryShipmentData * @property {string} shipment_id - * @property {string} einvoice_type - Defines the category or type of e-invoice - * generated for the shipment. This property must be set to one of the - * following values to qualify the shipment for e-invoice generation. invoice- - * A document detailing the sale, including goods, services, prices, and - * taxes, requesting payment. credit_note- Issued as an adjustment or - * correction to a previously issued invoice. It may indicate a reduction in - * the amount often due to reasons such as returned goods, overbilling, or a - * post-sale discount. A credit note effectively reverses or alters the - * charges outlined in the original invoice, either partially or in full. + * @property {string} einvoice_type */ /** @@ -2194,7 +1584,7 @@ const Joi = require("joi"); */ /** - * @typedef CourierPartnerTrackingResponseSchema + * @typedef CourierPartnerTrackingResponse * @property {CourierPartnerTrackingDetails[]} [items] * @property {PageDetails} [page] */ @@ -2219,15 +1609,11 @@ const Joi = require("joi"); * @property {string} order_id * @property {LogsChannelDetails} channel * @property {LogPaymentDetails} payment - * @property {string} created_at - Created date and time of the failed order. - * @property {string} error_message - A technical description of the error that - * occurred, intended for debugging purposes. - * @property {string} display_message - A user-friendly message that can be - * displayed to the end-user, explaining the failure in a more general and - * understandable manner. + * @property {string} created_at + * @property {string} error_message + * @property {string} display_message * @property {string} method_name - * @property {Object} meta - Meta data of the failed orders that contains - * additional, potentially dynamic information about the order. + * @property {Object} meta */ /** @@ -2238,26 +1624,16 @@ const Joi = require("joi"); /** * @typedef FailedOrderLogDetails - * @property {string} error_trace - This field is intended to store the error - * trace of the error that occurred.For example, "Exception Trace" represents - * a placeholder for the actual stack trace data that would be captured when - * an exception occurs."Internal Server Error" indicates a generic error - * message suggesting that the server encountered an unexpected condition that - * prevented it from fulfilling the request. - * @property {string} exception - This field captures the exception raised by - * the system during an Order Failure. It indicates an event that disrupts the - * normal flow of the program's instructions. + * @property {string} error_trace + * @property {string} exception */ /** * @typedef GenerateInvoiceIDResponseData - * @property {string} [shipment_id] - The unique identifier for the shipment - * associated with the invoice. - * @property {boolean} [success] - Indicates whether the API call was successful - * (true) or not (false). - * @property {string} [invoice_id] - The generated invoice ID, or null if the - * generation failed. - * @property {boolean} [error_message] - Provides a descriptive error message. + * @property {string} [shipment_id] + * @property {boolean} [success] + * @property {string} [invoice_id] + * @property {boolean} [error_message] */ /** @@ -2270,27 +1646,26 @@ const Joi = require("joi"); /** * @typedef GenerateInvoiceIDRequestSchema - * @property {string[]} shipment_ids - List of shipment IDs for which invoice - * need to be generated. + * @property {string[]} shipment_ids */ /** - * @typedef GenerateInvoiceIDResponseSchema + * @typedef GenerateInvoiceIDResponse * @property {GenerateInvoiceIDResponseData[]} [items] */ /** - * @typedef GenerateInvoiceIDErrorResponseSchema + * @typedef GenerateInvoiceIDErrorResponse * @property {GenerateInvoiceIDErrorResponseData[]} [items] */ /** - * @typedef ManifestResponseSchema + * @typedef ManifestResponse * @property {ManifestItems} [items] */ /** - * @typedef ProcessManifestRequestSchema + * @typedef ProcessManifestRequest * @property {string} action - Represents the operation to be performed on the manifest. * @property {string} [manifest_id] - Represents the identifier for a specific manifest. * @property {Filters} filters @@ -2316,7 +1691,7 @@ const Joi = require("joi"); */ /** - * @typedef ManifestErrorResponseSchema + * @typedef ManifestErrorResponse * @property {boolean} [success] - Indicates whether the API call was successful * (true) or not (false). * @property {string} [error] - Provides a descriptive error message. @@ -2333,7 +1708,7 @@ const Joi = require("joi"); */ /** - * @typedef ConfigUpdatedResponseSchema + * @typedef ConfigUpdatedResponse * @property {ConfigData[]} data - The result of the config update operation, * including whether it was acknowledged, upserted, or inserted. * @property {boolean} success - Indicates whether the config update operation @@ -2409,18 +1784,11 @@ const Joi = require("joi"); /** * @typedef Filter - * @property {string} [order_type] - Defines the specific journey a shipment - * will follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. For example: + * @property {string} [order_type] - Indicates the type or category of the order. * - * - "HomeDelivery": The order goes through all the steps needed for delivery, - * from being packed to arriving at the customer’s address. - * - "PickAtStore": The order is prepared for pickup at the store, skipping - * shipping steps to make it ready faster for the customer to collect in person. - * - "Digital": This order type likely refers to orders that involve digital goods - * or services, such as software, digital subscriptions, e-books, online - * courses, or any other item that can be delivered electronically. + * - PickAtStore: Pick from store + * - HomeDelivery: Home delivery + * - Digital: Digital * * @property {boolean} [is_partial_transition] - Specifies whether a partial * transition of the order is allowed, allowing some components to progress @@ -2429,6 +1797,11 @@ const Joi = require("joi"); * assignment of a designated person is automatically triggered in the context of ACF. * @property {string} [lock_status] - Indicates the current locking status of * the shipment. + * + * - `complete`: Complete shipment lock + * - `operational`: Operational shipment lock + * - `None`: No lock on shipment + * * @property {boolean} [lock_after_transition] - Specifies whether locking is * required after transitioning to the next status. lock_after_transition : * true - Lock Transition enabled lock_after_transition : false - Lock @@ -2450,21 +1823,31 @@ const Joi = require("joi"); * check is performed in a point of sale (POS) scenario. * @property {string} [order_platform] - Specifies the platform on which the * order was placed. + * + * - `platform-pos`: POS + * - `platform-site`: WEB + * - `openapi`: OPENAPI + * - `marketplace`: MARKETPLACE + * * @property {string} [refund_type] - Indicates the type of refund associated * with the order. + * + * - `credit_note`: CREDIT_NOTE + * - `source`: SOURCE + * - `bank_transfer`: BANK + * - `manual_refund`: MANUAL_REFUND + * * @property {boolean} [is_non_pos_platform] - Specifies whether the platform is * non-point of sale (POS) in nature. * @property {boolean} [is_self_ship] - Indicates whether the order is * self-shipped by the seller. - * @property {string} [seller_country_code] - Specifies the country code of the - * seller in ISO 3166-1 alpha-2 format. + * @property {string} [seller_country_code] - Specifies the country code of the seller. * * - `seller_country_code`: US * - `seller_country_code`: UK * - `seller_country_code`: IN * - * @property {string} [customer_country_code] - Specifies the country code of - * the seller in ISO 3166-1 alpha-2 format. + * @property {string} [customer_country_code] - Specifies the country code of the seller. * * - `customer_country_code`: US * - `customer_country_code`: UK @@ -2482,16 +1865,14 @@ const Joi = require("joi"); * @typedef PostHook * @property {string} task - Name of the hook that has to be added * @property {Object} [kwargs] - Additional parameters for the hook - * @property {Filter} [filters] - Criteria to filter which hooks are applied - * based on certain conditions. + * @property {Filter} [filters] - Filters for scope selection. */ /** * @typedef PreHook * @property {string} task - Name of the hook that has to be added * @property {Object} [kwargs] - Additional parameters for the hook - * @property {Filter} [filters] - Criteria to filter which hooks are applied - * based on certain conditions. + * @property {Filter} [filters] - Filter */ /** @@ -2531,224 +1912,16 @@ const Joi = require("joi"); */ /** - * @typedef RuleListRequestSchema - * @property {number} [page_no] - The page number to be retrieved. This - * determines the starting point for the list of rules to be returned. - * @property {string[]} [channel] - An array of channel (application ID) - * identifiers. These channels represent the specific application contexts for - * which the rules are being requested. - * @property {string[]} [department] - An array of department identifiers. The - * rules returned will be applicable to these specified departments. - * @property {string[]} [id] - An array of rule identifiers. This allows for - * retrieving specific rules based on their unique IDs. - * @property {boolean} [is_active] - Indicates whether the rules to be retrieved - * are active. This flag helps filter the rules based on their current status. - */ - -/** - * @typedef RuleErrorResponseSchema - * @property {boolean} [success] - A flag that indicates whether the request was - * successful. It returns `false` if an error occurred. - * @property {string} [error] - The error message that provides details about - * why the request failed. + * @typedef CommonErrorResponse + * @property {number} [status] - The HTTP status code corresponding to the error. + * @property {string} [message] - A message describing the error that occurred. */ /** - * @typedef RMAPageInfo - * @property {string} [type] - The type of pagination used. Common values could - * be "number" for numeric pagination, which indicates that the pages are - * numbered sequentially. - * @property {number} [current] - The current page number being displayed. This - * reflects the page of data currently being viewed. - * @property {number} [size] - The number of items per page. This sets the limit - * on how many rule items are shown on each page. - * @property {number} [item_total] - The total number of items available. This - * provides an overview of the entire dataset from which the rules are being paginated. - * @property {boolean} [has_previous] - Indicates whether there are previous - * pages available before the current page. It helps in navigating backward - * through the data. - * @property {boolean} [has_next] - Indicates whether there are more pages - * available after the current page. It helps in determining if there is more - * data to be viewed. - */ - -/** - * @typedef RuleAction - * @property {Reason[]} [reasons] - */ - -/** - * @typedef QuestionSetItem - * @property {number} id - The unique identifier for the question. This ID is - * used to distinguish between different questions. - * @property {string} display_name - The display name or text of the question. - * This is what is shown to the user during interactions. - */ - -/** - * @typedef Reason - * @property {number} [id] - A unique identifier for the reason. - * @property {string} display_name - The display name for the reason, used for - * user-facing purposes. - * @property {Reason[]} [reasons] - A list of sub-reasons under the main reason. - * These provide additional layers of granularity to the main reason. - * @property {string[]} qc_type - List of QC (Quality Control) types -- having - * return reason types indicating the stage at which QC is performed. - - * "Doorstep QC" refers involves inspecting products for damages at the - * customer's location before delivery. - "Pre QC" requires customers to - * upload product photos for a preliminary quality check by the operations - * team before a return or exchange pickup is arranged, ensuring criteria are - * met and optimizing logistics. - * @property {QuestionSet[]} question_set - An array of question sets linked to - * the reason, defining the questions to be answered. - * @property {Object} meta - Meta object of the reason. This contains any - * additional metadata that might be relevant to the reason. - * @property {boolean} is_active - Indicates whether the reason is currently - * active. Active reasons are those that are currently in use within the system. - */ - -/** - * @typedef Conditions - * @property {string} [department] - The department ID to which the rule - * applies. This helps in filtering the rules based on specific departments. - * @property {string} [l3] - The Level 3 category ID to which the rule applies. - * This further refines the application of the rule within a specific category. - */ - -/** - * @typedef RuleItem - * @property {string} id - The unique identifier for the rule item. This ID is - * essential for referencing and managing individual rules. - * @property {string} entity_type - The type of entity the rule applies to, such - * as "department" or "l3". This specifies the scope of the rule. - * @property {string} value - The value associated with the entity type, such as - * a department ID or L3 category ID. This value determines the specific - * context in which the rule is applied. - * @property {string} channel - The channel (application ID) to which the rule - * applies. This links the rule to a specific sales channel or application. - * @property {RuleAction} actions - The actions and reasons associated with the - * rule. These define what happens when the rule is triggered. - * @property {boolean} qc_enabled - Indicates whether quality checks are enabled - * for this rule. If enabled, the rule includes quality control mechanisms. - * @property {boolean} is_deleted - Indicates whether the rule is deleted. - * Deleted rules are no longer active or enforceable. - * @property {Conditions} conditions - * @property {Object} meta - Metadata associated with the rule. This provides - * additional context and information related to the rule. - * @property {string} rule_type - The type of rule, such as "custom" or - * "global". This specifies whether the rule is a custom one or a global standard. - * @property {boolean} is_active - Indicates whether the rule is currently - * active. Active rules are those that are currently being enforced. - */ - -/** - * @typedef RuleError - * @property {string} type - The type of error encountered. This could be - * related to validation, processing, or other issues. - * @property {string} value - A specific value related to the error. This - * provides context to the error, such as which input was problematic. - * @property {string} message - The error message that describes what went - * wrong. This message is intended for developers or users to understand the issue. - */ - -/** - * @typedef RuleListResponseSchema - * @property {RMAPageInfo} [page] - Provides information about the pagination of - * the rule list. This includes details like the current page, the total - * number of items, and whether there are previous or next pages available. - * @property {RuleItem[]} [items] - A list of rule items included in the - * response. Each item represents a specific RMA rule, detailing its unique - * identifier, entity type, associated actions, conditions, and other relevant - * attributes. This list is essential for understanding the individual rules - * that are applied within the system for return merchandise authorization. - * @property {boolean} [success] - Indicates whether the request was successful. - * A value of `true` means the rules were retrieved successfully, while - * `false` indicates an error occurred during the request. - * @property {RuleError} [error] - Contains error details if the request was not - * successful. This includes the type of error, the value that caused the - * issue, and a message explaining the error. These details help in diagnosing - * and resolving issues that may arise when retrieving the rules. - */ - -/** - * @typedef UpdateShipmentPaymentMode - * @property {string} shipment_id - Unique identifier used to filter the shipment. - * @property {ProductSchema[]} [products] - List of products attached with the - * shipment against which the payment methods needs to be overridden. - * @property {PaymentMethodSchema[]} [payment_methods] - List of payment methods - * that needs to be updated on shipment level. - */ - -/** - * @typedef CommonErrorResponseSchema - * @property {number} [status] - The HTTP status code corresponding to the error. - * @property {string} [message] - A message describing the error that occurred. - */ - -/** - * @typedef ExceptionErrorResponseSchema - * @property {string} [message] - A message describing the error that occurred. - * @property {string} [exception] - The class path of the exception that was thrown. - * @property {string} [stack_trace] - The stack trace from the server for the error. - */ - -/** - * @typedef ProductSchema - * @property {number} line_number - The line number of a product used to - * uniquely identify and filter the specific product within the shipment. - * @property {PaymentMethodSchema[]} payment_methods - List of payment methods - * that needs to be updated against filtered product. - */ - -/** - * @typedef PaymentMethodSchema - * @property {string} name - The name of the payment method (e.g., "Credit - * Card", "PayPal"). - * @property {string} mode - The mode of payment (e.g., "PREPAID", "COD"). - * @property {number} amount - The amount to be paid using this payment method. - * @property {PaymentMetaDataSchema} [meta] - * @property {string} identifier - Unique identifier for this payment method. - * @property {string} display_name - The name to be displayed for this payment method. - * @property {string} aggregator - The payment aggregator or service provider - * used for this payment method. - * @property {ActionDetailSchema} action - * @property {string} refund_by - Payment refund by for the customer and seller - * (e.g fynd, seller). - * @property {string} collect_by - Payment collected by for the customer and - * seller (e.g fynd, seller). - */ - -/** - * @typedef ActionDetailSchema - * @property {Object} name - The type of action to be performed (currently only - * "override" is supported). - * @property {string} current_mode - The current payment mode before the action - * is applied. - * @property {string} current_identifier - The current identifier of the payment - * method before the action is applied. - * @property {string} [refund_to] - Specifies where the refund should be - * directed to, if applicable. - */ - -/** - * @typedef PaymentMetaDataSchema - * @property {string} [payment_gateway] - The name or identifier of the payment - * gateway used. - * @property {string} [payment_identifier] - A unique identifier for this - * payment transaction. - * @property {PaymentMetaLogoURLSchema} [logo_url] - */ - -/** - * @typedef PaymentMetaLogoURLSchema - * @property {string} large - URL for the large version of the payment method's logo. - * @property {string} small - URL for the small version of the payment method's logo. - */ - -/** - * @typedef ValidationError - * @property {string} message - A brief description of the error encountered. - * @property {string} field - The field in the request that caused the error. + * @typedef ExceptionErrorResponse + * @property {string} [message] - A message describing the error that occurred. + * @property {string} [exception] - The class path of the exception that was thrown. + * @property {string} [stack_trace] - The stack trace from the server for the error. */ /** @@ -2764,817 +1937,412 @@ const Joi = require("joi"); /** * @typedef BagReasonMeta - * @property {boolean} [show_text_area] - Indicates whether a text area should - * be displayed for additional input related to the bag reason. + * @property {boolean} [show_text_area] */ /** * @typedef QuestionSet - * @property {number} [id] - A unique identifier for the question set. - * @property {string} [display_name] - The display name for the question set, - * used for user-facing purposes. + * @property {number} [id] + * @property {string} [display_name] */ /** * @typedef BagReasons - * @property {string[]} [qc_type] - List of QC (Quality Control) types -- having - * return reason types indicating the stage at which QC is performed. - - * "Doorstep QC" refers involves inspecting products for damages at the - * customer's location before delivery. - "Pre QC" requires customers to - * upload product photos for a preliminary quality check by the operations - * team before a return or exchange pickup is arranged, ensuring criteria are - * met and optimizing logistics. - * @property {number} [id] - A unique identifier for the bag reason. - * @property {string} [display_name] - The display name for the bag reason, used - * for user-facing purposes. + * @property {string[]} [qc_type] + * @property {number} [id] + * @property {string} [display_name] * @property {BagReasonMeta} [meta] - * @property {QuestionSet[]} [question_set] - An array of question sets linked - * to the bag reason, defining the questions to be answered. - * @property {BagReasons[]} [reasons] - An array of nested bag reasons that can - * further explain the primary reason. + * @property {QuestionSet[]} [question_set] + * @property {BagReasons[]} [reasons] */ /** * @typedef ShipmentBagReasons - * @property {BagReasons[]} [reasons] - List of bag reasons for a shipment with - * a corresponding shipment status. - * @property {boolean} [success] - Indicates whether the API call was successful - * (true) or not (false). - * @property {number} [rule_id] - The unique identifier for the rule that is - * associated with the given reasons. This ID serves as a reference to the - * specific rule within the RMA system that governs or influences the reasons listed. + * @property {BagReasons[]} [reasons] + * @property {boolean} [success] */ /** * @typedef ShipmentStatus - * @property {string} [current_shipment_status] - The current status of the shipment. - * @property {Object} [meta] - It contains the additional properties related to - * shipment status transition like Kafka_emission_status, user_name, etc. - * Additionally it is dynamic. - * @property {number} [id] - A unique identifier for the shipment status. - * @property {string[]} [bag_list] - A list of bags associated with the - * shipment, useful for tracking individual items within the shipment. - * @property {string} title - A brief title or label for the shipment status, - * summarizing its current state. - * @property {string} [display_name] - A user-friendly name or identifier for - * the shipment status. - * @property {string} [created_at] - Timestamp when the shipment was initially - * created.This timestamp is crucial for tracking the shipment's age, - * scheduling, and historical analysis. - * @property {string} [created_ts] - A general timestamp for when the shipment - * was created, formatted for internal processing. - * @property {string} [shipment_id] - A unique identifier for the shipment. - * @property {string} [status_created_at] - Timestamp when the transition for - * the status of the shipment was created. Date time in UTC timezone as per ISO format. - * @property {string} [updated_ts] - A general timestamp indicating when the - * status was updated, useful for processing and tracking. - * @property {string} status - This key denotes the status of the shipment, - * providing a clear indication of its current processing stage. + * @property {string} [current_shipment_status] + * @property {Object} [meta] + * @property {number} [shipment_status_id] + * @property {string[]} [bag_list] + * @property {string} title + * @property {string} [created_at] + * @property {string} [created_ts] + * @property {string} [shipment_id] + * @property {string} [status_created_at] + * @property {string} [status_created_ts] + * @property {string} status */ /** * @typedef UserDataInfo - * @property {number} [id] - The unique identifier associated with the user. - * @property {string} [user_oid] - The object ID for the user, used for - * referencing the user in various operations. - * @property {string} [mongo_user_id] - The identifier for the user. - * @property {string} [external_customer_id] - The identifier for the user in - * external systems. - * @property {string} [first_name] - The first name of the user. - * @property {string} [last_name] - The last name of the user. - * @property {string} [mobile] - The mobile phone number of the user. - * @property {string} [email] - The email address of the user. - * @property {string} [meta] - Additional metadata related to the user. - * @property {boolean} [is_anonymous_user] - Indicates whether the user is an - * anonymous user (true) or registered (false). - * @property {string} [name] - A full name of the user, which may be a - * combination of first and last name. - * @property {string} [gender] - The gender of the user. - * @property {string} [country_phone_code] - The country-specific phone code, - * useful for formatting mobile numbers correctly. - */ - -/** - * @typedef Address - * @property {string} [phone] - The phone number at the address, used for - * contact purposes. - * @property {string} [address2] - An optional additional field for the street - * address of the address. - * @property {string} [address] - An optional additional field for the street - * address of the address. - * @property {number} [longitude] - The longitude coordinate of the address. - * @property {string} [pincode] - The postal code of the address. - * @property {string} [area] - Area details of the address. - * @property {string} [address_type] - The type of the address. - * @property {string} [country] - The name of the country of the address. - * @property {string} [address_category] - Category or classification of the - * address. The address_category field that includes "store", "delivery", and - * "billing" serves to classify addresses based on various business processes. - * addresses based on various business processes - * - * - 'store': Identifies addresses associated with physical retail locations or - * warehouses which is essential for inventory management, order - * fulfillment, and facilitating in-store pickups or returns. - * - 'delivery': Identifies addresses where orders are shipped to customers which - * ensures successful delivery, enhancing customer satisfaction, and - * optimizing logistics operations. - * - 'billing': Identifies addresses used for billing and financial transactions - * which are essential for payment processing, invoice generation, and - * maintaining financial accuracy - * - * @property {string} [email] - The email of the person associated with the order. - * @property {string} [created_at] - Created at date for address - * @property {string} [address1] - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like {address} {address2} - * {area} {state} {country}, Address1 compiles all into a single formatted string. - * @property {string} [display_address] - A formatted version of the address for - * display purposes. - * @property {string} [landmark] - A notable landmark near the address, aiding - * in location identification. - * @property {string} [updated_at] - Updated at date for address - * @property {string} [version] - The version number of the address record - * @property {number} [latitude] - The latitude coordinate of the address. - * @property {string} [contact_person] - The full name of the person associated - * with the address. - * @property {string} [state] - The name of the region (for example, province, - * state, or prefecture) of the address. - * @property {string} [city] - The city, town of the address. - * @property {string} [area_code_slug] - A slug representation of the area code. - * @property {string} [country_code] - A code representing the country for the address. - * @property {string} [country_iso_code] - The ISO code representing the country - * for the address. - * @property {string} [country_phone_code] - The country-specific phone code for - * formatting phone numbers. - * @property {string} [delivery_address_id] - A unique identifier for the - * delivery address. - * @property {Object} [geo_location] - An object containing additional - * geographical information related to the address. - * @property {string} [name] - A unique identifier for the name associated with - * the address. - * @property {string} [sector] - The sector or zone of the address, if applicable. - * @property {string} [state_code] - A code representing the state or region for - * the address. - * @property {string} [uid] - A unique identifier for the user associated with - * the address. - * @property {string} [user_id] - The unique identifier of the user in the system. + * @property {number} [uid] + * @property {string} [user_oid] + * @property {string} [external_customer_id] + * @property {string} [first_name] + * @property {string} [last_name] + * @property {string} [mobile] + * @property {string} [email] + * @property {boolean} [is_anonymous_user] + * @property {string} [avis_user_id] + * @property {string} [name] + * @property {string} [gender] + */ + +/** + * @typedef PlatformDeliveryAddress + * @property {string} [phone] + * @property {string} [address2] + * @property {number} [longitude] + * @property {string} [pincode] + * @property {string} [area] + * @property {string} [address_type] + * @property {string} [country] + * @property {string} [address_category] + * @property {string} [email] + * @property {string} [created_at] + * @property {string} [address1] + * @property {string} [display_address] + * @property {string} [landmark] + * @property {string} [updated_at] + * @property {string} [version] + * @property {number} [latitude] + * @property {string} [contact_person] + * @property {string} [state] + * @property {string} [city] */ /** * @typedef ShipmentListingChannel - * @property {string} [channel_shipment_id] - A unique identifier for the - * shipment associated with a specific channel, facilitating tracking and management. - * @property {boolean} [is_affiliate] - Indicates whether the shipment is - * associated with an affiliate program, which may affect processing and fulfillment. - * @property {string} [logo] - A URL or path to the logo of the shipment - * channel, used for branding and identification purposes. - * @property {string} [name] - The name of the shipment channel, providing a - * human-readable reference for the channel through which the shipment is processed. + * @property {string} [channel_shipment_id] + * @property {boolean} [is_affiliate] + * @property {string} [logo] + * @property {string} [name] */ /** * @typedef Prices - * @property {number} [refund_credit] - Refund credits applicable to the - * customer in case of returns or cancellations. - * @property {number} [amount_paid_roundoff] - Total amount paid, rounded off to - * the nearest integer. - * @property {number} [price_effective] - Effective price after applying - * discounts to the MRP (Maximum Retail Price). - * @property {number} [promotion_effective_discount] - Discount amount provided - * through promotions applicable to the purchase. - * @property {number} [pm_price_split] - Updated selling price of the product in - * the event of repricing. - * @property {number} [refund_amount] - Total amount to be refunded in case of - * cancellation or return. - * @property {number} [transfer_price] - Fixed selling price applicable for - * payouts by the brand to the platform. - * @property {number} [coupon_effective_discount] - Discount amount applicable - * when using a coupon. - * @property {number} [tax_collected_at_source] - Tax amount collected at the - * source during the transaction. - * @property {number} [brand_calculated_amount] - Calculated price after - * deducting coupon and promotion discounts from the effective price. - * @property {number} [delivery_charge] - Fee charged for delivery, as - * stipulated by the delivery partner. - * @property {number} [cashback] - Cashback points or amount provided to the - * customer post-purchase. - * @property {number} [value_of_good] - Effective selling price minus the GST - * amount applicable to the product. - * @property {number} [cashback_applied] - Actual cashback value that has been - * applied to the purchase. - * @property {number} [cod_charges] - Charges applicable for Cash on Delivery - * (COD) orders. - * @property {number} [price_marked] - The marked price of the item before any - * discounts or adjustments. - * @property {number} [amount_paid] - Total amount actually paid by the customer - * for the purchase. - * @property {number} [coupon_value] - The effective value of the coupon applied - * to the transaction. - * @property {number} [discount] - Total discount amount deducted from the - * original price of the product. - * @property {number} [fynd_credits] - Credits awarded by Fynd, which can be - * used for future purchases. - * @property {number} [gift_price] - The amount associated with any gift card - * used in the transaction. - * @property {number} [amount_to_be_collected] - Total amount to be collected in - * scenarios involving multiple payment methods. - */ - -/** - * @typedef ChargeDistributionSchema - * @property {string} type - This field defines the distribution type, e.g - * values('multi', 'single') multi: distribute the changes across all entity - * single: distribute the changes across to any one single entity - * @property {string} logic - This field defines the distribution logic e.g - * values('apportion', 'equally') apportion: distribute charge amount based of - * weighted average amount of all the entity (like article with [10, 20] will - * get charge of 9 as [3, 6]) equally: distribute charge amount 'equally' to - * all the entity - */ - -/** - * @typedef ChargeDistributionLogic - * @property {ChargeDistributionSchema} distribution - * @property {string} distribution_level - This field defines the distribution - * level, e.g distribution level is (order, shipment, article) - */ - -/** - * @typedef ChargeAmountCurrency - * @property {number} value - Charge currency value or amount - * @property {string} currency - Charge currency code - */ - -/** - * @typedef ChargeAmount - * @property {ChargeAmountCurrency} base_currency - * @property {ChargeAmountCurrency} ordering_currency - */ - -/** - * @typedef PriceAdjustmentCharge - * @property {string} [code] - Code defined for charge - * @property {string} name - Display name for charge (charge is unique by the name) - * @property {string} [type] - Type defined for charge - * @property {ChargeAmount} amount - * @property {ChargeDistributionLogic} distribution_logic - */ - -/** - * @typedef OrderingCurrencyPrices - * @property {number} [refund_credit] - Amount of refund credits applicable to - * the customer's account for returned items or cancellations. - * @property {number} [amount_paid_roundoff] - Total amount paid by the - * customer, rounded off to the nearest integer for ease of processing. - * @property {number} [price_effective] - Final effective price of the product - * after applying discounts to the marked retail price (MRP). - * @property {number} [promotion_effective_discount] - Total discount amount - * applied through promotional offers specific to the customer's purchase. - * @property {number} [pm_price_split] - Updated selling price of the product - * after any repricing adjustments made before the sale. - * @property {number} [refund_amount] - Amount that will be refunded to the - * customer in case of order cancellation or product return. - * @property {number} [transfer_price] - Fixed price set for payouts by the - * brand, representing the cost to the retailer or affiliate. - * @property {number} [coupon_effective_discount] - Discount value realized - * through the use of a coupon code applied at the time of purchase. - * @property {number} [tax_collected_at_source] - Total tax amount that is - * collected at the point of sale, often applicable for tax regulations. - * @property {number} [brand_calculated_amount] - Amount calculated by the brand - * after applying any relevant coupons and promotions to the base price. - * @property {number} [delivery_charge] - Cost charged for the delivery service, - * as determined by the delivery partner handling the shipment. - * @property {number} [cashback] - Points or monetary value returned to the - * customer as a reward for their purchase, which can be used for future transactions. - * @property {number} [value_of_good] - Net selling price of the product after - * excluding the GST (Goods and Services Tax) amount from the total. - * @property {number} [cashback_applied] - Total cashback value that has been - * applied to the customer's account or to the current transaction. - * @property {number} [cod_charges] - Additional fee charged for orders placed - * via cash on delivery (COD) payment method. - * @property {number} [price_marked] - The original price indicated for the - * product before any discounts or promotions are applied. - * @property {number} [amount_paid] - The total amount the customer has paid for - * their order, including all applicable charges and discounts. - * @property {number} [coupon_value] - The specific value of the coupon used in - * the transaction, reflecting its impact on the total price. - * @property {number} [discount] - Total amount discounted from the original - * price of the product, reflecting savings for the customer. - * @property {number} [fynd_credits] - Credits provided by Fynd, which can be - * used for discounts on future purchases. - * @property {number} [gift_price] - Monetary value assigned to a gift card - * purchased by the customer, usable for future transactions. - * @property {number} [amount_to_be_collected] - Amount to be collected from the - * customer when multiple payment methods are utilized for a single order. + * @property {number} [refund_credit] + * @property {number} [amount_paid_roundoff] + * @property {number} [price_effective] + * @property {number} [promotion_effective_discount] + * @property {number} [pm_price_split] + * @property {number} [refund_amount] + * @property {number} [transfer_price] + * @property {number} [coupon_effective_discount] + * @property {number} [tax_collected_at_source] + * @property {number} [brand_calculated_amount] + * @property {number} [delivery_charge] + * @property {number} [cashback] + * @property {number} [value_of_good] + * @property {number} [cashback_applied] + * @property {number} [cod_charges] + * @property {number} [price_marked] + * @property {number} [amount_paid] + * @property {number} [coupon_value] + * @property {number} [discount] + * @property {number} [fynd_credits] + * @property {number} [gift_price] + * @property {number} [amount_to_be_collected] */ /** * @typedef Identifier - * @property {string} [alu] - The ALU (Article Level Unit) code used to identify - * the item at a detailed level, often specific to certain retail or - * distribution systems. - * @property {string} [ean] - The European Article Number (EAN) is a unique - * identifier for products, primarily used in retail and logistics. It helps - * in tracking and managing inventory across various platforms. - * @property {string} [sku_code] - The Stock Keeping Unit (SKU) code of the item - * - uniquely identifies each distinct product. SKUs are used to track - * inventory levels, facilitate accurate stocktaking, and streamline order - * fulfillment processes. This code is essential for inventory management, - * allowing for the differentiation between products based on attributes such - * as price, color, and size. - * @property {string} [upc] - The Universal Product Code (UPC) is a barcode - * symbol used for tracking trade items in stores. It is widely used in North - * America and helps in identifying products quickly during point-of-sale transactions. - * @property {string} [isbn] - The International Standard Book Number (ISBN) is - * a unique identifier for books, allowing for easier management and tracking - * of book inventories in retail and library systems. + * @property {string} [alu] + * @property {string} [ean] + * @property {string} [sku_code] + * @property {string} [upc] + * @property {string} [isbn] */ /** * @typedef FinancialBreakup - * @property {number} refund_credit - The amount of refund credits applicable - * for the transaction. - * @property {number} [amount_paid_roundoff] - Total amount paid, rounded off to - * the nearest integer for billing purposes. - * @property {number} price_effective - The effective price after applying - * discounts and before any taxes. - * @property {number} promotion_effective_discount - The amount of discount - * applied from promotional offers. - * @property {number} transfer_price - The fixed selling price applicable for - * payouts by the brand. - * @property {number} coupon_effective_discount - The discount applied through a - * coupon code, if applicable. - * @property {number} gst_fee - Total Goods and Services Tax (GST) fee charged - * on the goods or services. - * @property {number} [tax_collected_at_source] - Tax amount collected at the - * source of income or transaction. - * @property {number} brand_calculated_amount - Amount calculated by the brand, - * possibly reflecting various costs or fees. - * @property {number} delivery_charge - Fee applicable for the delivery of the goods. - * @property {string} gst_tag - A tag used to denote GST-related attributes or - * classifications. - * @property {string} hsn_code - The HSN Code (Harmonized System of Nomenclature - * Code) is an internationally standardized system for classifying goods, used - * in trade and commerce for uniform identification across different countries. - * @property {number} cashback - The cashback amount provided to the customer, - * if applicable. - * @property {string} item_name - The name or description of the item related to - * the financial breakup. - * @property {number} value_of_good - The assessed value of the goods before - * applying any taxes or fees. - * @property {number} cashback_applied - The effective cashback value that has - * been applied to the transaction. - * @property {number} cod_charges - Charges applicable for Cash on Delivery (COD) orders. - * @property {number} price_marked - The indicated price or value assigned to an - * item before any discounts or adjustments. - * @property {string} size - The size of the item, if applicable. - * @property {number} amount_paid - Total amount paid by the customer for the transaction. - * @property {number} coupon_value - The effective value of the coupon used in - * the transaction. - * @property {number} discount - Total amount discounted from the original price - * of the goods. - * @property {number} fynd_credits - Credits provided by Fynd to the customer, - * possibly as part of a rewards program. - * @property {number} gst_tax_percentage - The percentage of GST applicable on - * the goods or services. - * @property {number} [amount_to_be_collected] - Amount to be collected in case - * of multiple modes of payments. + * @property {number} refund_credit + * @property {number} [amount_paid_roundoff] + * @property {number} price_effective + * @property {number} promotion_effective_discount + * @property {number} transfer_price + * @property {number} coupon_effective_discount + * @property {number} gst_fee + * @property {number} [tax_collected_at_source] + * @property {number} brand_calculated_amount + * @property {number} delivery_charge + * @property {string} gst_tag + * @property {string} hsn_code + * @property {number} cashback + * @property {string} item_name + * @property {number} value_of_good + * @property {number} cashback_applied + * @property {number} cod_charges + * @property {number} price_marked + * @property {string} size + * @property {number} amount_paid + * @property {number} coupon_value + * @property {number} discount + * @property {number} fynd_credits + * @property {number} gst_tax_percentage + * @property {number} [amount_to_be_collected] * @property {Identifier} identifiers - * @property {number} total_units - The total number of units involved in the transaction. - * @property {boolean} added_to_fynd_cash - Indicates whether the amount has - * been added to Fynd cash for future use. + * @property {number} total_units + * @property {boolean} added_to_fynd_cash */ /** * @typedef GSTDetailsData - * @property {number} [cgst_tax_percentage] - The percentage of Central Goods - * and Services Tax (CGST) applicable on the goods or services. - * @property {string} [gstin_code] - A GST Number (Goods and Services Tax - * Identification Number, often abbreviated as GSTIN) is a unique identifier - * assigned to a business or individual registered under the Goods and - * Services Tax (GST) system in countries like India. The GST number is - * essential for businesses to comply with tax regulations and for the - * government to track tax payments and returns. - * @property {number} value_of_good - The assessed value of the goods before - * applying any taxes or fees. - * @property {number} gst_fee - The total GST fee charged on the goods or services. - * @property {number} [igst_tax_percentage] - The percentage of Integrated Goods - * and Services Tax (IGST) applicable for inter-state transactions. - * @property {number} [gst_tax_percentage] - The overall GST tax percentage - * applicable to the goods or services. - * @property {string} [hsn_code_id] - Unique identifier for the Harmonized - * System of Nomenclature (HSN) code used to classify goods. - * @property {number} [igst_gst_fee] - The GST fee applicable for IGST, usually - * for inter-state transactions. - * @property {boolean} [is_default_hsn_code] - Indicates whether this HSN code - * is the default classification for the goods. - * @property {number} [sgst_gst_fee] - The GST fee applicable for State Goods - * and Services Tax (SGST). - * @property {number} tax_collected_at_source - Tax amount collected at the - * source of income or transaction, often for compliance and revenue tracking. - * @property {number} brand_calculated_amount - Amount calculated by the brand, - * potentially reflecting costs, fees, or pricing structures. - * @property {number} [cgst_gst_fee] - The GST fee applicable for CGST. - * @property {string} [gst_tag] - A tag or label used to denote GST-related - * attributes or classifications. - * @property {number} [sgst_tax_percentage] - The percentage of State Goods and - * Services Tax (SGST) applicable on the goods or services. - * @property {string} [hsn_code] - The HSN Code (Harmonized System of - * Nomenclature Code) is an internationally standardized system for - * classifying goods. It is used in trade and commerce to identify products - * and services uniformly across different countries and industries. The - * system was developed by the World Customs Organization (WCO) and is widely - * used in customs processes and tax systems. + * @property {number} [cgst_tax_percentage] + * @property {string} [gstin_code] + * @property {number} value_of_good + * @property {number} gst_fee + * @property {number} [igst_tax_percentage] + * @property {number} [gst_tax_percentage] + * @property {string} [hsn_code_id] + * @property {number} [igst_gst_fee] + * @property {boolean} [is_default_hsn_code] + * @property {number} [sgst_gst_fee] + * @property {number} tax_collected_at_source + * @property {number} brand_calculated_amount + * @property {number} [cgst_gst_fee] + * @property {string} [gst_tag] + * @property {number} [sgst_tax_percentage] + * @property {string} [hsn_code] */ /** * @typedef BagStateMapper - * @property {boolean} [is_active] - Indicates whether the state is currently - * active in the shipment process. - * @property {string} [app_display_name] - Display name used in the application - * to represent this state. - * @property {string} state_type - Serves as a key identifier to differentiate - * among the diverse types of states a shipment can undergo throughout its journey. - * - * - 'operational': Pertains to states that involve the physical handling and - * movement of the shipment, such as packing, in transit, and delivery. - * - 'financial': Relates to states associated with the payment, invoicing, and - * any monetary transactions or obligations tied to the shipment. - * - 'logistics': Encompasses states that deal with the broader logistical - * planning and coordination necessary for the shipment's journey, - * including route optimization and carrier selection. - * + * @property {boolean} [is_active] + * @property {string} [app_display_name] + * @property {string} state_type * @property {number} id - * @property {string} journey_type - It is a type being used to represent the - * journey of shipment through the performed status transition. Forward - * Journey: The forward journey encompasses all the stages of shipping, - * including order placement, packing, dispatch, in-transit updates, and - * delivery. Return Journey: Contrary to the forward journey, the return - * journey involves the process of sending items back from the customer to the - * original sender or a designated return facility. - * @property {string} [app_state_name] - The name of the state as used within - * the application, providing a clear reference. - * @property {string} name - Official name of the state in the context of the - * shipment process. - * @property {boolean} [app_facing] - Indicates if this state is visible to the - * customer in the application. - * @property {boolean} [notify_customer] - Indicates whether the customer should - * be notified upon reaching this state. - * @property {string} display_name - User-friendly name for the state, suitable - * for display purposes. + * @property {string} journey_type + * @property {string} [app_state_name] + * @property {string} name + * @property {boolean} [app_facing] + * @property {boolean} [notify_customer] + * @property {string} display_name */ /** * @typedef BagStatusHistory - * @property {boolean} [forward] - Indicates whether the bag is being forwarded - * to the next stage in the shipment process. - * @property {number} [store_id] - Unique identifier for the store associated - * with the bag's current status. - * @property {string} [delivery_awb_number] - The Air Waybill (AWB) number used - * for tracking the delivery of the bag. - * @property {boolean} [kafka_sync] - Indicates if the status update has been - * synchronized with Kafka for real-time processing. - * @property {number} [delivery_partner_id] - Identifier for the delivery - * partner responsible for the shipment. - * @property {string} [app_display_name] - The display name of the application - * that is handling the bag status update. - * @property {number} [state_id] - Unique identifier for the current state of - * the bag in the shipment process. - * @property {string} [state_type] - Serves as a key identifier to differentiate - * among the diverse types of states a shipment can undergo throughout its journey. - * @property {number} [bsh_id] - Unique identifier for the bag status history entry. - * @property {string} [created_at] - Timestamp when the bag status history - * transaction was created. - * @property {string} [created_ts] - Timestamp of creation in a different - * format, if applicable. - * @property {string} [shipment_id] - Identifier for the shipment associated - * with this bag status entry. - * @property {string} [updated_at] - Timestamp when the bag status history - * transaction was last updated. - * @property {string} [updated_ts] - Timestamp of last update in a different - * format, if applicable. + * @property {boolean} [forward] + * @property {number} [store_id] + * @property {string} [delivery_awb_number] + * @property {boolean} [kafka_sync] + * @property {number} [delivery_partner_id] + * @property {string} [app_display_name] + * @property {number} [state_id] + * @property {string} [state_type] + * @property {number} [bsh_id] + * @property {string} [created_at] + * @property {string} [created_ts] + * @property {string} [shipment_id] + * @property {string} [updated_at] + * @property {string} [updated_ts] * @property {BagStateMapper} [bag_state_mapper] - * @property {number} [bag_id] - Unique identifier for the bag whose status is - * being tracked. - * @property {Object[]} [reasons] - List of reasons associated with the current - * status of the bag. - * @property {string} status - Current status of the bag in the shipment process. - * @property {string} [display_name] - User-friendly name that describes the - * current state of the bag. + * @property {number} [bag_id] + * @property {Object[]} [reasons] + * @property {string} status + * @property {string} [display_name] */ /** * @typedef Dimensions - * @property {number} [height] - The height measurement of the object, typically - * representing the vertical dimension. - * @property {number} [width] - The width measurement of the object, indicating - * the horizontal dimension. - * @property {boolean} [is_default] - A flag indicating whether these dimensions - * are the default measurements for the object. - * @property {string} [unit] - The unit of measurement used for the dimensions - * (e.g., centimeters, inches). - * @property {number} [length] - The length measurement of the object, - * representing the longest dimension. + * @property {number} [height] + * @property {number} [width] + * @property {boolean} [is_default] + * @property {string} [unit] + * @property {number} [length] */ /** * @typedef ReturnConfig - * @property {boolean} [returnable] - Indicates whether the article is eligible - * for return, allowing customers to send it back under specified conditions. - * @property {number} [time] - The time frame within which the return must be - * initiated, typically measured in days. - * @property {string} [unit] - The unit of time for the return period (e.g., days, weeks). + * @property {boolean} [returnable] + * @property {number} [time] + * @property {string} [unit] */ /** * @typedef Weight - * @property {boolean} [is_default] - Indicates whether this weight value is the - * default weight used for the article. - * @property {number} [shipping] - The weight of the article specifically for - * shipping purposes, usually measured in grams or kilograms. - * @property {string} [unit] - The unit of measurement for the weight (e.g., - * grams, kilograms, pounds). + * @property {boolean} [is_default] + * @property {number} [shipping] + * @property {string} [unit] */ /** * @typedef Article - * @property {Object} [child_details] - Contains a flexible set of key-value - * pairs representing detailed information about the article's child entities, - * including dimensions (width, height, length), weight, and unique - * identifiers (EAN, article code, seller identifier) for each child entity. - * @property {string} seller_identifier - Unique identifier assigned by the - * seller to the article, used for inventory management. - * @property {string} uid - A unique identifier for the article within the system. - * @property {Object} [set] - Represents the data related to combinations of - * articles that, while being the same product, vary by size, color, or other - * distinguishing features. + * @property {Object} [child_details] + * @property {string} seller_identifier + * @property {string} uid + * @property {Object} [a_set] * @property {Dimensions} [dimensions] - * @property {Object} [currency] - Currency in which the transaction amount - * associated with the article is specified. - * @property {boolean} [esp_modified] - Indicates whether the article has been - * modified by the ESP (e-commerce service provider). - * @property {ReturnConfig} [return_config] - Configuration related to the - * return policy for the article. - * @property {string} [code] - Internal code or identifier for the article, used - * for reference. + * @property {Object} [currency] + * @property {boolean} [esp_modified] + * @property {ReturnConfig} [return_config] + * @property {string} [code] * @property {Weight} [weight] - * @property {string} _id - The unique identifier for the article within the database. - * @property {Object} identifiers - Details of identifiers associated with the - * article, including SKU codes and other relevant identifiers. - * @property {string} [raw_meta] - Raw metadata associated with the article, - * providing additional context or information. - * @property {string} size - Size of the article, which may vary for clothing, - * accessories, etc. - * @property {boolean} [is_set] - Indicates whether the article is part of a set - * or collection. - * @property {string[]} [tags] - Tags associated with the article for - * categorization and search optimization. + * @property {string} _id + * @property {Object} identifiers + * @property {string} [raw_meta] + * @property {string} size + * @property {boolean} [is_set] + * @property {string[]} [tags] */ /** * @typedef ShipmentListingBrand - * @property {string} [logo] - URL or path to the logo image of the brand - * associated with the shipment. - * @property {string} [created_on] - Timestamp indicating when the brand of the - * shipment was created, formatted as date-time. - * @property {string} [name] - The name of the brand linked to the shipment. - * @property {string} [logo_base64] - Base64 encoded string of the brand's logo - * image, allowing for direct embedding in documents or applications. + * @property {string} [logo] + * @property {string} [created_on] + * @property {string} [name] + * @property {string} [logo_base64] */ /** * @typedef ReplacementDetails - * @property {string} [replacement_type] - Specifies the nature or category of - * the replacement requested or processed for an item. - * @property {string} [original_affiliate_order_id] - The original order ID - * associated with the item that is being replaced. + * @property {string} [replacement_type] + * @property {string} [original_affiliate_order_id] */ /** * @typedef AffiliateMeta - * @property {string} [order_item_id] - A unique identifier for the order item - * associated with the affiliate shipment. - * @property {string} [channel_order_id] - The order ID assigned by the sales - * channel for tracking purposes. - * @property {number} [employee_discount] - The discount percentage or amount - * applied to the order for employees. - * @property {string} [box_type] - Box type of the shipment in which the - * shipment will be delivered. - * @property {number} [quantity] - The total quantity of items in the order. - * @property {number} [size_level_total_qty] - The total quantity of items - * grouped by size level for the order. - * @property {number} [loyalty_discount] - The discount percentage or amount - * applied to the order based on customer loyalty. + * @property {string} [order_item_id] + * @property {string} [channel_order_id] + * @property {number} [employee_discount] + * @property {string} [box_type] + * @property {number} [quantity] + * @property {number} [size_level_total_qty] + * @property {number} [loyalty_discount] * @property {ReplacementDetails} [replacement_details] - * @property {string} [channel_shipment_id] - The shipment ID assigned by the - * sales channel for tracking purposes. - * @property {string} [marketplace_invoice_id] - The invoice ID related to the - * marketplace for the transaction. - * @property {string} [due_date] - Specifies the deadline by which a particular - * action related to the affiliate shipment needs to be completed. - * @property {string} [coupon_code] - A unique code provided to customers for - * redeeming special offers or discounts on their purchases. - * @property {boolean} [is_priority] - Indicates whether the shipment is a - * priority for fulfillment. - * @property {boolean} [is_serial_number_required] - Indicates whether a serial - * number is required for the items in the shipment. - * @property {number} [fulfilment_priority] - A value indicating the priority - * level of order fulfillment. - * @property {number} [customer_selling_price] - The selling price at which the - * product is offered to the customer. + * @property {string} [channel_shipment_id] + * @property {string} [marketplace_invoice_id] + * @property {string} [due_date] + * @property {string} [coupon_code] + * @property {boolean} [is_priority] + * @property {boolean} [is_serial_number_required] + * @property {number} [fulfilment_priority] + * @property {number} [customer_selling_price] */ /** * @typedef AffiliateBagDetails * @property {AffiliateMeta} affiliate_meta - * @property {string} affiliate_order_id - Unique identifier for the affiliate - * order associated with the bag. - * @property {number} [employee_discount] - Discount percentage or amount - * applicable to employees for this order. - * @property {string} affiliate_bag_id - Unique identifier for the affiliate - * bag, used for tracking and reference. - * @property {number} [loyalty_discount] - Discount amount applied based on - * customer loyalty, if applicable. + * @property {string} affiliate_order_id + * @property {number} [employee_discount] + * @property {string} affiliate_bag_id + * @property {number} [loyalty_discount] */ /** * @typedef PlatformArticleAttributes - * @property {string} [currency] - The currency in which the price of the - * article is specified. + * @property {string} [currency] */ /** * @typedef PlatformItem - * @property {number} [id] - Unique identifier for the platform item. + * @property {number} [id] * @property {PlatformArticleAttributes} [attributes] - * @property {number} [brand_id] - Identifier for the brand associated with the item. - * @property {string} [slug_key] - A user-friendly string that represents the - * item, often used in URLs. - * @property {number} [l3_category] - Represents the product's classification at - * the third level in the e-commerce platform's category hierarchy, using an - * integer identifier. - * @property {string} [l3_category_name] - Name of the third-level category - * under which the product is listed. - * @property {string} [last_updated_at] - Timestamp when any aspect of the - * associated record was modified, formatted as date-time. - * @property {string} [name] - The name of the product item. - * @property {string[]} [l2_category] - Represents the second level of - * categorization for items, helping customers narrow down their search. - * @property {string} [brand] - Name of the brand associated with the item. - * @property {string[]} [image] - Array of image URLs representing the item. - * @property {string} [code] - Unique code for the item, often used for - * inventory management. - * @property {string[]} [l1_category] - Represents the highest or top-tier level - * of categorization for the product. - * @property {string} [size] - Size specification of the product, if applicable. - * @property {boolean} [can_cancel] - Indicates whether the item can be canceled - * after order placement. - * @property {boolean} [can_return] - Indicates whether the item is eligible for return. - * @property {string} [branch_url] - URL linking to a specific branch or store - * where the item is available. - * @property {Object} [meta] - Meta data containing additional, dynamic - * information about the item. - * @property {string} [color] - Color specification of the product, if applicable. - * @property {number} [department_id] - Identifier for the department associated - * with the product. - * @property {string[]} [images] - Array of image URLs representing different - * views or angles of the item. + * @property {number} [brand_id] + * @property {string} [slug_key] + * @property {number} [l3_category] + * @property {string} [l3_category_name] + * @property {string} [last_updated_at] + * @property {string} [name] + * @property {string[]} [l2_category] + * @property {string} [brand] + * @property {string[]} [image] + * @property {string} [code] + * @property {string[]} [l1_category] + * @property {string} [size] + * @property {boolean} [can_cancel] + * @property {boolean} [can_return] + * @property {string} [branch_url] + * @property {Object} [meta] + * @property {string} [color] + * @property {number} [department_id] + * @property {string[]} [images] */ /** * @typedef Dates - * @property {string} [delivery_date] - Represents the scheduled date and time - * for the delivery of the entity. + * @property {string} [delivery_date] * @property {string} [order_created] */ /** * @typedef BagReturnableCancelableStatus - * @property {boolean} is_returnable - Indicates whether the bag can be returned - * by the customer. - * @property {boolean} is_active - Specifies if the current status of the bag is - * active, affecting its eligibility for return or cancellation. - * @property {boolean} can_be_cancelled - Indicates if the bag order can be - * cancelled by the customer. - * @property {boolean} enable_tracking - Indicates whether tracking is enabled - * for the bag, allowing customers to monitor its status. - * @property {boolean} is_customer_return_allowed - Specifies if the customer is - * permitted to return the bag, based on the return policy. + * @property {boolean} is_returnable + * @property {boolean} is_active + * @property {boolean} can_be_cancelled + * @property {boolean} enable_tracking + * @property {boolean} is_customer_return_allowed */ /** * @typedef BagUnit - * @property {string} [bag_type] - Specifies the type or category of the bag. + * @property {string} [bag_type] * @property {GSTDetailsData} [gst] * @property {FinancialBreakup[]} financial_breakup - * @property {string} [bag_expiry_date] - Indicates the date and time when the - * contents of a bag, or the bag itself, are no longer considered valid or - * safe for use. This is particularly relevant in contexts where the bag - * contains perishable goods, sensitive materials, or items with a limited shelf life + * @property {string} [bag_expiry_date] * @property {BagStatusHistory[]} [bag_status] * @property {BagStatusHistory} current_operational_status * @property {Article} [article] * @property {ShipmentListingBrand} [brand] * @property {AffiliateBagDetails} [affiliate_bag_details] * @property {PlatformItem} [item] - * @property {Object[]} [reasons] - A collection of reasons associated with the - * bag, which could pertain to returns, cancellations, or other relevant contexts. - * @property {number} product_quantity - The total quantity of products - * contained within the bag. - * @property {boolean} [can_return] - Indicates whether the items in the bag are - * eligible for return. - * @property {string} [display_name] - A user-friendly name or label for the - * bag, which may be displayed in interfaces. - * @property {boolean} [can_cancel] - Indicates whether the bag or its contents - * can be canceled. - * @property {string} [size] - Specifies the size of the bag, which may be - * relevant for packaging or shipping considerations. - * @property {number} [line_number] - Represents the line number in an order or - * transaction associated with the bag. - * @property {Object} [meta] - Meta data of the bag contains additional, - * potentially dynamic information about the bag. + * @property {Object[]} [reasons] + * @property {number} product_quantity + * @property {boolean} [can_return] + * @property {string} [display_name] + * @property {boolean} [can_cancel] + * @property {string} [size] + * @property {number} [line_number] + * @property {Object} [meta] * @property {Prices} [prices] - * @property {OrderingCurrencyPrices} [ordering_currency_prices] * @property {Dates} [dates] * @property {BagStatusHistory} current_status - * @property {number} bag_id - Unique identifier for the bag. - * @property {string} [entity_type] - Specifies the type of entity. + * @property {number} bag_id + * @property {string} [entity_type] * @property {BagReturnableCancelableStatus} status */ /** * @typedef ShipmentItemFulFillingStore - * @property {string} [phone] - Contact number for the fulfilling store, - * allowing customers to reach out for inquiries or assistance. - * @property {string[]} [brand_store_tags] - Tags associated with the brand - * store, providing additional categorization or identification of the store's - * attributes. - * @property {string} [pincode] - Postal code for the fulfilling store's - * location, essential for identifying the specific area and ensuring accurate - * deliveries. - * @property {Object} [meta] - Meta data of the fulfilling store that contains - * additional, potentially dynamic information about the fulfilling store. - * @property {string} [address] - Comprehensive address details of the - * fulfilling store, including all necessary components for locating the store. - * @property {string} [address1] - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like Address1 compiles all into - * a single formatted string. The address is formed by the template provided - * and whichever keys are present in the template are populated as is from - * store address fields. Template Example: {address} {address2}_{area} - * {state}_{country}, - * @property {string} [display_address] - A user-friendly formatted version of - * the store's address for display purposes, making it easier for customers to read. - * @property {string} [location_type] - Type of location of the fulfilling store. - * @property {number} id - Unique identifier for the fulfilling store in the database. - * @property {string} code - A specific code assigned to the store, often used - * for internal tracking or categorization purposes. - * @property {string} [store_email] - Email address for the fulfilling store, - * allowing for electronic communication and inquiries. - * @property {string} [name] - The name of the fulfilling store, which helps - * customers identify the store. - * @property {string} [state] - The state where the fulfilling store is located, - * important for regional identification. - * @property {string} [city] - The city where the fulfilling store is situated, - * providing more specific location details. - * @property {string[]} [tags] - Additional tags associated with the store, used - * for categorization and filtering purposes. + * @property {string} [phone] + * @property {string[]} [brand_store_tags] + * @property {string} [pincode] + * @property {Object} [meta] + * @property {string} [address] + * @property {string} [address1] + * @property {string} [display_address] + * @property {string} [location_type] + * @property {number} id + * @property {string} code + * @property {string} [store_email] + * @property {string} [name] + * @property {string} [state] + * @property {string} [city] + * @property {string[]} [tags] */ /** * @typedef Currency - * @property {string} [currency_code] - This specifies the currency code for all - * amounts. The currency_code field will hold a string value representing the - * code for the currency in which all monetary amounts are denominated. This - * code typically follows the ISO 4217 standard, which uses three-letter - * alphabetic codes to define different currencies around the world. For - * example, 'USD' for United States Dollar, 'INR' for Indian Rupees. - * @property {string} [currency_symbol] - The symbol representing the currency. + * @property {string} [currency_code] + * @property {string} [currency_symbol] */ /** * @typedef OrderingCurrency - * @property {string} [currency_code] - This specifies the currency code for all amounts. - * @property {string} [currency_name] - The full name of the currency. - * @property {string} [currency_symbol] - The symbol representing the currency. - * @property {string} [currency_sub_unit] - The sub-unit of the currency + * @property {string} [currency_code] + * @property {string} [currency_name] + * @property {string} [currency_symbol] + * @property {string} [currency_sub_unit] */ /** * @typedef ConversionRate - * @property {string} [base] - The base currency code, example 'INR' for Indian - * Rupee, against which all conversion rates are calculated. Follows the ISO - * 4217 standard.This includes the currency's name, its conversion rate - * relative to the base currency ('value'), the currency symbol, and any - * sub-unit of the currency. This setup not only facilitates currency - * conversion but also enriches the data with useful currency descriptors, - * enhancing financial operations and analyses. - * @property {Object} [rates] - An object , where each key is a currency code - * and its value is an object containing detailed information about that - * currency. This includes the currency's name, its conversion rate relative - * to the base currency ('value'), the currency symbol, and any sub-unit of - * the currency. This setup not only facilitates currency conversion but also - * enriches the data with useful currency descriptors. + * @property {string} [base] + * @property {Object} [rates] */ /** @@ -3585,166 +2353,88 @@ const Joi = require("joi"); /** * @typedef ShipmentItem - * @property {string} [order_date] - Denotes the date and time when an order was - * placed by the customer. This timestamp is crucial for tracking the order' - * @property {string} [order_created_ts] - The timestamp indicating when the - * order was created. + * @property {string} [order_date] + * @property {string} [order_created_ts] * @property {ShipmentStatus} [shipment_status] * @property {UserDataInfo} [user] - * @property {string} [estimated_sla_time] - The estimated Service Level - * Agreement (SLA) time for the shipment. - * @property {string} [estimated_sla_ts] - The timestamp for the estimated SLA, - * providing a specific time for expected delivery. - * @property {Address} [delivery_address] - * @property {Address} [billing_address] - * @property {AffiliateDetails} [affiliate_details] - * @property {boolean} [is_active] - This flag denotes whether the shipment is - * active or not. + * @property {string} [estimated_sla_time] + * @property {string} [estimated_sla_ts] + * @property {PlatformDeliveryAddress} [delivery_address] * @property {ShipmentListingChannel} [channel] - * @property {string} [previous_shipment_id] - The ID of any previous shipment - * related to this order. - * @property {string} [forward_end_shipment_id] - The forward_end_shipment_id - * represents the shipment ID of the original forward journey shipment. When a - * shipment is transitioned to a return journey, the original shipment ID from - * the forward journey is recorded in the forward_end_shipment_id field of the - * return journey shipment. Even if the return shipment is later split into - * multiple shipments, each of these shipments will retain the same - * forward_end_shipment_id value that was assigned during the initial return - * journey initiation. This ensures that all return shipments can be traced - * back to the original forward journey shipment. - * @property {boolean} [lock_status] - Indicates whether the shipment is - * currently locked for processing (true) or not (false). - * @property {string} [invoice_id] - The ID of the invoice associated with the shipment. - * @property {Object} [payment_methods] - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. This includes metadata such as logos, payment IDs, and - * merchant codes, as well as transaction-specific details like the payment - * mode, name, amount, and entities responsible for refunds and collections. - * The structure is designed to accommodate any number of payment methods, - * providing flexibility and comprehensive insights into each transaction's - * payment aspect. - * @property {Object[]} [payment_info] - An array of payment information items - * related to the shipment, detailing transaction specifics. - * @property {string} [status_created_at] - Date time in UTC timezone as per ISO format. - * @property {string} [status_created_ts] - The timestamp indicating when the - * current status was logged, usually in ISO 8601 format. - * @property {string} [display_name] - A user-friendly name or identifier for - * the shipment, useful for display purposes. - * @property {BagUnit[]} [bags] - An array of bags included in the shipment. + * @property {string} [previous_shipment_id] + * @property {boolean} [lock_status] + * @property {string} [invoice_id] + * @property {Object} [payment_methods] + * @property {Object[]} [payment_info] + * @property {string} [status_created_at] + * @property {string} [status_created_ts] + * @property {string} [display_name] + * @property {BagUnit[]} [bags] * @property {ShipmentItemFulFillingStore} [fulfilling_store] - * @property {Object} [meta] - Meta data of the item contains additional, - * potentially dynamic information about the item. - * @property {string} [payment_mode] - The mode of payment used for the shipment. - * @property {boolean} [can_process] - Indicates whether the shipment can - * currently be processed (true) or not (false). + * @property {Object} [meta] + * @property {string} [payment_mode] + * @property {boolean} [can_process] * @property {Prices} [prices] - * @property {OrderingCurrencyPrices} [ordering_currency_prices] - * @property {string} order_id - The unique identifier of the order for the shipment. - * @property {string} [ordering_channnel] - The channel used for ordering the shipment. - * @property {string} [shipment_id] - The unique identifier for the shipment itself. - * @property {string} [customer_note] - Any special notes or instructions - * provided by the customer related to the shipment. - * @property {number} total_bags - The total number of bags in the shipment. - * @property {string} shipment_created_at - Timestamp of the shipment created. - * @property {string} [mode_of_payment] - The method of payment used to create the order. - * @property {string} [shipment_created_ts] - The timestamp indicating when the - * shipment was created. + * @property {string} order_id + * @property {string} [ordering_channnel] + * @property {string} [shipment_id] + * @property {string} [customer_note] + * @property {number} total_bags + * @property {string} shipment_created_at + * @property {string} [mode_of_payment] + * @property {string} [shipment_created_ts] * @property {Currency} [currency] * @property {CurrencyInfo} [currency_info] * @property {boolean} [is_lapa_enabled] - Flag to show NDR actions based on * LAPA (Logistic As Per Actual) plan subscription. If LAPA plan taken, true, * else false. - * @property {Object} [logistics_meta] - An object storing detailed - * logistics-related information, including courier partner details and other - * relevant metadata. */ /** - * @typedef ShipmentInternalPlatformViewResponseSchema - * @property {number} [total_count] - The total number of shipments matching the - * query criteria. - * @property {string} [message] - A message providing additional context about - * the response. - * @property {boolean} [success] - Indicates whether the API call was successful - * (true) or not (false). - * @property {ShipmentItem[]} [items] - An array of shipment items returned as - * part of the response. - * @property {string} [lane] - The lane associated with the shipment. + * @typedef ShipmentInternalPlatformViewResponse + * @property {number} [total_count] + * @property {string} [message] + * @property {boolean} [success] + * @property {ShipmentItem[]} [items] + * @property {string} [lane] * @property {Page} [page] */ /** * @typedef TrackingList - * @property {boolean} [is_passed] - A flag indicating whether the tracking - * event has already occurred. If true, it means the event is in the past; - * otherwise, it is either current or future. - * @property {string} text - A descriptive message or status update associated - * with the tracking event, providing context about the shipment's progress or - * condition. - * @property {boolean} [is_current] - A flag indicating whether this tracking - * event is the most recent update. If true, it reflects the latest status of - * the shipment. - * @property {string} [time] - A timestamp representing when the tracking event - * occurred. This helps in understanding the timeline of the shipment's journey. - * @property {string} [created_ts] - A timestamp indicating when the tracking - * information was created or logged in the system. This may differ from the - * event time. - * @property {string} status - The specific status associated with the tracking - * event, such as "In Transit," "Delivered," or "Out for Delivery," providing - * clarity on the shipment's current phase. + * @property {boolean} [is_passed] + * @property {string} text + * @property {boolean} [is_current] + * @property {string} [time] + * @property {string} [created_ts] + * @property {string} status */ /** * @typedef InvoiceInfo - * @property {string} [store_invoice_id] - A unique identifier for the invoice - * generated by the store or platform, used for internal tracking and reference. - * @property {string} [invoice_url] - A URL linking to the digital version of - * the invoice, allowing users to view or download the invoice document online. - * @property {string} [updated_date] - Denotes the date and time when the - * invoice information was modified or updated, providing a record of the most - * recent changes. - * @property {string} [external_invoice_id] - An identifier for the invoice used - * by external systems or partners, facilitating cross-system tracking and - * reconciliation. - * @property {string} [label_url] - A URL linking to the shipping label - * associated with the invoice, which may be used for shipment tracking and logistics. - * @property {string} [credit_note_id] - The identifier for any credit note - * related to the invoice, used in cases of refunds or adjustments to the - * original billing. - * @property {Object} [links] - An object containing additional links relevant - * to the invoice, which may include related documents or resources. + * @property {string} [store_invoice_id] + * @property {string} [invoice_url] + * @property {string} [updated_date] + * @property {string} [external_invoice_id] + * @property {string} [label_url] + * @property {string} [credit_note_id] + * @property {Object} [links] */ /** * @typedef OrderDetailsData - * @property {string} [order_date] - Represents the date and time when the order - * was placed by the customer. This timestamp is essential for tracking the - * initiation of the order process, scheduling deliveries, and analyzing order - * timelines. - * @property {string} [created_ts] - A timestamp indicating when the order was - * created in the system. - * @property {Object} [tax_details] - Contains a flexible and comprehensive set - * of key-value pairs detailing the tax calculations and classifications - * applicable to the order. - * @property {string} [cod_charges] - The charges associated with Cash on - * Delivery (COD) payments. - * @property {string} [source] - The source from which the order originated. - * @property {string} fynd_order_id - An unique identifier for the order. - * @property {string} [affiliate_id] - Affiliate id associated with order. - * @property {string} [affiliate_order_id] - Affiliate order id associated with order. - * @property {Object} [ordering_channel_logo] - Represents the logo of the - * channel through which the order was placed, encapsulating branding elements - * and any relevant styling attributes. This object is designed to be - * flexible, allowing for the inclusion of various properties that define how - * the logo should be displayed across different platforms or documents - * related to the order. - * @property {string} [order_value] - The total monetary value of the order - * @property {string} [ordering_channel] - The specific channel through which - * the order was placed - * @property {Object} [meta] - Meta data of the order contains additional, - * potentially dynamic information about the order. + * @property {string} [order_date] + * @property {string} [created_ts] + * @property {Object} [tax_details] + * @property {string} [cod_charges] + * @property {string} [source] + * @property {string} fynd_order_id + * @property {string} [affiliate_id] + * @property {string} [affiliate_order_id] + * @property {Object} [ordering_channel_logo] + * @property {string} [order_value] + * @property {string} [ordering_channel] + * @property {Object} [meta] */ /** @@ -3753,350 +2443,246 @@ const Joi = require("joi"); * @property {string} pincode * @property {string} address * @property {string} [area] - * @property {string} [address_type] - The type of the address (e.g., home, office). + * @property {string} [address_type] * @property {string} country * @property {string} [email] - * @property {string} [address1] - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like {address} {address2} - * {area} {state} {country}, Address1 compiles all into a single formatted string. + * @property {string} [address1] * @property {string} [landmark] * @property {string} state * @property {string} name * @property {string} city - * @property {string} [state_code] - The code representing the state or region - * within the country, if applicable. - * @property {string} [country_iso_code] - The country ISO code, a two-character - * standard (ISO 3166-1 alpha-2) code, uniquely identifies the country. This - * field is used to specify countries in a standardized format, facilitating - * global data interoperability. Examples include 'US' for the United States - * and 'IN' for India. - * @property {string} [country_phone_code] - This is the two-digit standard code - * representing the dialing prefix for the user's country, associated with the - * user's mobile number. + * @property {string} [state_code] + * @property {string} [country_iso_code] + * @property {string} [country_phone_code] * @property {string} [display_address] */ /** * @typedef PhoneDetails - * @property {number} [country_code] - Identifies the country of the user's - * phone number using the two-character standard ISO 3166-1 alpha-2 country - * codes. Examples include 'US' for the United States and 'IN' for India. - * @property {string} [number] - The actual phone number of the user. + * @property {number} [country_code] + * @property {string} [number] */ /** * @typedef ContactDetails - * @property {PhoneDetails[]} [phone] - An array of phone numbers associated - * with the contact. - * @property {string[]} [emails] - An array of email addresses associated with - * the contact. + * @property {PhoneDetails[]} [phone] + * @property {string[]} [emails] */ /** * @typedef CompanyDetails - * @property {string} [company_name] - The name of the company. - * @property {Object} [address] - It contains the properties for the address of a company. - * @property {string} [company_cin] - The Corporate Identification Number (CIN) - * of the company. - * @property {number} [company_id] - A unique identifier for the company on the platform. - * @property {string} [company_gst] - The Goods and Services Tax (GST) number of - * the company. + * @property {string} [company_name] + * @property {Object} [address] + * @property {string} [company_cin] + * @property {number} [company_id] + * @property {string} [company_gst] * @property {ContactDetails} [company_contact] */ /** * @typedef OrderingStoreDetails - * @property {string} [phone] - The contact phone number for the ordering store. - * @property {string} [pincode] - The postal code associated with the ordering - * store's location. - * @property {Object} [meta] - Meta data of the ordering store contains - * additional, potentially dynamic information about the ordering store. - * @property {string} [address] - The complete address of the ordering store. - * @property {string} [address1] - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like {address} {address2} - * {area} {state} {country}, Address1 compiles all into a single formatted string. - * @property {string} [display_address] - Formatted address based on the - * title-template provided by the partner. - * @property {number} [id] - A unique identifier for the ordering store. - * @property {string} [code] - A specific code associated with the ordering store. - * @property {string} [store_name] - The name of the ordering store. - * @property {string} [country] - The country in which the ordering store is located. - * @property {string} [contact_person] - The name of the primary contact person - * at the ordering store. - * @property {string} [state] - The state or region where the ordering store is situated. - * @property {string} [city] - The city in which the ordering store is located. + * @property {string} [phone] + * @property {string} [pincode] + * @property {Object} [meta] + * @property {string} [address] + * @property {string} [address1] + * @property {string} [display_address] + * @property {number} [id] + * @property {string} [code] + * @property {string} [store_name] + * @property {string} [country] + * @property {string} [contact_person] + * @property {string} [state] + * @property {string} [city] */ /** * @typedef DPDetailsData - * @property {string} [pincode] - The postal code associated with the delivery - * partner's location - * @property {string} [track_url] - A URL that provides access to real-time - * tracking information for the shipment. - * @property {string} [eway_bill_id] - The unique identifier for the e-way bill - * generated for the shipment. - * @property {number} [id] - A unique identifier for the delivery partner details. - * @property {string} [country] - The country in which the delivery partner operates. - * @property {string} [awb_no] - The Air Waybill number, a tracking number used - * for air freight shipments, allowing for the identification and tracking of - * the package in transit. - * @property {string} [gst_tag] - A tag associated with the Goods and Services - * Tax (GST) for the shipment. - * @property {string} [name] - The name of the delivery partner or service - * provider responsible for transporting the shipment. + * @property {string} [pincode] + * @property {string} [track_url] + * @property {string} [eway_bill_id] + * @property {number} [id] + * @property {string} [country] + * @property {string} [awb_no] + * @property {string} [gst_tag] + * @property {string} [name] */ /** * @typedef BuyerDetails - * @property {string} [ajio_site_id] - The unique identifier for the buyer on - * the Ajio platform. - * @property {number} pincode - The postal code for the buyer's shipping - * address, used for delivery location identification. - * @property {string} address - Provides the comprehensive address details of - * the buyer's shipping address. - * @property {string} gstin - The Goods and Services Tax Identification Number - * (GSTIN) of the buyer. - * @property {string} name - The full name of the buyer, essential for - * personalizing communication and delivery. - * @property {string} state - The name of the state where the buyer's shipping - * address is located, important for logistical purposes. - * @property {string} city - The name of the city where the buyer's shipping - * address is located, which helps in identifying delivery zones. + * @property {string} [ajio_site_id] + * @property {number} pincode + * @property {string} address + * @property {string} gstin + * @property {string} name + * @property {string} state + * @property {string} city */ /** * @typedef DebugInfo - * @property {string} [stormbreaker_uuid] - A unique identifier (UUID) - * associated with the Stormbreaker system, used for tracking and debugging - * purposes in the application. + * @property {string} [stormbreaker_uuid] */ /** * @typedef EinvoiceInfo - * @property {Object} [credit_note] - Specifies the reverse einvoice transaction - * create on government portal. - * @property {Object} [invoice] - It specifies the forward einvoice transaction - * created on government portal. + * @property {Object} [credit_note] + * @property {Object} [invoice] */ /** * @typedef Formatted - * @property {string} [max] - Represents the maximum formatted value, providing - * a limit for the associated data, such as dimensions or weights. - * @property {string} [min] - Represents the minimum formatted value, - * establishing a lower limit for the associated data, ensuring it meets - * certain criteria or standards. + * @property {string} [max] + * @property {string} [min] */ /** * @typedef ShipmentTags - * @property {string} [slug] - A URL-friendly string representing the tag, often - * used for routing or categorization. - * @property {string} [entity_type] - Type of entity that the tag is associated - * to (bag, shipments). - * @property {string} [display_text] - A human-readable text representation of - * the tag, used for display purposes in user interfaces. + * @property {string} [slug] + * @property {string} [entity_type] + * @property {string} [display_text] */ /** * @typedef LockData - * @property {boolean} [locked] - Indicates whether the shipment is currently - * locked for processing (true) or not (false). - * @property {boolean} [mto] - A flag indicating whether the shipment is part of - * a multi-modal transport operation. - * @property {string} [lock_message] - An optional message providing additional - * context or information regarding the lock status. + * @property {boolean} [locked] + * @property {boolean} [mto] + * @property {string} [lock_message] */ /** * @typedef ShipmentTimeStamp - * @property {number} [max] - Represents the maximum timestamp value, indicating - * the latest time relevant to the shipment. - * @property {number} [min] - Represents the minimum timestamp value, indicating - * the earliest time relevant to the shipment. + * @property {number} [max] + * @property {number} [min] */ /** * @typedef ShipmentMeta - * @property {string} [tracking_url] - A URL for tracking the shipment. - * @property {string} [estimated_delivery_date] - Provides a forecasted date and - * time by which the shipment is expected to be delivered to the recipient. - * This estimation is crucial for planning purposes, both for the sender in - * managing expectations and for the recipient in preparing for receipt. - * @property {boolean} same_store_available - Indicates whether the shipment is - * available for pickup from the same store. + * @property {string} [tracking_url] + * @property {string} [estimated_delivery_date] + * @property {boolean} same_store_available * @property {BuyerDetails} [b2b_buyer_details] * @property {Formatted} [formatted] * @property {DebugInfo} [debug_info] - * @property {string} [return_awb_number] - The Air Waybill (AWB) number - * associated with a return shipment. - * @property {boolean} [is_self_ship] - Indicates whether the shipment is a - * self-shipped order. - * @property {string} [box_type] - Box type of the shipment in which the - * shipment will be delivered. + * @property {string} [return_awb_number] + * @property {boolean} [is_self_ship] + * @property {string} [box_type] * @property {EinvoiceInfo} [einvoice_info] - * @property {string} [return_affiliate_shipment_id] - The shipment ID - * associated with a return from an affiliate. - * @property {string} [parent_dp_id] - The unique identifier for the parent - * delivery partner. - * @property {number} [shipment_weight] - The total weight of the shipment. + * @property {string} [return_affiliate_shipment_id] + * @property {string} [parent_dp_id] + * @property {number} [shipment_weight] * @property {Dimensions} [dimension] - * @property {Object} [dp_options] - Delivery partner options that are available - * to deliver the shipment. - * @property {boolean} [assign_dp_from_sb] - Indicates whether to assign the - * delivery partner from the store’s basket. - * @property {string} [due_date] - Specifies the deadline by which a particular - * action related to the affiliate shipment needs to be completed. - * @property {string} [store_invoice_updated_date] - Denotes the date and time - * when the store's invoice related to this shipment was updated. This - * timestamp is vital for tracking changes to billing details, adjustments in - * charges, or updates in the invoicing status. - * @property {string} [forward_affiliate_shipment_id] - The shipment ID for the - * forward journey of an affiliate shipment. - * @property {number} [return_store_node] - The identifier for the store node - * involved in the return process. - * @property {string} [fulfilment_priority_text] - Textual representation of the - * fulfillment priority for the shipment. - * @property {ShipmentTags[]} [shipment_tags] - Tags associated with the - * shipment for categorization and filtering. - * @property {Object} [external] - External metadata related to the shipment. - * @property {string} [awb_number] - The Air Waybill number associated with the shipment. + * @property {Object} [dp_options] + * @property {boolean} [assign_dp_from_sb] + * @property {string} [due_date] + * @property {string} [store_invoice_updated_date] + * @property {string} [forward_affiliate_shipment_id] + * @property {number} [return_store_node] + * @property {string} [fulfilment_priority_text] + * @property {ShipmentTags[]} [shipment_tags] + * @property {Object} [external] + * @property {string} [awb_number] * @property {LockData} [lock_data] - * @property {string} [order_type] - Defines the specific journey a shipment - * will follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. - * @property {Object} [ewaybill_info] - Electronic Way Bill details i.e - * ewayBillNo, ewayBillDate that are utilized in the transportation of goods. - * @property {string} [dp_id] - The unique identifier for the delivery partner - * associated with the shipment. - * @property {number} [shipment_volumetric_weight] - The volumetric weight of - * the shipment, which may differ from its actual weight. - * @property {string} [marketplace_store_id] - The unique identifier for the - * marketplace store associated with the shipment. - * @property {Object} [return_details] - An object containing the return details - * of the shipment. - * @property {string} [dp_sort_key] - A sort key for the delivery partner, used - * for prioritization. - * @property {string} [packaging_name] - The name of the packaging used for the shipment. + * @property {string} [order_type] + * @property {Object} [ewaybill_info] + * @property {string} [dp_id] + * @property {number} [shipment_volumetric_weight] + * @property {string} [marketplace_store_id] + * @property {Object} [return_details] + * @property {string} [dp_sort_key] + * @property {string} [packaging_name] * @property {ShipmentTimeStamp} [timestamp] - * @property {boolean} [auto_trigger_dp_assignment_acf] - Indicates whether - * automatic delivery partner assignment is triggered for this shipment. - * @property {string} [dp_name] - The name of the delivery partner associated - * with the shipment. - * @property {string} [po_number] - The purchase order number associated with - * the shipment. - * @property {number} weight - The weight of the shipment, typically measured in - * grams or kilograms. - * @property {Object} [b2c_buyer_details] - Contains detailed information about - * the buyer in a business-to-consumer (B2C) transaction. This object is - * designed to capture a wide array of buyer-specific data such as contact - * information, shipping address, preferences, and any other relevant details - * that enhance the understanding of the buyer's profile and needs. - * @property {string} [forward_affiliate_order_id] - The order ID for the - * forward journey of an affiliate shipment. - * @property {string} [return_affiliate_order_id] - The order ID for the return - * journey of an affiliate shipment. - * @property {Object} [bag_weight] - This object is designed to accommodate a - * range of weight-related information. Denotes the weight of the bag, - * potentially including various measurements or related details. - * @property {string} [refund_to] - Specifies the recipient of any refunds - * related to the shipment. + * @property {boolean} [auto_trigger_dp_assignment_acf] + * @property {string} [dp_name] + * @property {string} [po_number] + * @property {number} weight + * @property {Object} [b2c_buyer_details] + * @property {string} [forward_affiliate_order_id] + * @property {string} [return_affiliate_order_id] + * @property {Object} [bag_weight] + * @property {string} [refund_to] */ /** * @typedef PDFLinks - * @property {string} invoice_type - The type of invoice issued, such as 'fynd' - * or other classifications. - * @property {string} [label_a6] - URL or path to the A6 size label document. - * @property {string} [invoice] - URL or path to the main invoice document. - * @property {string} [label_pos] - URL or path to the POS label document. - * @property {string} [invoice_a6] - URL or path to the A6 size invoice document. - * @property {string} [b2b] - URL or path to the B2B document related to the transaction. - * @property {string} [label] - URL or path to the general label document. - * @property {string} [label_a4] - URL or path to the A4 size label document. - * @property {string} label_type - Specifies the type of label associated with a - * PDF document,indicating its purpose or content. The label_type helps in - * organizing and identifying PDF documents quickly, ensuring that users or - * systems can efficiently utilize the correct documents for required actions. - * @property {string} [invoice_export] - URL or path to the exported invoice document. - * @property {string} [credit_note_url] - URL or path to the credit note document. - * @property {string} [delivery_challan_a4] - URL or path to the A4 delivery - * challan document. - * @property {string} [label_export] - URL or path to the exported label document. - * @property {string} [invoice_a4] - URL or path to the A4 size invoice document. - * @property {string} [invoice_pos] - URL or path to the POS invoice document. - * @property {string} [po_invoice] - URL or path to the purchase order invoice document. + * @property {string} invoice_type + * @property {string} [label_a6] + * @property {string} [invoice] + * @property {string} [label_pos] + * @property {string} [invoice_a6] + * @property {string} [b2b] + * @property {string} [label] + * @property {string} [label_a4] + * @property {string} label_type + * @property {string} [invoice_export] + * @property {string} [credit_note_url] + * @property {string} [delivery_challan_a4] + * @property {string} [label_export] + * @property {string} [invoice_a4] + * @property {string} [invoice_pos] + * @property {string} [po_invoice] + */ + +/** + * @typedef AffiliateConfig + * @property {number} [app_company_id] */ /** * @typedef AffiliateDetails * @property {ShipmentMeta} shipment_meta * @property {AffiliateMeta} affiliate_meta - * @property {string} affiliate_shipment_id - The shipment ID specific to this affiliate. - * @property {string} [company_affiliate_tag] - An optional tag representing the - * company's affiliate association. - * @property {string} affiliate_order_id - The order ID associated with the - * affiliate shipment. + * @property {string} affiliate_shipment_id + * @property {string} [company_affiliate_tag] + * @property {string} affiliate_order_id * @property {PDFLinks} [pdf_links] * @property {AffiliateConfig} [config] - * @property {string} [affiliate_id] - The unique identifier for the affiliate. - * @property {string} affiliate_store_id - The unique identifier for the - * affiliate's store. - * @property {string} affiliate_bag_id - The unique identifier for the affiliate's bag. - * @property {string} [id] - The unique identifier for the affiliate. + * @property {string} [affiliate_id] + * @property {string} affiliate_store_id + * @property {string} affiliate_bag_id + * @property {string} [ad_id] */ /** * @typedef BagConfigs - * @property {boolean} is_returnable - Indicates whether the bag is eligible for - * return by the customer. - * @property {boolean} allow_force_return - A flag that determines if a forced - * return can be initiated for the bag. - * @property {boolean} is_active - A flag indicating whether the bag is active or not. - * @property {boolean} can_be_cancelled - A flag that determines if the bag can - * be cancelled. - * @property {boolean} enable_tracking - A flag that determines if shipment - * tracking is enabled for the bag. - * @property {boolean} is_customer_return_allowed - A flag that determines if - * customer return is allowed for the bag. + * @property {boolean} is_returnable + * @property {boolean} allow_force_return + * @property {boolean} is_active + * @property {boolean} can_be_cancelled + * @property {boolean} enable_tracking + * @property {boolean} is_customer_return_allowed */ /** * @typedef OrderBagArticle - * @property {Object} [identifiers] - Details of Identifiers associated with the article. + * @property {Object} [identifiers] * @property {ReturnConfig} [return_config] - * @property {string} [uid] - A unique identifier for the article within the order bag. - * @property {string} [size] - The size of the article, which may be relevant - * for clothing. - * @property {string[]} [tags] - An array of tags associated with the article. + * @property {string} [uid] + * @property {string} [size] + * @property {string[]} [tags] */ /** * @typedef OrderBrandName - * @property {string} [logo] - A URL or path to the logo image associated with the brand. - * @property {number} [company] - A unique identifier for the company associated - * with the brand. - * @property {number} id - A unique identifier for the brand within the system. - * @property {string} [created_on] - Timestamp when the brand of the order was created. - * @property {string} [brand_name] - The name of the brand associated with the order. - * @property {string} [modified_on] - Timestamp when the brand of the order was modified. + * @property {string} [logo] + * @property {number} [company] + * @property {number} id + * @property {string} [created_on] + * @property {string} [brand_name] + * @property {string} [modified_on] */ /** * @typedef AffiliateBagsDetails - * @property {string} [affiliate_bag_id] - A unique identifier for the affiliate bag. - * @property {string} [coupon_code] - A unique code provided to customers for - * redeeming special offers or discounts on their purchases. + * @property {string} [affiliate_bag_id] + * @property {string} [coupon_code] * @property {AffiliateMeta} [affiliate_meta] */ /** * @typedef BagPaymentMethods - * @property {string} [mode] - The payment mode used for the transaction. - * @property {number} [amount] - The total amount associated with the payment method + * @property {string} [mode] + * @property {number} [amount] */ /** @@ -4113,386 +2699,191 @@ const Joi = require("joi"); /** * @typedef BuyRules * @property {ItemCriterias} [item_criteria] - * @property {Object} [cart_conditions] - Specifies the rules that must be met - * at the cart level for any purchasing rules or promotional discounts to be - * applied. Specifically, it includes criteria such as the total quantity of - * items in the cart. For instance, a rule might require that the cart - * contains at least one item for the promotion to apply. This setup allows - * for the dynamic application of discounts or special buying rules based on - * cart conditions. - */ - -/** - * @typedef PriceMinMax - * @property {number} [min] - The minimum price value. Represents the lowest - * price in the price range. - * @property {number} [max] - The maximum price value. Represents the highest - * price in the price range. - */ - -/** - * @typedef ItemPriceDetails - * @property {PriceMinMax} [marked] - * @property {PriceMinMax} [effective] - * @property {string} [currency] - The currency in which the prices details - * associated with the item is specified. - */ - -/** - * @typedef FreeGiftItems - * @property {string} [item_slug] - A unique identifier for the item, typically - * used in URLs for SEO purposes. - * @property {string} [item_name] - The name of the item. - * @property {ItemPriceDetails} [item_price_details] - * @property {string} [item_brand_name] - The brand name of the item. - * @property {number} [item_id] - A unique numerical identifier for the item. - * @property {string[]} [item_images_url] - A list of URLs pointing to images of the item. - */ - -/** - * @typedef AppliedFreeArticles - * @property {string} [article_id] - A unique identifier for the article to - * which the free gift is applied. - * @property {Object} [free_gift_item_details] - Details of the free gift item - * associated with the article, including relevant attributes like name, - * description, and any other specifications. - * @property {string} [parent_item_identifier] - An identifier for the parent - * item with which the free gift is associated, typically used to link the - * free gift to the original purchased item. - * @property {number} [quantity] - The quantity of the free gift items applied - * to the article. + * @property {Object} [cart_conditions] */ /** * @typedef AppliedPromos - * @property {string} [promotion_type] - Specifies the type of discount or deal - * applied to the current promotion, defining how the promotion modifies the - * price or adds value to the purchase. Each type represents a different - * promotional strategy - percentage- Discount by a percentage of the original - * price. - amount- Discount by a specific amount off the original price. - - * fixed_price- Sets the price to a specific fixed amount. - bogo- Buy One Get - * One or at a discount. - contract_price- Special pricing based on a contract - * or agreement. - shipping_price- Discount or deal related to the shipping - * cost. - ladder_price- Price changes based on quantity purchased. - - * bundle_price_percentage- Discount on a bundle purchase by a percentage. - - * bundle_price_amount- Discount on a bundle purchase by a specific amount. - - * bundle_amount_percentage- A percentage of the purchase amount is applied as - * a discount when buying in a bundle. - custom- A custom promotion not - * covered by other types. - free_gift_items- Free gift items are included - * with the purchase. - free_non_sellable_items- Free items that are not for - * sale are included with the purchase. - * @property {string} [promotion_name] - The name of the promotional campaign or offer. - * @property {DiscountRules[]} [discount_rules] - A list of rules that define - * the conditions under which discounts are applied. - * @property {number} [amount] - The total monetary value of the discount or promotion. - * @property {number} [article_quantity] - The quantity of articles required to - * qualify for the promotion. - * @property {BuyRules[]} [buy_rules] - A list of rules that outline the - * conditions for purchasing items under the promotion. - * @property {string} [promo_id] - A unique identifier for the promotion. - * @property {boolean} [mrp_promotion] - A flag that designates whether or not - * the promotion is an MRP (manufacturer's reduced price) promotion. - * @property {AppliedFreeArticles[]} [applied_free_articles] - A list of - * articles that are eligible for free under the promotion. + * @property {string} [promotion_type] + * @property {string} [promotion_name] + * @property {DiscountRules[]} [discount_rules] + * @property {number} [amount] + * @property {number} [article_quantity] + * @property {BuyRules[]} [buy_rules] + * @property {string} [promo_id] + * @property {boolean} [mrp_promotion] */ /** * @typedef CurrentStatus - * @property {number} [store_id] - A unique identifier for the store associated - * with the shipment. - * @property {string} [delivery_awb_number] - The Air Waybill (AWB) number for - * the delivery. - * @property {boolean} [kafka_sync] - A flag indicating whether the current - * status is synchronized with Kafka or not. - * @property {number} [delivery_partner_id] - A unique identifier for the - * delivery partner responsible for handling the shipment. - * @property {string} [state_type] - Serves as a key identifier to differentiate - * among the diverse types of states a shipment can undergo throughout its journey. - * - * - 'operational': Pertains to states that involve the physical handling and - * movement of the shipment, such as packing, in transit, and delivery. - * - 'financial': Relates to states associated with the payment, invoicing, and - * any monetary transactions or obligations tied to the shipment. - * - 'logistics': Encompasses states that deal with the broader logistical - * planning and coordination necessary for the shipment's journey, - * including route optimization and carrier selection. - * - * @property {number} [state_id] - A unique identifier for the specific state of - * the shipment. - * @property {number} id - A unique identifier for the current status entry - * @property {string} [created_at] - Denotes the date and time when the bag - * status was created. - * @property {string} [created_ts] - A timestamp indicating when the status was created - * @property {string} [shipment_id] - A unique identifier for the shipment. - * @property {string} [updated_at] - The date and time when the current status - * was last updated. + * @property {number} [store_id] + * @property {string} [delivery_awb_number] + * @property {boolean} [kafka_sync] + * @property {number} [delivery_partner_id] + * @property {string} [state_type] + * @property {number} [state_id] + * @property {number} id + * @property {string} [created_at] + * @property {string} [created_ts] + * @property {string} [shipment_id] + * @property {string} [updated_at] * @property {BagStateMapper} [bag_state_mapper] - * @property {number} [bag_id] - A unique identifier for the bag associated with - * the shipment. - * @property {string} [status] - A descriptive label representing the current - * status of the shipment. + * @property {number} [bag_id] + * @property {string} [status] */ /** * @typedef OrderBags * @property {GSTDetailsData} [gst_details] * @property {BagStatusHistory[]} [bag_status] - * @property {Object} [parent_promo_bags] - An object containing details of - * parent promotional bags. + * @property {Object} [parent_promo_bags] * @property {FinancialBreakup} [financial_breakup] * @property {BagConfigs} [bag_configs] * @property {string} [seller_identifier] - * @property {Address} [delivery_address] + * @property {PlatformDeliveryAddress} [delivery_address] * @property {OrderBagArticle} [article] * @property {OrderBrandName} [brand] * @property {string} [group_id] * @property {AffiliateBagsDetails} [affiliate_bag_details] * @property {PlatformItem} [item] - * @property {BagPaymentMethods[]} [payment_methods] - An array detailing the - * various payment methods utilized for the transaction. Each item within this - * array represents a distinct method of payment. It encapsulates the details - * of various payment methods available for completing a transaction. It - * includes comprehensive information such as the payment mode, amount, - * transaction status, and identifiers for each payment method. + * @property {BagPaymentMethods[]} [payment_methods] * @property {BagPaymentMethods[]} [payment_info] - * @property {number} [quantity] - The number of items contained in the bag. - * @property {string} [identifier] - A unique identifier for the bag. - * @property {boolean} [can_return] - Indicates whether the items in the bag are - * eligible for return by the customer. - * @property {boolean} [can_cancel] - Indicates whether the bag is eligible for - * cancellation by the customer. - * @property {string} [display_name] - A user-friendly name for the bag. - * @property {number} [line_number] - A unique identifier for each line item in a bag. - * @property {Object} [meta] - Meta data of the bags contains additional, - * potentially dynamic information about the bags. + * @property {number} [quantity] + * @property {string} [identifier] + * @property {boolean} [can_return] + * @property {boolean} [can_cancel] + * @property {string} [display_name] + * @property {number} [line_number] + * @property {Object} [meta] * @property {AppliedPromos[]} [applied_promos] * @property {Prices} [prices] - * @property {PriceAdjustmentCharge[]} [charges] - * @property {OrderingCurrencyPrices} [ordering_currency_prices] * @property {CurrentStatus} [current_status] * @property {number} bag_id - * @property {string} [entity_type] - Type of entity that the tag is associated - * to (bag, shipments). - * @property {boolean} [is_parent] - A flag indicating whether the current bag - * is a parent entity or not. + * @property {string} [entity_type] + * @property {boolean} [is_parent] */ /** * @typedef FulfillingStore - * @property {string} phone - The contact phone number for the fulfilling store. - * @property {string} pincode - The postal code for the fulfilling store's location. - * @property {Object} meta - Meta data of the fulfilling store contains - * additional, potentially dynamic information about the fulfilling store. - * @property {string} address - The complete address of the fulfilling store. - * @property {string} [address1] - The primary address dynamically forms based - * on a template. If the template includes a single key, Address1 contains - * that data. For templates with multiple keys like {address} {address2} - * {area} {state} {country}, Address1 compiles all into a single formatted string. - * @property {string} [display_address] - Display friendly version of the - * Fulfilment Store Address. - * @property {number} id - The unique id or identifier of a fulfilment store. - * @property {string} code - The unique code of the fulfilment store. - * @property {string} store_name - The unique name of a fulfillment store. - * @property {string} country - The name of the country associated with a - * specific fulfilment store. - * @property {string} fulfillment_channel - The channel through which - * fulfillment is managed. - * @property {string} contact_person - The name of the contact person associated - * with a fulfilling store. - * @property {string} state - The state or region where the fulfilling store is located. - * @property {string} city - The city in which the fulfilling store is situated. + * @property {string} phone + * @property {string} pincode + * @property {Object} meta + * @property {string} address + * @property {string} [address1] + * @property {string} [display_address] + * @property {number} id + * @property {string} code + * @property {string} store_name + * @property {string} country + * @property {string} fulfillment_channel + * @property {string} contact_person + * @property {string} state + * @property {string} city */ /** * @typedef ShipmentPayments - * @property {string} [mode] - The payment mode used for the shipment. - * @property {string} [logo] - A URL or path to the logo associated with the - * payment method. - * @property {string} [source] - The source or origin of the payment + * @property {string} [mode] + * @property {string} [logo] + * @property {string} [source] */ /** * @typedef ShipmentStatusData - * @property {Object} [meta] - It contains the additional properties related to - * shipment status transition like Kafka_emission_status, user_name, etc. - * Additionally it is dynamic. - * @property {string[]} [bag_list] - The list of bags that are in this shipment - * status transition. - * @property {number} [id] - Unique identifier for a shipment status. - * @property {string} [created_at] - Denotes the date and time when the - * transition was created. - * @property {string} [created_ts] - A timestamp indicating when the status - * entry was created. - * @property {string} [shipment_id] - The unique identifier for the shipment. - * @property {string} [status] - The current status of the shipment. - * @property {string} [display_name] - A user-friendly name or description of - * the current shipment status. - * @property {string} [current_shipment_status] - Reflects the most recent - * status of the shipment. - * @property {string} [status_created_at] - Denotes the date and time when the - * transition of the status of the shipment was created. + * @property {Object} [meta] + * @property {string[]} [bag_list] + * @property {number} [id] + * @property {string} [created_at] + * @property {string} [created_ts] + * @property {string} [shipment_id] + * @property {string} [status] + * @property {string} [display_name] + * @property {string} [current_shipment_status] + * @property {string} [status_created_at] */ /** * @typedef ShipmentLockDetails - * @property {boolean} [lock_status] - Represents the lock status of the shipment. - * @property {string} [lock_message] - A user-friendly message that explains the - * reason for locking the shipment. - * @property {Object} [action_to_status] - This field maps potential actions - * (e.g., downloading an invoice or label) to their corresponding shipment - * lock statuses, indicating which operations are allowed depending on the - * shipment's current lock status. When an action is set to 'lock', it means - * no transitions or updates to the shipment's status can be performed until - * the specified action is completed. For instance, if 'download_invoice' is - * in a 'lock' state, the shipment cannot undergo any status transitions until - * the invoice is either downloaded. Similarly, 'download_label' being in a - * 'lock' state prevents any shipment status transitions until a new label is - * downloaded. + * @property {boolean} [lock_status] + * @property {string} [lock_message] + * @property {Object} [action_to_status] */ /** * @typedef PlatformShipment - * @property {string} [picked_date] - Indicates the date and time when the - * shipment was physically picked up from the sender or the origin point by - * the delivery service. This timestamp is crucial for tracking the - * commencement of the shipment's journey. - * @property {TrackingList[]} [tracking_list] - A list of tracking updates - * associated with the shipment. + * @property {string} [picked_date] + * @property {TrackingList[]} [tracking_list] * @property {InvoiceInfo} [invoice] - * @property {string} [shipment_status] - Represents the current status of the shipment. + * @property {string} [shipment_status] * @property {GSTDetailsData} [gst_details] * @property {OrderStatusData} [order_status] - * @property {Object} [delivery_slot] - Represents a specific time window - * allocated for the delivery of an order or shipment. + * @property {Object} [delivery_slot] * @property {OrderDetailsData} [order] * @property {UserDataInfo} [user] - * @property {boolean} [enable_dp_tracking] - A flag indicating whether the - * delivery partner tracking feature is enabled for this shipment. - * @property {string} [custom_message] - A custom message or note associated - * with the shipment. - * @property {string} [estimated_sla_time] - The estimated service level - * agreement (SLA) time for the shipment, indicating expected delivery timelines. - * @property {string} [estimated_sla_ts] - A timestamp indicating when the - * estimated SLA time is expected to be met. - * @property {boolean} [can_update_dimension] - Indicates whether the dimensions - * of the shipment can be updated after creation. - * @property {string[]} [shipment_images] - A list of URLs for images related to - * the shipment. - * @property {Object} [delivery_details] - A list of details about the delivery - * of an order. - * @property {Object} [billing_details] - Information regarding the billing for - * the shipment, including billing address and payment method. - * @property {string} [forward_shipment_id] - The ID of the parent forward - * journey shipment. - * @property {number} [fulfilment_priority] - The fulfilment priority, with - * lower numbers indicating a higher priority. + * @property {boolean} [enable_dp_tracking] + * @property {string} [custom_message] + * @property {string} [estimated_sla_time] + * @property {string} [estimated_sla_ts] + * @property {boolean} [can_update_dimension] + * @property {string[]} [shipment_images] + * @property {UserDetailsData} [delivery_details] + * @property {UserDetailsData} [billing_details] + * @property {string} [forward_shipment_id] + * @property {number} [fulfilment_priority] * @property {ShipmentLockDetails} [shipment_details] - * @property {Object[]} [custom_meta] - An array of custom metadata objects that - * may contain additional, dynamic information specific to the shipment. - * @property {number} [shipment_quantity] - The total quantity of items included - * in the shipment. + * @property {Object[]} [custom_meta] + * @property {number} [shipment_quantity] * @property {CompanyDetails} [company_details] * @property {OrderingStoreDetails} [ordering_store] - * @property {string} [order_platform] - The platform used to place the order. - * @property {boolean} [lock_status] - Indicates whether the shipment is - * currently locked or not for modifications or updates. - * @property {string} [platform_logo] - The URL of the ordering platform's logo. - * @property {string} [user_agent] - Information about the user agent string, - * typically containing details about the browser or application used to place - * the order. + * @property {string} [order_platform] + * @property {boolean} [lock_status] + * @property {string} [platform_logo] + * @property {string} [user_agent] * @property {DPDetailsData} [dp_details] - * @property {string} [invoice_id] - The unique identifier for the invoice - * associated with the shipment. - * @property {Object} [payment_methods] - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. The structure is designed to accommodate any number of - * payment methods,providing flexibility and comprehensive insights into each - * transaction's payment aspect. - * @property {Object[]} [payment_info] - An array of objects containing detailed - * information about the payments made for the shipment. - * @property {Object} [coupon] - Coupon data of the shipment which denotes if - * coupon is applied, coupon code, coupon amount, coupon title and coupon message. + * @property {string} [invoice_id] + * @property {Object} [payment_methods] + * @property {Object[]} [payment_info] + * @property {Object} [coupon] * @property {AffiliateDetails} [affiliate_details] - * @property {string} [priority_text] - Text that indicates the priority level - * of the shipment. - * @property {BagStatusHistory[]} [bag_status_history] - A history of status - * changes for bags associated with the shipment. - * @property {boolean} [is_dp_assign_enabled] - A flag indicating whether - * delivery partner assignment features are enabled for the shipment. - * @property {OrderBags[]} [bags] - A list of bags included in the shipment - * @property {boolean} [dp_assignment] - Indicates whether a delivery partner - * has been assigned to the shipment. - * @property {number} [total_items] - The total number of items contained within - * the shipment, + * @property {string} [priority_text] + * @property {BagStatusHistory[]} [bag_status_history] + * @property {boolean} [is_dp_assign_enabled] + * @property {OrderBags[]} [bags] + * @property {boolean} [dp_assignment] + * @property {number} [total_items] * @property {FulfillingStore} [fulfilling_store] - * @property {Object} [meta] - Meta data of the shipment contains additional, - * potentially dynamic information about the shipment. - * @property {Object} [pdf_links] - PDF Links associated with the shipment. - * @property {string} [payment_mode] - The mode of payment used for the shipment. - * @property {string} [packaging_type] - Defines the type of packaging used for - * the product, encompassing materials, design, and form factors. - * @property {string} [journey_type] - It is a type being used to represent the - * journey of shipment through the performed status transition. Forward - * Journey: The forward journey encompasses all the stages of shipping, - * including order placement, packing, dispatch, in-transit updates, and - * delivery. Return Journey: Contrary to the forward journey, the return - * journey involves the process of sending items back from the customer to the - * original sender or a designated return facility. + * @property {Object} [meta] + * @property {Object} [pdf_links] + * @property {string} [payment_mode] + * @property {string} [packaging_type] + * @property {string} [journey_type] * @property {Prices} [prices] - * @property {PriceAdjustmentCharge[]} [charges] - An array of charges applied - * to the shipment. - * @property {OrderingCurrencyPrices} [ordering_currency_prices] - * @property {string} [vertical] - The business vertical or category to which - * the shipment belongs. - * @property {string} shipment_id - A unique identifier for the shipment. + * @property {string} [vertical] + * @property {string} shipment_id * @property {ShipmentPayments} [payments] - * @property {string} [operational_status] - The operational status of the shipment. + * @property {string} [operational_status] * @property {ShipmentStatusData} [status] - * @property {number} [total_bags] - The total number of bags in the shipment. - * @property {string} [shipment_created_at] - Denotes the date and time when the - * shipment was created. - * @property {string} [shipment_created_ts] - A timestamp representing when the - * shipment was created. + * @property {number} [total_bags] + * @property {string} [shipment_created_at] + * @property {string} [shipment_created_ts] * @property {Currency} [currency] * @property {CurrencyInfo} [currency_info] - * @property {string} [previous_shipment_id] - The ID of the previous shipment - * in the sequence. - * @property {number} [shipment_update_time] - A numerical representation of the - * last update time for the shipment - * @property {Address} [rto_address] - * @property {string} [credit_note_id] - The identifier for any credit note - * issued for the shipment - * @property {boolean} [is_self_ship] - A flag indicating whether the shipment - * is being self-shipped by the seller or vendor. - * @property {string} [mode_of_payment] - The specific mode of payment used for - * the transaction + * @property {string} [previous_shipment_id] + * @property {number} [shipment_update_time] + * @property {PlatformDeliveryAddress} [rto_address] + * @property {string} [credit_note_id] + * @property {boolean} [is_self_ship] + * @property {string} [mode_of_payment] * @property {boolean} [is_lapa_enabled] - Flag to show NDR actions based on * LAPA (Logistic As Per Actual) plan subscription. If LAPA plan taken, true, * else false. - * @property {string} [forward_end_shipment_id] - The forward_end_shipment_id - * represents the shipment ID of the original forward journey shipment. When a - * shipment is transitioned to a return journey, the original shipment ID from - * the forward journey is recorded in the forward_end_shipment_id field of the - * return journey shipment. Even if the return shipment is later split into - * multiple shipments, each of these shipments will retain the same - * forward_end_shipment_id value that was assigned during the initial return - * journey initiation. This ensures that all return shipments can be traced - * back to the original forward journey shipment. - * @property {Object} [logistics_meta] - An object storing detailed - * logistics-related information, including courier partner details and other - * relevant metadata. - */ - -/** - * @typedef ShipmentInfoResponseSchema - * @property {string} [message] - A descriptive message providing additional - * information about the API response. - * @property {boolean} success - Indicates whether the API call was successful - * (true) or not (false). - * @property {PlatformShipment[]} [shipments] - A list of platform shipment - * objects, containing information related to a shipment. + */ + +/** + * @typedef ShipmentInfoResponse + * @property {string} [message] + * @property {boolean} success + * @property {PlatformShipment[]} [shipments] */ /** @@ -4503,72 +2894,31 @@ const Joi = require("joi"); /** * @typedef PaymentInfoData - * @property {Object} [meta] - It contains the additional properties related to - * shipment status transition like Kafka_emission_status, user_name, etc. - * Additionally it is dynamic. - * @property {string} [mode] - Information about the payment source. For eg, NB_ICICI. - * @property {string} [name] - The name of the payment method (e.g., "Credit - * Card", "PayPal"). - * @property {number} [amount] - Amount paid using this payment method. - * @property {boolean} [collected] - Indicates whether this payment method has - * been collected or not. - * @property {string} [refund_by] - Payment refund by for the customer and - * seller (e.g fynd, seller). - * @property {string} [collect_by] - Payment collected by for the customer and - * seller (e.g fynd, seller). - * @property {string} [display_name] - The name of the payment method as it - * should be displayed to the user. - * @property {string} [merchant_transaction_id] - A unique identifier associated - * with the payment transaction, such as TR669796C0012CF31BBD. This ID helps - * track and reference the specific transaction within the merchant's system. - */ - -/** - * @typedef CurrencySchema - * @property {string} [currency_code] - The ISO 4217 currency code, such as - * 'INR' for Indian Rupee. This field represents the standardized three-letter - * code of a currency. - * @property {string} [currency_symbol] - The symbol representing the currency, - * such as '₹' for Indian Rupee. This is used for display purposes alongside - * currency amounts. + * @property {Object} [meta] + * @property {string} [mode] + * @property {string} [name] + * @property {number} [amount] + * @property {boolean} [collected] + * @property {string} [refund_by] + * @property {string} [collect_by] + * @property {string} [display_name] + * @property {string} [merchant_transaction_id] */ /** * @typedef OrderData - * @property {string} [ordering_channel] - The specific channel through which - * the order was placed. - * @property {string} order_date - Specifies the exact date and time when the - * order was placed by the customer, serving as a key timestamp for the - * initiation of the order processing cycle. + * @property {string} order_date * @property {string} [created_ts] * @property {TaxDetails} [tax_details] - * @property {Object} [meta] - Meta data of the order contains additional, - * potentially dynamic information about the order. + * @property {Object} [meta] * @property {string} fynd_order_id * @property {Prices} [prices] - * @property {PriceAdjustmentCharge[]} [charges] - * @property {OrderingCurrencyPrices} [ordering_currency_prices] - * @property {Object} [payment_methods] - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. This includes metadata such as logos, payment IDs, and - * merchant codes, as well as transaction-specific details like the payment - * mode, name, amount, and entities responsible for refunds and collections. - * The structure is designed to accommodate any number of payment methods, - * providing flexibility and comprehensive insights into each transaction's - * payment aspect. + * @property {Object} [payment_methods] * @property {PaymentInfoData[]} [payment_info] - * @property {string} [affiliate_order_id] - External Order id - * @property {string} [affiliate_id] - Unique identifier for the sales channel. - * @property {string} [source] - Specifies the origin from from which the order - * is created, including mobile applications, web interfaces, social media - * integrations, or external APIs. - * @property {CurrencySchema} [currency] */ /** - * @typedef OrderDetailsResponseSchema + * @typedef OrderDetailsResponse * @property {OrderData} [order] * @property {boolean} success * @property {PlatformShipment[]} [shipments] @@ -4592,97 +2942,68 @@ const Joi = require("joi"); */ /** - * @typedef LaneConfigResponseSchema + * @typedef LaneConfigResponse * @property {SuperLane[]} [super_lanes] */ /** * @typedef PlatformBreakupValues - * @property {string} [value] - Represents the value associated with a specific - * component of the price breakdown. - * @property {string} [name] - Represents the name associated with a specific - * component of the price breakdown. - * @property {string} [display] - A user-friendly display name for the - * component, intended for presentation in user interfaces. + * @property {string} [value] + * @property {string} [name] + * @property {string} [display] */ /** * @typedef PlatformChannel - * @property {string} [logo] - Represents the logo of the channel through which - * the order was placed. - * @property {string} [name] - Represents the name of the channel through which - * the order was placed + * @property {string} [logo] + * @property {string} [name] */ /** * @typedef PlatformOrderItems - * @property {PlatformBreakupValues[]} [breakup_values] - The breakup_values - * array contains detailed breakdowns of different pricing components related - * to an order. Each item in the array is a reference to the - * PlatformBreakupValues schema, which provides specific details about each - * component such as loyalty points, coupon discounts, raw pricing data, and - * display information. + * @property {PlatformBreakupValues[]} [breakup_values] * @property {number} [total_order_value] - * @property {Object} [meta] - It contains the additional properties related to - * order transition like Kafka_emission_status, user_name, etc. Additionally - * it is dynamic, potentially. - * @property {string} [order_created_time] - The Date and time when the order was created. - * @property {string} [order_created_ts] - The timestamp indicating when the - * order was created. - * @property {string} [payment_mode] - The payment mode used for the order. - * @property {PlatformShipment[]} [shipments] - An array of shipment items - * returned as part of the order. - * @property {string} [order_id] - A unique identifier associated with the order. + * @property {Object} [meta] + * @property {string} [order_created_time] + * @property {string} [order_created_ts] + * @property {string} [payment_mode] + * @property {PlatformShipment[]} [shipments] + * @property {string} [order_id] * @property {PlatformChannel} [channel] * @property {UserDataInfo} [user_info] * @property {number} [order_value] * @property {Currency} [currency] * @property {CurrencyInfo} [currency_info] - * @property {Prices} [prices] - * @property {OrderingCurrencyPrices} [ordering_currency_prices] */ /** - * @typedef OrderListingResponseSchema - * @property {number} [total_count] - The total number of orders matching the - * query criteria. - * @property {string} [message] - A message providing additional context about - * the response. - * @property {boolean} [success] - Indicates whether the API call was successful - * (true) or not (false). - * @property {PlatformOrderItems[]} [items] - An array of shipment items - * returned as part of the response. - * @property {string} [lane] - The lane associated with the order. + * @typedef OrderListingResponse + * @property {number} [total_count] + * @property {string} [message] + * @property {boolean} [success] + * @property {PlatformOrderItems[]} [items] + * @property {string} [lane] * @property {Page} [page] */ /** * @typedef PlatformTrack - * @property {string} [last_location_recieved_at] - The current geographic - * location of the courier partner. - * @property {Object} [meta] - A field to store additional metadata related to - * the courier partner's operations or the shipment. - * @property {string} [raw_status] - The current status of the shipment as - * updated by the courier partner. - * @property {string} [updated_at] - Human readable timestamp when the status - * was last updated by the courier partner. - * @property {string} [updated_time] - The timestamp when the status was last - * updated by the courier partner. - * @property {string} [awb] - The Air Waybill (AWB) number associated with the - * shipment, used for tracking the parcel in transit. - * @property {string} [shipment_type] - Indicates the type of journey the shipment. - * @property {string} [status] - The operational status of the shipment. - * @property {string} [reason] - Any additional remarks or comments from the - * courier partner regarding the shipment. - * @property {string} [account_name] - The name of the courier partner - * responsible for the shipment. + * @property {string} [last_location_recieved_at] + * @property {Object} [meta] + * @property {string} [raw_status] + * @property {string} [updated_at] + * @property {string} [updated_time] + * @property {string} [awb] + * @property {string} [shipment_type] + * @property {string} [status] + * @property {string} [reason] + * @property {string} [account_name] */ /** * @typedef PlatformShipmentTrack - * @property {Object} [meta] - Meta data of the shipment contains additional, - * potentially dynamic information about the shipment. - * @property {PlatformTrack[]} [results] - A list of tracking details at various status. + * @property {Object} [meta] + * @property {PlatformTrack[]} [results] */ /** @@ -4692,18 +3013,12 @@ const Joi = require("joi"); * @property {FiltersInfo[]} [unfulfilled] * @property {FiltersInfo[]} [filters] * @property {FiltersInfo[]} [processed] - * @property {Object} [applied_filters] - Specifies the set of filters currently - * applied , search result, or view, detailing the criteria used to narrow - * down or sort the information presented. This object is designed to be - * highly flexible, allowing for the inclusion of various filter types such as - * date ranges, categories, status flags, or custom search terms. - * @property {Object} [page] - An object representing a page with pagination details. + * @property {Object} [applied_filters] + * @property {Object} [page] */ /** - * @typedef FiltersResponseSchema - * @property {AdvanceFilterInfo} [advance] - * @property {FiltersInfo} [global_1] + * @typedef FiltersResponse * @property {AdvanceFilterInfo} [advance_filter] * @property {FiltersInfo[]} [global_filter] */ @@ -4714,7 +3029,7 @@ const Joi = require("joi"); */ /** - * @typedef FileResponseSchema + * @typedef FileResponse * @property {string} [file_name] - Name of the file * @property {URL} [cdn] */ @@ -4726,15 +3041,22 @@ const Joi = require("joi"); */ /** - * @typedef BulkActionTemplateResponseSchema + * @typedef BulkActionTemplateResponse * @property {BulkActionTemplate[]} [template_x_slug] - Allowed bulk action template slugs */ /** - * @typedef PlatformShipmentReasonsResponseSchema - * @property {Reason[]} [reasons] - An array of reasons associated with the platform. - * @property {boolean} [success] - Indicates whether the API call was successful - * (true) or not (false). + * @typedef Reason + * @property {string[]} [qc_type] + * @property {number} [id] + * @property {QuestionSet[]} [question_set] + * @property {string} [display_name] + */ + +/** + * @typedef PlatformShipmentReasonsResponse + * @property {Reason[]} [reasons] + * @property {boolean} [success] */ /** @@ -4744,7 +3066,7 @@ const Joi = require("joi"); */ /** - * @typedef ShipmentReasonsResponseSchema + * @typedef ShipmentReasonsResponse * @property {ShipmentResponseReasons[]} reasons * @property {string} message * @property {boolean} success @@ -4753,41 +3075,21 @@ const Joi = require("joi"); /** * @typedef StoreAddress * @property {string} phone - * @property {string} created_at - Denotes the date and time when the transition - * of the store address was created. + * @property {string} created_at * @property {string} contact_person * @property {number} pincode - * @property {string} address_type - The type of the address (e.g., home, office). - * @property {string} address1 - The primary address dynamically forms based on - * a template. If the template includes a single key, Address1 contains that - * data. For templates with multiple keys like {address} {address2} {area} - * {state} {country}, Address1 compiles all into a single formatted string. + * @property {string} address_type + * @property {string} address1 * @property {string} [display_address] * @property {string} [version] - * @property {string} address_category - Category or classification of the - * address. The address_category field that includes "store", "delivery", and - * "billing" serves to classify addresses based on various business processes - * - * - 'store': Identifies addresses associated with physical retail locations or - * warehouses which is essential for inventory management, order - * fulfillment, and facilitating in-store pickups or returns. - * - 'delivery': Identifies addresses where orders are shipped to customers which - * ensures successful delivery, enhancing customer satisfaction, and - * optimizing logistics operations. - * - 'billing': Identifies addresses used for billing and financial transactions - * which are essential for payment processing, invoice generation, and - * maintaining financial accuracy. - * + * @property {string} address_category * @property {string} city * @property {number} longitude * @property {string} [address2] * @property {string} [area] * @property {string} [email] - * @property {string} updated_at - Denotes the date and time when any - * modifications were made to the store. - * @property {string} country_code - Uniquely identifies the country of the - * store addressds_type using the two-character standard ISO 3166-1 alpha-2 - * country codes. Examples include 'US' for the United States and 'IN' for India. + * @property {string} updated_at + * @property {string} country_code * @property {string} country * @property {string} [landmark] * @property {number} latitude @@ -4823,7 +3125,7 @@ const Joi = require("joi"); /** * @typedef Document * @property {string} value - * @property {string} type - Type of the document. + * @property {string} ds_type * @property {boolean} verified * @property {string} legal_name * @property {string} [url] @@ -4836,21 +3138,15 @@ const Joi = require("joi"); /** * @typedef StoreMeta - * @property {Object} [additional_contact_details] - Provides a flexible - * structure for storing extra contact information related to the store. + * @property {Object} [additional_contact_details] * @property {Object[]} [timing] * @property {string[]} [notification_emails] * @property {string} [gst_number] - * @property {Object} [ewaybill_portal_details] - Contains essential information - * and settings related to the e-Way Bill portal, which is used for generating - * and managing e-waybills for the transportation of goods under specific tax - * regulations. + * @property {Object} [ewaybill_portal_details] * @property {EInvoicePortalDetails} [einvoice_portal_details] * @property {StoreGstCredentials} gst_credentials * @property {string} stage - * @property {Object} [product_return_config] - Product return configuration - * details for the location. It can include details like on_same_store - * denoting whether return can be initiated at the same store. + * @property {Object} [product_return_config] * @property {StoreDocuments} [documents] * @property {string} display_name */ @@ -4861,17 +3157,14 @@ const Joi = require("joi"); * @property {boolean} [is_active] * @property {number} company_id * @property {number} [alohomora_user_id] - * @property {string} created_at - Denotes the date and time when the store was created. + * @property {string} created_at * @property {string} contact_person * @property {string} store_email * @property {boolean} [is_enabled_for_recon] * @property {string} pincode * @property {string} [mall_area] * @property {string} [vat_no] - * @property {string} address1 - The primary address dynamically forms based on - * a template. If the template includes a single key, Address1 contains that - * data. For templates with multiple keys like {address} {address2} {area} - * {state} {country}, Address1 compiles all into a single formatted string. + * @property {string} address1 * @property {string} [display_address] * @property {string} [store_active_from] * @property {string} city @@ -4880,11 +3173,10 @@ const Joi = require("joi"); * @property {string[]} [brand_store_tags] * @property {string} [order_integration_id] * @property {number} [parent_store_id] - * @property {string} location_type - Type of location of the fulfilling store. + * @property {string} location_type * @property {string} [code] * @property {string} fulfillment_channel - * @property {string} [updated_at] - Denotes the date and time when any - * modifications were made to the store. + * @property {string} [updated_at] * @property {StoreAddress} [store_address_json] * @property {StoreMeta} meta * @property {string} [s_id] @@ -4904,16 +3196,15 @@ const Joi = require("joi"); * @property {string} [logo] * @property {string} [invoice_prefix] * @property {boolean} [credit_note_allowed] - * @property {string} [start_date] - Denotes the start date and time when the - * brand was created. + * @property {string} [start_date] * @property {string} [company] * @property {boolean} [is_virtual_invoice] * @property {string} [script_last_ran] * @property {string} [pickup_location] - * @property {string} [created_on] - Timestamp when the brand was created. + * @property {string} [created_on] * @property {string} brand_name * @property {number} [brand_id] - * @property {string} [modified_on] - Timestamp when the brand of the order was modified. + * @property {string} [modified_on] * @property {number} [id] */ @@ -4923,36 +3214,23 @@ const Joi = require("joi"); * @property {number} brand_id * @property {string} slug_key * @property {string} [webstore_product_url] - * @property {number} [l3_category] - Represents the product's classification at - * the third level in the e-commerce platform's category hierarchy, using an - * integer identifier. This finer level of categorization allows for precise - * product organization and easier navigation for customers seeking specific items. - * @property {string} [l3_category_name] - This key specifies the name of the - * third-level category under which the product is listed, offering a more - * detailed classification within the e-commerce platform's hierarchy. - * @property {string} [last_updated_at] - Denotes the date and time when the - * item was updated. + * @property {number} [l3_category] + * @property {string} [l3_category_name] + * @property {string} [last_updated_at] * @property {string} name - * @property {string[]} [l2_category] - The l2_category field represents the - * second level of categorization for items within an e-commerce platform's - * hierarchy. This allows for classification beyond the top-tier (level 1) - * categories, helping customers to narrow down their search and find products + * @property {string[]} [l2_category] * @property {string} brand * @property {string[]} image * @property {string} [code] - * @property {number} [l1_category_id] - The unique identifier of the defines - * the top-tier categories to which a product belongs within the e-commerce - * platform's hierarchy. + * @property {number} [l1_category_id] * @property {number} item_id - * @property {string[]} [l1_category] - This array defines the top-tier - * categories to which a product belongs within the e-commerce platform's hierarchy. + * @property {string[]} [l1_category] * @property {string} [gender] * @property {boolean} [can_cancel] * @property {boolean} [can_return] * @property {string} size * @property {string} [branch_url] - * @property {Object} [meta] - Meta data of the item contains additional, - * potentially dynamic information about the item. + * @property {Object} [meta] * @property {string} [color] * @property {number} [department_id] * @property {number} [l2_category_id] @@ -4960,33 +3238,21 @@ const Joi = require("joi"); /** * @typedef ArticleStatusDetails - * @property {Object} [status] - Captures comprehensive status information for - * an article. Each status type, such as 'cancelled_fynd', contains objects - * keyed by unique identifiers (UIDs). These objects detail the specific - * status, including associated bag IDs with their quantities, total quantity - * affected, and reasons for the status if applicable. This structure allows - * for tracking multiple status conditions and their details for a single article. + * @property {Object} [status] */ /** * @typedef Company * @property {string} [pan_no] - * @property {string} [created_on] - Timestamp when the company was created. + * @property {string} [created_on] * @property {number} [id] * @property {string} [company_name] * @property {string} [gst_number] - * @property {string} [company_type] - The type of company, which can be one of - * the following: - `distributor`: Distributor - `franchise`: Franchise - - * `mbo`: MBO (Managed Business Operations) - `manufacturer-owner`: Owner/Manufacturer - * @property {string} [modified_on] - Timestamp when the company was modified. - * @property {Object} [meta] - Meta data of the company contains additional, - * potentially dynamic information about the company. - * @property {string} [business_type] - The type of business structure, which - * can be one of the following: - `Private`: Private Limited Company - - * `LLP/Partnership`: Limited Liability Partnership or Partnership - - * `HUF/Proprietorship`: Hindu Undivided Family or Proprietorship. - * @property {string} [agreement_start_date] - Specifies the official beginning - * date and time of an agreement or contract associated with the company. + * @property {string} [company_type] + * @property {string} [modified_on] + * @property {Object} [meta] + * @property {string} [business_type] + * @property {string} [agreement_start_date] */ /** @@ -4995,12 +3261,7 @@ const Joi = require("joi"); * @property {number} [gst_fee] * @property {number} [brand_calculated_amount] * @property {number} [tax_collected_at_source] - * @property {string} [gstin_code] - A GST Number (Goods and Services Tax - * Identification Number, often abbreviated as GSTIN) is a unique identifier - * assigned to a business or individual registered under the Goods and - * Services Tax (GST) system in countries like India. The GST number is - * essential for businesses to comply with tax regulations and for the - * government to track tax payments and returns. + * @property {string} [gstin_code] */ /** @@ -5014,13 +3275,20 @@ const Joi = require("joi"); /** * @typedef InvoiceDetails - * @property {string} [updated_date] - Specifies the date and time when the - * invoice was last updated. + * @property {string} [updated_date] * @property {string} [store_invoice_id] * @property {string} [invoice_url] * @property {string} [label_url] */ +/** + * @typedef ShipmentDetails + * @property {string} [dp_id] + * @property {Object} [dp_options] + * @property {boolean} [lock_status] + * @property {Object} [action_to_status] + */ + /** * @typedef UserDetails * @property {string} [user_oid] @@ -5032,8 +3300,7 @@ const Joi = require("joi"); * @property {boolean} [is_anonymous_user] * @property {string} [gender] * @property {string} [mongo_user_id] - * @property {Object} [meta] - Meta data of the user details contains - * additional, potentially dynamic information about the user details. + * @property {Object} [meta] */ /** @@ -5044,148 +3311,81 @@ const Joi = require("joi"); /** * @typedef BagDetails - * @property {number} [bag_update_time] - The timestamp indicating when the - * bag's information was last updated - * @property {string} [id] - A unique identifier for the bag record within the system. - * @property {number} [bag_id] - A unique identifier specifically for the bag - * itself, used for tracking purposes. + * @property {number} [bag_update_time] + * @property {string} [id] + * @property {number} [bag_id] * @property {AffiliateBagDetails} [affiliate_bag_details] * @property {AffiliateDetails} [affiliate_details] - * @property {Object[]} [applied_promos] - A list of promotional discounts that - * were applied to the bag's contents. + * @property {Object[]} [applied_promos] * @property {Article} [article] * @property {ArticleStatusDetails} [article_details] - * @property {BagStatusHistory[]} [bag_status] - An array of current status - * records associated with the bag, reflecting its lifecycle stages (e.g., - * pending, placed, delivered). - * @property {BagStatusHistory[]} [bag_status_history] - An array of current - * status records associated with the bag, reflecting its lifecycle stages - * (e.g., pending, placed, delivered). + * @property {BagStatusHistory[]} [bag_status] + * @property {BagStatusHistory[]} [bag_status_history] * @property {Brand} [brand] * @property {Company} [company] * @property {BagStatusHistory} [current_operational_status] * @property {BagStatusHistory} [current_status] * @property {Dates} [dates] - * @property {Address} [delivery_address] + * @property {PlatformDeliveryAddress} [delivery_address] * @property {DeliverySlotDetails} [delivery_slot] - * @property {string} [display_name] - Name of the bag intended for user display. - * @property {Object} [dp_details] - Additional information about the delivery - * partner (DP) handling the bag. + * @property {string} [display_name] + * @property {Object} [dp_details] * @property {Object} [einvoice_info] - * @property {string} [entity_type] - Type of entity that the tag is associated - * to (bag, shipments). - * @property {Object} [fallback_user] - Details of the fallback user associated - * with the bag . - * @property {FinancialBreakup[]} [financial_breakup] - A breakdown of the - * financial aspects associated with the bag, such as product prices, taxes, - * discounts, and total cost. + * @property {string} [entity_type] + * @property {Object} [fallback_user] + * @property {FinancialBreakup[]} [financial_breakup] * @property {Store} [fulfilling_store] - * @property {Object} [fyndstore_emp] - Fynd store employee details. + * @property {Object} [fyndstore_emp] * @property {GSTDetailsData} [gst_details] * @property {InvoiceDetails} [invoice] * @property {Item} [item] - * @property {string} [journey_type] - It is a type being used to represent the - * journey of shipment through the performed status transition. Forward - * Journey: The forward journey encompasses all the stages of shipping, - * including order placement, packing, dispatch, in-transit updates, and - * delivery. Return Journey: Contrary to the forward journey, the return - * journey involves the process of sending items back from the customer to the - * original sender or a designated return facility. - * @property {number} [line_number] - A unique identifying number associated - * with the bag. It is generated sequentially as bags are created. - * @property {boolean} [lock_status] - Indicates whether the bag is locked from - * further changes (true/false). A locked bag cannot undergo modifications - * until unlocked. - * @property {string} [manifest_id] - The identifier-assigned bags receive after - * they are manifest (thereby creating a shipment in conjunction with the - * allocated manifest). - * @property {Object} [meta] - Meta data of the bag details contains additional, - * potentially dynamic information about the bag details. - * @property {string} [mode_of_payment] - This field reflects the payment method - * used in the transaction for a particular bag. - * @property {number} [no_of_bags_order] - The total number of bags in this bag's order. - * @property {string} [operational_status] - The particular state a bag occupies - * in the shipment life-cycle. + * @property {string} [journey_type] + * @property {number} [line_number] + * @property {boolean} [lock_status] + * @property {string} [manifest_id] + * @property {Object} [meta] + * @property {string} [mode_of_payment] + * @property {number} [no_of_bags_order] + * @property {string} [operational_status] * @property {OrderDetails} [order] - * @property {string} [order_integration_id] - A unique identifier used for - * integrating this order with external systems or services. - * @property {string} [order_type] - Defines the specific journey a shipment - * will follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. For example: - * - * - "HomeDelivery": The order goes through all the steps needed for delivery, - * from being packed to arriving at the customer’s address. - * - "PickAtStore": The order is prepared for pickup at the store, skipping - * shipping steps to make it ready faster for the customer to collect in person. - * - "Digital": This order type likely refers to orders that involve digital goods - * or services, such as software, digital subscriptions, e-books, online - * courses, or any other item that can be delivered electronically. - * - * @property {number} [order_value] - An estimated value of the order at the - * time of placement or sale. + * @property {string} [order_integration_id] + * @property {string} [order_type] + * @property {number} [order_value] * @property {Store} [ordering_store] - * @property {Object} [parent_promo_bags] - An object containing details of - * parent promotional bags. - * @property {Object} [payment_methods] - This field stores a collection of - * payment method objects used in a transaction. Each key within this object - * represents a unique payment method code (e.g., "COD" for Cash On Delivery), - * and its value is an object containing detailed information about that - * payment method. The structure is designed to accommodate any number of - * payment methods,providing flexibility and comprehensive insights into each - * transaction's payment aspect. - * @property {string} [payment_type] - The Specific type of payment. - * @property {Object} [payments] - Defines allowed payment details for the item. + * @property {Object} [parent_promo_bags] + * @property {Object} [payment_methods] + * @property {string} [payment_type] + * @property {Object} [payments] * @property {Prices} [prices] - * @property {PriceAdjustmentCharge[]} [charges] - Defines any additional - * charges for the product. - * @property {boolean} [qc_required] - Indicates whether quality check is - * required for the product. - * @property {number} [quantity] - The quantity of the product. - * @property {Object[]} [reasons] - Information about why the Bag's - * item/products are being cancelled or returned or exchanged. This keys - * within this object represent unique - * @property {boolean} [restore_coupon] - Indicates whether voucher/wallet - * points can be reapplied to the product. - * @property {Object} [restore_promos] - Provides a flexible structure for - * storing information about promotion details or offers that are eligible for - * restoration. This can include details such as promo codes, descriptions of - * the offers, eligibility criteria, restoration conditions, and any other - * relevant data that supports the reactivation of previously paused or - * expired promotions. - * @property {Address} [rto_address] - * @property {string} [seller_identifier] - A unique identifier assigned by the - * seller to represent a specific transaction in their order processing system. + * @property {boolean} [qc_required] + * @property {number} [quantity] + * @property {Object[]} [reasons] + * @property {boolean} [restore_coupon] + * @property {Object} [restore_promos] + * @property {PlatformDeliveryAddress} [rto_address] + * @property {string} [seller_identifier] * @property {Shipment} [shipment] * @property {ShipmentDetails} [shipment_details] - * @property {string} [shipment_id] - Unique identifier of the shipment. + * @property {string} [shipment_id] * @property {ShipmentGstDetails} [shipment_gst] * @property {ShipmentStatusData} [shipment_status] - * @property {ShipmentStatusData[]} [shipment_status_history] - Status history - * of the shipment item in the order. + * @property {ShipmentStatusData[]} [shipment_status_history] * @property {BagReturnableCancelableStatus} [status] - * @property {string[]} [tags] - A list of tags or labels associated with the - * bag, which might be used for filtering, sorting, or categorizing purposes. - * @property {number} [total_shipment_bags] - The total number of shipped bags. - * @property {number} [total_shipments_in_order] - The total number of shipments - * in the order. - * @property {string} [transaction_type] - Specifies the type of the transaction - * being processed. This classification helps in distinguishing between - * different operational processes and allows for tailored handling of each - * transaction type. For example, a 'shipment' transaction type refers to - * operations related to the shipping of goods. - * @property {string} [type] - The type of the bag. - * @property {string} [updated_at] - The date and time when the bag was last updated. + * @property {string[]} [tags] + * @property {number} [total_shipment_bags] + * @property {number} [total_shipments_in_order] + * @property {string} [transaction_type] + * @property {string} [type] + * @property {string} [updated_at] * @property {UserDetails} [user] * @property {WeightData} [weight] - * @property {number[]} [original_bag_list] - Specifies the list of integers - * that specify the bag number - * @property {string} [identifier] - The unique identifier for the bag. + * @property {number[]} [original_bag_list] + * @property {string} [identifier] */ /** - * @typedef BagDetailsPlatformResponseSchema - * @property {number} [status_code] - Response status_code. + * @typedef BagDetailsPlatformResponse + * @property {number} [status_code] * @property {BagDetails} [data] */ @@ -5193,7 +3393,7 @@ const Joi = require("joi"); * @typedef BagsPage * @property {number} item_total * @property {boolean} has_next - * @property {string} page_type - The type of the page. + * @property {string} page_type * @property {number} current * @property {number} size */ @@ -5205,13 +3405,13 @@ const Joi = require("joi"); */ /** - * @typedef GetBagsPlatformResponseSchema - * @property {number} [status_code] - Response status_code. + * @typedef GetBagsPlatformResponse + * @property {number} [status_code] * @property {BagData} [data] */ /** - * @typedef GeneratePosOrderReceiptResponseSchema + * @typedef GeneratePosOrderReceiptResponse * @property {string} [customer_cn_receipt] * @property {boolean} [success] * @property {string} [order_id] @@ -5230,25 +3430,24 @@ const Joi = require("joi"); */ /** - * @typedef AllowedTemplatesResponseSchema + * @typedef AllowedTemplatesResponse * @property {Templates[]} [template_x_slug] */ /** - * @typedef TemplateDownloadResponseSchema + * @typedef TemplateDownloadResponse * @property {string} [file_name] * @property {string} [url] */ /** * @typedef Error - * @property {string} [message] - A message describing the error that occurred. - * @property {boolean} [success] - Indicates whether the API call was successful - * (true) or not (false). + * @property {string} [message] + * @property {boolean} [success] */ /** - * @typedef BulkFailedResponseSchema + * @typedef BulkFailedResponse * @property {boolean} [status] * @property {string} [error] */ @@ -5263,8 +3462,8 @@ class OrderPlatformModel { }); } - /** @returns {InvalidateShipmentCacheNestedResponseSchema} */ - static InvalidateShipmentCacheNestedResponseSchema() { + /** @returns {InvalidateShipmentCacheNestedResponse} */ + static InvalidateShipmentCacheNestedResponse() { return Joi.object({ shipment_id: Joi.string().allow(""), status: Joi.number(), @@ -5273,25 +3472,25 @@ class OrderPlatformModel { }); } - /** @returns {InvalidateShipmentCacheResponseSchema} */ - static InvalidateShipmentCacheResponseSchema() { + /** @returns {InvalidateShipmentCacheResponse} */ + static InvalidateShipmentCacheResponse() { return Joi.object({ response: Joi.array().items( - OrderPlatformModel.InvalidateShipmentCacheNestedResponseSchema() + OrderPlatformModel.InvalidateShipmentCacheNestedResponse() ), }); } - /** @returns {UpdatePackingErrorResponseSchema} */ - static UpdatePackingErrorResponseSchema() { + /** @returns {UpdatePackingErrorResponse} */ + static UpdatePackingErrorResponse() { return Joi.object({ status: Joi.number().allow(null), error: Joi.string().allow("").allow(null), }); } - /** @returns {ErrorResponseSchema} */ - static ErrorResponseSchema() { + /** @returns {ErrorResponse} */ + static ErrorResponse() { return Joi.object({ status: Joi.number().allow(null), success: Joi.boolean().allow(null), @@ -5317,8 +3516,8 @@ class OrderPlatformModel { }); } - /** @returns {StoreReassignResponseSchema} */ - static StoreReassignResponseSchema() { + /** @returns {StoreReassignResponse} */ + static StoreReassignResponse() { return Joi.object({ success: Joi.boolean(), message: Joi.string().allow(""), @@ -5370,8 +3569,8 @@ class OrderPlatformModel { }); } - /** @returns {CheckResponseSchema} */ - static CheckResponseSchema() { + /** @returns {CheckResponse} */ + static CheckResponse() { return Joi.object({ shipment_id: Joi.string().allow(""), status: Joi.string().allow(""), @@ -5385,19 +3584,17 @@ class OrderPlatformModel { }); } - /** @returns {UpdateShipmentLockResponseSchema} */ - static UpdateShipmentLockResponseSchema() { + /** @returns {UpdateShipmentLockResponse} */ + static UpdateShipmentLockResponse() { return Joi.object({ success: Joi.boolean(), message: Joi.string().allow(""), - check_response: Joi.array().items( - OrderPlatformModel.CheckResponseSchema() - ), + check_response: Joi.array().items(OrderPlatformModel.CheckResponse()), }); } - /** @returns {AnnouncementResponseSchema} */ - static AnnouncementResponseSchema() { + /** @returns {AnnouncementResponse} */ + static AnnouncementResponse() { return Joi.object({ to_datetime: Joi.string().allow(""), id: Joi.number().required(), @@ -5412,20 +3609,19 @@ class OrderPlatformModel { }); } - /** @returns {AnnouncementsResponseSchema} */ - static AnnouncementsResponseSchema() { + /** @returns {AnnouncementsResponse} */ + static AnnouncementsResponse() { return Joi.object({ announcements: Joi.array().items( - OrderPlatformModel.AnnouncementResponseSchema() + OrderPlatformModel.AnnouncementResponse() ), success: Joi.boolean(), status: Joi.number(), - message: Joi.string().allow(""), }); } - /** @returns {BaseResponseSchema} */ - static BaseResponseSchema() { + /** @returns {BaseResponse} */ + static BaseResponse() { return Joi.object({ success: Joi.boolean(), message: Joi.string().allow(""), @@ -5477,476 +3673,159 @@ class OrderPlatformModel { static EntitiesReasons() { return Joi.object({ filters: Joi.array().items(Joi.any()), - data: OrderPlatformModel.EntityReasonData(), - }); - } - - /** @returns {ReasonsData} */ - static ReasonsData() { - return Joi.object({ - products: Joi.array().items(OrderPlatformModel.ProductsReasons()), - entities: Joi.array().items(OrderPlatformModel.EntitiesReasons()), - }); - } - - /** @returns {Products} */ - static Products() { - return Joi.object({ - line_number: Joi.number(), - identifier: Joi.string().allow(""), - quantity: Joi.number(), - }); - } - - /** @returns {OrderItemDataUpdates} */ - static OrderItemDataUpdates() { - return Joi.object({ - data: Joi.object().pattern(/\S/, Joi.any()), - }); - } - - /** @returns {ProductsDataUpdatesFilters} */ - static ProductsDataUpdatesFilters() { - return Joi.object({ - line_number: Joi.number(), - identifier: Joi.string().allow(""), - quantity: Joi.number(), - }); - } - - /** @returns {ProductsDataUpdates} */ - static ProductsDataUpdates() { - return Joi.object({ - filters: Joi.array().items( - OrderPlatformModel.ProductsDataUpdatesFilters() - ), - data: Joi.object().pattern(/\S/, Joi.any()), - }); - } - - /** @returns {EntitiesDataUpdates} */ - static EntitiesDataUpdates() { - return Joi.object({ - filters: Joi.array().items(Joi.any()), - data: Joi.object().pattern(/\S/, Joi.any()), - }); - } - - /** @returns {OrderDataUpdates} */ - static OrderDataUpdates() { - return Joi.object({ - data: Joi.object().pattern(/\S/, Joi.any()), - }); - } - - /** @returns {DataUpdates} */ - static DataUpdates() { - return Joi.object({ - order_item_status: Joi.array().items( - OrderPlatformModel.OrderItemDataUpdates() - ), - products: Joi.array().items(OrderPlatformModel.ProductsDataUpdates()), - entities: Joi.array().items(OrderPlatformModel.EntitiesDataUpdates()), - order: Joi.array().items(OrderPlatformModel.OrderDataUpdates()), - }); - } - - /** @returns {ShipmentsRequestSchema} */ - static ShipmentsRequestSchema() { - return Joi.object({ - identifier: Joi.string().allow("").required(), - reasons: OrderPlatformModel.ReasonsData(), - products: Joi.array().items(OrderPlatformModel.Products()), - data_updates: OrderPlatformModel.DataUpdates(), - }); - } - - /** @returns {UpdatedAddressSchema} */ - static UpdatedAddressSchema() { - return Joi.object({ - address: Joi.string().allow(""), - area: Joi.string().allow(""), - landmark: Joi.string().allow(""), - pincode: Joi.string().allow(""), - city: Joi.string().allow(""), - state: Joi.string().allow(""), - name: Joi.string().allow(""), - phone: Joi.string().allow(""), - email: Joi.string().allow(""), - country: Joi.string().allow(""), - country_iso_code: Joi.string().allow(""), - latitude: Joi.number(), - longitude: Joi.number(), - }); - } - - /** @returns {UpdateAddressRequestBody} */ - static UpdateAddressRequestBody() { - return Joi.object({ - updated_address: OrderPlatformModel.UpdatedAddressSchema(), - address_type: Joi.string().allow(""), - address_category: Joi.string().allow(""), - }); - } - - /** @returns {StatuesRequestSchema} */ - static StatuesRequestSchema() { - return Joi.object({ - status: Joi.string().allow(""), - shipments: Joi.array().items(OrderPlatformModel.ShipmentsRequestSchema()), - exclude_bags_next_state: Joi.string().allow(""), - split_shipment: Joi.boolean(), - }); - } - - /** @returns {UpdateShipmentStatusRequestSchema} */ - static UpdateShipmentStatusRequestSchema() { - return Joi.object({ - force_transition: Joi.boolean(), - statuses: Joi.array().items(OrderPlatformModel.StatuesRequestSchema()), - lock_after_transition: Joi.boolean(), - unlock_before_transition: Joi.boolean(), - task: Joi.boolean(), - resume_tasks_after_unlock: Joi.boolean(), - }); - } - - /** @returns {ShipmentsResponseSchema} */ - static ShipmentsResponseSchema() { - return Joi.object({ - status: Joi.number().allow(null), - final_state: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - identifier: Joi.string().allow("").allow(null), - stack_trace: Joi.string().allow("").allow(null), - code: Joi.string().allow("").allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - message: Joi.string().allow("").allow(null), - exception: Joi.string().allow("").allow(null), - }); - } - - /** @returns {DPConfiguration} */ - static DPConfiguration() { - return Joi.object({ - shipping_by: Joi.string().allow(""), - }); - } - - /** @returns {PaymentConfig} */ - static PaymentConfig() { - return Joi.object({ - mode_of_payment: Joi.string().allow(""), - source: Joi.string().allow(""), - }); - } - - /** @returns {LockStateMessage} */ - static LockStateMessage() { - return Joi.object({ - state: Joi.string().allow(""), - message: Joi.string().allow(""), - }); - } - - /** @returns {CreateOrderConfig} */ - static CreateOrderConfig() { - return Joi.object({ - dp_configuration: OrderPlatformModel.DPConfiguration().required(), - location_reassignment: Joi.boolean(), - payment: OrderPlatformModel.PaymentConfig(), - optimal_shipment_creation: Joi.boolean(), - lock_state_messages: Joi.array().items( - OrderPlatformModel.LockStateMessage() - ), - integration_type: Joi.string().allow(""), - }); - } - - /** @returns {StatuesResponseSchema} */ - static StatuesResponseSchema() { - return Joi.object({ - shipments: Joi.array().items( - OrderPlatformModel.ShipmentsResponseSchema() - ), - }); - } - - /** @returns {UpdateShipmentStatusResponseBody} */ - static UpdateShipmentStatusResponseBody() { - return Joi.object({ - statuses: Joi.array().items(OrderPlatformModel.StatuesResponseSchema()), - }); - } - - /** @returns {OrderUser} */ - static OrderUser() { - return Joi.object({ - phone: Joi.number().required(), - last_name: Joi.string().allow("").required(), - address1: Joi.string().allow("").allow(null), - state: Joi.string().allow("").required(), - pincode: Joi.string().allow("").required(), - first_name: Joi.string().allow("").required(), - mobile: Joi.number().required(), - address2: Joi.string().allow("").allow(null), - email: Joi.string().allow("").required(), - country: Joi.string().allow("").required(), - city: Joi.string().allow("").required(), - }); - } - - /** @returns {OrderPriority} */ - static OrderPriority() { - return Joi.object({ - fulfilment_priority_text: Joi.string().allow(""), - affiliate_priority_code: Joi.string().allow("").allow(null), - fulfilment_priority: Joi.number().allow(null), - }); - } - - /** @returns {ArticleDetails} */ - static ArticleDetails() { - return Joi.object({ - _id: Joi.string().allow("").required(), - brand_id: Joi.number().required(), - dimension: Joi.object().pattern(/\S/, Joi.any()).required(), - category: Joi.object().pattern(/\S/, Joi.any()).required(), - weight: Joi.object().pattern(/\S/, Joi.any()).required(), - attributes: Joi.object().pattern(/\S/, Joi.any()).required(), - quantity: Joi.number().required(), - }); - } - - /** @returns {LocationDetails} */ - static LocationDetails() { - return Joi.object({ - fulfillment_type: Joi.string().allow("").required(), - articles: Joi.array() - .items(OrderPlatformModel.ArticleDetails()) - .required(), - fulfillment_id: Joi.number().required(), - }); - } - - /** @returns {ShipmentDetails} */ - static ShipmentDetails() { - return Joi.object({ - box_type: Joi.string().allow("").allow(null), - shipments: Joi.number().required(), - fulfillment_id: Joi.number().required(), - articles: Joi.array() - .items(OrderPlatformModel.ArticleDetails()) - .required(), - dp_id: Joi.string().allow("").allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()), - affiliate_shipment_id: Joi.string().allow("").required(), - dp_options: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - lock_status: Joi.boolean().allow(null), - action_to_status: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - }).allow(null); - } - - /** @returns {ShipmentConfig} */ - static ShipmentConfig() { - return Joi.object({ - location_details: OrderPlatformModel.LocationDetails(), - source: Joi.string().allow("").required(), - to_pincode: Joi.string().allow("").required(), - shipment: Joi.array() - .items(OrderPlatformModel.ShipmentDetails()) - .required(), - identifier: Joi.string().allow("").required(), - payment_mode: Joi.string().allow("").required(), - action: Joi.string().allow("").required(), - journey: Joi.string().allow("").required(), - }); - } - - /** @returns {ShipmentData} */ - static ShipmentData() { - return Joi.object({ - shipment_data: OrderPlatformModel.ShipmentConfig().required(), + data: OrderPlatformModel.EntityReasonData(), }); } - /** @returns {MarketPlacePdf} */ - static MarketPlacePdf() { + /** @returns {ReasonsData} */ + static ReasonsData() { return Joi.object({ - invoice: Joi.string().allow("").allow(null), - label: Joi.string().allow("").allow(null), + products: Joi.array().items(OrderPlatformModel.ProductsReasons()), + entities: Joi.array().items(OrderPlatformModel.EntitiesReasons()), }); } - /** @returns {AffiliateBag} */ - static AffiliateBag() { + /** @returns {Products} */ + static Products() { return Joi.object({ - pdf_links: OrderPlatformModel.MarketPlacePdf(), - store_id: Joi.number().required(), - sku: Joi.string().allow("").required(), - discount: Joi.number().required(), - unit_price: Joi.number().required(), - price_effective: Joi.number().required(), - affiliate_store_id: Joi.string().allow("").required(), - identifier: Joi.object().pattern(/\S/, Joi.any()).required(), - seller_identifier: Joi.string().allow("").required(), - item_size: Joi.string().allow("").required(), - amount_paid: Joi.number().required(), - fynd_store_id: Joi.string().allow("").required(), - item_id: Joi.number().required(), - delivery_charge: Joi.number().required(), - avl_qty: Joi.number().required(), - price_marked: Joi.number().required(), - quantity: Joi.number().required(), - company_id: Joi.number().required(), - hsn_code_id: Joi.string().allow("").required(), - _id: Joi.string().allow("").required(), - affiliate_meta: Joi.object().pattern(/\S/, Joi.any()).required(), - modified_on: Joi.string().allow("").required(), - transfer_price: Joi.number().required(), + line_number: Joi.number(), + identifier: Joi.string().allow(""), + quantity: Joi.number(), }); } - /** @returns {UserData} */ - static UserData() { + /** @returns {OrderItemDataUpdates} */ + static OrderItemDataUpdates() { return Joi.object({ - shipping_user: OrderPlatformModel.OrderUser(), - billing_user: OrderPlatformModel.OrderUser(), + data: Joi.any(), }); } - /** @returns {OrderInfo} */ - static OrderInfo() { + /** @returns {ProductsDataUpdatesFilters} */ + static ProductsDataUpdatesFilters() { return Joi.object({ - affiliate_order_id: Joi.string().allow(""), - cod_charges: Joi.number().required(), - items: Joi.object().pattern(/\S/, Joi.any()).required(), - discount: Joi.number().required(), - billing_address: OrderPlatformModel.OrderUser().required(), - payment: Joi.object().pattern(/\S/, Joi.any()), - order_priority: OrderPlatformModel.OrderPriority(), - shipment: OrderPlatformModel.ShipmentData(), - delivery_charges: Joi.number().required(), - shipping_address: OrderPlatformModel.OrderUser().required(), - order_value: Joi.number().required(), - payment_mode: Joi.string().allow("").required(), - bags: Joi.array().items(OrderPlatformModel.AffiliateBag()).required(), - user: OrderPlatformModel.UserData().required(), - coupon: Joi.string().allow("").allow(null), + line_number: Joi.number(), + identifier: Joi.string().allow(""), }); } - /** @returns {AffiliateAppConfigMeta} */ - static AffiliateAppConfigMeta() { + /** @returns {ProductsDataUpdates} */ + static ProductsDataUpdates() { return Joi.object({ - value: Joi.string().allow("").required(), - name: Joi.string().allow("").required(), + filters: Joi.array().items( + OrderPlatformModel.ProductsDataUpdatesFilters() + ), + data: Joi.any(), }); } - /** @returns {AffiliateAppConfig} */ - static AffiliateAppConfig() { + /** @returns {EntitiesDataUpdates} */ + static EntitiesDataUpdates() { return Joi.object({ - id: Joi.string().allow("").required(), - description: Joi.string().allow(""), - updated_at: Joi.string().allow("").required(), - name: Joi.string().allow("").required(), - token: Joi.string().allow("").required(), - meta: Joi.array().items(OrderPlatformModel.AffiliateAppConfigMeta()), - owner: Joi.string().allow("").required(), - secret: Joi.string().allow("").required(), - created_at: Joi.string().allow("").required(), + filters: Joi.array().items(Joi.any()), + data: Joi.any(), }); } - /** @returns {AffiliateInventoryArticleAssignmentConfig} */ - static AffiliateInventoryArticleAssignmentConfig() { + /** @returns {DataUpdates} */ + static DataUpdates() { return Joi.object({ - post_order_reassignment: Joi.boolean(), + order_item_status: Joi.array().items( + OrderPlatformModel.OrderItemDataUpdates() + ), + products: Joi.array().items(OrderPlatformModel.ProductsDataUpdates()), + entities: Joi.array().items(OrderPlatformModel.EntitiesDataUpdates()), }); } - /** @returns {AffiliateInventoryPaymentConfig} */ - static AffiliateInventoryPaymentConfig() { + /** @returns {ShipmentsRequest} */ + static ShipmentsRequest() { return Joi.object({ - source: Joi.string().allow(""), - mode_of_payment: Joi.string().allow(""), + identifier: Joi.string().allow("").required(), + reasons: OrderPlatformModel.ReasonsData(), + products: Joi.array().items(OrderPlatformModel.Products()), + data_updates: OrderPlatformModel.DataUpdates(), }); } - /** @returns {AffiliateInventoryStoreConfig} */ - static AffiliateInventoryStoreConfig() { + /** @returns {StatuesRequest} */ + static StatuesRequest() { return Joi.object({ - store: Joi.object().pattern(/\S/, Joi.any()), + status: Joi.string().allow(""), + shipments: Joi.array().items(OrderPlatformModel.ShipmentsRequest()), + exclude_bags_next_state: Joi.string().allow(""), + split_shipment: Joi.boolean(), }); } - /** @returns {AffiliateInventoryOrderConfig} */ - static AffiliateInventoryOrderConfig() { + /** @returns {UpdateShipmentStatusRequestSchema} */ + static UpdateShipmentStatusRequestSchema() { return Joi.object({ - force_reassignment: Joi.boolean(), + force_transition: Joi.boolean(), + statuses: Joi.array().items(OrderPlatformModel.StatuesRequest()), + lock_after_transition: Joi.boolean(), + unlock_before_transition: Joi.boolean(), + task: Joi.boolean(), + resume_tasks_after_unlock: Joi.boolean(), }); } - /** @returns {AffiliateInventoryLogisticsConfig} */ - static AffiliateInventoryLogisticsConfig() { + /** @returns {ShipmentsResponse} */ + static ShipmentsResponse() { return Joi.object({ - dp_assignment: Joi.boolean(), + status: Joi.number().allow(null), + final_state: Joi.any().allow(null), + identifier: Joi.string().allow("").allow(null), + stack_trace: Joi.string().allow("").allow(null), + code: Joi.string().allow("").allow(null), + meta: Joi.any().allow(null), + message: Joi.string().allow("").allow(null), + exception: Joi.string().allow("").allow(null), }); } - /** @returns {AffiliateInventoryConfig} */ - static AffiliateInventoryConfig() { + /** @returns {StatuesResponse} */ + static StatuesResponse() { return Joi.object({ - article_assignment: OrderPlatformModel.AffiliateInventoryArticleAssignmentConfig(), - payment: OrderPlatformModel.AffiliateInventoryPaymentConfig(), - inventory: OrderPlatformModel.AffiliateInventoryStoreConfig(), - order: OrderPlatformModel.AffiliateInventoryOrderConfig(), - logistics: OrderPlatformModel.AffiliateInventoryLogisticsConfig(), + shipments: Joi.array().items(OrderPlatformModel.ShipmentsResponse()), }); } - /** @returns {AffiliateConfig} */ - static AffiliateConfig() { + /** @returns {UpdateShipmentStatusResponseBody} */ + static UpdateShipmentStatusResponseBody() { return Joi.object({ - app: OrderPlatformModel.AffiliateAppConfig(), - inventory: OrderPlatformModel.AffiliateInventoryConfig(), - app_company_id: Joi.number().allow(null), + statuses: Joi.array().items(OrderPlatformModel.StatuesResponse()), }); } - /** @returns {Affiliate} */ - static Affiliate() { + /** @returns {DPConfiguration} */ + static DPConfiguration() { return Joi.object({ - id: Joi.string().allow("").required(), - config: OrderPlatformModel.AffiliateConfig(), - token: Joi.string().allow("").required(), + shipping_by: Joi.string().allow(""), }); } - /** @returns {AffiliateStoreIdMapping} */ - static AffiliateStoreIdMapping() { + /** @returns {PaymentConfig} */ + static PaymentConfig() { return Joi.object({ - store_id: Joi.number().required(), - marketplace_store_id: Joi.string().allow("").required(), + mode_of_payment: Joi.string().allow(""), + source: Joi.string().allow(""), }); } - /** @returns {OrderConfig} */ - static OrderConfig() { + /** @returns {CreateOrderConfig} */ + static CreateOrderConfig() { return Joi.object({ - create_user: Joi.boolean(), - article_lookup: Joi.string().allow(""), - bag_end_state: Joi.string().allow(""), - affiliate: OrderPlatformModel.Affiliate().required(), - store_lookup: Joi.string().allow(""), - affiliate_store_id_mapping: Joi.array() - .items(OrderPlatformModel.AffiliateStoreIdMapping()) - .required(), + dp_configuration: OrderPlatformModel.DPConfiguration().required(), + integration_type: Joi.string().allow(""), + location_reassignment: Joi.boolean(), + payment: OrderPlatformModel.PaymentConfig(), + optimal_shipment_creation: Joi.boolean(), }); } - /** @returns {CreateOrderResponseSchema} */ - static CreateOrderResponseSchema() { + /** @returns {CreateOrderResponse} */ + static CreateOrderResponse() { return Joi.object({ fynd_order_id: Joi.string().allow("").required(), }); @@ -5959,8 +3838,8 @@ class OrderPlatformModel { }); } - /** @returns {SuccessResponseSchema} */ - static SuccessResponseSchema() { + /** @returns {SuccessResponse} */ + static SuccessResponse() { return Joi.object({ success: Joi.boolean(), message: Joi.string().allow(""), @@ -5977,8 +3856,8 @@ class OrderPlatformModel { }); } - /** @returns {GetActionsResponseSchema} */ - static GetActionsResponseSchema() { + /** @returns {GetActionsResponse} */ + static GetActionsResponse() { return Joi.object({ permissions: Joi.array().items(OrderPlatformModel.ActionInfo()), }); @@ -5996,16 +3875,6 @@ class OrderPlatformModel { }); } - /** @returns {RefundInformation} */ - static RefundInformation() { - return Joi.object({ - mode: Joi.string().allow(""), - amount: Joi.number(), - merchant_transaction_id: Joi.string().allow(""), - refund_status: Joi.string().allow(""), - }); - } - /** @returns {HistoryMeta} */ static HistoryMeta() { return Joi.object({ @@ -6032,13 +3901,6 @@ class OrderPlatformModel { recipient: Joi.string().allow("").allow(null), slug: Joi.string().allow("").allow(null), message: Joi.string().allow("").allow(null), - prev_store_name: Joi.string().allow("").allow(null), - prev_store_code: Joi.string().allow("").allow(null), - prev_store_id: Joi.string().allow("").allow(null), - refund_to: Joi.string().allow("").allow(null), - refund_information: Joi.array().items( - OrderPlatformModel.RefundInformation() - ), }); } @@ -6052,7 +3914,7 @@ class OrderPlatformModel { createdat: Joi.string().allow("").required(), created_ts: Joi.string().allow(""), ticket_id: Joi.string().allow(""), - activity_type: Joi.string().allow("").required(), + type: Joi.string().allow("").required(), l2_detail: Joi.string().allow(""), assigned_agent: Joi.string().allow(""), meta: OrderPlatformModel.HistoryMeta(), @@ -6062,8 +3924,8 @@ class OrderPlatformModel { }); } - /** @returns {ShipmentHistoryResponseSchema} */ - static ShipmentHistoryResponseSchema() { + /** @returns {ShipmentHistoryResponse} */ + static ShipmentHistoryResponse() { return Joi.object({ success: Joi.boolean(), activity_history: Joi.array() @@ -6109,8 +3971,8 @@ class OrderPlatformModel { /** @returns {SmsDataPayload} */ static SmsDataPayload() { return Joi.object({ - shipment_id: Joi.string().allow("").required(), - phone_number: Joi.string().allow("").required(), + shipment_id: Joi.number().required(), + phone_number: Joi.number().required(), amount_paid: Joi.number(), order_id: Joi.string().allow("").required(), payment_mode: Joi.string().allow(""), @@ -6141,19 +4003,19 @@ class OrderPlatformModel { delivery_charges: Joi.number().allow(null), transaction_id: Joi.string().allow("").allow(null), collect_by: Joi.string().allow(""), - headers: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + headers: Joi.any().allow(null), coupon_value: Joi.number().allow(null), order_value: Joi.number(), created_time: Joi.string().allow(""), currency: Joi.string().allow(""), total_order_value: Joi.number(), ordering_channel: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + meta: Joi.any().allow(null), cod_charges: Joi.number().allow(null), cashback_value: Joi.number().allow(null), refund_by: Joi.string().allow(""), affiliate_order_date: Joi.string().allow("").allow(null), - payment_methods: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + payment_methods: Joi.any().allow(null), affiliate_order_id: Joi.string().allow(""), payment_mode_id: Joi.number().allow(null), promotion_effective_discount: Joi.number().allow(null), @@ -6164,7 +4026,6 @@ class OrderPlatformModel { affiliate_id: Joi.string().allow(""), ordering_channel_logo: Joi.string().allow("").allow(null), prices: OrderPlatformModel.Prices(), - charges: Joi.array().items(OrderPlatformModel.PriceAdjustmentCharge()), }); } @@ -6209,14 +4070,6 @@ class OrderPlatformModel { }); } - /** @returns {SendSmsResponseSchema} */ - static SendSmsResponseSchema() { - return Joi.object({ - success: Joi.boolean().required(), - message: Joi.string().allow("").required(), - }); - } - /** @returns {Dimension} */ static Dimension() { return Joi.object({ @@ -6237,8 +4090,8 @@ class OrderPlatformModel { }); } - /** @returns {UpdatePackagingDimensionsResponseSchema} */ - static UpdatePackagingDimensionsResponseSchema() { + /** @returns {UpdatePackagingDimensionsResponse} */ + static UpdatePackagingDimensionsResponse() { return Joi.object({ message: Joi.string().allow(""), }); @@ -6250,7 +4103,7 @@ class OrderPlatformModel { name: Joi.string().allow("").required(), rate: Joi.number().required(), breakup: Joi.array().items(Joi.any()), - amount: Joi.object().pattern(/\S/, Joi.any()).required(), + amount: Joi.any().required(), }); } @@ -6277,7 +4130,7 @@ class OrderPlatformModel { static LineItem() { return Joi.object({ charges: Joi.array().items(OrderPlatformModel.Charge()), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), custom_message: Joi.string().allow(""), quantity: Joi.number(), seller_identifier: Joi.string().allow("").required(), @@ -6288,71 +4141,43 @@ class OrderPlatformModel { /** @returns {ProcessingDates} */ static ProcessingDates() { return Joi.object({ - dp_pickup_slot: Joi.object().pattern(/\S/, Joi.any()), + dp_pickup_slot: Joi.any(), dispatch_after_date: Joi.string().allow(""), dispatch_by_date: Joi.string().allow(""), confirm_by_date: Joi.string().allow(""), - customer_pickup_slot: Joi.object().pattern(/\S/, Joi.any()), + customer_pickup_slot: Joi.any(), pack_by_date: Joi.string().allow(""), }); } - /** @returns {Tag} */ - static Tag() { - return Joi.object({ - slug: Joi.string().allow(""), - display_text: Joi.string().allow(""), - }); - } - - /** @returns {ProcessAfterConfig} */ - static ProcessAfterConfig() { - return Joi.object({ - is_scheduled_shipment: Joi.boolean(), - enable_processing_after: Joi.string().allow(""), - }); - } - - /** @returns {SystemMessages} */ - static SystemMessages() { - return Joi.object({ - message_type: Joi.string().allow("").required(), - priority: Joi.number().required(), - message: Joi.string().allow("").required(), - inject_at: Joi.array().items(Joi.string().allow("")), - }); - } - /** @returns {Shipment} */ static Shipment() { return Joi.object({ line_items: Joi.array().items(OrderPlatformModel.LineItem()).required(), external_shipment_id: Joi.string().allow(""), processing_dates: OrderPlatformModel.ProcessingDates(), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + meta: Joi.any().allow(null), priority: Joi.number(), location_id: Joi.number(), order_type: Joi.string().allow(""), - tags: Joi.array().items(Joi.string().allow("")).allow(null, ""), - system_messages: Joi.array().items(OrderPlatformModel.SystemMessages()), - process_after_config: OrderPlatformModel.ProcessAfterConfig(), parent_type: Joi.string().allow("").allow(null), store_invoice_id: Joi.string().allow("").allow(null), lock_status: Joi.string().allow("").allow(null), type: Joi.string().allow("").allow(null), - billing_address_json: OrderPlatformModel.Address(), + billing_address_json: OrderPlatformModel.PlatformDeliveryAddress(), id: Joi.string().allow(""), fulfilment_priority: Joi.number().allow(null), is_active: Joi.boolean(), previous_shipment_id: Joi.string().allow("").allow(null), - pdf_links: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - delivery_address_json: OrderPlatformModel.Address(), + pdf_links: Joi.any().allow(null), + delivery_address_json: OrderPlatformModel.PlatformDeliveryAddress(), eway_bill_id: Joi.string().allow("").allow(null), affiliate_shipment_id: Joi.string().allow("").allow(null), fynd_order_id: Joi.string().allow(""), + tags: Joi.array().items(Joi.string().allow("")).allow(null, ""), created_at: Joi.string().allow(""), delivery_awb_number: Joi.string().allow("").allow(null), - hand_over_contact_json: OrderPlatformModel.Address(), + hand_over_contact_json: OrderPlatformModel.PlatformDeliveryAddress(), credit_note_id: Joi.string().allow("").allow(null), parent_id: Joi.string().allow("").allow(null), affiliate_id: Joi.string().allow(""), @@ -6408,36 +4233,6 @@ class OrderPlatformModel { }); } - /** @returns {BillingInfo} */ - static BillingInfo() { - return Joi.object({ - alternate_mobile_number: Joi.string().allow(""), - state: Joi.string().allow(""), - customer_code: Joi.string().allow(""), - middle_name: Joi.string().allow(""), - primary_mobile_number: Joi.string().allow(""), - last_name: Joi.string().allow(""), - gender: Joi.string().allow(""), - house_no: Joi.string().allow(""), - first_name: Joi.string().allow(""), - title: Joi.string().allow(""), - country: Joi.string().allow(""), - state_code: Joi.string().allow(""), - city: Joi.string().allow(""), - external_customer_code: Joi.string().allow(""), - floor_no: Joi.string().allow(""), - alternate_email: Joi.string().allow(""), - address: Joi.string().allow(""), - area: Joi.string().allow(""), - address1: Joi.string().allow(""), - pincode: Joi.string().allow(""), - primary_email: Joi.string().allow(""), - address2: Joi.string().allow(""), - country_code: Joi.string().allow(""), - country_iso_code: Joi.string().allow(""), - }); - } - /** @returns {UserInfo} */ static UserInfo() { return Joi.object({ @@ -6468,8 +4263,8 @@ class OrderPlatformModel { refund_by: Joi.string().allow("").required(), name: Joi.string().allow("").required(), amount: Joi.number().required(), - meta: Joi.object().pattern(/\S/, Joi.any()), - transaction_data: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), + transaction_data: Joi.any(), }); } @@ -6488,19 +4283,17 @@ class OrderPlatformModel { shipments: Joi.array().items(OrderPlatformModel.Shipment()).required(), shipping_info: OrderPlatformModel.ShippingInfo().required(), billing_info: OrderPlatformModel.ShippingInfo().required(), - currency_info: Joi.object().pattern(/\S/, Joi.any()), + currency_info: Joi.any(), external_order_id: Joi.string().allow(""), charges: Joi.array().items(OrderPlatformModel.Charge()), external_creation_date: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), tax_info: OrderPlatformModel.TaxInfo(), config: OrderPlatformModel.CreateOrderConfig().required(), payment_info: OrderPlatformModel.PaymentInfo().required(), user_info: OrderPlatformModel.UserInfo(), ordering_store_id: Joi.number(), order_platform: Joi.string().allow(""), - status: Joi.string().allow(""), - system_messages: Joi.array().items(OrderPlatformModel.SystemMessages()), order_type: Joi.string().allow(""), fynd_order_id: Joi.string().allow(""), application_id: Joi.string().allow(""), @@ -6518,58 +4311,6 @@ class OrderPlatformModel { }); } - /** @returns {PaymentMethods} */ - static PaymentMethods() { - return Joi.object({ - collect_by: Joi.string().allow(""), - refund_by: Joi.string().allow(""), - mode: Joi.string().allow(""), - }); - } - - /** @returns {CreateChannelPaymentInfo} */ - static CreateChannelPaymentInfo() { - return Joi.object({ - source: Joi.string().allow(""), - payment_methods: Joi.array().items(OrderPlatformModel.PaymentMethods()), - mode_of_payment: Joi.string().allow(""), - }); - } - - /** @returns {CreateChannelConfig} */ - static CreateChannelConfig() { - return Joi.object({ - dp_configuration: OrderPlatformModel.DPConfiguration(), - shipment_assignment: Joi.string().allow(""), - location_reassignment: Joi.boolean(), - logo_url: Joi.object().pattern(/\S/, Joi.any()), - payment_info: OrderPlatformModel.CreateChannelPaymentInfo(), - lock_states: Joi.array().items(Joi.string().allow("")), - }); - } - - /** @returns {CreateChannelConfigData} */ - static CreateChannelConfigData() { - return Joi.object({ - config_data: OrderPlatformModel.CreateChannelConfig(), - }); - } - - /** @returns {CreateChannelConifgErrorResponseSchema} */ - static CreateChannelConifgErrorResponseSchema() { - return Joi.object({ - error: Joi.string().allow(""), - request_id: Joi.string().allow("").allow(null), - status: Joi.number().required(), - info: Joi.any(), - stack_trace: Joi.string().allow("").allow(null), - code: Joi.string().allow("").allow(null), - meta: Joi.string().allow("").allow(null), - message: Joi.string().allow("").required(), - exception: Joi.string().allow("").allow(null), - }); - } - /** @returns {UploadManifestConsent} */ static UploadManifestConsent() { return Joi.object({ @@ -6578,15 +4319,6 @@ class OrderPlatformModel { }); } - /** @returns {CreateChannelConfigResponseSchema} */ - static CreateChannelConfigResponseSchema() { - return Joi.object({ - is_inserted: Joi.boolean(), - is_upserted: Joi.boolean(), - acknowledged: Joi.boolean(), - }); - } - /** @returns {PlatformOrderUpdate} */ static PlatformOrderUpdate() { return Joi.object({ @@ -6617,17 +4349,14 @@ class OrderPlatformModel { static OrderStatus() { return Joi.object({ order_details: Joi.array().items(OrderPlatformModel.FyndOrderIdList()), - start_date: Joi.string().allow("").required(), - end_date: Joi.string().allow("").required(), - mobile: Joi.number().required(), }); } /** @returns {BagStateTransitionMap} */ static BagStateTransitionMap() { return Joi.object({ - fynd: Joi.object().pattern(/\S/, Joi.any()), - affiliate: Joi.object().pattern(/\S/, Joi.any()), + fynd: Joi.any(), + affiliate: Joi.any(), }); } @@ -6639,32 +4368,6 @@ class OrderPlatformModel { }); } - /** @returns {FetchCreditBalanceRequestPayload} */ - static FetchCreditBalanceRequestPayload() { - return Joi.object({ - affiliate_id: Joi.string().allow("").required(), - seller_id: Joi.string().allow("").required(), - customer_mobile_number: Joi.string().allow("").required(), - }); - } - - /** @returns {CreditBalanceInfo} */ - static CreditBalanceInfo() { - return Joi.object({ - total_credited_balance: Joi.string().allow(""), - reason: Joi.string().allow(""), - customer_mobile_number: Joi.string().allow(""), - }); - } - - /** @returns {FetchCreditBalanceResponsePayload} */ - static FetchCreditBalanceResponsePayload() { - return Joi.object({ - success: Joi.boolean().required(), - data: OrderPlatformModel.CreditBalanceInfo().required(), - }); - } - /** @returns {RefundModeConfigRequestPayload} */ static RefundModeConfigRequestPayload() { return Joi.object({ @@ -6739,8 +4442,8 @@ class OrderPlatformModel { }); } - /** @returns {AttachOrderUserResponseSchema} */ - static AttachOrderUserResponseSchema() { + /** @returns {AttachOrderUserResponse} */ + static AttachOrderUserResponse() { return Joi.object({ success: Joi.boolean(), message: Joi.string().allow(""), @@ -6765,8 +4468,8 @@ class OrderPlatformModel { }); } - /** @returns {SendUserMobileOtpResponseSchema} */ - static SendUserMobileOtpResponseSchema() { + /** @returns {SendUserMobileOtpResponse} */ + static SendUserMobileOtpResponse() { return Joi.object({ success: Joi.boolean(), status: Joi.number(), @@ -6802,8 +4505,8 @@ class OrderPlatformModel { }); } - /** @returns {VerifyOtpResponseSchema} */ - static VerifyOtpResponseSchema() { + /** @returns {VerifyOtpResponse} */ + static VerifyOtpResponse() { return Joi.object({ status: Joi.number(), success: Joi.boolean(), @@ -6812,8 +4515,8 @@ class OrderPlatformModel { }); } - /** @returns {BulkReportsDownloadRequestSchema} */ - static BulkReportsDownloadRequestSchema() { + /** @returns {BulkReportsDownloadRequest} */ + static BulkReportsDownloadRequest() { return Joi.object({ store_ids: Joi.array().items(Joi.string().allow("")), lane_type: Joi.string().allow(""), @@ -6824,20 +4527,20 @@ class OrderPlatformModel { entities: Joi.array().items(Joi.string().allow("")), filter_type: Joi.string().allow(""), is_cross_company_enabled: Joi.boolean(), - custom_filters_for_lane: Joi.object().pattern(/\S/, Joi.any()), + custom_filters_for_lane: Joi.any(), }); } - /** @returns {BulkReportsDownloadResponseSchema} */ - static BulkReportsDownloadResponseSchema() { + /** @returns {BulkReportsDownloadResponse} */ + static BulkReportsDownloadResponse() { return Joi.object({ success: Joi.boolean(), batch_id: Joi.string().allow(""), }); } - /** @returns {APIFailedResponseSchema} */ - static APIFailedResponseSchema() { + /** @returns {APIFailedResponse} */ + static APIFailedResponse() { return Joi.object({ status: Joi.boolean(), error: Joi.string().allow(""), @@ -6852,8 +4555,8 @@ class OrderPlatformModel { }); } - /** @returns {BulkStateTransistionResponseSchema} */ - static BulkStateTransistionResponseSchema() { + /** @returns {BulkStateTransistionResponse} */ + static BulkStateTransistionResponse() { return Joi.object({ status: Joi.boolean(), message: Joi.string().allow(""), @@ -6872,7 +4575,10 @@ class OrderPlatformModel { processing_shipments: Joi.array().items(Joi.string().allow("")), successful_shipments: Joi.array().items(Joi.string().allow("")), invoiceable_shipments: Joi.array().items(Joi.string().allow("")), - failed_invoiced_shipments: Joi.object().pattern(/\S/, Joi.any()), + failed_invoiced_shipments: Joi.object().pattern( + /\S/, + Joi.string().allow("") + ), processing_invoice_shipments: Joi.array().items(Joi.string().allow("")), successful_invoiced_shipments: Joi.array().items(Joi.string().allow("")), }); @@ -6888,13 +4594,13 @@ class OrderPlatformModel { is_invoiceable: Joi.boolean(), user_name: Joi.string().allow(""), file_url: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), invoice_document_type: Joi.string().allow(""), label_document_type: Joi.string().allow(""), file_name: Joi.string().allow(""), store_name: Joi.string().allow(""), updated_ts: Joi.number(), - status: Joi.string().allow(""), + status: Joi.boolean(), store_code: Joi.string().allow(""), bulk_action_type: Joi.string().allow(""), created_ts: Joi.string().allow(""), @@ -6929,8 +4635,8 @@ class OrderPlatformModel { }); } - /** @returns {BulkListingResponseSchema} */ - static BulkListingResponseSchema() { + /** @returns {BulkListingResponse} */ + static BulkListingResponse() { return Joi.object({ success: Joi.boolean(), data: Joi.array().items(OrderPlatformModel.BulkActionListingData()), @@ -6952,8 +4658,8 @@ class OrderPlatformModel { }); } - /** @returns {JobDetailsResponseSchema} */ - static JobDetailsResponseSchema() { + /** @returns {JobDetailsResponse} */ + static JobDetailsResponse() { return Joi.object({ success: Joi.boolean(), data: Joi.array().items(OrderPlatformModel.JobDetailsData()), @@ -6970,8 +4676,8 @@ class OrderPlatformModel { }); } - /** @returns {JobFailedResponseSchema} */ - static JobFailedResponseSchema() { + /** @returns {JobFailedResponse} */ + static JobFailedResponse() { return Joi.object({ file_name: Joi.string().allow(""), url: Joi.string().allow(""), @@ -7108,64 +4814,21 @@ class OrderPlatformModel { }); } - /** @returns {ManifestList} */ - static ManifestList() { - return Joi.object({ - items: Joi.array().items(OrderPlatformModel.Manifest()), - page: OrderPlatformModel.ManifestPageInfo(), - }); - } - - /** @returns {ManifestDetails} */ - static ManifestDetails() { - return Joi.object({ - items: Joi.array().items(OrderPlatformModel.ManifestItemDetails()), - page: OrderPlatformModel.ManifestPageInfo(), - additional_shipment_count: Joi.number(), - manifest_details: Joi.array().items(OrderPlatformModel.Manifest()), - }); - } - - /** @returns {FiltersRequestSchema} */ - static FiltersRequestSchema() { - return Joi.object({ - date_range: OrderPlatformModel.DateRange(), - logo: Joi.string().allow(""), - stores: Joi.number().required(), - dp_name: Joi.string().allow("").required(), - dp_ids: Joi.number().required(), - lane: Joi.string().allow("").required(), - store_name: Joi.string().allow("").required(), - }); - } - - /** @returns {ProcessManifest} */ - static ProcessManifest() { - return Joi.object({ - filters: OrderPlatformModel.FiltersRequestSchema().required(), - action: Joi.string().allow("").required(), - unique_id: Joi.string().allow("").required(), - manifest_id: Joi.string().allow(""), - }); - } - - /** @returns {ProcessManifestResponseSchema} */ - static ProcessManifestResponseSchema() { + /** @returns {ManifestList} */ + static ManifestList() { return Joi.object({ - company_id: Joi.number(), - filters: OrderPlatformModel.Filters(), - user_id: Joi.string().allow(""), - manifest_id: Joi.string().allow(""), - action: Joi.string().allow(""), - uid: Joi.string().allow(""), - created_by: Joi.string().allow(""), + items: Joi.array().items(OrderPlatformModel.Manifest()), + page: OrderPlatformModel.ManifestPageInfo(), }); } - /** @returns {ProcessManifestItemResponseSchema} */ - static ProcessManifestItemResponseSchema() { + /** @returns {ManifestDetails} */ + static ManifestDetails() { return Joi.object({ - items: OrderPlatformModel.ProcessManifestResponseSchema(), + items: Joi.array().items(OrderPlatformModel.ManifestItemDetails()), + page: OrderPlatformModel.ManifestPageInfo(), + additional_shipment_count: Joi.number(), + manifest_details: Joi.array().items(OrderPlatformModel.Manifest()), }); } @@ -7195,8 +4858,8 @@ class OrderPlatformModel { }); } - /** @returns {ManifestFiltersResponseSchema} */ - static ManifestFiltersResponseSchema() { + /** @returns {ManifestFiltersResponse} */ + static ManifestFiltersResponse() { return Joi.object({ advance_filter: Joi.array().items(OrderPlatformModel.FiltersInfo()), global_filter: Joi.array().items(OrderPlatformModel.FiltersInfo()), @@ -7209,7 +4872,7 @@ class OrderPlatformModel { current: Joi.number().allow(null), has_next: Joi.boolean().allow(null), has_previous: Joi.boolean().allow(null), - item_total: Joi.number().required(), + item_total: Joi.number().allow(null).required(), size: Joi.number().allow(null), type: Joi.string().allow("").allow(null), }); @@ -7264,8 +4927,8 @@ class OrderPlatformModel { }); } - /** @returns {EInvoiceRetryResponseSchema} */ - static EInvoiceRetryResponseSchema() { + /** @returns {EInvoiceRetryResponse} */ + static EInvoiceRetryResponse() { return Joi.object({ response_data: Joi.array() .items(OrderPlatformModel.EInvoiceResponseData()) @@ -7293,8 +4956,8 @@ class OrderPlatformModel { }); } - /** @returns {EInvoiceErrorResponseSchema} */ - static EInvoiceErrorResponseSchema() { + /** @returns {EInvoiceErrorResponse} */ + static EInvoiceErrorResponse() { return Joi.object({ response_data: Joi.array().items( OrderPlatformModel.EInvoiceErrorResponseData() @@ -7332,7 +4995,7 @@ class OrderPlatformModel { estimated_delivery_date: Joi.string().allow("").allow(null), id: Joi.number(), journey: Joi.string().allow("").required(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), operational_status: Joi.string().allow("").required(), promised_delivery_date: Joi.string().allow("").allow(null), remark: Joi.string().allow("").allow(null), @@ -7340,8 +5003,8 @@ class OrderPlatformModel { }); } - /** @returns {CourierPartnerTrackingResponseSchema} */ - static CourierPartnerTrackingResponseSchema() { + /** @returns {CourierPartnerTrackingResponse} */ + static CourierPartnerTrackingResponse() { return Joi.object({ items: Joi.array().items( OrderPlatformModel.CourierPartnerTrackingDetails() @@ -7376,10 +5039,10 @@ class OrderPlatformModel { channel: OrderPlatformModel.LogsChannelDetails().required(), payment: OrderPlatformModel.LogPaymentDetails().required(), created_at: Joi.string().allow("").required(), - error_message: Joi.string().allow("").required(), - display_message: Joi.string().allow("").required(), + error_message: Joi.string().allow("").allow(null).required(), + display_message: Joi.string().allow("").allow(null).required(), method_name: Joi.string().allow("").required(), - meta: Joi.object().pattern(/\S/, Joi.any()).required(), + meta: Joi.any().allow(null).required(), }); } @@ -7394,8 +5057,8 @@ class OrderPlatformModel { /** @returns {FailedOrderLogDetails} */ static FailedOrderLogDetails() { return Joi.object({ - error_trace: Joi.string().allow("").required(), - exception: Joi.string().allow("").required(), + error_trace: Joi.string().allow("").allow(null).required(), + exception: Joi.string().allow("").allow(null).required(), }); } @@ -7426,8 +5089,8 @@ class OrderPlatformModel { }); } - /** @returns {GenerateInvoiceIDResponseSchema} */ - static GenerateInvoiceIDResponseSchema() { + /** @returns {GenerateInvoiceIDResponse} */ + static GenerateInvoiceIDResponse() { return Joi.object({ items: Joi.array().items( OrderPlatformModel.GenerateInvoiceIDResponseData() @@ -7435,8 +5098,8 @@ class OrderPlatformModel { }); } - /** @returns {GenerateInvoiceIDErrorResponseSchema} */ - static GenerateInvoiceIDErrorResponseSchema() { + /** @returns {GenerateInvoiceIDErrorResponse} */ + static GenerateInvoiceIDErrorResponse() { return Joi.object({ items: Joi.array().items( OrderPlatformModel.GenerateInvoiceIDErrorResponseData() @@ -7444,15 +5107,15 @@ class OrderPlatformModel { }); } - /** @returns {ManifestResponseSchema} */ - static ManifestResponseSchema() { + /** @returns {ManifestResponse} */ + static ManifestResponse() { return Joi.object({ items: OrderPlatformModel.ManifestItems(), }); } - /** @returns {ProcessManifestRequestSchema} */ - static ProcessManifestRequestSchema() { + /** @returns {ProcessManifestRequest} */ + static ProcessManifestRequest() { return Joi.object({ action: Joi.string().allow("").required(), manifest_id: Joi.string().allow(""), @@ -7476,8 +5139,8 @@ class OrderPlatformModel { }); } - /** @returns {ManifestErrorResponseSchema} */ - static ManifestErrorResponseSchema() { + /** @returns {ManifestErrorResponse} */ + static ManifestErrorResponse() { return Joi.object({ success: Joi.boolean(), error: Joi.string().allow(""), @@ -7493,8 +5156,8 @@ class OrderPlatformModel { }); } - /** @returns {ConfigUpdatedResponseSchema} */ - static ConfigUpdatedResponseSchema() { + /** @returns {ConfigUpdatedResponse} */ + static ConfigUpdatedResponse() { return Joi.object({ data: Joi.array().items(OrderPlatformModel.ConfigData()).required(), success: Joi.boolean().required(), @@ -7504,7 +5167,7 @@ class OrderPlatformModel { /** @returns {FlagData} */ static FlagData() { return Joi.object({ - filter: Joi.object().pattern(/\S/, Joi.any()), + filter: Joi.any(), }); } @@ -7613,132 +5276,16 @@ class OrderPlatformModel { }); } - /** @returns {RuleListRequestSchema} */ - static RuleListRequestSchema() { - return Joi.object({ - page_no: Joi.number(), - channel: Joi.array().items(Joi.string().allow("")), - department: Joi.array().items(Joi.string().allow("")), - id: Joi.array().items(Joi.string().allow("")), - is_active: Joi.boolean(), - }); - } - - /** @returns {RuleErrorResponseSchema} */ - static RuleErrorResponseSchema() { - return Joi.object({ - success: Joi.boolean(), - error: Joi.string().allow(""), - }); - } - - /** @returns {RMAPageInfo} */ - static RMAPageInfo() { - return Joi.object({ - type: Joi.string().allow(""), - current: Joi.number(), - size: Joi.number(), - item_total: Joi.number(), - has_previous: Joi.boolean(), - has_next: Joi.boolean(), - }); - } - - /** @returns {RuleAction} */ - static RuleAction() { - return Joi.object({ - reasons: Joi.array().items(OrderPlatformModel.Reason()), - }); - } - - /** @returns {QuestionSetItem} */ - static QuestionSetItem() { - return Joi.object({ - id: Joi.number().required(), - display_name: Joi.string().allow("").required(), - }); - } - - /** @returns {Reason} */ - static Reason() { - return Joi.object({ - id: Joi.number(), - display_name: Joi.string().allow("").required(), - reasons: Joi.array().items(Joi.link("#Reason")), - qc_type: Joi.array().items(Joi.string().allow("")).required(), - question_set: Joi.array() - .items(OrderPlatformModel.QuestionSet()) - .required(), - meta: Joi.object().pattern(/\S/, Joi.any()).required(), - is_active: Joi.boolean().required(), - }).id("Reason"); - } - - /** @returns {Conditions} */ - static Conditions() { - return Joi.object({ - department: Joi.string().allow(""), - l3: Joi.string().allow(""), - }); - } - - /** @returns {RuleItem} */ - static RuleItem() { - return Joi.object({ - id: Joi.string().allow("").required(), - entity_type: Joi.string().allow("").required(), - value: Joi.string().allow("").required(), - channel: Joi.string().allow("").required(), - actions: OrderPlatformModel.RuleAction().required(), - qc_enabled: Joi.boolean().required(), - is_deleted: Joi.boolean().required(), - conditions: OrderPlatformModel.Conditions().required(), - meta: Joi.object().pattern(/\S/, Joi.any()).required(), - rule_type: Joi.string().allow("").required(), - is_active: Joi.boolean().required(), - }); - } - - /** @returns {RuleError} */ - static RuleError() { - return Joi.object({ - type: Joi.string().allow("").required(), - value: Joi.string().allow("").required(), - message: Joi.string().allow("").required(), - }); - } - - /** @returns {RuleListResponseSchema} */ - static RuleListResponseSchema() { - return Joi.object({ - page: OrderPlatformModel.RMAPageInfo(), - items: Joi.array().items(OrderPlatformModel.RuleItem()), - success: Joi.boolean(), - error: OrderPlatformModel.RuleError(), - }); - } - - /** @returns {UpdateShipmentPaymentMode} */ - static UpdateShipmentPaymentMode() { - return Joi.object({ - shipment_id: Joi.string().allow("").required(), - products: Joi.array().items(OrderPlatformModel.ProductSchema()), - payment_methods: Joi.array().items( - OrderPlatformModel.PaymentMethodSchema() - ), - }); - } - - /** @returns {CommonErrorResponseSchema} */ - static CommonErrorResponseSchema() { + /** @returns {CommonErrorResponse} */ + static CommonErrorResponse() { return Joi.object({ status: Joi.number(), message: Joi.string().allow(""), }); } - /** @returns {ExceptionErrorResponseSchema} */ - static ExceptionErrorResponseSchema() { + /** @returns {ExceptionErrorResponse} */ + static ExceptionErrorResponse() { return Joi.object({ message: Joi.string().allow(""), exception: Joi.string().allow(""), @@ -7746,67 +5293,6 @@ class OrderPlatformModel { }); } - /** @returns {ProductSchema} */ - static ProductSchema() { - return Joi.object({ - line_number: Joi.number().required(), - payment_methods: Joi.array() - .items(OrderPlatformModel.PaymentMethodSchema()) - .required(), - }); - } - - /** @returns {PaymentMethodSchema} */ - static PaymentMethodSchema() { - return Joi.object({ - name: Joi.string().allow("").required(), - mode: Joi.string().allow("").required(), - amount: Joi.number().required(), - meta: OrderPlatformModel.PaymentMetaDataSchema(), - identifier: Joi.string().allow("").required(), - display_name: Joi.string().allow("").required(), - aggregator: Joi.string().allow("").required(), - action: OrderPlatformModel.ActionDetailSchema().required(), - refund_by: Joi.string().allow("").required(), - collect_by: Joi.string().allow("").required(), - }); - } - - /** @returns {ActionDetailSchema} */ - static ActionDetailSchema() { - return Joi.object({ - name: Joi.any().required(), - current_mode: Joi.string().allow("").required(), - current_identifier: Joi.string().allow("").required(), - refund_to: Joi.string().allow(""), - }); - } - - /** @returns {PaymentMetaDataSchema} */ - static PaymentMetaDataSchema() { - return Joi.object({ - payment_gateway: Joi.string().allow(""), - payment_identifier: Joi.string().allow(""), - logo_url: OrderPlatformModel.PaymentMetaLogoURLSchema(), - }); - } - - /** @returns {PaymentMetaLogoURLSchema} */ - static PaymentMetaLogoURLSchema() { - return Joi.object({ - large: Joi.string().allow("").required(), - small: Joi.string().allow("").required(), - }); - } - - /** @returns {ValidationError} */ - static ValidationError() { - return Joi.object({ - message: Joi.string().allow("").required(), - field: Joi.string().allow("").required(), - }); - } - /** @returns {Page} */ static Page() { return Joi.object({ @@ -7852,7 +5338,6 @@ class OrderPlatformModel { return Joi.object({ reasons: Joi.array().items(OrderPlatformModel.BagReasons()), success: Joi.boolean(), - rule_id: Joi.number().allow(null), }); } @@ -7860,45 +5345,41 @@ class OrderPlatformModel { static ShipmentStatus() { return Joi.object({ current_shipment_status: Joi.string().allow("").allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - id: Joi.number().allow(null), + meta: Joi.any().allow(null), + shipment_status_id: Joi.number().allow(null), bag_list: Joi.array().items(Joi.string().allow("")).allow(null, ""), title: Joi.string().allow("").required(), - display_name: Joi.string().allow(""), created_at: Joi.string().allow("").allow(null), created_ts: Joi.string().allow("").allow(null), shipment_id: Joi.string().allow("").allow(null), status_created_at: Joi.string().allow("").allow(null), - updated_ts: Joi.string().allow("").allow(null), - status: Joi.string().allow("").required(), + status_created_ts: Joi.string().allow("").allow(null), + status: Joi.string().allow("").allow(null).required(), }); } /** @returns {UserDataInfo} */ static UserDataInfo() { return Joi.object({ - id: Joi.number().allow(null), + uid: Joi.number().allow(null), user_oid: Joi.string().allow("").allow(null), - mongo_user_id: Joi.string().allow("").allow(null), external_customer_id: Joi.string().allow("").allow(null), first_name: Joi.string().allow("").allow(null), last_name: Joi.string().allow("").allow(null), mobile: Joi.string().allow("").allow(null), email: Joi.string().allow("").allow(null), - meta: Joi.string().allow("").allow(null), is_anonymous_user: Joi.boolean().allow(null), + avis_user_id: Joi.string().allow("").allow(null), name: Joi.string().allow("").allow(null), gender: Joi.string().allow("").allow(null), - country_phone_code: Joi.string().allow(""), }); } - /** @returns {Address} */ - static Address() { + /** @returns {PlatformDeliveryAddress} */ + static PlatformDeliveryAddress() { return Joi.object({ phone: Joi.string().allow("").allow(null), address2: Joi.string().allow("").allow(null), - address: Joi.string().allow("").allow(null), longitude: Joi.number().allow(null), pincode: Joi.string().allow("").allow(null), area: Joi.string().allow("").allow(null), @@ -7916,17 +5397,6 @@ class OrderPlatformModel { contact_person: Joi.string().allow("").allow(null), state: Joi.string().allow("").allow(null), city: Joi.string().allow("").allow(null), - area_code_slug: Joi.string().allow("").allow(null), - country_code: Joi.string().allow("").allow(null), - country_iso_code: Joi.string().allow("").allow(null), - country_phone_code: Joi.string().allow("").allow(null), - delivery_address_id: Joi.string().allow(""), - geo_location: Joi.object().pattern(/\S/, Joi.any()), - name: Joi.string().allow(""), - sector: Joi.string().allow(""), - state_code: Joi.string().allow(""), - uid: Joi.string().allow(""), - user_id: Joi.string().allow(""), }).allow(null); } @@ -7968,77 +5438,6 @@ class OrderPlatformModel { }); } - /** @returns {ChargeDistributionSchema} */ - static ChargeDistributionSchema() { - return Joi.object({ - type: Joi.string().allow("").required(), - logic: Joi.string().allow("").required(), - }); - } - - /** @returns {ChargeDistributionLogic} */ - static ChargeDistributionLogic() { - return Joi.object({ - distribution: OrderPlatformModel.ChargeDistributionSchema().required(), - distribution_level: Joi.string().allow("").required(), - }); - } - - /** @returns {ChargeAmountCurrency} */ - static ChargeAmountCurrency() { - return Joi.object({ - value: Joi.number().required(), - currency: Joi.string().allow("").required(), - }); - } - - /** @returns {ChargeAmount} */ - static ChargeAmount() { - return Joi.object({ - base_currency: OrderPlatformModel.ChargeAmountCurrency().required(), - ordering_currency: OrderPlatformModel.ChargeAmountCurrency().required(), - }); - } - - /** @returns {PriceAdjustmentCharge} */ - static PriceAdjustmentCharge() { - return Joi.object({ - code: Joi.string().allow("").allow(null), - name: Joi.string().allow("").required(), - type: Joi.string().allow("").allow(null), - amount: OrderPlatformModel.ChargeAmount().required(), - distribution_logic: OrderPlatformModel.ChargeDistributionLogic().required(), - }); - } - - /** @returns {OrderingCurrencyPrices} */ - static OrderingCurrencyPrices() { - return Joi.object({ - refund_credit: Joi.number().allow(null), - amount_paid_roundoff: Joi.number().allow(null), - price_effective: Joi.number().allow(null), - promotion_effective_discount: Joi.number().allow(null), - pm_price_split: Joi.number().allow(null), - refund_amount: Joi.number().allow(null), - transfer_price: Joi.number().allow(null), - coupon_effective_discount: Joi.number().allow(null), - tax_collected_at_source: Joi.number().allow(null), - brand_calculated_amount: Joi.number().allow(null), - delivery_charge: Joi.number().allow(null), - cashback: Joi.number().allow(null), - value_of_good: Joi.number().allow(null), - cashback_applied: Joi.number().allow(null), - cod_charges: Joi.number().allow(null), - price_marked: Joi.number().allow(null), - amount_paid: Joi.number().allow(null), - coupon_value: Joi.number().allow(null), - discount: Joi.number().allow(null), - fynd_credits: Joi.number().allow(null), - gift_price: Joi.number().allow(null), - amount_to_be_collected: Joi.number().allow(null), - }); - } - /** @returns {Identifier} */ static Identifier() { return Joi.object({ @@ -8132,7 +5531,7 @@ class OrderPlatformModel { delivery_partner_id: Joi.number().allow(null), app_display_name: Joi.string().allow("").allow(null), state_id: Joi.number().allow(null), - state_type: Joi.string().allow(""), + state_type: Joi.string().allow("").allow(null), bsh_id: Joi.number().allow(null), created_at: Joi.string().allow("").allow(null), created_ts: Joi.string().allow("").allow(null), @@ -8179,18 +5578,18 @@ class OrderPlatformModel { /** @returns {Article} */ static Article() { return Joi.object({ - child_details: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + child_details: Joi.any().allow(null), seller_identifier: Joi.string().allow("").required(), uid: Joi.string().allow("").required(), - set: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + a_set: Joi.any().allow(null), dimensions: OrderPlatformModel.Dimensions(), - currency: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + currency: Joi.any().allow(null), esp_modified: Joi.boolean().allow(null), return_config: OrderPlatformModel.ReturnConfig(), code: Joi.string().allow("").allow(null), weight: OrderPlatformModel.Weight(), _id: Joi.string().allow("").required(), - identifiers: Joi.object().pattern(/\S/, Joi.any()).required(), + identifiers: Joi.any().required(), raw_meta: Joi.string().allow("").allow(null), size: Joi.string().allow("").required(), is_set: Joi.boolean().allow(null), @@ -8276,7 +5675,7 @@ class OrderPlatformModel { can_cancel: Joi.boolean().allow(null), can_return: Joi.boolean().allow(null), branch_url: Joi.string().allow("").allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + meta: Joi.any().allow(null), color: Joi.string().allow("").allow(null), department_id: Joi.number().allow(null), images: Joi.array().items(Joi.string().allow("")).allow(null, ""), @@ -8324,9 +5723,8 @@ class OrderPlatformModel { can_cancel: Joi.boolean().allow(null), size: Joi.string().allow("").allow(null), line_number: Joi.number().allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + meta: Joi.any().allow(null), prices: OrderPlatformModel.Prices(), - ordering_currency_prices: OrderPlatformModel.OrderingCurrencyPrices(), dates: OrderPlatformModel.Dates(), current_status: OrderPlatformModel.BagStatusHistory().required(), bag_id: Joi.number().required(), @@ -8343,7 +5741,7 @@ class OrderPlatformModel { .items(Joi.string().allow("")) .allow(null, ""), pincode: Joi.string().allow("").allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + meta: Joi.any().allow(null), address: Joi.string().allow("").allow(null), address1: Joi.string().allow("").allow(null), display_address: Joi.string().allow("").allow(null), @@ -8380,7 +5778,7 @@ class OrderPlatformModel { static ConversionRate() { return Joi.object({ base: Joi.string().allow(""), - rates: Joi.object().pattern(/\S/, Joi.any()), + rates: Joi.any(), }); } @@ -8401,16 +5799,12 @@ class OrderPlatformModel { user: OrderPlatformModel.UserDataInfo(), estimated_sla_time: Joi.string().allow("").allow(null), estimated_sla_ts: Joi.string().allow("").allow(null), - delivery_address: OrderPlatformModel.Address(), - billing_address: OrderPlatformModel.Address(), - affiliate_details: OrderPlatformModel.AffiliateDetails(), - is_active: Joi.boolean(), + delivery_address: OrderPlatformModel.PlatformDeliveryAddress(), channel: OrderPlatformModel.ShipmentListingChannel(), previous_shipment_id: Joi.string().allow("").allow(null), - forward_end_shipment_id: Joi.string().allow("").allow(null), lock_status: Joi.boolean().allow(null), invoice_id: Joi.string().allow("").allow(null), - payment_methods: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + payment_methods: Joi.any().allow(null), payment_info: Joi.array().items(Joi.any()).allow(null, ""), status_created_at: Joi.string().allow(""), status_created_ts: Joi.string().allow(""), @@ -8421,24 +5815,22 @@ class OrderPlatformModel { payment_mode: Joi.string().allow("").allow(null), can_process: Joi.boolean().allow(null), prices: OrderPlatformModel.Prices(), - ordering_currency_prices: OrderPlatformModel.OrderingCurrencyPrices(), order_id: Joi.string().allow("").required(), ordering_channnel: Joi.string().allow("").allow(null), shipment_id: Joi.string().allow("").allow(null), customer_note: Joi.string().allow("").allow(null), - total_bags: Joi.number().required(), + total_bags: Joi.number().allow(null).required(), shipment_created_at: Joi.string().allow("").required(), mode_of_payment: Joi.string().allow(""), shipment_created_ts: Joi.string().allow(""), currency: OrderPlatformModel.Currency(), currency_info: OrderPlatformModel.CurrencyInfo(), is_lapa_enabled: Joi.boolean(), - logistics_meta: Joi.object().pattern(/\S/, Joi.any()), }); } - /** @returns {ShipmentInternalPlatformViewResponseSchema} */ - static ShipmentInternalPlatformViewResponseSchema() { + /** @returns {ShipmentInternalPlatformViewResponse} */ + static ShipmentInternalPlatformViewResponse() { return Joi.object({ total_count: Joi.number().allow(null), message: Joi.string().allow("").allow(null), @@ -8479,15 +5871,13 @@ class OrderPlatformModel { return Joi.object({ order_date: Joi.string().allow("").allow(null), created_ts: Joi.string().allow("").allow(null), - tax_details: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + tax_details: Joi.any().allow(null), cod_charges: Joi.string().allow("").allow(null), source: Joi.string().allow("").allow(null), fynd_order_id: Joi.string().allow("").required(), affiliate_id: Joi.string().allow("").allow(null), affiliate_order_id: Joi.string().allow("").allow(null), - ordering_channel_logo: Joi.object() - .pattern(/\S/, Joi.any()) - .allow(null, ""), + ordering_channel_logo: Joi.any().allow(null), order_value: Joi.string().allow("").allow(null), ordering_channel: Joi.string().allow("").allow(null), meta: Joi.object().pattern(/\S/, Joi.any()), @@ -8538,7 +5928,7 @@ class OrderPlatformModel { static CompanyDetails() { return Joi.object({ company_name: Joi.string().allow("").allow(null), - address: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + address: Joi.any().allow(null), company_cin: Joi.string().allow("").allow(null), company_id: Joi.number().allow(null), company_gst: Joi.string().allow("").allow(null), @@ -8551,7 +5941,7 @@ class OrderPlatformModel { return Joi.object({ phone: Joi.string().allow("").allow(null), pincode: Joi.string().allow("").allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + meta: Joi.any().allow(null), address: Joi.string().allow("").allow(null), address1: Joi.string().allow("").allow(null), display_address: Joi.string().allow("").allow(null), @@ -8584,7 +5974,7 @@ class OrderPlatformModel { return Joi.object({ ajio_site_id: Joi.string().allow("").allow(null), pincode: Joi.number().required(), - address: Joi.string().allow("").required(), + address: Joi.string().allow("").allow(null).required(), gstin: Joi.string().allow("").required(), name: Joi.string().allow("").required(), state: Joi.string().allow("").required(), @@ -8602,8 +5992,8 @@ class OrderPlatformModel { /** @returns {EinvoiceInfo} */ static EinvoiceInfo() { return Joi.object({ - credit_note: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - invoice: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + credit_note: Joi.any().allow(null), + invoice: Joi.any().allow(null), }); } @@ -8658,7 +6048,7 @@ class OrderPlatformModel { parent_dp_id: Joi.string().allow("").allow(null), shipment_weight: Joi.number().allow(null), dimension: OrderPlatformModel.Dimensions(), - dp_options: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + dp_options: Joi.any().allow(null), assign_dp_from_sb: Joi.boolean().allow(null), due_date: Joi.string().allow("").allow(null), store_invoice_updated_date: Joi.string().allow("").allow(null), @@ -8666,15 +6056,15 @@ class OrderPlatformModel { return_store_node: Joi.number().allow(null), fulfilment_priority_text: Joi.string().allow("").allow(null), shipment_tags: Joi.array().items(OrderPlatformModel.ShipmentTags()), - external: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + external: Joi.any().allow(null), awb_number: Joi.string().allow("").allow(null), lock_data: OrderPlatformModel.LockData(), order_type: Joi.string().allow("").allow(null), - ewaybill_info: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + ewaybill_info: Joi.any().allow(null), dp_id: Joi.string().allow("").allow(null), shipment_volumetric_weight: Joi.number().allow(null), marketplace_store_id: Joi.string().allow("").allow(null), - return_details: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + return_details: Joi.any().allow(null), dp_sort_key: Joi.string().allow("").allow(null), packaging_name: Joi.string().allow("").allow(null), timestamp: OrderPlatformModel.ShipmentTimeStamp(), @@ -8682,10 +6072,10 @@ class OrderPlatformModel { dp_name: Joi.string().allow("").allow(null), po_number: Joi.string().allow("").allow(null), weight: Joi.number().required(), - b2c_buyer_details: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + b2c_buyer_details: Joi.any().allow(null), forward_affiliate_order_id: Joi.string().allow("").allow(null), return_affiliate_order_id: Joi.string().allow("").allow(null), - bag_weight: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + bag_weight: Joi.any().allow(null), refund_to: Joi.string().allow("").allow(null), }); } @@ -8712,6 +6102,13 @@ class OrderPlatformModel { }); } + /** @returns {AffiliateConfig} */ + static AffiliateConfig() { + return Joi.object({ + app_company_id: Joi.number().allow(null), + }); + } + /** @returns {AffiliateDetails} */ static AffiliateDetails() { return Joi.object({ @@ -8725,7 +6122,7 @@ class OrderPlatformModel { affiliate_id: Joi.string().allow("").allow(null), affiliate_store_id: Joi.string().allow("").required(), affiliate_bag_id: Joi.string().allow("").required(), - id: Joi.string().allow("").allow(null), + ad_id: Joi.string().allow("").allow(null), }); } @@ -8744,7 +6141,7 @@ class OrderPlatformModel { /** @returns {OrderBagArticle} */ static OrderBagArticle() { return Joi.object({ - identifiers: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + identifiers: Joi.any().allow(null), return_config: OrderPlatformModel.ReturnConfig(), uid: Joi.string().allow("").allow(null), size: Joi.string().allow("").allow(null), @@ -8800,46 +6197,7 @@ class OrderPlatformModel { static BuyRules() { return Joi.object({ item_criteria: OrderPlatformModel.ItemCriterias(), - cart_conditions: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - }); - } - - /** @returns {PriceMinMax} */ - static PriceMinMax() { - return Joi.object({ - min: Joi.number(), - max: Joi.number(), - }); - } - - /** @returns {ItemPriceDetails} */ - static ItemPriceDetails() { - return Joi.object({ - marked: OrderPlatformModel.PriceMinMax(), - effective: OrderPlatformModel.PriceMinMax(), - currency: Joi.string().allow(""), - }); - } - - /** @returns {FreeGiftItems} */ - static FreeGiftItems() { - return Joi.object({ - item_slug: Joi.string().allow(""), - item_name: Joi.string().allow(""), - item_price_details: OrderPlatformModel.ItemPriceDetails(), - item_brand_name: Joi.string().allow(""), - item_id: Joi.number(), - item_images_url: Joi.array().items(Joi.string().allow("")), - }); - } - - /** @returns {AppliedFreeArticles} */ - static AppliedFreeArticles() { - return Joi.object({ - article_id: Joi.string().allow(""), - free_gift_item_details: Joi.object().pattern(/\S/, Joi.any()), - parent_item_identifier: Joi.string().allow(""), - quantity: Joi.number(), + cart_conditions: Joi.any().allow(null), }); } @@ -8854,9 +6212,6 @@ class OrderPlatformModel { buy_rules: Joi.array().items(OrderPlatformModel.BuyRules()), promo_id: Joi.string().allow("").allow(null), mrp_promotion: Joi.boolean().allow(null), - applied_free_articles: Joi.array().items( - OrderPlatformModel.AppliedFreeArticles() - ), }); } @@ -8885,11 +6240,11 @@ class OrderPlatformModel { return Joi.object({ gst_details: OrderPlatformModel.GSTDetailsData(), bag_status: Joi.array().items(OrderPlatformModel.BagStatusHistory()), - parent_promo_bags: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + parent_promo_bags: Joi.any().allow(null), financial_breakup: OrderPlatformModel.FinancialBreakup(), bag_configs: OrderPlatformModel.BagConfigs(), seller_identifier: Joi.string().allow("").allow(null), - delivery_address: OrderPlatformModel.Address(), + delivery_address: OrderPlatformModel.PlatformDeliveryAddress(), article: OrderPlatformModel.OrderBagArticle(), brand: OrderPlatformModel.OrderBrandName(), group_id: Joi.string().allow("").allow(null), @@ -8908,8 +6263,6 @@ class OrderPlatformModel { meta: Joi.object().pattern(/\S/, Joi.any()), applied_promos: Joi.array().items(OrderPlatformModel.AppliedPromos()), prices: OrderPlatformModel.Prices(), - charges: Joi.array().items(OrderPlatformModel.PriceAdjustmentCharge()), - ordering_currency_prices: OrderPlatformModel.OrderingCurrencyPrices(), current_status: OrderPlatformModel.CurrentStatus(), bag_id: Joi.number().required(), entity_type: Joi.string().allow("").allow(null), @@ -8922,7 +6275,7 @@ class OrderPlatformModel { return Joi.object({ phone: Joi.string().allow("").required(), pincode: Joi.string().allow("").required(), - meta: Joi.object().pattern(/\S/, Joi.any()).required(), + meta: Joi.any().required(), address: Joi.string().allow("").required(), address1: Joi.string().allow("").allow(null), display_address: Joi.string().allow("").allow(null), @@ -8949,7 +6302,7 @@ class OrderPlatformModel { /** @returns {ShipmentStatusData} */ static ShipmentStatusData() { return Joi.object({ - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + meta: Joi.any().allow(null), bag_list: Joi.array().items(Joi.string().allow("")).allow(null, ""), id: Joi.number().allow(null), created_at: Joi.string().allow("").allow(null), @@ -8967,7 +6320,7 @@ class OrderPlatformModel { return Joi.object({ lock_status: Joi.boolean().allow(null), lock_message: Joi.string().allow("").allow(null), - action_to_status: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + action_to_status: Joi.any().allow(null), }); } @@ -8980,7 +6333,7 @@ class OrderPlatformModel { shipment_status: Joi.string().allow("").allow(null), gst_details: OrderPlatformModel.GSTDetailsData(), order_status: OrderPlatformModel.OrderStatusData(), - delivery_slot: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + delivery_slot: Joi.any().allow(null), order: OrderPlatformModel.OrderDetailsData(), user: OrderPlatformModel.UserDataInfo(), enable_dp_tracking: Joi.boolean().allow(null), @@ -8991,8 +6344,8 @@ class OrderPlatformModel { shipment_images: Joi.array() .items(Joi.string().allow("")) .allow(null, ""), - delivery_details: Joi.object().pattern(/\S/, Joi.any()), - billing_details: Joi.object().pattern(/\S/, Joi.any()), + delivery_details: OrderPlatformModel.UserDetailsData(), + billing_details: OrderPlatformModel.UserDetailsData(), forward_shipment_id: Joi.string().allow("").allow(null), fulfilment_priority: Joi.number().allow(null), shipment_details: OrderPlatformModel.ShipmentLockDetails(), @@ -9006,9 +6359,9 @@ class OrderPlatformModel { user_agent: Joi.string().allow("").allow(null), dp_details: OrderPlatformModel.DPDetailsData(), invoice_id: Joi.string().allow("").allow(null), - payment_methods: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + payment_methods: Joi.any().allow(null), payment_info: Joi.array().items(Joi.any()).allow(null, ""), - coupon: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + coupon: Joi.any().allow(null), affiliate_details: OrderPlatformModel.AffiliateDetails(), priority_text: Joi.string().allow("").allow(null), bag_status_history: Joi.array().items( @@ -9020,13 +6373,11 @@ class OrderPlatformModel { total_items: Joi.number().allow(null), fulfilling_store: OrderPlatformModel.FulfillingStore(), meta: Joi.object().pattern(/\S/, Joi.any()), - pdf_links: Joi.object().pattern(/\S/, Joi.any()), + pdf_links: Joi.any(), payment_mode: Joi.string().allow("").allow(null), packaging_type: Joi.string().allow("").allow(null), journey_type: Joi.string().allow("").allow(null), prices: OrderPlatformModel.Prices(), - charges: Joi.array().items(OrderPlatformModel.PriceAdjustmentCharge()), - ordering_currency_prices: OrderPlatformModel.OrderingCurrencyPrices(), vertical: Joi.string().allow("").allow(null), shipment_id: Joi.string().allow("").required(), payments: OrderPlatformModel.ShipmentPayments(), @@ -9039,18 +6390,16 @@ class OrderPlatformModel { currency_info: OrderPlatformModel.CurrencyInfo(), previous_shipment_id: Joi.string().allow("").allow(null), shipment_update_time: Joi.number().allow(null), - rto_address: OrderPlatformModel.Address(), + rto_address: OrderPlatformModel.PlatformDeliveryAddress(), credit_note_id: Joi.string().allow("").allow(null), is_self_ship: Joi.boolean().allow(null), mode_of_payment: Joi.string().allow("").allow(null), is_lapa_enabled: Joi.boolean(), - forward_end_shipment_id: Joi.string().allow("").allow(null), - logistics_meta: Joi.object().pattern(/\S/, Joi.any()), }); } - /** @returns {ShipmentInfoResponseSchema} */ - static ShipmentInfoResponseSchema() { + /** @returns {ShipmentInfoResponse} */ + static ShipmentInfoResponse() { return Joi.object({ message: Joi.string().allow("").allow(null), success: Joi.boolean().required(), @@ -9069,7 +6418,7 @@ class OrderPlatformModel { /** @returns {PaymentInfoData} */ static PaymentInfoData() { return Joi.object({ - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), mode: Joi.string().allow(""), name: Joi.string().allow(""), amount: Joi.number(), @@ -9081,39 +6430,24 @@ class OrderPlatformModel { }); } - /** @returns {CurrencySchema} */ - static CurrencySchema() { - return Joi.object({ - currency_code: Joi.string().allow(""), - currency_symbol: Joi.string().allow(""), - }); - } - /** @returns {OrderData} */ static OrderData() { return Joi.object({ - ordering_channel: Joi.string().allow(""), order_date: Joi.string().allow("").required(), created_ts: Joi.string().allow(""), tax_details: OrderPlatformModel.TaxDetails(), meta: Joi.object().pattern(/\S/, Joi.any()), fynd_order_id: Joi.string().allow("").required(), prices: OrderPlatformModel.Prices(), - charges: Joi.array().items(OrderPlatformModel.PriceAdjustmentCharge()), - ordering_currency_prices: OrderPlatformModel.OrderingCurrencyPrices(), - payment_methods: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + payment_methods: Joi.any().allow(null), payment_info: Joi.array() .items(OrderPlatformModel.PaymentInfoData()) .allow(null, ""), - affiliate_order_id: Joi.string().allow(""), - affiliate_id: Joi.string().allow(""), - source: Joi.string().allow(""), - currency: OrderPlatformModel.CurrencySchema(), }); } - /** @returns {OrderDetailsResponseSchema} */ - static OrderDetailsResponseSchema() { + /** @returns {OrderDetailsResponse} */ + static OrderDetailsResponse() { return Joi.object({ order: OrderPlatformModel.OrderData(), success: Joi.boolean().required(), @@ -9142,8 +6476,8 @@ class OrderPlatformModel { }); } - /** @returns {LaneConfigResponseSchema} */ - static LaneConfigResponseSchema() { + /** @returns {LaneConfigResponse} */ + static LaneConfigResponse() { return Joi.object({ super_lanes: Joi.array().items(OrderPlatformModel.SuperLane()), }); @@ -9173,7 +6507,7 @@ class OrderPlatformModel { OrderPlatformModel.PlatformBreakupValues() ), total_order_value: Joi.number().allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + meta: Joi.any().allow(null), order_created_time: Joi.string().allow("").allow(null), order_created_ts: Joi.string().allow("").allow(null), payment_mode: Joi.string().allow("").allow(null), @@ -9184,13 +6518,11 @@ class OrderPlatformModel { order_value: Joi.number().allow(null), currency: OrderPlatformModel.Currency(), currency_info: OrderPlatformModel.CurrencyInfo(), - prices: OrderPlatformModel.Prices(), - ordering_currency_prices: OrderPlatformModel.OrderingCurrencyPrices(), }); } - /** @returns {OrderListingResponseSchema} */ - static OrderListingResponseSchema() { + /** @returns {OrderListingResponse} */ + static OrderListingResponse() { return Joi.object({ total_count: Joi.number().allow(null), message: Joi.string().allow("").allow(null), @@ -9204,15 +6536,15 @@ class OrderPlatformModel { /** @returns {PlatformTrack} */ static PlatformTrack() { return Joi.object({ - last_location_recieved_at: Joi.string().allow("").allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()), + last_location_recieved_at: Joi.string().allow(""), + meta: Joi.any(), raw_status: Joi.string().allow(""), updated_at: Joi.string().allow(""), updated_time: Joi.string().allow(""), awb: Joi.string().allow(""), shipment_type: Joi.string().allow(""), status: Joi.string().allow(""), - reason: Joi.string().allow("").allow(null), + reason: Joi.string().allow(""), account_name: Joi.string().allow(""), }); } @@ -9220,7 +6552,7 @@ class OrderPlatformModel { /** @returns {PlatformShipmentTrack} */ static PlatformShipmentTrack() { return Joi.object({ - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), results: Joi.array().items(OrderPlatformModel.PlatformTrack()), }); } @@ -9243,16 +6575,14 @@ class OrderPlatformModel { processed: Joi.array() .items(OrderPlatformModel.FiltersInfo()) .allow(null, ""), - applied_filters: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - page: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + applied_filters: Joi.any().allow(null), + page: Joi.any().allow(null), }); } - /** @returns {FiltersResponseSchema} */ - static FiltersResponseSchema() { + /** @returns {FiltersResponse} */ + static FiltersResponse() { return Joi.object({ - advance: OrderPlatformModel.AdvanceFilterInfo(), - global_1: OrderPlatformModel.FiltersInfo(), advance_filter: OrderPlatformModel.AdvanceFilterInfo(), global_filter: Joi.array().items(OrderPlatformModel.FiltersInfo()), }); @@ -9265,8 +6595,8 @@ class OrderPlatformModel { }); } - /** @returns {FileResponseSchema} */ - static FileResponseSchema() { + /** @returns {FileResponse} */ + static FileResponse() { return Joi.object({ file_name: Joi.string().allow(""), cdn: OrderPlatformModel.URL(), @@ -9281,8 +6611,8 @@ class OrderPlatformModel { }); } - /** @returns {BulkActionTemplateResponseSchema} */ - static BulkActionTemplateResponseSchema() { + /** @returns {BulkActionTemplateResponse} */ + static BulkActionTemplateResponse() { return Joi.object({ template_x_slug: Joi.array().items( OrderPlatformModel.BulkActionTemplate() @@ -9290,8 +6620,18 @@ class OrderPlatformModel { }); } - /** @returns {PlatformShipmentReasonsResponseSchema} */ - static PlatformShipmentReasonsResponseSchema() { + /** @returns {Reason} */ + static Reason() { + return Joi.object({ + qc_type: Joi.array().items(Joi.string().allow("")), + id: Joi.number(), + question_set: Joi.array().items(OrderPlatformModel.QuestionSet()), + display_name: Joi.string().allow(""), + }); + } + + /** @returns {PlatformShipmentReasonsResponse} */ + static PlatformShipmentReasonsResponse() { return Joi.object({ reasons: Joi.array().items(OrderPlatformModel.Reason()), success: Joi.boolean(), @@ -9306,8 +6646,8 @@ class OrderPlatformModel { }); } - /** @returns {ShipmentReasonsResponseSchema} */ - static ShipmentReasonsResponseSchema() { + /** @returns {ShipmentReasonsResponse} */ + static ShipmentReasonsResponse() { return Joi.object({ reasons: Joi.array() .items(OrderPlatformModel.ShipmentResponseReasons()) @@ -9320,7 +6660,7 @@ class OrderPlatformModel { /** @returns {StoreAddress} */ static StoreAddress() { return Joi.object({ - phone: Joi.string().allow("").required(), + phone: Joi.string().allow("").allow(null).required(), created_at: Joi.string().allow("").required(), contact_person: Joi.string().allow("").required(), pincode: Joi.number().required(), @@ -9381,7 +6721,7 @@ class OrderPlatformModel { static Document() { return Joi.object({ value: Joi.string().allow("").required(), - type: Joi.string().allow("").required(), + ds_type: Joi.string().allow("").required(), verified: Joi.boolean().required(), legal_name: Joi.string().allow("").required(), url: Joi.string().allow("").allow(null), @@ -9398,23 +6738,17 @@ class OrderPlatformModel { /** @returns {StoreMeta} */ static StoreMeta() { return Joi.object({ - additional_contact_details: Joi.object() - .pattern(/\S/, Joi.any()) - .allow(null, ""), + additional_contact_details: Joi.any().allow(null), timing: Joi.array().items(Joi.any()).allow(null, ""), notification_emails: Joi.array() .items(Joi.string().allow("")) .allow(null, ""), gst_number: Joi.string().allow("").allow(null), - ewaybill_portal_details: Joi.object() - .pattern(/\S/, Joi.any()) - .allow(null, ""), + ewaybill_portal_details: Joi.any().allow(null), einvoice_portal_details: OrderPlatformModel.EInvoicePortalDetails(), gst_credentials: OrderPlatformModel.StoreGstCredentials().required(), stage: Joi.string().allow("").required(), - product_return_config: Joi.object() - .pattern(/\S/, Joi.any()) - .allow(null, ""), + product_return_config: Joi.any().allow(null), documents: OrderPlatformModel.StoreDocuments(), display_name: Joi.string().allow("").required(), }); @@ -9434,7 +6768,7 @@ class OrderPlatformModel { pincode: Joi.string().allow("").required(), mall_area: Joi.string().allow("").allow(null), vat_no: Joi.string().allow("").allow(null), - address1: Joi.string().allow("").required(), + address1: Joi.string().allow("").allow(null).required(), display_address: Joi.string().allow("").allow(null), store_active_from: Joi.string().allow("").allow(null), city: Joi.string().allow("").required(), @@ -9486,7 +6820,7 @@ class OrderPlatformModel { /** @returns {Item} */ static Item() { return Joi.object({ - attributes: Joi.object().pattern(/\S/, Joi.any()).required(), + attributes: Joi.any().required(), brand_id: Joi.number().required(), slug_key: Joi.string().allow("").required(), webstore_product_url: Joi.string().allow("").allow(null), @@ -9506,7 +6840,7 @@ class OrderPlatformModel { can_return: Joi.boolean().allow(null), size: Joi.string().allow("").required(), branch_url: Joi.string().allow("").allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + meta: Joi.any().allow(null), color: Joi.string().allow("").allow(null), department_id: Joi.number().allow(null), l2_category_id: Joi.number().allow(null), @@ -9516,7 +6850,7 @@ class OrderPlatformModel { /** @returns {ArticleStatusDetails} */ static ArticleStatusDetails() { return Joi.object({ - status: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + status: Joi.any().allow(null), }); } @@ -9530,7 +6864,7 @@ class OrderPlatformModel { gst_number: Joi.string().allow("").allow(null), company_type: Joi.string().allow("").allow(null), modified_on: Joi.string().allow("").allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + meta: Joi.any().allow(null), business_type: Joi.string().allow("").allow(null), agreement_start_date: Joi.string().allow("").allow(null), }); @@ -9568,6 +6902,16 @@ class OrderPlatformModel { }).allow(null); } + /** @returns {ShipmentDetails} */ + static ShipmentDetails() { + return Joi.object({ + dp_id: Joi.string().allow("").allow(null), + dp_options: Joi.any().allow(null), + lock_status: Joi.boolean().allow(null), + action_to_status: Joi.any().allow(null), + }).allow(null); + } + /** @returns {UserDetails} */ static UserDetails() { return Joi.object({ @@ -9580,7 +6924,7 @@ class OrderPlatformModel { is_anonymous_user: Joi.boolean().allow(null), gender: Joi.string().allow("").allow(null), mongo_user_id: Joi.string().allow("").allow(null), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + meta: Joi.any().allow(null), }).allow(null); } @@ -9612,18 +6956,18 @@ class OrderPlatformModel { current_operational_status: OrderPlatformModel.BagStatusHistory(), current_status: OrderPlatformModel.BagStatusHistory(), dates: OrderPlatformModel.Dates(), - delivery_address: OrderPlatformModel.Address(), + delivery_address: OrderPlatformModel.PlatformDeliveryAddress(), delivery_slot: OrderPlatformModel.DeliverySlotDetails(), display_name: Joi.string().allow("").allow(null), - dp_details: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - einvoice_info: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + dp_details: Joi.any().allow(null), + einvoice_info: Joi.any().allow(null), entity_type: Joi.string().allow("").allow(null), - fallback_user: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + fallback_user: Joi.any().allow(null), financial_breakup: Joi.array().items( OrderPlatformModel.FinancialBreakup() ), fulfilling_store: OrderPlatformModel.Store(), - fyndstore_emp: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + fyndstore_emp: Joi.any().allow(null), gst_details: OrderPlatformModel.GSTDetailsData(), invoice: OrderPlatformModel.InvoiceDetails(), item: OrderPlatformModel.Item(), @@ -9640,18 +6984,17 @@ class OrderPlatformModel { order_type: Joi.string().allow("").allow(null), order_value: Joi.number().allow(null), ordering_store: OrderPlatformModel.Store(), - parent_promo_bags: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - payment_methods: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + parent_promo_bags: Joi.any().allow(null), + payment_methods: Joi.any().allow(null), payment_type: Joi.string().allow("").allow(null), - payments: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + payments: Joi.any().allow(null), prices: OrderPlatformModel.Prices(), - charges: Joi.array().items(OrderPlatformModel.PriceAdjustmentCharge()), qc_required: Joi.boolean().allow(null), quantity: Joi.number().allow(null), reasons: Joi.array().items(Joi.any()).allow(null, ""), restore_coupon: Joi.boolean().allow(null), - restore_promos: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - rto_address: OrderPlatformModel.Address(), + restore_promos: Joi.any().allow(null), + rto_address: OrderPlatformModel.PlatformDeliveryAddress(), seller_identifier: Joi.string().allow("").allow(null), shipment: OrderPlatformModel.Shipment(), shipment_details: OrderPlatformModel.ShipmentDetails(), @@ -9675,8 +7018,8 @@ class OrderPlatformModel { }); } - /** @returns {BagDetailsPlatformResponseSchema} */ - static BagDetailsPlatformResponseSchema() { + /** @returns {BagDetailsPlatformResponse} */ + static BagDetailsPlatformResponse() { return Joi.object({ status_code: Joi.number(), data: OrderPlatformModel.BagDetails(), @@ -9702,16 +7045,16 @@ class OrderPlatformModel { }).allow(null); } - /** @returns {GetBagsPlatformResponseSchema} */ - static GetBagsPlatformResponseSchema() { + /** @returns {GetBagsPlatformResponse} */ + static GetBagsPlatformResponse() { return Joi.object({ status_code: Joi.number(), data: OrderPlatformModel.BagData(), }); } - /** @returns {GeneratePosOrderReceiptResponseSchema} */ - static GeneratePosOrderReceiptResponseSchema() { + /** @returns {GeneratePosOrderReceiptResponse} */ + static GeneratePosOrderReceiptResponse() { return Joi.object({ customer_cn_receipt: Joi.string().allow(""), success: Joi.boolean(), @@ -9733,15 +7076,15 @@ class OrderPlatformModel { }); } - /** @returns {AllowedTemplatesResponseSchema} */ - static AllowedTemplatesResponseSchema() { + /** @returns {AllowedTemplatesResponse} */ + static AllowedTemplatesResponse() { return Joi.object({ template_x_slug: Joi.array().items(OrderPlatformModel.Templates()), }); } - /** @returns {TemplateDownloadResponseSchema} */ - static TemplateDownloadResponseSchema() { + /** @returns {TemplateDownloadResponse} */ + static TemplateDownloadResponse() { return Joi.object({ file_name: Joi.string().allow(""), url: Joi.string().allow(""), @@ -9756,8 +7099,8 @@ class OrderPlatformModel { }); } - /** @returns {BulkFailedResponseSchema} */ - static BulkFailedResponseSchema() { + /** @returns {BulkFailedResponse} */ + static BulkFailedResponse() { return Joi.object({ status: Joi.boolean(), error: Joi.string().allow(""), diff --git a/sdk/platform/Order/OrderPlatformValidator.d.ts b/sdk/platform/Order/OrderPlatformValidator.d.ts index 919bc4811..ff4e511de 100644 --- a/sdk/platform/Order/OrderPlatformValidator.d.ts +++ b/sdk/platform/Order/OrderPlatformValidator.d.ts @@ -27,10 +27,6 @@ export = OrderPlatformValidator; * @typedef CheckOrderStatusParam * @property {OrderPlatformModel.OrderStatus} body */ -/** - * @typedef CreateChannelConfigParam - * @property {OrderPlatformModel.CreateChannelConfigData} body - */ /** * @typedef CreateOrderParam * @property {OrderPlatformModel.CreateOrderAPI} body @@ -45,7 +41,7 @@ export = OrderPlatformValidator; */ /** * @typedef DownloadLanesReportParam - * @property {OrderPlatformModel.BulkReportsDownloadRequestSchema} body + * @property {OrderPlatformModel.BulkReportsDownloadRequest} body */ /** * @typedef EInvoiceRetryParam @@ -72,7 +68,7 @@ export = OrderPlatformValidator; */ /** * @typedef GenerateProcessManifestParam - * @property {OrderPlatformModel.ProcessManifestRequestSchema} body + * @property {OrderPlatformModel.ProcessManifestRequest} body */ /** * @typedef GetAllowedStateTransitionParam @@ -87,7 +83,7 @@ export = OrderPlatformValidator; */ /** * @typedef GetBagByIdParam - * @property {string} [bagId] - Unique identifier of a bag + * @property {string} [bagId] - Id of bag * @property {string} [channelBagId] - Id of application bag * @property {string} [channelId] - Id of application */ @@ -108,8 +104,8 @@ export = OrderPlatformValidator; * @typedef GetBulkShipmentExcelFileParam * @property {string} [salesChannels] - Comma separated values of sales channel ids * @property {string} [dpIds] - Comma separated values of delivery partner ids - * @property {string} [startDate] - Date time in UTC timezone as per ISO format. - * @property {string} [endDate] - Date time in UTC timezone as per ISO format. + * @property {string} [startDate] - UTC start date in ISO format + * @property {string} [endDate] - UTC end date in ISO format * @property {string} [stores] - Comma separated values of store ids * @property {string} [tags] - Comma separated values of tags * @property {string} [bagStatus] - Comma separated values of bag statuses @@ -119,12 +115,11 @@ export = OrderPlatformValidator; * @property {number} [pageNo] * @property {number} [pageSize] */ -/** @typedef GetChannelConfigParam */ /** * @typedef GetFileByStatusParam * @property {string} batchId - Batch Id to identify the bulk operation request. * @property {string} status - The status of the jobs to filter the results. - * @property {string} fileType + * @property {string} fileType - The type of file to be downloaded. * @property {string} [reportType] - The type of report to be downloaded. */ /** @@ -140,27 +135,15 @@ export = OrderPlatformValidator; * @property {string} [salesChannels] * @property {string} [paymentMode] - Comma separated values of payment modes * @property {string} [bagStatus] - Comma separated values of bag statuses - * @property {string} [searchType] - Search_type refers to the field that will - * be used as the target for the search operation + * @property {string} [searchType] * @property {string} [searchValue] * @property {string} [tags] - * @property {number} [timeToDispatch] - Time_to_dispatch refers to estimated SLA time. + * @property {number} [timeToDispatch] * @property {string} [paymentMethods] * @property {boolean} [myOrders] * @property {boolean} [showCrossCompanyData] - Flag to view cross & non-cross * company order - * @property {string} [orderType] - Defines the specific journey a shipment will - * follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. For example: - * - * - "HomeDelivery": The order goes through all the steps needed for delivery, - * from being packed to arriving at the customer’s address. - * - "PickAtStore": The order is prepared for pickup at the store, skipping - * shipping steps to make it ready faster for the customer to collect in person. - * - "Digital": This order type likely refers to orders that involve digital goods - * or services, such as software, digital subscriptions, e-books, online - * courses, or any other item that can be delivered electronically. + * @property {string} [orderType] */ /** * @typedef GetManifestDetailsParam @@ -217,44 +200,35 @@ export = OrderPlatformValidator; /** * @typedef GetOrdersParam * @property {string} [lane] - Lane refers to a section where orders are - * assigned, indicating its grouping. + * assigned, indicating its grouping * @property {string} [searchType] - Search_type refers to the field that will - * be used as the target for the search operation. + * be used as the target for the search operation * @property {string} [bagStatus] - Bag_status refers to status of the entity. * Filters orders based on the status. * @property {number} [timeToDispatch] - Time_to_dispatch refers to estimated SLA time. - * @property {string} [paymentMethods] - Comma separated values of payment - * methods that were used to place order. + * @property {string} [paymentMethods] * @property {string} [tags] - Tags refers to additional descriptive labels * associated with the order * @property {string} [searchValue] - Search_value is matched against the field * specified by the search_type - * @property {string} [fromDate] - Date time in UTC timezone as per ISO format. - * @property {string} [toDate] - Date time in UTC timezone as per ISO format. - * @property {string} [startDate] - Date time in UTC timezone as per ISO format. - * @property {string} [endDate] - Date time in UTC timezone as per ISO format. + * @property {string} [fromDate] + * @property {string} [toDate] + * @property {string} [startDate] + * @property {string} [endDate] * @property {string} [dpIds] - Delivery Partner IDs to which shipments are assigned. - * @property {string} [stores] - A comma-separated list of store IDs used to - * filter results to only those related to specific stores. - * @property {string} [salesChannels] - A comma-separated list of sales channel - * IDs to filter results based on the sales channels involved. - * @property {number} [pageNo] - Specifies the page number for paginated results. - * @property {number} [pageSize] - Determines the number of results returned per page. + * @property {string} [stores] + * @property {string} [salesChannels] + * @property {number} [pageNo] + * @property {number} [pageSize] * @property {boolean} [isPrioritySort] * @property {string} [customMeta] * @property {boolean} [myOrders] * @property {boolean} [showCrossCompanyData] - Flag to view cross & non-cross * company order - * @property {string} [customerId] - The unique identifier for the customer - * associated with the query, useful for filtering results to a specific customer. + * @property {string} [customerId] * @property {string} [orderType] * @property {boolean} [allowInactive] - Flag indicating whether inactive * shipments are allowed - * @property {string} [groupEntity] - Defines the grouping criterion for - * retrieving shipments or orders. It specifies whether the results should be - * organized based on shipment groups or order groups. For example, using - * 'shipments' groups results by shipment, while an invalid value like 'abcd' - * may not be recognized, leading to errors or default behavior. * @property {boolean} [enforceDateFilter] - Applies a date filter for listing * orders. This is useful when fetching data for a specific date range while * performing searches. @@ -262,9 +236,8 @@ export = OrderPlatformValidator; /** @typedef GetRoleBasedActionsParam */ /** * @typedef GetShipmentByIdParam - * @property {string} [channelShipmentId] - The shipment ID used in the - * application, which can be used to reference specific shipments. - * @property {string} [shipmentId] - The unique identifier for a shipment. + * @property {string} [channelShipmentId] - App Shipment Id + * @property {string} [shipmentId] - Shipment Id * @property {boolean} [fetchActiveShipment] - Flag to fetch active or * deactivated shipments * @property {boolean} [allowInactive] - Flag indicating whether inactive @@ -287,61 +260,38 @@ export = OrderPlatformValidator; /** * @typedef GetShipmentsParam * @property {string} [lane] - Name of lane for which data is to be fetched - * @property {string} [bagStatus] - Comma separated values of bag statuses. + * @property {string} [bagStatus] - Comma separated values of bag statuses * @property {boolean} [statusOverrideLane] - Use this flag to fetch by - * bag_status and override lane. - * @property {number} [timeToDispatch] - Indicates the time to dispatch. - * @property {string} [searchType] - Specifies the key used to determine the - * type of search being performed. - * @property {string} [searchValue] - The value corresponding to the search - * type, such as a specific shipment ID or order ID. + * bag_status and override lane + * @property {number} [timeToDispatch] + * @property {string} [searchType] - Search type key + * @property {string} [searchValue] - Search type value * @property {string} [fromDate] - Start Date in DD-MM-YYYY format * @property {string} [toDate] - End Date in DD-MM-YYYY format - * @property {string} [startDate] - The UTC start date in ISO format - * (YYYY-MM-DDTHH:MM:SSZ) for filtering results. - * @property {string} [endDate] - The UTC end date in ISO format - * (YYYY-MM-DDTHH:MM:SSZ) for filtering results. - * @property {string} [dpIds] - A comma-separated list of delivery partner IDs - * to filter results by specific delivery partners. - * @property {string} [stores] - A comma-separated list of store IDs used to - * filter results to only those related to specific stores. - * @property {string} [salesChannels] - A comma-separated list of sales channel - * IDs to filter results based on the sales channels involved. - * @property {number} [pageNo] - Specifies the page number for paginated results. - * @property {number} [pageSize] - Determines the number of results returned per page. - * @property {boolean} [fetchActiveShipment] - A boolean flag that indicates - * whether to include only active shipments in the results. - * @property {boolean} [allowInactive] - A flag indicating whether to allow the - * inclusion of inactive shipments in the results. - * @property {boolean} [excludeLockedShipments] - A flag to specify whether to - * exclude shipments that are locked from the results. - * @property {string} [paymentMethods] - A comma-separated list of payment methods. - * @property {string} [channelShipmentId] - The shipment ID used in the - * application, which can be used to reference specific shipments. - * @property {string} [channelOrderId] - The order ID used in the application. - * @property {string} [customMeta] - Custom metadata associated with the query, - * allowing for additional filtering or information to be passed. - * @property {string} [orderingChannel] - The channel through which the order was placed. - * @property {string} [companyAffiliateTag] - A tag used to identify the - * company's affiliation for filtering or reporting purposes. - * @property {boolean} [myOrders] - A boolean flag indicating whether the query - * should return only the user's orders. - * @property {string} [platformUserId] - The unique identifier of the user on - * the platform, useful for filtering orders related to a specific user. - * @property {string} [sortType] - Determines the sorting order of the results - * based on specific criteria. - * @property {boolean} [showCrossCompanyData] - A flag indicating whether to - * include data from both cross-company and non-cross-company orders in the results. - * @property {string} [tags] - A comma-separated list of tags associated with - * the orders to filter results based on specific characteristics. - * @property {string} [customerId] - The unique identifier for the customer - * associated with the query, useful for filtering results to a specific customer. - * @property {string} [orderType] - The type of order being queried. - * @property {string} [groupEntity] - Defines the grouping criterion for - * retrieving shipments or orders. It specifies whether the results should be - * organized based on shipment groups or order groups. For example, using - * 'shipments' groups results by shipment, while an invalid value like 'abcd' - * may not be recognized, leading to errors or default behavior. + * @property {string} [startDate] - UTC Start Date in ISO format + * @property {string} [endDate] - UTC End Date in ISO format + * @property {string} [dpIds] - Comma separated values of delivery partner ids + * @property {string} [stores] - Comma separated values of store ids + * @property {string} [salesChannels] - Comma separated values of sales channel ids + * @property {number} [pageNo] - Page number for paginated data + * @property {number} [pageSize] - Page size of data received per page + * @property {boolean} [fetchActiveShipment] - Flag to fetch active shipments + * @property {boolean} [allowInactive] - Flag to allow inactive shipments + * @property {boolean} [excludeLockedShipments] - Flag to fetch locked shipments + * @property {string} [paymentMethods] - Comma separated values of payment methods + * @property {string} [channelShipmentId] - App Shipment Id + * @property {string} [channelOrderId] - App Order Id + * @property {string} [customMeta] + * @property {string} [orderingChannel] + * @property {string} [companyAffiliateTag] + * @property {boolean} [myOrders] + * @property {string} [platformUserId] + * @property {string} [sortType] - Sort the result data on basis of input + * @property {boolean} [showCrossCompanyData] - Flag to view cross & non-cross + * company order + * @property {string} [tags] - Comma separated values of tags + * @property {string} [customerId] + * @property {string} [orderType] * @property {boolean} [enforceDateFilter] - Applies a date filter for listing * shipments. This is useful when fetching data for a specific date range * while performing searches. @@ -400,17 +350,23 @@ export = OrderPlatformValidator; */ /** * @typedef UpdateAddressParam - * @property {string} shipmentId - Unique shipment no. that is auto-generated - * @property {OrderPlatformModel.UpdateAddressRequestBody} body + * @property {string} shipmentId + * @property {string} [name] + * @property {string} [address] + * @property {string} [addressType] + * @property {string} [pincode] + * @property {string} [phone] + * @property {string} [email] + * @property {string} [landmark] + * @property {string} addressCategory + * @property {string} [city] + * @property {string} [state] + * @property {string} [country] */ /** * @typedef UpdatePackagingDimensionsParam * @property {OrderPlatformModel.UpdatePackagingDimensionsPayload} body */ -/** - * @typedef UpdatePaymentInfoParam - * @property {OrderPlatformModel.UpdateShipmentPaymentMode} body - */ /** * @typedef UpdateShipmentLockParam * @property {OrderPlatformModel.UpdateShipmentLockPayload} body @@ -442,8 +398,6 @@ declare class OrderPlatformValidator { static bulkStateTransistion(): BulkStateTransistionParam; /** @returns {CheckOrderStatusParam} */ static checkOrderStatus(): CheckOrderStatusParam; - /** @returns {CreateChannelConfigParam} */ - static createChannelConfig(): CreateChannelConfigParam; /** @returns {CreateOrderParam} */ static createOrder(): CreateOrderParam; /** @returns {DispatchManifestsParam} */ @@ -478,8 +432,6 @@ declare class OrderPlatformValidator { static getBulkActionTemplate(): any; /** @returns {GetBulkShipmentExcelFileParam} */ static getBulkShipmentExcelFile(): GetBulkShipmentExcelFileParam; - /** @returns {GetChannelConfigParam} */ - static getChannelConfig(): any; /** @returns {GetFileByStatusParam} */ static getFileByStatus(): GetFileByStatusParam; /** @returns {GetLaneConfigParam} */ @@ -534,8 +486,6 @@ declare class OrderPlatformValidator { static updateAddress(): UpdateAddressParam; /** @returns {UpdatePackagingDimensionsParam} */ static updatePackagingDimensions(): UpdatePackagingDimensionsParam; - /** @returns {UpdatePaymentInfoParam} */ - static updatePaymentInfo(): UpdatePaymentInfoParam; /** @returns {UpdateShipmentLockParam} */ static updateShipmentLock(): UpdateShipmentLockParam; /** @returns {UpdateShipmentStatusParam} */ @@ -548,7 +498,7 @@ declare class OrderPlatformValidator { static verifyMobileOTP(): VerifyMobileOTPParam; } declare namespace OrderPlatformValidator { - export { AddStateManagerConfigParam, AttachOrderUserParam, BulkListingParam, BulkStateTransistionParam, CheckOrderStatusParam, CreateChannelConfigParam, CreateOrderParam, DispatchManifestsParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FailedOrderLogDetailsParam, FetchRefundModeConfigParam, GenerateInvoiceIDParam, GeneratePOSReceiptByOrderIdParam, GenerateProcessManifestParam, GetAllowedStateTransitionParam, GetAllowedTemplatesForBulkParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetFileByStatusParam, GetLaneConfigParam, GetManifestDetailsParam, GetManifestShipmentsParam, GetManifestfiltersParam, GetManifestsParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateManagerConfigParam, GetStateTransitionMapParam, GetTemplateParam, GetfiltersParam, InvalidateShipmentCacheParam, JobDetailsParam, OrderUpdateParam, PostShipmentHistoryParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdatePaymentInfoParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentsParam, VerifyMobileOTPParam }; + export { AddStateManagerConfigParam, AttachOrderUserParam, BulkListingParam, BulkStateTransistionParam, CheckOrderStatusParam, CreateOrderParam, DispatchManifestsParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FailedOrderLogDetailsParam, FetchRefundModeConfigParam, GenerateInvoiceIDParam, GeneratePOSReceiptByOrderIdParam, GenerateProcessManifestParam, GetAllowedStateTransitionParam, GetAllowedTemplatesForBulkParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetFileByStatusParam, GetLaneConfigParam, GetManifestDetailsParam, GetManifestShipmentsParam, GetManifestfiltersParam, GetManifestsParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateManagerConfigParam, GetStateTransitionMapParam, GetTemplateParam, GetfiltersParam, InvalidateShipmentCacheParam, JobDetailsParam, OrderUpdateParam, PostShipmentHistoryParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentsParam, VerifyMobileOTPParam }; } type AddStateManagerConfigParam = { body: OrderPlatformModel.TransitionConfigPayload; @@ -594,9 +544,6 @@ type BulkStateTransistionParam = { type CheckOrderStatusParam = { body: OrderPlatformModel.OrderStatus; }; -type CreateChannelConfigParam = { - body: OrderPlatformModel.CreateChannelConfigData; -}; type CreateOrderParam = { body: OrderPlatformModel.CreateOrderAPI; }; @@ -610,7 +557,7 @@ type DownloadBulkActionTemplateParam = { templateSlug?: string; }; type DownloadLanesReportParam = { - body: OrderPlatformModel.BulkReportsDownloadRequestSchema; + body: OrderPlatformModel.BulkReportsDownloadRequest; }; type EInvoiceRetryParam = { body: OrderPlatformModel.EInvoiceRetry; @@ -637,7 +584,7 @@ type GeneratePOSReceiptByOrderIdParam = { documentType?: string; }; type GenerateProcessManifestParam = { - body: OrderPlatformModel.ProcessManifestRequestSchema; + body: OrderPlatformModel.ProcessManifestRequest; }; type GetAllowedStateTransitionParam = { /** @@ -658,7 +605,7 @@ type GetAnnouncementsParam = { }; type GetBagByIdParam = { /** - * - Unique identifier of a bag + * - Id of bag */ bagId?: string; /** @@ -718,11 +665,11 @@ type GetBulkShipmentExcelFileParam = { */ dpIds?: string; /** - * - Date time in UTC timezone as per ISO format. + * - UTC start date in ISO format */ startDate?: string; /** - * - Date time in UTC timezone as per ISO format. + * - UTC end date in ISO format */ endDate?: string; /** @@ -761,6 +708,9 @@ type GetFileByStatusParam = { * - The status of the jobs to filter the results. */ status: string; + /** + * - The type of file to be downloaded. + */ fileType: string; /** * - The type of report to be downloaded. @@ -809,16 +759,9 @@ type GetLaneConfigParam = { * - Comma separated values of bag statuses */ bagStatus?: string; - /** - * - Search_type refers to the field that will - * be used as the target for the search operation - */ searchType?: string; searchValue?: string; tags?: string; - /** - * - Time_to_dispatch refers to estimated SLA time. - */ timeToDispatch?: number; paymentMethods?: string; myOrders?: boolean; @@ -827,20 +770,6 @@ type GetLaneConfigParam = { * company order */ showCrossCompanyData?: boolean; - /** - * - Defines the specific journey a shipment will - * follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. For example: - * - * - "HomeDelivery": The order goes through all the steps needed for delivery, - * from being packed to arriving at the customer’s address. - * - "PickAtStore": The order is prepared for pickup at the store, skipping - * shipping steps to make it ready faster for the customer to collect in person. - * - "Digital": This order type likely refers to orders that involve digital goods - * or services, such as software, digital subscriptions, e-books, online - * courses, or any other item that can be delivered electronically. - */ orderType?: string; }; type GetManifestDetailsParam = { @@ -974,12 +903,12 @@ type GetOrderByIdParam = { type GetOrdersParam = { /** * - Lane refers to a section where orders are - * assigned, indicating its grouping. + * assigned, indicating its grouping */ lane?: string; /** * - Search_type refers to the field that will - * be used as the target for the search operation. + * be used as the target for the search operation */ searchType?: string; /** @@ -991,10 +920,6 @@ type GetOrdersParam = { * - Time_to_dispatch refers to estimated SLA time. */ timeToDispatch?: number; - /** - * - Comma separated values of payment - * methods that were used to place order. - */ paymentMethods?: string; /** * - Tags refers to additional descriptive labels @@ -1006,43 +931,17 @@ type GetOrdersParam = { * specified by the search_type */ searchValue?: string; - /** - * - Date time in UTC timezone as per ISO format. - */ fromDate?: string; - /** - * - Date time in UTC timezone as per ISO format. - */ toDate?: string; - /** - * - Date time in UTC timezone as per ISO format. - */ startDate?: string; - /** - * - Date time in UTC timezone as per ISO format. - */ endDate?: string; /** * - Delivery Partner IDs to which shipments are assigned. */ dpIds?: string; - /** - * - A comma-separated list of store IDs used to - * filter results to only those related to specific stores. - */ stores?: string; - /** - * - A comma-separated list of sales channel - * IDs to filter results based on the sales channels involved. - */ salesChannels?: string; - /** - * - Specifies the page number for paginated results. - */ pageNo?: number; - /** - * - Determines the number of results returned per page. - */ pageSize?: number; isPrioritySort?: boolean; customMeta?: string; @@ -1052,10 +951,6 @@ type GetOrdersParam = { * company order */ showCrossCompanyData?: boolean; - /** - * - The unique identifier for the customer - * associated with the query, useful for filtering results to a specific customer. - */ customerId?: string; orderType?: string; /** @@ -1063,14 +958,6 @@ type GetOrdersParam = { * shipments are allowed */ allowInactive?: boolean; - /** - * - Defines the grouping criterion for - * retrieving shipments or orders. It specifies whether the results should be - * organized based on shipment groups or order groups. For example, using - * 'shipments' groups results by shipment, while an invalid value like 'abcd' - * may not be recognized, leading to errors or default behavior. - */ - groupEntity?: string; /** * - Applies a date filter for listing * orders. This is useful when fetching data for a specific date range while @@ -1080,12 +967,11 @@ type GetOrdersParam = { }; type GetShipmentByIdParam = { /** - * - The shipment ID used in the - * application, which can be used to reference specific shipments. + * - App Shipment Id */ channelShipmentId?: string; /** - * - The unique identifier for a shipment. + * - Shipment Id */ shipmentId?: string; /** @@ -1132,26 +1018,21 @@ type GetShipmentsParam = { */ lane?: string; /** - * - Comma separated values of bag statuses. + * - Comma separated values of bag statuses */ bagStatus?: string; /** * - Use this flag to fetch by - * bag_status and override lane. + * bag_status and override lane */ statusOverrideLane?: boolean; - /** - * - Indicates the time to dispatch. - */ timeToDispatch?: number; /** - * - Specifies the key used to determine the - * type of search being performed. + * - Search type key */ searchType?: string; /** - * - The value corresponding to the search - * type, such as a specific shipment ID or order ID. + * - Search type value */ searchValue?: string; /** @@ -1163,122 +1044,77 @@ type GetShipmentsParam = { */ toDate?: string; /** - * - The UTC start date in ISO format - * (YYYY-MM-DDTHH:MM:SSZ) for filtering results. + * - UTC Start Date in ISO format */ startDate?: string; /** - * - The UTC end date in ISO format - * (YYYY-MM-DDTHH:MM:SSZ) for filtering results. + * - UTC End Date in ISO format */ endDate?: string; /** - * - A comma-separated list of delivery partner IDs - * to filter results by specific delivery partners. + * - Comma separated values of delivery partner ids */ dpIds?: string; /** - * - A comma-separated list of store IDs used to - * filter results to only those related to specific stores. + * - Comma separated values of store ids */ stores?: string; /** - * - A comma-separated list of sales channel - * IDs to filter results based on the sales channels involved. + * - Comma separated values of sales channel ids */ salesChannels?: string; /** - * - Specifies the page number for paginated results. + * - Page number for paginated data */ pageNo?: number; /** - * - Determines the number of results returned per page. + * - Page size of data received per page */ pageSize?: number; /** - * - A boolean flag that indicates - * whether to include only active shipments in the results. + * - Flag to fetch active shipments */ fetchActiveShipment?: boolean; /** - * - A flag indicating whether to allow the - * inclusion of inactive shipments in the results. + * - Flag to allow inactive shipments */ allowInactive?: boolean; /** - * - A flag to specify whether to - * exclude shipments that are locked from the results. + * - Flag to fetch locked shipments */ excludeLockedShipments?: boolean; /** - * - A comma-separated list of payment methods. + * - Comma separated values of payment methods */ paymentMethods?: string; /** - * - The shipment ID used in the - * application, which can be used to reference specific shipments. + * - App Shipment Id */ channelShipmentId?: string; /** - * - The order ID used in the application. + * - App Order Id */ channelOrderId?: string; - /** - * - Custom metadata associated with the query, - * allowing for additional filtering or information to be passed. - */ customMeta?: string; - /** - * - The channel through which the order was placed. - */ orderingChannel?: string; - /** - * - A tag used to identify the - * company's affiliation for filtering or reporting purposes. - */ companyAffiliateTag?: string; - /** - * - A boolean flag indicating whether the query - * should return only the user's orders. - */ myOrders?: boolean; - /** - * - The unique identifier of the user on - * the platform, useful for filtering orders related to a specific user. - */ platformUserId?: string; /** - * - Determines the sorting order of the results - * based on specific criteria. + * - Sort the result data on basis of input */ sortType?: string; /** - * - A flag indicating whether to - * include data from both cross-company and non-cross-company orders in the results. + * - Flag to view cross & non-cross + * company order */ showCrossCompanyData?: boolean; /** - * - A comma-separated list of tags associated with - * the orders to filter results based on specific characteristics. + * - Comma separated values of tags */ tags?: string; - /** - * - The unique identifier for the customer - * associated with the query, useful for filtering results to a specific customer. - */ customerId?: string; - /** - * - The type of order being queried. - */ orderType?: string; - /** - * - Defines the grouping criterion for - * retrieving shipments or orders. It specifies whether the results should be - * organized based on shipment groups or order groups. For example, using - * 'shipments' groups results by shipment, while an invalid value like 'abcd' - * may not be recognized, leading to errors or default behavior. - */ - groupEntity?: string; /** * - Applies a date filter for listing * shipments. This is useful when fetching data for a specific date range @@ -1357,18 +1193,22 @@ type TrackShipmentParam = { pageSize?: number; }; type UpdateAddressParam = { - /** - * - Unique shipment no. that is auto-generated - */ shipmentId: string; - body: OrderPlatformModel.UpdateAddressRequestBody; + name?: string; + address?: string; + addressType?: string; + pincode?: string; + phone?: string; + email?: string; + landmark?: string; + addressCategory: string; + city?: string; + state?: string; + country?: string; }; type UpdatePackagingDimensionsParam = { body: OrderPlatformModel.UpdatePackagingDimensionsPayload; }; -type UpdatePaymentInfoParam = { - body: OrderPlatformModel.UpdateShipmentPaymentMode; -}; type UpdateShipmentLockParam = { body: OrderPlatformModel.UpdateShipmentLockPayload; }; @@ -1386,7 +1226,6 @@ type VerifyMobileOTPParam = { }; type GetAllowedTemplatesForBulkParam = any; type GetBulkActionTemplateParam = any; -type GetChannelConfigParam = any; type GetRoleBasedActionsParam = any; type GetStateTransitionMapParam = any; import OrderPlatformModel = require("./OrderPlatformModel"); diff --git a/sdk/platform/Order/OrderPlatformValidator.js b/sdk/platform/Order/OrderPlatformValidator.js index 079c005e1..d09a1d50b 100644 --- a/sdk/platform/Order/OrderPlatformValidator.js +++ b/sdk/platform/Order/OrderPlatformValidator.js @@ -35,11 +35,6 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @property {OrderPlatformModel.OrderStatus} body */ -/** - * @typedef CreateChannelConfigParam - * @property {OrderPlatformModel.CreateChannelConfigData} body - */ - /** * @typedef CreateOrderParam * @property {OrderPlatformModel.CreateOrderAPI} body @@ -57,7 +52,7 @@ const OrderPlatformModel = require("./OrderPlatformModel"); /** * @typedef DownloadLanesReportParam - * @property {OrderPlatformModel.BulkReportsDownloadRequestSchema} body + * @property {OrderPlatformModel.BulkReportsDownloadRequest} body */ /** @@ -90,7 +85,7 @@ const OrderPlatformModel = require("./OrderPlatformModel"); /** * @typedef GenerateProcessManifestParam - * @property {OrderPlatformModel.ProcessManifestRequestSchema} body + * @property {OrderPlatformModel.ProcessManifestRequest} body */ /** @@ -109,7 +104,7 @@ const OrderPlatformModel = require("./OrderPlatformModel"); /** * @typedef GetBagByIdParam - * @property {string} [bagId] - Unique identifier of a bag + * @property {string} [bagId] - Id of bag * @property {string} [channelBagId] - Id of application bag * @property {string} [channelId] - Id of application */ @@ -133,8 +128,8 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @typedef GetBulkShipmentExcelFileParam * @property {string} [salesChannels] - Comma separated values of sales channel ids * @property {string} [dpIds] - Comma separated values of delivery partner ids - * @property {string} [startDate] - Date time in UTC timezone as per ISO format. - * @property {string} [endDate] - Date time in UTC timezone as per ISO format. + * @property {string} [startDate] - UTC start date in ISO format + * @property {string} [endDate] - UTC end date in ISO format * @property {string} [stores] - Comma separated values of store ids * @property {string} [tags] - Comma separated values of tags * @property {string} [bagStatus] - Comma separated values of bag statuses @@ -145,13 +140,11 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @property {number} [pageSize] */ -/** @typedef GetChannelConfigParam */ - /** * @typedef GetFileByStatusParam * @property {string} batchId - Batch Id to identify the bulk operation request. * @property {string} status - The status of the jobs to filter the results. - * @property {string} fileType + * @property {string} fileType - The type of file to be downloaded. * @property {string} [reportType] - The type of report to be downloaded. */ @@ -168,27 +161,15 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @property {string} [salesChannels] * @property {string} [paymentMode] - Comma separated values of payment modes * @property {string} [bagStatus] - Comma separated values of bag statuses - * @property {string} [searchType] - Search_type refers to the field that will - * be used as the target for the search operation + * @property {string} [searchType] * @property {string} [searchValue] * @property {string} [tags] - * @property {number} [timeToDispatch] - Time_to_dispatch refers to estimated SLA time. + * @property {number} [timeToDispatch] * @property {string} [paymentMethods] * @property {boolean} [myOrders] * @property {boolean} [showCrossCompanyData] - Flag to view cross & non-cross * company order - * @property {string} [orderType] - Defines the specific journey a shipment will - * follow based on the application's operational needs and customer - * preferences. This field categorizes orders into distinct types, each - * associated with a unique processing flow. For example: - * - * - "HomeDelivery": The order goes through all the steps needed for delivery, - * from being packed to arriving at the customer’s address. - * - "PickAtStore": The order is prepared for pickup at the store, skipping - * shipping steps to make it ready faster for the customer to collect in person. - * - "Digital": This order type likely refers to orders that involve digital goods - * or services, such as software, digital subscriptions, e-books, online - * courses, or any other item that can be delivered electronically. + * @property {string} [orderType] */ /** @@ -251,44 +232,35 @@ const OrderPlatformModel = require("./OrderPlatformModel"); /** * @typedef GetOrdersParam * @property {string} [lane] - Lane refers to a section where orders are - * assigned, indicating its grouping. + * assigned, indicating its grouping * @property {string} [searchType] - Search_type refers to the field that will - * be used as the target for the search operation. + * be used as the target for the search operation * @property {string} [bagStatus] - Bag_status refers to status of the entity. * Filters orders based on the status. * @property {number} [timeToDispatch] - Time_to_dispatch refers to estimated SLA time. - * @property {string} [paymentMethods] - Comma separated values of payment - * methods that were used to place order. + * @property {string} [paymentMethods] * @property {string} [tags] - Tags refers to additional descriptive labels * associated with the order * @property {string} [searchValue] - Search_value is matched against the field * specified by the search_type - * @property {string} [fromDate] - Date time in UTC timezone as per ISO format. - * @property {string} [toDate] - Date time in UTC timezone as per ISO format. - * @property {string} [startDate] - Date time in UTC timezone as per ISO format. - * @property {string} [endDate] - Date time in UTC timezone as per ISO format. + * @property {string} [fromDate] + * @property {string} [toDate] + * @property {string} [startDate] + * @property {string} [endDate] * @property {string} [dpIds] - Delivery Partner IDs to which shipments are assigned. - * @property {string} [stores] - A comma-separated list of store IDs used to - * filter results to only those related to specific stores. - * @property {string} [salesChannels] - A comma-separated list of sales channel - * IDs to filter results based on the sales channels involved. - * @property {number} [pageNo] - Specifies the page number for paginated results. - * @property {number} [pageSize] - Determines the number of results returned per page. + * @property {string} [stores] + * @property {string} [salesChannels] + * @property {number} [pageNo] + * @property {number} [pageSize] * @property {boolean} [isPrioritySort] * @property {string} [customMeta] * @property {boolean} [myOrders] * @property {boolean} [showCrossCompanyData] - Flag to view cross & non-cross * company order - * @property {string} [customerId] - The unique identifier for the customer - * associated with the query, useful for filtering results to a specific customer. + * @property {string} [customerId] * @property {string} [orderType] * @property {boolean} [allowInactive] - Flag indicating whether inactive * shipments are allowed - * @property {string} [groupEntity] - Defines the grouping criterion for - * retrieving shipments or orders. It specifies whether the results should be - * organized based on shipment groups or order groups. For example, using - * 'shipments' groups results by shipment, while an invalid value like 'abcd' - * may not be recognized, leading to errors or default behavior. * @property {boolean} [enforceDateFilter] - Applies a date filter for listing * orders. This is useful when fetching data for a specific date range while * performing searches. @@ -298,9 +270,8 @@ const OrderPlatformModel = require("./OrderPlatformModel"); /** * @typedef GetShipmentByIdParam - * @property {string} [channelShipmentId] - The shipment ID used in the - * application, which can be used to reference specific shipments. - * @property {string} [shipmentId] - The unique identifier for a shipment. + * @property {string} [channelShipmentId] - App Shipment Id + * @property {string} [shipmentId] - Shipment Id * @property {boolean} [fetchActiveShipment] - Flag to fetch active or * deactivated shipments * @property {boolean} [allowInactive] - Flag indicating whether inactive @@ -326,61 +297,38 @@ const OrderPlatformModel = require("./OrderPlatformModel"); /** * @typedef GetShipmentsParam * @property {string} [lane] - Name of lane for which data is to be fetched - * @property {string} [bagStatus] - Comma separated values of bag statuses. + * @property {string} [bagStatus] - Comma separated values of bag statuses * @property {boolean} [statusOverrideLane] - Use this flag to fetch by - * bag_status and override lane. - * @property {number} [timeToDispatch] - Indicates the time to dispatch. - * @property {string} [searchType] - Specifies the key used to determine the - * type of search being performed. - * @property {string} [searchValue] - The value corresponding to the search - * type, such as a specific shipment ID or order ID. + * bag_status and override lane + * @property {number} [timeToDispatch] + * @property {string} [searchType] - Search type key + * @property {string} [searchValue] - Search type value * @property {string} [fromDate] - Start Date in DD-MM-YYYY format * @property {string} [toDate] - End Date in DD-MM-YYYY format - * @property {string} [startDate] - The UTC start date in ISO format - * (YYYY-MM-DDTHH:MM:SSZ) for filtering results. - * @property {string} [endDate] - The UTC end date in ISO format - * (YYYY-MM-DDTHH:MM:SSZ) for filtering results. - * @property {string} [dpIds] - A comma-separated list of delivery partner IDs - * to filter results by specific delivery partners. - * @property {string} [stores] - A comma-separated list of store IDs used to - * filter results to only those related to specific stores. - * @property {string} [salesChannels] - A comma-separated list of sales channel - * IDs to filter results based on the sales channels involved. - * @property {number} [pageNo] - Specifies the page number for paginated results. - * @property {number} [pageSize] - Determines the number of results returned per page. - * @property {boolean} [fetchActiveShipment] - A boolean flag that indicates - * whether to include only active shipments in the results. - * @property {boolean} [allowInactive] - A flag indicating whether to allow the - * inclusion of inactive shipments in the results. - * @property {boolean} [excludeLockedShipments] - A flag to specify whether to - * exclude shipments that are locked from the results. - * @property {string} [paymentMethods] - A comma-separated list of payment methods. - * @property {string} [channelShipmentId] - The shipment ID used in the - * application, which can be used to reference specific shipments. - * @property {string} [channelOrderId] - The order ID used in the application. - * @property {string} [customMeta] - Custom metadata associated with the query, - * allowing for additional filtering or information to be passed. - * @property {string} [orderingChannel] - The channel through which the order was placed. - * @property {string} [companyAffiliateTag] - A tag used to identify the - * company's affiliation for filtering or reporting purposes. - * @property {boolean} [myOrders] - A boolean flag indicating whether the query - * should return only the user's orders. - * @property {string} [platformUserId] - The unique identifier of the user on - * the platform, useful for filtering orders related to a specific user. - * @property {string} [sortType] - Determines the sorting order of the results - * based on specific criteria. - * @property {boolean} [showCrossCompanyData] - A flag indicating whether to - * include data from both cross-company and non-cross-company orders in the results. - * @property {string} [tags] - A comma-separated list of tags associated with - * the orders to filter results based on specific characteristics. - * @property {string} [customerId] - The unique identifier for the customer - * associated with the query, useful for filtering results to a specific customer. - * @property {string} [orderType] - The type of order being queried. - * @property {string} [groupEntity] - Defines the grouping criterion for - * retrieving shipments or orders. It specifies whether the results should be - * organized based on shipment groups or order groups. For example, using - * 'shipments' groups results by shipment, while an invalid value like 'abcd' - * may not be recognized, leading to errors or default behavior. + * @property {string} [startDate] - UTC Start Date in ISO format + * @property {string} [endDate] - UTC End Date in ISO format + * @property {string} [dpIds] - Comma separated values of delivery partner ids + * @property {string} [stores] - Comma separated values of store ids + * @property {string} [salesChannels] - Comma separated values of sales channel ids + * @property {number} [pageNo] - Page number for paginated data + * @property {number} [pageSize] - Page size of data received per page + * @property {boolean} [fetchActiveShipment] - Flag to fetch active shipments + * @property {boolean} [allowInactive] - Flag to allow inactive shipments + * @property {boolean} [excludeLockedShipments] - Flag to fetch locked shipments + * @property {string} [paymentMethods] - Comma separated values of payment methods + * @property {string} [channelShipmentId] - App Shipment Id + * @property {string} [channelOrderId] - App Order Id + * @property {string} [customMeta] + * @property {string} [orderingChannel] + * @property {string} [companyAffiliateTag] + * @property {boolean} [myOrders] + * @property {string} [platformUserId] + * @property {string} [sortType] - Sort the result data on basis of input + * @property {boolean} [showCrossCompanyData] - Flag to view cross & non-cross + * company order + * @property {string} [tags] - Comma separated values of tags + * @property {string} [customerId] + * @property {string} [orderType] * @property {boolean} [enforceDateFilter] - Applies a date filter for listing * shipments. This is useful when fetching data for a specific date range * while performing searches. @@ -452,8 +400,18 @@ const OrderPlatformModel = require("./OrderPlatformModel"); /** * @typedef UpdateAddressParam - * @property {string} shipmentId - Unique shipment no. that is auto-generated - * @property {OrderPlatformModel.UpdateAddressRequestBody} body + * @property {string} shipmentId + * @property {string} [name] + * @property {string} [address] + * @property {string} [addressType] + * @property {string} [pincode] + * @property {string} [phone] + * @property {string} [email] + * @property {string} [landmark] + * @property {string} addressCategory + * @property {string} [city] + * @property {string} [state] + * @property {string} [country] */ /** @@ -461,11 +419,6 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @property {OrderPlatformModel.UpdatePackagingDimensionsPayload} body */ -/** - * @typedef UpdatePaymentInfoParam - * @property {OrderPlatformModel.UpdateShipmentPaymentMode} body - */ - /** * @typedef UpdateShipmentLockParam * @property {OrderPlatformModel.UpdateShipmentLockPayload} body @@ -533,13 +486,6 @@ class OrderPlatformValidator { }).required(); } - /** @returns {CreateChannelConfigParam} */ - static createChannelConfig() { - return Joi.object({ - body: OrderPlatformModel.CreateChannelConfigData().required(), - }).required(); - } - /** @returns {CreateOrderParam} */ static createOrder() { return Joi.object({ @@ -564,7 +510,7 @@ class OrderPlatformValidator { /** @returns {DownloadLanesReportParam} */ static downloadLanesReport() { return Joi.object({ - body: OrderPlatformModel.BulkReportsDownloadRequestSchema().required(), + body: OrderPlatformModel.BulkReportsDownloadRequest().required(), }).required(); } @@ -609,7 +555,7 @@ class OrderPlatformValidator { /** @returns {GenerateProcessManifestParam} */ static generateProcessManifest() { return Joi.object({ - body: OrderPlatformModel.ProcessManifestRequestSchema().required(), + body: OrderPlatformModel.ProcessManifestRequest().required(), }).required(); } @@ -680,11 +626,6 @@ class OrderPlatformValidator { }).required(); } - /** @returns {GetChannelConfigParam} */ - static getChannelConfig() { - return Joi.object({}).required(); - } - /** @returns {GetFileByStatusParam} */ static getFileByStatus() { return Joi.object({ @@ -805,7 +746,6 @@ class OrderPlatformValidator { customerId: Joi.string().allow(""), orderType: Joi.string().allow(""), allowInactive: Joi.boolean(), - groupEntity: Joi.string().allow(""), enforceDateFilter: Joi.boolean(), }).required(); } @@ -876,7 +816,6 @@ class OrderPlatformValidator { tags: Joi.string().allow(""), customerId: Joi.string().allow(""), orderType: Joi.string().allow(""), - groupEntity: Joi.string().allow(""), enforceDateFilter: Joi.boolean(), }).required(); } @@ -973,7 +912,17 @@ class OrderPlatformValidator { static updateAddress() { return Joi.object({ shipmentId: Joi.string().allow("").required(), - body: OrderPlatformModel.UpdateAddressRequestBody().required(), + name: Joi.string().allow(""), + address: Joi.string().allow(""), + addressType: Joi.string().allow(""), + pincode: Joi.string().allow(""), + phone: Joi.string().allow(""), + email: Joi.string().allow(""), + landmark: Joi.string().allow(""), + addressCategory: Joi.string().allow("").required(), + city: Joi.string().allow(""), + state: Joi.string().allow(""), + country: Joi.string().allow(""), }).required(); } @@ -984,13 +933,6 @@ class OrderPlatformValidator { }).required(); } - /** @returns {UpdatePaymentInfoParam} */ - static updatePaymentInfo() { - return Joi.object({ - body: OrderPlatformModel.UpdateShipmentPaymentMode().required(), - }).required(); - } - /** @returns {UpdateShipmentLockParam} */ static updateShipmentLock() { return Joi.object({ diff --git a/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts b/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts index ac88b4420..593a70e9e 100644 --- a/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +++ b/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts @@ -7,24 +7,22 @@ declare class Partner { * @param {PartnerPlatformApplicationValidator.AddProxyPathParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name addProxyPath * @summary: Create extension proxy * @description: Extension proxy can be used to call extension API from storefront and make extension API integration seamless. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/partner/addProxyPath/). */ - addProxyPath({ extensionId, body, requestHeaders }?: PartnerPlatformApplicationValidator.AddProxyPathParam, { responseHeaders }?: object): Promise; + addProxyPath({ extensionId, body, requestHeaders }?: PartnerPlatformApplicationValidator.AddProxyPathParam, { responseHeaders }?: object): Promise; /** * @param {PartnerPlatformApplicationValidator.RemoveProxyPathParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name removeProxyPath * @summary: Remove extension proxy * @description: Remove the proxy which are created earlier for the extension. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/partner/removeProxyPath/). */ - removeProxyPath({ extensionId, attachedPath, requestHeaders }?: PartnerPlatformApplicationValidator.RemoveProxyPathParam, { responseHeaders }?: object): Promise; + removeProxyPath({ extensionId, attachedPath, requestHeaders }?: PartnerPlatformApplicationValidator.RemoveProxyPathParam, { responseHeaders }?: object): Promise; } import PartnerPlatformApplicationValidator = require("./PartnerPlatformApplicationValidator"); import PartnerPlatformModel = require("./PartnerPlatformModel"); diff --git a/sdk/platform/Partner/PartnerPlatformApplicationClient.js b/sdk/platform/Partner/PartnerPlatformApplicationClient.js index 5ea4f3b1b..8976e02fc 100644 --- a/sdk/platform/Partner/PartnerPlatformApplicationClient.js +++ b/sdk/platform/Partner/PartnerPlatformApplicationClient.js @@ -19,8 +19,7 @@ class Partner { * @param {PartnerPlatformApplicationValidator.AddProxyPathParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name addProxyPath * @summary: Create extension proxy * @description: Extension proxy can be used to call extension API from storefront and make extension API integration seamless. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/partner/addProxyPath/). @@ -78,10 +77,10 @@ class Partner { const { error: res_error, - } = PartnerPlatformModel.ExtensionProxyPathCreation().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = PartnerPlatformModel.AddProxyResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -101,8 +100,7 @@ class Partner { * @param {PartnerPlatformApplicationValidator.RemoveProxyPathParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name removeProxyPath * @summary: Remove extension proxy * @description: Remove the proxy which are created earlier for the extension. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/partner/removeProxyPath/). @@ -160,7 +158,7 @@ class Partner { const { error: res_error, - } = PartnerPlatformModel.ExtensionProxyPathDelete().validate(responseData, { + } = PartnerPlatformModel.RemoveProxyResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/platform/Partner/PartnerPlatformModel.d.ts b/sdk/platform/Partner/PartnerPlatformModel.d.ts index a8e4730c9..cf2053abe 100644 --- a/sdk/platform/Partner/PartnerPlatformModel.d.ts +++ b/sdk/platform/Partner/PartnerPlatformModel.d.ts @@ -6,7 +6,7 @@ export = PartnerPlatformModel; * will be generated */ /** - * @typedef ExtensionProxyPathCreation + * @typedef AddProxyResponse * @property {string} [_id] * @property {string} [attached_path] * @property {string} [proxy_url] @@ -17,7 +17,7 @@ export = PartnerPlatformModel; * @property {string} [modified_at] */ /** - * @typedef ExtensionProxyPathDelete + * @typedef RemoveProxyResponse * @property {string} [message] * @property {Object} [data] */ @@ -32,7 +32,7 @@ export = PartnerPlatformModel; declare class PartnerPlatformModel { } declare namespace PartnerPlatformModel { - export { AddProxyReq, ExtensionProxyPathCreation, ExtensionProxyPathDelete, APIError }; + export { AddProxyReq, AddProxyResponse, RemoveProxyResponse, APIError }; } /** @returns {AddProxyReq} */ declare function AddProxyReq(): AddProxyReq; @@ -47,9 +47,9 @@ type AddProxyReq = { */ proxy_url?: string; }; -/** @returns {ExtensionProxyPathCreation} */ -declare function ExtensionProxyPathCreation(): ExtensionProxyPathCreation; -type ExtensionProxyPathCreation = { +/** @returns {AddProxyResponse} */ +declare function AddProxyResponse(): AddProxyResponse; +type AddProxyResponse = { _id?: string; attached_path?: string; proxy_url?: string; @@ -59,9 +59,9 @@ type ExtensionProxyPathCreation = { created_at?: string; modified_at?: string; }; -/** @returns {ExtensionProxyPathDelete} */ -declare function ExtensionProxyPathDelete(): ExtensionProxyPathDelete; -type ExtensionProxyPathDelete = { +/** @returns {RemoveProxyResponse} */ +declare function RemoveProxyResponse(): RemoveProxyResponse; +type RemoveProxyResponse = { message?: string; data?: any; }; diff --git a/sdk/platform/Partner/PartnerPlatformModel.js b/sdk/platform/Partner/PartnerPlatformModel.js index 0e7e35ede..eef058909 100644 --- a/sdk/platform/Partner/PartnerPlatformModel.js +++ b/sdk/platform/Partner/PartnerPlatformModel.js @@ -8,7 +8,7 @@ const Joi = require("joi"); */ /** - * @typedef ExtensionProxyPathCreation + * @typedef AddProxyResponse * @property {string} [_id] * @property {string} [attached_path] * @property {string} [proxy_url] @@ -20,7 +20,7 @@ const Joi = require("joi"); */ /** - * @typedef ExtensionProxyPathDelete + * @typedef RemoveProxyResponse * @property {string} [message] * @property {Object} [data] */ @@ -43,8 +43,8 @@ class PartnerPlatformModel { }); } - /** @returns {ExtensionProxyPathCreation} */ - static ExtensionProxyPathCreation() { + /** @returns {AddProxyResponse} */ + static AddProxyResponse() { return Joi.object({ _id: Joi.string().allow(""), attached_path: Joi.string().allow(""), @@ -57,11 +57,11 @@ class PartnerPlatformModel { }); } - /** @returns {ExtensionProxyPathDelete} */ - static ExtensionProxyPathDelete() { + /** @returns {RemoveProxyResponse} */ + static RemoveProxyResponse() { return Joi.object({ message: Joi.string().allow(""), - data: Joi.object().pattern(/\S/, Joi.any()), + data: Joi.any(), }); } @@ -72,7 +72,7 @@ class PartnerPlatformModel { message: Joi.string().allow(""), info: Joi.string().allow(""), request_id: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), }); } } diff --git a/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts b/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts index d9e055c90..a8c6b394a 100644 --- a/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +++ b/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts @@ -7,266 +7,271 @@ declare class Payment { * @param {PaymentPlatformApplicationValidator.AddEdcDeviceParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addEdcDevice * @summary: Create an EDC device * @description: Registration and addition of a new EDC device to the system - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/addEdcDevice/). */ - addEdcDevice({ terminalUniqueIdentifier, body, requestHeaders }?: PaymentPlatformApplicationValidator.AddEdcDeviceParam, { responseHeaders }?: object): Promise; + addEdcDevice({ terminalUniqueIdentifier, body, requestHeaders }?: PaymentPlatformApplicationValidator.AddEdcDeviceParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.AddRefundBankAccountUsingOTPParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addRefundBankAccountUsingOTP * @summary: Create refund account * @description: The addition of a bank account specifically for refunds, employing OTP verification for security - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/addRefundBankAccountUsingOTP/). */ - addRefundBankAccountUsingOTP({ body, requestHeaders }?: PaymentPlatformApplicationValidator.AddRefundBankAccountUsingOTPParam, { responseHeaders }?: object): Promise; + addRefundBankAccountUsingOTP({ body, requestHeaders }?: PaymentPlatformApplicationValidator.AddRefundBankAccountUsingOTPParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.CancelPaymentLinkParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name cancelPaymentLink * @summary: Cancel payment link * @description: Deactivate and cancel a payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/cancelPaymentLink/). */ - cancelPaymentLink({ body, requestHeaders }?: PaymentPlatformApplicationValidator.CancelPaymentLinkParam, { responseHeaders }?: object): Promise; + cancelPaymentLink({ body, requestHeaders }?: PaymentPlatformApplicationValidator.CancelPaymentLinkParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.CheckAndUpdatePaymentStatusParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name checkAndUpdatePaymentStatus * @summary: Poll and update payment status * @description: Polling process to confirm the payment status. It periodically checks and updates the current status of a payment, ensuring timely and accurate confirmation of payment transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/checkAndUpdatePaymentStatus/). */ - checkAndUpdatePaymentStatus({ body, requestHeaders }?: PaymentPlatformApplicationValidator.CheckAndUpdatePaymentStatusParam, { responseHeaders }?: object): Promise; + checkAndUpdatePaymentStatus({ body, requestHeaders }?: PaymentPlatformApplicationValidator.CheckAndUpdatePaymentStatusParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.ConfirmPaymentParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name confirmPayment * @summary: Payment confirmation * @description: Authentication and confirmation of a payment.It requires details such as the order ID and payment methods in the request body to authenticate and confirm the payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/confirmPayment/). */ - confirmPayment({ body, requestHeaders }?: PaymentPlatformApplicationValidator.ConfirmPaymentParam, { responseHeaders }?: object): Promise; + confirmPayment({ body, requestHeaders }?: PaymentPlatformApplicationValidator.ConfirmPaymentParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.CreateMerchantRefundPriorityParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} + * - Success response + * * @name createMerchantRefundPriority * @summary: Create merchant refund priority * @description: Create merchant refund priority configurations, with the provided refund sources priority details, and return the status of the operation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/createMerchantRefundPriority/). */ - createMerchantRefundPriority({ configType, body, requestHeaders }?: PaymentPlatformApplicationValidator.CreateMerchantRefundPriorityParam, { responseHeaders }?: object): Promise; + createMerchantRefundPriority({ configType, body, requestHeaders }?: PaymentPlatformApplicationValidator.CreateMerchantRefundPriorityParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.CreatePaymentLinkParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name createPaymentLink * @summary: Create payment link * @description: Generate a payment link for accepting payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/createPaymentLink/). */ - createPaymentLink({ body, requestHeaders }?: PaymentPlatformApplicationValidator.CreatePaymentLinkParam, { responseHeaders }?: object): Promise; + createPaymentLink({ body, requestHeaders }?: PaymentPlatformApplicationValidator.CreatePaymentLinkParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.CreatePaymentOrderParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createPaymentOrder * @summary: Create Order * @description: Create an order and payment on the aggregator side - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/createPaymentOrder/). */ - createPaymentOrder({ body, requestHeaders }?: PaymentPlatformApplicationValidator.CreatePaymentOrderParam, { responseHeaders }?: object): Promise; + createPaymentOrder({ body, requestHeaders }?: PaymentPlatformApplicationValidator.CreatePaymentOrderParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.EdcAggregatorsAndModelListParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name edcAggregatorsAndModelList * @summary: EDC aggregators and model list * @description: Retrieve a list of EDC (Electronic Data Capture) aggregators and models. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/edcAggregatorsAndModelList/). */ - edcAggregatorsAndModelList({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + edcAggregatorsAndModelList({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.EdcDeviceListParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name edcDeviceList * @summary: List EDC devices * @description: Retrieves a list of available Electronic Data Capture (EDC) devices. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/edcDeviceList/). */ - edcDeviceList({ pageNo, pageSize, isActive, storeId, deviceTag, requestHeaders }?: PaymentPlatformApplicationValidator.EdcDeviceListParam, { responseHeaders }?: object): Promise; + edcDeviceList({ pageNo, pageSize, isActive, storeId, deviceTag, requestHeaders }?: PaymentPlatformApplicationValidator.EdcDeviceListParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.EdcDeviceStatsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name edcDeviceStats * @summary: EDC device stats * @description: Information about EDC (Electronic Data Capture) devices linked to a specific application within a company. It provides statistics such as the count of active and inactive devices. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/edcDeviceStats/). */ - edcDeviceStats({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + edcDeviceStats({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetBankAccountDetailsOpenAPIParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBankAccountDetailsOpenAPI * @summary: Get bank account details * @description: Retrieve bank account information - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getBankAccountDetailsOpenAPI/). */ - getBankAccountDetailsOpenAPI({ orderId, requestHash, requestHeaders }?: PaymentPlatformApplicationValidator.GetBankAccountDetailsOpenAPIParam, { responseHeaders }?: object): Promise; + getBankAccountDetailsOpenAPI({ orderId, requestHash, requestHeaders }?: PaymentPlatformApplicationValidator.GetBankAccountDetailsOpenAPIParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetBrandPaymentGatewayConfigParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getBrandPaymentGatewayConfig * @summary: Get secrets for brand payment gateway * @description: Retrieve configuration settings like key, secret, webhook url, merchant salt for brand payment gateways. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getBrandPaymentGatewayConfig/). */ - getBrandPaymentGatewayConfig({ aggregator, configType, requestHeaders }?: PaymentPlatformApplicationValidator.GetBrandPaymentGatewayConfigParam, { responseHeaders }?: object): Promise; + getBrandPaymentGatewayConfig({ aggregator, configType, requestHeaders }?: PaymentPlatformApplicationValidator.GetBrandPaymentGatewayConfigParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetEdcDeviceParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name getEdcDevice * @summary: Get an EDC device * @description: Retrieve comprehensive details regarding an Electronic Data Capture (EDC) device associated with a particular terminal unique identifier within a company's application.Upon success, it returns the detailed information of the EDC device, including terminal serial number, EDC device serial number, merchant store POS code, store ID, aggregator ID and name, device tag, activation status, and EDC model. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getEdcDevice/). */ - getEdcDevice({ terminalUniqueIdentifier, requestHeaders }?: PaymentPlatformApplicationValidator.GetEdcDeviceParam, { responseHeaders }?: object): Promise; + getEdcDevice({ terminalUniqueIdentifier, requestHeaders }?: PaymentPlatformApplicationValidator.GetEdcDeviceParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetMerchantAggregatorAppVersionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getMerchantAggregatorAppVersion * @summary: Get app version for Aggregator * @description: Get app version required for Payment Mode or sub payment mode for an Aggregator.if merchant required any PG payment mode after certain version for mobile app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getMerchantAggregatorAppVersion/). */ - getMerchantAggregatorAppVersion({ aggregatorId, businessUnit, device, paymentModeId, subPaymentMode, requestHeaders, }?: PaymentPlatformApplicationValidator.GetMerchantAggregatorAppVersionParam, { responseHeaders }?: object): Promise; + getMerchantAggregatorAppVersion({ aggregatorId, businessUnit, device, paymentModeId, subPaymentMode, requestHeaders, }?: PaymentPlatformApplicationValidator.GetMerchantAggregatorAppVersionParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetMerchantAggregatorPaymentModeDetailsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getMerchantAggregatorPaymentModeDetails * @summary: Get merchant aggregator and their payment mode * @description: Get available payment gateways and payment mode and it's sub payment mode details like for razorpay their active/inactive payment modes netbanking , wallet, upi are shown. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getMerchantAggregatorPaymentModeDetails/). */ - getMerchantAggregatorPaymentModeDetails({ aggregatorId, businessUnit, device, requestHeaders }?: PaymentPlatformApplicationValidator.GetMerchantAggregatorPaymentModeDetailsParam, { responseHeaders }?: object): Promise; + getMerchantAggregatorPaymentModeDetails({ aggregatorId, businessUnit, device, requestHeaders }?: PaymentPlatformApplicationValidator.GetMerchantAggregatorPaymentModeDetailsParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetMerchantPaymentOptionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getMerchantPaymentOption * @summary: Get merchant payment option * @description: Retrieve available payment gateways and offline payment mode details for a merchant by providing company ID and application ID, returning a list of active payment gateways and their configurations, including online and offline options. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getMerchantPaymentOption/). */ - getMerchantPaymentOption({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getMerchantPaymentOption({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetMerchantRefundPriorityParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} + * - Success response + * * @name getMerchantRefundPriority * @summary: Get merchant refund priority * @description: Retrieve merchant refund priority configurations, returning the status of the update and the refund sources priority with their descriptions and priorities. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getMerchantRefundPriority/). */ - getMerchantRefundPriority({ configType, requestHeaders }?: PaymentPlatformApplicationValidator.GetMerchantRefundPriorityParam, { responseHeaders }?: object): Promise; + getMerchantRefundPriority({ configType, requestHeaders }?: PaymentPlatformApplicationValidator.GetMerchantRefundPriorityParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetPGConfigAggregatorsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getPGConfigAggregators * @summary: Get merchant aggregator payment mode * @description: Get payment gateway and it's payment mode and it's sub payment mode details like for razorpay update active/inactive payment modes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPGConfigAggregators/). */ - getPGConfigAggregators({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getPGConfigAggregators({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetPaymentCodeOptionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPaymentCodeOption * @summary: Get payment mode codes * @description: Enables users to retrieve options for payment codes.users can access information such as payment method names, networks, and associated codes, facilitating seamless integration and management of payment modes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentCodeOption/). */ - getPaymentCodeOption({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getPaymentCodeOption({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetPaymentLinkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPaymentLink * @summary: Get payment link * @description: Retrieve a payment link for making payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentLink/). */ - getPaymentLink({ paymentLinkId, requestHeaders }?: PaymentPlatformApplicationValidator.GetPaymentLinkParam, { responseHeaders }?: object): Promise; + getPaymentLink({ paymentLinkId, requestHeaders }?: PaymentPlatformApplicationValidator.GetPaymentLinkParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetPaymentModeControlRoutesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getPaymentModeControlRoutes * @summary: Get offline/advance payment mode * @description: Get details of offline / advance payment mode like for cod offline payment mode get user level cod limit, order level cod limit, cod charge. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentModeControlRoutes/). */ - getPaymentModeControlRoutes({ mode, requestHeaders }?: PaymentPlatformApplicationValidator.GetPaymentModeControlRoutesParam, { responseHeaders }?: object): Promise; + getPaymentModeControlRoutes({ mode, requestHeaders }?: PaymentPlatformApplicationValidator.GetPaymentModeControlRoutesParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetPaymentModeCustomConfigParam} arg * - Arg object @@ -287,213 +292,214 @@ declare class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPaymentModeRoutes * @summary: Get payment modes * @description: Get available payment methods on the payment page, specifying the aggregator for each option, such as 'Netbanking powered by Juspay' and 'Card powered by Razorpay'. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentModeRoutes/). */ - getPaymentModeRoutes({ refresh, requestType, orderId, shipmentId, amount, requestHeaders }?: PaymentPlatformApplicationValidator.GetPaymentModeRoutesParam, { responseHeaders }?: object): Promise; + getPaymentModeRoutes({ refresh, requestType, orderId, shipmentId, amount, requestHeaders }?: PaymentPlatformApplicationValidator.GetPaymentModeRoutesParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetPaymentSessionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getPaymentSession * @summary: Get payment session * @description: Allows users to fetch the payment session details associated with a given order ID or transaction ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentSession/). */ - getPaymentSession({ gid, lineItem, requestHeaders }?: PaymentPlatformApplicationValidator.GetPaymentSessionParam, { responseHeaders }?: object): Promise; + getPaymentSession({ gid, lineItem, requestHeaders }?: PaymentPlatformApplicationValidator.GetPaymentSessionParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetPosPaymentModeRoutesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name getPosPaymentModeRoutes * @summary: List POS payment modes * @description: Available payment methods on the payment page for POS, specifying the aggregator for each option, such as 'CARD powered by Juspay' and 'QR powered by Razorpay'. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPosPaymentModeRoutes/). */ - getPosPaymentModeRoutes({ amount, pincode, orderType, cartId, checkoutMode, refresh, orderId, cardReference, userDetails, displaySplit, advancePayment, shipmentId, requestHeaders, }?: PaymentPlatformApplicationValidator.GetPosPaymentModeRoutesParam, { responseHeaders }?: object): Promise; + getPosPaymentModeRoutes({ amount, pincode, orderType, cartId, checkoutMode, refresh, orderId, cardReference, userDetails, displaySplit, advancePayment, shipmentId, requestHeaders, }?: PaymentPlatformApplicationValidator.GetPosPaymentModeRoutesParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetUserBeneficiariesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getUserBeneficiaries * @summary: Get user beneficiaries * @description: Retrieves information about beneficiaries associated with the user for processing refunds, based on the provided order ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getUserBeneficiaries/). */ - getUserBeneficiaries({ orderId, requestHeaders }?: PaymentPlatformApplicationValidator.GetUserBeneficiariesParam, { responseHeaders }?: object): Promise; + getUserBeneficiaries({ orderId, requestHeaders }?: PaymentPlatformApplicationValidator.GetUserBeneficiariesParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetUserCODlimitRoutesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getUserCODlimitRoutes * @summary: Get user COD * @description: Retrieve user cod limt data of user i.e cod is active or not for user and remaining limit - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getUserCODlimitRoutes/). */ - getUserCODlimitRoutes({ merchantUserId, mobileNo, requestHeaders }?: PaymentPlatformApplicationValidator.GetUserCODlimitRoutesParam, { responseHeaders }?: object): Promise; + getUserCODlimitRoutes({ merchantUserId, mobileNo, requestHeaders }?: PaymentPlatformApplicationValidator.GetUserCODlimitRoutesParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetUserOrderBeneficiariesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getUserOrderBeneficiaries * @summary: Get user order beneficiaries * @description: Retrieve beneficiary details like bank name , ifsc code , branch name associated with a specific order for refund processing - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getUserOrderBeneficiaries/). */ - getUserOrderBeneficiaries({ orderId, requestHeaders }?: PaymentPlatformApplicationValidator.GetUserOrderBeneficiariesParam, { responseHeaders }?: object): Promise; + getUserOrderBeneficiaries({ orderId, requestHeaders }?: PaymentPlatformApplicationValidator.GetUserOrderBeneficiariesParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.InitialisePaymentParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name initialisePayment * @summary: Start payment process * @description: Initiates the payment procedure for an order.Upon successful initiation, it returns a details including the success status, aggregator information, payment method, status, merchant order ID aggregator order , polling URL, timeout, virtual ID, Razorpay payment ID, customer ID, and device ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/initialisePayment/). */ - initialisePayment({ body, requestHeaders }?: PaymentPlatformApplicationValidator.InitialisePaymentParam, { responseHeaders }?: object): Promise; + initialisePayment({ body, requestHeaders }?: PaymentPlatformApplicationValidator.InitialisePaymentParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.MerchantOnBoardingParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name merchantOnBoarding * @summary: Merchant onboarding for BNPL * @description: Initiate the merchant onboarding process for Buy Now Pay Later (BNPL). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/merchantOnBoarding/). */ - merchantOnBoarding({ body, requestHeaders }?: PaymentPlatformApplicationValidator.MerchantOnBoardingParam, { responseHeaders }?: object): Promise; + merchantOnBoarding({ body, requestHeaders }?: PaymentPlatformApplicationValidator.MerchantOnBoardingParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.OauthGetUrlParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name oauthGetUrl * @summary: Get OAuth URL * @description: This has been used when merchant is setup their razorpay payment gateway, they will redirect to razorpay site after submitting all their secrets for authetication. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/oauthGetUrl/). */ - oauthGetUrl({ aggregator, successRedirectUrl, failureRedirectUrl, requestHeaders }?: PaymentPlatformApplicationValidator.OauthGetUrlParam, { responseHeaders }?: object): Promise; + oauthGetUrl({ aggregator, successRedirectUrl, failureRedirectUrl, requestHeaders }?: PaymentPlatformApplicationValidator.OauthGetUrlParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.PatchMerchantAggregatorPaymentModeDetailsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name patchMerchantAggregatorPaymentModeDetails * @summary: Update merchant aggregator payment mode * @description: update payment gateway and it's payment mode and it's sub payment mode details like for razorpay update active/inactive payment modes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/patchMerchantAggregatorPaymentModeDetails/). */ - patchMerchantAggregatorPaymentModeDetails({ aggregatorId, body, requestHeaders }?: PaymentPlatformApplicationValidator.PatchMerchantAggregatorPaymentModeDetailsParam, { responseHeaders }?: object): Promise; + patchMerchantAggregatorPaymentModeDetails({ aggregatorId, body, requestHeaders }?: PaymentPlatformApplicationValidator.PatchMerchantAggregatorPaymentModeDetailsParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.PatchMerchantPaymentOptionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name patchMerchantPaymentOption * @summary: Update payment gateways and payment mode * @description: Updated online/offline payment as active/inactive like disable offline payment mode will disable offline payment modes on checkout page on merchant's website - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/patchMerchantPaymentOption/). */ - patchMerchantPaymentOption({ body, requestHeaders }?: PaymentPlatformApplicationValidator.PatchMerchantPaymentOptionParam, { responseHeaders }?: object): Promise; + patchMerchantPaymentOption({ body, requestHeaders }?: PaymentPlatformApplicationValidator.PatchMerchantPaymentOptionParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.PatchMerchantPaymentOptionVersionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name patchMerchantPaymentOptionVersion * @summary: Update app version for Aggrgator * @description: Update app version required for Payment Mode or sub payment mode for an Aggregator.if merchant required any PG payment mode after certain version for mobile app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/patchMerchantPaymentOptionVersion/). */ - patchMerchantPaymentOptionVersion({ aggregatorId, body, requestHeaders }?: PaymentPlatformApplicationValidator.PatchMerchantPaymentOptionVersionParam, { responseHeaders }?: object): Promise; + patchMerchantPaymentOptionVersion({ aggregatorId, body, requestHeaders }?: PaymentPlatformApplicationValidator.PatchMerchantPaymentOptionVersionParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.PaymentStatusBulkParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name paymentStatusBulk * @summary: Retrieve status of multiple payments in bulk * @description: Retrieve status of multiple payments in bulk and returns the status of each payment along with associated details such as payment ID, amount, currency, status, payment mode, and payment gateway in the response - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/paymentStatusBulk/). */ - paymentStatusBulk({ body, requestHeaders }?: PaymentPlatformApplicationValidator.PaymentStatusBulkParam, { responseHeaders }?: object): Promise; + paymentStatusBulk({ body, requestHeaders }?: PaymentPlatformApplicationValidator.PaymentStatusBulkParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.PollingPaymentLinkParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name pollingPaymentLink * @summary: Poll status of payment link * @description: Periodically checks the status of a payment link to monitor for any updates or changes.retrieve real-time information about the payment link's current status, such as whether it has been processed, cancelled, or expired. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/pollingPaymentLink/). */ - pollingPaymentLink({ paymentLinkId, requestHeaders }?: PaymentPlatformApplicationValidator.PollingPaymentLinkParam, { responseHeaders }?: object): Promise; + pollingPaymentLink({ paymentLinkId, requestHeaders }?: PaymentPlatformApplicationValidator.PollingPaymentLinkParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.RepaymentDetailsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name repaymentDetails * @summary: Repayment details for BNPL * @description: Retrieve repayment details for Buy Now Pay Later (BNPL) payment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/repaymentDetails/). */ - repaymentDetails({ body, requestHeaders }?: PaymentPlatformApplicationValidator.RepaymentDetailsParam, { responseHeaders }?: object): Promise; + repaymentDetails({ body, requestHeaders }?: PaymentPlatformApplicationValidator.RepaymentDetailsParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.ResendOrCancelPaymentParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name resendOrCancelPayment * @summary: Resend or cancel payment * @description: Enable you to perform actions related to the resending and cancellation of payment links through SMS or EMAIL. resend or cancel payment link that have been initiated but may require modification or cancellation for various reasons, ensuring flexibility and control in payment processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/resendOrCancelPayment/). */ - resendOrCancelPayment({ body, requestHeaders }?: PaymentPlatformApplicationValidator.ResendOrCancelPaymentParam, { responseHeaders }?: object): Promise; + resendOrCancelPayment({ body, requestHeaders }?: PaymentPlatformApplicationValidator.ResendOrCancelPaymentParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.ResendPaymentLinkParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name resendPaymentLink * @summary: Resend payment link * @description: Resends an existing payment link to the user to complete the payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/resendPaymentLink/). */ - resendPaymentLink({ body, requestHeaders }?: PaymentPlatformApplicationValidator.ResendPaymentLinkParam, { responseHeaders }?: object): Promise; + resendPaymentLink({ body, requestHeaders }?: PaymentPlatformApplicationValidator.ResendPaymentLinkParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.RevokeOauthTokenParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -523,13 +529,13 @@ declare class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name setMerchantModeControlRoutes * @summary: Update offline payment mode * @description: Update offline payment mode details for the merchant like update for cod offline payment mode get user level cod limit, order level cod limit, cod charge, enable/disable device for cod. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/setMerchantModeControlRoutes/). */ - setMerchantModeControlRoutes({ mode, body, requestHeaders }?: PaymentPlatformApplicationValidator.SetMerchantModeControlRoutesParam, { responseHeaders }?: object): Promise; + setMerchantModeControlRoutes({ mode, body, requestHeaders }?: PaymentPlatformApplicationValidator.SetMerchantModeControlRoutesParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.SetPaymentModeCustomConfigParam} arg * - Arg object @@ -550,71 +556,77 @@ declare class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name setUserCODlimitRoutes * @summary: Set user COD * @description: This allows access to seller to enable disable cod of specific user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/setUserCODlimitRoutes/). */ - setUserCODlimitRoutes({ body, requestHeaders }?: PaymentPlatformApplicationValidator.SetUserCODlimitRoutesParam, { responseHeaders }?: object): Promise; + setUserCODlimitRoutes({ body, requestHeaders }?: PaymentPlatformApplicationValidator.SetUserCODlimitRoutesParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.UpdateEdcDeviceParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateEdcDevice * @summary: Update EDC device * @description: Enables the modification of settings and details associated with an Electronic Data Capture (EDC) device linked to a specific application within a company. Upon success, it returns the updated information of the EDC device. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updateEdcDevice/). */ - updateEdcDevice({ body, requestHeaders }?: PaymentPlatformApplicationValidator.UpdateEdcDeviceParam, { responseHeaders }?: object): Promise; + updateEdcDevice({ body, requestHeaders }?: PaymentPlatformApplicationValidator.UpdateEdcDeviceParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.UpdateMerchantRefundPriorityParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} + * - Success response + * * @name updateMerchantRefundPriority * @summary: Update merchant refund priority * @description: Update merchant refund priority configurations, with the provided refund sources priority details, and return the status of the operation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updateMerchantRefundPriority/). */ - updateMerchantRefundPriority({ configType, body, requestHeaders }?: PaymentPlatformApplicationValidator.UpdateMerchantRefundPriorityParam, { responseHeaders }?: object): Promise; + updateMerchantRefundPriority({ configType, body, requestHeaders }?: PaymentPlatformApplicationValidator.UpdateMerchantRefundPriorityParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.UpdatePaymentSessionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name updatePaymentSession * @summary: Update payment session * @description: Update the details of a payment session associated with a given order ID or transaction ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updatePaymentSession/). */ - updatePaymentSession({ gid, body, requestHeaders }?: PaymentPlatformApplicationValidator.UpdatePaymentSessionParam, { responseHeaders }?: object): Promise; + updatePaymentSession({ gid, body, requestHeaders }?: PaymentPlatformApplicationValidator.UpdatePaymentSessionParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.UpdateRefundSessionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} + * - Success response + * * @name updateRefundSession * @summary: Update refund session * @description: Allows users to update the details of a refund session associated with a specific global identifier (GID) and request ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updateRefundSession/). */ - updateRefundSession({ gid, requestId, body, requestHeaders }?: PaymentPlatformApplicationValidator.UpdateRefundSessionParam, { responseHeaders }?: object): Promise; + updateRefundSession({ gid, requestId, body, requestHeaders }?: PaymentPlatformApplicationValidator.UpdateRefundSessionParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.VerifyCustomerForPaymentParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name verifyCustomerForPayment * @summary: Validate customer for paylater * @description: Verify whether the user is eligible for pay-later payment from the payment aggregator's side using the customer's phone number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/verifyCustomerForPayment/). */ - verifyCustomerForPayment({ body, requestHeaders }?: PaymentPlatformApplicationValidator.VerifyCustomerForPaymentParam, { responseHeaders }?: object): Promise; + verifyCustomerForPayment({ body, requestHeaders }?: PaymentPlatformApplicationValidator.VerifyCustomerForPaymentParam, { responseHeaders }?: object): Promise; } import PaymentPlatformApplicationValidator = require("./PaymentPlatformApplicationValidator"); import PaymentPlatformModel = require("./PaymentPlatformModel"); diff --git a/sdk/platform/Payment/PaymentPlatformApplicationClient.js b/sdk/platform/Payment/PaymentPlatformApplicationClient.js index c506f547b..c12703274 100644 --- a/sdk/platform/Payment/PaymentPlatformApplicationClient.js +++ b/sdk/platform/Payment/PaymentPlatformApplicationClient.js @@ -19,7 +19,7 @@ class Payment { * @param {PaymentPlatformApplicationValidator.AddEdcDeviceParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addEdcDevice * @summary: Create an EDC device * @description: Registration and addition of a new EDC device to the system - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/addEdcDevice/). @@ -77,7 +77,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.EdcDeviceUpdateDetails().validate(responseData, { + } = PaymentPlatformModel.EdcDeviceUpdateResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -102,7 +102,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name addRefundBankAccountUsingOTP * @summary: Create refund account * @description: The addition of a bank account specifically for refunds, employing OTP verification for security - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/addRefundBankAccountUsingOTP/). @@ -158,7 +158,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.RefundAccountDetails().validate(responseData, { + } = PaymentPlatformModel.RefundAccountResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -183,7 +183,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name cancelPaymentLink * @summary: Cancel payment link @@ -240,10 +240,10 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.CancelPaymentLinkDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = PaymentPlatformModel.CancelPaymentLinkResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -265,7 +265,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name checkAndUpdatePaymentStatus * @summary: Poll and update payment status @@ -322,7 +322,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PaymentStatusUpdateDetails().validate( + } = PaymentPlatformModel.PaymentStatusUpdateResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -345,7 +345,7 @@ class Payment { * @param {PaymentPlatformApplicationValidator.ConfirmPaymentParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name confirmPayment * @summary: Payment confirmation @@ -402,7 +402,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PaymentConfirmationDetails().validate( + } = PaymentPlatformModel.PaymentConfirmationResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -427,7 +427,9 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} + * - Success response + * * @name createMerchantRefundPriority * @summary: Create merchant refund priority * @description: Create merchant refund priority configurations, with the provided refund sources priority details, and return the status of the operation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/createMerchantRefundPriority/). @@ -485,10 +487,10 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.RefundPriorityDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = PaymentPlatformModel.RefundPriorityResponseSerializer().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -510,7 +512,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name createPaymentLink * @summary: Create payment link @@ -567,10 +569,10 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.CreatePaymentLinkDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = PaymentPlatformModel.CreatePaymentLinkResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -592,7 +594,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createPaymentOrder * @summary: Create Order * @description: Create an order and payment on the aggregator side - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/createPaymentOrder/). @@ -648,7 +650,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PaymentOrderDetails().validate(responseData, { + } = PaymentPlatformModel.PaymentOrderResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -673,7 +675,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name edcAggregatorsAndModelList @@ -727,7 +729,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.EdcAggregatorAndModelListDetails().validate( + } = PaymentPlatformModel.EdcAggregatorAndModelListResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -750,7 +752,7 @@ class Payment { * @param {PaymentPlatformApplicationValidator.EdcDeviceListParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name edcDeviceList * @summary: List EDC devices * @description: Retrieves a list of available Electronic Data Capture (EDC) devices. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/edcDeviceList/). @@ -821,7 +823,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.EdcDeviceListDetails().validate(responseData, { + } = PaymentPlatformModel.EdcDeviceListResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -844,7 +846,7 @@ class Payment { * @param {PaymentPlatformApplicationValidator.EdcDeviceStatsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name edcDeviceStats * @summary: EDC device stats * @description: Information about EDC (Electronic Data Capture) devices linked to a specific application within a company. It provides statistics such as the count of active and inactive devices. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/edcDeviceStats/). @@ -896,7 +898,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.EdcDeviceStatsDetails().validate(responseData, { + } = PaymentPlatformModel.EdcDeviceStatsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -921,7 +923,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getBankAccountDetailsOpenAPI * @summary: Get bank account details * @description: Retrieve bank account information - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getBankAccountDetailsOpenAPI/). @@ -983,7 +985,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.RefundAccountDetails().validate(responseData, { + } = PaymentPlatformModel.RefundAccountResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1008,7 +1010,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getBrandPaymentGatewayConfig * @summary: Get secrets for brand payment gateway @@ -1069,7 +1071,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PaymentGatewayConfigDetails().validate( + } = PaymentPlatformModel.PaymentGatewayConfigResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1092,7 +1094,8 @@ class Payment { * @param {PaymentPlatformApplicationValidator.GetEdcDeviceParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name getEdcDevice * @summary: Get an EDC device * @description: Retrieve comprehensive details regarding an Electronic Data Capture (EDC) device associated with a particular terminal unique identifier within a company's application.Upon success, it returns the detailed information of the EDC device, including terminal serial number, EDC device serial number, merchant store POS code, store ID, aggregator ID and name, device tag, activation status, and EDC model. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getEdcDevice/). @@ -1148,7 +1151,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.EdcDeviceDetails().validate(responseData, { + } = PaymentPlatformModel.EdcDeviceDetailsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1173,7 +1176,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getMerchantAggregatorAppVersion * @summary: Get app version for Aggregator @@ -1249,10 +1252,10 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.AggregatorVersionDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = PaymentPlatformModel.AggregatorVersionResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1274,7 +1277,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getMerchantAggregatorPaymentModeDetails * @summary: Get merchant aggregator and their payment mode @@ -1339,7 +1342,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PlatformPaymentModeDetails().validate( + } = PaymentPlatformModel.PlatformPaymentModeResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1364,7 +1367,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getMerchantPaymentOption * @summary: Get merchant payment option @@ -1417,7 +1420,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PlatformPaymentModeDetails().validate( + } = PaymentPlatformModel.PlatformPaymentModeResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1442,7 +1445,9 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} + * - Success response + * * @name getMerchantRefundPriority * @summary: Get merchant refund priority * @description: Retrieve merchant refund priority configurations, returning the status of the update and the refund sources priority with their descriptions and priorities. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getMerchantRefundPriority/). @@ -1498,10 +1503,10 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.RefundPriorityDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = PaymentPlatformModel.RefundPriorityResponseSerializer().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1523,7 +1528,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getPGConfigAggregators * @summary: Get merchant aggregator payment mode @@ -1576,7 +1581,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PlatformPaymentModeDetails().validate( + } = PaymentPlatformModel.PlatformPaymentModeResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1601,7 +1606,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPaymentCodeOption * @summary: Get payment mode codes * @description: Enables users to retrieve options for payment codes.users can access information such as payment method names, networks, and associated codes, facilitating seamless integration and management of payment modes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentCodeOption/). @@ -1653,7 +1658,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.GetPaymentCodeDetails().validate(responseData, { + } = PaymentPlatformModel.GetPaymentCodeResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1676,7 +1681,7 @@ class Payment { * @param {PaymentPlatformApplicationValidator.GetPaymentLinkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPaymentLink * @summary: Get payment link * @description: Retrieve a payment link for making payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentLink/). @@ -1733,7 +1738,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.GetPaymentLinkDetails().validate(responseData, { + } = PaymentPlatformModel.GetPaymentLinkResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1758,7 +1763,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getPaymentModeControlRoutes * @summary: Get offline/advance payment mode @@ -1815,7 +1820,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PlatformPaymentModeDetails().validate( + } = PaymentPlatformModel.PlatformPaymentModeResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1923,7 +1928,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getPaymentModeRoutes * @summary: Get payment modes * @description: Get available payment methods on the payment page, specifying the aggregator for each option, such as 'Netbanking powered by Juspay' and 'Card powered by Razorpay'. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentModeRoutes/). @@ -1994,7 +1999,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PaymentOptionsDetails().validate(responseData, { + } = PaymentPlatformModel.PaymentOptionsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2019,7 +2024,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getPaymentSession * @summary: Get payment session @@ -2079,10 +2084,10 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PaymentSessionFetchDetails().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = PaymentPlatformModel.PaymentSessionSerializer().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2104,7 +2109,8 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name getPosPaymentModeRoutes * @summary: List POS payment modes * @description: Available payment methods on the payment page for POS, specifying the aggregator for each option, such as 'CARD powered by Juspay' and 'QR powered by Razorpay'. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPosPaymentModeRoutes/). @@ -2208,7 +2214,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PaymentModeRouteDetails().validate(responseData, { + } = PaymentPlatformModel.PaymentModeRouteResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2233,7 +2239,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getUserBeneficiaries * @summary: Get user beneficiaries @@ -2287,10 +2293,10 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.OrderBeneficiaryFetchResults().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = PaymentPlatformModel.OrderBeneficiaryResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2312,7 +2318,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getUserCODlimitRoutes * @summary: Get user COD * @description: Retrieve user cod limt data of user i.e cod is active or not for user and remaining limit - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getUserCODlimitRoutes/). @@ -2372,7 +2378,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.GetUserCODLimitDetails().validate(responseData, { + } = PaymentPlatformModel.GetUserCODLimitResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2397,7 +2403,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getUserOrderBeneficiaries * @summary: Get user order beneficiaries @@ -2451,10 +2457,10 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.OrderBeneficiaryFetchResults().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = PaymentPlatformModel.OrderBeneficiaryResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2476,7 +2482,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name initialisePayment * @summary: Start payment process @@ -2533,7 +2539,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PaymentInitializationDetails().validate( + } = PaymentPlatformModel.PaymentInitializationResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -2558,7 +2564,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name merchantOnBoarding * @summary: Merchant onboarding for BNPL @@ -2615,7 +2621,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.MerchantOnBoardingDetails().validate( + } = PaymentPlatformModel.MerchantOnBoardingResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -2638,7 +2644,7 @@ class Payment { * @param {PaymentPlatformApplicationValidator.OauthGetUrlParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name oauthGetUrl * @summary: Get OAuth URL * @description: This has been used when merchant is setup their razorpay payment gateway, they will redirect to razorpay site after submitting all their secrets for authetication. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/oauthGetUrl/). @@ -2702,7 +2708,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.GetOauthUrlDetails().validate(responseData, { + } = PaymentPlatformModel.GetOauthUrlResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2727,7 +2733,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name patchMerchantAggregatorPaymentModeDetails * @summary: Update merchant aggregator payment mode @@ -2786,7 +2792,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PlatformPaymentModeDetails().validate( + } = PaymentPlatformModel.PlatformPaymentModeResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -2811,7 +2817,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name patchMerchantPaymentOption * @summary: Update payment gateways and payment mode @@ -2868,7 +2874,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PlatformPaymentModeDetails().validate( + } = PaymentPlatformModel.PlatformPaymentModeResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -2893,7 +2899,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name patchMerchantPaymentOptionVersion * @summary: Update app version for Aggrgator @@ -2952,7 +2958,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PlatformPaymentModeDetails().validate( + } = PaymentPlatformModel.PlatformPaymentModeResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -2977,7 +2983,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name paymentStatusBulk @@ -3035,7 +3041,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PaymentStatusBulkHandlerDetails().validate( + } = PaymentPlatformModel.PaymentStatusBulkHandlerResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3060,7 +3066,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name pollingPaymentLink * @summary: Poll status of payment link @@ -3118,7 +3124,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PollingPaymentLinkDetails().validate( + } = PaymentPlatformModel.PollingPaymentLinkResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3141,7 +3147,7 @@ class Payment { * @param {PaymentPlatformApplicationValidator.RepaymentDetailsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name repaymentDetails * @summary: Repayment details for BNPL * @description: Retrieve repayment details for Buy Now Pay Later (BNPL) payment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/repaymentDetails/). @@ -3197,7 +3203,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.RepaymentDetails().validate(responseData, { + } = PaymentPlatformModel.RepaymentResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3222,7 +3228,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name resendOrCancelPayment * @summary: Resend or cancel payment @@ -3279,7 +3285,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.ResendOrCancelPaymentDetails().validate( + } = PaymentPlatformModel.ResendOrCancelPaymentResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3304,7 +3310,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name resendPaymentLink * @summary: Resend payment link @@ -3361,10 +3367,10 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.ResendPaymentLinkDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = PaymentPlatformModel.ResendPaymentLinkResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -3547,7 +3553,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name setMerchantModeControlRoutes * @summary: Update offline payment mode @@ -3606,7 +3612,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PlatformPaymentModeDetails().validate( + } = PaymentPlatformModel.PlatformPaymentModeResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -3716,7 +3722,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name setUserCODlimitRoutes * @summary: Set user COD * @description: This allows access to seller to enable disable cod of specific user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/setUserCODlimitRoutes/). @@ -3772,7 +3778,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.SetCODOptionDetails().validate(responseData, { + } = PaymentPlatformModel.SetCODOptionResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3795,7 +3801,7 @@ class Payment { * @param {PaymentPlatformApplicationValidator.UpdateEdcDeviceParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateEdcDevice * @summary: Update EDC device * @description: Enables the modification of settings and details associated with an Electronic Data Capture (EDC) device linked to a specific application within a company. Upon success, it returns the updated information of the EDC device. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updateEdcDevice/). @@ -3851,7 +3857,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.EdcDeviceAddDetails().validate(responseData, { + } = PaymentPlatformModel.EdcDeviceAddResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3876,7 +3882,9 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} + * - Success response + * * @name updateMerchantRefundPriority * @summary: Update merchant refund priority * @description: Update merchant refund priority configurations, with the provided refund sources priority details, and return the status of the operation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updateMerchantRefundPriority/). @@ -3934,10 +3942,10 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.RefundPriorityDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = PaymentPlatformModel.RefundPriorityResponseSerializer().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -3959,8 +3967,9 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name updatePaymentSession * @summary: Update payment session * @description: Update the details of a payment session associated with a given order ID or transaction ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updatePaymentSession/). @@ -4018,10 +4027,10 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PaymentSessionPutDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = PaymentPlatformModel.PaymentSessionResponseSerializer().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4043,7 +4052,9 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} + * - Success response + * * @name updateRefundSession * @summary: Update refund session * @description: Allows users to update the details of a refund session associated with a specific global identifier (GID) and request ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updateRefundSession/). @@ -4103,10 +4114,10 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.RefundSessionDetails().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = PaymentPlatformModel.RefundSessionResponseSerializer().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4128,7 +4139,8 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name verifyCustomerForPayment * @summary: Validate customer for paylater * @description: Verify whether the user is eligible for pay-later payment from the payment aggregator's side using the customer's phone number - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/verifyCustomerForPayment/). @@ -4184,7 +4196,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.ValidateCustomerDetails().validate(responseData, { + } = PaymentPlatformModel.ValidateCustomerResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts b/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts index 126af666a..b8f7c25fe 100644 --- a/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +++ b/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts @@ -2,36 +2,36 @@ export = PaymentPlatformApplicationValidator; /** * @typedef AddEdcDeviceParam * @property {string} terminalUniqueIdentifier - Terminal unique identifier - * @property {PaymentPlatformModel.EdcUpdate} body + * @property {PaymentPlatformModel.EdcUpdateRequest} body */ /** * @typedef AddRefundBankAccountUsingOTPParam - * @property {PaymentPlatformModel.AddBeneficiaryDetailsOTPCreation} body + * @property {PaymentPlatformModel.AddBeneficiaryDetailsOTPRequest} body */ /** * @typedef CancelPaymentLinkParam - * @property {PaymentPlatformModel.CancelOrResendPaymentLinkCreation} body + * @property {PaymentPlatformModel.CancelOrResendPaymentLinkRequest} body */ /** * @typedef CheckAndUpdatePaymentStatusParam - * @property {PaymentPlatformModel.PaymentStatusUpdateCreation} body + * @property {PaymentPlatformModel.PaymentStatusUpdateRequest} body */ /** * @typedef ConfirmPaymentParam - * @property {PaymentPlatformModel.PaymentConfirmationCreation} body + * @property {PaymentPlatformModel.PaymentConfirmationRequest} body */ /** * @typedef CreateMerchantRefundPriorityParam * @property {string} configType - Configuration for merchant or customer - * @property {PaymentPlatformModel.RefundPriorityCreation} body + * @property {PaymentPlatformModel.RefundPriorityRequestSerializer} body */ /** * @typedef CreatePaymentLinkParam - * @property {PaymentPlatformModel.CreatePaymentLinkCreation} body + * @property {PaymentPlatformModel.CreatePaymentLinkRequest} body */ /** * @typedef CreatePaymentOrderParam - * @property {PaymentPlatformModel.PaymentOrderCreation} body + * @property {PaymentPlatformModel.PaymentOrderRequest} body */ /** @typedef EdcAggregatorsAndModelListParam */ /** @@ -146,11 +146,11 @@ export = PaymentPlatformApplicationValidator; */ /** * @typedef InitialisePaymentParam - * @property {PaymentPlatformModel.PaymentInitializationCreation} body + * @property {PaymentPlatformModel.PaymentInitializationRequest} body */ /** * @typedef MerchantOnBoardingParam - * @property {PaymentPlatformModel.MerchantOnBoardingCreation} body + * @property {PaymentPlatformModel.MerchantOnBoardingRequest} body */ /** * @typedef OauthGetUrlParam @@ -161,20 +161,20 @@ export = PaymentPlatformApplicationValidator; /** * @typedef PatchMerchantAggregatorPaymentModeDetailsParam * @property {number} aggregatorId - Aggregators Id - * @property {PaymentPlatformModel.PlatformPaymentModeDetails} body + * @property {PaymentPlatformModel.PlatformPaymentModeResponse} body */ /** * @typedef PatchMerchantPaymentOptionParam - * @property {PaymentPlatformModel.MerchnatPaymentModeCreation} body + * @property {PaymentPlatformModel.MerchnatPaymentModeRequest} body */ /** * @typedef PatchMerchantPaymentOptionVersionParam * @property {number} aggregatorId - Aggregators Id - * @property {PaymentPlatformModel.PatchAggregatorControl} body + * @property {PaymentPlatformModel.AggregatorControlRequest} body */ /** * @typedef PaymentStatusBulkParam - * @property {PaymentPlatformModel.PaymentStatusBulkHandlerCreation} body + * @property {PaymentPlatformModel.PaymentStatusBulkHandlerRequest} body */ /** * @typedef PollingPaymentLinkParam @@ -186,11 +186,11 @@ export = PaymentPlatformApplicationValidator; */ /** * @typedef ResendOrCancelPaymentParam - * @property {PaymentPlatformModel.ResendOrCancelPaymentCreation} body + * @property {PaymentPlatformModel.ResendOrCancelPaymentRequest} body */ /** * @typedef ResendPaymentLinkParam - * @property {PaymentPlatformModel.CancelOrResendPaymentLinkCreation} body + * @property {PaymentPlatformModel.CancelOrResendPaymentLinkRequest} body */ /** * @typedef RevokeOauthTokenParam @@ -198,12 +198,12 @@ export = PaymentPlatformApplicationValidator; */ /** * @typedef SaveBrandPaymentGatewayConfigParam - * @property {PaymentPlatformModel.PaymentGatewayConfigCreation} body + * @property {PaymentPlatformModel.PaymentGatewayConfigRequest} body */ /** * @typedef SetMerchantModeControlRoutesParam * @property {string} mode - Offline / advance payment mode - * @property {PaymentPlatformModel.MerchantPaymentModeCreation} body + * @property {PaymentPlatformModel.MerchantPaymentModeRequest} body */ /** * @typedef SetPaymentModeCustomConfigParam @@ -212,23 +212,23 @@ export = PaymentPlatformApplicationValidator; */ /** * @typedef SetUserCODlimitRoutesParam - * @property {PaymentPlatformModel.SetCODForUserCreation} body + * @property {PaymentPlatformModel.SetCODForUserRequest} body */ /** * @typedef UpdateEdcDeviceParam - * @property {PaymentPlatformModel.EdcAddCreation} body + * @property {PaymentPlatformModel.EdcAddRequest} body */ /** * @typedef UpdateMerchantRefundPriorityParam * @property {string} configType - Configuration for merchant or customer - * @property {PaymentPlatformModel.RefundPriorityCreation} body + * @property {PaymentPlatformModel.RefundPriorityRequestSerializer} body */ /** * @typedef UpdatePaymentSessionParam * @property {string} gid - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by * Fynd payments platform and is unique. - * @property {PaymentPlatformModel.PaymentSessionCreation} body + * @property {PaymentPlatformModel.PaymentSessionRequestSerializer} body */ /** * @typedef UpdateRefundSessionParam @@ -237,11 +237,11 @@ export = PaymentPlatformApplicationValidator; * Fynd payments platform and is unique. * @property {string} requestId - A unique id that was used to initiate a refund * session. This is generated by Fynd platform and is usually shipment_id. - * @property {PaymentPlatformModel.RefundSessionCreation} body + * @property {PaymentPlatformModel.RefundSessionRequestSerializer} body */ /** * @typedef VerifyCustomerForPaymentParam - * @property {PaymentPlatformModel.ValidateCustomerCreation} body + * @property {PaymentPlatformModel.ValidateCustomerRequest} body */ declare class PaymentPlatformApplicationValidator { /** @returns {AddEdcDeviceParam} */ @@ -353,32 +353,32 @@ type AddEdcDeviceParam = { * - Terminal unique identifier */ terminalUniqueIdentifier: string; - body: PaymentPlatformModel.EdcUpdate; + body: PaymentPlatformModel.EdcUpdateRequest; }; type AddRefundBankAccountUsingOTPParam = { - body: PaymentPlatformModel.AddBeneficiaryDetailsOTPCreation; + body: PaymentPlatformModel.AddBeneficiaryDetailsOTPRequest; }; type CancelPaymentLinkParam = { - body: PaymentPlatformModel.CancelOrResendPaymentLinkCreation; + body: PaymentPlatformModel.CancelOrResendPaymentLinkRequest; }; type CheckAndUpdatePaymentStatusParam = { - body: PaymentPlatformModel.PaymentStatusUpdateCreation; + body: PaymentPlatformModel.PaymentStatusUpdateRequest; }; type ConfirmPaymentParam = { - body: PaymentPlatformModel.PaymentConfirmationCreation; + body: PaymentPlatformModel.PaymentConfirmationRequest; }; type CreateMerchantRefundPriorityParam = { /** * - Configuration for merchant or customer */ configType: string; - body: PaymentPlatformModel.RefundPriorityCreation; + body: PaymentPlatformModel.RefundPriorityRequestSerializer; }; type CreatePaymentLinkParam = { - body: PaymentPlatformModel.CreatePaymentLinkCreation; + body: PaymentPlatformModel.CreatePaymentLinkRequest; }; type CreatePaymentOrderParam = { - body: PaymentPlatformModel.PaymentOrderCreation; + body: PaymentPlatformModel.PaymentOrderRequest; }; type EdcDeviceListParam = { pageNo?: number; @@ -543,10 +543,10 @@ type GetUserOrderBeneficiariesParam = { orderId: string; }; type InitialisePaymentParam = { - body: PaymentPlatformModel.PaymentInitializationCreation; + body: PaymentPlatformModel.PaymentInitializationRequest; }; type MerchantOnBoardingParam = { - body: PaymentPlatformModel.MerchantOnBoardingCreation; + body: PaymentPlatformModel.MerchantOnBoardingRequest; }; type OauthGetUrlParam = { /** @@ -561,20 +561,20 @@ type PatchMerchantAggregatorPaymentModeDetailsParam = { * - Aggregators Id */ aggregatorId: number; - body: PaymentPlatformModel.PlatformPaymentModeDetails; + body: PaymentPlatformModel.PlatformPaymentModeResponse; }; type PatchMerchantPaymentOptionParam = { - body: PaymentPlatformModel.MerchnatPaymentModeCreation; + body: PaymentPlatformModel.MerchnatPaymentModeRequest; }; type PatchMerchantPaymentOptionVersionParam = { /** * - Aggregators Id */ aggregatorId: number; - body: PaymentPlatformModel.PatchAggregatorControl; + body: PaymentPlatformModel.AggregatorControlRequest; }; type PaymentStatusBulkParam = { - body: PaymentPlatformModel.PaymentStatusBulkHandlerCreation; + body: PaymentPlatformModel.PaymentStatusBulkHandlerRequest; }; type PollingPaymentLinkParam = { paymentLinkId: string; @@ -583,10 +583,10 @@ type RepaymentDetailsParam = { body: PaymentPlatformModel.RepaymentDetailsSerialiserPayAll; }; type ResendOrCancelPaymentParam = { - body: PaymentPlatformModel.ResendOrCancelPaymentCreation; + body: PaymentPlatformModel.ResendOrCancelPaymentRequest; }; type ResendPaymentLinkParam = { - body: PaymentPlatformModel.CancelOrResendPaymentLinkCreation; + body: PaymentPlatformModel.CancelOrResendPaymentLinkRequest; }; type RevokeOauthTokenParam = { /** @@ -595,14 +595,14 @@ type RevokeOauthTokenParam = { aggregator: string; }; type SaveBrandPaymentGatewayConfigParam = { - body: PaymentPlatformModel.PaymentGatewayConfigCreation; + body: PaymentPlatformModel.PaymentGatewayConfigRequest; }; type SetMerchantModeControlRoutesParam = { /** * - Offline / advance payment mode */ mode: string; - body: PaymentPlatformModel.MerchantPaymentModeCreation; + body: PaymentPlatformModel.MerchantPaymentModeRequest; }; type SetPaymentModeCustomConfigParam = { /** @@ -612,17 +612,17 @@ type SetPaymentModeCustomConfigParam = { body: PaymentPlatformModel.PaymentCustomConfigRequestSchema; }; type SetUserCODlimitRoutesParam = { - body: PaymentPlatformModel.SetCODForUserCreation; + body: PaymentPlatformModel.SetCODForUserRequest; }; type UpdateEdcDeviceParam = { - body: PaymentPlatformModel.EdcAddCreation; + body: PaymentPlatformModel.EdcAddRequest; }; type UpdateMerchantRefundPriorityParam = { /** * - Configuration for merchant or customer */ configType: string; - body: PaymentPlatformModel.RefundPriorityCreation; + body: PaymentPlatformModel.RefundPriorityRequestSerializer; }; type UpdatePaymentSessionParam = { /** @@ -631,7 +631,7 @@ type UpdatePaymentSessionParam = { * Fynd payments platform and is unique. */ gid: string; - body: PaymentPlatformModel.PaymentSessionCreation; + body: PaymentPlatformModel.PaymentSessionRequestSerializer; }; type UpdateRefundSessionParam = { /** @@ -645,10 +645,10 @@ type UpdateRefundSessionParam = { * session. This is generated by Fynd platform and is usually shipment_id. */ requestId: string; - body: PaymentPlatformModel.RefundSessionCreation; + body: PaymentPlatformModel.RefundSessionRequestSerializer; }; type VerifyCustomerForPaymentParam = { - body: PaymentPlatformModel.ValidateCustomerCreation; + body: PaymentPlatformModel.ValidateCustomerRequest; }; type EdcAggregatorsAndModelListParam = any; type EdcDeviceStatsParam = any; diff --git a/sdk/platform/Payment/PaymentPlatformApplicationValidator.js b/sdk/platform/Payment/PaymentPlatformApplicationValidator.js index 809a15ef8..5bb365a55 100644 --- a/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +++ b/sdk/platform/Payment/PaymentPlatformApplicationValidator.js @@ -5,43 +5,43 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); /** * @typedef AddEdcDeviceParam * @property {string} terminalUniqueIdentifier - Terminal unique identifier - * @property {PaymentPlatformModel.EdcUpdate} body + * @property {PaymentPlatformModel.EdcUpdateRequest} body */ /** * @typedef AddRefundBankAccountUsingOTPParam - * @property {PaymentPlatformModel.AddBeneficiaryDetailsOTPCreation} body + * @property {PaymentPlatformModel.AddBeneficiaryDetailsOTPRequest} body */ /** * @typedef CancelPaymentLinkParam - * @property {PaymentPlatformModel.CancelOrResendPaymentLinkCreation} body + * @property {PaymentPlatformModel.CancelOrResendPaymentLinkRequest} body */ /** * @typedef CheckAndUpdatePaymentStatusParam - * @property {PaymentPlatformModel.PaymentStatusUpdateCreation} body + * @property {PaymentPlatformModel.PaymentStatusUpdateRequest} body */ /** * @typedef ConfirmPaymentParam - * @property {PaymentPlatformModel.PaymentConfirmationCreation} body + * @property {PaymentPlatformModel.PaymentConfirmationRequest} body */ /** * @typedef CreateMerchantRefundPriorityParam * @property {string} configType - Configuration for merchant or customer - * @property {PaymentPlatformModel.RefundPriorityCreation} body + * @property {PaymentPlatformModel.RefundPriorityRequestSerializer} body */ /** * @typedef CreatePaymentLinkParam - * @property {PaymentPlatformModel.CreatePaymentLinkCreation} body + * @property {PaymentPlatformModel.CreatePaymentLinkRequest} body */ /** * @typedef CreatePaymentOrderParam - * @property {PaymentPlatformModel.PaymentOrderCreation} body + * @property {PaymentPlatformModel.PaymentOrderRequest} body */ /** @typedef EdcAggregatorsAndModelListParam */ @@ -178,12 +178,12 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); /** * @typedef InitialisePaymentParam - * @property {PaymentPlatformModel.PaymentInitializationCreation} body + * @property {PaymentPlatformModel.PaymentInitializationRequest} body */ /** * @typedef MerchantOnBoardingParam - * @property {PaymentPlatformModel.MerchantOnBoardingCreation} body + * @property {PaymentPlatformModel.MerchantOnBoardingRequest} body */ /** @@ -196,23 +196,23 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); /** * @typedef PatchMerchantAggregatorPaymentModeDetailsParam * @property {number} aggregatorId - Aggregators Id - * @property {PaymentPlatformModel.PlatformPaymentModeDetails} body + * @property {PaymentPlatformModel.PlatformPaymentModeResponse} body */ /** * @typedef PatchMerchantPaymentOptionParam - * @property {PaymentPlatformModel.MerchnatPaymentModeCreation} body + * @property {PaymentPlatformModel.MerchnatPaymentModeRequest} body */ /** * @typedef PatchMerchantPaymentOptionVersionParam * @property {number} aggregatorId - Aggregators Id - * @property {PaymentPlatformModel.PatchAggregatorControl} body + * @property {PaymentPlatformModel.AggregatorControlRequest} body */ /** * @typedef PaymentStatusBulkParam - * @property {PaymentPlatformModel.PaymentStatusBulkHandlerCreation} body + * @property {PaymentPlatformModel.PaymentStatusBulkHandlerRequest} body */ /** @@ -227,12 +227,12 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); /** * @typedef ResendOrCancelPaymentParam - * @property {PaymentPlatformModel.ResendOrCancelPaymentCreation} body + * @property {PaymentPlatformModel.ResendOrCancelPaymentRequest} body */ /** * @typedef ResendPaymentLinkParam - * @property {PaymentPlatformModel.CancelOrResendPaymentLinkCreation} body + * @property {PaymentPlatformModel.CancelOrResendPaymentLinkRequest} body */ /** @@ -242,13 +242,13 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); /** * @typedef SaveBrandPaymentGatewayConfigParam - * @property {PaymentPlatformModel.PaymentGatewayConfigCreation} body + * @property {PaymentPlatformModel.PaymentGatewayConfigRequest} body */ /** * @typedef SetMerchantModeControlRoutesParam * @property {string} mode - Offline / advance payment mode - * @property {PaymentPlatformModel.MerchantPaymentModeCreation} body + * @property {PaymentPlatformModel.MerchantPaymentModeRequest} body */ /** @@ -259,18 +259,18 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); /** * @typedef SetUserCODlimitRoutesParam - * @property {PaymentPlatformModel.SetCODForUserCreation} body + * @property {PaymentPlatformModel.SetCODForUserRequest} body */ /** * @typedef UpdateEdcDeviceParam - * @property {PaymentPlatformModel.EdcAddCreation} body + * @property {PaymentPlatformModel.EdcAddRequest} body */ /** * @typedef UpdateMerchantRefundPriorityParam * @property {string} configType - Configuration for merchant or customer - * @property {PaymentPlatformModel.RefundPriorityCreation} body + * @property {PaymentPlatformModel.RefundPriorityRequestSerializer} body */ /** @@ -278,7 +278,7 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); * @property {string} gid - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by * Fynd payments platform and is unique. - * @property {PaymentPlatformModel.PaymentSessionCreation} body + * @property {PaymentPlatformModel.PaymentSessionRequestSerializer} body */ /** @@ -288,12 +288,12 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); * Fynd payments platform and is unique. * @property {string} requestId - A unique id that was used to initiate a refund * session. This is generated by Fynd platform and is usually shipment_id. - * @property {PaymentPlatformModel.RefundSessionCreation} body + * @property {PaymentPlatformModel.RefundSessionRequestSerializer} body */ /** * @typedef VerifyCustomerForPaymentParam - * @property {PaymentPlatformModel.ValidateCustomerCreation} body + * @property {PaymentPlatformModel.ValidateCustomerRequest} body */ class PaymentPlatformApplicationValidator { @@ -301,35 +301,35 @@ class PaymentPlatformApplicationValidator { static addEdcDevice() { return Joi.object({ terminalUniqueIdentifier: Joi.string().allow("").required(), - body: PaymentPlatformModel.EdcUpdate().required(), + body: PaymentPlatformModel.EdcUpdateRequest().required(), }).required(); } /** @returns {AddRefundBankAccountUsingOTPParam} */ static addRefundBankAccountUsingOTP() { return Joi.object({ - body: PaymentPlatformModel.AddBeneficiaryDetailsOTPCreation().required(), + body: PaymentPlatformModel.AddBeneficiaryDetailsOTPRequest().required(), }).required(); } /** @returns {CancelPaymentLinkParam} */ static cancelPaymentLink() { return Joi.object({ - body: PaymentPlatformModel.CancelOrResendPaymentLinkCreation().required(), + body: PaymentPlatformModel.CancelOrResendPaymentLinkRequest().required(), }).required(); } /** @returns {CheckAndUpdatePaymentStatusParam} */ static checkAndUpdatePaymentStatus() { return Joi.object({ - body: PaymentPlatformModel.PaymentStatusUpdateCreation().required(), + body: PaymentPlatformModel.PaymentStatusUpdateRequest().required(), }).required(); } /** @returns {ConfirmPaymentParam} */ static confirmPayment() { return Joi.object({ - body: PaymentPlatformModel.PaymentConfirmationCreation().required(), + body: PaymentPlatformModel.PaymentConfirmationRequest().required(), }).required(); } @@ -337,21 +337,21 @@ class PaymentPlatformApplicationValidator { static createMerchantRefundPriority() { return Joi.object({ configType: Joi.string().allow("").required(), - body: PaymentPlatformModel.RefundPriorityCreation().required(), + body: PaymentPlatformModel.RefundPriorityRequestSerializer().required(), }).required(); } /** @returns {CreatePaymentLinkParam} */ static createPaymentLink() { return Joi.object({ - body: PaymentPlatformModel.CreatePaymentLinkCreation().required(), + body: PaymentPlatformModel.CreatePaymentLinkRequest().required(), }).required(); } /** @returns {CreatePaymentOrderParam} */ static createPaymentOrder() { return Joi.object({ - body: PaymentPlatformModel.PaymentOrderCreation().required(), + body: PaymentPlatformModel.PaymentOrderRequest().required(), }).required(); } @@ -524,14 +524,14 @@ class PaymentPlatformApplicationValidator { /** @returns {InitialisePaymentParam} */ static initialisePayment() { return Joi.object({ - body: PaymentPlatformModel.PaymentInitializationCreation().required(), + body: PaymentPlatformModel.PaymentInitializationRequest().required(), }).required(); } /** @returns {MerchantOnBoardingParam} */ static merchantOnBoarding() { return Joi.object({ - body: PaymentPlatformModel.MerchantOnBoardingCreation().required(), + body: PaymentPlatformModel.MerchantOnBoardingRequest().required(), }).required(); } @@ -548,14 +548,14 @@ class PaymentPlatformApplicationValidator { static patchMerchantAggregatorPaymentModeDetails() { return Joi.object({ aggregatorId: Joi.number().required(), - body: PaymentPlatformModel.PlatformPaymentModeDetails().required(), + body: PaymentPlatformModel.PlatformPaymentModeResponse().required(), }).required(); } /** @returns {PatchMerchantPaymentOptionParam} */ static patchMerchantPaymentOption() { return Joi.object({ - body: PaymentPlatformModel.MerchnatPaymentModeCreation().required(), + body: PaymentPlatformModel.MerchnatPaymentModeRequest().required(), }).required(); } @@ -563,14 +563,14 @@ class PaymentPlatformApplicationValidator { static patchMerchantPaymentOptionVersion() { return Joi.object({ aggregatorId: Joi.number().required(), - body: PaymentPlatformModel.PatchAggregatorControl().required(), + body: PaymentPlatformModel.AggregatorControlRequest().required(), }).required(); } /** @returns {PaymentStatusBulkParam} */ static paymentStatusBulk() { return Joi.object({ - body: PaymentPlatformModel.PaymentStatusBulkHandlerCreation().required(), + body: PaymentPlatformModel.PaymentStatusBulkHandlerRequest().required(), }).required(); } @@ -591,14 +591,14 @@ class PaymentPlatformApplicationValidator { /** @returns {ResendOrCancelPaymentParam} */ static resendOrCancelPayment() { return Joi.object({ - body: PaymentPlatformModel.ResendOrCancelPaymentCreation().required(), + body: PaymentPlatformModel.ResendOrCancelPaymentRequest().required(), }).required(); } /** @returns {ResendPaymentLinkParam} */ static resendPaymentLink() { return Joi.object({ - body: PaymentPlatformModel.CancelOrResendPaymentLinkCreation().required(), + body: PaymentPlatformModel.CancelOrResendPaymentLinkRequest().required(), }).required(); } @@ -612,7 +612,7 @@ class PaymentPlatformApplicationValidator { /** @returns {SaveBrandPaymentGatewayConfigParam} */ static saveBrandPaymentGatewayConfig() { return Joi.object({ - body: PaymentPlatformModel.PaymentGatewayConfigCreation().required(), + body: PaymentPlatformModel.PaymentGatewayConfigRequest().required(), }).required(); } @@ -620,7 +620,7 @@ class PaymentPlatformApplicationValidator { static setMerchantModeControlRoutes() { return Joi.object({ mode: Joi.string().allow("").required(), - body: PaymentPlatformModel.MerchantPaymentModeCreation().required(), + body: PaymentPlatformModel.MerchantPaymentModeRequest().required(), }).required(); } @@ -635,14 +635,14 @@ class PaymentPlatformApplicationValidator { /** @returns {SetUserCODlimitRoutesParam} */ static setUserCODlimitRoutes() { return Joi.object({ - body: PaymentPlatformModel.SetCODForUserCreation().required(), + body: PaymentPlatformModel.SetCODForUserRequest().required(), }).required(); } /** @returns {UpdateEdcDeviceParam} */ static updateEdcDevice() { return Joi.object({ - body: PaymentPlatformModel.EdcAddCreation().required(), + body: PaymentPlatformModel.EdcAddRequest().required(), }).required(); } @@ -650,7 +650,7 @@ class PaymentPlatformApplicationValidator { static updateMerchantRefundPriority() { return Joi.object({ configType: Joi.string().allow("").required(), - body: PaymentPlatformModel.RefundPriorityCreation().required(), + body: PaymentPlatformModel.RefundPriorityRequestSerializer().required(), }).required(); } @@ -658,7 +658,7 @@ class PaymentPlatformApplicationValidator { static updatePaymentSession() { return Joi.object({ gid: Joi.string().allow("").required(), - body: PaymentPlatformModel.PaymentSessionCreation().required(), + body: PaymentPlatformModel.PaymentSessionRequestSerializer().required(), }).required(); } @@ -667,14 +667,14 @@ class PaymentPlatformApplicationValidator { return Joi.object({ gid: Joi.string().allow("").required(), requestId: Joi.string().allow("").required(), - body: PaymentPlatformModel.RefundSessionCreation().required(), + body: PaymentPlatformModel.RefundSessionRequestSerializer().required(), }).required(); } /** @returns {VerifyCustomerForPaymentParam} */ static verifyCustomerForPayment() { return Joi.object({ - body: PaymentPlatformModel.ValidateCustomerCreation().required(), + body: PaymentPlatformModel.ValidateCustomerRequest().required(), }).required(); } } diff --git a/sdk/platform/Payment/PaymentPlatformClient.d.ts b/sdk/platform/Payment/PaymentPlatformClient.d.ts index 32ecc1efa..7bdab7c6f 100644 --- a/sdk/platform/Payment/PaymentPlatformClient.d.ts +++ b/sdk/platform/Payment/PaymentPlatformClient.d.ts @@ -6,113 +6,113 @@ declare class Payment { * @param {PaymentPlatformValidator.ActivateAndDectivatePayoutParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name activateAndDectivatePayout * @summary: Activate/Deactivate payout * @description: Enable or disable payout functionality. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/activateAndDectivatePayout/). */ - activateAndDectivatePayout({ uniqueTransferNo, body, requestHeaders }?: PaymentPlatformValidator.ActivateAndDectivatePayoutParam, { responseHeaders }?: object): Promise; + activateAndDectivatePayout({ uniqueTransferNo, body, requestHeaders }?: PaymentPlatformValidator.ActivateAndDectivatePayoutParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformValidator.DeletePayoutParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deletePayout * @summary: Delete payout * @description: Remove a payout transaction from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/deletePayout/). */ - deletePayout({ uniqueTransferNo, requestHeaders }?: PaymentPlatformValidator.DeletePayoutParam, { responseHeaders }?: object): Promise; + deletePayout({ uniqueTransferNo, requestHeaders }?: PaymentPlatformValidator.DeletePayoutParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformValidator.DeleteSubscriptionPaymentMethodParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name deleteSubscriptionPaymentMethod * @summary: Delete subscription payment method * @description: Remove a payment method from subscription options. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/deleteSubscriptionPaymentMethod/). */ - deleteSubscriptionPaymentMethod({ uniqueExternalId, paymentMethodId, requestHeaders }?: PaymentPlatformValidator.DeleteSubscriptionPaymentMethodParam, { responseHeaders }?: object): Promise; + deleteSubscriptionPaymentMethod({ uniqueExternalId, paymentMethodId, requestHeaders }?: PaymentPlatformValidator.DeleteSubscriptionPaymentMethodParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformValidator.GetAllPayoutsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAllPayouts * @summary: List payouts * @description: Retrieve a list of all payout transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getAllPayouts/). */ - getAllPayouts({ uniqueExternalId, requestHeaders }?: PaymentPlatformValidator.GetAllPayoutsParam, { responseHeaders }?: object): Promise; + getAllPayouts({ uniqueExternalId, requestHeaders }?: PaymentPlatformValidator.GetAllPayoutsParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformValidator.GetSubscriptionConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getSubscriptionConfig * @summary: Get subscription config * @description: Retrieve configuration settings for subscriptions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getSubscriptionConfig/). */ - getSubscriptionConfig({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getSubscriptionConfig({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformValidator.GetSubscriptionPaymentMethodParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getSubscriptionPaymentMethod * @summary: Get subscription payment method * @description: Retrieve payment methods for subscriptions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getSubscriptionPaymentMethod/). */ - getSubscriptionPaymentMethod({ uniqueExternalId, requestHeaders }?: PaymentPlatformValidator.GetSubscriptionPaymentMethodParam, { responseHeaders }?: object): Promise; + getSubscriptionPaymentMethod({ uniqueExternalId, requestHeaders }?: PaymentPlatformValidator.GetSubscriptionPaymentMethodParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformValidator.SavePayoutParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name savePayout * @summary: Save payout * @description: Store and process a payout transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/savePayout/). */ - savePayout({ body, requestHeaders }?: PaymentPlatformValidator.SavePayoutParam, { responseHeaders }?: object): Promise; + savePayout({ body, requestHeaders }?: PaymentPlatformValidator.SavePayoutParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformValidator.SaveSubscriptionSetupIntentParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name saveSubscriptionSetupIntent * @summary: Save subscription setup intent * @description: Store and process setup intent for subscriptions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/saveSubscriptionSetupIntent/). */ - saveSubscriptionSetupIntent({ body, requestHeaders }?: PaymentPlatformValidator.SaveSubscriptionSetupIntentParam, { responseHeaders }?: object): Promise; + saveSubscriptionSetupIntent({ body, requestHeaders }?: PaymentPlatformValidator.SaveSubscriptionSetupIntentParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformValidator.UpdatePayoutParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updatePayout * @summary: Update payout * @description: Modify the details of a payout transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updatePayout/). */ - updatePayout({ uniqueTransferNo, body, requestHeaders }?: PaymentPlatformValidator.UpdatePayoutParam, { responseHeaders }?: object): Promise; + updatePayout({ uniqueTransferNo, body, requestHeaders }?: PaymentPlatformValidator.UpdatePayoutParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformValidator.VerifyIfscCodeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyIfscCode * @summary: Verify IFSC code * @description: Checks the validity of the provided IFSC code and returns bank details if valid. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/verifyIfscCode/). */ - verifyIfscCode({ ifscCode, requestHeaders }?: PaymentPlatformValidator.VerifyIfscCodeParam, { responseHeaders }?: object): Promise; + verifyIfscCode({ ifscCode, requestHeaders }?: PaymentPlatformValidator.VerifyIfscCodeParam, { responseHeaders }?: object): Promise; } import PaymentPlatformValidator = require("./PaymentPlatformValidator"); import PaymentPlatformModel = require("./PaymentPlatformModel"); diff --git a/sdk/platform/Payment/PaymentPlatformClient.js b/sdk/platform/Payment/PaymentPlatformClient.js index 6bf7ed75e..d55fdfc34 100644 --- a/sdk/platform/Payment/PaymentPlatformClient.js +++ b/sdk/platform/Payment/PaymentPlatformClient.js @@ -18,7 +18,7 @@ class Payment { * @param {PaymentPlatformValidator.ActivateAndDectivatePayoutParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name activateAndDectivatePayout * @summary: Activate/Deactivate payout * @description: Enable or disable payout functionality. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/activateAndDectivatePayout/). @@ -78,7 +78,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.UpdatePayoutDetails().validate(responseData, { + } = PaymentPlatformModel.UpdatePayoutResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -101,7 +101,7 @@ class Payment { * @param {PaymentPlatformValidator.DeletePayoutParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deletePayout * @summary: Delete payout * @description: Remove a payout transaction from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/deletePayout/). @@ -157,7 +157,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.DeletePayoutDetails().validate(responseData, { + } = PaymentPlatformModel.DeletePayoutResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -182,7 +182,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name deleteSubscriptionPaymentMethod @@ -248,7 +248,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.DeleteSubscriptionPaymentMethodDetails().validate( + } = PaymentPlatformModel.DeleteSubscriptionPaymentMethodResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -271,7 +271,7 @@ class Payment { * @param {PaymentPlatformValidator.GetAllPayoutsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getAllPayouts * @summary: List payouts * @description: Retrieve a list of all payout transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getAllPayouts/). @@ -328,7 +328,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PayoutsDetails().validate(responseData, { + } = PaymentPlatformModel.PayoutsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -351,7 +351,7 @@ class Payment { * @param {PaymentPlatformValidator.GetSubscriptionConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getSubscriptionConfig * @summary: Get subscription config @@ -404,7 +404,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.SubscriptionConfigDetails().validate( + } = PaymentPlatformModel.SubscriptionConfigResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -429,7 +429,7 @@ class Payment { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getSubscriptionPaymentMethod @@ -490,7 +490,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.SubscriptionPaymentMethodDetails().validate( + } = PaymentPlatformModel.SubscriptionPaymentMethodResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -513,7 +513,7 @@ class Payment { * @param {PaymentPlatformValidator.SavePayoutParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name savePayout * @summary: Save payout * @description: Store and process a payout transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/savePayout/). @@ -567,7 +567,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PayoutDetails().validate(responseData, { + } = PaymentPlatformModel.PayoutResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -590,7 +590,7 @@ class Payment { * @param {PaymentPlatformValidator.SaveSubscriptionSetupIntentParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name saveSubscriptionSetupIntent @@ -650,7 +650,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.SaveSubscriptionSetupIntentDetails().validate( + } = PaymentPlatformModel.SaveSubscriptionSetupIntentResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -673,7 +673,7 @@ class Payment { * @param {PaymentPlatformValidator.UpdatePayoutParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updatePayout * @summary: Update payout * @description: Modify the details of a payout transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updatePayout/). @@ -731,7 +731,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.UpdatePayoutDetails().validate(responseData, { + } = PaymentPlatformModel.UpdatePayoutResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -754,7 +754,7 @@ class Payment { * @param {PaymentPlatformValidator.VerifyIfscCodeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name verifyIfscCode * @summary: Verify IFSC code * @description: Checks the validity of the provided IFSC code and returns bank details if valid. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/verifyIfscCode/). @@ -811,7 +811,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.IfscCodeDetails().validate(responseData, { + } = PaymentPlatformModel.IfscCodeResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/platform/Payment/PaymentPlatformModel.d.ts b/sdk/platform/Payment/PaymentPlatformModel.d.ts index a69528307..55e3a0ceb 100644 --- a/sdk/platform/Payment/PaymentPlatformModel.d.ts +++ b/sdk/platform/Payment/PaymentPlatformModel.d.ts @@ -1,6 +1,6 @@ export = PaymentPlatformModel; /** - * @typedef PaymentGatewayConfigDetails + * @typedef PaymentGatewayConfigResponse * @property {Object[]} [aggregators] - List of all config specific to the * aggregator with their Details. * @property {string} app_id - Application Id to which Payment config Mapped @@ -25,7 +25,7 @@ export = PaymentPlatformModel; * payment aggregator for the merchant. */ /** - * @typedef PaymentGatewayConfigCreation + * @typedef PaymentGatewayConfigRequest * @property {string} app_id - Application Id to which Payment config Mapped * @property {boolean} [is_active] - Enable or Disable Flag * @property {PaymentGatewayConfig} [aggregator_name] @@ -41,7 +41,7 @@ export = PaymentPlatformModel; * @property {string} code - Error descrption code. */ /** - * @typedef HttpErrorDetails + * @typedef HttpErrorCodeAndResponse * @property {ErrorCodeAndDescription} error * @property {boolean} success - Response is successful or not */ @@ -53,10 +53,10 @@ export = PaymentPlatformModel; /** * @typedef ProductCODData * @property {Object} [items] - Item id with its cod availability. - * @property {CODChargesLimitsDetails} [cod_charges] + * @property {CODChargesLimitsResponse} [cod_charges] */ /** - * @typedef CODChargesLimitsDetails + * @typedef CODChargesLimitsResponse * @property {number} [max_cart_value] - Max allowed cart value for cod order. * @property {number} [min_cart_value] - Min allowed cart value for cod order. * @property {number} [cod_charge] - Cod charges to be applied on order. @@ -198,14 +198,14 @@ export = PaymentPlatformModel; * @property {AdvanceObject} [advance] */ /** - * @typedef PaymentModeRouteDetails + * @typedef PaymentModeRouteResponse * @property {PaymentOptionAndFlow} payment_options * @property {boolean} success - Response is successful or not * @property {Object} [payment_breakup] - Payment Breakup for advance payment * @property {AdvancePaymentObject[]} [advance_payment] - Advance Payment Array */ /** - * @typedef PaymentOptionsDetails + * @typedef PaymentOptionsResponse * @property {PaymentOptions} payment_options * @property {boolean} success - Response is successful or not * @property {Object} [payment_breakup] - Payment Breakup for advance payment @@ -247,7 +247,7 @@ export = PaymentPlatformModel; * @property {string} transfer_type - Transafer type */ /** - * @typedef PayoutsDetails + * @typedef PayoutsResponse * @property {boolean} success - Response is successful or not * @property {Payout[]} items - Contains list of PayoutSchema */ @@ -265,7 +265,7 @@ export = PaymentPlatformModel; * @property {number} [pincode] */ /** - * @typedef PayoutCreation + * @typedef PayoutRequest * @property {string} aggregator - Aggregator Name * @property {Object} users - Payout users object * @property {string} unique_external_id - Unique Id of Payout @@ -274,7 +274,7 @@ export = PaymentPlatformModel; * @property {string} transfer_type - Transafer type */ /** - * @typedef PayoutDetails + * @typedef PayoutResponse * @property {string} payment_status - Status of payment * @property {Object} users - Users details object * @property {string} aggregator - Aggregator Name @@ -287,47 +287,47 @@ export = PaymentPlatformModel; * @property {Object} payouts - Payout object */ /** - * @typedef UpdatePayoutDetails + * @typedef UpdatePayoutResponse * @property {boolean} is_default - Enable or Disable Default Payout * @property {boolean} is_active - Enable or DIsable Flag Payout * @property {boolean} success - Response is successful or not */ /** - * @typedef UpdatePayoutCreation + * @typedef UpdatePayoutRequest * @property {boolean} is_default - Enable or Disable Default Payout * @property {boolean} is_active - Enable or Disable Flag Payout * @property {string} unique_external_id - Unique Id of Payout */ /** - * @typedef DeletePayoutDetails + * @typedef DeletePayoutResponse * @property {boolean} success - Response is successful or not */ /** - * @typedef SubscriptionPaymentMethodDetails + * @typedef SubscriptionPaymentMethodResponse * @property {Object[]} data - Subscription Payment Method Object * @property {boolean} success - Response is successful or not */ /** - * @typedef DeleteSubscriptionPaymentMethodDetails + * @typedef DeleteSubscriptionPaymentMethodResponse * @property {boolean} success - Success or failure. */ /** - * @typedef SubscriptionConfigDetails + * @typedef SubscriptionConfigResponse * @property {string} aggregator - Aggregator Name * @property {Object} config - Aggregator Config * @property {boolean} success - Response is successful or not */ /** - * @typedef SaveSubscriptionSetupIntentCreation + * @typedef SaveSubscriptionSetupIntentRequest * @property {string} unique_external_id - Unique id i.e company:id */ /** - * @typedef SaveSubscriptionSetupIntentDetails + * @typedef SaveSubscriptionSetupIntentResponse * @property {Object} data - Subscription Payment Method Object * @property {boolean} success - Response is successful or not */ /** - * @typedef RefundAccountDetails + * @typedef RefundAccountResponse * @property {boolean} [is_verified_flag] - Account is verified or not * @property {string} [message] - Response message * @property {Object} data - Refund account data. @@ -348,12 +348,12 @@ export = PaymentPlatformModel; * @property {string} account_holder - Accountg holder name of account */ /** - * @typedef AddBeneficiaryDetailsOTPCreation + * @typedef AddBeneficiaryDetailsOTPRequest * @property {string} order_id - Order_id for which account will be added * @property {BankDetailsForOTP} details */ /** - * @typedef IfscCodeDetails + * @typedef IfscCodeResponse * @property {string} branch_name - Branch Name Of Account * @property {boolean} [success] - Response is successful or not * @property {string} bank_name - Bank Name Of Account @@ -381,7 +381,7 @@ export = PaymentPlatformModel; * @property {string} [mobile] - MObile no of User */ /** - * @typedef OrderBeneficiaryFetchResults + * @typedef OrderBeneficiaryResponse * @property {OrderBeneficiaryDetails[]} [beneficiaries] - All Beneficiaries Of An Order * @property {boolean} [show_beneficiary_details] - Show beneficiary details or not. */ @@ -407,12 +407,12 @@ export = PaymentPlatformModel; * @property {string} mode - Payment mode short code */ /** - * @typedef PaymentConfirmationCreation + * @typedef PaymentConfirmationRequest * @property {string} order_id - Unique order id * @property {MultiTenderPaymentMethod[]} payment_methods */ /** - * @typedef PaymentConfirmationDetails + * @typedef PaymentConfirmationResponse * @property {string} order_id - Unique order id * @property {string} message - Message * @property {boolean} success - Payment confirmation updated or not. @@ -440,26 +440,26 @@ export = PaymentPlatformModel; * @property {CODLimitConfig} limit */ /** - * @typedef GetUserBULimitResponseSchema + * @typedef GetUserBULimitResponse * @property {string} business_unit - COD limit business unit * @property {string} display_name - Display name for cod limit * @property {CODPaymentLimitConfig} config */ /** - * @typedef GetUserCODLimitDetails - * @property {GetUserBULimitResponseSchema[]} items + * @typedef GetUserCODLimitResponse + * @property {GetUserBULimitResponse[]} items * @property {boolean} success - Response is successful or not * @property {string} [message] - Message for cod limit */ /** - * @typedef SetCODForUserCreation + * @typedef SetCODForUserRequest * @property {string} [business_unit] - Business unit * @property {string} mobileno - Mobile No. of User * @property {boolean} is_active - Either true or false * @property {string} merchant_user_id - Merchant User id */ /** - * @typedef SetCODOptionDetails + * @typedef SetCODOptionResponse * @property {string} message - Message * @property {boolean} success - Response is successful or not */ @@ -470,7 +470,7 @@ export = PaymentPlatformModel; * @property {string[]} models - List of string of edc models */ /** - * @typedef EdcAggregatorAndModelListDetails + * @typedef EdcAggregatorAndModelListResponse * @property {EdcModelData[]} data - List of aggregators and their edc models * @property {boolean} success - Response is successful or not */ @@ -480,12 +480,12 @@ export = PaymentPlatformModel; * @property {number} active_device_count - No of active devices */ /** - * @typedef EdcDeviceStatsDetails + * @typedef EdcDeviceStatsResponse * @property {StatisticsData} statistics * @property {boolean} success - Response is successful or not */ /** - * @typedef EdcAddCreation + * @typedef EdcAddRequest * @property {string} edc_model - Model of the edc machine * @property {number} store_id - Store at which devices is to used * @property {number} aggregator_id - Aggregator which will accept payment @@ -510,17 +510,17 @@ export = PaymentPlatformModel; * @property {string} application_id - Application ID */ /** - * @typedef EdcDeviceAddDetails + * @typedef EdcDeviceAddResponse * @property {EdcDevice} data * @property {boolean} success - Response is successful or not */ /** - * @typedef EdcDeviceDetails + * @typedef EdcDeviceDetailsResponse * @property {EdcDevice} data * @property {boolean} success - Response is successful or not */ /** - * @typedef EdcUpdate + * @typedef EdcUpdateRequest * @property {string} [edc_model] - Model of the edc machine * @property {number} [store_id] - Store at which devices is to used * @property {number} [aggregator_id] - Aggregator which will accept payment @@ -530,7 +530,7 @@ export = PaymentPlatformModel; * @property {string} [device_tag] - Device tag of edc device to identify it */ /** - * @typedef EdcDeviceUpdateDetails + * @typedef EdcDeviceUpdateResponse * @property {boolean} success - Response is successful or not */ /** @@ -544,14 +544,14 @@ export = PaymentPlatformModel; * @property {number} [size] - The number of items per page. */ /** - * @typedef EdcDeviceListDetails + * @typedef EdcDeviceListResponse * @property {EdcDevice[]} items - List of all edc mapped to the application * options with their Details. * @property {Page} page * @property {boolean} success - Response is successful or not */ /** - * @typedef PaymentInitializationCreation + * @typedef PaymentInitializationRequest * @property {string} [razorpay_payment_id] - Payment gateway payment id * @property {string} [device_id] - EDC machine Unique Identifier * @property {string} email - Customer valid email @@ -567,7 +567,7 @@ export = PaymentPlatformModel; * @property {string} method - Payment method */ /** - * @typedef PaymentInitializationDetails + * @typedef PaymentInitializationResponse * @property {string} [razorpay_payment_id] - Payment id. * @property {string} [device_id] - EDC machine Unique Identifier * @property {string} [upi_poll_url] - UPI poll url. @@ -587,7 +587,7 @@ export = PaymentPlatformModel; * @property {string} method - Payment method */ /** - * @typedef PaymentStatusUpdateCreation + * @typedef PaymentStatusUpdateRequest * @property {string} [device_id] - EDC machine Unique Identifier * @property {string} email - Customer valid email * @property {string} customer_id - Payment gateway customer id. @@ -603,7 +603,7 @@ export = PaymentPlatformModel; * @property {string} merchant_transaction_id - Unique fynd transaction id */ /** - * @typedef PaymentStatusUpdateDetails + * @typedef PaymentStatusUpdateResponse * @property {string} [redirect_url] - Redirect url * @property {boolean} retry - Response is successful or not. * @property {boolean} [success] - Response is successful or not @@ -611,7 +611,7 @@ export = PaymentPlatformModel; * @property {string} aggregator_name - Payment gateway name */ /** - * @typedef ResendOrCancelPaymentCreation + * @typedef ResendOrCancelPaymentRequest * @property {string} order_id - Unique order id * @property {string} [device_id] - EDC machine Unique Identifier * @property {string} request_type - Either resend or cancel @@ -624,16 +624,16 @@ export = PaymentPlatformModel; * status of payment link. */ /** - * @typedef ResendOrCancelPaymentDetails + * @typedef ResendOrCancelPaymentResponse * @property {LinkStatus} data * @property {boolean} success - Response is successful or not. */ /** - * @typedef PaymentStatusBulkHandlerCreation + * @typedef PaymentStatusBulkHandlerRequest * @property {string[]} merchant_order_id - List of order ids */ /** - * @typedef PaymentObjectList + * @typedef PaymentObjectListSerializer * @property {Object} user_object * @property {string} modified_on * @property {string} collected_by @@ -656,10 +656,10 @@ export = PaymentPlatformModel; /** * @typedef PaymentStatusObject * @property {string} merchant_order_id - * @property {PaymentObjectList[]} [payment_object_list] + * @property {PaymentObjectListSerializer[]} [payment_object_list] */ /** - * @typedef PaymentStatusBulkHandlerDetails + * @typedef PaymentStatusBulkHandlerResponse * @property {number} [count] * @property {PaymentStatusObject[]} [data] * @property {string} success @@ -667,7 +667,7 @@ export = PaymentPlatformModel; * @property {number} status */ /** - * @typedef GetOauthUrlDetails + * @typedef GetOauthUrlResponse * @property {string} url - The url to call for authenticating * @property {boolean} success - Response is successful or not */ @@ -698,12 +698,12 @@ export = PaymentPlatformModel; * @property {RepaymentRequestDetails[]} [shipment_details] */ /** - * @typedef RepaymentDetails + * @typedef RepaymentResponse * @property {Object} data * @property {boolean} success - Success/Failure of the transaction */ /** - * @typedef MerchantOnBoardingCreation + * @typedef MerchantOnBoardingRequest * @property {string} credit_line_id - Merchant ID at Ajiodhan's end * @property {string} aggregator - Payment aggregator name * @property {string} app_id - Application id @@ -711,12 +711,12 @@ export = PaymentPlatformModel; * @property {string} status - Status */ /** - * @typedef MerchantOnBoardingDetails + * @typedef MerchantOnBoardingResponse * @property {Object} data * @property {boolean} success - Success/Failure of the transaction */ /** - * @typedef ValidateCustomerCreation + * @typedef ValidateCustomerRequest * @property {string} phone_number - User mobile number without country code. * @property {string} aggregator - Payment gateway name in camel case i.e Simpl, Rupifi * @property {string} [payload] - Hashed payload string. @@ -727,13 +727,13 @@ export = PaymentPlatformModel; * @property {Object} [billing_address] - Extra meta fields. */ /** - * @typedef ValidateCustomerDetails + * @typedef ValidateCustomerResponse * @property {string} message - Error or success message. * @property {Object} [data] - Payment gateway response data * @property {boolean} success - Response is successful or not */ /** - * @typedef GetPaymentLinkDetails + * @typedef GetPaymentLinkResponse * @property {string} message - Message * @property {number} status_code - HTTP status code * @property {number} [amount] - Total value of order @@ -757,7 +757,7 @@ export = PaymentPlatformModel; * @property {boolean} [cancelled] - Payment link is cancelled or not */ /** - * @typedef ErrorDetails + * @typedef ErrorResponse * @property {number} status_code - HTTP status code * @property {ErrorDescription} [error] * @property {string} message - Message @@ -772,7 +772,7 @@ export = PaymentPlatformModel; * to be done via payment link */ /** - * @typedef CreatePaymentLinkCreation + * @typedef CreatePaymentLinkRequest * @property {string} email - Email to which the payment link is to be sent * @property {number} amount - Total value of order * @property {string} mobile_number - Mobile number to which the payment link is @@ -781,13 +781,9 @@ export = PaymentPlatformModel; * @property {string} [description] - Merchant order id * @property {CreatePaymentLinkMeta} meta * @property {string} external_order_id - Merchant order id - * @property {string} [success_redirection_url] - URL to which the user will be - * redirected after a successful payment. - * @property {string} [failure_redirection_url] - URL to which the user will be - * redirected if the payment fails. */ /** - * @typedef CreatePaymentLinkDetails + * @typedef CreatePaymentLinkResponse * @property {string} message - Message * @property {number} status_code - HTTP status code * @property {string} [payment_link_url] - Url of payment link @@ -796,7 +792,7 @@ export = PaymentPlatformModel; * @property {string} [payment_link_id] - Unique id of payment link */ /** - * @typedef PollingPaymentLinkDetails + * @typedef PollingPaymentLinkResponse * @property {string} [message] - Message * @property {number} [http_status] - HTTP status code * @property {number} [status_code] - HTTP status code @@ -809,18 +805,18 @@ export = PaymentPlatformModel; * @property {string} [aggregator_name] - Aggregator name */ /** - * @typedef CancelOrResendPaymentLinkCreation + * @typedef CancelOrResendPaymentLinkRequest * @property {string} payment_link_id - Unique id of payment link */ /** - * @typedef ResendPaymentLinkDetails + * @typedef ResendPaymentLinkResponse * @property {number} status_code - HTTP status code * @property {string} message - Message * @property {number} [polling_timeout] - Polling request timeout * @property {boolean} success - Successful or failure */ /** - * @typedef CancelPaymentLinkDetails + * @typedef CancelPaymentLinkResponse * @property {number} status_code - HTTP status code * @property {string} message - Message * @property {boolean} success - Successful or failure @@ -843,18 +839,18 @@ export = PaymentPlatformModel; * @property {PaymentCode} method_code */ /** - * @typedef GetPaymentCodeDetails + * @typedef GetPaymentCodeResponse * @property {GetPaymentCode} data * @property {boolean} success - Response is successful or not. */ /** - * @typedef PlatformPaymentModeDetails + * @typedef PlatformPaymentModeResponse * @property {string} [message] - Message * @property {Object[]} [items] - List of all aggregator and payment mode details. * @property {boolean} success - Response is successful or not. */ /** - * @typedef MerchnatPaymentModeCreation + * @typedef MerchnatPaymentModeRequest * @property {Object} [offline] - Details to be updated for online payment configuration. * @property {Object} [online] - Details to be updated for offline payment configuration. */ @@ -931,7 +927,7 @@ export = PaymentPlatformModel; * @property {string} status - Status of the payment */ /** - * @typedef PaymentSessionCreation + * @typedef PaymentSessionRequestSerializer * @property {Object} [meta] - Extra meta data specific to extensions * @property {string} gid - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by @@ -946,7 +942,7 @@ export = PaymentPlatformModel; * @property {string} [source] - Source of payment update session */ /** - * @typedef PaymentSessionPutDetails + * @typedef PaymentSessionResponseSerializer * @property {string} gid - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by * Fynd payments platform and is unique. @@ -975,7 +971,7 @@ export = PaymentPlatformModel; * @property {string} [balance_transaction] - Balance transaction. */ /** - * @typedef RefundSessionCreation + * @typedef RefundSessionRequestSerializer * @property {Object} [meta] - Meta * @property {string} gid - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by @@ -990,7 +986,7 @@ export = PaymentPlatformModel; * @property {string} checksum - Checksum to verify payload */ /** - * @typedef RefundSessionDetails + * @typedef RefundSessionResponseSerializer * @property {string} gid - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by * Fynd payments platform and is unique. @@ -1000,7 +996,7 @@ export = PaymentPlatformModel; * @property {number} total_refund_amount - The total amount refunded. */ /** - * @typedef PaymentDetails + * @typedef PaymentDetailsSerializer * @property {Object[]} payment_methods - List of payment methods * @property {string} gid - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by @@ -1035,7 +1031,7 @@ export = PaymentPlatformModel; * id generated by payment gateway */ /** - * @typedef CartDetails + * @typedef CartDetailsSerializer * @property {Object} items - Items that are added in cart * @property {Object[]} articles - List of articles that are added in cart * @property {number} cart_value - Total cart value i.e. amount to be paid @@ -1044,7 +1040,7 @@ export = PaymentPlatformModel; * retrieve custom data fields to cart items. */ /** - * @typedef RefundDetails + * @typedef RefundDetailsSerializer * @property {number} amount - Refunded amount * @property {string} currency - The currency of the payment. * @property {string} request_id - Refund request id, unique id generated by Fynd platform @@ -1053,7 +1049,7 @@ export = PaymentPlatformModel; * @property {string} refund_utr - Unique refund utr generated by payment gateway. */ /** - * @typedef PaymentSessionFetchDetails + * @typedef PaymentSessionSerializer * @property {Object} payment_details - Object of payment details * @property {string} [currency] - The currency of the payment. * @property {string} status - The status of the payment session. @@ -1061,8 +1057,8 @@ export = PaymentPlatformModel; * @property {string} gid - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by * Fynd payments platform and is unique. - * @property {CartDetails} [cart_details] - * @property {RefundDetails[]} refund_details - Object of refund details + * @property {CartDetailsSerializer} [cart_details] + * @property {RefundDetailsSerializer[]} refund_details - Object of refund details */ /** * @typedef RefundSourcesPriority @@ -1071,7 +1067,7 @@ export = PaymentPlatformModel; * @property {string} source - Source of refund */ /** - * @typedef RefundPriorityDetails + * @typedef RefundPriorityResponseSerializer * @property {string} configuration - Configuration for merchant or customer * @property {boolean} success - Success * @property {boolean} apportion - Apportion refund to multiple sources @@ -1079,12 +1075,12 @@ export = PaymentPlatformModel; * @property {string} [message] - Message */ /** - * @typedef RefundPriorityCreation + * @typedef RefundPriorityRequestSerializer * @property {boolean} apportion - Apportion refund to multiple sources * @property {RefundSourcesPriority[]} refund_sources_priority - Refund sources priority */ /** - * @typedef MerchantPaymentModeCreation + * @typedef MerchantPaymentModeRequest * @property {string} business_unit - Business unit * @property {Object[]} items - List of item details with respect to payment_mode * @property {Object} device - List of devices and its activation status @@ -1100,7 +1096,7 @@ export = PaymentPlatformModel; * @property {string} business_unit - Business unit name */ /** - * @typedef PlatformPaymentModeCopyConfigCreation + * @typedef PlatformPaymentModeCopyConfigRequest * @property {FromConfig} from_config * @property {ToConfig} to_config */ @@ -1119,7 +1115,7 @@ export = PaymentPlatformModel; * @property {string} name - Payment mode name */ /** - * @typedef PaymentOrderCreation + * @typedef PaymentOrderRequest * @property {string} order_id - Order id * @property {PaymentOrderMethods[]} [payment_methods] * @property {string} [shipment_id] - Shipment_id @@ -1138,7 +1134,7 @@ export = PaymentPlatformModel; * @property {string} [merchant_order_id] - Merchant order id */ /** - * @typedef PaymentOrderDetails + * @typedef PaymentOrderResponse * @property {string} message - Message * @property {boolean} success - Successful or failure * @property {string} [payment_confirm_url] - Payment confirm url for aggregator @@ -1154,7 +1150,7 @@ export = PaymentPlatformModel; * @property {string} [is_greater_than] */ /** - * @typedef AggregatorVersionDetails + * @typedef AggregatorVersionResponse * @property {string} message - Message * @property {boolean} success - Successful or failure * @property {AggregatorVersionItemSchema} [items] @@ -1166,7 +1162,7 @@ export = PaymentPlatformModel; * @property {string} [is_greater_than] */ /** - * @typedef PatchAggregatorControl + * @typedef AggregatorControlRequest * @property {string} [business_unit] - Business unit * @property {Object[]} [items] - List of item details with respect to payment_mode * @property {string} [device] - Device name @@ -1221,11 +1217,11 @@ export = PaymentPlatformModel; declare class PaymentPlatformModel { } declare namespace PaymentPlatformModel { - export { PaymentGatewayConfigDetails, ErrorCodeDescription, PaymentGatewayConfig, PaymentGatewayConfigCreation, PaymentGatewayToBeReviewed, ErrorCodeAndDescription, HttpErrorDetails, IntentAppErrorList, ProductCODData, CODChargesLimitsDetails, PaymentModeLogo, IntentApp, PaymentModeList, RootPaymentMode, PaymentOptions, AggregatorRoute, PaymentDefaultSelection, PaymentFlow, PaymentOptionAndFlow, AdvanceObject, SplitObject, AdvancePaymentObject, PaymentModeRouteDetails, PaymentOptionsDetails, PayoutCustomer, PayoutMoreAttributes, PayoutAggregator, Payout, PayoutsDetails, PayoutBankDetails, PayoutCreation, PayoutDetails, UpdatePayoutDetails, UpdatePayoutCreation, DeletePayoutDetails, SubscriptionPaymentMethodDetails, DeleteSubscriptionPaymentMethodDetails, SubscriptionConfigDetails, SaveSubscriptionSetupIntentCreation, SaveSubscriptionSetupIntentDetails, RefundAccountDetails, NotFoundResourceError, BankDetailsForOTP, AddBeneficiaryDetailsOTPCreation, IfscCodeDetails, OrderBeneficiaryDetails, OrderBeneficiaryFetchResults, MultiTenderPaymentMeta, MultiTenderPaymentMethod, PaymentConfirmationCreation, PaymentConfirmationDetails, CODdata, CODLimitConfig, CODPaymentLimitConfig, GetUserBULimitResponseSchema, GetUserCODLimitDetails, SetCODForUserCreation, SetCODOptionDetails, EdcModelData, EdcAggregatorAndModelListDetails, StatisticsData, EdcDeviceStatsDetails, EdcAddCreation, EdcDevice, EdcDeviceAddDetails, EdcDeviceDetails, EdcUpdate, EdcDeviceUpdateDetails, Page, EdcDeviceListDetails, PaymentInitializationCreation, PaymentInitializationDetails, PaymentStatusUpdateCreation, PaymentStatusUpdateDetails, ResendOrCancelPaymentCreation, LinkStatus, ResendOrCancelPaymentDetails, PaymentStatusBulkHandlerCreation, PaymentObjectList, PaymentStatusObject, PaymentStatusBulkHandlerDetails, GetOauthUrlDetails, RevokeOAuthToken, RepaymentRequestDetails, RepaymentDetailsSerialiserPayAll, RepaymentDetails, MerchantOnBoardingCreation, MerchantOnBoardingDetails, ValidateCustomerCreation, ValidateCustomerDetails, GetPaymentLinkDetails, ErrorDescription, ErrorDetails, CreatePaymentLinkMeta, CreatePaymentLinkCreation, CreatePaymentLinkDetails, PollingPaymentLinkDetails, CancelOrResendPaymentLinkCreation, ResendPaymentLinkDetails, CancelPaymentLinkDetails, Code, PaymentCode, GetPaymentCode, GetPaymentCodeDetails, PlatformPaymentModeDetails, MerchnatPaymentModeCreation, OrderDetail, AddressDetail, PaymentSessionDetail, PaymentSessionCreation, PaymentSessionPutDetails, RefundSessionDetail, RefundSessionCreation, RefundSessionDetails, PaymentDetails, CartDetails, RefundDetails, PaymentSessionFetchDetails, RefundSourcesPriority, RefundPriorityDetails, RefundPriorityCreation, MerchantPaymentModeCreation, FromConfig, ToConfig, PlatformPaymentModeCopyConfigCreation, PaymentMethodsMetaOrder, PaymentOrderMethods, PaymentOrderCreation, PaymentOrderData, PaymentOrderDetails, AggregatorVersionItemSchema, AggregatorVersionDetails, AggregatorVersionRequestSchema, PatchAggregatorControl, PaymentModeCustomConfigSchema, PaymentCustomConfigDetailsSchema, PaymentCustomConfigCustomerSchema, PaymentCustomConfigModeSchema, PaymentCustomConfigDetailsRequestSchema, PaymentCustomConfigCustomerRequestSchema, PaymentCustomConfigRequestSchema, PaymentCustomConfigResponseSchema }; + export { PaymentGatewayConfigResponse, ErrorCodeDescription, PaymentGatewayConfig, PaymentGatewayConfigRequest, PaymentGatewayToBeReviewed, ErrorCodeAndDescription, HttpErrorCodeAndResponse, IntentAppErrorList, ProductCODData, CODChargesLimitsResponse, PaymentModeLogo, IntentApp, PaymentModeList, RootPaymentMode, PaymentOptions, AggregatorRoute, PaymentDefaultSelection, PaymentFlow, PaymentOptionAndFlow, AdvanceObject, SplitObject, AdvancePaymentObject, PaymentModeRouteResponse, PaymentOptionsResponse, PayoutCustomer, PayoutMoreAttributes, PayoutAggregator, Payout, PayoutsResponse, PayoutBankDetails, PayoutRequest, PayoutResponse, UpdatePayoutResponse, UpdatePayoutRequest, DeletePayoutResponse, SubscriptionPaymentMethodResponse, DeleteSubscriptionPaymentMethodResponse, SubscriptionConfigResponse, SaveSubscriptionSetupIntentRequest, SaveSubscriptionSetupIntentResponse, RefundAccountResponse, NotFoundResourceError, BankDetailsForOTP, AddBeneficiaryDetailsOTPRequest, IfscCodeResponse, OrderBeneficiaryDetails, OrderBeneficiaryResponse, MultiTenderPaymentMeta, MultiTenderPaymentMethod, PaymentConfirmationRequest, PaymentConfirmationResponse, CODdata, CODLimitConfig, CODPaymentLimitConfig, GetUserBULimitResponse, GetUserCODLimitResponse, SetCODForUserRequest, SetCODOptionResponse, EdcModelData, EdcAggregatorAndModelListResponse, StatisticsData, EdcDeviceStatsResponse, EdcAddRequest, EdcDevice, EdcDeviceAddResponse, EdcDeviceDetailsResponse, EdcUpdateRequest, EdcDeviceUpdateResponse, Page, EdcDeviceListResponse, PaymentInitializationRequest, PaymentInitializationResponse, PaymentStatusUpdateRequest, PaymentStatusUpdateResponse, ResendOrCancelPaymentRequest, LinkStatus, ResendOrCancelPaymentResponse, PaymentStatusBulkHandlerRequest, PaymentObjectListSerializer, PaymentStatusObject, PaymentStatusBulkHandlerResponse, GetOauthUrlResponse, RevokeOAuthToken, RepaymentRequestDetails, RepaymentDetailsSerialiserPayAll, RepaymentResponse, MerchantOnBoardingRequest, MerchantOnBoardingResponse, ValidateCustomerRequest, ValidateCustomerResponse, GetPaymentLinkResponse, ErrorDescription, ErrorResponse, CreatePaymentLinkMeta, CreatePaymentLinkRequest, CreatePaymentLinkResponse, PollingPaymentLinkResponse, CancelOrResendPaymentLinkRequest, ResendPaymentLinkResponse, CancelPaymentLinkResponse, Code, PaymentCode, GetPaymentCode, GetPaymentCodeResponse, PlatformPaymentModeResponse, MerchnatPaymentModeRequest, OrderDetail, AddressDetail, PaymentSessionDetail, PaymentSessionRequestSerializer, PaymentSessionResponseSerializer, RefundSessionDetail, RefundSessionRequestSerializer, RefundSessionResponseSerializer, PaymentDetailsSerializer, CartDetailsSerializer, RefundDetailsSerializer, PaymentSessionSerializer, RefundSourcesPriority, RefundPriorityResponseSerializer, RefundPriorityRequestSerializer, MerchantPaymentModeRequest, FromConfig, ToConfig, PlatformPaymentModeCopyConfigRequest, PaymentMethodsMetaOrder, PaymentOrderMethods, PaymentOrderRequest, PaymentOrderData, PaymentOrderResponse, AggregatorVersionItemSchema, AggregatorVersionResponse, AggregatorVersionRequestSchema, AggregatorControlRequest, PaymentModeCustomConfigSchema, PaymentCustomConfigDetailsSchema, PaymentCustomConfigCustomerSchema, PaymentCustomConfigModeSchema, PaymentCustomConfigDetailsRequestSchema, PaymentCustomConfigCustomerRequestSchema, PaymentCustomConfigRequestSchema, PaymentCustomConfigResponseSchema }; } -/** @returns {PaymentGatewayConfigDetails} */ -declare function PaymentGatewayConfigDetails(): PaymentGatewayConfigDetails; -type PaymentGatewayConfigDetails = { +/** @returns {PaymentGatewayConfigResponse} */ +declare function PaymentGatewayConfigResponse(): PaymentGatewayConfigResponse; +type PaymentGatewayConfigResponse = { /** * - List of all config specific to the * aggregator with their Details. @@ -1293,9 +1289,9 @@ type PaymentGatewayConfig = { */ merchant_salt: string; }; -/** @returns {PaymentGatewayConfigCreation} */ -declare function PaymentGatewayConfigCreation(): PaymentGatewayConfigCreation; -type PaymentGatewayConfigCreation = { +/** @returns {PaymentGatewayConfigRequest} */ +declare function PaymentGatewayConfigRequest(): PaymentGatewayConfigRequest; +type PaymentGatewayConfigRequest = { /** * - Application Id to which Payment config Mapped */ @@ -1330,9 +1326,9 @@ type ErrorCodeAndDescription = { */ code: string; }; -/** @returns {HttpErrorDetails} */ -declare function HttpErrorDetails(): HttpErrorDetails; -type HttpErrorDetails = { +/** @returns {HttpErrorCodeAndResponse} */ +declare function HttpErrorCodeAndResponse(): HttpErrorCodeAndResponse; +type HttpErrorCodeAndResponse = { error: ErrorCodeAndDescription; /** * - Response is successful or not @@ -1358,11 +1354,11 @@ type ProductCODData = { * - Item id with its cod availability. */ items?: any; - cod_charges?: CODChargesLimitsDetails; + cod_charges?: CODChargesLimitsResponse; }; -/** @returns {CODChargesLimitsDetails} */ -declare function CODChargesLimitsDetails(): CODChargesLimitsDetails; -type CODChargesLimitsDetails = { +/** @returns {CODChargesLimitsResponse} */ +declare function CODChargesLimitsResponse(): CODChargesLimitsResponse; +type CODChargesLimitsResponse = { /** * - Max allowed cart value for cod order. */ @@ -1749,9 +1745,9 @@ type AdvancePaymentObject = { split?: SplitObject; advance?: AdvanceObject; }; -/** @returns {PaymentModeRouteDetails} */ -declare function PaymentModeRouteDetails(): PaymentModeRouteDetails; -type PaymentModeRouteDetails = { +/** @returns {PaymentModeRouteResponse} */ +declare function PaymentModeRouteResponse(): PaymentModeRouteResponse; +type PaymentModeRouteResponse = { payment_options: PaymentOptionAndFlow; /** * - Response is successful or not @@ -1766,9 +1762,9 @@ type PaymentModeRouteDetails = { */ advance_payment?: AdvancePaymentObject[]; }; -/** @returns {PaymentOptionsDetails} */ -declare function PaymentOptionsDetails(): PaymentOptionsDetails; -type PaymentOptionsDetails = { +/** @returns {PaymentOptionsResponse} */ +declare function PaymentOptionsResponse(): PaymentOptionsResponse; +type PaymentOptionsResponse = { payment_options: PaymentOptions; /** * - Response is successful or not @@ -1882,9 +1878,9 @@ type Payout = { */ transfer_type: string; }; -/** @returns {PayoutsDetails} */ -declare function PayoutsDetails(): PayoutsDetails; -type PayoutsDetails = { +/** @returns {PayoutsResponse} */ +declare function PayoutsResponse(): PayoutsResponse; +type PayoutsResponse = { /** * - Response is successful or not */ @@ -1908,9 +1904,9 @@ type PayoutBankDetails = { branch_name?: string; pincode?: number; }; -/** @returns {PayoutCreation} */ -declare function PayoutCreation(): PayoutCreation; -type PayoutCreation = { +/** @returns {PayoutRequest} */ +declare function PayoutRequest(): PayoutRequest; +type PayoutRequest = { /** * - Aggregator Name */ @@ -1933,9 +1929,9 @@ type PayoutCreation = { */ transfer_type: string; }; -/** @returns {PayoutDetails} */ -declare function PayoutDetails(): PayoutDetails; -type PayoutDetails = { +/** @returns {PayoutResponse} */ +declare function PayoutResponse(): PayoutResponse; +type PayoutResponse = { /** * - Status of payment */ @@ -1977,9 +1973,9 @@ type PayoutDetails = { */ payouts: any; }; -/** @returns {UpdatePayoutDetails} */ -declare function UpdatePayoutDetails(): UpdatePayoutDetails; -type UpdatePayoutDetails = { +/** @returns {UpdatePayoutResponse} */ +declare function UpdatePayoutResponse(): UpdatePayoutResponse; +type UpdatePayoutResponse = { /** * - Enable or Disable Default Payout */ @@ -1993,9 +1989,9 @@ type UpdatePayoutDetails = { */ success: boolean; }; -/** @returns {UpdatePayoutCreation} */ -declare function UpdatePayoutCreation(): UpdatePayoutCreation; -type UpdatePayoutCreation = { +/** @returns {UpdatePayoutRequest} */ +declare function UpdatePayoutRequest(): UpdatePayoutRequest; +type UpdatePayoutRequest = { /** * - Enable or Disable Default Payout */ @@ -2009,17 +2005,17 @@ type UpdatePayoutCreation = { */ unique_external_id: string; }; -/** @returns {DeletePayoutDetails} */ -declare function DeletePayoutDetails(): DeletePayoutDetails; -type DeletePayoutDetails = { +/** @returns {DeletePayoutResponse} */ +declare function DeletePayoutResponse(): DeletePayoutResponse; +type DeletePayoutResponse = { /** * - Response is successful or not */ success: boolean; }; -/** @returns {SubscriptionPaymentMethodDetails} */ -declare function SubscriptionPaymentMethodDetails(): SubscriptionPaymentMethodDetails; -type SubscriptionPaymentMethodDetails = { +/** @returns {SubscriptionPaymentMethodResponse} */ +declare function SubscriptionPaymentMethodResponse(): SubscriptionPaymentMethodResponse; +type SubscriptionPaymentMethodResponse = { /** * - Subscription Payment Method Object */ @@ -2029,17 +2025,17 @@ type SubscriptionPaymentMethodDetails = { */ success: boolean; }; -/** @returns {DeleteSubscriptionPaymentMethodDetails} */ -declare function DeleteSubscriptionPaymentMethodDetails(): DeleteSubscriptionPaymentMethodDetails; -type DeleteSubscriptionPaymentMethodDetails = { +/** @returns {DeleteSubscriptionPaymentMethodResponse} */ +declare function DeleteSubscriptionPaymentMethodResponse(): DeleteSubscriptionPaymentMethodResponse; +type DeleteSubscriptionPaymentMethodResponse = { /** * - Success or failure. */ success: boolean; }; -/** @returns {SubscriptionConfigDetails} */ -declare function SubscriptionConfigDetails(): SubscriptionConfigDetails; -type SubscriptionConfigDetails = { +/** @returns {SubscriptionConfigResponse} */ +declare function SubscriptionConfigResponse(): SubscriptionConfigResponse; +type SubscriptionConfigResponse = { /** * - Aggregator Name */ @@ -2053,17 +2049,17 @@ type SubscriptionConfigDetails = { */ success: boolean; }; -/** @returns {SaveSubscriptionSetupIntentCreation} */ -declare function SaveSubscriptionSetupIntentCreation(): SaveSubscriptionSetupIntentCreation; -type SaveSubscriptionSetupIntentCreation = { +/** @returns {SaveSubscriptionSetupIntentRequest} */ +declare function SaveSubscriptionSetupIntentRequest(): SaveSubscriptionSetupIntentRequest; +type SaveSubscriptionSetupIntentRequest = { /** * - Unique id i.e company:id */ unique_external_id: string; }; -/** @returns {SaveSubscriptionSetupIntentDetails} */ -declare function SaveSubscriptionSetupIntentDetails(): SaveSubscriptionSetupIntentDetails; -type SaveSubscriptionSetupIntentDetails = { +/** @returns {SaveSubscriptionSetupIntentResponse} */ +declare function SaveSubscriptionSetupIntentResponse(): SaveSubscriptionSetupIntentResponse; +type SaveSubscriptionSetupIntentResponse = { /** * - Subscription Payment Method Object */ @@ -2073,9 +2069,9 @@ type SaveSubscriptionSetupIntentDetails = { */ success: boolean; }; -/** @returns {RefundAccountDetails} */ -declare function RefundAccountDetails(): RefundAccountDetails; -type RefundAccountDetails = { +/** @returns {RefundAccountResponse} */ +declare function RefundAccountResponse(): RefundAccountResponse; +type RefundAccountResponse = { /** * - Account is verified or not */ @@ -2133,18 +2129,18 @@ type BankDetailsForOTP = { */ account_holder: string; }; -/** @returns {AddBeneficiaryDetailsOTPCreation} */ -declare function AddBeneficiaryDetailsOTPCreation(): AddBeneficiaryDetailsOTPCreation; -type AddBeneficiaryDetailsOTPCreation = { +/** @returns {AddBeneficiaryDetailsOTPRequest} */ +declare function AddBeneficiaryDetailsOTPRequest(): AddBeneficiaryDetailsOTPRequest; +type AddBeneficiaryDetailsOTPRequest = { /** * - Order_id for which account will be added */ order_id: string; details: BankDetailsForOTP; }; -/** @returns {IfscCodeDetails} */ -declare function IfscCodeDetails(): IfscCodeDetails; -type IfscCodeDetails = { +/** @returns {IfscCodeResponse} */ +declare function IfscCodeResponse(): IfscCodeResponse; +type IfscCodeResponse = { /** * - Branch Name Of Account */ @@ -2238,9 +2234,9 @@ type OrderBeneficiaryDetails = { */ mobile?: string; }; -/** @returns {OrderBeneficiaryFetchResults} */ -declare function OrderBeneficiaryFetchResults(): OrderBeneficiaryFetchResults; -type OrderBeneficiaryFetchResults = { +/** @returns {OrderBeneficiaryResponse} */ +declare function OrderBeneficiaryResponse(): OrderBeneficiaryResponse; +type OrderBeneficiaryResponse = { /** * - All Beneficiaries Of An Order */ @@ -2300,18 +2296,18 @@ type MultiTenderPaymentMethod = { */ mode: string; }; -/** @returns {PaymentConfirmationCreation} */ -declare function PaymentConfirmationCreation(): PaymentConfirmationCreation; -type PaymentConfirmationCreation = { +/** @returns {PaymentConfirmationRequest} */ +declare function PaymentConfirmationRequest(): PaymentConfirmationRequest; +type PaymentConfirmationRequest = { /** * - Unique order id */ order_id: string; payment_methods: MultiTenderPaymentMethod[]; }; -/** @returns {PaymentConfirmationDetails} */ -declare function PaymentConfirmationDetails(): PaymentConfirmationDetails; -type PaymentConfirmationDetails = { +/** @returns {PaymentConfirmationResponse} */ +declare function PaymentConfirmationResponse(): PaymentConfirmationResponse; +type PaymentConfirmationResponse = { /** * - Unique order id */ @@ -2386,9 +2382,9 @@ type CODPaymentLimitConfig = { remaining_limit: number; limit: CODLimitConfig; }; -/** @returns {GetUserBULimitResponseSchema} */ -declare function GetUserBULimitResponseSchema(): GetUserBULimitResponseSchema; -type GetUserBULimitResponseSchema = { +/** @returns {GetUserBULimitResponse} */ +declare function GetUserBULimitResponse(): GetUserBULimitResponse; +type GetUserBULimitResponse = { /** * - COD limit business unit */ @@ -2399,10 +2395,10 @@ type GetUserBULimitResponseSchema = { display_name: string; config: CODPaymentLimitConfig; }; -/** @returns {GetUserCODLimitDetails} */ -declare function GetUserCODLimitDetails(): GetUserCODLimitDetails; -type GetUserCODLimitDetails = { - items: GetUserBULimitResponseSchema[]; +/** @returns {GetUserCODLimitResponse} */ +declare function GetUserCODLimitResponse(): GetUserCODLimitResponse; +type GetUserCODLimitResponse = { + items: GetUserBULimitResponse[]; /** * - Response is successful or not */ @@ -2412,9 +2408,9 @@ type GetUserCODLimitDetails = { */ message?: string; }; -/** @returns {SetCODForUserCreation} */ -declare function SetCODForUserCreation(): SetCODForUserCreation; -type SetCODForUserCreation = { +/** @returns {SetCODForUserRequest} */ +declare function SetCODForUserRequest(): SetCODForUserRequest; +type SetCODForUserRequest = { /** * - Business unit */ @@ -2432,9 +2428,9 @@ type SetCODForUserCreation = { */ merchant_user_id: string; }; -/** @returns {SetCODOptionDetails} */ -declare function SetCODOptionDetails(): SetCODOptionDetails; -type SetCODOptionDetails = { +/** @returns {SetCODOptionResponse} */ +declare function SetCODOptionResponse(): SetCODOptionResponse; +type SetCODOptionResponse = { /** * - Message */ @@ -2460,9 +2456,9 @@ type EdcModelData = { */ models: string[]; }; -/** @returns {EdcAggregatorAndModelListDetails} */ -declare function EdcAggregatorAndModelListDetails(): EdcAggregatorAndModelListDetails; -type EdcAggregatorAndModelListDetails = { +/** @returns {EdcAggregatorAndModelListResponse} */ +declare function EdcAggregatorAndModelListResponse(): EdcAggregatorAndModelListResponse; +type EdcAggregatorAndModelListResponse = { /** * - List of aggregators and their edc models */ @@ -2484,18 +2480,18 @@ type StatisticsData = { */ active_device_count: number; }; -/** @returns {EdcDeviceStatsDetails} */ -declare function EdcDeviceStatsDetails(): EdcDeviceStatsDetails; -type EdcDeviceStatsDetails = { +/** @returns {EdcDeviceStatsResponse} */ +declare function EdcDeviceStatsResponse(): EdcDeviceStatsResponse; +type EdcDeviceStatsResponse = { statistics: StatisticsData; /** * - Response is successful or not */ success: boolean; }; -/** @returns {EdcAddCreation} */ -declare function EdcAddCreation(): EdcAddCreation; -type EdcAddCreation = { +/** @returns {EdcAddRequest} */ +declare function EdcAddRequest(): EdcAddRequest; +type EdcAddRequest = { /** * - Model of the edc machine */ @@ -2571,27 +2567,27 @@ type EdcDevice = { */ application_id: string; }; -/** @returns {EdcDeviceAddDetails} */ -declare function EdcDeviceAddDetails(): EdcDeviceAddDetails; -type EdcDeviceAddDetails = { +/** @returns {EdcDeviceAddResponse} */ +declare function EdcDeviceAddResponse(): EdcDeviceAddResponse; +type EdcDeviceAddResponse = { data: EdcDevice; /** * - Response is successful or not */ success: boolean; }; -/** @returns {EdcDeviceDetails} */ -declare function EdcDeviceDetails(): EdcDeviceDetails; -type EdcDeviceDetails = { +/** @returns {EdcDeviceDetailsResponse} */ +declare function EdcDeviceDetailsResponse(): EdcDeviceDetailsResponse; +type EdcDeviceDetailsResponse = { data: EdcDevice; /** * - Response is successful or not */ success: boolean; }; -/** @returns {EdcUpdate} */ -declare function EdcUpdate(): EdcUpdate; -type EdcUpdate = { +/** @returns {EdcUpdateRequest} */ +declare function EdcUpdateRequest(): EdcUpdateRequest; +type EdcUpdateRequest = { /** * - Model of the edc machine */ @@ -2621,9 +2617,9 @@ type EdcUpdate = { */ device_tag?: string; }; -/** @returns {EdcDeviceUpdateDetails} */ -declare function EdcDeviceUpdateDetails(): EdcDeviceUpdateDetails; -type EdcDeviceUpdateDetails = { +/** @returns {EdcDeviceUpdateResponse} */ +declare function EdcDeviceUpdateResponse(): EdcDeviceUpdateResponse; +type EdcDeviceUpdateResponse = { /** * - Response is successful or not */ @@ -2661,9 +2657,9 @@ type Page = { */ size?: number; }; -/** @returns {EdcDeviceListDetails} */ -declare function EdcDeviceListDetails(): EdcDeviceListDetails; -type EdcDeviceListDetails = { +/** @returns {EdcDeviceListResponse} */ +declare function EdcDeviceListResponse(): EdcDeviceListResponse; +type EdcDeviceListResponse = { /** * - List of all edc mapped to the application * options with their Details. @@ -2675,9 +2671,9 @@ type EdcDeviceListDetails = { */ success: boolean; }; -/** @returns {PaymentInitializationCreation} */ -declare function PaymentInitializationCreation(): PaymentInitializationCreation; -type PaymentInitializationCreation = { +/** @returns {PaymentInitializationRequest} */ +declare function PaymentInitializationRequest(): PaymentInitializationRequest; +type PaymentInitializationRequest = { /** * - Payment gateway payment id */ @@ -2731,9 +2727,9 @@ type PaymentInitializationCreation = { */ method: string; }; -/** @returns {PaymentInitializationDetails} */ -declare function PaymentInitializationDetails(): PaymentInitializationDetails; -type PaymentInitializationDetails = { +/** @returns {PaymentInitializationResponse} */ +declare function PaymentInitializationResponse(): PaymentInitializationResponse; +type PaymentInitializationResponse = { /** * - Payment id. */ @@ -2803,9 +2799,9 @@ type PaymentInitializationDetails = { */ method: string; }; -/** @returns {PaymentStatusUpdateCreation} */ -declare function PaymentStatusUpdateCreation(): PaymentStatusUpdateCreation; -type PaymentStatusUpdateCreation = { +/** @returns {PaymentStatusUpdateRequest} */ +declare function PaymentStatusUpdateRequest(): PaymentStatusUpdateRequest; +type PaymentStatusUpdateRequest = { /** * - EDC machine Unique Identifier */ @@ -2859,9 +2855,9 @@ type PaymentStatusUpdateCreation = { */ merchant_transaction_id: string; }; -/** @returns {PaymentStatusUpdateDetails} */ -declare function PaymentStatusUpdateDetails(): PaymentStatusUpdateDetails; -type PaymentStatusUpdateDetails = { +/** @returns {PaymentStatusUpdateResponse} */ +declare function PaymentStatusUpdateResponse(): PaymentStatusUpdateResponse; +type PaymentStatusUpdateResponse = { /** * - Redirect url */ @@ -2883,9 +2879,9 @@ type PaymentStatusUpdateDetails = { */ aggregator_name: string; }; -/** @returns {ResendOrCancelPaymentCreation} */ -declare function ResendOrCancelPaymentCreation(): ResendOrCancelPaymentCreation; -type ResendOrCancelPaymentCreation = { +/** @returns {ResendOrCancelPaymentRequest} */ +declare function ResendOrCancelPaymentRequest(): ResendOrCancelPaymentRequest; +type ResendOrCancelPaymentRequest = { /** * - Unique order id */ @@ -2916,26 +2912,26 @@ type LinkStatus = { */ is_payment_done?: boolean; }; -/** @returns {ResendOrCancelPaymentDetails} */ -declare function ResendOrCancelPaymentDetails(): ResendOrCancelPaymentDetails; -type ResendOrCancelPaymentDetails = { +/** @returns {ResendOrCancelPaymentResponse} */ +declare function ResendOrCancelPaymentResponse(): ResendOrCancelPaymentResponse; +type ResendOrCancelPaymentResponse = { data: LinkStatus; /** * - Response is successful or not. */ success: boolean; }; -/** @returns {PaymentStatusBulkHandlerCreation} */ -declare function PaymentStatusBulkHandlerCreation(): PaymentStatusBulkHandlerCreation; -type PaymentStatusBulkHandlerCreation = { +/** @returns {PaymentStatusBulkHandlerRequest} */ +declare function PaymentStatusBulkHandlerRequest(): PaymentStatusBulkHandlerRequest; +type PaymentStatusBulkHandlerRequest = { /** * - List of order ids */ merchant_order_id: string[]; }; -/** @returns {PaymentObjectList} */ -declare function PaymentObjectList(): PaymentObjectList; -type PaymentObjectList = { +/** @returns {PaymentObjectListSerializer} */ +declare function PaymentObjectListSerializer(): PaymentObjectListSerializer; +type PaymentObjectListSerializer = { user_object: any; modified_on: string; collected_by: string; @@ -2959,20 +2955,20 @@ type PaymentObjectList = { declare function PaymentStatusObject(): PaymentStatusObject; type PaymentStatusObject = { merchant_order_id: string; - payment_object_list?: PaymentObjectList[]; + payment_object_list?: PaymentObjectListSerializer[]; }; -/** @returns {PaymentStatusBulkHandlerDetails} */ -declare function PaymentStatusBulkHandlerDetails(): PaymentStatusBulkHandlerDetails; -type PaymentStatusBulkHandlerDetails = { +/** @returns {PaymentStatusBulkHandlerResponse} */ +declare function PaymentStatusBulkHandlerResponse(): PaymentStatusBulkHandlerResponse; +type PaymentStatusBulkHandlerResponse = { count?: number; data?: PaymentStatusObject[]; success: string; error?: string; status: number; }; -/** @returns {GetOauthUrlDetails} */ -declare function GetOauthUrlDetails(): GetOauthUrlDetails; -type GetOauthUrlDetails = { +/** @returns {GetOauthUrlResponse} */ +declare function GetOauthUrlResponse(): GetOauthUrlResponse; +type GetOauthUrlResponse = { /** * - The url to call for authenticating */ @@ -3059,18 +3055,18 @@ type RepaymentDetailsSerialiserPayAll = { aggregator_order_id: string; shipment_details?: RepaymentRequestDetails[]; }; -/** @returns {RepaymentDetails} */ -declare function RepaymentDetails(): RepaymentDetails; -type RepaymentDetails = { +/** @returns {RepaymentResponse} */ +declare function RepaymentResponse(): RepaymentResponse; +type RepaymentResponse = { data: any; /** * - Success/Failure of the transaction */ success: boolean; }; -/** @returns {MerchantOnBoardingCreation} */ -declare function MerchantOnBoardingCreation(): MerchantOnBoardingCreation; -type MerchantOnBoardingCreation = { +/** @returns {MerchantOnBoardingRequest} */ +declare function MerchantOnBoardingRequest(): MerchantOnBoardingRequest; +type MerchantOnBoardingRequest = { /** * - Merchant ID at Ajiodhan's end */ @@ -3092,18 +3088,18 @@ type MerchantOnBoardingCreation = { */ status: string; }; -/** @returns {MerchantOnBoardingDetails} */ -declare function MerchantOnBoardingDetails(): MerchantOnBoardingDetails; -type MerchantOnBoardingDetails = { +/** @returns {MerchantOnBoardingResponse} */ +declare function MerchantOnBoardingResponse(): MerchantOnBoardingResponse; +type MerchantOnBoardingResponse = { data: any; /** * - Success/Failure of the transaction */ success: boolean; }; -/** @returns {ValidateCustomerCreation} */ -declare function ValidateCustomerCreation(): ValidateCustomerCreation; -type ValidateCustomerCreation = { +/** @returns {ValidateCustomerRequest} */ +declare function ValidateCustomerRequest(): ValidateCustomerRequest; +type ValidateCustomerRequest = { /** * - User mobile number without country code. */ @@ -3137,9 +3133,9 @@ type ValidateCustomerCreation = { */ billing_address?: any; }; -/** @returns {ValidateCustomerDetails} */ -declare function ValidateCustomerDetails(): ValidateCustomerDetails; -type ValidateCustomerDetails = { +/** @returns {ValidateCustomerResponse} */ +declare function ValidateCustomerResponse(): ValidateCustomerResponse; +type ValidateCustomerResponse = { /** * - Error or success message. */ @@ -3153,9 +3149,9 @@ type ValidateCustomerDetails = { */ success: boolean; }; -/** @returns {GetPaymentLinkDetails} */ -declare function GetPaymentLinkDetails(): GetPaymentLinkDetails; -type GetPaymentLinkDetails = { +/** @returns {GetPaymentLinkResponse} */ +declare function GetPaymentLinkResponse(): GetPaymentLinkResponse; +type GetPaymentLinkResponse = { /** * - Message */ @@ -3230,9 +3226,9 @@ type ErrorDescription = { */ cancelled?: boolean; }; -/** @returns {ErrorDetails} */ -declare function ErrorDetails(): ErrorDetails; -type ErrorDetails = { +/** @returns {ErrorResponse} */ +declare function ErrorResponse(): ErrorResponse; +type ErrorResponse = { /** * - HTTP status code */ @@ -3268,9 +3264,9 @@ type CreatePaymentLinkMeta = { */ assign_card_id?: string; }; -/** @returns {CreatePaymentLinkCreation} */ -declare function CreatePaymentLinkCreation(): CreatePaymentLinkCreation; -type CreatePaymentLinkCreation = { +/** @returns {CreatePaymentLinkRequest} */ +declare function CreatePaymentLinkRequest(): CreatePaymentLinkRequest; +type CreatePaymentLinkRequest = { /** * - Email to which the payment link is to be sent */ @@ -3297,20 +3293,10 @@ type CreatePaymentLinkCreation = { * - Merchant order id */ external_order_id: string; - /** - * - URL to which the user will be - * redirected after a successful payment. - */ - success_redirection_url?: string; - /** - * - URL to which the user will be - * redirected if the payment fails. - */ - failure_redirection_url?: string; }; -/** @returns {CreatePaymentLinkDetails} */ -declare function CreatePaymentLinkDetails(): CreatePaymentLinkDetails; -type CreatePaymentLinkDetails = { +/** @returns {CreatePaymentLinkResponse} */ +declare function CreatePaymentLinkResponse(): CreatePaymentLinkResponse; +type CreatePaymentLinkResponse = { /** * - Message */ @@ -3336,9 +3322,9 @@ type CreatePaymentLinkDetails = { */ payment_link_id?: string; }; -/** @returns {PollingPaymentLinkDetails} */ -declare function PollingPaymentLinkDetails(): PollingPaymentLinkDetails; -type PollingPaymentLinkDetails = { +/** @returns {PollingPaymentLinkResponse} */ +declare function PollingPaymentLinkResponse(): PollingPaymentLinkResponse; +type PollingPaymentLinkResponse = { /** * - Message */ @@ -3380,17 +3366,17 @@ type PollingPaymentLinkDetails = { */ aggregator_name?: string; }; -/** @returns {CancelOrResendPaymentLinkCreation} */ -declare function CancelOrResendPaymentLinkCreation(): CancelOrResendPaymentLinkCreation; -type CancelOrResendPaymentLinkCreation = { +/** @returns {CancelOrResendPaymentLinkRequest} */ +declare function CancelOrResendPaymentLinkRequest(): CancelOrResendPaymentLinkRequest; +type CancelOrResendPaymentLinkRequest = { /** * - Unique id of payment link */ payment_link_id: string; }; -/** @returns {ResendPaymentLinkDetails} */ -declare function ResendPaymentLinkDetails(): ResendPaymentLinkDetails; -type ResendPaymentLinkDetails = { +/** @returns {ResendPaymentLinkResponse} */ +declare function ResendPaymentLinkResponse(): ResendPaymentLinkResponse; +type ResendPaymentLinkResponse = { /** * - HTTP status code */ @@ -3408,9 +3394,9 @@ type ResendPaymentLinkDetails = { */ success: boolean; }; -/** @returns {CancelPaymentLinkDetails} */ -declare function CancelPaymentLinkDetails(): CancelPaymentLinkDetails; -type CancelPaymentLinkDetails = { +/** @returns {CancelPaymentLinkResponse} */ +declare function CancelPaymentLinkResponse(): CancelPaymentLinkResponse; +type CancelPaymentLinkResponse = { /** * - HTTP status code */ @@ -3462,18 +3448,18 @@ declare function GetPaymentCode(): GetPaymentCode; type GetPaymentCode = { method_code: PaymentCode; }; -/** @returns {GetPaymentCodeDetails} */ -declare function GetPaymentCodeDetails(): GetPaymentCodeDetails; -type GetPaymentCodeDetails = { +/** @returns {GetPaymentCodeResponse} */ +declare function GetPaymentCodeResponse(): GetPaymentCodeResponse; +type GetPaymentCodeResponse = { data: GetPaymentCode; /** * - Response is successful or not. */ success: boolean; }; -/** @returns {PlatformPaymentModeDetails} */ -declare function PlatformPaymentModeDetails(): PlatformPaymentModeDetails; -type PlatformPaymentModeDetails = { +/** @returns {PlatformPaymentModeResponse} */ +declare function PlatformPaymentModeResponse(): PlatformPaymentModeResponse; +type PlatformPaymentModeResponse = { /** * - Message */ @@ -3487,9 +3473,9 @@ type PlatformPaymentModeDetails = { */ success: boolean; }; -/** @returns {MerchnatPaymentModeCreation} */ -declare function MerchnatPaymentModeCreation(): MerchnatPaymentModeCreation; -type MerchnatPaymentModeCreation = { +/** @returns {MerchnatPaymentModeRequest} */ +declare function MerchnatPaymentModeRequest(): MerchnatPaymentModeRequest; +type MerchnatPaymentModeRequest = { /** * - Details to be updated for online payment configuration. */ @@ -3715,9 +3701,9 @@ type PaymentSessionDetail = { */ status: string; }; -/** @returns {PaymentSessionCreation} */ -declare function PaymentSessionCreation(): PaymentSessionCreation; -type PaymentSessionCreation = { +/** @returns {PaymentSessionRequestSerializer} */ +declare function PaymentSessionRequestSerializer(): PaymentSessionRequestSerializer; +type PaymentSessionRequestSerializer = { /** * - Extra meta data specific to extensions */ @@ -3758,9 +3744,9 @@ type PaymentSessionCreation = { */ source?: string; }; -/** @returns {PaymentSessionPutDetails} */ -declare function PaymentSessionPutDetails(): PaymentSessionPutDetails; -type PaymentSessionPutDetails = { +/** @returns {PaymentSessionResponseSerializer} */ +declare function PaymentSessionResponseSerializer(): PaymentSessionResponseSerializer; +type PaymentSessionResponseSerializer = { /** * - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by @@ -3843,9 +3829,9 @@ type RefundSessionDetail = { */ balance_transaction?: string; }; -/** @returns {RefundSessionCreation} */ -declare function RefundSessionCreation(): RefundSessionCreation; -type RefundSessionCreation = { +/** @returns {RefundSessionRequestSerializer} */ +declare function RefundSessionRequestSerializer(): RefundSessionRequestSerializer; +type RefundSessionRequestSerializer = { /** * - Meta */ @@ -3886,9 +3872,9 @@ type RefundSessionCreation = { */ checksum: string; }; -/** @returns {RefundSessionDetails} */ -declare function RefundSessionDetails(): RefundSessionDetails; -type RefundSessionDetails = { +/** @returns {RefundSessionResponseSerializer} */ +declare function RefundSessionResponseSerializer(): RefundSessionResponseSerializer; +type RefundSessionResponseSerializer = { /** * - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by @@ -3912,9 +3898,9 @@ type RefundSessionDetails = { */ total_refund_amount: number; }; -/** @returns {PaymentDetails} */ -declare function PaymentDetails(): PaymentDetails; -type PaymentDetails = { +/** @returns {PaymentDetailsSerializer} */ +declare function PaymentDetailsSerializer(): PaymentDetailsSerializer; +type PaymentDetailsSerializer = { /** * - List of payment methods */ @@ -4008,9 +3994,9 @@ type PaymentDetails = { */ aggregator_order_id?: string; }; -/** @returns {CartDetails} */ -declare function CartDetails(): CartDetails; -type CartDetails = { +/** @returns {CartDetailsSerializer} */ +declare function CartDetailsSerializer(): CartDetailsSerializer; +type CartDetailsSerializer = { /** * - Items that are added in cart */ @@ -4033,9 +4019,9 @@ type CartDetails = { */ custom_cart_meta?: any; }; -/** @returns {RefundDetails} */ -declare function RefundDetails(): RefundDetails; -type RefundDetails = { +/** @returns {RefundDetailsSerializer} */ +declare function RefundDetailsSerializer(): RefundDetailsSerializer; +type RefundDetailsSerializer = { /** * - Refunded amount */ @@ -4061,9 +4047,9 @@ type RefundDetails = { */ refund_utr: string; }; -/** @returns {PaymentSessionFetchDetails} */ -declare function PaymentSessionFetchDetails(): PaymentSessionFetchDetails; -type PaymentSessionFetchDetails = { +/** @returns {PaymentSessionSerializer} */ +declare function PaymentSessionSerializer(): PaymentSessionSerializer; +type PaymentSessionSerializer = { /** * - Object of payment details */ @@ -4086,11 +4072,11 @@ type PaymentSessionFetchDetails = { * Fynd payments platform and is unique. */ gid: string; - cart_details?: CartDetails; + cart_details?: CartDetailsSerializer; /** * - Object of refund details */ - refund_details: RefundDetails[]; + refund_details: RefundDetailsSerializer[]; }; /** @returns {RefundSourcesPriority} */ declare function RefundSourcesPriority(): RefundSourcesPriority; @@ -4108,9 +4094,9 @@ type RefundSourcesPriority = { */ source: string; }; -/** @returns {RefundPriorityDetails} */ -declare function RefundPriorityDetails(): RefundPriorityDetails; -type RefundPriorityDetails = { +/** @returns {RefundPriorityResponseSerializer} */ +declare function RefundPriorityResponseSerializer(): RefundPriorityResponseSerializer; +type RefundPriorityResponseSerializer = { /** * - Configuration for merchant or customer */ @@ -4132,9 +4118,9 @@ type RefundPriorityDetails = { */ message?: string; }; -/** @returns {RefundPriorityCreation} */ -declare function RefundPriorityCreation(): RefundPriorityCreation; -type RefundPriorityCreation = { +/** @returns {RefundPriorityRequestSerializer} */ +declare function RefundPriorityRequestSerializer(): RefundPriorityRequestSerializer; +type RefundPriorityRequestSerializer = { /** * - Apportion refund to multiple sources */ @@ -4144,9 +4130,9 @@ type RefundPriorityCreation = { */ refund_sources_priority: RefundSourcesPriority[]; }; -/** @returns {MerchantPaymentModeCreation} */ -declare function MerchantPaymentModeCreation(): MerchantPaymentModeCreation; -type MerchantPaymentModeCreation = { +/** @returns {MerchantPaymentModeRequest} */ +declare function MerchantPaymentModeRequest(): MerchantPaymentModeRequest; +type MerchantPaymentModeRequest = { /** * - Business unit */ @@ -4184,9 +4170,9 @@ type ToConfig = { */ business_unit: string; }; -/** @returns {PlatformPaymentModeCopyConfigCreation} */ -declare function PlatformPaymentModeCopyConfigCreation(): PlatformPaymentModeCopyConfigCreation; -type PlatformPaymentModeCopyConfigCreation = { +/** @returns {PlatformPaymentModeCopyConfigRequest} */ +declare function PlatformPaymentModeCopyConfigRequest(): PlatformPaymentModeCopyConfigRequest; +type PlatformPaymentModeCopyConfigRequest = { from_config: FromConfig; to_config: ToConfig; }; @@ -4227,9 +4213,9 @@ type PaymentOrderMethods = { */ name: string; }; -/** @returns {PaymentOrderCreation} */ -declare function PaymentOrderCreation(): PaymentOrderCreation; -type PaymentOrderCreation = { +/** @returns {PaymentOrderRequest} */ +declare function PaymentOrderRequest(): PaymentOrderRequest; +type PaymentOrderRequest = { /** * - Order id */ @@ -4284,9 +4270,9 @@ type PaymentOrderData = { */ merchant_order_id?: string; }; -/** @returns {PaymentOrderDetails} */ -declare function PaymentOrderDetails(): PaymentOrderDetails; -type PaymentOrderDetails = { +/** @returns {PaymentOrderResponse} */ +declare function PaymentOrderResponse(): PaymentOrderResponse; +type PaymentOrderResponse = { /** * - Message */ @@ -4320,9 +4306,9 @@ type AggregatorVersionItemSchema = { is_less_than?: string; is_greater_than?: string; }; -/** @returns {AggregatorVersionDetails} */ -declare function AggregatorVersionDetails(): AggregatorVersionDetails; -type AggregatorVersionDetails = { +/** @returns {AggregatorVersionResponse} */ +declare function AggregatorVersionResponse(): AggregatorVersionResponse; +type AggregatorVersionResponse = { /** * - Message */ @@ -4340,9 +4326,9 @@ type AggregatorVersionRequestSchema = { is_less_than?: string; is_greater_than?: string; }; -/** @returns {PatchAggregatorControl} */ -declare function PatchAggregatorControl(): PatchAggregatorControl; -type PatchAggregatorControl = { +/** @returns {AggregatorControlRequest} */ +declare function AggregatorControlRequest(): AggregatorControlRequest; +type AggregatorControlRequest = { /** * - Business unit */ diff --git a/sdk/platform/Payment/PaymentPlatformModel.js b/sdk/platform/Payment/PaymentPlatformModel.js index ef984bd50..d9fa95498 100644 --- a/sdk/platform/Payment/PaymentPlatformModel.js +++ b/sdk/platform/Payment/PaymentPlatformModel.js @@ -1,7 +1,7 @@ const Joi = require("joi"); /** - * @typedef PaymentGatewayConfigDetails + * @typedef PaymentGatewayConfigResponse * @property {Object[]} [aggregators] - List of all config specific to the * aggregator with their Details. * @property {string} app_id - Application Id to which Payment config Mapped @@ -29,7 +29,7 @@ const Joi = require("joi"); */ /** - * @typedef PaymentGatewayConfigCreation + * @typedef PaymentGatewayConfigRequest * @property {string} app_id - Application Id to which Payment config Mapped * @property {boolean} [is_active] - Enable or Disable Flag * @property {PaymentGatewayConfig} [aggregator_name] @@ -48,7 +48,7 @@ const Joi = require("joi"); */ /** - * @typedef HttpErrorDetails + * @typedef HttpErrorCodeAndResponse * @property {ErrorCodeAndDescription} error * @property {boolean} success - Response is successful or not */ @@ -62,11 +62,11 @@ const Joi = require("joi"); /** * @typedef ProductCODData * @property {Object} [items] - Item id with its cod availability. - * @property {CODChargesLimitsDetails} [cod_charges] + * @property {CODChargesLimitsResponse} [cod_charges] */ /** - * @typedef CODChargesLimitsDetails + * @typedef CODChargesLimitsResponse * @property {number} [max_cart_value] - Max allowed cart value for cod order. * @property {number} [min_cart_value] - Min allowed cart value for cod order. * @property {number} [cod_charge] - Cod charges to be applied on order. @@ -221,7 +221,7 @@ const Joi = require("joi"); */ /** - * @typedef PaymentModeRouteDetails + * @typedef PaymentModeRouteResponse * @property {PaymentOptionAndFlow} payment_options * @property {boolean} success - Response is successful or not * @property {Object} [payment_breakup] - Payment Breakup for advance payment @@ -229,7 +229,7 @@ const Joi = require("joi"); */ /** - * @typedef PaymentOptionsDetails + * @typedef PaymentOptionsResponse * @property {PaymentOptions} payment_options * @property {boolean} success - Response is successful or not * @property {Object} [payment_breakup] - Payment Breakup for advance payment @@ -276,7 +276,7 @@ const Joi = require("joi"); */ /** - * @typedef PayoutsDetails + * @typedef PayoutsResponse * @property {boolean} success - Response is successful or not * @property {Payout[]} items - Contains list of PayoutSchema */ @@ -296,7 +296,7 @@ const Joi = require("joi"); */ /** - * @typedef PayoutCreation + * @typedef PayoutRequest * @property {string} aggregator - Aggregator Name * @property {Object} users - Payout users object * @property {string} unique_external_id - Unique Id of Payout @@ -306,7 +306,7 @@ const Joi = require("joi"); */ /** - * @typedef PayoutDetails + * @typedef PayoutResponse * @property {string} payment_status - Status of payment * @property {Object} users - Users details object * @property {string} aggregator - Aggregator Name @@ -320,55 +320,55 @@ const Joi = require("joi"); */ /** - * @typedef UpdatePayoutDetails + * @typedef UpdatePayoutResponse * @property {boolean} is_default - Enable or Disable Default Payout * @property {boolean} is_active - Enable or DIsable Flag Payout * @property {boolean} success - Response is successful or not */ /** - * @typedef UpdatePayoutCreation + * @typedef UpdatePayoutRequest * @property {boolean} is_default - Enable or Disable Default Payout * @property {boolean} is_active - Enable or Disable Flag Payout * @property {string} unique_external_id - Unique Id of Payout */ /** - * @typedef DeletePayoutDetails + * @typedef DeletePayoutResponse * @property {boolean} success - Response is successful or not */ /** - * @typedef SubscriptionPaymentMethodDetails + * @typedef SubscriptionPaymentMethodResponse * @property {Object[]} data - Subscription Payment Method Object * @property {boolean} success - Response is successful or not */ /** - * @typedef DeleteSubscriptionPaymentMethodDetails + * @typedef DeleteSubscriptionPaymentMethodResponse * @property {boolean} success - Success or failure. */ /** - * @typedef SubscriptionConfigDetails + * @typedef SubscriptionConfigResponse * @property {string} aggregator - Aggregator Name * @property {Object} config - Aggregator Config * @property {boolean} success - Response is successful or not */ /** - * @typedef SaveSubscriptionSetupIntentCreation + * @typedef SaveSubscriptionSetupIntentRequest * @property {string} unique_external_id - Unique id i.e company:id */ /** - * @typedef SaveSubscriptionSetupIntentDetails + * @typedef SaveSubscriptionSetupIntentResponse * @property {Object} data - Subscription Payment Method Object * @property {boolean} success - Response is successful or not */ /** - * @typedef RefundAccountDetails + * @typedef RefundAccountResponse * @property {boolean} [is_verified_flag] - Account is verified or not * @property {string} [message] - Response message * @property {Object} data - Refund account data. @@ -392,13 +392,13 @@ const Joi = require("joi"); */ /** - * @typedef AddBeneficiaryDetailsOTPCreation + * @typedef AddBeneficiaryDetailsOTPRequest * @property {string} order_id - Order_id for which account will be added * @property {BankDetailsForOTP} details */ /** - * @typedef IfscCodeDetails + * @typedef IfscCodeResponse * @property {string} branch_name - Branch Name Of Account * @property {boolean} [success] - Response is successful or not * @property {string} bank_name - Bank Name Of Account @@ -428,7 +428,7 @@ const Joi = require("joi"); */ /** - * @typedef OrderBeneficiaryFetchResults + * @typedef OrderBeneficiaryResponse * @property {OrderBeneficiaryDetails[]} [beneficiaries] - All Beneficiaries Of An Order * @property {boolean} [show_beneficiary_details] - Show beneficiary details or not. */ @@ -457,13 +457,13 @@ const Joi = require("joi"); */ /** - * @typedef PaymentConfirmationCreation + * @typedef PaymentConfirmationRequest * @property {string} order_id - Unique order id * @property {MultiTenderPaymentMethod[]} payment_methods */ /** - * @typedef PaymentConfirmationDetails + * @typedef PaymentConfirmationResponse * @property {string} order_id - Unique order id * @property {string} message - Message * @property {boolean} success - Payment confirmation updated or not. @@ -495,21 +495,21 @@ const Joi = require("joi"); */ /** - * @typedef GetUserBULimitResponseSchema + * @typedef GetUserBULimitResponse * @property {string} business_unit - COD limit business unit * @property {string} display_name - Display name for cod limit * @property {CODPaymentLimitConfig} config */ /** - * @typedef GetUserCODLimitDetails - * @property {GetUserBULimitResponseSchema[]} items + * @typedef GetUserCODLimitResponse + * @property {GetUserBULimitResponse[]} items * @property {boolean} success - Response is successful or not * @property {string} [message] - Message for cod limit */ /** - * @typedef SetCODForUserCreation + * @typedef SetCODForUserRequest * @property {string} [business_unit] - Business unit * @property {string} mobileno - Mobile No. of User * @property {boolean} is_active - Either true or false @@ -517,7 +517,7 @@ const Joi = require("joi"); */ /** - * @typedef SetCODOptionDetails + * @typedef SetCODOptionResponse * @property {string} message - Message * @property {boolean} success - Response is successful or not */ @@ -530,7 +530,7 @@ const Joi = require("joi"); */ /** - * @typedef EdcAggregatorAndModelListDetails + * @typedef EdcAggregatorAndModelListResponse * @property {EdcModelData[]} data - List of aggregators and their edc models * @property {boolean} success - Response is successful or not */ @@ -542,13 +542,13 @@ const Joi = require("joi"); */ /** - * @typedef EdcDeviceStatsDetails + * @typedef EdcDeviceStatsResponse * @property {StatisticsData} statistics * @property {boolean} success - Response is successful or not */ /** - * @typedef EdcAddCreation + * @typedef EdcAddRequest * @property {string} edc_model - Model of the edc machine * @property {number} store_id - Store at which devices is to used * @property {number} aggregator_id - Aggregator which will accept payment @@ -575,19 +575,19 @@ const Joi = require("joi"); */ /** - * @typedef EdcDeviceAddDetails + * @typedef EdcDeviceAddResponse * @property {EdcDevice} data * @property {boolean} success - Response is successful or not */ /** - * @typedef EdcDeviceDetails + * @typedef EdcDeviceDetailsResponse * @property {EdcDevice} data * @property {boolean} success - Response is successful or not */ /** - * @typedef EdcUpdate + * @typedef EdcUpdateRequest * @property {string} [edc_model] - Model of the edc machine * @property {number} [store_id] - Store at which devices is to used * @property {number} [aggregator_id] - Aggregator which will accept payment @@ -598,7 +598,7 @@ const Joi = require("joi"); */ /** - * @typedef EdcDeviceUpdateDetails + * @typedef EdcDeviceUpdateResponse * @property {boolean} success - Response is successful or not */ @@ -614,7 +614,7 @@ const Joi = require("joi"); */ /** - * @typedef EdcDeviceListDetails + * @typedef EdcDeviceListResponse * @property {EdcDevice[]} items - List of all edc mapped to the application * options with their Details. * @property {Page} page @@ -622,7 +622,7 @@ const Joi = require("joi"); */ /** - * @typedef PaymentInitializationCreation + * @typedef PaymentInitializationRequest * @property {string} [razorpay_payment_id] - Payment gateway payment id * @property {string} [device_id] - EDC machine Unique Identifier * @property {string} email - Customer valid email @@ -639,7 +639,7 @@ const Joi = require("joi"); */ /** - * @typedef PaymentInitializationDetails + * @typedef PaymentInitializationResponse * @property {string} [razorpay_payment_id] - Payment id. * @property {string} [device_id] - EDC machine Unique Identifier * @property {string} [upi_poll_url] - UPI poll url. @@ -660,7 +660,7 @@ const Joi = require("joi"); */ /** - * @typedef PaymentStatusUpdateCreation + * @typedef PaymentStatusUpdateRequest * @property {string} [device_id] - EDC machine Unique Identifier * @property {string} email - Customer valid email * @property {string} customer_id - Payment gateway customer id. @@ -677,7 +677,7 @@ const Joi = require("joi"); */ /** - * @typedef PaymentStatusUpdateDetails + * @typedef PaymentStatusUpdateResponse * @property {string} [redirect_url] - Redirect url * @property {boolean} retry - Response is successful or not. * @property {boolean} [success] - Response is successful or not @@ -686,7 +686,7 @@ const Joi = require("joi"); */ /** - * @typedef ResendOrCancelPaymentCreation + * @typedef ResendOrCancelPaymentRequest * @property {string} order_id - Unique order id * @property {string} [device_id] - EDC machine Unique Identifier * @property {string} request_type - Either resend or cancel @@ -701,18 +701,18 @@ const Joi = require("joi"); */ /** - * @typedef ResendOrCancelPaymentDetails + * @typedef ResendOrCancelPaymentResponse * @property {LinkStatus} data * @property {boolean} success - Response is successful or not. */ /** - * @typedef PaymentStatusBulkHandlerCreation + * @typedef PaymentStatusBulkHandlerRequest * @property {string[]} merchant_order_id - List of order ids */ /** - * @typedef PaymentObjectList + * @typedef PaymentObjectListSerializer * @property {Object} user_object * @property {string} modified_on * @property {string} collected_by @@ -736,11 +736,11 @@ const Joi = require("joi"); /** * @typedef PaymentStatusObject * @property {string} merchant_order_id - * @property {PaymentObjectList[]} [payment_object_list] + * @property {PaymentObjectListSerializer[]} [payment_object_list] */ /** - * @typedef PaymentStatusBulkHandlerDetails + * @typedef PaymentStatusBulkHandlerResponse * @property {number} [count] * @property {PaymentStatusObject[]} [data] * @property {string} success @@ -749,7 +749,7 @@ const Joi = require("joi"); */ /** - * @typedef GetOauthUrlDetails + * @typedef GetOauthUrlResponse * @property {string} url - The url to call for authenticating * @property {boolean} success - Response is successful or not */ @@ -784,13 +784,13 @@ const Joi = require("joi"); */ /** - * @typedef RepaymentDetails + * @typedef RepaymentResponse * @property {Object} data * @property {boolean} success - Success/Failure of the transaction */ /** - * @typedef MerchantOnBoardingCreation + * @typedef MerchantOnBoardingRequest * @property {string} credit_line_id - Merchant ID at Ajiodhan's end * @property {string} aggregator - Payment aggregator name * @property {string} app_id - Application id @@ -799,13 +799,13 @@ const Joi = require("joi"); */ /** - * @typedef MerchantOnBoardingDetails + * @typedef MerchantOnBoardingResponse * @property {Object} data * @property {boolean} success - Success/Failure of the transaction */ /** - * @typedef ValidateCustomerCreation + * @typedef ValidateCustomerRequest * @property {string} phone_number - User mobile number without country code. * @property {string} aggregator - Payment gateway name in camel case i.e Simpl, Rupifi * @property {string} [payload] - Hashed payload string. @@ -817,14 +817,14 @@ const Joi = require("joi"); */ /** - * @typedef ValidateCustomerDetails + * @typedef ValidateCustomerResponse * @property {string} message - Error or success message. * @property {Object} [data] - Payment gateway response data * @property {boolean} success - Response is successful or not */ /** - * @typedef GetPaymentLinkDetails + * @typedef GetPaymentLinkResponse * @property {string} message - Message * @property {number} status_code - HTTP status code * @property {number} [amount] - Total value of order @@ -850,7 +850,7 @@ const Joi = require("joi"); */ /** - * @typedef ErrorDetails + * @typedef ErrorResponse * @property {number} status_code - HTTP status code * @property {ErrorDescription} [error] * @property {string} message - Message @@ -867,7 +867,7 @@ const Joi = require("joi"); */ /** - * @typedef CreatePaymentLinkCreation + * @typedef CreatePaymentLinkRequest * @property {string} email - Email to which the payment link is to be sent * @property {number} amount - Total value of order * @property {string} mobile_number - Mobile number to which the payment link is @@ -876,14 +876,10 @@ const Joi = require("joi"); * @property {string} [description] - Merchant order id * @property {CreatePaymentLinkMeta} meta * @property {string} external_order_id - Merchant order id - * @property {string} [success_redirection_url] - URL to which the user will be - * redirected after a successful payment. - * @property {string} [failure_redirection_url] - URL to which the user will be - * redirected if the payment fails. */ /** - * @typedef CreatePaymentLinkDetails + * @typedef CreatePaymentLinkResponse * @property {string} message - Message * @property {number} status_code - HTTP status code * @property {string} [payment_link_url] - Url of payment link @@ -893,7 +889,7 @@ const Joi = require("joi"); */ /** - * @typedef PollingPaymentLinkDetails + * @typedef PollingPaymentLinkResponse * @property {string} [message] - Message * @property {number} [http_status] - HTTP status code * @property {number} [status_code] - HTTP status code @@ -907,12 +903,12 @@ const Joi = require("joi"); */ /** - * @typedef CancelOrResendPaymentLinkCreation + * @typedef CancelOrResendPaymentLinkRequest * @property {string} payment_link_id - Unique id of payment link */ /** - * @typedef ResendPaymentLinkDetails + * @typedef ResendPaymentLinkResponse * @property {number} status_code - HTTP status code * @property {string} message - Message * @property {number} [polling_timeout] - Polling request timeout @@ -920,7 +916,7 @@ const Joi = require("joi"); */ /** - * @typedef CancelPaymentLinkDetails + * @typedef CancelPaymentLinkResponse * @property {number} status_code - HTTP status code * @property {string} message - Message * @property {boolean} success - Successful or failure @@ -947,20 +943,20 @@ const Joi = require("joi"); */ /** - * @typedef GetPaymentCodeDetails + * @typedef GetPaymentCodeResponse * @property {GetPaymentCode} data * @property {boolean} success - Response is successful or not. */ /** - * @typedef PlatformPaymentModeDetails + * @typedef PlatformPaymentModeResponse * @property {string} [message] - Message * @property {Object[]} [items] - List of all aggregator and payment mode details. * @property {boolean} success - Response is successful or not. */ /** - * @typedef MerchnatPaymentModeCreation + * @typedef MerchnatPaymentModeRequest * @property {Object} [offline] - Details to be updated for online payment configuration. * @property {Object} [online] - Details to be updated for offline payment configuration. */ @@ -1041,7 +1037,7 @@ const Joi = require("joi"); */ /** - * @typedef PaymentSessionCreation + * @typedef PaymentSessionRequestSerializer * @property {Object} [meta] - Extra meta data specific to extensions * @property {string} gid - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by @@ -1057,7 +1053,7 @@ const Joi = require("joi"); */ /** - * @typedef PaymentSessionPutDetails + * @typedef PaymentSessionResponseSerializer * @property {string} gid - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by * Fynd payments platform and is unique. @@ -1088,7 +1084,7 @@ const Joi = require("joi"); */ /** - * @typedef RefundSessionCreation + * @typedef RefundSessionRequestSerializer * @property {Object} [meta] - Meta * @property {string} gid - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by @@ -1104,7 +1100,7 @@ const Joi = require("joi"); */ /** - * @typedef RefundSessionDetails + * @typedef RefundSessionResponseSerializer * @property {string} gid - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by * Fynd payments platform and is unique. @@ -1115,7 +1111,7 @@ const Joi = require("joi"); */ /** - * @typedef PaymentDetails + * @typedef PaymentDetailsSerializer * @property {Object[]} payment_methods - List of payment methods * @property {string} gid - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by @@ -1151,7 +1147,7 @@ const Joi = require("joi"); */ /** - * @typedef CartDetails + * @typedef CartDetailsSerializer * @property {Object} items - Items that are added in cart * @property {Object[]} articles - List of articles that are added in cart * @property {number} cart_value - Total cart value i.e. amount to be paid @@ -1161,7 +1157,7 @@ const Joi = require("joi"); */ /** - * @typedef RefundDetails + * @typedef RefundDetailsSerializer * @property {number} amount - Refunded amount * @property {string} currency - The currency of the payment. * @property {string} request_id - Refund request id, unique id generated by Fynd platform @@ -1171,7 +1167,7 @@ const Joi = require("joi"); */ /** - * @typedef PaymentSessionFetchDetails + * @typedef PaymentSessionSerializer * @property {Object} payment_details - Object of payment details * @property {string} [currency] - The currency of the payment. * @property {string} status - The status of the payment session. @@ -1179,8 +1175,8 @@ const Joi = require("joi"); * @property {string} gid - Global identifier of the entity (e.g. order, cart * etc.) against which payment_session was initiated. This is generated by * Fynd payments platform and is unique. - * @property {CartDetails} [cart_details] - * @property {RefundDetails[]} refund_details - Object of refund details + * @property {CartDetailsSerializer} [cart_details] + * @property {RefundDetailsSerializer[]} refund_details - Object of refund details */ /** @@ -1191,7 +1187,7 @@ const Joi = require("joi"); */ /** - * @typedef RefundPriorityDetails + * @typedef RefundPriorityResponseSerializer * @property {string} configuration - Configuration for merchant or customer * @property {boolean} success - Success * @property {boolean} apportion - Apportion refund to multiple sources @@ -1200,13 +1196,13 @@ const Joi = require("joi"); */ /** - * @typedef RefundPriorityCreation + * @typedef RefundPriorityRequestSerializer * @property {boolean} apportion - Apportion refund to multiple sources * @property {RefundSourcesPriority[]} refund_sources_priority - Refund sources priority */ /** - * @typedef MerchantPaymentModeCreation + * @typedef MerchantPaymentModeRequest * @property {string} business_unit - Business unit * @property {Object[]} items - List of item details with respect to payment_mode * @property {Object} device - List of devices and its activation status @@ -1225,7 +1221,7 @@ const Joi = require("joi"); */ /** - * @typedef PlatformPaymentModeCopyConfigCreation + * @typedef PlatformPaymentModeCopyConfigRequest * @property {FromConfig} from_config * @property {ToConfig} to_config */ @@ -1247,7 +1243,7 @@ const Joi = require("joi"); */ /** - * @typedef PaymentOrderCreation + * @typedef PaymentOrderRequest * @property {string} order_id - Order id * @property {PaymentOrderMethods[]} [payment_methods] * @property {string} [shipment_id] - Shipment_id @@ -1268,7 +1264,7 @@ const Joi = require("joi"); */ /** - * @typedef PaymentOrderDetails + * @typedef PaymentOrderResponse * @property {string} message - Message * @property {boolean} success - Successful or failure * @property {string} [payment_confirm_url] - Payment confirm url for aggregator @@ -1286,7 +1282,7 @@ const Joi = require("joi"); */ /** - * @typedef AggregatorVersionDetails + * @typedef AggregatorVersionResponse * @property {string} message - Message * @property {boolean} success - Successful or failure * @property {AggregatorVersionItemSchema} [items] @@ -1300,7 +1296,7 @@ const Joi = require("joi"); */ /** - * @typedef PatchAggregatorControl + * @typedef AggregatorControlRequest * @property {string} [business_unit] - Business unit * @property {Object[]} [items] - List of item details with respect to payment_mode * @property {string} [device] - Device name @@ -1362,8 +1358,8 @@ const Joi = require("joi"); */ class PaymentPlatformModel { - /** @returns {PaymentGatewayConfigDetails} */ - static PaymentGatewayConfigDetails() { + /** @returns {PaymentGatewayConfigResponse} */ + static PaymentGatewayConfigResponse() { return Joi.object({ aggregators: Joi.array().items(Joi.any()), app_id: Joi.string().allow("").required(), @@ -1394,8 +1390,8 @@ class PaymentPlatformModel { }); } - /** @returns {PaymentGatewayConfigCreation} */ - static PaymentGatewayConfigCreation() { + /** @returns {PaymentGatewayConfigRequest} */ + static PaymentGatewayConfigRequest() { return Joi.object({ app_id: Joi.string().allow("").required(), is_active: Joi.boolean().allow(null), @@ -1419,8 +1415,8 @@ class PaymentPlatformModel { }); } - /** @returns {HttpErrorDetails} */ - static HttpErrorDetails() { + /** @returns {HttpErrorCodeAndResponse} */ + static HttpErrorCodeAndResponse() { return Joi.object({ error: PaymentPlatformModel.ErrorCodeAndDescription().required(), success: Joi.boolean().required(), @@ -1438,13 +1434,13 @@ class PaymentPlatformModel { /** @returns {ProductCODData} */ static ProductCODData() { return Joi.object({ - items: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - cod_charges: PaymentPlatformModel.CODChargesLimitsDetails(), + items: Joi.any().allow(null), + cod_charges: PaymentPlatformModel.CODChargesLimitsResponse(), }); } - /** @returns {CODChargesLimitsDetails} */ - static CODChargesLimitsDetails() { + /** @returns {CODChargesLimitsResponse} */ + static CODChargesLimitsResponse() { return Joi.object({ max_cart_value: Joi.number().allow(null), min_cart_value: Joi.number().allow(null), @@ -1544,8 +1540,8 @@ class PaymentPlatformModel { /** @returns {AggregatorRoute} */ static AggregatorRoute() { return Joi.object({ - data: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - payment_flow_data: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + data: Joi.any().allow(null), + payment_flow_data: Joi.any().allow(null), payment_flow: Joi.string().allow("").allow(null), api_link: Joi.string().allow("").allow(null), }).allow(null); @@ -1633,24 +1629,24 @@ class PaymentPlatformModel { }); } - /** @returns {PaymentModeRouteDetails} */ - static PaymentModeRouteDetails() { + /** @returns {PaymentModeRouteResponse} */ + static PaymentModeRouteResponse() { return Joi.object({ payment_options: PaymentPlatformModel.PaymentOptionAndFlow().required(), success: Joi.boolean().required(), - payment_breakup: Joi.object().pattern(/\S/, Joi.any()), + payment_breakup: Joi.any(), advance_payment: Joi.array() .items(PaymentPlatformModel.AdvancePaymentObject()) .allow(null, ""), }); } - /** @returns {PaymentOptionsDetails} */ - static PaymentOptionsDetails() { + /** @returns {PaymentOptionsResponse} */ + static PaymentOptionsResponse() { return Joi.object({ payment_options: PaymentPlatformModel.PaymentOptions().required(), success: Joi.boolean().required(), - payment_breakup: Joi.object().pattern(/\S/, Joi.any()), + payment_breakup: Joi.any(), }); } @@ -1704,8 +1700,8 @@ class PaymentPlatformModel { }); } - /** @returns {PayoutsDetails} */ - static PayoutsDetails() { + /** @returns {PayoutsResponse} */ + static PayoutsResponse() { return Joi.object({ success: Joi.boolean().required(), items: Joi.array().items(PaymentPlatformModel.Payout()).required(), @@ -1728,11 +1724,11 @@ class PaymentPlatformModel { }); } - /** @returns {PayoutCreation} */ - static PayoutCreation() { + /** @returns {PayoutRequest} */ + static PayoutRequest() { return Joi.object({ aggregator: Joi.string().allow("").required(), - users: Joi.object().pattern(/\S/, Joi.any()).required(), + users: Joi.any().required(), unique_external_id: Joi.string().allow("").required(), is_active: Joi.boolean().required(), bank_details: PaymentPlatformModel.PayoutBankDetails().required(), @@ -1740,24 +1736,24 @@ class PaymentPlatformModel { }); } - /** @returns {PayoutDetails} */ - static PayoutDetails() { + /** @returns {PayoutResponse} */ + static PayoutResponse() { return Joi.object({ payment_status: Joi.string().allow("").required(), - users: Joi.object().pattern(/\S/, Joi.any()).required(), + users: Joi.any().required(), aggregator: Joi.string().allow("").required(), unique_transfer_no: Joi.string().allow("").required(), is_active: Joi.boolean().required(), - bank_details: Joi.object().pattern(/\S/, Joi.any()).required(), + bank_details: Joi.any().required(), success: Joi.boolean().required(), transfer_type: Joi.string().allow("").required(), created: Joi.boolean().required(), - payouts: Joi.object().pattern(/\S/, Joi.any()).required(), + payouts: Joi.any().required(), }); } - /** @returns {UpdatePayoutDetails} */ - static UpdatePayoutDetails() { + /** @returns {UpdatePayoutResponse} */ + static UpdatePayoutResponse() { return Joi.object({ is_default: Joi.boolean().required(), is_active: Joi.boolean().required(), @@ -1765,8 +1761,8 @@ class PaymentPlatformModel { }); } - /** @returns {UpdatePayoutCreation} */ - static UpdatePayoutCreation() { + /** @returns {UpdatePayoutRequest} */ + static UpdatePayoutRequest() { return Joi.object({ is_default: Joi.boolean().required(), is_active: Joi.boolean().required(), @@ -1774,58 +1770,58 @@ class PaymentPlatformModel { }); } - /** @returns {DeletePayoutDetails} */ - static DeletePayoutDetails() { + /** @returns {DeletePayoutResponse} */ + static DeletePayoutResponse() { return Joi.object({ success: Joi.boolean().required(), }); } - /** @returns {SubscriptionPaymentMethodDetails} */ - static SubscriptionPaymentMethodDetails() { + /** @returns {SubscriptionPaymentMethodResponse} */ + static SubscriptionPaymentMethodResponse() { return Joi.object({ data: Joi.array().items(Joi.any()).required(), success: Joi.boolean().required(), }); } - /** @returns {DeleteSubscriptionPaymentMethodDetails} */ - static DeleteSubscriptionPaymentMethodDetails() { + /** @returns {DeleteSubscriptionPaymentMethodResponse} */ + static DeleteSubscriptionPaymentMethodResponse() { return Joi.object({ success: Joi.boolean().required(), }); } - /** @returns {SubscriptionConfigDetails} */ - static SubscriptionConfigDetails() { + /** @returns {SubscriptionConfigResponse} */ + static SubscriptionConfigResponse() { return Joi.object({ aggregator: Joi.string().allow("").required(), - config: Joi.object().pattern(/\S/, Joi.any()).required(), + config: Joi.any().required(), success: Joi.boolean().required(), }); } - /** @returns {SaveSubscriptionSetupIntentCreation} */ - static SaveSubscriptionSetupIntentCreation() { + /** @returns {SaveSubscriptionSetupIntentRequest} */ + static SaveSubscriptionSetupIntentRequest() { return Joi.object({ unique_external_id: Joi.string().allow("").required(), }); } - /** @returns {SaveSubscriptionSetupIntentDetails} */ - static SaveSubscriptionSetupIntentDetails() { + /** @returns {SaveSubscriptionSetupIntentResponse} */ + static SaveSubscriptionSetupIntentResponse() { return Joi.object({ - data: Joi.object().pattern(/\S/, Joi.any()).required(), + data: Joi.any().required(), success: Joi.boolean().required(), }); } - /** @returns {RefundAccountDetails} */ - static RefundAccountDetails() { + /** @returns {RefundAccountResponse} */ + static RefundAccountResponse() { return Joi.object({ is_verified_flag: Joi.boolean(), message: Joi.string().allow(""), - data: Joi.object().pattern(/\S/, Joi.any()).required(), + data: Joi.any().required(), success: Joi.boolean().required(), }); } @@ -1850,16 +1846,16 @@ class PaymentPlatformModel { }); } - /** @returns {AddBeneficiaryDetailsOTPCreation} */ - static AddBeneficiaryDetailsOTPCreation() { + /** @returns {AddBeneficiaryDetailsOTPRequest} */ + static AddBeneficiaryDetailsOTPRequest() { return Joi.object({ order_id: Joi.string().allow("").required(), details: PaymentPlatformModel.BankDetailsForOTP().required(), }); } - /** @returns {IfscCodeDetails} */ - static IfscCodeDetails() { + /** @returns {IfscCodeResponse} */ + static IfscCodeResponse() { return Joi.object({ branch_name: Joi.string().allow("").required(), success: Joi.boolean(), @@ -1892,8 +1888,8 @@ class PaymentPlatformModel { }); } - /** @returns {OrderBeneficiaryFetchResults} */ - static OrderBeneficiaryFetchResults() { + /** @returns {OrderBeneficiaryResponse} */ + static OrderBeneficiaryResponse() { return Joi.object({ beneficiaries: Joi.array() .items(PaymentPlatformModel.OrderBeneficiaryDetails()) @@ -1905,7 +1901,7 @@ class PaymentPlatformModel { /** @returns {MultiTenderPaymentMeta} */ static MultiTenderPaymentMeta() { return Joi.object({ - extra_meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + extra_meta: Joi.any().allow(null), order_id: Joi.string().allow(""), payment_id: Joi.string().allow(""), current_status: Joi.string().allow(""), @@ -1924,8 +1920,8 @@ class PaymentPlatformModel { }); } - /** @returns {PaymentConfirmationCreation} */ - static PaymentConfirmationCreation() { + /** @returns {PaymentConfirmationRequest} */ + static PaymentConfirmationRequest() { return Joi.object({ order_id: Joi.string().allow("").required(), payment_methods: Joi.array() @@ -1934,8 +1930,8 @@ class PaymentPlatformModel { }); } - /** @returns {PaymentConfirmationDetails} */ - static PaymentConfirmationDetails() { + /** @returns {PaymentConfirmationResponse} */ + static PaymentConfirmationResponse() { return Joi.object({ order_id: Joi.string().allow("").required(), message: Joi.string().allow("").required(), @@ -1974,8 +1970,8 @@ class PaymentPlatformModel { }); } - /** @returns {GetUserBULimitResponseSchema} */ - static GetUserBULimitResponseSchema() { + /** @returns {GetUserBULimitResponse} */ + static GetUserBULimitResponse() { return Joi.object({ business_unit: Joi.string().allow("").required(), display_name: Joi.string().allow("").required(), @@ -1983,19 +1979,19 @@ class PaymentPlatformModel { }); } - /** @returns {GetUserCODLimitDetails} */ - static GetUserCODLimitDetails() { + /** @returns {GetUserCODLimitResponse} */ + static GetUserCODLimitResponse() { return Joi.object({ items: Joi.array() - .items(PaymentPlatformModel.GetUserBULimitResponseSchema()) + .items(PaymentPlatformModel.GetUserBULimitResponse()) .required(), success: Joi.boolean().required(), message: Joi.string().allow(""), }); } - /** @returns {SetCODForUserCreation} */ - static SetCODForUserCreation() { + /** @returns {SetCODForUserRequest} */ + static SetCODForUserRequest() { return Joi.object({ business_unit: Joi.string().allow(""), mobileno: Joi.string().allow("").required(), @@ -2004,8 +2000,8 @@ class PaymentPlatformModel { }); } - /** @returns {SetCODOptionDetails} */ - static SetCODOptionDetails() { + /** @returns {SetCODOptionResponse} */ + static SetCODOptionResponse() { return Joi.object({ message: Joi.string().allow("").required(), success: Joi.boolean().required(), @@ -2021,8 +2017,8 @@ class PaymentPlatformModel { }); } - /** @returns {EdcAggregatorAndModelListDetails} */ - static EdcAggregatorAndModelListDetails() { + /** @returns {EdcAggregatorAndModelListResponse} */ + static EdcAggregatorAndModelListResponse() { return Joi.object({ data: Joi.array().items(PaymentPlatformModel.EdcModelData()).required(), success: Joi.boolean().required(), @@ -2037,16 +2033,16 @@ class PaymentPlatformModel { }); } - /** @returns {EdcDeviceStatsDetails} */ - static EdcDeviceStatsDetails() { + /** @returns {EdcDeviceStatsResponse} */ + static EdcDeviceStatsResponse() { return Joi.object({ statistics: PaymentPlatformModel.StatisticsData().required(), success: Joi.boolean().required(), }); } - /** @returns {EdcAddCreation} */ - static EdcAddCreation() { + /** @returns {EdcAddRequest} */ + static EdcAddRequest() { return Joi.object({ edc_model: Joi.string().allow("").required(), store_id: Joi.number().required(), @@ -2074,24 +2070,24 @@ class PaymentPlatformModel { }); } - /** @returns {EdcDeviceAddDetails} */ - static EdcDeviceAddDetails() { + /** @returns {EdcDeviceAddResponse} */ + static EdcDeviceAddResponse() { return Joi.object({ data: PaymentPlatformModel.EdcDevice().required(), success: Joi.boolean().required(), }); } - /** @returns {EdcDeviceDetails} */ - static EdcDeviceDetails() { + /** @returns {EdcDeviceDetailsResponse} */ + static EdcDeviceDetailsResponse() { return Joi.object({ data: PaymentPlatformModel.EdcDevice().required(), success: Joi.boolean().required(), }); } - /** @returns {EdcUpdate} */ - static EdcUpdate() { + /** @returns {EdcUpdateRequest} */ + static EdcUpdateRequest() { return Joi.object({ edc_model: Joi.string().allow(""), store_id: Joi.number(), @@ -2103,8 +2099,8 @@ class PaymentPlatformModel { }); } - /** @returns {EdcDeviceUpdateDetails} */ - static EdcDeviceUpdateDetails() { + /** @returns {EdcDeviceUpdateResponse} */ + static EdcDeviceUpdateResponse() { return Joi.object({ success: Joi.boolean().required(), }); @@ -2123,8 +2119,8 @@ class PaymentPlatformModel { }); } - /** @returns {EdcDeviceListDetails} */ - static EdcDeviceListDetails() { + /** @returns {EdcDeviceListResponse} */ + static EdcDeviceListResponse() { return Joi.object({ items: Joi.array().items(PaymentPlatformModel.EdcDevice()).required(), page: PaymentPlatformModel.Page().required(), @@ -2132,8 +2128,8 @@ class PaymentPlatformModel { }); } - /** @returns {PaymentInitializationCreation} */ - static PaymentInitializationCreation() { + /** @returns {PaymentInitializationRequest} */ + static PaymentInitializationRequest() { return Joi.object({ razorpay_payment_id: Joi.string().allow("").allow(null), device_id: Joi.string().allow("").allow(null), @@ -2143,7 +2139,7 @@ class PaymentPlatformModel { aggregator: Joi.string().allow("").required(), order_id: Joi.string().allow("").required(), currency: Joi.string().allow("").required(), - amount: Joi.number().required(), + amount: Joi.number().allow(null).required(), contact: Joi.string().allow("").required(), timeout: Joi.number().allow(null), merchant_order_id: Joi.string().allow("").required(), @@ -2151,8 +2147,8 @@ class PaymentPlatformModel { }); } - /** @returns {PaymentInitializationDetails} */ - static PaymentInitializationDetails() { + /** @returns {PaymentInitializationResponse} */ + static PaymentInitializationResponse() { return Joi.object({ razorpay_payment_id: Joi.string().allow("").allow(null), device_id: Joi.string().allow("").allow(null), @@ -2174,8 +2170,8 @@ class PaymentPlatformModel { }); } - /** @returns {PaymentStatusUpdateCreation} */ - static PaymentStatusUpdateCreation() { + /** @returns {PaymentStatusUpdateRequest} */ + static PaymentStatusUpdateRequest() { return Joi.object({ device_id: Joi.string().allow("").allow(null), email: Joi.string().allow("").required(), @@ -2184,7 +2180,7 @@ class PaymentPlatformModel { aggregator: Joi.string().allow("").required(), order_id: Joi.string().allow("").required(), currency: Joi.string().allow("").required(), - amount: Joi.number().required(), + amount: Joi.number().allow(null).required(), contact: Joi.string().allow("").required(), merchant_order_id: Joi.string().allow("").required(), status: Joi.string().allow("").required(), @@ -2193,8 +2189,8 @@ class PaymentPlatformModel { }); } - /** @returns {PaymentStatusUpdateDetails} */ - static PaymentStatusUpdateDetails() { + /** @returns {PaymentStatusUpdateResponse} */ + static PaymentStatusUpdateResponse() { return Joi.object({ redirect_url: Joi.string().allow("").allow(null), retry: Joi.boolean().required(), @@ -2204,8 +2200,8 @@ class PaymentPlatformModel { }); } - /** @returns {ResendOrCancelPaymentCreation} */ - static ResendOrCancelPaymentCreation() { + /** @returns {ResendOrCancelPaymentRequest} */ + static ResendOrCancelPaymentRequest() { return Joi.object({ order_id: Joi.string().allow("").required(), device_id: Joi.string().allow("").allow(null), @@ -2222,36 +2218,34 @@ class PaymentPlatformModel { }); } - /** @returns {ResendOrCancelPaymentDetails} */ - static ResendOrCancelPaymentDetails() { + /** @returns {ResendOrCancelPaymentResponse} */ + static ResendOrCancelPaymentResponse() { return Joi.object({ data: PaymentPlatformModel.LinkStatus().required(), success: Joi.boolean().required(), }); } - /** @returns {PaymentStatusBulkHandlerCreation} */ - static PaymentStatusBulkHandlerCreation() { + /** @returns {PaymentStatusBulkHandlerRequest} */ + static PaymentStatusBulkHandlerRequest() { return Joi.object({ merchant_order_id: Joi.array().items(Joi.string().allow("")).required(), }); } - /** @returns {PaymentObjectList} */ - static PaymentObjectList() { + /** @returns {PaymentObjectListSerializer} */ + static PaymentObjectListSerializer() { return Joi.object({ - user_object: Joi.object().pattern(/\S/, Joi.any()).required(), + user_object: Joi.any().required(), modified_on: Joi.string().allow("").required(), collected_by: Joi.string().allow("").required(), created_on: Joi.string().allow("").required(), - refund_object: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + refund_object: Joi.any().allow(null), id: Joi.string().allow("").required(), payment_id: Joi.string().allow("").allow(null), currency: Joi.string().allow("").required(), current_status: Joi.string().allow("").required(), - aggregator_payment_object: Joi.object() - .pattern(/\S/, Joi.any()) - .allow(null, ""), + aggregator_payment_object: Joi.any().allow(null), payment_mode: Joi.string().allow("").required(), refunded_by: Joi.string().allow("").required(), amount_in_paisa: Joi.string().allow("").required(), @@ -2268,13 +2262,13 @@ class PaymentPlatformModel { return Joi.object({ merchant_order_id: Joi.string().allow("").required(), payment_object_list: Joi.array().items( - PaymentPlatformModel.PaymentObjectList() + PaymentPlatformModel.PaymentObjectListSerializer() ), }); } - /** @returns {PaymentStatusBulkHandlerDetails} */ - static PaymentStatusBulkHandlerDetails() { + /** @returns {PaymentStatusBulkHandlerResponse} */ + static PaymentStatusBulkHandlerResponse() { return Joi.object({ count: Joi.number(), data: Joi.array().items(PaymentPlatformModel.PaymentStatusObject()), @@ -2284,8 +2278,8 @@ class PaymentPlatformModel { }); } - /** @returns {GetOauthUrlDetails} */ - static GetOauthUrlDetails() { + /** @returns {GetOauthUrlResponse} */ + static GetOauthUrlResponse() { return Joi.object({ url: Joi.string().allow("").required(), success: Joi.boolean().required(), @@ -2320,7 +2314,7 @@ class PaymentPlatformModel { static RepaymentDetailsSerialiserPayAll() { return Joi.object({ total_amount: Joi.number().required(), - extension_order_id: Joi.string().allow("").required(), + extension_order_id: Joi.string().allow("").allow(null).required(), aggregator_transaction_id: Joi.string().allow("").required(), aggregator_order_id: Joi.string().allow("").required(), shipment_details: Joi.array().items( @@ -2329,16 +2323,16 @@ class PaymentPlatformModel { }); } - /** @returns {RepaymentDetails} */ - static RepaymentDetails() { + /** @returns {RepaymentResponse} */ + static RepaymentResponse() { return Joi.object({ - data: Joi.object().pattern(/\S/, Joi.any()).required(), + data: Joi.any().required(), success: Joi.boolean().required(), }); } - /** @returns {MerchantOnBoardingCreation} */ - static MerchantOnBoardingCreation() { + /** @returns {MerchantOnBoardingRequest} */ + static MerchantOnBoardingRequest() { return Joi.object({ credit_line_id: Joi.string().allow("").required(), aggregator: Joi.string().allow("").required(), @@ -2348,39 +2342,39 @@ class PaymentPlatformModel { }); } - /** @returns {MerchantOnBoardingDetails} */ - static MerchantOnBoardingDetails() { + /** @returns {MerchantOnBoardingResponse} */ + static MerchantOnBoardingResponse() { return Joi.object({ - data: Joi.object().pattern(/\S/, Joi.any()).required(), + data: Joi.any().required(), success: Joi.boolean().required(), }); } - /** @returns {ValidateCustomerCreation} */ - static ValidateCustomerCreation() { + /** @returns {ValidateCustomerRequest} */ + static ValidateCustomerRequest() { return Joi.object({ phone_number: Joi.string().allow("").required(), aggregator: Joi.string().allow("").required(), payload: Joi.string().allow("").allow(null), - delivery_address: Joi.object().pattern(/\S/, Joi.any()), + delivery_address: Joi.any(), transaction_amount_in_paise: Joi.number().required(), order_items: Joi.array().items(Joi.any()), - merchant_params: Joi.object().pattern(/\S/, Joi.any()), - billing_address: Joi.object().pattern(/\S/, Joi.any()), + merchant_params: Joi.any(), + billing_address: Joi.any(), }); } - /** @returns {ValidateCustomerDetails} */ - static ValidateCustomerDetails() { + /** @returns {ValidateCustomerResponse} */ + static ValidateCustomerResponse() { return Joi.object({ message: Joi.string().allow("").required(), - data: Joi.object().pattern(/\S/, Joi.any()), + data: Joi.any(), success: Joi.boolean().required(), }); } - /** @returns {GetPaymentLinkDetails} */ - static GetPaymentLinkDetails() { + /** @returns {GetPaymentLinkResponse} */ + static GetPaymentLinkResponse() { return Joi.object({ message: Joi.string().allow("").required(), status_code: Joi.number().required(), @@ -2408,8 +2402,8 @@ class PaymentPlatformModel { }); } - /** @returns {ErrorDetails} */ - static ErrorDetails() { + /** @returns {ErrorResponse} */ + static ErrorResponse() { return Joi.object({ status_code: Joi.number().required(), error: PaymentPlatformModel.ErrorDescription(), @@ -2428,8 +2422,8 @@ class PaymentPlatformModel { }); } - /** @returns {CreatePaymentLinkCreation} */ - static CreatePaymentLinkCreation() { + /** @returns {CreatePaymentLinkRequest} */ + static CreatePaymentLinkRequest() { return Joi.object({ email: Joi.string().allow("").required(), amount: Joi.number().required(), @@ -2438,13 +2432,11 @@ class PaymentPlatformModel { description: Joi.string().allow("").allow(null), meta: PaymentPlatformModel.CreatePaymentLinkMeta().required(), external_order_id: Joi.string().allow("").required(), - success_redirection_url: Joi.string().allow(""), - failure_redirection_url: Joi.string().allow(""), }); } - /** @returns {CreatePaymentLinkDetails} */ - static CreatePaymentLinkDetails() { + /** @returns {CreatePaymentLinkResponse} */ + static CreatePaymentLinkResponse() { return Joi.object({ message: Joi.string().allow("").required(), status_code: Joi.number().required(), @@ -2455,8 +2447,8 @@ class PaymentPlatformModel { }); } - /** @returns {PollingPaymentLinkDetails} */ - static PollingPaymentLinkDetails() { + /** @returns {PollingPaymentLinkResponse} */ + static PollingPaymentLinkResponse() { return Joi.object({ message: Joi.string().allow("").allow(null), http_status: Joi.number().allow(null), @@ -2471,15 +2463,15 @@ class PaymentPlatformModel { }); } - /** @returns {CancelOrResendPaymentLinkCreation} */ - static CancelOrResendPaymentLinkCreation() { + /** @returns {CancelOrResendPaymentLinkRequest} */ + static CancelOrResendPaymentLinkRequest() { return Joi.object({ payment_link_id: Joi.string().allow("").required(), }); } - /** @returns {ResendPaymentLinkDetails} */ - static ResendPaymentLinkDetails() { + /** @returns {ResendPaymentLinkResponse} */ + static ResendPaymentLinkResponse() { return Joi.object({ status_code: Joi.number().required(), message: Joi.string().allow("").required(), @@ -2488,8 +2480,8 @@ class PaymentPlatformModel { }); } - /** @returns {CancelPaymentLinkDetails} */ - static CancelPaymentLinkDetails() { + /** @returns {CancelPaymentLinkResponse} */ + static CancelPaymentLinkResponse() { return Joi.object({ status_code: Joi.number().required(), message: Joi.string().allow("").required(), @@ -2523,16 +2515,16 @@ class PaymentPlatformModel { }); } - /** @returns {GetPaymentCodeDetails} */ - static GetPaymentCodeDetails() { + /** @returns {GetPaymentCodeResponse} */ + static GetPaymentCodeResponse() { return Joi.object({ data: PaymentPlatformModel.GetPaymentCode().required(), success: Joi.boolean().required(), }); } - /** @returns {PlatformPaymentModeDetails} */ - static PlatformPaymentModeDetails() { + /** @returns {PlatformPaymentModeResponse} */ + static PlatformPaymentModeResponse() { return Joi.object({ message: Joi.string().allow("").allow(null), items: Joi.array().items(Joi.any()).allow(null, ""), @@ -2540,11 +2532,11 @@ class PaymentPlatformModel { }); } - /** @returns {MerchnatPaymentModeCreation} */ - static MerchnatPaymentModeCreation() { + /** @returns {MerchnatPaymentModeRequest} */ + static MerchnatPaymentModeRequest() { return Joi.object({ - offline: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - online: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + offline: Joi.any().allow(null), + online: Joi.any().allow(null), }); } @@ -2555,9 +2547,7 @@ class PaymentPlatformModel { amount: Joi.number().required(), status: Joi.string().allow("").required(), currency: Joi.string().allow("").required(), - aggregator_order_details: Joi.object() - .pattern(/\S/, Joi.any()) - .required(), + aggregator_order_details: Joi.any().required(), aggregator: Joi.string().allow("").required(), }); } @@ -2565,14 +2555,14 @@ class PaymentPlatformModel { /** @returns {AddressDetail} */ static AddressDetail() { return Joi.object({ - google_map_point: Joi.object().pattern(/\S/, Joi.any()), + google_map_point: Joi.any(), landmark: Joi.string().allow(""), phone: Joi.string().allow("").required(), country_iso_code: Joi.string().allow("").required(), area_code: Joi.string().allow("").required(), country: Joi.string().allow("").required(), expire_at: Joi.string().allow(""), - geo_location: Joi.object().pattern(/\S/, Joi.any()), + geo_location: Joi.any(), state: Joi.string().allow("").required(), area: Joi.string().allow("").required(), g_address_id: Joi.string().allow("").required(), @@ -2610,15 +2600,15 @@ class PaymentPlatformModel { kind: Joi.string().allow(""), billing_address: PaymentPlatformModel.AddressDetail(), captured: Joi.boolean(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), status: Joi.string().allow("").required(), }); } - /** @returns {PaymentSessionCreation} */ - static PaymentSessionCreation() { + /** @returns {PaymentSessionRequestSerializer} */ + static PaymentSessionRequestSerializer() { return Joi.object({ - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), gid: Joi.string().allow("").required(), order_details: PaymentPlatformModel.OrderDetail().required(), status: Joi.string().allow("").required(), @@ -2632,8 +2622,8 @@ class PaymentPlatformModel { }); } - /** @returns {PaymentSessionPutDetails} */ - static PaymentSessionPutDetails() { + /** @returns {PaymentSessionResponseSerializer} */ + static PaymentSessionResponseSerializer() { return Joi.object({ gid: Joi.string().allow("").required(), platform_transaction_details: Joi.array().items(Joi.any()).required(), @@ -2662,10 +2652,10 @@ class PaymentPlatformModel { }); } - /** @returns {RefundSessionCreation} */ - static RefundSessionCreation() { + /** @returns {RefundSessionRequestSerializer} */ + static RefundSessionRequestSerializer() { return Joi.object({ - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), gid: Joi.string().allow("").required(), status: Joi.string().allow("").required(), currency: Joi.string().allow("").required(), @@ -2680,8 +2670,8 @@ class PaymentPlatformModel { }); } - /** @returns {RefundSessionDetails} */ - static RefundSessionDetails() { + /** @returns {RefundSessionResponseSerializer} */ + static RefundSessionResponseSerializer() { return Joi.object({ gid: Joi.string().allow("").required(), status: Joi.string().allow("").required(), @@ -2691,8 +2681,8 @@ class PaymentPlatformModel { }); } - /** @returns {PaymentDetails} */ - static PaymentDetails() { + /** @returns {PaymentDetailsSerializer} */ + static PaymentDetailsSerializer() { return Joi.object({ payment_methods: Joi.array().items(Joi.any()).required(), gid: Joi.string().allow("").required(), @@ -2700,7 +2690,7 @@ class PaymentPlatformModel { currency: Joi.string().allow("").required(), mode: Joi.string().allow("").required(), merchant_locale: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + meta: Joi.any().allow(null), kind: Joi.string().allow(""), success_url: Joi.string().allow(""), status: Joi.string().allow("").required(), @@ -2717,10 +2707,10 @@ class PaymentPlatformModel { }); } - /** @returns {CartDetails} */ - static CartDetails() { + /** @returns {CartDetailsSerializer} */ + static CartDetailsSerializer() { return Joi.object({ - items: Joi.object().pattern(/\S/, Joi.any()).required(), + items: Joi.any().required(), articles: Joi.array().items(Joi.any()).required(), cart_value: Joi.number().required(), total_quantity: Joi.number(), @@ -2728,8 +2718,8 @@ class PaymentPlatformModel { }); } - /** @returns {RefundDetails} */ - static RefundDetails() { + /** @returns {RefundDetailsSerializer} */ + static RefundDetailsSerializer() { return Joi.object({ amount: Joi.number().required(), currency: Joi.string().allow("").required(), @@ -2740,17 +2730,17 @@ class PaymentPlatformModel { }); } - /** @returns {PaymentSessionFetchDetails} */ - static PaymentSessionFetchDetails() { + /** @returns {PaymentSessionSerializer} */ + static PaymentSessionSerializer() { return Joi.object({ payment_details: Joi.any().required(), currency: Joi.string().allow("").allow(null), status: Joi.string().allow("").required(), total_amount: Joi.number().required(), - gid: Joi.string().allow("").required(), - cart_details: PaymentPlatformModel.CartDetails(), + gid: Joi.string().allow("").allow(null).required(), + cart_details: PaymentPlatformModel.CartDetailsSerializer(), refund_details: Joi.array() - .items(PaymentPlatformModel.RefundDetails()) + .items(PaymentPlatformModel.RefundDetailsSerializer()) .required(), }); } @@ -2764,8 +2754,8 @@ class PaymentPlatformModel { }); } - /** @returns {RefundPriorityDetails} */ - static RefundPriorityDetails() { + /** @returns {RefundPriorityResponseSerializer} */ + static RefundPriorityResponseSerializer() { return Joi.object({ configuration: Joi.string().allow("").required(), success: Joi.boolean().required(), @@ -2777,8 +2767,8 @@ class PaymentPlatformModel { }); } - /** @returns {RefundPriorityCreation} */ - static RefundPriorityCreation() { + /** @returns {RefundPriorityRequestSerializer} */ + static RefundPriorityRequestSerializer() { return Joi.object({ apportion: Joi.boolean().required(), refund_sources_priority: Joi.array() @@ -2787,12 +2777,12 @@ class PaymentPlatformModel { }); } - /** @returns {MerchantPaymentModeCreation} */ - static MerchantPaymentModeCreation() { + /** @returns {MerchantPaymentModeRequest} */ + static MerchantPaymentModeRequest() { return Joi.object({ business_unit: Joi.string().allow("").required(), items: Joi.array().items(Joi.any()).required(), - device: Joi.object().pattern(/\S/, Joi.any()).required(), + device: Joi.any().required(), }); } @@ -2812,8 +2802,8 @@ class PaymentPlatformModel { }); } - /** @returns {PlatformPaymentModeCopyConfigCreation} */ - static PlatformPaymentModeCopyConfigCreation() { + /** @returns {PlatformPaymentModeCopyConfigRequest} */ + static PlatformPaymentModeCopyConfigRequest() { return Joi.object({ from_config: PaymentPlatformModel.FromConfig().required(), to_config: PaymentPlatformModel.ToConfig().required(), @@ -2840,8 +2830,8 @@ class PaymentPlatformModel { }); } - /** @returns {PaymentOrderCreation} */ - static PaymentOrderCreation() { + /** @returns {PaymentOrderRequest} */ + static PaymentOrderRequest() { return Joi.object({ order_id: Joi.string().allow("").required(), payment_methods: Joi.array().items( @@ -2867,8 +2857,8 @@ class PaymentPlatformModel { }); } - /** @returns {PaymentOrderDetails} */ - static PaymentOrderDetails() { + /** @returns {PaymentOrderResponse} */ + static PaymentOrderResponse() { return Joi.object({ message: Joi.string().allow("").required(), success: Joi.boolean().required(), @@ -2889,8 +2879,8 @@ class PaymentPlatformModel { }); } - /** @returns {AggregatorVersionDetails} */ - static AggregatorVersionDetails() { + /** @returns {AggregatorVersionResponse} */ + static AggregatorVersionResponse() { return Joi.object({ message: Joi.string().allow("").required(), success: Joi.boolean().required(), @@ -2907,8 +2897,8 @@ class PaymentPlatformModel { }); } - /** @returns {PatchAggregatorControl} */ - static PatchAggregatorControl() { + /** @returns {AggregatorControlRequest} */ + static AggregatorControlRequest() { return Joi.object({ business_unit: Joi.string().allow(""), items: Joi.array().items(Joi.any()), diff --git a/sdk/platform/Payment/PaymentPlatformValidator.d.ts b/sdk/platform/Payment/PaymentPlatformValidator.d.ts index 424557fd8..f984661f7 100644 --- a/sdk/platform/Payment/PaymentPlatformValidator.d.ts +++ b/sdk/platform/Payment/PaymentPlatformValidator.d.ts @@ -2,7 +2,7 @@ export = PaymentPlatformValidator; /** * @typedef ActivateAndDectivatePayoutParam * @property {string} uniqueTransferNo - Unique transfer id - * @property {PaymentPlatformModel.UpdatePayoutCreation} body + * @property {PaymentPlatformModel.UpdatePayoutRequest} body */ /** * @typedef DeletePayoutParam @@ -24,16 +24,16 @@ export = PaymentPlatformValidator; */ /** * @typedef SavePayoutParam - * @property {PaymentPlatformModel.PayoutCreation} body + * @property {PaymentPlatformModel.PayoutRequest} body */ /** * @typedef SaveSubscriptionSetupIntentParam - * @property {PaymentPlatformModel.SaveSubscriptionSetupIntentCreation} body + * @property {PaymentPlatformModel.SaveSubscriptionSetupIntentRequest} body */ /** * @typedef UpdatePayoutParam * @property {string} uniqueTransferNo - Unique transfer id - * @property {PaymentPlatformModel.PayoutCreation} body + * @property {PaymentPlatformModel.PayoutRequest} body */ /** * @typedef VerifyIfscCodeParam @@ -69,7 +69,7 @@ type ActivateAndDectivatePayoutParam = { * - Unique transfer id */ uniqueTransferNo: string; - body: PaymentPlatformModel.UpdatePayoutCreation; + body: PaymentPlatformModel.UpdatePayoutRequest; }; type DeletePayoutParam = { /** @@ -94,17 +94,17 @@ type GetSubscriptionPaymentMethodParam = { uniqueExternalId?: string; }; type SavePayoutParam = { - body: PaymentPlatformModel.PayoutCreation; + body: PaymentPlatformModel.PayoutRequest; }; type SaveSubscriptionSetupIntentParam = { - body: PaymentPlatformModel.SaveSubscriptionSetupIntentCreation; + body: PaymentPlatformModel.SaveSubscriptionSetupIntentRequest; }; type UpdatePayoutParam = { /** * - Unique transfer id */ uniqueTransferNo: string; - body: PaymentPlatformModel.PayoutCreation; + body: PaymentPlatformModel.PayoutRequest; }; type VerifyIfscCodeParam = { ifscCode: string; diff --git a/sdk/platform/Payment/PaymentPlatformValidator.js b/sdk/platform/Payment/PaymentPlatformValidator.js index d98fd255c..fcadf75e5 100644 --- a/sdk/platform/Payment/PaymentPlatformValidator.js +++ b/sdk/platform/Payment/PaymentPlatformValidator.js @@ -5,7 +5,7 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); /** * @typedef ActivateAndDectivatePayoutParam * @property {string} uniqueTransferNo - Unique transfer id - * @property {PaymentPlatformModel.UpdatePayoutCreation} body + * @property {PaymentPlatformModel.UpdatePayoutRequest} body */ /** @@ -33,18 +33,18 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); /** * @typedef SavePayoutParam - * @property {PaymentPlatformModel.PayoutCreation} body + * @property {PaymentPlatformModel.PayoutRequest} body */ /** * @typedef SaveSubscriptionSetupIntentParam - * @property {PaymentPlatformModel.SaveSubscriptionSetupIntentCreation} body + * @property {PaymentPlatformModel.SaveSubscriptionSetupIntentRequest} body */ /** * @typedef UpdatePayoutParam * @property {string} uniqueTransferNo - Unique transfer id - * @property {PaymentPlatformModel.PayoutCreation} body + * @property {PaymentPlatformModel.PayoutRequest} body */ /** @@ -57,7 +57,7 @@ class PaymentPlatformValidator { static activateAndDectivatePayout() { return Joi.object({ uniqueTransferNo: Joi.string().allow("").required(), - body: PaymentPlatformModel.UpdatePayoutCreation().required(), + body: PaymentPlatformModel.UpdatePayoutRequest().required(), }).required(); } @@ -98,14 +98,14 @@ class PaymentPlatformValidator { /** @returns {SavePayoutParam} */ static savePayout() { return Joi.object({ - body: PaymentPlatformModel.PayoutCreation().required(), + body: PaymentPlatformModel.PayoutRequest().required(), }).required(); } /** @returns {SaveSubscriptionSetupIntentParam} */ static saveSubscriptionSetupIntent() { return Joi.object({ - body: PaymentPlatformModel.SaveSubscriptionSetupIntentCreation().required(), + body: PaymentPlatformModel.SaveSubscriptionSetupIntentRequest().required(), }).required(); } @@ -113,7 +113,7 @@ class PaymentPlatformValidator { static updatePayout() { return Joi.object({ uniqueTransferNo: Joi.string().allow("").required(), - body: PaymentPlatformModel.PayoutCreation().required(), + body: PaymentPlatformModel.PayoutRequest().required(), }).required(); } diff --git a/sdk/platform/PlatformClient.d.ts b/sdk/platform/PlatformClient.d.ts index 6a3dff52f..a7800843a 100644 --- a/sdk/platform/PlatformClient.d.ts +++ b/sdk/platform/PlatformClient.d.ts @@ -22,6 +22,7 @@ declare class PlatformClient { content: Content; discount: Discount; fileStorage: FileStorage; + finance: Finance; lead: Lead; serviceability: Serviceability; order: Order; @@ -64,6 +65,7 @@ import Configuration = require("./Configuration/ConfigurationPlatformClient"); import Content = require("./Content/ContentPlatformClient"); import Discount = require("./Discount/DiscountPlatformClient"); import FileStorage = require("./FileStorage/FileStoragePlatformClient"); +import Finance = require("./Finance/FinancePlatformClient"); import Lead = require("./Lead/LeadPlatformClient"); import Serviceability = require("./Serviceability/ServiceabilityPlatformClient"); import Order = require("./Order/OrderPlatformClient"); diff --git a/sdk/platform/PlatformClient.js b/sdk/platform/PlatformClient.js index 5f9437de9..3bf7c55a7 100644 --- a/sdk/platform/PlatformClient.js +++ b/sdk/platform/PlatformClient.js @@ -18,6 +18,8 @@ const Discount = require("./Discount/DiscountPlatformClient"); const FileStorage = require("./FileStorage/FileStoragePlatformClient"); +const Finance = require("./Finance/FinancePlatformClient"); + const Lead = require("./Lead/LeadPlatformClient"); const Serviceability = require("./Serviceability/ServiceabilityPlatformClient"); @@ -68,6 +70,8 @@ class PlatformClient { this.fileStorage = new FileStorage(config); + this.finance = new Finance(config); + this.lead = new Lead(config); this.serviceability = new Serviceability(config); diff --git a/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts b/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts index 2e286705f..dab7620fd 100644 --- a/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +++ b/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts @@ -83,12 +83,12 @@ declare class Rewards { * @param {RewardsPlatformApplicationValidator.ShowGiveawaysParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name showGiveaways * @summary: List giveaways * @description: Retrieve and display available giveaways. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/showGiveaways/). */ - showGiveaways({ pageId, pageSize, requestHeaders }?: RewardsPlatformApplicationValidator.ShowGiveawaysParam, { responseHeaders }?: object): Promise; + showGiveaways({ pageId, pageSize, requestHeaders }?: RewardsPlatformApplicationValidator.ShowGiveawaysParam, { responseHeaders }?: object): Promise; /** * @param {RewardsPlatformApplicationValidator.ShowOffersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/platform/Rewards/RewardsPlatformApplicationClient.js b/sdk/platform/Rewards/RewardsPlatformApplicationClient.js index 52270764b..f7e962311 100644 --- a/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +++ b/sdk/platform/Rewards/RewardsPlatformApplicationClient.js @@ -574,7 +574,7 @@ class Rewards { * @param {RewardsPlatformApplicationValidator.ShowGiveawaysParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name showGiveaways * @summary: List giveaways * @description: Retrieve and display available giveaways. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/rewards/showGiveaways/). @@ -634,7 +634,7 @@ class Rewards { const { error: res_error, - } = RewardsPlatformModel.ListGiveaway().validate(responseData, { + } = RewardsPlatformModel.GiveawayResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts b/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts index 9c5e75a85..5dc69aa6d 100644 --- a/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +++ b/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts @@ -25,7 +25,7 @@ export = RewardsPlatformApplicationValidator; */ /** * @typedef SetRewardsConfigurationParam - * @property {RewardsPlatformModel.SetConfiguration} body + * @property {RewardsPlatformModel.ConfigurationRequest} body */ /** * @typedef ShowGiveawaysParam @@ -114,7 +114,7 @@ type SaveGiveAwayParam = { body: RewardsPlatformModel.Giveaway; }; type SetRewardsConfigurationParam = { - body: RewardsPlatformModel.SetConfiguration; + body: RewardsPlatformModel.ConfigurationRequest; }; type ShowGiveawaysParam = { /** diff --git a/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js b/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js index 59ebc3e27..7dde5a571 100644 --- a/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +++ b/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js @@ -34,7 +34,7 @@ const RewardsPlatformModel = require("./RewardsPlatformModel"); /** * @typedef SetRewardsConfigurationParam - * @property {RewardsPlatformModel.SetConfiguration} body + * @property {RewardsPlatformModel.ConfigurationRequest} body */ /** @@ -110,7 +110,7 @@ class RewardsPlatformApplicationValidator { /** @returns {SetRewardsConfigurationParam} */ static setRewardsConfiguration() { return Joi.object({ - body: RewardsPlatformModel.SetConfiguration().required(), + body: RewardsPlatformModel.ConfigurationRequest().required(), }).required(); } diff --git a/sdk/platform/Rewards/RewardsPlatformModel.d.ts b/sdk/platform/Rewards/RewardsPlatformModel.d.ts index cd6f0ed93..667305101 100644 --- a/sdk/platform/Rewards/RewardsPlatformModel.d.ts +++ b/sdk/platform/Rewards/RewardsPlatformModel.d.ts @@ -7,7 +7,7 @@ export = RewardsPlatformModel; * @property {string} [message] */ /** - * @typedef ListGiveaway + * @typedef GiveawayResponse * @property {Giveaway[]} [items] * @property {Page} [page] */ @@ -158,14 +158,14 @@ export = RewardsPlatformModel; * @property {boolean} [success] */ /** - * @typedef SetConfiguration + * @typedef ConfigurationRequest * @property {string[]} [valid_android_packages] * @property {string} [terms_conditions_link] */ declare class RewardsPlatformModel { } declare namespace RewardsPlatformModel { - export { E, ListGiveaway, Giveaway, Schedule, RewardsAudience, Asset, RewardsRule, Page, Offer, ShareMessages, UserRes, Points, RewardUser, Referral, AppUser, HistoryRes, PointsHistory, ConfigurationRes, SetConfigurationRes, SetConfiguration }; + export { E, GiveawayResponse, Giveaway, Schedule, RewardsAudience, Asset, RewardsRule, Page, Offer, ShareMessages, UserRes, Points, RewardUser, Referral, AppUser, HistoryRes, PointsHistory, ConfigurationRes, SetConfigurationRes, ConfigurationRequest }; } /** @returns {E} */ declare function E(): E; @@ -175,9 +175,9 @@ type E = { info?: string; message?: string; }; -/** @returns {ListGiveaway} */ -declare function ListGiveaway(): ListGiveaway; -type ListGiveaway = { +/** @returns {GiveawayResponse} */ +declare function GiveawayResponse(): GiveawayResponse; +type GiveawayResponse = { items?: Giveaway[]; page?: Page; }; @@ -374,9 +374,9 @@ declare function SetConfigurationRes(): SetConfigurationRes; type SetConfigurationRes = { success?: boolean; }; -/** @returns {SetConfiguration} */ -declare function SetConfiguration(): SetConfiguration; -type SetConfiguration = { +/** @returns {ConfigurationRequest} */ +declare function ConfigurationRequest(): ConfigurationRequest; +type ConfigurationRequest = { valid_android_packages?: string[]; terms_conditions_link?: string; }; diff --git a/sdk/platform/Rewards/RewardsPlatformModel.js b/sdk/platform/Rewards/RewardsPlatformModel.js index 986066489..f1f2b3fc6 100644 --- a/sdk/platform/Rewards/RewardsPlatformModel.js +++ b/sdk/platform/Rewards/RewardsPlatformModel.js @@ -9,7 +9,7 @@ const Joi = require("joi"); */ /** - * @typedef ListGiveaway + * @typedef GiveawayResponse * @property {Giveaway[]} [items] * @property {Page} [page] */ @@ -178,7 +178,7 @@ const Joi = require("joi"); */ /** - * @typedef SetConfiguration + * @typedef ConfigurationRequest * @property {string[]} [valid_android_packages] * @property {string} [terms_conditions_link] */ @@ -194,8 +194,8 @@ class RewardsPlatformModel { }); } - /** @returns {ListGiveaway} */ - static ListGiveaway() { + /** @returns {GiveawayResponse} */ + static GiveawayResponse() { return Joi.object({ items: Joi.array().items(RewardsPlatformModel.Giveaway()), page: RewardsPlatformModel.Page(), @@ -276,7 +276,7 @@ class RewardsPlatformModel { banner_image: RewardsPlatformModel.Asset(), created_at: Joi.string().allow(""), name: Joi.string().allow(""), - rule: Joi.object().pattern(/\S/, Joi.any()), + rule: Joi.any(), share: RewardsPlatformModel.ShareMessages(), sub_text: Joi.string().allow(""), text: Joi.string().allow(""), @@ -368,7 +368,7 @@ class RewardsPlatformModel { claimed: Joi.boolean(), created_at: Joi.string().allow(""), expires_on: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), points: Joi.number(), remaining_points: Joi.number(), text_1: Joi.string().allow(""), @@ -397,8 +397,8 @@ class RewardsPlatformModel { }); } - /** @returns {SetConfiguration} */ - static SetConfiguration() { + /** @returns {ConfigurationRequest} */ + static ConfigurationRequest() { return Joi.object({ valid_android_packages: Joi.array().items(Joi.string().allow("")), terms_conditions_link: Joi.string().allow(""), diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts index 5afa27531..4e632145c 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +++ b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts @@ -9,27 +9,28 @@ declare class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name createCourierPartnerRule - * @summary: Create courier rule + * @summary: Create rourier rule * @description: Creates a rule within the delivery configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerRule/). */ - createCourierPartnerRule({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.CreateCourierPartnerRuleParam, { responseHeaders }?: object): Promise; + createCourierPartnerRule({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.CreateCourierPartnerRuleParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.CreateStoreRulesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name createStoreRules * @summary: Create store rule * @description: Create a rule within the order routing rules - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createStoreRules/). */ - createStoreRules({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.CreateStoreRulesParam, { responseHeaders }?: object): Promise; + createStoreRules({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.CreateStoreRulesParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.GetApplicationConfigParam} arg * - Arg object @@ -62,56 +63,42 @@ declare class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getApplicationServiceabilitySelfShipment * @summary: Get self ship configuration * @description: Retrieves the self ship setup for a single application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getApplicationServiceabilitySelfShipment/). */ - getApplicationServiceabilitySelfShipment({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getApplicationServiceabilitySelfShipment({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.GetCourierPartnerRuleParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getCourierPartnerRule * @summary: Get courier rule * @description: Retrieves a single rule within the delivery configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerRule/). */ - getCourierPartnerRule({ ruleId, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetCourierPartnerRuleParam, { responseHeaders }?: object): Promise; + getCourierPartnerRule({ ruleId, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetCourierPartnerRuleParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.GetCourierPartnerRulesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getCourierPartnerRules * @summary: Get courier rules * @description: Retrieve a list of rules within the delivery configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerRules/). */ - getCourierPartnerRules({ pageNo, pageSize, status, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetCourierPartnerRulesParam, { responseHeaders }?: object): Promise; - /** - * @param {ServiceabilityPlatformApplicationValidator.GetCourierPartnersParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getCourierPartners - * @summary: Serviceable Courier Partners. - * @description: Get all the serviceable courier partners of a destination and the shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartners/). - */ - getCourierPartners({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetCourierPartnersParam, { responseHeaders }?: object): Promise; + getCourierPartnerRules({ pageNo, pageSize, status, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetCourierPartnerRulesParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.GetStoreRuleParam} arg * - Arg object @@ -131,13 +118,14 @@ declare class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name getStoreRules * @summary: Get store rules * @description: Retrieves an existing order routing setup for a single application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getStoreRules/). */ - getStoreRules({ pageNo, pageSize, status, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetStoreRulesParam, { responseHeaders }?: object): Promise; + getStoreRules({ pageNo, pageSize, status, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetStoreRulesParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.InsertApplicationConfigParam} arg * - Arg object @@ -157,14 +145,14 @@ declare class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name patchApplicationServiceabilitySelfShipment * @summary: Update self ship configuration * @description: Updates self ship setup for an existing application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/patchApplicationServiceabilitySelfShipment/). */ - patchApplicationServiceabilitySelfShipment({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.PatchApplicationServiceabilitySelfShipmentParam, { responseHeaders }?: object): Promise; + patchApplicationServiceabilitySelfShipment({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.PatchApplicationServiceabilitySelfShipmentParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.UpdateApplicationConfigurationParam} arg * - Arg object @@ -184,94 +172,96 @@ declare class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name updateCourierPartnerRulePriority * @summary: Update courier partner rule priority * @description: Updates a courier partner rule priority for a single application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierPartnerRulePriority/). */ - updateCourierPartnerRulePriority({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateCourierPartnerRulePriorityParam, { responseHeaders }?: object): Promise; + updateCourierPartnerRulePriority({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateCourierPartnerRulePriorityParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.UpdateCourierRuleParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updateCourierRule * @summary: Update courier rule * @description: Updates an existing rule within the delivery configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierRule/). */ - updateCourierRule({ ruleId, body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateCourierRuleParam, { responseHeaders }?: object): Promise; + updateCourierRule({ ruleId, body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateCourierRuleParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.UpdatePincodeAuditHistoryParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updatePincodeAuditHistory * @summary: Get audit trail * @description: Retrieves the history of changes made to cash on delivery settings for pincodes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePincodeAuditHistory/). */ - updatePincodeAuditHistory({ body, pageNumber, pageSize, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdatePincodeAuditHistoryParam, { responseHeaders }?: object): Promise; + updatePincodeAuditHistory({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdatePincodeAuditHistoryParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.UpdatePincodeBulkViewParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name updatePincodeBulkView * @summary: Bulk update pincode COD support * @description: Updates the cash on delivery settings for multiple specified pin codes simultaneously. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePincodeBulkView/). */ - updatePincodeBulkView({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdatePincodeBulkViewParam, { responseHeaders }?: object): Promise; + updatePincodeBulkView({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdatePincodeBulkViewParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.UpdatePincodeCoDListingParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updatePincodeCoDListing * @summary: Get COD enabled pincodes * @description: Retrieves a list of pincodes along with the count based on whether cash on delivery settings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePincodeCoDListing/). */ - updatePincodeCoDListing({ body, pageNumber, pageSize, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdatePincodeCoDListingParam, { responseHeaders }?: object): Promise; + updatePincodeCoDListing({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdatePincodeCoDListingParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.UpdatePincodeMopViewParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name updatePincodeMopView * @summary: Update pincode COD support * @description: Modify and update views related to pincode MOP (Mode of Payment). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePincodeMopView/). */ - updatePincodeMopView({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdatePincodeMopViewParam, { responseHeaders }?: object): Promise; + updatePincodeMopView({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdatePincodeMopViewParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.UpdateStoreRulesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updateStoreRules * @summary: Update store rule * @description: Updates an existing rule within the order routing rules. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateStoreRules/). */ - updateStoreRules({ ruleUid, body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateStoreRulesParam, { responseHeaders }?: object): Promise; + updateStoreRules({ ruleUid, body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateStoreRulesParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.UpdateStoreRulesConfigParam} arg * - Arg object diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js index 5c19244a7..05bbfa548 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +++ b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js @@ -21,11 +21,11 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name createCourierPartnerRule - * @summary: Create courier rule + * @summary: Create rourier rule * @description: Creates a rule within the delivery configuration. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerRule/). */ async createCourierPartnerRule( @@ -79,7 +79,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.CourierPartnerRuleResult().validate( + } = ServiceabilityPlatformModel.CourierPartnerRuleResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -104,8 +104,9 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name createStoreRules * @summary: Create store rule * @description: Create a rule within the order routing rules - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createStoreRules/). @@ -161,7 +162,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.StoreRuleResultSchema().validate( + } = ServiceabilityPlatformModel.StoreRuleResponseSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -342,7 +343,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getApplicationServiceabilitySelfShipment @@ -396,7 +397,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.ApplicationSelfShipConfigResult().validate( + } = ServiceabilityPlatformModel.ApplicationSelfShipConfigResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -421,7 +422,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getCourierPartnerRule @@ -479,7 +480,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.CourierPartnerRuleResult().validate( + } = ServiceabilityPlatformModel.CourierPartnerRuleResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -504,7 +505,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getCourierPartnerRules @@ -569,7 +570,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.CourierPartnerRulesListResult().validate( + } = ServiceabilityPlatformModel.CourierPartnerRulesListResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -588,89 +589,6 @@ class Serviceability { return response; } - /** - * @param {ServiceabilityPlatformApplicationValidator.GetCourierPartnersParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getCourierPartners - * @summary: Serviceable Courier Partners. - * @description: Get all the serviceable courier partners of a destination and the shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartners/). - */ - async getCourierPartners( - { body, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { - error, - } = ServiceabilityPlatformApplicationValidator.getCourierPartners().validate( - { - body, - }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = ServiceabilityPlatformApplicationValidator.getCourierPartners().validate( - { - body, - }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartners \n ${warrning}`, - }); - } - - const query_params = {}; - - const response = await PlatformAPIClient.execute( - this.config, - "post", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/shipment/courier-partners`, - query_params, - body, - requestHeaders, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = ServiceabilityPlatformModel.ShipmentCourierPartnerResult().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); - - if (res_error) { - if (this.config.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getCourierPartners \n ${res_error}`, - }); - } - } - - return response; - } - /** * @param {ServiceabilityPlatformApplicationValidator.GetStoreRuleParam} arg * - Arg object @@ -759,8 +677,9 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name getStoreRules * @summary: Get store rules * @description: Retrieves an existing order routing setup for a single application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getStoreRules/). @@ -823,7 +742,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.GetStoreRulesApiResult().validate( + } = ServiceabilityPlatformModel.GetStoreRulesApiResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -930,7 +849,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name patchApplicationServiceabilitySelfShipment @@ -988,7 +907,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.ApplicationSelfShipConfigResult().validate( + } = ServiceabilityPlatformModel.ApplicationSelfShipConfigResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1095,7 +1014,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name updateCourierPartnerRulePriority * @summary: Update courier partner rule priority @@ -1152,7 +1071,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.RulePriorityResult().validate( + } = ServiceabilityPlatformModel.RulePriorityResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1177,7 +1096,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updateCourierRule @@ -1237,7 +1156,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.CourierPartnerRuleResult().validate( + } = ServiceabilityPlatformModel.CourierPartnerRuleResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1262,7 +1181,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updatePincodeAuditHistory @@ -1270,7 +1189,7 @@ class Serviceability { * @description: Retrieves the history of changes made to cash on delivery settings for pincodes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePincodeAuditHistory/). */ async updatePincodeAuditHistory( - { body, pageNumber, pageSize, requestHeaders } = { requestHeaders: {} }, + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -1278,8 +1197,6 @@ class Serviceability { } = ServiceabilityPlatformApplicationValidator.updatePincodeAuditHistory().validate( { body, - pageNumber, - pageSize, }, { abortEarly: false, allowUnknown: true } ); @@ -1293,8 +1210,6 @@ class Serviceability { } = ServiceabilityPlatformApplicationValidator.updatePincodeAuditHistory().validate( { body, - pageNumber, - pageSize, }, { abortEarly: false, allowUnknown: false } ); @@ -1306,8 +1221,6 @@ class Serviceability { } const query_params = {}; - query_params["page_number"] = pageNumber; - query_params["page_size"] = pageSize; const response = await PlatformAPIClient.execute( this.config, @@ -1326,7 +1239,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryResultData().validate( + } = ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryResponseData().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1351,8 +1264,9 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name updatePincodeBulkView * @summary: Bulk update pincode COD support * @description: Updates the cash on delivery settings for multiple specified pin codes simultaneously. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePincodeBulkView/). @@ -1408,7 +1322,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.PincodeBulkViewResult().validate( + } = ServiceabilityPlatformModel.PincodeBulkViewResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1433,7 +1347,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updatePincodeCoDListing @@ -1441,7 +1355,7 @@ class Serviceability { * @description: Retrieves a list of pincodes along with the count based on whether cash on delivery settings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePincodeCoDListing/). */ async updatePincodeCoDListing( - { body, pageNumber, pageSize, requestHeaders } = { requestHeaders: {} }, + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -1449,8 +1363,6 @@ class Serviceability { } = ServiceabilityPlatformApplicationValidator.updatePincodeCoDListing().validate( { body, - pageNumber, - pageSize, }, { abortEarly: false, allowUnknown: true } ); @@ -1464,8 +1376,6 @@ class Serviceability { } = ServiceabilityPlatformApplicationValidator.updatePincodeCoDListing().validate( { body, - pageNumber, - pageSize, }, { abortEarly: false, allowUnknown: false } ); @@ -1477,8 +1387,6 @@ class Serviceability { } const query_params = {}; - query_params["page_number"] = pageNumber; - query_params["page_size"] = pageSize; const response = await PlatformAPIClient.execute( this.config, @@ -1497,7 +1405,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.PincodeCodStatusListingResult().validate( + } = ServiceabilityPlatformModel.PincodeCodStatusListingResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1522,7 +1430,8 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name updatePincodeMopView * @summary: Update pincode COD support * @description: Modify and update views related to pincode MOP (Mode of Payment). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePincodeMopView/). @@ -1578,10 +1487,10 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.PincodeMOPResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ServiceabilityPlatformModel.PincodeMOPresponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1603,7 +1512,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name updateStoreRules @@ -1663,7 +1572,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.StoreRuleUpdateResultSchema().validate( + } = ServiceabilityPlatformModel.StoreRuleUpdateResponseSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts index a78d31877..927653ef2 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +++ b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts @@ -5,14 +5,14 @@ export = ServiceabilityPlatformApplicationValidator; */ /** * @typedef CreateStoreRulesParam - * @property {ServiceabilityPlatformModel.CreateStoreRuleDetailsSchema} body + * @property {ServiceabilityPlatformModel.CreateStoreRuleRequestSchema} body */ /** @typedef GetApplicationConfigParam */ /** @typedef GetApplicationConfigurationParam */ /** @typedef GetApplicationServiceabilitySelfShipmentParam */ /** * @typedef GetCourierPartnerRuleParam - * @property {string} ruleId - Unique identifier of the courier partner rule + * @property {string} ruleId - A `rule_id` is a unique identifier for a rule. */ /** * @typedef GetCourierPartnerRulesParam @@ -20,10 +20,6 @@ export = ServiceabilityPlatformApplicationValidator; * @property {number} [pageSize] - Determines the items to be displayed in a page * @property {string} [status] - Filter rules based on rule status */ -/** - * @typedef GetCourierPartnersParam - * @property {ServiceabilityPlatformModel.ShipmentCourierPartnerDetails} body - */ /** * @typedef GetStoreRuleParam * @property {string} ruleUid - A `rule_uid` is a unique identifier for a @@ -41,7 +37,7 @@ export = ServiceabilityPlatformApplicationValidator; */ /** * @typedef PatchApplicationServiceabilitySelfShipmentParam - * @property {ServiceabilityPlatformModel.SelfShipResult} body + * @property {ServiceabilityPlatformModel.SelfShipResponse} body */ /** * @typedef UpdateApplicationConfigurationParam @@ -49,18 +45,16 @@ export = ServiceabilityPlatformApplicationValidator; */ /** * @typedef UpdateCourierPartnerRulePriorityParam - * @property {ServiceabilityPlatformModel.RulePriorityDetails} body + * @property {ServiceabilityPlatformModel.RulePriorityRequest} body */ /** * @typedef UpdateCourierRuleParam - * @property {string} ruleId - Unique identifier of the courier partner rule. + * @property {string} ruleId - A `rule_id` is a unique identifier for a particular Dp. * @property {ServiceabilityPlatformModel.CourierPartnerRule} body */ /** * @typedef UpdatePincodeAuditHistoryParam - * @property {number} [pageNumber] - Page number to be fetched. - * @property {number} [pageSize] - Determines the items to be displayed in a page - * @property {ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryDetails} body + * @property {ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryRequest} body */ /** * @typedef UpdatePincodeBulkViewParam @@ -68,9 +62,7 @@ export = ServiceabilityPlatformApplicationValidator; */ /** * @typedef UpdatePincodeCoDListingParam - * @property {number} [pageNumber] - Page number to be fetched. - * @property {number} [pageSize] - Determines the items to be displayed in a page - * @property {ServiceabilityPlatformModel.PincodeCodStatusListingDetails} body + * @property {ServiceabilityPlatformModel.PincodeCodStatusListingRequest} body */ /** * @typedef UpdatePincodeMopViewParam @@ -80,7 +72,7 @@ export = ServiceabilityPlatformApplicationValidator; * @typedef UpdateStoreRulesParam * @property {string} ruleUid - A `rule_uid` is a unique identifier for a * particular rule object. - * @property {ServiceabilityPlatformModel.CreateStoreRuleDetailsSchema} body + * @property {ServiceabilityPlatformModel.CreateStoreRuleRequestSchema} body */ /** * @typedef UpdateStoreRulesConfigParam @@ -101,8 +93,6 @@ declare class ServiceabilityPlatformApplicationValidator { static getCourierPartnerRule(): GetCourierPartnerRuleParam; /** @returns {GetCourierPartnerRulesParam} */ static getCourierPartnerRules(): GetCourierPartnerRulesParam; - /** @returns {GetCourierPartnersParam} */ - static getCourierPartners(): GetCourierPartnersParam; /** @returns {GetStoreRuleParam} */ static getStoreRule(): GetStoreRuleParam; /** @returns {GetStoreRulesParam} */ @@ -131,17 +121,17 @@ declare class ServiceabilityPlatformApplicationValidator { static updateStoreRulesConfig(): UpdateStoreRulesConfigParam; } declare namespace ServiceabilityPlatformApplicationValidator { - export { CreateCourierPartnerRuleParam, CreateStoreRulesParam, GetApplicationConfigParam, GetApplicationConfigurationParam, GetApplicationServiceabilitySelfShipmentParam, GetCourierPartnerRuleParam, GetCourierPartnerRulesParam, GetCourierPartnersParam, GetStoreRuleParam, GetStoreRulesParam, InsertApplicationConfigParam, PatchApplicationServiceabilitySelfShipmentParam, UpdateApplicationConfigurationParam, UpdateCourierPartnerRulePriorityParam, UpdateCourierRuleParam, UpdatePincodeAuditHistoryParam, UpdatePincodeBulkViewParam, UpdatePincodeCoDListingParam, UpdatePincodeMopViewParam, UpdateStoreRulesParam, UpdateStoreRulesConfigParam }; + export { CreateCourierPartnerRuleParam, CreateStoreRulesParam, GetApplicationConfigParam, GetApplicationConfigurationParam, GetApplicationServiceabilitySelfShipmentParam, GetCourierPartnerRuleParam, GetCourierPartnerRulesParam, GetStoreRuleParam, GetStoreRulesParam, InsertApplicationConfigParam, PatchApplicationServiceabilitySelfShipmentParam, UpdateApplicationConfigurationParam, UpdateCourierPartnerRulePriorityParam, UpdateCourierRuleParam, UpdatePincodeAuditHistoryParam, UpdatePincodeBulkViewParam, UpdatePincodeCoDListingParam, UpdatePincodeMopViewParam, UpdateStoreRulesParam, UpdateStoreRulesConfigParam }; } type CreateCourierPartnerRuleParam = { body: ServiceabilityPlatformModel.CourierPartnerRule; }; type CreateStoreRulesParam = { - body: ServiceabilityPlatformModel.CreateStoreRuleDetailsSchema; + body: ServiceabilityPlatformModel.CreateStoreRuleRequestSchema; }; type GetCourierPartnerRuleParam = { /** - * - Unique identifier of the courier partner rule + * - A `rule_id` is a unique identifier for a rule. */ ruleId: string; }; @@ -159,9 +149,6 @@ type GetCourierPartnerRulesParam = { */ status?: string; }; -type GetCourierPartnersParam = { - body: ServiceabilityPlatformModel.ShipmentCourierPartnerDetails; -}; type GetStoreRuleParam = { /** * - A `rule_uid` is a unique identifier for a @@ -178,45 +165,29 @@ type InsertApplicationConfigParam = { body: ServiceabilityPlatformModel.StoreRuleConfigData; }; type PatchApplicationServiceabilitySelfShipmentParam = { - body: ServiceabilityPlatformModel.SelfShipResult; + body: ServiceabilityPlatformModel.SelfShipResponse; }; type UpdateApplicationConfigurationParam = { body: ServiceabilityPlatformModel.ApplicationConfig; }; type UpdateCourierPartnerRulePriorityParam = { - body: ServiceabilityPlatformModel.RulePriorityDetails; + body: ServiceabilityPlatformModel.RulePriorityRequest; }; type UpdateCourierRuleParam = { /** - * - Unique identifier of the courier partner rule. + * - A `rule_id` is a unique identifier for a particular Dp. */ ruleId: string; body: ServiceabilityPlatformModel.CourierPartnerRule; }; type UpdatePincodeAuditHistoryParam = { - /** - * - Page number to be fetched. - */ - pageNumber?: number; - /** - * - Determines the items to be displayed in a page - */ - pageSize?: number; - body: ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryDetails; + body: ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryRequest; }; type UpdatePincodeBulkViewParam = { body: ServiceabilityPlatformModel.PincodeMopBulkData; }; type UpdatePincodeCoDListingParam = { - /** - * - Page number to be fetched. - */ - pageNumber?: number; - /** - * - Determines the items to be displayed in a page - */ - pageSize?: number; - body: ServiceabilityPlatformModel.PincodeCodStatusListingDetails; + body: ServiceabilityPlatformModel.PincodeCodStatusListingRequest; }; type UpdatePincodeMopViewParam = { body: ServiceabilityPlatformModel.PincodeMopData; @@ -227,7 +198,7 @@ type UpdateStoreRulesParam = { * particular rule object. */ ruleUid: string; - body: ServiceabilityPlatformModel.CreateStoreRuleDetailsSchema; + body: ServiceabilityPlatformModel.CreateStoreRuleRequestSchema; }; type UpdateStoreRulesConfigParam = { body: ServiceabilityPlatformModel.StoreRuleConfigData; diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js index e2645e3c2..9c9e6440d 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +++ b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js @@ -9,7 +9,7 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); /** * @typedef CreateStoreRulesParam - * @property {ServiceabilityPlatformModel.CreateStoreRuleDetailsSchema} body + * @property {ServiceabilityPlatformModel.CreateStoreRuleRequestSchema} body */ /** @typedef GetApplicationConfigParam */ @@ -20,7 +20,7 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); /** * @typedef GetCourierPartnerRuleParam - * @property {string} ruleId - Unique identifier of the courier partner rule + * @property {string} ruleId - A `rule_id` is a unique identifier for a rule. */ /** @@ -30,11 +30,6 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); * @property {string} [status] - Filter rules based on rule status */ -/** - * @typedef GetCourierPartnersParam - * @property {ServiceabilityPlatformModel.ShipmentCourierPartnerDetails} body - */ - /** * @typedef GetStoreRuleParam * @property {string} ruleUid - A `rule_uid` is a unique identifier for a @@ -55,7 +50,7 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); /** * @typedef PatchApplicationServiceabilitySelfShipmentParam - * @property {ServiceabilityPlatformModel.SelfShipResult} body + * @property {ServiceabilityPlatformModel.SelfShipResponse} body */ /** @@ -65,20 +60,18 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); /** * @typedef UpdateCourierPartnerRulePriorityParam - * @property {ServiceabilityPlatformModel.RulePriorityDetails} body + * @property {ServiceabilityPlatformModel.RulePriorityRequest} body */ /** * @typedef UpdateCourierRuleParam - * @property {string} ruleId - Unique identifier of the courier partner rule. + * @property {string} ruleId - A `rule_id` is a unique identifier for a particular Dp. * @property {ServiceabilityPlatformModel.CourierPartnerRule} body */ /** * @typedef UpdatePincodeAuditHistoryParam - * @property {number} [pageNumber] - Page number to be fetched. - * @property {number} [pageSize] - Determines the items to be displayed in a page - * @property {ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryDetails} body + * @property {ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryRequest} body */ /** @@ -88,9 +81,7 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); /** * @typedef UpdatePincodeCoDListingParam - * @property {number} [pageNumber] - Page number to be fetched. - * @property {number} [pageSize] - Determines the items to be displayed in a page - * @property {ServiceabilityPlatformModel.PincodeCodStatusListingDetails} body + * @property {ServiceabilityPlatformModel.PincodeCodStatusListingRequest} body */ /** @@ -102,7 +93,7 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); * @typedef UpdateStoreRulesParam * @property {string} ruleUid - A `rule_uid` is a unique identifier for a * particular rule object. - * @property {ServiceabilityPlatformModel.CreateStoreRuleDetailsSchema} body + * @property {ServiceabilityPlatformModel.CreateStoreRuleRequestSchema} body */ /** @@ -121,7 +112,7 @@ class ServiceabilityPlatformApplicationValidator { /** @returns {CreateStoreRulesParam} */ static createStoreRules() { return Joi.object({ - body: ServiceabilityPlatformModel.CreateStoreRuleDetailsSchema().required(), + body: ServiceabilityPlatformModel.CreateStoreRuleRequestSchema().required(), }).required(); } @@ -156,13 +147,6 @@ class ServiceabilityPlatformApplicationValidator { }).required(); } - /** @returns {GetCourierPartnersParam} */ - static getCourierPartners() { - return Joi.object({ - body: ServiceabilityPlatformModel.ShipmentCourierPartnerDetails().required(), - }).required(); - } - /** @returns {GetStoreRuleParam} */ static getStoreRule() { return Joi.object({ @@ -189,7 +173,7 @@ class ServiceabilityPlatformApplicationValidator { /** @returns {PatchApplicationServiceabilitySelfShipmentParam} */ static patchApplicationServiceabilitySelfShipment() { return Joi.object({ - body: ServiceabilityPlatformModel.SelfShipResult().required(), + body: ServiceabilityPlatformModel.SelfShipResponse().required(), }).required(); } @@ -203,7 +187,7 @@ class ServiceabilityPlatformApplicationValidator { /** @returns {UpdateCourierPartnerRulePriorityParam} */ static updateCourierPartnerRulePriority() { return Joi.object({ - body: ServiceabilityPlatformModel.RulePriorityDetails().required(), + body: ServiceabilityPlatformModel.RulePriorityRequest().required(), }).required(); } @@ -218,9 +202,7 @@ class ServiceabilityPlatformApplicationValidator { /** @returns {UpdatePincodeAuditHistoryParam} */ static updatePincodeAuditHistory() { return Joi.object({ - pageNumber: Joi.number(), - pageSize: Joi.number(), - body: ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryDetails().required(), + body: ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryRequest().required(), }).required(); } @@ -234,9 +216,7 @@ class ServiceabilityPlatformApplicationValidator { /** @returns {UpdatePincodeCoDListingParam} */ static updatePincodeCoDListing() { return Joi.object({ - pageNumber: Joi.number(), - pageSize: Joi.number(), - body: ServiceabilityPlatformModel.PincodeCodStatusListingDetails().required(), + body: ServiceabilityPlatformModel.PincodeCodStatusListingRequest().required(), }).required(); } @@ -251,7 +231,7 @@ class ServiceabilityPlatformApplicationValidator { static updateStoreRules() { return Joi.object({ ruleUid: Joi.string().allow("").required(), - body: ServiceabilityPlatformModel.CreateStoreRuleDetailsSchema().required(), + body: ServiceabilityPlatformModel.CreateStoreRuleRequestSchema().required(), }).required(); } diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts b/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts index 0801cbc2d..7a7b3da39 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +++ b/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts @@ -6,19 +6,19 @@ declare class Serviceability { * @param {ServiceabilityPlatformValidator.BulkServiceabilityParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name bulkServiceability * @summary: Bulk update serviceability of localities * @description: Bulk operations involve either new serviceability settings or updating existing ones in large quantities. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/bulkServiceability/). */ - bulkServiceability({ extensionId, schemeId, body, requestHeaders }?: ServiceabilityPlatformValidator.BulkServiceabilityParam, { responseHeaders }?: object): Promise; + bulkServiceability({ extensionId, schemeId, body, requestHeaders }?: ServiceabilityPlatformValidator.BulkServiceabilityParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.BulkTatParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name bulkTat @@ -26,7 +26,7 @@ declare class Serviceability { * @description: Updates locality wise TAT(Turn Around Time) for particular courier scheme using CSV file. * Export locality wise CSV files. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/bulkTat/). */ - bulkTat({ extensionId, schemeId, body, requestHeaders }?: ServiceabilityPlatformValidator.BulkTatParam, { responseHeaders }?: object): Promise; + bulkTat({ extensionId, schemeId, body, requestHeaders }?: ServiceabilityPlatformValidator.BulkTatParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.CreateCourierPartnerAccountParam} arg * - Arg object @@ -45,69 +45,72 @@ declare class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name createPackageMaterial * @summary: Create packaging material * @description: Creates a packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterial/). */ - createPackageMaterial({ body, requestHeaders }?: ServiceabilityPlatformValidator.CreatePackageMaterialParam, { responseHeaders }?: object): Promise; + createPackageMaterial({ body, requestHeaders }?: ServiceabilityPlatformValidator.CreatePackageMaterialParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.CreatePackageMaterialRuleParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name createPackageMaterialRule * @summary: Create packaging rule * @description: Creates a packaging rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterialRule/). */ - createPackageMaterialRule({ body, requestHeaders }?: ServiceabilityPlatformValidator.CreatePackageMaterialRuleParam, { responseHeaders }?: object): Promise; + createPackageMaterialRule({ body, requestHeaders }?: ServiceabilityPlatformValidator.CreatePackageMaterialRuleParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.CreateZoneParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createZone * @summary: Create zone * @description: Creates a delivery zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createZone/). */ - createZone({ body, requestHeaders }?: ServiceabilityPlatformValidator.CreateZoneParam, { responseHeaders }?: object): Promise; + createZone({ body, requestHeaders }?: ServiceabilityPlatformValidator.CreateZoneParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.GetAllStoresParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getAllStores * @summary: Get all stores * @description: Retrieves a list of locations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getAllStores/). */ - getAllStores({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getAllStores({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.GetBulkServiceabilityParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name getBulkServiceability * @summary: Bulk update history * @description: Retrieves the history of changes made to serviceability settings for a scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getBulkServiceability/). */ - getBulkServiceability({ extensionId, schemeId, pageNo, pageSize, batchId, action, status, country, region, startDate, endDate, requestHeaders, }?: ServiceabilityPlatformValidator.GetBulkServiceabilityParam, { responseHeaders }?: object): Promise; + getBulkServiceability({ extensionId, schemeId, pageNo, pageSize, batchId, action, status, country, region, startDate, endDate, requestHeaders, }?: ServiceabilityPlatformValidator.GetBulkServiceabilityParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.GetBulkTatParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name getBulkTat * @summary: Locality TAT change history * @description: Retrieves the history of changes made to TAT(Turn Around Time) for scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getBulkTat/). */ - getBulkTat({ extensionId, schemeId, pageNo, pageSize, batchId, action, status, country, region, startDate, endDate, requestHeaders, }?: ServiceabilityPlatformValidator.GetBulkTatParam, { responseHeaders }?: object): Promise; + getBulkTat({ extensionId, schemeId, pageNo, pageSize, batchId, action, status, country, region, startDate, endDate, requestHeaders, }?: ServiceabilityPlatformValidator.GetBulkTatParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.GetCompanyConfigurationParam} arg * - Arg object @@ -126,38 +129,39 @@ declare class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getCourierPartnerAccount * @summary: Get courier account * @description: Retrieves a single courier partner account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerAccount/). */ - getCourierPartnerAccount({ accountId, requestHeaders }?: ServiceabilityPlatformValidator.GetCourierPartnerAccountParam, { responseHeaders }?: object): Promise; + getCourierPartnerAccount({ accountId, requestHeaders }?: ServiceabilityPlatformValidator.GetCourierPartnerAccountParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.GetCourierPartnerAccountsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getCourierPartnerAccounts * @summary: List courier accounts * @description: Retrieves a list of courier partner accounts. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerAccounts/). */ - getCourierPartnerAccounts({ pageNo, pageSize, stage, paymentMode, transportType, requestHeaders }?: ServiceabilityPlatformValidator.GetCourierPartnerAccountsParam, { responseHeaders }?: object): Promise; + getCourierPartnerAccounts({ pageNo, pageSize, stage, paymentMode, transportType, requestHeaders }?: ServiceabilityPlatformValidator.GetCourierPartnerAccountsParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.GetOptimalLocationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name getOptimalLocations * @summary: Get selling locations * @description: Retrieves a list selling locations which are best suited to fullfil an order for a customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getOptimalLocations/). */ - getOptimalLocations({ body, requestHeaders }?: ServiceabilityPlatformValidator.GetOptimalLocationsParam, { responseHeaders }?: object): Promise; + getOptimalLocations({ body, requestHeaders }?: ServiceabilityPlatformValidator.GetOptimalLocationsParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.GetPackageMaterialListParam} arg * - Arg object @@ -177,13 +181,13 @@ declare class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getPackageMaterialRule * @summary: Get packaging material rule * @description: Retrieve packaging rule details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRule/). */ - getPackageMaterialRule({ ruleId, requestHeaders }?: ServiceabilityPlatformValidator.GetPackageMaterialRuleParam, { responseHeaders }?: object): Promise; + getPackageMaterialRule({ ruleId, requestHeaders }?: ServiceabilityPlatformValidator.GetPackageMaterialRuleParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.GetPackageMaterialRulesParam} arg * - Arg object @@ -202,13 +206,14 @@ declare class Serviceability { * @param {ServiceabilityPlatformValidator.GetPackageMaterialsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name getPackageMaterials * @summary: Get packaging material * @description: Retrieve a single packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterials/). */ - getPackageMaterials({ packageMaterialId, requestHeaders }?: ServiceabilityPlatformValidator.GetPackageMaterialsParam, { responseHeaders }?: object): Promise; + getPackageMaterials({ packageMaterialId, requestHeaders }?: ServiceabilityPlatformValidator.GetPackageMaterialsParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.GetServiceabilityParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -235,12 +240,12 @@ declare class Serviceability { * @param {ServiceabilityPlatformValidator.GetZonesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getZones * @summary: Get zones * @description: Retrieves a list of delivery zones. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZones/). */ - getZones({ pageNo, pageSize, isActive, channelId, q, countryIsoCode, state, city, pincode, sector, requestHeaders, }?: ServiceabilityPlatformValidator.GetZonesParam, { responseHeaders }?: object): Promise; + getZones({ pageNo, pageSize, isActive, channelId, q, countryIsoCode, state, city, pincode, sector, requestHeaders, }?: ServiceabilityPlatformValidator.GetZonesParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.UpdateCompanyConfigurationParam} arg * - Arg object @@ -259,39 +264,40 @@ declare class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name updateCourierPartnerAccount * @summary: Update courier account * @description: Updates an existing courier partner account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierPartnerAccount/). */ - updateCourierPartnerAccount({ accountId, body, requestHeaders }?: ServiceabilityPlatformValidator.UpdateCourierPartnerAccountParam, { responseHeaders }?: object): Promise; + updateCourierPartnerAccount({ accountId, body, requestHeaders }?: ServiceabilityPlatformValidator.UpdateCourierPartnerAccountParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.UpdatePackageMaterialRuleParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name updatePackageMaterialRule * @summary: Update packaging rule * @description: Update an existing packaging rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePackageMaterialRule/). */ - updatePackageMaterialRule({ ruleId, body, requestHeaders }?: ServiceabilityPlatformValidator.UpdatePackageMaterialRuleParam, { responseHeaders }?: object): Promise; + updatePackageMaterialRule({ ruleId, body, requestHeaders }?: ServiceabilityPlatformValidator.UpdatePackageMaterialRuleParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.UpdatePackageMaterialsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name updatePackageMaterials * @summary: Update packaging material * @description: Update an existing packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePackageMaterials/). */ - updatePackageMaterials({ packageMaterialId, body, requestHeaders }?: ServiceabilityPlatformValidator.UpdatePackageMaterialsParam, { responseHeaders }?: object): Promise; + updatePackageMaterials({ packageMaterialId, body, requestHeaders }?: ServiceabilityPlatformValidator.UpdatePackageMaterialsParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformValidator.UpdateServiceabilityParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -307,13 +313,13 @@ declare class Serviceability { * @param {ServiceabilityPlatformValidator.UpdateZoneByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name updateZoneById * @summary: Update a zone * @description: Update an existing delivery zone . - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateZoneById/). */ - updateZoneById({ zoneId, body, requestHeaders }?: ServiceabilityPlatformValidator.UpdateZoneByIdParam, { responseHeaders }?: object): Promise; + updateZoneById({ zoneId, body, requestHeaders }?: ServiceabilityPlatformValidator.UpdateZoneByIdParam, { responseHeaders }?: object): Promise; } import ServiceabilityPlatformValidator = require("./ServiceabilityPlatformValidator"); import ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformClient.js b/sdk/platform/Serviceability/ServiceabilityPlatformClient.js index 188ddda38..e759b90d0 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +++ b/sdk/platform/Serviceability/ServiceabilityPlatformClient.js @@ -18,7 +18,7 @@ class Serviceability { * @param {ServiceabilityPlatformValidator.BulkServiceabilityParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name bulkServiceability @@ -82,7 +82,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.BulkRegionResultItemData().validate( + } = ServiceabilityPlatformModel.BulkRegionResponseItemData().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -105,7 +105,7 @@ class Serviceability { * @param {ServiceabilityPlatformValidator.BulkTatParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name bulkTat @@ -168,7 +168,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.BulkRegionResultItemData().validate( + } = ServiceabilityPlatformModel.BulkRegionResponseItemData().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -276,8 +276,9 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name createPackageMaterial * @summary: Create packaging material * @description: Creates a packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterial/). @@ -335,7 +336,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.PackageMaterialResult().validate( + } = ServiceabilityPlatformModel.PackageMaterialResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -360,7 +361,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name createPackageMaterialRule * @summary: Create packaging rule @@ -419,10 +420,10 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.PackageRuleResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ServiceabilityPlatformModel.PackageRuleResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -442,7 +443,7 @@ class Serviceability { * @param {ServiceabilityPlatformValidator.CreateZoneParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createZone * @summary: Create zone * @description: Creates a delivery zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createZone/). @@ -498,7 +499,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.ZoneResult().validate(responseData, { + } = ServiceabilityPlatformModel.ZoneResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -521,7 +522,7 @@ class Serviceability { * @param {ServiceabilityPlatformValidator.GetAllStoresParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getAllStores * @summary: Get all stores @@ -574,7 +575,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.GetStoresViewResult().validate( + } = ServiceabilityPlatformModel.GetStoresViewResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -599,7 +600,8 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name getBulkServiceability * @summary: Bulk update history * @description: Retrieves the history of changes made to serviceability settings for a scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getBulkServiceability/). @@ -699,10 +701,10 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.BulkRegionResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ServiceabilityPlatformModel.BulkRegionResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -722,7 +724,8 @@ class Serviceability { * @param {ServiceabilityPlatformValidator.GetBulkTatParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name getBulkTat * @summary: Locality TAT change history * @description: Retrieves the history of changes made to TAT(Turn Around Time) for scheme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getBulkTat/). @@ -820,10 +823,10 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.BulkRegionResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ServiceabilityPlatformModel.BulkRegionResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -924,7 +927,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getCourierPartnerAccount * @summary: Get courier account @@ -983,7 +986,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.CourierAccountResult().validate( + } = ServiceabilityPlatformModel.CourierAccountResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1008,7 +1011,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * * @name getCourierPartnerAccounts @@ -1083,7 +1086,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResult().validate( + } = ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1106,8 +1109,9 @@ class Serviceability { * @param {ServiceabilityPlatformValidator.GetOptimalLocationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name getOptimalLocations * @summary: Get selling locations * @description: Retrieves a list selling locations which are best suited to fullfil an order for a customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getOptimalLocations/). @@ -1165,7 +1169,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.OptimalLocationsResult().validate( + } = ServiceabilityPlatformModel.OptimalLocationsResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1289,7 +1293,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getPackageMaterialRule * @summary: Get packaging material rule @@ -1348,10 +1352,10 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.PackageRuleResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ServiceabilityPlatformModel.PackageRuleResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1463,8 +1467,9 @@ class Serviceability { * @param {ServiceabilityPlatformValidator.GetPackageMaterialsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name getPackageMaterials * @summary: Get packaging material * @description: Retrieve a single packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterials/). @@ -1522,7 +1527,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.PackageMaterialResult().validate( + } = ServiceabilityPlatformModel.PackageMaterialResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1713,7 +1718,7 @@ class Serviceability { * @param {ServiceabilityPlatformValidator.GetZonesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getZones * @summary: Get zones * @description: Retrieves a list of delivery zones. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZones/). @@ -1809,7 +1814,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.ListViewResult().validate(responseData, { + } = ServiceabilityPlatformModel.ListViewResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1917,7 +1922,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name updateCourierPartnerAccount * @summary: Update courier account @@ -1978,7 +1983,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.CourierAccountResult().validate( + } = ServiceabilityPlatformModel.CourierAccountResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -2003,7 +2008,7 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name updatePackageMaterialRule * @summary: Update packaging rule @@ -2064,10 +2069,10 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.PackageRuleResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ServiceabilityPlatformModel.PackageRuleResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2089,8 +2094,9 @@ class Serviceability { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} + * - Success response + * * @name updatePackageMaterials * @summary: Update packaging material * @description: Update an existing packaging material - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePackageMaterials/). @@ -2150,7 +2156,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.PackageMaterialResult().validate( + } = ServiceabilityPlatformModel.PackageMaterialResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -2263,7 +2269,7 @@ class Serviceability { * @param {ServiceabilityPlatformValidator.UpdateZoneByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name updateZoneById * @summary: Update a zone @@ -2322,10 +2328,10 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.ZoneSuccessResult().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ServiceabilityPlatformModel.ZoneSuccessResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts b/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts index 937298061..987973c61 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +++ b/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts @@ -1,10 +1,10 @@ export = ServiceabilityPlatformModel; /** - * @typedef UpdateZoneConfigDetails + * @typedef UpdateZoneConfigRequest * @property {string} [serviceability_type] */ /** - * @typedef ServiceabilityErrorResult + * @typedef ServiceabilityErrorResponse * @property {string} message * @property {string} value * @property {string} type @@ -16,13 +16,13 @@ export = ServiceabilityPlatformModel; * @property {string} channel_type */ /** - * @typedef ApplicationServiceabilityConfigResult - * @property {ServiceabilityErrorResult} [error] + * @typedef ApplicationServiceabilityConfigResponse + * @property {ServiceabilityErrorResponse} [error] * @property {ApplicationServiceabilityConfig} [data] * @property {boolean} success */ /** - * @typedef EntityRegionView_Details + * @typedef EntityRegionView_Request * @property {string[]} sub_type * @property {string[]} [parent_id] */ @@ -41,7 +41,7 @@ export = ServiceabilityPlatformModel; * @property {number} current */ /** - * @typedef getAppRegionZonesResult + * @typedef getAppRegionZonesResponse * @property {PageSchema[]} page * @property {ListViewItems[]} items */ @@ -60,7 +60,7 @@ export = ServiceabilityPlatformModel; * @property {string} name */ /** - * @typedef EntityRegionView_Result + * @typedef EntityRegionView_Response * @property {EntityRegionView_Error} error * @property {EntityRegionView_page} page * @property {EntityRegionView_Items[]} data @@ -106,7 +106,7 @@ export = ServiceabilityPlatformModel; * @property {ListViewChannels[]} channels - The name of the zone. */ /** - * @typedef ListViewResult + * @typedef ListViewResponse * @property {ZoneDataItem} page * @property {ListViewItems[]} items */ @@ -119,7 +119,7 @@ export = ServiceabilityPlatformModel; * @property {number} current */ /** - * @typedef CompanyStoreView_Result + * @typedef CompanyStoreView_Response * @property {CompanyStoreView_PageItems[]} page * @property {Object[]} [items] */ @@ -130,9 +130,8 @@ export = ServiceabilityPlatformModel; */ /** * @typedef ZoneProductTypes - * @property {string} type - Denotes if the zone is applicable for all the - * products or specific products. - * @property {string[]} tags - List of product tags. + * @property {string} type + * @property {string[]} tags */ /** * @typedef ZoneMappingDetailType @@ -141,8 +140,8 @@ export = ServiceabilityPlatformModel; */ /** * @typedef ZoneMappingType - * @property {string} country - Uid for the country. - * @property {string[]} regions - List of region uid for the given country. + * @property {string} country + * @property {string[]} regions */ /** * @typedef ZoneMappingRegions @@ -154,89 +153,78 @@ export = ServiceabilityPlatformModel; */ /** * @typedef UpdateZoneData - * @property {string} zone_id - Unique identifier for the zone. - * @property {string} name - Name for the zone. - * @property {string} slug - A human-readable and unique identifier for the - * zone, derived from the name. - * @property {number} company_id - Company id associated with the zone. - * @property {boolean} is_active - A flag indicating whether the zone is active. - * @property {GetZoneDataViewChannels[]} channels - Channels for which the zone is active. + * @property {string} zone_id + * @property {string} name + * @property {string} slug + * @property {number} company_id + * @property {boolean} is_active + * @property {GetZoneDataViewChannels[]} channels * @property {ZoneProductTypes} product - * @property {number[]} store_ids - A list of store identifiers associated with the zone. - * @property {string} region_type - Type of region that belongs in the zone. - * @property {ZoneMappingType[]} mapping - Country to region mapping for the zone. + * @property {number[]} store_ids + * @property {string} region_type + * @property {ZoneMappingType[]} mapping */ /** - * @typedef ZoneUpdateDetails + * @typedef ZoneUpdateRequest * @property {string} identifier * @property {UpdateZoneData} data */ /** - * @typedef ZoneSuccessResult + * @typedef ZoneSuccessResponse * @property {number} status_code * @property {boolean} success */ /** * @typedef GetZoneDataViewItems - * @property {string} zone_id - The unique identifier for the zone. - * @property {string} name - The name of the zone for easy identification. - * @property {string} slug - A URL-friendly version of the zone’s name, used for - * routing or linking. - * @property {number} [company_id] - The ID of the company associated with this zone. - * @property {boolean} is_active - A flag indicating whether the zone is active - * (true) or inactive (false). - * @property {GetZoneDataViewChannels[]} channels - A list of channels available - * within this zone. + * @property {string} zone_id + * @property {string} name + * @property {string} slug + * @property {number} [company_id] + * @property {boolean} is_active + * @property {GetZoneDataViewChannels[]} channels * @property {ZoneProductTypes} product - * @property {number[]} store_ids - A collection of store IDs linked to this zone. - * @property {string} [region_type] - The type of region the zone represents. - * @property {ZoneMappingType[]} mapping - A list of mappings defining - * relationships between this zone and other entities. - * @property {string} [assignment_preference] - The preferred method for - * assigning stores or products to the zone. - * @property {number} stores_count - The total number of stores assigned to this zone. + * @property {number[]} store_ids + * @property {string} [region_type] + * @property {ZoneMappingType[]} mapping + * @property {number} stores_count */ /** - * @typedef GetSingleZoneDataViewResult + * @typedef GetSingleZoneDataViewResponse * @property {GetZoneDataViewItems} data */ /** * @typedef GetZoneByIdSchema - * @property {string} zone_id - Unique identifier for the zone. - * @property {string} name - Name for the zone. - * @property {string} slug - A human-readable and unique identifier for the - * zone, derived from the name. - * @property {number} [company_id] - Company id associated with the zone. - * @property {boolean} is_active - A flag indicating whether the zone is active. - * @property {GetZoneDataViewChannels[]} channels - Channels for which the zone is active. + * @property {string} zone_id + * @property {string} name + * @property {string} slug + * @property {number} [company_id] + * @property {boolean} is_active + * @property {GetZoneDataViewChannels[]} channels * @property {ZoneProductTypes} product - * @property {number[]} store_ids - A list of store identifiers associated with the zone. - * @property {string} region_type - Type of region that belongs in the zone. + * @property {number[]} store_ids + * @property {string} region_type * @property {ZoneMappingDetailType[]} mapping - Country to region mapping for the zone. - * @property {number} [stores_count] */ /** * @typedef CreateZoneData - * @property {string} name - Name of the zone. - * @property {string} slug - A human-readable and unique identifier for the - * zone, derived from the name. - * @property {number} company_id - Unique identifier of the company for which - * the zone is created. - * @property {boolean} is_active - A flag indicating whether the zone is active. - * @property {GetZoneDataViewChannels[]} channels - Channels for which the zone is active. - * @property {number[]} store_ids - A list of store identifiers associated with the zone. - * @property {string} region_type - Type of region that belongs in the zone. - * @property {ZoneMappingType[]} mapping - Country to region mapping for the zone. - * @property {ZoneProductTypes} [product] + * @property {string} name + * @property {string} slug + * @property {number} company_id + * @property {boolean} is_active + * @property {GetZoneDataViewChannels[]} channels + * @property {number[]} store_ids + * @property {ZoneProductTypes} product + * @property {string} region_type + * @property {ZoneMappingType[]} mapping */ /** - * @typedef ZoneResult - * @property {number} [status_code] + * @typedef ZoneResponse + * @property {number} status_code * @property {string} zone_id * @property {boolean} success */ /** - * @typedef GetZoneFromPincodeViewDetails + * @typedef GetZoneFromPincodeViewRequest * @property {string} country * @property {string} pincode */ @@ -251,17 +239,17 @@ export = ServiceabilityPlatformModel; * @property {number[]} store_ids */ /** - * @typedef GetZoneFromPincodeViewResult + * @typedef GetZoneFromPincodeViewResponse * @property {string} serviceability_type * @property {Zone[]} zones */ /** - * @typedef GetZoneFromApplicationIdViewResult + * @typedef GetZoneFromApplicationIdViewResponse * @property {ZoneDataItem[]} page * @property {ListViewItems[]} items */ /** - * @typedef ServiceabilityPageResult + * @typedef ServiceabilityPageResponse * @property {string} [type] * @property {boolean} [has_next] * @property {number} [item_total] @@ -274,32 +262,32 @@ export = ServiceabilityPlatformModel; * @property {number} [country_code] */ /** - * @typedef ManagerResult + * @typedef ManagerResponse * @property {string} [email] * @property {MobileNo} [mobile_no] * @property {string} [name] */ /** - * @typedef ModifiedByResult + * @typedef ModifiedByResponse * @property {string} [username] * @property {string} [user_id] */ /** - * @typedef IntegrationTypeResult + * @typedef IntegrationTypeResponse * @property {string} [inventory] * @property {string} [order] */ /** - * @typedef ProductReturnConfigResult + * @typedef ProductReturnConfigResponse * @property {boolean} [on_same_store] */ /** - * @typedef ContactNumberResult + * @typedef ContactNumberResponse * @property {string} [number] * @property {number} [country_code] */ /** - * @typedef AddressResult + * @typedef AddressResponse * @property {string} [city] * @property {string} [address1] * @property {number} [pincode] @@ -311,25 +299,25 @@ export = ServiceabilityPlatformModel; * @property {number} [longitude] */ /** - * @typedef CreatedByResult + * @typedef CreatedByResponse * @property {string} [username] * @property {string} [user_id] */ /** - * @typedef EwayBillResult + * @typedef EwayBillResponse * @property {boolean} [enabled] */ /** - * @typedef EinvoiceResult + * @typedef EinvoiceResponse * @property {boolean} [enabled] */ /** - * @typedef GstCredentialsResult - * @property {EwayBillResult} [e_waybill] - * @property {EinvoiceResult} [e_invoice] + * @typedef GstCredentialsResponse + * @property {EwayBillResponse} [e_waybill] + * @property {EinvoiceResponse} [e_invoice] */ /** - * @typedef WarningsResult + * @typedef WarningsResponse * @property {string} [store_address] */ /** @@ -338,14 +326,14 @@ export = ServiceabilityPlatformModel; * @property {number} [hour] */ /** - * @typedef TimmingResult + * @typedef TimmingResponse * @property {boolean} [open] * @property {string} [weekday] * @property {OpeningClosing} [closing] * @property {OpeningClosing} [opening] */ /** - * @typedef DocumentsResult + * @typedef DocumentsResponse * @property {string} [legal_name] * @property {string} [value] * @property {string} [type] @@ -365,108 +353,99 @@ export = ServiceabilityPlatformModel; * @property {boolean} [assign_dp_from_sb] */ /** - * @typedef LogisticsResult + * @typedef LogisticsResponse * @property {boolean} [override] * @property {Dp} [dp] */ /** - * @typedef ItemResult + * @typedef ItemResponse * @property {string} [created_on] - * @property {ManagerResult} [manager] - * @property {ModifiedByResult} [modified_by] - * @property {IntegrationTypeResult} [integration_type] + * @property {ManagerResponse} [manager] + * @property {ModifiedByResponse} [modified_by] + * @property {IntegrationTypeResponse} [integration_type] * @property {string} [verified_on] - * @property {ProductReturnConfigResult} [product_return_config] - * @property {ContactNumberResult[]} [contact_numbers] - * @property {ModifiedByResult} [verified_by] + * @property {ProductReturnConfigResponse} [product_return_config] + * @property {ContactNumberResponse[]} [contact_numbers] + * @property {ModifiedByResponse} [verified_by] * @property {string} [stage] - * @property {AddressResult} [address] + * @property {AddressResponse} [address] * @property {string} [modified_on] - * @property {CreatedByResult} [created_by] - * @property {GstCredentialsResult} [gst_credentials] + * @property {CreatedByResponse} [created_by] + * @property {GstCredentialsResponse} [gst_credentials] * @property {string} [display_name] * @property {number} [company_id] * @property {number} [uid] - * @property {Object} [_custom_json] - Custom JSON for internal usage + * @property {Object} [_custom_json] * @property {string} [code] - * @property {WarningsResult} [warnings] + * @property {WarningsResponse} [warnings] * @property {string} [name] - * @property {TimmingResult[]} [timing] - * @property {DocumentsResult[]} [documents] + * @property {TimmingResponse[]} [timing] + * @property {DocumentsResponse[]} [documents] * @property {string} [store_type] * @property {string} [sub_type] * @property {number} [company] * @property {string} [_cls] - * @property {LogisticsResult} [logistics] + * @property {LogisticsResponse} [logistics] * @property {string[]} [notification_emails] */ /** - * @typedef GetStoresViewResult - * @property {ServiceabilityPageResult} page - * @property {ItemResult[]} [items] + * @typedef GetStoresViewResponse + * @property {ServiceabilityPageResponse} page + * @property {ItemResponse[]} [items] */ /** * @typedef PincodeMopData - * @property {number[]} pincodes - A list of pincodes. - * @property {string} country - Name of the country. - * @property {string} action - Denotes wether to activate or deavtivate pincodes - * for COD mode of payment. + * @property {number[]} pincodes + * @property {string} country + * @property {string} action */ /** - * @typedef PincodeMopUpdateResult - * @property {number} pincode - Pincode of the region. - * @property {string} channel_id - Unique identifier of the sales channel. - * @property {string} country - Country name. - * @property {boolean} is_active - Denotes whether the pincode mode of payment - * is active or not. + * @typedef PincodeMopUpdateResponse + * @property {number} pincode + * @property {string} channel_id + * @property {string} country + * @property {boolean} is_active */ /** - * @typedef PincodeMOPResult - * @property {boolean} success - Denotes if the action was successful or not. - * @property {number} status_code - Status code for the response. - * @property {string} batch_id - Unique identifier identifying the perticular request. - * @property {string} country - Name of the country. - * @property {string} action - Denotes wether to activate or deavtivate pincodes - * for COD mode of payment. - * @property {number[]} [pincodes] - List of pincodes. - * @property {PincodeMopUpdateResult[]} [updated_pincodes] - Details of the - * updated pincodes. + * @typedef PincodeMOPresponse + * @property {boolean} success + * @property {number} status_code + * @property {string} batch_id + * @property {string} country + * @property {string} action + * @property {number[]} [pincodes] + * @property {PincodeMopUpdateResponse[]} [updated_pincodes] */ /** * @typedef CommonError - * @property {string} [status_code] - Status code for the error. + * @property {string} [status_code] * @property {Object} [error] - * @property {string} [success] - Whether operation was successful. + * @property {string} [success] */ /** * @typedef PincodeMopBulkData - * @property {string} batch_id - Unique identifier for the request. - * @property {string} s3_url - CDN url for the uploaded file. + * @property {string} batch_id + * @property {string} s3_url */ /** - * @typedef PincodeBulkViewResult + * @typedef PincodeBulkViewResponse * @property {string} batch_id - * @property {string} s3_url - CDN url for the uploaded file. + * @property {string} s3_url */ /** - * @typedef PincodeCodStatusListingDetails - * @property {string} [country] - Name of the country. - * @property {boolean} [is_active] - Search based on the active or inactive flag. - * @property {number} [pincode] - Search based on the pincode. + * @typedef PincodeCodStatusListingRequest + * @property {string} [country] + * @property {boolean} [is_active] + * @property {number} [pincode] * @property {number} [current] * @property {number} [page_size] */ /** - * @typedef PincodeCodStatusItem - * @property {boolean} [active] - Denoted if the pincode is active or not. - * @property {string} [pincode] - Name of the pincode. - */ -/** - * @typedef PincodeCodStatusListingResult - * @property {string} country - Name of the country. - * @property {PincodeCodStatusListingResult[]} data - List of pincode details. - * @property {boolean} success - Denotes if the request was successful or not. - * @property {Error[]} [errors] - List of error object in case of unsuccessful response. + * @typedef PincodeCodStatusListingResponse + * @property {string} country + * @property {PincodeCodStatusListingResponse[]} data + * @property {boolean} success + * @property {Error[]} [errors] * @property {PincodeCodStatusListingPage} page * @property {PincodeCodStatusListingSummary} summary */ @@ -486,13 +465,13 @@ export = ServiceabilityPlatformModel; */ /** * @typedef PincodeCodStatusListingSummary - * @property {number} total_active_pincodes - Count of the total active pincodes. - * @property {number} total_inactive_pincodes - Count of the total inactive pincodes. + * @property {number} total_active_pincodes + * @property {number} total_inactive_pincodes */ /** - * @typedef PincodeMopUpdateAuditHistoryDetails - * @property {string} entity_type - Type of the entity requested. - * @property {string} [file_name] - Name of the file. + * @typedef PincodeMopUpdateAuditHistoryRequest + * @property {string} entity_type + * @property {string} [file_name] */ /** * @typedef PincodeMopUpdateAuditHistoryPaging @@ -503,22 +482,21 @@ export = ServiceabilityPlatformModel; * @property {number} [item_total] */ /** - * @typedef PincodeMopUpdateAuditHistoryResult - * @property {string} [batch_id] - Uniquie identifier of the request. - * @property {string} [entity_type] - Type of the entity requested. - * @property {string} [error_file_s3_url] - URL for the error file. - * @property {string} [s3_url] - CDN url for the file uploaded. - * @property {string} [file_name] - Name of the file. + * @typedef PincodeMopUpdateAuditHistoryResponse + * @property {string} [batch_id] + * @property {string} [entity_type] + * @property {string} [error_file_s3_url] + * @property {string} [s3_url] + * @property {string} [file_name] * @property {string} [updated_at] * @property {string} [updated_by] - * @property {boolean} [success] - Denotes if the request was successfully processed. + * @property {boolean} [success] */ /** - * @typedef PincodeMopUpdateAuditHistoryResultData - * @property {string} [entity_type] - Type of the entity requested. + * @typedef PincodeMopUpdateAuditHistoryResponseData + * @property {string} [entity_type] * @property {PincodeMopUpdateAuditHistoryPaging} page - * @property {PincodeMopUpdateAuditHistoryResult[]} data - History records of - * the uploaded files. + * @property {PincodeMopUpdateAuditHistoryResponse[]} data */ /** * @typedef ArithmeticOperations @@ -545,49 +523,34 @@ export = ServiceabilityPlatformModel; * @property {string[]} [payment_mode] * @property {SchemeRulesFeatures} [feature] */ -/** - * @typedef CourierAccountUpdateDetails - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {string} stage - Denotes whether the account is in enabled or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. - */ /** * @typedef CourierAccount - * @property {number} company_id - Company id associated with the account. - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} account_id - Unique identifier of courier partner scheme - * and company id combination. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {string} stage - Denotes whether the account is in enabled or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. - * @property {CourierPartnerSchemeModel} scheme_rules + * @property {string} extension_id + * @property {string} account_id + * @property {string} scheme_id + * @property {boolean} is_self_ship + * @property {string} stage + * @property {boolean} is_own_account */ /** - * @typedef CourierAccountDetailsBody - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} [account_id] - Unique identifier of courier partner scheme - * and company id combination. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {string} stage - Denotes whether the account is in enabled or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. + * @typedef CourierAccountRequestBody + * @property {string} extension_id + * @property {string} [account_id] + * @property {string} scheme_id + * @property {boolean} is_self_ship + * @property {string} stage + * @property {boolean} is_own_account */ /** - * @typedef ErrorResult - * @property {string} value - Fields containing the error. - * @property {string} message - Description of the error. - * @property {string} type - Type of the error. + * @typedef ErrorResponse + * @property {string} value + * @property {string} message + * @property {string} type */ /** - * @typedef CourierPartnerAccountFailureResult - * @property {boolean} success - Denotes whether the request is a success or failure. - * @property {ErrorResult[]} error + * @typedef CourierPartnerAccountFailureResponse + * @property {boolean} success + * @property {ErrorResponse[]} error */ /** * @typedef Page @@ -600,38 +563,31 @@ export = ServiceabilityPlatformModel; * @property {number} [size] - The number of items per page. */ /** - * @typedef CourierPartnerRuleCPListResult - * @property {string} account_id - Unique identifier of courier partner scheme - * and company id combination. - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {Object} [scheme_rules] - Denotes the scheme rules associated with - * the courier partner account. + * @typedef CourierPartnerRuleCPListResponse + * @property {string} [account_id] + * @property {string} [extension_id] + * @property {boolean} [is_self_ship] + * @property {Object} [scheme_rules] */ /** - * @typedef CourierPartnerRuleResult - * @property {boolean} is_active - Denotes whether the given courier partner - * rule is inactive or active. - * @property {string} application_id - Unique identifier of the sales channel. - * @property {number} company_id - Unique identifier of the company. - * @property {CourierPartnerRuleConditions} conditions - * @property {string[]} sort - Sort Strategy of the courier partners. - * @property {Object} [created_by] - The Fynd account used to create the courier - * partner rule. - * @property {string} id - Unique identifier of the courier partner rule. - * @property {Object} [modified_by] - The Fynd account used to modify the - * courier partner rule. - * @property {string} [modified_on] - The datetime at which courier partner rule - * is modified. - * @property {string} name - Name for the courier partner rule. - * @property {string} type - The type of the rule. - * @property {CourierPartnerRuleCPListResult[]} [cp_list] + * @typedef CourierPartnerRuleResponse + * @property {boolean} [is_active] + * @property {string} [application_id] + * @property {number} [company_id] + * @property {CourierPartnerRuleConditions} [conditions] + * @property {string[]} [sort] + * @property {Object} [created_by] + * @property {string} [id] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} [name] + * @property {string} [type] + * @property {CourierPartnerRuleCPListResponse[]} [cp_list] */ /** * @typedef CourierPartnerList - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} account_id - Unique identifier of courier partner scheme - * and company id combination. + * @property {string} extension_id + * @property {string} account_id */ /** * @typedef LocationRuleValues @@ -639,7 +595,7 @@ export = ServiceabilityPlatformModel; * @property {string} [sub_type] * @property {string} [name] * @property {string} [display_name] - * @property {string[]} [parent_id] + * @property {string} [parent_id] * @property {string[]} [parent_ids] */ /** @@ -676,168 +632,86 @@ export = ServiceabilityPlatformModel; */ /** * @typedef CourierPartnerRule - * @property {boolean} is_active - Denotes whether the given courier partner - * rule is inactive or active. - * @property {CourierPartnerList[]} [cp_list] - A list of courier partners. - * @property {string} name - Name for the courier partner rule. + * @property {boolean} is_active + * @property {CourierPartnerList[]} [cp_list] + * @property {string} name * @property {CourierPartnerRuleConditions} conditions - * @property {string[]} sort - Sort Strategy for the courier partners. - * @property {string} [type] - Denotes the type of the rule. + * @property {string[]} sort */ /** - * @typedef FailureResult + * @typedef FailureResponse * @property {boolean} success - * @property {ErrorResult[]} error + * @property {ErrorResponse[]} error */ /** - * @typedef CourierPartnerRulesListResult - * @property {CourierPartnerRuleResult[]} items + * @typedef CourierPartnerRulesListResponse + * @property {CourierPartnerRuleResponse[]} items * @property {Page} page */ -/** - * @typedef ShipmentsArticles - * @property {number} [item_id] - Unique identifier of the item. - * @property {number} [category_id] - Unique identifier of the category. - * @property {number} [brand_id] - Unique identifier of the brand. - * @property {number} [department_id] - Unique identifier of the department. - * @property {string[]} [tags] - Tags associated with the item. - */ -/** - * @typedef ShipmentDimension - * @property {number} height - Height of the shipment in centimeters. - * @property {number} length - Length of the shipment in centimeters. - * @property {number} width - Width of the shipment in centimeters. - */ -/** - * @typedef Shipments - * @property {string} [id] - Unique identifier of the shipment. - * @property {number} [location_id] - Unique identifier of the selling location. - * @property {string[]} [location_tags] - Tags associated with the selling location. - * @property {number} [shipment_weight] - Weight of the shipment. - * @property {number} [shipment_volumetric_weight] - Volumetric weight of the shipment. - * @property {number} [shipment_cost] - Total Cost of the shipment. - * @property {ShipmentDimension} [shipment_dimension] - * @property {string[]} [courier_partner_schemes] - A List of courier schemes. - * @property {ShipmentsArticles[]} [articles] - List of articles in the shipment. - */ -/** - * @typedef ShipmentCourierPartnerDetails - * @property {ShipmentsCourierPartnersServiceability} from_location - * @property {ShipmentsCourierPartnersServiceability} to_location - * @property {Shipments[]} [shipments] - List of shipments. - * @property {string} [journey] - Journey type of the shipment forward or return. - * @property {string} [payment_mode] - Payment mode opted for the shipment. - */ -/** - * @typedef CourierPartnerPromise - * @property {string} min - The earliest possible timestamp. - * @property {string} max - The latest possible timestamp. - */ -/** - * @typedef CourierPartners - * @property {string} [extension_id] - Unique identifier of courier partner extension. - * @property {string} [scheme_id] - Unique identifier of courier partner scheme. - * @property {string} [name] - Name of the courier partner. - * @property {CourierPartnerPromise} [delivery_promise] - */ -/** - * @typedef ShipmentCourierPartners - * @property {string} [id] - Unique identifier of the shipment. - * @property {CourierPartners[]} [courier_partners] - Courier partners of the shipment. - */ -/** - * @typedef ShipmentCourierPartnerResult - * @property {CourierPartners[]} [courier_partners] - * @property {ShipmentCourierPartners[]} [shipments] - */ -/** - * @typedef ShipmentsCourierPartnersServiceability - * @property {string} [pincode] - Postal code or PIN code of the address area. - * @property {string} [sector_code] - Specifies the sector or district code of - * the address if applicable. - * @property {string} [state_code] - Indicates the state or province code of the address. - * @property {string} [city_code] - Denote the city or municipality code of the address. - * @property {string} country_code - ISO2 code for the country of the address. - */ /** * @typedef CompanyConfig - * @property {string[]} rule_ids - A list for courier partner rules. - * @property {string[]} sort - Sort strategy for the courier partners. - * @property {string} [logistics_as_actual] - Depicts if the courier partner - * rule configuration plan is subscribed by the seller for which mode. - * @property {number} company_id - Unique identifier of the company. - * @property {string} [application_id] - Unique identifier of the sales channel. + * @property {string[]} rule_ids + * @property {string[]} sort + * @property {boolean} [logistics_as_actual] */ /** * @typedef ZoneConfig - * @property {string} [serviceability_type] - Serviceability type of the delivery zone. - * @property {number} [active_count] - Count of active delivery zones associated - * with the sales channel. - * @property {number} [total_count] - Count of total delivery zones associated - * with the sales channel. + * @property {string} [serviceability_type] */ /** * @typedef ApplicationConfig - * @property {string[]} [rule_ids] - A list of courier partner rules. - * @property {string[]} [sort] - Strategy adopted to sort the courier partners. + * @property {string[]} [rule_ids] + * @property {string[]} [sort] * @property {ZoneConfig} [zones] */ /** - * @typedef BulkRegionJobDetails - * @property {string} [file_path] - CDN path of the uploaded csv file for bulk import. - * @property {string} country - Country for which the tat or serviceability is - * to be imported or exported. - * @property {string} action - Denotes the import or export action to be performed. - * @property {string} region - Region of the country for which import or export - * is triggered. + * @typedef BulkRegionJobSerializer + * @property {string} [file_path] + * @property {string} country + * @property {string} action + * @property {string} region */ /** - * @typedef BulkRegionResultItemData - * @property {string} [file_path] - CDN path of the file which was used for bulk import. - * @property {number} [failed] - Count of the failed records. + * @typedef BulkRegionResponseItemData + * @property {string} file_path + * @property {number} [failed] * @property {Object[]} [failed_records] - * @property {string} action - Denotes the import or export action performed. - * @property {string} batch_id - Unique id to identify the import or export query. - * @property {string} country - Country for which the import or export action is - * performed. - * @property {number} [success] - Denoted if the import or export was successful - * or failure. - * @property {string} region - Region of the country for which import or export - * is triggered. - * @property {string} status - Current status of the import or export action performed. - * @property {number} [total] - Count of total records. - * @property {string} [error_file_path] - Path of the error file. - */ -/** - * @typedef BulkRegionResult - * @property {BulkRegionResultItemData[]} items + * @property {string} action + * @property {string} batch_id + * @property {string} country + * @property {number} [success] + * @property {string} region + * @property {string} status + * @property {number} [total] + * @property {string} [error_file_path] + */ +/** + * @typedef BulkRegionResponse + * @property {BulkRegionResponseItemData[]} items * @property {Page} page */ /** - * @typedef SelfShipResult + * @typedef SelfShipResponse * @property {boolean} is_active * @property {number} tat */ /** * @typedef ApplicationSelfShipConfig - * @property {SelfShipResult} [self_ship] + * @property {Object} [self_ship] */ /** - * @typedef ApplicationSelfShipConfigResult - * @property {ServiceabilityErrorResult} [error] + * @typedef ApplicationSelfShipConfigResponse + * @property {ServiceabilityErrorResponse} [error] * @property {ApplicationSelfShipConfig} [data] * @property {boolean} success */ /** * @typedef StoreRuleConfigData - * @property {string[]} [rule_ids] - List of rule ids which are active in the application. - * @property {string[]} [type_based_priority] - Priority of the store type to be - * used in the basic prioritization sorting of stores. - * @property {string[]} [tag_based_priority] - Priority of the store tags to be - * used in the basic prioritization sorting of stores. - * @property {StorePrioritySchema[]} [store_priority] - Priority of explicit - * stores to be used for sorting of stores. - * @property {string[]} [sort] - Criteria on which the selected stores should be sorted. + * @property {string[]} [rule_ids] + * @property {string[]} [type_based_priority] + * @property {string[]} [tag_based_priority] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [sort] */ /** * @typedef CustomerRadiusSchema @@ -863,81 +737,69 @@ export = ServiceabilityPlatformModel; */ /** * @typedef StoreRuleDataSchema - * @property {string} [id] - Id of the rule. - * @property {string} [name] - Name of the rule. - * @property {number} [company_id] - Company id for which the rule is created. - * @property {string} [application_id] - Application id for which the rule is created. - * @property {string[]} [type_based_priority] - Priority of the store type to be - * used in the basic prioritization sorting of stores. - * @property {string[]} [tag_based_priority] - Priority of the store tags to be - * used in the basic prioritization sorting of stores. - * @property {StorePrioritySchema[]} [store_priority] - Priority of explicit - * stores to be used for sorting of stores. - * @property {string[]} [sort] - Criteria on which the selected stores should be sorted. + * @property {string} [id] + * @property {string} [name] + * @property {number} [company_id] + * @property {string} [application_id] + * @property {string[]} [type_based_priority] + * @property {string[]} [tag_based_priority] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [sort] * @property {StoreRuleConditionSchema} [conditions] - * @property {boolean} [is_active] - Denotes whether the rule is active or inactive. + * @property {boolean} [is_active] */ /** * @typedef StorePrioritySchema - * @property {number} [id] - Id of the store. - * @property {string} [name] - Name of the store. + * @property {string} [id] + * @property {string} [name] */ /** - * @typedef GetStoreRulesApiResult + * @typedef GetStoreRulesApiResponse * @property {StoreRuleDataSchema[]} [items] * @property {Page} [page] */ /** - * @typedef CreateStoreRuleDetailsSchema - * @property {string} [name] - Name of the rule. - * @property {boolean} [is_active] - Denotes if the rule is active or not. + * @typedef CreateStoreRuleRequestSchema + * @property {string} [name] + * @property {boolean} [is_active] * @property {StoreRuleConditionSchema} [conditions] - * @property {string[]} [type_based_priority] - Priority of the store type to be - * used in the basic prioritization sorting of stores. - * @property {string[]} [tag_based_priority] - Priority of the store tags to be - * used in the basic prioritization sorting of stores. - * @property {StorePrioritySchema[]} [store_priority] - Priority of explicit - * stores to be used for sorting of stores. - * @property {string[]} [sort] - Criteria on which the selected stores should be sorted. - */ -/** - * @typedef StoreRuleResultSchema - * @property {string} [id] - Id of the rule created. - * @property {string} [name] - Name of the rule created. - * @property {string} [type] - Type of the rule created. - * @property {string[]} [type_based_priority] - Priority of the store type to be - * used in the rule for sorting of stores. - * @property {string[]} [tag_based_priority] - Priority of the store tags to be - * used in the rule for sorting of stores. - * @property {StorePrioritySchema[]} [store_priority] - Priority of explicit - * stores to be used for sorting of stores. - * @property {string[]} [sort] - Criteria on which the selected stores should be sorted. + * @property {string[]} [type_based_priority] + * @property {string[]} [tag_based_priority] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [sort] + */ +/** + * @typedef StoreRuleResponseSchema + * @property {string} [id] + * @property {string} [name] + * @property {string} [type] + * @property {string[]} [type_based_priority] + * @property {string[]} [tag_based_priority] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [sort] * @property {StoreRuleConditionSchema} [conditions] - * @property {boolean} [is_active] - Denotes if the rule is active or inactive. - */ -/** - * @typedef StoreRuleUpdateResultSchema - * @property {string} [id] - Id of the rule created. - * @property {string} [name] - Name of the rule created. - * @property {string} [type] - Type of the rule created. - * @property {string[]} [type_based_priority] - Priority of the store type to be - * used in the rule for sorting of stores. - * @property {string[]} [tag_based_priority] - Priority of the store tags to be - * used in the rule for sorting of stores. - * @property {StorePrioritySchema[]} [store_priority] - Priority of explicit - * stores to be used for sorting of stores. - * @property {string[]} [sort] - Criteria on which the selected stores should be sorted. + * @property {boolean} [is_active] + */ +/** + * @typedef StoreRuleUpdateResponseSchema + * @property {string} [id] + * @property {string} [name] + * @property {string} [type] + * @property {string[]} [type_based_priority] + * @property {string[]} [tag_based_priority] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [sort] * @property {StoreRuleConditionSchema} [conditions] - * @property {boolean} [is_active] - Denotes if the rule is active or inactive. - * @property {number} [company_id] - Company id for which the rule is created. - * @property {string} [application_id] - Application id for which the rule is created. + * @property {boolean} [is_active] + * @property {number} [company_id] + * @property {string} [application_id] */ /** * @typedef ServiceabilityModel * @property {number} lm_cod_limit * @property {boolean} is_qc - * @property {string} [pickup_cutoff] - * @property {string} [route_code] + * @property {string} pickup_cutoff + * @property {string} route_code * @property {boolean} is_first_mile * @property {boolean} is_return * @property {boolean} is_installation @@ -966,136 +828,112 @@ export = ServiceabilityPlatformModel; */ /** * @typedef CourierPartnerSchemeModel - * @property {string} [name] - Name of the scheme. - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {ArithmeticOperations} [volumetric_weight] + * @property {string} extension_id + * @property {string} scheme_id * @property {ArithmeticOperations} weight - * @property {string} transport_type - Mode of transport associated with the - * courier partner scheme. - * @property {string} region - Serviceable region associated with the courier - * partner scheme. - * @property {string} delivery_type - Type of delivery associated with the - * courier partner scheme. - * @property {string[]} payment_mode - Mode of payment associated with the - * courier partner scheme. - * @property {string} stage - Denotes whether the courier partner scheme is in - * enabled or disabled stage. + * @property {string} transport_type + * @property {string} region + * @property {string} delivery_type + * @property {string[]} payment_mode + * @property {string} stage * @property {CourierPartnerSchemeFeatures} feature */ /** - * @typedef CourierAccountResult - * @property {number} company_id - Company id associated with the account. - * @property {string} [extension_id] - Unique identifier of courier partner extension. - * @property {string} account_id - Unique identifier of courier partner scheme - * and company id combination. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {string} stage - Denotes whether the account is in enabled or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. - * @property {CourierPartnerSchemeModel} [scheme_rules] + * @typedef CourierAccountResponse + * @property {string} account_id + * @property {string} scheme_id + * @property {boolean} is_self_ship + * @property {string} stage + * @property {boolean} is_own_account + * @property {CourierPartnerSchemeModel} scheme_rules */ /** - * @typedef CompanyCourierPartnerAccountListResult - * @property {CourierAccountResult[]} items + * @typedef CompanyCourierPartnerAccountListResponse + * @property {CourierAccountResponse[]} items * @property {Page} page */ /** * @typedef PackageMaterial - * @property {string} name - Name of the packaging material. - * @property {number} width - Width of the packaging material dimentions in centimeter. - * @property {number} height - Height of the packaging material dimentions in centimeter. - * @property {number} length - Length of the packaging material dimentions in centimeter. - * @property {PackageMaterialRule[]} [rules] - Product group rules associated - * with the packaging. - * @property {number[]} store_ids - Store ids where the packaging is avaiable. - * @property {number} weight - Package's weight in gram. - * @property {number} error_rate - Error Rate associated with the packaging dimensions. - * @property {string} package_type - Type of package material. - * @property {string} size - Physical size of the packaging. - * @property {string[]} [media] - Image urls associated with the packaging material. - * @property {Channel[]} channels - Sales channel where packaging is applicable. - * @property {boolean} [track_inventory] - Denotes if the track of the inventory - * should be kept. - * @property {string} status - Current status of the packaging material, if it - * is active or inactive. - * @property {number} [max_weight] - Maximum weight holding capacity. - * @property {number} [package_vol_weight] - Volumetric weight that a packaging - * material can carry. - * @property {boolean} [auto_calculate] - Denotes whether the volumetric weight - * should be auto calculated or not. - */ -/** - * @typedef PackageMaterialResult - * @property {string} name - Name of the packaging material. - * @property {string} [id] - Id of the packaging material. - * @property {number} [item_id] - Unique identifier of an item associated with - * the packaging material. - * @property {number} [company_id] - Company id associated with the packaging material. - * @property {number} width - Width of the packaging material dimentions in centimeter. - * @property {number} height - Height of the packaging material dimentions in centimeter. - * @property {number} length - Length of the packaging material dimentions in centimeter. - * @property {PackageMaterialRule[]} [rules] - Product group rules associated - * with the packaging. - * @property {number[]} store_ids - Store ids where the packaging is avaiable. - * @property {number} weight - Package's weight in gram. - * @property {number} error_rate - Error Rate associated with the packaging dimensions. - * @property {string} package_type - Type of package material. - * @property {string} size - Physical size of the packaging. - * @property {string[]} [media] - Image urls associated with the packaging material. - * @property {Channel[]} channels - Sales channel where packaging is applicable. - * @property {boolean} [track_inventory] - Denotes if the track of the inventory - * should be kept. - * @property {string} status - Current status of the packaging material, if it - * is active or inactive. - * @property {number} [max_weight] - Maximum weight holding capacity. - * @property {number} [package_vol_weight] - Volumetric weight that a packaging - * material can carry. - * @property {boolean} [auto_calculate] - Denotes whether the volumetric weight - * should be auto calculated or not. + * @property {string} name + * @property {number} width + * @property {number} height + * @property {number} length + * @property {PackageMaterialRule[]} [rules] + * @property {number[]} store_ids + * @property {number} weight + * @property {number} error_rate + * @property {string} package_type + * @property {string} size + * @property {string[]} [media] + * @property {Channel[]} channels + * @property {boolean} [track_inventory] + * @property {string} status + * @property {number} [max_weight] + * @property {number} [package_vol_weight] + * @property {boolean} [auto_calculate] + */ +/** + * @typedef PackageMaterialResponse + * @property {string} name + * @property {string} [id] + * @property {number} [item_id] + * @property {number} width + * @property {number} height + * @property {number} length + * @property {PackageMaterialRule[]} [rules] + * @property {number[]} store_ids + * @property {number} weight + * @property {number} error_rate + * @property {string} package_type + * @property {string} size + * @property {string[]} [media] + * @property {Channel[]} channels + * @property {boolean} [track_inventory] + * @property {string} status + * @property {number} [max_weight] + * @property {number} [package_vol_weight] + * @property {boolean} [auto_calculate] */ /** * @typedef PackageMaterialRule - * @property {string} [rule_id] - Unique identifier of the package rule. + * @property {string} [rule_id] * @property {PackageMaterialRuleQuantity} [quantity] - * @property {number} [weight] - Volumetric weight in gram. + * @property {number} [weight] */ /** * @typedef PackageRule - * @property {string} name - Name of the package rule. - * @property {number} company_id - Unique identifier of the company. - * @property {string} type - Type of the rule. - * @property {boolean} [is_active] - Denotes if the rule is active or inactive. + * @property {string} name + * @property {number} company_id + * @property {string} type + * @property {boolean} [is_active] * @property {PackageRuleProductTag} [product_tag] * @property {PackageRuleProduct} [product_id] * @property {PackageRuleCategory} [category_id] */ /** - * @typedef PackageRuleResult - * @property {string} [id] - Unique id of a package rule. - * @property {string} name - Name of a package rule. - * @property {number} company_id - Unique identifier of a company associated - * with the package rule. - * @property {string} type - Type of the rule created. - * @property {boolean} [is_active] - Denotes if the rule is active or inactive. + * @typedef PackageRuleResponse + * @property {string} [id] + * @property {string} name + * @property {number} company_id + * @property {string} type + * @property {boolean} [is_active] * @property {PackageRuleProductTag} [product_tag] * @property {PackageRuleProduct} [product_id] * @property {PackageRuleCategory} [category_id] */ /** * @typedef Channel - * @property {string} [type] - Type of the channel. - * @property {string} [id] - Unique identifier of the channel. + * @property {string} [type] + * @property {string} [id] */ /** * @typedef PackageMaterialRuleList - * @property {PackageRuleResult} [items] + * @property {PackageRuleResponse} [items] * @property {Page} [page] */ /** * @typedef PackageMaterialList - * @property {PackageMaterialResult} [items] + * @property {PackageMaterialResponse} [items] * @property {Page} [page] */ /** @@ -1112,18 +950,17 @@ export = ServiceabilityPlatformModel; */ /** * @typedef PackageMaterialRuleQuantity - * @property {number} [min] - Minimum product's quantity that a packaging can contain. - * @property {number} [max] - Maximum product's quantity that a packaging can contain. + * @property {number} [min] + * @property {number} [max] */ /** - * @typedef RulePriorityDetails - * @property {string} rule_id - Rule id whose priority needs to be changed. - * @property {number} priority - New priority of the rule. + * @typedef RulePriorityRequest + * @property {string} rule_id + * @property {number} priority */ /** - * @typedef RulePriorityResult - * @property {boolean} [success] - Denotes if the priority of the rule is - * changes successfully or not. + * @typedef RulePriorityResponse + * @property {boolean} [success] */ /** * @typedef ArticleAssignment @@ -1150,7 +987,7 @@ export = ServiceabilityPlatformModel; * @typedef OptimalLocationsArticles * @property {number} item_id * @property {string} size - * @property {number} quantity + * @property {string} quantity * @property {string} [group_id] * @property {boolean} [is_primary_item] * @property {Object} [meta] @@ -1160,15 +997,15 @@ export = ServiceabilityPlatformModel; * @property {number} [seller_id] */ /** - * @typedef OptimlLocationsDetailsSchema + * @typedef OptimlLocationsRequestSchema * @property {string} channel_id * @property {string} channel_type * @property {string} [channel_identifier] * @property {LocationDetailsServiceability} to_serviceability - * @property {OptimalLocationsArticles[]} [articles] + * @property {OptimalLocationsArticles} [article] */ /** - * @typedef OptimalLocationArticlesResult + * @typedef OptimalLocationArticlesResponse * @property {number} item_id * @property {string} size * @property {number} quantity @@ -1185,37 +1022,28 @@ export = ServiceabilityPlatformModel; * @property {string} uid */ /** - * @typedef OptimalLocationAssignedStoresResult + * @typedef OptimalLocationAssignedStoresResponse * @property {number} store_id - * @property {OptimalLocationArticlesResult[]} articles - */ -/** - * @typedef OptimalLocationsResult - * @property {OptimalLocationAssignedStoresResult[]} assigned_stores - * @property {ErrorResult[]} [faulty_articles] - */ -/** - * @typedef ValidationError - * @property {string} message - A brief description of the error encountered. - * @property {string} field - The field in the request that caused the error. + * @property {OptimalLocationArticlesResponse[]} articles */ /** - * @typedef StandardError - * @property {string} message - A brief description of the error. + * @typedef OptimalLocationsResponse + * @property {OptimalLocationAssignedStoresResponse[]} assigned_stores + * @property {ErrorResponse[]} [faulty_articles] */ declare class ServiceabilityPlatformModel { } declare namespace ServiceabilityPlatformModel { - export { UpdateZoneConfigDetails, ServiceabilityErrorResult, ApplicationServiceabilityConfig, ApplicationServiceabilityConfigResult, EntityRegionView_Details, EntityRegionView_Error, EntityRegionView_page, getAppRegionZonesResult, PageSchema, EntityRegionView_Items, EntityRegionView_Result, ListViewSummary, ZoneDataItem, ListViewProduct, ListViewChannels, ListViewItems, ListViewResult, CompanyStoreView_PageItems, CompanyStoreView_Result, GetZoneDataViewChannels, ZoneProductTypes, ZoneMappingDetailType, ZoneMappingType, ZoneMappingRegions, UpdateZoneData, ZoneUpdateDetails, ZoneSuccessResult, GetZoneDataViewItems, GetSingleZoneDataViewResult, GetZoneByIdSchema, CreateZoneData, ZoneResult, GetZoneFromPincodeViewDetails, Zone, GetZoneFromPincodeViewResult, GetZoneFromApplicationIdViewResult, ServiceabilityPageResult, MobileNo, ManagerResult, ModifiedByResult, IntegrationTypeResult, ProductReturnConfigResult, ContactNumberResult, AddressResult, CreatedByResult, EwayBillResult, EinvoiceResult, GstCredentialsResult, WarningsResult, OpeningClosing, TimmingResult, DocumentsResult, Dp, LogisticsResult, ItemResult, GetStoresViewResult, PincodeMopData, PincodeMopUpdateResult, PincodeMOPResult, CommonError, PincodeMopBulkData, PincodeBulkViewResult, PincodeCodStatusListingDetails, PincodeCodStatusItem, PincodeCodStatusListingResult, Error, PincodeCodStatusListingPage, PincodeCodStatusListingSummary, PincodeMopUpdateAuditHistoryDetails, PincodeMopUpdateAuditHistoryPaging, PincodeMopUpdateAuditHistoryResult, PincodeMopUpdateAuditHistoryResultData, ArithmeticOperations, SchemeRulesFeatures, SchemeRules, CourierAccountUpdateDetails, CourierAccount, CourierAccountDetailsBody, ErrorResult, CourierPartnerAccountFailureResult, Page, CourierPartnerRuleCPListResult, CourierPartnerRuleResult, CourierPartnerList, LocationRuleValues, LocationRule, StringComparisonOperations, IntComparisonOperations, CourierPartnerRuleConditions, CourierPartnerRule, FailureResult, CourierPartnerRulesListResult, ShipmentsArticles, ShipmentDimension, Shipments, ShipmentCourierPartnerDetails, CourierPartnerPromise, CourierPartners, ShipmentCourierPartners, ShipmentCourierPartnerResult, ShipmentsCourierPartnersServiceability, CompanyConfig, ZoneConfig, ApplicationConfig, BulkRegionJobDetails, BulkRegionResultItemData, BulkRegionResult, SelfShipResult, ApplicationSelfShipConfig, ApplicationSelfShipConfigResult, StoreRuleConfigData, CustomerRadiusSchema, StoreRuleConditionSchema, StoreRuleDataSchema, StorePrioritySchema, GetStoreRulesApiResult, CreateStoreRuleDetailsSchema, StoreRuleResultSchema, StoreRuleUpdateResultSchema, ServiceabilityModel, CourierPartnerSchemeFeatures, CourierPartnerSchemeModel, CourierAccountResult, CompanyCourierPartnerAccountListResult, PackageMaterial, PackageMaterialResult, PackageMaterialRule, PackageRule, PackageRuleResult, Channel, PackageMaterialRuleList, PackageMaterialList, PackageRuleProduct, PackageRuleProductTag, PackageRuleCategory, PackageMaterialRuleQuantity, RulePriorityDetails, RulePriorityResult, ArticleAssignment, ServiceabilityLocation, LocationDetailsServiceability, OptimalLocationsArticles, OptimlLocationsDetailsSchema, OptimalLocationArticlesResult, OptimalLocationAssignedStoresResult, OptimalLocationsResult, ValidationError, StandardError }; + export { UpdateZoneConfigRequest, ServiceabilityErrorResponse, ApplicationServiceabilityConfig, ApplicationServiceabilityConfigResponse, EntityRegionView_Request, EntityRegionView_Error, EntityRegionView_page, getAppRegionZonesResponse, PageSchema, EntityRegionView_Items, EntityRegionView_Response, ListViewSummary, ZoneDataItem, ListViewProduct, ListViewChannels, ListViewItems, ListViewResponse, CompanyStoreView_PageItems, CompanyStoreView_Response, GetZoneDataViewChannels, ZoneProductTypes, ZoneMappingDetailType, ZoneMappingType, ZoneMappingRegions, UpdateZoneData, ZoneUpdateRequest, ZoneSuccessResponse, GetZoneDataViewItems, GetSingleZoneDataViewResponse, GetZoneByIdSchema, CreateZoneData, ZoneResponse, GetZoneFromPincodeViewRequest, Zone, GetZoneFromPincodeViewResponse, GetZoneFromApplicationIdViewResponse, ServiceabilityPageResponse, MobileNo, ManagerResponse, ModifiedByResponse, IntegrationTypeResponse, ProductReturnConfigResponse, ContactNumberResponse, AddressResponse, CreatedByResponse, EwayBillResponse, EinvoiceResponse, GstCredentialsResponse, WarningsResponse, OpeningClosing, TimmingResponse, DocumentsResponse, Dp, LogisticsResponse, ItemResponse, GetStoresViewResponse, PincodeMopData, PincodeMopUpdateResponse, PincodeMOPresponse, CommonError, PincodeMopBulkData, PincodeBulkViewResponse, PincodeCodStatusListingRequest, PincodeCodStatusListingResponse, Error, PincodeCodStatusListingPage, PincodeCodStatusListingSummary, PincodeMopUpdateAuditHistoryRequest, PincodeMopUpdateAuditHistoryPaging, PincodeMopUpdateAuditHistoryResponse, PincodeMopUpdateAuditHistoryResponseData, ArithmeticOperations, SchemeRulesFeatures, SchemeRules, CourierAccount, CourierAccountRequestBody, ErrorResponse, CourierPartnerAccountFailureResponse, Page, CourierPartnerRuleCPListResponse, CourierPartnerRuleResponse, CourierPartnerList, LocationRuleValues, LocationRule, StringComparisonOperations, IntComparisonOperations, CourierPartnerRuleConditions, CourierPartnerRule, FailureResponse, CourierPartnerRulesListResponse, CompanyConfig, ZoneConfig, ApplicationConfig, BulkRegionJobSerializer, BulkRegionResponseItemData, BulkRegionResponse, SelfShipResponse, ApplicationSelfShipConfig, ApplicationSelfShipConfigResponse, StoreRuleConfigData, CustomerRadiusSchema, StoreRuleConditionSchema, StoreRuleDataSchema, StorePrioritySchema, GetStoreRulesApiResponse, CreateStoreRuleRequestSchema, StoreRuleResponseSchema, StoreRuleUpdateResponseSchema, ServiceabilityModel, CourierPartnerSchemeFeatures, CourierPartnerSchemeModel, CourierAccountResponse, CompanyCourierPartnerAccountListResponse, PackageMaterial, PackageMaterialResponse, PackageMaterialRule, PackageRule, PackageRuleResponse, Channel, PackageMaterialRuleList, PackageMaterialList, PackageRuleProduct, PackageRuleProductTag, PackageRuleCategory, PackageMaterialRuleQuantity, RulePriorityRequest, RulePriorityResponse, ArticleAssignment, ServiceabilityLocation, LocationDetailsServiceability, OptimalLocationsArticles, OptimlLocationsRequestSchema, OptimalLocationArticlesResponse, OptimalLocationAssignedStoresResponse, OptimalLocationsResponse }; } -/** @returns {UpdateZoneConfigDetails} */ -declare function UpdateZoneConfigDetails(): UpdateZoneConfigDetails; -type UpdateZoneConfigDetails = { +/** @returns {UpdateZoneConfigRequest} */ +declare function UpdateZoneConfigRequest(): UpdateZoneConfigRequest; +type UpdateZoneConfigRequest = { serviceability_type?: string; }; -/** @returns {ServiceabilityErrorResult} */ -declare function ServiceabilityErrorResult(): ServiceabilityErrorResult; -type ServiceabilityErrorResult = { +/** @returns {ServiceabilityErrorResponse} */ +declare function ServiceabilityErrorResponse(): ServiceabilityErrorResponse; +type ServiceabilityErrorResponse = { message: string; value: string; type: string; @@ -1227,16 +1055,16 @@ type ApplicationServiceabilityConfig = { serviceability_type: string; channel_type: string; }; -/** @returns {ApplicationServiceabilityConfigResult} */ -declare function ApplicationServiceabilityConfigResult(): ApplicationServiceabilityConfigResult; -type ApplicationServiceabilityConfigResult = { - error?: ServiceabilityErrorResult; +/** @returns {ApplicationServiceabilityConfigResponse} */ +declare function ApplicationServiceabilityConfigResponse(): ApplicationServiceabilityConfigResponse; +type ApplicationServiceabilityConfigResponse = { + error?: ServiceabilityErrorResponse; data?: ApplicationServiceabilityConfig; success: boolean; }; -/** @returns {EntityRegionView_Details} */ -declare function EntityRegionView_Details(): EntityRegionView_Details; -type EntityRegionView_Details = { +/** @returns {EntityRegionView_Request} */ +declare function EntityRegionView_Request(): EntityRegionView_Request; +type EntityRegionView_Request = { sub_type: string[]; parent_id?: string[]; }; @@ -1256,9 +1084,9 @@ type EntityRegionView_page = { size: number; current: number; }; -/** @returns {getAppRegionZonesResult} */ -declare function getAppRegionZonesResult(): getAppRegionZonesResult; -type getAppRegionZonesResult = { +/** @returns {getAppRegionZonesResponse} */ +declare function getAppRegionZonesResponse(): getAppRegionZonesResponse; +type getAppRegionZonesResponse = { page: PageSchema[]; items: ListViewItems[]; }; @@ -1278,9 +1106,9 @@ type EntityRegionView_Items = { uid: string; name: string; }; -/** @returns {EntityRegionView_Result} */ -declare function EntityRegionView_Result(): EntityRegionView_Result; -type EntityRegionView_Result = { +/** @returns {EntityRegionView_Response} */ +declare function EntityRegionView_Response(): EntityRegionView_Response; +type EntityRegionView_Response = { error: EntityRegionView_Error; page: EntityRegionView_page; data: EntityRegionView_Items[]; @@ -1357,9 +1185,9 @@ type ListViewItems = { */ channels: ListViewChannels[]; }; -/** @returns {ListViewResult} */ -declare function ListViewResult(): ListViewResult; -type ListViewResult = { +/** @returns {ListViewResponse} */ +declare function ListViewResponse(): ListViewResponse; +type ListViewResponse = { page: ZoneDataItem; items: ListViewItems[]; }; @@ -1372,9 +1200,9 @@ type CompanyStoreView_PageItems = { size: number; current: number; }; -/** @returns {CompanyStoreView_Result} */ -declare function CompanyStoreView_Result(): CompanyStoreView_Result; -type CompanyStoreView_Result = { +/** @returns {CompanyStoreView_Response} */ +declare function CompanyStoreView_Response(): CompanyStoreView_Response; +type CompanyStoreView_Response = { page: CompanyStoreView_PageItems[]; items?: any[]; }; @@ -1387,14 +1215,7 @@ type GetZoneDataViewChannels = { /** @returns {ZoneProductTypes} */ declare function ZoneProductTypes(): ZoneProductTypes; type ZoneProductTypes = { - /** - * - Denotes if the zone is applicable for all the - * products or specific products. - */ type: string; - /** - * - List of product tags. - */ tags: string[]; }; /** @returns {ZoneMappingDetailType} */ @@ -1412,13 +1233,7 @@ type ZoneMappingDetailType = { /** @returns {ZoneMappingType} */ declare function ZoneMappingType(): ZoneMappingType; type ZoneMappingType = { - /** - * - Uid for the country. - */ country: string; - /** - * - List of region uid for the given country. - */ regions: string[]; }; /** @returns {ZoneMappingRegions} */ @@ -1445,208 +1260,89 @@ type ZoneMappingRegions = { /** @returns {UpdateZoneData} */ declare function UpdateZoneData(): UpdateZoneData; type UpdateZoneData = { - /** - * - Unique identifier for the zone. - */ zone_id: string; - /** - * - Name for the zone. - */ name: string; - /** - * - A human-readable and unique identifier for the - * zone, derived from the name. - */ slug: string; - /** - * - Company id associated with the zone. - */ company_id: number; - /** - * - A flag indicating whether the zone is active. - */ is_active: boolean; - /** - * - Channels for which the zone is active. - */ channels: GetZoneDataViewChannels[]; product: ZoneProductTypes; - /** - * - A list of store identifiers associated with the zone. - */ store_ids: number[]; - /** - * - Type of region that belongs in the zone. - */ region_type: string; - /** - * - Country to region mapping for the zone. - */ mapping: ZoneMappingType[]; }; -/** @returns {ZoneUpdateDetails} */ -declare function ZoneUpdateDetails(): ZoneUpdateDetails; -type ZoneUpdateDetails = { +/** @returns {ZoneUpdateRequest} */ +declare function ZoneUpdateRequest(): ZoneUpdateRequest; +type ZoneUpdateRequest = { identifier: string; data: UpdateZoneData; }; -/** @returns {ZoneSuccessResult} */ -declare function ZoneSuccessResult(): ZoneSuccessResult; -type ZoneSuccessResult = { +/** @returns {ZoneSuccessResponse} */ +declare function ZoneSuccessResponse(): ZoneSuccessResponse; +type ZoneSuccessResponse = { status_code: number; success: boolean; }; /** @returns {GetZoneDataViewItems} */ declare function GetZoneDataViewItems(): GetZoneDataViewItems; type GetZoneDataViewItems = { - /** - * - The unique identifier for the zone. - */ zone_id: string; - /** - * - The name of the zone for easy identification. - */ name: string; - /** - * - A URL-friendly version of the zone’s name, used for - * routing or linking. - */ slug: string; - /** - * - The ID of the company associated with this zone. - */ company_id?: number; - /** - * - A flag indicating whether the zone is active - * (true) or inactive (false). - */ is_active: boolean; - /** - * - A list of channels available - * within this zone. - */ channels: GetZoneDataViewChannels[]; product: ZoneProductTypes; - /** - * - A collection of store IDs linked to this zone. - */ store_ids: number[]; - /** - * - The type of region the zone represents. - */ region_type?: string; - /** - * - A list of mappings defining - * relationships between this zone and other entities. - */ mapping: ZoneMappingType[]; - /** - * - The preferred method for - * assigning stores or products to the zone. - */ - assignment_preference?: string; - /** - * - The total number of stores assigned to this zone. - */ stores_count: number; }; -/** @returns {GetSingleZoneDataViewResult} */ -declare function GetSingleZoneDataViewResult(): GetSingleZoneDataViewResult; -type GetSingleZoneDataViewResult = { +/** @returns {GetSingleZoneDataViewResponse} */ +declare function GetSingleZoneDataViewResponse(): GetSingleZoneDataViewResponse; +type GetSingleZoneDataViewResponse = { data: GetZoneDataViewItems; }; /** @returns {GetZoneByIdSchema} */ declare function GetZoneByIdSchema(): GetZoneByIdSchema; type GetZoneByIdSchema = { - /** - * - Unique identifier for the zone. - */ zone_id: string; - /** - * - Name for the zone. - */ name: string; - /** - * - A human-readable and unique identifier for the - * zone, derived from the name. - */ slug: string; - /** - * - Company id associated with the zone. - */ company_id?: number; - /** - * - A flag indicating whether the zone is active. - */ is_active: boolean; - /** - * - Channels for which the zone is active. - */ channels: GetZoneDataViewChannels[]; product: ZoneProductTypes; - /** - * - A list of store identifiers associated with the zone. - */ store_ids: number[]; - /** - * - Type of region that belongs in the zone. - */ region_type: string; /** * - Country to region mapping for the zone. */ mapping: ZoneMappingDetailType[]; - stores_count?: number; }; /** @returns {CreateZoneData} */ declare function CreateZoneData(): CreateZoneData; type CreateZoneData = { - /** - * - Name of the zone. - */ name: string; - /** - * - A human-readable and unique identifier for the - * zone, derived from the name. - */ slug: string; - /** - * - Unique identifier of the company for which - * the zone is created. - */ company_id: number; - /** - * - A flag indicating whether the zone is active. - */ is_active: boolean; - /** - * - Channels for which the zone is active. - */ channels: GetZoneDataViewChannels[]; - /** - * - A list of store identifiers associated with the zone. - */ store_ids: number[]; - /** - * - Type of region that belongs in the zone. - */ + product: ZoneProductTypes; region_type: string; - /** - * - Country to region mapping for the zone. - */ mapping: ZoneMappingType[]; - product?: ZoneProductTypes; }; -/** @returns {ZoneResult} */ -declare function ZoneResult(): ZoneResult; -type ZoneResult = { - status_code?: number; +/** @returns {ZoneResponse} */ +declare function ZoneResponse(): ZoneResponse; +type ZoneResponse = { + status_code: number; zone_id: string; success: boolean; }; -/** @returns {GetZoneFromPincodeViewDetails} */ -declare function GetZoneFromPincodeViewDetails(): GetZoneFromPincodeViewDetails; -type GetZoneFromPincodeViewDetails = { +/** @returns {GetZoneFromPincodeViewRequest} */ +declare function GetZoneFromPincodeViewRequest(): GetZoneFromPincodeViewRequest; +type GetZoneFromPincodeViewRequest = { country: string; pincode: string; }; @@ -1661,21 +1357,21 @@ type Zone = { is_active: boolean; store_ids: number[]; }; -/** @returns {GetZoneFromPincodeViewResult} */ -declare function GetZoneFromPincodeViewResult(): GetZoneFromPincodeViewResult; -type GetZoneFromPincodeViewResult = { +/** @returns {GetZoneFromPincodeViewResponse} */ +declare function GetZoneFromPincodeViewResponse(): GetZoneFromPincodeViewResponse; +type GetZoneFromPincodeViewResponse = { serviceability_type: string; zones: Zone[]; }; -/** @returns {GetZoneFromApplicationIdViewResult} */ -declare function GetZoneFromApplicationIdViewResult(): GetZoneFromApplicationIdViewResult; -type GetZoneFromApplicationIdViewResult = { +/** @returns {GetZoneFromApplicationIdViewResponse} */ +declare function GetZoneFromApplicationIdViewResponse(): GetZoneFromApplicationIdViewResponse; +type GetZoneFromApplicationIdViewResponse = { page: ZoneDataItem[]; items: ListViewItems[]; }; -/** @returns {ServiceabilityPageResult} */ -declare function ServiceabilityPageResult(): ServiceabilityPageResult; -type ServiceabilityPageResult = { +/** @returns {ServiceabilityPageResponse} */ +declare function ServiceabilityPageResponse(): ServiceabilityPageResponse; +type ServiceabilityPageResponse = { type?: string; has_next?: boolean; item_total?: number; @@ -1688,39 +1384,39 @@ type MobileNo = { number?: string; country_code?: number; }; -/** @returns {ManagerResult} */ -declare function ManagerResult(): ManagerResult; -type ManagerResult = { +/** @returns {ManagerResponse} */ +declare function ManagerResponse(): ManagerResponse; +type ManagerResponse = { email?: string; mobile_no?: MobileNo; name?: string; }; -/** @returns {ModifiedByResult} */ -declare function ModifiedByResult(): ModifiedByResult; -type ModifiedByResult = { +/** @returns {ModifiedByResponse} */ +declare function ModifiedByResponse(): ModifiedByResponse; +type ModifiedByResponse = { username?: string; user_id?: string; }; -/** @returns {IntegrationTypeResult} */ -declare function IntegrationTypeResult(): IntegrationTypeResult; -type IntegrationTypeResult = { +/** @returns {IntegrationTypeResponse} */ +declare function IntegrationTypeResponse(): IntegrationTypeResponse; +type IntegrationTypeResponse = { inventory?: string; order?: string; }; -/** @returns {ProductReturnConfigResult} */ -declare function ProductReturnConfigResult(): ProductReturnConfigResult; -type ProductReturnConfigResult = { +/** @returns {ProductReturnConfigResponse} */ +declare function ProductReturnConfigResponse(): ProductReturnConfigResponse; +type ProductReturnConfigResponse = { on_same_store?: boolean; }; -/** @returns {ContactNumberResult} */ -declare function ContactNumberResult(): ContactNumberResult; -type ContactNumberResult = { +/** @returns {ContactNumberResponse} */ +declare function ContactNumberResponse(): ContactNumberResponse; +type ContactNumberResponse = { number?: string; country_code?: number; }; -/** @returns {AddressResult} */ -declare function AddressResult(): AddressResult; -type AddressResult = { +/** @returns {AddressResponse} */ +declare function AddressResponse(): AddressResponse; +type AddressResponse = { city?: string; address1?: string; pincode?: number; @@ -1731,31 +1427,31 @@ type AddressResult = { latitude?: number; longitude?: number; }; -/** @returns {CreatedByResult} */ -declare function CreatedByResult(): CreatedByResult; -type CreatedByResult = { +/** @returns {CreatedByResponse} */ +declare function CreatedByResponse(): CreatedByResponse; +type CreatedByResponse = { username?: string; user_id?: string; }; -/** @returns {EwayBillResult} */ -declare function EwayBillResult(): EwayBillResult; -type EwayBillResult = { +/** @returns {EwayBillResponse} */ +declare function EwayBillResponse(): EwayBillResponse; +type EwayBillResponse = { enabled?: boolean; }; -/** @returns {EinvoiceResult} */ -declare function EinvoiceResult(): EinvoiceResult; -type EinvoiceResult = { +/** @returns {EinvoiceResponse} */ +declare function EinvoiceResponse(): EinvoiceResponse; +type EinvoiceResponse = { enabled?: boolean; }; -/** @returns {GstCredentialsResult} */ -declare function GstCredentialsResult(): GstCredentialsResult; -type GstCredentialsResult = { - e_waybill?: EwayBillResult; - e_invoice?: EinvoiceResult; +/** @returns {GstCredentialsResponse} */ +declare function GstCredentialsResponse(): GstCredentialsResponse; +type GstCredentialsResponse = { + e_waybill?: EwayBillResponse; + e_invoice?: EinvoiceResponse; }; -/** @returns {WarningsResult} */ -declare function WarningsResult(): WarningsResult; -type WarningsResult = { +/** @returns {WarningsResponse} */ +declare function WarningsResponse(): WarningsResponse; +type WarningsResponse = { store_address?: string; }; /** @returns {OpeningClosing} */ @@ -1764,17 +1460,17 @@ type OpeningClosing = { minute?: number; hour?: number; }; -/** @returns {TimmingResult} */ -declare function TimmingResult(): TimmingResult; -type TimmingResult = { +/** @returns {TimmingResponse} */ +declare function TimmingResponse(): TimmingResponse; +type TimmingResponse = { open?: boolean; weekday?: string; closing?: OpeningClosing; opening?: OpeningClosing; }; -/** @returns {DocumentsResult} */ -declare function DocumentsResult(): DocumentsResult; -type DocumentsResult = { +/** @returns {DocumentsResponse} */ +declare function DocumentsResponse(): DocumentsResponse; +type DocumentsResponse = { legal_name?: string; value?: string; type?: string; @@ -1794,207 +1490,110 @@ type Dp = { transport_mode?: string; assign_dp_from_sb?: boolean; }; -/** @returns {LogisticsResult} */ -declare function LogisticsResult(): LogisticsResult; -type LogisticsResult = { +/** @returns {LogisticsResponse} */ +declare function LogisticsResponse(): LogisticsResponse; +type LogisticsResponse = { override?: boolean; dp?: Dp; }; -/** @returns {ItemResult} */ -declare function ItemResult(): ItemResult; -type ItemResult = { +/** @returns {ItemResponse} */ +declare function ItemResponse(): ItemResponse; +type ItemResponse = { created_on?: string; - manager?: ManagerResult; - modified_by?: ModifiedByResult; - integration_type?: IntegrationTypeResult; + manager?: ManagerResponse; + modified_by?: ModifiedByResponse; + integration_type?: IntegrationTypeResponse; verified_on?: string; - product_return_config?: ProductReturnConfigResult; - contact_numbers?: ContactNumberResult[]; - verified_by?: ModifiedByResult; + product_return_config?: ProductReturnConfigResponse; + contact_numbers?: ContactNumberResponse[]; + verified_by?: ModifiedByResponse; stage?: string; - address?: AddressResult; + address?: AddressResponse; modified_on?: string; - created_by?: CreatedByResult; - gst_credentials?: GstCredentialsResult; + created_by?: CreatedByResponse; + gst_credentials?: GstCredentialsResponse; display_name?: string; company_id?: number; uid?: number; - /** - * - Custom JSON for internal usage - */ _custom_json?: any; code?: string; - warnings?: WarningsResult; + warnings?: WarningsResponse; name?: string; - timing?: TimmingResult[]; - documents?: DocumentsResult[]; + timing?: TimmingResponse[]; + documents?: DocumentsResponse[]; store_type?: string; sub_type?: string; company?: number; _cls?: string; - logistics?: LogisticsResult; + logistics?: LogisticsResponse; notification_emails?: string[]; }; -/** @returns {GetStoresViewResult} */ -declare function GetStoresViewResult(): GetStoresViewResult; -type GetStoresViewResult = { - page: ServiceabilityPageResult; - items?: ItemResult[]; +/** @returns {GetStoresViewResponse} */ +declare function GetStoresViewResponse(): GetStoresViewResponse; +type GetStoresViewResponse = { + page: ServiceabilityPageResponse; + items?: ItemResponse[]; }; /** @returns {PincodeMopData} */ declare function PincodeMopData(): PincodeMopData; type PincodeMopData = { - /** - * - A list of pincodes. - */ pincodes: number[]; - /** - * - Name of the country. - */ country: string; - /** - * - Denotes wether to activate or deavtivate pincodes - * for COD mode of payment. - */ action: string; }; -/** @returns {PincodeMopUpdateResult} */ -declare function PincodeMopUpdateResult(): PincodeMopUpdateResult; -type PincodeMopUpdateResult = { - /** - * - Pincode of the region. - */ +/** @returns {PincodeMopUpdateResponse} */ +declare function PincodeMopUpdateResponse(): PincodeMopUpdateResponse; +type PincodeMopUpdateResponse = { pincode: number; - /** - * - Unique identifier of the sales channel. - */ channel_id: string; - /** - * - Country name. - */ country: string; - /** - * - Denotes whether the pincode mode of payment - * is active or not. - */ is_active: boolean; }; -/** @returns {PincodeMOPResult} */ -declare function PincodeMOPResult(): PincodeMOPResult; -type PincodeMOPResult = { - /** - * - Denotes if the action was successful or not. - */ +/** @returns {PincodeMOPresponse} */ +declare function PincodeMOPresponse(): PincodeMOPresponse; +type PincodeMOPresponse = { success: boolean; - /** - * - Status code for the response. - */ status_code: number; - /** - * - Unique identifier identifying the perticular request. - */ batch_id: string; - /** - * - Name of the country. - */ country: string; - /** - * - Denotes wether to activate or deavtivate pincodes - * for COD mode of payment. - */ action: string; - /** - * - List of pincodes. - */ pincodes?: number[]; - /** - * - Details of the - * updated pincodes. - */ - updated_pincodes?: PincodeMopUpdateResult[]; + updated_pincodes?: PincodeMopUpdateResponse[]; }; /** @returns {CommonError} */ declare function CommonError(): CommonError; type CommonError = { - /** - * - Status code for the error. - */ status_code?: string; error?: any; - /** - * - Whether operation was successful. - */ success?: string; }; /** @returns {PincodeMopBulkData} */ declare function PincodeMopBulkData(): PincodeMopBulkData; type PincodeMopBulkData = { - /** - * - Unique identifier for the request. - */ batch_id: string; - /** - * - CDN url for the uploaded file. - */ s3_url: string; }; -/** @returns {PincodeBulkViewResult} */ -declare function PincodeBulkViewResult(): PincodeBulkViewResult; -type PincodeBulkViewResult = { +/** @returns {PincodeBulkViewResponse} */ +declare function PincodeBulkViewResponse(): PincodeBulkViewResponse; +type PincodeBulkViewResponse = { batch_id: string; - /** - * - CDN url for the uploaded file. - */ s3_url: string; }; -/** @returns {PincodeCodStatusListingDetails} */ -declare function PincodeCodStatusListingDetails(): PincodeCodStatusListingDetails; -type PincodeCodStatusListingDetails = { - /** - * - Name of the country. - */ +/** @returns {PincodeCodStatusListingRequest} */ +declare function PincodeCodStatusListingRequest(): PincodeCodStatusListingRequest; +type PincodeCodStatusListingRequest = { country?: string; - /** - * - Search based on the active or inactive flag. - */ is_active?: boolean; - /** - * - Search based on the pincode. - */ pincode?: number; current?: number; page_size?: number; }; -/** @returns {PincodeCodStatusItem} */ -declare function PincodeCodStatusItem(): PincodeCodStatusItem; -type PincodeCodStatusItem = { - /** - * - Denoted if the pincode is active or not. - */ - active?: boolean; - /** - * - Name of the pincode. - */ - pincode?: string; -}; -/** @returns {PincodeCodStatusListingResult} */ -declare function PincodeCodStatusListingResult(): PincodeCodStatusListingResult; -type PincodeCodStatusListingResult = { - /** - * - Name of the country. - */ +/** @returns {PincodeCodStatusListingResponse} */ +declare function PincodeCodStatusListingResponse(): PincodeCodStatusListingResponse; +type PincodeCodStatusListingResponse = { country: string; - /** - * - List of pincode details. - */ - data: PincodeCodStatusListingResult[]; - /** - * - Denotes if the request was successful or not. - */ + data: PincodeCodStatusListingResponse[]; success: boolean; - /** - * - List of error object in case of unsuccessful response. - */ errors?: Error[]; page: PincodeCodStatusListingPage; summary: PincodeCodStatusListingSummary; @@ -2018,25 +1617,13 @@ type PincodeCodStatusListingPage = { /** @returns {PincodeCodStatusListingSummary} */ declare function PincodeCodStatusListingSummary(): PincodeCodStatusListingSummary; type PincodeCodStatusListingSummary = { - /** - * - Count of the total active pincodes. - */ total_active_pincodes: number; - /** - * - Count of the total inactive pincodes. - */ total_inactive_pincodes: number; }; -/** @returns {PincodeMopUpdateAuditHistoryDetails} */ -declare function PincodeMopUpdateAuditHistoryDetails(): PincodeMopUpdateAuditHistoryDetails; -type PincodeMopUpdateAuditHistoryDetails = { - /** - * - Type of the entity requested. - */ +/** @returns {PincodeMopUpdateAuditHistoryRequest} */ +declare function PincodeMopUpdateAuditHistoryRequest(): PincodeMopUpdateAuditHistoryRequest; +type PincodeMopUpdateAuditHistoryRequest = { entity_type: string; - /** - * - Name of the file. - */ file_name?: string; }; /** @returns {PincodeMopUpdateAuditHistoryPaging} */ @@ -2048,49 +1635,24 @@ type PincodeMopUpdateAuditHistoryPaging = { has_next?: boolean; item_total?: number; }; -/** @returns {PincodeMopUpdateAuditHistoryResult} */ -declare function PincodeMopUpdateAuditHistoryResult(): PincodeMopUpdateAuditHistoryResult; -type PincodeMopUpdateAuditHistoryResult = { - /** - * - Uniquie identifier of the request. - */ +/** @returns {PincodeMopUpdateAuditHistoryResponse} */ +declare function PincodeMopUpdateAuditHistoryResponse(): PincodeMopUpdateAuditHistoryResponse; +type PincodeMopUpdateAuditHistoryResponse = { batch_id?: string; - /** - * - Type of the entity requested. - */ entity_type?: string; - /** - * - URL for the error file. - */ error_file_s3_url?: string; - /** - * - CDN url for the file uploaded. - */ s3_url?: string; - /** - * - Name of the file. - */ file_name?: string; updated_at?: string; updated_by?: string; - /** - * - Denotes if the request was successfully processed. - */ success?: boolean; }; -/** @returns {PincodeMopUpdateAuditHistoryResultData} */ -declare function PincodeMopUpdateAuditHistoryResultData(): PincodeMopUpdateAuditHistoryResultData; -type PincodeMopUpdateAuditHistoryResultData = { - /** - * - Type of the entity requested. - */ +/** @returns {PincodeMopUpdateAuditHistoryResponseData} */ +declare function PincodeMopUpdateAuditHistoryResponseData(): PincodeMopUpdateAuditHistoryResponseData; +type PincodeMopUpdateAuditHistoryResponseData = { entity_type?: string; page: PincodeMopUpdateAuditHistoryPaging; - /** - * - History records of - * the uploaded files. - */ - data: PincodeMopUpdateAuditHistoryResult[]; + data: PincodeMopUpdateAuditHistoryResponse[]; }; /** @returns {ArithmeticOperations} */ declare function ArithmeticOperations(): ArithmeticOperations; @@ -2120,120 +1682,38 @@ type SchemeRules = { payment_mode?: string[]; feature?: SchemeRulesFeatures; }; -/** @returns {CourierAccountUpdateDetails} */ -declare function CourierAccountUpdateDetails(): CourierAccountUpdateDetails; -type CourierAccountUpdateDetails = { - /** - * - Unique identifier of courier partner extension. - */ - extension_id: string; - /** - * - Unique identifier of courier partner scheme. - */ - scheme_id: string; - /** - * - Denotes if the account is of self delivery type. - */ - is_self_ship: boolean; - /** - * - Denotes whether the account is in enabled or disabled stage. - */ - stage: string; - /** - * - Denotes whether it is the seller's own - * account or not. - */ - is_own_account: boolean; -}; /** @returns {CourierAccount} */ declare function CourierAccount(): CourierAccount; type CourierAccount = { - /** - * - Company id associated with the account. - */ - company_id: number; - /** - * - Unique identifier of courier partner extension. - */ extension_id: string; - /** - * - Unique identifier of courier partner scheme - * and company id combination. - */ account_id: string; - /** - * - Unique identifier of courier partner scheme. - */ scheme_id: string; - /** - * - Denotes if the account is of self delivery type. - */ is_self_ship: boolean; - /** - * - Denotes whether the account is in enabled or disabled stage. - */ stage: string; - /** - * - Denotes whether it is the seller's own - * account or not. - */ is_own_account: boolean; - scheme_rules: CourierPartnerSchemeModel; }; -/** @returns {CourierAccountDetailsBody} */ -declare function CourierAccountDetailsBody(): CourierAccountDetailsBody; -type CourierAccountDetailsBody = { - /** - * - Unique identifier of courier partner extension. - */ +/** @returns {CourierAccountRequestBody} */ +declare function CourierAccountRequestBody(): CourierAccountRequestBody; +type CourierAccountRequestBody = { extension_id: string; - /** - * - Unique identifier of courier partner scheme - * and company id combination. - */ account_id?: string; - /** - * - Unique identifier of courier partner scheme. - */ scheme_id: string; - /** - * - Denotes if the account is of self delivery type. - */ is_self_ship: boolean; - /** - * - Denotes whether the account is in enabled or disabled stage. - */ stage: string; - /** - * - Denotes whether it is the seller's own - * account or not. - */ is_own_account: boolean; }; -/** @returns {ErrorResult} */ -declare function ErrorResult(): ErrorResult; -type ErrorResult = { - /** - * - Fields containing the error. - */ +/** @returns {ErrorResponse} */ +declare function ErrorResponse(): ErrorResponse; +type ErrorResponse = { value: string; - /** - * - Description of the error. - */ message: string; - /** - * - Type of the error. - */ type: string; }; -/** @returns {CourierPartnerAccountFailureResult} */ -declare function CourierPartnerAccountFailureResult(): CourierPartnerAccountFailureResult; -type CourierPartnerAccountFailureResult = { - /** - * - Denotes whether the request is a success or failure. - */ +/** @returns {CourierPartnerAccountFailureResponse} */ +declare function CourierPartnerAccountFailureResponse(): CourierPartnerAccountFailureResponse; +type CourierPartnerAccountFailureResponse = { success: boolean; - error: ErrorResult[]; + error: ErrorResponse[]; }; /** @returns {Page} */ declare function Page(): Page; @@ -2267,89 +1747,34 @@ type Page = { */ size?: number; }; -/** @returns {CourierPartnerRuleCPListResult} */ -declare function CourierPartnerRuleCPListResult(): CourierPartnerRuleCPListResult; -type CourierPartnerRuleCPListResult = { - /** - * - Unique identifier of courier partner scheme - * and company id combination. - */ - account_id: string; - /** - * - Unique identifier of courier partner extension. - */ - extension_id: string; - /** - * - Denotes if the account is of self delivery type. - */ - is_self_ship: boolean; - /** - * - Denotes the scheme rules associated with - * the courier partner account. - */ +/** @returns {CourierPartnerRuleCPListResponse} */ +declare function CourierPartnerRuleCPListResponse(): CourierPartnerRuleCPListResponse; +type CourierPartnerRuleCPListResponse = { + account_id?: string; + extension_id?: string; + is_self_ship?: boolean; scheme_rules?: any; }; -/** @returns {CourierPartnerRuleResult} */ -declare function CourierPartnerRuleResult(): CourierPartnerRuleResult; -type CourierPartnerRuleResult = { - /** - * - Denotes whether the given courier partner - * rule is inactive or active. - */ - is_active: boolean; - /** - * - Unique identifier of the sales channel. - */ - application_id: string; - /** - * - Unique identifier of the company. - */ - company_id: number; - conditions: CourierPartnerRuleConditions; - /** - * - Sort Strategy of the courier partners. - */ - sort: string[]; - /** - * - The Fynd account used to create the courier - * partner rule. - */ +/** @returns {CourierPartnerRuleResponse} */ +declare function CourierPartnerRuleResponse(): CourierPartnerRuleResponse; +type CourierPartnerRuleResponse = { + is_active?: boolean; + application_id?: string; + company_id?: number; + conditions?: CourierPartnerRuleConditions; + sort?: string[]; created_by?: any; - /** - * - Unique identifier of the courier partner rule. - */ - id: string; - /** - * - The Fynd account used to modify the - * courier partner rule. - */ + id?: string; modified_by?: any; - /** - * - The datetime at which courier partner rule - * is modified. - */ modified_on?: string; - /** - * - Name for the courier partner rule. - */ - name: string; - /** - * - The type of the rule. - */ - type: string; - cp_list?: CourierPartnerRuleCPListResult[]; + name?: string; + type?: string; + cp_list?: CourierPartnerRuleCPListResponse[]; }; /** @returns {CourierPartnerList} */ declare function CourierPartnerList(): CourierPartnerList; type CourierPartnerList = { - /** - * - Unique identifier of courier partner extension. - */ extension_id: string; - /** - * - Unique identifier of courier partner scheme - * and company id combination. - */ account_id: string; }; /** @returns {LocationRuleValues} */ @@ -2359,7 +1784,7 @@ type LocationRuleValues = { sub_type?: string; name?: string; display_name?: string; - parent_id?: string[]; + parent_id?: string; parent_ids?: string[]; }; /** @returns {LocationRule} */ @@ -2401,383 +1826,97 @@ type CourierPartnerRuleConditions = { /** @returns {CourierPartnerRule} */ declare function CourierPartnerRule(): CourierPartnerRule; type CourierPartnerRule = { - /** - * - Denotes whether the given courier partner - * rule is inactive or active. - */ is_active: boolean; - /** - * - A list of courier partners. - */ cp_list?: CourierPartnerList[]; - /** - * - Name for the courier partner rule. - */ name: string; conditions: CourierPartnerRuleConditions; - /** - * - Sort Strategy for the courier partners. - */ sort: string[]; - /** - * - Denotes the type of the rule. - */ - type?: string; }; -/** @returns {FailureResult} */ -declare function FailureResult(): FailureResult; -type FailureResult = { +/** @returns {FailureResponse} */ +declare function FailureResponse(): FailureResponse; +type FailureResponse = { success: boolean; - error: ErrorResult[]; + error: ErrorResponse[]; }; -/** @returns {CourierPartnerRulesListResult} */ -declare function CourierPartnerRulesListResult(): CourierPartnerRulesListResult; -type CourierPartnerRulesListResult = { - items: CourierPartnerRuleResult[]; +/** @returns {CourierPartnerRulesListResponse} */ +declare function CourierPartnerRulesListResponse(): CourierPartnerRulesListResponse; +type CourierPartnerRulesListResponse = { + items: CourierPartnerRuleResponse[]; page: Page; }; -/** @returns {ShipmentsArticles} */ -declare function ShipmentsArticles(): ShipmentsArticles; -type ShipmentsArticles = { - /** - * - Unique identifier of the item. - */ - item_id?: number; - /** - * - Unique identifier of the category. - */ - category_id?: number; - /** - * - Unique identifier of the brand. - */ - brand_id?: number; - /** - * - Unique identifier of the department. - */ - department_id?: number; - /** - * - Tags associated with the item. - */ - tags?: string[]; -}; -/** @returns {ShipmentDimension} */ -declare function ShipmentDimension(): ShipmentDimension; -type ShipmentDimension = { - /** - * - Height of the shipment in centimeters. - */ - height: number; - /** - * - Length of the shipment in centimeters. - */ - length: number; - /** - * - Width of the shipment in centimeters. - */ - width: number; -}; -/** @returns {Shipments} */ -declare function Shipments(): Shipments; -type Shipments = { - /** - * - Unique identifier of the shipment. - */ - id?: string; - /** - * - Unique identifier of the selling location. - */ - location_id?: number; - /** - * - Tags associated with the selling location. - */ - location_tags?: string[]; - /** - * - Weight of the shipment. - */ - shipment_weight?: number; - /** - * - Volumetric weight of the shipment. - */ - shipment_volumetric_weight?: number; - /** - * - Total Cost of the shipment. - */ - shipment_cost?: number; - shipment_dimension?: ShipmentDimension; - /** - * - A List of courier schemes. - */ - courier_partner_schemes?: string[]; - /** - * - List of articles in the shipment. - */ - articles?: ShipmentsArticles[]; -}; -/** @returns {ShipmentCourierPartnerDetails} */ -declare function ShipmentCourierPartnerDetails(): ShipmentCourierPartnerDetails; -type ShipmentCourierPartnerDetails = { - from_location: ShipmentsCourierPartnersServiceability; - to_location: ShipmentsCourierPartnersServiceability; - /** - * - List of shipments. - */ - shipments?: Shipments[]; - /** - * - Journey type of the shipment forward or return. - */ - journey?: string; - /** - * - Payment mode opted for the shipment. - */ - payment_mode?: string; -}; -/** @returns {CourierPartnerPromise} */ -declare function CourierPartnerPromise(): CourierPartnerPromise; -type CourierPartnerPromise = { - /** - * - The earliest possible timestamp. - */ - min: string; - /** - * - The latest possible timestamp. - */ - max: string; -}; -/** @returns {CourierPartners} */ -declare function CourierPartners(): CourierPartners; -type CourierPartners = { - /** - * - Unique identifier of courier partner extension. - */ - extension_id?: string; - /** - * - Unique identifier of courier partner scheme. - */ - scheme_id?: string; - /** - * - Name of the courier partner. - */ - name?: string; - delivery_promise?: CourierPartnerPromise; -}; -/** @returns {ShipmentCourierPartners} */ -declare function ShipmentCourierPartners(): ShipmentCourierPartners; -type ShipmentCourierPartners = { - /** - * - Unique identifier of the shipment. - */ - id?: string; - /** - * - Courier partners of the shipment. - */ - courier_partners?: CourierPartners[]; -}; -/** @returns {ShipmentCourierPartnerResult} */ -declare function ShipmentCourierPartnerResult(): ShipmentCourierPartnerResult; -type ShipmentCourierPartnerResult = { - courier_partners?: CourierPartners[]; - shipments?: ShipmentCourierPartners[]; -}; -/** @returns {ShipmentsCourierPartnersServiceability} */ -declare function ShipmentsCourierPartnersServiceability(): ShipmentsCourierPartnersServiceability; -type ShipmentsCourierPartnersServiceability = { - /** - * - Postal code or PIN code of the address area. - */ - pincode?: string; - /** - * - Specifies the sector or district code of - * the address if applicable. - */ - sector_code?: string; - /** - * - Indicates the state or province code of the address. - */ - state_code?: string; - /** - * - Denote the city or municipality code of the address. - */ - city_code?: string; - /** - * - ISO2 code for the country of the address. - */ - country_code: string; -}; /** @returns {CompanyConfig} */ declare function CompanyConfig(): CompanyConfig; type CompanyConfig = { - /** - * - A list for courier partner rules. - */ rule_ids: string[]; - /** - * - Sort strategy for the courier partners. - */ sort: string[]; - /** - * - Depicts if the courier partner - * rule configuration plan is subscribed by the seller for which mode. - */ - logistics_as_actual?: string; - /** - * - Unique identifier of the company. - */ - company_id: number; - /** - * - Unique identifier of the sales channel. - */ - application_id?: string; + logistics_as_actual?: boolean; }; /** @returns {ZoneConfig} */ declare function ZoneConfig(): ZoneConfig; type ZoneConfig = { - /** - * - Serviceability type of the delivery zone. - */ serviceability_type?: string; - /** - * - Count of active delivery zones associated - * with the sales channel. - */ - active_count?: number; - /** - * - Count of total delivery zones associated - * with the sales channel. - */ - total_count?: number; }; /** @returns {ApplicationConfig} */ declare function ApplicationConfig(): ApplicationConfig; type ApplicationConfig = { - /** - * - A list of courier partner rules. - */ rule_ids?: string[]; - /** - * - Strategy adopted to sort the courier partners. - */ sort?: string[]; zones?: ZoneConfig; }; -/** @returns {BulkRegionJobDetails} */ -declare function BulkRegionJobDetails(): BulkRegionJobDetails; -type BulkRegionJobDetails = { - /** - * - CDN path of the uploaded csv file for bulk import. - */ +/** @returns {BulkRegionJobSerializer} */ +declare function BulkRegionJobSerializer(): BulkRegionJobSerializer; +type BulkRegionJobSerializer = { file_path?: string; - /** - * - Country for which the tat or serviceability is - * to be imported or exported. - */ country: string; - /** - * - Denotes the import or export action to be performed. - */ - action: string; - /** - * - Region of the country for which import or export - * is triggered. - */ - region: string; -}; -/** @returns {BulkRegionResultItemData} */ -declare function BulkRegionResultItemData(): BulkRegionResultItemData; -type BulkRegionResultItemData = { - /** - * - CDN path of the file which was used for bulk import. - */ - file_path?: string; - /** - * - Count of the failed records. - */ + action: string; + region: string; +}; +/** @returns {BulkRegionResponseItemData} */ +declare function BulkRegionResponseItemData(): BulkRegionResponseItemData; +type BulkRegionResponseItemData = { + file_path: string; failed?: number; failed_records?: any[]; - /** - * - Denotes the import or export action performed. - */ action: string; - /** - * - Unique id to identify the import or export query. - */ batch_id: string; - /** - * - Country for which the import or export action is - * performed. - */ country: string; - /** - * - Denoted if the import or export was successful - * or failure. - */ success?: number; - /** - * - Region of the country for which import or export - * is triggered. - */ region: string; - /** - * - Current status of the import or export action performed. - */ status: string; - /** - * - Count of total records. - */ total?: number; - /** - * - Path of the error file. - */ error_file_path?: string; }; -/** @returns {BulkRegionResult} */ -declare function BulkRegionResult(): BulkRegionResult; -type BulkRegionResult = { - items: BulkRegionResultItemData[]; +/** @returns {BulkRegionResponse} */ +declare function BulkRegionResponse(): BulkRegionResponse; +type BulkRegionResponse = { + items: BulkRegionResponseItemData[]; page: Page; }; -/** @returns {SelfShipResult} */ -declare function SelfShipResult(): SelfShipResult; -type SelfShipResult = { +/** @returns {SelfShipResponse} */ +declare function SelfShipResponse(): SelfShipResponse; +type SelfShipResponse = { is_active: boolean; tat: number; }; /** @returns {ApplicationSelfShipConfig} */ declare function ApplicationSelfShipConfig(): ApplicationSelfShipConfig; type ApplicationSelfShipConfig = { - self_ship?: SelfShipResult; + self_ship?: any; }; -/** @returns {ApplicationSelfShipConfigResult} */ -declare function ApplicationSelfShipConfigResult(): ApplicationSelfShipConfigResult; -type ApplicationSelfShipConfigResult = { - error?: ServiceabilityErrorResult; +/** @returns {ApplicationSelfShipConfigResponse} */ +declare function ApplicationSelfShipConfigResponse(): ApplicationSelfShipConfigResponse; +type ApplicationSelfShipConfigResponse = { + error?: ServiceabilityErrorResponse; data?: ApplicationSelfShipConfig; success: boolean; }; /** @returns {StoreRuleConfigData} */ declare function StoreRuleConfigData(): StoreRuleConfigData; type StoreRuleConfigData = { - /** - * - List of rule ids which are active in the application. - */ rule_ids?: string[]; - /** - * - Priority of the store type to be - * used in the basic prioritization sorting of stores. - */ type_based_priority?: string[]; - /** - * - Priority of the store tags to be - * used in the basic prioritization sorting of stores. - */ tag_based_priority?: string[]; - /** - * - Priority of explicit - * stores to be used for sorting of stores. - */ store_priority?: StorePrioritySchema[]; - /** - * - Criteria on which the selected stores should be sorted. - */ sort?: string[]; }; /** @returns {CustomerRadiusSchema} */ @@ -2807,183 +1946,66 @@ type StoreRuleConditionSchema = { /** @returns {StoreRuleDataSchema} */ declare function StoreRuleDataSchema(): StoreRuleDataSchema; type StoreRuleDataSchema = { - /** - * - Id of the rule. - */ id?: string; - /** - * - Name of the rule. - */ name?: string; - /** - * - Company id for which the rule is created. - */ company_id?: number; - /** - * - Application id for which the rule is created. - */ application_id?: string; - /** - * - Priority of the store type to be - * used in the basic prioritization sorting of stores. - */ type_based_priority?: string[]; - /** - * - Priority of the store tags to be - * used in the basic prioritization sorting of stores. - */ tag_based_priority?: string[]; - /** - * - Priority of explicit - * stores to be used for sorting of stores. - */ store_priority?: StorePrioritySchema[]; - /** - * - Criteria on which the selected stores should be sorted. - */ sort?: string[]; conditions?: StoreRuleConditionSchema; - /** - * - Denotes whether the rule is active or inactive. - */ is_active?: boolean; }; /** @returns {StorePrioritySchema} */ declare function StorePrioritySchema(): StorePrioritySchema; type StorePrioritySchema = { - /** - * - Id of the store. - */ - id?: number; - /** - * - Name of the store. - */ + id?: string; name?: string; }; -/** @returns {GetStoreRulesApiResult} */ -declare function GetStoreRulesApiResult(): GetStoreRulesApiResult; -type GetStoreRulesApiResult = { +/** @returns {GetStoreRulesApiResponse} */ +declare function GetStoreRulesApiResponse(): GetStoreRulesApiResponse; +type GetStoreRulesApiResponse = { items?: StoreRuleDataSchema[]; page?: Page; }; -/** @returns {CreateStoreRuleDetailsSchema} */ -declare function CreateStoreRuleDetailsSchema(): CreateStoreRuleDetailsSchema; -type CreateStoreRuleDetailsSchema = { - /** - * - Name of the rule. - */ +/** @returns {CreateStoreRuleRequestSchema} */ +declare function CreateStoreRuleRequestSchema(): CreateStoreRuleRequestSchema; +type CreateStoreRuleRequestSchema = { name?: string; - /** - * - Denotes if the rule is active or not. - */ is_active?: boolean; conditions?: StoreRuleConditionSchema; - /** - * - Priority of the store type to be - * used in the basic prioritization sorting of stores. - */ type_based_priority?: string[]; - /** - * - Priority of the store tags to be - * used in the basic prioritization sorting of stores. - */ tag_based_priority?: string[]; - /** - * - Priority of explicit - * stores to be used for sorting of stores. - */ store_priority?: StorePrioritySchema[]; - /** - * - Criteria on which the selected stores should be sorted. - */ sort?: string[]; }; -/** @returns {StoreRuleResultSchema} */ -declare function StoreRuleResultSchema(): StoreRuleResultSchema; -type StoreRuleResultSchema = { - /** - * - Id of the rule created. - */ +/** @returns {StoreRuleResponseSchema} */ +declare function StoreRuleResponseSchema(): StoreRuleResponseSchema; +type StoreRuleResponseSchema = { id?: string; - /** - * - Name of the rule created. - */ name?: string; - /** - * - Type of the rule created. - */ type?: string; - /** - * - Priority of the store type to be - * used in the rule for sorting of stores. - */ type_based_priority?: string[]; - /** - * - Priority of the store tags to be - * used in the rule for sorting of stores. - */ tag_based_priority?: string[]; - /** - * - Priority of explicit - * stores to be used for sorting of stores. - */ store_priority?: StorePrioritySchema[]; - /** - * - Criteria on which the selected stores should be sorted. - */ sort?: string[]; conditions?: StoreRuleConditionSchema; - /** - * - Denotes if the rule is active or inactive. - */ is_active?: boolean; }; -/** @returns {StoreRuleUpdateResultSchema} */ -declare function StoreRuleUpdateResultSchema(): StoreRuleUpdateResultSchema; -type StoreRuleUpdateResultSchema = { - /** - * - Id of the rule created. - */ +/** @returns {StoreRuleUpdateResponseSchema} */ +declare function StoreRuleUpdateResponseSchema(): StoreRuleUpdateResponseSchema; +type StoreRuleUpdateResponseSchema = { id?: string; - /** - * - Name of the rule created. - */ name?: string; - /** - * - Type of the rule created. - */ type?: string; - /** - * - Priority of the store type to be - * used in the rule for sorting of stores. - */ type_based_priority?: string[]; - /** - * - Priority of the store tags to be - * used in the rule for sorting of stores. - */ tag_based_priority?: string[]; - /** - * - Priority of explicit - * stores to be used for sorting of stores. - */ store_priority?: StorePrioritySchema[]; - /** - * - Criteria on which the selected stores should be sorted. - */ sort?: string[]; conditions?: StoreRuleConditionSchema; - /** - * - Denotes if the rule is active or inactive. - */ is_active?: boolean; - /** - * - Company id for which the rule is created. - */ company_id?: number; - /** - * - Application id for which the rule is created. - */ application_id?: string; }; /** @returns {ServiceabilityModel} */ @@ -2991,8 +2013,8 @@ declare function ServiceabilityModel(): ServiceabilityModel; type ServiceabilityModel = { lm_cod_limit: number; is_qc: boolean; - pickup_cutoff?: string; - route_code?: string; + pickup_cutoff: string; + route_code: string; is_first_mile: boolean; is_return: boolean; is_installation: boolean; @@ -3023,314 +2045,101 @@ type CourierPartnerSchemeFeatures = { /** @returns {CourierPartnerSchemeModel} */ declare function CourierPartnerSchemeModel(): CourierPartnerSchemeModel; type CourierPartnerSchemeModel = { - /** - * - Name of the scheme. - */ - name?: string; - /** - * - Unique identifier of courier partner extension. - */ extension_id: string; - /** - * - Unique identifier of courier partner scheme. - */ scheme_id: string; - volumetric_weight?: ArithmeticOperations; weight: ArithmeticOperations; - /** - * - Mode of transport associated with the - * courier partner scheme. - */ transport_type: string; - /** - * - Serviceable region associated with the courier - * partner scheme. - */ region: string; - /** - * - Type of delivery associated with the - * courier partner scheme. - */ delivery_type: string; - /** - * - Mode of payment associated with the - * courier partner scheme. - */ payment_mode: string[]; - /** - * - Denotes whether the courier partner scheme is in - * enabled or disabled stage. - */ stage: string; feature: CourierPartnerSchemeFeatures; }; -/** @returns {CourierAccountResult} */ -declare function CourierAccountResult(): CourierAccountResult; -type CourierAccountResult = { - /** - * - Company id associated with the account. - */ - company_id: number; - /** - * - Unique identifier of courier partner extension. - */ - extension_id?: string; - /** - * - Unique identifier of courier partner scheme - * and company id combination. - */ +/** @returns {CourierAccountResponse} */ +declare function CourierAccountResponse(): CourierAccountResponse; +type CourierAccountResponse = { account_id: string; - /** - * - Unique identifier of courier partner scheme. - */ scheme_id: string; - /** - * - Denotes if the account is of self delivery type. - */ is_self_ship: boolean; - /** - * - Denotes whether the account is in enabled or disabled stage. - */ stage: string; - /** - * - Denotes whether it is the seller's own - * account or not. - */ is_own_account: boolean; - scheme_rules?: CourierPartnerSchemeModel; + scheme_rules: CourierPartnerSchemeModel; }; -/** @returns {CompanyCourierPartnerAccountListResult} */ -declare function CompanyCourierPartnerAccountListResult(): CompanyCourierPartnerAccountListResult; -type CompanyCourierPartnerAccountListResult = { - items: CourierAccountResult[]; +/** @returns {CompanyCourierPartnerAccountListResponse} */ +declare function CompanyCourierPartnerAccountListResponse(): CompanyCourierPartnerAccountListResponse; +type CompanyCourierPartnerAccountListResponse = { + items: CourierAccountResponse[]; page: Page; }; /** @returns {PackageMaterial} */ declare function PackageMaterial(): PackageMaterial; type PackageMaterial = { - /** - * - Name of the packaging material. - */ name: string; - /** - * - Width of the packaging material dimentions in centimeter. - */ width: number; - /** - * - Height of the packaging material dimentions in centimeter. - */ height: number; - /** - * - Length of the packaging material dimentions in centimeter. - */ length: number; - /** - * - Product group rules associated - * with the packaging. - */ rules?: PackageMaterialRule[]; - /** - * - Store ids where the packaging is avaiable. - */ store_ids: number[]; - /** - * - Package's weight in gram. - */ weight: number; - /** - * - Error Rate associated with the packaging dimensions. - */ error_rate: number; - /** - * - Type of package material. - */ package_type: string; - /** - * - Physical size of the packaging. - */ size: string; - /** - * - Image urls associated with the packaging material. - */ media?: string[]; - /** - * - Sales channel where packaging is applicable. - */ channels: Channel[]; - /** - * - Denotes if the track of the inventory - * should be kept. - */ track_inventory?: boolean; - /** - * - Current status of the packaging material, if it - * is active or inactive. - */ status: string; - /** - * - Maximum weight holding capacity. - */ max_weight?: number; - /** - * - Volumetric weight that a packaging - * material can carry. - */ package_vol_weight?: number; - /** - * - Denotes whether the volumetric weight - * should be auto calculated or not. - */ auto_calculate?: boolean; }; -/** @returns {PackageMaterialResult} */ -declare function PackageMaterialResult(): PackageMaterialResult; -type PackageMaterialResult = { - /** - * - Name of the packaging material. - */ +/** @returns {PackageMaterialResponse} */ +declare function PackageMaterialResponse(): PackageMaterialResponse; +type PackageMaterialResponse = { name: string; - /** - * - Id of the packaging material. - */ id?: string; - /** - * - Unique identifier of an item associated with - * the packaging material. - */ item_id?: number; - /** - * - Company id associated with the packaging material. - */ - company_id?: number; - /** - * - Width of the packaging material dimentions in centimeter. - */ width: number; - /** - * - Height of the packaging material dimentions in centimeter. - */ height: number; - /** - * - Length of the packaging material dimentions in centimeter. - */ length: number; - /** - * - Product group rules associated - * with the packaging. - */ rules?: PackageMaterialRule[]; - /** - * - Store ids where the packaging is avaiable. - */ store_ids: number[]; - /** - * - Package's weight in gram. - */ weight: number; - /** - * - Error Rate associated with the packaging dimensions. - */ error_rate: number; - /** - * - Type of package material. - */ package_type: string; - /** - * - Physical size of the packaging. - */ size: string; - /** - * - Image urls associated with the packaging material. - */ media?: string[]; - /** - * - Sales channel where packaging is applicable. - */ channels: Channel[]; - /** - * - Denotes if the track of the inventory - * should be kept. - */ track_inventory?: boolean; - /** - * - Current status of the packaging material, if it - * is active or inactive. - */ status: string; - /** - * - Maximum weight holding capacity. - */ max_weight?: number; - /** - * - Volumetric weight that a packaging - * material can carry. - */ package_vol_weight?: number; - /** - * - Denotes whether the volumetric weight - * should be auto calculated or not. - */ auto_calculate?: boolean; }; /** @returns {PackageMaterialRule} */ declare function PackageMaterialRule(): PackageMaterialRule; type PackageMaterialRule = { - /** - * - Unique identifier of the package rule. - */ rule_id?: string; quantity?: PackageMaterialRuleQuantity; - /** - * - Volumetric weight in gram. - */ weight?: number; }; /** @returns {PackageRule} */ declare function PackageRule(): PackageRule; type PackageRule = { - /** - * - Name of the package rule. - */ name: string; - /** - * - Unique identifier of the company. - */ company_id: number; - /** - * - Type of the rule. - */ type: string; - /** - * - Denotes if the rule is active or inactive. - */ is_active?: boolean; product_tag?: PackageRuleProductTag; product_id?: PackageRuleProduct; category_id?: PackageRuleCategory; }; -/** @returns {PackageRuleResult} */ -declare function PackageRuleResult(): PackageRuleResult; -type PackageRuleResult = { - /** - * - Unique id of a package rule. - */ +/** @returns {PackageRuleResponse} */ +declare function PackageRuleResponse(): PackageRuleResponse; +type PackageRuleResponse = { id?: string; - /** - * - Name of a package rule. - */ name: string; - /** - * - Unique identifier of a company associated - * with the package rule. - */ company_id: number; - /** - * - Type of the rule created. - */ type: string; - /** - * - Denotes if the rule is active or inactive. - */ is_active?: boolean; product_tag?: PackageRuleProductTag; product_id?: PackageRuleProduct; @@ -3339,25 +2148,19 @@ type PackageRuleResult = { /** @returns {Channel} */ declare function Channel(): Channel; type Channel = { - /** - * - Type of the channel. - */ type?: string; - /** - * - Unique identifier of the channel. - */ id?: string; }; /** @returns {PackageMaterialRuleList} */ declare function PackageMaterialRuleList(): PackageMaterialRuleList; type PackageMaterialRuleList = { - items?: PackageRuleResult; + items?: PackageRuleResponse; page?: Page; }; /** @returns {PackageMaterialList} */ declare function PackageMaterialList(): PackageMaterialList; type PackageMaterialList = { - items?: PackageMaterialResult; + items?: PackageMaterialResponse; page?: Page; }; /** @returns {PackageRuleProduct} */ @@ -3378,34 +2181,18 @@ type PackageRuleCategory = { /** @returns {PackageMaterialRuleQuantity} */ declare function PackageMaterialRuleQuantity(): PackageMaterialRuleQuantity; type PackageMaterialRuleQuantity = { - /** - * - Minimum product's quantity that a packaging can contain. - */ min?: number; - /** - * - Maximum product's quantity that a packaging can contain. - */ max?: number; }; -/** @returns {RulePriorityDetails} */ -declare function RulePriorityDetails(): RulePriorityDetails; -type RulePriorityDetails = { - /** - * - Rule id whose priority needs to be changed. - */ +/** @returns {RulePriorityRequest} */ +declare function RulePriorityRequest(): RulePriorityRequest; +type RulePriorityRequest = { rule_id: string; - /** - * - New priority of the rule. - */ priority: number; }; -/** @returns {RulePriorityResult} */ -declare function RulePriorityResult(): RulePriorityResult; -type RulePriorityResult = { - /** - * - Denotes if the priority of the rule is - * changes successfully or not. - */ +/** @returns {RulePriorityResponse} */ +declare function RulePriorityResponse(): RulePriorityResponse; +type RulePriorityResponse = { success?: boolean; }; /** @returns {ArticleAssignment} */ @@ -3464,7 +2251,7 @@ declare function OptimalLocationsArticles(): OptimalLocationsArticles; type OptimalLocationsArticles = { item_id: number; size: string; - quantity: number; + quantity: string; group_id?: string; is_primary_item?: boolean; meta?: any; @@ -3473,18 +2260,18 @@ type OptimalLocationsArticles = { assign_locations: number[]; seller_id?: number; }; -/** @returns {OptimlLocationsDetailsSchema} */ -declare function OptimlLocationsDetailsSchema(): OptimlLocationsDetailsSchema; -type OptimlLocationsDetailsSchema = { +/** @returns {OptimlLocationsRequestSchema} */ +declare function OptimlLocationsRequestSchema(): OptimlLocationsRequestSchema; +type OptimlLocationsRequestSchema = { channel_id: string; channel_type: string; channel_identifier?: string; to_serviceability: LocationDetailsServiceability; - articles?: OptimalLocationsArticles[]; + article?: OptimalLocationsArticles; }; -/** @returns {OptimalLocationArticlesResult} */ -declare function OptimalLocationArticlesResult(): OptimalLocationArticlesResult; -type OptimalLocationArticlesResult = { +/** @returns {OptimalLocationArticlesResponse} */ +declare function OptimalLocationArticlesResponse(): OptimalLocationArticlesResponse; +type OptimalLocationArticlesResponse = { item_id: number; size: string; quantity: number; @@ -3500,35 +2287,15 @@ type OptimalLocationArticlesResult = { _id: string; uid: string; }; -/** @returns {OptimalLocationAssignedStoresResult} */ -declare function OptimalLocationAssignedStoresResult(): OptimalLocationAssignedStoresResult; -type OptimalLocationAssignedStoresResult = { +/** @returns {OptimalLocationAssignedStoresResponse} */ +declare function OptimalLocationAssignedStoresResponse(): OptimalLocationAssignedStoresResponse; +type OptimalLocationAssignedStoresResponse = { store_id: number; - articles: OptimalLocationArticlesResult[]; -}; -/** @returns {OptimalLocationsResult} */ -declare function OptimalLocationsResult(): OptimalLocationsResult; -type OptimalLocationsResult = { - assigned_stores: OptimalLocationAssignedStoresResult[]; - faulty_articles?: ErrorResult[]; -}; -/** @returns {ValidationError} */ -declare function ValidationError(): ValidationError; -type ValidationError = { - /** - * - A brief description of the error encountered. - */ - message: string; - /** - * - The field in the request that caused the error. - */ - field: string; + articles: OptimalLocationArticlesResponse[]; }; -/** @returns {StandardError} */ -declare function StandardError(): StandardError; -type StandardError = { - /** - * - A brief description of the error. - */ - message: string; +/** @returns {OptimalLocationsResponse} */ +declare function OptimalLocationsResponse(): OptimalLocationsResponse; +type OptimalLocationsResponse = { + assigned_stores: OptimalLocationAssignedStoresResponse[]; + faulty_articles?: ErrorResponse[]; }; diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformModel.js b/sdk/platform/Serviceability/ServiceabilityPlatformModel.js index d714bd757..b2efd769a 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +++ b/sdk/platform/Serviceability/ServiceabilityPlatformModel.js @@ -1,12 +1,12 @@ const Joi = require("joi"); /** - * @typedef UpdateZoneConfigDetails + * @typedef UpdateZoneConfigRequest * @property {string} [serviceability_type] */ /** - * @typedef ServiceabilityErrorResult + * @typedef ServiceabilityErrorResponse * @property {string} message * @property {string} value * @property {string} type @@ -20,14 +20,14 @@ const Joi = require("joi"); */ /** - * @typedef ApplicationServiceabilityConfigResult - * @property {ServiceabilityErrorResult} [error] + * @typedef ApplicationServiceabilityConfigResponse + * @property {ServiceabilityErrorResponse} [error] * @property {ApplicationServiceabilityConfig} [data] * @property {boolean} success */ /** - * @typedef EntityRegionView_Details + * @typedef EntityRegionView_Request * @property {string[]} sub_type * @property {string[]} [parent_id] */ @@ -49,7 +49,7 @@ const Joi = require("joi"); */ /** - * @typedef getAppRegionZonesResult + * @typedef getAppRegionZonesResponse * @property {PageSchema[]} page * @property {ListViewItems[]} items */ @@ -71,7 +71,7 @@ const Joi = require("joi"); */ /** - * @typedef EntityRegionView_Result + * @typedef EntityRegionView_Response * @property {EntityRegionView_Error} error * @property {EntityRegionView_page} page * @property {EntityRegionView_Items[]} data @@ -123,7 +123,7 @@ const Joi = require("joi"); */ /** - * @typedef ListViewResult + * @typedef ListViewResponse * @property {ZoneDataItem} page * @property {ListViewItems[]} items */ @@ -138,7 +138,7 @@ const Joi = require("joi"); */ /** - * @typedef CompanyStoreView_Result + * @typedef CompanyStoreView_Response * @property {CompanyStoreView_PageItems[]} page * @property {Object[]} [items] */ @@ -151,9 +151,8 @@ const Joi = require("joi"); /** * @typedef ZoneProductTypes - * @property {string} type - Denotes if the zone is applicable for all the - * products or specific products. - * @property {string[]} tags - List of product tags. + * @property {string} type + * @property {string[]} tags */ /** @@ -164,8 +163,8 @@ const Joi = require("joi"); /** * @typedef ZoneMappingType - * @property {string} country - Uid for the country. - * @property {string[]} regions - List of region uid for the given country. + * @property {string} country + * @property {string[]} regions */ /** @@ -179,97 +178,86 @@ const Joi = require("joi"); /** * @typedef UpdateZoneData - * @property {string} zone_id - Unique identifier for the zone. - * @property {string} name - Name for the zone. - * @property {string} slug - A human-readable and unique identifier for the - * zone, derived from the name. - * @property {number} company_id - Company id associated with the zone. - * @property {boolean} is_active - A flag indicating whether the zone is active. - * @property {GetZoneDataViewChannels[]} channels - Channels for which the zone is active. + * @property {string} zone_id + * @property {string} name + * @property {string} slug + * @property {number} company_id + * @property {boolean} is_active + * @property {GetZoneDataViewChannels[]} channels * @property {ZoneProductTypes} product - * @property {number[]} store_ids - A list of store identifiers associated with the zone. - * @property {string} region_type - Type of region that belongs in the zone. - * @property {ZoneMappingType[]} mapping - Country to region mapping for the zone. + * @property {number[]} store_ids + * @property {string} region_type + * @property {ZoneMappingType[]} mapping */ /** - * @typedef ZoneUpdateDetails + * @typedef ZoneUpdateRequest * @property {string} identifier * @property {UpdateZoneData} data */ /** - * @typedef ZoneSuccessResult + * @typedef ZoneSuccessResponse * @property {number} status_code * @property {boolean} success */ /** * @typedef GetZoneDataViewItems - * @property {string} zone_id - The unique identifier for the zone. - * @property {string} name - The name of the zone for easy identification. - * @property {string} slug - A URL-friendly version of the zone’s name, used for - * routing or linking. - * @property {number} [company_id] - The ID of the company associated with this zone. - * @property {boolean} is_active - A flag indicating whether the zone is active - * (true) or inactive (false). - * @property {GetZoneDataViewChannels[]} channels - A list of channels available - * within this zone. + * @property {string} zone_id + * @property {string} name + * @property {string} slug + * @property {number} [company_id] + * @property {boolean} is_active + * @property {GetZoneDataViewChannels[]} channels * @property {ZoneProductTypes} product - * @property {number[]} store_ids - A collection of store IDs linked to this zone. - * @property {string} [region_type] - The type of region the zone represents. - * @property {ZoneMappingType[]} mapping - A list of mappings defining - * relationships between this zone and other entities. - * @property {string} [assignment_preference] - The preferred method for - * assigning stores or products to the zone. - * @property {number} stores_count - The total number of stores assigned to this zone. + * @property {number[]} store_ids + * @property {string} [region_type] + * @property {ZoneMappingType[]} mapping + * @property {number} stores_count */ /** - * @typedef GetSingleZoneDataViewResult + * @typedef GetSingleZoneDataViewResponse * @property {GetZoneDataViewItems} data */ /** * @typedef GetZoneByIdSchema - * @property {string} zone_id - Unique identifier for the zone. - * @property {string} name - Name for the zone. - * @property {string} slug - A human-readable and unique identifier for the - * zone, derived from the name. - * @property {number} [company_id] - Company id associated with the zone. - * @property {boolean} is_active - A flag indicating whether the zone is active. - * @property {GetZoneDataViewChannels[]} channels - Channels for which the zone is active. + * @property {string} zone_id + * @property {string} name + * @property {string} slug + * @property {number} [company_id] + * @property {boolean} is_active + * @property {GetZoneDataViewChannels[]} channels * @property {ZoneProductTypes} product - * @property {number[]} store_ids - A list of store identifiers associated with the zone. - * @property {string} region_type - Type of region that belongs in the zone. + * @property {number[]} store_ids + * @property {string} region_type * @property {ZoneMappingDetailType[]} mapping - Country to region mapping for the zone. - * @property {number} [stores_count] */ /** * @typedef CreateZoneData - * @property {string} name - Name of the zone. - * @property {string} slug - A human-readable and unique identifier for the - * zone, derived from the name. - * @property {number} company_id - Unique identifier of the company for which - * the zone is created. - * @property {boolean} is_active - A flag indicating whether the zone is active. - * @property {GetZoneDataViewChannels[]} channels - Channels for which the zone is active. - * @property {number[]} store_ids - A list of store identifiers associated with the zone. - * @property {string} region_type - Type of region that belongs in the zone. - * @property {ZoneMappingType[]} mapping - Country to region mapping for the zone. - * @property {ZoneProductTypes} [product] + * @property {string} name + * @property {string} slug + * @property {number} company_id + * @property {boolean} is_active + * @property {GetZoneDataViewChannels[]} channels + * @property {number[]} store_ids + * @property {ZoneProductTypes} product + * @property {string} region_type + * @property {ZoneMappingType[]} mapping */ /** - * @typedef ZoneResult - * @property {number} [status_code] + * @typedef ZoneResponse + * @property {number} status_code * @property {string} zone_id * @property {boolean} success */ /** - * @typedef GetZoneFromPincodeViewDetails + * @typedef GetZoneFromPincodeViewRequest * @property {string} country * @property {string} pincode */ @@ -286,19 +274,19 @@ const Joi = require("joi"); */ /** - * @typedef GetZoneFromPincodeViewResult + * @typedef GetZoneFromPincodeViewResponse * @property {string} serviceability_type * @property {Zone[]} zones */ /** - * @typedef GetZoneFromApplicationIdViewResult + * @typedef GetZoneFromApplicationIdViewResponse * @property {ZoneDataItem[]} page * @property {ListViewItems[]} items */ /** - * @typedef ServiceabilityPageResult + * @typedef ServiceabilityPageResponse * @property {string} [type] * @property {boolean} [has_next] * @property {number} [item_total] @@ -313,37 +301,37 @@ const Joi = require("joi"); */ /** - * @typedef ManagerResult + * @typedef ManagerResponse * @property {string} [email] * @property {MobileNo} [mobile_no] * @property {string} [name] */ /** - * @typedef ModifiedByResult + * @typedef ModifiedByResponse * @property {string} [username] * @property {string} [user_id] */ /** - * @typedef IntegrationTypeResult + * @typedef IntegrationTypeResponse * @property {string} [inventory] * @property {string} [order] */ /** - * @typedef ProductReturnConfigResult + * @typedef ProductReturnConfigResponse * @property {boolean} [on_same_store] */ /** - * @typedef ContactNumberResult + * @typedef ContactNumberResponse * @property {string} [number] * @property {number} [country_code] */ /** - * @typedef AddressResult + * @typedef AddressResponse * @property {string} [city] * @property {string} [address1] * @property {number} [pincode] @@ -356,29 +344,29 @@ const Joi = require("joi"); */ /** - * @typedef CreatedByResult + * @typedef CreatedByResponse * @property {string} [username] * @property {string} [user_id] */ /** - * @typedef EwayBillResult + * @typedef EwayBillResponse * @property {boolean} [enabled] */ /** - * @typedef EinvoiceResult + * @typedef EinvoiceResponse * @property {boolean} [enabled] */ /** - * @typedef GstCredentialsResult - * @property {EwayBillResult} [e_waybill] - * @property {EinvoiceResult} [e_invoice] + * @typedef GstCredentialsResponse + * @property {EwayBillResponse} [e_waybill] + * @property {EinvoiceResponse} [e_invoice] */ /** - * @typedef WarningsResult + * @typedef WarningsResponse * @property {string} [store_address] */ @@ -389,7 +377,7 @@ const Joi = require("joi"); */ /** - * @typedef TimmingResult + * @typedef TimmingResponse * @property {boolean} [open] * @property {string} [weekday] * @property {OpeningClosing} [closing] @@ -397,7 +385,7 @@ const Joi = require("joi"); */ /** - * @typedef DocumentsResult + * @typedef DocumentsResponse * @property {string} [legal_name] * @property {string} [value] * @property {string} [type] @@ -419,119 +407,109 @@ const Joi = require("joi"); */ /** - * @typedef LogisticsResult + * @typedef LogisticsResponse * @property {boolean} [override] * @property {Dp} [dp] */ /** - * @typedef ItemResult + * @typedef ItemResponse * @property {string} [created_on] - * @property {ManagerResult} [manager] - * @property {ModifiedByResult} [modified_by] - * @property {IntegrationTypeResult} [integration_type] + * @property {ManagerResponse} [manager] + * @property {ModifiedByResponse} [modified_by] + * @property {IntegrationTypeResponse} [integration_type] * @property {string} [verified_on] - * @property {ProductReturnConfigResult} [product_return_config] - * @property {ContactNumberResult[]} [contact_numbers] - * @property {ModifiedByResult} [verified_by] + * @property {ProductReturnConfigResponse} [product_return_config] + * @property {ContactNumberResponse[]} [contact_numbers] + * @property {ModifiedByResponse} [verified_by] * @property {string} [stage] - * @property {AddressResult} [address] + * @property {AddressResponse} [address] * @property {string} [modified_on] - * @property {CreatedByResult} [created_by] - * @property {GstCredentialsResult} [gst_credentials] + * @property {CreatedByResponse} [created_by] + * @property {GstCredentialsResponse} [gst_credentials] * @property {string} [display_name] * @property {number} [company_id] * @property {number} [uid] - * @property {Object} [_custom_json] - Custom JSON for internal usage + * @property {Object} [_custom_json] * @property {string} [code] - * @property {WarningsResult} [warnings] + * @property {WarningsResponse} [warnings] * @property {string} [name] - * @property {TimmingResult[]} [timing] - * @property {DocumentsResult[]} [documents] + * @property {TimmingResponse[]} [timing] + * @property {DocumentsResponse[]} [documents] * @property {string} [store_type] * @property {string} [sub_type] * @property {number} [company] * @property {string} [_cls] - * @property {LogisticsResult} [logistics] + * @property {LogisticsResponse} [logistics] * @property {string[]} [notification_emails] */ /** - * @typedef GetStoresViewResult - * @property {ServiceabilityPageResult} page - * @property {ItemResult[]} [items] + * @typedef GetStoresViewResponse + * @property {ServiceabilityPageResponse} page + * @property {ItemResponse[]} [items] */ /** * @typedef PincodeMopData - * @property {number[]} pincodes - A list of pincodes. - * @property {string} country - Name of the country. - * @property {string} action - Denotes wether to activate or deavtivate pincodes - * for COD mode of payment. + * @property {number[]} pincodes + * @property {string} country + * @property {string} action */ /** - * @typedef PincodeMopUpdateResult - * @property {number} pincode - Pincode of the region. - * @property {string} channel_id - Unique identifier of the sales channel. - * @property {string} country - Country name. - * @property {boolean} is_active - Denotes whether the pincode mode of payment - * is active or not. + * @typedef PincodeMopUpdateResponse + * @property {number} pincode + * @property {string} channel_id + * @property {string} country + * @property {boolean} is_active */ /** - * @typedef PincodeMOPResult - * @property {boolean} success - Denotes if the action was successful or not. - * @property {number} status_code - Status code for the response. - * @property {string} batch_id - Unique identifier identifying the perticular request. - * @property {string} country - Name of the country. - * @property {string} action - Denotes wether to activate or deavtivate pincodes - * for COD mode of payment. - * @property {number[]} [pincodes] - List of pincodes. - * @property {PincodeMopUpdateResult[]} [updated_pincodes] - Details of the - * updated pincodes. + * @typedef PincodeMOPresponse + * @property {boolean} success + * @property {number} status_code + * @property {string} batch_id + * @property {string} country + * @property {string} action + * @property {number[]} [pincodes] + * @property {PincodeMopUpdateResponse[]} [updated_pincodes] */ /** * @typedef CommonError - * @property {string} [status_code] - Status code for the error. + * @property {string} [status_code] * @property {Object} [error] - * @property {string} [success] - Whether operation was successful. + * @property {string} [success] */ /** * @typedef PincodeMopBulkData - * @property {string} batch_id - Unique identifier for the request. - * @property {string} s3_url - CDN url for the uploaded file. + * @property {string} batch_id + * @property {string} s3_url */ /** - * @typedef PincodeBulkViewResult + * @typedef PincodeBulkViewResponse * @property {string} batch_id - * @property {string} s3_url - CDN url for the uploaded file. + * @property {string} s3_url */ /** - * @typedef PincodeCodStatusListingDetails - * @property {string} [country] - Name of the country. - * @property {boolean} [is_active] - Search based on the active or inactive flag. - * @property {number} [pincode] - Search based on the pincode. + * @typedef PincodeCodStatusListingRequest + * @property {string} [country] + * @property {boolean} [is_active] + * @property {number} [pincode] * @property {number} [current] * @property {number} [page_size] */ /** - * @typedef PincodeCodStatusItem - * @property {boolean} [active] - Denoted if the pincode is active or not. - * @property {string} [pincode] - Name of the pincode. - */ - -/** - * @typedef PincodeCodStatusListingResult - * @property {string} country - Name of the country. - * @property {PincodeCodStatusListingResult[]} data - List of pincode details. - * @property {boolean} success - Denotes if the request was successful or not. - * @property {Error[]} [errors] - List of error object in case of unsuccessful response. + * @typedef PincodeCodStatusListingResponse + * @property {string} country + * @property {PincodeCodStatusListingResponse[]} data + * @property {boolean} success + * @property {Error[]} [errors] * @property {PincodeCodStatusListingPage} page * @property {PincodeCodStatusListingSummary} summary */ @@ -554,14 +532,14 @@ const Joi = require("joi"); /** * @typedef PincodeCodStatusListingSummary - * @property {number} total_active_pincodes - Count of the total active pincodes. - * @property {number} total_inactive_pincodes - Count of the total inactive pincodes. + * @property {number} total_active_pincodes + * @property {number} total_inactive_pincodes */ /** - * @typedef PincodeMopUpdateAuditHistoryDetails - * @property {string} entity_type - Type of the entity requested. - * @property {string} [file_name] - Name of the file. + * @typedef PincodeMopUpdateAuditHistoryRequest + * @property {string} entity_type + * @property {string} [file_name] */ /** @@ -574,23 +552,22 @@ const Joi = require("joi"); */ /** - * @typedef PincodeMopUpdateAuditHistoryResult - * @property {string} [batch_id] - Uniquie identifier of the request. - * @property {string} [entity_type] - Type of the entity requested. - * @property {string} [error_file_s3_url] - URL for the error file. - * @property {string} [s3_url] - CDN url for the file uploaded. - * @property {string} [file_name] - Name of the file. + * @typedef PincodeMopUpdateAuditHistoryResponse + * @property {string} [batch_id] + * @property {string} [entity_type] + * @property {string} [error_file_s3_url] + * @property {string} [s3_url] + * @property {string} [file_name] * @property {string} [updated_at] * @property {string} [updated_by] - * @property {boolean} [success] - Denotes if the request was successfully processed. + * @property {boolean} [success] */ /** - * @typedef PincodeMopUpdateAuditHistoryResultData - * @property {string} [entity_type] - Type of the entity requested. + * @typedef PincodeMopUpdateAuditHistoryResponseData + * @property {string} [entity_type] * @property {PincodeMopUpdateAuditHistoryPaging} page - * @property {PincodeMopUpdateAuditHistoryResult[]} data - History records of - * the uploaded files. + * @property {PincodeMopUpdateAuditHistoryResponse[]} data */ /** @@ -621,53 +598,37 @@ const Joi = require("joi"); * @property {SchemeRulesFeatures} [feature] */ -/** - * @typedef CourierAccountUpdateDetails - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {string} stage - Denotes whether the account is in enabled or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. - */ - /** * @typedef CourierAccount - * @property {number} company_id - Company id associated with the account. - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} account_id - Unique identifier of courier partner scheme - * and company id combination. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {string} stage - Denotes whether the account is in enabled or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. - * @property {CourierPartnerSchemeModel} scheme_rules + * @property {string} extension_id + * @property {string} account_id + * @property {string} scheme_id + * @property {boolean} is_self_ship + * @property {string} stage + * @property {boolean} is_own_account */ /** - * @typedef CourierAccountDetailsBody - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} [account_id] - Unique identifier of courier partner scheme - * and company id combination. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {string} stage - Denotes whether the account is in enabled or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. + * @typedef CourierAccountRequestBody + * @property {string} extension_id + * @property {string} [account_id] + * @property {string} scheme_id + * @property {boolean} is_self_ship + * @property {string} stage + * @property {boolean} is_own_account */ /** - * @typedef ErrorResult - * @property {string} value - Fields containing the error. - * @property {string} message - Description of the error. - * @property {string} type - Type of the error. + * @typedef ErrorResponse + * @property {string} value + * @property {string} message + * @property {string} type */ /** - * @typedef CourierPartnerAccountFailureResult - * @property {boolean} success - Denotes whether the request is a success or failure. - * @property {ErrorResult[]} error + * @typedef CourierPartnerAccountFailureResponse + * @property {boolean} success + * @property {ErrorResponse[]} error */ /** @@ -682,40 +643,33 @@ const Joi = require("joi"); */ /** - * @typedef CourierPartnerRuleCPListResult - * @property {string} account_id - Unique identifier of courier partner scheme - * and company id combination. - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {Object} [scheme_rules] - Denotes the scheme rules associated with - * the courier partner account. + * @typedef CourierPartnerRuleCPListResponse + * @property {string} [account_id] + * @property {string} [extension_id] + * @property {boolean} [is_self_ship] + * @property {Object} [scheme_rules] */ /** - * @typedef CourierPartnerRuleResult - * @property {boolean} is_active - Denotes whether the given courier partner - * rule is inactive or active. - * @property {string} application_id - Unique identifier of the sales channel. - * @property {number} company_id - Unique identifier of the company. - * @property {CourierPartnerRuleConditions} conditions - * @property {string[]} sort - Sort Strategy of the courier partners. - * @property {Object} [created_by] - The Fynd account used to create the courier - * partner rule. - * @property {string} id - Unique identifier of the courier partner rule. - * @property {Object} [modified_by] - The Fynd account used to modify the - * courier partner rule. - * @property {string} [modified_on] - The datetime at which courier partner rule - * is modified. - * @property {string} name - Name for the courier partner rule. - * @property {string} type - The type of the rule. - * @property {CourierPartnerRuleCPListResult[]} [cp_list] + * @typedef CourierPartnerRuleResponse + * @property {boolean} [is_active] + * @property {string} [application_id] + * @property {number} [company_id] + * @property {CourierPartnerRuleConditions} [conditions] + * @property {string[]} [sort] + * @property {Object} [created_by] + * @property {string} [id] + * @property {Object} [modified_by] + * @property {string} [modified_on] + * @property {string} [name] + * @property {string} [type] + * @property {CourierPartnerRuleCPListResponse[]} [cp_list] */ /** * @typedef CourierPartnerList - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} account_id - Unique identifier of courier partner scheme - * and company id combination. + * @property {string} extension_id + * @property {string} account_id */ /** @@ -724,7 +678,7 @@ const Joi = require("joi"); * @property {string} [sub_type] * @property {string} [name] * @property {string} [display_name] - * @property {string[]} [parent_id] + * @property {string} [parent_id] * @property {string[]} [parent_ids] */ @@ -766,189 +720,98 @@ const Joi = require("joi"); /** * @typedef CourierPartnerRule - * @property {boolean} is_active - Denotes whether the given courier partner - * rule is inactive or active. - * @property {CourierPartnerList[]} [cp_list] - A list of courier partners. - * @property {string} name - Name for the courier partner rule. + * @property {boolean} is_active + * @property {CourierPartnerList[]} [cp_list] + * @property {string} name * @property {CourierPartnerRuleConditions} conditions - * @property {string[]} sort - Sort Strategy for the courier partners. - * @property {string} [type] - Denotes the type of the rule. + * @property {string[]} sort */ /** - * @typedef FailureResult + * @typedef FailureResponse * @property {boolean} success - * @property {ErrorResult[]} error + * @property {ErrorResponse[]} error */ /** - * @typedef CourierPartnerRulesListResult - * @property {CourierPartnerRuleResult[]} items + * @typedef CourierPartnerRulesListResponse + * @property {CourierPartnerRuleResponse[]} items * @property {Page} page */ -/** - * @typedef ShipmentsArticles - * @property {number} [item_id] - Unique identifier of the item. - * @property {number} [category_id] - Unique identifier of the category. - * @property {number} [brand_id] - Unique identifier of the brand. - * @property {number} [department_id] - Unique identifier of the department. - * @property {string[]} [tags] - Tags associated with the item. - */ - -/** - * @typedef ShipmentDimension - * @property {number} height - Height of the shipment in centimeters. - * @property {number} length - Length of the shipment in centimeters. - * @property {number} width - Width of the shipment in centimeters. - */ - -/** - * @typedef Shipments - * @property {string} [id] - Unique identifier of the shipment. - * @property {number} [location_id] - Unique identifier of the selling location. - * @property {string[]} [location_tags] - Tags associated with the selling location. - * @property {number} [shipment_weight] - Weight of the shipment. - * @property {number} [shipment_volumetric_weight] - Volumetric weight of the shipment. - * @property {number} [shipment_cost] - Total Cost of the shipment. - * @property {ShipmentDimension} [shipment_dimension] - * @property {string[]} [courier_partner_schemes] - A List of courier schemes. - * @property {ShipmentsArticles[]} [articles] - List of articles in the shipment. - */ - -/** - * @typedef ShipmentCourierPartnerDetails - * @property {ShipmentsCourierPartnersServiceability} from_location - * @property {ShipmentsCourierPartnersServiceability} to_location - * @property {Shipments[]} [shipments] - List of shipments. - * @property {string} [journey] - Journey type of the shipment forward or return. - * @property {string} [payment_mode] - Payment mode opted for the shipment. - */ - -/** - * @typedef CourierPartnerPromise - * @property {string} min - The earliest possible timestamp. - * @property {string} max - The latest possible timestamp. - */ - -/** - * @typedef CourierPartners - * @property {string} [extension_id] - Unique identifier of courier partner extension. - * @property {string} [scheme_id] - Unique identifier of courier partner scheme. - * @property {string} [name] - Name of the courier partner. - * @property {CourierPartnerPromise} [delivery_promise] - */ - -/** - * @typedef ShipmentCourierPartners - * @property {string} [id] - Unique identifier of the shipment. - * @property {CourierPartners[]} [courier_partners] - Courier partners of the shipment. - */ - -/** - * @typedef ShipmentCourierPartnerResult - * @property {CourierPartners[]} [courier_partners] - * @property {ShipmentCourierPartners[]} [shipments] - */ - -/** - * @typedef ShipmentsCourierPartnersServiceability - * @property {string} [pincode] - Postal code or PIN code of the address area. - * @property {string} [sector_code] - Specifies the sector or district code of - * the address if applicable. - * @property {string} [state_code] - Indicates the state or province code of the address. - * @property {string} [city_code] - Denote the city or municipality code of the address. - * @property {string} country_code - ISO2 code for the country of the address. - */ - /** * @typedef CompanyConfig - * @property {string[]} rule_ids - A list for courier partner rules. - * @property {string[]} sort - Sort strategy for the courier partners. - * @property {string} [logistics_as_actual] - Depicts if the courier partner - * rule configuration plan is subscribed by the seller for which mode. - * @property {number} company_id - Unique identifier of the company. - * @property {string} [application_id] - Unique identifier of the sales channel. + * @property {string[]} rule_ids + * @property {string[]} sort + * @property {boolean} [logistics_as_actual] */ /** * @typedef ZoneConfig - * @property {string} [serviceability_type] - Serviceability type of the delivery zone. - * @property {number} [active_count] - Count of active delivery zones associated - * with the sales channel. - * @property {number} [total_count] - Count of total delivery zones associated - * with the sales channel. + * @property {string} [serviceability_type] */ /** * @typedef ApplicationConfig - * @property {string[]} [rule_ids] - A list of courier partner rules. - * @property {string[]} [sort] - Strategy adopted to sort the courier partners. + * @property {string[]} [rule_ids] + * @property {string[]} [sort] * @property {ZoneConfig} [zones] */ /** - * @typedef BulkRegionJobDetails - * @property {string} [file_path] - CDN path of the uploaded csv file for bulk import. - * @property {string} country - Country for which the tat or serviceability is - * to be imported or exported. - * @property {string} action - Denotes the import or export action to be performed. - * @property {string} region - Region of the country for which import or export - * is triggered. + * @typedef BulkRegionJobSerializer + * @property {string} [file_path] + * @property {string} country + * @property {string} action + * @property {string} region */ /** - * @typedef BulkRegionResultItemData - * @property {string} [file_path] - CDN path of the file which was used for bulk import. - * @property {number} [failed] - Count of the failed records. + * @typedef BulkRegionResponseItemData + * @property {string} file_path + * @property {number} [failed] * @property {Object[]} [failed_records] - * @property {string} action - Denotes the import or export action performed. - * @property {string} batch_id - Unique id to identify the import or export query. - * @property {string} country - Country for which the import or export action is - * performed. - * @property {number} [success] - Denoted if the import or export was successful - * or failure. - * @property {string} region - Region of the country for which import or export - * is triggered. - * @property {string} status - Current status of the import or export action performed. - * @property {number} [total] - Count of total records. - * @property {string} [error_file_path] - Path of the error file. - */ - -/** - * @typedef BulkRegionResult - * @property {BulkRegionResultItemData[]} items + * @property {string} action + * @property {string} batch_id + * @property {string} country + * @property {number} [success] + * @property {string} region + * @property {string} status + * @property {number} [total] + * @property {string} [error_file_path] + */ + +/** + * @typedef BulkRegionResponse + * @property {BulkRegionResponseItemData[]} items * @property {Page} page */ /** - * @typedef SelfShipResult + * @typedef SelfShipResponse * @property {boolean} is_active * @property {number} tat */ /** * @typedef ApplicationSelfShipConfig - * @property {SelfShipResult} [self_ship] + * @property {Object} [self_ship] */ /** - * @typedef ApplicationSelfShipConfigResult - * @property {ServiceabilityErrorResult} [error] + * @typedef ApplicationSelfShipConfigResponse + * @property {ServiceabilityErrorResponse} [error] * @property {ApplicationSelfShipConfig} [data] * @property {boolean} success */ /** * @typedef StoreRuleConfigData - * @property {string[]} [rule_ids] - List of rule ids which are active in the application. - * @property {string[]} [type_based_priority] - Priority of the store type to be - * used in the basic prioritization sorting of stores. - * @property {string[]} [tag_based_priority] - Priority of the store tags to be - * used in the basic prioritization sorting of stores. - * @property {StorePrioritySchema[]} [store_priority] - Priority of explicit - * stores to be used for sorting of stores. - * @property {string[]} [sort] - Criteria on which the selected stores should be sorted. + * @property {string[]} [rule_ids] + * @property {string[]} [type_based_priority] + * @property {string[]} [tag_based_priority] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [sort] */ /** @@ -977,87 +840,75 @@ const Joi = require("joi"); /** * @typedef StoreRuleDataSchema - * @property {string} [id] - Id of the rule. - * @property {string} [name] - Name of the rule. - * @property {number} [company_id] - Company id for which the rule is created. - * @property {string} [application_id] - Application id for which the rule is created. - * @property {string[]} [type_based_priority] - Priority of the store type to be - * used in the basic prioritization sorting of stores. - * @property {string[]} [tag_based_priority] - Priority of the store tags to be - * used in the basic prioritization sorting of stores. - * @property {StorePrioritySchema[]} [store_priority] - Priority of explicit - * stores to be used for sorting of stores. - * @property {string[]} [sort] - Criteria on which the selected stores should be sorted. + * @property {string} [id] + * @property {string} [name] + * @property {number} [company_id] + * @property {string} [application_id] + * @property {string[]} [type_based_priority] + * @property {string[]} [tag_based_priority] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [sort] * @property {StoreRuleConditionSchema} [conditions] - * @property {boolean} [is_active] - Denotes whether the rule is active or inactive. + * @property {boolean} [is_active] */ /** * @typedef StorePrioritySchema - * @property {number} [id] - Id of the store. - * @property {string} [name] - Name of the store. + * @property {string} [id] + * @property {string} [name] */ /** - * @typedef GetStoreRulesApiResult + * @typedef GetStoreRulesApiResponse * @property {StoreRuleDataSchema[]} [items] * @property {Page} [page] */ /** - * @typedef CreateStoreRuleDetailsSchema - * @property {string} [name] - Name of the rule. - * @property {boolean} [is_active] - Denotes if the rule is active or not. + * @typedef CreateStoreRuleRequestSchema + * @property {string} [name] + * @property {boolean} [is_active] * @property {StoreRuleConditionSchema} [conditions] - * @property {string[]} [type_based_priority] - Priority of the store type to be - * used in the basic prioritization sorting of stores. - * @property {string[]} [tag_based_priority] - Priority of the store tags to be - * used in the basic prioritization sorting of stores. - * @property {StorePrioritySchema[]} [store_priority] - Priority of explicit - * stores to be used for sorting of stores. - * @property {string[]} [sort] - Criteria on which the selected stores should be sorted. - */ - -/** - * @typedef StoreRuleResultSchema - * @property {string} [id] - Id of the rule created. - * @property {string} [name] - Name of the rule created. - * @property {string} [type] - Type of the rule created. - * @property {string[]} [type_based_priority] - Priority of the store type to be - * used in the rule for sorting of stores. - * @property {string[]} [tag_based_priority] - Priority of the store tags to be - * used in the rule for sorting of stores. - * @property {StorePrioritySchema[]} [store_priority] - Priority of explicit - * stores to be used for sorting of stores. - * @property {string[]} [sort] - Criteria on which the selected stores should be sorted. + * @property {string[]} [type_based_priority] + * @property {string[]} [tag_based_priority] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [sort] + */ + +/** + * @typedef StoreRuleResponseSchema + * @property {string} [id] + * @property {string} [name] + * @property {string} [type] + * @property {string[]} [type_based_priority] + * @property {string[]} [tag_based_priority] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [sort] * @property {StoreRuleConditionSchema} [conditions] - * @property {boolean} [is_active] - Denotes if the rule is active or inactive. + * @property {boolean} [is_active] */ /** - * @typedef StoreRuleUpdateResultSchema - * @property {string} [id] - Id of the rule created. - * @property {string} [name] - Name of the rule created. - * @property {string} [type] - Type of the rule created. - * @property {string[]} [type_based_priority] - Priority of the store type to be - * used in the rule for sorting of stores. - * @property {string[]} [tag_based_priority] - Priority of the store tags to be - * used in the rule for sorting of stores. - * @property {StorePrioritySchema[]} [store_priority] - Priority of explicit - * stores to be used for sorting of stores. - * @property {string[]} [sort] - Criteria on which the selected stores should be sorted. + * @typedef StoreRuleUpdateResponseSchema + * @property {string} [id] + * @property {string} [name] + * @property {string} [type] + * @property {string[]} [type_based_priority] + * @property {string[]} [tag_based_priority] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [sort] * @property {StoreRuleConditionSchema} [conditions] - * @property {boolean} [is_active] - Denotes if the rule is active or inactive. - * @property {number} [company_id] - Company id for which the rule is created. - * @property {string} [application_id] - Application id for which the rule is created. + * @property {boolean} [is_active] + * @property {number} [company_id] + * @property {string} [application_id] */ /** * @typedef ServiceabilityModel * @property {number} lm_cod_limit * @property {boolean} is_qc - * @property {string} [pickup_cutoff] - * @property {string} [route_code] + * @property {string} pickup_cutoff + * @property {string} route_code * @property {boolean} is_first_mile * @property {boolean} is_return * @property {boolean} is_installation @@ -1088,126 +939,102 @@ const Joi = require("joi"); /** * @typedef CourierPartnerSchemeModel - * @property {string} [name] - Name of the scheme. - * @property {string} extension_id - Unique identifier of courier partner extension. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {ArithmeticOperations} [volumetric_weight] + * @property {string} extension_id + * @property {string} scheme_id * @property {ArithmeticOperations} weight - * @property {string} transport_type - Mode of transport associated with the - * courier partner scheme. - * @property {string} region - Serviceable region associated with the courier - * partner scheme. - * @property {string} delivery_type - Type of delivery associated with the - * courier partner scheme. - * @property {string[]} payment_mode - Mode of payment associated with the - * courier partner scheme. - * @property {string} stage - Denotes whether the courier partner scheme is in - * enabled or disabled stage. + * @property {string} transport_type + * @property {string} region + * @property {string} delivery_type + * @property {string[]} payment_mode + * @property {string} stage * @property {CourierPartnerSchemeFeatures} feature */ /** - * @typedef CourierAccountResult - * @property {number} company_id - Company id associated with the account. - * @property {string} [extension_id] - Unique identifier of courier partner extension. - * @property {string} account_id - Unique identifier of courier partner scheme - * and company id combination. - * @property {string} scheme_id - Unique identifier of courier partner scheme. - * @property {boolean} is_self_ship - Denotes if the account is of self delivery type. - * @property {string} stage - Denotes whether the account is in enabled or disabled stage. - * @property {boolean} is_own_account - Denotes whether it is the seller's own - * account or not. - * @property {CourierPartnerSchemeModel} [scheme_rules] + * @typedef CourierAccountResponse + * @property {string} account_id + * @property {string} scheme_id + * @property {boolean} is_self_ship + * @property {string} stage + * @property {boolean} is_own_account + * @property {CourierPartnerSchemeModel} scheme_rules */ /** - * @typedef CompanyCourierPartnerAccountListResult - * @property {CourierAccountResult[]} items + * @typedef CompanyCourierPartnerAccountListResponse + * @property {CourierAccountResponse[]} items * @property {Page} page */ /** * @typedef PackageMaterial - * @property {string} name - Name of the packaging material. - * @property {number} width - Width of the packaging material dimentions in centimeter. - * @property {number} height - Height of the packaging material dimentions in centimeter. - * @property {number} length - Length of the packaging material dimentions in centimeter. - * @property {PackageMaterialRule[]} [rules] - Product group rules associated - * with the packaging. - * @property {number[]} store_ids - Store ids where the packaging is avaiable. - * @property {number} weight - Package's weight in gram. - * @property {number} error_rate - Error Rate associated with the packaging dimensions. - * @property {string} package_type - Type of package material. - * @property {string} size - Physical size of the packaging. - * @property {string[]} [media] - Image urls associated with the packaging material. - * @property {Channel[]} channels - Sales channel where packaging is applicable. - * @property {boolean} [track_inventory] - Denotes if the track of the inventory - * should be kept. - * @property {string} status - Current status of the packaging material, if it - * is active or inactive. - * @property {number} [max_weight] - Maximum weight holding capacity. - * @property {number} [package_vol_weight] - Volumetric weight that a packaging - * material can carry. - * @property {boolean} [auto_calculate] - Denotes whether the volumetric weight - * should be auto calculated or not. - */ - -/** - * @typedef PackageMaterialResult - * @property {string} name - Name of the packaging material. - * @property {string} [id] - Id of the packaging material. - * @property {number} [item_id] - Unique identifier of an item associated with - * the packaging material. - * @property {number} [company_id] - Company id associated with the packaging material. - * @property {number} width - Width of the packaging material dimentions in centimeter. - * @property {number} height - Height of the packaging material dimentions in centimeter. - * @property {number} length - Length of the packaging material dimentions in centimeter. - * @property {PackageMaterialRule[]} [rules] - Product group rules associated - * with the packaging. - * @property {number[]} store_ids - Store ids where the packaging is avaiable. - * @property {number} weight - Package's weight in gram. - * @property {number} error_rate - Error Rate associated with the packaging dimensions. - * @property {string} package_type - Type of package material. - * @property {string} size - Physical size of the packaging. - * @property {string[]} [media] - Image urls associated with the packaging material. - * @property {Channel[]} channels - Sales channel where packaging is applicable. - * @property {boolean} [track_inventory] - Denotes if the track of the inventory - * should be kept. - * @property {string} status - Current status of the packaging material, if it - * is active or inactive. - * @property {number} [max_weight] - Maximum weight holding capacity. - * @property {number} [package_vol_weight] - Volumetric weight that a packaging - * material can carry. - * @property {boolean} [auto_calculate] - Denotes whether the volumetric weight - * should be auto calculated or not. + * @property {string} name + * @property {number} width + * @property {number} height + * @property {number} length + * @property {PackageMaterialRule[]} [rules] + * @property {number[]} store_ids + * @property {number} weight + * @property {number} error_rate + * @property {string} package_type + * @property {string} size + * @property {string[]} [media] + * @property {Channel[]} channels + * @property {boolean} [track_inventory] + * @property {string} status + * @property {number} [max_weight] + * @property {number} [package_vol_weight] + * @property {boolean} [auto_calculate] + */ + +/** + * @typedef PackageMaterialResponse + * @property {string} name + * @property {string} [id] + * @property {number} [item_id] + * @property {number} width + * @property {number} height + * @property {number} length + * @property {PackageMaterialRule[]} [rules] + * @property {number[]} store_ids + * @property {number} weight + * @property {number} error_rate + * @property {string} package_type + * @property {string} size + * @property {string[]} [media] + * @property {Channel[]} channels + * @property {boolean} [track_inventory] + * @property {string} status + * @property {number} [max_weight] + * @property {number} [package_vol_weight] + * @property {boolean} [auto_calculate] */ /** * @typedef PackageMaterialRule - * @property {string} [rule_id] - Unique identifier of the package rule. + * @property {string} [rule_id] * @property {PackageMaterialRuleQuantity} [quantity] - * @property {number} [weight] - Volumetric weight in gram. + * @property {number} [weight] */ /** * @typedef PackageRule - * @property {string} name - Name of the package rule. - * @property {number} company_id - Unique identifier of the company. - * @property {string} type - Type of the rule. - * @property {boolean} [is_active] - Denotes if the rule is active or inactive. + * @property {string} name + * @property {number} company_id + * @property {string} type + * @property {boolean} [is_active] * @property {PackageRuleProductTag} [product_tag] * @property {PackageRuleProduct} [product_id] * @property {PackageRuleCategory} [category_id] */ /** - * @typedef PackageRuleResult - * @property {string} [id] - Unique id of a package rule. - * @property {string} name - Name of a package rule. - * @property {number} company_id - Unique identifier of a company associated - * with the package rule. - * @property {string} type - Type of the rule created. - * @property {boolean} [is_active] - Denotes if the rule is active or inactive. + * @typedef PackageRuleResponse + * @property {string} [id] + * @property {string} name + * @property {number} company_id + * @property {string} type + * @property {boolean} [is_active] * @property {PackageRuleProductTag} [product_tag] * @property {PackageRuleProduct} [product_id] * @property {PackageRuleCategory} [category_id] @@ -1215,19 +1042,19 @@ const Joi = require("joi"); /** * @typedef Channel - * @property {string} [type] - Type of the channel. - * @property {string} [id] - Unique identifier of the channel. + * @property {string} [type] + * @property {string} [id] */ /** * @typedef PackageMaterialRuleList - * @property {PackageRuleResult} [items] + * @property {PackageRuleResponse} [items] * @property {Page} [page] */ /** * @typedef PackageMaterialList - * @property {PackageMaterialResult} [items] + * @property {PackageMaterialResponse} [items] * @property {Page} [page] */ @@ -1248,20 +1075,19 @@ const Joi = require("joi"); /** * @typedef PackageMaterialRuleQuantity - * @property {number} [min] - Minimum product's quantity that a packaging can contain. - * @property {number} [max] - Maximum product's quantity that a packaging can contain. + * @property {number} [min] + * @property {number} [max] */ /** - * @typedef RulePriorityDetails - * @property {string} rule_id - Rule id whose priority needs to be changed. - * @property {number} priority - New priority of the rule. + * @typedef RulePriorityRequest + * @property {string} rule_id + * @property {number} priority */ /** - * @typedef RulePriorityResult - * @property {boolean} [success] - Denotes if the priority of the rule is - * changes successfully or not. + * @typedef RulePriorityResponse + * @property {boolean} [success] */ /** @@ -1292,7 +1118,7 @@ const Joi = require("joi"); * @typedef OptimalLocationsArticles * @property {number} item_id * @property {string} size - * @property {number} quantity + * @property {string} quantity * @property {string} [group_id] * @property {boolean} [is_primary_item] * @property {Object} [meta] @@ -1303,16 +1129,16 @@ const Joi = require("joi"); */ /** - * @typedef OptimlLocationsDetailsSchema + * @typedef OptimlLocationsRequestSchema * @property {string} channel_id * @property {string} channel_type * @property {string} [channel_identifier] * @property {LocationDetailsServiceability} to_serviceability - * @property {OptimalLocationsArticles[]} [articles] + * @property {OptimalLocationsArticles} [article] */ /** - * @typedef OptimalLocationArticlesResult + * @typedef OptimalLocationArticlesResponse * @property {number} item_id * @property {string} size * @property {number} quantity @@ -1330,38 +1156,27 @@ const Joi = require("joi"); */ /** - * @typedef OptimalLocationAssignedStoresResult + * @typedef OptimalLocationAssignedStoresResponse * @property {number} store_id - * @property {OptimalLocationArticlesResult[]} articles - */ - -/** - * @typedef OptimalLocationsResult - * @property {OptimalLocationAssignedStoresResult[]} assigned_stores - * @property {ErrorResult[]} [faulty_articles] - */ - -/** - * @typedef ValidationError - * @property {string} message - A brief description of the error encountered. - * @property {string} field - The field in the request that caused the error. + * @property {OptimalLocationArticlesResponse[]} articles */ /** - * @typedef StandardError - * @property {string} message - A brief description of the error. + * @typedef OptimalLocationsResponse + * @property {OptimalLocationAssignedStoresResponse[]} assigned_stores + * @property {ErrorResponse[]} [faulty_articles] */ class ServiceabilityPlatformModel { - /** @returns {UpdateZoneConfigDetails} */ - static UpdateZoneConfigDetails() { + /** @returns {UpdateZoneConfigRequest} */ + static UpdateZoneConfigRequest() { return Joi.object({ serviceability_type: Joi.string().allow(""), }); } - /** @returns {ServiceabilityErrorResult} */ - static ServiceabilityErrorResult() { + /** @returns {ServiceabilityErrorResponse} */ + static ServiceabilityErrorResponse() { return Joi.object({ message: Joi.string().allow("").required(), value: Joi.string().allow("").required(), @@ -1378,17 +1193,17 @@ class ServiceabilityPlatformModel { }); } - /** @returns {ApplicationServiceabilityConfigResult} */ - static ApplicationServiceabilityConfigResult() { + /** @returns {ApplicationServiceabilityConfigResponse} */ + static ApplicationServiceabilityConfigResponse() { return Joi.object({ - error: ServiceabilityPlatformModel.ServiceabilityErrorResult(), + error: ServiceabilityPlatformModel.ServiceabilityErrorResponse(), data: ServiceabilityPlatformModel.ApplicationServiceabilityConfig(), success: Joi.boolean().required(), }); } - /** @returns {EntityRegionView_Details} */ - static EntityRegionView_Details() { + /** @returns {EntityRegionView_Request} */ + static EntityRegionView_Request() { return Joi.object({ sub_type: Joi.array().items(Joi.string().allow("")).required(), parent_id: Joi.array().items(Joi.string().allow("")), @@ -1415,8 +1230,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {getAppRegionZonesResult} */ - static getAppRegionZonesResult() { + /** @returns {getAppRegionZonesResponse} */ + static getAppRegionZonesResponse() { return Joi.object({ page: Joi.array() .items(ServiceabilityPlatformModel.PageSchema()) @@ -1447,8 +1262,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {EntityRegionView_Result} */ - static EntityRegionView_Result() { + /** @returns {EntityRegionView_Response} */ + static EntityRegionView_Response() { return Joi.object({ error: ServiceabilityPlatformModel.EntityRegionView_Error().required(), page: ServiceabilityPlatformModel.EntityRegionView_page().required(), @@ -1512,8 +1327,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {ListViewResult} */ - static ListViewResult() { + /** @returns {ListViewResponse} */ + static ListViewResponse() { return Joi.object({ page: ServiceabilityPlatformModel.ZoneDataItem().required(), items: Joi.array() @@ -1533,8 +1348,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {CompanyStoreView_Result} */ - static CompanyStoreView_Result() { + /** @returns {CompanyStoreView_Response} */ + static CompanyStoreView_Response() { return Joi.object({ page: Joi.array() .items(ServiceabilityPlatformModel.CompanyStoreView_PageItems()) @@ -1608,16 +1423,16 @@ class ServiceabilityPlatformModel { }); } - /** @returns {ZoneUpdateDetails} */ - static ZoneUpdateDetails() { + /** @returns {ZoneUpdateRequest} */ + static ZoneUpdateRequest() { return Joi.object({ identifier: Joi.string().allow("").required(), data: ServiceabilityPlatformModel.UpdateZoneData().required(), }); } - /** @returns {ZoneSuccessResult} */ - static ZoneSuccessResult() { + /** @returns {ZoneSuccessResponse} */ + static ZoneSuccessResponse() { return Joi.object({ status_code: Joi.number().required(), success: Joi.boolean().required(), @@ -1641,13 +1456,12 @@ class ServiceabilityPlatformModel { mapping: Joi.array() .items(ServiceabilityPlatformModel.ZoneMappingType()) .required(), - assignment_preference: Joi.string().allow(""), stores_count: Joi.number().required(), }); } - /** @returns {GetSingleZoneDataViewResult} */ - static GetSingleZoneDataViewResult() { + /** @returns {GetSingleZoneDataViewResponse} */ + static GetSingleZoneDataViewResponse() { return Joi.object({ data: ServiceabilityPlatformModel.GetZoneDataViewItems().required(), }); @@ -1670,7 +1484,6 @@ class ServiceabilityPlatformModel { mapping: Joi.array() .items(ServiceabilityPlatformModel.ZoneMappingDetailType()) .required(), - stores_count: Joi.number(), }); } @@ -1685,25 +1498,25 @@ class ServiceabilityPlatformModel { .items(ServiceabilityPlatformModel.GetZoneDataViewChannels()) .required(), store_ids: Joi.array().items(Joi.number()).required(), + product: ServiceabilityPlatformModel.ZoneProductTypes().required(), region_type: Joi.string().allow("").required(), mapping: Joi.array() .items(ServiceabilityPlatformModel.ZoneMappingType()) .required(), - product: ServiceabilityPlatformModel.ZoneProductTypes(), }); } - /** @returns {ZoneResult} */ - static ZoneResult() { + /** @returns {ZoneResponse} */ + static ZoneResponse() { return Joi.object({ - status_code: Joi.number(), + status_code: Joi.number().required(), zone_id: Joi.string().allow("").required(), success: Joi.boolean().required(), }); } - /** @returns {GetZoneFromPincodeViewDetails} */ - static GetZoneFromPincodeViewDetails() { + /** @returns {GetZoneFromPincodeViewRequest} */ + static GetZoneFromPincodeViewRequest() { return Joi.object({ country: Joi.string().allow("").required(), pincode: Joi.string().allow("").required(), @@ -1723,16 +1536,16 @@ class ServiceabilityPlatformModel { }); } - /** @returns {GetZoneFromPincodeViewResult} */ - static GetZoneFromPincodeViewResult() { + /** @returns {GetZoneFromPincodeViewResponse} */ + static GetZoneFromPincodeViewResponse() { return Joi.object({ serviceability_type: Joi.string().allow("").required(), zones: Joi.array().items(ServiceabilityPlatformModel.Zone()).required(), }); } - /** @returns {GetZoneFromApplicationIdViewResult} */ - static GetZoneFromApplicationIdViewResult() { + /** @returns {GetZoneFromApplicationIdViewResponse} */ + static GetZoneFromApplicationIdViewResponse() { return Joi.object({ page: Joi.array() .items(ServiceabilityPlatformModel.ZoneDataItem()) @@ -1743,8 +1556,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {ServiceabilityPageResult} */ - static ServiceabilityPageResult() { + /** @returns {ServiceabilityPageResponse} */ + static ServiceabilityPageResponse() { return Joi.object({ type: Joi.string().allow(""), has_next: Joi.boolean(), @@ -1762,8 +1575,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {ManagerResult} */ - static ManagerResult() { + /** @returns {ManagerResponse} */ + static ManagerResponse() { return Joi.object({ email: Joi.string().allow(""), mobile_no: ServiceabilityPlatformModel.MobileNo(), @@ -1771,39 +1584,39 @@ class ServiceabilityPlatformModel { }); } - /** @returns {ModifiedByResult} */ - static ModifiedByResult() { + /** @returns {ModifiedByResponse} */ + static ModifiedByResponse() { return Joi.object({ username: Joi.string().allow(""), user_id: Joi.string().allow(""), }); } - /** @returns {IntegrationTypeResult} */ - static IntegrationTypeResult() { + /** @returns {IntegrationTypeResponse} */ + static IntegrationTypeResponse() { return Joi.object({ inventory: Joi.string().allow(""), order: Joi.string().allow(""), }); } - /** @returns {ProductReturnConfigResult} */ - static ProductReturnConfigResult() { + /** @returns {ProductReturnConfigResponse} */ + static ProductReturnConfigResponse() { return Joi.object({ on_same_store: Joi.boolean(), }); } - /** @returns {ContactNumberResult} */ - static ContactNumberResult() { + /** @returns {ContactNumberResponse} */ + static ContactNumberResponse() { return Joi.object({ number: Joi.string().allow(""), country_code: Joi.number(), }); } - /** @returns {AddressResult} */ - static AddressResult() { + /** @returns {AddressResponse} */ + static AddressResponse() { return Joi.object({ city: Joi.string().allow(""), address1: Joi.string().allow(""), @@ -1817,38 +1630,38 @@ class ServiceabilityPlatformModel { }); } - /** @returns {CreatedByResult} */ - static CreatedByResult() { + /** @returns {CreatedByResponse} */ + static CreatedByResponse() { return Joi.object({ username: Joi.string().allow(""), user_id: Joi.string().allow(""), }); } - /** @returns {EwayBillResult} */ - static EwayBillResult() { + /** @returns {EwayBillResponse} */ + static EwayBillResponse() { return Joi.object({ enabled: Joi.boolean(), }); } - /** @returns {EinvoiceResult} */ - static EinvoiceResult() { + /** @returns {EinvoiceResponse} */ + static EinvoiceResponse() { return Joi.object({ enabled: Joi.boolean(), }); } - /** @returns {GstCredentialsResult} */ - static GstCredentialsResult() { + /** @returns {GstCredentialsResponse} */ + static GstCredentialsResponse() { return Joi.object({ - e_waybill: ServiceabilityPlatformModel.EwayBillResult(), - e_invoice: ServiceabilityPlatformModel.EinvoiceResult(), + e_waybill: ServiceabilityPlatformModel.EwayBillResponse(), + e_invoice: ServiceabilityPlatformModel.EinvoiceResponse(), }); } - /** @returns {WarningsResult} */ - static WarningsResult() { + /** @returns {WarningsResponse} */ + static WarningsResponse() { return Joi.object({ store_address: Joi.string().allow(""), }); @@ -1862,8 +1675,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {TimmingResult} */ - static TimmingResult() { + /** @returns {TimmingResponse} */ + static TimmingResponse() { return Joi.object({ open: Joi.boolean(), weekday: Joi.string().allow(""), @@ -1872,8 +1685,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {DocumentsResult} */ - static DocumentsResult() { + /** @returns {DocumentsResponse} */ + static DocumentsResponse() { return Joi.object({ legal_name: Joi.string().allow(""), value: Joi.string().allow(""), @@ -1898,57 +1711,57 @@ class ServiceabilityPlatformModel { }); } - /** @returns {LogisticsResult} */ - static LogisticsResult() { + /** @returns {LogisticsResponse} */ + static LogisticsResponse() { return Joi.object({ override: Joi.boolean(), dp: ServiceabilityPlatformModel.Dp(), }); } - /** @returns {ItemResult} */ - static ItemResult() { + /** @returns {ItemResponse} */ + static ItemResponse() { return Joi.object({ created_on: Joi.string().allow(""), - manager: ServiceabilityPlatformModel.ManagerResult(), - modified_by: ServiceabilityPlatformModel.ModifiedByResult(), - integration_type: ServiceabilityPlatformModel.IntegrationTypeResult(), + manager: ServiceabilityPlatformModel.ManagerResponse(), + modified_by: ServiceabilityPlatformModel.ModifiedByResponse(), + integration_type: ServiceabilityPlatformModel.IntegrationTypeResponse(), verified_on: Joi.string().allow(""), - product_return_config: ServiceabilityPlatformModel.ProductReturnConfigResult(), + product_return_config: ServiceabilityPlatformModel.ProductReturnConfigResponse(), contact_numbers: Joi.array().items( - ServiceabilityPlatformModel.ContactNumberResult() + ServiceabilityPlatformModel.ContactNumberResponse() ), - verified_by: ServiceabilityPlatformModel.ModifiedByResult(), + verified_by: ServiceabilityPlatformModel.ModifiedByResponse(), stage: Joi.string().allow(""), - address: ServiceabilityPlatformModel.AddressResult(), + address: ServiceabilityPlatformModel.AddressResponse(), modified_on: Joi.string().allow(""), - created_by: ServiceabilityPlatformModel.CreatedByResult(), - gst_credentials: ServiceabilityPlatformModel.GstCredentialsResult(), + created_by: ServiceabilityPlatformModel.CreatedByResponse(), + gst_credentials: ServiceabilityPlatformModel.GstCredentialsResponse(), display_name: Joi.string().allow(""), company_id: Joi.number(), uid: Joi.number(), - _custom_json: Joi.object().pattern(/\S/, Joi.any()), + _custom_json: Joi.any(), code: Joi.string().allow(""), - warnings: ServiceabilityPlatformModel.WarningsResult(), + warnings: ServiceabilityPlatformModel.WarningsResponse(), name: Joi.string().allow(""), - timing: Joi.array().items(ServiceabilityPlatformModel.TimmingResult()), + timing: Joi.array().items(ServiceabilityPlatformModel.TimmingResponse()), documents: Joi.array().items( - ServiceabilityPlatformModel.DocumentsResult() + ServiceabilityPlatformModel.DocumentsResponse() ), store_type: Joi.string().allow(""), sub_type: Joi.string().allow(""), company: Joi.number(), _cls: Joi.string().allow(""), - logistics: ServiceabilityPlatformModel.LogisticsResult(), + logistics: ServiceabilityPlatformModel.LogisticsResponse(), notification_emails: Joi.array().items(Joi.string().allow("")), }); } - /** @returns {GetStoresViewResult} */ - static GetStoresViewResult() { + /** @returns {GetStoresViewResponse} */ + static GetStoresViewResponse() { return Joi.object({ - page: ServiceabilityPlatformModel.ServiceabilityPageResult().required(), - items: Joi.array().items(ServiceabilityPlatformModel.ItemResult()), + page: ServiceabilityPlatformModel.ServiceabilityPageResponse().required(), + items: Joi.array().items(ServiceabilityPlatformModel.ItemResponse()), }); } @@ -1961,8 +1774,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {PincodeMopUpdateResult} */ - static PincodeMopUpdateResult() { + /** @returns {PincodeMopUpdateResponse} */ + static PincodeMopUpdateResponse() { return Joi.object({ pincode: Joi.number().required(), channel_id: Joi.string().allow("").required(), @@ -1971,8 +1784,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {PincodeMOPResult} */ - static PincodeMOPResult() { + /** @returns {PincodeMOPresponse} */ + static PincodeMOPresponse() { return Joi.object({ success: Joi.boolean().required(), status_code: Joi.number().required(), @@ -1981,7 +1794,7 @@ class ServiceabilityPlatformModel { action: Joi.string().allow("").required(), pincodes: Joi.array().items(Joi.number()), updated_pincodes: Joi.array().items( - ServiceabilityPlatformModel.PincodeMopUpdateResult() + ServiceabilityPlatformModel.PincodeMopUpdateResponse() ), }); } @@ -2003,16 +1816,16 @@ class ServiceabilityPlatformModel { }); } - /** @returns {PincodeBulkViewResult} */ - static PincodeBulkViewResult() { + /** @returns {PincodeBulkViewResponse} */ + static PincodeBulkViewResponse() { return Joi.object({ batch_id: Joi.string().allow("").required(), s3_url: Joi.string().allow("").required(), }); } - /** @returns {PincodeCodStatusListingDetails} */ - static PincodeCodStatusListingDetails() { + /** @returns {PincodeCodStatusListingRequest} */ + static PincodeCodStatusListingRequest() { return Joi.object({ country: Joi.string().allow(""), is_active: Joi.boolean(), @@ -2022,26 +1835,18 @@ class ServiceabilityPlatformModel { }); } - /** @returns {PincodeCodStatusItem} */ - static PincodeCodStatusItem() { - return Joi.object({ - active: Joi.boolean(), - pincode: Joi.string().allow(""), - }); - } - - /** @returns {PincodeCodStatusListingResult} */ - static PincodeCodStatusListingResult() { + /** @returns {PincodeCodStatusListingResponse} */ + static PincodeCodStatusListingResponse() { return Joi.object({ country: Joi.string().allow("").required(), data: Joi.array() - .items(Joi.link("#PincodeCodStatusListingResult")) + .items(Joi.link("#PincodeCodStatusListingResponse")) .required(), success: Joi.boolean().required(), errors: Joi.array().items(ServiceabilityPlatformModel.Error()), page: ServiceabilityPlatformModel.PincodeCodStatusListingPage().required(), summary: ServiceabilityPlatformModel.PincodeCodStatusListingSummary().required(), - }).id("PincodeCodStatusListingResult"); + }).id("PincodeCodStatusListingResponse"); } /** @returns {Error} */ @@ -2072,8 +1877,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {PincodeMopUpdateAuditHistoryDetails} */ - static PincodeMopUpdateAuditHistoryDetails() { + /** @returns {PincodeMopUpdateAuditHistoryRequest} */ + static PincodeMopUpdateAuditHistoryRequest() { return Joi.object({ entity_type: Joi.string().allow("").required(), file_name: Joi.string().allow(""), @@ -2091,8 +1896,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {PincodeMopUpdateAuditHistoryResult} */ - static PincodeMopUpdateAuditHistoryResult() { + /** @returns {PincodeMopUpdateAuditHistoryResponse} */ + static PincodeMopUpdateAuditHistoryResponse() { return Joi.object({ batch_id: Joi.string().allow(""), entity_type: Joi.string().allow(""), @@ -2105,13 +1910,15 @@ class ServiceabilityPlatformModel { }); } - /** @returns {PincodeMopUpdateAuditHistoryResultData} */ - static PincodeMopUpdateAuditHistoryResultData() { + /** @returns {PincodeMopUpdateAuditHistoryResponseData} */ + static PincodeMopUpdateAuditHistoryResponseData() { return Joi.object({ entity_type: Joi.string().allow(""), page: ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryPaging().required(), data: Joi.array() - .items(ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryResult()) + .items( + ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryResponse() + ) .required(), }); } @@ -2150,33 +1957,20 @@ class ServiceabilityPlatformModel { }); } - /** @returns {CourierAccountUpdateDetails} */ - static CourierAccountUpdateDetails() { - return Joi.object({ - extension_id: Joi.string().allow("").required(), - scheme_id: Joi.string().allow("").required(), - is_self_ship: Joi.boolean().required(), - stage: Joi.string().allow("").required(), - is_own_account: Joi.boolean().required(), - }); - } - /** @returns {CourierAccount} */ static CourierAccount() { return Joi.object({ - company_id: Joi.number().required(), extension_id: Joi.string().allow("").required(), account_id: Joi.string().allow("").required(), scheme_id: Joi.string().allow("").required(), is_self_ship: Joi.boolean().required(), stage: Joi.string().allow("").required(), is_own_account: Joi.boolean().required(), - scheme_rules: ServiceabilityPlatformModel.CourierPartnerSchemeModel().required(), }); } - /** @returns {CourierAccountDetailsBody} */ - static CourierAccountDetailsBody() { + /** @returns {CourierAccountRequestBody} */ + static CourierAccountRequestBody() { return Joi.object({ extension_id: Joi.string().allow("").required(), account_id: Joi.string().allow(""), @@ -2187,8 +1981,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {ErrorResult} */ - static ErrorResult() { + /** @returns {ErrorResponse} */ + static ErrorResponse() { return Joi.object({ value: Joi.string().allow("").required(), message: Joi.string().allow("").required(), @@ -2196,12 +1990,12 @@ class ServiceabilityPlatformModel { }); } - /** @returns {CourierPartnerAccountFailureResult} */ - static CourierPartnerAccountFailureResult() { + /** @returns {CourierPartnerAccountFailureResponse} */ + static CourierPartnerAccountFailureResponse() { return Joi.object({ success: Joi.boolean().required(), error: Joi.array() - .items(ServiceabilityPlatformModel.ErrorResult()) + .items(ServiceabilityPlatformModel.ErrorResponse()) .required(), }); } @@ -2219,32 +2013,32 @@ class ServiceabilityPlatformModel { }); } - /** @returns {CourierPartnerRuleCPListResult} */ - static CourierPartnerRuleCPListResult() { + /** @returns {CourierPartnerRuleCPListResponse} */ + static CourierPartnerRuleCPListResponse() { return Joi.object({ - account_id: Joi.string().allow("").required(), - extension_id: Joi.string().allow("").required(), - is_self_ship: Joi.boolean().required(), - scheme_rules: Joi.object().pattern(/\S/, Joi.any()), + account_id: Joi.string().allow(""), + extension_id: Joi.string().allow(""), + is_self_ship: Joi.boolean(), + scheme_rules: Joi.any(), }); } - /** @returns {CourierPartnerRuleResult} */ - static CourierPartnerRuleResult() { + /** @returns {CourierPartnerRuleResponse} */ + static CourierPartnerRuleResponse() { return Joi.object({ - is_active: Joi.boolean().required(), - application_id: Joi.string().allow("").required(), - company_id: Joi.number().required(), - conditions: ServiceabilityPlatformModel.CourierPartnerRuleConditions().required(), - sort: Joi.array().items(Joi.string().allow("")).required(), - created_by: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), - id: Joi.string().allow("").required(), - modified_by: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + is_active: Joi.boolean(), + application_id: Joi.string().allow(""), + company_id: Joi.number(), + conditions: ServiceabilityPlatformModel.CourierPartnerRuleConditions(), + sort: Joi.array().items(Joi.string().allow("")), + created_by: Joi.any().allow(null), + id: Joi.string().allow(""), + modified_by: Joi.any().allow(null), modified_on: Joi.string().allow("").allow(null), - name: Joi.string().allow("").required(), - type: Joi.string().allow("").required(), + name: Joi.string().allow(""), + type: Joi.string().allow(""), cp_list: Joi.array().items( - ServiceabilityPlatformModel.CourierPartnerRuleCPListResult() + ServiceabilityPlatformModel.CourierPartnerRuleCPListResponse() ), }); } @@ -2264,7 +2058,7 @@ class ServiceabilityPlatformModel { sub_type: Joi.string().allow(""), name: Joi.string().allow(""), display_name: Joi.string().allow(""), - parent_id: Joi.array().items(Joi.string().allow("")), + parent_id: Joi.string().allow(""), parent_ids: Joi.array().items(Joi.string().allow("")), }); } @@ -2325,137 +2119,35 @@ class ServiceabilityPlatformModel { name: Joi.string().allow("").required(), conditions: ServiceabilityPlatformModel.CourierPartnerRuleConditions().required(), sort: Joi.array().items(Joi.string().allow("")).required(), - type: Joi.string().allow(""), }); } - /** @returns {FailureResult} */ - static FailureResult() { + /** @returns {FailureResponse} */ + static FailureResponse() { return Joi.object({ success: Joi.boolean().required(), error: Joi.array() - .items(ServiceabilityPlatformModel.ErrorResult()) + .items(ServiceabilityPlatformModel.ErrorResponse()) .required(), }); } - /** @returns {CourierPartnerRulesListResult} */ - static CourierPartnerRulesListResult() { + /** @returns {CourierPartnerRulesListResponse} */ + static CourierPartnerRulesListResponse() { return Joi.object({ items: Joi.array() - .items(ServiceabilityPlatformModel.CourierPartnerRuleResult()) + .items(ServiceabilityPlatformModel.CourierPartnerRuleResponse()) .required(), page: ServiceabilityPlatformModel.Page().required(), }); } - /** @returns {ShipmentsArticles} */ - static ShipmentsArticles() { - return Joi.object({ - item_id: Joi.number(), - category_id: Joi.number(), - brand_id: Joi.number(), - department_id: Joi.number(), - tags: Joi.array().items(Joi.string().allow("")), - }); - } - - /** @returns {ShipmentDimension} */ - static ShipmentDimension() { - return Joi.object({ - height: Joi.number().required(), - length: Joi.number().required(), - width: Joi.number().required(), - }); - } - - /** @returns {Shipments} */ - static Shipments() { - return Joi.object({ - id: Joi.string().allow(""), - location_id: Joi.number(), - location_tags: Joi.array().items(Joi.string().allow("")), - shipment_weight: Joi.number(), - shipment_volumetric_weight: Joi.number(), - shipment_cost: Joi.number(), - shipment_dimension: ServiceabilityPlatformModel.ShipmentDimension(), - courier_partner_schemes: Joi.array().items(Joi.string().allow("")), - articles: Joi.array().items( - ServiceabilityPlatformModel.ShipmentsArticles() - ), - }); - } - - /** @returns {ShipmentCourierPartnerDetails} */ - static ShipmentCourierPartnerDetails() { - return Joi.object({ - from_location: ServiceabilityPlatformModel.ShipmentsCourierPartnersServiceability().required(), - to_location: ServiceabilityPlatformModel.ShipmentsCourierPartnersServiceability().required(), - shipments: Joi.array().items(ServiceabilityPlatformModel.Shipments()), - journey: Joi.string().allow(""), - payment_mode: Joi.string().allow(""), - }); - } - - /** @returns {CourierPartnerPromise} */ - static CourierPartnerPromise() { - return Joi.object({ - min: Joi.string().allow("").required(), - max: Joi.string().allow("").required(), - }); - } - - /** @returns {CourierPartners} */ - static CourierPartners() { - return Joi.object({ - extension_id: Joi.string().allow(""), - scheme_id: Joi.string().allow(""), - name: Joi.string().allow(""), - delivery_promise: ServiceabilityPlatformModel.CourierPartnerPromise(), - }); - } - - /** @returns {ShipmentCourierPartners} */ - static ShipmentCourierPartners() { - return Joi.object({ - id: Joi.string().allow(""), - courier_partners: Joi.array().items( - ServiceabilityPlatformModel.CourierPartners() - ), - }); - } - - /** @returns {ShipmentCourierPartnerResult} */ - static ShipmentCourierPartnerResult() { - return Joi.object({ - courier_partners: Joi.array().items( - ServiceabilityPlatformModel.CourierPartners() - ), - shipments: Joi.array().items( - ServiceabilityPlatformModel.ShipmentCourierPartners() - ), - }); - } - - /** @returns {ShipmentsCourierPartnersServiceability} */ - static ShipmentsCourierPartnersServiceability() { - return Joi.object({ - pincode: Joi.string().allow(""), - sector_code: Joi.string().allow(""), - state_code: Joi.string().allow(""), - city_code: Joi.string().allow(""), - country_code: Joi.string().allow("").required(), - }); - } - /** @returns {CompanyConfig} */ static CompanyConfig() { return Joi.object({ rule_ids: Joi.array().items(Joi.string().allow("")).required(), sort: Joi.array().items(Joi.string().allow("")).required(), - logistics_as_actual: Joi.string().allow(""), - company_id: Joi.number().required(), - application_id: Joi.string().allow(""), + logistics_as_actual: Joi.boolean(), }); } @@ -2463,8 +2155,6 @@ class ServiceabilityPlatformModel { static ZoneConfig() { return Joi.object({ serviceability_type: Joi.string().allow(""), - active_count: Joi.number(), - total_count: Joi.number(), }); } @@ -2477,22 +2167,22 @@ class ServiceabilityPlatformModel { }); } - /** @returns {BulkRegionJobDetails} */ - static BulkRegionJobDetails() { + /** @returns {BulkRegionJobSerializer} */ + static BulkRegionJobSerializer() { return Joi.object({ - file_path: Joi.string().allow("").allow(null), + file_path: Joi.string().allow(""), country: Joi.string().allow("").required(), action: Joi.string().allow("").required(), region: Joi.string().allow("").required(), }); } - /** @returns {BulkRegionResultItemData} */ - static BulkRegionResultItemData() { + /** @returns {BulkRegionResponseItemData} */ + static BulkRegionResponseItemData() { return Joi.object({ - file_path: Joi.string().allow(""), + file_path: Joi.string().allow("").required(), failed: Joi.number(), - failed_records: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + failed_records: Joi.array().items(Joi.any()), action: Joi.string().allow("").required(), batch_id: Joi.string().allow("").required(), country: Joi.string().allow("").required(), @@ -2504,18 +2194,18 @@ class ServiceabilityPlatformModel { }); } - /** @returns {BulkRegionResult} */ - static BulkRegionResult() { + /** @returns {BulkRegionResponse} */ + static BulkRegionResponse() { return Joi.object({ items: Joi.array() - .items(ServiceabilityPlatformModel.BulkRegionResultItemData()) + .items(ServiceabilityPlatformModel.BulkRegionResponseItemData()) .required(), page: ServiceabilityPlatformModel.Page().required(), }); } - /** @returns {SelfShipResult} */ - static SelfShipResult() { + /** @returns {SelfShipResponse} */ + static SelfShipResponse() { return Joi.object({ is_active: Joi.boolean().required(), tat: Joi.number().required(), @@ -2525,14 +2215,14 @@ class ServiceabilityPlatformModel { /** @returns {ApplicationSelfShipConfig} */ static ApplicationSelfShipConfig() { return Joi.object({ - self_ship: ServiceabilityPlatformModel.SelfShipResult(), + self_ship: Joi.any().allow(null), }); } - /** @returns {ApplicationSelfShipConfigResult} */ - static ApplicationSelfShipConfigResult() { + /** @returns {ApplicationSelfShipConfigResponse} */ + static ApplicationSelfShipConfigResponse() { return Joi.object({ - error: ServiceabilityPlatformModel.ServiceabilityErrorResult(), + error: ServiceabilityPlatformModel.ServiceabilityErrorResponse(), data: ServiceabilityPlatformModel.ApplicationSelfShipConfig(), success: Joi.boolean().required(), }); @@ -2600,13 +2290,13 @@ class ServiceabilityPlatformModel { /** @returns {StorePrioritySchema} */ static StorePrioritySchema() { return Joi.object({ - id: Joi.number(), + id: Joi.string().allow(""), name: Joi.string().allow(""), }); } - /** @returns {GetStoreRulesApiResult} */ - static GetStoreRulesApiResult() { + /** @returns {GetStoreRulesApiResponse} */ + static GetStoreRulesApiResponse() { return Joi.object({ items: Joi.array().items( ServiceabilityPlatformModel.StoreRuleDataSchema() @@ -2615,8 +2305,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {CreateStoreRuleDetailsSchema} */ - static CreateStoreRuleDetailsSchema() { + /** @returns {CreateStoreRuleRequestSchema} */ + static CreateStoreRuleRequestSchema() { return Joi.object({ name: Joi.string().allow(""), is_active: Joi.boolean(), @@ -2630,8 +2320,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {StoreRuleResultSchema} */ - static StoreRuleResultSchema() { + /** @returns {StoreRuleResponseSchema} */ + static StoreRuleResponseSchema() { return Joi.object({ id: Joi.string().allow(""), name: Joi.string().allow(""), @@ -2647,8 +2337,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {StoreRuleUpdateResultSchema} */ - static StoreRuleUpdateResultSchema() { + /** @returns {StoreRuleUpdateResponseSchema} */ + static StoreRuleUpdateResponseSchema() { return Joi.object({ id: Joi.string().allow(""), name: Joi.string().allow(""), @@ -2671,8 +2361,8 @@ class ServiceabilityPlatformModel { return Joi.object({ lm_cod_limit: Joi.number().required(), is_qc: Joi.boolean().required(), - pickup_cutoff: Joi.string().allow("").allow(null), - route_code: Joi.string().allow("").allow(null), + pickup_cutoff: Joi.string().allow("").allow(null).required(), + route_code: Joi.string().allow("").allow(null).required(), is_first_mile: Joi.boolean().required(), is_return: Joi.boolean().required(), is_installation: Joi.boolean().required(), @@ -2707,10 +2397,8 @@ class ServiceabilityPlatformModel { /** @returns {CourierPartnerSchemeModel} */ static CourierPartnerSchemeModel() { return Joi.object({ - name: Joi.string().allow(""), extension_id: Joi.string().allow("").required(), scheme_id: Joi.string().allow("").required(), - volumetric_weight: ServiceabilityPlatformModel.ArithmeticOperations(), weight: ServiceabilityPlatformModel.ArithmeticOperations().required(), transport_type: Joi.string().allow("").required(), region: Joi.string().allow("").required(), @@ -2721,25 +2409,23 @@ class ServiceabilityPlatformModel { }); } - /** @returns {CourierAccountResult} */ - static CourierAccountResult() { + /** @returns {CourierAccountResponse} */ + static CourierAccountResponse() { return Joi.object({ - company_id: Joi.number().required(), - extension_id: Joi.string().allow(""), account_id: Joi.string().allow("").required(), scheme_id: Joi.string().allow("").required(), is_self_ship: Joi.boolean().required(), stage: Joi.string().allow("").required(), is_own_account: Joi.boolean().required(), - scheme_rules: ServiceabilityPlatformModel.CourierPartnerSchemeModel(), + scheme_rules: ServiceabilityPlatformModel.CourierPartnerSchemeModel().required(), }); } - /** @returns {CompanyCourierPartnerAccountListResult} */ - static CompanyCourierPartnerAccountListResult() { + /** @returns {CompanyCourierPartnerAccountListResponse} */ + static CompanyCourierPartnerAccountListResponse() { return Joi.object({ items: Joi.array() - .items(ServiceabilityPlatformModel.CourierAccountResult()) + .items(ServiceabilityPlatformModel.CourierAccountResponse()) .required(), page: ServiceabilityPlatformModel.Page().required(), }); @@ -2772,13 +2458,12 @@ class ServiceabilityPlatformModel { }); } - /** @returns {PackageMaterialResult} */ - static PackageMaterialResult() { + /** @returns {PackageMaterialResponse} */ + static PackageMaterialResponse() { return Joi.object({ name: Joi.string().allow("").required(), id: Joi.string().allow(""), item_id: Joi.number(), - company_id: Joi.number(), width: Joi.number().required(), height: Joi.number().required(), length: Joi.number().required(), @@ -2824,8 +2509,8 @@ class ServiceabilityPlatformModel { }); } - /** @returns {PackageRuleResult} */ - static PackageRuleResult() { + /** @returns {PackageRuleResponse} */ + static PackageRuleResponse() { return Joi.object({ id: Joi.string().allow(""), name: Joi.string().allow("").required(), @@ -2849,7 +2534,7 @@ class ServiceabilityPlatformModel { /** @returns {PackageMaterialRuleList} */ static PackageMaterialRuleList() { return Joi.object({ - items: ServiceabilityPlatformModel.PackageRuleResult(), + items: ServiceabilityPlatformModel.PackageRuleResponse(), page: ServiceabilityPlatformModel.Page(), }); } @@ -2857,7 +2542,7 @@ class ServiceabilityPlatformModel { /** @returns {PackageMaterialList} */ static PackageMaterialList() { return Joi.object({ - items: ServiceabilityPlatformModel.PackageMaterialResult(), + items: ServiceabilityPlatformModel.PackageMaterialResponse(), page: ServiceabilityPlatformModel.Page(), }); } @@ -2891,16 +2576,16 @@ class ServiceabilityPlatformModel { }); } - /** @returns {RulePriorityDetails} */ - static RulePriorityDetails() { + /** @returns {RulePriorityRequest} */ + static RulePriorityRequest() { return Joi.object({ rule_id: Joi.string().allow("").required(), priority: Joi.number().required(), }); } - /** @returns {RulePriorityResult} */ - static RulePriorityResult() { + /** @returns {RulePriorityResponse} */ + static RulePriorityResponse() { return Joi.object({ success: Joi.boolean(), }); @@ -2940,10 +2625,10 @@ class ServiceabilityPlatformModel { return Joi.object({ item_id: Joi.number().required(), size: Joi.string().allow("").required(), - quantity: Joi.number().required(), + quantity: Joi.string().allow("").required(), group_id: Joi.string().allow(""), is_primary_item: Joi.boolean(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), article_assignment: ServiceabilityPlatformModel.ArticleAssignment().required(), ignore_locations: Joi.array().items(Joi.number()).required(), assign_locations: Joi.array().items(Joi.number()).required(), @@ -2951,28 +2636,26 @@ class ServiceabilityPlatformModel { }); } - /** @returns {OptimlLocationsDetailsSchema} */ - static OptimlLocationsDetailsSchema() { + /** @returns {OptimlLocationsRequestSchema} */ + static OptimlLocationsRequestSchema() { return Joi.object({ channel_id: Joi.string().allow("").required(), channel_type: Joi.string().allow("").required(), channel_identifier: Joi.string().allow(""), to_serviceability: ServiceabilityPlatformModel.LocationDetailsServiceability().required(), - articles: Joi.array().items( - ServiceabilityPlatformModel.OptimalLocationsArticles() - ), + article: ServiceabilityPlatformModel.OptimalLocationsArticles(), }); } - /** @returns {OptimalLocationArticlesResult} */ - static OptimalLocationArticlesResult() { + /** @returns {OptimalLocationArticlesResponse} */ + static OptimalLocationArticlesResponse() { return Joi.object({ item_id: Joi.number().required(), size: Joi.string().allow("").required(), quantity: Joi.number().required(), group_id: Joi.string().allow(""), is_primary_item: Joi.boolean(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), article_assignment: ServiceabilityPlatformModel.ArticleAssignment().required(), seller_id: Joi.number(), ignore_locations: Joi.array().items(Joi.number()).required(), @@ -2984,43 +2667,28 @@ class ServiceabilityPlatformModel { }); } - /** @returns {OptimalLocationAssignedStoresResult} */ - static OptimalLocationAssignedStoresResult() { + /** @returns {OptimalLocationAssignedStoresResponse} */ + static OptimalLocationAssignedStoresResponse() { return Joi.object({ store_id: Joi.number().required(), articles: Joi.array() - .items(ServiceabilityPlatformModel.OptimalLocationArticlesResult()) + .items(ServiceabilityPlatformModel.OptimalLocationArticlesResponse()) .required(), }); } - /** @returns {OptimalLocationsResult} */ - static OptimalLocationsResult() { + /** @returns {OptimalLocationsResponse} */ + static OptimalLocationsResponse() { return Joi.object({ assigned_stores: Joi.array() .items( - ServiceabilityPlatformModel.OptimalLocationAssignedStoresResult() + ServiceabilityPlatformModel.OptimalLocationAssignedStoresResponse() ) .required(), faulty_articles: Joi.array().items( - ServiceabilityPlatformModel.ErrorResult() + ServiceabilityPlatformModel.ErrorResponse() ), }); } - - /** @returns {ValidationError} */ - static ValidationError() { - return Joi.object({ - message: Joi.string().allow("").required(), - field: Joi.string().allow("").required(), - }); - } - - /** @returns {StandardError} */ - static StandardError() { - return Joi.object({ - message: Joi.string().allow("").required(), - }); - } } module.exports = ServiceabilityPlatformModel; diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts b/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts index b56b0f367..fd12cf09a 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +++ b/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts @@ -1,19 +1,19 @@ export = ServiceabilityPlatformValidator; /** * @typedef BulkServiceabilityParam - * @property {string} extensionId - Unique Identifier of courier partner extension. - * @property {string} schemeId - Unique identifier of courier partner scheme. - * @property {ServiceabilityPlatformModel.BulkRegionJobDetails} body + * @property {string} extensionId - Unique Identifier of CP Extension + * @property {string} schemeId - Unique identifier of a scheme + * @property {ServiceabilityPlatformModel.BulkRegionJobSerializer} body */ /** * @typedef BulkTatParam - * @property {string} extensionId - Unique Identifier of courier partner extension. - * @property {string} schemeId - Unique identifier of courier partner scheme. - * @property {ServiceabilityPlatformModel.BulkRegionJobDetails} body + * @property {string} extensionId - Unique Identifier of CP Extension + * @property {string} schemeId - Unique identifier of a scheme + * @property {ServiceabilityPlatformModel.BulkRegionJobSerializer} body */ /** * @typedef CreateCourierPartnerAccountParam - * @property {ServiceabilityPlatformModel.CourierAccountDetailsBody} body + * @property {ServiceabilityPlatformModel.CourierAccountRequestBody} body */ /** * @typedef CreatePackageMaterialParam @@ -30,8 +30,8 @@ export = ServiceabilityPlatformValidator; /** @typedef GetAllStoresParam */ /** * @typedef GetBulkServiceabilityParam - * @property {string} extensionId - Unique Identifier of courier partner extension. - * @property {string} schemeId - Unique identifier of courier partner scheme. + * @property {string} extensionId - Unique Identifier of CP Extension + * @property {string} schemeId - Unique identifier of a scheme * @property {number} [pageNo] - Index of the item to start returning with * @property {number} [pageSize] - Determines the items to be displayed in a page * @property {string} [batchId] - Unique identifier of bulk job @@ -44,8 +44,8 @@ export = ServiceabilityPlatformValidator; */ /** * @typedef GetBulkTatParam - * @property {string} extensionId - Unique Identifier of courier partner extension. - * @property {string} schemeId - Unique identifier of courier partner scheme. + * @property {string} extensionId - Unique Identifier of CP Extension + * @property {string} schemeId - Unique identifier of a scheme * @property {number} [pageNo] - Index of the item to start returning with * @property {number} [pageSize] - Determines the items to be displayed in a page * @property {string} [batchId] - Unique identifier of bulk job @@ -59,7 +59,7 @@ export = ServiceabilityPlatformValidator; /** @typedef GetCompanyConfigurationParam */ /** * @typedef GetCourierPartnerAccountParam - * @property {string} accountId - Unique ID of courier partner account + * @property {string} accountId - Unique ID of courier account */ /** * @typedef GetCourierPartnerAccountsParam @@ -71,7 +71,7 @@ export = ServiceabilityPlatformValidator; */ /** * @typedef GetOptimalLocationsParam - * @property {ServiceabilityPlatformModel.OptimlLocationsDetailsSchema} body + * @property {ServiceabilityPlatformModel.OptimlLocationsRequestSchema} body */ /** * @typedef GetPackageMaterialListParam @@ -94,12 +94,13 @@ export = ServiceabilityPlatformValidator; */ /** * @typedef GetPackageMaterialsParam - * @property {string} packageMaterialId - Unique identifier for a Package. Material + * @property {string} packageMaterialId - A `package_material_id` is a unique + * identifier for a Package Material */ /** * @typedef GetServiceabilityParam - * @property {string} extensionId - Unique Identifier of courier partner extension. - * @property {string} schemeId - Unique identifier of courier partner scheme. + * @property {string} extensionId - Unique Identifier of CP Extension + * @property {string} schemeId - Unique identifier of a scheme * @property {string} regionId - Unique identifier of a region */ /** @@ -125,8 +126,8 @@ export = ServiceabilityPlatformValidator; */ /** * @typedef UpdateCourierPartnerAccountParam - * @property {string} accountId - Unique ID of courier partner account - * @property {ServiceabilityPlatformModel.CourierAccountUpdateDetails} body + * @property {string} accountId - Unique ID of courier account + * @property {ServiceabilityPlatformModel.CourierAccount} body */ /** * @typedef UpdatePackageMaterialRuleParam @@ -136,13 +137,14 @@ export = ServiceabilityPlatformValidator; */ /** * @typedef UpdatePackageMaterialsParam - * @property {string} packageMaterialId - Unique identifier for a Package. Material + * @property {string} packageMaterialId - A `package_material_id` is a unique + * identifier for a Package Material * @property {ServiceabilityPlatformModel.PackageMaterial} body */ /** * @typedef UpdateServiceabilityParam - * @property {string} extensionId - Unique Identifier of courier partner extension. - * @property {string} schemeId - Unique identifier of courier partner scheme. + * @property {string} extensionId - Unique Identifier of CP Extension + * @property {string} schemeId - Unique identifier of a scheme * @property {string} regionId - Unique identifier of a region * @property {ServiceabilityPlatformModel.ServiceabilityModel} body */ @@ -210,28 +212,28 @@ declare namespace ServiceabilityPlatformValidator { } type BulkServiceabilityParam = { /** - * - Unique Identifier of courier partner extension. + * - Unique Identifier of CP Extension */ extensionId: string; /** - * - Unique identifier of courier partner scheme. + * - Unique identifier of a scheme */ schemeId: string; - body: ServiceabilityPlatformModel.BulkRegionJobDetails; + body: ServiceabilityPlatformModel.BulkRegionJobSerializer; }; type BulkTatParam = { /** - * - Unique Identifier of courier partner extension. + * - Unique Identifier of CP Extension */ extensionId: string; /** - * - Unique identifier of courier partner scheme. + * - Unique identifier of a scheme */ schemeId: string; - body: ServiceabilityPlatformModel.BulkRegionJobDetails; + body: ServiceabilityPlatformModel.BulkRegionJobSerializer; }; type CreateCourierPartnerAccountParam = { - body: ServiceabilityPlatformModel.CourierAccountDetailsBody; + body: ServiceabilityPlatformModel.CourierAccountRequestBody; }; type CreatePackageMaterialParam = { body: ServiceabilityPlatformModel.PackageMaterial; @@ -244,11 +246,11 @@ type CreateZoneParam = { }; type GetBulkServiceabilityParam = { /** - * - Unique Identifier of courier partner extension. + * - Unique Identifier of CP Extension */ extensionId: string; /** - * - Unique identifier of courier partner scheme. + * - Unique identifier of a scheme */ schemeId: string; /** @@ -290,11 +292,11 @@ type GetBulkServiceabilityParam = { }; type GetBulkTatParam = { /** - * - Unique Identifier of courier partner extension. + * - Unique Identifier of CP Extension */ extensionId: string; /** - * - Unique identifier of courier partner scheme. + * - Unique identifier of a scheme */ schemeId: string; /** @@ -336,7 +338,7 @@ type GetBulkTatParam = { }; type GetCourierPartnerAccountParam = { /** - * - Unique ID of courier partner account + * - Unique ID of courier account */ accountId: string; }; @@ -363,7 +365,7 @@ type GetCourierPartnerAccountsParam = { transportType?: string; }; type GetOptimalLocationsParam = { - body: ServiceabilityPlatformModel.OptimlLocationsDetailsSchema; + body: ServiceabilityPlatformModel.OptimlLocationsRequestSchema; }; type GetPackageMaterialListParam = { /** @@ -410,17 +412,18 @@ type GetPackageMaterialRulesParam = { }; type GetPackageMaterialsParam = { /** - * - Unique identifier for a Package. Material + * - A `package_material_id` is a unique + * identifier for a Package Material */ packageMaterialId: string; }; type GetServiceabilityParam = { /** - * - Unique Identifier of courier partner extension. + * - Unique Identifier of CP Extension */ extensionId: string; /** - * - Unique identifier of courier partner scheme. + * - Unique identifier of a scheme */ schemeId: string; /** @@ -481,10 +484,10 @@ type UpdateCompanyConfigurationParam = { }; type UpdateCourierPartnerAccountParam = { /** - * - Unique ID of courier partner account + * - Unique ID of courier account */ accountId: string; - body: ServiceabilityPlatformModel.CourierAccountUpdateDetails; + body: ServiceabilityPlatformModel.CourierAccount; }; type UpdatePackageMaterialRuleParam = { /** @@ -496,18 +499,19 @@ type UpdatePackageMaterialRuleParam = { }; type UpdatePackageMaterialsParam = { /** - * - Unique identifier for a Package. Material + * - A `package_material_id` is a unique + * identifier for a Package Material */ packageMaterialId: string; body: ServiceabilityPlatformModel.PackageMaterial; }; type UpdateServiceabilityParam = { /** - * - Unique Identifier of courier partner extension. + * - Unique Identifier of CP Extension */ extensionId: string; /** - * - Unique identifier of courier partner scheme. + * - Unique identifier of a scheme */ schemeId: string; /** diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js b/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js index dcdceb86c..96bcb44e0 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +++ b/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js @@ -4,21 +4,21 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); /** * @typedef BulkServiceabilityParam - * @property {string} extensionId - Unique Identifier of courier partner extension. - * @property {string} schemeId - Unique identifier of courier partner scheme. - * @property {ServiceabilityPlatformModel.BulkRegionJobDetails} body + * @property {string} extensionId - Unique Identifier of CP Extension + * @property {string} schemeId - Unique identifier of a scheme + * @property {ServiceabilityPlatformModel.BulkRegionJobSerializer} body */ /** * @typedef BulkTatParam - * @property {string} extensionId - Unique Identifier of courier partner extension. - * @property {string} schemeId - Unique identifier of courier partner scheme. - * @property {ServiceabilityPlatformModel.BulkRegionJobDetails} body + * @property {string} extensionId - Unique Identifier of CP Extension + * @property {string} schemeId - Unique identifier of a scheme + * @property {ServiceabilityPlatformModel.BulkRegionJobSerializer} body */ /** * @typedef CreateCourierPartnerAccountParam - * @property {ServiceabilityPlatformModel.CourierAccountDetailsBody} body + * @property {ServiceabilityPlatformModel.CourierAccountRequestBody} body */ /** @@ -40,8 +40,8 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); /** * @typedef GetBulkServiceabilityParam - * @property {string} extensionId - Unique Identifier of courier partner extension. - * @property {string} schemeId - Unique identifier of courier partner scheme. + * @property {string} extensionId - Unique Identifier of CP Extension + * @property {string} schemeId - Unique identifier of a scheme * @property {number} [pageNo] - Index of the item to start returning with * @property {number} [pageSize] - Determines the items to be displayed in a page * @property {string} [batchId] - Unique identifier of bulk job @@ -55,8 +55,8 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); /** * @typedef GetBulkTatParam - * @property {string} extensionId - Unique Identifier of courier partner extension. - * @property {string} schemeId - Unique identifier of courier partner scheme. + * @property {string} extensionId - Unique Identifier of CP Extension + * @property {string} schemeId - Unique identifier of a scheme * @property {number} [pageNo] - Index of the item to start returning with * @property {number} [pageSize] - Determines the items to be displayed in a page * @property {string} [batchId] - Unique identifier of bulk job @@ -72,7 +72,7 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); /** * @typedef GetCourierPartnerAccountParam - * @property {string} accountId - Unique ID of courier partner account + * @property {string} accountId - Unique ID of courier account */ /** @@ -86,7 +86,7 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); /** * @typedef GetOptimalLocationsParam - * @property {ServiceabilityPlatformModel.OptimlLocationsDetailsSchema} body + * @property {ServiceabilityPlatformModel.OptimlLocationsRequestSchema} body */ /** @@ -113,13 +113,14 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); /** * @typedef GetPackageMaterialsParam - * @property {string} packageMaterialId - Unique identifier for a Package. Material + * @property {string} packageMaterialId - A `package_material_id` is a unique + * identifier for a Package Material */ /** * @typedef GetServiceabilityParam - * @property {string} extensionId - Unique Identifier of courier partner extension. - * @property {string} schemeId - Unique identifier of courier partner scheme. + * @property {string} extensionId - Unique Identifier of CP Extension + * @property {string} schemeId - Unique identifier of a scheme * @property {string} regionId - Unique identifier of a region */ @@ -149,8 +150,8 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); /** * @typedef UpdateCourierPartnerAccountParam - * @property {string} accountId - Unique ID of courier partner account - * @property {ServiceabilityPlatformModel.CourierAccountUpdateDetails} body + * @property {string} accountId - Unique ID of courier account + * @property {ServiceabilityPlatformModel.CourierAccount} body */ /** @@ -162,14 +163,15 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); /** * @typedef UpdatePackageMaterialsParam - * @property {string} packageMaterialId - Unique identifier for a Package. Material + * @property {string} packageMaterialId - A `package_material_id` is a unique + * identifier for a Package Material * @property {ServiceabilityPlatformModel.PackageMaterial} body */ /** * @typedef UpdateServiceabilityParam - * @property {string} extensionId - Unique Identifier of courier partner extension. - * @property {string} schemeId - Unique identifier of courier partner scheme. + * @property {string} extensionId - Unique Identifier of CP Extension + * @property {string} schemeId - Unique identifier of a scheme * @property {string} regionId - Unique identifier of a region * @property {ServiceabilityPlatformModel.ServiceabilityModel} body */ @@ -186,7 +188,7 @@ class ServiceabilityPlatformValidator { return Joi.object({ extensionId: Joi.string().allow("").required(), schemeId: Joi.string().allow("").required(), - body: ServiceabilityPlatformModel.BulkRegionJobDetails().required(), + body: ServiceabilityPlatformModel.BulkRegionJobSerializer().required(), }).required(); } @@ -195,14 +197,14 @@ class ServiceabilityPlatformValidator { return Joi.object({ extensionId: Joi.string().allow("").required(), schemeId: Joi.string().allow("").required(), - body: ServiceabilityPlatformModel.BulkRegionJobDetails().required(), + body: ServiceabilityPlatformModel.BulkRegionJobSerializer().required(), }).required(); } /** @returns {CreateCourierPartnerAccountParam} */ static createCourierPartnerAccount() { return Joi.object({ - body: ServiceabilityPlatformModel.CourierAccountDetailsBody().required(), + body: ServiceabilityPlatformModel.CourierAccountRequestBody().required(), }).required(); } @@ -292,7 +294,7 @@ class ServiceabilityPlatformValidator { /** @returns {GetOptimalLocationsParam} */ static getOptimalLocations() { return Joi.object({ - body: ServiceabilityPlatformModel.OptimlLocationsDetailsSchema().required(), + body: ServiceabilityPlatformModel.OptimlLocationsRequestSchema().required(), }).required(); } @@ -373,7 +375,7 @@ class ServiceabilityPlatformValidator { static updateCourierPartnerAccount() { return Joi.object({ accountId: Joi.string().allow("").required(), - body: ServiceabilityPlatformModel.CourierAccountUpdateDetails().required(), + body: ServiceabilityPlatformModel.CourierAccount().required(), }).required(); } diff --git a/sdk/platform/Share/SharePlatformApplicationClient.d.ts b/sdk/platform/Share/SharePlatformApplicationClient.d.ts index 6618d029a..01838bdcf 100644 --- a/sdk/platform/Share/SharePlatformApplicationClient.d.ts +++ b/sdk/platform/Share/SharePlatformApplicationClient.d.ts @@ -29,12 +29,12 @@ declare class Share { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getShortLinkClickStats * @summary: Get short link click statistics * @description: Retrieve statistics and analytics for clicks on a short link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/share/getShortLinkClickStats/). */ - getShortLinkClickStats({ surlId, requestHeaders }?: SharePlatformApplicationValidator.GetShortLinkClickStatsParam, { responseHeaders }?: object): Promise; + getShortLinkClickStats({ surlId, requestHeaders }?: SharePlatformApplicationValidator.GetShortLinkClickStatsParam, { responseHeaders }?: object): Promise; /** * @param {SharePlatformApplicationValidator.GetShortLinksParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/platform/Share/SharePlatformApplicationClient.js b/sdk/platform/Share/SharePlatformApplicationClient.js index 05d684446..0effc2623 100644 --- a/sdk/platform/Share/SharePlatformApplicationClient.js +++ b/sdk/platform/Share/SharePlatformApplicationClient.js @@ -179,7 +179,7 @@ class Share { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getShortLinkClickStats * @summary: Get short link click statistics * @description: Retrieve statistics and analytics for clicks on a short link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/share/getShortLinkClickStats/). @@ -232,7 +232,7 @@ class Share { const { error: res_error, - } = SharePlatformModel.ClickStatsResult().validate(responseData, { + } = SharePlatformModel.ClickStatsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/platform/Share/SharePlatformModel.d.ts b/sdk/platform/Share/SharePlatformModel.d.ts index b8d32d759..412dce4d2 100644 --- a/sdk/platform/Share/SharePlatformModel.d.ts +++ b/sdk/platform/Share/SharePlatformModel.d.ts @@ -1,6 +1,6 @@ export = SharePlatformModel; /** - * @typedef ClickStatsResult + * @typedef ClickStatsResponse * @property {ClickStatsItem[]} click_stats - An array of click statistics for * the short link. */ @@ -55,24 +55,12 @@ export = SharePlatformModel; * @property {Attribution} [attribution] * @property {SocialMediaTags} [social_media_tags] * @property {number} [count] - * @property {shortLinkReqMeta} [meta] - */ -/** - * @typedef shortLinkReqMeta - * @property {boolean} [for_sms] - For_sms flag specifies that the short-link - * will be used in SMS communication and based on TRAI (Indian) guidelines, - * the generated short-link must contain an active SMS HEADER; ex. DLFYND, GOFYND. - * @property {string} [sms_header] - This field is used to override the sms - * header to be used to generate a short-link for SMS communication in - * compliance with TRAI guidelines, this should be used in conjunction with - * for_sms flag set to true. */ /** * @typedef UrlInfo * @property {string} [original] * @property {string} [hash] * @property {string} [short_url] - * @property {string} [alias] */ /** * @typedef ShortLinkRes @@ -119,11 +107,11 @@ export = SharePlatformModel; declare class SharePlatformModel { } declare namespace SharePlatformModel { - export { ClickStatsResult, ClickStatsItem, RedirectDevice, WebRedirect, Redirects, CampaignShortLink, Attribution, SocialMediaTags, ShortLinkReq, shortLinkReqMeta, UrlInfo, ShortLinkRes, Page, ShortLinkList, ErrorRes }; + export { ClickStatsResponse, ClickStatsItem, RedirectDevice, WebRedirect, Redirects, CampaignShortLink, Attribution, SocialMediaTags, ShortLinkReq, UrlInfo, ShortLinkRes, Page, ShortLinkList, ErrorRes }; } -/** @returns {ClickStatsResult} */ -declare function ClickStatsResult(): ClickStatsResult; -type ClickStatsResult = { +/** @returns {ClickStatsResponse} */ +declare function ClickStatsResponse(): ClickStatsResponse; +type ClickStatsResponse = { /** * - An array of click statistics for * the short link. @@ -204,24 +192,6 @@ type ShortLinkReq = { attribution?: Attribution; social_media_tags?: SocialMediaTags; count?: number; - meta?: shortLinkReqMeta; -}; -/** @returns {shortLinkReqMeta} */ -declare function shortLinkReqMeta(): shortLinkReqMeta; -type shortLinkReqMeta = { - /** - * - For_sms flag specifies that the short-link - * will be used in SMS communication and based on TRAI (Indian) guidelines, - * the generated short-link must contain an active SMS HEADER; ex. DLFYND, GOFYND. - */ - for_sms?: boolean; - /** - * - This field is used to override the sms - * header to be used to generate a short-link for SMS communication in - * compliance with TRAI guidelines, this should be used in conjunction with - * for_sms flag set to true. - */ - sms_header?: string; }; /** @returns {UrlInfo} */ declare function UrlInfo(): UrlInfo; @@ -229,7 +199,6 @@ type UrlInfo = { original?: string; hash?: string; short_url?: string; - alias?: string; }; /** @returns {ShortLinkRes} */ declare function ShortLinkRes(): ShortLinkRes; diff --git a/sdk/platform/Share/SharePlatformModel.js b/sdk/platform/Share/SharePlatformModel.js index 96fba2b68..34f6acb96 100644 --- a/sdk/platform/Share/SharePlatformModel.js +++ b/sdk/platform/Share/SharePlatformModel.js @@ -1,7 +1,7 @@ const Joi = require("joi"); /** - * @typedef ClickStatsResult + * @typedef ClickStatsResponse * @property {ClickStatsItem[]} click_stats - An array of click statistics for * the short link. */ @@ -64,18 +64,6 @@ const Joi = require("joi"); * @property {Attribution} [attribution] * @property {SocialMediaTags} [social_media_tags] * @property {number} [count] - * @property {shortLinkReqMeta} [meta] - */ - -/** - * @typedef shortLinkReqMeta - * @property {boolean} [for_sms] - For_sms flag specifies that the short-link - * will be used in SMS communication and based on TRAI (Indian) guidelines, - * the generated short-link must contain an active SMS HEADER; ex. DLFYND, GOFYND. - * @property {string} [sms_header] - This field is used to override the sms - * header to be used to generate a short-link for SMS communication in - * compliance with TRAI guidelines, this should be used in conjunction with - * for_sms flag set to true. */ /** @@ -83,7 +71,6 @@ const Joi = require("joi"); * @property {string} [original] * @property {string} [hash] * @property {string} [short_url] - * @property {string} [alias] */ /** @@ -133,8 +120,8 @@ const Joi = require("joi"); */ class SharePlatformModel { - /** @returns {ClickStatsResult} */ - static ClickStatsResult() { + /** @returns {ClickStatsResponse} */ + static ClickStatsResponse() { return Joi.object({ click_stats: Joi.array() .items(SharePlatformModel.ClickStatsItem()) @@ -215,15 +202,6 @@ class SharePlatformModel { attribution: SharePlatformModel.Attribution(), social_media_tags: SharePlatformModel.SocialMediaTags(), count: Joi.number(), - meta: SharePlatformModel.shortLinkReqMeta(), - }); - } - - /** @returns {shortLinkReqMeta} */ - static shortLinkReqMeta() { - return Joi.object({ - for_sms: Joi.boolean(), - sms_header: Joi.string().allow(""), }); } @@ -233,7 +211,6 @@ class SharePlatformModel { original: Joi.string().allow(""), hash: Joi.string().allow(""), short_url: Joi.string().allow(""), - alias: Joi.string().allow(""), }); } @@ -252,7 +229,7 @@ class SharePlatformModel { application: Joi.string().allow(""), user_id: Joi.string().allow(""), created_at: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), updated_at: Joi.string().allow(""), personalized: Joi.boolean(), campaign: SharePlatformModel.CampaignShortLink(), diff --git a/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts b/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts index 9be112e36..b561e8cc4 100644 --- a/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +++ b/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts @@ -177,12 +177,12 @@ declare class Theme { * @param {ThemePlatformApplicationValidator.IsUpgradableParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name isUpgradable * @summary: Check theme is upgradable * @description: Determine if a public theme is eligible for an upgrade to a new version after any new version released in marketplace. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/isUpgradable/). */ - isUpgradable({ themeId, requestHeaders }?: ThemePlatformApplicationValidator.IsUpgradableParam, { responseHeaders }?: object): Promise; + isUpgradable({ themeId, requestHeaders }?: ThemePlatformApplicationValidator.IsUpgradableParam, { responseHeaders }?: object): Promise; /** * @param {ThemePlatformApplicationValidator.UpdateMultiplePagesParam} arg * - Arg object @@ -204,7 +204,7 @@ declare class Theme { * @summary: Update a page * @description: Modify and update the content of a page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updatePage/). */ - updatePage({ themeId, pageValue, socketId, body, requestHeaders }?: ThemePlatformApplicationValidator.UpdatePageParam, { responseHeaders }?: object): Promise; + updatePage({ themeId, pageValue, body, requestHeaders }?: ThemePlatformApplicationValidator.UpdatePageParam, { responseHeaders }?: object): Promise; /** * @param {ThemePlatformApplicationValidator.UpdateThemeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/platform/Theme/ThemePlatformApplicationClient.js b/sdk/platform/Theme/ThemePlatformApplicationClient.js index c1321cdfe..c98c827a5 100644 --- a/sdk/platform/Theme/ThemePlatformApplicationClient.js +++ b/sdk/platform/Theme/ThemePlatformApplicationClient.js @@ -1260,7 +1260,7 @@ class Theme { * @param {ThemePlatformApplicationValidator.IsUpgradableParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name isUpgradable * @summary: Check theme is upgradable * @description: Determine if a public theme is eligible for an upgrade to a new version after any new version released in marketplace. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/isUpgradable/). @@ -1314,7 +1314,7 @@ class Theme { const { error: res_error, - } = ThemePlatformModel.ThemeUpgradable().validate(responseData, { + } = ThemePlatformModel.ThemeUpgradableResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1426,16 +1426,13 @@ class Theme { * @description: Modify and update the content of a page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/updatePage/). */ async updatePage( - { themeId, pageValue, socketId, body, requestHeaders } = { - requestHeaders: {}, - }, + { themeId, pageValue, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error } = ThemePlatformApplicationValidator.updatePage().validate( { themeId, pageValue, - socketId, body, }, { abortEarly: false, allowUnknown: true } @@ -1451,7 +1448,6 @@ class Theme { { themeId, pageValue, - socketId, body, }, { abortEarly: false, allowUnknown: false } @@ -1468,7 +1464,7 @@ class Theme { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}/${socketId}`, + `/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`, query_params, body, requestHeaders, diff --git a/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts b/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts index 56012b56d..ad156f368 100644 --- a/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +++ b/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts @@ -68,7 +68,6 @@ export = ThemePlatformApplicationValidator; * @typedef UpdatePageParam * @property {string} themeId - ID of the theme * @property {string} pageValue - Value of the page to be updated - * @property {string} socketId - Unique socket id for websocket * @property {ThemePlatformModel.AvailablePageSchema} body */ /** @@ -238,10 +237,6 @@ type UpdatePageParam = { * - Value of the page to be updated */ pageValue: string; - /** - * - Unique socket id for websocket - */ - socketId: string; body: ThemePlatformModel.AvailablePageSchema; }; type UpdateThemeParam = { diff --git a/sdk/platform/Theme/ThemePlatformApplicationValidator.js b/sdk/platform/Theme/ThemePlatformApplicationValidator.js index 23730fb15..10295ee87 100644 --- a/sdk/platform/Theme/ThemePlatformApplicationValidator.js +++ b/sdk/platform/Theme/ThemePlatformApplicationValidator.js @@ -89,7 +89,6 @@ const ThemePlatformModel = require("./ThemePlatformModel"); * @typedef UpdatePageParam * @property {string} themeId - ID of the theme * @property {string} pageValue - Value of the page to be updated - * @property {string} socketId - Unique socket id for websocket * @property {ThemePlatformModel.AvailablePageSchema} body */ @@ -239,7 +238,6 @@ class ThemePlatformApplicationValidator { return Joi.object({ themeId: Joi.string().allow("").required(), pageValue: Joi.string().allow("").required(), - socketId: Joi.string().allow("").required(), body: ThemePlatformModel.AvailablePageSchema().required(), }).required(); } diff --git a/sdk/platform/Theme/ThemePlatformModel.d.ts b/sdk/platform/Theme/ThemePlatformModel.d.ts index 91c922fc6..216242055 100644 --- a/sdk/platform/Theme/ThemePlatformModel.d.ts +++ b/sdk/platform/Theme/ThemePlatformModel.d.ts @@ -135,15 +135,7 @@ export = ThemePlatformModel; * @property {Object[]} [blocks] * @property {Object} [preset] * @property {AvailablePagePredicate} [predicate] - * @property {SectionSource} [__source] - */ -/** - * @typedef SectionSource - * @property {string} [id] - The source id specifying the source of the section. - * @property {string} [bundle_name] - This is the extension binding name - * containing this section. - * @property {string} [type] - This is source type. It will either be - * themeBundle or extension. + * @property {string} [source] */ /** * @typedef AvailablePagePredicate @@ -245,7 +237,7 @@ export = ThemePlatformModel; * @property {string} [src] */ /** - * @typedef ThemeUpgradable + * @typedef ThemeUpgradableResponse * @property {boolean} [upgrade] - Indicates if the theme is upgradable or not * @property {ThemeVersions} [versions] * @property {string} [message] - A message describing the theme upgrade status @@ -517,7 +509,7 @@ export = ThemePlatformModel; * @property {string} [applied_theme] - The version of the applied theme */ /** - * @typedef DummyTheme + * @typedef DummyResponse * @property {string} [message] */ /** @@ -598,7 +590,7 @@ export = ThemePlatformModel; declare class ThemePlatformModel { } declare namespace ThemePlatformModel { - export { GetExtensionSectionRes, ExtensionSection, PropExtension, AssetsExtension, ThemeReq, CompanyThemeSchema, MarketplaceThemeId, CompanyThemeMeta, ThemePayment, ThemeImages, AvailablePageSchema, AvailablePageSectionMetaAttributes, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, Action, AvailablePageSeo, AvailablePageSchemaSections, SectionSource, AvailablePagePredicate, AvailablePageScreenPredicate, AvailablePageUserPredicate, AvailablePageRoutePredicate, AvailablePagePlatformPredicate, AvailablePageSchedulePredicate, AllAvailablePageSchema, AddThemeRequestSchema, FontsSchema, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, FontsSchemaItems, FontsSchemaItemsFiles, ThemesSchema, ThemeUpgradable, UpdateThemeNameRequestBody, UpdateThemeRequestBody, Font, FontVariants, FontVariant, Config, ThemeConfiguration, OverlayPopup, DividerStrokeHighlight, UserAlerts, OrderTracking, ThemeConfigListPage, ThemeConfigListPageSettingsProps, CustomConfig, ThemeMeta, Release, Images, CustomProps, GlobalSchema, Prop, Assets, UMDJs, CommonJS, CSS, SectionItem, Preset, Page, Section, Block, Predicate, Screen, ThemeUserSchema, Route, SectionProps, SectionPreset, BlockProps, TextProp, CheckboxProp, RangeProp, ImagePickerProp, UrlProp, ThemeVersions, DummyTheme, AppliedThemes, CompanyPrivateTheme, ActionPage, PageType }; + export { GetExtensionSectionRes, ExtensionSection, PropExtension, AssetsExtension, ThemeReq, CompanyThemeSchema, MarketplaceThemeId, CompanyThemeMeta, ThemePayment, ThemeImages, AvailablePageSchema, AvailablePageSectionMetaAttributes, SEOMetaItem, SEOMetaItems, SEOSitemap, SEObreadcrumb, Action, AvailablePageSeo, AvailablePageSchemaSections, AvailablePagePredicate, AvailablePageScreenPredicate, AvailablePageUserPredicate, AvailablePageRoutePredicate, AvailablePagePlatformPredicate, AvailablePageSchedulePredicate, AllAvailablePageSchema, AddThemeRequestSchema, FontsSchema, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, FontsSchemaItems, FontsSchemaItemsFiles, ThemesSchema, ThemeUpgradableResponse, UpdateThemeNameRequestBody, UpdateThemeRequestBody, Font, FontVariants, FontVariant, Config, ThemeConfiguration, OverlayPopup, DividerStrokeHighlight, UserAlerts, OrderTracking, ThemeConfigListPage, ThemeConfigListPageSettingsProps, CustomConfig, ThemeMeta, Release, Images, CustomProps, GlobalSchema, Prop, Assets, UMDJs, CommonJS, CSS, SectionItem, Preset, Page, Section, Block, Predicate, Screen, ThemeUserSchema, Route, SectionProps, SectionPreset, BlockProps, TextProp, CheckboxProp, RangeProp, ImagePickerProp, UrlProp, ThemeVersions, DummyResponse, AppliedThemes, CompanyPrivateTheme, ActionPage, PageType }; } /** @returns {GetExtensionSectionRes} */ declare function GetExtensionSectionRes(): GetExtensionSectionRes; @@ -815,25 +807,7 @@ type AvailablePageSchemaSections = { blocks?: any[]; preset?: any; predicate?: AvailablePagePredicate; - __source?: SectionSource; -}; -/** @returns {SectionSource} */ -declare function SectionSource(): SectionSource; -type SectionSource = { - /** - * - The source id specifying the source of the section. - */ - id?: string; - /** - * - This is the extension binding name - * containing this section. - */ - bundle_name?: string; - /** - * - This is source type. It will either be - * themeBundle or extension. - */ - type?: string; + source?: string; }; /** @returns {AvailablePagePredicate} */ declare function AvailablePagePredicate(): AvailablePagePredicate; @@ -1002,9 +976,9 @@ type ThemesSchema = { company_id?: number; src?: string; }; -/** @returns {ThemeUpgradable} */ -declare function ThemeUpgradable(): ThemeUpgradable; -type ThemeUpgradable = { +/** @returns {ThemeUpgradableResponse} */ +declare function ThemeUpgradableResponse(): ThemeUpgradableResponse; +type ThemeUpgradableResponse = { /** * - Indicates if the theme is upgradable or not */ @@ -1563,9 +1537,9 @@ type ThemeVersions = { */ applied_theme?: string; }; -/** @returns {DummyTheme} */ -declare function DummyTheme(): DummyTheme; -type DummyTheme = { +/** @returns {DummyResponse} */ +declare function DummyResponse(): DummyResponse; +type DummyResponse = { message?: string; }; /** @returns {AppliedThemes} */ diff --git a/sdk/platform/Theme/ThemePlatformModel.js b/sdk/platform/Theme/ThemePlatformModel.js index 92453a4d6..9558dffdf 100644 --- a/sdk/platform/Theme/ThemePlatformModel.js +++ b/sdk/platform/Theme/ThemePlatformModel.js @@ -154,16 +154,7 @@ const Joi = require("joi"); * @property {Object[]} [blocks] * @property {Object} [preset] * @property {AvailablePagePredicate} [predicate] - * @property {SectionSource} [__source] - */ - -/** - * @typedef SectionSource - * @property {string} [id] - The source id specifying the source of the section. - * @property {string} [bundle_name] - This is the extension binding name - * containing this section. - * @property {string} [type] - This is source type. It will either be - * themeBundle or extension. + * @property {string} [source] */ /** @@ -280,7 +271,7 @@ const Joi = require("joi"); */ /** - * @typedef ThemeUpgradable + * @typedef ThemeUpgradableResponse * @property {boolean} [upgrade] - Indicates if the theme is upgradable or not * @property {ThemeVersions} [versions] * @property {string} [message] - A message describing the theme upgrade status @@ -595,7 +586,7 @@ const Joi = require("joi"); */ /** - * @typedef DummyTheme + * @typedef DummyResponse * @property {string} [message] */ @@ -806,7 +797,7 @@ class ThemePlatformModel { /** @returns {AvailablePageSectionMetaAttributes} */ static AvailablePageSectionMetaAttributes() { return Joi.object({ - attributes: Joi.object().pattern(/\S/, Joi.any()), + attributes: Joi.any(), }); } @@ -868,20 +859,11 @@ class ThemePlatformModel { return Joi.object({ name: Joi.string().allow(""), label: Joi.string().allow(""), - props: Joi.object().pattern(/\S/, Joi.any()), + props: Joi.any(), blocks: Joi.array().items(Joi.any()), - preset: Joi.object().pattern(/\S/, Joi.any()), + preset: Joi.any(), predicate: ThemePlatformModel.AvailablePagePredicate(), - __source: ThemePlatformModel.SectionSource(), - }); - } - - /** @returns {SectionSource} */ - static SectionSource() { - return Joi.object({ - id: Joi.string().allow(""), - bundle_name: Joi.string().allow(""), - type: Joi.string().allow(""), + source: Joi.string().allow(""), }); } @@ -919,7 +901,7 @@ class ThemePlatformModel { return Joi.object({ selected: Joi.string().allow(""), exact_url: Joi.string().allow(""), - query: Joi.object().pattern(/\S/, Joi.any()), + query: Joi.any(), }); } @@ -1015,7 +997,7 @@ class ThemePlatformModel { name: Joi.string().allow(""), template_theme_id: Joi.string().allow(""), version: Joi.string().allow(""), - styles: Joi.object().pattern(/\S/, Joi.any()), + styles: Joi.any(), created_at: Joi.string().allow(""), updated_at: Joi.string().allow(""), assets: ThemePlatformModel.Assets(), @@ -1026,8 +1008,8 @@ class ThemePlatformModel { }); } - /** @returns {ThemeUpgradable} */ - static ThemeUpgradable() { + /** @returns {ThemeUpgradableResponse} */ + static ThemeUpgradableResponse() { return Joi.object({ upgrade: Joi.boolean(), versions: ThemePlatformModel.ThemeVersions(), @@ -1093,7 +1075,7 @@ class ThemePlatformModel { static ThemeConfiguration() { return Joi.object({ name: Joi.string().allow(""), - global_config: Joi.object().pattern(/\S/, Joi.any()), + global_config: Joi.any(), page: Joi.array().items(ThemePlatformModel.ThemeConfigListPage()), }); } @@ -1145,7 +1127,7 @@ class ThemePlatformModel { /** @returns {ThemeConfigListPageSettingsProps} */ static ThemeConfigListPageSettingsProps() { return Joi.object({ - props: Joi.object().pattern(/\S/, Joi.any()), + props: Joi.any(), }); } @@ -1424,8 +1406,8 @@ class ThemePlatformModel { }); } - /** @returns {DummyTheme} */ - static DummyTheme() { + /** @returns {DummyResponse} */ + static DummyResponse() { return Joi.object({ message: Joi.string().allow(""), }); diff --git a/sdk/platform/User/UserPlatformApplicationClient.d.ts b/sdk/platform/User/UserPlatformApplicationClient.d.ts index 7b6a77fd5..310e00c23 100644 --- a/sdk/platform/User/UserPlatformApplicationClient.d.ts +++ b/sdk/platform/User/UserPlatformApplicationClient.d.ts @@ -39,13 +39,13 @@ declare class User { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name createUserAttributeDefinition * @summary: Create a User Attribute Definition * @description: Create a new User Attribute Definition - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/createUserAttributeDefinition/). */ - createUserAttributeDefinition({ body, requestHeaders }?: UserPlatformApplicationValidator.CreateUserAttributeDefinitionParam, { responseHeaders }?: object): Promise; + createUserAttributeDefinition({ body, requestHeaders }?: UserPlatformApplicationValidator.CreateUserAttributeDefinitionParam, { responseHeaders }?: object): Promise; /** * @param {UserPlatformApplicationValidator.CreateUserGroupParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -95,24 +95,24 @@ declare class User { * @param {UserPlatformApplicationValidator.DeleteUserAttributeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteUserAttribute * @summary: Delete User Attribute * @description: Delete User Attribute - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/deleteUserAttribute/). */ - deleteUserAttribute({ attributeDefId, userId, requestHeaders }?: UserPlatformApplicationValidator.DeleteUserAttributeParam, { responseHeaders }?: object): Promise; + deleteUserAttribute({ attributeDefId, userId, requestHeaders }?: UserPlatformApplicationValidator.DeleteUserAttributeParam, { responseHeaders }?: object): Promise; /** * @param {UserPlatformApplicationValidator.DeleteUserAttributeDefinitionByIdParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteUserAttributeDefinitionById * @summary: Delete User Attribute Definition * @description: Delete a user attribute definition by its unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/deleteUserAttributeDefinitionById/). */ - deleteUserAttributeDefinitionById({ attributeDefId, requestHeaders }?: UserPlatformApplicationValidator.DeleteUserAttributeDefinitionByIdParam, { responseHeaders }?: object): Promise; + deleteUserAttributeDefinitionById({ attributeDefId, requestHeaders }?: UserPlatformApplicationValidator.DeleteUserAttributeDefinitionByIdParam, { responseHeaders }?: object): Promise; /** * @param {UserPlatformApplicationValidator.GetActiveSessionsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -147,24 +147,24 @@ declare class User { * @param {UserPlatformApplicationValidator.GetUserAttributeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getUserAttribute * @summary: Get User Attribute * @description: Get User Attribute - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserAttribute/). */ - getUserAttribute({ attributeDefId, userId, requestHeaders }?: UserPlatformApplicationValidator.GetUserAttributeParam, { responseHeaders }?: object): Promise; + getUserAttribute({ attributeDefId, userId, requestHeaders }?: UserPlatformApplicationValidator.GetUserAttributeParam, { responseHeaders }?: object): Promise; /** * @param {UserPlatformApplicationValidator.GetUserAttributeByIdParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getUserAttributeById * @summary: Get User Attribute * @description: Retrieve User Attribute details by ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserAttributeById/). */ - getUserAttributeById({ attributeId, requestHeaders }?: UserPlatformApplicationValidator.GetUserAttributeByIdParam, { responseHeaders }?: object): Promise; + getUserAttributeById({ attributeId, requestHeaders }?: UserPlatformApplicationValidator.GetUserAttributeByIdParam, { responseHeaders }?: object): Promise; /** * @param {UserPlatformApplicationValidator.GetUserAttributeDefinitionByIdParam} arg * - Arg object @@ -268,12 +268,12 @@ declare class User { * @param {UserPlatformApplicationValidator.UpdateUserAttributeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateUserAttribute * @summary: Update Or Create User Attribute * @description: Update Or Create User Attribute - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/updateUserAttribute/). */ - updateUserAttribute({ attributeDefId, userId, body, requestHeaders }?: UserPlatformApplicationValidator.UpdateUserAttributeParam, { responseHeaders }?: object): Promise; + updateUserAttribute({ attributeDefId, userId, body, requestHeaders }?: UserPlatformApplicationValidator.UpdateUserAttributeParam, { responseHeaders }?: object): Promise; /** * @param {UserPlatformApplicationValidator.UpdateUserAttributeDefinitionParam} arg * - Arg object diff --git a/sdk/platform/User/UserPlatformApplicationClient.js b/sdk/platform/User/UserPlatformApplicationClient.js index 0d608da8f..921ea9d15 100644 --- a/sdk/platform/User/UserPlatformApplicationClient.js +++ b/sdk/platform/User/UserPlatformApplicationClient.js @@ -254,7 +254,7 @@ class User { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name createUserAttributeDefinition * @summary: Create a User Attribute Definition @@ -311,7 +311,7 @@ class User { const { error: res_error, - } = UserPlatformModel.UserAttributeDefinitionDetails().validate( + } = UserPlatformModel.UserAttributeDefinitionResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -664,7 +664,7 @@ class User { * @param {UserPlatformApplicationValidator.DeleteUserAttributeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteUserAttribute * @summary: Delete User Attribute * @description: Delete User Attribute - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/deleteUserAttribute/). @@ -716,7 +716,7 @@ class User { const { error: res_error, - } = UserPlatformModel.SuccessMessage().validate(responseData, { + } = UserPlatformModel.SuccessMessageResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -741,7 +741,7 @@ class User { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteUserAttributeDefinitionById * @summary: Delete User Attribute Definition * @description: Delete a user attribute definition by its unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/deleteUserAttributeDefinitionById/). @@ -793,7 +793,7 @@ class User { const { error: res_error, - } = UserPlatformModel.SuccessMessage().validate(responseData, { + } = UserPlatformModel.SuccessMessageResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1055,7 +1055,7 @@ class User { * @param {UserPlatformApplicationValidator.GetUserAttributeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getUserAttribute * @summary: Get User Attribute * @description: Get User Attribute - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserAttribute/). @@ -1107,7 +1107,7 @@ class User { const { error: res_error, - } = UserPlatformModel.UserAttribute().validate(responseData, { + } = UserPlatformModel.UserAttributeResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1132,7 +1132,7 @@ class User { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getUserAttributeById * @summary: Get User Attribute * @description: Retrieve User Attribute details by ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserAttributeById/). @@ -1184,7 +1184,7 @@ class User { const { error: res_error, - } = UserPlatformModel.UserAttribute().validate(responseData, { + } = UserPlatformModel.UserAttributeResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1987,7 +1987,7 @@ class User { * @param {UserPlatformApplicationValidator.UpdateUserAttributeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name updateUserAttribute * @summary: Update Or Create User Attribute * @description: Update Or Create User Attribute - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/updateUserAttribute/). @@ -2049,7 +2049,7 @@ class User { const { error: res_error, - } = UserPlatformModel.UserAttribute().validate(responseData, { + } = UserPlatformModel.UserAttributeResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/platform/User/UserPlatformApplicationValidator.d.ts b/sdk/platform/User/UserPlatformApplicationValidator.d.ts index dc0d80b77..6ec436d2e 100644 --- a/sdk/platform/User/UserPlatformApplicationValidator.d.ts +++ b/sdk/platform/User/UserPlatformApplicationValidator.d.ts @@ -133,7 +133,7 @@ export = UserPlatformApplicationValidator; * @property {string} attributeDefId - The unique identifier of the attribute * definition to update. * @property {string} userId - The unique identifier of the user to update. - * @property {UserPlatformModel.CreateUserAttribute} body + * @property {UserPlatformModel.CreateUserAttributeRequest} body */ /** * @typedef UpdateUserAttributeDefinitionParam @@ -447,7 +447,7 @@ type UpdateUserAttributeParam = { * - The unique identifier of the user to update. */ userId: string; - body: UserPlatformModel.CreateUserAttribute; + body: UserPlatformModel.CreateUserAttributeRequest; }; type UpdateUserAttributeDefinitionParam = { /** diff --git a/sdk/platform/User/UserPlatformApplicationValidator.js b/sdk/platform/User/UserPlatformApplicationValidator.js index fe13e79fc..f3f27c8d4 100644 --- a/sdk/platform/User/UserPlatformApplicationValidator.js +++ b/sdk/platform/User/UserPlatformApplicationValidator.js @@ -160,7 +160,7 @@ const UserPlatformModel = require("./UserPlatformModel"); * @property {string} attributeDefId - The unique identifier of the attribute * definition to update. * @property {string} userId - The unique identifier of the user to update. - * @property {UserPlatformModel.CreateUserAttribute} body + * @property {UserPlatformModel.CreateUserAttributeRequest} body */ /** @@ -383,7 +383,7 @@ class UserPlatformApplicationValidator { attributeDefId: Joi.string().allow("").required(), userId: Joi.string().allow("").required(), - body: UserPlatformModel.CreateUserAttribute().required(), + body: UserPlatformModel.CreateUserAttributeRequest().required(), }).required(); } diff --git a/sdk/platform/User/UserPlatformModel.d.ts b/sdk/platform/User/UserPlatformModel.d.ts index 7d90b7674..f8c3c042c 100644 --- a/sdk/platform/User/UserPlatformModel.d.ts +++ b/sdk/platform/User/UserPlatformModel.d.ts @@ -1,6 +1,6 @@ export = UserPlatformModel; /** - * @typedef SuccessMessage + * @typedef SuccessMessageResponse * @property {string} [success] */ /** @@ -23,7 +23,7 @@ export = UserPlatformModel; * @property {number} [__v] - The version number of the attribute. */ /** - * @typedef UserAttributeDefinitionDetails + * @typedef UserAttributeDefinitionResponse * @property {string} [_id] - The unique identifier for the attribute definition. * @property {string} [name] - The attribute name. * @property {string} [slug] - The attribute key. @@ -49,19 +49,19 @@ export = UserPlatformModel; * @property {Object} [value] - The validation value. */ /** - * @typedef UserAttribute + * @typedef UserAttributeResponse * @property {string} [_id] - The unique identifier for the attribute definition. * @property {string} [name] - The name of user attribute definition. * @property {string} [user_id] - The unique identifier for the user. * @property {string} [application_id] - The application ID. * @property {string} [type] - The attribute type. - * @property {boolean} [customer_overridden] - Whether the attribute is customer-editable. + * @property {boolean} [customer_overriden] - Whether the attribute is customer-editable. * @property {Object} [attribute] * @property {string} [updated_by] */ /** - * @typedef CreateUserAttribute - * @property {boolean} [customer_overridden] + * @typedef CreateUserAttributeRequest + * @property {boolean} [customer_overriden] * @property {Object} [attribute] */ /** @@ -473,11 +473,11 @@ export = UserPlatformModel; declare class UserPlatformModel { } declare namespace UserPlatformModel { - export { SuccessMessage, UserAttributeDefinition, UserAttributeDefinitionDetails, UserAttributeDefinitionValidation, UserAttribute, CreateUserAttribute, CreateUserAttributeDefinition, BlockUserRequestSchema, ArchiveUserRequestSchema, UnDeleteUserRequestSchema, BlockUserSuccess, ArchiveUserSuccess, UnDeleteUserSuccess, UserSearchResponseSchema, CustomerListResponseSchema, PaginationSchema, SessionListResponseSchema, SessionDeleteResponseSchema, SessionsDeleteResponseSchema, APIError, SessionListResponseInfo, Conditions, UserResponseErrorSchema, UserGroupResponseSchema, UserGroupListResponseSchema, ConditionsSchema, CreateUserGroup, CreateUserRequestSchema, CreateUserResponseSchema, CreateUserSessionRequestSchema, CreateUserSessionResponseSchema, PlatformSchema, LookAndFeel, Login, MetaSchema, Social, RequiredFields, PlatformEmail, PlatformMobile, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, FlashCard, SocialTokens, DeleteAccountReasons, DeleteAccountConsent, Facebook, Accountkit, Google, SessionExpiry, UpdateUserGroupSchema, PartialUserGroupUpdateSchema, UserGroupUpdateData, UpdateUserRequestSchema, UserEmails, UserPhoneNumbers, UserSchema, UserSearchSchema, PhoneNumber, Email }; + export { SuccessMessageResponse, UserAttributeDefinition, UserAttributeDefinitionResponse, UserAttributeDefinitionValidation, UserAttributeResponse, CreateUserAttributeRequest, CreateUserAttributeDefinition, BlockUserRequestSchema, ArchiveUserRequestSchema, UnDeleteUserRequestSchema, BlockUserSuccess, ArchiveUserSuccess, UnDeleteUserSuccess, UserSearchResponseSchema, CustomerListResponseSchema, PaginationSchema, SessionListResponseSchema, SessionDeleteResponseSchema, SessionsDeleteResponseSchema, APIError, SessionListResponseInfo, Conditions, UserResponseErrorSchema, UserGroupResponseSchema, UserGroupListResponseSchema, ConditionsSchema, CreateUserGroup, CreateUserRequestSchema, CreateUserResponseSchema, CreateUserSessionRequestSchema, CreateUserSessionResponseSchema, PlatformSchema, LookAndFeel, Login, MetaSchema, Social, RequiredFields, PlatformEmail, PlatformMobile, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, FlashCard, SocialTokens, DeleteAccountReasons, DeleteAccountConsent, Facebook, Accountkit, Google, SessionExpiry, UpdateUserGroupSchema, PartialUserGroupUpdateSchema, UserGroupUpdateData, UpdateUserRequestSchema, UserEmails, UserPhoneNumbers, UserSchema, UserSearchSchema, PhoneNumber, Email }; } -/** @returns {SuccessMessage} */ -declare function SuccessMessage(): SuccessMessage; -type SuccessMessage = { +/** @returns {SuccessMessageResponse} */ +declare function SuccessMessageResponse(): SuccessMessageResponse; +type SuccessMessageResponse = { success?: string; }; /** @returns {UserAttributeDefinition} */ @@ -545,9 +545,9 @@ type UserAttributeDefinition = { */ __v?: number; }; -/** @returns {UserAttributeDefinitionDetails} */ -declare function UserAttributeDefinitionDetails(): UserAttributeDefinitionDetails; -type UserAttributeDefinitionDetails = { +/** @returns {UserAttributeDefinitionResponse} */ +declare function UserAttributeDefinitionResponse(): UserAttributeDefinitionResponse; +type UserAttributeDefinitionResponse = { /** * - The unique identifier for the attribute definition. */ @@ -627,9 +627,9 @@ type UserAttributeDefinitionValidation = { */ value?: any; }; -/** @returns {UserAttribute} */ -declare function UserAttribute(): UserAttribute; -type UserAttribute = { +/** @returns {UserAttributeResponse} */ +declare function UserAttributeResponse(): UserAttributeResponse; +type UserAttributeResponse = { /** * - The unique identifier for the attribute definition. */ @@ -653,14 +653,14 @@ type UserAttribute = { /** * - Whether the attribute is customer-editable. */ - customer_overridden?: boolean; + customer_overriden?: boolean; attribute?: any; updated_by?: string; }; -/** @returns {CreateUserAttribute} */ -declare function CreateUserAttribute(): CreateUserAttribute; -type CreateUserAttribute = { - customer_overridden?: boolean; +/** @returns {CreateUserAttributeRequest} */ +declare function CreateUserAttributeRequest(): CreateUserAttributeRequest; +type CreateUserAttributeRequest = { + customer_overriden?: boolean; attribute?: any; }; /** @returns {CreateUserAttributeDefinition} */ diff --git a/sdk/platform/User/UserPlatformModel.js b/sdk/platform/User/UserPlatformModel.js index 069a9ad06..36012b1b4 100644 --- a/sdk/platform/User/UserPlatformModel.js +++ b/sdk/platform/User/UserPlatformModel.js @@ -1,7 +1,7 @@ const Joi = require("joi"); /** - * @typedef SuccessMessage + * @typedef SuccessMessageResponse * @property {string} [success] */ @@ -26,7 +26,7 @@ const Joi = require("joi"); */ /** - * @typedef UserAttributeDefinitionDetails + * @typedef UserAttributeDefinitionResponse * @property {string} [_id] - The unique identifier for the attribute definition. * @property {string} [name] - The attribute name. * @property {string} [slug] - The attribute key. @@ -54,20 +54,20 @@ const Joi = require("joi"); */ /** - * @typedef UserAttribute + * @typedef UserAttributeResponse * @property {string} [_id] - The unique identifier for the attribute definition. * @property {string} [name] - The name of user attribute definition. * @property {string} [user_id] - The unique identifier for the user. * @property {string} [application_id] - The application ID. * @property {string} [type] - The attribute type. - * @property {boolean} [customer_overridden] - Whether the attribute is customer-editable. + * @property {boolean} [customer_overriden] - Whether the attribute is customer-editable. * @property {Object} [attribute] * @property {string} [updated_by] */ /** - * @typedef CreateUserAttribute - * @property {boolean} [customer_overridden] + * @typedef CreateUserAttributeRequest + * @property {boolean} [customer_overriden] * @property {Object} [attribute] */ @@ -532,8 +532,8 @@ const Joi = require("joi"); */ class UserPlatformModel { - /** @returns {SuccessMessage} */ - static SuccessMessage() { + /** @returns {SuccessMessageResponse} */ + static SuccessMessageResponse() { return Joi.object({ success: Joi.string().allow(""), }); @@ -561,8 +561,8 @@ class UserPlatformModel { }); } - /** @returns {UserAttributeDefinitionDetails} */ - static UserAttributeDefinitionDetails() { + /** @returns {UserAttributeDefinitionResponse} */ + static UserAttributeDefinitionResponse() { return Joi.object({ _id: Joi.string().allow(""), name: Joi.string().allow(""), @@ -594,25 +594,25 @@ class UserPlatformModel { }); } - /** @returns {UserAttribute} */ - static UserAttribute() { + /** @returns {UserAttributeResponse} */ + static UserAttributeResponse() { return Joi.object({ _id: Joi.string().allow(""), name: Joi.string().allow(""), user_id: Joi.string().allow(""), application_id: Joi.string().allow(""), type: Joi.string().allow(""), - customer_overridden: Joi.boolean(), - attribute: Joi.object().pattern(/\S/, Joi.any()), + customer_overriden: Joi.boolean(), + attribute: Joi.any(), updated_by: Joi.string().allow(""), }); } - /** @returns {CreateUserAttribute} */ - static CreateUserAttribute() { + /** @returns {CreateUserAttributeRequest} */ + static CreateUserAttributeRequest() { return Joi.object({ - customer_overridden: Joi.boolean(), - attribute: Joi.object().pattern(/\S/, Joi.any()), + customer_overriden: Joi.boolean(), + attribute: Joi.any(), }); } @@ -736,7 +736,7 @@ class UserPlatformModel { info: Joi.string().allow(""), request_id: Joi.string().allow(""), error: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), authenticated: Joi.boolean(), }); } @@ -828,7 +828,7 @@ class UserPlatformModel { last_name: Joi.string().allow(""), gender: Joi.string().allow(""), username: Joi.string().allow("").required(), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), external_id: Joi.string().allow(""), rr_id: Joi.string().allow(""), }); @@ -1082,7 +1082,7 @@ class UserPlatformModel { gender: Joi.string().allow(""), external_id: Joi.string().allow(""), rr_id: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), phone_numbers: Joi.array().items(UserPlatformModel.UserPhoneNumbers()), emails: Joi.array().items(UserPlatformModel.UserEmails()), }); @@ -1115,7 +1115,7 @@ class UserPlatformModel { application_id: Joi.string().allow(""), user_id: Joi.string().allow(""), first_name: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), last_name: Joi.string().allow(""), phone_numbers: Joi.array().items(UserPlatformModel.PhoneNumber()), emails: Joi.array().items(UserPlatformModel.Email()), @@ -1139,7 +1139,7 @@ class UserPlatformModel { application_id: Joi.string().allow(""), user_id: Joi.string().allow(""), first_name: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), last_name: Joi.string().allow(""), phone_numbers: Joi.array().items(UserPlatformModel.PhoneNumber()), emails: Joi.array().items(UserPlatformModel.Email()), diff --git a/sdk/platform/Webhook/WebhookPlatformClient.d.ts b/sdk/platform/Webhook/WebhookPlatformClient.d.ts index 89fdc911b..767d75f36 100644 --- a/sdk/platform/Webhook/WebhookPlatformClient.d.ts +++ b/sdk/platform/Webhook/WebhookPlatformClient.d.ts @@ -2,26 +2,77 @@ export = Webhook; declare class Webhook { constructor(config: any); config: any; + /** + * @param {WebhookPlatformValidator.CancelJobByNameParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name cancelJobByName + * @summary: Cancel job by name + * @description: It will cancel export job triggerd by user in order to fetch + * historical delivery summery - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/cancelJobByName/). + */ + cancelJobByName({ filename, requestHeaders }?: WebhookPlatformValidator.CancelJobByNameParam, { responseHeaders }?: object): Promise; + /** + * @param {WebhookPlatformValidator.DownloadDeliveryReportParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name downloadDeliveryReport + * @summary: Download delivery report + * @description: Download detailed delivery reports for events. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/downloadDeliveryReport/). + */ + downloadDeliveryReport({ body, requestHeaders }?: WebhookPlatformValidator.DownloadDeliveryReportParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPlatformValidator.FetchAllEventConfigurationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name fetchAllEventConfigurations * @summary: List event configurations * @description: Retrieve all configurations for event handling. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/fetchAllEventConfigurations/). */ - fetchAllEventConfigurations({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + fetchAllEventConfigurations({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {WebhookPlatformValidator.GetDeliveryReportsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getDeliveryReports + * @summary: Get delivery reports + * @description: Retrieve reports on the delivery status of events. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getDeliveryReports/). + */ + getDeliveryReports({ body, requestHeaders }?: WebhookPlatformValidator.GetDeliveryReportsParam, { responseHeaders }?: object): Promise; + /** + * @param {WebhookPlatformValidator.GetHistoricalReportsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getHistoricalReports + * @summary: Get historical reports + * @description: Retrieve historical reports of webhook events. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getHistoricalReports/). + */ + getHistoricalReports({ body, requestHeaders }?: WebhookPlatformValidator.GetHistoricalReportsParam, { responseHeaders }?: object): Promise; + /** + * @param {WebhookPlatformValidator.GetReportFiltersParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getReportFilters + * @summary: Get report filters + * @description: Retrieve filters used for generating reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getReportFilters/). + */ + getReportFilters({ body, requestHeaders }?: WebhookPlatformValidator.GetReportFiltersParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPlatformValidator.GetSubscriberByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSubscriberById * @summary: Get a subscriber * @description: Retrieve a subscriber's details by their unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getSubscriberById/). */ - getSubscriberById({ subscriberId, requestHeaders }?: WebhookPlatformValidator.GetSubscriberByIdParam, { responseHeaders }?: object): Promise; + getSubscriberById({ subscriberId, requestHeaders }?: WebhookPlatformValidator.GetSubscriberByIdParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPlatformValidator.GetSubscribersByCompanyParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -42,60 +93,62 @@ declare class Webhook { * @description: Retrieve subscribers associated with a specific extension. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getSubscribersByExtensionId/). */ getSubscribersByExtensionId({ extensionId, pageNo, pageSize, requestHeaders }?: WebhookPlatformValidator.GetSubscribersByExtensionIdParam, { responseHeaders }?: object): Promise; + /** + * @param {WebhookPlatformValidator.PingWebhookParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name pingWebhook + * @summary: Ping webhook + * @description: Send a test ping to a webhook for verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/pingWebhook/). + */ + pingWebhook({ body, requestHeaders }?: WebhookPlatformValidator.PingWebhookParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPlatformValidator.RegisterSubscriberToEventParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name registerSubscriberToEvent * @summary: Register subscriber to event * @description: Add a subscriber to receive events of a specific type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEvent/). */ - registerSubscriberToEvent({ body, requestHeaders }?: WebhookPlatformValidator.RegisterSubscriberToEventParam, { responseHeaders }?: object): Promise; + registerSubscriberToEvent({ body, requestHeaders }?: WebhookPlatformValidator.RegisterSubscriberToEventParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPlatformValidator.RegisterSubscriberToEventV2Param} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name registerSubscriberToEventV2 * @summary: Register Subscriber. * @description: Register Subscriber. * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEventV2/). */ - registerSubscriberToEventV2({ body, requestHeaders }?: WebhookPlatformValidator.RegisterSubscriberToEventV2Param, { responseHeaders }?: object): Promise; + registerSubscriberToEventV2({ body, requestHeaders }?: WebhookPlatformValidator.RegisterSubscriberToEventV2Param, { responseHeaders }?: object): Promise; /** * @param {WebhookPlatformValidator.UpdateSubscriberConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name updateSubscriberConfig * @summary: Update a subscriber config * @description: Modify and update subscriber configuration settings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/updateSubscriberConfig/). */ - updateSubscriberConfig({ body, requestHeaders }?: WebhookPlatformValidator.UpdateSubscriberConfigParam, { responseHeaders }?: object): Promise; + updateSubscriberConfig({ body, requestHeaders }?: WebhookPlatformValidator.UpdateSubscriberConfigParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPlatformValidator.UpdateSubscriberV2Param} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - + * Success response * @name updateSubscriberV2 * @summary: Update Subscriber. * @description: Update Subscriber. * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/updateSubscriberV2/). */ - updateSubscriberV2({ body, requestHeaders }?: WebhookPlatformValidator.UpdateSubscriberV2Param, { responseHeaders }?: object): Promise; - /** - * @param {WebhookPlatformValidator.UpsertSubscriberEventParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name upsertSubscriberEvent - * @summary: Register Subscriber. - * @description: Register Subscriber. - * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/upsertSubscriberEvent/). - */ - upsertSubscriberEvent({ body, requestHeaders }?: WebhookPlatformValidator.UpsertSubscriberEventParam, { responseHeaders }?: object): Promise; + updateSubscriberV2({ body, requestHeaders }?: WebhookPlatformValidator.UpdateSubscriberV2Param, { responseHeaders }?: object): Promise; } -import WebhookPlatformModel = require("./WebhookPlatformModel"); import WebhookPlatformValidator = require("./WebhookPlatformValidator"); +import WebhookPlatformModel = require("./WebhookPlatformModel"); diff --git a/sdk/platform/Webhook/WebhookPlatformClient.js b/sdk/platform/Webhook/WebhookPlatformClient.js index e86208d59..0f1a87d18 100644 --- a/sdk/platform/Webhook/WebhookPlatformClient.js +++ b/sdk/platform/Webhook/WebhookPlatformClient.js @@ -14,11 +14,172 @@ class Webhook { this.config = config; } + /** + * @param {WebhookPlatformValidator.CancelJobByNameParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name cancelJobByName + * @summary: Cancel job by name + * @description: It will cancel export job triggerd by user in order to fetch + * historical delivery summery - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/cancelJobByName/). + */ + async cancelJobByName( + { filename, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = WebhookPlatformValidator.cancelJobByName().validate( + { + filename, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = WebhookPlatformValidator.cancelJobByName().validate( + { + filename, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Webhook > cancelJobByName \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/webhook/v1.0/company/${this.config.companyId}/reports/cancel/file/${filename}`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = WebhookPlatformModel.CancelResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Webhook > cancelJobByName \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {WebhookPlatformValidator.DownloadDeliveryReportParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name downloadDeliveryReport + * @summary: Download delivery report + * @description: Download detailed delivery reports for events. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/downloadDeliveryReport/). + */ + async downloadDeliveryReport( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = WebhookPlatformValidator.downloadDeliveryReport().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = WebhookPlatformValidator.downloadDeliveryReport().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Webhook > downloadDeliveryReport \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/webhook/v1.0/company/${this.config.companyId}/reports/download`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = WebhookPlatformModel.DownloadReportResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Webhook > downloadDeliveryReport \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {WebhookPlatformValidator.FetchAllEventConfigurationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name fetchAllEventConfigurations * @summary: List event configurations * @description: Retrieve all configurations for event handling. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/fetchAllEventConfigurations/). @@ -72,7 +233,7 @@ class Webhook { const { error: res_error, - } = WebhookPlatformModel.EventConfigResult().validate(responseData, { + } = WebhookPlatformModel.EventConfigResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -91,11 +252,245 @@ class Webhook { return response; } + /** + * @param {WebhookPlatformValidator.GetDeliveryReportsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getDeliveryReports + * @summary: Get delivery reports + * @description: Retrieve reports on the delivery status of events. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getDeliveryReports/). + */ + async getDeliveryReports( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = WebhookPlatformValidator.getDeliveryReports().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = WebhookPlatformValidator.getDeliveryReports().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Webhook > getDeliveryReports \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/webhook/v1.0/company/${this.config.companyId}/reports/event_processed`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = WebhookPlatformModel.EventProcessReports().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Webhook > getDeliveryReports \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {WebhookPlatformValidator.GetHistoricalReportsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getHistoricalReports + * @summary: Get historical reports + * @description: Retrieve historical reports of webhook events. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getHistoricalReports/). + */ + async getHistoricalReports( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = WebhookPlatformValidator.getHistoricalReports().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = WebhookPlatformValidator.getHistoricalReports().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Webhook > getHistoricalReports \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/webhook/v1.0/company/${this.config.companyId}/reports/history`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = WebhookPlatformModel.HistoryResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Webhook > getHistoricalReports \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {WebhookPlatformValidator.GetReportFiltersParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getReportFilters + * @summary: Get report filters + * @description: Retrieve filters used for generating reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getReportFilters/). + */ + async getReportFilters( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = WebhookPlatformValidator.getReportFilters().validate( + { + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = WebhookPlatformValidator.getReportFilters().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Webhook > getReportFilters \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/webhook/v1.0/company/${this.config.companyId}/filters`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { error: res_error } = Joi.array() + .items(WebhookPlatformModel.ReportFilterResponse()) + .validate(responseData, { abortEarly: false, allowUnknown: true }); + + if (res_error) { + if (this.config.options.strictResponseCheck === true) { + return Promise.reject(new FDKResponseValidationError(res_error)); + } else { + Logger({ + level: "WARN", + message: `Response Validation Warnings for platform > Webhook > getReportFilters \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {WebhookPlatformValidator.GetSubscriberByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSubscriberById * @summary: Get a subscriber * @description: Retrieve a subscriber's details by their unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getSubscriberById/). @@ -151,7 +546,7 @@ class Webhook { const { error: res_error, - } = WebhookPlatformModel.SubscriberDetails().validate(responseData, { + } = WebhookPlatformModel.SubscriberResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -346,21 +741,19 @@ class Webhook { } /** - * @param {WebhookPlatformValidator.RegisterSubscriberToEventParam} arg - Arg object + * @param {WebhookPlatformValidator.PingWebhookParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name registerSubscriberToEvent - * @summary: Register subscriber to event - * @description: Add a subscriber to receive events of a specific type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEvent/). + * @returns {Promise} - Success response + * @name pingWebhook + * @summary: Ping webhook + * @description: Send a test ping to a webhook for verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/pingWebhook/). */ - async registerSubscriberToEvent( + async pingWebhook( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { - error, - } = WebhookPlatformValidator.registerSubscriberToEvent().validate( + const { error } = WebhookPlatformValidator.pingWebhook().validate( { body, }, @@ -371,9 +764,7 @@ class Webhook { } // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = WebhookPlatformValidator.registerSubscriberToEvent().validate( + const { error: warrning } = WebhookPlatformValidator.pingWebhook().validate( { body, }, @@ -382,7 +773,7 @@ class Webhook { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Webhook > registerSubscriberToEvent \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Webhook > pingWebhook \n ${warrning}`, }); } @@ -393,7 +784,7 @@ class Webhook { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/`, + `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/ping`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -407,7 +798,7 @@ class Webhook { const { error: res_error, - } = WebhookPlatformModel.SubscriberConfigResult().validate(responseData, { + } = WebhookPlatformModel.PingWebhookResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -418,7 +809,7 @@ class Webhook { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Webhook > registerSubscriberToEvent \n ${res_error}`, + message: `Response Validation Warnings for platform > Webhook > pingWebhook \n ${res_error}`, }); } } @@ -427,22 +818,22 @@ class Webhook { } /** - * @param {WebhookPlatformValidator.RegisterSubscriberToEventV2Param} arg - Arg object + * @param {WebhookPlatformValidator.RegisterSubscriberToEventParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name registerSubscriberToEventV2 - * @summary: Register Subscriber. - * @description: Register Subscriber. - * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEventV2/). + * @returns {Promise} - + * Success response + * @name registerSubscriberToEvent + * @summary: Register subscriber to event + * @description: Add a subscriber to receive events of a specific type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEvent/). */ - async registerSubscriberToEventV2( + async registerSubscriberToEvent( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = WebhookPlatformValidator.registerSubscriberToEventV2().validate( + } = WebhookPlatformValidator.registerSubscriberToEvent().validate( { body, }, @@ -455,7 +846,7 @@ class Webhook { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = WebhookPlatformValidator.registerSubscriberToEventV2().validate( + } = WebhookPlatformValidator.registerSubscriberToEvent().validate( { body, }, @@ -464,7 +855,7 @@ class Webhook { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Webhook > registerSubscriberToEventV2 \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Webhook > registerSubscriberToEvent \n ${warrning}`, }); } @@ -475,7 +866,7 @@ class Webhook { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/webhook/v2.0/company/${this.config.companyId}/subscriber/`, + `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -489,7 +880,7 @@ class Webhook { const { error: res_error, - } = WebhookPlatformModel.SubscriberConfigResult().validate(responseData, { + } = WebhookPlatformModel.SubscriberConfigResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -500,7 +891,7 @@ class Webhook { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Webhook > registerSubscriberToEventV2 \n ${res_error}`, + message: `Response Validation Warnings for platform > Webhook > registerSubscriberToEvent \n ${res_error}`, }); } } @@ -509,21 +900,23 @@ class Webhook { } /** - * @param {WebhookPlatformValidator.UpdateSubscriberConfigParam} arg - Arg object + * @param {WebhookPlatformValidator.RegisterSubscriberToEventV2Param} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name updateSubscriberConfig - * @summary: Update a subscriber config - * @description: Modify and update subscriber configuration settings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/updateSubscriberConfig/). + * @returns {Promise} - + * Success response + * @name registerSubscriberToEventV2 + * @summary: Register Subscriber. + * @description: Register Subscriber. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEventV2/). */ - async updateSubscriberConfig( + async registerSubscriberToEventV2( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = WebhookPlatformValidator.updateSubscriberConfig().validate( + } = WebhookPlatformValidator.registerSubscriberToEventV2().validate( { body, }, @@ -536,7 +929,7 @@ class Webhook { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = WebhookPlatformValidator.updateSubscriberConfig().validate( + } = WebhookPlatformValidator.registerSubscriberToEventV2().validate( { body, }, @@ -545,7 +938,7 @@ class Webhook { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Webhook > updateSubscriberConfig \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Webhook > registerSubscriberToEventV2 \n ${warrning}`, }); } @@ -555,8 +948,8 @@ class Webhook { const response = await PlatformAPIClient.execute( this.config, - "put", - `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/`, + "post", + `/service/platform/webhook/v2.0/company/${this.config.companyId}/subscriber/`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -570,7 +963,7 @@ class Webhook { const { error: res_error, - } = WebhookPlatformModel.SubscriberConfigResult().validate(responseData, { + } = WebhookPlatformModel.SubscriberConfigResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -581,7 +974,7 @@ class Webhook { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Webhook > updateSubscriberConfig \n ${res_error}`, + message: `Response Validation Warnings for platform > Webhook > registerSubscriberToEventV2 \n ${res_error}`, }); } } @@ -590,20 +983,22 @@ class Webhook { } /** - * @param {WebhookPlatformValidator.UpdateSubscriberV2Param} arg - Arg object + * @param {WebhookPlatformValidator.UpdateSubscriberConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name updateSubscriberV2 - * @summary: Update Subscriber. - * @description: Update Subscriber. - * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/updateSubscriberV2/). + * @returns {Promise} - + * Success response + * @name updateSubscriberConfig + * @summary: Update a subscriber config + * @description: Modify and update subscriber configuration settings. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/updateSubscriberConfig/). */ - async updateSubscriberV2( + async updateSubscriberConfig( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = WebhookPlatformValidator.updateSubscriberV2().validate( + const { + error, + } = WebhookPlatformValidator.updateSubscriberConfig().validate( { body, }, @@ -616,7 +1011,7 @@ class Webhook { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = WebhookPlatformValidator.updateSubscriberV2().validate( + } = WebhookPlatformValidator.updateSubscriberConfig().validate( { body, }, @@ -625,7 +1020,7 @@ class Webhook { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Webhook > updateSubscriberV2 \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Webhook > updateSubscriberConfig \n ${warrning}`, }); } @@ -636,7 +1031,7 @@ class Webhook { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/webhook/v2.0/company/${this.config.companyId}/subscriber/`, + `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -650,7 +1045,7 @@ class Webhook { const { error: res_error, - } = WebhookPlatformModel.SubscriberConfigResult().validate(responseData, { + } = WebhookPlatformModel.SubscriberConfigResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -661,7 +1056,7 @@ class Webhook { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Webhook > updateSubscriberV2 \n ${res_error}`, + message: `Response Validation Warnings for platform > Webhook > updateSubscriberConfig \n ${res_error}`, }); } } @@ -670,21 +1065,21 @@ class Webhook { } /** - * @param {WebhookPlatformValidator.UpsertSubscriberEventParam} arg - Arg object + * @param {WebhookPlatformValidator.UpdateSubscriberV2Param} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response - * @name upsertSubscriberEvent - * @summary: Register Subscriber. - * @description: Register Subscriber. - * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/upsertSubscriberEvent/). + * @name updateSubscriberV2 + * @summary: Update Subscriber. + * @description: Update Subscriber. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/updateSubscriberV2/). */ - async upsertSubscriberEvent( + async updateSubscriberV2( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = WebhookPlatformValidator.upsertSubscriberEvent().validate( + const { error } = WebhookPlatformValidator.updateSubscriberV2().validate( { body, }, @@ -697,7 +1092,7 @@ class Webhook { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = WebhookPlatformValidator.upsertSubscriberEvent().validate( + } = WebhookPlatformValidator.updateSubscriberV2().validate( { body, }, @@ -706,7 +1101,7 @@ class Webhook { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Webhook > upsertSubscriberEvent \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Webhook > updateSubscriberV2 \n ${warrning}`, }); } @@ -717,7 +1112,7 @@ class Webhook { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/webhook/v3.0/company/${this.config.companyId}/subscriber/`, + `/service/platform/webhook/v2.0/company/${this.config.companyId}/subscriber/`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -731,10 +1126,10 @@ class Webhook { const { error: res_error, - } = WebhookPlatformModel.UpsertSubscriberConfigResult().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = WebhookPlatformModel.SubscriberConfigResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -742,7 +1137,7 @@ class Webhook { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Webhook > upsertSubscriberEvent \n ${res_error}`, + message: `Response Validation Warnings for platform > Webhook > updateSubscriberV2 \n ${res_error}`, }); } } diff --git a/sdk/platform/Webhook/WebhookPlatformModel.d.ts b/sdk/platform/Webhook/WebhookPlatformModel.d.ts index 35e0cb875..845af235b 100644 --- a/sdk/platform/Webhook/WebhookPlatformModel.d.ts +++ b/sdk/platform/Webhook/WebhookPlatformModel.d.ts @@ -1,4 +1,44 @@ export = WebhookPlatformModel; +/** + * @typedef Event + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [event_category] + * @property {string} [version] + */ +/** + * @typedef EventProcessRequest + * @property {string} [search_text] + * @property {string} end_date + * @property {string} start_date + * @property {number[]} [subscriber_ids] + * @property {string} [status] + * @property {Event[]} [event] + */ +/** + * @typedef DownloadReportResponse + * @property {string} [file_name] + */ +/** + * @typedef EventProcessReports + * @property {EventProcessReportObject[]} [rows] + * @property {Page} [page] + */ +/** + * @typedef EventProcessReportObject + * @property {string} [event_name] - The name of the processed event. + * @property {number} [response_code] - The response code of the event. + * @property {string} [response_message] - The response message of the event. + * @property {string} [data] - The data associated with the event. + * @property {number} [attempt] - The attempt number of the event. + * @property {number} [last_attempted_on] - The timestamp of the last attempted event. + * @property {string} [status] - The status of the event (e.g., "FAILED"). + * @property {string} [name] - The name of the event. + * @property {string} [webhook_url] - The webhook URL associated with the event. + * @property {number} [response_time] - The response time of the event. + * @property {string} [message_id] + * @property {string} [event_trace_id] + */ /** * @typedef Page * @property {number} [item_total] - The total number of items on the page. @@ -10,290 +50,305 @@ export = WebhookPlatformModel; * @property {number} [size] - The number of items per page. */ /** - * @typedef BroadcasterConfig - * @property {string} [topic] - The name of the topic for the broadcaster configuration. - * @property {string} [queue] - The name of the queue for the broadcaster configuration. - * @property {string} [event_bridge_name] - The name of the event bridge - * associated with the broadcaster. - * @property {string} [workflow_name] - The name of the workflow related to the - * broadcaster. - * @property {string} [account_id] - The account ID associated with the broadcaster. - * @property {string} [detail_type] - The type of detail for the broadcaster - * configuration. + * @typedef PingWebhook + * @property {string} webhook_url - The URL of the subscriber's webhook to ping. + * @property {Object} [auth_meta] - Authentication metadata (if required by the + * subscriber). + * @property {Object} [custom_headers] - Custom headers to include in the ping request. + */ +/** + * @typedef PingWebhookResponse + * @property {string} [status] - The status of the ping (e.g., "SUCCESS"). + * @property {string} [message] - An optional message related to the ping. + * @property {number} [code] - The HTTP status code of the ping response (e.g., 200). */ /** * @typedef SubscriberEventMapping - * @property {number} [id] - The unique identifier for the subscriber event mapping. - * @property {number} [event_id] - The ID of the event associated with the subscriber. - * @property {number} [subscriber_id] - The ID of the subscriber. - * @property {BroadcasterConfig} [broadcaster_config] - * @property {string} [created_on] - The date and time when the subscriber event - * mapping was created. + * @property {number} [id] + * @property {number} [event_id] + * @property {number} [subscriber_id] + * @property {string} [topic] + * @property {string} [created_on] */ /** * @typedef EventConfig - * @property {number} [id] - The unique identifier for the event configuration. - * @property {string} [type] - The type of event configuration, which may be null. - * @property {string} [event_name] - The name of the event. - * @property {string} [event_type] - The type of the event. - * @property {string} [event_category] - The category of the event. - * @property {string} [modified_by] - The identifier of the user who last - * modified the event configuration. + * @property {number} [id] + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [event_category] * @property {SubscriberEventMapping} [subscriber_event_mapping] - * @property {Object} [event_schema] - The schema for the event, allowing for - * additional properties and may be null. - * @property {string} [group] - The group associated with the event - * configuration, which may be null. - * @property {string} [version] - The version of the event configuration. - * @property {string} [display_name] - The display name of the event configuration. - * @property {string} [description] - A description of the event configuration, - * which may be null. - * @property {string} [created_on] - The date and time when the event - * configuration was created. - * @property {string} [updated_on] - The date and time when the event - * configuration was last updated. - */ -/** - * @typedef EventConfigResult + * @property {Object} [event_schema] + * @property {string} [group] + * @property {string} [version] + * @property {string} [display_name] + * @property {string} [description] + * @property {string} [created_on] + * @property {string} [updated_on] + */ +/** + * @typedef EventConfigResponse * @property {EventConfig[]} [event_configs] */ +/** + * @typedef ReportFiltersPayload + * @property {number[]} subscriber_ids - An array of subscriber IDs for + * filtering filters (optional). + */ +/** + * @typedef ReportFilterResponse + * @property {string} [filter_name] - The name of the filter. + * @property {Object[]} [values] + */ +/** + * @typedef HistoryPayload + * @property {string} type - The type of history report (e.g., "platform"). + * @property {number} [page_no] - The page number of the history report. + * @property {number} [page_size] - The number of records per page. + */ +/** + * @typedef HistoryFilters + * @property {string[]} [events] + * @property {string} [search_text] + * @property {string} [status] - The status of the history report (e.g., "FAILED"). + * @property {string} [end_date] - The end date and time of the history report. + * @property {string} [start_date] - The start date and time of the history report. + * @property {number[]} [subscribers] - An array of subscriber IDs associated + * with the history report. + * @property {string[]} [webhook_type] - An array of webhook type to identify + * thetype of subscriber i.e (KAFKA or REST). + */ +/** + * @typedef Url + * @property {string} [url] - The URL of the uploaded report file. + * @property {string} [name] - The name of the uploaded report file. + */ +/** + * @typedef CdnObject + * @property {Url[]} [urls] + */ +/** + * @typedef UploadServiceObject + * @property {CdnObject} [cdn] + */ +/** + * @typedef HistoryAssociation + * @property {number} [company_id] + * @property {number[]} [subscriber_ids] + */ +/** + * @typedef HistoryItems + * @property {number} [id] - The ID of the history report. + * @property {HistoryAssociation} [association] + * @property {HistoryFilters} [filters] + * @property {string} [filename] - The filename of the history report. + * @property {string} [status] - The status of the history report (e.g., "COMPLETED"). + * @property {UploadServiceObject} [upload_service_response] + * @property {string} [created_on] - The date and time when the history report + * was created. + * @property {string} [updated_on] - The date and time when the history report + * was last updated. + * @property {string} [message] - A message related to the history report. + */ +/** + * @typedef HistoryResponse + * @property {HistoryItems[]} [items] + * @property {Page} [page] + */ +/** + * @typedef CancelResponse + * @property {string} [message] - The HTTP status code of the response (e.g., 200). + */ /** * @typedef Association - * @property {string[]} [application_id] - A list of application IDs associated - * with the association. - * @property {string} [extension_id] - The extension ID associated with the association. - * @property {string} [criteria] - The criteria for the association, such as - * "ALL", "EMPTY", or "SPECIFIC-EVENTS". + * @property {string[]} [application_id] + * @property {string} [extension_id] + * @property {string} [criteria] */ /** * @typedef AssociationResp - * @property {number} [company_id] - The ID of the company associated with the response. - * @property {string[]} [application_id] - A list of application IDs associated - * with the response. - * @property {string} [extension_id] - The extension ID associated with the response. - * @property {string} [criteria] - The criteria for the response, such as "ALL", - * "EMPTY", or "SPECIFIC-EVENTS". + * @property {number} [company_id] + * @property {string[]} [application_id] + * @property {string} [extension_id] + * @property {string} [criteria] */ /** * @typedef AuthMeta - * @property {string} [type] - The type of authentication method used. - * @property {string} [secret] - The secret key or token used for authentication. + * @property {string} [type] + * @property {string} [secret] */ /** - * @typedef SubscriberDetails - * @property {number} [id] - The unique identifier of the subscriber. - * @property {string} [modified_by] - The identifier of the user who last - * modified the subscriber details. - * @property {string} [name] - The name of the subscriber. - * @property {string} [provider] - The provider of the subscriber. - * @property {string} [webhook_url] - The URL for the subscriber's webhook. + * @typedef SubscriberResponse + * @property {number} [id] + * @property {string} [modified_by] + * @property {string} [name] + * @property {string} [provider] + * @property {string} [webhook_url] * @property {AssociationResp} [association] - * @property {Object} [custom_headers] - Custom headers for the subscriber. + * @property {Object} [custom_headers] * @property {SubscriberStatus} [status] - * @property {string} [email_id] - The email ID associated with the subscriber. - * @property {string} [updated_on] - The date and time when the subscriber - * details were last updated. - * @property {string} [created_on] - The date and time when the subscriber was created. - * @property {string} [type] - The type of subscriber, which can either be passed as null. + * @property {string} [email_id] + * @property {string} [updated_on] + * @property {string} [created_on] + * @property {string} [type] * @property {AuthMeta} [auth_meta] * @property {EventConfig[]} [event_configs] */ /** * @typedef Events - * @property {string} [slug] - The slug or identifier for the event. - * @property {string} [topic] - The topic associated with the event. - * @property {string} [queue] - The queue associated with the event in case of - * provider as Pub/Sub. - * @property {string} [event_bridge_name] - The name of the event bridge - * associated with the event in case of provider as AWS event bridge. - * @property {string} [workflow_name] - The name of the workflow related to the - * event in case of provider as temporal. - * @property {string} [detail_type] - The type of detail for the event. + * @property {string} [slug] + * @property {string} [topic] */ /** * @typedef SubscriberConfigPostRequestV2 - * @property {string} name - The name of the subscriber. - * @property {string} [type] - The type of the subscriber, which may be null. - * @property {string} [webhook_url] - The URL for the subscriber's webhook. - * @property {string} provider - The provider of the subscriber. + * @property {string} name + * @property {string} [webhook_url] + * @property {string} provider * @property {Association} association - * @property {Object} [custom_headers] - Custom headers for the subscriber. + * @property {Object} [custom_headers] * @property {SubscriberStatus} status - * @property {string} email_id - The email ID associated with the subscriber. + * @property {string} email_id * @property {AuthMeta} [auth_meta] - * @property {Events[]} events - The list of events associated with the subscriber. + * @property {Events[]} events */ /** * @typedef SubscriberConfigUpdateRequestV2 - * @property {number} id - The unique identifier of the subscriber to be updated. - * @property {string} [name] - The name of the subscriber. - * @property {string} [type] - The type of the subscriber, which may be null. - * @property {string} [webhook_url] - The URL for the subscriber's webhook. - * @property {string} provider - The provider of the subscriber. + * @property {number} id + * @property {string} [name] + * @property {string} [webhook_url] + * @property {string} provider * @property {Association} [association] - * @property {Object} [custom_headers] - Custom headers for the subscriber. + * @property {Object} [custom_headers] * @property {SubscriberStatus} status - * @property {string} [email_id] - The email ID associated with the subscriber. + * @property {string} [email_id] * @property {AuthMeta} [auth_meta] - * @property {Events[]} [events] - The list of events associated with the subscriber. + * @property {Events[]} [events] */ /** * @typedef SubscriberConfigPost - * @property {string} name - The name of the subscriber. - * @property {string} [type] - The type of the subscriber, which can be null. - * @property {string} webhook_url - The URL for the subscriber's webhook. + * @property {string} name + * @property {string} webhook_url * @property {Association} association - * @property {Object} [custom_headers] - Custom headers for the subscriber. + * @property {Object} [custom_headers] * @property {SubscriberStatus} status - * @property {string} email_id - The email ID associated with the subscriber. + * @property {string} email_id * @property {AuthMeta} [auth_meta] - * @property {number[]} event_id - The list of event IDs associated with the subscriber. + * @property {number[]} event_id */ /** * @typedef SubscriberConfigUpdate - * @property {number} id - The unique identifier of the subscriber to be updated. - * @property {string} [name] - The name of the subscriber. - * @property {string} [type] - The type of the subscriber, which can be null. - * @property {string} [webhook_url] - The URL for the subscriber's webhook. + * @property {number} id + * @property {string} [name] + * @property {string} [webhook_url] * @property {Association} [association] - * @property {Object} [custom_headers] - Custom headers for the subscriber. + * @property {Object} [custom_headers] * @property {SubscriberStatus} [status] - * @property {string} [email_id] - The email ID associated with the subscriber. + * @property {string} [email_id] * @property {AuthMeta} [auth_meta] - * @property {number[]} event_id - The list of event IDs associated with the subscriber. + * @property {number[]} event_id */ /** - * @typedef SubscriberConfigResult - * @property {number} [id] - The unique identifier of the subscriber configuration. - * @property {string} [modified_by] - The identifier of the user who last - * modified the subscriber configuration. - * @property {string} [name] - The name of the subscriber. - * @property {string} [webhook_url] - The URL for the subscriber's webhook. - * @property {string} [provider] - The provider of the subscriber. + * @typedef SubscriberConfigResponse + * @property {number} [id] + * @property {string} [modified_by] + * @property {string} [name] + * @property {string} [webhook_url] + * @property {string} [provider] * @property {AssociationResp} [association] - * @property {Object} [custom_headers] - Custom headers for the subscriber. + * @property {Object} [custom_headers] * @property {SubscriberStatus} [status] - * @property {string} [email_id] - The email ID associated with the subscriber. - * @property {string} [updated_on] - The date and time when the subscriber was - * last updated. - * @property {string} [created_on] - The date and time when the subscriber was created. - * @property {string} [type] - The type of the subscriber, which can be null. + * @property {string} [email_id] + * @property {string} [updated_on] + * @property {string} [created_on] + * @property {string} [type] * @property {AuthMeta} [auth_meta] - * @property {number[]} [event_id] - The list of event IDs associated with the subscriber. + * @property {number[]} [event_id] */ /** * @typedef SubscriberConfigList - * @property {SubscriberDetails[]} [items] + * @property {SubscriberResponse[]} [items] * @property {Page} [page] */ -/** - * @typedef RestEventData - * @property {string} event_category - The category of the event. - * @property {string} event_name - The name of the event. - * @property {string} event_type - The type of the event. - * @property {number} version - The version number of the event. - */ -/** - * @typedef RestConfig - * @property {string} webhook_url - The URL for the webhook. - * @property {string} type - The type of the configuration. - * @property {Object} [custom_headers] - Custom headers for the configuration. - * @property {AuthMeta} [auth_meta] - * @property {RestEventData[]} events - */ -/** - * @typedef QueueEventData - * @property {string} event_category - The category of the event. - * @property {string} event_name - The name of the event. - * @property {string} event_type - The type of the event. - * @property {number} version - The version number of the event. - * @property {string} topic - The topic associated with the event. - */ -/** - * @typedef KafkaConfig - * @property {string} [type] - * @property {QueueEventData[]} events - */ -/** - * @typedef PubSubConfig - * @property {string} [type] - * @property {QueueEventData[]} events - */ -/** - * @typedef TemporalEventData - * @property {string} event_category - The category of the event. - * @property {string} event_name - The name of the event. - * @property {string} event_type - The type of the event. - * @property {number} version - The version number of the event. - * @property {string} [queue] - The queue associated with the event. - * @property {string} [workflow_name] - The workflow name related to the event. - */ -/** - * @typedef TemporalConfig - * @property {string} [type] - * @property {TemporalEventData[]} events - */ -/** - * @typedef SqsEventData - * @property {string} event_category - The category of the event. - * @property {string} event_name - The name of the event. - * @property {string} event_type - The type of the event. - * @property {number} version - The version number of the event. - * @property {string} [queue] - The queue name associated with the event in SQS. - */ -/** - * @typedef SqsConfig - * @property {string} [type] - * @property {SqsEventData[]} events - */ -/** - * @typedef EventBridgeData - * @property {string} event_category - The category of the event. - * @property {string} event_name - The name of the event. - * @property {string} event_type - The type of the event. - * @property {number} version - The version number of the event. - * @property {string} [event_bridge_name] - The name of the event bridge related - * to the event. - */ -/** - * @typedef EventBridgeConfig - * @property {string} [type] - * @property {EventBridgeData[]} events - */ -/** - * @typedef EventMapBody - * @property {RestConfig} [rest] - * @property {KafkaConfig} [kafka] - * @property {PubSubConfig} [pub_sub] - * @property {TemporalConfig} [temporal] - * @property {SqsConfig} [sqs] - * @property {EventBridgeConfig} [event_bridge] - */ -/** - * @typedef WebhookConfig - * @property {string} [notification_email] - The email address for notifications. - * @property {string} [name] - The name of the webhook configuration. - * @property {string} [status] - The status of the webhook (e.g., active or inactive). - * @property {Association} [association] - * @property {EventMapBody} [event_map] - */ -/** - * @typedef UpsertSubscriberConfig - * @property {WebhookConfig} webhook_config - */ -/** - * @typedef UpsertSubscriberConfigResult - * @property {boolean} [status] - The status of the upsert operation (e.g., - * success or failure). - * @property {string} [message] - A message providing details about the upsert - * operation result. - */ /** @typedef {"active" | "inactive"} SubscriberStatus */ declare class WebhookPlatformModel { } declare namespace WebhookPlatformModel { - export { Page, BroadcasterConfig, SubscriberEventMapping, EventConfig, EventConfigResult, Association, AssociationResp, AuthMeta, SubscriberDetails, Events, SubscriberConfigPostRequestV2, SubscriberConfigUpdateRequestV2, SubscriberConfigPost, SubscriberConfigUpdate, SubscriberConfigResult, SubscriberConfigList, RestEventData, RestConfig, QueueEventData, KafkaConfig, PubSubConfig, TemporalEventData, TemporalConfig, SqsEventData, SqsConfig, EventBridgeData, EventBridgeConfig, EventMapBody, WebhookConfig, UpsertSubscriberConfig, UpsertSubscriberConfigResult, SubscriberStatus }; + export { Event, EventProcessRequest, DownloadReportResponse, EventProcessReports, EventProcessReportObject, Page, PingWebhook, PingWebhookResponse, SubscriberEventMapping, EventConfig, EventConfigResponse, ReportFiltersPayload, ReportFilterResponse, HistoryPayload, HistoryFilters, Url, CdnObject, UploadServiceObject, HistoryAssociation, HistoryItems, HistoryResponse, CancelResponse, Association, AssociationResp, AuthMeta, SubscriberResponse, Events, SubscriberConfigPostRequestV2, SubscriberConfigUpdateRequestV2, SubscriberConfigPost, SubscriberConfigUpdate, SubscriberConfigResponse, SubscriberConfigList, SubscriberStatus }; } +/** @returns {Event} */ +declare function Event(): Event; +type Event = { + event_name?: string; + event_type?: string; + event_category?: string; + version?: string; +}; +/** @returns {EventProcessRequest} */ +declare function EventProcessRequest(): EventProcessRequest; +type EventProcessRequest = { + search_text?: string; + end_date: string; + start_date: string; + subscriber_ids?: number[]; + status?: string; + event?: Event[]; +}; +/** @returns {DownloadReportResponse} */ +declare function DownloadReportResponse(): DownloadReportResponse; +type DownloadReportResponse = { + file_name?: string; +}; +/** @returns {EventProcessReports} */ +declare function EventProcessReports(): EventProcessReports; +type EventProcessReports = { + rows?: EventProcessReportObject[]; + page?: Page; +}; +/** @returns {EventProcessReportObject} */ +declare function EventProcessReportObject(): EventProcessReportObject; +type EventProcessReportObject = { + /** + * - The name of the processed event. + */ + event_name?: string; + /** + * - The response code of the event. + */ + response_code?: number; + /** + * - The response message of the event. + */ + response_message?: string; + /** + * - The data associated with the event. + */ + data?: string; + /** + * - The attempt number of the event. + */ + attempt?: number; + /** + * - The timestamp of the last attempted event. + */ + last_attempted_on?: number; + /** + * - The status of the event (e.g., "FAILED"). + */ + status?: string; + /** + * - The name of the event. + */ + name?: string; + /** + * - The webhook URL associated with the event. + */ + webhook_url?: string; + /** + * - The response time of the event. + */ + response_time?: number; + message_id?: string; + event_trace_id?: string; +}; /** @returns {Page} */ declare function Page(): Page; type Page = { @@ -326,225 +381,241 @@ type Page = { */ size?: number; }; -/** @returns {BroadcasterConfig} */ -declare function BroadcasterConfig(): BroadcasterConfig; -type BroadcasterConfig = { +/** @returns {PingWebhook} */ +declare function PingWebhook(): PingWebhook; +type PingWebhook = { /** - * - The name of the topic for the broadcaster configuration. + * - The URL of the subscriber's webhook to ping. */ - topic?: string; + webhook_url: string; /** - * - The name of the queue for the broadcaster configuration. + * - Authentication metadata (if required by the + * subscriber). */ - queue?: string; + auth_meta?: any; /** - * - The name of the event bridge - * associated with the broadcaster. + * - Custom headers to include in the ping request. */ - event_bridge_name?: string; + custom_headers?: any; +}; +/** @returns {PingWebhookResponse} */ +declare function PingWebhookResponse(): PingWebhookResponse; +type PingWebhookResponse = { /** - * - The name of the workflow related to the - * broadcaster. + * - The status of the ping (e.g., "SUCCESS"). */ - workflow_name?: string; + status?: string; /** - * - The account ID associated with the broadcaster. + * - An optional message related to the ping. */ - account_id?: string; + message?: string; /** - * - The type of detail for the broadcaster - * configuration. + * - The HTTP status code of the ping response (e.g., 200). */ - detail_type?: string; + code?: number; }; /** @returns {SubscriberEventMapping} */ declare function SubscriberEventMapping(): SubscriberEventMapping; type SubscriberEventMapping = { - /** - * - The unique identifier for the subscriber event mapping. - */ id?: number; - /** - * - The ID of the event associated with the subscriber. - */ event_id?: number; - /** - * - The ID of the subscriber. - */ subscriber_id?: number; - broadcaster_config?: BroadcasterConfig; - /** - * - The date and time when the subscriber event - * mapping was created. - */ + topic?: string; created_on?: string; }; /** @returns {EventConfig} */ declare function EventConfig(): EventConfig; type EventConfig = { + id?: number; + event_name?: string; + event_type?: string; + event_category?: string; + subscriber_event_mapping?: SubscriberEventMapping; + event_schema?: any; + group?: string; + version?: string; + display_name?: string; + description?: string; + created_on?: string; + updated_on?: string; +}; +/** @returns {EventConfigResponse} */ +declare function EventConfigResponse(): EventConfigResponse; +type EventConfigResponse = { + event_configs?: EventConfig[]; +}; +/** @returns {ReportFiltersPayload} */ +declare function ReportFiltersPayload(): ReportFiltersPayload; +type ReportFiltersPayload = { /** - * - The unique identifier for the event configuration. + * - An array of subscriber IDs for + * filtering filters (optional). */ - id?: number; + subscriber_ids: number[]; +}; +/** @returns {ReportFilterResponse} */ +declare function ReportFilterResponse(): ReportFilterResponse; +type ReportFilterResponse = { /** - * - The type of event configuration, which may be null. + * - The name of the filter. */ - type?: string; + filter_name?: string; + values?: any[]; +}; +/** @returns {HistoryPayload} */ +declare function HistoryPayload(): HistoryPayload; +type HistoryPayload = { /** - * - The name of the event. + * - The type of history report (e.g., "platform"). */ - event_name?: string; + type: string; /** - * - The type of the event. + * - The page number of the history report. */ - event_type?: string; + page_no?: number; /** - * - The category of the event. + * - The number of records per page. */ - event_category?: string; + page_size?: number; +}; +/** @returns {HistoryFilters} */ +declare function HistoryFilters(): HistoryFilters; +type HistoryFilters = { + events?: string[]; + search_text?: string; /** - * - The identifier of the user who last - * modified the event configuration. + * - The status of the history report (e.g., "FAILED"). */ - modified_by?: string; - subscriber_event_mapping?: SubscriberEventMapping; + status?: string; /** - * - The schema for the event, allowing for - * additional properties and may be null. + * - The end date and time of the history report. */ - event_schema?: any; + end_date?: string; /** - * - The group associated with the event - * configuration, which may be null. + * - The start date and time of the history report. */ - group?: string; + start_date?: string; /** - * - The version of the event configuration. + * - An array of subscriber IDs associated + * with the history report. */ - version?: string; + subscribers?: number[]; /** - * - The display name of the event configuration. + * - An array of webhook type to identify + * thetype of subscriber i.e (KAFKA or REST). */ - display_name?: string; + webhook_type?: string[]; +}; +/** @returns {Url} */ +declare function Url(): Url; +type Url = { /** - * - A description of the event configuration, - * which may be null. + * - The URL of the uploaded report file. */ - description?: string; + url?: string; + /** + * - The name of the uploaded report file. + */ + name?: string; +}; +/** @returns {CdnObject} */ +declare function CdnObject(): CdnObject; +type CdnObject = { + urls?: Url[]; +}; +/** @returns {UploadServiceObject} */ +declare function UploadServiceObject(): UploadServiceObject; +type UploadServiceObject = { + cdn?: CdnObject; +}; +/** @returns {HistoryAssociation} */ +declare function HistoryAssociation(): HistoryAssociation; +type HistoryAssociation = { + company_id?: number; + subscriber_ids?: number[]; +}; +/** @returns {HistoryItems} */ +declare function HistoryItems(): HistoryItems; +type HistoryItems = { /** - * - The date and time when the event - * configuration was created. + * - The ID of the history report. + */ + id?: number; + association?: HistoryAssociation; + filters?: HistoryFilters; + /** + * - The filename of the history report. + */ + filename?: string; + /** + * - The status of the history report (e.g., "COMPLETED"). + */ + status?: string; + upload_service_response?: UploadServiceObject; + /** + * - The date and time when the history report + * was created. */ created_on?: string; /** - * - The date and time when the event - * configuration was last updated. + * - The date and time when the history report + * was last updated. */ updated_on?: string; + /** + * - A message related to the history report. + */ + message?: string; }; -/** @returns {EventConfigResult} */ -declare function EventConfigResult(): EventConfigResult; -type EventConfigResult = { - event_configs?: EventConfig[]; +/** @returns {HistoryResponse} */ +declare function HistoryResponse(): HistoryResponse; +type HistoryResponse = { + items?: HistoryItems[]; + page?: Page; +}; +/** @returns {CancelResponse} */ +declare function CancelResponse(): CancelResponse; +type CancelResponse = { + /** + * - The HTTP status code of the response (e.g., 200). + */ + message?: string; }; /** @returns {Association} */ declare function Association(): Association; type Association = { - /** - * - A list of application IDs associated - * with the association. - */ application_id?: string[]; - /** - * - The extension ID associated with the association. - */ extension_id?: string; - /** - * - The criteria for the association, such as - * "ALL", "EMPTY", or "SPECIFIC-EVENTS". - */ criteria?: string; }; /** @returns {AssociationResp} */ declare function AssociationResp(): AssociationResp; type AssociationResp = { - /** - * - The ID of the company associated with the response. - */ company_id?: number; - /** - * - A list of application IDs associated - * with the response. - */ application_id?: string[]; - /** - * - The extension ID associated with the response. - */ extension_id?: string; - /** - * - The criteria for the response, such as "ALL", - * "EMPTY", or "SPECIFIC-EVENTS". - */ criteria?: string; }; /** @returns {AuthMeta} */ declare function AuthMeta(): AuthMeta; type AuthMeta = { - /** - * - The type of authentication method used. - */ type?: string; - /** - * - The secret key or token used for authentication. - */ secret?: string; }; -/** @returns {SubscriberDetails} */ -declare function SubscriberDetails(): SubscriberDetails; -type SubscriberDetails = { - /** - * - The unique identifier of the subscriber. - */ +/** @returns {SubscriberResponse} */ +declare function SubscriberResponse(): SubscriberResponse; +type SubscriberResponse = { id?: number; - /** - * - The identifier of the user who last - * modified the subscriber details. - */ modified_by?: string; - /** - * - The name of the subscriber. - */ name?: string; - /** - * - The provider of the subscriber. - */ provider?: string; - /** - * - The URL for the subscriber's webhook. - */ webhook_url?: string; association?: AssociationResp; - /** - * - Custom headers for the subscriber. - */ custom_headers?: any; status?: SubscriberStatus; - /** - * - The email ID associated with the subscriber. - */ email_id?: string; - /** - * - The date and time when the subscriber - * details were last updated. - */ updated_on?: string; - /** - * - The date and time when the subscriber was created. - */ created_on?: string; - /** - * - The type of subscriber, which can either be passed as null. - */ type?: string; auth_meta?: AuthMeta; event_configs?: EventConfig[]; @@ -552,449 +623,85 @@ type SubscriberDetails = { /** @returns {Events} */ declare function Events(): Events; type Events = { - /** - * - The slug or identifier for the event. - */ slug?: string; - /** - * - The topic associated with the event. - */ topic?: string; - /** - * - The queue associated with the event in case of - * provider as Pub/Sub. - */ - queue?: string; - /** - * - The name of the event bridge - * associated with the event in case of provider as AWS event bridge. - */ - event_bridge_name?: string; - /** - * - The name of the workflow related to the - * event in case of provider as temporal. - */ - workflow_name?: string; - /** - * - The type of detail for the event. - */ - detail_type?: string; }; /** @returns {SubscriberConfigPostRequestV2} */ declare function SubscriberConfigPostRequestV2(): SubscriberConfigPostRequestV2; type SubscriberConfigPostRequestV2 = { - /** - * - The name of the subscriber. - */ name: string; - /** - * - The type of the subscriber, which may be null. - */ - type?: string; - /** - * - The URL for the subscriber's webhook. - */ webhook_url?: string; - /** - * - The provider of the subscriber. - */ provider: string; association: Association; - /** - * - Custom headers for the subscriber. - */ custom_headers?: any; status: SubscriberStatus; - /** - * - The email ID associated with the subscriber. - */ email_id: string; auth_meta?: AuthMeta; - /** - * - The list of events associated with the subscriber. - */ events: Events[]; }; /** @returns {SubscriberConfigUpdateRequestV2} */ declare function SubscriberConfigUpdateRequestV2(): SubscriberConfigUpdateRequestV2; type SubscriberConfigUpdateRequestV2 = { - /** - * - The unique identifier of the subscriber to be updated. - */ id: number; - /** - * - The name of the subscriber. - */ name?: string; - /** - * - The type of the subscriber, which may be null. - */ - type?: string; - /** - * - The URL for the subscriber's webhook. - */ webhook_url?: string; - /** - * - The provider of the subscriber. - */ provider: string; association?: Association; - /** - * - Custom headers for the subscriber. - */ custom_headers?: any; status: SubscriberStatus; - /** - * - The email ID associated with the subscriber. - */ email_id?: string; auth_meta?: AuthMeta; - /** - * - The list of events associated with the subscriber. - */ events?: Events[]; }; /** @returns {SubscriberConfigPost} */ declare function SubscriberConfigPost(): SubscriberConfigPost; type SubscriberConfigPost = { - /** - * - The name of the subscriber. - */ name: string; - /** - * - The type of the subscriber, which can be null. - */ - type?: string; - /** - * - The URL for the subscriber's webhook. - */ webhook_url: string; association: Association; - /** - * - Custom headers for the subscriber. - */ custom_headers?: any; status: SubscriberStatus; - /** - * - The email ID associated with the subscriber. - */ email_id: string; auth_meta?: AuthMeta; - /** - * - The list of event IDs associated with the subscriber. - */ event_id: number[]; }; /** @returns {SubscriberConfigUpdate} */ declare function SubscriberConfigUpdate(): SubscriberConfigUpdate; type SubscriberConfigUpdate = { - /** - * - The unique identifier of the subscriber to be updated. - */ id: number; - /** - * - The name of the subscriber. - */ name?: string; - /** - * - The type of the subscriber, which can be null. - */ - type?: string; - /** - * - The URL for the subscriber's webhook. - */ webhook_url?: string; association?: Association; - /** - * - Custom headers for the subscriber. - */ custom_headers?: any; status?: SubscriberStatus; - /** - * - The email ID associated with the subscriber. - */ email_id?: string; auth_meta?: AuthMeta; - /** - * - The list of event IDs associated with the subscriber. - */ event_id: number[]; }; -/** @returns {SubscriberConfigResult} */ -declare function SubscriberConfigResult(): SubscriberConfigResult; -type SubscriberConfigResult = { - /** - * - The unique identifier of the subscriber configuration. - */ +/** @returns {SubscriberConfigResponse} */ +declare function SubscriberConfigResponse(): SubscriberConfigResponse; +type SubscriberConfigResponse = { id?: number; - /** - * - The identifier of the user who last - * modified the subscriber configuration. - */ modified_by?: string; - /** - * - The name of the subscriber. - */ name?: string; - /** - * - The URL for the subscriber's webhook. - */ webhook_url?: string; - /** - * - The provider of the subscriber. - */ provider?: string; association?: AssociationResp; - /** - * - Custom headers for the subscriber. - */ custom_headers?: any; status?: SubscriberStatus; - /** - * - The email ID associated with the subscriber. - */ email_id?: string; - /** - * - The date and time when the subscriber was - * last updated. - */ updated_on?: string; - /** - * - The date and time when the subscriber was created. - */ created_on?: string; - /** - * - The type of the subscriber, which can be null. - */ type?: string; auth_meta?: AuthMeta; - /** - * - The list of event IDs associated with the subscriber. - */ event_id?: number[]; }; /** @returns {SubscriberConfigList} */ declare function SubscriberConfigList(): SubscriberConfigList; type SubscriberConfigList = { - items?: SubscriberDetails[]; + items?: SubscriberResponse[]; page?: Page; }; -/** @returns {RestEventData} */ -declare function RestEventData(): RestEventData; -type RestEventData = { - /** - * - The category of the event. - */ - event_category: string; - /** - * - The name of the event. - */ - event_name: string; - /** - * - The type of the event. - */ - event_type: string; - /** - * - The version number of the event. - */ - version: number; -}; -/** @returns {RestConfig} */ -declare function RestConfig(): RestConfig; -type RestConfig = { - /** - * - The URL for the webhook. - */ - webhook_url: string; - /** - * - The type of the configuration. - */ - type: string; - /** - * - Custom headers for the configuration. - */ - custom_headers?: any; - auth_meta?: AuthMeta; - events: RestEventData[]; -}; -/** @returns {QueueEventData} */ -declare function QueueEventData(): QueueEventData; -type QueueEventData = { - /** - * - The category of the event. - */ - event_category: string; - /** - * - The name of the event. - */ - event_name: string; - /** - * - The type of the event. - */ - event_type: string; - /** - * - The version number of the event. - */ - version: number; - /** - * - The topic associated with the event. - */ - topic: string; -}; -/** @returns {KafkaConfig} */ -declare function KafkaConfig(): KafkaConfig; -type KafkaConfig = { - type?: string; - events: QueueEventData[]; -}; -/** @returns {PubSubConfig} */ -declare function PubSubConfig(): PubSubConfig; -type PubSubConfig = { - type?: string; - events: QueueEventData[]; -}; -/** @returns {TemporalEventData} */ -declare function TemporalEventData(): TemporalEventData; -type TemporalEventData = { - /** - * - The category of the event. - */ - event_category: string; - /** - * - The name of the event. - */ - event_name: string; - /** - * - The type of the event. - */ - event_type: string; - /** - * - The version number of the event. - */ - version: number; - /** - * - The queue associated with the event. - */ - queue?: string; - /** - * - The workflow name related to the event. - */ - workflow_name?: string; -}; -/** @returns {TemporalConfig} */ -declare function TemporalConfig(): TemporalConfig; -type TemporalConfig = { - type?: string; - events: TemporalEventData[]; -}; -/** @returns {SqsEventData} */ -declare function SqsEventData(): SqsEventData; -type SqsEventData = { - /** - * - The category of the event. - */ - event_category: string; - /** - * - The name of the event. - */ - event_name: string; - /** - * - The type of the event. - */ - event_type: string; - /** - * - The version number of the event. - */ - version: number; - /** - * - The queue name associated with the event in SQS. - */ - queue?: string; -}; -/** @returns {SqsConfig} */ -declare function SqsConfig(): SqsConfig; -type SqsConfig = { - type?: string; - events: SqsEventData[]; -}; -/** @returns {EventBridgeData} */ -declare function EventBridgeData(): EventBridgeData; -type EventBridgeData = { - /** - * - The category of the event. - */ - event_category: string; - /** - * - The name of the event. - */ - event_name: string; - /** - * - The type of the event. - */ - event_type: string; - /** - * - The version number of the event. - */ - version: number; - /** - * - The name of the event bridge related - * to the event. - */ - event_bridge_name?: string; -}; -/** @returns {EventBridgeConfig} */ -declare function EventBridgeConfig(): EventBridgeConfig; -type EventBridgeConfig = { - type?: string; - events: EventBridgeData[]; -}; -/** @returns {EventMapBody} */ -declare function EventMapBody(): EventMapBody; -type EventMapBody = { - rest?: RestConfig; - kafka?: KafkaConfig; - pub_sub?: PubSubConfig; - temporal?: TemporalConfig; - sqs?: SqsConfig; - event_bridge?: EventBridgeConfig; -}; -/** @returns {WebhookConfig} */ -declare function WebhookConfig(): WebhookConfig; -type WebhookConfig = { - /** - * - The email address for notifications. - */ - notification_email?: string; - /** - * - The name of the webhook configuration. - */ - name?: string; - /** - * - The status of the webhook (e.g., active or inactive). - */ - status?: string; - association?: Association; - event_map?: EventMapBody; -}; -/** @returns {UpsertSubscriberConfig} */ -declare function UpsertSubscriberConfig(): UpsertSubscriberConfig; -type UpsertSubscriberConfig = { - webhook_config: WebhookConfig; -}; -/** @returns {UpsertSubscriberConfigResult} */ -declare function UpsertSubscriberConfigResult(): UpsertSubscriberConfigResult; -type UpsertSubscriberConfigResult = { - /** - * - The status of the upsert operation (e.g., - * success or failure). - */ - status?: boolean; - /** - * - A message providing details about the upsert - * operation result. - */ - message?: string; -}; /** * Enum: SubscriberStatus Used By: Webhook * diff --git a/sdk/platform/Webhook/WebhookPlatformModel.js b/sdk/platform/Webhook/WebhookPlatformModel.js index d6a9fc354..bf812b0b9 100644 --- a/sdk/platform/Webhook/WebhookPlatformModel.js +++ b/sdk/platform/Webhook/WebhookPlatformModel.js @@ -1,5 +1,50 @@ const Joi = require("joi"); +/** + * @typedef Event + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [event_category] + * @property {string} [version] + */ + +/** + * @typedef EventProcessRequest + * @property {string} [search_text] + * @property {string} end_date + * @property {string} start_date + * @property {number[]} [subscriber_ids] + * @property {string} [status] + * @property {Event[]} [event] + */ + +/** + * @typedef DownloadReportResponse + * @property {string} [file_name] + */ + +/** + * @typedef EventProcessReports + * @property {EventProcessReportObject[]} [rows] + * @property {Page} [page] + */ + +/** + * @typedef EventProcessReportObject + * @property {string} [event_name] - The name of the processed event. + * @property {number} [response_code] - The response code of the event. + * @property {string} [response_message] - The response message of the event. + * @property {string} [data] - The data associated with the event. + * @property {number} [attempt] - The attempt number of the event. + * @property {number} [last_attempted_on] - The timestamp of the last attempted event. + * @property {string} [status] - The status of the event (e.g., "FAILED"). + * @property {string} [name] - The name of the event. + * @property {string} [webhook_url] - The webhook URL associated with the event. + * @property {number} [response_time] - The response time of the event. + * @property {string} [message_id] + * @property {string} [event_trace_id] + */ + /** * @typedef Page * @property {number} [item_total] - The total number of items on the page. @@ -12,317 +57,309 @@ const Joi = require("joi"); */ /** - * @typedef BroadcasterConfig - * @property {string} [topic] - The name of the topic for the broadcaster configuration. - * @property {string} [queue] - The name of the queue for the broadcaster configuration. - * @property {string} [event_bridge_name] - The name of the event bridge - * associated with the broadcaster. - * @property {string} [workflow_name] - The name of the workflow related to the - * broadcaster. - * @property {string} [account_id] - The account ID associated with the broadcaster. - * @property {string} [detail_type] - The type of detail for the broadcaster - * configuration. + * @typedef PingWebhook + * @property {string} webhook_url - The URL of the subscriber's webhook to ping. + * @property {Object} [auth_meta] - Authentication metadata (if required by the + * subscriber). + * @property {Object} [custom_headers] - Custom headers to include in the ping request. + */ + +/** + * @typedef PingWebhookResponse + * @property {string} [status] - The status of the ping (e.g., "SUCCESS"). + * @property {string} [message] - An optional message related to the ping. + * @property {number} [code] - The HTTP status code of the ping response (e.g., 200). */ /** * @typedef SubscriberEventMapping - * @property {number} [id] - The unique identifier for the subscriber event mapping. - * @property {number} [event_id] - The ID of the event associated with the subscriber. - * @property {number} [subscriber_id] - The ID of the subscriber. - * @property {BroadcasterConfig} [broadcaster_config] - * @property {string} [created_on] - The date and time when the subscriber event - * mapping was created. + * @property {number} [id] + * @property {number} [event_id] + * @property {number} [subscriber_id] + * @property {string} [topic] + * @property {string} [created_on] */ /** * @typedef EventConfig - * @property {number} [id] - The unique identifier for the event configuration. - * @property {string} [type] - The type of event configuration, which may be null. - * @property {string} [event_name] - The name of the event. - * @property {string} [event_type] - The type of the event. - * @property {string} [event_category] - The category of the event. - * @property {string} [modified_by] - The identifier of the user who last - * modified the event configuration. + * @property {number} [id] + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [event_category] * @property {SubscriberEventMapping} [subscriber_event_mapping] - * @property {Object} [event_schema] - The schema for the event, allowing for - * additional properties and may be null. - * @property {string} [group] - The group associated with the event - * configuration, which may be null. - * @property {string} [version] - The version of the event configuration. - * @property {string} [display_name] - The display name of the event configuration. - * @property {string} [description] - A description of the event configuration, - * which may be null. - * @property {string} [created_on] - The date and time when the event - * configuration was created. - * @property {string} [updated_on] - The date and time when the event - * configuration was last updated. - */ - -/** - * @typedef EventConfigResult - * @property {EventConfig[]} [event_configs] + * @property {Object} [event_schema] + * @property {string} [group] + * @property {string} [version] + * @property {string} [display_name] + * @property {string} [description] + * @property {string} [created_on] + * @property {string} [updated_on] */ /** - * @typedef Association - * @property {string[]} [application_id] - A list of application IDs associated - * with the association. - * @property {string} [extension_id] - The extension ID associated with the association. - * @property {string} [criteria] - The criteria for the association, such as - * "ALL", "EMPTY", or "SPECIFIC-EVENTS". + * @typedef EventConfigResponse + * @property {EventConfig[]} [event_configs] */ /** - * @typedef AssociationResp - * @property {number} [company_id] - The ID of the company associated with the response. - * @property {string[]} [application_id] - A list of application IDs associated - * with the response. - * @property {string} [extension_id] - The extension ID associated with the response. - * @property {string} [criteria] - The criteria for the response, such as "ALL", - * "EMPTY", or "SPECIFIC-EVENTS". + * @typedef ReportFiltersPayload + * @property {number[]} subscriber_ids - An array of subscriber IDs for + * filtering filters (optional). */ /** - * @typedef AuthMeta - * @property {string} [type] - The type of authentication method used. - * @property {string} [secret] - The secret key or token used for authentication. + * @typedef ReportFilterResponse + * @property {string} [filter_name] - The name of the filter. + * @property {Object[]} [values] */ /** - * @typedef SubscriberDetails - * @property {number} [id] - The unique identifier of the subscriber. - * @property {string} [modified_by] - The identifier of the user who last - * modified the subscriber details. - * @property {string} [name] - The name of the subscriber. - * @property {string} [provider] - The provider of the subscriber. - * @property {string} [webhook_url] - The URL for the subscriber's webhook. - * @property {AssociationResp} [association] - * @property {Object} [custom_headers] - Custom headers for the subscriber. - * @property {SubscriberStatus} [status] - * @property {string} [email_id] - The email ID associated with the subscriber. - * @property {string} [updated_on] - The date and time when the subscriber - * details were last updated. - * @property {string} [created_on] - The date and time when the subscriber was created. - * @property {string} [type] - The type of subscriber, which can either be passed as null. - * @property {AuthMeta} [auth_meta] - * @property {EventConfig[]} [event_configs] + * @typedef HistoryPayload + * @property {string} type - The type of history report (e.g., "platform"). + * @property {number} [page_no] - The page number of the history report. + * @property {number} [page_size] - The number of records per page. */ /** - * @typedef Events - * @property {string} [slug] - The slug or identifier for the event. - * @property {string} [topic] - The topic associated with the event. - * @property {string} [queue] - The queue associated with the event in case of - * provider as Pub/Sub. - * @property {string} [event_bridge_name] - The name of the event bridge - * associated with the event in case of provider as AWS event bridge. - * @property {string} [workflow_name] - The name of the workflow related to the - * event in case of provider as temporal. - * @property {string} [detail_type] - The type of detail for the event. + * @typedef HistoryFilters + * @property {string[]} [events] + * @property {string} [search_text] + * @property {string} [status] - The status of the history report (e.g., "FAILED"). + * @property {string} [end_date] - The end date and time of the history report. + * @property {string} [start_date] - The start date and time of the history report. + * @property {number[]} [subscribers] - An array of subscriber IDs associated + * with the history report. + * @property {string[]} [webhook_type] - An array of webhook type to identify + * thetype of subscriber i.e (KAFKA or REST). */ /** - * @typedef SubscriberConfigPostRequestV2 - * @property {string} name - The name of the subscriber. - * @property {string} [type] - The type of the subscriber, which may be null. - * @property {string} [webhook_url] - The URL for the subscriber's webhook. - * @property {string} provider - The provider of the subscriber. - * @property {Association} association - * @property {Object} [custom_headers] - Custom headers for the subscriber. - * @property {SubscriberStatus} status - * @property {string} email_id - The email ID associated with the subscriber. - * @property {AuthMeta} [auth_meta] - * @property {Events[]} events - The list of events associated with the subscriber. + * @typedef Url + * @property {string} [url] - The URL of the uploaded report file. + * @property {string} [name] - The name of the uploaded report file. */ /** - * @typedef SubscriberConfigUpdateRequestV2 - * @property {number} id - The unique identifier of the subscriber to be updated. - * @property {string} [name] - The name of the subscriber. - * @property {string} [type] - The type of the subscriber, which may be null. - * @property {string} [webhook_url] - The URL for the subscriber's webhook. - * @property {string} provider - The provider of the subscriber. - * @property {Association} [association] - * @property {Object} [custom_headers] - Custom headers for the subscriber. - * @property {SubscriberStatus} status - * @property {string} [email_id] - The email ID associated with the subscriber. - * @property {AuthMeta} [auth_meta] - * @property {Events[]} [events] - The list of events associated with the subscriber. + * @typedef CdnObject + * @property {Url[]} [urls] */ /** - * @typedef SubscriberConfigPost - * @property {string} name - The name of the subscriber. - * @property {string} [type] - The type of the subscriber, which can be null. - * @property {string} webhook_url - The URL for the subscriber's webhook. - * @property {Association} association - * @property {Object} [custom_headers] - Custom headers for the subscriber. - * @property {SubscriberStatus} status - * @property {string} email_id - The email ID associated with the subscriber. - * @property {AuthMeta} [auth_meta] - * @property {number[]} event_id - The list of event IDs associated with the subscriber. + * @typedef UploadServiceObject + * @property {CdnObject} [cdn] */ /** - * @typedef SubscriberConfigUpdate - * @property {number} id - The unique identifier of the subscriber to be updated. - * @property {string} [name] - The name of the subscriber. - * @property {string} [type] - The type of the subscriber, which can be null. - * @property {string} [webhook_url] - The URL for the subscriber's webhook. - * @property {Association} [association] - * @property {Object} [custom_headers] - Custom headers for the subscriber. - * @property {SubscriberStatus} [status] - * @property {string} [email_id] - The email ID associated with the subscriber. - * @property {AuthMeta} [auth_meta] - * @property {number[]} event_id - The list of event IDs associated with the subscriber. + * @typedef HistoryAssociation + * @property {number} [company_id] + * @property {number[]} [subscriber_ids] */ /** - * @typedef SubscriberConfigResult - * @property {number} [id] - The unique identifier of the subscriber configuration. - * @property {string} [modified_by] - The identifier of the user who last - * modified the subscriber configuration. - * @property {string} [name] - The name of the subscriber. - * @property {string} [webhook_url] - The URL for the subscriber's webhook. - * @property {string} [provider] - The provider of the subscriber. - * @property {AssociationResp} [association] - * @property {Object} [custom_headers] - Custom headers for the subscriber. - * @property {SubscriberStatus} [status] - * @property {string} [email_id] - The email ID associated with the subscriber. - * @property {string} [updated_on] - The date and time when the subscriber was - * last updated. - * @property {string} [created_on] - The date and time when the subscriber was created. - * @property {string} [type] - The type of the subscriber, which can be null. - * @property {AuthMeta} [auth_meta] - * @property {number[]} [event_id] - The list of event IDs associated with the subscriber. + * @typedef HistoryItems + * @property {number} [id] - The ID of the history report. + * @property {HistoryAssociation} [association] + * @property {HistoryFilters} [filters] + * @property {string} [filename] - The filename of the history report. + * @property {string} [status] - The status of the history report (e.g., "COMPLETED"). + * @property {UploadServiceObject} [upload_service_response] + * @property {string} [created_on] - The date and time when the history report + * was created. + * @property {string} [updated_on] - The date and time when the history report + * was last updated. + * @property {string} [message] - A message related to the history report. */ /** - * @typedef SubscriberConfigList - * @property {SubscriberDetails[]} [items] + * @typedef HistoryResponse + * @property {HistoryItems[]} [items] * @property {Page} [page] */ /** - * @typedef RestEventData - * @property {string} event_category - The category of the event. - * @property {string} event_name - The name of the event. - * @property {string} event_type - The type of the event. - * @property {number} version - The version number of the event. + * @typedef CancelResponse + * @property {string} [message] - The HTTP status code of the response (e.g., 200). */ /** - * @typedef RestConfig - * @property {string} webhook_url - The URL for the webhook. - * @property {string} type - The type of the configuration. - * @property {Object} [custom_headers] - Custom headers for the configuration. - * @property {AuthMeta} [auth_meta] - * @property {RestEventData[]} events + * @typedef Association + * @property {string[]} [application_id] + * @property {string} [extension_id] + * @property {string} [criteria] */ /** - * @typedef QueueEventData - * @property {string} event_category - The category of the event. - * @property {string} event_name - The name of the event. - * @property {string} event_type - The type of the event. - * @property {number} version - The version number of the event. - * @property {string} topic - The topic associated with the event. + * @typedef AssociationResp + * @property {number} [company_id] + * @property {string[]} [application_id] + * @property {string} [extension_id] + * @property {string} [criteria] */ /** - * @typedef KafkaConfig + * @typedef AuthMeta * @property {string} [type] - * @property {QueueEventData[]} events + * @property {string} [secret] */ /** - * @typedef PubSubConfig + * @typedef SubscriberResponse + * @property {number} [id] + * @property {string} [modified_by] + * @property {string} [name] + * @property {string} [provider] + * @property {string} [webhook_url] + * @property {AssociationResp} [association] + * @property {Object} [custom_headers] + * @property {SubscriberStatus} [status] + * @property {string} [email_id] + * @property {string} [updated_on] + * @property {string} [created_on] * @property {string} [type] - * @property {QueueEventData[]} events + * @property {AuthMeta} [auth_meta] + * @property {EventConfig[]} [event_configs] */ /** - * @typedef TemporalEventData - * @property {string} event_category - The category of the event. - * @property {string} event_name - The name of the event. - * @property {string} event_type - The type of the event. - * @property {number} version - The version number of the event. - * @property {string} [queue] - The queue associated with the event. - * @property {string} [workflow_name] - The workflow name related to the event. + * @typedef Events + * @property {string} [slug] + * @property {string} [topic] */ /** - * @typedef TemporalConfig - * @property {string} [type] - * @property {TemporalEventData[]} events + * @typedef SubscriberConfigPostRequestV2 + * @property {string} name + * @property {string} [webhook_url] + * @property {string} provider + * @property {Association} association + * @property {Object} [custom_headers] + * @property {SubscriberStatus} status + * @property {string} email_id + * @property {AuthMeta} [auth_meta] + * @property {Events[]} events */ /** - * @typedef SqsEventData - * @property {string} event_category - The category of the event. - * @property {string} event_name - The name of the event. - * @property {string} event_type - The type of the event. - * @property {number} version - The version number of the event. - * @property {string} [queue] - The queue name associated with the event in SQS. + * @typedef SubscriberConfigUpdateRequestV2 + * @property {number} id + * @property {string} [name] + * @property {string} [webhook_url] + * @property {string} provider + * @property {Association} [association] + * @property {Object} [custom_headers] + * @property {SubscriberStatus} status + * @property {string} [email_id] + * @property {AuthMeta} [auth_meta] + * @property {Events[]} [events] */ /** - * @typedef SqsConfig - * @property {string} [type] - * @property {SqsEventData[]} events + * @typedef SubscriberConfigPost + * @property {string} name + * @property {string} webhook_url + * @property {Association} association + * @property {Object} [custom_headers] + * @property {SubscriberStatus} status + * @property {string} email_id + * @property {AuthMeta} [auth_meta] + * @property {number[]} event_id */ /** - * @typedef EventBridgeData - * @property {string} event_category - The category of the event. - * @property {string} event_name - The name of the event. - * @property {string} event_type - The type of the event. - * @property {number} version - The version number of the event. - * @property {string} [event_bridge_name] - The name of the event bridge related - * to the event. + * @typedef SubscriberConfigUpdate + * @property {number} id + * @property {string} [name] + * @property {string} [webhook_url] + * @property {Association} [association] + * @property {Object} [custom_headers] + * @property {SubscriberStatus} [status] + * @property {string} [email_id] + * @property {AuthMeta} [auth_meta] + * @property {number[]} event_id */ /** - * @typedef EventBridgeConfig + * @typedef SubscriberConfigResponse + * @property {number} [id] + * @property {string} [modified_by] + * @property {string} [name] + * @property {string} [webhook_url] + * @property {string} [provider] + * @property {AssociationResp} [association] + * @property {Object} [custom_headers] + * @property {SubscriberStatus} [status] + * @property {string} [email_id] + * @property {string} [updated_on] + * @property {string} [created_on] * @property {string} [type] - * @property {EventBridgeData[]} events + * @property {AuthMeta} [auth_meta] + * @property {number[]} [event_id] */ /** - * @typedef EventMapBody - * @property {RestConfig} [rest] - * @property {KafkaConfig} [kafka] - * @property {PubSubConfig} [pub_sub] - * @property {TemporalConfig} [temporal] - * @property {SqsConfig} [sqs] - * @property {EventBridgeConfig} [event_bridge] + * @typedef SubscriberConfigList + * @property {SubscriberResponse[]} [items] + * @property {Page} [page] */ -/** - * @typedef WebhookConfig - * @property {string} [notification_email] - The email address for notifications. - * @property {string} [name] - The name of the webhook configuration. - * @property {string} [status] - The status of the webhook (e.g., active or inactive). - * @property {Association} [association] - * @property {EventMapBody} [event_map] - */ +/** @typedef {"active" | "inactive"} SubscriberStatus */ -/** - * @typedef UpsertSubscriberConfig - * @property {WebhookConfig} webhook_config - */ +class WebhookPlatformModel { + /** @returns {Event} */ + static Event() { + return Joi.object({ + event_name: Joi.string().allow(""), + event_type: Joi.string().allow(""), + event_category: Joi.string().allow(""), + version: Joi.string().allow(""), + }); + } -/** - * @typedef UpsertSubscriberConfigResult - * @property {boolean} [status] - The status of the upsert operation (e.g., - * success or failure). - * @property {string} [message] - A message providing details about the upsert - * operation result. - */ + /** @returns {EventProcessRequest} */ + static EventProcessRequest() { + return Joi.object({ + search_text: Joi.string().allow(""), + end_date: Joi.string().allow("").required(), + start_date: Joi.string().allow("").required(), + subscriber_ids: Joi.array().items(Joi.number()), + status: Joi.string().allow(""), + event: Joi.array().items(WebhookPlatformModel.Event()), + }); + } -/** @typedef {"active" | "inactive"} SubscriberStatus */ + /** @returns {DownloadReportResponse} */ + static DownloadReportResponse() { + return Joi.object({ + file_name: Joi.string().allow(""), + }); + } + + /** @returns {EventProcessReports} */ + static EventProcessReports() { + return Joi.object({ + rows: Joi.array().items(WebhookPlatformModel.EventProcessReportObject()), + page: WebhookPlatformModel.Page(), + }); + } + + /** @returns {EventProcessReportObject} */ + static EventProcessReportObject() { + return Joi.object({ + event_name: Joi.string().allow(""), + response_code: Joi.number(), + response_message: Joi.string().allow(""), + data: Joi.string().allow(""), + attempt: Joi.number(), + last_attempted_on: Joi.number(), + status: Joi.string().allow(""), + name: Joi.string().allow(""), + webhook_url: Joi.string().allow(""), + response_time: Joi.number(), + message_id: Joi.string().allow(""), + event_trace_id: Joi.string().allow(""), + }); + } -class WebhookPlatformModel { /** @returns {Page} */ static Page() { return Joi.object({ @@ -336,16 +373,22 @@ class WebhookPlatformModel { }); } - /** @returns {BroadcasterConfig} */ - static BroadcasterConfig() { + /** @returns {PingWebhook} */ + static PingWebhook() { return Joi.object({ - topic: Joi.string().allow(""), - queue: Joi.string().allow(""), - event_bridge_name: Joi.string().allow(""), - workflow_name: Joi.string().allow(""), - account_id: Joi.string().allow(""), - detail_type: Joi.string().allow(""), - }).allow(null); + webhook_url: Joi.string().allow("").required(), + auth_meta: Joi.any(), + custom_headers: Joi.any(), + }); + } + + /** @returns {PingWebhookResponse} */ + static PingWebhookResponse() { + return Joi.object({ + status: Joi.string().allow(""), + message: Joi.string().allow(""), + code: Joi.number(), + }); } /** @returns {SubscriberEventMapping} */ @@ -354,7 +397,7 @@ class WebhookPlatformModel { id: Joi.number(), event_id: Joi.number(), subscriber_id: Joi.number(), - broadcaster_config: WebhookPlatformModel.BroadcasterConfig(), + topic: Joi.string().allow("").allow(null), created_on: Joi.string().allow(""), }); } @@ -363,11 +406,9 @@ class WebhookPlatformModel { static EventConfig() { return Joi.object({ id: Joi.number(), - type: Joi.string().allow("").allow(null), event_name: Joi.string().allow(""), event_type: Joi.string().allow(""), event_category: Joi.string().allow(""), - modified_by: Joi.string().allow(""), subscriber_event_mapping: WebhookPlatformModel.SubscriberEventMapping(), event_schema: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), group: Joi.string().allow("").allow(null), @@ -379,13 +420,110 @@ class WebhookPlatformModel { }); } - /** @returns {EventConfigResult} */ - static EventConfigResult() { + /** @returns {EventConfigResponse} */ + static EventConfigResponse() { return Joi.object({ event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()), }); } + /** @returns {ReportFiltersPayload} */ + static ReportFiltersPayload() { + return Joi.object({ + subscriber_ids: Joi.array().items(Joi.number()).required(), + }); + } + + /** @returns {ReportFilterResponse} */ + static ReportFilterResponse() { + return Joi.object({ + filter_name: Joi.string().allow(""), + values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + }); + } + + /** @returns {HistoryPayload} */ + static HistoryPayload() { + return Joi.object({ + type: Joi.string().allow("").required(), + page_no: Joi.number(), + page_size: Joi.number(), + }); + } + + /** @returns {HistoryFilters} */ + static HistoryFilters() { + return Joi.object({ + events: Joi.array().items(Joi.string().allow("")), + search_text: Joi.string().allow(""), + status: Joi.string().allow(""), + end_date: Joi.string().allow(""), + start_date: Joi.string().allow(""), + subscribers: Joi.array().items(Joi.number()), + webhook_type: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {Url} */ + static Url() { + return Joi.object({ + url: Joi.string().allow(""), + name: Joi.string().allow(""), + }); + } + + /** @returns {CdnObject} */ + static CdnObject() { + return Joi.object({ + urls: Joi.array().items(WebhookPlatformModel.Url()), + }); + } + + /** @returns {UploadServiceObject} */ + static UploadServiceObject() { + return Joi.object({ + cdn: WebhookPlatformModel.CdnObject(), + }).allow(null); + } + + /** @returns {HistoryAssociation} */ + static HistoryAssociation() { + return Joi.object({ + company_id: Joi.number(), + subscriber_ids: Joi.array().items(Joi.number()), + }); + } + + /** @returns {HistoryItems} */ + static HistoryItems() { + return Joi.object({ + id: Joi.number(), + association: WebhookPlatformModel.HistoryAssociation(), + filters: WebhookPlatformModel.HistoryFilters(), + filename: Joi.string().allow(""), + status: Joi.string().allow(""), + upload_service_response: WebhookPlatformModel.UploadServiceObject(), + created_on: Joi.string().allow(""), + updated_on: Joi.string().allow("").allow(null), + message: Joi.string().allow(""), + }); + } + + /** @returns {HistoryResponse} */ + static HistoryResponse() { + return Joi.object({ + items: Joi.array().items(WebhookPlatformModel.HistoryItems()), + page: WebhookPlatformModel.Page(), + }); + } + + /** @returns {CancelResponse} */ + static CancelResponse() { + return Joi.object({ + message: Joi.string().allow(""), + }); + } + /** @returns {Association} */ static Association() { return Joi.object({ @@ -413,8 +551,8 @@ class WebhookPlatformModel { }); } - /** @returns {SubscriberDetails} */ - static SubscriberDetails() { + /** @returns {SubscriberResponse} */ + static SubscriberResponse() { return Joi.object({ id: Joi.number(), modified_by: Joi.string().allow(""), @@ -422,7 +560,7 @@ class WebhookPlatformModel { provider: Joi.string().allow(""), webhook_url: Joi.string().allow(""), association: WebhookPlatformModel.AssociationResp(), - custom_headers: Joi.object().pattern(/\S/, Joi.any()).allow(null, ""), + custom_headers: Joi.any(), status: WebhookPlatformModel.SubscriberStatus(), email_id: Joi.string().allow(""), updated_on: Joi.string().allow(""), @@ -438,10 +576,6 @@ class WebhookPlatformModel { return Joi.object({ slug: Joi.string().allow(""), topic: Joi.string().allow(""), - queue: Joi.string().allow(""), - event_bridge_name: Joi.string().allow(""), - workflow_name: Joi.string().allow(""), - detail_type: Joi.string().allow(""), }); } @@ -449,11 +583,10 @@ class WebhookPlatformModel { static SubscriberConfigPostRequestV2() { return Joi.object({ name: Joi.string().allow("").required(), - type: Joi.string().allow("").allow(null), webhook_url: Joi.string().allow(""), provider: Joi.string().allow("").required(), association: WebhookPlatformModel.Association().required(), - custom_headers: Joi.object().pattern(/\S/, Joi.any()), + custom_headers: Joi.any(), status: WebhookPlatformModel.SubscriberStatus().required(), email_id: Joi.string().allow("").required(), auth_meta: WebhookPlatformModel.AuthMeta(), @@ -466,11 +599,10 @@ class WebhookPlatformModel { return Joi.object({ id: Joi.number().required(), name: Joi.string().allow(""), - type: Joi.string().allow("").allow(null), webhook_url: Joi.string().allow(""), provider: Joi.string().allow("").required(), association: WebhookPlatformModel.Association(), - custom_headers: Joi.object().pattern(/\S/, Joi.any()), + custom_headers: Joi.any(), status: WebhookPlatformModel.SubscriberStatus().required(), email_id: Joi.string().allow(""), auth_meta: WebhookPlatformModel.AuthMeta(), @@ -482,10 +614,9 @@ class WebhookPlatformModel { static SubscriberConfigPost() { return Joi.object({ name: Joi.string().allow("").required(), - type: Joi.string().allow("").allow(null), webhook_url: Joi.string().allow("").required(), association: WebhookPlatformModel.Association().required(), - custom_headers: Joi.object().pattern(/\S/, Joi.any()), + custom_headers: Joi.any(), status: WebhookPlatformModel.SubscriberStatus().required(), email_id: Joi.string().allow("").required(), auth_meta: WebhookPlatformModel.AuthMeta(), @@ -498,10 +629,9 @@ class WebhookPlatformModel { return Joi.object({ id: Joi.number().required(), name: Joi.string().allow(""), - type: Joi.string().allow("").allow(null), webhook_url: Joi.string().allow(""), association: WebhookPlatformModel.Association(), - custom_headers: Joi.object().pattern(/\S/, Joi.any()), + custom_headers: Joi.any(), status: WebhookPlatformModel.SubscriberStatus(), email_id: Joi.string().allow(""), auth_meta: WebhookPlatformModel.AuthMeta(), @@ -509,8 +639,8 @@ class WebhookPlatformModel { }); } - /** @returns {SubscriberConfigResult} */ - static SubscriberConfigResult() { + /** @returns {SubscriberConfigResponse} */ + static SubscriberConfigResponse() { return Joi.object({ id: Joi.number(), modified_by: Joi.string().allow(""), @@ -518,7 +648,7 @@ class WebhookPlatformModel { webhook_url: Joi.string().allow(""), provider: Joi.string().allow(""), association: WebhookPlatformModel.AssociationResp(), - custom_headers: Joi.object().pattern(/\S/, Joi.any()), + custom_headers: Joi.any(), status: WebhookPlatformModel.SubscriberStatus(), email_id: Joi.string().allow(""), updated_on: Joi.string().allow(""), @@ -532,165 +662,11 @@ class WebhookPlatformModel { /** @returns {SubscriberConfigList} */ static SubscriberConfigList() { return Joi.object({ - items: Joi.array().items(WebhookPlatformModel.SubscriberDetails()), + items: Joi.array().items(WebhookPlatformModel.SubscriberResponse()), page: WebhookPlatformModel.Page(), }); } - /** @returns {RestEventData} */ - static RestEventData() { - return Joi.object({ - event_category: Joi.string().allow("").required(), - event_name: Joi.string().allow("").required(), - event_type: Joi.string().allow("").required(), - version: Joi.number().required(), - }); - } - - /** @returns {RestConfig} */ - static RestConfig() { - return Joi.object({ - webhook_url: Joi.string().allow("").required(), - type: Joi.string().allow("").required(), - custom_headers: Joi.object().pattern(/\S/, Joi.any()), - auth_meta: WebhookPlatformModel.AuthMeta(), - events: Joi.array() - .items(WebhookPlatformModel.RestEventData()) - .required(), - }); - } - - /** @returns {QueueEventData} */ - static QueueEventData() { - return Joi.object({ - event_category: Joi.string().allow("").required(), - event_name: Joi.string().allow("").required(), - event_type: Joi.string().allow("").required(), - version: Joi.number().required(), - topic: Joi.string().allow("").required(), - }); - } - - /** @returns {KafkaConfig} */ - static KafkaConfig() { - return Joi.object({ - type: Joi.string().allow("").allow(null), - events: Joi.array() - .items(WebhookPlatformModel.QueueEventData()) - .required(), - }); - } - - /** @returns {PubSubConfig} */ - static PubSubConfig() { - return Joi.object({ - type: Joi.string().allow("").allow(null), - events: Joi.array() - .items(WebhookPlatformModel.QueueEventData()) - .required(), - }); - } - - /** @returns {TemporalEventData} */ - static TemporalEventData() { - return Joi.object({ - event_category: Joi.string().allow("").required(), - event_name: Joi.string().allow("").required(), - event_type: Joi.string().allow("").required(), - version: Joi.number().required(), - queue: Joi.string().allow(""), - workflow_name: Joi.string().allow(""), - }); - } - - /** @returns {TemporalConfig} */ - static TemporalConfig() { - return Joi.object({ - type: Joi.string().allow("").allow(null), - events: Joi.array() - .items(WebhookPlatformModel.TemporalEventData()) - .required(), - }); - } - - /** @returns {SqsEventData} */ - static SqsEventData() { - return Joi.object({ - event_category: Joi.string().allow("").required(), - event_name: Joi.string().allow("").required(), - event_type: Joi.string().allow("").required(), - version: Joi.number().required(), - queue: Joi.string().allow(""), - }); - } - - /** @returns {SqsConfig} */ - static SqsConfig() { - return Joi.object({ - type: Joi.string().allow("").allow(null), - events: Joi.array().items(WebhookPlatformModel.SqsEventData()).required(), - }); - } - - /** @returns {EventBridgeData} */ - static EventBridgeData() { - return Joi.object({ - event_category: Joi.string().allow("").required(), - event_name: Joi.string().allow("").required(), - event_type: Joi.string().allow("").required(), - version: Joi.number().required(), - event_bridge_name: Joi.string().allow(""), - }); - } - - /** @returns {EventBridgeConfig} */ - static EventBridgeConfig() { - return Joi.object({ - type: Joi.string().allow("").allow(null), - events: Joi.array() - .items(WebhookPlatformModel.EventBridgeData()) - .required(), - }); - } - - /** @returns {EventMapBody} */ - static EventMapBody() { - return Joi.object({ - rest: WebhookPlatformModel.RestConfig(), - kafka: WebhookPlatformModel.KafkaConfig(), - pub_sub: WebhookPlatformModel.PubSubConfig(), - temporal: WebhookPlatformModel.TemporalConfig(), - sqs: WebhookPlatformModel.SqsConfig(), - event_bridge: WebhookPlatformModel.EventBridgeConfig(), - }); - } - - /** @returns {WebhookConfig} */ - static WebhookConfig() { - return Joi.object({ - notification_email: Joi.string().allow(""), - name: Joi.string().allow(""), - status: Joi.string().allow(""), - association: WebhookPlatformModel.Association(), - event_map: WebhookPlatformModel.EventMapBody(), - }); - } - - /** @returns {UpsertSubscriberConfig} */ - static UpsertSubscriberConfig() { - return Joi.object({ - webhook_config: WebhookPlatformModel.WebhookConfig().required(), - }); - } - - /** @returns {UpsertSubscriberConfigResult} */ - static UpsertSubscriberConfigResult() { - return Joi.object({ - status: Joi.boolean(), - message: Joi.string().allow(""), - }); - } - /** * Enum: SubscriberStatus Used By: Webhook * diff --git a/sdk/platform/Webhook/WebhookPlatformValidator.d.ts b/sdk/platform/Webhook/WebhookPlatformValidator.d.ts index 736aadd91..6f098121b 100644 --- a/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +++ b/sdk/platform/Webhook/WebhookPlatformValidator.d.ts @@ -1,5 +1,25 @@ export = WebhookPlatformValidator; +/** + * @typedef CancelJobByNameParam + * @property {string} filename + */ +/** + * @typedef DownloadDeliveryReportParam + * @property {WebhookPlatformModel.EventProcessRequest} body + */ /** @typedef FetchAllEventConfigurationsParam */ +/** + * @typedef GetDeliveryReportsParam + * @property {WebhookPlatformModel.EventProcessRequest} body + */ +/** + * @typedef GetHistoricalReportsParam + * @property {WebhookPlatformModel.HistoryPayload} body + */ +/** + * @typedef GetReportFiltersParam + * @property {WebhookPlatformModel.ReportFiltersPayload} body + */ /** * @typedef GetSubscriberByIdParam * @property {number} subscriberId - Subscriber id @@ -16,6 +36,10 @@ export = WebhookPlatformValidator; * @property {number} [pageSize] - Page Size * @property {string} extensionId - Extension_id */ +/** + * @typedef PingWebhookParam + * @property {WebhookPlatformModel.PingWebhook} body + */ /** * @typedef RegisterSubscriberToEventParam * @property {WebhookPlatformModel.SubscriberConfigPost} body @@ -32,19 +56,27 @@ export = WebhookPlatformValidator; * @typedef UpdateSubscriberV2Param * @property {WebhookPlatformModel.SubscriberConfigUpdateRequestV2} body */ -/** - * @typedef UpsertSubscriberEventParam - * @property {WebhookPlatformModel.UpsertSubscriberConfig} body - */ declare class WebhookPlatformValidator { + /** @returns {CancelJobByNameParam} */ + static cancelJobByName(): CancelJobByNameParam; + /** @returns {DownloadDeliveryReportParam} */ + static downloadDeliveryReport(): DownloadDeliveryReportParam; /** @returns {FetchAllEventConfigurationsParam} */ static fetchAllEventConfigurations(): any; + /** @returns {GetDeliveryReportsParam} */ + static getDeliveryReports(): GetDeliveryReportsParam; + /** @returns {GetHistoricalReportsParam} */ + static getHistoricalReports(): GetHistoricalReportsParam; + /** @returns {GetReportFiltersParam} */ + static getReportFilters(): GetReportFiltersParam; /** @returns {GetSubscriberByIdParam} */ static getSubscriberById(): GetSubscriberByIdParam; /** @returns {GetSubscribersByCompanyParam} */ static getSubscribersByCompany(): GetSubscribersByCompanyParam; /** @returns {GetSubscribersByExtensionIdParam} */ static getSubscribersByExtensionId(): GetSubscribersByExtensionIdParam; + /** @returns {PingWebhookParam} */ + static pingWebhook(): PingWebhookParam; /** @returns {RegisterSubscriberToEventParam} */ static registerSubscriberToEvent(): RegisterSubscriberToEventParam; /** @returns {RegisterSubscriberToEventV2Param} */ @@ -53,12 +85,25 @@ declare class WebhookPlatformValidator { static updateSubscriberConfig(): UpdateSubscriberConfigParam; /** @returns {UpdateSubscriberV2Param} */ static updateSubscriberV2(): UpdateSubscriberV2Param; - /** @returns {UpsertSubscriberEventParam} */ - static upsertSubscriberEvent(): UpsertSubscriberEventParam; } declare namespace WebhookPlatformValidator { - export { FetchAllEventConfigurationsParam, GetSubscriberByIdParam, GetSubscribersByCompanyParam, GetSubscribersByExtensionIdParam, RegisterSubscriberToEventParam, RegisterSubscriberToEventV2Param, UpdateSubscriberConfigParam, UpdateSubscriberV2Param, UpsertSubscriberEventParam }; + export { CancelJobByNameParam, DownloadDeliveryReportParam, FetchAllEventConfigurationsParam, GetDeliveryReportsParam, GetHistoricalReportsParam, GetReportFiltersParam, GetSubscriberByIdParam, GetSubscribersByCompanyParam, GetSubscribersByExtensionIdParam, PingWebhookParam, RegisterSubscriberToEventParam, RegisterSubscriberToEventV2Param, UpdateSubscriberConfigParam, UpdateSubscriberV2Param }; } +type CancelJobByNameParam = { + filename: string; +}; +type DownloadDeliveryReportParam = { + body: WebhookPlatformModel.EventProcessRequest; +}; +type GetDeliveryReportsParam = { + body: WebhookPlatformModel.EventProcessRequest; +}; +type GetHistoricalReportsParam = { + body: WebhookPlatformModel.HistoryPayload; +}; +type GetReportFiltersParam = { + body: WebhookPlatformModel.ReportFiltersPayload; +}; type GetSubscriberByIdParam = { /** * - Subscriber id @@ -93,6 +138,9 @@ type GetSubscribersByExtensionIdParam = { */ extensionId: string; }; +type PingWebhookParam = { + body: WebhookPlatformModel.PingWebhook; +}; type RegisterSubscriberToEventParam = { body: WebhookPlatformModel.SubscriberConfigPost; }; @@ -105,8 +153,5 @@ type UpdateSubscriberConfigParam = { type UpdateSubscriberV2Param = { body: WebhookPlatformModel.SubscriberConfigUpdateRequestV2; }; -type UpsertSubscriberEventParam = { - body: WebhookPlatformModel.UpsertSubscriberConfig; -}; type FetchAllEventConfigurationsParam = any; import WebhookPlatformModel = require("./WebhookPlatformModel"); diff --git a/sdk/platform/Webhook/WebhookPlatformValidator.js b/sdk/platform/Webhook/WebhookPlatformValidator.js index e7df26da5..1e6ce6bab 100644 --- a/sdk/platform/Webhook/WebhookPlatformValidator.js +++ b/sdk/platform/Webhook/WebhookPlatformValidator.js @@ -2,8 +2,33 @@ const Joi = require("joi"); const WebhookPlatformModel = require("./WebhookPlatformModel"); +/** + * @typedef CancelJobByNameParam + * @property {string} filename + */ + +/** + * @typedef DownloadDeliveryReportParam + * @property {WebhookPlatformModel.EventProcessRequest} body + */ + /** @typedef FetchAllEventConfigurationsParam */ +/** + * @typedef GetDeliveryReportsParam + * @property {WebhookPlatformModel.EventProcessRequest} body + */ + +/** + * @typedef GetHistoricalReportsParam + * @property {WebhookPlatformModel.HistoryPayload} body + */ + +/** + * @typedef GetReportFiltersParam + * @property {WebhookPlatformModel.ReportFiltersPayload} body + */ + /** * @typedef GetSubscriberByIdParam * @property {number} subscriberId - Subscriber id @@ -23,6 +48,11 @@ const WebhookPlatformModel = require("./WebhookPlatformModel"); * @property {string} extensionId - Extension_id */ +/** + * @typedef PingWebhookParam + * @property {WebhookPlatformModel.PingWebhook} body + */ + /** * @typedef RegisterSubscriberToEventParam * @property {WebhookPlatformModel.SubscriberConfigPost} body @@ -43,17 +73,47 @@ const WebhookPlatformModel = require("./WebhookPlatformModel"); * @property {WebhookPlatformModel.SubscriberConfigUpdateRequestV2} body */ -/** - * @typedef UpsertSubscriberEventParam - * @property {WebhookPlatformModel.UpsertSubscriberConfig} body - */ - class WebhookPlatformValidator { + /** @returns {CancelJobByNameParam} */ + static cancelJobByName() { + return Joi.object({ + filename: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {DownloadDeliveryReportParam} */ + static downloadDeliveryReport() { + return Joi.object({ + body: WebhookPlatformModel.EventProcessRequest().required(), + }).required(); + } + /** @returns {FetchAllEventConfigurationsParam} */ static fetchAllEventConfigurations() { return Joi.object({}).required(); } + /** @returns {GetDeliveryReportsParam} */ + static getDeliveryReports() { + return Joi.object({ + body: WebhookPlatformModel.EventProcessRequest().required(), + }).required(); + } + + /** @returns {GetHistoricalReportsParam} */ + static getHistoricalReports() { + return Joi.object({ + body: WebhookPlatformModel.HistoryPayload().required(), + }).required(); + } + + /** @returns {GetReportFiltersParam} */ + static getReportFilters() { + return Joi.object({ + body: WebhookPlatformModel.ReportFiltersPayload().required(), + }).required(); + } + /** @returns {GetSubscriberByIdParam} */ static getSubscriberById() { return Joi.object({ @@ -79,6 +139,13 @@ class WebhookPlatformValidator { }).required(); } + /** @returns {PingWebhookParam} */ + static pingWebhook() { + return Joi.object({ + body: WebhookPlatformModel.PingWebhook().required(), + }).required(); + } + /** @returns {RegisterSubscriberToEventParam} */ static registerSubscriberToEvent() { return Joi.object({ @@ -106,13 +173,6 @@ class WebhookPlatformValidator { body: WebhookPlatformModel.SubscriberConfigUpdateRequestV2().required(), }).required(); } - - /** @returns {UpsertSubscriberEventParam} */ - static upsertSubscriberEvent() { - return Joi.object({ - body: WebhookPlatformModel.UpsertSubscriberConfig().required(), - }).required(); - } } module.exports = WebhookPlatformValidator; diff --git a/sdk/platform/index.d.ts b/sdk/platform/index.d.ts index d4fe45f6a..53d5df9c3 100644 --- a/sdk/platform/index.d.ts +++ b/sdk/platform/index.d.ts @@ -13,6 +13,7 @@ export namespace PlatformModel { const ContentPlatformModel: typeof import("./Content/ContentPlatformModel"); const DiscountPlatformModel: typeof import("./Discount/DiscountPlatformModel"); const FileStoragePlatformModel: typeof import("./FileStorage/FileStoragePlatformModel"); + const FinancePlatformModel: typeof import("./Finance/FinancePlatformModel"); const LeadPlatformModel: typeof import("./Lead/LeadPlatformModel"); const ServiceabilityPlatformModel: typeof import("./Serviceability/ServiceabilityPlatformModel"); const OrderPlatformModel: typeof import("./Order/OrderPlatformModel"); diff --git a/sdk/platform/index.js b/sdk/platform/index.js index bd1d2f6a8..4d52c7819 100644 --- a/sdk/platform/index.js +++ b/sdk/platform/index.js @@ -26,6 +26,8 @@ module.exports = { FileStoragePlatformModel: require("./FileStorage/FileStoragePlatformModel"), + FinancePlatformModel: require("./Finance/FinancePlatformModel"), + LeadPlatformModel: require("./Lead/LeadPlatformModel"), ServiceabilityPlatformModel: require("./Serviceability/ServiceabilityPlatformModel"), diff --git a/sdk/public/Configuration/ConfigurationPublicClient.d.ts b/sdk/public/Configuration/ConfigurationPublicClient.d.ts index 459d795df..748a784f1 100644 --- a/sdk/public/Configuration/ConfigurationPublicClient.d.ts +++ b/sdk/public/Configuration/ConfigurationPublicClient.d.ts @@ -22,13 +22,12 @@ declare class Configuration { * @param {ConfigurationPublicValidator.SearchApplicationParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name searchApplication * @summary: Search application * @description: Provide application name or domain url. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/configuration/searchApplication/). */ - searchApplication({ authorization, query, requestHeaders }?: ConfigurationPublicValidator.SearchApplicationParam, { responseHeaders }?: object): Promise; + searchApplication({ authorization, query, requestHeaders }?: ConfigurationPublicValidator.SearchApplicationParam, { responseHeaders }?: object): Promise; } import ConfigurationPublicValidator = require("./ConfigurationPublicValidator"); import ConfigurationPublicModel = require("./ConfigurationPublicModel"); diff --git a/sdk/public/Configuration/ConfigurationPublicClient.js b/sdk/public/Configuration/ConfigurationPublicClient.js index 6e85a7a92..7527dcf0f 100644 --- a/sdk/public/Configuration/ConfigurationPublicClient.js +++ b/sdk/public/Configuration/ConfigurationPublicClient.js @@ -120,8 +120,7 @@ class Configuration { * @param {ConfigurationPublicValidator.SearchApplicationParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name searchApplication * @summary: Search application * @description: Provide application name or domain url. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/configuration/searchApplication/). @@ -178,10 +177,10 @@ class Configuration { const { error: res_error, - } = ConfigurationPublicModel.ApplicationResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ConfigurationPublicModel.ApplicationResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this._conf.options.strictResponseCheck === true) { diff --git a/sdk/public/Configuration/ConfigurationPublicModel.d.ts b/sdk/public/Configuration/ConfigurationPublicModel.d.ts index 5009b828a..6cdc97651 100644 --- a/sdk/public/Configuration/ConfigurationPublicModel.d.ts +++ b/sdk/public/Configuration/ConfigurationPublicModel.d.ts @@ -1,6 +1,6 @@ export = ConfigurationPublicModel; /** - * @typedef ApplicationResponseSchema + * @typedef ApplicationResponse * @property {Application} [application] */ /** @@ -91,7 +91,7 @@ export = ConfigurationPublicModel; * @property {string} [message] - Response message for not found */ /** - * @typedef BadRequestSchema + * @typedef BadRequest * @property {string} [message] - Failure message (in a string format) */ /** @@ -132,11 +132,11 @@ export = ConfigurationPublicModel; declare class ConfigurationPublicModel { } declare namespace ConfigurationPublicModel { - export { ApplicationResponseSchema, Domain, ApplicationWebsite, ApplicationCors, ApplicationAuth, ApplicationRedirections, ApplicationMeta, SecureUrl, Application, NotFound, BadRequestSchema, LocationDefaultLanguage, LocationDefaultCurrency, LocationCountry, Locations }; + export { ApplicationResponse, Domain, ApplicationWebsite, ApplicationCors, ApplicationAuth, ApplicationRedirections, ApplicationMeta, SecureUrl, Application, NotFound, BadRequest, LocationDefaultLanguage, LocationDefaultCurrency, LocationCountry, Locations }; } -/** @returns {ApplicationResponseSchema} */ -declare function ApplicationResponseSchema(): ApplicationResponseSchema; -type ApplicationResponseSchema = { +/** @returns {ApplicationResponse} */ +declare function ApplicationResponse(): ApplicationResponse; +type ApplicationResponse = { application?: Application; }; /** @returns {Domain} */ @@ -322,9 +322,9 @@ type NotFound = { */ message?: string; }; -/** @returns {BadRequestSchema} */ -declare function BadRequestSchema(): BadRequestSchema; -type BadRequestSchema = { +/** @returns {BadRequest} */ +declare function BadRequest(): BadRequest; +type BadRequest = { /** * - Failure message (in a string format) */ diff --git a/sdk/public/Configuration/ConfigurationPublicModel.js b/sdk/public/Configuration/ConfigurationPublicModel.js index 1083c4efd..1e8b3458e 100644 --- a/sdk/public/Configuration/ConfigurationPublicModel.js +++ b/sdk/public/Configuration/ConfigurationPublicModel.js @@ -1,7 +1,7 @@ const Joi = require("joi"); /** - * @typedef ApplicationResponseSchema + * @typedef ApplicationResponse * @property {Application} [application] */ @@ -102,7 +102,7 @@ const Joi = require("joi"); */ /** - * @typedef BadRequestSchema + * @typedef BadRequest * @property {string} [message] - Failure message (in a string format) */ @@ -146,8 +146,8 @@ const Joi = require("joi"); */ class ConfigurationPublicModel { - /** @returns {ApplicationResponseSchema} */ - static ApplicationResponseSchema() { + /** @returns {ApplicationResponse} */ + static ApplicationResponse() { return Joi.object({ application: ConfigurationPublicModel.Application(), }); @@ -252,8 +252,8 @@ class ConfigurationPublicModel { }); } - /** @returns {BadRequestSchema} */ - static BadRequestSchema() { + /** @returns {BadRequest} */ + static BadRequest() { return Joi.object({ message: Joi.string().allow(""), }); diff --git a/sdk/public/Content/ContentPublicClient.d.ts b/sdk/public/Content/ContentPublicClient.d.ts index 0cfa67d16..098197704 100644 --- a/sdk/public/Content/ContentPublicClient.d.ts +++ b/sdk/public/Content/ContentPublicClient.d.ts @@ -3,50 +3,10 @@ declare class Content { constructor(_conf: any); _conf: any; _relativeUrls: { - getAllTags: string; - getAnalyticsTags: string; - getBasicDetails: string; getCredentialsByEntity: string; - getCustomPage: string; - getFooterContent: string; - getHomePageContent: string; - getMenuContent: string; - getMenuContentByType: string; - getNavbar: string; - getPricingBanner: string; }; _urls: {}; updateUrls(urls: any): void; - /** - * @param {ContentPublicValidator.GetAllTagsParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getAllTags - * @summary: Retrieve tags with injected css/javascript info. - * @description: Retrieve custom tag with injected css/javascript info. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getAllTags/). - */ - getAllTags({ requestHeaders }?: any, { responseHeaders }?: object): Promise; - /** - * @param {ContentPublicValidator.GetAnalyticsTagsParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getAnalyticsTags - * @summary: Get Analytics Tags - * @description: Retrieve analytics tags. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getAnalyticsTags/). - */ - getAnalyticsTags({ requestHeaders }?: any, { responseHeaders }?: object): Promise; - /** - * @param {ContentPublicValidator.GetBasicDetailsParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getBasicDetails - * @summary: get basic platform information - * @description: get basic platform information on Admin panel like Common Settings, Appereance of Authentication Page, Text on Seller Login or Register Page, Business Account Restrictions, Seller Support Details and Footer Details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getBasicDetails/). - */ - getBasicDetails({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {ContentPublicValidator.GetCredentialsByEntityParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -56,77 +16,7 @@ declare class Content { * @summary: Get credentials to power chat support systems * @description: Get credentials for support system - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getCredentialsByEntity/). */ - getCredentialsByEntity({ entityType, requestHeaders }?: ContentPublicValidator.GetCredentialsByEntityParam, { responseHeaders }?: object): Promise; - /** - * @param {ContentPublicValidator.GetCustomPageParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getCustomPage - * @summary: Retrieve info for custom page. - * @description: Retrieve info of custom pagee to develop and manage custom webpages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getCustomPage/). - */ - getCustomPage({ slug, requestHeaders }?: ContentPublicValidator.GetCustomPageParam, { responseHeaders }?: object): Promise; - /** - * @param {ContentPublicValidator.GetFooterContentParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getFooterContent - * @summary: Get Footer Content - * @description: Retrieve footer content. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getFooterContent/). - */ - getFooterContent({ requestHeaders }?: any, { responseHeaders }?: object): Promise; - /** - * @param {ContentPublicValidator.GetHomePageContentParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getHomePageContent - * @summary: Get Home Page Content - * @description: Retrieve home page content for a specific page type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getHomePageContent/). - */ - getHomePageContent({ pageType, requestHeaders }?: ContentPublicValidator.GetHomePageContentParam, { responseHeaders }?: object): Promise; - /** - * @param {ContentPublicValidator.GetMenuContentParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getMenuContent - * @summary: Get desktop menu content - * @description: Retrieves the desktop menu content. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getMenuContent/). - */ - getMenuContent({ requestHeaders }?: any, { responseHeaders }?: object): Promise; - /** - * @param {ContentPublicValidator.GetMenuContentByTypeParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getMenuContentByType - * @summary: Get desktop menu content - * @description: Retrieves the desktop menu content. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getMenuContentByType/). - */ - getMenuContentByType({ type, requestHeaders }?: ContentPublicValidator.GetMenuContentByTypeParam, { responseHeaders }?: object): Promise; - /** - * @param {ContentPublicValidator.GetNavbarParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getNavbar - * @summary: Get Navbar - * @description: Retrieve navbar information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getNavbar/). - */ - getNavbar({ requestHeaders }?: any, { responseHeaders }?: object): Promise; - /** - * @param {ContentPublicValidator.GetPricingBannerParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPricingBanner - * @summary: Get Pricing Banner - * @description: Retrieve pricing banner information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getPricingBanner/). - */ - getPricingBanner({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getCredentialsByEntity({ entity, requestHeaders }?: ContentPublicValidator.GetCredentialsByEntityParam, { responseHeaders }?: object): Promise; } -import ContentPublicModel = require("./ContentPublicModel"); import ContentPublicValidator = require("./ContentPublicValidator"); +import ContentPublicModel = require("./ContentPublicModel"); diff --git a/sdk/public/Content/ContentPublicClient.js b/sdk/public/Content/ContentPublicClient.js index 83a349357..464fd7005 100644 --- a/sdk/public/Content/ContentPublicClient.js +++ b/sdk/public/Content/ContentPublicClient.js @@ -16,18 +16,7 @@ class Content { constructor(_conf) { this._conf = _conf; this._relativeUrls = { - getAllTags: "/service/public/content/tags", - getAnalyticsTags: "/service/public/content/analytics-tags", - getBasicDetails: "/service/public/content/basic-details", - getCredentialsByEntity: - "/service/public/content/credentials/{entity_type}", - getCustomPage: "/service/public/content/custom-pages/{slug}", - getFooterContent: "/service/public/content/footer", - getHomePageContent: "/service/public/content/home-page", - getMenuContent: "/service/public/content/menu", - getMenuContentByType: "/service/public/content/menu/{type}", - getNavbar: "/service/public/content/navbar", - getPricingBanner: "/service/public/content/pricing-banner", + getCredentialsByEntity: "/service/public/content/credentials/{entity}", }; this._urls = Object.entries(this._relativeUrls).reduce( (urls, [method, relativeUrl]) => { @@ -45,238 +34,6 @@ class Content { }; } - /** - * @param {ContentPublicValidator.GetAllTagsParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getAllTags - * @summary: Retrieve tags with injected css/javascript info. - * @description: Retrieve custom tag with injected css/javascript info. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getAllTags/). - */ - async getAllTags( - { requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = ContentPublicValidator.getAllTags().validate( - {}, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { error: warrning } = ContentPublicValidator.getAllTags().validate( - {}, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for public > Content > getAllTags \n ${warrning}`, - }); - } - - const query_params = {}; - - const xHeaders = {}; - - const response = await PublicAPIClient.execute( - this._conf, - "get", - constructUrl({ - url: this._urls["getAllTags"], - params: {}, - }), - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = ContentPublicModel.TagsSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this._conf.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for public > Content > getAllTags \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {ContentPublicValidator.GetAnalyticsTagsParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getAnalyticsTags - * @summary: Get Analytics Tags - * @description: Retrieve analytics tags. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getAnalyticsTags/). - */ - async getAnalyticsTags( - { requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = ContentPublicValidator.getAnalyticsTags().validate( - {}, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = ContentPublicValidator.getAnalyticsTags().validate( - {}, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for public > Content > getAnalyticsTags \n ${warrning}`, - }); - } - - const query_params = {}; - - const xHeaders = {}; - - const response = await PublicAPIClient.execute( - this._conf, - "get", - constructUrl({ - url: this._urls["getAnalyticsTags"], - params: {}, - }), - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = ContentPublicModel.AnalyticsTagsSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this._conf.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for public > Content > getAnalyticsTags \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {ContentPublicValidator.GetBasicDetailsParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getBasicDetails - * @summary: get basic platform information - * @description: get basic platform information on Admin panel like Common Settings, Appereance of Authentication Page, Text on Seller Login or Register Page, Business Account Restrictions, Seller Support Details and Footer Details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getBasicDetails/). - */ - async getBasicDetails( - { requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = ContentPublicValidator.getBasicDetails().validate( - {}, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = ContentPublicValidator.getBasicDetails().validate( - {}, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for public > Content > getBasicDetails \n ${warrning}`, - }); - } - - const query_params = {}; - - const xHeaders = {}; - - const response = await PublicAPIClient.execute( - this._conf, - "get", - constructUrl({ - url: this._urls["getBasicDetails"], - params: {}, - }), - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = ContentPublicModel.BasicDetailsPayloadSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this._conf.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for public > Content > getBasicDetails \n ${res_error}`, - }); - } - } - - return response; - } - /** * @param {ContentPublicValidator.GetCredentialsByEntityParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -287,11 +44,11 @@ class Content { * @description: Get credentials for support system - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getCredentialsByEntity/). */ async getCredentialsByEntity( - { entityType, requestHeaders } = { requestHeaders: {} }, + { entity, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error } = ContentPublicValidator.getCredentialsByEntity().validate( - { entityType }, + { entity }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -302,7 +59,7 @@ class Content { const { error: warrning, } = ContentPublicValidator.getCredentialsByEntity().validate( - { entityType }, + { entity }, { abortEarly: false, allowUnknown: false } ); if (warrning) { @@ -321,7 +78,7 @@ class Content { "get", constructUrl({ url: this._urls["getCredentialsByEntity"], - params: { entityType }, + params: { entity }, }), query_params, undefined, @@ -354,549 +111,6 @@ class Content { return response; } - - /** - * @param {ContentPublicValidator.GetCustomPageParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getCustomPage - * @summary: Retrieve info for custom page. - * @description: Retrieve info of custom pagee to develop and manage custom webpages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getCustomPage/). - */ - async getCustomPage( - { slug, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = ContentPublicValidator.getCustomPage().validate( - { slug }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { error: warrning } = ContentPublicValidator.getCustomPage().validate( - { slug }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for public > Content > getCustomPage \n ${warrning}`, - }); - } - - const query_params = {}; - - const xHeaders = {}; - - const response = await PublicAPIClient.execute( - this._conf, - "get", - constructUrl({ - url: this._urls["getCustomPage"], - params: { slug }, - }), - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = ContentPublicModel.CustomPageBySlugSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this._conf.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for public > Content > getCustomPage \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {ContentPublicValidator.GetFooterContentParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getFooterContent - * @summary: Get Footer Content - * @description: Retrieve footer content. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getFooterContent/). - */ - async getFooterContent( - { requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = ContentPublicValidator.getFooterContent().validate( - {}, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = ContentPublicValidator.getFooterContent().validate( - {}, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for public > Content > getFooterContent \n ${warrning}`, - }); - } - - const query_params = {}; - - const xHeaders = {}; - - const response = await PublicAPIClient.execute( - this._conf, - "get", - constructUrl({ - url: this._urls["getFooterContent"], - params: {}, - }), - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = ContentPublicModel.FooterSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this._conf.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for public > Content > getFooterContent \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {ContentPublicValidator.GetHomePageContentParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getHomePageContent - * @summary: Get Home Page Content - * @description: Retrieve home page content for a specific page type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getHomePageContent/). - */ - async getHomePageContent( - { pageType, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = ContentPublicValidator.getHomePageContent().validate( - { pageType }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = ContentPublicValidator.getHomePageContent().validate( - { pageType }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for public > Content > getHomePageContent \n ${warrning}`, - }); - } - - const query_params = {}; - query_params["page_type"] = pageType; - - const xHeaders = {}; - - const response = await PublicAPIClient.execute( - this._conf, - "get", - constructUrl({ - url: this._urls["getHomePageContent"], - params: {}, - }), - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = ContentPublicModel.HomePageContentSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this._conf.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for public > Content > getHomePageContent \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {ContentPublicValidator.GetMenuContentParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getMenuContent - * @summary: Get desktop menu content - * @description: Retrieves the desktop menu content. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getMenuContent/). - */ - async getMenuContent( - { requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = ContentPublicValidator.getMenuContent().validate( - {}, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = ContentPublicValidator.getMenuContent().validate( - {}, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for public > Content > getMenuContent \n ${warrning}`, - }); - } - - const query_params = {}; - - const xHeaders = {}; - - const response = await PublicAPIClient.execute( - this._conf, - "get", - constructUrl({ - url: this._urls["getMenuContent"], - params: {}, - }), - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = ContentPublicModel.MenusSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this._conf.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for public > Content > getMenuContent \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {ContentPublicValidator.GetMenuContentByTypeParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getMenuContentByType - * @summary: Get desktop menu content - * @description: Retrieves the desktop menu content. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getMenuContentByType/). - */ - async getMenuContentByType( - { type, requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = ContentPublicValidator.getMenuContentByType().validate( - { type }, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = ContentPublicValidator.getMenuContentByType().validate( - { type }, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for public > Content > getMenuContentByType \n ${warrning}`, - }); - } - - const query_params = {}; - - const xHeaders = {}; - - const response = await PublicAPIClient.execute( - this._conf, - "get", - constructUrl({ - url: this._urls["getMenuContentByType"], - params: { type }, - }), - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = ContentPublicModel.MenuTypeSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this._conf.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for public > Content > getMenuContentByType \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {ContentPublicValidator.GetNavbarParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getNavbar - * @summary: Get Navbar - * @description: Retrieve navbar information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getNavbar/). - */ - async getNavbar( - { requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = ContentPublicValidator.getNavbar().validate( - {}, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { error: warrning } = ContentPublicValidator.getNavbar().validate( - {}, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for public > Content > getNavbar \n ${warrning}`, - }); - } - - const query_params = {}; - - const xHeaders = {}; - - const response = await PublicAPIClient.execute( - this._conf, - "get", - constructUrl({ - url: this._urls["getNavbar"], - params: {}, - }), - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = ContentPublicModel.NavbarSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this._conf.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for public > Content > getNavbar \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {ContentPublicValidator.GetPricingBannerParam} arg - Arg object. - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPricingBanner - * @summary: Get Pricing Banner - * @description: Retrieve pricing banner information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getPricingBanner/). - */ - async getPricingBanner( - { requestHeaders } = { requestHeaders: {} }, - { responseHeaders } = { responseHeaders: false } - ) { - const { error } = ContentPublicValidator.getPricingBanner().validate( - {}, - { abortEarly: false, allowUnknown: true } - ); - if (error) { - return Promise.reject(new FDKClientValidationError(error)); - } - - // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = ContentPublicValidator.getPricingBanner().validate( - {}, - { abortEarly: false, allowUnknown: false } - ); - if (warrning) { - Logger({ - level: "WARN", - message: `Parameter Validation warrnings for public > Content > getPricingBanner \n ${warrning}`, - }); - } - - const query_params = {}; - - const xHeaders = {}; - - const response = await PublicAPIClient.execute( - this._conf, - "get", - constructUrl({ - url: this._urls["getPricingBanner"], - params: {}, - }), - query_params, - undefined, - { ...xHeaders, ...requestHeaders }, - { responseHeaders } - ); - - let responseData = response; - if (responseHeaders) { - responseData = response[0]; - } - - const { - error: res_error, - } = ContentPublicModel.PricingBannerSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); - - if (res_error) { - if (this._conf.options.strictResponseCheck === true) { - return Promise.reject(new FDKResponseValidationError(res_error)); - } else { - Logger({ - level: "WARN", - message: `Response Validation Warnings for public > Content > getPricingBanner \n ${res_error}`, - }); - } - } - - return response; - } } module.exports = Content; diff --git a/sdk/public/Content/ContentPublicModel.d.ts b/sdk/public/Content/ContentPublicModel.d.ts index cfd181183..eee4f5b81 100644 --- a/sdk/public/Content/ContentPublicModel.d.ts +++ b/sdk/public/Content/ContentPublicModel.d.ts @@ -1,267 +1,10 @@ export = ContentPublicModel; -/** - * @typedef BasicDetailsPayloadSchema - * @property {string} [name] - * @property {string} [logo_url] - * @property {string} [favicon_url] - * @property {string} [title] - * @property {string} [meta_title] - * @property {string} [meta_description] - * @property {string} [meta_image] - * @property {WhatsNew[]} [whats_new] - * @property {Features[]} [features] - * @property {Object} [authentication] - * @property {BusinessAccount} [business_account] - * @property {SellerSupport} [seller_support] - * @property {string} [copyright] - * @property {string} [address] - * @property {string} [documentation_url] - * @property {string} [faq_url] - * @property {string} [facebook_url] - * @property {string} [instagram_url] - * @property {string} [privacy_url] - * @property {string} [twitter_url] - * @property {string} [termsofservice_url] - */ -/** - * @typedef WhatsNew - * @property {string} [description] - */ -/** - * @typedef Features - * @property {string} [title] - * @property {string} [text] - * @property {string[]} [list] - * @property {string} [image] - */ -/** - * @typedef BusinessAccount - * @property {boolean} [is_limit] - * @property {number} [threshold] - */ -/** - * @typedef SellerSupport - * @property {string} [email] - * @property {number} [phone_number] - */ -/** - * @typedef MenuSchema - * @property {SalesChannelSchema} [sales_channel] - * @property {OtherSellerSchema} [other_seller] - * @property {FooterContentSchema} [footer_content] - * @property {boolean} [can_create_business_account] - * @property {CompanyLevelMenuItemSchema[]} [company_level] - * @property {ApplicationLevelMenuItemSchema[]} [application_level] - */ -/** - * @typedef MenusSchema - * @property {string} [_id] - * @property {MenuTypeSchema} [desktop] - * @property {MenuTypeSchema} [mobile] - * @property {number} [__v] - */ -/** - * @typedef MenuTypeSchema - * @property {MenuSchema} [menu] - */ -/** - * @typedef CompanyLevelMenuItemSchema - * @property {VisibleOnSchema} [visible_on] - * @property {string} [display] - * @property {string[]} [permissions] - * @property {string} [title] - * @property {string} [link] - * @property {string} [icon] - * @property {boolean} [is_disabled] - * @property {CompanyLevelMenuItemSchema[]} [child] - */ -/** - * @typedef ApplicationLevelMenuItemSchema - * @property {VisibleOnSchema} [visible_on] - * @property {string} [display] - * @property {string[]} [permissions] - * @property {string} [title] - * @property {string} [link] - * @property {string} [icon] - * @property {boolean} [is_disabled] - * @property {ApplicationLevelMenuItemSchema[]} [child] - */ -/** - * @typedef VisibleOnSchema - * @property {boolean} [web] - * @property {boolean} [ios] - * @property {boolean} [android] - */ -/** - * @typedef SalesChannelSchema - * @property {boolean} [can_add] - * @property {string} [title] - */ -/** - * @typedef OtherSellerSchema - * @property {boolean} [is_visible] - * @property {string} [title] - */ -/** - * @typedef FooterContentSchema - * @property {boolean} [is_visible] - * @property {string} [line_one] - * @property {string} [line_two] - */ -/** - * @typedef AnalyticsTagsSchema - * @property {string} [_id] - * @property {number} [__v] - * @property {string} [body_code] - * @property {boolean} [enabled] - * @property {string} [header_code] - * @property {string} [name] - */ -/** - * @typedef CustomPageBySlugSchema - * @property {string} [_id] - * @property {string} [title] - * @property {string} [slug] - * @property {string} [type] - * @property {string} [description] - * @property {boolean} [published] - * @property {ItemSchema[]} [content] - * @property {CreateCustomPageSeoSchema} [seo] - * @property {CreatedBySchema} [created_by] - * @property {CreatedBySchema} [modified_by] - * @property {boolean} [archived] - * @property {string} [created_on] - * @property {string} [modified_on] - * @property {number} [__v] - */ -/** - * @typedef ItemSchema - * @property {string} [type] - * @property {string} [value] - */ -/** - * @typedef CreateCustomPageSeoSchema - * @property {string} [title] - * @property {string} [description] - */ -/** - * @typedef RawHtmlContentSchema - * @property {string} [type] - * @property {string} [value] - */ -/** - * @typedef FooterSchema - * @property {string} [_id] - * @property {string} [title] - * @property {string} [description] - * @property {string} [type] - * @property {Object[]} [tags] - * @property {boolean} [published] - * @property {RawHtmlContentSchema[]} [content] - * @property {Object[]} [footer_meta] - * @property {CreatedBySchema} [created_by] - * @property {CreatedBySchema} [modified_by] - * @property {boolean} [archived] - * @property {number} [__v] - */ -/** - * @typedef HomePageContentSchema - * @property {string} [_id] - * @property {string} [slug] - * @property {CreatedBySchema} [created_by] - * @property {boolean} [archived] - * @property {string} [page_type] - * @property {string} [created_on] - * @property {string} [modified_on] - * @property {number} [__v] - */ -/** - * @typedef NavItemSchema - * @property {string} [title] - * @property {string} [link] - * @property {string} [href] - */ -/** - * @typedef NavbarSchema - * @property {string} [_id] - * @property {NavItemSchema[]} [items] - * @property {number} [__v] - * @property {CreatedBySchema} [modified_by] - */ -/** - * @typedef MediaSchema - * @property {string} [url] - * @property {string} [type] - * @property {string} [alt] - * @property {string} [anchor_link] - */ -/** - * @typedef CreatedBySchema - * @property {string} [user_id] - */ -/** - * @typedef PricingBannerSchema - * @property {string} [_id] - * @property {MediaSchema} [web_banner] - * @property {MediaSchema} [mobile_banner] - * @property {boolean} [published] - * @property {CreatedBySchema} [created_by] - * @property {CreatedBySchema} [modified_by] - * @property {string} [created_on] - * @property {string} [modified_on] - * @property {number} [__v] - */ -/** - * @typedef SdkReadmeSchema - * @property {string} [data] - */ -/** - * @typedef TagsSchema - * @property {CustomItemSchema[]} [items] - * @property {PageSchema} [page] - */ -/** - * @typedef CustomItemSchema - * @property {string} [_id] - * @property {string} [name] - * @property {string} [type] - * @property {string} [sub_type] - * @property {string} [position] - * @property {boolean} [archived] - * @property {UserSchema} [created_by] - * @property {string} [url] - * @property {string} [content] - * @property {string} [created_on] - * @property {string} [modified_on] - * @property {number} [__v] - */ -/** - * @typedef PageSchema - * @property {string} [type] - * @property {number} [current] - * @property {number} [size] - * @property {number} [item_total] - * @property {boolean} [has_next] - */ -/** - * @typedef UserSchema - * @property {string} [user_id] - */ /** * @typedef CredentialSchema - * @property {string} [_id] - * @property {ConfigurationSchema} [configuration] + * @property {Object} [configuration] * @property {string} [entity_type] * @property {string} [type] * @property {boolean} [is_enable] - * @property {string} [updated_at] - * @property {string} [created_at] - * @property {number} [__v] - */ -/** - * @typedef ConfigurationSchema - * @property {string} [token] - * @property {string} [host] */ /** * @typedef CredentialsSchema @@ -281,304 +24,15 @@ export = ContentPublicModel; declare class ContentPublicModel { } declare namespace ContentPublicModel { - export { BasicDetailsPayloadSchema, WhatsNew, Features, BusinessAccount, SellerSupport, MenuSchema, MenusSchema, MenuTypeSchema, CompanyLevelMenuItemSchema, ApplicationLevelMenuItemSchema, VisibleOnSchema, SalesChannelSchema, OtherSellerSchema, FooterContentSchema, AnalyticsTagsSchema, CustomPageBySlugSchema, ItemSchema, CreateCustomPageSeoSchema, RawHtmlContentSchema, FooterSchema, HomePageContentSchema, NavItemSchema, NavbarSchema, MediaSchema, CreatedBySchema, PricingBannerSchema, SdkReadmeSchema, TagsSchema, CustomItemSchema, PageSchema, UserSchema, CredentialSchema, ConfigurationSchema, CredentialsSchema, ContentAPIError }; + export { CredentialSchema, CredentialsSchema, ContentAPIError }; } -/** @returns {BasicDetailsPayloadSchema} */ -declare function BasicDetailsPayloadSchema(): BasicDetailsPayloadSchema; -type BasicDetailsPayloadSchema = { - name?: string; - logo_url?: string; - favicon_url?: string; - title?: string; - meta_title?: string; - meta_description?: string; - meta_image?: string; - whats_new?: WhatsNew[]; - features?: Features[]; - authentication?: any; - business_account?: BusinessAccount; - seller_support?: SellerSupport; - copyright?: string; - address?: string; - documentation_url?: string; - faq_url?: string; - facebook_url?: string; - instagram_url?: string; - privacy_url?: string; - twitter_url?: string; - termsofservice_url?: string; -}; -/** @returns {WhatsNew} */ -declare function WhatsNew(): WhatsNew; -type WhatsNew = { - description?: string; -}; -/** @returns {Features} */ -declare function Features(): Features; -type Features = { - title?: string; - text?: string; - list?: string[]; - image?: string; -}; -/** @returns {BusinessAccount} */ -declare function BusinessAccount(): BusinessAccount; -type BusinessAccount = { - is_limit?: boolean; - threshold?: number; -}; -/** @returns {SellerSupport} */ -declare function SellerSupport(): SellerSupport; -type SellerSupport = { - email?: string; - phone_number?: number; -}; -/** @returns {MenuSchema} */ -declare function MenuSchema(): MenuSchema; -type MenuSchema = { - sales_channel?: SalesChannelSchema; - other_seller?: OtherSellerSchema; - footer_content?: FooterContentSchema; - can_create_business_account?: boolean; - company_level?: CompanyLevelMenuItemSchema[]; - application_level?: ApplicationLevelMenuItemSchema[]; -}; -/** @returns {MenusSchema} */ -declare function MenusSchema(): MenusSchema; -type MenusSchema = { - _id?: string; - desktop?: MenuTypeSchema; - mobile?: MenuTypeSchema; - __v?: number; -}; -/** @returns {MenuTypeSchema} */ -declare function MenuTypeSchema(): MenuTypeSchema; -type MenuTypeSchema = { - menu?: MenuSchema; -}; -/** @returns {CompanyLevelMenuItemSchema} */ -declare function CompanyLevelMenuItemSchema(): CompanyLevelMenuItemSchema; -type CompanyLevelMenuItemSchema = { - visible_on?: VisibleOnSchema; - display?: string; - permissions?: string[]; - title?: string; - link?: string; - icon?: string; - is_disabled?: boolean; - child?: CompanyLevelMenuItemSchema[]; -}; -/** @returns {ApplicationLevelMenuItemSchema} */ -declare function ApplicationLevelMenuItemSchema(): ApplicationLevelMenuItemSchema; -type ApplicationLevelMenuItemSchema = { - visible_on?: VisibleOnSchema; - display?: string; - permissions?: string[]; - title?: string; - link?: string; - icon?: string; - is_disabled?: boolean; - child?: ApplicationLevelMenuItemSchema[]; -}; -/** @returns {VisibleOnSchema} */ -declare function VisibleOnSchema(): VisibleOnSchema; -type VisibleOnSchema = { - web?: boolean; - ios?: boolean; - android?: boolean; -}; -/** @returns {SalesChannelSchema} */ -declare function SalesChannelSchema(): SalesChannelSchema; -type SalesChannelSchema = { - can_add?: boolean; - title?: string; -}; -/** @returns {OtherSellerSchema} */ -declare function OtherSellerSchema(): OtherSellerSchema; -type OtherSellerSchema = { - is_visible?: boolean; - title?: string; -}; -/** @returns {FooterContentSchema} */ -declare function FooterContentSchema(): FooterContentSchema; -type FooterContentSchema = { - is_visible?: boolean; - line_one?: string; - line_two?: string; -}; -/** @returns {AnalyticsTagsSchema} */ -declare function AnalyticsTagsSchema(): AnalyticsTagsSchema; -type AnalyticsTagsSchema = { - _id?: string; - __v?: number; - body_code?: string; - enabled?: boolean; - header_code?: string; - name?: string; -}; -/** @returns {CustomPageBySlugSchema} */ -declare function CustomPageBySlugSchema(): CustomPageBySlugSchema; -type CustomPageBySlugSchema = { - _id?: string; - title?: string; - slug?: string; - type?: string; - description?: string; - published?: boolean; - content?: ItemSchema[]; - seo?: CreateCustomPageSeoSchema; - created_by?: CreatedBySchema; - modified_by?: CreatedBySchema; - archived?: boolean; - created_on?: string; - modified_on?: string; - __v?: number; -}; -/** @returns {ItemSchema} */ -declare function ItemSchema(): ItemSchema; -type ItemSchema = { - type?: string; - value?: string; -}; -/** @returns {CreateCustomPageSeoSchema} */ -declare function CreateCustomPageSeoSchema(): CreateCustomPageSeoSchema; -type CreateCustomPageSeoSchema = { - title?: string; - description?: string; -}; -/** @returns {RawHtmlContentSchema} */ -declare function RawHtmlContentSchema(): RawHtmlContentSchema; -type RawHtmlContentSchema = { - type?: string; - value?: string; -}; -/** @returns {FooterSchema} */ -declare function FooterSchema(): FooterSchema; -type FooterSchema = { - _id?: string; - title?: string; - description?: string; - type?: string; - tags?: any[]; - published?: boolean; - content?: RawHtmlContentSchema[]; - footer_meta?: any[]; - created_by?: CreatedBySchema; - modified_by?: CreatedBySchema; - archived?: boolean; - __v?: number; -}; -/** @returns {HomePageContentSchema} */ -declare function HomePageContentSchema(): HomePageContentSchema; -type HomePageContentSchema = { - _id?: string; - slug?: string; - created_by?: CreatedBySchema; - archived?: boolean; - page_type?: string; - created_on?: string; - modified_on?: string; - __v?: number; -}; -/** @returns {NavItemSchema} */ -declare function NavItemSchema(): NavItemSchema; -type NavItemSchema = { - title?: string; - link?: string; - href?: string; -}; -/** @returns {NavbarSchema} */ -declare function NavbarSchema(): NavbarSchema; -type NavbarSchema = { - _id?: string; - items?: NavItemSchema[]; - __v?: number; - modified_by?: CreatedBySchema; -}; -/** @returns {MediaSchema} */ -declare function MediaSchema(): MediaSchema; -type MediaSchema = { - url?: string; - type?: string; - alt?: string; - anchor_link?: string; -}; -/** @returns {CreatedBySchema} */ -declare function CreatedBySchema(): CreatedBySchema; -type CreatedBySchema = { - user_id?: string; -}; -/** @returns {PricingBannerSchema} */ -declare function PricingBannerSchema(): PricingBannerSchema; -type PricingBannerSchema = { - _id?: string; - web_banner?: MediaSchema; - mobile_banner?: MediaSchema; - published?: boolean; - created_by?: CreatedBySchema; - modified_by?: CreatedBySchema; - created_on?: string; - modified_on?: string; - __v?: number; -}; -/** @returns {SdkReadmeSchema} */ -declare function SdkReadmeSchema(): SdkReadmeSchema; -type SdkReadmeSchema = { - data?: string; -}; -/** @returns {TagsSchema} */ -declare function TagsSchema(): TagsSchema; -type TagsSchema = { - items?: CustomItemSchema[]; - page?: PageSchema; -}; -/** @returns {CustomItemSchema} */ -declare function CustomItemSchema(): CustomItemSchema; -type CustomItemSchema = { - _id?: string; - name?: string; - type?: string; - sub_type?: string; - position?: string; - archived?: boolean; - created_by?: UserSchema; - url?: string; - content?: string; - created_on?: string; - modified_on?: string; - __v?: number; -}; -/** @returns {PageSchema} */ -declare function PageSchema(): PageSchema; -type PageSchema = { - type?: string; - current?: number; - size?: number; - item_total?: number; - has_next?: boolean; -}; -/** @returns {UserSchema} */ -declare function UserSchema(): UserSchema; -type UserSchema = { - user_id?: string; -}; /** @returns {CredentialSchema} */ declare function CredentialSchema(): CredentialSchema; type CredentialSchema = { - _id?: string; - configuration?: ConfigurationSchema; + configuration?: any; entity_type?: string; type?: string; is_enable?: boolean; - updated_at?: string; - created_at?: string; - __v?: number; -}; -/** @returns {ConfigurationSchema} */ -declare function ConfigurationSchema(): ConfigurationSchema; -type ConfigurationSchema = { - token?: string; - host?: string; }; /** @returns {CredentialsSchema} */ declare function CredentialsSchema(): CredentialsSchema; diff --git a/sdk/public/Content/ContentPublicModel.js b/sdk/public/Content/ContentPublicModel.js index b0f46d2f0..4d57468de 100644 --- a/sdk/public/Content/ContentPublicModel.js +++ b/sdk/public/Content/ContentPublicModel.js @@ -1,300 +1,11 @@ const Joi = require("joi"); -/** - * @typedef BasicDetailsPayloadSchema - * @property {string} [name] - * @property {string} [logo_url] - * @property {string} [favicon_url] - * @property {string} [title] - * @property {string} [meta_title] - * @property {string} [meta_description] - * @property {string} [meta_image] - * @property {WhatsNew[]} [whats_new] - * @property {Features[]} [features] - * @property {Object} [authentication] - * @property {BusinessAccount} [business_account] - * @property {SellerSupport} [seller_support] - * @property {string} [copyright] - * @property {string} [address] - * @property {string} [documentation_url] - * @property {string} [faq_url] - * @property {string} [facebook_url] - * @property {string} [instagram_url] - * @property {string} [privacy_url] - * @property {string} [twitter_url] - * @property {string} [termsofservice_url] - */ - -/** - * @typedef WhatsNew - * @property {string} [description] - */ - -/** - * @typedef Features - * @property {string} [title] - * @property {string} [text] - * @property {string[]} [list] - * @property {string} [image] - */ - -/** - * @typedef BusinessAccount - * @property {boolean} [is_limit] - * @property {number} [threshold] - */ - -/** - * @typedef SellerSupport - * @property {string} [email] - * @property {number} [phone_number] - */ - -/** - * @typedef MenuSchema - * @property {SalesChannelSchema} [sales_channel] - * @property {OtherSellerSchema} [other_seller] - * @property {FooterContentSchema} [footer_content] - * @property {boolean} [can_create_business_account] - * @property {CompanyLevelMenuItemSchema[]} [company_level] - * @property {ApplicationLevelMenuItemSchema[]} [application_level] - */ - -/** - * @typedef MenusSchema - * @property {string} [_id] - * @property {MenuTypeSchema} [desktop] - * @property {MenuTypeSchema} [mobile] - * @property {number} [__v] - */ - -/** - * @typedef MenuTypeSchema - * @property {MenuSchema} [menu] - */ - -/** - * @typedef CompanyLevelMenuItemSchema - * @property {VisibleOnSchema} [visible_on] - * @property {string} [display] - * @property {string[]} [permissions] - * @property {string} [title] - * @property {string} [link] - * @property {string} [icon] - * @property {boolean} [is_disabled] - * @property {CompanyLevelMenuItemSchema[]} [child] - */ - -/** - * @typedef ApplicationLevelMenuItemSchema - * @property {VisibleOnSchema} [visible_on] - * @property {string} [display] - * @property {string[]} [permissions] - * @property {string} [title] - * @property {string} [link] - * @property {string} [icon] - * @property {boolean} [is_disabled] - * @property {ApplicationLevelMenuItemSchema[]} [child] - */ - -/** - * @typedef VisibleOnSchema - * @property {boolean} [web] - * @property {boolean} [ios] - * @property {boolean} [android] - */ - -/** - * @typedef SalesChannelSchema - * @property {boolean} [can_add] - * @property {string} [title] - */ - -/** - * @typedef OtherSellerSchema - * @property {boolean} [is_visible] - * @property {string} [title] - */ - -/** - * @typedef FooterContentSchema - * @property {boolean} [is_visible] - * @property {string} [line_one] - * @property {string} [line_two] - */ - -/** - * @typedef AnalyticsTagsSchema - * @property {string} [_id] - * @property {number} [__v] - * @property {string} [body_code] - * @property {boolean} [enabled] - * @property {string} [header_code] - * @property {string} [name] - */ - -/** - * @typedef CustomPageBySlugSchema - * @property {string} [_id] - * @property {string} [title] - * @property {string} [slug] - * @property {string} [type] - * @property {string} [description] - * @property {boolean} [published] - * @property {ItemSchema[]} [content] - * @property {CreateCustomPageSeoSchema} [seo] - * @property {CreatedBySchema} [created_by] - * @property {CreatedBySchema} [modified_by] - * @property {boolean} [archived] - * @property {string} [created_on] - * @property {string} [modified_on] - * @property {number} [__v] - */ - -/** - * @typedef ItemSchema - * @property {string} [type] - * @property {string} [value] - */ - -/** - * @typedef CreateCustomPageSeoSchema - * @property {string} [title] - * @property {string} [description] - */ - -/** - * @typedef RawHtmlContentSchema - * @property {string} [type] - * @property {string} [value] - */ - -/** - * @typedef FooterSchema - * @property {string} [_id] - * @property {string} [title] - * @property {string} [description] - * @property {string} [type] - * @property {Object[]} [tags] - * @property {boolean} [published] - * @property {RawHtmlContentSchema[]} [content] - * @property {Object[]} [footer_meta] - * @property {CreatedBySchema} [created_by] - * @property {CreatedBySchema} [modified_by] - * @property {boolean} [archived] - * @property {number} [__v] - */ - -/** - * @typedef HomePageContentSchema - * @property {string} [_id] - * @property {string} [slug] - * @property {CreatedBySchema} [created_by] - * @property {boolean} [archived] - * @property {string} [page_type] - * @property {string} [created_on] - * @property {string} [modified_on] - * @property {number} [__v] - */ - -/** - * @typedef NavItemSchema - * @property {string} [title] - * @property {string} [link] - * @property {string} [href] - */ - -/** - * @typedef NavbarSchema - * @property {string} [_id] - * @property {NavItemSchema[]} [items] - * @property {number} [__v] - * @property {CreatedBySchema} [modified_by] - */ - -/** - * @typedef MediaSchema - * @property {string} [url] - * @property {string} [type] - * @property {string} [alt] - * @property {string} [anchor_link] - */ - -/** - * @typedef CreatedBySchema - * @property {string} [user_id] - */ - -/** - * @typedef PricingBannerSchema - * @property {string} [_id] - * @property {MediaSchema} [web_banner] - * @property {MediaSchema} [mobile_banner] - * @property {boolean} [published] - * @property {CreatedBySchema} [created_by] - * @property {CreatedBySchema} [modified_by] - * @property {string} [created_on] - * @property {string} [modified_on] - * @property {number} [__v] - */ - -/** - * @typedef SdkReadmeSchema - * @property {string} [data] - */ - -/** - * @typedef TagsSchema - * @property {CustomItemSchema[]} [items] - * @property {PageSchema} [page] - */ - -/** - * @typedef CustomItemSchema - * @property {string} [_id] - * @property {string} [name] - * @property {string} [type] - * @property {string} [sub_type] - * @property {string} [position] - * @property {boolean} [archived] - * @property {UserSchema} [created_by] - * @property {string} [url] - * @property {string} [content] - * @property {string} [created_on] - * @property {string} [modified_on] - * @property {number} [__v] - */ - -/** - * @typedef PageSchema - * @property {string} [type] - * @property {number} [current] - * @property {number} [size] - * @property {number} [item_total] - * @property {boolean} [has_next] - */ - -/** - * @typedef UserSchema - * @property {string} [user_id] - */ - /** * @typedef CredentialSchema - * @property {string} [_id] - * @property {ConfigurationSchema} [configuration] + * @property {Object} [configuration] * @property {string} [entity_type] * @property {string} [type] * @property {boolean} [is_enable] - * @property {string} [updated_at] - * @property {string} [created_at] - * @property {number} [__v] - */ - -/** - * @typedef ConfigurationSchema - * @property {string} [token] - * @property {string} [host] */ /** @@ -315,370 +26,13 @@ const Joi = require("joi"); */ class ContentPublicModel { - /** @returns {BasicDetailsPayloadSchema} */ - static BasicDetailsPayloadSchema() { - return Joi.object({ - name: Joi.string().allow(""), - logo_url: Joi.string().allow(""), - favicon_url: Joi.string().allow(""), - title: Joi.string().allow(""), - meta_title: Joi.string().allow(""), - meta_description: Joi.string().allow(""), - meta_image: Joi.string().allow(""), - whats_new: Joi.array().items(ContentPublicModel.WhatsNew()), - features: Joi.array().items(ContentPublicModel.Features()), - authentication: Joi.object().pattern(/\S/, Joi.any()), - business_account: ContentPublicModel.BusinessAccount(), - seller_support: ContentPublicModel.SellerSupport(), - copyright: Joi.string().allow(""), - address: Joi.string().allow(""), - documentation_url: Joi.string().allow(""), - faq_url: Joi.string().allow(""), - facebook_url: Joi.string().allow(""), - instagram_url: Joi.string().allow(""), - privacy_url: Joi.string().allow(""), - twitter_url: Joi.string().allow(""), - termsofservice_url: Joi.string().allow(""), - }); - } - - /** @returns {WhatsNew} */ - static WhatsNew() { - return Joi.object({ - description: Joi.string().allow(""), - }); - } - - /** @returns {Features} */ - static Features() { - return Joi.object({ - title: Joi.string().allow(""), - text: Joi.string().allow(""), - list: Joi.array().items(Joi.string().allow("")), - image: Joi.string().allow(""), - }); - } - - /** @returns {BusinessAccount} */ - static BusinessAccount() { - return Joi.object({ - is_limit: Joi.boolean(), - threshold: Joi.number(), - }); - } - - /** @returns {SellerSupport} */ - static SellerSupport() { - return Joi.object({ - email: Joi.string().allow(""), - phone_number: Joi.number(), - }); - } - - /** @returns {MenuSchema} */ - static MenuSchema() { - return Joi.object({ - sales_channel: ContentPublicModel.SalesChannelSchema(), - other_seller: ContentPublicModel.OtherSellerSchema(), - footer_content: ContentPublicModel.FooterContentSchema(), - can_create_business_account: Joi.boolean(), - company_level: Joi.array().items( - ContentPublicModel.CompanyLevelMenuItemSchema() - ), - application_level: Joi.array().items( - ContentPublicModel.ApplicationLevelMenuItemSchema() - ), - }); - } - - /** @returns {MenusSchema} */ - static MenusSchema() { - return Joi.object({ - _id: Joi.string().allow(""), - desktop: ContentPublicModel.MenuTypeSchema(), - mobile: ContentPublicModel.MenuTypeSchema(), - __v: Joi.number(), - }); - } - - /** @returns {MenuTypeSchema} */ - static MenuTypeSchema() { - return Joi.object({ - menu: ContentPublicModel.MenuSchema(), - }); - } - - /** @returns {CompanyLevelMenuItemSchema} */ - static CompanyLevelMenuItemSchema() { - return Joi.object({ - visible_on: ContentPublicModel.VisibleOnSchema(), - display: Joi.string().allow(""), - permissions: Joi.array().items(Joi.string().allow("")), - title: Joi.string().allow(""), - link: Joi.string().allow(""), - icon: Joi.string().allow(""), - is_disabled: Joi.boolean(), - child: Joi.array().items(Joi.link("#CompanyLevelMenuItemSchema")), - }).id("CompanyLevelMenuItemSchema"); - } - - /** @returns {ApplicationLevelMenuItemSchema} */ - static ApplicationLevelMenuItemSchema() { - return Joi.object({ - visible_on: ContentPublicModel.VisibleOnSchema(), - display: Joi.string().allow(""), - permissions: Joi.array().items(Joi.string().allow("")), - title: Joi.string().allow(""), - link: Joi.string().allow(""), - icon: Joi.string().allow(""), - is_disabled: Joi.boolean(), - child: Joi.array().items(Joi.link("#ApplicationLevelMenuItemSchema")), - }).id("ApplicationLevelMenuItemSchema"); - } - - /** @returns {VisibleOnSchema} */ - static VisibleOnSchema() { - return Joi.object({ - web: Joi.boolean(), - ios: Joi.boolean(), - android: Joi.boolean(), - }); - } - - /** @returns {SalesChannelSchema} */ - static SalesChannelSchema() { - return Joi.object({ - can_add: Joi.boolean(), - title: Joi.string().allow(""), - }); - } - - /** @returns {OtherSellerSchema} */ - static OtherSellerSchema() { - return Joi.object({ - is_visible: Joi.boolean(), - title: Joi.string().allow(""), - }); - } - - /** @returns {FooterContentSchema} */ - static FooterContentSchema() { - return Joi.object({ - is_visible: Joi.boolean(), - line_one: Joi.string().allow(""), - line_two: Joi.string().allow(""), - }); - } - - /** @returns {AnalyticsTagsSchema} */ - static AnalyticsTagsSchema() { - return Joi.object({ - _id: Joi.string().allow(""), - __v: Joi.number(), - body_code: Joi.string().allow(""), - enabled: Joi.boolean(), - header_code: Joi.string().allow(""), - name: Joi.string().allow(""), - }); - } - - /** @returns {CustomPageBySlugSchema} */ - static CustomPageBySlugSchema() { - return Joi.object({ - _id: Joi.string().allow(""), - title: Joi.string().allow(""), - slug: Joi.string().allow(""), - type: Joi.string().allow(""), - description: Joi.string().allow(""), - published: Joi.boolean(), - content: Joi.array().items(ContentPublicModel.ItemSchema()), - seo: ContentPublicModel.CreateCustomPageSeoSchema(), - created_by: ContentPublicModel.CreatedBySchema(), - modified_by: ContentPublicModel.CreatedBySchema(), - archived: Joi.boolean(), - created_on: Joi.string().allow(""), - modified_on: Joi.string().allow(""), - __v: Joi.number(), - }); - } - - /** @returns {ItemSchema} */ - static ItemSchema() { - return Joi.object({ - type: Joi.string().allow(""), - value: Joi.string().allow(""), - }); - } - - /** @returns {CreateCustomPageSeoSchema} */ - static CreateCustomPageSeoSchema() { - return Joi.object({ - title: Joi.string().allow(""), - description: Joi.string().allow(""), - }); - } - - /** @returns {RawHtmlContentSchema} */ - static RawHtmlContentSchema() { - return Joi.object({ - type: Joi.string().allow(""), - value: Joi.string().allow(""), - }); - } - - /** @returns {FooterSchema} */ - static FooterSchema() { - return Joi.object({ - _id: Joi.string().allow(""), - title: Joi.string().allow(""), - description: Joi.string().allow(""), - type: Joi.string().allow(""), - tags: Joi.array().items(Joi.any()), - published: Joi.boolean(), - content: Joi.array().items(ContentPublicModel.RawHtmlContentSchema()), - footer_meta: Joi.array().items(Joi.any()), - created_by: ContentPublicModel.CreatedBySchema(), - modified_by: ContentPublicModel.CreatedBySchema(), - archived: Joi.boolean(), - __v: Joi.number(), - }); - } - - /** @returns {HomePageContentSchema} */ - static HomePageContentSchema() { - return Joi.object({ - _id: Joi.string().allow(""), - slug: Joi.string().allow(""), - created_by: ContentPublicModel.CreatedBySchema(), - archived: Joi.boolean(), - page_type: Joi.string().allow(""), - created_on: Joi.string().allow(""), - modified_on: Joi.string().allow(""), - __v: Joi.number(), - }); - } - - /** @returns {NavItemSchema} */ - static NavItemSchema() { - return Joi.object({ - title: Joi.string().allow(""), - link: Joi.string().allow(""), - href: Joi.string().allow(""), - }); - } - - /** @returns {NavbarSchema} */ - static NavbarSchema() { - return Joi.object({ - _id: Joi.string().allow(""), - items: Joi.array().items(ContentPublicModel.NavItemSchema()), - __v: Joi.number(), - modified_by: ContentPublicModel.CreatedBySchema(), - }); - } - - /** @returns {MediaSchema} */ - static MediaSchema() { - return Joi.object({ - url: Joi.string().allow(""), - type: Joi.string().allow(""), - alt: Joi.string().allow(""), - anchor_link: Joi.string().allow(""), - }); - } - - /** @returns {CreatedBySchema} */ - static CreatedBySchema() { - return Joi.object({ - user_id: Joi.string().allow(""), - }); - } - - /** @returns {PricingBannerSchema} */ - static PricingBannerSchema() { - return Joi.object({ - _id: Joi.string().allow(""), - web_banner: ContentPublicModel.MediaSchema(), - mobile_banner: ContentPublicModel.MediaSchema(), - published: Joi.boolean(), - created_by: ContentPublicModel.CreatedBySchema(), - modified_by: ContentPublicModel.CreatedBySchema(), - created_on: Joi.string().allow(""), - modified_on: Joi.string().allow(""), - __v: Joi.number(), - }); - } - - /** @returns {SdkReadmeSchema} */ - static SdkReadmeSchema() { - return Joi.object({ - data: Joi.string().allow(""), - }); - } - - /** @returns {TagsSchema} */ - static TagsSchema() { - return Joi.object({ - items: Joi.array().items(ContentPublicModel.CustomItemSchema()), - page: ContentPublicModel.PageSchema(), - }); - } - - /** @returns {CustomItemSchema} */ - static CustomItemSchema() { - return Joi.object({ - _id: Joi.string().allow(""), - name: Joi.string().allow(""), - type: Joi.string().allow(""), - sub_type: Joi.string().allow(""), - position: Joi.string().allow(""), - archived: Joi.boolean(), - created_by: ContentPublicModel.UserSchema(), - url: Joi.string().allow(""), - content: Joi.string().allow(""), - created_on: Joi.string().allow(""), - modified_on: Joi.string().allow(""), - __v: Joi.number(), - }); - } - - /** @returns {PageSchema} */ - static PageSchema() { - return Joi.object({ - type: Joi.string().allow(""), - current: Joi.number(), - size: Joi.number(), - item_total: Joi.number(), - has_next: Joi.boolean(), - }); - } - - /** @returns {UserSchema} */ - static UserSchema() { - return Joi.object({ - user_id: Joi.string().allow(""), - }); - } - /** @returns {CredentialSchema} */ static CredentialSchema() { return Joi.object({ - _id: Joi.string().allow(""), - configuration: ContentPublicModel.ConfigurationSchema(), + configuration: Joi.any(), entity_type: Joi.string().allow(""), type: Joi.string().allow(""), is_enable: Joi.boolean(), - updated_at: Joi.string().allow(""), - created_at: Joi.string().allow(""), - __v: Joi.number(), - }); - } - - /** @returns {ConfigurationSchema} */ - static ConfigurationSchema() { - return Joi.object({ - token: Joi.string().allow(""), - host: Joi.string().allow(""), }); } @@ -699,7 +53,7 @@ class ContentPublicModel { info: Joi.string().allow(""), request_id: Joi.string().allow(""), stack_trace: Joi.string().allow(""), - meta: Joi.object().pattern(/\S/, Joi.any()), + meta: Joi.any(), }); } } diff --git a/sdk/public/Content/ContentPublicValidator.d.ts b/sdk/public/Content/ContentPublicValidator.d.ts index 5ac7c423b..6dfc3629c 100644 --- a/sdk/public/Content/ContentPublicValidator.d.ts +++ b/sdk/public/Content/ContentPublicValidator.d.ts @@ -1,84 +1,18 @@ export = ContentPublicValidator; -/** @typedef GetAllTagsParam */ -/** @typedef GetAnalyticsTagsParam */ -/** @typedef GetBasicDetailsParam */ /** * @typedef GetCredentialsByEntityParam - * @property {string} entityType - Server Type + * @property {string} entity - Server Type */ -/** - * @typedef GetCustomPageParam - * @property {string} slug - Unique identifier created for each feature object - * in the schema. - */ -/** @typedef GetFooterContentParam */ -/** - * @typedef GetHomePageContentParam - * @property {string} pageType - The type of the page (e.g., pricing). - */ -/** @typedef GetMenuContentParam */ -/** - * @typedef GetMenuContentByTypeParam - * @property {string} type - Type param is type of device - */ -/** @typedef GetNavbarParam */ -/** @typedef GetPricingBannerParam */ declare class ContentPublicValidator { - /** @returns {GetAllTagsParam} */ - static getAllTags(): any; - /** @returns {GetAnalyticsTagsParam} */ - static getAnalyticsTags(): any; - /** @returns {GetBasicDetailsParam} */ - static getBasicDetails(): any; /** @returns {GetCredentialsByEntityParam} */ static getCredentialsByEntity(): GetCredentialsByEntityParam; - /** @returns {GetCustomPageParam} */ - static getCustomPage(): GetCustomPageParam; - /** @returns {GetFooterContentParam} */ - static getFooterContent(): any; - /** @returns {GetHomePageContentParam} */ - static getHomePageContent(): GetHomePageContentParam; - /** @returns {GetMenuContentParam} */ - static getMenuContent(): any; - /** @returns {GetMenuContentByTypeParam} */ - static getMenuContentByType(): GetMenuContentByTypeParam; - /** @returns {GetNavbarParam} */ - static getNavbar(): any; - /** @returns {GetPricingBannerParam} */ - static getPricingBanner(): any; } declare namespace ContentPublicValidator { - export { GetAllTagsParam, GetAnalyticsTagsParam, GetBasicDetailsParam, GetCredentialsByEntityParam, GetCustomPageParam, GetFooterContentParam, GetHomePageContentParam, GetMenuContentParam, GetMenuContentByTypeParam, GetNavbarParam, GetPricingBannerParam }; + export { GetCredentialsByEntityParam }; } type GetCredentialsByEntityParam = { /** * - Server Type */ - entityType: string; -}; -type GetCustomPageParam = { - /** - * - Unique identifier created for each feature object - * in the schema. - */ - slug: string; -}; -type GetHomePageContentParam = { - /** - * - The type of the page (e.g., pricing). - */ - pageType: string; -}; -type GetMenuContentByTypeParam = { - /** - * - Type param is type of device - */ - type: string; + entity: string; }; -type GetAllTagsParam = any; -type GetAnalyticsTagsParam = any; -type GetBasicDetailsParam = any; -type GetFooterContentParam = any; -type GetMenuContentParam = any; -type GetNavbarParam = any; -type GetPricingBannerParam = any; diff --git a/sdk/public/Content/ContentPublicValidator.js b/sdk/public/Content/ContentPublicValidator.js index 5efbfa8f7..59a09a52a 100644 --- a/sdk/public/Content/ContentPublicValidator.js +++ b/sdk/public/Content/ContentPublicValidator.js @@ -2,104 +2,18 @@ const Joi = require("joi"); const ContentPublicModel = require("./ContentPublicModel"); -/** @typedef GetAllTagsParam */ - -/** @typedef GetAnalyticsTagsParam */ - -/** @typedef GetBasicDetailsParam */ - /** * @typedef GetCredentialsByEntityParam - * @property {string} entityType - Server Type - */ - -/** - * @typedef GetCustomPageParam - * @property {string} slug - Unique identifier created for each feature object - * in the schema. + * @property {string} entity - Server Type */ -/** @typedef GetFooterContentParam */ - -/** - * @typedef GetHomePageContentParam - * @property {string} pageType - The type of the page (e.g., pricing). - */ - -/** @typedef GetMenuContentParam */ - -/** - * @typedef GetMenuContentByTypeParam - * @property {string} type - Type param is type of device - */ - -/** @typedef GetNavbarParam */ - -/** @typedef GetPricingBannerParam */ - class ContentPublicValidator { - /** @returns {GetAllTagsParam} */ - static getAllTags() { - return Joi.object({}); - } - - /** @returns {GetAnalyticsTagsParam} */ - static getAnalyticsTags() { - return Joi.object({}); - } - - /** @returns {GetBasicDetailsParam} */ - static getBasicDetails() { - return Joi.object({}); - } - /** @returns {GetCredentialsByEntityParam} */ static getCredentialsByEntity() { return Joi.object({ - entityType: Joi.string().allow("").required(), - }).required(); - } - - /** @returns {GetCustomPageParam} */ - static getCustomPage() { - return Joi.object({ - slug: Joi.string().allow("").required(), - }).required(); - } - - /** @returns {GetFooterContentParam} */ - static getFooterContent() { - return Joi.object({}); - } - - /** @returns {GetHomePageContentParam} */ - static getHomePageContent() { - return Joi.object({ - pageType: Joi.string().allow("").required(), + entity: Joi.string().allow("").required(), }).required(); } - - /** @returns {GetMenuContentParam} */ - static getMenuContent() { - return Joi.object({}); - } - - /** @returns {GetMenuContentByTypeParam} */ - static getMenuContentByType() { - return Joi.object({ - type: Joi.string().allow("").required(), - }).required(); - } - - /** @returns {GetNavbarParam} */ - static getNavbar() { - return Joi.object({}); - } - - /** @returns {GetPricingBannerParam} */ - static getPricingBanner() { - return Joi.object({}); - } } module.exports = ContentPublicValidator; diff --git a/sdk/public/Webhook/WebhookPublicClient.d.ts b/sdk/public/Webhook/WebhookPublicClient.d.ts index 9d66e374b..e271c3d41 100644 --- a/sdk/public/Webhook/WebhookPublicClient.d.ts +++ b/sdk/public/Webhook/WebhookPublicClient.d.ts @@ -15,12 +15,12 @@ declare class Webhook { * @param {WebhookPublicValidator.FetchAllWebhookEventsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name fetchAllWebhookEvents * @summary: Fetch all webhook events. * @description: Retrieve a list of all webhook events in the public server setup. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/fetchAllWebhookEvents/). */ - fetchAllWebhookEvents({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + fetchAllWebhookEvents({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {WebhookPublicValidator.NotifyDepricatedEventParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -35,32 +35,32 @@ declare class Webhook { * @param {WebhookPublicValidator.QueryWebhookEventDetailsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name queryWebhookEventDetails * @summary: Query webhook event details. * @description: Query and obtain detailed information about webhook events in the public server configurations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/queryWebhookEventDetails/). */ - queryWebhookEventDetails({ body, requestHeaders }?: WebhookPublicValidator.QueryWebhookEventDetailsParam, { responseHeaders }?: object): Promise; + queryWebhookEventDetails({ body, requestHeaders }?: WebhookPublicValidator.QueryWebhookEventDetailsParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPublicValidator.TestHandlerTransformationParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name testHandlerTransformation * @summary: Test transformation of handler * @description: Test transformation of handler - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/testHandlerTransformation/). */ - testHandlerTransformation({ body, requestHeaders }?: WebhookPublicValidator.TestHandlerTransformationParam, { responseHeaders }?: object): Promise; + testHandlerTransformation({ body, requestHeaders }?: WebhookPublicValidator.TestHandlerTransformationParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPublicValidator.ValidateSchemaParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name validateSchema * @summary: Validate Schema for an event * @description: Validate Schema for an event - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/validateSchema/). */ - validateSchema({ body, requestHeaders }?: WebhookPublicValidator.ValidateSchemaParam, { responseHeaders }?: object): Promise; + validateSchema({ body, requestHeaders }?: WebhookPublicValidator.ValidateSchemaParam, { responseHeaders }?: object): Promise; } import WebhookPublicModel = require("./WebhookPublicModel"); import WebhookPublicValidator = require("./WebhookPublicValidator"); diff --git a/sdk/public/Webhook/WebhookPublicClient.js b/sdk/public/Webhook/WebhookPublicClient.js index e47af36d7..39b935e83 100644 --- a/sdk/public/Webhook/WebhookPublicClient.js +++ b/sdk/public/Webhook/WebhookPublicClient.js @@ -46,7 +46,7 @@ class Webhook { * @param {WebhookPublicValidator.FetchAllWebhookEventsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name fetchAllWebhookEvents * @summary: Fetch all webhook events. * @description: Retrieve a list of all webhook events in the public server setup. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/fetchAllWebhookEvents/). @@ -101,7 +101,7 @@ class Webhook { const { error: res_error, - } = WebhookPublicModel.EventDetails().validate(responseData, { + } = WebhookPublicModel.EventConfigResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -202,7 +202,7 @@ class Webhook { * @param {WebhookPublicValidator.QueryWebhookEventDetailsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name queryWebhookEventDetails * @summary: Query webhook event details. * @description: Query and obtain detailed information about webhook events in the public server configurations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/queryWebhookEventDetails/). @@ -259,7 +259,7 @@ class Webhook { const { error: res_error, - } = WebhookPublicModel.EventDetails().validate(responseData, { + } = WebhookPublicModel.EventConfigResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -282,7 +282,7 @@ class Webhook { * @param {WebhookPublicValidator.TestHandlerTransformationParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name testHandlerTransformation * @summary: Test transformation of handler * @description: Test transformation of handler - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/testHandlerTransformation/). @@ -339,7 +339,7 @@ class Webhook { const { error: res_error, - } = WebhookPublicModel.TransformEventResult().validate(responseData, { + } = WebhookPublicModel.TransformEventResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -362,7 +362,7 @@ class Webhook { * @param {WebhookPublicValidator.ValidateSchemaParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PublicAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name validateSchema * @summary: Validate Schema for an event * @description: Validate Schema for an event - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/validateSchema/). @@ -417,7 +417,7 @@ class Webhook { const { error: res_error, - } = WebhookPublicModel.ValidateSchemaResult().validate(responseData, { + } = WebhookPublicModel.ValidateSchemaResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/public/Webhook/WebhookPublicModel.d.ts b/sdk/public/Webhook/WebhookPublicModel.d.ts index 8f937e624..bc2000349 100644 --- a/sdk/public/Webhook/WebhookPublicModel.d.ts +++ b/sdk/public/Webhook/WebhookPublicModel.d.ts @@ -14,7 +14,7 @@ export = WebhookPublicModel; * @property {string} [group] */ /** - * @typedef EventDetails + * @typedef EventConfigResponse * @property {EventConfig[]} [event_configs] */ /** @@ -58,7 +58,7 @@ export = WebhookPublicModel; * @property {number} [company_id] */ /** - * @typedef TransformEventPayload + * @typedef TransformEventRequest * @property {string} event_name * @property {string} event_type * @property {string} event_category @@ -66,7 +66,7 @@ export = WebhookPublicModel; * @property {EventSchema} event */ /** - * @typedef ValidateSchemaPayload + * @typedef ValidateSchemaRequest * @property {string} event_name * @property {string} event_type * @property {string} event_category @@ -75,12 +75,12 @@ export = WebhookPublicModel; * @property {Object} event_schema */ /** - * @typedef ValidateSchemaResult + * @typedef ValidateSchemaResponse * @property {boolean} [status] * @property {string} [message] */ /** - * @typedef TransformEventResult + * @typedef TransformEventResponse * @property {string[]} [event_trace_id] * @property {TransformEventData} [data] * @property {string} [event_name] @@ -93,7 +93,7 @@ export = WebhookPublicModel; declare class WebhookPublicModel { } declare namespace WebhookPublicModel { - export { EventConfig, EventDetails, EventConfigBase, EventNotifier, EventSchema, InternalTransformEvent, TransformEventData, TransformEventServiceMeta, TransformEventAssociation, TransformEventPayload, ValidateSchemaPayload, ValidateSchemaResult, TransformEventResult }; + export { EventConfig, EventConfigResponse, EventConfigBase, EventNotifier, EventSchema, InternalTransformEvent, TransformEventData, TransformEventServiceMeta, TransformEventAssociation, TransformEventRequest, ValidateSchemaRequest, ValidateSchemaResponse, TransformEventResponse }; } /** @returns {EventConfig} */ declare function EventConfig(): EventConfig; @@ -110,9 +110,9 @@ type EventConfig = { updated_on?: string; group?: string; }; -/** @returns {EventDetails} */ -declare function EventDetails(): EventDetails; -type EventDetails = { +/** @returns {EventConfigResponse} */ +declare function EventConfigResponse(): EventConfigResponse; +type EventConfigResponse = { event_configs?: EventConfig[]; }; /** @returns {EventConfigBase} */ @@ -162,18 +162,18 @@ declare function TransformEventAssociation(): TransformEventAssociation; type TransformEventAssociation = { company_id?: number; }; -/** @returns {TransformEventPayload} */ -declare function TransformEventPayload(): TransformEventPayload; -type TransformEventPayload = { +/** @returns {TransformEventRequest} */ +declare function TransformEventRequest(): TransformEventRequest; +type TransformEventRequest = { event_name: string; event_type: string; event_category: string; event_version: string; event: EventSchema; }; -/** @returns {ValidateSchemaPayload} */ -declare function ValidateSchemaPayload(): ValidateSchemaPayload; -type ValidateSchemaPayload = { +/** @returns {ValidateSchemaRequest} */ +declare function ValidateSchemaRequest(): ValidateSchemaRequest; +type ValidateSchemaRequest = { event_name: string; event_type: string; event_category: string; @@ -181,15 +181,15 @@ type ValidateSchemaPayload = { event: EventSchema; event_schema: any; }; -/** @returns {ValidateSchemaResult} */ -declare function ValidateSchemaResult(): ValidateSchemaResult; -type ValidateSchemaResult = { +/** @returns {ValidateSchemaResponse} */ +declare function ValidateSchemaResponse(): ValidateSchemaResponse; +type ValidateSchemaResponse = { status?: boolean; message?: string; }; -/** @returns {TransformEventResult} */ -declare function TransformEventResult(): TransformEventResult; -type TransformEventResult = { +/** @returns {TransformEventResponse} */ +declare function TransformEventResponse(): TransformEventResponse; +type TransformEventResponse = { event_trace_id?: string[]; data?: TransformEventData; event_name?: string; diff --git a/sdk/public/Webhook/WebhookPublicModel.js b/sdk/public/Webhook/WebhookPublicModel.js index aebc3f84b..860161c3d 100644 --- a/sdk/public/Webhook/WebhookPublicModel.js +++ b/sdk/public/Webhook/WebhookPublicModel.js @@ -16,7 +16,7 @@ const Joi = require("joi"); */ /** - * @typedef EventDetails + * @typedef EventConfigResponse * @property {EventConfig[]} [event_configs] */ @@ -68,7 +68,7 @@ const Joi = require("joi"); */ /** - * @typedef TransformEventPayload + * @typedef TransformEventRequest * @property {string} event_name * @property {string} event_type * @property {string} event_category @@ -77,7 +77,7 @@ const Joi = require("joi"); */ /** - * @typedef ValidateSchemaPayload + * @typedef ValidateSchemaRequest * @property {string} event_name * @property {string} event_type * @property {string} event_category @@ -87,13 +87,13 @@ const Joi = require("joi"); */ /** - * @typedef ValidateSchemaResult + * @typedef ValidateSchemaResponse * @property {boolean} [status] * @property {string} [message] */ /** - * @typedef TransformEventResult + * @typedef TransformEventResponse * @property {string[]} [event_trace_id] * @property {TransformEventData} [data] * @property {string} [event_name] @@ -122,8 +122,8 @@ class WebhookPublicModel { }); } - /** @returns {EventDetails} */ - static EventDetails() { + /** @returns {EventConfigResponse} */ + static EventConfigResponse() { return Joi.object({ event_configs: Joi.array().items(WebhookPublicModel.EventConfig()), }); @@ -190,8 +190,8 @@ class WebhookPublicModel { }); } - /** @returns {TransformEventPayload} */ - static TransformEventPayload() { + /** @returns {TransformEventRequest} */ + static TransformEventRequest() { return Joi.object({ event_name: Joi.string().allow("").required(), event_type: Joi.string().allow("").required(), @@ -201,8 +201,8 @@ class WebhookPublicModel { }); } - /** @returns {ValidateSchemaPayload} */ - static ValidateSchemaPayload() { + /** @returns {ValidateSchemaRequest} */ + static ValidateSchemaRequest() { return Joi.object({ event_name: Joi.string().allow("").required(), event_type: Joi.string().allow("").required(), @@ -213,16 +213,16 @@ class WebhookPublicModel { }); } - /** @returns {ValidateSchemaResult} */ - static ValidateSchemaResult() { + /** @returns {ValidateSchemaResponse} */ + static ValidateSchemaResponse() { return Joi.object({ status: Joi.boolean(), message: Joi.string().allow(""), }); } - /** @returns {TransformEventResult} */ - static TransformEventResult() { + /** @returns {TransformEventResponse} */ + static TransformEventResponse() { return Joi.object({ event_trace_id: Joi.array().items(Joi.string().allow("")), data: WebhookPublicModel.TransformEventData(), diff --git a/sdk/public/Webhook/WebhookPublicValidator.d.ts b/sdk/public/Webhook/WebhookPublicValidator.d.ts index 69c578ac2..b3b0055e2 100644 --- a/sdk/public/Webhook/WebhookPublicValidator.d.ts +++ b/sdk/public/Webhook/WebhookPublicValidator.d.ts @@ -7,11 +7,11 @@ export = WebhookPublicValidator; */ /** * @typedef TestHandlerTransformationParam - * @property {WebhookPublicModel.TransformEventPayload} body + * @property {WebhookPublicModel.TransformEventRequest} body */ /** * @typedef ValidateSchemaParam - * @property {WebhookPublicModel.ValidateSchemaPayload} body + * @property {WebhookPublicModel.ValidateSchemaRequest} body */ declare class WebhookPublicValidator { /** @returns {FetchAllWebhookEventsParam} */ @@ -32,10 +32,10 @@ type QueryWebhookEventDetailsParam = { body: WebhookPublicModel.EventConfigBase[]; }; type TestHandlerTransformationParam = { - body: WebhookPublicModel.TransformEventPayload; + body: WebhookPublicModel.TransformEventRequest; }; type ValidateSchemaParam = { - body: WebhookPublicModel.ValidateSchemaPayload; + body: WebhookPublicModel.ValidateSchemaRequest; }; type FetchAllWebhookEventsParam = any; type NotifyDepricatedEventParam = any; diff --git a/sdk/public/Webhook/WebhookPublicValidator.js b/sdk/public/Webhook/WebhookPublicValidator.js index 67f44cfcc..95f9e9198 100644 --- a/sdk/public/Webhook/WebhookPublicValidator.js +++ b/sdk/public/Webhook/WebhookPublicValidator.js @@ -13,12 +13,12 @@ const WebhookPublicModel = require("./WebhookPublicModel"); /** * @typedef TestHandlerTransformationParam - * @property {WebhookPublicModel.TransformEventPayload} body + * @property {WebhookPublicModel.TransformEventRequest} body */ /** * @typedef ValidateSchemaParam - * @property {WebhookPublicModel.ValidateSchemaPayload} body + * @property {WebhookPublicModel.ValidateSchemaRequest} body */ class WebhookPublicValidator { @@ -42,14 +42,14 @@ class WebhookPublicValidator { /** @returns {TestHandlerTransformationParam} */ static testHandlerTransformation() { return Joi.object({ - body: WebhookPublicModel.TransformEventPayload().required(), + body: WebhookPublicModel.TransformEventRequest().required(), }).required(); } /** @returns {ValidateSchemaParam} */ static validateSchema() { return Joi.object({ - body: WebhookPublicModel.ValidateSchemaPayload().required(), + body: WebhookPublicModel.ValidateSchemaRequest().required(), }).required(); } }